lbry-redux/src/index.js

322 lines
8.6 KiB
JavaScript
Raw Normal View History

import * as CLAIM_VALUES from 'constants/claim';
2018-04-05 03:57:29 +01:00
import * as ACTIONS from 'constants/action_types';
import * as LICENSES from 'constants/licenses';
import * as PAGES from 'constants/pages';
2018-05-27 21:30:07 +01:00
import * as SETTINGS from 'constants/settings';
2018-10-22 23:31:57 -04:00
import * as SORT_OPTIONS from 'constants/sort_options';
import * as THUMBNAIL_STATUSES from 'constants/thumbnail_upload_statuses';
import * as TRANSACTIONS from 'constants/transaction_types';
2019-09-25 12:30:26 -04:00
import * as TX_LIST from 'constants/transaction_list';
import * as SPEECH_URLS from 'constants/speech_urls';
2019-02-18 11:24:18 -05:00
import { SEARCH_TYPES, SEARCH_OPTIONS } from 'constants/search';
2019-07-02 16:33:57 -04:00
import { DEFAULT_KNOWN_TAGS, DEFAULT_FOLLOWED_TAGS, MATURE_TAGS } from 'constants/tags';
2019-10-31 07:46:42 -04:00
import Lbry, { apiCall } from 'lbry';
2018-04-05 03:57:29 +01:00
import { selectState as selectSearchState } from 'redux/selectors/search';
2018-01-11 13:12:37 +01:00
2018-04-05 03:57:29 +01:00
// constants
2019-02-18 11:24:18 -05:00
export {
ACTIONS,
CLAIM_VALUES,
LICENSES,
2019-02-18 11:24:18 -05:00
THUMBNAIL_STATUSES,
SEARCH_TYPES,
SEARCH_OPTIONS,
SETTINGS,
TRANSACTIONS,
2019-09-25 12:30:26 -04:00
TX_LIST,
2019-02-18 11:24:18 -05:00
SORT_OPTIONS,
PAGES,
2019-07-02 16:33:57 -04:00
DEFAULT_KNOWN_TAGS,
DEFAULT_FOLLOWED_TAGS,
MATURE_TAGS,
SPEECH_URLS,
2019-02-18 11:24:18 -05:00
};
2018-04-05 03:57:29 +01:00
// common
2019-10-31 07:46:42 -04:00
export { Lbry, apiCall };
2018-04-05 03:57:29 +01:00
export {
regexInvalidURI,
regexAddress,
parseURI,
buildURI,
normalizeURI,
isURIValid,
isURIClaimable,
2018-04-24 14:14:47 -04:00
isNameValid,
convertToShareLink,
2018-04-05 03:57:29 +01:00
} from 'lbryURI';
2019-10-14 23:35:38 -04:00
// middlware
export { buildSharedStateMiddleware } from 'redux/middleware/shared-state';
2018-04-05 03:57:29 +01:00
// actions
2018-11-12 13:01:14 -05:00
export { doToast, doDismissToast, doError, doDismissError } from 'redux/actions/notifications';
2018-04-05 03:57:29 +01:00
export {
doFetchClaimsByChannel,
2018-04-05 03:57:29 +01:00
doFetchClaimListMine,
doAbandonClaim,
doResolveUris,
doResolveUri,
doFetchChannelListMine,
doCreateChannel,
doUpdateChannel,
doClaimSearch,
2019-09-12 15:06:49 -04:00
doImportChannel,
2018-04-05 03:57:29 +01:00
} from 'redux/actions/claims';
export { doDeletePurchasedUri, doPurchaseUri, doFileGet } from 'redux/actions/file';
2019-05-21 20:18:07 +01:00
2018-04-05 03:57:29 +01:00
export {
doFetchFileInfo,
doFileList,
doFetchFileInfosAndPublishedClaims,
2018-10-22 23:31:57 -04:00
doSetFileListSort,
2018-04-05 03:57:29 +01:00
} from 'redux/actions/file_info';
export {
doResetThumbnailStatus,
doClearPublish,
doUpdatePublishForm,
doUploadThumbnail,
doPrepareEdit,
doPublish,
2019-07-02 16:33:57 -04:00
doCheckPendingPublishes,
} from 'redux/actions/publish';
export {
doSearch,
doUpdateSearchQuery,
doFocusSearchInput,
doBlurSearchInput,
2019-01-29 11:44:10 -05:00
setSearchApi,
2019-02-18 11:24:18 -05:00
doUpdateSearchOptions,
} from 'redux/actions/search';
2018-04-05 03:57:29 +01:00
export { savePosition } from 'redux/actions/content';
2018-04-05 03:57:29 +01:00
export {
doUpdateBalance,
doBalanceSubscribe,
doFetchTransactions,
doGetNewAddress,
doCheckAddressIsMine,
doSendDraftTransaction,
doSetDraftTransactionAmount,
doSetDraftTransactionAddress,
2018-10-25 12:57:55 -04:00
doSendTip,
2018-07-17 22:55:40 -04:00
doWalletEncrypt,
doWalletDecrypt,
doWalletUnlock,
doWalletStatus,
doSetTransactionListFilter,
2018-11-07 10:55:44 -05:00
doUpdateBlockHeight,
doClearSupport,
2018-04-05 03:57:29 +01:00
} from 'redux/actions/wallet';
export { doToggleTagFollow, doAddTag, doDeleteTag } from 'redux/actions/tags';
2019-06-09 22:45:47 -04:00
2019-06-11 21:14:37 -04:00
export { doCommentList, doCommentCreate } from 'redux/actions/comments';
2019-07-26 10:45:14 -04:00
export { doToggleBlockChannel } from 'redux/actions/blocked';
2019-10-14 23:35:38 -04:00
export { doPopulateSharedUserState, doPreferenceGet, doPreferenceSet } from 'redux/actions/sync';
2019-09-10 14:14:40 -04:00
2018-04-05 03:57:29 +01:00
// utils
2019-07-17 16:50:58 -04:00
export { batchActions } from 'util/batch-actions';
export { parseQueryParams, toQueryString } from 'util/query-params';
export { formatCredits, formatFullPrice, creditsToString } from 'util/format-credits';
export { isClaimNsfw, createNormalizedClaimSearchKey } from 'util/claim';
2018-04-05 03:57:29 +01:00
// reducers
export { claimsReducer } from 'redux/reducers/claims';
export { commentReducer } from 'redux/reducers/comments';
export { contentReducer } from 'redux/reducers/content';
2018-04-05 03:57:29 +01:00
export { fileInfoReducer } from 'redux/reducers/file_info';
export { fileReducer } from 'redux/reducers/file';
2018-04-05 03:57:29 +01:00
export { notificationsReducer } from 'redux/reducers/notifications';
export { publishReducer } from 'redux/reducers/publish';
2018-04-05 03:57:29 +01:00
export { searchReducer } from 'redux/reducers/search';
2019-07-02 16:33:57 -04:00
export { tagsReducer } from 'redux/reducers/tags';
2019-08-02 10:56:32 -04:00
export { blockedReducer } from 'redux/reducers/blocked';
export { walletReducer } from 'redux/reducers/wallet';
2018-04-05 03:57:29 +01:00
// selectors
export { makeSelectContentPositionForUri } from 'redux/selectors/content';
2018-11-12 13:01:14 -05:00
export { selectToast, selectError } from 'redux/selectors/notifications';
2018-04-05 03:57:29 +01:00
2019-05-21 20:18:07 +01:00
export {
selectFailedPurchaseUris,
selectPurchasedUris,
selectPurchaseUriErrorMessage,
2019-05-21 20:18:07 +01:00
selectLastPurchasedUri,
makeSelectStreamingUrlForUri,
} from 'redux/selectors/file';
2018-04-05 03:57:29 +01:00
export {
makeSelectClaimForUri,
makeSelectClaimIsMine,
makeSelectFetchingChannelClaims,
makeSelectClaimsInChannelForPage,
2019-11-21 20:36:06 -05:00
makeSelectTotalPagesInChannelSearch,
makeSelectTotalClaimsInChannelSearch,
2018-04-05 03:57:29 +01:00
makeSelectMetadataForUri,
2019-05-06 13:57:07 -04:00
makeSelectMetadataItemForUri,
makeSelectThumbnailForUri,
makeSelectCoverForUri,
2018-04-05 03:57:29 +01:00
makeSelectTitleForUri,
makeSelectDateForUri,
makeSelectAmountForUri,
2019-06-09 22:45:47 -04:00
makeSelectTagsForUri,
2018-04-05 03:57:29 +01:00
makeSelectContentTypeForUri,
makeSelectIsUriResolving,
makeSelectTotalItemsForChannel,
makeSelectTotalPagesForChannel,
2018-07-10 19:15:39 -04:00
makeSelectNsfwCountFromUris,
makeSelectNsfwCountForChannel,
2019-04-23 15:02:32 -04:00
makeSelectClaimIsNsfw,
2018-08-01 23:31:51 -04:00
makeSelectRecommendedContentForUri,
makeSelectFirstRecommendedFileForUri,
makeSelectChannelForClaimUri,
2018-10-25 12:57:55 -04:00
makeSelectClaimIsPending,
makeSelectPendingByUri,
makeSelectClaimsInChannelForCurrentPageState,
2019-07-08 14:28:14 -04:00
makeSelectShortUrlForUri,
makeSelectCanonicalUrlForUri,
2019-09-04 11:57:48 -04:00
makeSelectPermanentUrlForUri,
2019-08-11 17:30:29 +01:00
makeSelectSupportsForUri,
2018-10-25 12:57:55 -04:00
selectPendingById,
2018-04-05 03:57:29 +01:00
selectClaimsById,
selectClaimsByUri,
selectAllClaimsByChannel,
selectMyClaimsRaw,
selectAbandoningIds,
selectMyActiveClaims,
selectAllFetchingChannelClaims,
selectIsFetchingClaimListMine,
selectPendingClaims,
selectMyClaims,
selectMyClaimsWithoutChannels,
2019-06-11 14:36:01 -04:00
selectMyClaimUrisWithoutChannels,
2018-04-05 03:57:29 +01:00
selectAllMyClaimsByOutpoint,
selectMyClaimsOutpoints,
selectFetchingMyChannels,
selectMyChannelClaims,
selectResolvingUris,
selectPlayingUri,
selectChannelClaimCounts,
selectCurrentChannelPage,
selectFetchingClaimSearch,
2019-07-31 15:14:51 -04:00
selectFetchingClaimSearchByQuery,
selectClaimSearchByQuery,
selectClaimSearchByQueryLastPageReached,
selectUpdatingChannel,
selectUpdateChannelError,
2019-08-27 00:42:52 -04:00
selectCreatingChannel,
2019-09-13 15:52:52 -04:00
selectCreateChannelError,
2019-09-12 15:06:49 -04:00
selectChannelImportPending,
2019-09-25 17:37:21 -04:00
makeSelectMyStreamUrlsForPage,
selectMyStreamUrlsCount,
2018-04-05 03:57:29 +01:00
} from 'redux/selectors/claims';
2019-06-11 21:14:37 -04:00
export { makeSelectCommentsForUri } from 'redux/selectors/comments';
2018-04-05 03:57:29 +01:00
export {
makeSelectFileInfoForUri,
makeSelectDownloadingForUri,
makeSelectLoadingForUri,
selectFileInfosByOutpoint,
selectIsFetchingFileList,
selectIsFetchingFileListDownloadedOrPublished,
selectDownloadingByOutpoint,
selectUrisLoading,
selectFileInfosDownloaded,
selectDownloadingFileInfos,
selectTotalDownloadProgress,
2018-10-22 23:31:57 -04:00
selectFileListDownloadedSort,
selectFileListPublishedSort,
2019-06-09 22:45:47 -04:00
selectDownloadedUris,
2019-08-02 02:21:28 -04:00
makeSelectMediaTypeForUri,
makeSelectUriIsStreamable,
makeSelectDownloadPathForUri,
makeSelectFileNameForUri,
makeSelectFilePartlyDownloaded,
2019-10-03 17:14:35 -04:00
makeSelectSearchDownloadUrlsForPage,
makeSelectSearchDownloadUrlsCount,
2019-09-25 17:37:21 -04:00
selectDownloadUrlsCount,
2018-04-05 03:57:29 +01:00
} from 'redux/selectors/file_info';
export {
makeSelectPublishFormValue,
selectPublishFormValues,
selectIsStillEditing,
selectMyClaimForUri,
selectIsResolvingPublishUris,
selectTakeOverAmount,
} from 'redux/selectors/publish';
2018-04-05 03:57:29 +01:00
export { selectSearchState };
export {
makeSelectSearchUris,
selectSearchValue,
2019-02-18 11:24:18 -05:00
selectSearchOptions,
2018-04-05 03:57:29 +01:00
selectIsSearching,
selectSearchUrisByQuery,
selectSearchBarFocused,
2018-08-14 23:57:35 -04:00
selectSearchSuggestions,
2019-02-18 11:24:18 -05:00
makeSelectQueryWithOptions,
2018-04-05 03:57:29 +01:00
} from 'redux/selectors/search';
export {
selectBalance,
selectTotalBalance,
selectReservedBalance,
selectClaimsBalance,
selectSupportsBalance,
selectTipsBalance,
2018-04-05 03:57:29 +01:00
selectTransactionsById,
2019-05-14 00:50:21 -04:00
selectSupportsByOutpoint,
2019-08-11 17:30:29 +01:00
selectTotalSupports,
2018-04-05 03:57:29 +01:00
selectTransactionItems,
selectRecentTransactions,
selectHasTransactions,
selectIsFetchingTransactions,
selectIsSendingSupport,
selectReceiveAddress,
selectGettingNewAddress,
selectDraftTransaction,
selectDraftTransactionAmount,
selectDraftTransactionAddress,
selectDraftTransactionError,
selectBlocks,
2018-07-17 22:55:40 -04:00
selectWalletIsEncrypted,
selectWalletState,
selectWalletEncryptPending,
selectWalletEncryptSucceeded,
2018-07-18 14:42:34 -04:00
selectWalletEncryptResult,
2018-07-17 22:55:40 -04:00
selectWalletDecryptPending,
selectWalletDecryptSucceeded,
2018-07-18 14:42:34 -04:00
selectWalletDecryptResult,
2018-07-17 22:55:40 -04:00
selectWalletUnlockPending,
selectWalletUnlockSucceeded,
2018-07-18 14:42:34 -04:00
selectWalletUnlockResult,
selectTransactionListFilter,
2019-09-22 22:25:12 -04:00
selectFilteredTransactions,
2019-11-01 13:17:55 -04:00
makeSelectLatestTransactions,
2019-09-22 22:25:12 -04:00
makeSelectFilteredTransactionsForPage,
selectFilteredTransactionCount,
2018-04-05 03:57:29 +01:00
} from 'redux/selectors/wallet';
2019-06-09 22:45:47 -04:00
2019-09-09 14:57:56 -04:00
export {
selectFollowedTags,
selectUnfollowedTags,
makeSelectIsFollowingTag,
} from 'redux/selectors/tags';
2019-07-26 10:45:14 -04:00
2019-08-02 10:56:32 -04:00
export {
selectBlockedChannels,
selectChannelIsBlocked,
selectBlockedChannelsCount,
} from 'redux/selectors/blocked';