@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,12 +0,0 @@
|
|
|
1
|
-
import { TextInputProps } from '@patternfly/react-core';
|
|
2
|
-
interface IProps extends TextInputProps {
|
|
3
|
-
className?: string;
|
|
4
|
-
maxLength?: number;
|
|
5
|
-
value?: string;
|
|
6
|
-
isSpaceAllowed?: boolean;
|
|
7
|
-
name?: string;
|
|
8
|
-
isDisabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const CustomTextInput: (props: IProps) => JSX.Element;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=CustomTextInput.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.CustomTextInput = void 0;
|
|
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) => {
|
|
22
|
-
// To set defaultProps
|
|
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"]);
|
|
24
|
-
// To handle on input change
|
|
25
|
-
const onTextInputChange = (value, event) => {
|
|
26
|
-
onChange(value, event);
|
|
27
|
-
event.preventDefault();
|
|
28
|
-
return [];
|
|
29
|
-
};
|
|
30
|
-
// Function to check for validity
|
|
31
|
-
const validatedCheck = () => {
|
|
32
|
-
if (!isEmpty_1.default(value)) {
|
|
33
|
-
if (validated === 'error') {
|
|
34
|
-
return 'error';
|
|
35
|
-
}
|
|
36
|
-
else if (isSpaceAllowed) {
|
|
37
|
-
return validated;
|
|
38
|
-
}
|
|
39
|
-
else if (!isSpaceAllowed) {
|
|
40
|
-
return isEmpty_1.default(value === null || value === void 0 ? void 0 : value.trim()) ? 'error' : 'default';
|
|
41
|
-
}
|
|
42
|
-
else
|
|
43
|
-
return validated;
|
|
44
|
-
}
|
|
45
|
-
};
|
|
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 })));
|
|
47
|
-
};
|
|
48
|
-
exports.CustomTextInput = CustomTextInput;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CustomTextInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,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("./CustomTextInput"), exports);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MultiSelectDropdownProps } from './MultiSelectDropdownList';
|
|
2
|
-
import { AsyncDropdownProps, IAsyncOnlyProps, IDropdownListProps } from './types';
|
|
3
|
-
declare const AsyncDropDownList: <T extends {}>(props: IAsyncOnlyProps<T> & IDropdownListProps<T>) => JSX.Element;
|
|
4
|
-
declare const AsyncMultiDropDownList: <T extends {}>(props: IAsyncOnlyProps<T> & import("./types").IDropdownListBasePropsForMultiSelect<T> & import("./types").IMultiSelectOnlyProps<T>) => JSX.Element;
|
|
5
|
-
export { AsyncDropDownList, AsyncMultiDropDownList, AsyncDropdownProps };
|
|
6
|
-
//# sourceMappingURL=AsyncDropDownList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AsyncDropDownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/AsyncDropDownList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA2B,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElF,QAAA,MAAM,iBAAiB,uEAElB,WAAW,CAAC;AAEjB,QAAA,MAAM,sBAAsB,wJAEvB,WAAW,CAAC;AAEjB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncMultiDropDownList = exports.AsyncDropDownList = void 0;
|
|
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
|
-
exports.AsyncDropDownList = AsyncDropDownList;
|
|
9
|
-
const AsyncMultiDropDownList = async_1.withAsync(MultiSelectDropdownList_1.MultiSelectDropDownList);
|
|
10
|
-
exports.AsyncMultiDropDownList = AsyncMultiDropDownList;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import './dropdownList.css';
|
|
2
|
-
import { IDropdownListProps } from './types';
|
|
3
|
-
declare function Dropdown<T>(props: IDropdownListProps<T>): JSX.Element;
|
|
4
|
-
declare namespace Dropdown {
|
|
5
|
-
var defaultProps: Partial<IDropdownListProps<any>>;
|
|
6
|
-
}
|
|
7
|
-
export { Dropdown };
|
|
8
|
-
//# sourceMappingURL=DropDownList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,141 +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.Dropdown = void 0;
|
|
26
|
-
require("./dropdownList.css");
|
|
27
|
-
const check_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/check-icon"));
|
|
28
|
-
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
29
|
-
const map_1 = __importDefault(require("lodash/map"));
|
|
30
|
-
const react_1 = __importStar(require("react"));
|
|
31
|
-
const react_i18next_1 = require("react-i18next");
|
|
32
|
-
const dropdownUtils_1 = require("./dropdownUtils");
|
|
33
|
-
const SearchableList_1 = __importDefault(require("./SearchableList"));
|
|
34
|
-
const SelectList_1 = __importDefault(require("./SelectList"));
|
|
35
|
-
const defaultProps = {
|
|
36
|
-
className: '',
|
|
37
|
-
id: '',
|
|
38
|
-
searchable: false,
|
|
39
|
-
isInValid: false,
|
|
40
|
-
isLoadingList: false,
|
|
41
|
-
disabled: false,
|
|
42
|
-
required: false,
|
|
43
|
-
placeholder: '',
|
|
44
|
-
name: '',
|
|
45
|
-
'data-tracking-id': '',
|
|
46
|
-
filterListOnMenuOpen: false,
|
|
47
|
-
maxResults: 100,
|
|
48
|
-
paginate: false,
|
|
49
|
-
paginationBtnText: 'Display additional results',
|
|
50
|
-
isAsyncSearch: false,
|
|
51
|
-
multiSelect: false,
|
|
52
|
-
hasTwoColumns: false,
|
|
53
|
-
hideToggleButton: false,
|
|
54
|
-
};
|
|
55
|
-
function Dropdown(props) {
|
|
56
|
-
var _a, _b, _c;
|
|
57
|
-
const [resultsShown, setResultsShown] = react_1.useState(props.maxResults);
|
|
58
|
-
const [itemsList, setItemsList] = react_1.useState(props.list);
|
|
59
|
-
const onChangeLocal = ({ selectedItem, }) => {
|
|
60
|
-
selectedItem && props.onChange && props.onChange(selectedItem);
|
|
61
|
-
};
|
|
62
|
-
react_1.useEffect(() => {
|
|
63
|
-
setItemsList(props.list);
|
|
64
|
-
}, [props.list]);
|
|
65
|
-
const onPaginatonButtonClick = (e, downshift) => {
|
|
66
|
-
e.stopPropagation();
|
|
67
|
-
const finalCount = resultsShown + props.maxResults;
|
|
68
|
-
setResultsShown(finalCount);
|
|
69
|
-
props.onPaginate && props.onPaginate(finalCount, downshift.inputValue, e);
|
|
70
|
-
};
|
|
71
|
-
const isSelectedItemLocal = (item) => {
|
|
72
|
-
return !item.isNotSelectable && dropdownUtils_1.itemToString(props.selectedItem) === dropdownUtils_1.itemToString(item);
|
|
73
|
-
};
|
|
74
|
-
const isSelectedItem = props.isSelectedItem || isSelectedItemLocal;
|
|
75
|
-
const getListItemClassNames = (downshift, item, itemIndex) => {
|
|
76
|
-
let toReturn = 'downshift-item pf-c-select__menu-item';
|
|
77
|
-
toReturn += item.additionalInfo ? ' pf-m-description' : '';
|
|
78
|
-
toReturn += isSelectedItem(item) ? ' pf-m-selected' : '';
|
|
79
|
-
toReturn += item.disabled ? ' pf-m-disabled' : '';
|
|
80
|
-
toReturn += itemIndex === downshift.highlightedIndex ? ' highlighted' : '';
|
|
81
|
-
toReturn += item.className ? item.className : '';
|
|
82
|
-
return toReturn;
|
|
83
|
-
};
|
|
84
|
-
const onInputChangeLocal = (items, inputValue) => {
|
|
85
|
-
setResultsShown(props.maxResults);
|
|
86
|
-
setItemsList(items);
|
|
87
|
-
props.onInputChange && props.onInputChange(inputValue);
|
|
88
|
-
};
|
|
89
|
-
const renderListItems = (downshift) => {
|
|
90
|
-
const listToRender = [];
|
|
91
|
-
if (!downshift.isOpen)
|
|
92
|
-
return [];
|
|
93
|
-
let optionsToRender = itemsList;
|
|
94
|
-
const shouldPaginate = props.paginate && resultsShown < optionsToRender.length;
|
|
95
|
-
optionsToRender = props.paginate ? optionsToRender.slice(0, resultsShown) : optionsToRender;
|
|
96
|
-
optionsToRender.filter((item) => !item.isNotSearchable).length === 0 &&
|
|
97
|
-
props.emptyListLabel &&
|
|
98
|
-
listToRender.push(react_1.default.createElement("li", { key: "empty-label", className: "pf-u-p-sm" },
|
|
99
|
-
react_1.default.createElement(react_i18next_1.Trans, null, props.emptyListLabel)));
|
|
100
|
-
listToRender.push(...map_1.default(optionsToRender, (item, index) => {
|
|
101
|
-
const itemProps = item.isNonActionable
|
|
102
|
-
? {}
|
|
103
|
-
: downshift.getItemProps({
|
|
104
|
-
item,
|
|
105
|
-
index,
|
|
106
|
-
disabled: item.disabled,
|
|
107
|
-
className: getListItemClassNames(downshift, item, index),
|
|
108
|
-
});
|
|
109
|
-
return (react_1.default.createElement("li", { className: item.actionItem ? 'pf-c-select__menu-wrapper' : '', role: "presentation", key: `${index}-${props.id}-${dropdownUtils_1.itemToString(item)}` },
|
|
110
|
-
item.isNonActionable ? (isEmpty_1.default(item.children) ? dropdownUtils_1.itemToString(item) : item.children) : null,
|
|
111
|
-
props.multiSelect && !item.isNotSelectable && !item.isNonActionable && (react_1.default.createElement("div", Object.assign({}, itemProps),
|
|
112
|
-
react_1.default.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
113
|
-
react_1.default.createElement("input", { disabled: item.disabled === true, className: "pf-c-check__input pf-u-mr-sm", checked: isSelectedItem(item), onChange: dropdownUtils_1.noop, type: "checkbox" }),
|
|
114
|
-
isEmpty_1.default(item.children) ? dropdownUtils_1.itemToString(item) : item.children),
|
|
115
|
-
item.additionalInfo && (react_1.default.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
116
|
-
!props.multiSelect && !item.isNonActionable && (react_1.default.createElement("button", Object.assign({}, itemProps, { type: "button", title: dropdownUtils_1.itemToString(item) }),
|
|
117
|
-
react_1.default.createElement("div", { className: item.additionalInfo ? 'pf-c-select__menu-item-main' : '' },
|
|
118
|
-
isEmpty_1.default(item.children) ? dropdownUtils_1.itemToString(item) : item.children,
|
|
119
|
-
isSelectedItem(item) && (react_1.default.createElement("span", { className: "pf-c-select__menu-item-icon" },
|
|
120
|
-
react_1.default.createElement(check_icon_1.default, { "aria-hidden": true })))),
|
|
121
|
-
item.additionalInfo && (react_1.default.createElement("div", { className: "pf-c-select__menu-item-description" }, item.additionalInfo)))),
|
|
122
|
-
item.actionItem ? react_1.default.cloneElement(item.actionItem, { disabled: item.disabled }) : null));
|
|
123
|
-
}));
|
|
124
|
-
shouldPaginate &&
|
|
125
|
-
listToRender.push(...[
|
|
126
|
-
react_1.default.createElement("li", { key: "separator", className: "dropdown-divider", role: "separator" }),
|
|
127
|
-
react_1.default.createElement("li", { key: "pagination-item", className: "downshift-pagination-item" },
|
|
128
|
-
react_1.default.createElement("button", { type: "button", onClick: (e) => onPaginatonButtonClick(e, downshift), className: "pf-c-button pf-m-link pf-m-block", disabled: props.isLoadingList },
|
|
129
|
-
react_1.default.createElement(react_i18next_1.Trans, null, props.paginationBtnText))),
|
|
130
|
-
]);
|
|
131
|
-
return listToRender;
|
|
132
|
-
};
|
|
133
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
-
const selectedItem = react_1.useMemo(() => props.selectedItem, [(_c = (_b = (_a = props.selectedItem) === null || _a === void 0 ? void 0 : _a.label) !== null && _b !== void 0 ? _b : props.selectedItem) !== null && _c !== void 0 ? _c : '']);
|
|
135
|
-
const newProps = Object.assign(Object.assign({}, props), { selectedItem, onChange: onChangeLocal, itemToString: dropdownUtils_1.itemToString,
|
|
136
|
-
renderListItems,
|
|
137
|
-
itemsList });
|
|
138
|
-
return props.searchable ? (react_1.default.createElement(SearchableList_1.default, Object.assign({}, newProps, { onInputChange: onInputChangeLocal }))) : (react_1.default.createElement(SelectList_1.default, Object.assign({}, newProps)));
|
|
139
|
-
}
|
|
140
|
-
exports.Dropdown = Dropdown;
|
|
141
|
-
Dropdown.defaultProps = defaultProps;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IDClassNameProps } from '@rh-support/types/shared';
|
|
2
|
-
import { GetPropsCommonOptions, UseComboboxGetLabelPropsOptions, UseComboboxGetMenuPropsOptions, UseSelectGetLabelPropsOptions, UseSelectGetMenuPropsOptions } from 'downshift';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
interface IProps extends IDClassNameProps {
|
|
5
|
-
isOpen: boolean;
|
|
6
|
-
getMenuProps: (options?: UseComboboxGetMenuPropsOptions | UseSelectGetMenuPropsOptions, otherOptions?: GetPropsCommonOptions) => any;
|
|
7
|
-
getLabelProps: (options?: UseComboboxGetLabelPropsOptions | UseSelectGetLabelPropsOptions) => any;
|
|
8
|
-
toggleMenuComponent: React.ReactNode;
|
|
9
|
-
label: string | React.ReactNode;
|
|
10
|
-
children: JSX.Element | JSX.Element[] | React.ReactNode;
|
|
11
|
-
'data-tracking-id': string;
|
|
12
|
-
hasTwoColumns: boolean;
|
|
13
|
-
}
|
|
14
|
-
export default function DropdownWrapper(props: IProps): JSX.Element;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=DropdownWrapper.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownWrapper.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/DropdownWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EACH,qBAAqB,EACrB,+BAA+B,EAC/B,8BAA8B,EAC9B,6BAA6B,EAC7B,4BAA4B,EAC/B,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,MAAO,SAAQ,gBAAgB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,CACV,OAAO,CAAC,EAAE,8BAA8B,GAAG,4BAA4B,EACvE,YAAY,CAAC,EAAE,qBAAqB,KACnC,GAAG,CAAC;IACT,aAAa,EAAE,CAAC,OAAO,CAAC,EAAE,+BAA+B,GAAG,6BAA6B,KAAK,GAAG,CAAC;IAClG,mBAAmB,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;IACxD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eA6BpD"}
|
|
@@ -1,25 +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
|
-
const utils_1 = require("@rh-support/utils");
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
function DropdownWrapper(props) {
|
|
9
|
-
const onBlur = (event) => {
|
|
10
|
-
// on ios devices the onBlur event is called before the onClick event, so selecting an item in droponw
|
|
11
|
-
// closes the dropdown without selecting the item
|
|
12
|
-
// this is just a hack to prevent the downshift onBlur method from being called which closes the dropdown
|
|
13
|
-
if (utils_1.isiOS()) {
|
|
14
|
-
event.nativeEvent.preventDownshiftDefault = true;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (react_1.default.createElement("div", { id: `${props.id}`, className: `downshift ${props.className} pf-c-select ${props.isOpen ? 'pf-m-expanded' : ''} `, "data-tracking-id": props['data-tracking-id'] ? props['data-tracking-id'] : null },
|
|
18
|
-
props.label && react_1.default.createElement("label", Object.assign({}, props.getLabelProps()), props.label),
|
|
19
|
-
props.toggleMenuComponent,
|
|
20
|
-
react_1.default.createElement("ul", Object.assign({}, props.getMenuProps({
|
|
21
|
-
onBlur: onBlur,
|
|
22
|
-
className: `downshift-menu pf-c-select__menu ${props.hasTwoColumns ? 'column-selector-menu' : ''} ${props.isOpen ? 'open' : ''}`,
|
|
23
|
-
})), props.children)));
|
|
24
|
-
}
|
|
25
|
-
exports.default = DropdownWrapper;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { MultiSelectDropdownProps } from './types';
|
|
2
|
-
declare const MultiSelectDropDownList: <T extends {}>(props: MultiSelectDropdownProps<T>) => JSX.Element;
|
|
3
|
-
export { MultiSelectDropDownList, MultiSelectDropdownProps };
|
|
4
|
-
//# sourceMappingURL=MultiSelectDropdownList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSelectDropdownList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/MultiSelectDropdownList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGnD,QAAA,MAAM,uBAAuB,wDAExB,WAAW,CAAC;AAEjB,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MultiSelectDropDownList = void 0;
|
|
4
|
-
const DropDownList_1 = require("./DropDownList");
|
|
5
|
-
const withMulti_1 = require("./withMulti");
|
|
6
|
-
const MultiSelectDropDownList = withMulti_1.withMulti(DropDownList_1.Dropdown);
|
|
7
|
-
exports.MultiSelectDropDownList = MultiSelectDropDownList;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# Dropdown list
|
|
2
|
-
|
|
3
|
-
## Async Dropdown
|
|
4
|
-
|
|
5
|
-
It is an HOC wrapper around the original dropdown component.If you use async dropdown then the dropdown list will be searchable by default. You don't need to pass the searchable prop explicitly.
|
|
6
|
-
|
|
7
|
-
### How to use async dropdownlist
|
|
8
|
-
|
|
9
|
-
Below is the an example of how you can use async dropdown list. Please also go through the comments as they explain a lot about the inner functionalities of the dropdown
|
|
10
|
-
|
|
11
|
-
```js
|
|
12
|
-
import React, { useState, useMemo } from 'react'
|
|
13
|
-
import { AsyncDropDownList } from '@rh-support/components';
|
|
14
|
-
import { toOptions, toOption } from '@rh-support/utils';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// it's better to keep the server pagination in sync with the dropdown pagination
|
|
18
|
-
// so that you always know that if user will click on pagination button
|
|
19
|
-
// we need to fetch data from the server just by increasing the page size.
|
|
20
|
-
// otherwise we will need some complex logic in handle pagination function
|
|
21
|
-
const PER_PAGE = 50;
|
|
22
|
-
const SEARCH_URI = 'https://api.github.com/search/users';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function makeAndHandleRequest(query, page = 1) {
|
|
26
|
-
return fetch(`${SEARCH_URI}?q=${query}+in:login&page=${page}&per_page=${PER_PAGE}`)
|
|
27
|
-
.then(resp => resp.json())
|
|
28
|
-
.then(({ items, total_count }) => {
|
|
29
|
-
/* eslint-disable-line camelcase */
|
|
30
|
-
const options = items.map(i => ({
|
|
31
|
-
avatar_url: i.avatar_url,
|
|
32
|
-
id: i.id,
|
|
33
|
-
login: i.login,
|
|
34
|
-
}));
|
|
35
|
-
return { options, total_count };
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function Test() {
|
|
40
|
-
const [items, setItems] = useState<any>([]);
|
|
41
|
-
const [isFetching, setIsFetching] = useState(false);
|
|
42
|
-
const [selectedItem, setSelectedItem] = useState({ login: 'karan' });
|
|
43
|
-
const fetchUsers = async (inputVal) => {
|
|
44
|
-
try {
|
|
45
|
-
setIsFetching(true);
|
|
46
|
-
const userResponse = await makeAndHandleRequest(inputVal);
|
|
47
|
-
setItems(userResponse)
|
|
48
|
-
} catch (e) {
|
|
49
|
-
// silently fails
|
|
50
|
-
}
|
|
51
|
-
finally {
|
|
52
|
-
setIsFetching(false);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const onDropdownChange = (item) => {
|
|
57
|
-
setSelectedItem(item.label);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const onPaginate = (shownResults, inputVal, e) => {
|
|
61
|
-
console.log(inputVal);
|
|
62
|
-
// fetch more results here
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
const onOuterClick = () => {
|
|
66
|
-
// optional if you don't want to show the last results if user focuses out of dropdown
|
|
67
|
-
setItems({ options: [] });
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
const onDropdownClear = () => {
|
|
71
|
-
setSelectedItem({ login: '' });
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// this is the most important part to memoize the selected item. If you don't then every time
|
|
75
|
-
// new results are fetched the dropdown will render and toOption always create a new object
|
|
76
|
-
// forcing dropdown to render and overriding the input value
|
|
77
|
-
const memoizedSelectedItem = useMemo(() => toOption(selectedItem, { labelKey: 'login' }), [selectedItem]);
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<AsyncDropDownList<any>
|
|
81
|
-
placeholder={'Select a Cluster'}
|
|
82
|
-
id="case-details-cluster-nickname-selector"
|
|
83
|
-
selectedItem={memoizedSelectedItem}
|
|
84
|
-
list={items ? toOptions(items.options, {
|
|
85
|
-
labelKey: 'login',
|
|
86
|
-
childrenKey: 'children'
|
|
87
|
-
}) : []}
|
|
88
|
-
title={`Select a Cluster`}
|
|
89
|
-
onOuterClick={onOuterClick}
|
|
90
|
-
onChange={onDropdownChange}
|
|
91
|
-
onSearch={fetchUsers}
|
|
92
|
-
delay={300}
|
|
93
|
-
useCache={true}
|
|
94
|
-
isLoadingList={isFetching}
|
|
95
|
-
paginate={true}
|
|
96
|
-
onPaginate={onPaginate}
|
|
97
|
-
maxResults={PER_PAGE - 1}
|
|
98
|
-
emptyListLabel={'No results found'}
|
|
99
|
-
onClearSelection={onDropdownClear}
|
|
100
|
-
/>
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Props specific to async dropdown**
|
|
107
|
-
|
|
108
|
-
| Name | Type | Default | Description |
|
|
109
|
-
| ---------- | -------------------- | ------------------- | ----------------------------------------------------------------------- |
|
|
110
|
-
| delay | <code>number</code> | 200 | Delay, in milliseconds, before performing search. |
|
|
111
|
-
| minlength | <code>number</code> | 2 | Number of input characters that must be entered before showing results. |
|
|
112
|
-
| promptText | <code>string</code> | 'Type to search...' | Message displayed in the menu when there is no user input. |
|
|
113
|
-
| searchText | <code>string</code> | 'Searching...' | Message displayed in the menu while the request is pending. |
|
|
114
|
-
| useCache | <code>boolean</code> | false | Whether or not the component should cache query results. |
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IOption } from '@rh-support/types/shared';
|
|
2
|
-
import { UseComboboxReturnValue, UseComboboxStateChange } from 'downshift';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { IDropdownListProps } from './types';
|
|
5
|
-
interface IProps<T> extends Omit<IDropdownListProps<T>, 'onChange' | 'onInputChange'> {
|
|
6
|
-
renderListItems: (downshift: UseComboboxReturnValue<IOption<T>>) => React.ReactNode[];
|
|
7
|
-
onChange: (changes: UseComboboxStateChange<IOption<T>>) => void;
|
|
8
|
-
itemsList: IOption<T>[];
|
|
9
|
-
onInputChange?: (items: IOption<T>[], inputValue: string) => void;
|
|
10
|
-
isPDFExporting?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export default function SearchableList<T>(props: IProps<T>): JSX.Element;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=SearchableList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchableList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/SearchableList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEH,sBAAsB,EAEtB,sBAAsB,EAEzB,MAAM,WAAW,CAAC;AAGnB,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,MAAM,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,CAAC;IACjF,eAAe,EAAE,CAAC,SAAS,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;IACtF,QAAQ,EAAE,CAAC,OAAO,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;IACxB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAClE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eA+IzD"}
|
|
@@ -1,104 +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
|
-
const caret_down_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/caret-down-icon"));
|
|
7
|
-
const times_circle_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/times-circle-icon"));
|
|
8
|
-
const downshift_1 = require("downshift");
|
|
9
|
-
const includes_1 = __importDefault(require("lodash/includes"));
|
|
10
|
-
const isEmpty_1 = __importDefault(require("lodash/isEmpty"));
|
|
11
|
-
const react_1 = __importDefault(require("react"));
|
|
12
|
-
const LoadingIndicator_1 = require("../LoadingIndicator/LoadingIndicator");
|
|
13
|
-
const dropdownUtils_1 = require("./dropdownUtils");
|
|
14
|
-
const DropdownWrapper_1 = __importDefault(require("./DropdownWrapper"));
|
|
15
|
-
function SearchableList(props) {
|
|
16
|
-
const doesMatchInput = (inputVal) => (item) => {
|
|
17
|
-
// Should always keep non-searchable, or item with no labels
|
|
18
|
-
if (item.isNotSearchable || item.label === null || item.label === undefined)
|
|
19
|
-
return true;
|
|
20
|
-
const inputValueLC = inputVal ? inputVal.trim().toLowerCase() : '';
|
|
21
|
-
const labelLC = dropdownUtils_1.itemToString(item).trim().toLowerCase();
|
|
22
|
-
return includes_1.default(labelLC, inputValueLC);
|
|
23
|
-
};
|
|
24
|
-
const onIsOpenChange = (changes) => {
|
|
25
|
-
if (!changes.isOpen && changes.type !== downshift_1.useCombobox.stateChangeTypes.ItemClick) {
|
|
26
|
-
props.onOuterClick && props.onOuterClick(props.selectedItem);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
const comboboxStateReducer = (state, actionAndChanges) => {
|
|
30
|
-
const { changes, type } = actionAndChanges;
|
|
31
|
-
switch (type) {
|
|
32
|
-
case downshift_1.useCombobox.stateChangeTypes.InputBlur:
|
|
33
|
-
return Object.assign(Object.assign({}, changes), { inputValue: dropdownUtils_1.itemToString(props.selectedItem) && downshift.inputValue !== dropdownUtils_1.itemToString(props.selectedItem)
|
|
34
|
-
? dropdownUtils_1.itemToString(props.selectedItem)
|
|
35
|
-
: state.inputValue });
|
|
36
|
-
case downshift_1.useCombobox.stateChangeTypes.InputKeyDownEnter:
|
|
37
|
-
return Object.assign(Object.assign({}, changes), { inputValue: state.inputValue });
|
|
38
|
-
default:
|
|
39
|
-
return changes;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const downshift = downshift_1.useCombobox({
|
|
43
|
-
selectedItem: props.selectedItem,
|
|
44
|
-
items: props.itemsList,
|
|
45
|
-
onSelectedItemChange: props.onChange,
|
|
46
|
-
labelId: `${props.id}-label`,
|
|
47
|
-
itemToString: dropdownUtils_1.itemToString,
|
|
48
|
-
onIsOpenChange,
|
|
49
|
-
onInputValueChange: ({ inputValue, isOpen }) => {
|
|
50
|
-
const newList = props.searchable && (props.filterListOnMenuOpen || isOpen) && !props.isAsyncSearch
|
|
51
|
-
? props.list.filter(doesMatchInput(inputValue))
|
|
52
|
-
: props.list;
|
|
53
|
-
// for async search we want to make sure that we don't call input change unless the user changes
|
|
54
|
-
// the input manually as it will trigger an api call.
|
|
55
|
-
(!props.isAsyncSearch || (props.isAsyncSearch && isOpen)) && props.onInputChange(newList, inputValue);
|
|
56
|
-
},
|
|
57
|
-
stateReducer: props.multiSelect ? dropdownUtils_1.multiSelectDropdownStateReducer : comboboxStateReducer,
|
|
58
|
-
});
|
|
59
|
-
const { getInputProps, getToggleButtonProps, getMenuProps, getLabelProps, openMenu, isOpen } = downshift;
|
|
60
|
-
const clearSelection = () => (event) => {
|
|
61
|
-
props.onClearSelection && props.onClearSelection();
|
|
62
|
-
// in case of multi select we force input to get cleared on clear button click
|
|
63
|
-
downshift.selectItem(null);
|
|
64
|
-
!isOpen && openMenu();
|
|
65
|
-
};
|
|
66
|
-
const onInputClick = () => (e) => {
|
|
67
|
-
if (!isOpen) {
|
|
68
|
-
openMenu();
|
|
69
|
-
props.onMenuToggle && props.onMenuToggle();
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const onInputBlur = () => (e) => {
|
|
73
|
-
props.onInputBlur && props.onInputBlur(e);
|
|
74
|
-
};
|
|
75
|
-
const renderSearchableToggleButton = () => {
|
|
76
|
-
return (react_1.default.createElement("div", Object.assign({}, downshift.getComboboxProps({ className: 'pf-c-select__toggle pf-m-typeahead' })),
|
|
77
|
-
react_1.default.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
78
|
-
props.chipGroupComponent,
|
|
79
|
-
react_1.default.createElement("input", Object.assign({}, getInputProps({
|
|
80
|
-
placeholder: props.placeholder,
|
|
81
|
-
className: `pf-c-form-control pf-c-select__toggle-typeahead`,
|
|
82
|
-
id: `${props.id}-downshift-search`,
|
|
83
|
-
'aria-invalid': props.isInValid,
|
|
84
|
-
'aria-required': props.required,
|
|
85
|
-
required: props.required,
|
|
86
|
-
disabled: props.disabled,
|
|
87
|
-
onClick: onInputClick(),
|
|
88
|
-
onBlur: onInputBlur(),
|
|
89
|
-
})))),
|
|
90
|
-
react_1.default.createElement(LoadingIndicator_1.LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
91
|
-
!isEmpty_1.default(downshift.inputValue) &&
|
|
92
|
-
!props.isLoadingList &&
|
|
93
|
-
(!props.isExportingPDF ? (react_1.default.createElement("button", { className: "pf-c-button pf-m-plain pf-c-select__toggle-clear", onClick: clearSelection(), "aria-label": "clear selection", type: "button", title: "Clear selection", disabled: props.disabled, "data-tracking-id": `${props['data-tracking-id']}-clear` },
|
|
94
|
-
react_1.default.createElement(times_circle_icon_1.default, null))) : null),
|
|
95
|
-
!props.hideToggleButton && (react_1.default.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
96
|
-
disabled: props.disabled || props.isLoadingList,
|
|
97
|
-
className: 'pf-c-button pf-c-select__toggle-button pf-m-plain',
|
|
98
|
-
onClick: props.onMenuToggle ? () => props.onMenuToggle() : dropdownUtils_1.noop,
|
|
99
|
-
})),
|
|
100
|
-
react_1.default.createElement(caret_down_icon_1.default, null)))));
|
|
101
|
-
};
|
|
102
|
-
return (react_1.default.createElement(DropdownWrapper_1.default, { id: props.id, className: props.className, isOpen: isOpen, getMenuProps: getMenuProps, getLabelProps: getLabelProps, label: props.label, toggleMenuComponent: renderSearchableToggleButton(), "data-tracking-id": props['data-tracking-id'], hasTwoColumns: props.hasTwoColumns }, isOpen && props.renderListItems(downshift)));
|
|
103
|
-
}
|
|
104
|
-
exports.default = SearchableList;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IOption } from '@rh-support/types/shared';
|
|
2
|
-
import { UseSelectReturnValue, UseSelectStateChange } from 'downshift';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { IDropdownListProps } from './types';
|
|
5
|
-
interface IProps<T> extends Omit<IDropdownListProps<T>, 'onChange'> {
|
|
6
|
-
renderListItems: (downshift: UseSelectReturnValue<IOption<T>>) => React.ReactNode[];
|
|
7
|
-
onChange: (changes: UseSelectStateChange<IOption<T>>) => void;
|
|
8
|
-
}
|
|
9
|
-
export default function SelectList<T>(props: IProps<T>): JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=SelectList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectList.d.ts","sourceRoot":"","sources":["../../../src/DropDownList/SelectList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAa,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAClF,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,MAAM,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IAC/D,eAAe,EAAE,CAAC,SAAS,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,SAAS,EAAE,CAAC;IACpF,QAAQ,EAAE,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,eAgErD"}
|
|
@@ -1,41 +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
|
-
const caret_down_icon_1 = __importDefault(require("@patternfly/react-icons/dist/js/icons/caret-down-icon"));
|
|
7
|
-
const downshift_1 = require("downshift");
|
|
8
|
-
const react_1 = __importDefault(require("react"));
|
|
9
|
-
const LoadingIndicator_1 = require("../LoadingIndicator/LoadingIndicator");
|
|
10
|
-
const dropdownUtils_1 = require("./dropdownUtils");
|
|
11
|
-
const DropdownWrapper_1 = __importDefault(require("./DropdownWrapper"));
|
|
12
|
-
function SelectList(props) {
|
|
13
|
-
const onIsOpenChange = (changes) => {
|
|
14
|
-
if (!changes.isOpen && changes.type !== downshift_1.useSelect.stateChangeTypes.ItemClick) {
|
|
15
|
-
props.onOuterClick && props.onOuterClick(props.selectedItem);
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
const downshift = downshift_1.useSelect(Object.assign({ selectedItem: props.selectedItem, items: props.list, onIsOpenChange, onSelectedItemChange: props.onChange, labelId: `${props.id}-label`, itemToString: dropdownUtils_1.itemToString }, (props.multiSelect && { stateReducer: dropdownUtils_1.multiSelectDropdownStateReducer })));
|
|
19
|
-
const { getToggleButtonProps, getLabelProps, getMenuProps, isOpen } = downshift;
|
|
20
|
-
const renderToggleButton = () => {
|
|
21
|
-
var _a;
|
|
22
|
-
return (react_1.default.createElement("button", Object.assign({ type: "button" }, getToggleButtonProps({
|
|
23
|
-
id: `${props.id}-toggle`,
|
|
24
|
-
className: `pf-c-select__toggle ${props.isInValid ? 'form-invalid' : ''}`,
|
|
25
|
-
disabled: props.disabled || props.isLoadingList,
|
|
26
|
-
'aria-label': `${isOpen ? 'Close ' + props.title : 'Open ' + props.title}`,
|
|
27
|
-
'aria-invalid': props.isInValid,
|
|
28
|
-
name: props.name,
|
|
29
|
-
title: dropdownUtils_1.itemToString(props.selectedItem) || props.placeholder,
|
|
30
|
-
'data-tracking-id': (_a = props['data-tracking-id']) !== null && _a !== void 0 ? _a : '',
|
|
31
|
-
onClick: props.onMenuToggle ? () => props.onMenuToggle() : dropdownUtils_1.noop,
|
|
32
|
-
})),
|
|
33
|
-
react_1.default.createElement("div", { className: "pf-c-select__toggle-wrapper" },
|
|
34
|
-
react_1.default.createElement("span", { className: "pf-c-select__toggle-text" }, dropdownUtils_1.itemToString(props.selectedItem) || (react_1.default.createElement("span", { className: "pf-c-select__placeholder-text" }, props.placeholder)))),
|
|
35
|
-
react_1.default.createElement(LoadingIndicator_1.LoadingIndicator, { isInline: true, show: props.isLoadingList }),
|
|
36
|
-
!props.isLoadingList && (react_1.default.createElement("span", { className: "pf-c-select__toggle-arrow" },
|
|
37
|
-
react_1.default.createElement(caret_down_icon_1.default, null)))));
|
|
38
|
-
};
|
|
39
|
-
return (react_1.default.createElement(DropdownWrapper_1.default, { id: props.id, className: props.className, label: props.label, isOpen: isOpen, getMenuProps: getMenuProps, getLabelProps: getLabelProps, toggleMenuComponent: renderToggleButton(), "data-tracking-id": props['data-tracking-id'], hasTwoColumns: props.hasTwoColumns }, isOpen && props.renderListItems(downshift)));
|
|
40
|
-
}
|
|
41
|
-
exports.default = SelectList;
|