@rh-support/components 2.1.48 → 2.1.50

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 (345) hide show
  1. package/lib/esm/Table/index.d.ts +0 -1
  2. package/lib/esm/Table/index.d.ts.map +1 -1
  3. package/lib/esm/Table/index.js +0 -1
  4. package/package.json +12 -23
  5. package/lib/cjs/AlertMessage/AlertMessage.css +0 -9
  6. package/lib/cjs/AlertMessage/AlertMessage.d.ts +0 -24
  7. package/lib/cjs/AlertMessage/AlertMessage.d.ts.map +0 -1
  8. package/lib/cjs/AlertMessage/AlertMessage.js +0 -30
  9. package/lib/cjs/AlertMessage/index.d.ts +0 -2
  10. package/lib/cjs/AlertMessage/index.d.ts.map +0 -1
  11. package/lib/cjs/AlertMessage/index.js +0 -18
  12. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -7
  13. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +0 -1
  14. package/lib/cjs/ConfirmationModal/ConfirmationContext.js +0 -57
  15. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +0 -30
  16. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +0 -1
  17. package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +0 -28
  18. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -1
  19. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +0 -1
  20. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +0 -36
  21. package/lib/cjs/ConfirmationModal/index.d.ts +0 -3
  22. package/lib/cjs/ConfirmationModal/index.d.ts.map +0 -1
  23. package/lib/cjs/ConfirmationModal/index.js +0 -18
  24. package/lib/cjs/CoverSpinner/CoverSpinner.css +0 -16
  25. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -4
  26. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +0 -1
  27. package/lib/cjs/CoverSpinner/CoverSpinner.js +0 -13
  28. package/lib/cjs/CoverSpinner/index.d.ts +0 -2
  29. package/lib/cjs/CoverSpinner/index.d.ts.map +0 -1
  30. package/lib/cjs/CoverSpinner/index.js +0 -17
  31. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts +0 -15
  32. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +0 -1
  33. package/lib/cjs/CustomContentLoader/CustomContentLoader.js +0 -62
  34. package/lib/cjs/CustomContentLoader/index.d.ts +0 -2
  35. package/lib/cjs/CustomContentLoader/index.d.ts.map +0 -1
  36. package/lib/cjs/CustomContentLoader/index.js +0 -17
  37. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -14
  38. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +0 -1
  39. package/lib/cjs/CustomTextInput/CustomTextInput.js +0 -50
  40. package/lib/cjs/CustomTextInput/index.d.ts +0 -2
  41. package/lib/cjs/CustomTextInput/index.d.ts.map +0 -1
  42. package/lib/cjs/CustomTextInput/index.js +0 -17
  43. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts +0 -6
  44. package/lib/cjs/DropDownList/AsyncDropDownList.d.ts.map +0 -1
  45. package/lib/cjs/DropDownList/AsyncDropDownList.js +0 -10
  46. package/lib/cjs/DropDownList/DropDownList.d.ts +0 -9
  47. package/lib/cjs/DropDownList/DropDownList.d.ts.map +0 -1
  48. package/lib/cjs/DropDownList/DropDownList.js +0 -145
  49. package/lib/cjs/DropDownList/DropdownWrapper.d.ts +0 -16
  50. package/lib/cjs/DropDownList/DropdownWrapper.d.ts.map +0 -1
  51. package/lib/cjs/DropDownList/DropdownWrapper.js +0 -25
  52. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts +0 -4
  53. package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts.map +0 -1
  54. package/lib/cjs/DropDownList/MultiSelectDropdownList.js +0 -7
  55. package/lib/cjs/DropDownList/Readme.md +0 -114
  56. package/lib/cjs/DropDownList/SearchableList.d.ts +0 -14
  57. package/lib/cjs/DropDownList/SearchableList.d.ts.map +0 -1
  58. package/lib/cjs/DropDownList/SearchableList.js +0 -104
  59. package/lib/cjs/DropDownList/SelectList.d.ts +0 -11
  60. package/lib/cjs/DropDownList/SelectList.d.ts.map +0 -1
  61. package/lib/cjs/DropDownList/SelectList.js +0 -41
  62. package/lib/cjs/DropDownList/async.d.ts +0 -9
  63. package/lib/cjs/DropDownList/async.d.ts.map +0 -1
  64. package/lib/cjs/DropDownList/async.js +0 -142
  65. package/lib/cjs/DropDownList/dropdownList.css +0 -59
  66. package/lib/cjs/DropDownList/dropdownUtils.d.ts +0 -5
  67. package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +0 -1
  68. package/lib/cjs/DropDownList/dropdownUtils.js +0 -29
  69. package/lib/cjs/DropDownList/index.d.ts +0 -4
  70. package/lib/cjs/DropDownList/index.d.ts.map +0 -1
  71. package/lib/cjs/DropDownList/index.js +0 -19
  72. package/lib/cjs/DropDownList/types.d.ts +0 -54
  73. package/lib/cjs/DropDownList/types.d.ts.map +0 -1
  74. package/lib/cjs/DropDownList/types.js +0 -2
  75. package/lib/cjs/DropDownList/withMulti.d.ts +0 -5
  76. package/lib/cjs/DropDownList/withMulti.d.ts.map +0 -1
  77. package/lib/cjs/DropDownList/withMulti.js +0 -73
  78. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts +0 -37
  79. package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
  80. package/lib/cjs/ErrorBoundary/ErrorBoundary.js +0 -66
  81. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -15
  82. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +0 -1
  83. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +0 -39
  84. package/lib/cjs/ErrorBoundary/index.d.ts +0 -2
  85. package/lib/cjs/ErrorBoundary/index.d.ts.map +0 -1
  86. package/lib/cjs/ErrorBoundary/index.js +0 -17
  87. package/lib/cjs/ErrorPages/Generic403.d.ts +0 -3
  88. package/lib/cjs/ErrorPages/Generic403.d.ts.map +0 -1
  89. package/lib/cjs/ErrorPages/Generic403.js +0 -14
  90. package/lib/cjs/ErrorPages/index.d.ts +0 -2
  91. package/lib/cjs/ErrorPages/index.d.ts.map +0 -1
  92. package/lib/cjs/ErrorPages/index.js +0 -17
  93. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -12
  94. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +0 -1
  95. package/lib/cjs/FeedbackForm/FeedbackForm.js +0 -144
  96. package/lib/cjs/FeedbackForm/index.d.ts +0 -2
  97. package/lib/cjs/FeedbackForm/index.d.ts.map +0 -1
  98. package/lib/cjs/FeedbackForm/index.js +0 -17
  99. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts +0 -30
  100. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +0 -1
  101. package/lib/cjs/Functional/CaseContactsSelectorExternal.js +0 -227
  102. package/lib/cjs/Functional/index.d.ts +0 -2
  103. package/lib/cjs/Functional/index.d.ts.map +0 -1
  104. package/lib/cjs/Functional/index.js +0 -17
  105. package/lib/cjs/InlineEdit/InlineEdit.d.ts +0 -37
  106. package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +0 -1
  107. package/lib/cjs/InlineEdit/InlineEdit.js +0 -173
  108. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +0 -41
  109. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +0 -1
  110. package/lib/cjs/InlineEdit/NewInlineEdit.js +0 -182
  111. package/lib/cjs/InlineEdit/index.d.ts +0 -3
  112. package/lib/cjs/InlineEdit/index.d.ts.map +0 -1
  113. package/lib/cjs/InlineEdit/index.js +0 -18
  114. package/lib/cjs/InlineEdit/inlineEdit.css +0 -29
  115. package/lib/cjs/InlineEdit/newInlineEdit.css +0 -44
  116. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -26
  117. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +0 -1
  118. package/lib/cjs/LanguageSelector/LanguageSelector.js +0 -65
  119. package/lib/cjs/LanguageSelector/index.d.ts +0 -2
  120. package/lib/cjs/LanguageSelector/index.d.ts.map +0 -1
  121. package/lib/cjs/LanguageSelector/index.js +0 -17
  122. package/lib/cjs/LanguageSelector/languageSelector.css +0 -5
  123. package/lib/cjs/LoadingDots/LoadingDots.css +0 -33
  124. package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -13
  125. package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +0 -1
  126. package/lib/cjs/LoadingDots/LoadingDots.js +0 -25
  127. package/lib/cjs/LoadingDots/index.d.ts +0 -2
  128. package/lib/cjs/LoadingDots/index.d.ts.map +0 -1
  129. package/lib/cjs/LoadingDots/index.js +0 -18
  130. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -15
  131. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
  132. package/lib/cjs/LoadingIndicator/LoadingIndicator.js +0 -25
  133. package/lib/cjs/LoadingIndicator/index.d.ts +0 -2
  134. package/lib/cjs/LoadingIndicator/index.d.ts.map +0 -1
  135. package/lib/cjs/LoadingIndicator/index.js +0 -17
  136. package/lib/cjs/LoadingIndicator/loadingIndicator.css +0 -79
  137. package/lib/cjs/LoginModal/LoginModal.d.ts +0 -15
  138. package/lib/cjs/LoginModal/LoginModal.d.ts.map +0 -1
  139. package/lib/cjs/LoginModal/LoginModal.js +0 -21
  140. package/lib/cjs/LoginModal/index.d.ts +0 -2
  141. package/lib/cjs/LoginModal/index.d.ts.map +0 -1
  142. package/lib/cjs/LoginModal/index.js +0 -17
  143. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts +0 -45
  144. package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +0 -1
  145. package/lib/cjs/MarkdownEditor/MarkdownEditor.js +0 -442
  146. package/lib/cjs/MarkdownEditor/index.d.ts +0 -2
  147. package/lib/cjs/MarkdownEditor/index.d.ts.map +0 -1
  148. package/lib/cjs/MarkdownEditor/index.js +0 -17
  149. package/lib/cjs/MarkdownEditor/markdownEditor.css +0 -113
  150. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts +0 -13
  151. package/lib/cjs/MoreOrLess/MoreOrLess.d.ts.map +0 -1
  152. package/lib/cjs/MoreOrLess/MoreOrLess.js +0 -75
  153. package/lib/cjs/MoreOrLess/index.d.ts +0 -2
  154. package/lib/cjs/MoreOrLess/index.d.ts.map +0 -1
  155. package/lib/cjs/MoreOrLess/index.js +0 -17
  156. package/lib/cjs/PaginatedList/PaginatedList.d.ts +0 -18
  157. package/lib/cjs/PaginatedList/PaginatedList.d.ts.map +0 -1
  158. package/lib/cjs/PaginatedList/PaginatedList.js +0 -67
  159. package/lib/cjs/PaginatedList/index.d.ts +0 -2
  160. package/lib/cjs/PaginatedList/index.d.ts.map +0 -1
  161. package/lib/cjs/PaginatedList/index.js +0 -17
  162. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -10
  163. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +0 -1
  164. package/lib/cjs/PaginationCompact/PaginationCompact.js +0 -67
  165. package/lib/cjs/PaginationCompact/index.d.ts +0 -2
  166. package/lib/cjs/PaginationCompact/index.d.ts.map +0 -1
  167. package/lib/cjs/PaginationCompact/index.js +0 -17
  168. package/lib/cjs/PaginationCompact/paginationCompact.css +0 -5
  169. package/lib/cjs/PhoneInput/CountryData.d.ts +0 -3
  170. package/lib/cjs/PhoneInput/CountryData.d.ts.map +0 -1
  171. package/lib/cjs/PhoneInput/CountryData.js +0 -583
  172. package/lib/cjs/PhoneInput/PhoneInput.d.ts +0 -20
  173. package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +0 -1
  174. package/lib/cjs/PhoneInput/PhoneInput.js +0 -293
  175. package/lib/cjs/PhoneInput/PhoneInput.scss +0 -753
  176. package/lib/cjs/PhoneInput/flags.png +0 -0
  177. package/lib/cjs/PhoneInput/index.d.ts +0 -2
  178. package/lib/cjs/PhoneInput/index.d.ts.map +0 -1
  179. package/lib/cjs/PhoneInput/index.js +0 -17
  180. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -9
  181. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +0 -1
  182. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +0 -68
  183. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts +0 -12
  184. package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts.map +0 -1
  185. package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +0 -39
  186. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts +0 -6
  187. package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts.map +0 -1
  188. package/lib/cjs/ProgressBar/CircularProgressBar/constants.js +0 -8
  189. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts +0 -2
  190. package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts.map +0 -1
  191. package/lib/cjs/ProgressBar/CircularProgressBar/index.js +0 -17
  192. package/lib/cjs/ProgressBar/CircularProgressBar/styles.css +0 -60
  193. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts +0 -32
  194. package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts.map +0 -1
  195. package/lib/cjs/ProgressBar/CircularProgressBar/types.js +0 -2
  196. package/lib/cjs/ProgressBar/ProgressBar.d.ts +0 -15
  197. package/lib/cjs/ProgressBar/ProgressBar.d.ts.map +0 -1
  198. package/lib/cjs/ProgressBar/ProgressBar.js +0 -36
  199. package/lib/cjs/ProgressBar/index.d.ts +0 -3
  200. package/lib/cjs/ProgressBar/index.d.ts.map +0 -1
  201. package/lib/cjs/ProgressBar/index.js +0 -18
  202. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts +0 -15
  203. package/lib/cjs/PromisifyModal/PromisifyModal.d.ts.map +0 -1
  204. package/lib/cjs/PromisifyModal/PromisifyModal.js +0 -43
  205. package/lib/cjs/PromisifyModal/index.d.ts +0 -2
  206. package/lib/cjs/PromisifyModal/index.d.ts.map +0 -1
  207. package/lib/cjs/PromisifyModal/index.js +0 -17
  208. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -8
  209. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +0 -1
  210. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +0 -20
  211. package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -5
  212. package/lib/cjs/SubscriptionAbuse/const.d.ts.map +0 -1
  213. package/lib/cjs/SubscriptionAbuse/const.js +0 -15
  214. package/lib/cjs/SubscriptionAbuse/index.d.ts +0 -3
  215. package/lib/cjs/SubscriptionAbuse/index.d.ts.map +0 -1
  216. package/lib/cjs/SubscriptionAbuse/index.js +0 -18
  217. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -12
  218. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +0 -1
  219. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +0 -48
  220. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -11
  221. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +0 -1
  222. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +0 -182
  223. package/lib/cjs/SupportFeedbackForm/index.d.ts +0 -3
  224. package/lib/cjs/SupportFeedbackForm/index.d.ts.map +0 -1
  225. package/lib/cjs/SupportFeedbackForm/index.js +0 -18
  226. package/lib/cjs/Table/PFTable.d.ts +0 -40
  227. package/lib/cjs/Table/PFTable.d.ts.map +0 -1
  228. package/lib/cjs/Table/PFTable.js +0 -208
  229. package/lib/cjs/Table/README.md +0 -65
  230. package/lib/cjs/Table/TableColumnSelector.d.ts +0 -8
  231. package/lib/cjs/Table/TableColumnSelector.d.ts.map +0 -1
  232. package/lib/cjs/Table/TableColumnSelector.js +0 -34
  233. package/lib/cjs/Table/TableComponent.d.ts +0 -11
  234. package/lib/cjs/Table/TableComponent.d.ts.map +0 -1
  235. package/lib/cjs/Table/TableComponent.js +0 -42
  236. package/lib/cjs/Table/TablePagination.d.ts +0 -19
  237. package/lib/cjs/Table/TablePagination.d.ts.map +0 -1
  238. package/lib/cjs/Table/TablePagination.js +0 -50
  239. package/lib/cjs/Table/TableProvider.d.ts +0 -15
  240. package/lib/cjs/Table/TableProvider.d.ts.map +0 -1
  241. package/lib/cjs/Table/TableProvider.js +0 -25
  242. package/lib/cjs/Table/columnSelector.css +0 -41
  243. package/lib/cjs/Table/index.d.ts +0 -5
  244. package/lib/cjs/Table/index.d.ts.map +0 -1
  245. package/lib/cjs/Table/index.js +0 -20
  246. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -15
  247. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +0 -1
  248. package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +0 -121
  249. package/lib/cjs/TermsAndConditions/index.d.ts +0 -2
  250. package/lib/cjs/TermsAndConditions/index.d.ts.map +0 -1
  251. package/lib/cjs/TermsAndConditions/index.js +0 -17
  252. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts +0 -8
  253. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts.map +0 -1
  254. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +0 -140
  255. package/lib/cjs/TextAreaAutosize/index.d.ts +0 -2
  256. package/lib/cjs/TextAreaAutosize/index.d.ts.map +0 -1
  257. package/lib/cjs/TextAreaAutosize/index.js +0 -17
  258. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts +0 -20
  259. package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +0 -1
  260. package/lib/cjs/TextAreaResizable/TextAreaResizable.js +0 -60
  261. package/lib/cjs/TextAreaResizable/index.d.ts +0 -2
  262. package/lib/cjs/TextAreaResizable/index.d.ts.map +0 -1
  263. package/lib/cjs/TextAreaResizable/index.js +0 -17
  264. package/lib/cjs/ToastNotification/ToastNotification.d.ts +0 -28
  265. package/lib/cjs/ToastNotification/ToastNotification.d.ts.map +0 -1
  266. package/lib/cjs/ToastNotification/ToastNotification.js +0 -71
  267. package/lib/cjs/ToastNotification/index.d.ts +0 -2
  268. package/lib/cjs/ToastNotification/index.d.ts.map +0 -1
  269. package/lib/cjs/ToastNotification/index.js +0 -17
  270. package/lib/cjs/ToastNotification/toastNotification.css +0 -22
  271. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts +0 -14
  272. package/lib/cjs/TopContentSearch/TopContentSearch.d.ts.map +0 -1
  273. package/lib/cjs/TopContentSearch/TopContentSearch.js +0 -143
  274. package/lib/cjs/TopContentSearch/index.d.ts +0 -2
  275. package/lib/cjs/TopContentSearch/index.d.ts.map +0 -1
  276. package/lib/cjs/TopContentSearch/index.js +0 -17
  277. package/lib/cjs/TopContentSearch/topContentSearch.scss +0 -22
  278. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts +0 -14
  279. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts.map +0 -1
  280. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +0 -80
  281. package/lib/cjs/ValueChangedIcon/index.d.ts +0 -2
  282. package/lib/cjs/ValueChangedIcon/index.d.ts.map +0 -1
  283. package/lib/cjs/ValueChangedIcon/index.js +0 -17
  284. package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -13
  285. package/lib/cjs/helperFunctions/errorMessage.d.ts.map +0 -1
  286. package/lib/cjs/helperFunctions/errorMessage.js +0 -95
  287. package/lib/cjs/helperFunctions/errorMessage.scss +0 -3
  288. package/lib/cjs/helperFunctions/index.d.ts +0 -2
  289. package/lib/cjs/helperFunctions/index.d.ts.map +0 -1
  290. package/lib/cjs/helperFunctions/index.js +0 -17
  291. package/lib/cjs/hooks/index.d.ts +0 -15
  292. package/lib/cjs/hooks/index.d.ts.map +0 -1
  293. package/lib/cjs/hooks/index.js +0 -30
  294. package/lib/cjs/hooks/useBreakpoint.d.ts +0 -12
  295. package/lib/cjs/hooks/useBreakpoint.d.ts.map +0 -1
  296. package/lib/cjs/hooks/useBreakpoint.js +0 -91
  297. package/lib/cjs/hooks/useCopyToClipboard.d.ts +0 -6
  298. package/lib/cjs/hooks/useCopyToClipboard.d.ts.map +0 -1
  299. package/lib/cjs/hooks/useCopyToClipboard.js +0 -40
  300. package/lib/cjs/hooks/useDebounce.d.ts +0 -9
  301. package/lib/cjs/hooks/useDebounce.d.ts.map +0 -1
  302. package/lib/cjs/hooks/useDebounce.js +0 -40
  303. package/lib/cjs/hooks/useFetch.d.ts +0 -20
  304. package/lib/cjs/hooks/useFetch.d.ts.map +0 -1
  305. package/lib/cjs/hooks/useFetch.js +0 -70
  306. package/lib/cjs/hooks/useForceUpdate.d.ts +0 -18
  307. package/lib/cjs/hooks/useForceUpdate.d.ts.map +0 -1
  308. package/lib/cjs/hooks/useForceUpdate.js +0 -28
  309. package/lib/cjs/hooks/useForkRef.d.ts +0 -2
  310. package/lib/cjs/hooks/useForkRef.d.ts.map +0 -1
  311. package/lib/cjs/hooks/useForkRef.js +0 -29
  312. package/lib/cjs/hooks/useIsMounted.d.ts +0 -3
  313. package/lib/cjs/hooks/useIsMounted.d.ts.map +0 -1
  314. package/lib/cjs/hooks/useIsMounted.js +0 -18
  315. package/lib/cjs/hooks/useLRUCache.d.ts +0 -8
  316. package/lib/cjs/hooks/useLRUCache.d.ts.map +0 -1
  317. package/lib/cjs/hooks/useLRUCache.js +0 -28
  318. package/lib/cjs/hooks/useLocalStorage.d.ts +0 -5
  319. package/lib/cjs/hooks/useLocalStorage.d.ts.map +0 -1
  320. package/lib/cjs/hooks/useLocalStorage.js +0 -39
  321. package/lib/cjs/hooks/useOnScreen.d.ts +0 -2
  322. package/lib/cjs/hooks/useOnScreen.d.ts.map +0 -1
  323. package/lib/cjs/hooks/useOnScreen.js +0 -18
  324. package/lib/cjs/hooks/usePolling.d.ts +0 -2
  325. package/lib/cjs/hooks/usePolling.d.ts.map +0 -1
  326. package/lib/cjs/hooks/usePolling.js +0 -19
  327. package/lib/cjs/hooks/usePrevious.d.ts +0 -2
  328. package/lib/cjs/hooks/usePrevious.d.ts.map +0 -1
  329. package/lib/cjs/hooks/usePrevious.js +0 -12
  330. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts +0 -13
  331. package/lib/cjs/hooks/useSelectKeyboardNavigator.d.ts.map +0 -1
  332. package/lib/cjs/hooks/useSelectKeyboardNavigator.js +0 -58
  333. package/lib/cjs/hooks/useTitle.d.ts +0 -2
  334. package/lib/cjs/hooks/useTitle.d.ts.map +0 -1
  335. package/lib/cjs/hooks/useTitle.js +0 -14
  336. package/lib/cjs/hooks/useUndo.d.ts +0 -22
  337. package/lib/cjs/hooks/useUndo.d.ts.map +0 -1
  338. package/lib/cjs/hooks/useUndo.js +0 -76
  339. package/lib/cjs/index.d.ts +0 -34
  340. package/lib/cjs/index.d.ts.map +0 -1
  341. package/lib/cjs/index.js +0 -49
  342. package/lib/esm/Table/TableColumnSelector.d.ts +0 -8
  343. package/lib/esm/Table/TableColumnSelector.d.ts.map +0 -1
  344. package/lib/esm/Table/TableColumnSelector.js +0 -27
  345. package/lib/esm/Table/columnSelector.css +0 -41
@@ -1,442 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __rest = (this && this.__rest) || function (s, e) {
26
- var t = {};
27
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
28
- t[p] = s[p];
29
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
30
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
31
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
32
- t[p[i]] = s[p[i]];
33
- }
34
- return t;
35
- };
36
- var __importDefault = (this && this.__importDefault) || function (mod) {
37
- return (mod && mod.__esModule) ? mod : { "default": mod };
38
- };
39
- Object.defineProperty(exports, "__esModule", { value: true });
40
- exports.MarkdownEditor = exports.EditorMode = void 0;
41
- require("./markdownEditor.css");
42
- const ui_toolkit_1 = require("@cee-eng/ui-toolkit");
43
- const react_core_1 = require("@patternfly/react-core");
44
- const deprecated_1 = require("@patternfly/react-core/deprecated");
45
- const code_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/code-icon"));
46
- const image_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/image-icon"));
47
- const link_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/link-icon"));
48
- const list_ul_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/list-ul-icon"));
49
- const quote_right_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/quote-right-icon"));
50
- const trash_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/trash-icon"));
51
- const utils_1 = require("@rh-support/utils");
52
- const classnames_1 = __importDefault(require("classnames"));
53
- const dompurify_1 = __importDefault(require("dompurify"));
54
- const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
55
- const react_1 = __importStar(require("react"));
56
- const react_i18next_1 = require("react-i18next");
57
- const hooks_1 = require("../hooks");
58
- var EditorMode;
59
- (function (EditorMode) {
60
- EditorMode["PLAIN"] = "plaintext";
61
- EditorMode["MARKDOWN"] = "markdown";
62
- })(EditorMode || (exports.EditorMode = EditorMode = {}));
63
- const defaultProps = {
64
- value: '',
65
- onChange: () => { },
66
- id: '',
67
- className: '',
68
- hidePreviewText: 'Hide preview',
69
- showPreviewText: 'Show preview',
70
- textAreaClassName: '',
71
- mdPlaceholder: 'Add a comment using markdown',
72
- plainTextPlaceholder: 'Add a comment to this case',
73
- allowEmoji: true,
74
- hideHeadingOptions: false,
75
- showMarkdownPlainTextToggle: false,
76
- editorMode: EditorMode.PLAIN,
77
- charLimit: 32000,
78
- minCharsForCounter: 31800,
79
- fileSelectorProps: {
80
- showFileSelectorInToolbar: false,
81
- },
82
- };
83
- function MarkdownEditor(props) {
84
- const { t } = (0, react_i18next_1.useTranslation)();
85
- const { hidePreviewText, showPreviewText, mdPlaceholder, plainTextPlaceholder, textAreaClassName, bindTextArea, markedownOptions, allowEmoji, hideHeadingOptions, rows, showMarkdownPlainTextToggle, editorMode, className, charLimit, minCharsForCounter, id, onCommentExceedCharsLimit, fileSelectorProps: { onClipboardPaste, onFileDelete, onFileSelect, isSupportedFile, showFileSelectorInToolbar = false, isUploadingFile = false, filesList = [], attachFileBtn, } } = props, textAreaProps = __rest(props, ["hidePreviewText", "showPreviewText", "mdPlaceholder", "plainTextPlaceholder", "textAreaClassName", "bindTextArea", "markedownOptions", "allowEmoji", "hideHeadingOptions", "rows", "showMarkdownPlainTextToggle", "editorMode", "className", "charLimit", "minCharsForCounter", "id", "onCommentExceedCharsLimit", "fileSelectorProps"]);
86
- const [isPreview, setIsPreview] = (0, react_1.useState)(false);
87
- const [mdValue, setMdValue] = (0, react_1.useState)(props.value);
88
- const previousFileList = (0, hooks_1.usePrevious)(filesList);
89
- const [isPlainModeEnabled, setIsPlainModeEnabled] = (0, react_1.useState)(showMarkdownPlainTextToggle && props.editorMode === EditorMode.PLAIN ? true : false);
90
- const textareaRef = (0, react_1.useRef)(null);
91
- const { state, setURValue, undo, redo, resetURValue } = (0, hooks_1.useUndo)(props.value);
92
- // for access inside event handlers
93
- const isPlainModeEnabledRef = (0, react_1.useRef)(isPlainModeEnabled);
94
- const [isFileSelectorOpen, setIsFileSelectorOpen] = (0, react_1.useState)(false);
95
- const onFileSelectLocal = () => {
96
- setIsFileSelectorOpen((open) => !open);
97
- };
98
- const onFileSelectToggle = (isOpen) => {
99
- setIsFileSelectorOpen(isOpen);
100
- };
101
- (0, react_1.useEffect)(() => {
102
- if ((previousFileList || []).length < (filesList || []).length && isUploadingFile) {
103
- onFileInsert(filesList[0]);
104
- }
105
- // eslint-disable-next-line react-hooks/exhaustive-deps
106
- }, [filesList]);
107
- const onFileInsert = (file) => {
108
- const template = (0, utils_1.isImageFile)(file.fileType)
109
- ? `![${file.fileName}](${file.link})`
110
- : `[${file.fileName}](${file.link})`;
111
- insert(template, 0, 0);
112
- const currentStart = textareaRef.current.selectionStart;
113
- textareaRef.current.setSelectionRange(currentStart + template.length, currentStart + template.length);
114
- onFileSelect && onFileSelect(file);
115
- };
116
- function pastedFile(items) {
117
- for (const item of items) {
118
- if (isSupportedFile && isSupportedFile(item.type)) {
119
- return item.getAsFile();
120
- }
121
- }
122
- return null;
123
- }
124
- const onPaste = (event) => {
125
- if (!event.clipboardData || isPlainModeEnabledRef.current)
126
- return;
127
- if (!event.clipboardData.items)
128
- return;
129
- const file = pastedFile(event.clipboardData.items);
130
- if (!file)
131
- return;
132
- const files = [file];
133
- event.preventDefault();
134
- onClipboardPaste(files);
135
- };
136
- // To handle dropped images
137
- const onDrop = (event) => {
138
- if (!event.dataTransfer.files)
139
- return;
140
- const file = event.dataTransfer.files[0];
141
- if (!file)
142
- return;
143
- const files = [file];
144
- event.preventDefault();
145
- onClipboardPaste(files);
146
- };
147
- const getFileSelectorList = () => {
148
- const filesAsDropdownItems = filesList.map((file) => {
149
- return (react_1.default.createElement(deprecated_1.DropdownItem, { key: file.id, onClick: () => {
150
- onFileInsert(file);
151
- } },
152
- react_1.default.createElement(react_core_1.Flex, { flexWrap: { default: 'nowrap' } },
153
- react_1.default.createElement(react_core_1.FlexItem, null,
154
- react_1.default.createElement(react_core_1.Text, { component: react_core_1.TextVariants.small }, file.fileName)),
155
- onFileDelete && (react_1.default.createElement(react_core_1.FlexItem, { className: "pf-v5-u-ml-auto" },
156
- react_1.default.createElement(react_core_1.Button, { variant: react_core_1.ButtonVariant.plain, onClick: (event) => {
157
- onFileSelectToggle(false);
158
- onFileDelete(file);
159
- event.stopPropagation();
160
- } },
161
- react_1.default.createElement(trash_icon_1.default, { color: "#c9190b" })))))));
162
- });
163
- return [
164
- ...filesAsDropdownItems,
165
- ...(filesAsDropdownItems.length > 0 ? [react_1.default.createElement(deprecated_1.DropdownSeparator, { key: "separator" })] : []),
166
- react_1.default.createElement(deprecated_1.DropdownItem, { key: "separated link", component: attachFileBtn }),
167
- ];
168
- };
169
- const bindTextAreaRef = (ref) => {
170
- textareaRef.current = ref;
171
- if (props.bindTextArea)
172
- props.bindTextArea(ref);
173
- };
174
- const onModeChange = (isPlainMode) => {
175
- setIsPlainModeEnabled(isPlainMode);
176
- isPlainModeEnabledRef.current = isPlainMode;
177
- isPlainMode && isPreview && setIsPreview(false);
178
- const mode = isPlainMode ? EditorMode.PLAIN : EditorMode.MARKDOWN;
179
- props.onChange(mdValue, mode);
180
- };
181
- (0, react_1.useEffect)(() => {
182
- if (mdValue !== props.value) {
183
- setMdValue(props.value);
184
- }
185
- }, [mdValue, props.value]);
186
- (0, react_1.useEffect)(() => {
187
- const isPlainMode = props.editorMode === EditorMode.PLAIN ? true : false;
188
- if (isPlainMode === isPlainModeEnabled)
189
- return;
190
- onModeChange(isPlainMode);
191
- // eslint-disable-next-line react-hooks/exhaustive-deps
192
- }, [props.editorMode]);
193
- (0, react_1.useEffect)(() => {
194
- // update state on undo redo
195
- if (mdValue !== state.present) {
196
- onValueChangeLocal(state.present);
197
- }
198
- // eslint-disable-next-line react-hooks/exhaustive-deps
199
- }, [state.present]);
200
- (0, hooks_1.useDebounce)(() => {
201
- if ((0, isEmpty_1.default)(mdValue))
202
- return;
203
- !isPlainModeEnabled && setURValue(mdValue);
204
- }, [mdValue], 500);
205
- const onValueChangeLocal = (text) => {
206
- const mode = showMarkdownPlainTextToggle && isPlainModeEnabled ? EditorMode.PLAIN : EditorMode.MARKDOWN;
207
- props.onChange(text, mode);
208
- setMdValue(text);
209
- };
210
- const textChanged = (event) => {
211
- let value = event.target.value;
212
- if (!props.allowEmoji && (0, utils_1.isEmojiPattern)(value)) {
213
- value = value.replace(utils_1.emojiPattern, '').trim();
214
- }
215
- onValueChangeLocal(value);
216
- charLimit - value.length < 0 ? props.onCommentExceedCharsLimit(true) : props.onCommentExceedCharsLimit(false);
217
- };
218
- const hasSelection = () => {
219
- return textareaRef.current.selectionStart !== textareaRef.current.selectionEnd;
220
- };
221
- const wrapSelection = (templateStart, templateEnd) => {
222
- const currentText = textareaRef.current.value;
223
- const posStart = textareaRef.current.selectionStart;
224
- const posEnd = textareaRef.current.selectionEnd;
225
- const selectedText = currentText.substring(posStart, posEnd);
226
- const whitespaceEdges = selectedText.match(/^\s*|\s*$/g) || [];
227
- const leadingWhitespace = whitespaceEdges[0] || '';
228
- const trailingWhitespace = whitespaceEdges[1] || '';
229
- const newText = currentText.substring(0, posStart) +
230
- leadingWhitespace +
231
- templateStart +
232
- selectedText.trim() +
233
- templateEnd +
234
- trailingWhitespace +
235
- currentText.substring(posEnd);
236
- onValueChangeLocal(newText);
237
- textareaRef.current.value = newText;
238
- textareaRef.current.selectionStart = posEnd + templateStart.length + templateEnd.length;
239
- textareaRef.current.selectionEnd = textareaRef.current.selectionStart;
240
- textareaRef.current.focus();
241
- onValueChangeLocal(newText);
242
- };
243
- const wrapBasedOnNewLines = () => {
244
- const currentText = textareaRef.current.value;
245
- const posStart = textareaRef.current.selectionStart;
246
- const posEnd = textareaRef.current.selectionEnd;
247
- const selectedText = currentText.substring(posStart, posEnd);
248
- const splitText = selectedText.split('\n');
249
- const newText = currentText
250
- .substring(0, posStart)
251
- .concat(splitText.map((v) => `- ${v}`).join('\n'), '\n', currentText.substring(posEnd));
252
- onValueChangeLocal(newText);
253
- };
254
- const insert = (template, selectionStart, selectionEnd) => {
255
- const currentText = textareaRef.current.value;
256
- const pos = textareaRef.current.selectionStart;
257
- const newText = currentText.substring(0, pos) + template + currentText.substring(pos);
258
- onValueChangeLocal(newText);
259
- textareaRef.current.value = newText;
260
- textareaRef.current.selectionStart = pos + selectionStart;
261
- textareaRef.current.selectionEnd = pos + (selectionEnd || selectionStart);
262
- textareaRef.current.focus();
263
- onValueChangeLocal(newText);
264
- };
265
- const bold = () => {
266
- if (hasSelection()) {
267
- wrapSelection('**', '**');
268
- }
269
- else {
270
- insert('**TEXT**', 2, 6);
271
- }
272
- };
273
- const italic = () => {
274
- if (hasSelection()) {
275
- wrapSelection('_', '_');
276
- }
277
- else {
278
- insert('_TEXT_', 1, 5);
279
- }
280
- };
281
- const h1 = () => {
282
- if (hasSelection()) {
283
- wrapSelection('# ', '');
284
- }
285
- else {
286
- insert('# HEADING', 2, 9);
287
- }
288
- };
289
- const h2 = () => {
290
- if (hasSelection()) {
291
- wrapSelection('## ', '');
292
- }
293
- else {
294
- insert('## HEADING', 3, 10);
295
- }
296
- };
297
- const h3 = () => {
298
- if (hasSelection()) {
299
- wrapSelection('### ', '');
300
- }
301
- else {
302
- insert('### HEADING', 4, 11);
303
- }
304
- };
305
- const list = () => {
306
- if (hasSelection()) {
307
- wrapBasedOnNewLines();
308
- }
309
- else {
310
- insert('- ITEM', 2, 6);
311
- }
312
- };
313
- const link = () => {
314
- if (hasSelection()) {
315
- wrapSelection('[', '](URL "TITLE")');
316
- }
317
- else {
318
- insert('[LINK TEXT](URL "TITLE")', 1, 10);
319
- }
320
- };
321
- const quote = () => {
322
- if (hasSelection()) {
323
- wrapSelection('> ', '\n');
324
- }
325
- else {
326
- insert('> QUOTE', 2, 7);
327
- }
328
- };
329
- const code = () => {
330
- if (hasSelection()) {
331
- wrapSelection('~~~\n', '\n~~~\n');
332
- }
333
- else {
334
- insert('~~~\nCODE\n~~~\n', 4, 8);
335
- }
336
- };
337
- const preview = () => {
338
- setIsPreview((previewFlag) => !previewFlag);
339
- };
340
- const previewMDText = (mdText) => {
341
- let text = mdText;
342
- const markeddownOptions = Object.assign(Object.assign({}, props.markedownOptions), { openLinksInNewTab: true, gfm: true, breaks: true });
343
- return (0, ui_toolkit_1.parseCommentMarkdown)(text, { openImagesInNewTab: false, lazyLoadImages: false }, markeddownOptions);
344
- };
345
- const keydown = (event) => {
346
- if (event.ctrlKey) {
347
- switch (event.key) {
348
- case 'b':
349
- bold();
350
- (0, utils_1.haltEvent)(event);
351
- break;
352
- case 'i':
353
- italic();
354
- (0, utils_1.haltEvent)(event);
355
- break;
356
- case '1':
357
- h1();
358
- (0, utils_1.haltEvent)(event);
359
- break;
360
- case '2':
361
- h2();
362
- (0, utils_1.haltEvent)(event);
363
- break;
364
- case '3':
365
- h3();
366
- (0, utils_1.haltEvent)(event);
367
- break;
368
- case 'z':
369
- undo();
370
- (0, utils_1.haltEvent)(event);
371
- break;
372
- case 'y':
373
- redo();
374
- (0, utils_1.haltEvent)(event);
375
- break;
376
- }
377
- }
378
- };
379
- const getCharCountText = (comment) => {
380
- const charCountLeft = charLimit - comment.length;
381
- return (react_1.default.createElement("span", { className: `character-count-wrapper ${charCountLeft <= 0 ? 'red' : ''}` },
382
- "(",
383
- t(`{{charCountLeft}} characters left`, { charCountLeft }),
384
- ")"));
385
- };
386
- const contentRows = (props.value && props.value.split('\n').length + 1) || 4;
387
- // reset undo redo value after post comment
388
- props.disabled && !(0, isEmpty_1.default)(state.present) && resetURValue('');
389
- // editor is disabled and preview is true -> set preview to false
390
- props.disabled && isPreview && setIsPreview(false);
391
- const disablePreviewButton = mdValue === '';
392
- return (react_1.default.createElement("div", { className: `markdown-editor-container ${props.className}`, id: props.id, "data-tracking-id": "md-editor-container", onDrop: onDrop, onPaste: onPaste },
393
- react_1.default.createElement("div", { className: "toolbar-container border-bottom" }, !isPlainModeEnabled && (react_1.default.createElement(react_core_1.Toolbar, { className: "pf-v5-l-flex" },
394
- react_1.default.createElement(react_core_1.ToolbarGroup, { "data-tracking-id": "md-editor-toolbar", className: "markdown-toolbar-left-section pf-m-wrap" },
395
- react_1.default.createElement(react_core_1.Button, { variant: react_core_1.ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: bold, "data-tracking-id": "md-editor-toolbar-b", title: "Bold" }, "B"),
396
- react_1.default.createElement(react_core_1.Button, { variant: react_core_1.ButtonVariant.plain, tabIndex: -1, isDisabled: props.disabled || isPreview, onClick: italic, "data-tracking-id": "md-editor-toolbar-i", title: "Italic" }, "I"),
397
- react_1.default.createElement("div", { className: "btn-group-separator" }),
398
- !props.hideHeadingOptions && (react_1.default.createElement(react_1.default.Fragment, null,
399
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: h1, title: "Heading 1", "data-tracking-id": "md-editor-toolbar-h1" }, "H1"),
400
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: h2, title: "Heading 2", "data-tracking-id": "md-editor-toolbar-h2" }, "H2"),
401
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: h3, title: "Heading 3", "data-tracking-id": "md-editor-toolbar-h3" }, "H3"),
402
- react_1.default.createElement("div", { className: "btn-group-separator" }))),
403
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, isDisabled: props.disabled || isPreview, variant: react_core_1.ButtonVariant.plain, onClick: list, title: "Bullet List", "data-tracking-id": "md-editor-toolbar-bul-list" },
404
- react_1.default.createElement(list_ul_icon_1.default, null)),
405
- react_1.default.createElement("div", { className: "btn-group-separator" }),
406
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: link, title: "Link", "data-tracking-id": "md-editor-toolbar-link" },
407
- react_1.default.createElement(link_icon_1.default, null)),
408
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: quote, title: "Quote", "data-tracking-id": "md-editor-toolbar-quote" },
409
- react_1.default.createElement(quote_right_icon_1.default, null)),
410
- react_1.default.createElement(react_core_1.Button, { tabIndex: -1, variant: react_core_1.ButtonVariant.plain, isDisabled: props.disabled || isPreview, onClick: code, title: "Code", "data-tracking-id": "md-editor-toolbar-code" },
411
- react_1.default.createElement(code_icon_1.default, null)),
412
- showFileSelectorInToolbar && (react_1.default.createElement(deprecated_1.Dropdown, { onSelect: onFileSelectLocal, id: "md-editor-toolbar-file-selector", toggle: react_1.default.createElement(deprecated_1.DropdownToggle, { "aria-label": "file selector", onToggle: (_event, isOpen) => onFileSelectToggle(isOpen), isDisabled: props.disabled || isPreview },
413
- react_1.default.createElement(image_icon_1.default, null)), dropdownItems: getFileSelectorList(), tabIndex: -1, isPlain: true, menuAppendTo: document.body, isOpen: isFileSelectorOpen, "data-tracking-id": "md-editor-toolbar-file-selector" }))),
414
- react_1.default.createElement(react_core_1.ToolbarItem, null,
415
- react_1.default.createElement("a", { className: "pf-v5-c-button pf-m-link pf-m-inline markdown-guidance", rel: "noopener noreferrer", target: "_blank", href: "/articles/4729621", "data-tracking-id": "md-guidance" },
416
- react_1.default.createElement(react_i18next_1.Trans, null, "Markdown guidance")))))),
417
- react_1.default.createElement("div", { className: "markdown-content" }, !isPreview ? (react_1.default.createElement("textarea", Object.assign({}, textAreaProps, { onKeyDown: keydown, placeholder: isPlainModeEnabled ? t(props.plainTextPlaceholder) : t(props.mdPlaceholder), ref: bindTextAreaRef, className: (0, classnames_1.default)('form-control', 'markdown-text-area', props.textAreaClassName, 'textArea'), value: mdValue, onChange: textChanged, rows: props.rows || contentRows, style: { height: '313px' } }))) : (react_1.default.createElement("div", { className: "markdown-preview-placeholder", style: { height: '313px' } },
418
- react_1.default.createElement("div", { className: "markdown-preview", style: { maxHeight: '313px' } },
419
- react_1.default.createElement("div", { dangerouslySetInnerHTML: {
420
- __html: dompurify_1.default.sanitize(previewMDText(mdValue)),
421
- } }))))),
422
- react_1.default.createElement("div", null, props.showMarkdownPlainTextToggle && (react_1.default.createElement("div", { className: `markdown-toggle-toolbar pf-v5-l-flex` },
423
- react_1.default.createElement("span", { className: "markdown-toolbar-left-section" },
424
- !isPlainModeEnabled && (react_1.default.createElement(react_core_1.Button, { className: "markdown-preview-btn", tabIndex: -1, variant: react_core_1.ButtonVariant.link, onClick: preview, title: "Show preview", "data-tracking-id": `md-preview-${isPreview ? 'hide' : 'show'}`, isDisabled: disablePreviewButton }, isPreview ? (react_1.default.createElement("span", null,
425
- " ",
426
- t(hidePreviewText))) : (react_1.default.createElement("span", null,
427
- " ",
428
- t(showPreviewText))))),
429
- isUploadingFile && (react_1.default.createElement(react_1.default.Fragment, null,
430
- react_1.default.createElement(react_i18next_1.Trans, null,
431
- react_1.default.createElement("small", { className: "pf-v5-u-pl-md" },
432
- react_1.default.createElement(react_i18next_1.Trans, null, "Uploading File"))),
433
- react_1.default.createElement(react_core_1.Spinner, { className: "pf-v5-u-ml-sm", size: "md" }))),
434
- mdValue.length > props.minCharsForCounter && getCharCountText(mdValue)),
435
- react_1.default.createElement("span", null,
436
- react_1.default.createElement(react_core_1.Button, { variant: "plain", className: isPlainModeEnabled ? 'markdown-active-mode' : '', onClick: () => onModeChange(true), isDisabled: isPlainModeEnabled || isUploadingFile, "data-tracking-id": "md-editor-plaintext" },
437
- react_1.default.createElement(react_i18next_1.Trans, null, "Plain text")),
438
- react_1.default.createElement(react_core_1.Button, { variant: "plain", className: !isPlainModeEnabled ? 'markdown-active-mode' : '', onClick: () => onModeChange(false), isDisabled: !isPlainModeEnabled, "data-tracking-id": "md-editor-md" },
439
- react_1.default.createElement(react_i18next_1.Trans, null, "Markdown"))))))));
440
- }
441
- exports.MarkdownEditor = MarkdownEditor;
442
- MarkdownEditor.defaultProps = defaultProps;
@@ -1,2 +0,0 @@
1
- export * from './MarkdownEditor';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MarkdownEditor/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./MarkdownEditor"), exports);
@@ -1,113 +0,0 @@
1
- .markdown-content .markdown-preview {
2
- min-height: 100px;
3
- overflow: auto;
4
- font-size: 15px;
5
- padding: 0.8rem;
6
- border: 1px solid #e3e3e3;
7
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
8
- border-radius: 1px;
9
- }
10
-
11
- .markdown-content .markdown-preview ul,
12
- .markdown-content .markdown-preview ol {
13
- padding-left: 24px;
14
- }
15
-
16
- .markdown-content .markdown-preview blockquote {
17
- border-left: 5px solid #c0c0c0 !important;
18
- }
19
-
20
- .markdown-editor-container {
21
- background: #fff;
22
- border: 1px solid #d2d2d2;
23
- display: block;
24
- min-height: 100px;
25
- overflow: hidden;
26
- }
27
-
28
- .markdown-editor-container .pf-v5-c-toolbar {
29
- padding: 0.5rem;
30
- }
31
-
32
- .btn-group-separator {
33
- background: rgba(40, 45, 51, 0.3);
34
- height: 16px;
35
- margin-left: 10px;
36
- margin-right: 5px;
37
- width: 1px;
38
- margin-top: 10px;
39
- }
40
-
41
- .markdown-content .markdown-text-area {
42
- resize: vertical;
43
- border-radius: 0;
44
- box-shadow: none !important;
45
- outline: none;
46
- border: none;
47
- font-size: 15px;
48
- padding: 0.8rem;
49
- min-width: 100%;
50
- }
51
-
52
- .markdown-editor-container .markdown-toggle-toolbar {
53
- border-top: 1px solid #d2d2d2;
54
- }
55
-
56
- .markdown-editor-container .markdown-toggle-toolbar button {
57
- font-size: 14px;
58
- padding: 10px 1rem;
59
- }
60
-
61
- .markdown-editor-container .markdown-toggle-toolbar .markdown-active-mode {
62
- border-top: 2px solid #06c;
63
- border-radius: 0px;
64
- color: #6a6e73;
65
- font-weight: 500;
66
- color: #06c;
67
- }
68
-
69
- .markdown-editor-container .markdown-guidance {
70
- padding-right: 12px;
71
- margin-top: 8px;
72
- }
73
-
74
- .markdown-editor-container .character-count-wrapper {
75
- white-space: nowrap;
76
- padding: 0 16px;
77
- font-size: 14px;
78
- }
79
-
80
- .markdown-editor-container .character-count-wrapper.red {
81
- color: #e00;
82
- }
83
-
84
- .markdown-editor-container .markdown-toolbar-left-section {
85
- flex: 1;
86
- }
87
-
88
- .markdown-editor-container.is-private .markdown-content .markdown-text-area {
89
- background-color: #f5eeee;
90
- }
91
-
92
- a[href*='/attachments/']::before,
93
- button[data-link*='/attachments/']::before {
94
- margin-right: 4px;
95
- font-style: normal;
96
- font-size: inherit;
97
- text-rendering: auto;
98
- -webkit-font-smoothing: antialiased;
99
- content: '📎';
100
- }
101
-
102
- .toolbar-container {
103
- height: 50px;
104
- }
105
- .markdown-text-area {
106
- width: 100%;
107
- height: 313px;
108
- border: none;
109
- }
110
-
111
- .markdown-preview {
112
- border-bottom: none !important;
113
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- maxHeight?: number;
4
- children: any;
5
- className?: string;
6
- appStickyHeaderRef?: React.MutableRefObject<HTMLElement>;
7
- }
8
- declare function MoreOrLess(props: IProps): React.JSX.Element;
9
- declare namespace MoreOrLess {
10
- var defaultProps: Partial<IProps>;
11
- }
12
- export { MoreOrLess };
13
- //# sourceMappingURL=MoreOrLess.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MoreOrLess.d.ts","sourceRoot":"","sources":["../../../src/MoreOrLess/MoreOrLess.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC5D;AAOD,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,qBAgEhC;kBAhEQ,UAAU;;;AAoEnB,OAAO,EAAE,UAAU,EAAE,CAAC"}