@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,10 +0,0 @@
1
- interface IProps {
2
- isModalOpen: boolean;
3
- onClose: () => void;
4
- }
5
- declare function SupportFeedbackModal(props: IProps): JSX.Element;
6
- declare namespace SupportFeedbackModal {
7
- var defaultProps: Partial<IProps>;
8
- }
9
- export { SupportFeedbackModal };
10
- //# sourceMappingURL=SupportFeedbackModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SupportFeedbackModal.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/SupportFeedbackModal.tsx"],"names":[],"mappings":"AAuBA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAMD,iBAAS,oBAAoB,CAAC,KAAK,EAAE,MAAM,eAyN1C;kBAzNQ,oBAAoB;;;AA4N7B,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,178 +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.SupportFeedbackModal = void 0;
35
- const hydrajs_1 = require("@cee-eng/hydrajs");
36
- const react_core_1 = require("@patternfly/react-core");
37
- const outlined_frown_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/outlined-frown-icon"));
38
- const outlined_frown_open_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/outlined-frown-open-icon"));
39
- const outlined_grin_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/outlined-grin-icon"));
40
- const outlined_meh_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/outlined-meh-icon"));
41
- const outlined_smile_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/outlined-smile-icon"));
42
- const utils_1 = require("@rh-support/utils");
43
- const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
44
- const react_1 = __importStar(require("react"));
45
- const react_i18next_1 = require("react-i18next");
46
- const react_router_dom_1 = require("react-router-dom");
47
- const useFetch_1 = require("../hooks/useFetch");
48
- const TextAreaAutosize_1 = require("../TextAreaAutosize");
49
- const ToastNotification_1 = require("../ToastNotification");
50
- const required = {
51
- levelOfSatisfied: true,
52
- moreInfo: false,
53
- };
54
- const defaultProps = {
55
- isModalOpen: false,
56
- };
57
- function SupportFeedbackModal(props) {
58
- var _a, _b;
59
- const { t } = react_i18next_1.useTranslation();
60
- const seSessionId = (_b = (_a = utils_1.getUrlParsedParams(react_router_dom_1.useLocation().search)) === null || _a === void 0 ? void 0 : _a.seSessionId) !== null && _b !== void 0 ? _b : '';
61
- const formInitState = {
62
- levelOfSatisfied: null,
63
- moreInfo: '',
64
- };
65
- const [values, setValues] = react_1.useState(formInitState);
66
- const { request, isFetching } = useFetch_1.useFetch(hydrajs_1.pcm.sendFeedbackForm, { propgateErrors: true });
67
- const [isSubmitDisabled, setIsSubmitDisabled] = react_1.useState(false);
68
- const [isSubmitButtonValid, setSubmitButtonValid] = react_1.useState(true);
69
- react_1.useEffect(() => {
70
- let valid = true;
71
- Object.keys(values).forEach((key) => {
72
- if (required[key]) {
73
- valid = valid && !isEmpty_1.default(values[key]);
74
- }
75
- });
76
- setSubmitButtonValid(!valid);
77
- }, [values]);
78
- // To Handle the Feedback Satisfaction values
79
- const handleSentimentChange = (event) => {
80
- setIsSubmitDisabled(false);
81
- setValues(Object.assign(Object.assign({}, values), { [event.target.name]: event.target.value }));
82
- };
83
- // To Handle the Text Area Input (Feedback Description)
84
- const handleFeedbackTextChange = (event) => {
85
- setValues(Object.assign(Object.assign({}, values), { [event.target.name]: event.target.value }));
86
- };
87
- // To handle submit
88
- const handleSubmit = (event) => __awaiter(this, void 0, void 0, function* () {
89
- event.preventDefault();
90
- if (!isSubmitButtonValid) {
91
- try {
92
- yield request(values, window.sessionjs, window.location.href, seSessionId);
93
- setValues(formInitState);
94
- ToastNotification_1.ToastNotification.addSuccessMessage(t(`Thank you. We've received your feedback.`), t('Have a great day!'));
95
- handleModalToggle();
96
- }
97
- catch (error) {
98
- ToastNotification_1.ToastNotification.addDangerMessage(t('Failed to submit feedback.'));
99
- }
100
- }
101
- else
102
- setIsSubmitDisabled(true);
103
- });
104
- // Function for Toggling the Modal when Provide feedback button is clicked
105
- const handleModalToggle = () => {
106
- if (isFetching)
107
- return;
108
- props.onClose();
109
- setIsSubmitDisabled(false);
110
- setValues({ levelOfSatisfied: null, moreInfo: '' });
111
- };
112
- // Feedback Satisfaction Values
113
- const sentiments = [
114
- {
115
- id: 'very_unsatisfied',
116
- icon: react_1.default.createElement(outlined_frown_open_icon_1.default, { size: "lg" }),
117
- label: 'Very Unsatisfied',
118
- },
119
- {
120
- id: 'unsatisfied',
121
- icon: react_1.default.createElement(outlined_frown_icon_1.default, { size: "lg" }),
122
- label: 'Unsatisfied',
123
- },
124
- {
125
- id: 'neutral',
126
- icon: react_1.default.createElement(outlined_meh_icon_1.default, { size: "lg" }),
127
- label: 'Neutral',
128
- },
129
- {
130
- id: 'satisfied',
131
- icon: react_1.default.createElement(outlined_smile_icon_1.default, { size: "lg" }),
132
- label: 'Satisfied',
133
- },
134
- {
135
- id: 'very_satisfied',
136
- icon: react_1.default.createElement(outlined_grin_icon_1.default, { size: "lg" }),
137
- label: 'Very Satisfied',
138
- },
139
- ];
140
- // To handle rendering of modal body
141
- function renderModalBody() {
142
- return (react_1.default.createElement(react_1.default.Fragment, null,
143
- react_1.default.createElement("form", { className: "support-feedback-form", action: "", onSubmit: handleSubmit },
144
- react_1.default.createElement("fieldset", { className: "form-group radios feedback-satisfaction pf-u-mb-sm", role: "radiogroup", "aria-labelledby": "feedback-satisfaction-label" },
145
- react_1.default.createElement("legend", { id: "feedback-satisfaction-label", className: "pf-u-mb-md" },
146
- react_1.default.createElement(react_i18next_1.Trans, null, "How satisfied are you with customer support\u2019s web experience?"),
147
- react_1.default.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*"),
148
- ' '),
149
- react_1.default.createElement("div", { className: "satisfaction-values-wrapper" }, sentiments.map((sentiment) => {
150
- return (react_1.default.createElement("label", { className: `${sentiment.id} sentiment-label pf-u-ml-md pf-u-mr-md ${values.levelOfSatisfied === sentiment.label ? 'sentiment-selected' : ''}`, htmlFor: sentiment.id, key: sentiment.id },
151
- react_1.default.createElement("input", { type: "radio", id: sentiment.id, "aria-label": t(sentiment.label), disabled: isFetching, name: "levelOfSatisfied", value: sentiment.label, checked: values.levelOfSatisfied === sentiment.label, "aria-checked": values.levelOfSatisfied === sentiment.label, required: true, className: "feedback_button_values pf-u-mb-sm pf-screen-reader", onChange: handleSentimentChange }),
152
- ' ',
153
- sentiment.icon,
154
- react_1.default.createElement(react_i18next_1.Trans, null, sentiment.label)));
155
- })),
156
- isSubmitDisabled && (react_1.default.createElement("div", null,
157
- react_1.default.createElement("p", { className: "form-instructions form-invalid" },
158
- react_1.default.createElement(react_i18next_1.Trans, null, "Please select a value"))))),
159
- react_1.default.createElement("div", { className: "form-group pf-u-mb-md" },
160
- react_1.default.createElement("label", { htmlFor: "moreFeedback" },
161
- react_1.default.createElement(react_i18next_1.Trans, null, "How can we improve?")),
162
- react_1.default.createElement(TextAreaAutosize_1.TextAreaAutosize, { name: "moreInfo", id: "moreFeedback", placeholder: t('i18nDescribeSuggestionDetail', 'Describe your suggestion in detail'), disabled: isFetching, value: values.moreInfo, className: "form-control", onChange: handleFeedbackTextChange, rowsMin: 3 })),
163
- react_1.default.createElement("p", null,
164
- react_1.default.createElement(react_i18next_1.Trans, null, "Feedback is sent to the web team working on this application, not the support associate working on your case.")))));
165
- }
166
- function returnModalAction() {
167
- return [
168
- react_1.default.createElement(react_core_1.Button, { key: "confirm", onClick: handleSubmit, variant: "primary", isDisabled: isSubmitDisabled || isFetching, className: "pf-u-ml-xs", spinnerAriaValueText: isFetching ? 'Loading' : undefined, isLoading: isFetching, "data-tracking-id": "app-feedback-submit", "aria-label": t('Send feedback') },
169
- react_1.default.createElement(react_i18next_1.Trans, null, isFetching ? 'Sending feedback' : 'Send feedback')),
170
- react_1.default.createElement("button", { key: "cancel", onClick: handleModalToggle, className: "btn btn-app btn-link", "data-tracking-id": "app-feedback-cancel", "aria-label": "Cancel", disabled: isFetching },
171
- react_1.default.createElement(react_i18next_1.Trans, null, "Cancel")),
172
- ];
173
- }
174
- return (react_1.default.createElement(react_1.default.Fragment, null,
175
- react_1.default.createElement(react_core_1.Modal, { id: "feedback-modal", title: t('i18nSendUsFeedback', 'Send us your feedback\n'), description: t('i18nFeedbackFormFoundBug', 'Let us know if you found a bug or if you have a suggestion to improve the web experience.'), "aria-describedby": "Feedback Form", isOpen: props.isModalOpen, variant: react_core_1.ModalVariant.large, onClose: handleModalToggle, actions: returnModalAction() }, renderModalBody())));
176
- }
177
- exports.SupportFeedbackModal = SupportFeedbackModal;
178
- SupportFeedbackModal.defaultProps = defaultProps;
@@ -1,3 +0,0 @@
1
- export * from './SupportFeedbackForm';
2
- export * from './SupportFeedbackModal';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/SupportFeedbackForm/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}
@@ -1,14 +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("./SupportFeedbackForm"), exports);
14
- __exportStar(require("./SupportFeedbackModal"), exports);
@@ -1,39 +0,0 @@
1
- import { IExtraData, IRow, IRowData, TableProps } from '@patternfly/react-table';
2
- import { ReactNode } from 'react';
3
- interface IColumn {
4
- id: string;
5
- title: string | ReactNode;
6
- sortable?: boolean;
7
- accessor?: (data: any) => any;
8
- sortMethod?: (a: any, b: any, sortDirection?: any) => 1 | -1 | 0;
9
- /**
10
- * @param data The invdividual data objects that are passed in to the table
11
- * @param index The index of the data in the data array passed to the table.
12
- */
13
- cell?: (data: any, index: number) => ReactNode;
14
- show?: boolean;
15
- rowProps?: (data: any) => any;
16
- cellWidth?: 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 60 | 70 | 80 | 90 | 100;
17
- }
18
- interface ISortInfo {
19
- direction: 'asc' | 'desc';
20
- column: string;
21
- }
22
- interface ISortBy {
23
- index: number;
24
- direction: 'asc' | 'desc';
25
- }
26
- interface IProps extends Omit<TableProps, 'sortBy' | 'cells' | 'onSort' | 'rows'> {
27
- pagination: boolean;
28
- onRowClick?: (event: any, row: any, props: any) => void;
29
- onSortChange?: (column: IColumn, direction: 'asc' | 'desc') => any;
30
- emptyStateRow?: IRow[];
31
- loadingRow?: IRow[];
32
- sortInfo?: ISortInfo;
33
- isLoading?: boolean;
34
- keepPageNumberOnDataChange?: boolean;
35
- }
36
- export declare const defaultTableSortMethod: (a: any, b: any) => 0 | 1 | -1;
37
- declare function PFTable(props: IProps): JSX.Element;
38
- export { IRowData, IExtraData, PFTable, IProps, ISortBy, ISortInfo, IColumn };
39
- //# sourceMappingURL=PFTable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PFTable.d.ts","sourceRoot":"","sources":["../../../src/Table/PFTable.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,UAAU,EACV,IAAI,EACJ,QAAQ,EAMR,UAAU,EAGb,MAAM,yBAAyB,CAAC;AACjC,OAAc,EAAE,SAAS,EAAoC,MAAM,OAAO,CAAC;AA6C3E,UAAU,OAAO;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,UAAU,CAAC,EAAE,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,EAAE,aAAa,CAAC,KAAA,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IAElD;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,IAAI,KAAA,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC1C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IACzB,SAAS,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;CACpF;AAED,UAAU,SAAS;IACf,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,OAAO;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC7B;AAED,UAAU,MAAO,SAAQ,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7E,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,KAAK,KAAA,EAAE,GAAG,KAAA,EAAE,KAAK,KAAA,KAAK,IAAI,CAAC;IACzC,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,GAAG,MAAM,KAAK,GAAG,CAAC;IACnE,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAGD,eAAO,MAAM,sBAAsB,gCAAoB,CAAC;AAExD,iBAAS,OAAO,CAAC,KAAK,EAAE,MAAM,eAyK7B;AAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC"}
@@ -1,204 +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 __rest = (this && this.__rest) || function (s, e) {
22
- var t = {};
23
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
24
- t[p] = s[p];
25
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
26
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
28
- t[p[i]] = s[p[i]];
29
- }
30
- return t;
31
- };
32
- var __importDefault = (this && this.__importDefault) || function (mod) {
33
- return (mod && mod.__esModule) ? mod : { "default": mod };
34
- };
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.PFTable = exports.defaultTableSortMethod = void 0;
37
- const react_core_1 = require("@patternfly/react-core");
38
- const search_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/search-icon"));
39
- const react_table_1 = require("@patternfly/react-table");
40
- const react_1 = __importStar(require("react"));
41
- const TableProvider_1 = require("./TableProvider");
42
- const noop = () => { };
43
- const emptyStateRowDefault = [
44
- {
45
- heightAuto: true,
46
- cells: [
47
- {
48
- props: { colSpan: 8 },
49
- title: (react_1.default.createElement(react_core_1.Bullseye, null,
50
- react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.small },
51
- react_1.default.createElement(react_core_1.EmptyStateIcon, { icon: search_icon_1.default }),
52
- react_1.default.createElement(react_core_1.Title, { headingLevel: "h2", size: "lg" }, "No results found")))),
53
- },
54
- ],
55
- },
56
- ];
57
- const loadingRowDefault = [
58
- {
59
- heightAuto: true,
60
- cells: [
61
- {
62
- props: { colSpan: 9 },
63
- title: (react_1.default.createElement(react_core_1.Bullseye, { style: { minHeight: '350px' } },
64
- react_1.default.createElement(react_core_1.EmptyState, { variant: react_core_1.EmptyStateVariant.small },
65
- react_1.default.createElement(react_core_1.Spinner, { size: "xl" })))),
66
- },
67
- ],
68
- },
69
- ];
70
- const defaultSortMethod = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
71
- exports.defaultTableSortMethod = defaultSortMethod;
72
- function PFTable(props) {
73
- const { className, pagination, onRowClick, onSortChange, onSelect, emptyStateRow = emptyStateRowDefault, loadingRow = loadingRowDefault, isLoading, keepPageNumberOnDataChange, sortInfo } = props, restProps = __rest(props, ["className", "pagination", "onRowClick", "onSortChange", "onSelect", "emptyStateRow", "loadingRow", "isLoading", "keepPageNumberOnDataChange", "sortInfo"]);
74
- const { columns, data, currentPage, perPage, setSelectedPage } = TableProvider_1.useTableContext();
75
- const [sortBy, setSortBy] = react_1.useState();
76
- const [pfColumns, setPFColumns] = react_1.useState([]);
77
- const [pfRows, setPFRows] = react_1.useState([]);
78
- const isSelectColumnVisible = onSelect && (data || []).length > 0;
79
- const onSort = (event, index, direction) => {
80
- // if onselect option is passed we need to decrease index by 1 to account for the checkbox column
81
- const actualIndex = isSelectColumnVisible ? index - 1 : index;
82
- if (sortBy && sortBy.index === index && sortBy.direction === direction)
83
- return;
84
- setSortBy({
85
- index,
86
- direction,
87
- });
88
- onSortChange ? onSortChange(columns[actualIndex], direction) : setSortedRows(actualIndex, direction);
89
- };
90
- react_1.useEffect(() => {
91
- if (!sortInfo)
92
- return;
93
- const { column, direction } = sortInfo;
94
- const columnIndex = columns.findIndex((item) => item.id === column);
95
- const actualIndex = onSelect ? columnIndex + 1 : columnIndex;
96
- if (sortBy && sortBy.index === actualIndex && sortBy.direction === direction)
97
- return;
98
- setSortBy({
99
- index: actualIndex,
100
- direction,
101
- });
102
- // eslint-disable-next-line react-hooks/exhaustive-deps
103
- }, [sortInfo]);
104
- const setSortedRows = react_1.useCallback((index, direction, rows = null) => {
105
- if (onSortChange)
106
- return;
107
- const sortMethod = columns[index].sortMethod || defaultSortMethod;
108
- const sortedRows = (rows || pfRows).sort((a, b) => sortMethod(a.cells[index], b.cells[index], direction));
109
- const sortedData = direction === react_table_1.SortByDirection.asc ? sortedRows : sortedRows.reverse();
110
- setPFRows(sortedData);
111
- },
112
- // eslint-disable-next-line react-hooks/exhaustive-deps
113
- [pfRows, columns]);
114
- react_1.useEffect(() => {
115
- const mappedPFColumns = columns.map((item) => {
116
- const { title, sortable: isSortable, show, cellWidth: width } = item;
117
- // tslint:disable-next-line:no-object-literal-type-assertion
118
- const mappedColumn = {};
119
- mappedColumn['title'] = title || '';
120
- if (isSortable) {
121
- mappedColumn['transforms'] = [];
122
- mappedColumn['transforms'].push(react_table_1.sortable);
123
- }
124
- if (width) {
125
- mappedColumn['transforms'] = mappedColumn['transforms'] || [];
126
- mappedColumn['transforms'].push(react_table_1.cellWidth(width));
127
- }
128
- if (show !== undefined && !show) {
129
- mappedColumn['columnTransforms'] = [react_table_1.classNames(react_table_1.Visibility.hidden)];
130
- }
131
- return mappedColumn;
132
- });
133
- setPFColumns(mappedPFColumns);
134
- }, [columns]);
135
- react_1.useEffect(() => {
136
- const rows = data.map((row, index) => {
137
- const a = [];
138
- columns.forEach((item) => {
139
- const { accessor, cell, rowProps = noop } = item;
140
- if (cell) {
141
- a.push({ title: cell(row, index), props: Object.assign({}, rowProps(row)) });
142
- }
143
- else if (accessor) {
144
- const rowData = accessor(row);
145
- a.push(rowData);
146
- }
147
- });
148
- return { cells: a };
149
- });
150
- setPFRows(rows);
151
- pagination && !keepPageNumberOnDataChange && setSelectedPage(1);
152
- if (sortBy && sortBy.direction && sortBy.index !== undefined && (data || []).length > 0) {
153
- const actualIndex = isSelectColumnVisible ? sortBy.index - 1 : sortBy.index;
154
- setSortedRows(actualIndex, sortBy.direction, rows);
155
- }
156
- // eslint-disable-next-line react-hooks/exhaustive-deps
157
- }, [data]);
158
- const getVisibleRows = () => pagination ? pfRows.slice((currentPage - 1) * perPage, currentPage * perPage) : pfRows;
159
- const onRowSelect = (ev, isSelected, rowindex, rowdata, extradata) => {
160
- // currently there seems to be a bug in PFTable if the data is not changed
161
- // then this function is called with the previous state
162
- // so we call all the setState functions with the function syntax.
163
- if (rowindex === -1) {
164
- setPFRows((currentRows) => currentRows.map((row) => {
165
- row.selected = isSelected;
166
- return row;
167
- }));
168
- }
169
- else {
170
- setPFRows((currentRows) => {
171
- const updatedRows = [...currentRows];
172
- updatedRows[rowindex].selected = isSelected;
173
- return updatedRows;
174
- });
175
- }
176
- onSelect && onSelect(ev, isSelected, rowindex, rowdata, extradata);
177
- };
178
- const getTableRows = () => {
179
- if (!isLoading && emptyStateRow && (data || []).length < 1) {
180
- return emptyStateRow;
181
- }
182
- else if (isLoading && loadingRow) {
183
- return loadingRow;
184
- }
185
- else {
186
- return getVisibleRows();
187
- }
188
- };
189
- const conditionalProps = Object.assign({}, (isSelectColumnVisible ? { onSelect: onRowSelect } : undefined));
190
- const getSortBy = () => {
191
- var _a;
192
- if (sortBy) {
193
- return {
194
- direction: sortBy === null || sortBy === void 0 ? void 0 : sortBy.direction,
195
- index: onSelect && data.length < 1 ? ((_a = sortBy.index) !== null && _a !== void 0 ? _a : 1) - 1 : sortBy.index,
196
- };
197
- }
198
- };
199
- return (react_1.default.createElement(react_1.default.Fragment, null,
200
- react_1.default.createElement(react_table_1.Table, Object.assign({}, restProps, conditionalProps, { variant: react_table_1.TableVariant.compact, cells: pfColumns, sortBy: getSortBy(), onSort: onSort, rows: getTableRows(), className: props.className ? props.className : '', actionResolver: props.actionResolver, actions: props.actions || null, areActionsDisabled: props.areActionsDisabled || null }),
201
- react_1.default.createElement(react_table_1.TableHeader, null),
202
- react_1.default.createElement(react_table_1.TableBody, { onRowClick: onRowClick ? onRowClick : noop }))));
203
- }
204
- exports.PFTable = PFTable;
@@ -1,65 +0,0 @@
1
- ## Table
2
-
3
- This table component comes with 3 compound components giving user the freedom to whether use Pagination and column selector with table and have them placed anywhere around the table. The props accepted by Table component are
4
-
5
- | Prop | Type | Description |
6
- | -------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
7
- | children | <code>React.ReactNode</code> | All the compound components or any component can be passsed as the children to the Table Component. Order doesn't matter |
8
- | columns | [<code>IColumn`[]`</code>](#IColumn) | Columns object array |
9
- | data | T | Array of data that needs to be rendered |
10
-
11
- <a name="IColumn"></a>
12
-
13
- ## IColumn : <code>Object</code>
14
-
15
- List of options that can be passed to IColumn object.
16
-
17
- **Properties**
18
-
19
- | Name | Type | Default | Description |
20
- | ---------- | -------------------------------- | -------- | ------------------------------------------------------------------------------- |
21
- | id | <code>string</code> | required | A unique id for the column |
22
- | title | <code>string</code> | required | Title of the column visible in the Table Header |
23
- | sortable | <code>boolean</code> | false | To enable sorting on the column |
24
- | accessor | <code>(data) => any</code> | required | Key for the data passed to the column |
25
- | sortMethod | <code>(a, b) => 1 | -1 | 0</code> | (a < b ? -1 : a > b ? 1 : 0) | Custom sort method for the column. Otherwise default method is used. Next and prev row are passed to the sortMethod |
26
- | cell | <code>(data) => ReactNode</code> | NA | To render a react component in the table cell |
27
- | show | <code>boolean</code> | true | To hide/show the column dynamically. More details in the ColumnSelector section |
28
-
29
- ## List of Compound Components
30
-
31
- 1. PFTable.tsx
32
- 2. TableColumnSelector.tsx
33
- 3. TablePagination.tsx
34
- 4. TableProvider.tsx
35
-
36
- ### PFTable.tsx
37
-
38
- A wrapper around the Patternfly table which accepts props in a fashion similar to react-table. All the props accepted by Patternfly table are accepted.
39
-
40
- #### Empty State in PFTable
41
-
42
- To show an empty state for the table, there are 2 options. Either you can use the default emptyStateRow, or you can pass a rows array to show your custom component. You can use the default emptyStateRow defined inside component (emptyStateRowDefault) as a reference to set your own.
43
-
44
- #### Loading State in PFTable
45
-
46
- To show an loading state for the table, there are 2 options. Either you can use the default loadingRow, or you can pass a rows array to show your custom component. You can use the default loadingRow defined inside component (loadingRowDefault) as a reference to set your own.
47
-
48
- ### TableColumnSelector.tsx
49
-
50
- Component to show/hide table columns dynamically. Uses TableContex to get the list of columns. Reads the show property of [<code>IColumn`[]`</code>](#IColumn) object. If show property is not defined for a column, it will always be visible and by default selected and disabled in the ColumnSelector menu. This component uses MultiSelect.tsx internally to give the multi select functionality.
51
-
52
- Props accepted by the component
53
-
54
- | Prop | Type | Description |
55
- | ---------------------- | ---------------------------------------- | ------------------------------------------------------------------- |
56
- | onColumnSelectorChange | <code>(columns: string[]) => void</code> | Function passed from parent to be called on selected columns change |
57
- | initialSelected | <code>string[]</code> | List of columns to be intital selected |
58
-
59
- ### TablePagination.tsx
60
-
61
- Component to handle pagination for the table. Uses TableContext to get data rendered by the table and sets current page and current pageSize value in the contex so that Table Component can render it and show data accordingly.
62
-
63
- ### TableProvider.tsx
64
-
65
- Creates the context to share the table state between the different compound components. Any component rendered inside the <code>Table</code> component can access the TableContext.
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,UAAU,MAAM,CAAC,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,IAAI,EAAE,CAAC,CAAC;IACR,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,wBAAgB,KAAK,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,eAkB/E"}
@@ -1,38 +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
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Table = void 0;
23
- const react_1 = __importStar(require("react"));
24
- const TableProvider_1 = require("./TableProvider");
25
- function Table({ children, columns, data, selectedColumns }) {
26
- const [currentPage, setSelectedPage] = react_1.useState(1);
27
- const [perPage, setPerPage] = react_1.useState(10);
28
- return (react_1.default.createElement(TableProvider_1.TableContext.Provider, { value: {
29
- columns,
30
- data,
31
- perPage,
32
- currentPage,
33
- setSelectedPage,
34
- setPerPage,
35
- selectedColumns,
36
- } }, children));
37
- }
38
- exports.Table = Table;
@@ -1,7 +0,0 @@
1
- import './columnSelector.css';
2
- interface IProps {
3
- onColumnSelectorChange: (columns: string[]) => void;
4
- }
5
- export declare function TableColumnSelector({ onColumnSelectorChange }: IProps): JSX.Element;
6
- export {};
7
- //# sourceMappingURL=TableColumnSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TableColumnSelector.d.ts","sourceRoot":"","sources":["../../../src/Table/TableColumnSelector.tsx"],"names":[],"mappings":"AACA,OAAO,sBAAsB,CAAC;AAU9B,UAAU,MAAM;IACZ,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CACvD;AAED,wBAAgB,mBAAmB,CAAC,EAAE,sBAAsB,EAAE,EAAE,MAAM,eAoCrE"}
@@ -1,34 +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.TableColumnSelector = void 0;
7
- // import { Button } from '@patternfly/react-core';
8
- require("./columnSelector.css");
9
- const utils_1 = require("@rh-support/utils");
10
- const react_1 = __importDefault(require("react"));
11
- const react_i18next_1 = require("react-i18next");
12
- const DropDownList_1 = require("../DropDownList");
13
- const TableProvider_1 = require("./TableProvider");
14
- function TableColumnSelector({ onColumnSelectorChange }) {
15
- const { selectedColumns: selectedItems, columns } = TableProvider_1.useTableContext();
16
- const { t } = react_i18next_1.useTranslation();
17
- const handleChange = (selectedCols) => {
18
- selectedCols = selectedCols.map((i) => i.value.value);
19
- onColumnSelectorChange(selectedCols);
20
- };
21
- return (react_1.default.createElement(DropDownList_1.MultiSelectDropDownList, { id: "case-list-table-column-dropdown", "data-tracking-id": "case-list-table-column-dropdown", selectedItems: utils_1.toOptions((selectedItems || []).map((item) => {
22
- var _a;
23
- return ({
24
- value: item,
25
- label: (((_a = columns.find((col) => item === col.id)) === null || _a === void 0 ? void 0 : _a.title) || ''),
26
- isDisabled: false,
27
- });
28
- }), { labelKey: 'label', disabledKey: 'isDisabled' }), list: utils_1.toOptions(columns.map((column) => ({
29
- value: column.id,
30
- label: column.title,
31
- isDisabled: column.show === undefined,
32
- })), { labelKey: 'label', disabledKey: 'isDisabled' }), title: 'column selector menu', placeholder: t('Columns'), onChange: handleChange, className: "column-selector", hasTwoColumns: true }));
33
- }
34
- exports.TableColumnSelector = TableColumnSelector;
@@ -1,18 +0,0 @@
1
- import { PaginationVariant } from '@patternfly/react-core';
2
- interface IProps {
3
- itemCount?: number;
4
- onSetPage?: ({ pageSize, currentPage }: {
5
- pageSize: any;
6
- currentPage: any;
7
- }) => void;
8
- onPerPageSelect?: ({ pageSize, currentPage }: {
9
- pageSize: any;
10
- currentPage: any;
11
- }) => void;
12
- perPage?: number;
13
- currentPage?: number;
14
- variant: PaginationVariant;
15
- }
16
- export declare function TablePagination(props: IProps): JSX.Element;
17
- export {};
18
- //# sourceMappingURL=TablePagination.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TablePagination.d.ts","sourceRoot":"","sources":["../../../src/Table/TablePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAKvE,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IAChD,eAAe,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE;;;KAAA,KAAK,IAAI,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC9B;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eA6B5C"}