@rh-support/components 2.0.4 → 2.0.7-beta.1

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 (286) hide show
  1. package/lib/cjs/AlertMessage/AlertMessage.js +5 -5
  2. package/lib/cjs/AlertMessage/index.d.ts +0 -1
  3. package/lib/cjs/AlertMessage/index.d.ts.map +1 -1
  4. package/lib/cjs/AlertMessage/index.js +1 -1
  5. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -1
  6. package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
  7. package/lib/cjs/ConfirmationModal/ConfirmationContext.js +13 -41
  8. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +4 -2
  9. package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
  10. package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +7 -6
  11. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -6
  12. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -1
  13. package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +29 -69
  14. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -1
  15. package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +1 -1
  16. package/lib/cjs/CoverSpinner/CoverSpinner.js +1 -1
  17. package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
  18. package/lib/cjs/CustomContentLoader/CustomContentLoader.js +25 -25
  19. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -1
  20. package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +1 -1
  21. package/lib/cjs/CustomTextInput/CustomTextInput.js +10 -21
  22. package/lib/cjs/DropDownList/AsyncDropDownList.js +5 -5
  23. package/lib/cjs/DropDownList/DropDownList.d.ts +0 -1
  24. package/lib/cjs/DropDownList/DropDownList.d.ts.map +1 -1
  25. package/lib/cjs/DropDownList/DropDownList.js +45 -75
  26. package/lib/cjs/DropDownList/DropdownWrapper.js +7 -18
  27. package/lib/cjs/DropDownList/MultiSelectDropdownList.js +3 -3
  28. package/lib/cjs/DropDownList/SearchableList.d.ts +1 -0
  29. package/lib/cjs/DropDownList/SearchableList.d.ts.map +1 -1
  30. package/lib/cjs/DropDownList/SearchableList.js +45 -55
  31. package/lib/cjs/DropDownList/SelectList.js +15 -26
  32. package/lib/cjs/DropDownList/async.js +28 -38
  33. package/lib/cjs/DropDownList/dropdownList.css +1 -1
  34. package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +1 -1
  35. package/lib/cjs/DropDownList/dropdownUtils.js +9 -19
  36. package/lib/cjs/DropDownList/types.d.ts +1 -0
  37. package/lib/cjs/DropDownList/types.d.ts.map +1 -1
  38. package/lib/cjs/DropDownList/withMulti.js +15 -26
  39. package/lib/cjs/ErrorBoundary/ErrorBoundary.js +18 -47
  40. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -1
  41. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
  42. package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +10 -10
  43. package/lib/cjs/ErrorPages/Generic403.d.ts +0 -1
  44. package/lib/cjs/ErrorPages/Generic403.d.ts.map +1 -1
  45. package/lib/cjs/ErrorPages/Generic403.js +2 -2
  46. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -1
  47. package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +1 -1
  48. package/lib/cjs/FeedbackForm/FeedbackForm.js +24 -52
  49. package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
  50. package/lib/cjs/Functional/CaseContactsSelectorExternal.js +81 -154
  51. package/lib/cjs/InlineEdit/InlineEdit.d.ts +1 -0
  52. package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +1 -1
  53. package/lib/cjs/InlineEdit/InlineEdit.js +58 -144
  54. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +1 -0
  55. package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +1 -1
  56. package/lib/cjs/InlineEdit/NewInlineEdit.js +62 -147
  57. package/lib/cjs/InlineEdit/inlineEdit.css +4 -0
  58. package/lib/cjs/InlineEdit/newInlineEdit.css +4 -0
  59. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -1
  60. package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +1 -1
  61. package/lib/cjs/LanguageSelector/LanguageSelector.js +10 -26
  62. package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -1
  63. package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +1 -1
  64. package/lib/cjs/LoadingDots/LoadingDots.js +4 -4
  65. package/lib/cjs/LoadingDots/index.d.ts +0 -1
  66. package/lib/cjs/LoadingDots/index.d.ts.map +1 -1
  67. package/lib/cjs/LoadingDots/index.js +1 -1
  68. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -1
  69. package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  70. package/lib/cjs/LoadingIndicator/LoadingIndicator.js +3 -3
  71. package/lib/cjs/LoginModal/LoginModal.d.ts +0 -1
  72. package/lib/cjs/LoginModal/LoginModal.d.ts.map +1 -1
  73. package/lib/cjs/LoginModal/LoginModal.js +3 -3
  74. package/lib/cjs/MarkdownEditor/MarkdownEditor.js +113 -165
  75. package/lib/cjs/MoreOrLess/MoreOrLess.js +20 -40
  76. package/lib/cjs/PaginatedList/PaginatedList.js +15 -31
  77. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -1
  78. package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +1 -1
  79. package/lib/cjs/PaginationCompact/PaginationCompact.js +14 -31
  80. package/lib/cjs/PhoneInput/CountryData.d.ts +3 -0
  81. package/lib/cjs/PhoneInput/CountryData.d.ts.map +1 -0
  82. package/lib/cjs/PhoneInput/CountryData.js +583 -0
  83. package/lib/cjs/PhoneInput/PhoneInput.d.ts +19 -0
  84. package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +1 -0
  85. package/lib/cjs/PhoneInput/PhoneInput.js +284 -0
  86. package/lib/cjs/PhoneInput/PhoneInput.scss +753 -0
  87. package/lib/cjs/PhoneInput/flags.png +0 -0
  88. package/lib/cjs/PhoneInput/index.d.ts +2 -0
  89. package/lib/cjs/PhoneInput/index.d.ts.map +1 -0
  90. package/lib/cjs/PhoneInput/index.js +13 -0
  91. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -1
  92. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
  93. package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +14 -14
  94. package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +20 -18
  95. package/lib/cjs/ProgressBar/ProgressBar.js +8 -19
  96. package/lib/cjs/PromisifyModal/PromisifyModal.js +19 -36
  97. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -1
  98. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
  99. package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +5 -5
  100. package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -1
  101. package/lib/cjs/SubscriptionAbuse/const.d.ts.map +1 -1
  102. package/lib/cjs/SubscriptionAbuse/const.js +3 -3
  103. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -1
  104. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
  105. package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +8 -24
  106. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -1
  107. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
  108. package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +50 -120
  109. package/lib/cjs/Table/PFTable.js +52 -89
  110. package/lib/cjs/Table/Table.js +12 -29
  111. package/lib/cjs/Table/TableColumnSelector.d.ts +0 -1
  112. package/lib/cjs/Table/TableColumnSelector.d.ts.map +1 -1
  113. package/lib/cjs/Table/TableColumnSelector.js +14 -15
  114. package/lib/cjs/Table/TablePagination.d.ts +0 -1
  115. package/lib/cjs/Table/TablePagination.d.ts.map +1 -1
  116. package/lib/cjs/Table/TablePagination.js +8 -8
  117. package/lib/cjs/Table/TableProvider.js +6 -6
  118. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -1
  119. package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
  120. package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +46 -100
  121. package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +35 -62
  122. package/lib/cjs/TextAreaResizable/TextAreaResizable.js +12 -25
  123. package/lib/cjs/ToastNotification/ToastNotification.js +35 -70
  124. package/lib/cjs/TopContentSearch/TopContentSearch.js +48 -113
  125. package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +13 -29
  126. package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -1
  127. package/lib/cjs/helperFunctions/errorMessage.d.ts.map +1 -1
  128. package/lib/cjs/helperFunctions/errorMessage.js +13 -13
  129. package/lib/cjs/hooks/useBreakpoint.js +26 -43
  130. package/lib/cjs/hooks/useCopyToClipboard.js +8 -24
  131. package/lib/cjs/hooks/useDebounce.js +13 -38
  132. package/lib/cjs/hooks/useFetch.js +47 -123
  133. package/lib/cjs/hooks/useForceUpdate.js +2 -18
  134. package/lib/cjs/hooks/useForkRef.js +3 -3
  135. package/lib/cjs/hooks/useIsMounted.js +4 -4
  136. package/lib/cjs/hooks/useLRUCache.js +11 -11
  137. package/lib/cjs/hooks/useLocalStorage.js +7 -23
  138. package/lib/cjs/hooks/useOnScreen.js +5 -24
  139. package/lib/cjs/hooks/usePolling.js +8 -30
  140. package/lib/cjs/hooks/usePrevious.js +3 -3
  141. package/lib/cjs/hooks/useTitle.js +4 -4
  142. package/lib/cjs/hooks/useUndo.js +49 -72
  143. package/lib/cjs/index.d.ts +1 -0
  144. package/lib/cjs/index.d.ts.map +1 -1
  145. package/lib/cjs/index.js +1 -0
  146. package/lib/esm/AlertMessage/AlertMessage.js +2 -2
  147. package/lib/esm/AlertMessage/index.d.ts +0 -1
  148. package/lib/esm/AlertMessage/index.d.ts.map +1 -1
  149. package/lib/esm/AlertMessage/index.js +1 -1
  150. package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts +0 -1
  151. package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
  152. package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts +4 -2
  153. package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
  154. package/lib/esm/ConfirmationModal/ConfirmationDialog.js +3 -2
  155. package/lib/esm/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -6
  156. package/lib/esm/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -1
  157. package/lib/esm/ConfirmationModal/ConfirmationModal.stories.js +19 -18
  158. package/lib/esm/CoverSpinner/CoverSpinner.d.ts +0 -1
  159. package/lib/esm/CoverSpinner/CoverSpinner.d.ts.map +1 -1
  160. package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
  161. package/lib/esm/CustomContentLoader/CustomContentLoader.js +23 -23
  162. package/lib/esm/CustomTextInput/CustomTextInput.d.ts +0 -1
  163. package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
  164. package/lib/esm/CustomTextInput/CustomTextInput.js +1 -1
  165. package/lib/esm/DropDownList/DropDownList.d.ts +0 -1
  166. package/lib/esm/DropDownList/DropDownList.d.ts.map +1 -1
  167. package/lib/esm/DropDownList/SearchableList.d.ts +1 -0
  168. package/lib/esm/DropDownList/SearchableList.d.ts.map +1 -1
  169. package/lib/esm/DropDownList/SearchableList.js +6 -2
  170. package/lib/esm/DropDownList/dropdownList.css +1 -1
  171. package/lib/esm/DropDownList/dropdownUtils.d.ts.map +1 -1
  172. package/lib/esm/DropDownList/dropdownUtils.js +1 -0
  173. package/lib/esm/DropDownList/types.d.ts +1 -0
  174. package/lib/esm/DropDownList/types.d.ts.map +1 -1
  175. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -1
  176. package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
  177. package/lib/esm/ErrorPages/Generic403.d.ts +0 -1
  178. package/lib/esm/ErrorPages/Generic403.d.ts.map +1 -1
  179. package/lib/esm/FeedbackForm/FeedbackForm.d.ts +0 -1
  180. package/lib/esm/FeedbackForm/FeedbackForm.d.ts.map +1 -1
  181. package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
  182. package/lib/esm/Functional/CaseContactsSelectorExternal.js +2 -2
  183. package/lib/esm/InlineEdit/InlineEdit.d.ts +1 -0
  184. package/lib/esm/InlineEdit/InlineEdit.d.ts.map +1 -1
  185. package/lib/esm/InlineEdit/InlineEdit.js +3 -3
  186. package/lib/esm/InlineEdit/NewInlineEdit.d.ts +1 -0
  187. package/lib/esm/InlineEdit/NewInlineEdit.d.ts.map +1 -1
  188. package/lib/esm/InlineEdit/NewInlineEdit.js +3 -3
  189. package/lib/esm/InlineEdit/inlineEdit.css +4 -0
  190. package/lib/esm/InlineEdit/newInlineEdit.css +4 -0
  191. package/lib/esm/LanguageSelector/LanguageSelector.d.ts +0 -1
  192. package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
  193. package/lib/esm/LoadingDots/LoadingDots.d.ts +0 -1
  194. package/lib/esm/LoadingDots/LoadingDots.d.ts.map +1 -1
  195. package/lib/esm/LoadingDots/LoadingDots.js +1 -1
  196. package/lib/esm/LoadingDots/index.d.ts +0 -1
  197. package/lib/esm/LoadingDots/index.d.ts.map +1 -1
  198. package/lib/esm/LoadingDots/index.js +1 -1
  199. package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts +0 -1
  200. package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
  201. package/lib/esm/LoginModal/LoginModal.d.ts +0 -1
  202. package/lib/esm/LoginModal/LoginModal.d.ts.map +1 -1
  203. package/lib/esm/PaginationCompact/PaginationCompact.d.ts +0 -1
  204. package/lib/esm/PaginationCompact/PaginationCompact.d.ts.map +1 -1
  205. package/lib/esm/PhoneInput/CountryData.d.ts +3 -0
  206. package/lib/esm/PhoneInput/CountryData.d.ts.map +1 -0
  207. package/lib/esm/PhoneInput/CountryData.js +580 -0
  208. package/lib/esm/PhoneInput/PhoneInput.d.ts +19 -0
  209. package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -0
  210. package/lib/esm/PhoneInput/PhoneInput.js +257 -0
  211. package/lib/esm/PhoneInput/PhoneInput.scss +753 -0
  212. package/lib/esm/PhoneInput/flags.png +0 -0
  213. package/lib/esm/PhoneInput/index.d.ts +2 -0
  214. package/lib/esm/PhoneInput/index.d.ts.map +1 -0
  215. package/lib/esm/PhoneInput/index.js +1 -0
  216. package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -1
  217. package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
  218. package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -1
  219. package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
  220. package/lib/esm/SubscriptionAbuse/const.d.ts +0 -1
  221. package/lib/esm/SubscriptionAbuse/const.d.ts.map +1 -1
  222. package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -1
  223. package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
  224. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -1
  225. package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
  226. package/lib/esm/Table/TableColumnSelector.d.ts +0 -1
  227. package/lib/esm/Table/TableColumnSelector.d.ts.map +1 -1
  228. package/lib/esm/Table/TablePagination.d.ts +0 -1
  229. package/lib/esm/Table/TablePagination.d.ts.map +1 -1
  230. package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts +0 -1
  231. package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
  232. package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
  233. package/lib/esm/helperFunctions/errorMessage.d.ts +0 -1
  234. package/lib/esm/helperFunctions/errorMessage.d.ts.map +1 -1
  235. package/lib/esm/index.d.ts +1 -0
  236. package/lib/esm/index.d.ts.map +1 -1
  237. package/lib/esm/index.js +1 -0
  238. package/package.json +16 -30
  239. package/lib/cjs/AlertMessage/AlertMessage.stories.d.ts +0 -12
  240. package/lib/cjs/AlertMessage/AlertMessage.stories.d.ts.map +0 -1
  241. package/lib/cjs/AlertMessage/AlertMessage.stories.js +0 -29
  242. package/lib/cjs/DropDownList/Dropdownlist.stories.d.ts +0 -17
  243. package/lib/cjs/DropDownList/Dropdownlist.stories.d.ts.map +0 -1
  244. package/lib/cjs/DropDownList/Dropdownlist.stories.js +0 -253
  245. package/lib/cjs/LoadingDots/LoadingDots.stories.d.ts +0 -10
  246. package/lib/cjs/LoadingDots/LoadingDots.stories.d.ts.map +0 -1
  247. package/lib/cjs/LoadingDots/LoadingDots.stories.js +0 -16
  248. package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
  249. package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.d.ts.map +0 -1
  250. package/lib/cjs/LoadingIndicator/LoadingIndicator.stories.js +0 -18
  251. package/lib/cjs/Table/PFTable.stories.d.ts +0 -20
  252. package/lib/cjs/Table/PFTable.stories.d.ts.map +0 -1
  253. package/lib/cjs/Table/PFTable.stories.js +0 -81
  254. package/lib/cjs/demo/Demo.css +0 -3
  255. package/lib/cjs/demo/Demo.d.ts +0 -13
  256. package/lib/cjs/demo/Demo.d.ts.map +0 -1
  257. package/lib/cjs/demo/Demo.js +0 -42
  258. package/lib/cjs/demo/Demo.md +0 -0
  259. package/lib/cjs/demo/Demo.scss +0 -3
  260. package/lib/cjs/demo/index.d.ts +0 -3
  261. package/lib/cjs/demo/index.d.ts.map +0 -1
  262. package/lib/cjs/demo/index.js +0 -23
  263. package/lib/esm/AlertMessage/AlertMessage.stories.d.ts +0 -12
  264. package/lib/esm/AlertMessage/AlertMessage.stories.d.ts.map +0 -1
  265. package/lib/esm/AlertMessage/AlertMessage.stories.js +0 -20
  266. package/lib/esm/DropDownList/Dropdownlist.stories.d.ts +0 -17
  267. package/lib/esm/DropDownList/Dropdownlist.stories.d.ts.map +0 -1
  268. package/lib/esm/DropDownList/Dropdownlist.stories.js +0 -156
  269. package/lib/esm/LoadingDots/LoadingDots.stories.d.ts +0 -10
  270. package/lib/esm/LoadingDots/LoadingDots.stories.d.ts.map +0 -1
  271. package/lib/esm/LoadingDots/LoadingDots.stories.js +0 -8
  272. package/lib/esm/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -11
  273. package/lib/esm/LoadingIndicator/LoadingIndicator.stories.d.ts.map +0 -1
  274. package/lib/esm/LoadingIndicator/LoadingIndicator.stories.js +0 -9
  275. package/lib/esm/Table/PFTable.stories.d.ts +0 -20
  276. package/lib/esm/Table/PFTable.stories.d.ts.map +0 -1
  277. package/lib/esm/Table/PFTable.stories.js +0 -73
  278. package/lib/esm/demo/Demo.css +0 -3
  279. package/lib/esm/demo/Demo.d.ts +0 -13
  280. package/lib/esm/demo/Demo.d.ts.map +0 -1
  281. package/lib/esm/demo/Demo.js +0 -26
  282. package/lib/esm/demo/Demo.md +0 -0
  283. package/lib/esm/demo/Demo.scss +0 -3
  284. package/lib/esm/demo/index.d.ts +0 -3
  285. package/lib/esm/demo/index.d.ts.map +0 -1
  286. package/lib/esm/demo/index.js +0 -2
@@ -5,8 +5,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AlertMessage = exports.AlertType = void 0;
7
7
  require("./AlertMessage.css");
8
- var react_core_1 = require("@patternfly/react-core");
9
- var react_1 = __importDefault(require("react"));
8
+ const react_core_1 = require("@patternfly/react-core");
9
+ const react_1 = __importDefault(require("react"));
10
10
  var AlertType;
11
11
  (function (AlertType) {
12
12
  AlertType["DANGER"] = "danger";
@@ -14,7 +14,7 @@ var AlertType;
14
14
  AlertType["INFO"] = "info";
15
15
  AlertType["SUCCESS"] = "success";
16
16
  })(AlertType = exports.AlertType || (exports.AlertType = {}));
17
- var defaultProps = {
17
+ const defaultProps = {
18
18
  className: '',
19
19
  show: false,
20
20
  };
@@ -23,8 +23,8 @@ function AlertMessage(props) {
23
23
  return null;
24
24
  }
25
25
  // If there is no title then the children node becomes the title to have a better styling
26
- var alertMsg = props.title || props.children;
27
- return (react_1.default.createElement(react_core_1.Alert, { label: props.title, className: props.className, variant: props.variant, title: alertMsg, isInline: props.isInline, actionClose: !!props.onClose ? react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: props.onClose }) : null }, props.title ? props.children : react_1.default.createElement(react_1.default.Fragment, null)));
26
+ const alertMsgTitle = props.title || props.children;
27
+ return (react_1.default.createElement(react_core_1.Alert, { label: props.title, className: props.className, variant: props.variant, title: alertMsgTitle, isInline: props.isInline, actionClose: !!props.onClose ? react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: props.onClose }) : null }, props.title ? props.children : react_1.default.createElement(react_1.default.Fragment, null)));
28
28
  }
29
29
  exports.AlertMessage = AlertMessage;
30
30
  AlertMessage.defaultProps = defaultProps;
@@ -1,3 +1,2 @@
1
1
  export * from './AlertMessage';
2
- export * from './AlertMessage.stories';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AlertMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/AlertMessage/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -11,4 +11,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./AlertMessage"), exports);
14
- __exportStar(require("./AlertMessage.stories"), exports);
14
+ //export * from './AlertMessage.stories';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ConfirmationOptions } from './ConfirmationDialog';
3
2
  export declare const useConfirmation: () => (options: ConfirmationOptions) => Promise<void>;
4
3
  export declare const ConfirmationServiceProvider: ({ children }: {
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationContext.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationContext.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI/E,eAAO,MAAM,eAAe,kBAFqC,mBAAmB,KAAK,QAAQ,IAAI,CAE1B,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;iBA2CvC,CAAC"}
1
+ {"version":3,"file":"ConfirmationContext.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI/E,eAAO,MAAM,eAAe,kBAFqC,mBAAmB,KAAK,QAAQ,IAAI,CAE1B,CAAC;AAE5E,eAAO,MAAM,2BAA2B;;iBA2CvC,CAAC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
3
  if (k2 === undefined) k2 = k;
15
4
  Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
@@ -29,46 +18,29 @@ var __importStar = (this && this.__importStar) || function (mod) {
29
18
  __setModuleDefault(result, mod);
30
19
  return result;
31
20
  };
32
- var __read = (this && this.__read) || function (o, n) {
33
- var m = typeof Symbol === "function" && o[Symbol.iterator];
34
- if (!m) return o;
35
- var i = m.call(o), r, ar = [], e;
36
- try {
37
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
38
- }
39
- catch (error) { e = { error: error }; }
40
- finally {
41
- try {
42
- if (r && !r.done && (m = i["return"])) m.call(i);
43
- }
44
- finally { if (e) throw e.error; }
45
- }
46
- return ar;
47
- };
48
21
  Object.defineProperty(exports, "__esModule", { value: true });
49
22
  exports.ConfirmationServiceProvider = exports.useConfirmation = void 0;
50
- var react_1 = __importStar(require("react"));
51
- var ConfirmationDialog_1 = require("./ConfirmationDialog");
52
- var ConfirmationServiceContext = react_1.default.createContext(Promise.reject);
53
- var useConfirmation = function () { return react_1.useContext(ConfirmationServiceContext); };
23
+ const react_1 = __importStar(require("react"));
24
+ const ConfirmationDialog_1 = require("./ConfirmationDialog");
25
+ const ConfirmationServiceContext = react_1.default.createContext(Promise.reject);
26
+ const useConfirmation = () => react_1.useContext(ConfirmationServiceContext);
54
27
  exports.useConfirmation = useConfirmation;
55
- var ConfirmationServiceProvider = function (_a) {
56
- var children = _a.children;
57
- var _b = __read(react_1.useState(null), 2), confirmationState = _b[0], setConfirmationState = _b[1];
58
- var awaitingPromiseRef = react_1.useRef();
59
- var openConfirmation = function (options) {
28
+ const ConfirmationServiceProvider = ({ children }) => {
29
+ const [confirmationState, setConfirmationState] = react_1.useState(null);
30
+ const awaitingPromiseRef = react_1.useRef();
31
+ const openConfirmation = (options) => {
60
32
  setConfirmationState(options);
61
- return new Promise(function (resolve, reject) {
62
- awaitingPromiseRef.current = { resolve: resolve, reject: reject };
33
+ return new Promise((resolve, reject) => {
34
+ awaitingPromiseRef.current = { resolve, reject };
63
35
  });
64
36
  };
65
- var handleClose = function () {
37
+ const handleClose = () => {
66
38
  if (confirmationState.catchOnCancel && awaitingPromiseRef.current) {
67
39
  awaitingPromiseRef.current.reject();
68
40
  }
69
41
  setConfirmationState(null);
70
42
  };
71
- var handleConfirm = function () {
43
+ const handleConfirm = () => {
72
44
  if (awaitingPromiseRef.current) {
73
45
  awaitingPromiseRef.current.resolve();
74
46
  }
@@ -76,6 +48,6 @@ var ConfirmationServiceProvider = function (_a) {
76
48
  };
77
49
  return (react_1.default.createElement(react_1.default.Fragment, null,
78
50
  react_1.default.createElement(ConfirmationServiceContext.Provider, { value: openConfirmation, children: children }),
79
- react_1.default.createElement(ConfirmationDialog_1.ConfirmationDialog, __assign({ open: Boolean(confirmationState), onConfirm: handleConfirm, onClose: handleClose }, confirmationState))));
51
+ react_1.default.createElement(ConfirmationDialog_1.ConfirmationDialog, Object.assign({ open: Boolean(confirmationState), onConfirm: handleConfirm, onClose: handleClose }, confirmationState))));
80
52
  };
81
53
  exports.ConfirmationServiceProvider = ConfirmationServiceProvider;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
- import { ButtonVariant } from '@patternfly/react-core';
1
+ import { ButtonVariant, ModalVariant } from '@patternfly/react-core';
3
2
  export interface ConfirmationOptions {
4
3
  catchOnCancel?: boolean;
5
4
  title?: string;
@@ -8,11 +7,13 @@ export interface ConfirmationOptions {
8
7
  confirmButtonVariant?: ButtonVariant;
9
8
  cancelText?: string;
10
9
  cancelButtonVariant?: ButtonVariant;
10
+ modalVariant?: ModalVariant;
11
11
  }
12
12
  interface IProps extends ConfirmationOptions {
13
13
  open: boolean;
14
14
  onConfirm: () => void;
15
15
  onClose: () => void;
16
+ modalVariant?: ModalVariant;
16
17
  }
17
18
  declare function ConfirmationDialog(props: IProps): JSX.Element;
18
19
  declare namespace ConfirmationDialog {
@@ -21,6 +22,7 @@ declare namespace ConfirmationDialog {
21
22
  cancelText: string;
22
23
  confirmButtonVariant: ButtonVariant;
23
24
  cancelButtonVariant: ButtonVariant;
25
+ modalVariant: ModalVariant;
24
26
  };
25
27
  }
26
28
  export { ConfirmationDialog };
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAU,aAAa,EAAS,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,aAAa,CAAC;CACvC;AAED,UAAU,MAAO,SAAQ,mBAAmB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AASD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAsBxC;kBAtBQ,kBAAkB;;;;;;;;AAwB3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"ConfirmationDialog.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationDialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,aAAa,EAAS,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAIpF,MAAM,WAAW,mBAAmB;IAChC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,aAAa,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED,UAAU,MAAO,SAAQ,mBAAmB;IACxC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC/B;AAUD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,eAsBxC;kBAtBQ,kBAAkB;;;;;;;;;AAwB3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -4,18 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ConfirmationDialog = void 0;
7
- var react_core_1 = require("@patternfly/react-core");
8
- var react_1 = __importDefault(require("react"));
9
- var react_i18next_1 = require("react-i18next");
10
- var defaultProps = {
7
+ const react_core_1 = require("@patternfly/react-core");
8
+ const react_1 = __importDefault(require("react"));
9
+ const react_i18next_1 = require("react-i18next");
10
+ const defaultProps = {
11
11
  confirmText: 'Confirm',
12
12
  cancelText: 'Cancel',
13
13
  confirmButtonVariant: react_core_1.ButtonVariant.primary,
14
14
  cancelButtonVariant: react_core_1.ButtonVariant.link,
15
+ modalVariant: react_core_1.ModalVariant.medium,
15
16
  };
16
17
  function ConfirmationDialog(props) {
17
- var t = react_i18next_1.useTranslation().t;
18
- return (react_1.default.createElement(react_core_1.Modal, { width: '50%', "aria-describedby": "se-confirm-dialog", "aria-label": t('confirmation modal'), title: props.title || null, isOpen: props.open, onClose: props.onClose, actions: [
18
+ const { t } = react_i18next_1.useTranslation();
19
+ return (react_1.default.createElement(react_core_1.Modal, { variant: props.modalVariant, "aria-describedby": "se-confirm-dialog", "aria-label": t('confirmation modal'), title: props.title || '', isOpen: props.open, onClose: props.onClose, actions: [
19
20
  react_1.default.createElement(react_core_1.Button, { key: "confirm", onClick: props.onConfirm, variant: props.confirmButtonVariant },
20
21
  react_1.default.createElement(react_i18next_1.Trans, null, props.confirmText)),
21
22
  react_1.default.createElement(react_core_1.Button, { key: "cancel", onClick: props.onClose, variant: props.cancelButtonVariant },
@@ -1,7 +1 @@
1
- /// <reference types="react" />
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const ConfirmDialog: () => JSX.Element;
7
1
  //# sourceMappingURL=ConfirmationModal.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmationModal.stories.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationModal.stories.tsx"],"names":[],"mappings":";;;;AAIA,wBAEE;AAwBF,eAAO,MAAM,aAAa,mBAIzB,CAAC"}
1
+ {"version":3,"file":"ConfirmationModal.stories.d.ts","sourceRoot":"","sources":["../../../src/ConfirmationModal/ConfirmationModal.stories.tsx"],"names":[],"mappings":""}
@@ -1,76 +1,36 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- var __importDefault = (this && this.__importDefault) || function (mod) {
39
- return (mod && mod.__esModule) ? mod : { "default": mod };
40
- };
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.ConfirmDialog = void 0;
43
- var react_1 = __importDefault(require("react"));
44
- var ConfirmationContext_1 = require("./ConfirmationContext");
45
- exports.default = {
1
+ /*import React from 'react';
2
+
3
+ import { ConfirmationServiceProvider, useConfirmation } from './ConfirmationContext';
4
+
5
+ export default {
46
6
  title: 'Components/ConfirmationModal',
47
7
  };
48
- var options = {
8
+
9
+ const options = {
49
10
  catchOnCancel: true,
50
11
  title: 'Title',
51
12
  description: 'Decroption',
52
13
  };
53
- var ActionPage = function () {
54
- var confirm = ConfirmationContext_1.useConfirmation();
55
- var action = function () { return function () { return __awaiter(void 0, void 0, void 0, function () {
56
- var e_1;
57
- return __generator(this, function (_a) {
58
- switch (_a.label) {
59
- case 0:
60
- _a.trys.push([0, 2, , 3]);
61
- return [4 /*yield*/, confirm(options)];
62
- case 1:
63
- _a.sent();
64
- return [3 /*break*/, 3];
65
- case 2:
66
- e_1 = _a.sent();
67
- return [3 /*break*/, 3];
68
- case 3: return [2 /*return*/];
69
- }
70
- });
71
- }); }; };
72
- return react_1.default.createElement("button", { onClick: action() }, "action link");
14
+
15
+ const ActionPage = () => {
16
+ const confirm = useConfirmation();
17
+
18
+ const action = () => async () => {
19
+ try {
20
+ await confirm(options);
21
+ // confirmed, continue
22
+ // rest of code
23
+ } catch (e) {
24
+ // didn't confirm
25
+ }
26
+ };
27
+
28
+ return <button onClick={action()}>action link</button>;
73
29
  };
74
- var ConfirmDialog = function () { return (react_1.default.createElement(ConfirmationContext_1.ConfirmationServiceProvider, null,
75
- react_1.default.createElement(ActionPage, null))); };
76
- exports.ConfirmDialog = ConfirmDialog;
30
+
31
+ export const ConfirmDialog = () => (
32
+ <ConfirmationServiceProvider>
33
+ <ActionPage />
34
+ </ConfirmationServiceProvider>
35
+ );
36
+ */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './CoverSpinner.css';
3
2
  export declare function CoverSpinner(): JSX.Element;
4
3
  //# sourceMappingURL=CoverSpinner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CoverSpinner.d.ts","sourceRoot":"","sources":["../../../src/CoverSpinner/CoverSpinner.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAI5B,wBAAgB,YAAY,gBAM3B"}
1
+ {"version":3,"file":"CoverSpinner.d.ts","sourceRoot":"","sources":["../../../src/CoverSpinner/CoverSpinner.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAI5B,wBAAgB,YAAY,gBAM3B"}
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CoverSpinner = void 0;
7
7
  require("./CoverSpinner.css");
8
- var react_1 = __importDefault(require("react"));
8
+ const react_1 = __importDefault(require("react"));
9
9
  function CoverSpinner() {
10
10
  return (react_1.default.createElement("div", { className: "cover-spin", role: "alert" },
11
11
  react_1.default.createElement("div", { className: "spinner" })));
@@ -1 +1 @@
1
- {"version":3,"file":"CustomContentLoader.d.ts","sourceRoot":"","sources":["../../../src/CustomContentLoader/CustomContentLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,wBAAgB,qBAAqB,gBAgEpC;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,2BAA2B;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC1C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,2BAA2B,eAMrE"}
1
+ {"version":3,"file":"CustomContentLoader.d.ts","sourceRoot":"","sources":["../../../src/CustomContentLoader/CustomContentLoader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,qBAAqB,gBAgEpC;AAED,MAAM,WAAW,uBAAuB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,UAAU,2BAA2B;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC/B,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC1C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,2BAA2B,eAUrE"}
@@ -4,26 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CustomContentLoader = exports.OverviewContentLoader = void 0;
7
- var react_1 = __importDefault(require("react"));
8
- var react_content_loader_1 = __importDefault(require("react-content-loader"));
7
+ const react_core_1 = require("@patternfly/react-core");
8
+ const react_1 = __importDefault(require("react"));
9
9
  function OverviewContentLoader() {
10
10
  return (react_1.default.createElement("div", { style: { width: '100%', position: 'relative' } },
11
- react_1.default.createElement(react_content_loader_1.default, { height: '900', width: '70%' },
12
- react_1.default.createElement("rect", { x: "2.3%", y: "50", width: "15%", height: "30" }),
13
- react_1.default.createElement("rect", { x: "2.3%", y: "95", width: "12%", height: "25" }),
14
- react_1.default.createElement("rect", { x: "2.3%", y: "140", width: "50%", height: "25" }),
15
- react_1.default.createElement("rect", { x: "2.3%", y: "190", width: "100%", height: "150" }),
16
- react_1.default.createElement("rect", { x: "2.3%", y: "370", width: "100%", height: "120" }),
17
- react_1.default.createElement("rect", { x: "2.3%", y: "520", width: "100%", height: "50" }),
18
- react_1.default.createElement("rect", { x: "3%", y: "590", width: "10%", height: "25" }),
19
- react_1.default.createElement("rect", { x: "3%", y: "635", width: "43%", height: "25" }),
20
- react_1.default.createElement("rect", { x: "55%", y: "590", width: "10%", height: "25" }),
21
- react_1.default.createElement("rect", { x: "55%", y: "635", width: "43%", height: "25" }),
22
- react_1.default.createElement("rect", { x: "3%", y: "695", width: "10%", height: "25" }),
23
- react_1.default.createElement("rect", { x: "3%", y: "740", width: "95%", height: "25" }),
24
- react_1.default.createElement("rect", { x: "2.3%", y: "570", width: "1", height: "220" }),
25
- react_1.default.createElement("rect", { x: "99.9%", y: "570", width: "1", height: "220" }),
26
- react_1.default.createElement("rect", { x: "2.3%", y: "790", width: "100%", height: "1" })),
11
+ react_1.default.createElement("div", { style: { width: '70%', height: '900px', position: 'relative' } },
12
+ react_1.default.createElement(react_core_1.Skeleton, { height: "30px", width: "15%", style: { top: '50px', left: '2.3%' } }),
13
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "12%", style: { top: '95px', left: '2.3%' } }),
14
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "50%", style: { top: '140px', left: '2.3%' } }),
15
+ react_1.default.createElement(react_core_1.Skeleton, { height: "150px", width: "97.7%", style: { top: '190px', left: '2.3%' } }),
16
+ react_1.default.createElement(react_core_1.Skeleton, { height: "120px", width: "97.7%", style: { top: '370px', left: '2.3%' } }),
17
+ react_1.default.createElement(react_core_1.Skeleton, { height: "50px", width: "97.7%", style: { top: '520px', left: '2.3%' } }),
18
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '590px', left: '3%' } }),
19
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "43%", style: { top: '635px', left: '3%' } }),
20
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '590px', left: '55%' } }),
21
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "43%", style: { top: '635px', left: '55%' } }),
22
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "10%", style: { top: '695px', left: '3%' } }),
23
+ react_1.default.createElement(react_core_1.Skeleton, { height: "25px", width: "95%", style: { top: '740px', left: '3%' } }),
24
+ react_1.default.createElement(react_core_1.Skeleton, { height: "220px", width: "1px", style: { top: '570px', left: '2.3%' } }),
25
+ react_1.default.createElement(react_core_1.Skeleton, { height: "220px", width: "1px", style: { top: '570px', left: '99.9%' } }),
26
+ react_1.default.createElement(react_core_1.Skeleton, { height: "1px", width: "97.7%", style: { top: '790px', left: '2.3%' } })),
27
27
  react_1.default.createElement("div", { style: {
28
28
  position: 'absolute',
29
29
  top: '0',
@@ -48,15 +48,15 @@ function OverviewContentLoader() {
48
48
  bottom: '0',
49
49
  backgroundColor: '#ededed',
50
50
  } },
51
- react_1.default.createElement(react_content_loader_1.default, { height: '100%', width: '100%', backgroundColor: '#fff', foregroundColor: '#f5f6f7' },
52
- react_1.default.createElement("rect", { x: "3%", y: "40", height: "500", width: "94%" }),
53
- react_1.default.createElement("rect", { x: "3%", y: "570", height: "500", width: "94%" })))));
51
+ react_1.default.createElement("div", { className: "gray-loader-background", style: { height: '100%', width: '100%' } },
52
+ react_1.default.createElement(react_core_1.Skeleton, { height: "500px", width: "94%", style: { top: '40px', left: '3%' } }),
53
+ react_1.default.createElement(react_core_1.Skeleton, { height: "500px", width: "94%", style: { top: '570px', left: '3%' } })))));
54
54
  }
55
55
  exports.OverviewContentLoader = OverviewContentLoader;
56
56
  function CustomContentLoader(props) {
57
- var children = (props.rectangles &&
58
- props.rectangles.map(function (obj) { return react_1.default.createElement("rect", { x: obj.x, y: obj.y, height: obj.height, width: obj.width }); })) ||
59
- props.children || react_1.default.createElement("rect", { x: 0, y: 0, width: 400, height: 100 });
60
- return react_1.default.createElement(react_content_loader_1.default, null, children);
57
+ const children = (props.rectangles &&
58
+ props.rectangles.map((obj) => (react_1.default.createElement(react_core_1.Skeleton, { height: obj.height, width: obj.width, style: { top: obj.y, left: obj.x } })))) ||
59
+ props.children || (react_1.default.createElement(react_core_1.Skeleton, { height: "100px", width: "400px", style: { position: 'relative', marginBottom: '50px' } }));
60
+ return react_1.default.createElement(react_1.default.Fragment, null, children);
61
61
  }
62
62
  exports.CustomContentLoader = CustomContentLoader;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextInputProps } from '@patternfly/react-core';
3
2
  interface IProps extends TextInputProps {
4
3
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAIrF,UAAU,MAAO,SAAQ,cAAc;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,gBAqD5C,CAAC"}
1
+ {"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/CustomTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,cAAc,EAAoB,MAAM,wBAAwB,CAAC;AAIrF,UAAU,MAAO,SAAQ,cAAc;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,UAAW,MAAM,gBAqD5C,CAAC"}
@@ -1,15 +1,4 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  var __rest = (this && this.__rest) || function (s, e) {
14
3
  var t = {};
15
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -26,21 +15,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
15
  };
27
16
  Object.defineProperty(exports, "__esModule", { value: true });
28
17
  exports.CustomTextInput = void 0;
29
- var react_core_1 = require("@patternfly/react-core");
30
- var lodash_1 = require("lodash");
31
- var react_1 = __importDefault(require("react"));
32
- var CustomTextInput = function (props) {
18
+ const react_core_1 = require("@patternfly/react-core");
19
+ const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
20
+ const react_1 = __importDefault(require("react"));
21
+ const CustomTextInput = (props) => {
33
22
  // To set defaultProps
34
- var onChange = props.onChange, _a = props.isSpaceAllowed, isSpaceAllowed = _a === void 0 ? false : _a, isRequired = props.isRequired, className = props.className, type = props.type, maxLength = props.maxLength, value = props.value, isDisabled = props.isDisabled, placeholder = props.placeholder, validated = props.validated, name = props.name, rest = __rest(props, ["onChange", "isSpaceAllowed", "isRequired", "className", "type", "maxLength", "value", "isDisabled", "placeholder", "validated", "name"]);
23
+ const { onChange, isSpaceAllowed = false, isRequired, className, type, maxLength, value, isDisabled, placeholder, validated, name } = props, rest = __rest(props, ["onChange", "isSpaceAllowed", "isRequired", "className", "type", "maxLength", "value", "isDisabled", "placeholder", "validated", "name"]);
35
24
  // To handle on input change
36
- var onTextInputChange = function (value, event) {
25
+ const onTextInputChange = (value, event) => {
37
26
  onChange(value, event);
38
27
  event.preventDefault();
39
28
  return [];
40
29
  };
41
30
  // Function to check for validity
42
- var validatedCheck = function () {
43
- if (!lodash_1.isEmpty(value)) {
31
+ const validatedCheck = () => {
32
+ if (!isEmpty_1.default(value)) {
44
33
  if (validated === 'error') {
45
34
  return 'error';
46
35
  }
@@ -48,12 +37,12 @@ var CustomTextInput = function (props) {
48
37
  return validated;
49
38
  }
50
39
  else if (!isSpaceAllowed) {
51
- return lodash_1.isEmpty(value === null || value === void 0 ? void 0 : value.trim()) ? 'error' : 'default';
40
+ return isEmpty_1.default(value === null || value === void 0 ? void 0 : value.trim()) ? 'error' : 'default';
52
41
  }
53
42
  else
54
43
  return validated;
55
44
  }
56
45
  };
57
- return (react_1.default.createElement(react_core_1.TextInput, __assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: onTextInputChange, validated: validatedCheck(), name: name })));
46
+ return (react_1.default.createElement(react_core_1.TextInput, Object.assign({}, rest, { isRequired: isRequired, className: className, type: type, maxLength: maxLength, value: value, isDisabled: isDisabled, "aria-label": props['aria-label'], placeholder: placeholder, onChange: onTextInputChange, validated: validatedCheck(), name: name })));
58
47
  };
59
48
  exports.CustomTextInput = CustomTextInput;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AsyncMultiDropDownList = exports.AsyncDropDownList = void 0;
4
- var async_1 = require("./async");
5
- var DropDownList_1 = require("./DropDownList");
6
- var MultiSelectDropdownList_1 = require("./MultiSelectDropdownList");
7
- var AsyncDropDownList = async_1.withAsync(DropDownList_1.Dropdown);
4
+ const async_1 = require("./async");
5
+ const DropDownList_1 = require("./DropDownList");
6
+ const MultiSelectDropdownList_1 = require("./MultiSelectDropdownList");
7
+ const AsyncDropDownList = async_1.withAsync(DropDownList_1.Dropdown);
8
8
  exports.AsyncDropDownList = AsyncDropDownList;
9
- var AsyncMultiDropDownList = async_1.withAsync(MultiSelectDropdownList_1.MultiSelectDropDownList);
9
+ const AsyncMultiDropDownList = async_1.withAsync(MultiSelectDropdownList_1.MultiSelectDropDownList);
10
10
  exports.AsyncMultiDropDownList = AsyncMultiDropDownList;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './dropdownList.css';
3
2
  import { IDropdownListProps } from './types';
4
3
  declare function Dropdown<T>(props: IDropdownListProps<T>): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropDownList.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAa5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAuB7C,iBAAS,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,eAoJhD;kBApJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"DropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropDownList.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAa5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAuB7C,iBAAS,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,eAoJhD;kBApJQ,QAAQ;;;AAsJjB,OAAO,EAAE,QAAQ,EAAE,CAAC"}