@rh-support/components 2.4.10-beta.6 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/lib/esm/AlertMessage/AlertMessage.d.ts +2 -2
- package/lib/esm/AlertMessage/AlertMessage.d.ts.map +1 -1
- package/lib/esm/AlertMessage/AlertMessage.js +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts +2 -1
- package/lib/esm/ConfirmationModal/ConfirmationContext.d.ts.map +1 -1
- package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts +2 -1
- package/lib/esm/ConfirmationModal/ConfirmationDialog.d.ts.map +1 -1
- package/lib/esm/CoverSpinner/CoverSpinner.d.ts +2 -1
- package/lib/esm/CoverSpinner/CoverSpinner.d.ts.map +1 -1
- package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts +2 -2
- package/lib/esm/CustomContentLoader/CustomContentLoader.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts +3 -1
- package/lib/esm/CustomTextInput/CustomTextInput.d.ts.map +1 -1
- package/lib/esm/CustomTextInput/CustomTextInput.js +4 -2
- package/lib/esm/DropDownList/AsyncDropDownList.d.ts +1 -1
- package/lib/esm/DropDownList/AsyncDropDownList.d.ts.map +1 -1
- package/lib/esm/DropDownList/DropDownList.d.ts +2 -1
- package/lib/esm/DropDownList/DropDownList.d.ts.map +1 -1
- package/lib/esm/DropDownList/DropDownList.js +10 -10
- package/lib/esm/DropDownList/DropdownWrapper.d.ts +1 -1
- package/lib/esm/DropDownList/DropdownWrapper.d.ts.map +1 -1
- package/lib/esm/DropDownList/DropdownWrapper.js +2 -2
- package/lib/esm/DropDownList/MultiSelectDropdownList.d.ts.map +1 -1
- package/lib/esm/DropDownList/SearchableList.d.ts +1 -1
- package/lib/esm/DropDownList/SearchableList.d.ts.map +1 -1
- package/lib/esm/DropDownList/SearchableList.js +6 -6
- package/lib/esm/DropDownList/SelectList.d.ts +1 -1
- package/lib/esm/DropDownList/SelectList.d.ts.map +1 -1
- package/lib/esm/DropDownList/SelectList.js +6 -6
- package/lib/esm/DropDownList/async.d.ts +1 -1
- package/lib/esm/DropDownList/async.d.ts.map +1 -1
- package/lib/esm/DropDownList/dropdownList.css +10 -5
- package/lib/esm/DropDownList/types.d.ts +6 -7
- package/lib/esm/DropDownList/types.d.ts.map +1 -1
- package/lib/esm/DropDownList/withMulti.d.ts +1 -1
- package/lib/esm/DropDownList/withMulti.d.ts.map +1 -1
- package/lib/esm/DropDownList/withMulti.js +1 -0
- package/lib/esm/ErrorBoundary/ErrorBoundary.d.ts +2 -1
- package/lib/esm/ErrorBoundary/ErrorBoundary.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +2 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +1 -1
- package/lib/esm/ErrorBoundary/ErrorBoundaryFallbackComponent.js +3 -4
- package/lib/esm/ErrorPages/Generic403.d.ts +2 -1
- package/lib/esm/ErrorPages/Generic403.d.ts.map +1 -1
- package/lib/esm/FeedbackForm/FeedbackForm.d.ts +2 -1
- package/lib/esm/FeedbackForm/FeedbackForm.d.ts.map +1 -1
- package/lib/esm/FeedbackForm/FeedbackForm.js +2 -2
- package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts +5 -4
- package/lib/esm/Functional/CaseContactsSelectorExternal.d.ts.map +1 -1
- package/lib/esm/Functional/CaseContactsSelectorExternal.js +9 -8
- package/lib/esm/InlineEdit/InlineEdit.d.ts +2 -2
- package/lib/esm/InlineEdit/InlineEdit.d.ts.map +1 -1
- package/lib/esm/InlineEdit/InlineEdit.js +1 -1
- package/lib/esm/InlineEdit/NewInlineEdit.d.ts +2 -2
- package/lib/esm/InlineEdit/NewInlineEdit.d.ts.map +1 -1
- package/lib/esm/InlineEdit/NewInlineEdit.js +2 -2
- package/lib/esm/InlineEdit/inlineEdit.css +24 -1
- package/lib/esm/InlineEdit/newInlineEdit.css +5 -4
- package/lib/esm/LanguageSelector/LanguageSelector.d.ts +2 -1
- package/lib/esm/LanguageSelector/LanguageSelector.d.ts.map +1 -1
- package/lib/esm/LanguageSelector/LanguageSelector.js +13 -3
- package/lib/esm/LanguageSelector/languageSelector.css +1 -1
- package/lib/esm/LoadingDots/LoadingDots.d.ts +3 -1
- package/lib/esm/LoadingDots/LoadingDots.d.ts.map +1 -1
- package/lib/esm/LoadingDots/LoadingDots.js +2 -2
- package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts +2 -1
- package/lib/esm/LoadingIndicator/LoadingIndicator.d.ts.map +1 -1
- package/lib/esm/LoginModal/LoginModal.d.ts +2 -1
- package/lib/esm/LoginModal/LoginModal.d.ts.map +1 -1
- package/lib/esm/LoginModal/LoginModal.js +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.js +168 -80
- package/lib/esm/MarkdownEditor/markdownEditor.css +113 -5
- package/lib/esm/MoreOrLess/MoreOrLess.d.ts +1 -1
- package/lib/esm/MoreOrLess/MoreOrLess.d.ts.map +1 -1
- package/lib/esm/PaginatedList/PaginatedList.d.ts +2 -1
- package/lib/esm/PaginatedList/PaginatedList.d.ts.map +1 -1
- package/lib/esm/PaginatedList/PaginatedList.js +9 -0
- package/lib/esm/PaginationCompact/PaginationCompact.d.ts +2 -1
- package/lib/esm/PaginationCompact/PaginationCompact.d.ts.map +1 -1
- package/lib/esm/PaginationCompact/PaginationCompact.js +4 -4
- package/lib/esm/PaginationCompact/paginationCompact.css +1 -1
- package/lib/esm/PhoneInput/CountryData.d.ts.map +1 -1
- package/lib/esm/PhoneInput/CountryData.js +3 -2
- package/lib/esm/PhoneInput/FlagSvgs.d.ts +3 -0
- package/lib/esm/PhoneInput/FlagSvgs.d.ts.map +1 -0
- package/lib/esm/PhoneInput/FlagSvgs.js +2018 -0
- package/lib/esm/PhoneInput/PhoneInput.d.ts +14 -1
- package/lib/esm/PhoneInput/PhoneInput.d.ts.map +1 -1
- package/lib/esm/PhoneInput/PhoneInput.js +121 -120
- package/lib/esm/PhoneInput/PhoneInput.scss +15 -732
- package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +2 -1
- package/lib/esm/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +1 -1
- package/lib/esm/ProgressBar/CircularProgressBar/Path.d.ts +1 -1
- package/lib/esm/ProgressBar/CircularProgressBar/Path.d.ts.map +1 -1
- package/lib/esm/ProgressBar/CircularProgressBar/types.d.ts +3 -4
- package/lib/esm/ProgressBar/CircularProgressBar/types.d.ts.map +1 -1
- package/lib/esm/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/esm/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/lib/esm/PromisifyModal/PromisifyModal.d.ts +6 -9
- package/lib/esm/PromisifyModal/PromisifyModal.d.ts.map +1 -1
- package/lib/esm/PromisifyModal/PromisifyModal.js +21 -18
- package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +2 -1
- package/lib/esm/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +1 -1
- package/lib/esm/SubscriptionAbuse/const.d.ts +2 -1
- package/lib/esm/SubscriptionAbuse/const.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts +2 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts +2 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +1 -1
- package/lib/esm/SupportFeedbackForm/SupportFeedbackModal.js +14 -14
- package/lib/esm/Table/PFTable.d.ts +4 -3
- package/lib/esm/Table/PFTable.d.ts.map +1 -1
- package/lib/esm/Table/PFTable.js +6 -6
- package/lib/{cjs/Table/Table.d.ts → esm/Table/TableComponent.d.ts} +2 -2
- package/lib/esm/Table/TableComponent.d.ts.map +1 -0
- package/lib/esm/Table/{Table.js → TableComponent.js} +1 -1
- package/lib/esm/Table/TablePagination.d.ts +2 -1
- package/lib/esm/Table/TablePagination.d.ts.map +1 -1
- package/lib/esm/Table/TablePagination.js +4 -2
- package/lib/esm/Table/index.d.ts +1 -2
- package/lib/esm/Table/index.d.ts.map +1 -1
- package/lib/esm/Table/index.js +1 -2
- package/lib/esm/TagsSelector/TagsSelector.d.ts +14 -0
- package/lib/esm/TagsSelector/TagsSelector.d.ts.map +1 -0
- package/lib/esm/TagsSelector/TagsSelector.js +73 -0
- package/lib/esm/TagsSelector/index.d.ts +2 -0
- package/lib/esm/TagsSelector/index.d.ts.map +1 -0
- package/lib/esm/TagsSelector/index.js +1 -0
- package/lib/esm/TagsSelector/tagSelector.css +11 -0
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts +2 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.d.ts.map +1 -1
- package/lib/esm/TermsAndConditions/AcceptTermsModal.js +7 -6
- package/lib/esm/TextAreaAutosize/TextAreaAutosize.d.ts +1 -1
- package/lib/esm/TextAreaAutosize/TextAreaAutosize.d.ts.map +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.d.ts.map +1 -1
- package/lib/esm/TextAreaResizable/TextAreaResizable.js +1 -1
- package/lib/esm/ToastNotification/ToastNotification.d.ts +1 -1
- package/lib/esm/ToastNotification/ToastNotification.d.ts.map +1 -1
- package/lib/esm/ToastNotification/ToastNotification.js +13 -5
- package/lib/esm/ToastNotification/toastNotification.css +1 -1
- package/lib/esm/TopContentSearch/TopContentSearch.d.ts +5 -1
- package/lib/esm/TopContentSearch/TopContentSearch.d.ts.map +1 -1
- package/lib/esm/TopContentSearch/TopContentSearch.js +20 -23
- package/lib/esm/ValueChangedIcon/ValueChangedIcon.d.ts +1 -1
- package/lib/esm/ValueChangedIcon/ValueChangedIcon.d.ts.map +1 -1
- package/lib/esm/helperFunctions/errorMessage.js +2 -2
- package/lib/esm/helperFunctions/errorMessage.scss +1 -1
- package/lib/esm/hooks/index.d.ts +4 -0
- package/lib/esm/hooks/index.d.ts.map +1 -1
- package/lib/esm/hooks/index.js +4 -0
- package/lib/esm/hooks/useBreakpoint.d.ts +2 -2
- package/lib/esm/hooks/useBreakpoint.d.ts.map +1 -1
- package/lib/esm/hooks/useBreakpoint.js +2 -0
- package/lib/esm/hooks/useCopyToClipboard.d.ts.map +1 -1
- package/lib/esm/hooks/useCopyToClipboard.js +1 -0
- package/lib/esm/hooks/useFetch.js +1 -2
- package/lib/esm/hooks/useLocalStorage.d.ts +2 -2
- package/lib/esm/hooks/useLocalStorage.d.ts.map +1 -1
- package/lib/esm/hooks/useSearchDocument.d.ts +7 -0
- package/lib/esm/hooks/useSearchDocument.d.ts.map +1 -0
- package/lib/esm/hooks/useSearchDocument.js +42 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts +13 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.d.ts.map +1 -0
- package/lib/esm/hooks/useSelectKeyboardNavigator.js +54 -0
- package/lib/esm/hooks/useSessionStorage.d.ts +5 -0
- package/lib/esm/hooks/useSessionStorage.d.ts.map +1 -0
- package/lib/esm/hooks/useSessionStorage.js +30 -0
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.d.ts.map +1 -1
- package/lib/esm/index.js +1 -0
- package/package.json +40 -46
- package/lib/cjs/AlertMessage/AlertMessage.css +0 -9
- package/lib/cjs/AlertMessage/AlertMessage.d.ts +0 -24
- package/lib/cjs/AlertMessage/AlertMessage.d.ts.map +0 -1
- package/lib/cjs/AlertMessage/AlertMessage.js +0 -30
- package/lib/cjs/AlertMessage/index.d.ts +0 -2
- package/lib/cjs/AlertMessage/index.d.ts.map +0 -1
- package/lib/cjs/AlertMessage/index.js +0 -14
- package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts +0 -6
- package/lib/cjs/ConfirmationModal/ConfirmationContext.d.ts.map +0 -1
- package/lib/cjs/ConfirmationModal/ConfirmationContext.js +0 -53
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts +0 -29
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.d.ts.map +0 -1
- package/lib/cjs/ConfirmationModal/ConfirmationDialog.js +0 -28
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts +0 -1
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.d.ts.map +0 -1
- package/lib/cjs/ConfirmationModal/ConfirmationModal.stories.js +0 -36
- package/lib/cjs/ConfirmationModal/index.d.ts +0 -3
- package/lib/cjs/ConfirmationModal/index.d.ts.map +0 -1
- package/lib/cjs/ConfirmationModal/index.js +0 -14
- package/lib/cjs/CoverSpinner/CoverSpinner.css +0 -16
- package/lib/cjs/CoverSpinner/CoverSpinner.d.ts +0 -3
- package/lib/cjs/CoverSpinner/CoverSpinner.d.ts.map +0 -1
- package/lib/cjs/CoverSpinner/CoverSpinner.js +0 -13
- package/lib/cjs/CoverSpinner/index.d.ts +0 -2
- package/lib/cjs/CoverSpinner/index.d.ts.map +0 -1
- package/lib/cjs/CoverSpinner/index.js +0 -13
- package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts +0 -15
- package/lib/cjs/CustomContentLoader/CustomContentLoader.d.ts.map +0 -1
- package/lib/cjs/CustomContentLoader/CustomContentLoader.js +0 -62
- package/lib/cjs/CustomContentLoader/index.d.ts +0 -2
- package/lib/cjs/CustomContentLoader/index.d.ts.map +0 -1
- package/lib/cjs/CustomContentLoader/index.js +0 -13
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts +0 -12
- package/lib/cjs/CustomTextInput/CustomTextInput.d.ts.map +0 -1
- package/lib/cjs/CustomTextInput/CustomTextInput.js +0 -48
- package/lib/cjs/CustomTextInput/index.d.ts +0 -2
- package/lib/cjs/CustomTextInput/index.d.ts.map +0 -1
- package/lib/cjs/CustomTextInput/index.js +0 -13
- package/lib/cjs/DropDownList/AsyncDropDownList.d.ts +0 -6
- package/lib/cjs/DropDownList/AsyncDropDownList.d.ts.map +0 -1
- package/lib/cjs/DropDownList/AsyncDropDownList.js +0 -10
- package/lib/cjs/DropDownList/DropDownList.d.ts +0 -8
- package/lib/cjs/DropDownList/DropDownList.d.ts.map +0 -1
- package/lib/cjs/DropDownList/DropDownList.js +0 -141
- package/lib/cjs/DropDownList/DropdownWrapper.d.ts +0 -16
- package/lib/cjs/DropDownList/DropdownWrapper.d.ts.map +0 -1
- package/lib/cjs/DropDownList/DropdownWrapper.js +0 -25
- package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts +0 -4
- package/lib/cjs/DropDownList/MultiSelectDropdownList.d.ts.map +0 -1
- package/lib/cjs/DropDownList/MultiSelectDropdownList.js +0 -7
- package/lib/cjs/DropDownList/Readme.md +0 -114
- package/lib/cjs/DropDownList/SearchableList.d.ts +0 -14
- package/lib/cjs/DropDownList/SearchableList.d.ts.map +0 -1
- package/lib/cjs/DropDownList/SearchableList.js +0 -104
- package/lib/cjs/DropDownList/SelectList.d.ts +0 -11
- package/lib/cjs/DropDownList/SelectList.d.ts.map +0 -1
- package/lib/cjs/DropDownList/SelectList.js +0 -41
- package/lib/cjs/DropDownList/async.d.ts +0 -9
- package/lib/cjs/DropDownList/async.d.ts.map +0 -1
- package/lib/cjs/DropDownList/async.js +0 -138
- package/lib/cjs/DropDownList/dropdownList.css +0 -54
- package/lib/cjs/DropDownList/dropdownUtils.d.ts +0 -5
- package/lib/cjs/DropDownList/dropdownUtils.d.ts.map +0 -1
- package/lib/cjs/DropDownList/dropdownUtils.js +0 -29
- package/lib/cjs/DropDownList/index.d.ts +0 -4
- package/lib/cjs/DropDownList/index.d.ts.map +0 -1
- package/lib/cjs/DropDownList/index.js +0 -15
- package/lib/cjs/DropDownList/types.d.ts +0 -54
- package/lib/cjs/DropDownList/types.d.ts.map +0 -1
- package/lib/cjs/DropDownList/types.js +0 -2
- package/lib/cjs/DropDownList/withMulti.d.ts +0 -5
- package/lib/cjs/DropDownList/withMulti.d.ts.map +0 -1
- package/lib/cjs/DropDownList/withMulti.js +0 -69
- package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts +0 -36
- package/lib/cjs/ErrorBoundary/ErrorBoundary.d.ts.map +0 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundary.js +0 -62
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts +0 -14
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.d.ts.map +0 -1
- package/lib/cjs/ErrorBoundary/ErrorBoundaryFallbackComponent.js +0 -40
- package/lib/cjs/ErrorBoundary/index.d.ts +0 -2
- package/lib/cjs/ErrorBoundary/index.d.ts.map +0 -1
- package/lib/cjs/ErrorBoundary/index.js +0 -13
- package/lib/cjs/ErrorPages/Generic403.d.ts +0 -2
- package/lib/cjs/ErrorPages/Generic403.d.ts.map +0 -1
- package/lib/cjs/ErrorPages/Generic403.js +0 -14
- package/lib/cjs/ErrorPages/index.d.ts +0 -2
- package/lib/cjs/ErrorPages/index.d.ts.map +0 -1
- package/lib/cjs/ErrorPages/index.js +0 -13
- package/lib/cjs/FeedbackForm/FeedbackForm.d.ts +0 -11
- package/lib/cjs/FeedbackForm/FeedbackForm.d.ts.map +0 -1
- package/lib/cjs/FeedbackForm/FeedbackForm.js +0 -140
- package/lib/cjs/FeedbackForm/index.d.ts +0 -2
- package/lib/cjs/FeedbackForm/index.d.ts.map +0 -1
- package/lib/cjs/FeedbackForm/index.js +0 -13
- package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts +0 -30
- package/lib/cjs/Functional/CaseContactsSelectorExternal.d.ts.map +0 -1
- package/lib/cjs/Functional/CaseContactsSelectorExternal.js +0 -223
- package/lib/cjs/Functional/index.d.ts +0 -2
- package/lib/cjs/Functional/index.d.ts.map +0 -1
- package/lib/cjs/Functional/index.js +0 -13
- package/lib/cjs/InlineEdit/InlineEdit.d.ts +0 -37
- package/lib/cjs/InlineEdit/InlineEdit.d.ts.map +0 -1
- package/lib/cjs/InlineEdit/InlineEdit.js +0 -169
- package/lib/cjs/InlineEdit/NewInlineEdit.d.ts +0 -41
- package/lib/cjs/InlineEdit/NewInlineEdit.d.ts.map +0 -1
- package/lib/cjs/InlineEdit/NewInlineEdit.js +0 -178
- package/lib/cjs/InlineEdit/index.d.ts +0 -3
- package/lib/cjs/InlineEdit/index.d.ts.map +0 -1
- package/lib/cjs/InlineEdit/index.js +0 -14
- package/lib/cjs/InlineEdit/inlineEdit.css +0 -29
- package/lib/cjs/InlineEdit/newInlineEdit.css +0 -44
- package/lib/cjs/LanguageSelector/LanguageSelector.d.ts +0 -25
- package/lib/cjs/LanguageSelector/LanguageSelector.d.ts.map +0 -1
- package/lib/cjs/LanguageSelector/LanguageSelector.js +0 -61
- package/lib/cjs/LanguageSelector/index.d.ts +0 -2
- package/lib/cjs/LanguageSelector/index.d.ts.map +0 -1
- package/lib/cjs/LanguageSelector/index.js +0 -13
- package/lib/cjs/LanguageSelector/languageSelector.css +0 -5
- package/lib/cjs/LoadingDots/LoadingDots.css +0 -33
- package/lib/cjs/LoadingDots/LoadingDots.d.ts +0 -11
- package/lib/cjs/LoadingDots/LoadingDots.d.ts.map +0 -1
- package/lib/cjs/LoadingDots/LoadingDots.js +0 -25
- package/lib/cjs/LoadingDots/index.d.ts +0 -2
- package/lib/cjs/LoadingDots/index.d.ts.map +0 -1
- package/lib/cjs/LoadingDots/index.js +0 -14
- package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts +0 -14
- package/lib/cjs/LoadingIndicator/LoadingIndicator.d.ts.map +0 -1
- package/lib/cjs/LoadingIndicator/LoadingIndicator.js +0 -25
- package/lib/cjs/LoadingIndicator/index.d.ts +0 -2
- package/lib/cjs/LoadingIndicator/index.d.ts.map +0 -1
- package/lib/cjs/LoadingIndicator/index.js +0 -13
- package/lib/cjs/LoadingIndicator/loadingIndicator.css +0 -79
- package/lib/cjs/LoginModal/LoginModal.d.ts +0 -14
- package/lib/cjs/LoginModal/LoginModal.d.ts.map +0 -1
- package/lib/cjs/LoginModal/LoginModal.js +0 -21
- package/lib/cjs/LoginModal/index.d.ts +0 -2
- package/lib/cjs/LoginModal/index.d.ts.map +0 -1
- package/lib/cjs/LoginModal/index.js +0 -13
- package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts +0 -45
- package/lib/cjs/MarkdownEditor/MarkdownEditor.d.ts.map +0 -1
- package/lib/cjs/MarkdownEditor/MarkdownEditor.js +0 -437
- package/lib/cjs/MarkdownEditor/index.d.ts +0 -2
- package/lib/cjs/MarkdownEditor/index.d.ts.map +0 -1
- package/lib/cjs/MarkdownEditor/index.js +0 -13
- package/lib/cjs/MarkdownEditor/markdownEditor.css +0 -111
- package/lib/cjs/MoreOrLess/MoreOrLess.d.ts +0 -13
- package/lib/cjs/MoreOrLess/MoreOrLess.d.ts.map +0 -1
- package/lib/cjs/MoreOrLess/MoreOrLess.js +0 -71
- package/lib/cjs/MoreOrLess/index.d.ts +0 -2
- package/lib/cjs/MoreOrLess/index.d.ts.map +0 -1
- package/lib/cjs/MoreOrLess/index.js +0 -13
- package/lib/cjs/PaginatedList/PaginatedList.d.ts +0 -18
- package/lib/cjs/PaginatedList/PaginatedList.d.ts.map +0 -1
- package/lib/cjs/PaginatedList/PaginatedList.js +0 -63
- package/lib/cjs/PaginatedList/index.d.ts +0 -2
- package/lib/cjs/PaginatedList/index.d.ts.map +0 -1
- package/lib/cjs/PaginatedList/index.js +0 -13
- package/lib/cjs/PaginationCompact/PaginationCompact.d.ts +0 -9
- package/lib/cjs/PaginationCompact/PaginationCompact.d.ts.map +0 -1
- package/lib/cjs/PaginationCompact/PaginationCompact.js +0 -63
- package/lib/cjs/PaginationCompact/index.d.ts +0 -2
- package/lib/cjs/PaginationCompact/index.d.ts.map +0 -1
- package/lib/cjs/PaginationCompact/index.js +0 -13
- package/lib/cjs/PaginationCompact/paginationCompact.css +0 -5
- package/lib/cjs/PhoneInput/CountryData.d.ts +0 -3
- package/lib/cjs/PhoneInput/CountryData.d.ts.map +0 -1
- package/lib/cjs/PhoneInput/CountryData.js +0 -583
- package/lib/cjs/PhoneInput/PhoneInput.d.ts +0 -19
- package/lib/cjs/PhoneInput/PhoneInput.d.ts.map +0 -1
- package/lib/cjs/PhoneInput/PhoneInput.js +0 -286
- package/lib/cjs/PhoneInput/PhoneInput.scss +0 -753
- package/lib/cjs/PhoneInput/flags.png +0 -0
- package/lib/cjs/PhoneInput/index.d.ts +0 -2
- package/lib/cjs/PhoneInput/index.d.ts.map +0 -1
- package/lib/cjs/PhoneInput/index.js +0 -13
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts +0 -8
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/CircularProgressBar.js +0 -68
- package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts +0 -12
- package/lib/cjs/ProgressBar/CircularProgressBar/Path.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/Path.js +0 -39
- package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts +0 -6
- package/lib/cjs/ProgressBar/CircularProgressBar/constants.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/constants.js +0 -8
- package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts +0 -2
- package/lib/cjs/ProgressBar/CircularProgressBar/index.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/index.js +0 -13
- package/lib/cjs/ProgressBar/CircularProgressBar/styles.css +0 -60
- package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts +0 -32
- package/lib/cjs/ProgressBar/CircularProgressBar/types.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/CircularProgressBar/types.js +0 -2
- package/lib/cjs/ProgressBar/ProgressBar.d.ts +0 -15
- package/lib/cjs/ProgressBar/ProgressBar.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/ProgressBar.js +0 -36
- package/lib/cjs/ProgressBar/index.d.ts +0 -3
- package/lib/cjs/ProgressBar/index.d.ts.map +0 -1
- package/lib/cjs/ProgressBar/index.js +0 -14
- package/lib/cjs/PromisifyModal/PromisifyModal.d.ts +0 -18
- package/lib/cjs/PromisifyModal/PromisifyModal.d.ts.map +0 -1
- package/lib/cjs/PromisifyModal/PromisifyModal.js +0 -40
- package/lib/cjs/PromisifyModal/index.d.ts +0 -2
- package/lib/cjs/PromisifyModal/index.d.ts.map +0 -1
- package/lib/cjs/PromisifyModal/index.js +0 -13
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts +0 -7
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.d.ts.map +0 -1
- package/lib/cjs/SubscriptionAbuse/SubscriptionAbuseModal.js +0 -20
- package/lib/cjs/SubscriptionAbuse/const.d.ts +0 -4
- package/lib/cjs/SubscriptionAbuse/const.d.ts.map +0 -1
- package/lib/cjs/SubscriptionAbuse/const.js +0 -15
- package/lib/cjs/SubscriptionAbuse/index.d.ts +0 -3
- package/lib/cjs/SubscriptionAbuse/index.d.ts.map +0 -1
- package/lib/cjs/SubscriptionAbuse/index.js +0 -14
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts +0 -11
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.d.ts.map +0 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackForm.js +0 -44
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts +0 -10
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.d.ts.map +0 -1
- package/lib/cjs/SupportFeedbackForm/SupportFeedbackModal.js +0 -178
- package/lib/cjs/SupportFeedbackForm/index.d.ts +0 -3
- package/lib/cjs/SupportFeedbackForm/index.d.ts.map +0 -1
- package/lib/cjs/SupportFeedbackForm/index.js +0 -14
- package/lib/cjs/Table/PFTable.d.ts +0 -39
- package/lib/cjs/Table/PFTable.d.ts.map +0 -1
- package/lib/cjs/Table/PFTable.js +0 -204
- package/lib/cjs/Table/README.md +0 -65
- package/lib/cjs/Table/Table.d.ts.map +0 -1
- package/lib/cjs/Table/Table.js +0 -38
- package/lib/cjs/Table/TableColumnSelector.d.ts +0 -7
- package/lib/cjs/Table/TableColumnSelector.d.ts.map +0 -1
- package/lib/cjs/Table/TableColumnSelector.js +0 -34
- package/lib/cjs/Table/TablePagination.d.ts +0 -18
- package/lib/cjs/Table/TablePagination.d.ts.map +0 -1
- package/lib/cjs/Table/TablePagination.js +0 -44
- package/lib/cjs/Table/TableProvider.d.ts +0 -15
- package/lib/cjs/Table/TableProvider.d.ts.map +0 -1
- package/lib/cjs/Table/TableProvider.js +0 -25
- package/lib/cjs/Table/columnSelector.css +0 -37
- package/lib/cjs/Table/index.d.ts +0 -5
- package/lib/cjs/Table/index.d.ts.map +0 -1
- package/lib/cjs/Table/index.js +0 -16
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts +0 -14
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.d.ts.map +0 -1
- package/lib/cjs/TermsAndConditions/AcceptTermsModal.js +0 -116
- package/lib/cjs/TermsAndConditions/index.d.ts +0 -2
- package/lib/cjs/TermsAndConditions/index.d.ts.map +0 -1
- package/lib/cjs/TermsAndConditions/index.js +0 -13
- package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts +0 -8
- package/lib/cjs/TextAreaAutosize/TextAreaAutosize.d.ts.map +0 -1
- package/lib/cjs/TextAreaAutosize/TextAreaAutosize.js +0 -136
- package/lib/cjs/TextAreaAutosize/index.d.ts +0 -2
- package/lib/cjs/TextAreaAutosize/index.d.ts.map +0 -1
- package/lib/cjs/TextAreaAutosize/index.js +0 -13
- package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts +0 -20
- package/lib/cjs/TextAreaResizable/TextAreaResizable.d.ts.map +0 -1
- package/lib/cjs/TextAreaResizable/TextAreaResizable.js +0 -56
- package/lib/cjs/TextAreaResizable/index.d.ts +0 -2
- package/lib/cjs/TextAreaResizable/index.d.ts.map +0 -1
- package/lib/cjs/TextAreaResizable/index.js +0 -13
- package/lib/cjs/ToastNotification/ToastNotification.d.ts +0 -28
- package/lib/cjs/ToastNotification/ToastNotification.d.ts.map +0 -1
- package/lib/cjs/ToastNotification/ToastNotification.js +0 -63
- package/lib/cjs/ToastNotification/index.d.ts +0 -2
- package/lib/cjs/ToastNotification/index.d.ts.map +0 -1
- package/lib/cjs/ToastNotification/index.js +0 -13
- package/lib/cjs/ToastNotification/toastNotification.css +0 -22
- package/lib/cjs/TopContentSearch/TopContentSearch.d.ts +0 -14
- package/lib/cjs/TopContentSearch/TopContentSearch.d.ts.map +0 -1
- package/lib/cjs/TopContentSearch/TopContentSearch.js +0 -138
- package/lib/cjs/TopContentSearch/index.d.ts +0 -2
- package/lib/cjs/TopContentSearch/index.d.ts.map +0 -1
- package/lib/cjs/TopContentSearch/index.js +0 -13
- package/lib/cjs/TopContentSearch/topContentSearch.scss +0 -22
- package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts +0 -14
- package/lib/cjs/ValueChangedIcon/ValueChangedIcon.d.ts.map +0 -1
- package/lib/cjs/ValueChangedIcon/ValueChangedIcon.js +0 -76
- package/lib/cjs/ValueChangedIcon/index.d.ts +0 -2
- package/lib/cjs/ValueChangedIcon/index.d.ts.map +0 -1
- package/lib/cjs/ValueChangedIcon/index.js +0 -13
- package/lib/cjs/helperFunctions/errorMessage.d.ts +0 -12
- package/lib/cjs/helperFunctions/errorMessage.d.ts.map +0 -1
- package/lib/cjs/helperFunctions/errorMessage.js +0 -95
- package/lib/cjs/helperFunctions/errorMessage.scss +0 -3
- package/lib/cjs/helperFunctions/index.d.ts +0 -2
- package/lib/cjs/helperFunctions/index.d.ts.map +0 -1
- package/lib/cjs/helperFunctions/index.js +0 -13
- package/lib/cjs/hooks/index.d.ts +0 -14
- package/lib/cjs/hooks/index.d.ts.map +0 -1
- package/lib/cjs/hooks/index.js +0 -25
- package/lib/cjs/hooks/useBreakpoint.d.ts +0 -12
- package/lib/cjs/hooks/useBreakpoint.d.ts.map +0 -1
- package/lib/cjs/hooks/useBreakpoint.js +0 -86
- package/lib/cjs/hooks/useCopyToClipboard.d.ts +0 -6
- package/lib/cjs/hooks/useCopyToClipboard.d.ts.map +0 -1
- package/lib/cjs/hooks/useCopyToClipboard.js +0 -39
- package/lib/cjs/hooks/useDebounce.d.ts +0 -9
- package/lib/cjs/hooks/useDebounce.d.ts.map +0 -1
- package/lib/cjs/hooks/useDebounce.js +0 -40
- package/lib/cjs/hooks/useFetch.d.ts +0 -20
- package/lib/cjs/hooks/useFetch.d.ts.map +0 -1
- package/lib/cjs/hooks/useFetch.js +0 -71
- package/lib/cjs/hooks/useForceUpdate.d.ts +0 -18
- package/lib/cjs/hooks/useForceUpdate.d.ts.map +0 -1
- package/lib/cjs/hooks/useForceUpdate.js +0 -28
- package/lib/cjs/hooks/useForkRef.d.ts +0 -2
- package/lib/cjs/hooks/useForkRef.d.ts.map +0 -1
- package/lib/cjs/hooks/useForkRef.js +0 -29
- package/lib/cjs/hooks/useIsMounted.d.ts +0 -3
- package/lib/cjs/hooks/useIsMounted.d.ts.map +0 -1
- package/lib/cjs/hooks/useIsMounted.js +0 -18
- package/lib/cjs/hooks/useLRUCache.d.ts +0 -8
- package/lib/cjs/hooks/useLRUCache.d.ts.map +0 -1
- package/lib/cjs/hooks/useLRUCache.js +0 -28
- package/lib/cjs/hooks/useLocalStorage.d.ts +0 -5
- package/lib/cjs/hooks/useLocalStorage.d.ts.map +0 -1
- package/lib/cjs/hooks/useLocalStorage.js +0 -39
- package/lib/cjs/hooks/useOnScreen.d.ts +0 -2
- package/lib/cjs/hooks/useOnScreen.d.ts.map +0 -1
- package/lib/cjs/hooks/useOnScreen.js +0 -18
- package/lib/cjs/hooks/usePolling.d.ts +0 -2
- package/lib/cjs/hooks/usePolling.d.ts.map +0 -1
- package/lib/cjs/hooks/usePolling.js +0 -19
- package/lib/cjs/hooks/usePrevious.d.ts +0 -2
- package/lib/cjs/hooks/usePrevious.d.ts.map +0 -1
- package/lib/cjs/hooks/usePrevious.js +0 -12
- package/lib/cjs/hooks/useTitle.d.ts +0 -2
- package/lib/cjs/hooks/useTitle.d.ts.map +0 -1
- package/lib/cjs/hooks/useTitle.js +0 -14
- package/lib/cjs/hooks/useUndo.d.ts +0 -22
- package/lib/cjs/hooks/useUndo.d.ts.map +0 -1
- package/lib/cjs/hooks/useUndo.js +0 -76
- package/lib/cjs/index.d.ts +0 -34
- package/lib/cjs/index.d.ts.map +0 -1
- package/lib/cjs/index.js +0 -45
- package/lib/esm/PhoneInput/flags.png +0 -0
- package/lib/esm/Table/Table.d.ts +0 -11
- package/lib/esm/Table/Table.d.ts.map +0 -1
- package/lib/esm/Table/TableColumnSelector.d.ts +0 -7
- package/lib/esm/Table/TableColumnSelector.d.ts.map +0 -1
- package/lib/esm/Table/TableColumnSelector.js +0 -27
- package/lib/esm/Table/columnSelector.css +0 -37
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import 'react-toastify/dist/ReactToastify.min.css';
|
|
2
|
-
import './toastNotification.css';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { ToastContainer, ToastOptions } from 'react-toastify';
|
|
5
|
-
import { IAppError } from '../helperFunctions/errorMessage';
|
|
6
|
-
export declare enum ToastType {
|
|
7
|
-
DANGER = "danger",
|
|
8
|
-
INFO = "info",
|
|
9
|
-
SUCCESS = "success",
|
|
10
|
-
WARNING = "warning"
|
|
11
|
-
}
|
|
12
|
-
declare class ToastNotification {
|
|
13
|
-
static addDangerMessage(message: React.ReactNode, alertBody?: React.ReactNode, options?: ToastOptions): import("react-toastify").ToastId;
|
|
14
|
-
static addSuccessMessage(message: React.ReactNode, alertBody?: React.ReactNode, options?: ToastOptions): import("react-toastify").ToastId;
|
|
15
|
-
static addWarningMessage(message: any, options?: ToastOptions): import("react-toastify").ToastId;
|
|
16
|
-
static addInfoMessage(message: any, options?: ToastOptions): import("react-toastify").ToastId;
|
|
17
|
-
static addXHRErrorMessage(error: any, errorMessageObj?: IAppError): void;
|
|
18
|
-
static clearAll(): void;
|
|
19
|
-
static clearAllDebounce(timeToDebounce: number): void;
|
|
20
|
-
static clearToast(toastId: any): void;
|
|
21
|
-
/**
|
|
22
|
-
* DEPRECATED: Call an add message function with { autoClose: timeToDelat } in the ToastOptions object to clear toast
|
|
23
|
-
* after a certain amount of time.
|
|
24
|
-
*/
|
|
25
|
-
static clearToastDebounce(timeToDebounce: number, ...toastIds: React.ReactText[]): void;
|
|
26
|
-
}
|
|
27
|
-
export { ToastContainer, ToastNotification };
|
|
28
|
-
//# sourceMappingURL=ToastNotification.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ToastNotification.d.ts","sourceRoot":"","sources":["../../../src/ToastNotification/ToastNotification.tsx"],"names":[],"mappings":"AAAA,OAAO,2CAA2C,CAAC;AACnD,OAAO,yBAAyB,CAAC;AAIjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAS,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAErE,OAAO,EAA+C,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEzG,oBAAY,SAAS;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,OAAO,YAAY;CACtB;AAsBD,cAAM,iBAAiB;WACL,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAE,YAAiB;WAYlG,iBAAiB,CAC3B,OAAO,EAAE,KAAK,CAAC,SAAS,EACxB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,EAC3B,OAAO,GAAE,YAAkC;WAYjC,iBAAiB,CAAC,OAAO,KAAA,EAAE,OAAO,GAAE,YAAiB;WASrD,cAAc,CAAC,OAAO,KAAA,EAAE,OAAO,GAAE,YAAkC;WAOnE,kBAAkB,CAAC,KAAK,KAAA,EAAE,eAAe,CAAC,EAAE,SAAS;WAOrD,QAAQ;WAIR,gBAAgB,CAAC,cAAc,EAAE,MAAM;WAIvC,UAAU,CAAC,OAAO,KAAA;IAIhC;;;OAGG;WACW,kBAAkB,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE;CAG1F;AAED,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ToastNotification = exports.ToastContainer = exports.ToastType = void 0;
|
|
7
|
-
require("react-toastify/dist/ReactToastify.min.css");
|
|
8
|
-
require("./toastNotification.css");
|
|
9
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
10
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const react_toastify_1 = require("react-toastify");
|
|
13
|
-
Object.defineProperty(exports, "ToastContainer", { enumerable: true, get: function () { return react_toastify_1.ToastContainer; } });
|
|
14
|
-
const errorMessage_1 = require("../helperFunctions/errorMessage");
|
|
15
|
-
var ToastType;
|
|
16
|
-
(function (ToastType) {
|
|
17
|
-
ToastType["DANGER"] = "danger";
|
|
18
|
-
ToastType["INFO"] = "info";
|
|
19
|
-
ToastType["SUCCESS"] = "success";
|
|
20
|
-
ToastType["WARNING"] = "warning";
|
|
21
|
-
})(ToastType = exports.ToastType || (exports.ToastType = {}));
|
|
22
|
-
const AlertComponent = ({ variant, message, alertActions = {}, closeToast, children }) => {
|
|
23
|
-
return (react_1.default.createElement(react_core_1.Alert, { variant: variant, title: message, actionClose: react_1.default.createElement(react_core_1.AlertActionCloseButton, { onClose: closeToast }) }, children));
|
|
24
|
-
};
|
|
25
|
-
const defaultCloseMs = 8000;
|
|
26
|
-
const defaultToastOptions = { autoClose: defaultCloseMs };
|
|
27
|
-
class ToastNotification {
|
|
28
|
-
static addDangerMessage(message, alertBody, options = {}) {
|
|
29
|
-
return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.DANGER, message: message, closeToast: closeToast }, alertBody)), Object.assign({}, options));
|
|
30
|
-
}
|
|
31
|
-
// removed options: ToastOptions = defaultToastOptions to fix auto-dismissing of success alerts.
|
|
32
|
-
static addSuccessMessage(message, alertBody, options = defaultToastOptions) {
|
|
33
|
-
return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.SUCCESS, message: message, closeToast: closeToast }, alertBody)), Object.assign({}, options));
|
|
34
|
-
}
|
|
35
|
-
static addWarningMessage(message, options = {}) {
|
|
36
|
-
return react_toastify_1.toast(({ closeToast }) => (react_1.default.createElement(AlertComponent, { variant: ToastType.WARNING, message: message, closeToast: closeToast })), Object.assign({}, options));
|
|
37
|
-
}
|
|
38
|
-
static addInfoMessage(message, options = defaultToastOptions) {
|
|
39
|
-
return react_toastify_1.toast(({ closeToast }) => react_1.default.createElement(AlertComponent, { variant: ToastType.INFO, message: message, closeToast: closeToast }), Object.assign({}, options));
|
|
40
|
-
}
|
|
41
|
-
static addXHRErrorMessage(error, errorMessageObj) {
|
|
42
|
-
const messageBody = errorMessage_1.formattedApiErrorMessage(error, errorMessageObj);
|
|
43
|
-
const messageHeader = errorMessage_1.errorMessageTitle(error, errorMessageObj);
|
|
44
|
-
ToastNotification.addDangerMessage(messageHeader, messageBody, { closeOnClick: false });
|
|
45
|
-
}
|
|
46
|
-
static clearAll() {
|
|
47
|
-
react_toastify_1.toast.dismiss();
|
|
48
|
-
}
|
|
49
|
-
static clearAllDebounce(timeToDebounce) {
|
|
50
|
-
debounce_1.default(() => react_toastify_1.toast.dismiss, timeToDebounce)();
|
|
51
|
-
}
|
|
52
|
-
static clearToast(toastId) {
|
|
53
|
-
react_toastify_1.toast.dismiss(toastId);
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* DEPRECATED: Call an add message function with { autoClose: timeToDelat } in the ToastOptions object to clear toast
|
|
57
|
-
* after a certain amount of time.
|
|
58
|
-
*/
|
|
59
|
-
static clearToastDebounce(timeToDebounce, ...toastIds) {
|
|
60
|
-
debounce_1.default(() => toastIds.forEach((id) => ToastNotification.clearToast(id)), timeToDebounce)();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.ToastNotification = ToastNotification;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ToastNotification/index.tsx"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./ToastNotification"), exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.Toastify__toast-container {
|
|
2
|
-
width: 95%;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
@media (min-width: 992px) {
|
|
6
|
-
.Toastify__toast-container {
|
|
7
|
-
width: 600px;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.Toastify__toast-container > .Toastify__toast {
|
|
12
|
-
padding: 0px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.Toastify__toast-body {
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.Toastify__toast-body > .pf-c-alert {
|
|
20
|
-
height: 100%;
|
|
21
|
-
min-width: 500px;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import './topContentSearch.scss';
|
|
2
|
-
import { ITopContentList } from '@cee-eng/hydrajs/@types/models/topContent/topContentModel';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
interface IProps {
|
|
5
|
-
dataTrackingId: string;
|
|
6
|
-
topContentResultsWrapperRef: React.MutableRefObject<any>;
|
|
7
|
-
topContentData: ITopContentList[];
|
|
8
|
-
enableEventTracking?: boolean;
|
|
9
|
-
onSearch: (searchVal: string, searchResults: ITopContentList[]) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const getTopContentUrl: (contentUrl: string) => string;
|
|
12
|
-
export declare function TopContentSearch({ topContentData, topContentResultsWrapperRef, onSearch, dataTrackingId, enableEventTracking, }: IProps): JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=TopContentSearch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TopContentSearch.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/TopContentSearch.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAQ5F,OAAO,KAA4D,MAAM,OAAO,CAAC;AAGjF,UAAU,MAAM;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,2BAA2B,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzD,cAAc,EAAE,eAAe,EAAE,CAAC;IAClC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;CAC3E;AAED,eAAO,MAAM,gBAAgB,eAAgB,MAAM,WASlD,CAAC;AAOF,wBAAgB,gBAAgB,CAAC,EAC7B,cAAmB,EACnB,2BAA6C,EAC7C,QAAQ,EACR,cAAc,EACd,mBAA2B,GAC9B,EAAE,MAAM,eA2GR"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
31
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
32
|
-
};
|
|
33
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.TopContentSearch = exports.getTopContentUrl = void 0;
|
|
35
|
-
require("./topContentSearch.scss");
|
|
36
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
37
|
-
const utils_1 = require("@rh-support/utils");
|
|
38
|
-
const js_worker_search_1 = __importStar(require("js-worker-search"));
|
|
39
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
40
|
-
const flatMap_1 = __importDefault(require("lodash/flatMap"));
|
|
41
|
-
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
42
|
-
const mark_js_1 = __importDefault(require("mark.js"));
|
|
43
|
-
const react_1 = __importStar(require("react"));
|
|
44
|
-
const react_i18next_1 = require("react-i18next");
|
|
45
|
-
const getTopContentUrl = (contentUrl) => {
|
|
46
|
-
// There is some data urls (e.g. /solutions/articles/etc.) that aren't valid urls
|
|
47
|
-
// this adds the access.redhat.com to make them valid urls, otherwise the top content edit functionality won't work
|
|
48
|
-
// for product/versions that already have data not created by users.
|
|
49
|
-
if (contentUrl.startsWith('/')) {
|
|
50
|
-
return `https://${utils_1.getAccessHostname()}${contentUrl}`;
|
|
51
|
-
}
|
|
52
|
-
return contentUrl;
|
|
53
|
-
};
|
|
54
|
-
exports.getTopContentUrl = getTopContentUrl;
|
|
55
|
-
var CustomEvents;
|
|
56
|
-
(function (CustomEvents) {
|
|
57
|
-
CustomEvents["inputChange"] = "top-content-filter-input-change";
|
|
58
|
-
CustomEvents["inputClear"] = "top-content-filter-input-clear";
|
|
59
|
-
})(CustomEvents || (CustomEvents = {}));
|
|
60
|
-
function TopContentSearch({ topContentData = [], topContentResultsWrapperRef = { current: {} }, onSearch, dataTrackingId, enableEventTracking = false, }) {
|
|
61
|
-
const [searchText, setSearchText] = react_1.useState('');
|
|
62
|
-
const { t } = react_i18next_1.useTranslation();
|
|
63
|
-
const searchWorkerRef = react_1.useRef(new js_worker_search_1.default({
|
|
64
|
-
indexMode: js_worker_search_1.INDEX_MODES.ALL_SUBSTRINGS,
|
|
65
|
-
caseSensitive: false,
|
|
66
|
-
matchAnyToken: true,
|
|
67
|
-
}));
|
|
68
|
-
const searchWrapperRef = react_1.useRef(null);
|
|
69
|
-
react_1.useEffect(() => {
|
|
70
|
-
topContentData.forEach((item) => {
|
|
71
|
-
item.content.forEach((content) => {
|
|
72
|
-
searchWorkerRef.current.indexDocument(content.topContentId, `${content.contentTitle} ${exports.getTopContentUrl(content.contentUrl)}`);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
searchText && handleSearch(searchText);
|
|
76
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
-
}, [topContentData]);
|
|
78
|
-
// to log custom events for dtm tracking.
|
|
79
|
-
const logCustomEvent = (eventName, event) => {
|
|
80
|
-
if (!enableEventTracking || !searchWrapperRef.current || !event || !eventName)
|
|
81
|
-
return;
|
|
82
|
-
utils_1.dtmTrackEvent(searchWrapperRef, eventName, event);
|
|
83
|
-
};
|
|
84
|
-
const highlightSearchResults = react_1.useCallback((searchTerm) => {
|
|
85
|
-
const d = topContentResultsWrapperRef.current;
|
|
86
|
-
const markInstance = new mark_js_1.default(d);
|
|
87
|
-
markInstance.unmark({
|
|
88
|
-
done: () => {
|
|
89
|
-
if (isEmpty_1.default(searchTerm))
|
|
90
|
-
return;
|
|
91
|
-
markInstance.mark(searchTerm, { separateWordSearch: true });
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
}, [topContentResultsWrapperRef]);
|
|
95
|
-
const onSearchInputClear = react_1.useCallback((event) => {
|
|
96
|
-
logCustomEvent(CustomEvents.inputClear, event);
|
|
97
|
-
setSearchText('');
|
|
98
|
-
highlightSearchResults('');
|
|
99
|
-
onSearch('', topContentData);
|
|
100
|
-
},
|
|
101
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
102
|
-
[highlightSearchResults, topContentData]);
|
|
103
|
-
// To handle search
|
|
104
|
-
const handleSearch = react_1.useCallback((query) => __awaiter(this, void 0, void 0, function* () {
|
|
105
|
-
if (!query) {
|
|
106
|
-
onSearchInputClear();
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
const contentIds = yield searchWorkerRef.current.search(query);
|
|
110
|
-
let contentFound = 0;
|
|
111
|
-
const filteredData = flatMap_1.default(topContentData, (item) => {
|
|
112
|
-
const filteredContent = item.content.filter((item) => contentIds.includes(item.topContentId));
|
|
113
|
-
const filteredContentLength = filteredContent.length;
|
|
114
|
-
if (filteredContentLength > 0 && contentFound < contentIds.length) {
|
|
115
|
-
contentFound = contentFound + filteredContentLength;
|
|
116
|
-
return [Object.assign(Object.assign({}, item), { content: filteredContent })];
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
return [];
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
onSearch(query, filteredData);
|
|
123
|
-
highlightSearchResults(query);
|
|
124
|
-
logCustomEvent(CustomEvents.inputChange, { bubbles: true, detail: { query } });
|
|
125
|
-
}),
|
|
126
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
-
[highlightSearchResults, topContentData, onSearchInputClear]);
|
|
128
|
-
const debounceSearch = react_1.useMemo(() => debounce_1.default(handleSearch, 500), [handleSearch]);
|
|
129
|
-
const onSearchInputChange = (value) => {
|
|
130
|
-
setSearchText(value);
|
|
131
|
-
debounceSearch(value);
|
|
132
|
-
};
|
|
133
|
-
return (react_1.default.createElement("div", { className: "top-content-search-wrapper pf-u-p-md", ref: searchWrapperRef },
|
|
134
|
-
react_1.default.createElement("label", { htmlFor: "top-content-search-input", className: "pf-u-mr-md top-content-search-label" },
|
|
135
|
-
react_1.default.createElement(react_i18next_1.Trans, null, "Filter results:")),
|
|
136
|
-
react_1.default.createElement(react_core_1.SearchInput, { id: "top-content-search-input", className: "top-content-search-input pf-u-flex-grow-1", "aria-label": t('search top content'), placeholder: t('Enter relevant keywords'), value: searchText, "data-tracking-id": dataTrackingId, onChange: onSearchInputChange, onClear: onSearchInputClear })));
|
|
137
|
-
}
|
|
138
|
-
exports.TopContentSearch = TopContentSearch;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/TopContentSearch/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./TopContentSearch"), exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
.top-content-search-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: baseline;
|
|
4
|
-
background-color: #f0f0f0;
|
|
5
|
-
border: 1px solid #d2d2d2;
|
|
6
|
-
margin-bottom: 0.5rem;
|
|
7
|
-
padding: 1rem;
|
|
8
|
-
|
|
9
|
-
.top-content-search-input {
|
|
10
|
-
background-color: #fff;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
pfe-accordion {
|
|
15
|
-
width: calc(100%);
|
|
16
|
-
box-shadow: inset 1px 1px 0px #d2d2d2, inset -1px -1px 0px #d2d2d2;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
#se-solution-engine .top-content-search-wrapper {
|
|
20
|
-
margin-bottom: 0;
|
|
21
|
-
border-bottom: 0;
|
|
22
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TooltipPosition } from '@patternfly/react-core';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface IProps<T> {
|
|
4
|
-
value: T;
|
|
5
|
-
isFetching?: boolean;
|
|
6
|
-
tooltipPosition?: TooltipPosition;
|
|
7
|
-
isLocalChange?: boolean;
|
|
8
|
-
afterLocalChange?: () => void;
|
|
9
|
-
comparator?: (current: T, previous: T) => boolean;
|
|
10
|
-
getTooltipContent: (currentValue: T, previousValue: T) => React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export declare function ValueChangedIcon<T>(props: IProps<T>): JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=ValueChangedIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ValueChangedIcon.d.ts","sourceRoot":"","sources":["../../../src/ValueChangedIcon/ValueChangedIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,UAAU,MAAM,CAAC,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,OAAO,CAAC;IAClD,iBAAiB,EAAE,CAAC,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CAC7E;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAyDnD"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.ValueChangedIcon = void 0;
|
|
26
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
27
|
-
const lightbulb_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/lightbulb-icon"));
|
|
28
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
29
|
-
const react_1 = __importStar(require("react"));
|
|
30
|
-
function ValueChangedIcon(props) {
|
|
31
|
-
// removed 2 min refresh functionality so this icon never needs to be shown
|
|
32
|
-
// TODO: Reimplement "setShow"
|
|
33
|
-
const [show] = react_1.useState(false);
|
|
34
|
-
const [tooltipContent, setTooltipContent] = react_1.useState();
|
|
35
|
-
const [currentValue, setCurrentValue] = react_1.useState(props.value);
|
|
36
|
-
const [previousValue, setPreviousValue] = react_1.useState();
|
|
37
|
-
const [clearTTDebounce, setClearTTDebounce] = react_1.useState();
|
|
38
|
-
if (clearTTDebounce) {
|
|
39
|
-
clearTTDebounce();
|
|
40
|
-
setClearTTDebounce(undefined);
|
|
41
|
-
}
|
|
42
|
-
react_1.useEffect(() => {
|
|
43
|
-
if (props.isLocalChange) {
|
|
44
|
-
props.afterLocalChange();
|
|
45
|
-
setPreviousValue(currentValue);
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
const showTT = props.comparator
|
|
49
|
-
? props.comparator(currentValue, previousValue)
|
|
50
|
-
: previousValue !== currentValue;
|
|
51
|
-
if (!!previousValue && !props.isLocalChange && showTT) {
|
|
52
|
-
// setShow(true);
|
|
53
|
-
setTooltipContent(props.getTooltipContent(currentValue, previousValue));
|
|
54
|
-
setPreviousValue(currentValue);
|
|
55
|
-
setClearTTDebounce(debounce_1.default(() => {
|
|
56
|
-
setTooltipContent(null);
|
|
57
|
-
// setShow(false);
|
|
58
|
-
}, 6000));
|
|
59
|
-
}
|
|
60
|
-
}, [props, previousValue, currentValue]);
|
|
61
|
-
react_1.useEffect(() => {
|
|
62
|
-
if (currentValue !== props.value) {
|
|
63
|
-
setPreviousValue(!!currentValue ? currentValue : props.value);
|
|
64
|
-
setCurrentValue(props.value);
|
|
65
|
-
}
|
|
66
|
-
}, [props.value, currentValue]);
|
|
67
|
-
// useEffect(() => {
|
|
68
|
-
// if (props.isLocalChange) setShow(!props.isLocalChange)
|
|
69
|
-
// }, [props.isLocalChange]);
|
|
70
|
-
if (!tooltipContent || !show) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
return (react_1.default.createElement(react_core_1.Tooltip, { content: tooltipContent, position: props.tooltipPosition || react_core_1.TooltipPosition.top },
|
|
74
|
-
react_1.default.createElement(lightbulb_icon_1.default, null)));
|
|
75
|
-
}
|
|
76
|
-
exports.ValueChangedIcon = ValueChangedIcon;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ValueChangedIcon/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./ValueChangedIcon"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import './errorMessage.scss';
|
|
2
|
-
export interface IAppErrorObj {
|
|
3
|
-
title: string;
|
|
4
|
-
message: string | JSX.Element;
|
|
5
|
-
}
|
|
6
|
-
export interface IAppError {
|
|
7
|
-
[key: string]: Partial<IAppErrorObj>;
|
|
8
|
-
}
|
|
9
|
-
declare function formattedApiErrorMessage(error: any, customMessage?: IAppError): string | JSX.Element;
|
|
10
|
-
declare function errorMessageTitle(error: any, customError?: IAppError): string;
|
|
11
|
-
export { formattedApiErrorMessage, errorMessageTitle };
|
|
12
|
-
//# sourceMappingURL=errorMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorMessage.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/errorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAS7B,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,SAAS;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACxC;AAoDD,iBAAS,wBAAwB,CAAC,KAAK,KAAA,EAAE,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,GAAG,CAAC,OAAO,CAwCxF;AAED,iBAAS,iBAAiB,CAAC,KAAK,KAAA,EAAE,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAIjE;AAED,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.errorMessageTitle = exports.formattedApiErrorMessage = void 0;
|
|
7
|
-
require("./errorMessage.scss");
|
|
8
|
-
const react_core_1 = require("@patternfly/react-core");
|
|
9
|
-
const external_link_alt_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/external-link-alt-icon"));
|
|
10
|
-
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const SupportFeedbackForm_1 = require("../SupportFeedbackForm");
|
|
13
|
-
const defaultTitle = "Sorry, we're experiencing an error";
|
|
14
|
-
const errorMessageButtonLabel = 'contact us';
|
|
15
|
-
const defaultErrorMessage = (react_1.default.createElement("p", { className: "pf-u-mb-0" },
|
|
16
|
-
"Try refreshing the page. Please ",
|
|
17
|
-
react_1.default.createElement(SupportFeedbackForm_1.SupportFeedbackForm, { isInline: true, buttonLabel: errorMessageButtonLabel }),
|
|
18
|
-
" if the problem persists.",
|
|
19
|
-
react_1.default.createElement("br", null),
|
|
20
|
-
react_1.default.createElement(react_core_1.Button, { variant: "link", component: "a", href: "https://status.redhat.com/", "data-tracking-id": "redirect-status-portal-button", target: "_blank", icon: react_1.default.createElement(external_link_alt_icon_1.default, { className: "status-portal-button-icon" }), iconPosition: "right", className: "pf-u-pl-0", isInline: true, "aria-label": "View status page" }, "View status page"),
|
|
21
|
-
' '));
|
|
22
|
-
const defaultErrorObj = {
|
|
23
|
-
500: {
|
|
24
|
-
title: defaultTitle,
|
|
25
|
-
message: defaultErrorMessage,
|
|
26
|
-
},
|
|
27
|
-
403: {
|
|
28
|
-
title: 'There was a problem with your request',
|
|
29
|
-
message: (react_1.default.createElement("p", null,
|
|
30
|
-
"You are not authorized to do this action. Please",
|
|
31
|
-
' ',
|
|
32
|
-
react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
|
|
33
|
-
" if you think this is an error.")),
|
|
34
|
-
},
|
|
35
|
-
404: {
|
|
36
|
-
title: 'There was a problem with your request',
|
|
37
|
-
message: (react_1.default.createElement("p", null,
|
|
38
|
-
"The resource that you are looking for doesn't exist. Please",
|
|
39
|
-
' ',
|
|
40
|
-
react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
|
|
41
|
-
" if you think this is an error.")),
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
// the error argument need a better typing here. We want to make sure that user is passing an error object and not an error string
|
|
45
|
-
function formattedApiErrorMessage(error, customMessage) {
|
|
46
|
-
var _a, _b, _c;
|
|
47
|
-
const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
|
|
48
|
-
if (!customMessage)
|
|
49
|
-
customMessage = {};
|
|
50
|
-
// Note: We show default error message on 503 error codes
|
|
51
|
-
// eslint-disable-next-line
|
|
52
|
-
if (errorCode === 500) {
|
|
53
|
-
return ((_a = customMessage[errorCode]) === null || _a === void 0 ? void 0 : _a.message) || defaultErrorMessage;
|
|
54
|
-
}
|
|
55
|
-
else if (errorCode === 403) {
|
|
56
|
-
if ((_b = customMessage[errorCode]) === null || _b === void 0 ? void 0 : _b.message) {
|
|
57
|
-
return customMessage[errorCode].message;
|
|
58
|
-
}
|
|
59
|
-
else if ((error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.detailMessage)) {
|
|
60
|
-
return (react_1.default.createElement("p", null,
|
|
61
|
-
error.message || '',
|
|
62
|
-
" ",
|
|
63
|
-
error.detailMessage || '',
|
|
64
|
-
react_1.default.createElement("br", null),
|
|
65
|
-
"Please ",
|
|
66
|
-
react_1.default.createElement("a", { href: "/support/contact/customerService" }, "contact Customer Service"),
|
|
67
|
-
" if you think this is an error."));
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
return defaultErrorMessage;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
else if (errorCode === 404) {
|
|
74
|
-
return (((_c = customMessage[errorCode]) === null || _c === void 0 ? void 0 : _c.message) ||
|
|
75
|
-
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
76
|
-
(error === null || error === void 0 ? void 0 : error.detailMessage) ||
|
|
77
|
-
defaultErrorObj[errorCode].message);
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
// api call error
|
|
81
|
-
const message = (error === null || error === void 0 ? void 0 : error.statusText) || (error === null || error === void 0 ? void 0 : error.responseText) || '';
|
|
82
|
-
// error.message -> javascript error
|
|
83
|
-
const isNotProperUXError = isEmpty_1.default(message) || (message === null || message === void 0 ? void 0 : message.length) > 200 || (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : error.detailMessage);
|
|
84
|
-
return isNotProperUXError ? defaultErrorMessage : message;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.formattedApiErrorMessage = formattedApiErrorMessage;
|
|
88
|
-
function errorMessageTitle(error, customError) {
|
|
89
|
-
var _a, _b;
|
|
90
|
-
if (!customError)
|
|
91
|
-
customError = {};
|
|
92
|
-
const errorCode = parseInt((error === null || error === void 0 ? void 0 : error.code) || (error === null || error === void 0 ? void 0 : error.status)) || '';
|
|
93
|
-
return ((_a = customError[errorCode]) === null || _a === void 0 ? void 0 : _a.title) || ((_b = defaultErrorObj[errorCode]) === null || _b === void 0 ? void 0 : _b.title) || defaultTitle;
|
|
94
|
-
}
|
|
95
|
-
exports.errorMessageTitle = errorMessageTitle;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/helperFunctions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./errorMessage"), exports);
|
package/lib/cjs/hooks/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export * from './useFetch';
|
|
2
|
-
export * from './useIsMounted';
|
|
3
|
-
export * from './useDebounce';
|
|
4
|
-
export * from './usePrevious';
|
|
5
|
-
export * from './useTitle';
|
|
6
|
-
export * from './useUndo';
|
|
7
|
-
export * from './usePolling';
|
|
8
|
-
export * from './useCopyToClipboard';
|
|
9
|
-
export * from './useForkRef';
|
|
10
|
-
export * from './useForceUpdate';
|
|
11
|
-
export * from './useLRUCache';
|
|
12
|
-
export * from './useBreakpoint';
|
|
13
|
-
export * from './useOnScreen';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|