@rh-support/components 2.4.10-beta.6 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +5 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/lib/esm/MarkdownEditor/MarkdownEditor.js +272 -86
- 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 +74 -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 +15 -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
package/lib/cjs/hooks/index.js
DELETED
|
@@ -1,25 +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("./useFetch"), exports);
|
|
14
|
-
__exportStar(require("./useIsMounted"), exports);
|
|
15
|
-
__exportStar(require("./useDebounce"), exports);
|
|
16
|
-
__exportStar(require("./usePrevious"), exports);
|
|
17
|
-
__exportStar(require("./useTitle"), exports);
|
|
18
|
-
__exportStar(require("./useUndo"), exports);
|
|
19
|
-
__exportStar(require("./usePolling"), exports);
|
|
20
|
-
__exportStar(require("./useCopyToClipboard"), exports);
|
|
21
|
-
__exportStar(require("./useForkRef"), exports);
|
|
22
|
-
__exportStar(require("./useForceUpdate"), exports);
|
|
23
|
-
__exportStar(require("./useLRUCache"), exports);
|
|
24
|
-
__exportStar(require("./useBreakpoint"), exports);
|
|
25
|
-
__exportStar(require("./useOnScreen"), exports);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare type Config = {
|
|
3
|
-
readonly [key: string]: string;
|
|
4
|
-
};
|
|
5
|
-
declare function BreakpointProvider({ children, queries }: React.PropsWithChildren<{
|
|
6
|
-
queries?: Config;
|
|
7
|
-
}>): JSX.Element;
|
|
8
|
-
declare function useBreakpoint(): {
|
|
9
|
-
readonly [key: string]: boolean;
|
|
10
|
-
};
|
|
11
|
-
export { useBreakpoint, BreakpointProvider };
|
|
12
|
-
//# sourceMappingURL=useBreakpoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,oBAAY,MAAM,GAAG;IACjB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAYF,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,OAAwB,EAAE,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,eA+ChH;AAED,iBAAS,aAAa;;EAMrB;AACD,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.BreakpointProvider = exports.useBreakpoint = void 0;
|
|
23
|
-
const react_1 = __importStar(require("react"));
|
|
24
|
-
// https://medium.com/better-programming/how-to-use-media-queries-programmatically-in-react-4d6562c3bc97
|
|
25
|
-
const defaultValue = {};
|
|
26
|
-
const BreakpointContext = react_1.default.createContext(defaultValue);
|
|
27
|
-
const defaultQueries = {
|
|
28
|
-
xs: `(min-width: 0px)`,
|
|
29
|
-
sm: `(min-width: 576px)`,
|
|
30
|
-
md: `(min-width: 768px)`,
|
|
31
|
-
lg: `(min-width: 992px)`,
|
|
32
|
-
xl: `(min-width: 1300px)`,
|
|
33
|
-
};
|
|
34
|
-
function BreakpointProvider({ children, queries = defaultQueries }) {
|
|
35
|
-
const [queryMatch, setQueryMatch] = react_1.useState({});
|
|
36
|
-
react_1.useEffect(() => {
|
|
37
|
-
const mediaQueryLists = {};
|
|
38
|
-
const keys = Object.keys(queries);
|
|
39
|
-
let isAttached = false;
|
|
40
|
-
const handleQueryListener = () => {
|
|
41
|
-
const updatedMatches = keys.reduce((acc, media) => {
|
|
42
|
-
acc[media] = !!(mediaQueryLists[media] && mediaQueryLists[media].matches);
|
|
43
|
-
return acc;
|
|
44
|
-
}, {});
|
|
45
|
-
setQueryMatch(updatedMatches);
|
|
46
|
-
};
|
|
47
|
-
if (window && window.matchMedia) {
|
|
48
|
-
const matches = {};
|
|
49
|
-
keys.forEach((media) => {
|
|
50
|
-
if (typeof queries[media] === 'string') {
|
|
51
|
-
mediaQueryLists[media] = window.matchMedia(queries[media]);
|
|
52
|
-
matches[media] = mediaQueryLists[media].matches;
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
matches[media] = false;
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
setQueryMatch(matches);
|
|
59
|
-
isAttached = true;
|
|
60
|
-
keys.forEach((media) => {
|
|
61
|
-
if (typeof queries[media] === 'string') {
|
|
62
|
-
mediaQueryLists[media].addListener(handleQueryListener);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
return () => {
|
|
67
|
-
if (isAttached) {
|
|
68
|
-
keys.forEach((media) => {
|
|
69
|
-
if (typeof queries[media] === 'string') {
|
|
70
|
-
mediaQueryLists[media].removeListener(handleQueryListener);
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}, [queries]);
|
|
76
|
-
return react_1.default.createElement(BreakpointContext.Provider, { value: queryMatch }, children);
|
|
77
|
-
}
|
|
78
|
-
exports.BreakpointProvider = BreakpointProvider;
|
|
79
|
-
function useBreakpoint() {
|
|
80
|
-
const context = react_1.useContext(BreakpointContext);
|
|
81
|
-
if (context === defaultValue) {
|
|
82
|
-
throw new Error('useBreakpoint must be used within a BreakpointProvider');
|
|
83
|
-
}
|
|
84
|
-
return context;
|
|
85
|
-
}
|
|
86
|
-
exports.useBreakpoint = useBreakpoint;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCopyToClipboard.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCopyToClipboard.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,SAAU,WAAW,SAK3C,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,GAAG,KAAA;;;EAyBrC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useCopyToClipboard = exports.selectText = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const react_i18next_1 = require("react-i18next");
|
|
6
|
-
const selectText = (elem) => {
|
|
7
|
-
var range = document.createRange();
|
|
8
|
-
range.selectNode(elem);
|
|
9
|
-
window.getSelection().removeAllRanges();
|
|
10
|
-
window.getSelection().addRange(range);
|
|
11
|
-
};
|
|
12
|
-
exports.selectText = selectText;
|
|
13
|
-
function useCopyToClipboard(ref) {
|
|
14
|
-
const [clipboardText, setClipboardText] = react_1.useState('');
|
|
15
|
-
const { t } = react_i18next_1.useTranslation();
|
|
16
|
-
const copyToClipboard = () => {
|
|
17
|
-
exports.selectText(ref.current);
|
|
18
|
-
try {
|
|
19
|
-
document.execCommand('copy');
|
|
20
|
-
setClipboardText(t('Copied!'));
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
if (/iPhone|iPad/i.test(navigator.userAgent)) {
|
|
24
|
-
setClipboardText(t('Not supported'));
|
|
25
|
-
}
|
|
26
|
-
else if (/Mac/i.test(navigator.userAgent)) {
|
|
27
|
-
setClipboardText(t('Press ⌘ + C to copy'));
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
setClipboardText(t('Press Ctrl + C to copy'));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
return {
|
|
35
|
-
clipboardText,
|
|
36
|
-
copyToClipboard,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
exports.useCopyToClipboard = useCopyToClipboard;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface DebounceSettings {
|
|
2
|
-
leading?: boolean;
|
|
3
|
-
maxWait?: number;
|
|
4
|
-
trailing?: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function useDebounce(callback: () => void, dependencies: ReadonlyArray<any>, wait?: number, options?: DebounceSettings): void;
|
|
7
|
-
export declare function useDeepCompareDebounce(callback: () => void, dependencies: ReadonlyArray<any>, wait?: number, options?: DebounceSettings): void;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=useDebounce.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDebounce.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,WAAW,CACvB,QAAQ,EAAE,MAAM,IAAI,EACpB,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,EAChC,IAAI,GAAE,MAAU,EAChB,OAAO,GAAE,gBAAqB,QAiBjC;AAED,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,MAAM,IAAI,EACpB,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,EAChC,IAAI,GAAE,MAAU,EAChB,OAAO,GAAE,gBAAqB,QAkBjC"}
|
|
@@ -1,40 +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.useDeepCompareDebounce = exports.useDebounce = void 0;
|
|
7
|
-
const debounce_1 = __importDefault(require("lodash/debounce"));
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const use_deep_compare_effect_1 = __importDefault(require("use-deep-compare-effect"));
|
|
10
|
-
// Takes a callback that is called after a debounce delay based on the dependencies array
|
|
11
|
-
// Its just a wrapper over useEffect and debounce function which cancels previous callback each time
|
|
12
|
-
function useDebounce(callback, dependencies, wait = 0, options = {}) {
|
|
13
|
-
react_1.useEffect(() => {
|
|
14
|
-
const handler = debounce_1.default(() => {
|
|
15
|
-
callback();
|
|
16
|
-
}, wait, options);
|
|
17
|
-
handler();
|
|
18
|
-
// Clears the previous callback
|
|
19
|
-
return () => {
|
|
20
|
-
handler.cancel();
|
|
21
|
-
};
|
|
22
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
23
|
-
}, [wait, ...dependencies]);
|
|
24
|
-
}
|
|
25
|
-
exports.useDebounce = useDebounce;
|
|
26
|
-
function useDeepCompareDebounce(callback, dependencies, wait = 0, options = {}) {
|
|
27
|
-
use_deep_compare_effect_1.default(() => {
|
|
28
|
-
//instead of useeffect use the deepcompare libary
|
|
29
|
-
const handler = debounce_1.default(() => {
|
|
30
|
-
callback();
|
|
31
|
-
}, wait, options);
|
|
32
|
-
handler();
|
|
33
|
-
// Clears the previous callback
|
|
34
|
-
return () => {
|
|
35
|
-
handler.cancel();
|
|
36
|
-
};
|
|
37
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
}, [wait, ...dependencies]);
|
|
39
|
-
}
|
|
40
|
-
exports.useDeepCompareDebounce = useDeepCompareDebounce;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface IFetchState<T> {
|
|
2
|
-
data?: T;
|
|
3
|
-
isFetching?: boolean;
|
|
4
|
-
error?: Error | DOMException;
|
|
5
|
-
}
|
|
6
|
-
export interface IUseFetch<T, A extends any[]> extends IFetchState<T> {
|
|
7
|
-
request?: (...args: A) => Promise<T>;
|
|
8
|
-
clearResponse?: () => void;
|
|
9
|
-
}
|
|
10
|
-
export interface IUseFetchOptions<T> {
|
|
11
|
-
initialData?: any;
|
|
12
|
-
resolve?: boolean;
|
|
13
|
-
resolveCondition?: string[];
|
|
14
|
-
isAbortable?: boolean;
|
|
15
|
-
propgateErrors?: boolean;
|
|
16
|
-
postProcessor?: (data: T) => T;
|
|
17
|
-
}
|
|
18
|
-
export declare function useFetch<T, A extends any[]>(fn: (...args: A) => Promise<T>, { initialData, resolve, resolveCondition, isAbortable, propgateErrors, postProcessor, }?: IUseFetchOptions<T>): IUseFetch<T, A>;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=useFetch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFetch.d.ts","sourceRoot":"","sources":["../../../src/hooks/useFetch.tsx"],"names":[],"mappings":"AAMA,UAAU,WAAW,CAAC,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,CAAC;IAGT,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,KAAK,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC;CAChC;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IAEjE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;CAClC;AAID,wBAAgB,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,EACvC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAC9B,EACI,WAAkB,EAClB,OAAe,EACf,gBAAqB,EACrB,WAAmB,EACnB,cAAsB,EACtB,aAAyB,GAC5B,GAAE,gBAAgB,CAAC,CAAC,CAAM,GAC5B,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAwDjB"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.useFetch = void 0;
|
|
13
|
-
const react_1 = require("react");
|
|
14
|
-
const useIsMounted_1 = require("./useIsMounted");
|
|
15
|
-
const usePrevious_1 = require("./usePrevious");
|
|
16
|
-
// type IUseFetchFn = <T,A extends any[]>(fn: (...args:) => Promise<T>, options?: IUseFetchOptions<T>) => IUseFetch<T,A>;
|
|
17
|
-
function useFetch(fn, { initialData = null, resolve = false, resolveCondition = [], isAbortable = false, propgateErrors = false, postProcessor = undefined, } = {}) {
|
|
18
|
-
const isMounted = useIsMounted_1.useIsMounted();
|
|
19
|
-
const [{ data, isFetching, error }, setState] = react_1.useReducer((s, a) => (Object.assign(Object.assign({}, s), a)), { data: initialData, isFetching: resolve, error: null });
|
|
20
|
-
const [abortSignal, setAbortSignal] = react_1.useState(null);
|
|
21
|
-
const prevAbortSignal = usePrevious_1.usePrevious(abortSignal);
|
|
22
|
-
const clearResponse = () => setState({ data: initialData });
|
|
23
|
-
const request = (...args) => __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
var _a;
|
|
25
|
-
try {
|
|
26
|
-
if (isAbortable && 'AbortController' in window) {
|
|
27
|
-
if (prevAbortSignal) {
|
|
28
|
-
prevAbortSignal.abort();
|
|
29
|
-
}
|
|
30
|
-
const controller = new AbortController();
|
|
31
|
-
setAbortSignal(controller);
|
|
32
|
-
args.push(controller.signal);
|
|
33
|
-
}
|
|
34
|
-
isMounted && setState({ isFetching: true, error: null });
|
|
35
|
-
let response = yield fn(...args);
|
|
36
|
-
response = postProcessor ? postProcessor(response) : response;
|
|
37
|
-
isMounted && setState({ data: response, isFetching: false });
|
|
38
|
-
return response;
|
|
39
|
-
}
|
|
40
|
-
catch (err) {
|
|
41
|
-
const isAbortError = ((_a = err) === null || _a === void 0 ? void 0 : _a.code) === 20;
|
|
42
|
-
if (isAbortError) {
|
|
43
|
-
// TODO handle abort error and loader behaviour
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
if (!propgateErrors) {
|
|
47
|
-
// AlertUtil.addErrorMessage(err);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
// Don
|
|
51
|
-
isMounted && !isAbortError && setState({ error: err, data: null, isFetching: false });
|
|
52
|
-
if (propgateErrors && !isAbortError) {
|
|
53
|
-
throw err;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
react_1.useEffect(() => {
|
|
58
|
-
// if (resolve) {
|
|
59
|
-
// request();
|
|
60
|
-
// }
|
|
61
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
|
-
}, resolveCondition);
|
|
63
|
-
return {
|
|
64
|
-
clearResponse,
|
|
65
|
-
data,
|
|
66
|
-
isFetching,
|
|
67
|
-
request,
|
|
68
|
-
error,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
exports.useFetch = useFetch;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a function that triggers a component update. the hook equivalent to
|
|
3
|
-
* `this.forceUpdate()` in a class component. In most cases using a state value directly
|
|
4
|
-
* is preferable but may be required in some advanced usages of refs for interop or
|
|
5
|
-
* when direct DOM manipulation is required.
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* const forceUpdate = useForceUpdate();
|
|
9
|
-
*
|
|
10
|
-
* const updateOnClick = useCallback(() => {
|
|
11
|
-
* forceUpdate()
|
|
12
|
-
* }, [forceUpdate])
|
|
13
|
-
*
|
|
14
|
-
* return <button type="button" onClick={updateOnClick}>Hi there</button>
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function useForceUpdate(): () => void;
|
|
18
|
-
//# sourceMappingURL=useForceUpdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useForceUpdate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useForceUpdate.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,IAAI,MAAM,IAAI,CAK3C"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Copied from https://github.com/react-restart/hooks/blob/master/src/useForceUpdate.ts
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.useForceUpdate = void 0;
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
/**
|
|
7
|
-
* Returns a function that triggers a component update. the hook equivalent to
|
|
8
|
-
* `this.forceUpdate()` in a class component. In most cases using a state value directly
|
|
9
|
-
* is preferable but may be required in some advanced usages of refs for interop or
|
|
10
|
-
* when direct DOM manipulation is required.
|
|
11
|
-
*
|
|
12
|
-
* ```ts
|
|
13
|
-
* const forceUpdate = useForceUpdate();
|
|
14
|
-
*
|
|
15
|
-
* const updateOnClick = useCallback(() => {
|
|
16
|
-
* forceUpdate()
|
|
17
|
-
* }, [forceUpdate])
|
|
18
|
-
*
|
|
19
|
-
* return <button type="button" onClick={updateOnClick}>Hi there</button>
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
function useForceUpdate() {
|
|
23
|
-
// The toggling state value is designed to defeat React optimizations for skipping
|
|
24
|
-
// updates when they are stricting equal to the last state value
|
|
25
|
-
const [, dispatch] = react_1.useReducer((state) => !state, false);
|
|
26
|
-
return dispatch;
|
|
27
|
-
}
|
|
28
|
-
exports.useForceUpdate = useForceUpdate;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useForkRef.d.ts","sourceRoot":"","sources":["../../../src/hooks/useForkRef.ts"],"names":[],"mappings":"AAUA,wBAAgB,UAAU,CAAC,IAAI,KAAA,EAAE,IAAI,KAAA,2BAepC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useForkRef = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function setRef(ref, value) {
|
|
6
|
-
if (typeof ref === 'function') {
|
|
7
|
-
ref(value);
|
|
8
|
-
}
|
|
9
|
-
else if (ref) {
|
|
10
|
-
ref.current = value;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
function useForkRef(refA, refB) {
|
|
14
|
-
/**
|
|
15
|
-
* This will create a new function if the ref props change and are defined.
|
|
16
|
-
* This means react will call the old forkRef with `null` and the new forkRef
|
|
17
|
-
* with the ref. Cleanup naturally emerges from this behavior
|
|
18
|
-
*/
|
|
19
|
-
return react_1.useMemo(() => {
|
|
20
|
-
if (refA == null && refB == null) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
return (refValue) => {
|
|
24
|
-
setRef(refA, refValue);
|
|
25
|
-
setRef(refB, refValue);
|
|
26
|
-
};
|
|
27
|
-
}, [refA, refB]);
|
|
28
|
-
}
|
|
29
|
-
exports.useForkRef = useForkRef;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useIsMounted.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsMounted.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,wBAAgB,YAAY,oCAS3B"}
|
|
@@ -1,18 +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.useIsMounted = void 0;
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
function useIsMounted() {
|
|
9
|
-
const mounted = react_1.default.useRef(false);
|
|
10
|
-
react_1.default.useLayoutEffect(() => {
|
|
11
|
-
mounted.current = true;
|
|
12
|
-
return () => {
|
|
13
|
-
mounted.current = false;
|
|
14
|
-
};
|
|
15
|
-
}, []);
|
|
16
|
-
return mounted;
|
|
17
|
-
}
|
|
18
|
-
exports.useIsMounted = useIsMounted;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { LRUCache } from '@rh-support/utils';
|
|
2
|
-
export declare function useLRUCache<K, V>(maxSize: number): {
|
|
3
|
-
setInCache: (key: K, value: V) => void;
|
|
4
|
-
getFromCache: (key: K) => V;
|
|
5
|
-
clearCache: () => void;
|
|
6
|
-
cache: LRUCache<K, V>;
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=useLRUCache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLRUCache.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLRUCache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAK7C,wBAAgB,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM;sBAIpB,CAAC,SAAS,CAAC;wBAKT,CAAC;;;EAc/B"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLRUCache = void 0;
|
|
4
|
-
const utils_1 = require("@rh-support/utils");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const useForceUpdate_1 = require("./useForceUpdate");
|
|
7
|
-
function useLRUCache(maxSize) {
|
|
8
|
-
const lruCacheRef = react_1.useRef(new utils_1.LRUCache(maxSize));
|
|
9
|
-
const forceUpdate = useForceUpdate_1.useForceUpdate();
|
|
10
|
-
const setInCache = (key, value) => {
|
|
11
|
-
lruCacheRef.current.set(key, value);
|
|
12
|
-
forceUpdate();
|
|
13
|
-
};
|
|
14
|
-
const getFromCache = (key) => {
|
|
15
|
-
return lruCacheRef.current.get(key);
|
|
16
|
-
};
|
|
17
|
-
const clearCache = () => {
|
|
18
|
-
lruCacheRef.current.clear();
|
|
19
|
-
forceUpdate();
|
|
20
|
-
};
|
|
21
|
-
return {
|
|
22
|
-
setInCache,
|
|
23
|
-
getFromCache,
|
|
24
|
-
clearCache,
|
|
25
|
-
cache: lruCacheRef.current,
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
exports.useLRUCache = useLRUCache;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare type Dispatch<A> = (value: A) => void;
|
|
2
|
-
declare type SetStateAction<S> = S | ((prevState: S) => S);
|
|
3
|
-
declare const useLocalStorage: <T>(key: string, initialValue?: T, raw?: boolean) => [T, Dispatch<SetStateAction<T>>];
|
|
4
|
-
export { useLocalStorage };
|
|
5
|
-
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../src/hooks/useLocalStorage.ts"],"names":[],"mappings":"AAEA,aAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;AACtC,aAAK,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AAKnD,QAAA,MAAM,eAAe,WAAY,MAAM,0BAA0B,OAAO,qCA8BvE,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useLocalStorage = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
// For usage please refer
|
|
6
|
-
// https://github.com/streamich/react-use/blob/master/docs/useLocalStorage.md
|
|
7
|
-
const useLocalStorage = (key, initialValue, raw) => {
|
|
8
|
-
const [state, setState] = react_1.useState(() => {
|
|
9
|
-
try {
|
|
10
|
-
const localStorageValue = localStorage.getItem(key);
|
|
11
|
-
if (typeof localStorageValue !== 'string') {
|
|
12
|
-
localStorage.setItem(key, raw ? String(initialValue) : JSON.stringify(initialValue));
|
|
13
|
-
return initialValue;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
return raw ? localStorageValue : JSON.parse(localStorageValue || 'null');
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
catch (_a) {
|
|
20
|
-
// If user is in private mode or has storage restriction
|
|
21
|
-
// localStorage can throw. JSON.parse and JSON.stringify
|
|
22
|
-
// can throw, too.
|
|
23
|
-
return initialValue;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
react_1.useEffect(() => {
|
|
27
|
-
try {
|
|
28
|
-
const serializedState = raw ? String(state) : JSON.stringify(state);
|
|
29
|
-
localStorage.setItem(key, serializedState);
|
|
30
|
-
}
|
|
31
|
-
catch (_a) {
|
|
32
|
-
// If user is in private mode or has storage restriction
|
|
33
|
-
// localStorage can throw. Also JSON.stringify can throw.
|
|
34
|
-
}
|
|
35
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
-
}, [state]);
|
|
37
|
-
return [state, setState];
|
|
38
|
-
};
|
|
39
|
-
exports.useLocalStorage = useLocalStorage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useOnScreen.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnScreen.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,GAAG,KAAA,WAe9B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useOnScreen = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function useOnScreen(ref) {
|
|
6
|
-
const [isIntersecting, setIntersecting] = react_1.useState(false);
|
|
7
|
-
const observer = new IntersectionObserver(([entry]) => setIntersecting(entry.isIntersecting));
|
|
8
|
-
react_1.useEffect(() => {
|
|
9
|
-
observer.observe(ref.current);
|
|
10
|
-
// Remove the observer as soon as the component is unmounted
|
|
11
|
-
return () => {
|
|
12
|
-
observer.disconnect();
|
|
13
|
-
};
|
|
14
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15
|
-
}, []);
|
|
16
|
-
return isIntersecting;
|
|
17
|
-
}
|
|
18
|
-
exports.useOnScreen = useOnScreen;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,UAAU,EAAE,CAAC,GAAG,IAAI,OAAA,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,YAAY,GAAE,GAAG,EAAO,QAajG"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePolling = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
const refreshInterval = 120 * 1000;
|
|
6
|
-
function usePolling(intervalCb, dependencies = []) {
|
|
7
|
-
const depsRef = react_1.useRef(dependencies);
|
|
8
|
-
const fetch = () => !document.hidden && intervalCb(...depsRef.current);
|
|
9
|
-
depsRef.current = dependencies;
|
|
10
|
-
react_1.useEffect(() => {
|
|
11
|
-
const id = setInterval(fetch, refreshInterval);
|
|
12
|
-
return () => {
|
|
13
|
-
clearInterval(id);
|
|
14
|
-
};
|
|
15
|
-
// setInterval should only be called once and cleared on unmount
|
|
16
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
|
-
}, []);
|
|
18
|
-
}
|
|
19
|
-
exports.usePolling = usePolling;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePrevious.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrevious.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAMtC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.usePrevious = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function usePrevious(value) {
|
|
6
|
-
const ref = react_1.useRef();
|
|
7
|
-
react_1.useEffect(() => {
|
|
8
|
-
ref.current = value;
|
|
9
|
-
}, [value]);
|
|
10
|
-
return ref.current;
|
|
11
|
-
}
|
|
12
|
-
exports.usePrevious = usePrevious;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTitle.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTitle.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,KAAK,KAAA,QASrC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useDocumentTitle = void 0;
|
|
4
|
-
const react_1 = require("react");
|
|
5
|
-
function useDocumentTitle(title) {
|
|
6
|
-
const originalTitle = document.title;
|
|
7
|
-
react_1.useEffect(() => {
|
|
8
|
-
document.title = title;
|
|
9
|
-
return () => {
|
|
10
|
-
document.title = originalTitle;
|
|
11
|
-
};
|
|
12
|
-
}, [title, originalTitle]);
|
|
13
|
-
}
|
|
14
|
-
exports.useDocumentTitle = useDocumentTitle;
|