@rh-support/components 2.1.49 → 2.1.51

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 (337) hide show
  1. package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
  2. package/lib/esm/LanguageSelector/LanguageSelector.js +13 -3
  3. package/lib/esm/LanguageSelector/languageSelector.css +1 -1
  4. package/package.json +10 -21
  5. package/lib/cjs/AlertMessage/AlertMessage.css +0 -9
  6. package/lib/cjs/AlertMessage/AlertMessage.d.ts +0 -24
  7. package/lib/cjs/AlertMessage/AlertMessage.d.ts.map +0 -1
  8. package/lib/cjs/AlertMessage/AlertMessage.js +0 -30
  9. package/lib/cjs/AlertMessage/index.d.ts +0 -2
  10. package/lib/cjs/AlertMessage/index.d.ts.map +0 -1
  11. package/lib/cjs/AlertMessage/index.js +0 -18
  12. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -7
  13. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +0 -1
  14. package/lib/cjs/ConfirmationModal/ConfirmationContext.js +0 -57
  15. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +0 -30
  16. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +0 -1
  17. package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +0 -28
  18. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -1
  19. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +0 -1
  20. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +0 -36
  21. package/lib/cjs/ConfirmationModal/index.d.ts +0 -3
  22. package/lib/cjs/ConfirmationModal/index.d.ts.map +0 -1
  23. package/lib/cjs/ConfirmationModal/index.js +0 -18
  24. package/lib/cjs/CoverSpinner/CoverSpinner.css +0 -16
  25. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -4
  26. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +0 -1
  27. package/lib/cjs/CoverSpinner/CoverSpinner.js +0 -13
  28. package/lib/cjs/CoverSpinner/index.d.ts +0 -2
  29. package/lib/cjs/CoverSpinner/index.d.ts.map +0 -1
  30. package/lib/cjs/CoverSpinner/index.js +0 -17
  31. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts +0 -15
  32. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +0 -1
  33. package/lib/cjs/CustomContentLoader/CustomContentLoader.js +0 -62
  34. package/lib/cjs/CustomContentLoader/index.d.ts +0 -2
  35. package/lib/cjs/CustomContentLoader/index.d.ts.map +0 -1
  36. package/lib/cjs/CustomContentLoader/index.js +0 -17
  37. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -14
  38. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +0 -1
  39. package/lib/cjs/CustomTextInput/CustomTextInput.js +0 -50
  40. package/lib/cjs/CustomTextInput/index.d.ts +0 -2
  41. package/lib/cjs/CustomTextInput/index.d.ts.map +0 -1
  42. package/lib/cjs/CustomTextInput/index.js +0 -17
  43. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts +0 -6
  44. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts.map +0 -1
  45. package/lib/cjs/DropDownList/AsyncDropDownList.js +0 -10
  46. package/lib/cjs/DropDownList/DropDownList.d.ts +0 -9
  47. package/lib/cjs/DropDownList/DropDownList.d.ts.map +0 -1
  48. package/lib/cjs/DropDownList/DropDownList.js +0 -145
  49. package/lib/cjs/DropDownList/DropdownWrapper.d.ts +0 -16
  50. package/lib/cjs/DropDownList/DropdownWrapper.d.ts.map +0 -1
  51. package/lib/cjs/DropDownList/DropdownWrapper.js +0 -25
  52. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts +0 -4
  53. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts.map +0 -1
  54. package/lib/cjs/DropDownList/MultiSelectDropdownList.js +0 -7
  55. package/lib/cjs/DropDownList/Readme.md +0 -114
  56. package/lib/cjs/DropDownList/SearchableList.d.ts +0 -14
  57. package/lib/cjs/DropDownList/SearchableList.d.ts.map +0 -1
  58. package/lib/cjs/DropDownList/SearchableList.js +0 -104
  59. package/lib/cjs/DropDownList/SelectList.d.ts +0 -11
  60. package/lib/cjs/DropDownList/SelectList.d.ts.map +0 -1
  61. package/lib/cjs/DropDownList/SelectList.js +0 -41
  62. package/lib/cjs/DropDownList/async.d.ts +0 -9
  63. package/lib/cjs/DropDownList/async.d.ts.map +0 -1
  64. package/lib/cjs/DropDownList/async.js +0 -142
  65. package/lib/cjs/DropDownList/dropdownList.css +0 -59
  66. package/lib/cjs/DropDownList/dropdownUtils.d.ts +0 -5
  67. package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +0 -1
  68. package/lib/cjs/DropDownList/dropdownUtils.js +0 -29
  69. package/lib/cjs/DropDownList/index.d.ts +0 -4
  70. package/lib/cjs/DropDownList/index.d.ts.map +0 -1
  71. package/lib/cjs/DropDownList/index.js +0 -19
  72. package/lib/cjs/DropDownList/types.d.ts +0 -54
  73. package/lib/cjs/DropDownList/types.d.ts.map +0 -1
  74. package/lib/cjs/DropDownList/types.js +0 -2
  75. package/lib/cjs/DropDownList/withMulti.d.ts +0 -5
  76. package/lib/cjs/DropDownList/withMulti.d.ts.map +0 -1
  77. package/lib/cjs/DropDownList/withMulti.js +0 -73
  78. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts +0 -37
  79. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  80. package/lib/cjs/ErrorBoundary/ErrorBoundary.js +0 -66
  81. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -15
  82. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +0 -1
  83. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +0 -39
  84. package/lib/cjs/ErrorBoundary/index.d.ts +0 -2
  85. package/lib/cjs/ErrorBoundary/index.d.ts.map +0 -1
  86. package/lib/cjs/ErrorBoundary/index.js +0 -17
  87. package/lib/cjs/ErrorPages/Generic403.d.ts +0 -3
  88. package/lib/cjs/ErrorPages/Generic403.d.ts.map +0 -1
  89. package/lib/cjs/ErrorPages/Generic403.js +0 -14
  90. package/lib/cjs/ErrorPages/index.d.ts +0 -2
  91. package/lib/cjs/ErrorPages/index.d.ts.map +0 -1
  92. package/lib/cjs/ErrorPages/index.js +0 -17
  93. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -12
  94. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +0 -1
  95. package/lib/cjs/FeedbackForm/FeedbackForm.js +0 -144
  96. package/lib/cjs/FeedbackForm/index.d.ts +0 -2
  97. package/lib/cjs/FeedbackForm/index.d.ts.map +0 -1
  98. package/lib/cjs/FeedbackForm/index.js +0 -17
  99. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts +0 -30
  100. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +0 -1
  101. package/lib/cjs/Functional/CaseContactsSelectorExternal.js +0 -227
  102. package/lib/cjs/Functional/index.d.ts +0 -2
  103. package/lib/cjs/Functional/index.d.ts.map +0 -1
  104. package/lib/cjs/Functional/index.js +0 -17
  105. package/lib/cjs/InlineEdit/InlineEdit.d.ts +0 -37
  106. package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +0 -1
  107. package/lib/cjs/InlineEdit/InlineEdit.js +0 -173
  108. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +0 -41
  109. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +0 -1
  110. package/lib/cjs/InlineEdit/NewInlineEdit.js +0 -182
  111. package/lib/cjs/InlineEdit/index.d.ts +0 -3
  112. package/lib/cjs/InlineEdit/index.d.ts.map +0 -1
  113. package/lib/cjs/InlineEdit/index.js +0 -18
  114. package/lib/cjs/InlineEdit/inlineEdit.css +0 -29
  115. package/lib/cjs/InlineEdit/newInlineEdit.css +0 -44
  116. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -26
  117. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +0 -1
  118. package/lib/cjs/LanguageSelector/LanguageSelector.js +0 -65
  119. package/lib/cjs/LanguageSelector/index.d.ts +0 -2
  120. package/lib/cjs/LanguageSelector/index.d.ts.map +0 -1
  121. package/lib/cjs/LanguageSelector/index.js +0 -17
  122. package/lib/cjs/LanguageSelector/languageSelector.css +0 -5
  123. package/lib/cjs/LoadingDots/LoadingDots.css +0 -33
  124. package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -13
  125. package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +0 -1
  126. package/lib/cjs/LoadingDots/LoadingDots.js +0 -25
  127. package/lib/cjs/LoadingDots/index.d.ts +0 -2
  128. package/lib/cjs/LoadingDots/index.d.ts.map +0 -1
  129. package/lib/cjs/LoadingDots/index.js +0 -18
  130. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -15
  131. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
  132. package/lib/cjs/LoadingIndicator/LoadingIndicator.js +0 -25
  133. package/lib/cjs/LoadingIndicator/index.d.ts +0 -2
  134. package/lib/cjs/LoadingIndicator/index.d.ts.map +0 -1
  135. package/lib/cjs/LoadingIndicator/index.js +0 -17
  136. package/lib/cjs/LoadingIndicator/loadingIndicator.css +0 -79
  137. package/lib/cjs/LoginModal/LoginModal.d.ts +0 -15
  138. package/lib/cjs/LoginModal/LoginModal.d.ts.map +0 -1
  139. package/lib/cjs/LoginModal/LoginModal.js +0 -21
  140. package/lib/cjs/LoginModal/index.d.ts +0 -2
  141. package/lib/cjs/LoginModal/index.d.ts.map +0 -1
  142. package/lib/cjs/LoginModal/index.js +0 -17
  143. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts +0 -45
  144. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +0 -1
  145. package/lib/cjs/MarkdownEditor/MarkdownEditor.js +0 -442
  146. package/lib/cjs/MarkdownEditor/index.d.ts +0 -2
  147. package/lib/cjs/MarkdownEditor/index.d.ts.map +0 -1
  148. package/lib/cjs/MarkdownEditor/index.js +0 -17
  149. package/lib/cjs/MarkdownEditor/markdownEditor.css +0 -113
  150. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts +0 -13
  151. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts.map +0 -1
  152. package/lib/cjs/MoreOrLess/MoreOrLess.js +0 -75
  153. package/lib/cjs/MoreOrLess/index.d.ts +0 -2
  154. package/lib/cjs/MoreOrLess/index.d.ts.map +0 -1
  155. package/lib/cjs/MoreOrLess/index.js +0 -17
  156. package/lib/cjs/PaginatedList/PaginatedList.d.ts +0 -18
  157. package/lib/cjs/PaginatedList/PaginatedList.d.ts.map +0 -1
  158. package/lib/cjs/PaginatedList/PaginatedList.js +0 -67
  159. package/lib/cjs/PaginatedList/index.d.ts +0 -2
  160. package/lib/cjs/PaginatedList/index.d.ts.map +0 -1
  161. package/lib/cjs/PaginatedList/index.js +0 -17
  162. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -10
  163. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +0 -1
  164. package/lib/cjs/PaginationCompact/PaginationCompact.js +0 -67
  165. package/lib/cjs/PaginationCompact/index.d.ts +0 -2
  166. package/lib/cjs/PaginationCompact/index.d.ts.map +0 -1
  167. package/lib/cjs/PaginationCompact/index.js +0 -17
  168. package/lib/cjs/PaginationCompact/paginationCompact.css +0 -5
  169. package/lib/cjs/PhoneInput/CountryData.d.ts +0 -3
  170. package/lib/cjs/PhoneInput/CountryData.d.ts.map +0 -1
  171. package/lib/cjs/PhoneInput/CountryData.js +0 -583
  172. package/lib/cjs/PhoneInput/PhoneInput.d.ts +0 -20
  173. package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +0 -1
  174. package/lib/cjs/PhoneInput/PhoneInput.js +0 -293
  175. package/lib/cjs/PhoneInput/PhoneInput.scss +0 -753
  176. package/lib/cjs/PhoneInput/flags.png +0 -0
  177. package/lib/cjs/PhoneInput/index.d.ts +0 -2
  178. package/lib/cjs/PhoneInput/index.d.ts.map +0 -1
  179. package/lib/cjs/PhoneInput/index.js +0 -17
  180. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -9
  181. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +0 -1
  182. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +0 -68
  183. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts +0 -12
  184. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts.map +0 -1
  185. package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +0 -39
  186. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts +0 -6
  187. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts.map +0 -1
  188. package/lib/cjs/ProgressBar/CircularProgressBar/constants.js +0 -8
  189. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts +0 -2
  190. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts.map +0 -1
  191. package/lib/cjs/ProgressBar/CircularProgressBar/index.js +0 -17
  192. package/lib/cjs/ProgressBar/CircularProgressBar/styles.css +0 -60
  193. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts +0 -32
  194. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts.map +0 -1
  195. package/lib/cjs/ProgressBar/CircularProgressBar/types.js +0 -2
  196. package/lib/cjs/ProgressBar/ProgressBar.d.ts +0 -15
  197. package/lib/cjs/ProgressBar/ProgressBar.d.ts.map +0 -1
  198. package/lib/cjs/ProgressBar/ProgressBar.js +0 -36
  199. package/lib/cjs/ProgressBar/index.d.ts +0 -3
  200. package/lib/cjs/ProgressBar/index.d.ts.map +0 -1
  201. package/lib/cjs/ProgressBar/index.js +0 -18
  202. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts +0 -15
  203. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts.map +0 -1
  204. package/lib/cjs/PromisifyModal/PromisifyModal.js +0 -43
  205. package/lib/cjs/PromisifyModal/index.d.ts +0 -2
  206. package/lib/cjs/PromisifyModal/index.d.ts.map +0 -1
  207. package/lib/cjs/PromisifyModal/index.js +0 -17
  208. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -8
  209. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +0 -1
  210. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +0 -20
  211. package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -5
  212. package/lib/cjs/SubscriptionAbuse/const.d.ts.map +0 -1
  213. package/lib/cjs/SubscriptionAbuse/const.js +0 -15
  214. package/lib/cjs/SubscriptionAbuse/index.d.ts +0 -3
  215. package/lib/cjs/SubscriptionAbuse/index.d.ts.map +0 -1
  216. package/lib/cjs/SubscriptionAbuse/index.js +0 -18
  217. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -12
  218. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +0 -1
  219. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +0 -48
  220. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -11
  221. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +0 -1
  222. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +0 -182
  223. package/lib/cjs/SupportFeedbackForm/index.d.ts +0 -3
  224. package/lib/cjs/SupportFeedbackForm/index.d.ts.map +0 -1
  225. package/lib/cjs/SupportFeedbackForm/index.js +0 -18
  226. package/lib/cjs/Table/PFTable.d.ts +0 -40
  227. package/lib/cjs/Table/PFTable.d.ts.map +0 -1
  228. package/lib/cjs/Table/PFTable.js +0 -208
  229. package/lib/cjs/Table/README.md +0 -65
  230. package/lib/cjs/Table/TableComponent.d.ts +0 -11
  231. package/lib/cjs/Table/TableComponent.d.ts.map +0 -1
  232. package/lib/cjs/Table/TableComponent.js +0 -42
  233. package/lib/cjs/Table/TablePagination.d.ts +0 -19
  234. package/lib/cjs/Table/TablePagination.d.ts.map +0 -1
  235. package/lib/cjs/Table/TablePagination.js +0 -50
  236. package/lib/cjs/Table/TableProvider.d.ts +0 -15
  237. package/lib/cjs/Table/TableProvider.d.ts.map +0 -1
  238. package/lib/cjs/Table/TableProvider.js +0 -25
  239. package/lib/cjs/Table/index.d.ts +0 -4
  240. package/lib/cjs/Table/index.d.ts.map +0 -1
  241. package/lib/cjs/Table/index.js +0 -19
  242. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -15
  243. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +0 -1
  244. package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +0 -121
  245. package/lib/cjs/TermsAndConditions/index.d.ts +0 -2
  246. package/lib/cjs/TermsAndConditions/index.d.ts.map +0 -1
  247. package/lib/cjs/TermsAndConditions/index.js +0 -17
  248. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts +0 -8
  249. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts.map +0 -1
  250. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +0 -140
  251. package/lib/cjs/TextAreaAutosize/index.d.ts +0 -2
  252. package/lib/cjs/TextAreaAutosize/index.d.ts.map +0 -1
  253. package/lib/cjs/TextAreaAutosize/index.js +0 -17
  254. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts +0 -20
  255. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +0 -1
  256. package/lib/cjs/TextAreaResizable/TextAreaResizable.js +0 -60
  257. package/lib/cjs/TextAreaResizable/index.d.ts +0 -2
  258. package/lib/cjs/TextAreaResizable/index.d.ts.map +0 -1
  259. package/lib/cjs/TextAreaResizable/index.js +0 -17
  260. package/lib/cjs/ToastNotification/ToastNotification.d.ts +0 -28
  261. package/lib/cjs/ToastNotification/ToastNotification.d.ts.map +0 -1
  262. package/lib/cjs/ToastNotification/ToastNotification.js +0 -71
  263. package/lib/cjs/ToastNotification/index.d.ts +0 -2
  264. package/lib/cjs/ToastNotification/index.d.ts.map +0 -1
  265. package/lib/cjs/ToastNotification/index.js +0 -17
  266. package/lib/cjs/ToastNotification/toastNotification.css +0 -22
  267. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts +0 -14
  268. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts.map +0 -1
  269. package/lib/cjs/TopContentSearch/TopContentSearch.js +0 -143
  270. package/lib/cjs/TopContentSearch/index.d.ts +0 -2
  271. package/lib/cjs/TopContentSearch/index.d.ts.map +0 -1
  272. package/lib/cjs/TopContentSearch/index.js +0 -17
  273. package/lib/cjs/TopContentSearch/topContentSearch.scss +0 -22
  274. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts +0 -14
  275. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts.map +0 -1
  276. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +0 -80
  277. package/lib/cjs/ValueChangedIcon/index.d.ts +0 -2
  278. package/lib/cjs/ValueChangedIcon/index.d.ts.map +0 -1
  279. package/lib/cjs/ValueChangedIcon/index.js +0 -17
  280. package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -12
  281. package/lib/cjs/helperFunctions/errorMessage.d.ts.map +0 -1
  282. package/lib/cjs/helperFunctions/errorMessage.js +0 -95
  283. package/lib/cjs/helperFunctions/errorMessage.scss +0 -3
  284. package/lib/cjs/helperFunctions/index.d.ts +0 -2
  285. package/lib/cjs/helperFunctions/index.d.ts.map +0 -1
  286. package/lib/cjs/helperFunctions/index.js +0 -17
  287. package/lib/cjs/hooks/index.d.ts +0 -15
  288. package/lib/cjs/hooks/index.d.ts.map +0 -1
  289. package/lib/cjs/hooks/index.js +0 -30
  290. package/lib/cjs/hooks/useBreakpoint.d.ts +0 -12
  291. package/lib/cjs/hooks/useBreakpoint.d.ts.map +0 -1
  292. package/lib/cjs/hooks/useBreakpoint.js +0 -91
  293. package/lib/cjs/hooks/useCopyToClipboard.d.ts +0 -6
  294. package/lib/cjs/hooks/useCopyToClipboard.d.ts.map +0 -1
  295. package/lib/cjs/hooks/useCopyToClipboard.js +0 -40
  296. package/lib/cjs/hooks/useDebounce.d.ts +0 -9
  297. package/lib/cjs/hooks/useDebounce.d.ts.map +0 -1
  298. package/lib/cjs/hooks/useDebounce.js +0 -40
  299. package/lib/cjs/hooks/useFetch.d.ts +0 -20
  300. package/lib/cjs/hooks/useFetch.d.ts.map +0 -1
  301. package/lib/cjs/hooks/useFetch.js +0 -70
  302. package/lib/cjs/hooks/useForceUpdate.d.ts +0 -18
  303. package/lib/cjs/hooks/useForceUpdate.d.ts.map +0 -1
  304. package/lib/cjs/hooks/useForceUpdate.js +0 -28
  305. package/lib/cjs/hooks/useForkRef.d.ts +0 -2
  306. package/lib/cjs/hooks/useForkRef.d.ts.map +0 -1
  307. package/lib/cjs/hooks/useForkRef.js +0 -29
  308. package/lib/cjs/hooks/useIsMounted.d.ts +0 -3
  309. package/lib/cjs/hooks/useIsMounted.d.ts.map +0 -1
  310. package/lib/cjs/hooks/useIsMounted.js +0 -18
  311. package/lib/cjs/hooks/useLRUCache.d.ts +0 -8
  312. package/lib/cjs/hooks/useLRUCache.d.ts.map +0 -1
  313. package/lib/cjs/hooks/useLRUCache.js +0 -28
  314. package/lib/cjs/hooks/useLocalStorage.d.ts +0 -5
  315. package/lib/cjs/hooks/useLocalStorage.d.ts.map +0 -1
  316. package/lib/cjs/hooks/useLocalStorage.js +0 -39
  317. package/lib/cjs/hooks/useOnScreen.d.ts +0 -2
  318. package/lib/cjs/hooks/useOnScreen.d.ts.map +0 -1
  319. package/lib/cjs/hooks/useOnScreen.js +0 -18
  320. package/lib/cjs/hooks/usePolling.d.ts +0 -2
  321. package/lib/cjs/hooks/usePolling.d.ts.map +0 -1
  322. package/lib/cjs/hooks/usePolling.js +0 -19
  323. package/lib/cjs/hooks/usePrevious.d.ts +0 -2
  324. package/lib/cjs/hooks/usePrevious.d.ts.map +0 -1
  325. package/lib/cjs/hooks/usePrevious.js +0 -12
  326. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +0 -13
  327. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +0 -1
  328. package/lib/cjs/hooks/useSelectKeyboardNavigator.js +0 -58
  329. package/lib/cjs/hooks/useTitle.d.ts +0 -2
  330. package/lib/cjs/hooks/useTitle.d.ts.map +0 -1
  331. package/lib/cjs/hooks/useTitle.js +0 -14
  332. package/lib/cjs/hooks/useUndo.d.ts +0 -22
  333. package/lib/cjs/hooks/useUndo.d.ts.map +0 -1
  334. package/lib/cjs/hooks/useUndo.js +0 -76
  335. package/lib/cjs/index.d.ts +0 -34
  336. package/lib/cjs/index.d.ts.map +0 -1
  337. package/lib/cjs/index.js +0 -49
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./errorMessage"), exports);
@@ -1,15 +0,0 @@
1
- export * from './useFetch';
2
- export * from './useIsMounted';
3
- export * from './useDebounce';
4
- export * from './usePrevious';
5
- export * from './useTitle';
6
- export * from './useUndo';
7
- export * from './usePolling';
8
- export * from './useCopyToClipboard';
9
- export * from './useForkRef';
10
- export * from './useForceUpdate';
11
- export * from './useLRUCache';
12
- export * from './useBreakpoint';
13
- export * from './useOnScreen';
14
- export * from './useSelectKeyboardNavigator';
15
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./useFetch"), exports);
18
- __exportStar(require("./useIsMounted"), exports);
19
- __exportStar(require("./useDebounce"), exports);
20
- __exportStar(require("./usePrevious"), exports);
21
- __exportStar(require("./useTitle"), exports);
22
- __exportStar(require("./useUndo"), exports);
23
- __exportStar(require("./usePolling"), exports);
24
- __exportStar(require("./useCopyToClipboard"), exports);
25
- __exportStar(require("./useForkRef"), exports);
26
- __exportStar(require("./useForceUpdate"), exports);
27
- __exportStar(require("./useLRUCache"), exports);
28
- __exportStar(require("./useBreakpoint"), exports);
29
- __exportStar(require("./useOnScreen"), exports);
30
- __exportStar(require("./useSelectKeyboardNavigator"), exports);
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- export type Config = {
3
- readonly [key: string]: string;
4
- };
5
- declare function BreakpointProvider({ children, queries }: React.PropsWithChildren<{
6
- queries?: Config;
7
- }>): React.JSX.Element;
8
- declare function useBreakpoint(): {
9
- readonly [key: string]: boolean;
10
- };
11
- export { useBreakpoint, BreakpointProvider };
12
- //# sourceMappingURL=useBreakpoint.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,MAAM,MAAM,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAaF,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAwB,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,qBA+ChH;AAED,iBAAS,aAAa;;EAMrB;AACD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
@@ -1,91 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.BreakpointProvider = exports.useBreakpoint = void 0;
27
- const react_1 = __importStar(require("react"));
28
- // https://medium.com/better-programming/how-to-use-media-queries-programmatically-in-react-4d6562c3bc97
29
- const defaultValue = {};
30
- const BreakpointContext = react_1.default.createContext(defaultValue);
31
- const defaultQueries = {
32
- xs: `(min-width: 0px)`,
33
- sm: `(min-width: 576px)`,
34
- md: `(min-width: 768px)`,
35
- lg: `(min-width: 992px)`,
36
- xl: `(min-width: 1300px)`,
37
- xxl: `(min-width: 1800px)`,
38
- };
39
- function BreakpointProvider({ children, queries = defaultQueries }) {
40
- const [queryMatch, setQueryMatch] = (0, react_1.useState)({});
41
- (0, react_1.useEffect)(() => {
42
- const mediaQueryLists = {};
43
- const keys = Object.keys(queries);
44
- let isAttached = false;
45
- const handleQueryListener = () => {
46
- const updatedMatches = keys.reduce((acc, media) => {
47
- acc[media] = !!(mediaQueryLists[media] && mediaQueryLists[media].matches);
48
- return acc;
49
- }, {});
50
- setQueryMatch(updatedMatches);
51
- };
52
- if (window && window.matchMedia) {
53
- const matches = {};
54
- keys.forEach((media) => {
55
- if (typeof queries[media] === 'string') {
56
- mediaQueryLists[media] = window.matchMedia(queries[media]);
57
- matches[media] = mediaQueryLists[media].matches;
58
- }
59
- else {
60
- matches[media] = false;
61
- }
62
- });
63
- setQueryMatch(matches);
64
- isAttached = true;
65
- keys.forEach((media) => {
66
- if (typeof queries[media] === 'string') {
67
- mediaQueryLists[media].addListener(handleQueryListener);
68
- }
69
- });
70
- }
71
- return () => {
72
- if (isAttached) {
73
- keys.forEach((media) => {
74
- if (typeof queries[media] === 'string') {
75
- mediaQueryLists[media].removeListener(handleQueryListener);
76
- }
77
- });
78
- }
79
- };
80
- }, [queries]);
81
- return react_1.default.createElement(BreakpointContext.Provider, { value: queryMatch }, children);
82
- }
83
- exports.BreakpointProvider = BreakpointProvider;
84
- function useBreakpoint() {
85
- const context = (0, react_1.useContext)(BreakpointContext);
86
- if (context === defaultValue) {
87
- throw new Error('useBreakpoint must be used within a BreakpointProvider');
88
- }
89
- return context;
90
- }
91
- exports.useBreakpoint = useBreakpoint;
@@ -1,6 +0,0 @@
1
- export declare const selectText: (elem: HTMLElement) => void;
2
- export declare function useCopyToClipboard(ref: any): {
3
- clipboardText: string;
4
- copyToClipboard: () => void;
5
- };
6
- //# sourceMappingURL=useCopyToClipboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,SAAU,WAAW,SAK3C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,GAAG,KAAA;;;EA0BrC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useCopyToClipboard = exports.selectText = void 0;
4
- const react_1 = require("react");
5
- const react_i18next_1 = require("react-i18next");
6
- const selectText = (elem) => {
7
- var range = document.createRange();
8
- range.selectNode(elem);
9
- window.getSelection().removeAllRanges();
10
- window.getSelection().addRange(range);
11
- };
12
- exports.selectText = selectText;
13
- function useCopyToClipboard(ref) {
14
- const [clipboardText, setClipboardText] = (0, react_1.useState)('');
15
- // @ts-ignore
16
- const { t } = (0, react_i18next_1.useTranslation)();
17
- const copyToClipboard = () => {
18
- (0, exports.selectText)(ref.current);
19
- try {
20
- document.execCommand('copy');
21
- setClipboardText(t('Copied!'));
22
- }
23
- catch (error) {
24
- if (/iPhone|iPad/i.test(navigator.userAgent)) {
25
- setClipboardText(t('Not supported'));
26
- }
27
- else if (/Mac/i.test(navigator.userAgent)) {
28
- setClipboardText(t('Press ⌘ + C to copy'));
29
- }
30
- else {
31
- setClipboardText(t('Press Ctrl + C to copy'));
32
- }
33
- }
34
- };
35
- return {
36
- clipboardText,
37
- copyToClipboard,
38
- };
39
- }
40
- exports.useCopyToClipboard = useCopyToClipboard;
@@ -1,9 +0,0 @@
1
- interface DebounceSettings {
2
- leading?: boolean;
3
- maxWait?: number;
4
- trailing?: boolean;
5
- }
6
- export declare function useDebounce(callback: () => void, dependencies: ReadonlyArray<any>, wait?: number, options?: DebounceSettings): void;
7
- export declare function useDeepCompareDebounce(callback: () => void, dependencies: ReadonlyArray<any>, wait?: number, options?: DebounceSettings): void;
8
- export {};
9
- //# sourceMappingURL=useDebounce.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebounce.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,WAAW,CACvB,QAAQ,EAAE,MAAM,IAAI,EACpB,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,EAChC,IAAI,GAAE,MAAU,EAChB,OAAO,GAAE,gBAAqB,QAiBjC;AAED,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,MAAM,IAAI,EACpB,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,EAChC,IAAI,GAAE,MAAU,EAChB,OAAO,GAAE,gBAAqB,QAkBjC"}
@@ -1,40 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useDeepCompareDebounce = exports.useDebounce = void 0;
7
- const debounce_1 = __importDefault(require("lodash/debounce"));
8
- const react_1 = require("react");
9
- const use_deep_compare_effect_1 = __importDefault(require("use-deep-compare-effect"));
10
- // Takes a callback that is called after a debounce delay based on the dependencies array
11
- // Its just a wrapper over useEffect and debounce function which cancels previous callback each time
12
- function useDebounce(callback, dependencies, wait = 0, options = {}) {
13
- (0, react_1.useEffect)(() => {
14
- const handler = (0, debounce_1.default)(() => {
15
- callback();
16
- }, wait, options);
17
- handler();
18
- // Clears the previous callback
19
- return () => {
20
- handler.cancel();
21
- };
22
- // eslint-disable-next-line react-hooks/exhaustive-deps
23
- }, [wait, ...dependencies]);
24
- }
25
- exports.useDebounce = useDebounce;
26
- function useDeepCompareDebounce(callback, dependencies, wait = 0, options = {}) {
27
- (0, use_deep_compare_effect_1.default)(() => {
28
- //instead of useeffect use the deepcompare libary
29
- const handler = (0, debounce_1.default)(() => {
30
- callback();
31
- }, wait, options);
32
- handler();
33
- // Clears the previous callback
34
- return () => {
35
- handler.cancel();
36
- };
37
- // eslint-disable-next-line react-hooks/exhaustive-deps
38
- }, [wait, ...dependencies]);
39
- }
40
- exports.useDeepCompareDebounce = useDeepCompareDebounce;
@@ -1,20 +0,0 @@
1
- interface IFetchState<T> {
2
- data?: T;
3
- isFetching?: boolean;
4
- error?: Error | DOMException;
5
- }
6
- export interface IUseFetch<T, A extends any[]> extends IFetchState<T> {
7
- request?: (...args: A) => Promise<T>;
8
- clearResponse?: () => void;
9
- }
10
- export interface IUseFetchOptions<T> {
11
- initialData?: any;
12
- resolve?: boolean;
13
- resolveCondition?: string[];
14
- isAbortable?: boolean;
15
- propgateErrors?: boolean;
16
- postProcessor?: (data: T) => T;
17
- }
18
- export declare function useFetch<T, A extends any[]>(fn: (...args: A) => Promise<T>, { initialData, resolve, resolveCondition, isAbortable, propgateErrors, postProcessor, }?: IUseFetchOptions<T>): IUseFetch<T, A>;
19
- export {};
20
- //# sourceMappingURL=useFetch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useFetch.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFetch.tsx"],"names":[],"mappings":"AAMA,UAAU,WAAW,CAAC,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,CAAC;IAGT,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,KAAK,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC;CAChC;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IAEjE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;CAClC;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,EACvC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC9B,EACI,WAAkB,EAClB,OAAe,EACf,gBAAqB,EACrB,WAAmB,EACnB,cAAsB,EACtB,aAAyB,GAC5B,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAC5B,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAwDjB"}
@@ -1,70 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.useFetch = void 0;
13
- const react_1 = require("react");
14
- const useIsMounted_1 = require("./useIsMounted");
15
- const usePrevious_1 = require("./usePrevious");
16
- // type IUseFetchFn = <T,A extends any[]>(fn: (...args:) => Promise<T>, options?: IUseFetchOptions<T>) => IUseFetch<T,A>;
17
- function useFetch(fn, { initialData = null, resolve = false, resolveCondition = [], isAbortable = false, propgateErrors = false, postProcessor = undefined, } = {}) {
18
- const isMounted = (0, useIsMounted_1.useIsMounted)();
19
- const [{ data, isFetching, error }, setState] = (0, react_1.useReducer)((s, a) => (Object.assign(Object.assign({}, s), a)), { data: initialData, isFetching: resolve, error: null });
20
- const [abortSignal, setAbortSignal] = (0, react_1.useState)(null);
21
- const prevAbortSignal = (0, usePrevious_1.usePrevious)(abortSignal);
22
- const clearResponse = () => setState({ data: initialData });
23
- const request = (...args) => __awaiter(this, void 0, void 0, function* () {
24
- try {
25
- if (isAbortable && 'AbortController' in window) {
26
- if (prevAbortSignal) {
27
- prevAbortSignal.abort();
28
- }
29
- const controller = new AbortController();
30
- setAbortSignal(controller);
31
- args.push(controller.signal);
32
- }
33
- isMounted && setState({ isFetching: true, error: null });
34
- let response = yield fn(...args);
35
- response = postProcessor ? postProcessor(response) : response;
36
- isMounted && setState({ data: response, isFetching: false });
37
- return response;
38
- }
39
- catch (err) {
40
- const isAbortError = (err === null || err === void 0 ? void 0 : err.code) === 20;
41
- if (isAbortError) {
42
- // TODO handle abort error and loader behaviour
43
- }
44
- else {
45
- if (!propgateErrors) {
46
- // AlertUtil.addErrorMessage(err);
47
- }
48
- }
49
- // Don
50
- isMounted && !isAbortError && setState({ error: err, data: null, isFetching: false });
51
- if (propgateErrors && !isAbortError) {
52
- throw err;
53
- }
54
- }
55
- });
56
- (0, react_1.useEffect)(() => {
57
- // if (resolve) {
58
- // request();
59
- // }
60
- // eslint-disable-next-line react-hooks/exhaustive-deps
61
- }, resolveCondition);
62
- return {
63
- clearResponse,
64
- data,
65
- isFetching,
66
- request,
67
- error,
68
- };
69
- }
70
- exports.useFetch = useFetch;
@@ -1,18 +0,0 @@
1
- /**
2
- * Returns a function that triggers a component update. the hook equivalent to
3
- * `this.forceUpdate()` in a class component. In most cases using a state value directly
4
- * is preferable but may be required in some advanced usages of refs for interop or
5
- * when direct DOM manipulation is required.
6
- *
7
- * ```ts
8
- * const forceUpdate = useForceUpdate();
9
- *
10
- * const updateOnClick = useCallback(() => {
11
- * forceUpdate()
12
- * }, [forceUpdate])
13
- *
14
- * return <button type="button" onClick={updateOnClick}>Hi there</button>
15
- * ```
16
- */
17
- export declare function useForceUpdate(): () => void;
18
- //# sourceMappingURL=useForceUpdate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useForceUpdate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useForceUpdate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAK3C"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // Copied from https://github.com/react-restart/hooks/blob/master/src/useForceUpdate.ts
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.useForceUpdate = void 0;
5
- const react_1 = require("react");
6
- /**
7
- * Returns a function that triggers a component update. the hook equivalent to
8
- * `this.forceUpdate()` in a class component. In most cases using a state value directly
9
- * is preferable but may be required in some advanced usages of refs for interop or
10
- * when direct DOM manipulation is required.
11
- *
12
- * ```ts
13
- * const forceUpdate = useForceUpdate();
14
- *
15
- * const updateOnClick = useCallback(() => {
16
- * forceUpdate()
17
- * }, [forceUpdate])
18
- *
19
- * return <button type="button" onClick={updateOnClick}>Hi there</button>
20
- * ```
21
- */
22
- function useForceUpdate() {
23
- // The toggling state value is designed to defeat React optimizations for skipping
24
- // updates when they are stricting equal to the last state value
25
- const [, dispatch] = (0, react_1.useReducer)((state) => !state, false);
26
- return dispatch;
27
- }
28
- exports.useForceUpdate = useForceUpdate;
@@ -1,2 +0,0 @@
1
- export declare function useForkRef(refA: any, refB: any): (refValue: any) => void;
2
- //# sourceMappingURL=useForkRef.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useForkRef.d.ts","sourceRoot":"","sources":["../../../src/hooks/useForkRef.ts"],"names":[],"mappings":"AAUA,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,2BAepC"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useForkRef = void 0;
4
- const react_1 = require("react");
5
- function setRef(ref, value) {
6
- if (typeof ref === 'function') {
7
- ref(value);
8
- }
9
- else if (ref) {
10
- ref.current = value;
11
- }
12
- }
13
- function useForkRef(refA, refB) {
14
- /**
15
- * This will create a new function if the ref props change and are defined.
16
- * This means react will call the old forkRef with `null` and the new forkRef
17
- * with the ref. Cleanup naturally emerges from this behavior
18
- */
19
- return (0, react_1.useMemo)(() => {
20
- if (refA == null && refB == null) {
21
- return null;
22
- }
23
- return (refValue) => {
24
- setRef(refA, refValue);
25
- setRef(refB, refValue);
26
- };
27
- }, [refA, refB]);
28
- }
29
- exports.useForkRef = useForkRef;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare function useIsMounted(): React.MutableRefObject<boolean>;
3
- //# sourceMappingURL=useIsMounted.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,YAAY,oCAS3B"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.useIsMounted = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- function useIsMounted() {
9
- const mounted = react_1.default.useRef(false);
10
- react_1.default.useLayoutEffect(() => {
11
- mounted.current = true;
12
- return () => {
13
- mounted.current = false;
14
- };
15
- }, []);
16
- return mounted;
17
- }
18
- exports.useIsMounted = useIsMounted;
@@ -1,8 +0,0 @@
1
- import { LRUCache } from '@rh-support/utils';
2
- export declare function useLRUCache<K, V>(maxSize: number): {
3
- setInCache: (key: K, value: V) => void;
4
- getFromCache: (key: K) => V;
5
- clearCache: () => void;
6
- cache: LRUCache<K, V>;
7
- };
8
- //# sourceMappingURL=useLRUCache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLRUCache.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLRUCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM;sBAIpB,CAAC,SAAS,CAAC;wBAKT,CAAC;;;EAc/B"}
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useLRUCache = void 0;
4
- const utils_1 = require("@rh-support/utils");
5
- const react_1 = require("react");
6
- const useForceUpdate_1 = require("./useForceUpdate");
7
- function useLRUCache(maxSize) {
8
- const lruCacheRef = (0, react_1.useRef)(new utils_1.LRUCache(maxSize));
9
- const forceUpdate = (0, useForceUpdate_1.useForceUpdate)();
10
- const setInCache = (key, value) => {
11
- lruCacheRef.current.set(key, value);
12
- forceUpdate();
13
- };
14
- const getFromCache = (key) => {
15
- return lruCacheRef.current.get(key);
16
- };
17
- const clearCache = () => {
18
- lruCacheRef.current.clear();
19
- forceUpdate();
20
- };
21
- return {
22
- setInCache,
23
- getFromCache,
24
- clearCache,
25
- cache: lruCacheRef.current,
26
- };
27
- }
28
- exports.useLRUCache = useLRUCache;
@@ -1,5 +0,0 @@
1
- type Dispatch<A> = (value: A) => void;
2
- type SetStateAction<S> = S | ((prevState: S) => S);
3
- declare const useLocalStorage: <T>(key: string, initialValue?: T, raw?: boolean) => [T, Dispatch<SetStateAction<T>>];
4
- export { useLocalStorage };
5
- //# sourceMappingURL=useLocalStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAEA,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AACtC,KAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAKnD,QAAA,MAAM,eAAe,WAAY,MAAM,0BAA0B,OAAO,qCA8BvE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -1,39 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useLocalStorage = void 0;
4
- const react_1 = require("react");
5
- // For usage please refer
6
- // https://github.com/streamich/react-use/blob/master/docs/useLocalStorage.md
7
- const useLocalStorage = (key, initialValue, raw) => {
8
- const [state, setState] = (0, react_1.useState)(() => {
9
- try {
10
- const localStorageValue = localStorage.getItem(key);
11
- if (typeof localStorageValue !== 'string') {
12
- localStorage.setItem(key, raw ? String(initialValue) : JSON.stringify(initialValue));
13
- return initialValue;
14
- }
15
- else {
16
- return raw ? localStorageValue : JSON.parse(localStorageValue || 'null');
17
- }
18
- }
19
- catch (_a) {
20
- // If user is in private mode or has storage restriction
21
- // localStorage can throw. JSON.parse and JSON.stringify
22
- // can throw, too.
23
- return initialValue;
24
- }
25
- });
26
- (0, react_1.useEffect)(() => {
27
- try {
28
- const serializedState = raw ? String(state) : JSON.stringify(state);
29
- localStorage.setItem(key, serializedState);
30
- }
31
- catch (_a) {
32
- // If user is in private mode or has storage restriction
33
- // localStorage can throw. Also JSON.stringify can throw.
34
- }
35
- // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, [state]);
37
- return [state, setState];
38
- };
39
- exports.useLocalStorage = useLocalStorage;
@@ -1,2 +0,0 @@
1
- export declare function useOnScreen(ref: any): boolean;
2
- //# sourceMappingURL=useOnScreen.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useOnScreen.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnScreen.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,KAAA,WAe9B"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useOnScreen = void 0;
4
- const react_1 = require("react");
5
- function useOnScreen(ref) {
6
- const [isIntersecting, setIntersecting] = (0, react_1.useState)(false);
7
- const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting));
8
- (0, react_1.useEffect)(() => {
9
- observer.observe(ref.current);
10
- // Remove the observer as soon as the component is unmounted
11
- return () => {
12
- observer.disconnect();
13
- };
14
- // eslint-disable-next-line react-hooks/exhaustive-deps
15
- }, []);
16
- return isIntersecting;
17
- }
18
- exports.useOnScreen = useOnScreen;
@@ -1,2 +0,0 @@
1
- export declare function usePolling(intervalCb: (...args: any[]) => void | Promise<void>, dependencies?: any[]): void;
2
- //# sourceMappingURL=usePolling.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY,GAAE,GAAG,EAAO,QAajG"}