@rh-support/components 2.4.10-beta.6 → 2.5.0

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 (516) hide show
  1. package/README.md +2 -0
  2. package/lib/esm/AlertMessage/AlertMessage.d.ts +2 -2
  3. package/lib/esm/AlertMessage/AlertMessage.d.ts.map +1 -1
  4. package/lib/esm/AlertMessage/AlertMessage.js +1 -1
  5. package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts +2 -1
  6. package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
  7. package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts +2 -1
  8. package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
  9. package/lib/esm/CoverSpinner/CoverSpinner.d.ts +2 -1
  10. package/lib/esm/CoverSpinner/CoverSpinner.d.ts.map +1 -1
  11. package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts +2 -2
  12. package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
  13. package/lib/esm/CustomTextInput/CustomTextInput.d.ts +3 -1
  14. package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
  15. package/lib/esm/CustomTextInput/CustomTextInput.js +4 -2
  16. package/lib/esm/DropDownList/AsyncDropDownList.d.ts +1 -1
  17. package/lib/esm/DropDownList/AsyncDropDownList.d.ts.map +1 -1
  18. package/lib/esm/DropDownList/DropDownList.d.ts +2 -1
  19. package/lib/esm/DropDownList/DropDownList.d.ts.map +1 -1
  20. package/lib/esm/DropDownList/DropDownList.js +10 -10
  21. package/lib/esm/DropDownList/DropdownWrapper.d.ts +1 -1
  22. package/lib/esm/DropDownList/DropdownWrapper.d.ts.map +1 -1
  23. package/lib/esm/DropDownList/DropdownWrapper.js +2 -2
  24. package/lib/esm/DropDownList/MultiSelectDropdownList.d.ts.map +1 -1
  25. package/lib/esm/DropDownList/SearchableList.d.ts +1 -1
  26. package/lib/esm/DropDownList/SearchableList.d.ts.map +1 -1
  27. package/lib/esm/DropDownList/SearchableList.js +6 -6
  28. package/lib/esm/DropDownList/SelectList.d.ts +1 -1
  29. package/lib/esm/DropDownList/SelectList.d.ts.map +1 -1
  30. package/lib/esm/DropDownList/SelectList.js +6 -6
  31. package/lib/esm/DropDownList/async.d.ts +1 -1
  32. package/lib/esm/DropDownList/async.d.ts.map +1 -1
  33. package/lib/esm/DropDownList/dropdownList.css +10 -5
  34. package/lib/esm/DropDownList/types.d.ts +6 -7
  35. package/lib/esm/DropDownList/types.d.ts.map +1 -1
  36. package/lib/esm/DropDownList/withMulti.d.ts +1 -1
  37. package/lib/esm/DropDownList/withMulti.d.ts.map +1 -1
  38. package/lib/esm/DropDownList/withMulti.js +1 -0
  39. package/lib/esm/ErrorBoundary/ErrorBoundary.d.ts +2 -1
  40. package/lib/esm/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
  41. package/lib/esm/ErrorBoundary/ErrorBoundary.js +1 -1
  42. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +2 -1
  43. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
  44. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -4
  45. package/lib/esm/ErrorPages/Generic403.d.ts +2 -1
  46. package/lib/esm/ErrorPages/Generic403.d.ts.map +1 -1
  47. package/lib/esm/FeedbackForm/FeedbackForm.d.ts +2 -1
  48. package/lib/esm/FeedbackForm/FeedbackForm.d.ts.map +1 -1
  49. package/lib/esm/FeedbackForm/FeedbackForm.js +2 -2
  50. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts +5 -4
  51. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
  52. package/lib/esm/Functional/CaseContactsSelectorExternal.js +9 -8
  53. package/lib/esm/InlineEdit/InlineEdit.d.ts +2 -2
  54. package/lib/esm/InlineEdit/InlineEdit.d.ts.map +1 -1
  55. package/lib/esm/InlineEdit/InlineEdit.js +1 -1
  56. package/lib/esm/InlineEdit/NewInlineEdit.d.ts +2 -2
  57. package/lib/esm/InlineEdit/NewInlineEdit.d.ts.map +1 -1
  58. package/lib/esm/InlineEdit/NewInlineEdit.js +2 -2
  59. package/lib/esm/InlineEdit/inlineEdit.css +24 -1
  60. package/lib/esm/InlineEdit/newInlineEdit.css +5 -4
  61. package/lib/esm/LanguageSelector/LanguageSelector.d.ts +2 -1
  62. package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
  63. package/lib/esm/LanguageSelector/LanguageSelector.js +13 -3
  64. package/lib/esm/LanguageSelector/languageSelector.css +1 -1
  65. package/lib/esm/LoadingDots/LoadingDots.d.ts +3 -1
  66. package/lib/esm/LoadingDots/LoadingDots.d.ts.map +1 -1
  67. package/lib/esm/LoadingDots/LoadingDots.js +2 -2
  68. package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts +2 -1
  69. package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  70. package/lib/esm/LoginModal/LoginModal.d.ts +2 -1
  71. package/lib/esm/LoginModal/LoginModal.d.ts.map +1 -1
  72. package/lib/esm/LoginModal/LoginModal.js +1 -1
  73. package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts +1 -1
  74. package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
  75. package/lib/esm/MarkdownEditor/MarkdownEditor.js +168 -80
  76. package/lib/esm/MarkdownEditor/markdownEditor.css +113 -5
  77. package/lib/esm/MoreOrLess/MoreOrLess.d.ts +1 -1
  78. package/lib/esm/MoreOrLess/MoreOrLess.d.ts.map +1 -1
  79. package/lib/esm/PaginatedList/PaginatedList.d.ts +2 -1
  80. package/lib/esm/PaginatedList/PaginatedList.d.ts.map +1 -1
  81. package/lib/esm/PaginatedList/PaginatedList.js +9 -0
  82. package/lib/esm/PaginationCompact/PaginationCompact.d.ts +2 -1
  83. package/lib/esm/PaginationCompact/PaginationCompact.d.ts.map +1 -1
  84. package/lib/esm/PaginationCompact/PaginationCompact.js +4 -4
  85. package/lib/esm/PaginationCompact/paginationCompact.css +1 -1
  86. package/lib/esm/PhoneInput/CountryData.d.ts.map +1 -1
  87. package/lib/esm/PhoneInput/CountryData.js +3 -2
  88. package/lib/esm/PhoneInput/FlagSvgs.d.ts +3 -0
  89. package/lib/esm/PhoneInput/FlagSvgs.d.ts.map +1 -0
  90. package/lib/esm/PhoneInput/FlagSvgs.js +2018 -0
  91. package/lib/esm/PhoneInput/PhoneInput.d.ts +14 -1
  92. package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
  93. package/lib/esm/PhoneInput/PhoneInput.js +121 -120
  94. package/lib/esm/PhoneInput/PhoneInput.scss +15 -732
  95. package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +2 -1
  96. package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
  97. package/lib/esm/ProgressBar/CircularProgressBar/Path.d.ts +1 -1
  98. package/lib/esm/ProgressBar/CircularProgressBar/Path.d.ts.map +1 -1
  99. package/lib/esm/ProgressBar/CircularProgressBar/types.d.ts +3 -4
  100. package/lib/esm/ProgressBar/CircularProgressBar/types.d.ts.map +1 -1
  101. package/lib/esm/ProgressBar/ProgressBar.d.ts +1 -1
  102. package/lib/esm/ProgressBar/ProgressBar.d.ts.map +1 -1
  103. package/lib/esm/PromisifyModal/PromisifyModal.d.ts +6 -9
  104. package/lib/esm/PromisifyModal/PromisifyModal.d.ts.map +1 -1
  105. package/lib/esm/PromisifyModal/PromisifyModal.js +21 -18
  106. package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +2 -1
  107. package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
  108. package/lib/esm/SubscriptionAbuse/const.d.ts +2 -1
  109. package/lib/esm/SubscriptionAbuse/const.d.ts.map +1 -1
  110. package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts +2 -1
  111. package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
  112. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts +2 -1
  113. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
  114. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +14 -14
  115. package/lib/esm/Table/PFTable.d.ts +4 -3
  116. package/lib/esm/Table/PFTable.d.ts.map +1 -1
  117. package/lib/esm/Table/PFTable.js +6 -6
  118. package/lib/{cjs/Table/Table.d.ts → esm/Table/TableComponent.d.ts} +2 -2
  119. package/lib/esm/Table/TableComponent.d.ts.map +1 -0
  120. package/lib/esm/Table/{Table.js → TableComponent.js} +1 -1
  121. package/lib/esm/Table/TablePagination.d.ts +2 -1
  122. package/lib/esm/Table/TablePagination.d.ts.map +1 -1
  123. package/lib/esm/Table/TablePagination.js +4 -2
  124. package/lib/esm/Table/index.d.ts +1 -2
  125. package/lib/esm/Table/index.d.ts.map +1 -1
  126. package/lib/esm/Table/index.js +1 -2
  127. package/lib/esm/TagsSelector/TagsSelector.d.ts +14 -0
  128. package/lib/esm/TagsSelector/TagsSelector.d.ts.map +1 -0
  129. package/lib/esm/TagsSelector/TagsSelector.js +73 -0
  130. package/lib/esm/TagsSelector/index.d.ts +2 -0
  131. package/lib/esm/TagsSelector/index.d.ts.map +1 -0
  132. package/lib/esm/TagsSelector/index.js +1 -0
  133. package/lib/esm/TagsSelector/tagSelector.css +11 -0
  134. package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts +2 -1
  135. package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
  136. package/lib/esm/TermsAndConditions/AcceptTermsModal.js +7 -6
  137. package/lib/esm/TextAreaAutosize/TextAreaAutosize.d.ts +1 -1
  138. package/lib/esm/TextAreaAutosize/TextAreaAutosize.d.ts.map +1 -1
  139. package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts +1 -1
  140. package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
  141. package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
  142. package/lib/esm/ToastNotification/ToastNotification.d.ts +1 -1
  143. package/lib/esm/ToastNotification/ToastNotification.d.ts.map +1 -1
  144. package/lib/esm/ToastNotification/ToastNotification.js +13 -5
  145. package/lib/esm/ToastNotification/toastNotification.css +1 -1
  146. package/lib/esm/TopContentSearch/TopContentSearch.d.ts +5 -1
  147. package/lib/esm/TopContentSearch/TopContentSearch.d.ts.map +1 -1
  148. package/lib/esm/TopContentSearch/TopContentSearch.js +20 -23
  149. package/lib/esm/ValueChangedIcon/ValueChangedIcon.d.ts +1 -1
  150. package/lib/esm/ValueChangedIcon/ValueChangedIcon.d.ts.map +1 -1
  151. package/lib/esm/helperFunctions/errorMessage.js +2 -2
  152. package/lib/esm/helperFunctions/errorMessage.scss +1 -1
  153. package/lib/esm/hooks/index.d.ts +4 -0
  154. package/lib/esm/hooks/index.d.ts.map +1 -1
  155. package/lib/esm/hooks/index.js +4 -0
  156. package/lib/esm/hooks/useBreakpoint.d.ts +2 -2
  157. package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
  158. package/lib/esm/hooks/useBreakpoint.js +2 -0
  159. package/lib/esm/hooks/useCopyToClipboard.d.ts.map +1 -1
  160. package/lib/esm/hooks/useCopyToClipboard.js +1 -0
  161. package/lib/esm/hooks/useFetch.js +1 -2
  162. package/lib/esm/hooks/useLocalStorage.d.ts +2 -2
  163. package/lib/esm/hooks/useLocalStorage.d.ts.map +1 -1
  164. package/lib/esm/hooks/useSearchDocument.d.ts +7 -0
  165. package/lib/esm/hooks/useSearchDocument.d.ts.map +1 -0
  166. package/lib/esm/hooks/useSearchDocument.js +42 -0
  167. package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +13 -0
  168. package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
  169. package/lib/esm/hooks/useSelectKeyboardNavigator.js +54 -0
  170. package/lib/esm/hooks/useSessionStorage.d.ts +5 -0
  171. package/lib/esm/hooks/useSessionStorage.d.ts.map +1 -0
  172. package/lib/esm/hooks/useSessionStorage.js +30 -0
  173. package/lib/esm/index.d.ts +1 -0
  174. package/lib/esm/index.d.ts.map +1 -1
  175. package/lib/esm/index.js +1 -0
  176. package/package.json +40 -46
  177. package/lib/cjs/AlertMessage/AlertMessage.css +0 -9
  178. package/lib/cjs/AlertMessage/AlertMessage.d.ts +0 -24
  179. package/lib/cjs/AlertMessage/AlertMessage.d.ts.map +0 -1
  180. package/lib/cjs/AlertMessage/AlertMessage.js +0 -30
  181. package/lib/cjs/AlertMessage/index.d.ts +0 -2
  182. package/lib/cjs/AlertMessage/index.d.ts.map +0 -1
  183. package/lib/cjs/AlertMessage/index.js +0 -14
  184. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -6
  185. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +0 -1
  186. package/lib/cjs/ConfirmationModal/ConfirmationContext.js +0 -53
  187. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +0 -29
  188. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +0 -1
  189. package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +0 -28
  190. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -1
  191. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +0 -1
  192. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +0 -36
  193. package/lib/cjs/ConfirmationModal/index.d.ts +0 -3
  194. package/lib/cjs/ConfirmationModal/index.d.ts.map +0 -1
  195. package/lib/cjs/ConfirmationModal/index.js +0 -14
  196. package/lib/cjs/CoverSpinner/CoverSpinner.css +0 -16
  197. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -3
  198. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +0 -1
  199. package/lib/cjs/CoverSpinner/CoverSpinner.js +0 -13
  200. package/lib/cjs/CoverSpinner/index.d.ts +0 -2
  201. package/lib/cjs/CoverSpinner/index.d.ts.map +0 -1
  202. package/lib/cjs/CoverSpinner/index.js +0 -13
  203. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts +0 -15
  204. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +0 -1
  205. package/lib/cjs/CustomContentLoader/CustomContentLoader.js +0 -62
  206. package/lib/cjs/CustomContentLoader/index.d.ts +0 -2
  207. package/lib/cjs/CustomContentLoader/index.d.ts.map +0 -1
  208. package/lib/cjs/CustomContentLoader/index.js +0 -13
  209. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -12
  210. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +0 -1
  211. package/lib/cjs/CustomTextInput/CustomTextInput.js +0 -48
  212. package/lib/cjs/CustomTextInput/index.d.ts +0 -2
  213. package/lib/cjs/CustomTextInput/index.d.ts.map +0 -1
  214. package/lib/cjs/CustomTextInput/index.js +0 -13
  215. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts +0 -6
  216. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts.map +0 -1
  217. package/lib/cjs/DropDownList/AsyncDropDownList.js +0 -10
  218. package/lib/cjs/DropDownList/DropDownList.d.ts +0 -8
  219. package/lib/cjs/DropDownList/DropDownList.d.ts.map +0 -1
  220. package/lib/cjs/DropDownList/DropDownList.js +0 -141
  221. package/lib/cjs/DropDownList/DropdownWrapper.d.ts +0 -16
  222. package/lib/cjs/DropDownList/DropdownWrapper.d.ts.map +0 -1
  223. package/lib/cjs/DropDownList/DropdownWrapper.js +0 -25
  224. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts +0 -4
  225. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts.map +0 -1
  226. package/lib/cjs/DropDownList/MultiSelectDropdownList.js +0 -7
  227. package/lib/cjs/DropDownList/Readme.md +0 -114
  228. package/lib/cjs/DropDownList/SearchableList.d.ts +0 -14
  229. package/lib/cjs/DropDownList/SearchableList.d.ts.map +0 -1
  230. package/lib/cjs/DropDownList/SearchableList.js +0 -104
  231. package/lib/cjs/DropDownList/SelectList.d.ts +0 -11
  232. package/lib/cjs/DropDownList/SelectList.d.ts.map +0 -1
  233. package/lib/cjs/DropDownList/SelectList.js +0 -41
  234. package/lib/cjs/DropDownList/async.d.ts +0 -9
  235. package/lib/cjs/DropDownList/async.d.ts.map +0 -1
  236. package/lib/cjs/DropDownList/async.js +0 -138
  237. package/lib/cjs/DropDownList/dropdownList.css +0 -54
  238. package/lib/cjs/DropDownList/dropdownUtils.d.ts +0 -5
  239. package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +0 -1
  240. package/lib/cjs/DropDownList/dropdownUtils.js +0 -29
  241. package/lib/cjs/DropDownList/index.d.ts +0 -4
  242. package/lib/cjs/DropDownList/index.d.ts.map +0 -1
  243. package/lib/cjs/DropDownList/index.js +0 -15
  244. package/lib/cjs/DropDownList/types.d.ts +0 -54
  245. package/lib/cjs/DropDownList/types.d.ts.map +0 -1
  246. package/lib/cjs/DropDownList/types.js +0 -2
  247. package/lib/cjs/DropDownList/withMulti.d.ts +0 -5
  248. package/lib/cjs/DropDownList/withMulti.d.ts.map +0 -1
  249. package/lib/cjs/DropDownList/withMulti.js +0 -69
  250. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts +0 -36
  251. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  252. package/lib/cjs/ErrorBoundary/ErrorBoundary.js +0 -62
  253. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -14
  254. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +0 -1
  255. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +0 -40
  256. package/lib/cjs/ErrorBoundary/index.d.ts +0 -2
  257. package/lib/cjs/ErrorBoundary/index.d.ts.map +0 -1
  258. package/lib/cjs/ErrorBoundary/index.js +0 -13
  259. package/lib/cjs/ErrorPages/Generic403.d.ts +0 -2
  260. package/lib/cjs/ErrorPages/Generic403.d.ts.map +0 -1
  261. package/lib/cjs/ErrorPages/Generic403.js +0 -14
  262. package/lib/cjs/ErrorPages/index.d.ts +0 -2
  263. package/lib/cjs/ErrorPages/index.d.ts.map +0 -1
  264. package/lib/cjs/ErrorPages/index.js +0 -13
  265. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -11
  266. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +0 -1
  267. package/lib/cjs/FeedbackForm/FeedbackForm.js +0 -140
  268. package/lib/cjs/FeedbackForm/index.d.ts +0 -2
  269. package/lib/cjs/FeedbackForm/index.d.ts.map +0 -1
  270. package/lib/cjs/FeedbackForm/index.js +0 -13
  271. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts +0 -30
  272. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +0 -1
  273. package/lib/cjs/Functional/CaseContactsSelectorExternal.js +0 -223
  274. package/lib/cjs/Functional/index.d.ts +0 -2
  275. package/lib/cjs/Functional/index.d.ts.map +0 -1
  276. package/lib/cjs/Functional/index.js +0 -13
  277. package/lib/cjs/InlineEdit/InlineEdit.d.ts +0 -37
  278. package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +0 -1
  279. package/lib/cjs/InlineEdit/InlineEdit.js +0 -169
  280. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +0 -41
  281. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +0 -1
  282. package/lib/cjs/InlineEdit/NewInlineEdit.js +0 -178
  283. package/lib/cjs/InlineEdit/index.d.ts +0 -3
  284. package/lib/cjs/InlineEdit/index.d.ts.map +0 -1
  285. package/lib/cjs/InlineEdit/index.js +0 -14
  286. package/lib/cjs/InlineEdit/inlineEdit.css +0 -29
  287. package/lib/cjs/InlineEdit/newInlineEdit.css +0 -44
  288. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -25
  289. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +0 -1
  290. package/lib/cjs/LanguageSelector/LanguageSelector.js +0 -61
  291. package/lib/cjs/LanguageSelector/index.d.ts +0 -2
  292. package/lib/cjs/LanguageSelector/index.d.ts.map +0 -1
  293. package/lib/cjs/LanguageSelector/index.js +0 -13
  294. package/lib/cjs/LanguageSelector/languageSelector.css +0 -5
  295. package/lib/cjs/LoadingDots/LoadingDots.css +0 -33
  296. package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -11
  297. package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +0 -1
  298. package/lib/cjs/LoadingDots/LoadingDots.js +0 -25
  299. package/lib/cjs/LoadingDots/index.d.ts +0 -2
  300. package/lib/cjs/LoadingDots/index.d.ts.map +0 -1
  301. package/lib/cjs/LoadingDots/index.js +0 -14
  302. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -14
  303. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
  304. package/lib/cjs/LoadingIndicator/LoadingIndicator.js +0 -25
  305. package/lib/cjs/LoadingIndicator/index.d.ts +0 -2
  306. package/lib/cjs/LoadingIndicator/index.d.ts.map +0 -1
  307. package/lib/cjs/LoadingIndicator/index.js +0 -13
  308. package/lib/cjs/LoadingIndicator/loadingIndicator.css +0 -79
  309. package/lib/cjs/LoginModal/LoginModal.d.ts +0 -14
  310. package/lib/cjs/LoginModal/LoginModal.d.ts.map +0 -1
  311. package/lib/cjs/LoginModal/LoginModal.js +0 -21
  312. package/lib/cjs/LoginModal/index.d.ts +0 -2
  313. package/lib/cjs/LoginModal/index.d.ts.map +0 -1
  314. package/lib/cjs/LoginModal/index.js +0 -13
  315. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts +0 -45
  316. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +0 -1
  317. package/lib/cjs/MarkdownEditor/MarkdownEditor.js +0 -437
  318. package/lib/cjs/MarkdownEditor/index.d.ts +0 -2
  319. package/lib/cjs/MarkdownEditor/index.d.ts.map +0 -1
  320. package/lib/cjs/MarkdownEditor/index.js +0 -13
  321. package/lib/cjs/MarkdownEditor/markdownEditor.css +0 -111
  322. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts +0 -13
  323. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts.map +0 -1
  324. package/lib/cjs/MoreOrLess/MoreOrLess.js +0 -71
  325. package/lib/cjs/MoreOrLess/index.d.ts +0 -2
  326. package/lib/cjs/MoreOrLess/index.d.ts.map +0 -1
  327. package/lib/cjs/MoreOrLess/index.js +0 -13
  328. package/lib/cjs/PaginatedList/PaginatedList.d.ts +0 -18
  329. package/lib/cjs/PaginatedList/PaginatedList.d.ts.map +0 -1
  330. package/lib/cjs/PaginatedList/PaginatedList.js +0 -63
  331. package/lib/cjs/PaginatedList/index.d.ts +0 -2
  332. package/lib/cjs/PaginatedList/index.d.ts.map +0 -1
  333. package/lib/cjs/PaginatedList/index.js +0 -13
  334. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -9
  335. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +0 -1
  336. package/lib/cjs/PaginationCompact/PaginationCompact.js +0 -63
  337. package/lib/cjs/PaginationCompact/index.d.ts +0 -2
  338. package/lib/cjs/PaginationCompact/index.d.ts.map +0 -1
  339. package/lib/cjs/PaginationCompact/index.js +0 -13
  340. package/lib/cjs/PaginationCompact/paginationCompact.css +0 -5
  341. package/lib/cjs/PhoneInput/CountryData.d.ts +0 -3
  342. package/lib/cjs/PhoneInput/CountryData.d.ts.map +0 -1
  343. package/lib/cjs/PhoneInput/CountryData.js +0 -583
  344. package/lib/cjs/PhoneInput/PhoneInput.d.ts +0 -19
  345. package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +0 -1
  346. package/lib/cjs/PhoneInput/PhoneInput.js +0 -286
  347. package/lib/cjs/PhoneInput/PhoneInput.scss +0 -753
  348. package/lib/cjs/PhoneInput/flags.png +0 -0
  349. package/lib/cjs/PhoneInput/index.d.ts +0 -2
  350. package/lib/cjs/PhoneInput/index.d.ts.map +0 -1
  351. package/lib/cjs/PhoneInput/index.js +0 -13
  352. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -8
  353. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +0 -1
  354. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +0 -68
  355. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts +0 -12
  356. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts.map +0 -1
  357. package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +0 -39
  358. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts +0 -6
  359. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts.map +0 -1
  360. package/lib/cjs/ProgressBar/CircularProgressBar/constants.js +0 -8
  361. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts +0 -2
  362. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts.map +0 -1
  363. package/lib/cjs/ProgressBar/CircularProgressBar/index.js +0 -13
  364. package/lib/cjs/ProgressBar/CircularProgressBar/styles.css +0 -60
  365. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts +0 -32
  366. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts.map +0 -1
  367. package/lib/cjs/ProgressBar/CircularProgressBar/types.js +0 -2
  368. package/lib/cjs/ProgressBar/ProgressBar.d.ts +0 -15
  369. package/lib/cjs/ProgressBar/ProgressBar.d.ts.map +0 -1
  370. package/lib/cjs/ProgressBar/ProgressBar.js +0 -36
  371. package/lib/cjs/ProgressBar/index.d.ts +0 -3
  372. package/lib/cjs/ProgressBar/index.d.ts.map +0 -1
  373. package/lib/cjs/ProgressBar/index.js +0 -14
  374. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts +0 -18
  375. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts.map +0 -1
  376. package/lib/cjs/PromisifyModal/PromisifyModal.js +0 -40
  377. package/lib/cjs/PromisifyModal/index.d.ts +0 -2
  378. package/lib/cjs/PromisifyModal/index.d.ts.map +0 -1
  379. package/lib/cjs/PromisifyModal/index.js +0 -13
  380. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -7
  381. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +0 -1
  382. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +0 -20
  383. package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -4
  384. package/lib/cjs/SubscriptionAbuse/const.d.ts.map +0 -1
  385. package/lib/cjs/SubscriptionAbuse/const.js +0 -15
  386. package/lib/cjs/SubscriptionAbuse/index.d.ts +0 -3
  387. package/lib/cjs/SubscriptionAbuse/index.d.ts.map +0 -1
  388. package/lib/cjs/SubscriptionAbuse/index.js +0 -14
  389. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -11
  390. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +0 -1
  391. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +0 -44
  392. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -10
  393. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +0 -1
  394. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +0 -178
  395. package/lib/cjs/SupportFeedbackForm/index.d.ts +0 -3
  396. package/lib/cjs/SupportFeedbackForm/index.d.ts.map +0 -1
  397. package/lib/cjs/SupportFeedbackForm/index.js +0 -14
  398. package/lib/cjs/Table/PFTable.d.ts +0 -39
  399. package/lib/cjs/Table/PFTable.d.ts.map +0 -1
  400. package/lib/cjs/Table/PFTable.js +0 -204
  401. package/lib/cjs/Table/README.md +0 -65
  402. package/lib/cjs/Table/Table.d.ts.map +0 -1
  403. package/lib/cjs/Table/Table.js +0 -38
  404. package/lib/cjs/Table/TableColumnSelector.d.ts +0 -7
  405. package/lib/cjs/Table/TableColumnSelector.d.ts.map +0 -1
  406. package/lib/cjs/Table/TableColumnSelector.js +0 -34
  407. package/lib/cjs/Table/TablePagination.d.ts +0 -18
  408. package/lib/cjs/Table/TablePagination.d.ts.map +0 -1
  409. package/lib/cjs/Table/TablePagination.js +0 -44
  410. package/lib/cjs/Table/TableProvider.d.ts +0 -15
  411. package/lib/cjs/Table/TableProvider.d.ts.map +0 -1
  412. package/lib/cjs/Table/TableProvider.js +0 -25
  413. package/lib/cjs/Table/columnSelector.css +0 -37
  414. package/lib/cjs/Table/index.d.ts +0 -5
  415. package/lib/cjs/Table/index.d.ts.map +0 -1
  416. package/lib/cjs/Table/index.js +0 -16
  417. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -14
  418. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +0 -1
  419. package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +0 -116
  420. package/lib/cjs/TermsAndConditions/index.d.ts +0 -2
  421. package/lib/cjs/TermsAndConditions/index.d.ts.map +0 -1
  422. package/lib/cjs/TermsAndConditions/index.js +0 -13
  423. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts +0 -8
  424. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts.map +0 -1
  425. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +0 -136
  426. package/lib/cjs/TextAreaAutosize/index.d.ts +0 -2
  427. package/lib/cjs/TextAreaAutosize/index.d.ts.map +0 -1
  428. package/lib/cjs/TextAreaAutosize/index.js +0 -13
  429. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts +0 -20
  430. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +0 -1
  431. package/lib/cjs/TextAreaResizable/TextAreaResizable.js +0 -56
  432. package/lib/cjs/TextAreaResizable/index.d.ts +0 -2
  433. package/lib/cjs/TextAreaResizable/index.d.ts.map +0 -1
  434. package/lib/cjs/TextAreaResizable/index.js +0 -13
  435. package/lib/cjs/ToastNotification/ToastNotification.d.ts +0 -28
  436. package/lib/cjs/ToastNotification/ToastNotification.d.ts.map +0 -1
  437. package/lib/cjs/ToastNotification/ToastNotification.js +0 -63
  438. package/lib/cjs/ToastNotification/index.d.ts +0 -2
  439. package/lib/cjs/ToastNotification/index.d.ts.map +0 -1
  440. package/lib/cjs/ToastNotification/index.js +0 -13
  441. package/lib/cjs/ToastNotification/toastNotification.css +0 -22
  442. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts +0 -14
  443. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts.map +0 -1
  444. package/lib/cjs/TopContentSearch/TopContentSearch.js +0 -138
  445. package/lib/cjs/TopContentSearch/index.d.ts +0 -2
  446. package/lib/cjs/TopContentSearch/index.d.ts.map +0 -1
  447. package/lib/cjs/TopContentSearch/index.js +0 -13
  448. package/lib/cjs/TopContentSearch/topContentSearch.scss +0 -22
  449. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts +0 -14
  450. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts.map +0 -1
  451. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +0 -76
  452. package/lib/cjs/ValueChangedIcon/index.d.ts +0 -2
  453. package/lib/cjs/ValueChangedIcon/index.d.ts.map +0 -1
  454. package/lib/cjs/ValueChangedIcon/index.js +0 -13
  455. package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -12
  456. package/lib/cjs/helperFunctions/errorMessage.d.ts.map +0 -1
  457. package/lib/cjs/helperFunctions/errorMessage.js +0 -95
  458. package/lib/cjs/helperFunctions/errorMessage.scss +0 -3
  459. package/lib/cjs/helperFunctions/index.d.ts +0 -2
  460. package/lib/cjs/helperFunctions/index.d.ts.map +0 -1
  461. package/lib/cjs/helperFunctions/index.js +0 -13
  462. package/lib/cjs/hooks/index.d.ts +0 -14
  463. package/lib/cjs/hooks/index.d.ts.map +0 -1
  464. package/lib/cjs/hooks/index.js +0 -25
  465. package/lib/cjs/hooks/useBreakpoint.d.ts +0 -12
  466. package/lib/cjs/hooks/useBreakpoint.d.ts.map +0 -1
  467. package/lib/cjs/hooks/useBreakpoint.js +0 -86
  468. package/lib/cjs/hooks/useCopyToClipboard.d.ts +0 -6
  469. package/lib/cjs/hooks/useCopyToClipboard.d.ts.map +0 -1
  470. package/lib/cjs/hooks/useCopyToClipboard.js +0 -39
  471. package/lib/cjs/hooks/useDebounce.d.ts +0 -9
  472. package/lib/cjs/hooks/useDebounce.d.ts.map +0 -1
  473. package/lib/cjs/hooks/useDebounce.js +0 -40
  474. package/lib/cjs/hooks/useFetch.d.ts +0 -20
  475. package/lib/cjs/hooks/useFetch.d.ts.map +0 -1
  476. package/lib/cjs/hooks/useFetch.js +0 -71
  477. package/lib/cjs/hooks/useForceUpdate.d.ts +0 -18
  478. package/lib/cjs/hooks/useForceUpdate.d.ts.map +0 -1
  479. package/lib/cjs/hooks/useForceUpdate.js +0 -28
  480. package/lib/cjs/hooks/useForkRef.d.ts +0 -2
  481. package/lib/cjs/hooks/useForkRef.d.ts.map +0 -1
  482. package/lib/cjs/hooks/useForkRef.js +0 -29
  483. package/lib/cjs/hooks/useIsMounted.d.ts +0 -3
  484. package/lib/cjs/hooks/useIsMounted.d.ts.map +0 -1
  485. package/lib/cjs/hooks/useIsMounted.js +0 -18
  486. package/lib/cjs/hooks/useLRUCache.d.ts +0 -8
  487. package/lib/cjs/hooks/useLRUCache.d.ts.map +0 -1
  488. package/lib/cjs/hooks/useLRUCache.js +0 -28
  489. package/lib/cjs/hooks/useLocalStorage.d.ts +0 -5
  490. package/lib/cjs/hooks/useLocalStorage.d.ts.map +0 -1
  491. package/lib/cjs/hooks/useLocalStorage.js +0 -39
  492. package/lib/cjs/hooks/useOnScreen.d.ts +0 -2
  493. package/lib/cjs/hooks/useOnScreen.d.ts.map +0 -1
  494. package/lib/cjs/hooks/useOnScreen.js +0 -18
  495. package/lib/cjs/hooks/usePolling.d.ts +0 -2
  496. package/lib/cjs/hooks/usePolling.d.ts.map +0 -1
  497. package/lib/cjs/hooks/usePolling.js +0 -19
  498. package/lib/cjs/hooks/usePrevious.d.ts +0 -2
  499. package/lib/cjs/hooks/usePrevious.d.ts.map +0 -1
  500. package/lib/cjs/hooks/usePrevious.js +0 -12
  501. package/lib/cjs/hooks/useTitle.d.ts +0 -2
  502. package/lib/cjs/hooks/useTitle.d.ts.map +0 -1
  503. package/lib/cjs/hooks/useTitle.js +0 -14
  504. package/lib/cjs/hooks/useUndo.d.ts +0 -22
  505. package/lib/cjs/hooks/useUndo.d.ts.map +0 -1
  506. package/lib/cjs/hooks/useUndo.js +0 -76
  507. package/lib/cjs/index.d.ts +0 -34
  508. package/lib/cjs/index.d.ts.map +0 -1
  509. package/lib/cjs/index.js +0 -45
  510. package/lib/esm/PhoneInput/flags.png +0 -0
  511. package/lib/esm/Table/Table.d.ts +0 -11
  512. package/lib/esm/Table/Table.d.ts.map +0 -1
  513. package/lib/esm/Table/TableColumnSelector.d.ts +0 -7
  514. package/lib/esm/Table/TableColumnSelector.d.ts.map +0 -1
  515. package/lib/esm/Table/TableColumnSelector.js +0 -27
  516. package/lib/esm/Table/columnSelector.css +0 -37
@@ -1,28 +0,0 @@
1
- import 'react-toastify/dist/ReactToastify.min.css';
2
- import './toastNotification.css';
3
- import React from 'react';
4
- import { ToastContainer, ToastOptions } from 'react-toastify';
5
- import { IAppError } from '../helperFunctions/errorMessage';
6
- export declare enum ToastType {
7
- DANGER = "danger",
8
- INFO = "info",
9
- SUCCESS = "success",
10
- WARNING = "warning"
11
- }
12
- declare class ToastNotification {
13
- static addDangerMessage(message: React.ReactNode, alertBody?: React.ReactNode, options?: ToastOptions): import("react-toastify").ToastId;
14
- static addSuccessMessage(message: React.ReactNode, alertBody?: React.ReactNode, options?: ToastOptions): import("react-toastify").ToastId;
15
- static addWarningMessage(message: any, options?: ToastOptions): import("react-toastify").ToastId;
16
- static addInfoMessage(message: any, options?: ToastOptions): import("react-toastify").ToastId;
17
- static addXHRErrorMessage(error: any, errorMessageObj?: IAppError): void;
18
- static clearAll(): void;
19
- static clearAllDebounce(timeToDebounce: number): void;
20
- static clearToast(toastId: any): void;
21
- /**
22
- * DEPRECATED: Call an add message function with { autoClose: timeToDelat } in the ToastOptions object to clear toast
23
- * after a certain amount of time.
24
- */
25
- static clearToastDebounce(timeToDebounce: number, ...toastIds: React.ReactText[]): void;
26
- }
27
- export { ToastContainer, ToastNotification };
28
- //# sourceMappingURL=ToastNotification.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ToastNotification.d.ts","sourceRoot":"","sources":["../../../src/ToastNotification/ToastNotification.tsx"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAC;AACnD,OAAO,yBAAyB,CAAC;AAIjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAA+C,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEzG,oBAAY,SAAS;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AAsBD,cAAM,iBAAiB;WACL,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAE,YAAiB;WAYlG,iBAAiB,CAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,EAC3B,OAAO,GAAE,YAAkC;WAYjC,iBAAiB,CAAC,OAAO,KAAA,EAAE,OAAO,GAAE,YAAiB;WASrD,cAAc,CAAC,OAAO,KAAA,EAAE,OAAO,GAAE,YAAkC;WAOnE,kBAAkB,CAAC,KAAK,KAAA,EAAE,eAAe,CAAC,EAAE,SAAS;WAOrD,QAAQ;WAIR,gBAAgB,CAAC,cAAc,EAAE,MAAM;WAIvC,UAAU,CAAC,OAAO,KAAA;IAIhC;;;OAGG;WACW,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE;CAG1F;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,63 +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.ToastNotification = exports.ToastContainer = exports.ToastType = void 0;
7
- require("react-toastify/dist/ReactToastify.min.css");
8
- require("./toastNotification.css");
9
- const react_core_1 = require("@patternfly/react-core");
10
- const debounce_1 = __importDefault(require("lodash/debounce"));
11
- const react_1 = __importDefault(require("react"));
12
- const react_toastify_1 = require("react-toastify");
13
- Object.defineProperty(exports, "ToastContainer", { enumerable: true, get: function () { return react_toastify_1.ToastContainer; } });
14
- const errorMessage_1 = require("../helperFunctions/errorMessage");
15
- var ToastType;
16
- (function (ToastType) {
17
- ToastType["DANGER"] = "danger";
18
- ToastType["INFO"] = "info";
19
- ToastType["SUCCESS"] = "success";
20
- ToastType["WARNING"] = "warning";
21
- })(ToastType = exports.ToastType || (exports.ToastType = {}));
22
- const AlertComponent = ({ variant, message, alertActions = {}, closeToast, children }) => {
23
- return (react_1.default.createElement(react_core_1.Alert, { variant: variant, title: message, actionClose: react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: closeToast }) }, children));
24
- };
25
- const defaultCloseMs = 8000;
26
- const defaultToastOptions = { autoClose: defaultCloseMs };
27
- class ToastNotification {
28
- static addDangerMessage(message, alertBody, options = {}) {
29
- return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.DANGER, message: message, closeToast: closeToast }, alertBody)), Object.assign({}, options));
30
- }
31
- // removed options: ToastOptions = defaultToastOptions to fix auto-dismissing of success alerts.
32
- static addSuccessMessage(message, alertBody, options = defaultToastOptions) {
33
- return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.SUCCESS, message: message, closeToast: closeToast }, alertBody)), Object.assign({}, options));
34
- }
35
- static addWarningMessage(message, options = {}) {
36
- return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.WARNING, message: message, closeToast: closeToast })), Object.assign({}, options));
37
- }
38
- static addInfoMessage(message, options = defaultToastOptions) {
39
- return react_toastify_1.toast(({ closeToast }) => react_1.default.createElement(AlertComponent, { variant: ToastType.INFO, message: message, closeToast: closeToast }), Object.assign({}, options));
40
- }
41
- static addXHRErrorMessage(error, errorMessageObj) {
42
- const messageBody = errorMessage_1.formattedApiErrorMessage(error, errorMessageObj);
43
- const messageHeader = errorMessage_1.errorMessageTitle(error, errorMessageObj);
44
- ToastNotification.addDangerMessage(messageHeader, messageBody, { closeOnClick: false });
45
- }
46
- static clearAll() {
47
- react_toastify_1.toast.dismiss();
48
- }
49
- static clearAllDebounce(timeToDebounce) {
50
- debounce_1.default(() => react_toastify_1.toast.dismiss, timeToDebounce)();
51
- }
52
- static clearToast(toastId) {
53
- react_toastify_1.toast.dismiss(toastId);
54
- }
55
- /**
56
- * DEPRECATED: Call an add message function with { autoClose: timeToDelat } in the ToastOptions object to clear toast
57
- * after a certain amount of time.
58
- */
59
- static clearToastDebounce(timeToDebounce, ...toastIds) {
60
- debounce_1.default(() => toastIds.forEach((id) => ToastNotification.clearToast(id)), timeToDebounce)();
61
- }
62
- }
63
- exports.ToastNotification = ToastNotification;
@@ -1,2 +0,0 @@
1
- export * from './ToastNotification';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ToastNotification/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -1,13 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./ToastNotification"), exports);
@@ -1,22 +0,0 @@
1
- .Toastify__toast-container {
2
- width: 95%;
3
- }
4
-
5
- @media (min-width: 992px) {
6
- .Toastify__toast-container {
7
- width: 600px;
8
- }
9
- }
10
-
11
- .Toastify__toast-container > .Toastify__toast {
12
- padding: 0px;
13
- }
14
-
15
- .Toastify__toast-body {
16
- margin: 0;
17
- }
18
-
19
- .Toastify__toast-body > .pf-c-alert {
20
- height: 100%;
21
- min-width: 500px;
22
- }
@@ -1,14 +0,0 @@
1
- import './topContentSearch.scss';
2
- import { ITopContentList } from '@cee-eng/hydrajs/@types/models/topContent/topContentModel';
3
- import React from 'react';
4
- interface IProps {
5
- dataTrackingId: string;
6
- topContentResultsWrapperRef: React.MutableRefObject<any>;
7
- topContentData: ITopContentList[];
8
- enableEventTracking?: boolean;
9
- onSearch: (searchVal: string, searchResults: ITopContentList[]) => void;
10
- }
11
- export declare const getTopContentUrl: (contentUrl: string) => string;
12
- export declare function TopContentSearch({ topContentData, topContentResultsWrapperRef, onSearch, dataTrackingId, enableEventTracking, }: IProps): JSX.Element;
13
- export {};
14
- //# sourceMappingURL=TopContentSearch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,eA2GR"}
@@ -1,138 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
22
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
23
- return new (P || (P = Promise))(function (resolve, reject) {
24
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
25
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
26
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
27
- step((generator = generator.apply(thisArg, _arguments || [])).next());
28
- });
29
- };
30
- var __importDefault = (this && this.__importDefault) || function (mod) {
31
- return (mod && mod.__esModule) ? mod : { "default": mod };
32
- };
33
- Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.TopContentSearch = exports.getTopContentUrl = void 0;
35
- require("./topContentSearch.scss");
36
- const react_core_1 = require("@patternfly/react-core");
37
- const utils_1 = require("@rh-support/utils");
38
- const js_worker_search_1 = __importStar(require("js-worker-search"));
39
- const debounce_1 = __importDefault(require("lodash/debounce"));
40
- const flatMap_1 = __importDefault(require("lodash/flatMap"));
41
- const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
42
- const mark_js_1 = __importDefault(require("mark.js"));
43
- const react_1 = __importStar(require("react"));
44
- const react_i18next_1 = require("react-i18next");
45
- const getTopContentUrl = (contentUrl) => {
46
- // There is some data urls (e.g. /solutions/articles/etc.) that aren't valid urls
47
- // this adds the access.redhat.com to make them valid urls, otherwise the top content edit functionality won't work
48
- // for product/versions that already have data not created by users.
49
- if (contentUrl.startsWith('/')) {
50
- return `https://${utils_1.getAccessHostname()}${contentUrl}`;
51
- }
52
- return contentUrl;
53
- };
54
- exports.getTopContentUrl = getTopContentUrl;
55
- var CustomEvents;
56
- (function (CustomEvents) {
57
- CustomEvents["inputChange"] = "top-content-filter-input-change";
58
- CustomEvents["inputClear"] = "top-content-filter-input-clear";
59
- })(CustomEvents || (CustomEvents = {}));
60
- function TopContentSearch({ topContentData = [], topContentResultsWrapperRef = { current: {} }, onSearch, dataTrackingId, enableEventTracking = false, }) {
61
- const [searchText, setSearchText] = react_1.useState('');
62
- const { t } = react_i18next_1.useTranslation();
63
- const searchWorkerRef = react_1.useRef(new js_worker_search_1.default({
64
- indexMode: js_worker_search_1.INDEX_MODES.ALL_SUBSTRINGS,
65
- caseSensitive: false,
66
- matchAnyToken: true,
67
- }));
68
- const searchWrapperRef = react_1.useRef(null);
69
- react_1.useEffect(() => {
70
- topContentData.forEach((item) => {
71
- item.content.forEach((content) => {
72
- searchWorkerRef.current.indexDocument(content.topContentId, `${content.contentTitle} ${exports.getTopContentUrl(content.contentUrl)}`);
73
- });
74
- });
75
- searchText && handleSearch(searchText);
76
- // eslint-disable-next-line react-hooks/exhaustive-deps
77
- }, [topContentData]);
78
- // to log custom events for dtm tracking.
79
- const logCustomEvent = (eventName, event) => {
80
- if (!enableEventTracking || !searchWrapperRef.current || !event || !eventName)
81
- return;
82
- utils_1.dtmTrackEvent(searchWrapperRef, eventName, event);
83
- };
84
- const highlightSearchResults = react_1.useCallback((searchTerm) => {
85
- const d = topContentResultsWrapperRef.current;
86
- const markInstance = new mark_js_1.default(d);
87
- markInstance.unmark({
88
- done: () => {
89
- if (isEmpty_1.default(searchTerm))
90
- return;
91
- markInstance.mark(searchTerm, { separateWordSearch: true });
92
- },
93
- });
94
- }, [topContentResultsWrapperRef]);
95
- const onSearchInputClear = react_1.useCallback((event) => {
96
- logCustomEvent(CustomEvents.inputClear, event);
97
- setSearchText('');
98
- highlightSearchResults('');
99
- onSearch('', topContentData);
100
- },
101
- // eslint-disable-next-line react-hooks/exhaustive-deps
102
- [highlightSearchResults, topContentData]);
103
- // To handle search
104
- const handleSearch = react_1.useCallback((query) => __awaiter(this, void 0, void 0, function* () {
105
- if (!query) {
106
- onSearchInputClear();
107
- return;
108
- }
109
- const contentIds = yield searchWorkerRef.current.search(query);
110
- let contentFound = 0;
111
- const filteredData = flatMap_1.default(topContentData, (item) => {
112
- const filteredContent = item.content.filter((item) => contentIds.includes(item.topContentId));
113
- const filteredContentLength = filteredContent.length;
114
- if (filteredContentLength > 0 && contentFound < contentIds.length) {
115
- contentFound = contentFound + filteredContentLength;
116
- return [Object.assign(Object.assign({}, item), { content: filteredContent })];
117
- }
118
- else {
119
- return [];
120
- }
121
- });
122
- onSearch(query, filteredData);
123
- highlightSearchResults(query);
124
- logCustomEvent(CustomEvents.inputChange, { bubbles: true, detail: { query } });
125
- }),
126
- // eslint-disable-next-line react-hooks/exhaustive-deps
127
- [highlightSearchResults, topContentData, onSearchInputClear]);
128
- const debounceSearch = react_1.useMemo(() => debounce_1.default(handleSearch, 500), [handleSearch]);
129
- const onSearchInputChange = (value) => {
130
- setSearchText(value);
131
- debounceSearch(value);
132
- };
133
- return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
134
- react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
135
- react_1.default.createElement(react_i18next_1.Trans, null, "Filter results:")),
136
- react_1.default.createElement(react_core_1.SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: onSearchInputChange, onClear: onSearchInputClear })));
137
- }
138
- exports.TopContentSearch = TopContentSearch;
@@ -1,2 +0,0 @@
1
- export * from './TopContentSearch';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,13 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./TopContentSearch"), exports);
@@ -1,22 +0,0 @@
1
- .top-content-search-wrapper {
2
- display: flex;
3
- align-items: baseline;
4
- background-color: #f0f0f0;
5
- border: 1px solid #d2d2d2;
6
- margin-bottom: 0.5rem;
7
- padding: 1rem;
8
-
9
- .top-content-search-input {
10
- background-color: #fff;
11
- }
12
- }
13
-
14
- pfe-accordion {
15
- width: calc(100%);
16
- box-shadow: inset 1px 1px 0px #d2d2d2, inset -1px -1px 0px #d2d2d2;
17
- }
18
-
19
- #se-solution-engine .top-content-search-wrapper {
20
- margin-bottom: 0;
21
- border-bottom: 0;
22
- }
@@ -1,14 +0,0 @@
1
- import { TooltipPosition } from '@patternfly/react-core';
2
- import React from 'react';
3
- interface IProps<T> {
4
- value: T;
5
- isFetching?: boolean;
6
- tooltipPosition?: TooltipPosition;
7
- isLocalChange?: boolean;
8
- afterLocalChange?: () => void;
9
- comparator?: (current: T, previous: T) => boolean;
10
- getTooltipContent: (currentValue: T, previousValue: T) => React.ReactNode;
11
- }
12
- export declare function ValueChangedIcon<T>(props: IProps<T>): JSX.Element;
13
- export {};
14
- //# sourceMappingURL=ValueChangedIcon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ValueChangedIcon.d.ts","sourceRoot":"","sources":["../../../src/ValueChangedIcon/ValueChangedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAM,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,OAAO,CAAC;IAClD,iBAAiB,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7E;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAyDnD"}
@@ -1,76 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- var __importDefault = (this && this.__importDefault) || function (mod) {
22
- return (mod && mod.__esModule) ? mod : { "default": mod };
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ValueChangedIcon = void 0;
26
- const react_core_1 = require("@patternfly/react-core");
27
- const lightbulb_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/lightbulb-icon"));
28
- const debounce_1 = __importDefault(require("lodash/debounce"));
29
- const react_1 = __importStar(require("react"));
30
- function ValueChangedIcon(props) {
31
- // removed 2 min refresh functionality so this icon never needs to be shown
32
- // TODO: Reimplement "setShow"
33
- const [show] = react_1.useState(false);
34
- const [tooltipContent, setTooltipContent] = react_1.useState();
35
- const [currentValue, setCurrentValue] = react_1.useState(props.value);
36
- const [previousValue, setPreviousValue] = react_1.useState();
37
- const [clearTTDebounce, setClearTTDebounce] = react_1.useState();
38
- if (clearTTDebounce) {
39
- clearTTDebounce();
40
- setClearTTDebounce(undefined);
41
- }
42
- react_1.useEffect(() => {
43
- if (props.isLocalChange) {
44
- props.afterLocalChange();
45
- setPreviousValue(currentValue);
46
- return;
47
- }
48
- const showTT = props.comparator
49
- ? props.comparator(currentValue, previousValue)
50
- : previousValue !== currentValue;
51
- if (!!previousValue && !props.isLocalChange && showTT) {
52
- // setShow(true);
53
- setTooltipContent(props.getTooltipContent(currentValue, previousValue));
54
- setPreviousValue(currentValue);
55
- setClearTTDebounce(debounce_1.default(() => {
56
- setTooltipContent(null);
57
- // setShow(false);
58
- }, 6000));
59
- }
60
- }, [props, previousValue, currentValue]);
61
- react_1.useEffect(() => {
62
- if (currentValue !== props.value) {
63
- setPreviousValue(!!currentValue ? currentValue : props.value);
64
- setCurrentValue(props.value);
65
- }
66
- }, [props.value, currentValue]);
67
- // useEffect(() => {
68
- // if (props.isLocalChange) setShow(!props.isLocalChange)
69
- // }, [props.isLocalChange]);
70
- if (!tooltipContent || !show) {
71
- return null;
72
- }
73
- return (react_1.default.createElement(react_core_1.Tooltip, { content: tooltipContent, position: props.tooltipPosition || react_core_1.TooltipPosition.top },
74
- react_1.default.createElement(lightbulb_icon_1.default, null)));
75
- }
76
- exports.ValueChangedIcon = ValueChangedIcon;
@@ -1,2 +0,0 @@
1
- export * from './ValueChangedIcon';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ValueChangedIcon/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,13 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./ValueChangedIcon"), exports);
@@ -1,12 +0,0 @@
1
- import './errorMessage.scss';
2
- export interface IAppErrorObj {
3
- title: string;
4
- message: string | JSX.Element;
5
- }
6
- export interface IAppError {
7
- [key: string]: Partial<IAppErrorObj>;
8
- }
9
- declare function formattedApiErrorMessage(error: any, customMessage?: IAppError): string | JSX.Element;
10
- declare function errorMessageTitle(error: any, customError?: IAppError): string;
11
- export { formattedApiErrorMessage, errorMessageTitle };
12
- //# sourceMappingURL=errorMessage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAS7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;AAoDD,iBAAS,wBAAwB,CAAC,KAAK,KAAA,EAAE,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CAwCxF;AAED,iBAAS,iBAAiB,CAAC,KAAK,KAAA,EAAE,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAIjE;AAED,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,CAAC"}
@@ -1,95 +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.errorMessageTitle = exports.formattedApiErrorMessage = void 0;
7
- require("./errorMessage.scss");
8
- const react_core_1 = require("@patternfly/react-core");
9
- const external_link_alt_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon"));
10
- const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
11
- const react_1 = __importDefault(require("react"));
12
- const SupportFeedbackForm_1 = require("../SupportFeedbackForm");
13
- const defaultTitle = "Sorry, we're experiencing an error";
14
- const errorMessageButtonLabel = 'contact us';
15
- const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-u-mb-0" },
16
- "Try refreshing the page. Please ",
17
- react_1.default.createElement(SupportFeedbackForm_1.SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
18
- " if the problem persists.",
19
- react_1.default.createElement("br", null),
20
- react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
21
- ' '));
22
- const defaultErrorObj = {
23
- 500: {
24
- title: defaultTitle,
25
- message: defaultErrorMessage,
26
- },
27
- 403: {
28
- title: 'There was a problem with your request',
29
- message: (react_1.default.createElement("p", null,
30
- "You are not authorized to do this action. Please",
31
- ' ',
32
- react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
33
- " if you think this is an error.")),
34
- },
35
- 404: {
36
- title: 'There was a problem with your request',
37
- message: (react_1.default.createElement("p", null,
38
- "The resource that you are looking for doesn't exist. Please",
39
- ' ',
40
- react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
41
- " if you think this is an error.")),
42
- },
43
- };
44
- // the error argument need a better typing here. We want to make sure that user is passing an error object and not an error string
45
- function formattedApiErrorMessage(error, customMessage) {
46
- var _a, _b, _c;
47
- const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
48
- if (!customMessage)
49
- customMessage = {};
50
- // Note: We show default error message on 503 error codes
51
- // eslint-disable-next-line
52
- if (errorCode === 500) {
53
- return ((_a = customMessage[errorCode]) === null || _a === void 0 ? void 0 : _a.message) || defaultErrorMessage;
54
- }
55
- else if (errorCode === 403) {
56
- if ((_b = customMessage[errorCode]) === null || _b === void 0 ? void 0 : _b.message) {
57
- return customMessage[errorCode].message;
58
- }
59
- else if ((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.detailMessage)) {
60
- return (react_1.default.createElement("p", null,
61
- error.message || '',
62
- " ",
63
- error.detailMessage || '',
64
- react_1.default.createElement("br", null),
65
- "Please ",
66
- react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
67
- " if you think this is an error."));
68
- }
69
- else {
70
- return defaultErrorMessage;
71
- }
72
- }
73
- else if (errorCode === 404) {
74
- return (((_c = customMessage[errorCode]) === null || _c === void 0 ? void 0 : _c.message) ||
75
- (error === null || error === void 0 ? void 0 : error.message) ||
76
- (error === null || error === void 0 ? void 0 : error.detailMessage) ||
77
- defaultErrorObj[errorCode].message);
78
- }
79
- else {
80
- // api call error
81
- const message = (error === null || error === void 0 ? void 0 : error.statusText) || (error === null || error === void 0 ? void 0 : error.responseText) || '';
82
- // error.message -> javascript error
83
- const isNotProperUXError = isEmpty_1.default(message) || (message === null || message === void 0 ? void 0 : message.length) > 200 || (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.detailMessage);
84
- return isNotProperUXError ? defaultErrorMessage : message;
85
- }
86
- }
87
- exports.formattedApiErrorMessage = formattedApiErrorMessage;
88
- function errorMessageTitle(error, customError) {
89
- var _a, _b;
90
- if (!customError)
91
- customError = {};
92
- const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
93
- return ((_a = customError[errorCode]) === null || _a === void 0 ? void 0 : _a.title) || ((_b = defaultErrorObj[errorCode]) === null || _b === void 0 ? void 0 : _b.title) || defaultTitle;
94
- }
95
- exports.errorMessageTitle = errorMessageTitle;
@@ -1,3 +0,0 @@
1
- .status-portal-button-icon {
2
- font-size: var(--pf-global--icon--FontSize--sm);
3
- }
@@ -1,2 +0,0 @@
1
- export * from './errorMessage';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,13 +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
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./errorMessage"), exports);
@@ -1,14 +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
- //# 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"}