diff --git a/.babelrc.js b/.babelrc.js index 00e4e35f9a5cc..08e3e578d3d0e 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -44,16 +44,7 @@ const config = { ], '@babel/plugin-proposal-export-default-from', '@babel/transform-runtime', - [ - 'transform-imports', - { - 'state/selectors': { - transform: 'state/selectors/${member}', - kebabCase: true, - }, - }, - ], - isCalypsoClient && './inline-imports.js', // inline-imports can only occur after transform-imports + isCalypsoClient && './inline-imports.js', ] ), env: { test: { diff --git a/bin/codemods/src/unglobalize-selectors.js b/bin/codemods/src/unglobalize-selectors.js new file mode 100644 index 0000000000000..3131b9fdb04cc --- /dev/null +++ b/bin/codemods/src/unglobalize-selectors.js @@ -0,0 +1,28 @@ +/** @format */ + +import config from './config'; +import { kebabCase } from 'lodash'; + +export default function transformer( file, api ) { + const j = api.jscodeshift; + + return j( file.source ) + .find( j.ImportDeclaration ) + .filter( p => p.node.source.value === 'state/selectors' ) + .forEach( path => { + path.node.specifiers + .map( s => [ s.imported.name, s.local.name ] ) + .sort( ( a, b ) => a[ 0 ].localeCompare( b[ 0 ] ) ) + .map( ( [ name, alias ], i ) => ( { + ...j.importDeclaration( + [ j.importDefaultSpecifier( j.identifier( alias ) ) ], + j.stringLiteral( `state/selectors/${ kebabCase( name ) }` ) + ), + ...( i === 0 ? { comments: path.node.comments } : {} ), + } ) ) + .forEach( i => j( path ).insertBefore( i ) ); + + j( path ).remove(); + } ) + .toSource( config.recastOptions ); +} diff --git a/client/account-recovery/account-recovery-root/index.jsx b/client/account-recovery/account-recovery-root/index.jsx index 2573c25d0f733..40c8e749ff5c3 100644 --- a/client/account-recovery/account-recovery-root/index.jsx +++ b/client/account-recovery/account-recovery-root/index.jsx @@ -25,13 +25,11 @@ import ResetPasswordConfirmForm from 'account-recovery/reset-password-confirm-fo import ResetPasswordSucceeded from 'account-recovery/reset-password-succeeded'; import ResetCodeValidation from 'account-recovery/reset-code-validation'; import { ACCOUNT_RECOVERY_STEPS as STEPS } from 'account-recovery/constants'; -import { - isAccountRecoveryResetOptionsReady, - isAccountRecoveryUserDataReady, - isAccountRecoveryResetPasswordSucceeded, - getAccountRecoveryResetSelectedMethod, - getAccountRecoveryValidationKey, -} from 'state/selectors'; +import getAccountRecoveryResetSelectedMethod from 'state/selectors/get-account-recovery-reset-selected-method'; +import getAccountRecoveryValidationKey from 'state/selectors/get-account-recovery-validation-key'; +import isAccountRecoveryResetOptionsReady from 'state/selectors/is-account-recovery-reset-options-ready'; +import isAccountRecoveryResetPasswordSucceeded from 'state/selectors/is-account-recovery-reset-password-succeeded'; +import isAccountRecoveryUserDataReady from 'state/selectors/is-account-recovery-user-data-ready'; const getPageInfo = ( translate, step ) => { const concatHeadTitle = ( parentTitle, childTitle ) => parentTitle + ' ‹ ' + childTitle; diff --git a/client/account-recovery/forgot-username-form/index.jsx b/client/account-recovery/forgot-username-form/index.jsx index 3a2f2b4f1bb2f..2acc0c630ca1f 100644 --- a/client/account-recovery/forgot-username-form/index.jsx +++ b/client/account-recovery/forgot-username-form/index.jsx @@ -18,10 +18,8 @@ import FormLabel from 'components/forms/form-label'; import FormInput from 'components/forms/form-text-input'; import { fetchResetOptionsByNameAndUrl } from 'state/account-recovery/reset/actions'; -import { - isRequestingAccountRecoveryResetOptions, - getAccountRecoveryResetOptionsError, -} from 'state/selectors'; +import getAccountRecoveryResetOptionsError from 'state/selectors/get-account-recovery-reset-options-error'; +import isRequestingAccountRecoveryResetOptions from 'state/selectors/is-requesting-account-recovery-reset-options'; export class ForgotUsernameFormComponent extends Component { constructor( props ) { diff --git a/client/account-recovery/lost-password-form/index.jsx b/client/account-recovery/lost-password-form/index.jsx index d7eff7a4c213e..d04773d65281a 100644 --- a/client/account-recovery/lost-password-form/index.jsx +++ b/client/account-recovery/lost-password-form/index.jsx @@ -19,10 +19,8 @@ import FormLabel from 'components/forms/form-label'; import FormInput from 'components/forms/form-text-input'; import { fetchResetOptionsByLogin } from 'state/account-recovery/reset/actions'; -import { - isRequestingAccountRecoveryResetOptions, - getAccountRecoveryResetOptionsError, -} from 'state/selectors'; +import getAccountRecoveryResetOptionsError from 'state/selectors/get-account-recovery-reset-options-error'; +import isRequestingAccountRecoveryResetOptions from 'state/selectors/is-requesting-account-recovery-reset-options'; export class LostPasswordFormComponent extends Component { constructor( props ) { diff --git a/client/account-recovery/reset-code-validation/index.js b/client/account-recovery/reset-code-validation/index.js index 3fa2d27243e31..f71086ac9793e 100644 --- a/client/account-recovery/reset-code-validation/index.js +++ b/client/account-recovery/reset-code-validation/index.js @@ -21,10 +21,8 @@ import { validateRequestError, } from 'state/account-recovery/reset/actions'; -import { - getAccountRecoveryValidationError, - getAccountRecoveryValidationKey, -} from 'state/selectors'; +import getAccountRecoveryValidationError from 'state/selectors/get-account-recovery-validation-error'; +import getAccountRecoveryValidationKey from 'state/selectors/get-account-recovery-validation-key'; class ResetPasswordEmailValidation extends Component { getQueryString = () => { diff --git a/client/account-recovery/reset-password-confirm-form/index.jsx b/client/account-recovery/reset-password-confirm-form/index.jsx index a67b541b80c88..73e27a113e12b 100644 --- a/client/account-recovery/reset-password-confirm-form/index.jsx +++ b/client/account-recovery/reset-password-confirm-form/index.jsx @@ -18,13 +18,11 @@ import FormPasswordInput from 'components/forms/form-password-input'; import FormLabel from 'components/forms/form-label'; import FormButton from 'components/forms/form-button'; import { STRONG_PASSWORD } from 'lib/url/support'; -import { - getAccountRecoveryResetUserData, - getAccountRecoveryResetSelectedMethod, - getAccountRecoveryValidationKey, - getAccountRecoveryResetPasswordError, - isRequestingResetPassword, -} from 'state/selectors'; +import getAccountRecoveryResetPasswordError from 'state/selectors/get-account-recovery-reset-password-error'; +import getAccountRecoveryResetSelectedMethod from 'state/selectors/get-account-recovery-reset-selected-method'; +import getAccountRecoveryResetUserData from 'state/selectors/get-account-recovery-reset-user-data'; +import getAccountRecoveryValidationKey from 'state/selectors/get-account-recovery-validation-key'; +import isRequestingResetPassword from 'state/selectors/is-requesting-reset-password'; import { requestResetPassword } from 'state/account-recovery/reset/actions'; class ResetPasswordConfirmForm extends Component { diff --git a/client/account-recovery/reset-password-form/index.jsx b/client/account-recovery/reset-password-form/index.jsx index b2acfc930218b..dac3a6815da37 100644 --- a/client/account-recovery/reset-password-form/index.jsx +++ b/client/account-recovery/reset-password-form/index.jsx @@ -20,12 +20,10 @@ import ResetOptionSet from './reset-option-set'; import ErrorMessage from 'account-recovery/components/account-recovery-error-message'; import { setResetMethod, requestReset } from 'state/account-recovery/reset/actions'; -import { - getAccountRecoveryResetUserData, - getAccountRecoveryResetOptions, - getAccountRecoveryResetRequestError, - isRequestingAccountRecoveryReset, -} from 'state/selectors'; +import getAccountRecoveryResetOptions from 'state/selectors/get-account-recovery-reset-options'; +import getAccountRecoveryResetRequestError from 'state/selectors/get-account-recovery-reset-request-error'; +import getAccountRecoveryResetUserData from 'state/selectors/get-account-recovery-reset-user-data'; +import isRequestingAccountRecoveryReset from 'state/selectors/is-requesting-account-recovery-reset'; export class ResetPasswordFormComponent extends Component { static propTypes = { diff --git a/client/account-recovery/reset-password-sms-form/index.jsx b/client/account-recovery/reset-password-sms-form/index.jsx index 147a4d268ed8f..ac77c28ed5dd1 100644 --- a/client/account-recovery/reset-password-sms-form/index.jsx +++ b/client/account-recovery/reset-password-sms-form/index.jsx @@ -16,12 +16,10 @@ import Card from 'components/card'; import FormTextInput from 'components/forms/form-text-input'; import FormButton from 'components/forms/form-button'; import ErrorMessage from 'account-recovery/components/account-recovery-error-message'; -import { - getAccountRecoveryResetUserData, - getAccountRecoveryResetSelectedMethod, - getAccountRecoveryValidationError, - isValidatingAccountRecoveryKey, -} from 'state/selectors'; +import getAccountRecoveryResetSelectedMethod from 'state/selectors/get-account-recovery-reset-selected-method'; +import getAccountRecoveryResetUserData from 'state/selectors/get-account-recovery-reset-user-data'; +import getAccountRecoveryValidationError from 'state/selectors/get-account-recovery-validation-error'; +import isValidatingAccountRecoveryKey from 'state/selectors/is-validating-account-recovery-key'; import { setValidationKey, diff --git a/client/blocks/all-sites/index.jsx b/client/blocks/all-sites/index.jsx index fc70795777e7c..72056767c99ef 100644 --- a/client/blocks/all-sites/index.jsx +++ b/client/blocks/all-sites/index.jsx @@ -16,7 +16,7 @@ import classNames from 'classnames'; */ import AllSitesIcon from 'my-sites/all-sites-icon'; import Count from 'components/count'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { getCurrentUserVisibleSiteCount } from 'state/current-user/selectors'; class AllSites extends Component { diff --git a/client/blocks/app-banner/index.jsx b/client/blocks/app-banner/index.jsx index 2cdd37358953a..7c47eeb1f9417 100644 --- a/client/blocks/app-banner/index.jsx +++ b/client/blocks/app-banner/index.jsx @@ -18,7 +18,7 @@ import Button from 'components/button'; import Card from 'components/card'; import { getSectionName } from 'state/ui/selectors'; import { getPreference, isFetchingPreferences } from 'state/preferences/selectors'; -import { isNotificationsOpen } from 'state/selectors'; +import isNotificationsOpen from 'state/selectors/is-notifications-open'; import { bumpStat, composeAnalytics, diff --git a/client/blocks/blog-stickers/index.jsx b/client/blocks/blog-stickers/index.jsx index f8f482164b3b5..7c7e13f8cef59 100644 --- a/client/blocks/blog-stickers/index.jsx +++ b/client/blocks/blog-stickers/index.jsx @@ -13,7 +13,8 @@ import React from 'react'; import { connect } from 'react-redux'; import QueryReaderTeams from 'components/data/query-reader-teams'; import QueryBlogStickers from 'components/data/query-blog-stickers'; -import { getReaderTeams, getBlogStickers } from 'state/selectors'; +import getBlogStickers from 'state/selectors/get-blog-stickers'; +import getReaderTeams from 'state/selectors/get-reader-teams'; import BlogStickersList from 'blocks/blog-stickers/list'; import InfoPopover from 'components/info-popover'; import { isAutomatticTeamMember } from 'reader/lib/teams'; diff --git a/client/blocks/calendar-popover/index.jsx b/client/blocks/calendar-popover/index.jsx index 8c88a4a0598d1..1c741dfc557c8 100644 --- a/client/blocks/calendar-popover/index.jsx +++ b/client/blocks/calendar-popover/index.jsx @@ -12,7 +12,9 @@ import { noop, pick } from 'lodash'; /** * Internal dependencies */ -import { getSiteGmtOffset, getSiteTimezoneValue } from 'state/selectors'; +import getSiteGmtOffset from 'state/selectors/get-site-gmt-offset'; + +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; import Popover from 'components/popover'; import PostSchedule from 'components/post-schedule'; diff --git a/client/blocks/comments/post-comment-list.jsx b/client/blocks/comments/post-comment-list.jsx index 6bad549bdf83a..507e3c5b03c28 100644 --- a/client/blocks/comments/post-comment-list.jsx +++ b/client/blocks/comments/post-comment-list.jsx @@ -11,7 +11,7 @@ import { get, size, takeRight, delay } from 'lodash'; /** * Internal dependencies */ -import { getActiveReplyCommentId } from 'state/selectors'; +import getActiveReplyCommentId from 'state/selectors/get-active-reply-comment-id'; import { getPostCommentsTree, commentsFetchingStatus, diff --git a/client/blocks/conversation-follow-button/index.jsx b/client/blocks/conversation-follow-button/index.jsx index 7f18efcf7ec8a..bf49b3beed802 100644 --- a/client/blocks/conversation-follow-button/index.jsx +++ b/client/blocks/conversation-follow-button/index.jsx @@ -14,7 +14,7 @@ import { connect } from 'react-redux'; * Internal dependencies */ import ConversationFollowButton from './button'; -import { isFollowingReaderConversation } from 'state/selectors'; +import isFollowingReaderConversation from 'state/selectors/is-following-reader-conversation'; import { followConversation, muteConversation } from 'state/reader/conversations/actions'; import { getTracksPropertiesForPost } from 'reader/stats'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/blocks/conversations/list.jsx b/client/blocks/conversations/list.jsx index fabfa2564c669..62aaf3312716c 100644 --- a/client/blocks/conversations/list.jsx +++ b/client/blocks/conversations/list.jsx @@ -10,7 +10,7 @@ import { map, zipObject, fill, size, filter, get, compact, partition, min, noop /*** * Internal dependencies */ -import { getActiveReplyCommentId } from 'state/selectors'; +import getActiveReplyCommentId from 'state/selectors/get-active-reply-comment-id'; import PostComment from 'blocks/comments/post-comment'; import { POST_COMMENT_DISPLAY_TYPES } from 'state/comments/constants'; import { diff --git a/client/blocks/daily-post-button/index.jsx b/client/blocks/daily-post-button/index.jsx index a56eb1f932bcc..11c145abce673 100644 --- a/client/blocks/daily-post-button/index.jsx +++ b/client/blocks/daily-post-button/index.jsx @@ -21,7 +21,7 @@ import Button from 'components/button'; import { markPostSeen } from 'state/reader/posts/actions'; import { recordGaEvent, recordAction, recordTrackForPost } from 'reader/stats'; import { getDailyPostType } from './helper'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; import { getSiteSlug } from 'state/sites/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; diff --git a/client/blocks/disconnect-jetpack/index.jsx b/client/blocks/disconnect-jetpack/index.jsx index 719f2fb973f9b..f45fa97128c1f 100644 --- a/client/blocks/disconnect-jetpack/index.jsx +++ b/client/blocks/disconnect-jetpack/index.jsx @@ -28,7 +28,7 @@ import { setAllSitesSelected, navigate } from 'state/ui/actions'; import { successNotice, errorNotice, infoNotice, removeNotice } from 'state/notices/actions'; import { getPlanClass } from 'lib/plans/constants'; import { getSiteSlug, getSiteTitle, getSitePlanSlug } from 'state/sites/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; class DisconnectJetpack extends PureComponent { static propTypes = { diff --git a/client/blocks/domain-to-plan-nudge/index.jsx b/client/blocks/domain-to-plan-nudge/index.jsx index ba4898cf153c2..ab50599163b1f 100644 --- a/client/blocks/domain-to-plan-nudge/index.jsx +++ b/client/blocks/domain-to-plan-nudge/index.jsx @@ -26,7 +26,7 @@ import { } from 'state/sites/plans/selectors'; import QuerySitePlans from 'components/data/query-site-plans'; import formatCurrency from 'lib/format-currency'; -import { isEligibleForDomainToPaidPlanUpsell } from 'state/selectors'; +import isEligibleForDomainToPaidPlanUpsell from 'state/selectors/is-eligible-for-domain-to-paid-plan-upsell'; class DomainToPlanNudge extends Component { static propTypes = { diff --git a/client/blocks/follow-button/index.jsx b/client/blocks/follow-button/index.jsx index d2e03620ec3d9..802f3fb9f8fcf 100644 --- a/client/blocks/follow-button/index.jsx +++ b/client/blocks/follow-button/index.jsx @@ -13,7 +13,7 @@ import { connect } from 'react-redux'; * Internal Dependencies */ import FollowButton from './button'; -import { isFollowing } from 'state/selectors'; +import isFollowing from 'state/selectors/is-following'; import { follow, unfollow } from 'state/reader/follows/actions'; class FollowButtonContainer extends Component { diff --git a/client/blocks/google-my-business-stats-nudge/index.js b/client/blocks/google-my-business-stats-nudge/index.js index 9b5c081a4fb72..6061c6d6d9a82 100644 --- a/client/blocks/google-my-business-stats-nudge/index.js +++ b/client/blocks/google-my-business-stats-nudge/index.js @@ -17,10 +17,8 @@ import Card from 'components/card'; import { recordTracksEvent } from 'state/analytics/actions'; import SectionHeader from 'components/section-header'; import QueryPreferences from 'components/data/query-preferences'; -import { - isGoogleMyBusinessStatsNudgeDismissed, - getGoogleMyBusinessStatsNudgeDismissCount, -} from 'state/selectors'; +import getGoogleMyBusinessStatsNudgeDismissCount from 'state/selectors/get-google-my-business-stats-nudge-dismiss-count'; +import isGoogleMyBusinessStatsNudgeDismissed from 'state/selectors/is-google-my-business-stats-nudge-dismissed'; import { dismissNudge } from './actions'; class GoogleMyBusinessStatsNudge extends Component { diff --git a/client/blocks/image-editor/image-editor-canvas.jsx b/client/blocks/image-editor/image-editor-canvas.jsx index a4e1242d336f4..52c42c7820c62 100644 --- a/client/blocks/image-editor/image-editor-canvas.jsx +++ b/client/blocks/image-editor/image-editor-canvas.jsx @@ -26,7 +26,7 @@ import { setImageEditorCropBounds, setImageEditorImageHasLoaded, } from 'state/ui/editor/image-editor/actions'; -import { getImageEditorIsGreaterThanMinimumDimensions } from 'state/selectors'; +import getImageEditorIsGreaterThanMinimumDimensions from 'state/selectors/get-image-editor-is-greater-than-minimum-dimensions'; export class ImageEditorCanvas extends Component { static propTypes = { diff --git a/client/blocks/image-editor/image-editor-crop.jsx b/client/blocks/image-editor/image-editor-crop.jsx index e84a6421fa4f0..b9e67183e0e26 100644 --- a/client/blocks/image-editor/image-editor-crop.jsx +++ b/client/blocks/image-editor/image-editor-crop.jsx @@ -24,7 +24,7 @@ import { import { AspectRatios } from 'state/ui/editor/image-editor/constants'; import { imageEditorCrop, imageEditorComputedCrop } from 'state/ui/editor/image-editor/actions'; import { defaultCrop } from 'state/ui/editor/image-editor/reducer'; -import { getImageEditorOriginalAspectRatio } from 'state/selectors'; +import getImageEditorOriginalAspectRatio from 'state/selectors/get-image-editor-original-aspect-ratio'; class ImageEditorCrop extends Component { static propTypes = { diff --git a/client/blocks/image-editor/image-editor-toolbar.jsx b/client/blocks/image-editor/image-editor-toolbar.jsx index 0df33b0f3fb68..d6d3c21b755b0 100644 --- a/client/blocks/image-editor/image-editor-toolbar.jsx +++ b/client/blocks/image-editor/image-editor-toolbar.jsx @@ -24,7 +24,7 @@ import { imageEditorFlip, setImageEditorAspectRatio, } from 'state/ui/editor/image-editor/actions'; -import { getImageEditorIsGreaterThanMinimumDimensions } from 'state/selectors'; +import getImageEditorIsGreaterThanMinimumDimensions from 'state/selectors/get-image-editor-is-greater-than-minimum-dimensions'; export class ImageEditorToolbar extends Component { static propTypes = { diff --git a/client/blocks/inline-help/inline-help-contact-view.jsx b/client/blocks/inline-help/inline-help-contact-view.jsx index b658f616cb7b5..0ef9af813b2d4 100644 --- a/client/blocks/inline-help/inline-help-contact-view.jsx +++ b/client/blocks/inline-help/inline-help-contact-view.jsx @@ -15,7 +15,7 @@ import getInlineHelpSupportVariation, { SUPPORT_FORUM, } from 'state/selectors/get-inline-help-support-variation'; import { getHelpSelectedSite } from 'state/help/selectors'; -import { isSupportVariationDetermined } from 'state/selectors'; +import isSupportVariationDetermined from 'state/selectors/is-support-variation-determined'; const InlineHelpContactView = ( { /* eslint-disable no-unused-vars, no-shadow */ diff --git a/client/blocks/inline-help/inline-help-query-support-types.jsx b/client/blocks/inline-help/inline-help-query-support-types.jsx index cb0dcf9c9cbea..59bb453a5bf05 100644 --- a/client/blocks/inline-help/inline-help-query-support-types.jsx +++ b/client/blocks/inline-help/inline-help-query-support-types.jsx @@ -21,7 +21,7 @@ import { getTicketSupportRequestError, } from 'state/help/ticket/selectors'; import isHappychatUserEligible from 'state/happychat/selectors/is-happychat-user-eligible'; -import { isDirectlyUninitialized } from 'state/selectors'; +import isDirectlyUninitialized from 'state/selectors/is-directly-uninitialized'; class QueryInlineHelpSupportTypes extends Component { componentDidMount() { diff --git a/client/blocks/payment-methods/index.jsx b/client/blocks/payment-methods/index.jsx index e1d6bee4012b8..0a857707367ef 100644 --- a/client/blocks/payment-methods/index.jsx +++ b/client/blocks/payment-methods/index.jsx @@ -13,7 +13,7 @@ import Gridicon from 'gridicons'; * Internal dependencies */ import PaymentLogo from 'components/payment-logo'; -import { getCurrentUserPaymentMethods } from 'state/selectors'; +import getCurrentUserPaymentMethods from 'state/selectors/get-current-user-payment-methods'; class PaymentMethods extends Component { renderPaymentMethods = methods => { diff --git a/client/blocks/post-item/index.jsx b/client/blocks/post-item/index.jsx index d9a36717f584e..3e5f7939369dc 100644 --- a/client/blocks/post-item/index.jsx +++ b/client/blocks/post-item/index.jsx @@ -18,7 +18,8 @@ import { getEditorPath } from 'state/ui/editor/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getNormalizedPost } from 'state/posts/selectors'; import { isSingleUserSite } from 'state/sites/selectors'; -import { areAllSitesSingleUser, canCurrentUserEditPost } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; +import canCurrentUserEditPost from 'state/selectors/can-current-user-edit-post'; import { isSharePanelOpen, isMultiSelectEnabled, diff --git a/client/blocks/post-likes/index.jsx b/client/blocks/post-likes/index.jsx index 3a156b6c9aa4b..704e457556c2a 100644 --- a/client/blocks/post-likes/index.jsx +++ b/client/blocks/post-likes/index.jsx @@ -13,7 +13,8 @@ import { localize } from 'i18n-calypso'; */ import Gravatar from 'components/gravatar'; import QueryPostLikes from 'components/data/query-post-likes'; -import { getPostLikes, countPostLikes } from 'state/selectors'; +import countPostLikes from 'state/selectors/count-post-likes'; +import getPostLikes from 'state/selectors/get-post-likes'; import { recordGoogleEvent } from 'state/analytics/actions'; class PostLikes extends React.PureComponent { diff --git a/client/blocks/post-likes/popover.jsx b/client/blocks/post-likes/popover.jsx index c1a52d1caff07..125ea2adda9a4 100644 --- a/client/blocks/post-likes/popover.jsx +++ b/client/blocks/post-likes/popover.jsx @@ -13,7 +13,7 @@ import classnames from 'classnames'; */ import Popover from 'components/popover'; import PostLikes from './index'; -import { getPostLikes } from 'state/selectors'; +import getPostLikes from 'state/selectors/get-post-likes'; function PostLikesPopover( props ) { const { diff --git a/client/blocks/post-share/index.jsx b/client/blocks/post-share/index.jsx index 4c461e7bbcf87..127c31334a0cb 100644 --- a/client/blocks/post-share/index.jsx +++ b/client/blocks/post-share/index.jsx @@ -21,14 +21,12 @@ import QuerySitePlans from 'components/data/query-site-plans'; import Button from 'components/button'; import ButtonGroup from 'components/button-group'; import NoticeAction from 'components/notice/notice-action'; -import { - getPostSharePublishedActions, - getPostShareScheduledActions, - getScheduledPublicizeShareActionTime, - isPublicizeEnabled, - isSchedulingPublicizeShareAction, - isSchedulingPublicizeShareActionError, -} from 'state/selectors'; +import getPostSharePublishedActions from 'state/selectors/get-post-share-published-actions'; +import getPostShareScheduledActions from 'state/selectors/get-post-share-scheduled-actions'; +import getScheduledPublicizeShareActionTime from 'state/selectors/get-scheduled-publicize-share-action-time'; +import isPublicizeEnabled from 'state/selectors/is-publicize-enabled'; +import isSchedulingPublicizeShareAction from 'state/selectors/is-scheduling-publicize-share-action'; +import isSchedulingPublicizeShareActionError from 'state/selectors/is-scheduling-publicize-share-action-error'; import { getSiteSlug, getSitePlanSlug, isJetpackSite } from 'state/sites/selectors'; import { getCurrentUserId, getCurrentUserCurrencyCode } from 'state/current-user/selectors'; diff --git a/client/blocks/post-share/publicize-actions-list.jsx b/client/blocks/post-share/publicize-actions-list.jsx index e626e6b8c3219..3da1186181467 100644 --- a/client/blocks/post-share/publicize-actions-list.jsx +++ b/client/blocks/post-share/publicize-actions-list.jsx @@ -13,7 +13,9 @@ import Gridicon from 'gridicons'; /** * Internal dependencies */ -import { getPostShareScheduledActions, getPostSharePublishedActions } from 'state/selectors'; +import getPostSharePublishedActions from 'state/selectors/get-post-share-published-actions'; + +import getPostShareScheduledActions from 'state/selectors/get-post-share-scheduled-actions'; import QuerySharePostActions from 'components/data/query-share-post-actions/index.jsx'; import SocialLogo from 'social-logos'; import EllipsisMenu from 'components/ellipsis-menu'; diff --git a/client/blocks/privacy-policy-banner/index.jsx b/client/blocks/privacy-policy-banner/index.jsx index bca027cafc250..fc3163db5e232 100644 --- a/client/blocks/privacy-policy-banner/index.jsx +++ b/client/blocks/privacy-policy-banner/index.jsx @@ -19,7 +19,8 @@ import config from 'config'; import PrivacyPolicyDialog from './privacy-policy-dialog'; import QueryPrivacyPolicy from 'components/data/query-privacy-policy'; -import { getPrivacyPolicyByEntity, getCurrentUserRegisterDate } from 'state/selectors'; +import getCurrentUserRegisterDate from 'state/selectors/get-current-user-register-date'; +import getPrivacyPolicyByEntity from 'state/selectors/get-privacy-policy-by-entity'; import { AUTOMATTIC_ENTITY, PRIVACY_POLICY_PREFERENCE } from './constants'; diff --git a/client/blocks/product-purchase-features-list/index.jsx b/client/blocks/product-purchase-features-list/index.jsx index 6fdbc8e4b2d3d..e169104e1f7a3 100644 --- a/client/blocks/product-purchase-features-list/index.jsx +++ b/client/blocks/product-purchase-features-list/index.jsx @@ -41,7 +41,7 @@ import JetpackReturnToDashboard from './jetpack-return-to-dashboard'; import JetpackWordPressCom from './jetpack-wordpress-com'; import MobileApps from './mobile-apps'; import SellOnlinePaypal from './sell-online-paypal'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { isEnabled } from 'config'; import { isWordadsInstantActivationEligible } from 'lib/ads/utils'; import { hasDomainCredit } from 'state/sites/plans/selectors'; diff --git a/client/blocks/product-purchase-features-list/jetpack-backup-security.jsx b/client/blocks/product-purchase-features-list/jetpack-backup-security.jsx index 79cb22b7810fe..dea9e08a30e06 100644 --- a/client/blocks/product-purchase-features-list/jetpack-backup-security.jsx +++ b/client/blocks/product-purchase-features-list/jetpack-backup-security.jsx @@ -12,7 +12,7 @@ import { connect } from 'react-redux'; import PurchaseDetail from 'components/purchase-detail'; import QueryRewindState from 'components/data/query-rewind-state'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; const JetpackBackupSecurity = ( { backupEngine, site, siteId, translate } ) => (
diff --git a/client/blocks/reader-feed-header/index.jsx b/client/blocks/reader-feed-header/index.jsx index 2b29460e10127..969923cdda077 100644 --- a/client/blocks/reader-feed-header/index.jsx +++ b/client/blocks/reader-feed-header/index.jsx @@ -21,7 +21,7 @@ import BlogStickers from 'blocks/blog-stickers'; import ReaderFeedHeaderSiteBadge from './badge'; import ReaderSiteNotificationSettings from 'blocks/reader-site-notification-settings'; import userSettings from 'lib/user-settings'; -import { isFollowing } from 'state/selectors'; +import isFollowing from 'state/selectors/is-following'; class FeedHeader extends Component { static propTypes = { diff --git a/client/blocks/reader-full-post/index.jsx b/client/blocks/reader-full-post/index.jsx index eac5ed5e7a33a..dfa4f91fbdf9d 100644 --- a/client/blocks/reader-full-post/index.jsx +++ b/client/blocks/reader-full-post/index.jsx @@ -62,11 +62,9 @@ import { READER_FULL_POST } from 'reader/follow-sources'; import { getPostByKey } from 'state/reader/posts/selectors'; import isLikedPost from 'state/selectors/is-liked-post'; import QueryPostLikes from 'components/data/query-post-likes'; -import { - getReaderCurrentStream as getCurrentStream, - getReaderStreamPrevItem as getPreviousItem, - getReaderStreamNextItem as getNextItem, -} from 'state/selectors'; +import getCurrentStream from 'state/selectors/get-reader-current-stream'; +import getNextItem from 'state/selectors/get-reader-stream-next-item'; +import getPreviousItem from 'state/selectors/get-reader-stream-prev-item'; export class FullPostView extends React.Component { static propTypes = { diff --git a/client/blocks/reader-post-card/index.jsx b/client/blocks/reader-post-card/index.jsx index b3ebb0ad61216..683f81cebc24f 100644 --- a/client/blocks/reader-post-card/index.jsx +++ b/client/blocks/reader-post-card/index.jsx @@ -31,7 +31,7 @@ import { } from 'reader/discover/helper'; import DiscoverFollowButton from 'reader/discover/follow-button'; import { expandCard as expandCardAction } from 'state/ui/reader/card-expansions/actions'; -import { isReaderCardExpanded } from 'state/selectors'; +import isReaderCardExpanded from 'state/selectors/is-reader-card-expanded'; class ReaderPostCard extends React.Component { static propTypes = { diff --git a/client/blocks/reader-post-options-menu/blog-stickers.jsx b/client/blocks/reader-post-options-menu/blog-stickers.jsx index c9ea50091aef6..dc438cc55e4f8 100644 --- a/client/blocks/reader-post-options-menu/blog-stickers.jsx +++ b/client/blocks/reader-post-options-menu/blog-stickers.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { getBlogStickers } from 'state/selectors'; +import getBlogStickers from 'state/selectors/get-blog-stickers'; import QueryBlogStickers from 'components/data/query-blog-stickers'; import ReaderPostOptionsMenuBlogStickerMenuItem from './blog-sticker-menu-item'; diff --git a/client/blocks/reader-post-options-menu/index.jsx b/client/blocks/reader-post-options-menu/index.jsx index 62e1cc8f7021a..1247882367a81 100644 --- a/client/blocks/reader-post-options-menu/index.jsx +++ b/client/blocks/reader-post-options-menu/index.jsx @@ -26,7 +26,7 @@ import QueryReaderFeed from 'components/data/query-reader-feed'; import QueryReaderSite from 'components/data/query-reader-site'; import QueryReaderTeams from 'components/data/query-reader-teams'; import { isAutomatticTeamMember } from 'reader/lib/teams'; -import { getReaderTeams } from 'state/selectors'; +import getReaderTeams from 'state/selectors/get-reader-teams'; import ReaderPostOptionsMenuBlogStickers from './blog-stickers'; import ConversationFollowButton from 'blocks/conversation-follow-button'; import { shouldShowConversationFollowButton } from 'blocks/conversation-follow-button/helper'; diff --git a/client/blocks/reader-share/index.jsx b/client/blocks/reader-share/index.jsx index 00237b423c833..e404806a74ed8 100644 --- a/client/blocks/reader-share/index.jsx +++ b/client/blocks/reader-share/index.jsx @@ -23,7 +23,7 @@ import Gridicon from 'gridicons'; import * as stats from 'reader/stats'; import { preload } from 'sections-helper'; import SiteSelector from 'components/site-selector'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; function preloadEditor() { preload( 'post-editor' ); diff --git a/client/blocks/reader-site-notification-settings/index.jsx b/client/blocks/reader-site-notification-settings/index.jsx index 32b5dd10ff49f..a561ca7190b68 100644 --- a/client/blocks/reader-site-notification-settings/index.jsx +++ b/client/blocks/reader-site-notification-settings/index.jsx @@ -16,7 +16,7 @@ import ReaderPopover from 'components/reader-popover'; import SegmentedControl from 'components/segmented-control'; import ControlItem from 'components/segmented-control/item'; import FormToggle from 'components/forms/form-toggle'; -import { getReaderFollows } from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; import { subscribeToNewPostEmail, updateNewPostEmailSubscription, diff --git a/client/blocks/reader-subscription-list-item/connected.jsx b/client/blocks/reader-subscription-list-item/connected.jsx index 352a402ce29ee..b34c8cd52a33d 100644 --- a/client/blocks/reader-subscription-list-item/connected.jsx +++ b/client/blocks/reader-subscription-list-item/connected.jsx @@ -14,7 +14,7 @@ import { connect } from 'react-redux'; import connectSite from 'lib/reader-connect-site'; import userSettings from 'lib/user-settings'; import SubscriptionListItem from 'blocks/reader-subscription-list-item'; -import { isFollowing as isFollowingSelector } from 'state/selectors'; +import isFollowingSelector from 'state/selectors/is-following'; class ConnectedSubscriptionListItem extends React.Component { static propTypes = { diff --git a/client/blocks/sharing-preview-pane/index.jsx b/client/blocks/sharing-preview-pane/index.jsx index 79fa6041aad29..caf2eaae10e04 100644 --- a/client/blocks/sharing-preview-pane/index.jsx +++ b/client/blocks/sharing-preview-pane/index.jsx @@ -27,7 +27,7 @@ import { getSiteUserConnections } from 'state/sharing/publicize/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; -import { getSiteIconUrl } from 'state/selectors'; +import getSiteIconUrl from 'state/selectors/get-site-icon-url'; const serviceNames = { facebook: 'Facebook', diff --git a/client/blocks/simple-site-rename-form/index.jsx b/client/blocks/simple-site-rename-form/index.jsx index aba6dd0e2d9f5..c742a420d1625 100644 --- a/client/blocks/simple-site-rename-form/index.jsx +++ b/client/blocks/simple-site-rename-form/index.jsx @@ -24,11 +24,9 @@ import { requestSiteAddressAvailability, clearValidationError, } from 'state/site-rename/actions'; -import { - isRequestingSiteRename, - getSiteAddressAvailabilityPending, - getSiteAddressValidationError, -} from 'state/selectors'; +import getSiteAddressAvailabilityPending from 'state/selectors/get-site-address-availability-pending'; +import getSiteAddressValidationError from 'state/selectors/get-site-address-validation-error'; +import isRequestingSiteRename from 'state/selectors/is-requesting-site-rename'; import { getSelectedSiteId } from 'state/ui/selectors'; const SUBDOMAIN_LENGTH_MINIMUM = 4; diff --git a/client/blocks/site-icon/index.jsx b/client/blocks/site-icon/index.jsx index a987a4d204230..3543932898c47 100644 --- a/client/blocks/site-icon/index.jsx +++ b/client/blocks/site-icon/index.jsx @@ -18,7 +18,9 @@ import Image from 'components/image'; import Spinner from 'components/spinner'; import QuerySites from 'components/data/query-sites'; import { getSite } from 'state/sites/selectors'; -import { getSiteIconUrl, getSiteIconId, isTransientMedia } from 'state/selectors'; +import getSiteIconId from 'state/selectors/get-site-icon-id'; +import getSiteIconUrl from 'state/selectors/get-site-icon-url'; +import isTransientMedia from 'state/selectors/is-transient-media'; import resizeImageUrl from 'lib/resize-image-url'; function SiteIcon( { siteId, site, iconUrl, size, imgSize, isTransientIcon } ) { diff --git a/client/blocks/stats-navigation/index.js b/client/blocks/stats-navigation/index.js index 6f718e968246d..2e6858d28fc1e 100644 --- a/client/blocks/stats-navigation/index.js +++ b/client/blocks/stats-navigation/index.js @@ -15,10 +15,8 @@ import NavItem from 'components/section-nav/item'; import NavTabs from 'components/section-nav/tabs'; import Intervals from './intervals'; import FollowersCount from 'blocks/followers-count'; -import { - isGoogleMyBusinessLocationConnected as isGoogleMyBusinessLocationConnectedSelector, - isSiteStore, -} from 'state/selectors'; +import isGoogleMyBusinessLocationConnectedSelector from 'state/selectors/is-google-my-business-location-connected'; +import isSiteStore from 'state/selectors/is-site-store'; import { isJetpackSite } from 'state/sites/selectors'; import { getCurrentPlan } from 'state/sites/plans/selectors'; import { navItems, intervals as intervalConstants } from './constants'; diff --git a/client/blocks/upload-image/index.jsx b/client/blocks/upload-image/index.jsx index 37765e4963904..9d537c84c4178 100644 --- a/client/blocks/upload-image/index.jsx +++ b/client/blocks/upload-image/index.jsx @@ -23,7 +23,7 @@ import { ERROR_UPLOADING_IMAGE, } from './constants'; import { AspectRatios } from 'state/ui/editor/image-editor/constants'; -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSite } from 'state/sites/selectors'; import Dialog from 'components/dialog'; diff --git a/client/blocks/video-editor/index.jsx b/client/blocks/video-editor/index.jsx index 7d924c5afd346..0d6f0c11ac5fe 100644 --- a/client/blocks/video-editor/index.jsx +++ b/client/blocks/video-editor/index.jsx @@ -19,7 +19,9 @@ import Notice from 'components/notice'; import DetailPreviewVideo from 'post-editor/media-modal/detail/detail-preview-video'; import VideoEditorControls from './video-editor-controls'; import { updatePoster } from 'state/ui/editor/video-editor/actions'; -import { getPosterUploadProgress, getPosterUrl, shouldShowVideoEditorError } from 'state/selectors'; +import getPosterUploadProgress from 'state/selectors/get-poster-upload-progress'; +import getPosterUrl from 'state/selectors/get-poster-url'; +import shouldShowVideoEditorError from 'state/selectors/should-show-video-editor-error'; class VideoEditor extends Component { static propTypes = { diff --git a/client/components/auto-direction/index.jsx b/client/components/auto-direction/index.jsx index 0e8bff27d3f16..d6a4cdddcf82a 100644 --- a/client/components/auto-direction/index.jsx +++ b/client/components/auto-direction/index.jsx @@ -14,7 +14,7 @@ import { get } from 'lodash'; import { stripHTML } from 'lib/formatting'; import { isRTLCharacter, isLTRCharacter } from './direction'; import Emojify from 'components/emojify'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; const MAX_LENGTH_OF_TEXT_TO_EXAMINE = 100; diff --git a/client/components/chart/bar.jsx b/client/components/chart/bar.jsx index 96c04bbf3d798..750abfb849a2d 100644 --- a/client/components/chart/bar.jsx +++ b/client/components/chart/bar.jsx @@ -12,7 +12,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; class ModuleChartBar extends Component { static propTypes = { diff --git a/client/components/chart/label.jsx b/client/components/chart/label.jsx index 7cf89991cc1d8..41f8222611caa 100644 --- a/client/components/chart/label.jsx +++ b/client/components/chart/label.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; class ModuleChartLabel extends React.Component { static propTypes = { diff --git a/client/components/data/moderate-comment/index.jsx b/client/components/data/moderate-comment/index.jsx index 74bac6e470d91..042c13a47879f 100644 --- a/client/components/data/moderate-comment/index.jsx +++ b/client/components/data/moderate-comment/index.jsx @@ -19,7 +19,7 @@ import { withAnalytics, } from 'state/analytics/actions'; import { changeCommentStatus } from 'state/comments/actions'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { removeNotice, successNotice } from 'state/notices/actions'; class ModerateComment extends Component { diff --git a/client/components/data/query-billing-transaction/index.jsx b/client/components/data/query-billing-transaction/index.jsx index f5839dbf4d649..9b5ad65b5dff3 100644 --- a/client/components/data/query-billing-transaction/index.jsx +++ b/client/components/data/query-billing-transaction/index.jsx @@ -11,7 +11,9 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { getPastBillingTransaction, isRequestingBillingTransaction } from 'state/selectors'; +import getPastBillingTransaction from 'state/selectors/get-past-billing-transaction'; + +import isRequestingBillingTransaction from 'state/selectors/is-requesting-billing-transaction'; import { requestBillingTransaction } from 'state/billing-transactions/individual-transactions/actions'; class QueryBillingTransaction extends Component { diff --git a/client/components/data/query-billing-transactions/index.jsx b/client/components/data/query-billing-transactions/index.jsx index 7147c866b83d4..7b7ddff726958 100644 --- a/client/components/data/query-billing-transactions/index.jsx +++ b/client/components/data/query-billing-transactions/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingBillingTransactions } from 'state/selectors'; +import isRequestingBillingTransactions from 'state/selectors/is-requesting-billing-transactions'; import { requestBillingTransactions } from 'state/billing-transactions/actions'; class QueryBillingTransactions extends Component { diff --git a/client/components/data/query-contact-details-cache/index.jsx b/client/components/data/query-contact-details-cache/index.jsx index 36f4a6bcc943a..38be9942a2e1a 100644 --- a/client/components/data/query-contact-details-cache/index.jsx +++ b/client/components/data/query-contact-details-cache/index.jsx @@ -12,7 +12,9 @@ import { isEmpty } from 'lodash'; /** * Internal dependencies */ -import { getContactDetailsCache, isRequestingContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; + +import isRequestingContactDetailsCache from 'state/selectors/is-requesting-contact-details-cache'; import { requestContactDetailsCache } from 'state/domains/management/actions'; class QueryContactDetailsCache extends Component { diff --git a/client/components/data/query-jetpack-connection/index.jsx b/client/components/data/query-jetpack-connection/index.jsx index 8785422b5a3bd..e7c95a92e0ab1 100644 --- a/client/components/data/query-jetpack-connection/index.jsx +++ b/client/components/data/query-jetpack-connection/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingJetpackConnectionStatus } from 'state/selectors'; +import isRequestingJetpackConnectionStatus from 'state/selectors/is-requesting-jetpack-connection-status'; import { requestJetpackConnectionStatus } from 'state/jetpack/connection/actions'; class QueryJetpackConnection extends Component { diff --git a/client/components/data/query-jetpack-jumpstart/index.jsx b/client/components/data/query-jetpack-jumpstart/index.jsx index 83a79afa794dc..6aa96fd086dd4 100644 --- a/client/components/data/query-jetpack-jumpstart/index.jsx +++ b/client/components/data/query-jetpack-jumpstart/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingJetpackJumpstartStatus } from 'state/selectors'; +import isRequestingJetpackJumpstartStatus from 'state/selectors/is-requesting-jetpack-jumpstart-status'; import { requestJumpstartStatus } from 'state/jetpack/jumpstart/actions'; class QueryJetpackJumpstart extends Component { diff --git a/client/components/data/query-jetpack-modules/index.jsx b/client/components/data/query-jetpack-modules/index.jsx index cd0ec61babfd1..139eff1795545 100644 --- a/client/components/data/query-jetpack-modules/index.jsx +++ b/client/components/data/query-jetpack-modules/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isFetchingJetpackModules } from 'state/selectors'; +import isFetchingJetpackModules from 'state/selectors/is-fetching-jetpack-modules'; import { fetchModuleList } from 'state/jetpack/modules/actions'; class QueryJetpackModules extends Component { diff --git a/client/components/data/query-jetpack-settings/README.md b/client/components/data/query-jetpack-settings/README.md index dee2fe63947ce..ea7ecfd8584ae 100644 --- a/client/components/data/query-jetpack-settings/README.md +++ b/client/components/data/query-jetpack-settings/README.md @@ -12,7 +12,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { map } from 'lodash'; -import { getJetpackSettings } from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; import QueryJetpackSettings from 'components/data/query-jetpack-settings'; function MyJetpackSettings( { settings, siteId } ) { diff --git a/client/components/data/query-jetpack-settings/index.jsx b/client/components/data/query-jetpack-settings/index.jsx index c76cb71ae1d86..9aea3b5e1b890 100644 --- a/client/components/data/query-jetpack-settings/index.jsx +++ b/client/components/data/query-jetpack-settings/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingJetpackSettings } from 'state/selectors'; +import isRequestingJetpackSettings from 'state/selectors/is-requesting-jetpack-settings'; import { requestJetpackSettings } from 'state/jetpack/settings/actions'; class QueryJetpackSettings extends Component { diff --git a/client/components/data/query-jetpack-user-connection/README.md b/client/components/data/query-jetpack-user-connection/README.md index 3b9735d0dfd6a..222fff3895549 100644 --- a/client/components/data/query-jetpack-user-connection/README.md +++ b/client/components/data/query-jetpack-user-connection/README.md @@ -12,7 +12,7 @@ import React from 'react'; import { connect } from 'react-redux'; import QueryJetpackUserConnection from 'components/data/query-jetpack-user-connection'; import MyJetpackConnectionDataBlock from './data-block'; -import { getJetpackUserConnection } from 'state/selectors'; +import getJetpackUserConnection from 'state/selectors/get-jetpack-user-connection'; function MyJetpackConnectionData( { jetpackConnection } ) { return ( diff --git a/client/components/data/query-jetpack-user-connection/index.jsx b/client/components/data/query-jetpack-user-connection/index.jsx index 7205b6d9dc7c5..fd5e571947819 100644 --- a/client/components/data/query-jetpack-user-connection/index.jsx +++ b/client/components/data/query-jetpack-user-connection/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingJetpackUserConnection } from 'state/selectors'; +import isRequestingJetpackUserConnection from 'state/selectors/is-requesting-jetpack-user-connection'; import { requestJetpackUserConnectionData } from 'state/jetpack/connection/actions'; class QueryJetpackUserConnection extends Component { diff --git a/client/components/data/query-language-names/index.jsx b/client/components/data/query-language-names/index.jsx index 0c622fc059035..9caf7b136907e 100644 --- a/client/components/data/query-language-names/index.jsx +++ b/client/components/data/query-language-names/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { getLocalizedLanguageNames } from 'state/selectors'; +import getLocalizedLanguageNames from 'state/selectors/get-localized-language-names'; import { requestLanguageNames } from 'state/i18n/language-names/actions'; class QueryLanguageNames extends Component { diff --git a/client/components/data/query-locale-suggestions/index.jsx b/client/components/data/query-locale-suggestions/index.jsx index b9ceeb539926d..7ab7b948a0206 100644 --- a/client/components/data/query-locale-suggestions/index.jsx +++ b/client/components/data/query-locale-suggestions/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { getLocaleSuggestions } from 'state/selectors'; +import getLocaleSuggestions from 'state/selectors/get-locale-suggestions'; import { requestLocaleSuggestions } from 'state/i18n/locale-suggestions/actions'; class QueryLocaleSuggestions extends Component { diff --git a/client/components/data/query-order-transaction/index.jsx b/client/components/data/query-order-transaction/index.jsx index ffeb9ea46bbc8..eb14f2ba17561 100644 --- a/client/components/data/query-order-transaction/index.jsx +++ b/client/components/data/query-order-transaction/index.jsx @@ -11,7 +11,8 @@ import { connect } from 'react-redux'; * Internal dependencies */ import { fetchOrderTransaction } from 'state/order-transactions/actions'; -import { getOrderTransactionError, isFetchingOrderTransaction } from 'state/selectors'; +import getOrderTransactionError from 'state/selectors/get-order-transaction-error'; +import isFetchingOrderTransaction from 'state/selectors/is-fetching-order-transaction'; class QueryOrderTransaction extends React.Component { static propTypes = { diff --git a/client/components/data/query-sharing-buttons/index.js b/client/components/data/query-sharing-buttons/index.js index 35105124c144e..d152158d1c27a 100644 --- a/client/components/data/query-sharing-buttons/index.js +++ b/client/components/data/query-sharing-buttons/index.js @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingSharingButtons } from 'state/selectors'; +import isRequestingSharingButtons from 'state/selectors/is-requesting-sharing-buttons'; import { requestSharingButtons } from 'state/sites/sharing-buttons/actions'; class QuerySharingButtons extends Component { diff --git a/client/components/data/query-site-connection-status/index.jsx b/client/components/data/query-site-connection-status/index.jsx index 651cb8c85aaf8..dc40828f24fd2 100644 --- a/client/components/data/query-site-connection-status/index.jsx +++ b/client/components/data/query-site-connection-status/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingSiteConnectionStatus } from 'state/selectors'; +import isRequestingSiteConnectionStatus from 'state/selectors/is-requesting-site-connection-status'; import { requestConnectionStatus } from 'state/sites/connection/actions'; class QuerySiteConnectionStatus extends Component { diff --git a/client/components/data/query-site-monitor-settings/README.md b/client/components/data/query-site-monitor-settings/README.md index 45493eea4b362..a1fb5585a643c 100644 --- a/client/components/data/query-site-monitor-settings/README.md +++ b/client/components/data/query-site-monitor-settings/README.md @@ -12,7 +12,7 @@ import React from 'react'; import { connect } from 'react-redux'; import { localize } from 'i18n-calypso'; import QuerySiteMonitorSettings from 'components/data/query-site-monitor-settings'; -import { getSiteMonitorSettings } from 'state/selectors'; +import getSiteMonitorSettings from 'state/selectors/get-site-monitor-settings'; function ExampleSiteComponent( { siteMonitorSettings, translate } ) { return ( @@ -43,4 +43,4 @@ export default connect( RequiredYes -The site ID for which the monitor settings should be requested. \ No newline at end of file +The site ID for which the monitor settings should be requested. diff --git a/client/components/data/query-site-monitor-settings/index.jsx b/client/components/data/query-site-monitor-settings/index.jsx index c211c7950ef7f..f9be0226b93de 100644 --- a/client/components/data/query-site-monitor-settings/index.jsx +++ b/client/components/data/query-site-monitor-settings/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingSiteMonitorSettings } from 'state/selectors'; +import isRequestingSiteMonitorSettings from 'state/selectors/is-requesting-site-monitor-settings'; import { requestSiteMonitorSettings } from 'state/sites/monitor/actions'; class QuerySiteMonitorSettings extends Component { diff --git a/client/components/data/query-sites/index.jsx b/client/components/data/query-sites/index.jsx index 2a89e875f0310..3ae22eb974a56 100644 --- a/client/components/data/query-sites/index.jsx +++ b/client/components/data/query-sites/index.jsx @@ -15,7 +15,7 @@ import { some, forEach, isEqual, without } from 'lodash'; import { isRequestingSites, isRequestingSite, hasAllSitesList } from 'state/sites/selectors'; import { requestSites, requestSite } from 'state/sites/actions'; import { getPreference } from 'state/preferences/selectors'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; class QuerySites extends Component { componentWillMount() { diff --git a/client/components/data/query-tld-validation-schemas/index.jsx b/client/components/data/query-tld-validation-schemas/index.jsx index 8934f797de6a2..a77953bf7c8d8 100644 --- a/client/components/data/query-tld-validation-schemas/index.jsx +++ b/client/components/data/query-tld-validation-schemas/index.jsx @@ -11,7 +11,7 @@ import { difference, isEmpty, keys } from 'lodash'; /** * Internal dependencies */ -import { getValidationSchemas } from 'state/selectors'; +import getValidationSchemas from 'state/selectors/get-validation-schemas'; import { requestValidationSchemas } from 'state/domains/management/validation-schemas/actions'; export class QueryTldValidationSchemas extends Component { diff --git a/client/components/data/query-whois/index.jsx b/client/components/data/query-whois/index.jsx index 238462de8b5dd..b38ccc0cea900 100644 --- a/client/components/data/query-whois/index.jsx +++ b/client/components/data/query-whois/index.jsx @@ -11,7 +11,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { isRequestingWhois } from 'state/selectors'; +import isRequestingWhois from 'state/selectors/is-requesting-whois'; import { requestWhois } from 'state/domains/management/actions'; class QueryWhois extends Component { diff --git a/client/components/data/sync-reader-follows/index.js b/client/components/data/sync-reader-follows/index.js index 860448746898b..bf2081f8bbcb6 100644 --- a/client/components/data/sync-reader-follows/index.js +++ b/client/components/data/sync-reader-follows/index.js @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal Dependencies */ -import { shouldSyncReaderFollows } from 'state/selectors'; +import shouldSyncReaderFollows from 'state/selectors/should-sync-reader-follows'; import { requestFollows } from 'state/reader/follows/actions'; class SyncReaderFollows extends Component { diff --git a/client/components/domains/registrant-extra-info/ca-form.jsx b/client/components/domains/registrant-extra-info/ca-form.jsx index 4eef089bfff69..dfcb157d37bfa 100644 --- a/client/components/domains/registrant-extra-info/ca-form.jsx +++ b/client/components/domains/registrant-extra-info/ca-form.jsx @@ -13,7 +13,7 @@ import { camelCase, debounce, difference, get, isEmpty, keys, map, pick } from ' /** * Internal dependencies */ -import { getContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; import { getCurrentUserLocale } from 'state/current-user/selectors'; import { updateContactDetailsCache } from 'state/domains/management/actions'; import FormFieldset from 'components/forms/form-fieldset'; diff --git a/client/components/domains/registrant-extra-info/fr-form.jsx b/client/components/domains/registrant-extra-info/fr-form.jsx index 1a3dd4beab9db..1d313f01fb4c4 100644 --- a/client/components/domains/registrant-extra-info/fr-form.jsx +++ b/client/components/domains/registrant-extra-info/fr-form.jsx @@ -14,7 +14,7 @@ import { defaults, get, identity, isEmpty, isString, map, noop, set, toUpper } f /** * Internal dependencies */ -import { getContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; import { updateContactDetailsCache } from 'state/domains/management/actions'; import FormFieldset from 'components/forms/form-fieldset'; import FormLabel from 'components/forms/form-label'; diff --git a/client/components/domains/registrant-extra-info/uk-form.jsx b/client/components/domains/registrant-extra-info/uk-form.jsx index 239b28cd18219..73469c5d0e9e9 100644 --- a/client/components/domains/registrant-extra-info/uk-form.jsx +++ b/client/components/domains/registrant-extra-info/uk-form.jsx @@ -13,7 +13,7 @@ import { camelCase, difference, filter, get, includes, isEmpty, keys, map, pick /** * Internal dependencies */ -import { getContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; import { updateContactDetailsCache } from 'state/domains/management/actions'; import FormInputValidation from 'components/forms/form-input-validation'; import FormFieldset from 'components/forms/form-fieldset'; diff --git a/client/components/language-picker/README.md b/client/components/language-picker/README.md index ba9312f35ecc1..b0c7b415b9f0f 100644 --- a/client/components/language-picker/README.md +++ b/client/components/language-picker/README.md @@ -11,7 +11,7 @@ React component used to display a Language Picker. import React, { PureComponent } from 'react'; import { connect } from 'react-redux'; import LanguagePicker from 'components/language-picker'; -import { getUserSetting } from 'state/selectors'; +import getUserSetting from 'state/selectors/get-user-setting'; import { saveUserSettings } from 'state/user-settings/actions'; const languages = [ diff --git a/client/components/language-picker/modal.jsx b/client/components/language-picker/modal.jsx index 063d6c33cff10..20a6fad794bd8 100644 --- a/client/components/language-picker/modal.jsx +++ b/client/components/language-picker/modal.jsx @@ -31,7 +31,7 @@ import SectionNav from 'components/section-nav'; import SectionNavTabs from 'components/section-nav/tabs'; import SectionNavTabItem from 'components/section-nav/item'; import Search from 'components/search'; -import { getLocalizedLanguageNames } from 'state/selectors'; +import getLocalizedLanguageNames from 'state/selectors/get-localized-language-names'; import { getLanguageGroupByCountryCode, getLanguageGroupById } from './utils'; import { LANGUAGE_GROUPS, DEFAULT_LANGUAGE_GROUP } from './constants'; diff --git a/client/components/locale-suggestions/index.jsx b/client/components/locale-suggestions/index.jsx index b1283b7ff93a0..fa6b139f685d3 100644 --- a/client/components/locale-suggestions/index.jsx +++ b/client/components/locale-suggestions/index.jsx @@ -15,7 +15,7 @@ import { addLocaleToPath, getLanguage } from 'lib/i18n-utils'; import LocaleSuggestionsListItem from './list-item'; import QueryLocaleSuggestions from 'components/data/query-locale-suggestions'; import Notice from 'components/notice'; -import { getLocaleSuggestions } from 'state/selectors'; +import getLocaleSuggestions from 'state/selectors/get-locale-suggestions'; import switchLocale from 'lib/i18n-utils/switch-locale'; export class LocaleSuggestions extends Component { diff --git a/client/components/payment-country-select/index.jsx b/client/components/payment-country-select/index.jsx index 76fab77bb4a40..4d34eb2cb1b06 100644 --- a/client/components/payment-country-select/index.jsx +++ b/client/components/payment-country-select/index.jsx @@ -12,7 +12,7 @@ import { filter, isFunction, noop, omit } from 'lodash'; * Internal dependencies */ import CountrySelect from 'my-sites/domains/components/form/country-select'; -import { getPaymentCountryCode } from 'state/selectors'; +import getPaymentCountryCode from 'state/selectors/get-payment-country-code'; import { setPaymentCountryCode } from 'state/ui/payment/actions'; export class PaymentCountrySelect extends Component { diff --git a/client/components/plans/plans-skip-button/index.jsx b/client/components/plans/plans-skip-button/index.jsx index d6a2b618e3d32..05f3fe473034c 100644 --- a/client/components/plans/plans-skip-button/index.jsx +++ b/client/components/plans/plans-skip-button/index.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; */ import Button from 'components/button'; import Gridicon from 'gridicons'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; export const PlansSkipButton = ( { onClick, isRtl, translate = identity } ) => (
diff --git a/client/components/popover/index.jsx b/client/components/popover/index.jsx index 79dc6daeb8d83..3f15a7ed83999 100644 --- a/client/components/popover/index.jsx +++ b/client/components/popover/index.jsx @@ -23,7 +23,7 @@ import { constrainLeft, offset, } from './util'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; /** * Module variables diff --git a/client/components/post-schedule/clock.jsx b/client/components/post-schedule/clock.jsx index 01297bbc5783a..e21954f2e00b5 100644 --- a/client/components/post-schedule/clock.jsx +++ b/client/components/post-schedule/clock.jsx @@ -15,7 +15,7 @@ import { noop } from 'lodash'; */ import ControlItem from 'components/segmented-control/item'; import InfoPopover from 'components/info-popover'; -import { getSiteSetting } from 'state/selectors'; +import getSiteSetting from 'state/selectors/get-site-setting'; import SegmentedControl from 'components/segmented-control'; import { isMobile } from 'lib/viewport'; diff --git a/client/components/rewind-credentials-form/index.jsx b/client/components/rewind-credentials-form/index.jsx index e9d10bfe6be00..76ac17b011519 100644 --- a/client/components/rewind-credentials-form/index.jsx +++ b/client/components/rewind-credentials-form/index.jsx @@ -24,7 +24,8 @@ import Gridicon from 'gridicons'; import QueryRewindState from 'components/data/query-rewind-state'; import { deleteCredentials, updateCredentials } from 'state/jetpack/credentials/actions'; import { getSiteSlug } from 'state/sites/selectors'; -import { getRewindState, getJetpackCredentialsUpdateStatus } from 'state/selectors'; +import getJetpackCredentialsUpdateStatus from 'state/selectors/get-jetpack-credentials-update-status'; +import getRewindState from 'state/selectors/get-rewind-state'; export class RewindCredentialsForm extends Component { static propTypes = { diff --git a/client/components/search-sites/index.js b/client/components/search-sites/index.js index e91f59a2a5194..3f669f04ca85e 100644 --- a/client/components/search-sites/index.js +++ b/client/components/search-sites/index.js @@ -11,7 +11,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; const matches = ( item, term, keys ) => keys.some( diff --git a/client/components/site-selector-modal/index.jsx b/client/components/site-selector-modal/index.jsx index 211e901ebb0a1..576156bc36c84 100644 --- a/client/components/site-selector-modal/index.jsx +++ b/client/components/site-selector-modal/index.jsx @@ -17,7 +17,8 @@ import { localize } from 'i18n-calypso'; import Dialog from 'components/dialog'; import Button from 'components/button'; import SitesDropdown from 'components/sites-dropdown'; -import { getPrimarySiteId, getVisibleSites } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; +import getVisibleSites from 'state/selectors/get-visible-sites'; class SiteSelectorModal extends Component { static propTypes = { diff --git a/client/components/site-selector/index.jsx b/client/components/site-selector/index.jsx index d6105d901208c..b35760620d6c1 100644 --- a/client/components/site-selector/index.jsx +++ b/client/components/site-selector/index.jsx @@ -20,7 +20,10 @@ import { getPreference } from 'state/preferences/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; import { getSelectedSite } from 'state/ui/selectors'; import { getSite, hasAllSitesList } from 'state/sites/selectors'; -import { areAllSitesSingleUser, getSites, getVisibleSites, hasLoadedSites } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; +import getSites from 'state/selectors/get-sites'; +import getVisibleSites from 'state/selectors/get-visible-sites'; +import hasLoadedSites from 'state/selectors/has-loaded-sites'; import AllSites from 'blocks/all-sites'; import Site from 'blocks/site'; import SitePlaceholder from 'blocks/site/placeholder'; diff --git a/client/components/sites-dropdown/index.jsx b/client/components/sites-dropdown/index.jsx index 93f9887e1591e..a871390d994b6 100644 --- a/client/components/sites-dropdown/index.jsx +++ b/client/components/sites-dropdown/index.jsx @@ -17,7 +17,7 @@ import Gridicon from 'gridicons'; import Site from 'blocks/site'; import SitePlaceholder from 'blocks/site/placeholder'; import SiteSelector from 'components/site-selector'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; import { getCurrentUser } from 'state/current-user/selectors'; export class SitesDropdown extends PureComponent { diff --git a/client/components/timezone/index.jsx b/client/components/timezone/index.jsx index a68061f8c6fbd..578a6e5def979 100644 --- a/client/components/timezone/index.jsx +++ b/client/components/timezone/index.jsx @@ -14,7 +14,8 @@ import { localize } from 'i18n-calypso'; * Internal dependencies */ import QueryTimezones from 'components/data/query-timezones'; -import { getRawOffsets, getTimezones } from 'state/selectors'; +import getRawOffsets from 'state/selectors/get-raw-offsets'; +import getTimezones from 'state/selectors/get-timezones'; class Timezone extends Component { onSelect = event => { diff --git a/client/components/tinymce/index.jsx b/client/components/tinymce/index.jsx index 14809f7e22f1b..be1eaaff42944 100644 --- a/client/components/tinymce/index.jsx +++ b/client/components/tinymce/index.jsx @@ -87,7 +87,8 @@ import i18n from './i18n'; import { isMobile } from 'lib/viewport'; import config from 'config'; import { decodeEntities, wpautop, removep } from 'lib/formatting'; -import { isRtl as isRtlSelector, getCurrentLocaleSlug } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; +import isRtlSelector from 'state/selectors/is-rtl'; /** * Internal Variables diff --git a/client/components/tinymce/plugins/simple-payments/dialog/index.jsx b/client/components/tinymce/plugins/simple-payments/dialog/index.jsx index aa6a15c8a827c..df2b44fe9ebd2 100644 --- a/client/components/tinymce/plugins/simple-payments/dialog/index.jsx +++ b/client/components/tinymce/plugins/simple-payments/dialog/index.jsx @@ -16,7 +16,7 @@ import { find, isNumber, pick, noop, get, isEmpty } from 'lodash'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSiteSlug } from 'state/sites/selectors'; import { isJetpackSite, isJetpackMinimumVersion } from 'state/sites/selectors'; -import { getSimplePayments } from 'state/selectors'; +import getSimplePayments from 'state/selectors/get-simple-payments'; import QuerySimplePayments from 'components/data/query-simple-payments'; import QuerySitePlans from 'components/data/query-site-plans'; import Dialog from 'components/dialog'; diff --git a/client/components/tinymce/plugins/simple-payments/dialog/product-image.jsx b/client/components/tinymce/plugins/simple-payments/dialog/product-image.jsx index 19ba893db43e9..2d56c41b2b652 100644 --- a/client/components/tinymce/plugins/simple-payments/dialog/product-image.jsx +++ b/client/components/tinymce/plugins/simple-payments/dialog/product-image.jsx @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; */ import { url as mediaUrl } from 'lib/media/utils'; import QueryMedia from 'components/data/query-media'; -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; const ProductImage = ( { siteId, imageId, image } ) => { if ( ! siteId || ! imageId ) { diff --git a/client/components/tinymce/plugins/wpcom-view/views/simple-payments/index.jsx b/client/components/tinymce/plugins/wpcom-view/views/simple-payments/index.jsx index ba751ce24c66f..13b4dfdb254ab 100644 --- a/client/components/tinymce/plugins/wpcom-view/views/simple-payments/index.jsx +++ b/client/components/tinymce/plugins/wpcom-view/views/simple-payments/index.jsx @@ -13,7 +13,8 @@ import { get } from 'lodash'; */ import { next } from 'lib/shortcode'; import { deserialize } from 'components/tinymce/plugins/simple-payments/shortcode-utils'; -import { getMediaItem, getSimplePayments } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; +import getSimplePayments from 'state/selectors/get-simple-payments'; import { getSelectedSiteId } from 'state/ui/selectors'; import formatCurrency from 'lib/format-currency'; import QuerySimplePayments from 'components/data/query-simple-payments'; diff --git a/client/extensions/woocommerce/app/dashboard/required-plugins-install-view.js b/client/extensions/woocommerce/app/dashboard/required-plugins-install-view.js index 5b4aa91401375..f4f08c49bbaed 100644 --- a/client/extensions/woocommerce/app/dashboard/required-plugins-install-view.js +++ b/client/extensions/woocommerce/app/dashboard/required-plugins-install-view.js @@ -27,7 +27,7 @@ import ProgressBar from 'components/progress-bar'; import SetupHeader from './setup/header'; import SetupNotices from './setup/notices'; import { setFinishedInstallOfRequiredPlugins } from 'woocommerce/state/sites/setup-choices/actions'; -import { hasSitePendingAutomatedTransfer } from 'state/selectors'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; import { getAutomatedTransferStatus } from 'state/automated-transfer/selectors'; import { transferStates } from 'state/automated-transfer/constants'; import { recordTrack } from 'woocommerce/lib/analytics'; diff --git a/client/extensions/woocommerce/app/dashboard/setup/store-location.js b/client/extensions/woocommerce/app/dashboard/setup/store-location.js index e35f44f12e36d..fbf6976b2569d 100644 --- a/client/extensions/woocommerce/app/dashboard/setup/store-location.js +++ b/client/extensions/woocommerce/app/dashboard/setup/store-location.js @@ -21,7 +21,7 @@ import { } from 'woocommerce/state/sites/settings/general/selectors'; import { bumpStat } from 'woocommerce/lib/analytics'; import { errorNotice } from 'state/notices/actions'; -import { getContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; import { isStoreManagementSupportedInCalypsoForCountry } from 'woocommerce/lib/countries'; import { areLocationsLoaded, diff --git a/client/extensions/woocommerce/app/index.js b/client/extensions/woocommerce/app/index.js index c3bf40cafb4fa..d7d76e48a125c 100644 --- a/client/extensions/woocommerce/app/index.js +++ b/client/extensions/woocommerce/app/index.js @@ -11,11 +11,9 @@ import PropTypes from 'prop-types'; * Internal dependencies */ import { areAllRequiredPluginsActive } from 'woocommerce/state/selectors/plugins'; -import { - canCurrentUser, - isSiteAutomatedTransfer, - hasSitePendingAutomatedTransfer, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import Card from 'components/card'; import config from 'config'; import DocumentHead from 'components/data/document-head'; diff --git a/client/extensions/woocommerce/app/settings/email/mailchimp/setup-mailchimp.js b/client/extensions/woocommerce/app/settings/email/mailchimp/setup-mailchimp.js index 450440bf78ba1..c0fb7770fea06 100644 --- a/client/extensions/woocommerce/app/settings/email/mailchimp/setup-mailchimp.js +++ b/client/extensions/woocommerce/app/settings/email/mailchimp/setup-mailchimp.js @@ -17,7 +17,7 @@ import { getSiteTitle } from 'state/sites/selectors'; import { getStoreLocation } from 'woocommerce/state/sites/settings/general/selectors'; import { getCurrencyWithEdits } from 'woocommerce/state/ui/payments/currency/selectors'; import { getCurrentUserEmail } from 'state/current-user/selectors'; -import { getSiteTimezoneValue } from 'state/selectors'; +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; import { isSubmittingApiKey, isApiKeyCorrect, diff --git a/client/extensions/woocommerce/app/store-stats/referrers/chart/index.js b/client/extensions/woocommerce/app/store-stats/referrers/chart/index.js index 25c5c8ed9981e..e7ccc51985fcc 100644 --- a/client/extensions/woocommerce/app/store-stats/referrers/chart/index.js +++ b/client/extensions/woocommerce/app/store-stats/referrers/chart/index.js @@ -16,7 +16,7 @@ import Tabs from 'my-sites/stats/stats-tabs'; import Tab from 'my-sites/stats/stats-tabs/tab'; import { formatValue } from 'woocommerce/app/store-stats/utils'; import { referrerChartTabs as tabs } from 'woocommerce/app/store-stats/constants'; -import { getStoreReferrersByReferrer } from 'state/selectors'; +import getStoreReferrersByReferrer from 'state/selectors/get-store-referrers-by-referrer'; class Chart extends Component { static propTypes = { diff --git a/client/extensions/woocommerce/app/store-stats/referrers/index.js b/client/extensions/woocommerce/app/store-stats/referrers/index.js index 5bc2b62517a5f..3069521e1b745 100644 --- a/client/extensions/woocommerce/app/store-stats/referrers/index.js +++ b/client/extensions/woocommerce/app/store-stats/referrers/index.js @@ -25,7 +25,7 @@ import StoreStatsReferrerWidget from 'woocommerce/app/store-stats/store-stats-re import { sortBySales } from 'woocommerce/app/store-stats/referrers/helpers'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import titlecase from 'to-title-case'; -import { getStoreReferrersByDate } from 'state/selectors'; +import getStoreReferrersByDate from 'state/selectors/get-store-referrers-by-date'; import Chart from './chart'; import { UNITS, noDataMsg } from 'woocommerce/app/store-stats/constants'; diff --git a/client/extensions/woocommerce/app/store-stats/store-stats-referrer-widget/index.js b/client/extensions/woocommerce/app/store-stats/store-stats-referrer-widget/index.js index 5ece89252e2da..8368df380b455 100644 --- a/client/extensions/woocommerce/app/store-stats/store-stats-referrer-widget/index.js +++ b/client/extensions/woocommerce/app/store-stats/store-stats-referrer-widget/index.js @@ -20,7 +20,7 @@ import Card from 'components/card'; import ErrorPanel from 'my-sites/stats/stats-error'; import { getWidgetPath, formatValue } from 'woocommerce/app/store-stats/utils'; import Pagination from 'components/pagination'; -import { getStoreReferrersByDate } from 'state/selectors'; +import getStoreReferrersByDate from 'state/selectors/get-store-referrers-by-date'; class StoreStatsReferrerWidget extends Component { static propTypes = { diff --git a/client/extensions/woocommerce/components/compact-tinymce/index.js b/client/extensions/woocommerce/components/compact-tinymce/index.js index f19ec6117b34f..3f42f42e66f4e 100644 --- a/client/extensions/woocommerce/components/compact-tinymce/index.js +++ b/client/extensions/woocommerce/components/compact-tinymce/index.js @@ -19,7 +19,8 @@ import i18n from 'components/tinymce/i18n'; import { wpautop } from 'lib/formatting'; // TinyMCE plugins & dependencies import wplinkPlugin from 'components/tinymce/plugins/wplink/plugin'; -import { isRtl as isRtlSelector, getCurrentLocaleSlug } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; +import isRtlSelector from 'state/selectors/is-rtl'; class CompactTinyMCE extends Component { static contextTypes = { diff --git a/client/extensions/woocommerce/state/sites/selectors.js b/client/extensions/woocommerce/state/sites/selectors.js index 30204cd0f7649..a89da6f00f312 100644 --- a/client/extensions/woocommerce/state/sites/selectors.js +++ b/client/extensions/woocommerce/state/sites/selectors.js @@ -5,7 +5,7 @@ */ import { getCurrentUserSiteCount } from 'state/current-user/selectors'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSite } from 'state/sites/selectors'; diff --git a/client/extensions/zoninator/components/data/zone-lock/index.jsx b/client/extensions/zoninator/components/data/zone-lock/index.jsx index 2c1efa9d42b67..70bde3c964dec 100644 --- a/client/extensions/zoninator/components/data/zone-lock/index.jsx +++ b/client/extensions/zoninator/components/data/zone-lock/index.jsx @@ -10,7 +10,7 @@ import { connect } from 'react-redux'; /** * Internal dependencies */ -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; import { requestLock, resetLock } from '../../../state/locks/actions'; import { created, expires, maxLockPeriod } from '../../../state/locks/selectors'; diff --git a/client/jetpack-connect/plans.jsx b/client/jetpack-connect/plans.jsx index e2f46e0d68533..d9885a023ca31 100644 --- a/client/jetpack-connect/plans.jsx +++ b/client/jetpack-connect/plans.jsx @@ -34,12 +34,10 @@ import { JPC_PATH_PLANS } from './constants'; import { mc } from 'lib/analytics'; import { PLAN_JETPACK_FREE } from 'lib/plans/constants'; import { recordTracksEvent } from 'state/analytics/actions'; -import { - canCurrentUser, - hasInitializedSites, - isRtl, - isSiteAutomatedTransfer, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import hasInitializedSites from 'state/selectors/has-initialized-sites'; +import isRtl from 'state/selectors/is-rtl'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; const CALYPSO_PLANS_PAGE = '/plans/'; const CALYPSO_MY_PLAN_PAGE = '/plans/my-plan/'; diff --git a/client/jetpack-connect/remote-credentials.js b/client/jetpack-connect/remote-credentials.js index 37b63329f6f4a..2190f3c7d2842 100644 --- a/client/jetpack-connect/remote-credentials.js +++ b/client/jetpack-connect/remote-credentials.js @@ -34,11 +34,9 @@ import { jetpackRemoteInstall, jetpackRemoteInstallUpdateError, } from 'state/jetpack-remote-install/actions'; -import { - getJetpackRemoteInstallErrorCode, - getJetpackRemoteInstallErrorMessage, - isJetpackRemoteInstallComplete, -} from 'state/selectors'; +import getJetpackRemoteInstallErrorCode from 'state/selectors/get-jetpack-remote-install-error-code'; +import getJetpackRemoteInstallErrorMessage from 'state/selectors/get-jetpack-remote-install-error-message'; +import isJetpackRemoteInstallComplete from 'state/selectors/is-jetpack-remote-install-complete'; import { getConnectingSite } from 'state/jetpack-connect/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; import { REMOTE_PATH_AUTH } from './constants'; diff --git a/client/jetpack-onboarding/connect-intro.jsx b/client/jetpack-onboarding/connect-intro.jsx index 477556bb0ed9b..ba72dabcd5678 100644 --- a/client/jetpack-onboarding/connect-intro.jsx +++ b/client/jetpack-onboarding/connect-intro.jsx @@ -14,7 +14,7 @@ import config from 'config'; import Tile from 'components/tile-grid/tile'; import TileGrid from 'components/tile-grid'; import { addQueryArgs } from 'lib/route'; -import { getUnconnectedSiteUrl } from 'state/selectors'; +import getUnconnectedSiteUrl from 'state/selectors/get-unconnected-site-url'; import { isJetpackSite } from 'state/sites/selectors'; class ConnectIntro extends PureComponent { diff --git a/client/jetpack-onboarding/main.jsx b/client/jetpack-onboarding/main.jsx index 3f53839367db9..4e145ab08af5f 100644 --- a/client/jetpack-onboarding/main.jsx +++ b/client/jetpack-onboarding/main.jsx @@ -27,15 +27,13 @@ import { JETPACK_ONBOARDING_STEPS as STEPS, JETPACK_ONBOARDING_STEP_TITLES as STEP_TITLES, } from './constants'; -import { - getJetpackOnboardingCompletedSteps, - getJetpackOnboardingSettings, - getJpoUserHash, - getSiteId, - getUnconnectedSite, - getUnconnectedSiteIdBySlug, - isRequestingJetpackSettings, -} from 'state/selectors'; +import getJetpackOnboardingCompletedSteps from 'state/selectors/get-jetpack-onboarding-completed-steps'; +import getJetpackOnboardingSettings from 'state/selectors/get-jetpack-onboarding-settings'; +import getJpoUserHash from 'state/selectors/get-jpo-user-hash'; +import getSiteId from 'state/selectors/get-site-id'; +import getUnconnectedSite from 'state/selectors/get-unconnected-site'; +import getUnconnectedSiteIdBySlug from 'state/selectors/get-unconnected-site-id-by-slug'; +import isRequestingJetpackSettings from 'state/selectors/is-requesting-jetpack-settings'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite, isRequestingSite, isRequestingSites } from 'state/sites/selectors'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; diff --git a/client/jetpack-onboarding/steps/contact-form.jsx b/client/jetpack-onboarding/steps/contact-form.jsx index f58766d1227f6..14e96d6abf6d7 100644 --- a/client/jetpack-onboarding/steps/contact-form.jsx +++ b/client/jetpack-onboarding/steps/contact-form.jsx @@ -16,7 +16,7 @@ import ConnectSuccess from '../connect-success'; import FormattedHeader from 'components/formatted-header'; import JetpackLogo from 'components/jetpack-logo'; import QuerySites from 'components/data/query-sites'; -import { getJetpackOnboardingPendingSteps } from 'state/selectors'; +import getJetpackOnboardingPendingSteps from 'state/selectors/get-jetpack-onboarding-pending-steps'; import { isJetpackSite } from 'state/sites/selectors'; import { JETPACK_ONBOARDING_STEPS as STEPS } from '../constants'; diff --git a/client/jetpack-onboarding/steps/stats.jsx b/client/jetpack-onboarding/steps/stats.jsx index 9d477b38ca331..3b37cfd10f468 100644 --- a/client/jetpack-onboarding/steps/stats.jsx +++ b/client/jetpack-onboarding/steps/stats.jsx @@ -16,7 +16,7 @@ import ConnectSuccess from '../connect-success'; import FormattedHeader from 'components/formatted-header'; import JetpackLogo from 'components/jetpack-logo'; import QuerySites from 'components/data/query-sites'; -import { getJetpackOnboardingPendingSteps } from 'state/selectors'; +import getJetpackOnboardingPendingSteps from 'state/selectors/get-jetpack-onboarding-pending-steps'; import { isJetpackSite } from 'state/sites/selectors'; import { JETPACK_ONBOARDING_STEPS as STEPS } from '../constants'; diff --git a/client/jetpack-onboarding/steps/summary.jsx b/client/jetpack-onboarding/steps/summary.jsx index e32bf81d5ca24..ab449e086dbf8 100644 --- a/client/jetpack-onboarding/steps/summary.jsx +++ b/client/jetpack-onboarding/steps/summary.jsx @@ -15,7 +15,8 @@ import Card from 'components/card'; import FormattedHeader from 'components/formatted-header'; import CompletedSteps from '../summary-completed-steps'; import NextSteps from '../summary-next-steps'; -import { getSiteUrl, getUnconnectedSiteUrl } from 'state/selectors'; +import getSiteUrl from 'state/selectors/get-site-url'; +import getUnconnectedSiteUrl from 'state/selectors/get-unconnected-site-url'; class JetpackOnboardingSummaryStep extends React.PureComponent { handleSummaryStepClick = ( stepName, stepType ) => () => { diff --git a/client/jetpack-onboarding/steps/woocommerce.jsx b/client/jetpack-onboarding/steps/woocommerce.jsx index 4793a6b3bc49c..9eb490aa706ce 100644 --- a/client/jetpack-onboarding/steps/woocommerce.jsx +++ b/client/jetpack-onboarding/steps/woocommerce.jsx @@ -14,10 +14,8 @@ import { localize } from 'i18n-calypso'; import Button from 'components/button'; import FormattedHeader from 'components/formatted-header'; import { JETPACK_ONBOARDING_STEPS as STEPS } from '../constants'; -import { - getJetpackOnboardingCompletedSteps, - getJetpackOnboardingPendingSteps, -} from 'state/selectors'; +import getJetpackOnboardingCompletedSteps from 'state/selectors/get-jetpack-onboarding-completed-steps'; +import getJetpackOnboardingPendingSteps from 'state/selectors/get-jetpack-onboarding-pending-steps'; class JetpackOnboardingWoocommerceStep extends React.PureComponent { handleWooCommerceInstallation = () => { diff --git a/client/jetpack-onboarding/summary-completed-steps.jsx b/client/jetpack-onboarding/summary-completed-steps.jsx index eb8f6d3e28f92..6b2bf2376f30b 100644 --- a/client/jetpack-onboarding/summary-completed-steps.jsx +++ b/client/jetpack-onboarding/summary-completed-steps.jsx @@ -15,10 +15,8 @@ import { localize } from 'i18n-calypso'; * Internal dependencies */ import Spinner from 'components/spinner'; -import { - getJetpackOnboardingCompletedSteps, - getJetpackOnboardingPendingSteps, -} from 'state/selectors'; +import getJetpackOnboardingCompletedSteps from 'state/selectors/get-jetpack-onboarding-completed-steps'; +import getJetpackOnboardingPendingSteps from 'state/selectors/get-jetpack-onboarding-pending-steps'; import { JETPACK_ONBOARDING_STEP_TITLES as STEP_TITLES, JETPACK_ONBOARDING_STEPS as STEPS, diff --git a/client/jetpack-onboarding/summary-next-steps.jsx b/client/jetpack-onboarding/summary-next-steps.jsx index c5bd78244cc24..286d841a1e35e 100644 --- a/client/jetpack-onboarding/summary-next-steps.jsx +++ b/client/jetpack-onboarding/summary-next-steps.jsx @@ -14,7 +14,7 @@ import { localize } from 'i18n-calypso'; */ import QuerySites from 'components/data/query-sites'; import { getEditorNewPostPath } from 'state/ui/editor/selectors'; -import { getJetpackOnboardingSettings } from 'state/selectors'; +import getJetpackOnboardingSettings from 'state/selectors/get-jetpack-onboarding-settings'; import { isJetpackSite } from 'state/sites/selectors'; const NextSteps = ( { onClick, siteId, steps } ) => ( diff --git a/client/layout/guided-tours/index.js b/client/layout/guided-tours/index.js index 2690bbf4811b3..9dadd4e6a60f3 100644 --- a/client/layout/guided-tours/index.js +++ b/client/layout/guided-tours/index.js @@ -19,7 +19,7 @@ import RootChild from 'components/root-child'; import { getGuidedTourState } from 'state/ui/guided-tours/selectors'; import { getLastAction } from 'state/ui/action-log/selectors'; import { getSectionName, isSectionLoading } from 'state/ui/selectors'; -import { getInitialQueryArguments } from 'state/selectors'; +import getInitialQueryArguments from 'state/selectors/get-initial-query-arguments'; import { nextGuidedTourStep, quitGuidedTour, diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index 0ad1d9a4f8952..aa497093552e7 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -19,7 +19,9 @@ import Gravatar from 'components/gravatar'; import config from 'config'; import { preload } from 'sections-helper'; import ResumeEditing from 'my-sites/resume-editing'; -import { getPrimarySiteId, isDomainOnlySite, isNotificationsOpen } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isNotificationsOpen from 'state/selectors/is-notifications-open'; import { setNextLayoutFocus } from 'state/ui/layout-focus/actions'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSiteSlug } from 'state/sites/selectors'; diff --git a/client/layout/masterbar/logged-out.jsx b/client/layout/masterbar/logged-out.jsx index 7882c5ef7f1ac..3c615ac20d927 100644 --- a/client/layout/masterbar/logged-out.jsx +++ b/client/layout/masterbar/logged-out.jsx @@ -19,7 +19,8 @@ import Item from './item'; import WordPressLogo from 'components/wordpress-logo'; import WordPressWordmark from 'components/wordpress-wordmark'; import { addQueryArgs } from 'lib/route'; -import { getCurrentQueryArguments, getCurrentRoute } from 'state/selectors'; +import getCurrentQueryArguments from 'state/selectors/get-current-query-arguments'; +import getCurrentRoute from 'state/selectors/get-current-route'; import { login } from 'lib/paths'; class MasterbarLoggedOut extends PureComponent { diff --git a/client/layout/masterbar/notifications.jsx b/client/layout/masterbar/notifications.jsx index 53ef1014f237d..587c24f435cbd 100644 --- a/client/layout/masterbar/notifications.jsx +++ b/client/layout/masterbar/notifications.jsx @@ -19,7 +19,7 @@ import AsyncLoad from 'components/async-load'; import store from 'store'; import { recordTracksEvent } from 'state/analytics/actions'; import { toggleNotificationsPanel } from 'state/ui/actions'; -import { isNotificationsOpen } from 'state/selectors'; +import isNotificationsOpen from 'state/selectors/is-notifications-open'; import TranslatableString from 'components/translatable/proptype'; class MasterbarItemNotifications extends Component { diff --git a/client/layout/masterbar/publish.jsx b/client/layout/masterbar/publish.jsx index 860f8d0b1e751..0065468d086f4 100644 --- a/client/layout/masterbar/publish.jsx +++ b/client/layout/masterbar/publish.jsx @@ -18,7 +18,7 @@ import { isMobile } from 'lib/viewport'; import { preload } from 'sections-helper'; import { getSelectedSite } from 'state/ui/selectors'; import MasterbarDrafts from './drafts'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; import TranslatableString from 'components/translatable/proptype'; class MasterbarItemNew extends React.Component { diff --git a/client/lib/plugins/store.js b/client/lib/plugins/store.js index 47e4188fa0e66..8040c0a46bde7 100644 --- a/client/lib/plugins/store.js +++ b/client/lib/plugins/store.js @@ -16,7 +16,7 @@ import PluginsActions from 'lib/plugins/actions'; import versionCompare from 'lib/version-compare'; import { normalizePluginData } from 'lib/plugins/utils'; import { reduxDispatch, reduxGetState } from 'lib/redux-bridge'; -import { getNetworkSites } from 'state/selectors'; +import getNetworkSites from 'state/selectors/get-network-sites'; import { getSite } from 'state/sites/selectors'; import { sitePluginUpdated } from 'state/sites/actions'; diff --git a/client/lib/signup/step-actions.js b/client/lib/signup/step-actions.js index 53b62a4c88c74..d54f99f229906 100644 --- a/client/lib/signup/step-actions.js +++ b/client/lib/signup/step-actions.js @@ -24,7 +24,7 @@ import { isDomainTransfer } from 'lib/products-values'; import { getDesignType } from 'state/signup/steps/design-type/selectors'; import { getSiteTitle } from 'state/signup/steps/site-title/selectors'; import { getSurveyVertical, getSurveySiteType } from 'state/signup/steps/survey/selectors'; -import { getSiteId } from 'state/selectors'; +import getSiteId from 'state/selectors/get-site-id'; import { getSiteGoals } from 'state/signup/steps/site-goals/selectors'; import { getUserExperience } from 'state/signup/steps/user-experience/selectors'; import { requestSites } from 'state/sites/actions'; diff --git a/client/login/magic-login/emailed-login-link-successfully.jsx b/client/login/magic-login/emailed-login-link-successfully.jsx index e1e71be052384..8aa3cf8b24f8b 100644 --- a/client/login/magic-login/emailed-login-link-successfully.jsx +++ b/client/login/magic-login/emailed-login-link-successfully.jsx @@ -17,7 +17,7 @@ import { login } from 'lib/paths'; import Card from 'components/card'; import RedirectWhenLoggedIn from 'components/redirect-when-logged-in'; import { hideMagicLoginRequestForm } from 'state/login/magic-login/actions'; -import { getCurrentLocaleSlug } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; import { recordPageViewWithClientId as recordPageView } from 'state/analytics/actions'; import Gridicon from 'gridicons'; diff --git a/client/login/magic-login/handle-emailed-link-form.jsx b/client/login/magic-login/handle-emailed-link-form.jsx index 30964e4cfba1e..448350e43a1a3 100644 --- a/client/login/magic-login/handle-emailed-link-form.jsx +++ b/client/login/magic-login/handle-emailed-link-form.jsx @@ -24,12 +24,10 @@ import { fetchMagicLoginAuthenticate, showMagicLoginLinkExpiredPage, } from 'state/login/magic-login/actions'; -import { - getMagicLoginCurrentView, - getMagicLoginRequestAuthError, - getMagicLoginRequestedAuthSuccessfully, - isFetchingMagicLoginAuth, -} from 'state/selectors'; +import getMagicLoginCurrentView from 'state/selectors/get-magic-login-current-view'; +import getMagicLoginRequestAuthError from 'state/selectors/get-magic-login-request-auth-error'; +import getMagicLoginRequestedAuthSuccessfully from 'state/selectors/get-magic-login-requested-auth-successfully'; +import isFetchingMagicLoginAuth from 'state/selectors/is-fetching-magic-login-auth'; import { getRedirectToOriginal, getRedirectToSanitized, diff --git a/client/login/magic-login/index.jsx b/client/login/magic-login/index.jsx index 42ae681601d63..fe3a31af9c7d5 100644 --- a/client/login/magic-login/index.jsx +++ b/client/login/magic-login/index.jsx @@ -16,7 +16,8 @@ import page from 'page'; import notices from 'notices'; import { login } from 'lib/paths'; import { CHECK_YOUR_EMAIL_PAGE } from 'state/login/magic-login/constants'; -import { getCurrentLocaleSlug, getMagicLoginCurrentView } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; +import getMagicLoginCurrentView from 'state/selectors/get-magic-login-current-view'; import { hideMagicLoginRequestForm } from 'state/login/magic-login/actions'; import LocaleSuggestions from 'components/locale-suggestions'; import { diff --git a/client/login/magic-login/request-login-email-form.jsx b/client/login/magic-login/request-login-email-form.jsx index 2b0723ab0aecc..30c30a606e4fa 100644 --- a/client/login/magic-login/request-login-email-form.jsx +++ b/client/login/magic-login/request-login-email-form.jsx @@ -16,12 +16,10 @@ import { fetchMagicLoginRequestEmail, hideMagicLoginRequestNotice, } from 'state/login/magic-login/actions'; -import { - getMagicLoginCurrentView, - getMagicLoginRequestEmailError, - getMagicLoginRequestedEmailSuccessfully, - isFetchingMagicLoginEmail, -} from 'state/selectors'; +import getMagicLoginCurrentView from 'state/selectors/get-magic-login-current-view'; +import getMagicLoginRequestedEmailSuccessfully from 'state/selectors/get-magic-login-requested-email-successfully'; +import getMagicLoginRequestEmailError from 'state/selectors/get-magic-login-request-email-error'; +import isFetchingMagicLoginEmail from 'state/selectors/is-fetching-magic-login-email'; import { getRedirectToOriginal } from 'state/login/selectors'; import { CHECK_YOUR_EMAIL_PAGE } from 'state/login/magic-login/constants'; import { recordTracksEventWithClientId as recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/login/wp-login/login-links.jsx b/client/login/wp-login/login-links.jsx index bdcafdd3bc342..22b7377b0a75a 100644 --- a/client/login/wp-login/login-links.jsx +++ b/client/login/wp-login/login-links.jsx @@ -19,7 +19,7 @@ import ExternalLink from 'components/external-link'; import LoggedOutFormBackLink from 'components/logged-out-form/back-link'; import { addQueryArgs } from 'lib/url'; import { getCurrentOAuth2Client } from 'state/ui/oauth2-clients/selectors'; -import { getCurrentQueryArguments } from 'state/selectors'; +import getCurrentQueryArguments from 'state/selectors/get-current-query-arguments'; import { getCurrentUserId } from 'state/current-user/selectors'; import { isEnabled } from 'config'; import { login } from 'lib/paths'; diff --git a/client/me/account/main.jsx b/client/me/account/main.jsx index 1166b4d8c37c9..9457ad77f4d3b 100644 --- a/client/me/account/main.jsx +++ b/client/me/account/main.jsx @@ -44,7 +44,7 @@ import SitesDropdown from 'components/sites-dropdown'; import ColorSchemePicker from 'blocks/color-scheme-picker'; import { successNotice, errorNotice } from 'state/notices/actions'; import { getLanguage, isLocaleVariant, canBeTranslated } from 'lib/i18n-utils'; -import { isRequestingMissingSites } from 'state/selectors'; +import isRequestingMissingSites from 'state/selectors/is-requesting-missing-sites'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import _user from 'lib/user'; import { canDisplayCommunityTranslator } from 'components/community-translator/utils'; diff --git a/client/me/application-passwords/index.jsx b/client/me/application-passwords/index.jsx index e04ea85425eed..f5ba9daff02ec 100644 --- a/client/me/application-passwords/index.jsx +++ b/client/me/application-passwords/index.jsx @@ -27,7 +27,8 @@ import { clearNewApplicationPassword, createApplicationPassword, } from 'state/application-passwords/actions'; -import { getApplicationPasswords, getNewApplicationPassword } from 'state/selectors'; +import getApplicationPasswords from 'state/selectors/get-application-passwords'; +import getNewApplicationPassword from 'state/selectors/get-new-application-password'; import { recordGoogleEvent } from 'state/analytics/actions'; class ApplicationPasswords extends Component { diff --git a/client/me/billing-history/billing-history-table.jsx b/client/me/billing-history/billing-history-table.jsx index 137530b482709..142f3b5e4d1d2 100644 --- a/client/me/billing-history/billing-history-table.jsx +++ b/client/me/billing-history/billing-history-table.jsx @@ -11,7 +11,7 @@ import { localize } from 'i18n-calypso'; */ import { billingHistoryReceipt } from 'me/purchases/paths'; import TransactionsTable from './transactions-table'; -import { isSendingBillingReceiptEmail } from 'state/selectors'; +import isSendingBillingReceiptEmail from 'state/selectors/is-sending-billing-receipt-email'; import { recordGoogleEvent } from 'state/analytics/actions'; import { sendBillingReceiptEmail as sendBillingReceiptEmailAction } from 'state/billing-transactions/actions'; diff --git a/client/me/billing-history/main.jsx b/client/me/billing-history/main.jsx index 738b688011d3b..ea25065f68abe 100644 --- a/client/me/billing-history/main.jsx +++ b/client/me/billing-history/main.jsx @@ -21,7 +21,7 @@ import Main from 'components/main'; import DocumentHead from 'components/data/document-head'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import QueryBillingTransactions from 'components/data/query-billing-transactions'; -import { getPastBillingTransactions } from 'state/selectors'; +import getPastBillingTransactions from 'state/selectors/get-past-billing-transactions'; const BillingHistory = ( { pastTransactions, translate } ) => (
diff --git a/client/me/billing-history/receipt.jsx b/client/me/billing-history/receipt.jsx index 91b1697eb3408..1f50a37e26f8c 100644 --- a/client/me/billing-history/receipt.jsx +++ b/client/me/billing-history/receipt.jsx @@ -19,7 +19,8 @@ import PageViewTracker from 'lib/analytics/page-view-tracker'; import { billingHistory } from 'me/purchases/paths'; import QueryBillingTransaction from 'components/data/query-billing-transaction'; import { groupDomainProducts } from './utils'; -import { getPastBillingTransaction, isPastBillingTransactionError } from 'state/selectors'; +import getPastBillingTransaction from 'state/selectors/get-past-billing-transaction'; +import isPastBillingTransactionError from 'state/selectors/is-past-billing-transaction-error'; import { clearBillingTransactionError, requestBillingTransaction, diff --git a/client/me/billing-history/transactions-header.jsx b/client/me/billing-history/transactions-header.jsx index 724efc495bde7..949b60685e78d 100644 --- a/client/me/billing-history/transactions-header.jsx +++ b/client/me/billing-history/transactions-header.jsx @@ -19,11 +19,9 @@ import DropdownLabel from 'components/select-dropdown/label'; import DropdownSeparator from 'components/select-dropdown/separator'; import { recordGoogleEvent } from 'state/analytics/actions'; import { setApp, setDate } from 'state/ui/billing-transactions/actions'; -import { - getBillingTransactionAppFilterValues, - getBillingTransactionDateFilterValues, - getBillingTransactionFilters, -} from 'state/selectors'; +import getBillingTransactionAppFilterValues from 'state/selectors/get-billing-transaction-app-filter-values'; +import getBillingTransactionDateFilterValues from 'state/selectors/get-billing-transaction-date-filter-values'; +import getBillingTransactionFilters from 'state/selectors/get-billing-transaction-filters'; class TransactionsHeader extends React.Component { state = { diff --git a/client/me/billing-history/transactions-table.jsx b/client/me/billing-history/transactions-table.jsx index 674ff89ca2310..f38eb0a88a6ce 100644 --- a/client/me/billing-history/transactions-table.jsx +++ b/client/me/billing-history/transactions-table.jsx @@ -21,7 +21,8 @@ import TransactionsHeader from './transactions-header'; import { groupDomainProducts } from './utils'; import SearchCard from 'components/search-card'; import { setPage, setQuery } from 'state/ui/billing-transactions/actions'; -import { getFilteredBillingTransactions, getBillingTransactionFilters } from 'state/selectors'; +import getBillingTransactionFilters from 'state/selectors/get-billing-transaction-filters'; +import getFilteredBillingTransactions from 'state/selectors/get-filtered-billing-transactions'; class TransactionsTable extends React.Component { static displayName = 'TransactionsTable'; diff --git a/client/me/billing-history/upcoming-charges-table.jsx b/client/me/billing-history/upcoming-charges-table.jsx index e75eb9c81913c..47042541d449a 100644 --- a/client/me/billing-history/upcoming-charges-table.jsx +++ b/client/me/billing-history/upcoming-charges-table.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; */ import { managePurchase, purchasesRoot } from 'me/purchases/paths'; import TransactionsTable from './transactions-table'; -import { getSiteSlugsForUpcomingTransactions } from 'state/selectors'; +import getSiteSlugsForUpcomingTransactions from 'state/selectors/get-site-slugs-for-upcoming-transactions'; class UpcomingChargesTable extends Component { static propTypes = { diff --git a/client/me/concierge/book/calendar-step.js b/client/me/concierge/book/calendar-step.js index 52a73405995f4..2b8c2a64c3a0d 100644 --- a/client/me/concierge/book/calendar-step.js +++ b/client/me/concierge/book/calendar-step.js @@ -13,7 +13,7 @@ import { connect } from 'react-redux'; */ import HeaderCake from 'components/header-cake'; import CompactCard from 'components/card/compact'; -import { getConciergeSignupForm } from 'state/selectors'; +import getConciergeSignupForm from 'state/selectors/get-concierge-signup-form'; import { getCurrentUserId, getCurrentUserLocale } from 'state/current-user/selectors'; import { bookConciergeAppointment, requestConciergeAvailableTimes } from 'state/concierge/actions'; import AvailableTimePicker from '../shared/available-time-picker'; diff --git a/client/me/concierge/book/info-step.js b/client/me/concierge/book/info-step.js index dcb4467ce7ac2..6c18fc512fc10 100644 --- a/client/me/concierge/book/info-step.js +++ b/client/me/concierge/book/info-step.js @@ -25,7 +25,8 @@ import Timezone from 'components/timezone'; import Site from 'blocks/site'; import { localize } from 'i18n-calypso'; import { updateConciergeSignupForm } from 'state/concierge/actions'; -import { getConciergeSignupForm, getUserSettings } from 'state/selectors'; +import getConciergeSignupForm from 'state/selectors/get-concierge-signup-form'; +import getUserSettings from 'state/selectors/get-user-settings'; import { getCurrentUserLocale } from 'state/current-user/selectors'; import PrimaryHeader from '../shared/primary-header'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/me/concierge/cancel/index.js b/client/me/concierge/cancel/index.js index 2095062ca2b3e..ed2b0c527343e 100644 --- a/client/me/concierge/cancel/index.js +++ b/client/me/concierge/cancel/index.js @@ -22,7 +22,8 @@ import { CONCIERGE_STATUS_CANCELLED, CONCIERGE_STATUS_CANCELLING, } from '../constants'; -import { getConciergeAppointmentDetails, getConciergeSignupForm } from 'state/selectors'; +import getConciergeAppointmentDetails from 'state/selectors/get-concierge-appointment-details'; +import getConciergeSignupForm from 'state/selectors/get-concierge-signup-form'; import { recordTracksEvent } from 'state/analytics/actions'; import PageViewTracker from 'lib/analytics/page-view-tracker'; diff --git a/client/me/concierge/main.js b/client/me/concierge/main.js index c8b58eafdab8d..940c78f4802c9 100644 --- a/client/me/concierge/main.js +++ b/client/me/concierge/main.js @@ -27,7 +27,8 @@ import QuerySites from 'components/data/query-sites'; import QuerySitePlans from 'components/data/query-site-plans'; import { planMatches } from 'lib/plans'; import { GROUP_WPCOM, TYPE_BUSINESS } from 'lib/plans/constants'; -import { getConciergeAvailableTimes, getUserSettings } from 'state/selectors'; +import getConciergeAvailableTimes from 'state/selectors/get-concierge-available-times'; +import getUserSettings from 'state/selectors/get-user-settings'; import { WPCOM_CONCIERGE_SCHEDULE_ID } from './constants'; import { getSite } from 'state/sites/selectors'; import Upsell from './shared/upsell'; diff --git a/client/me/concierge/reschedule/calendar-step.js b/client/me/concierge/reschedule/calendar-step.js index 931fd83e32692..25752f87c0851 100644 --- a/client/me/concierge/reschedule/calendar-step.js +++ b/client/me/concierge/reschedule/calendar-step.js @@ -18,7 +18,8 @@ import FormFieldset from 'components/forms/form-fieldset'; import FormLabel from 'components/forms/form-label'; import FormSettingExplanation from 'components/forms/form-setting-explanation'; import QueryConciergeAppointmentDetails from 'components/data/query-concierge-appointment-details'; -import { getConciergeAppointmentDetails, getConciergeSignupForm } from 'state/selectors'; +import getConciergeAppointmentDetails from 'state/selectors/get-concierge-appointment-details'; +import getConciergeSignupForm from 'state/selectors/get-concierge-signup-form'; import { getCurrentUserLocale } from 'state/current-user/selectors'; import { rescheduleConciergeAppointment, diff --git a/client/me/help/chat-business-concierge-notice/index.jsx b/client/me/help/chat-business-concierge-notice/index.jsx index 88bf9999e8cfd..9d3f9bf0b8ddf 100644 --- a/client/me/help/chat-business-concierge-notice/index.jsx +++ b/client/me/help/chat-business-concierge-notice/index.jsx @@ -13,7 +13,7 @@ import { localize } from 'i18n-calypso'; */ import analytics from 'lib/analytics'; import HelpTeaserButton from '../help-teaser-button'; -import { isBusinessPlanUser } from 'state/selectors'; +import isBusinessPlanUser from 'state/selectors/is-business-plan-user'; class ChatBusinessConciergeNotice extends Component { static propTypes = { diff --git a/client/me/help/help-contact/index.jsx b/client/me/help/help-contact/index.jsx index 1aa00aebd27df..158474ea7fa33 100644 --- a/client/me/help/help-contact/index.jsx +++ b/client/me/help/help-contact/index.jsx @@ -51,12 +51,10 @@ import { initialize as initializeDirectly, } from 'state/help/directly/actions'; import { getSitePlan, isRequestingSites } from 'state/sites/selectors'; -import { - hasUserAskedADirectlyQuestion, - isDirectlyReady, - isDirectlyUninitialized, - getLocalizedLanguageNames, -} from 'state/selectors'; +import getLocalizedLanguageNames from 'state/selectors/get-localized-language-names'; +import hasUserAskedADirectlyQuestion from 'state/selectors/has-user-asked-a-directly-question'; +import isDirectlyReady from 'state/selectors/is-directly-ready'; +import isDirectlyUninitialized from 'state/selectors/is-directly-uninitialized'; import QueryUserPurchases from 'components/data/query-user-purchases'; import { getHelpSelectedSiteId } from 'state/help/selectors'; import { isDefaultLocale } from 'lib/i18n-utils'; diff --git a/client/me/help/help-courses/course.jsx b/client/me/help/help-courses/course.jsx index ce9edf2bc451d..ca95a3d4717e9 100644 --- a/client/me/help/help-courses/course.jsx +++ b/client/me/help/help-courses/course.jsx @@ -16,7 +16,7 @@ import CourseScheduleItem from './course-schedule-item'; import HelpTeaserButton from '../help-teaser-button'; import CourseVideo from './course-video'; import analytics from 'lib/analytics'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; import { getSiteSlug } from 'state/sites/selectors'; class Course extends Component { diff --git a/client/me/notification-settings/blogs-settings/index.jsx b/client/me/notification-settings/blogs-settings/index.jsx index acd128b923d23..71a7537d91c78 100644 --- a/client/me/notification-settings/blogs-settings/index.jsx +++ b/client/me/notification-settings/blogs-settings/index.jsx @@ -14,7 +14,7 @@ import Immutable from 'immutable'; /** * Internal dependencies */ -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { isRequestingSites } from 'state/sites/selectors'; import EmptyContentComponent from 'components/empty-content'; import Blog from './blog'; diff --git a/client/me/notification-settings/settings-form/device-selector.jsx b/client/me/notification-settings/settings-form/device-selector.jsx index 1e6ad41f88beb..fba2e6e1e6e8a 100644 --- a/client/me/notification-settings/settings-form/device-selector.jsx +++ b/client/me/notification-settings/settings-form/device-selector.jsx @@ -12,7 +12,7 @@ import { size, map, first } from 'lodash'; /** * Internal dependencies */ -import { getUserDevices } from 'state/selectors'; +import getUserDevices from 'state/selectors/get-user-devices'; import StreamHeader from './stream-header'; import FormSelect from 'components/forms/form-select'; diff --git a/client/me/notification-settings/settings-form/settings.jsx b/client/me/notification-settings/settings-form/settings.jsx index 32872b568776b..668531da65827 100644 --- a/client/me/notification-settings/settings-form/settings.jsx +++ b/client/me/notification-settings/settings-form/settings.jsx @@ -15,7 +15,7 @@ import Immutable from 'immutable'; import Labels from './labels'; import Stream from './stream'; import StreamSelector from './stream-selector'; -import { getUserDevices } from 'state/selectors'; +import getUserDevices from 'state/selectors/get-user-devices'; /** * Module variables diff --git a/client/me/notification-settings/settings-form/stream-selector.jsx b/client/me/notification-settings/settings-form/stream-selector.jsx index 8c77411ca1a7b..f3721a01768a2 100644 --- a/client/me/notification-settings/settings-form/stream-selector.jsx +++ b/client/me/notification-settings/settings-form/stream-selector.jsx @@ -15,7 +15,7 @@ import Immutable from 'immutable'; */ import FormSelect from 'components/forms/form-select'; import { getLabelForStream } from './locales'; -import { getUserDevices } from 'state/selectors'; +import getUserDevices from 'state/selectors/get-user-devices'; class NotificationSettingsFormStreamSelector extends PureComponent { static propTypes = { diff --git a/client/me/profile-links-add-wordpress/index.jsx b/client/me/profile-links-add-wordpress/index.jsx index 01fb5246ef2af..a458a005ea0da 100644 --- a/client/me/profile-links-add-wordpress/index.jsx +++ b/client/me/profile-links-add-wordpress/index.jsx @@ -16,7 +16,9 @@ import config from 'config'; import FormButton from 'components/forms/form-button'; import ProfileLinksAddWordPressSite from './site'; import { addUserProfileLinks } from 'state/profile-links/actions'; -import { getPublicSites, getSites, isSiteInProfileLinks } from 'state/selectors'; +import getPublicSites from 'state/selectors/get-public-sites'; +import getSites from 'state/selectors/get-sites'; +import isSiteInProfileLinks from 'state/selectors/is-site-in-profile-links'; import { recordGoogleEvent } from 'state/analytics/actions'; class ProfileLinksAddWordPress extends Component { diff --git a/client/me/profile-links/index.jsx b/client/me/profile-links/index.jsx index 549656865a540..b911520c6b06c 100644 --- a/client/me/profile-links/index.jsx +++ b/client/me/profile-links/index.jsx @@ -20,7 +20,8 @@ import Notice from 'components/notice'; import ProfileLinksAddWordPress from 'me/profile-links-add-wordpress'; import ProfileLinksAddOther from 'me/profile-links-add-other'; import { deleteUserProfileLink, resetUserProfileLinkErrors } from 'state/profile-links/actions'; -import { getProfileLinks, getProfileLinksErrorType } from 'state/selectors'; +import getProfileLinks from 'state/selectors/get-profile-links'; +import getProfileLinksErrorType from 'state/selectors/get-profile-links-error-type'; class ProfileLinks extends React.Component { state = { diff --git a/client/me/purchases/confirm-cancel-domain/index.jsx b/client/me/purchases/confirm-cancel-domain/index.jsx index 40594aa052cc9..57e3c31a3e77f 100644 --- a/client/me/purchases/confirm-cancel-domain/index.jsx +++ b/client/me/purchases/confirm-cancel-domain/index.jsx @@ -23,7 +23,7 @@ import FormLabel from 'components/forms/form-label'; import FormSectionHeading from 'components/forms/form-section-heading'; import FormTextarea from 'components/forms/form-textarea'; import HeaderCake from 'components/header-cake'; -import { isDomainOnlySite as isDomainOnly } from 'state/selectors'; +import isDomainOnly from 'state/selectors/is-domain-only-site'; import { getByPurchaseId, hasLoadedUserPurchasesFromServer } from 'state/purchases/selectors'; import { getName as getDomainName } from 'lib/purchases'; import { isDataLoading } from '../utils'; diff --git a/client/me/purchases/manage-purchase/index.jsx b/client/me/purchases/manage-purchase/index.jsx index 0e23e0d494f49..30010b6691a2a 100644 --- a/client/me/purchases/manage-purchase/index.jsx +++ b/client/me/purchases/manage-purchase/index.jsx @@ -41,7 +41,7 @@ import { canEditPaymentDetails, getEditCardDetailsPath, isDataLoading } from '.. import { getByPurchaseId, hasLoadedUserPurchasesFromServer } from 'state/purchases/selectors'; import { getCanonicalTheme } from 'state/themes/selectors'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; -import { isSiteAutomatedTransfer as isSiteAtomic } from 'state/selectors'; +import isSiteAtomic from 'state/selectors/is-site-automated-transfer'; import Gridicon from 'gridicons'; import HeaderCake from 'components/header-cake'; import { diff --git a/client/me/purchases/purchases-list/index.jsx b/client/me/purchases/purchases-list/index.jsx index d8ba552b41599..e665d00451d99 100644 --- a/client/me/purchases/purchases-list/index.jsx +++ b/client/me/purchases/purchases-list/index.jsx @@ -21,7 +21,7 @@ import PurchasesSite from '../purchases-site'; import QueryUserPurchases from 'components/data/query-user-purchases'; import { getCurrentUserId } from 'state/current-user/selectors'; import { getPurchasesBySite } from 'lib/purchases'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { getUserPurchases, hasLoadedUserPurchasesFromServer, diff --git a/client/me/purchases/remove-purchase/index.jsx b/client/me/purchases/remove-purchase/index.jsx index d9cd4759e8912..0dcb395587ab3 100644 --- a/client/me/purchases/remove-purchase/index.jsx +++ b/client/me/purchases/remove-purchase/index.jsx @@ -36,7 +36,8 @@ import { removePurchase } from 'state/purchases/actions'; import hasActiveHappychatSession from 'state/happychat/selectors/has-active-happychat-session'; import isHappychatAvailable from 'state/happychat/selectors/is-happychat-available'; import FormSectionHeading from 'components/forms/form-section-heading'; -import { isDomainOnlySite as isDomainOnly, isSiteAutomatedTransfer } from 'state/selectors'; +import isDomainOnly from 'state/selectors/is-domain-only-site'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { receiveDeletedSite } from 'state/sites/actions'; import { setAllSitesSelected } from 'state/ui/actions'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/ads/main.jsx b/client/my-sites/ads/main.jsx index acebfa9ff5acf..a3424d83a699f 100644 --- a/client/my-sites/ads/main.jsx +++ b/client/my-sites/ads/main.jsx @@ -35,7 +35,7 @@ import { import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; import QueryWordadsStatus from 'components/data/query-wordads-status'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSiteFragment } from 'lib/route'; import { isSiteWordadsUnsafe, isRequestingWordadsStatus } from 'state/wordads/status/selectors'; import { wordadsUnsafeValues } from 'state/wordads/status/schema'; diff --git a/client/my-sites/checklist/checklist-show/index.jsx b/client/my-sites/checklist/checklist-show/index.jsx index 40efe720db3c7..896bd8bc68672 100644 --- a/client/my-sites/checklist/checklist-show/index.jsx +++ b/client/my-sites/checklist/checklist-show/index.jsx @@ -20,7 +20,8 @@ import DocumentHead from 'components/data/document-head'; import { jetpackTasks } from '../jetpack-checklist'; import { requestSiteChecklistTaskUpdate } from 'state/checklist/actions'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isSiteAutomatedTransfer, getSiteChecklist } from 'state/selectors'; +import getSiteChecklist from 'state/selectors/get-site-checklist'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { isJetpackSite, getSiteSlug } from 'state/sites/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; import QuerySiteChecklist from 'components/data/query-site-checklist'; diff --git a/client/my-sites/checkout/cart/cart-plan-ad.jsx b/client/my-sites/checkout/cart/cart-plan-ad.jsx index 804d1b1dba567..f64a208dfb758 100644 --- a/client/my-sites/checkout/cart/cart-plan-ad.jsx +++ b/client/my-sites/checkout/cart/cart-plan-ad.jsx @@ -17,7 +17,7 @@ import { get } from 'lodash'; import CartAd from './cart-ad'; import { cartItems } from 'lib/cart-values'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isDomainOnlySite } from 'state/selectors'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; import { isPlan } from 'lib/products-values'; import { addItem } from 'lib/upgrades/actions'; import { PLAN_PREMIUM } from 'lib/plans/constants'; diff --git a/client/my-sites/checkout/checkout-thank-you/index.jsx b/client/my-sites/checkout/checkout-thank-you/index.jsx index eef9c79a269ed..5a380cc8771f5 100644 --- a/client/my-sites/checkout/checkout-thank-you/index.jsx +++ b/client/my-sites/checkout/checkout-thank-you/index.jsx @@ -76,7 +76,8 @@ import { getSelectedSiteId } from 'state/ui/selectors'; import { isRebrandCitiesSiteUrl } from 'lib/rebrand-cities'; import { GROUP_WPCOM, GROUP_JETPACK, TYPE_BUSINESS } from 'lib/plans/constants'; -import { hasSitePendingAutomatedTransfer, isSiteAutomatedTransfer } from 'state/selectors'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { recordStartTransferClickInThankYou } from 'state/domains/actions'; function getPurchases( props ) { diff --git a/client/my-sites/checkout/checkout-thank-you/pending.jsx b/client/my-sites/checkout/checkout-thank-you/pending.jsx index 1d24ab5d14011..a3f1778764860 100644 --- a/client/my-sites/checkout/checkout-thank-you/pending.jsx +++ b/client/my-sites/checkout/checkout-thank-you/pending.jsx @@ -13,7 +13,9 @@ import { identity } from 'lodash'; /** * Internal dependencies */ -import { getOrderTransaction, getOrderTransactionError } from 'state/selectors'; +import getOrderTransaction from 'state/selectors/get-order-transaction'; + +import getOrderTransactionError from 'state/selectors/get-order-transaction-error'; import { ORDER_TRANSACTION_STATUS } from 'state/order-transactions/constants'; import { errorNotice } from 'state/notices/actions'; import QueryOrderTransaction from 'components/data/query-order-transaction'; diff --git a/client/my-sites/checkout/checkout/checkout.jsx b/client/my-sites/checkout/checkout/checkout.jsx index 665853d0d0f05..8852f253a97c7 100644 --- a/client/my-sites/checkout/checkout/checkout.jsx +++ b/client/my-sites/checkout/checkout/checkout.jsx @@ -48,13 +48,11 @@ import { resetTransaction, setDomainDetails, } from 'lib/upgrades/actions'; -import { - getContactDetailsCache, - getCurrentUserPaymentMethods, - getUpgradePlanSlugFromPath, - isDomainOnlySite, - isEligibleForCheckoutToChecklist, -} from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; +import getCurrentUserPaymentMethods from 'state/selectors/get-current-user-payment-methods'; +import getUpgradePlanSlugFromPath from 'state/selectors/get-upgrade-plan-slug-from-path'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isEligibleForCheckoutToChecklist from 'state/selectors/is-eligible-for-checkout-to-checklist'; import { getStoredCards } from 'state/stored-cards/selectors'; import { isValidFeatureKey, getPlan, findPlansKeys } from 'lib/plans'; import { GROUP_WPCOM } from 'lib/plans/constants'; diff --git a/client/my-sites/checkout/checkout/domain-details-form.jsx b/client/my-sites/checkout/checkout/domain-details-form.jsx index a103bcdfd7562..c61676a6fcbb7 100644 --- a/client/my-sites/checkout/checkout/domain-details-form.jsx +++ b/client/my-sites/checkout/checkout/domain-details-form.jsx @@ -31,7 +31,7 @@ import { addGoogleAppsRegistrationData, } from 'lib/upgrades/actions'; import { cartItems } from 'lib/cart-values'; -import { getContactDetailsCache } from 'state/selectors'; +import getContactDetailsCache from 'state/selectors/get-contact-details-cache'; import { updateContactDetailsCache } from 'state/domains/management/actions'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/comment/comment-delete-warning.jsx b/client/my-sites/comment/comment-delete-warning.jsx index 78e785e098d01..960bc90037093 100644 --- a/client/my-sites/comment/comment-delete-warning.jsx +++ b/client/my-sites/comment/comment-delete-warning.jsx @@ -18,7 +18,7 @@ import { withAnalytics, } from 'state/analytics/actions'; import { deleteComment } from 'state/comments/actions'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; diff --git a/client/my-sites/comment/comment-permalink.jsx b/client/my-sites/comment/comment-permalink.jsx index 3182e20ba3430..9db959dab6d75 100644 --- a/client/my-sites/comment/comment-permalink.jsx +++ b/client/my-sites/comment/comment-permalink.jsx @@ -14,7 +14,7 @@ import { get, isUndefined } from 'lodash'; import Card from 'components/card'; import SectionHeader from 'components/section-header'; import ExternalLink from 'components/external-link'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; const CommentPermalink = ( { isLoading, permaLink, translate } ) => ! isLoading && ( diff --git a/client/my-sites/comment/main.jsx b/client/my-sites/comment/main.jsx index 69fdacfbc8378..aa268ac37aa51 100644 --- a/client/my-sites/comment/main.jsx +++ b/client/my-sites/comment/main.jsx @@ -22,7 +22,8 @@ import CommentDeleteWarning from 'my-sites/comment/comment-delete-warning'; import CommentListHeader from 'my-sites/comments/comment-list/comment-list-header'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import { preventWidows } from 'lib/formatting'; -import { getSiteComment, canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSiteComment from 'state/selectors/get-site-comment'; import getSiteId from 'state/selectors/get-site-id'; export class CommentView extends Component { diff --git a/client/my-sites/comments/comment-list/comment-list-header.jsx b/client/my-sites/comments/comment-list/comment-list-header.jsx index 9773bfdbe3bc5..46602b23e86da 100644 --- a/client/my-sites/comments/comment-list/comment-list-header.jsx +++ b/client/my-sites/comments/comment-list/comment-list-header.jsx @@ -17,7 +17,8 @@ import { convertDateToUserLocation } from 'components/post-schedule/utils'; import { decodeEntities, stripHTML } from 'lib/formatting'; import { gmtOffset, timezone } from 'lib/site/utils'; import { bumpStat, composeAnalytics, recordTracksEvent } from 'state/analytics/actions'; -import { getSiteComments, hasNavigated } from 'state/selectors'; +import getSiteComments from 'state/selectors/get-site-comments'; +import hasNavigated from 'state/selectors/has-navigated'; import { getSitePost } from 'state/posts/selectors'; import { isJetpackSite } from 'state/sites/selectors'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; diff --git a/client/my-sites/comments/comment-list/index.jsx b/client/my-sites/comments/comment-list/index.jsx index 10cd13ee15161..2ecd860c3b2d7 100644 --- a/client/my-sites/comments/comment-list/index.jsx +++ b/client/my-sites/comments/comment-list/index.jsx @@ -22,7 +22,8 @@ import Pagination from 'components/pagination'; import QuerySiteCommentCounts from 'components/data/query-site-comment-counts'; import QuerySiteCommentsList from 'components/data/query-site-comments-list'; import QuerySiteSettings from 'components/data/query-site-settings'; -import { getCommentsPage, getSiteCommentCounts } from 'state/selectors'; +import getCommentsPage from 'state/selectors/get-comments-page'; +import getSiteCommentCounts from 'state/selectors/get-site-comment-counts'; import { bumpStat, composeAnalytics, recordTracksEvent } from 'state/analytics/actions'; import { COMMENTS_PER_PAGE } from '../constants'; diff --git a/client/my-sites/comments/comment-navigation/index.jsx b/client/my-sites/comments/comment-navigation/index.jsx index fa2a481fffece..9fafbc8d153ba 100644 --- a/client/my-sites/comments/comment-navigation/index.jsx +++ b/client/my-sites/comments/comment-navigation/index.jsx @@ -39,7 +39,8 @@ import { unlikeComment, } from 'state/comments/actions'; import { removeNotice, successNotice } from 'state/notices/actions'; -import { getSiteComment, hasPendingCommentRequests } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; +import hasPendingCommentRequests from 'state/selectors/has-pending-comment-requests'; import { NEWEST_FIRST, OLDEST_FIRST } from '../constants'; import { extendAction } from 'state/utils'; diff --git a/client/my-sites/comments/comment-replies-list/index.jsx b/client/my-sites/comments/comment-replies-list/index.jsx index b29c7a233a311..35d5410e0d68e 100644 --- a/client/my-sites/comments/comment-replies-list/index.jsx +++ b/client/my-sites/comments/comment-replies-list/index.jsx @@ -15,7 +15,8 @@ import { map, take } from 'lodash'; import Comment from 'my-sites/comments/comment'; import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; -import { getSiteCommentParentDepth, getSiteCommentRepliesTree } from 'state/selectors'; +import getSiteCommentParentDepth from 'state/selectors/get-site-comment-parent-depth'; +import getSiteCommentRepliesTree from 'state/selectors/get-site-comment-replies-tree'; export class CommentRepliesList extends Component { constructor( props ) { diff --git a/client/my-sites/comments/comment-tree/index.jsx b/client/my-sites/comments/comment-tree/index.jsx index 01aff664cfa0f..a38064266c36e 100644 --- a/client/my-sites/comments/comment-tree/index.jsx +++ b/client/my-sites/comments/comment-tree/index.jsx @@ -23,7 +23,8 @@ import Pagination from 'components/pagination'; import QuerySiteCommentsList from 'components/data/query-site-comments-list'; import QuerySiteCommentsTree from 'components/data/query-site-comments-tree'; import QuerySiteSettings from 'components/data/query-site-settings'; -import { getSiteCommentsTree, isCommentsTreeInitialized } from 'state/selectors'; +import getSiteCommentsTree from 'state/selectors/get-site-comments-tree'; +import isCommentsTreeInitialized from 'state/selectors/is-comments-tree-initialized'; import { bumpStat, composeAnalytics, recordTracksEvent } from 'state/analytics/actions'; import { isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; import { COMMENTS_PER_PAGE } from '../constants'; diff --git a/client/my-sites/comments/comment/comment-actions.jsx b/client/my-sites/comments/comment/comment-actions.jsx index e1a648c801d8a..3b82bc93e206d 100644 --- a/client/my-sites/comments/comment/comment-actions.jsx +++ b/client/my-sites/comments/comment/comment-actions.jsx @@ -29,7 +29,7 @@ import { unlikeComment, } from 'state/comments/actions'; import { removeNotice, successNotice } from 'state/notices/actions'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; const commentActions = { unapproved: [ 'like', 'approve', 'edit', 'reply', 'spam', 'trash' ], diff --git a/client/my-sites/comments/comment/comment-author-more-info.jsx b/client/my-sites/comments/comment/comment-author-more-info.jsx index 041267e4805be..adc08c0379b8d 100644 --- a/client/my-sites/comments/comment/comment-author-more-info.jsx +++ b/client/my-sites/comments/comment/comment-author-more-info.jsx @@ -18,12 +18,10 @@ import ExternalLink from 'components/external-link'; import Popover from 'components/popover'; import { decodeEntities } from 'lib/formatting'; import { urlToDomainAndPath } from 'lib/url'; -import { - canCurrentUser, - getSiteComment, - getSiteSetting, - isEmailBlacklisted, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSiteComment from 'state/selectors/get-site-comment'; +import getSiteSetting from 'state/selectors/get-site-setting'; +import isEmailBlacklisted from 'state/selectors/is-email-blacklisted'; import { bumpStat, composeAnalytics, diff --git a/client/my-sites/comments/comment/comment-author.jsx b/client/my-sites/comments/comment/comment-author.jsx index 5963a37a9fbb7..b365936b62114 100644 --- a/client/my-sites/comments/comment/comment-author.jsx +++ b/client/my-sites/comments/comment/comment-author.jsx @@ -20,7 +20,7 @@ import Gravatar from 'components/gravatar'; import Tooltip from 'components/tooltip'; import { decodeEntities } from 'lib/formatting'; import { urlToDomainAndPath } from 'lib/url'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; export class CommentAuthor extends Component { diff --git a/client/my-sites/comments/comment/comment-content.jsx b/client/my-sites/comments/comment/comment-content.jsx index 214a4c334263d..72dd95f289aec 100644 --- a/client/my-sites/comments/comment/comment-content.jsx +++ b/client/my-sites/comments/comment/comment-content.jsx @@ -18,7 +18,8 @@ import CommentPostLink from 'my-sites/comments/comment/comment-post-link'; import Emojify from 'components/emojify'; import QueryComment from 'components/data/query-comment'; import { stripHTML, decodeEntities } from 'lib/formatting'; -import { getParentComment, getSiteComment } from 'state/selectors'; +import getParentComment from 'state/selectors/get-parent-comment'; +import getSiteComment from 'state/selectors/get-site-comment'; import { isJetpackSite } from 'state/sites/selectors'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; diff --git a/client/my-sites/comments/comment/comment-edit.jsx b/client/my-sites/comments/comment/comment-edit.jsx index 592544de7f878..f67804e2339b9 100644 --- a/client/my-sites/comments/comment/comment-edit.jsx +++ b/client/my-sites/comments/comment/comment-edit.jsx @@ -27,7 +27,7 @@ import { } from 'state/analytics/actions'; import { editComment } from 'state/comments/actions'; import { removeNotice, successNotice } from 'state/notices/actions'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSiteSlug, isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; diff --git a/client/my-sites/comments/comment/comment-header.jsx b/client/my-sites/comments/comment/comment-header.jsx index 87ee6c71dfbe4..26374e3d2a2ef 100644 --- a/client/my-sites/comments/comment/comment-header.jsx +++ b/client/my-sites/comments/comment/comment-header.jsx @@ -12,7 +12,7 @@ import { get } from 'lodash'; import CommentAuthor from 'my-sites/comments/comment/comment-author'; import CommentAuthorMoreInfo from 'my-sites/comments/comment/comment-author-more-info'; import FormCheckbox from 'components/forms/form-checkbox'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSelectedSiteId } from 'state/ui/selectors'; export class CommentHeader extends PureComponent { diff --git a/client/my-sites/comments/comment/comment-post-link.jsx b/client/my-sites/comments/comment/comment-post-link.jsx index 7c03b427aecbd..258c32ee1c725 100644 --- a/client/my-sites/comments/comment/comment-post-link.jsx +++ b/client/my-sites/comments/comment/comment-post-link.jsx @@ -14,7 +14,7 @@ import { get } from 'lodash'; import CommentLink from 'my-sites/comments/comment/comment-link'; import QueryPosts from 'components/data/query-posts'; import { decodeEntities, stripHTML } from 'lib/formatting'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSitePost } from 'state/posts/selectors'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; diff --git a/client/my-sites/comments/comment/comment-reply.jsx b/client/my-sites/comments/comment/comment-reply.jsx index abcb8ffb9b4b5..f0751b136393d 100644 --- a/client/my-sites/comments/comment/comment-reply.jsx +++ b/client/my-sites/comments/comment/comment-reply.jsx @@ -23,7 +23,7 @@ import { } from 'state/analytics/actions'; import { changeCommentStatus, replyComment } from 'state/comments/actions'; import { removeNotice, successNotice } from 'state/notices/actions'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSelectedSiteId } from 'state/ui/selectors'; const TEXTAREA_HEIGHT_COLLAPSED = 47; // 1 line diff --git a/client/my-sites/comments/comment/index.jsx b/client/my-sites/comments/comment/index.jsx index 6242754138336..93b1ad2ea06de 100644 --- a/client/my-sites/comments/comment/index.jsx +++ b/client/my-sites/comments/comment/index.jsx @@ -24,7 +24,7 @@ import QueryComment from 'components/data/query-comment'; import scrollTo from 'lib/scroll-to'; import { isWithinBreakpoint } from 'lib/viewport'; import { getMinimumComment } from 'my-sites/comments/comment/utils'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { getSelectedSiteId } from 'state/ui/selectors'; export class Comment extends Component { diff --git a/client/my-sites/comments/main.jsx b/client/my-sites/comments/main.jsx index af2dc7a142989..dca15eb22d346 100644 --- a/client/my-sites/comments/main.jsx +++ b/client/my-sites/comments/main.jsx @@ -20,7 +20,7 @@ import DocumentHead from 'components/data/document-head'; import CommentList from './comment-list'; import CommentTree from './comment-tree'; import SidebarNavigation from 'my-sites/sidebar-navigation'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { preventWidows } from 'lib/formatting'; import QueryJetpackPlugins from 'components/data/query-jetpack-plugins'; import { updatePlugin } from 'state/plugins/installed/actions'; diff --git a/client/my-sites/controller.js b/client/my-sites/controller.js index 892e877079ffd..665ecf018a138 100644 --- a/client/my-sites/controller.js +++ b/client/my-sites/controller.js @@ -32,13 +32,11 @@ import notices from 'notices'; import config from 'config'; import analytics from 'lib/analytics'; import { setLayoutFocus } from 'state/ui/layout-focus/actions'; -import { - getPrimaryDomainBySiteId, - getPrimarySiteId, - getSiteId, - getSites, - isDomainOnlySite, -} from 'state/selectors'; +import getPrimaryDomainBySiteId from 'state/selectors/get-primary-domain-by-site-id'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; +import getSiteId from 'state/selectors/get-site-id'; +import getSites from 'state/selectors/get-sites'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; import { domainManagementAddGoogleApps, domainManagementContactsPrivacy, diff --git a/client/my-sites/current-site/domain-to-paid-plan-notice.jsx b/client/my-sites/current-site/domain-to-paid-plan-notice.jsx index 62240f505dc4f..4af51c5ff0579 100644 --- a/client/my-sites/current-site/domain-to-paid-plan-notice.jsx +++ b/client/my-sites/current-site/domain-to-paid-plan-notice.jsx @@ -14,9 +14,9 @@ import { endsWith, noop } from 'lodash'; * Internal dependencies */ import { getSelectedSite } from 'state/ui/selectors'; -import { isEligibleForDomainToPaidPlanUpsell } from 'state/selectors'; +import isEligibleForDomainToPaidPlanUpsell from 'state/selectors/is-eligible-for-domain-to-paid-plan-upsell'; import SidebarBanner from 'my-sites/current-site/sidebar-banner'; -import { isDomainOnlySite } from 'state/selectors'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; import { isJetpackSite } from 'state/sites/selectors'; export class DomainToPaidPlanNotice extends Component { diff --git a/client/my-sites/current-site/domain-warnings.jsx b/client/my-sites/current-site/domain-warnings.jsx index 0b4977c290002..54b64ef74658a 100644 --- a/client/my-sites/current-site/domain-warnings.jsx +++ b/client/my-sites/current-site/domain-warnings.jsx @@ -15,7 +15,7 @@ import DomainWarnings from 'my-sites/domains/components/domain-warnings'; import { getDecoratedSiteDomains } from 'state/sites/domains/selectors'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import QuerySiteDomains from 'components/data/query-site-domains'; const ruleWhiteList = [ diff --git a/client/my-sites/current-site/index.jsx b/client/my-sites/current-site/index.jsx index 32616a2bb10e8..cbabd92c8f54e 100644 --- a/client/my-sites/current-site/index.jsx +++ b/client/my-sites/current-site/index.jsx @@ -22,7 +22,8 @@ import SiteNotice from './notice'; import CartStore from 'lib/cart/store'; import { setLayoutFocus } from 'state/ui/layout-focus/actions'; import { getSectionName, getSelectedSite } from 'state/ui/selectors'; -import { getSelectedOrAllSites, getVisibleSites } from 'state/selectors'; +import getSelectedOrAllSites from 'state/selectors/get-selected-or-all-sites'; +import getVisibleSites from 'state/selectors/get-visible-sites'; import { infoNotice, removeNotice } from 'state/notices/actions'; import { getNoticeLastTimeShown } from 'state/notices/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/current-site/notice.jsx b/client/my-sites/current-site/notice.jsx index d9be4b05a140e..017bbb814a25e 100644 --- a/client/my-sites/current-site/notice.jsx +++ b/client/my-sites/current-site/notice.jsx @@ -18,7 +18,9 @@ import NoticeAction from 'components/notice/notice-action'; import getActiveDiscount from 'state/selectors/get-active-discount'; import { domainManagementList } from 'my-sites/domains/paths'; import { hasDomainCredit } from 'state/sites/plans/selectors'; -import { canCurrentUser, isDomainOnlySite, isEligibleForFreeToPaidUpsell } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isEligibleForFreeToPaidUpsell from 'state/selectors/is-eligible-for-free-to-paid-upsell'; import { recordTracksEvent } from 'state/analytics/actions'; import QuerySitePlans from 'components/data/query-site-plans'; import QueryActivePromotions from 'components/data/query-active-promotions'; diff --git a/client/my-sites/customize/main.jsx b/client/my-sites/customize/main.jsx index 8c20639635e12..b92c9afa7c876 100644 --- a/client/my-sites/customize/main.jsx +++ b/client/my-sites/customize/main.jsx @@ -25,7 +25,7 @@ import Actions from 'my-sites/customize/actions'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import { themeActivated } from 'state/themes/actions'; import { getCustomizerFocus } from './panels'; -import { getMenusUrl } from 'state/selectors'; +import getMenusUrl from 'state/selectors/get-menus-url'; import { getSelectedSite } from 'state/ui/selectors'; import { getCustomizerUrl, isJetpackSite } from 'state/sites/selectors'; import wpcom from 'lib/wp'; diff --git a/client/my-sites/domains/controller.jsx b/client/my-sites/domains/controller.jsx index 3919e27220c11..1fd317e9aa13b 100644 --- a/client/my-sites/domains/controller.jsx +++ b/client/my-sites/domains/controller.jsx @@ -16,7 +16,7 @@ import { sectionify } from 'lib/route'; import Main from 'components/main'; import { addItem } from 'lib/upgrades/actions'; import productsFactory from 'lib/products-list'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { getSelectedSiteId, getSelectedSite, getSelectedSiteSlug } from 'state/ui/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; import CartData from 'components/data/cart'; diff --git a/client/my-sites/domains/domain-management/components/domain/primary-flag.jsx b/client/my-sites/domains/domain-management/components/domain/primary-flag.jsx index 7a73998d1c0b3..16847d292d85a 100644 --- a/client/my-sites/domains/domain-management/components/domain/primary-flag.jsx +++ b/client/my-sites/domains/domain-management/components/domain/primary-flag.jsx @@ -12,7 +12,7 @@ import { flow } from 'lodash'; * Internal dependencies */ import { getSelectedSiteId } from 'state/ui/selectors'; -import { isDomainOnlySite } from 'state/selectors'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; import { localize } from 'i18n-calypso'; const DomainPrimaryFlag = ( { isDomainOnly, domain, translate } ) => { diff --git a/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx b/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx index d6e6d1d5ec0b4..06a776ddad296 100644 --- a/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx +++ b/client/my-sites/domains/domain-management/components/icann-verification/icann-verification-card.jsx @@ -15,7 +15,7 @@ import { EMAIL_VALIDATION_AND_VERIFICATION } from 'lib/url/support'; import { resendIcannVerification } from 'lib/upgrades/actions'; import { errorNotice } from 'state/notices/actions'; import { domainManagementEditContactInfo } from 'my-sites/domains/paths'; -import { getRegistrantWhois } from 'state/selectors'; +import getRegistrantWhois from 'state/selectors/get-registrant-whois'; import QueryWhois from 'components/data/query-whois'; import EmailVerificationCard from 'my-sites/domains/domain-management/components/email-verification'; diff --git a/client/my-sites/domains/domain-management/list/domain-only.jsx b/client/my-sites/domains/domain-management/list/domain-only.jsx index 5f60e6a23cbdd..4e025605c0f97 100644 --- a/client/my-sites/domains/domain-management/list/domain-only.jsx +++ b/client/my-sites/domains/domain-management/list/domain-only.jsx @@ -15,7 +15,7 @@ import React from 'react'; import EmptyContent from 'components/empty-content'; import QuerySiteDomains from 'components/data/query-site-domains'; import { domainManagementEdit } from 'my-sites/domains/paths'; -import { getPrimaryDomainBySiteId } from 'state/selectors'; +import getPrimaryDomainBySiteId from 'state/selectors/get-primary-domain-by-site-id'; import { getSiteSlug } from 'state/sites/selectors'; const DomainOnly = ( { primaryDomain, hasNotice, siteId, slug, translate } ) => { diff --git a/client/my-sites/domains/domain-management/list/index.jsx b/client/my-sites/domains/domain-management/list/index.jsx index 0ce9c30fcfb9d..e4a6900e87d12 100644 --- a/client/my-sites/domains/domain-management/list/index.jsx +++ b/client/my-sites/domains/domain-management/list/index.jsx @@ -40,7 +40,9 @@ import NoticeAction from 'components/notice/notice-action'; import EmptyContent from 'components/empty-content'; import { hasDomainCredit } from 'state/sites/plans/selectors'; import TrackComponentView from 'lib/analytics/track-component-view'; -import { canCurrentUser, isDomainOnlySite, isSiteAutomatedTransfer } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { isPlanFeaturesEnabled } from 'lib/plans'; import DomainToPlanNudge from 'blocks/domain-to-plan-nudge'; import { type } from 'lib/domains/constants'; diff --git a/client/my-sites/domains/domain-management/transfer/index.jsx b/client/my-sites/domains/domain-management/transfer/index.jsx index 46bfcdd7a9cb2..e286fb7cb1324 100644 --- a/client/my-sites/domains/domain-management/transfer/index.jsx +++ b/client/my-sites/domains/domain-management/transfer/index.jsx @@ -11,12 +11,10 @@ import React from 'react'; import { get } from 'lodash'; import { getSelectedSiteId } from 'state/ui/selectors'; import Header from 'my-sites/domains/domain-management/components/header'; -import { - isDomainOnlySite, - isPrimaryDomainBySiteId, - getPrimaryDomainBySiteId, - isSiteAutomatedTransfer, -} from 'state/selectors'; +import getPrimaryDomainBySiteId from 'state/selectors/get-primary-domain-by-site-id'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isPrimaryDomainBySiteId from 'state/selectors/is-primary-domain-by-site-id'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { localize } from 'i18n-calypso'; import Main from 'components/main'; import { diff --git a/client/my-sites/domains/domain-management/transfer/transfer-out/select-ips-tag.jsx b/client/my-sites/domains/domain-management/transfer/transfer-out/select-ips-tag.jsx index d79fe383f34fc..0283cba81102a 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-out/select-ips-tag.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-out/select-ips-tag.jsx @@ -22,7 +22,8 @@ import FormButton from 'components/forms/form-button'; import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; import { saveDomainIpsTag } from 'state/domains/transfer/actions'; -import { getGainingRegistrar, getIpsTagSaveStatus } from 'state/selectors'; +import getGainingRegistrar from 'state/selectors/get-gaining-registrar'; +import getIpsTagSaveStatus from 'state/selectors/get-ips-tag-save-status'; const debug = debugFactory( 'calypso:domains:select-ips-tag' ); diff --git a/client/my-sites/domains/domain-management/transfer/transfer-to-other-site/index.jsx b/client/my-sites/domains/domain-management/transfer/transfer-to-other-site/index.jsx index 591d32455f7c9..f147688c80b1e 100644 --- a/client/my-sites/domains/domain-management/transfer/transfer-to-other-site/index.jsx +++ b/client/my-sites/domains/domain-management/transfer/transfer-to-other-site/index.jsx @@ -16,7 +16,8 @@ import Card from 'components/card'; import SiteSelector from 'components/site-selector'; import { getCurrentUser, currentUserHasFlag } from 'state/current-user/selectors'; import { DOMAINS_WITH_PLANS_ONLY } from 'state/current-user/constants'; -import { getSites, isDomainOnlySite } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; import Header from 'my-sites/domains/domain-management/components/header'; import Main from 'components/main'; import { domainManagementList, domainManagementTransfer } from 'my-sites/domains/paths'; diff --git a/client/my-sites/domains/domain-search/domain-search.jsx b/client/my-sites/domains/domain-search/domain-search.jsx index fe2cf768b4243..a724221fe7ffb 100644 --- a/client/my-sites/domains/domain-search/domain-search.jsx +++ b/client/my-sites/domains/domain-search/domain-search.jsx @@ -22,7 +22,7 @@ import Main from 'components/main'; import { addItem, addItems, goToDomainCheckout, removeDomainFromCart } from 'lib/upgrades/actions'; import cartItems from 'lib/cart-values/cart-items'; import { currentUserHasFlag } from 'state/current-user/selectors'; -import { isSiteUpgradeable } from 'state/selectors'; +import isSiteUpgradeable from 'state/selectors/is-site-upgradeable'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import QueryProductsList from 'components/data/query-products-list'; import { getProductsList } from 'state/products-list/selectors'; diff --git a/client/my-sites/domains/map-domain/index.jsx b/client/my-sites/domains/map-domain/index.jsx index 73a1cd92b855c..c65e74c6e56a3 100644 --- a/client/my-sites/domains/map-domain/index.jsx +++ b/client/my-sites/domains/map-domain/index.jsx @@ -20,7 +20,7 @@ import wp from 'lib/wp'; import { domainManagementList } from 'my-sites/domains/paths'; import Notice from 'components/notice'; import { currentUserHasFlag } from 'state/current-user/selectors'; -import { isSiteUpgradeable } from 'state/selectors'; +import isSiteUpgradeable from 'state/selectors/is-site-upgradeable'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import QueryProductsList from 'components/data/query-products-list'; import { getProductsList } from 'state/products-list/selectors'; diff --git a/client/my-sites/domains/transfer-domain/index.jsx b/client/my-sites/domains/transfer-domain/index.jsx index 7e789196e5bc9..5874dacd5cc7d 100644 --- a/client/my-sites/domains/transfer-domain/index.jsx +++ b/client/my-sites/domains/transfer-domain/index.jsx @@ -16,7 +16,7 @@ import { cartItems } from 'lib/cart-values'; import { addItem, addItems } from 'lib/upgrades/actions'; import Notice from 'components/notice'; import { currentUserHasFlag } from 'state/current-user/selectors'; -import { isSiteUpgradeable } from 'state/selectors'; +import isSiteUpgradeable from 'state/selectors/is-site-upgradeable'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import QueryProductsList from 'components/data/query-products-list'; import { getProductsList } from 'state/products-list/selectors'; diff --git a/client/my-sites/google-my-business/index.js b/client/my-sites/google-my-business/index.js index f126216ef8964..f48019bc85e04 100644 --- a/client/my-sites/google-my-business/index.js +++ b/client/my-sites/google-my-business/index.js @@ -14,11 +14,9 @@ import { navigation, sites, siteSelection } from 'my-sites/controller'; import { newAccount, selectBusinessType, selectLocation, stats } from './controller'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getKeyringConnectionsByName } from 'state/sharing/keyring/selectors'; -import { - isGoogleMyBusinessLocationConnected, - getGoogleMyBusinessLocations, - isSiteGoogleMyBusinessEligible, -} from 'state/selectors'; +import getGoogleMyBusinessLocations from 'state/selectors/get-google-my-business-locations'; +import isGoogleMyBusinessLocationConnected from 'state/selectors/is-google-my-business-location-connected'; +import isSiteGoogleMyBusinessEligible from 'state/selectors/is-site-google-my-business-eligible'; import { requestSiteSettings } from 'state/site-settings/actions'; import { requestKeyringConnections } from 'state/sharing/keyring/actions'; diff --git a/client/my-sites/google-my-business/select-business-type/index.js b/client/my-sites/google-my-business/select-business-type/index.js index 2b7708c9f05b1..3e1e7c4128f08 100644 --- a/client/my-sites/google-my-business/select-business-type/index.js +++ b/client/my-sites/google-my-business/select-business-type/index.js @@ -26,7 +26,8 @@ import HeaderCake from 'components/header-cake'; import KeyringConnectButton from 'blocks/keyring-connect-button'; import Main from 'components/main'; import PageViewTracker from 'lib/analytics/page-view-tracker'; -import { canCurrentUser, getGoogleMyBusinessLocations } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getGoogleMyBusinessLocations from 'state/selectors/get-google-my-business-locations'; import { recordTracksEvent } from 'state/analytics/actions'; import QuerySiteSettings from 'components/data/query-site-settings'; import QueryKeyringConnections from 'components/data/query-keyring-connections'; diff --git a/client/my-sites/google-my-business/select-location/index.js b/client/my-sites/google-my-business/select-location/index.js index 49c594668883d..e430963060bc4 100644 --- a/client/my-sites/google-my-business/select-location/index.js +++ b/client/my-sites/google-my-business/select-location/index.js @@ -23,7 +23,7 @@ import HeaderCake from 'components/header-cake'; import Main from 'components/main'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import { recordTracksEvent } from 'state/analytics/actions'; -import { getGoogleMyBusinessLocations } from 'state/selectors'; +import getGoogleMyBusinessLocations from 'state/selectors/get-google-my-business-locations'; import { connectGoogleMyBusinessLocation } from 'state/google-my-business/actions'; import QuerySiteSettings from 'components/data/query-site-settings'; import QueryKeyringConnections from 'components/data/query-keyring-connections'; diff --git a/client/my-sites/google-my-business/stats/chart.js b/client/my-sites/google-my-business/stats/chart.js index b957bd47fb606..99ab99cbfbb65 100644 --- a/client/my-sites/google-my-business/stats/chart.js +++ b/client/my-sites/google-my-business/stats/chart.js @@ -23,7 +23,7 @@ import PieChartLegendPlaceholder from 'components/pie-chart/legend-placeholder'; import PieChartPlaceholder from 'components/pie-chart/placeholder'; import SectionHeader from 'components/section-header'; import { changeGoogleMyBusinessStatsInterval } from 'state/ui/google-my-business/actions'; -import { getGoogleMyBusinessStats } from 'state/selectors'; +import getGoogleMyBusinessStats from 'state/selectors/get-google-my-business-stats'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getStatsInterval } from 'state/ui/google-my-business/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/google-my-business/stats/index.js b/client/my-sites/google-my-business/stats/index.js index 47970a23be36c..728c649008802 100644 --- a/client/my-sites/google-my-business/stats/index.js +++ b/client/my-sites/google-my-business/stats/index.js @@ -25,7 +25,7 @@ import SidebarNavigation from 'my-sites/sidebar-navigation'; import StatsNavigation from 'blocks/stats-navigation'; import { getSelectedSiteSlug, getSelectedSiteId } from 'state/ui/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; -import { getGoogleMyBusinessConnectedLocation } from 'state/selectors'; +import getGoogleMyBusinessConnectedLocation from 'state/selectors/get-google-my-business-connected-location'; import QuerySiteSettings from 'components/data/query-site-settings'; import QueryKeyringConnections from 'components/data/query-keyring-connections'; diff --git a/client/my-sites/media-library/list.jsx b/client/my-sites/media-library/list.jsx index a7f28240f9cc2..3f07888530e67 100644 --- a/client/my-sites/media-library/list.jsx +++ b/client/my-sites/media-library/list.jsx @@ -23,7 +23,7 @@ import ListNoContent from './list-no-content'; import SortedGrid from 'components/sorted-grid'; import ListPlanUpgradeNudge from './list-plan-upgrade-nudge'; import { getPreference } from 'state/preferences/selectors'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; const GOOGLE_MAX_RESULTS = 1000; diff --git a/client/my-sites/pages/page-card-info/index.jsx b/client/my-sites/pages/page-card-info/index.jsx index 5967722bd0cd4..d3027c4ce5c6a 100644 --- a/client/my-sites/pages/page-card-info/index.jsx +++ b/client/my-sites/pages/page-card-info/index.jsx @@ -14,7 +14,7 @@ import Gridicon from 'gridicons'; */ import { isFrontPage, isPostsPage } from 'state/pages/selectors'; import PostRelativeTimeStatus from 'my-sites/post-relative-time-status'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getEditorPath } from 'state/ui/editor/selectors'; const getContentLink = ( state, siteId, page ) => { diff --git a/client/my-sites/pages/page-list.jsx b/client/my-sites/pages/page-list.jsx index fe4b932c5e3ba..ac72b79c02c43 100644 --- a/client/my-sites/pages/page-list.jsx +++ b/client/my-sites/pages/page-list.jsx @@ -25,7 +25,7 @@ import Placeholder from './placeholder'; import { mapPostStatus as mapStatus } from 'lib/route'; import { sortPagesHierarchically } from './helpers'; import BlogPostsPage from './blog-posts-page'; -import { hasInitializedSites } from 'state/selectors'; +import hasInitializedSites from 'state/selectors/has-initialized-sites'; import { getPostsForQueryIgnoringPage, isRequestingPostsForQuery, diff --git a/client/my-sites/people/invite-people/index.jsx b/client/my-sites/people/invite-people/index.jsx index 205507f23a586..84e146253d86a 100644 --- a/client/my-sites/people/invite-people/index.jsx +++ b/client/my-sites/people/invite-people/index.jsx @@ -42,7 +42,8 @@ import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; import { isJetpackSite } from 'state/sites/selectors'; import { activateModule } from 'state/jetpack/modules/actions'; -import { isActivatingJetpackModule, isJetpackModuleActive } from 'state/selectors'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import PageViewTracker from 'lib/analytics/page-view-tracker'; diff --git a/client/my-sites/people/main.jsx b/client/my-sites/people/main.jsx index a36a01897d508..1303d3443a1e8 100644 --- a/client/my-sites/people/main.jsx +++ b/client/my-sites/people/main.jsx @@ -25,7 +25,8 @@ import PeopleSectionNav from 'my-sites/people/people-section-nav'; import SidebarNavigation from 'my-sites/sidebar-navigation'; import { getSelectedSiteId, getSelectedSite } from 'state/ui/selectors'; import { isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; -import { canCurrentUser, isPrivateSite } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isPrivateSite from 'state/selectors/is-private-site'; import PageViewTracker from 'lib/analytics/page-view-tracker'; import titlecase from 'to-title-case'; diff --git a/client/my-sites/people/people-invite-details/index.jsx b/client/my-sites/people/people-invite-details/index.jsx index 9fe6f8f1aa964..7097490c08309 100644 --- a/client/my-sites/people/people-invite-details/index.jsx +++ b/client/my-sites/people/people-invite-details/index.jsx @@ -30,7 +30,7 @@ import { didInviteDeletionSucceed, } from 'state/invites/selectors'; import { deleteInvite } from 'state/invites/actions'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import PageViewTracker from 'lib/analytics/page-view-tracker'; export class PeopleInviteDetails extends React.PureComponent { diff --git a/client/my-sites/people/people-invites/index.jsx b/client/my-sites/people/people-invites/index.jsx index a366733f8bd95..5aa91f3d64e85 100644 --- a/client/my-sites/people/people-invites/index.jsx +++ b/client/my-sites/people/people-invites/index.jsx @@ -26,7 +26,8 @@ import Dialog from 'components/dialog'; import InvitesListEnd from './invites-list-end'; import { getSelectedSite } from 'state/ui/selectors'; import { isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; -import { isPrivateSite, canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isPrivateSite from 'state/selectors/is-private-site'; import { isRequestingInvitesForSite, getPendingInvitesForSite, diff --git a/client/my-sites/plan-features/index.jsx b/client/my-sites/plan-features/index.jsx index 6dbaccb7ac50f..a54cdc2dbcd2d 100644 --- a/client/my-sites/plan-features/index.jsx +++ b/client/my-sites/plan-features/index.jsx @@ -29,7 +29,7 @@ import { getSignupDependencyStore } from 'state/signup/dependency-store/selector import { planItem as getCartItemForPlan } from 'lib/cart-values/cart-items'; import { recordTracksEvent } from 'state/analytics/actions'; import { retargetViewPlans } from 'lib/analytics/ad-tracking'; -import { canUpgradeToPlan } from 'state/selectors'; +import canUpgradeToPlan from 'state/selectors/can-upgrade-to-plan'; import getActiveDiscount from 'state/selectors/get-active-discount'; import { planMatches, diff --git a/client/my-sites/plugins/controller.js b/client/my-sites/plugins/controller.js index 4fd43b0b109f4..2a1992fa79cb8 100644 --- a/client/my-sites/plugins/controller.js +++ b/client/my-sites/plugins/controller.js @@ -20,7 +20,7 @@ import PluginBrowser from './plugins-browser'; import PluginUpload from './plugin-upload'; import { setSection } from 'state/ui/actions'; import { getSelectedSite, getSection } from 'state/ui/selectors'; -import { getSelectedOrAllSitesWithPlugins } from 'state/selectors'; +import getSelectedOrAllSitesWithPlugins from 'state/selectors/get-selected-or-all-sites-with-plugins'; /** * Module variables diff --git a/client/my-sites/plugins/jetpack-plugins-setup/index.jsx b/client/my-sites/plugins/jetpack-plugins-setup/index.jsx index 127c64636a88d..2f1d94eb2dc7e 100644 --- a/client/my-sites/plugins/jetpack-plugins-setup/index.jsx +++ b/client/my-sites/plugins/jetpack-plugins-setup/index.jsx @@ -38,7 +38,7 @@ import { getSiteFileModDisableReason } from 'lib/site/utils'; // Redux actions & selectors import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { getJetpackSiteRemoteManagementUrl, isRequestingSites } from 'state/sites/selectors'; -import { hasInitializedSites } from 'state/selectors'; +import hasInitializedSites from 'state/selectors/has-initialized-sites'; import { getPlugin } from 'state/plugins/wporg/selectors'; import { fetchPluginData } from 'state/plugins/wporg/actions'; import { requestSites } from 'state/sites/actions'; diff --git a/client/my-sites/plugins/main.jsx b/client/my-sites/plugins/main.jsx index 25e9467ce6d29..c93ec8fa99bbb 100644 --- a/client/my-sites/plugins/main.jsx +++ b/client/my-sites/plugins/main.jsx @@ -31,12 +31,10 @@ import JetpackManageErrorPage from 'my-sites/jetpack-manage-error-page'; import PluginsBrowser from './plugins-browser'; import NonSupportedJetpackVersionNotice from './not-supported-jetpack-version'; import NoPermissionsError from './no-permissions-error'; -import { - canCurrentUser, - canCurrentUserManagePlugins, - getSelectedOrAllSitesWithPlugins, - hasJetpackSites, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import canCurrentUserManagePlugins from 'state/selectors/can-current-user-manage-plugins'; +import getSelectedOrAllSitesWithPlugins from 'state/selectors/get-selected-or-all-sites-with-plugins'; +import hasJetpackSites from 'state/selectors/has-jetpack-sites'; import { canJetpackSiteManage, canJetpackSiteUpdateFiles, diff --git a/client/my-sites/plugins/plugin-automated-transfer/index.jsx b/client/my-sites/plugins/plugin-automated-transfer/index.jsx index cd5d8677ec5b6..ac12829435817 100644 --- a/client/my-sites/plugins/plugin-automated-transfer/index.jsx +++ b/client/my-sites/plugins/plugin-automated-transfer/index.jsx @@ -17,7 +17,8 @@ import { transferStates } from 'state/automated-transfer/constants'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSite } from 'state/sites/selectors'; import { getAutomatedTransferStatus } from 'state/automated-transfer/selectors'; -import { isAutomatedTransferActive, isAutomatedTransferFailed } from 'state/selectors'; +import isAutomatedTransferActive from 'state/selectors/is-automated-transfer-active'; +import isAutomatedTransferFailed from 'state/selectors/is-automated-transfer-failed'; import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; import WpAdminAutoLogin from 'components/wpadmin-auto-login'; diff --git a/client/my-sites/plugins/plugin-install-button/index.jsx b/client/my-sites/plugins/plugin-install-button/index.jsx index 3e002a664d334..419817d25e655 100644 --- a/client/my-sites/plugins/plugin-install-button/index.jsx +++ b/client/my-sites/plugins/plugin-install-button/index.jsx @@ -19,7 +19,7 @@ import ExternalLink from 'components/external-link'; import { getSiteFileModDisableReason, isMainNetworkSite } from 'lib/site/utils'; import { recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; import QuerySiteConnectionStatus from 'components/data/query-site-connection-status'; -import { getSiteConnectionStatus } from 'state/selectors'; +import getSiteConnectionStatus from 'state/selectors/get-site-connection-status'; export class PluginInstallButton extends Component { installAction = () => { diff --git a/client/my-sites/plugins/plugin-meta/index.jsx b/client/my-sites/plugins/plugin-meta/index.jsx index 527da089dd5e4..79da49283fa15 100644 --- a/client/my-sites/plugins/plugin-meta/index.jsx +++ b/client/my-sites/plugins/plugin-meta/index.jsx @@ -42,7 +42,8 @@ import { isBusiness, isEnterprise } from 'lib/products-values'; import { addSiteFragment } from 'lib/route'; import { getSelectedSiteId, getSelectedSite } from 'state/ui/selectors'; import { getSiteSlug } from 'state/sites/selectors'; -import { isAutomatedTransferActive, isSiteAutomatedTransfer } from 'state/selectors'; +import isAutomatedTransferActive from 'state/selectors/is-automated-transfer-active'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import QueryEligibility from 'components/data/query-atat-eligibility'; import { isATEnabled } from 'lib/automated-transfer'; diff --git a/client/my-sites/plugins/plugin-site-list/index.jsx b/client/my-sites/plugins/plugin-site-list/index.jsx index 85f982e56d981..a4955fcfd0ae5 100644 --- a/client/my-sites/plugins/plugin-site-list/index.jsx +++ b/client/my-sites/plugins/plugin-site-list/index.jsx @@ -11,7 +11,9 @@ import PropTypes from 'prop-types'; /** * Internal dependencies */ -import { isConnectedSecondaryNetworkSite, getNetworkSites } from 'state/selectors'; +import getNetworkSites from 'state/selectors/get-network-sites'; + +import isConnectedSecondaryNetworkSite from 'state/selectors/is-connected-secondary-network-site'; import PluginSite from 'my-sites/plugins/plugin-site/plugin-site'; import PluginsStore from 'lib/plugins/store'; import SectionHeader from 'components/section-header'; diff --git a/client/my-sites/plugins/plugin-upload/index.jsx b/client/my-sites/plugins/plugin-upload/index.jsx index cddc2f1948aa6..f66ca98d243f9 100644 --- a/client/my-sites/plugins/plugin-upload/index.jsx +++ b/client/my-sites/plugins/plugin-upload/index.jsx @@ -26,13 +26,11 @@ import QueryEligibility from 'components/data/query-atat-eligibility'; import { uploadPlugin, clearPluginUpload } from 'state/plugins/upload/actions'; import { initiateAutomatedTransferWithPluginZip } from 'state/automated-transfer/actions'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; -import { - getPluginUploadError, - getPluginUploadProgress, - getUploadedPluginId, - isPluginUploadComplete, - isPluginUploadInProgress, -} from 'state/selectors'; +import getPluginUploadError from 'state/selectors/get-plugin-upload-error'; +import getPluginUploadProgress from 'state/selectors/get-plugin-upload-progress'; +import getUploadedPluginId from 'state/selectors/get-uploaded-plugin-id'; +import isPluginUploadComplete from 'state/selectors/is-plugin-upload-complete'; +import isPluginUploadInProgress from 'state/selectors/is-plugin-upload-in-progress'; import { getSiteAdminUrl, isJetpackMinimumVersion, diff --git a/client/my-sites/plugins/plugin.jsx b/client/my-sites/plugins/plugin.jsx index 6bd2e094af9b5..ae99990281f19 100644 --- a/client/my-sites/plugins/plugin.jsx +++ b/client/my-sites/plugins/plugin.jsx @@ -31,12 +31,10 @@ import DocumentHead from 'components/data/document-head'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { recordGoogleEvent } from 'state/analytics/actions'; import { canJetpackSiteManage, isJetpackSite, isRequestingSites } from 'state/sites/selectors'; -import { - canCurrentUser, - canCurrentUserManagePlugins, - getSelectedOrAllSitesWithPlugins, - isSiteAutomatedTransfer, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import canCurrentUserManagePlugins from 'state/selectors/can-current-user-manage-plugins'; +import getSelectedOrAllSitesWithPlugins from 'state/selectors/get-selected-or-all-sites-with-plugins'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import NonSupportedJetpackVersionNotice from './not-supported-jetpack-version'; import NoPermissionsError from './no-permissions-error'; diff --git a/client/my-sites/plugins/plugins-browser/index.jsx b/client/my-sites/plugins/plugins-browser/index.jsx index 92e7da585eaa8..4313374c72380 100644 --- a/client/my-sites/plugins/plugins-browser/index.jsx +++ b/client/my-sites/plugins/plugins-browser/index.jsx @@ -27,11 +27,9 @@ import PluginsActions from 'lib/plugins/wporg-data/actions'; import urlSearch from 'lib/url-search'; import JetpackManageErrorPage from 'my-sites/jetpack-manage-error-page'; import { recordTracksEvent, recordGoogleEvent } from 'state/analytics/actions'; -import { - canCurrentUser, - getSelectedOrAllSitesJetpackCanManage, - hasJetpackSites, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSelectedOrAllSitesJetpackCanManage from 'state/selectors/get-selected-or-all-sites-jetpack-can-manage'; +import hasJetpackSites from 'state/selectors/has-jetpack-sites'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { getSitePlan, diff --git a/client/my-sites/plugins/plugins-list/index.jsx b/client/my-sites/plugins/plugins-list/index.jsx index e4c4e081eb559..bda1f967cdd61 100644 --- a/client/my-sites/plugins/plugins-list/index.jsx +++ b/client/my-sites/plugins/plugins-list/index.jsx @@ -26,7 +26,7 @@ import PluginNotices from 'lib/plugins/notices'; import Card from 'components/card'; import SectionHeader from 'components/section-header'; import { getSelectedSite, getSelectedSiteSlug } from 'state/ui/selectors'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { recordGoogleEvent } from 'state/analytics/actions'; function checkPropsChange( nextProps, propArr ) { diff --git a/client/my-sites/post-selector/docs/example.jsx b/client/my-sites/post-selector/docs/example.jsx index 0444ce64e7b77..cd140841b590e 100644 --- a/client/my-sites/post-selector/docs/example.jsx +++ b/client/my-sites/post-selector/docs/example.jsx @@ -12,7 +12,7 @@ import { connect } from 'react-redux'; */ import PostSelector from '../'; import FormLabel from 'components/forms/form-label'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; class PostSelectorExample extends Component { state = { diff --git a/client/my-sites/post-type-filter/index.jsx b/client/my-sites/post-type-filter/index.jsx index 56b37d8ecdc2d..08dc34777ed41 100644 --- a/client/my-sites/post-type-filter/index.jsx +++ b/client/my-sites/post-type-filter/index.jsx @@ -11,7 +11,7 @@ import { compact, find, flow, includes, reduce } from 'lodash'; /** * Internal dependencies */ -import { areAllSitesSingleUser } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite, isSingleUserSite, getSiteSlug } from 'state/sites/selectors'; import { getNormalizedMyPostCounts, getNormalizedPostCounts } from 'state/posts/counts/selectors'; diff --git a/client/my-sites/post-type-list/post-action-counts/index.jsx b/client/my-sites/post-type-list/post-action-counts/index.jsx index 8cb60c3eb1df1..a1c4bda2f1c9c 100644 --- a/client/my-sites/post-type-list/post-action-counts/index.jsx +++ b/client/my-sites/post-type-list/post-action-counts/index.jsx @@ -16,7 +16,7 @@ import QueryPostStats from 'components/data/query-post-stats'; import PostLikesPopover from 'blocks/post-likes/popover'; import { getNormalizedPost } from 'state/posts/selectors'; import { getPostStat } from 'state/stats/posts/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSiteSlug, isJetpackModuleActive, isJetpackSite } from 'state/sites/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; import { hideActiveLikesPopover, toggleLikesPopover } from 'state/ui/post-type-list/actions'; diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/duplicate.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/duplicate.jsx index 0200985bc439d..bcdfab3be5bbd 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/duplicate.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/duplicate.jsx @@ -14,7 +14,7 @@ import { includes } from 'lodash'; */ import PopoverMenuItem from 'components/popover/menu-item'; import { getPost } from 'state/posts/selectors'; -import { canCurrentUserEditPost } from 'state/selectors'; +import canCurrentUserEditPost from 'state/selectors/can-current-user-edit-post'; import { getEditorDuplicatePostPath } from 'state/ui/editor/selectors'; import { bumpStat, recordTracksEvent } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/edit.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/edit.jsx index 161b4f5b899ba..4eaac70337bfd 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/edit.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/edit.jsx @@ -15,7 +15,7 @@ import PopoverMenuItem from 'components/popover/menu-item'; import { bumpStat as bumpAnalyticsStat } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; import { getPost } from 'state/posts/selectors'; -import { canCurrentUserEditPost } from 'state/selectors'; +import canCurrentUserEditPost from 'state/selectors/can-current-user-edit-post'; import { getEditorPath } from 'state/ui/editor/selectors'; import { preload } from 'sections-helper'; diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx index ecdb79fb60787..1d8a59203ed1c 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/publish.jsx @@ -17,7 +17,7 @@ import { bumpStat, recordTracksEvent } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; import { getPost } from 'state/posts/selectors'; import { savePost } from 'state/posts/actions'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; class PostActionsEllipsisMenuPublish extends Component { static propTypes = { diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx index 101d9ceece6ab..5bfa898a19e66 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/restore.jsx @@ -15,7 +15,7 @@ import { localize } from 'i18n-calypso'; import PopoverMenuItem from 'components/popover/menu-item'; import { bumpStat as bumpAnalyticsStat } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getPost } from 'state/posts/selectors'; import { restorePost } from 'state/posts/actions'; import { getCurrentUserId } from 'state/current-user/selectors'; diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/share.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/share.jsx index 28df7573fb776..a9f6ed7f72430 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/share.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/share.jsx @@ -16,7 +16,7 @@ import { bumpStat as bumpAnalyticsStat } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; import { getPost } from 'state/posts/selectors'; import { toggleSharePanel } from 'state/ui/post-type-list/actions'; -import { isPublicizeEnabled } from 'state/selectors'; +import isPublicizeEnabled from 'state/selectors/is-publicize-enabled'; class PostActionsEllipsisMenuShare extends Component { static propTypes = { diff --git a/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx b/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx index d1a28e0d3589a..f5cb868c9477f 100644 --- a/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx +++ b/client/my-sites/post-type-list/post-actions-ellipsis-menu/trash.jsx @@ -15,7 +15,7 @@ import PopoverMenuItem from 'components/popover/menu-item'; import { bumpStat, recordTracksEvent } from 'state/analytics/actions'; import { bumpStatGenerator } from './utils'; import { trashPost, deletePost } from 'state/posts/actions'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getPost } from 'state/posts/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; diff --git a/client/my-sites/post-type-list/post-thumbnail.jsx b/client/my-sites/post-type-list/post-thumbnail.jsx index dfc5491723658..17140af1a7c84 100644 --- a/client/my-sites/post-type-list/post-thumbnail.jsx +++ b/client/my-sites/post-type-list/post-thumbnail.jsx @@ -17,7 +17,7 @@ import resizeImageUrl from 'lib/resize-image-url'; import safeImageUrl from 'lib/safe-image-url'; import { getNormalizedPost } from 'state/posts/selectors'; import { getEditorPath } from 'state/ui/editor/selectors'; -import { canCurrentUserEditPost } from 'state/selectors'; +import canCurrentUserEditPost from 'state/selectors/can-current-user-edit-post'; import { isMultiSelectEnabled } from 'state/ui/post-type-list/selectors'; function PostTypeListPostThumbnail( { onClick, thumbnail, postLink } ) { diff --git a/client/my-sites/posts/controller.js b/client/my-sites/posts/controller.js index 5013d44d1b667..391d4c327e267 100644 --- a/client/my-sites/posts/controller.js +++ b/client/my-sites/posts/controller.js @@ -13,7 +13,7 @@ import i18n from 'i18n-calypso'; /** * Internal Dependencies */ -import { areAllSitesSingleUser } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite, isSingleUserSite } from 'state/sites/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; diff --git a/client/my-sites/sharing/buttons/appearance.jsx b/client/my-sites/sharing/buttons/appearance.jsx index 0bfaeacc8c43a..60fdd6205713a 100644 --- a/client/my-sites/sharing/buttons/appearance.jsx +++ b/client/my-sites/sharing/buttons/appearance.jsx @@ -18,7 +18,7 @@ import ButtonsPreviewPlaceholder from './preview-placeholder'; import ButtonsStyle from './style'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { isPrivateSite } from 'state/selectors'; +import isPrivateSite from 'state/selectors/is-private-site'; import { recordGoogleEvent } from 'state/analytics/actions'; class SharingButtonsAppearance extends Component { diff --git a/client/my-sites/sharing/buttons/buttons.jsx b/client/my-sites/sharing/buttons/buttons.jsx index 04038bd5cd7bf..7d133eb124eee 100644 --- a/client/my-sites/sharing/buttons/buttons.jsx +++ b/client/my-sites/sharing/buttons/buttons.jsx @@ -27,13 +27,11 @@ import { isSavingSiteSettings, isSiteSettingsSaveSuccessful, } from 'state/site-settings/selectors'; -import { - getSharingButtons, - isSavingSharingButtons, - isSharingButtonsSaveSuccessful, -} from 'state/selectors'; +import getSharingButtons from 'state/selectors/get-sharing-buttons'; +import isSavingSharingButtons from 'state/selectors/is-saving-sharing-buttons'; +import isSharingButtonsSaveSuccessful from 'state/selectors/is-sharing-buttons-save-successful'; import { isJetpackSite } from 'state/sites/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { recordGoogleEvent } from 'state/analytics/actions'; import { successNotice, errorNotice } from 'state/notices/actions'; import { activateModule } from 'state/jetpack/modules/actions'; diff --git a/client/my-sites/sharing/buttons/options.jsx b/client/my-sites/sharing/buttons/options.jsx index 6e5c2fb7f42c7..f2e4c2ea5f0f3 100644 --- a/client/my-sites/sharing/buttons/options.jsx +++ b/client/my-sites/sharing/buttons/options.jsx @@ -17,7 +17,7 @@ import MultiCheckbox from 'components/forms/multi-checkbox'; import { getPostTypes } from 'state/post-types/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSiteSettings } from 'state/site-settings/selectors'; -import { getSharingButtons } from 'state/selectors'; +import getSharingButtons from 'state/selectors/get-sharing-buttons'; import { isJetpackSite, isJetpackMinimumVersion } from 'state/sites/selectors'; import QueryPostTypes from 'components/data/query-post-types'; import { recordGoogleEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/sharing/connections/connection.jsx b/client/my-sites/sharing/connections/connection.jsx index f3c3a5e576c1d..7632bcb8494da 100644 --- a/client/my-sites/sharing/connections/connection.jsx +++ b/client/my-sites/sharing/connections/connection.jsx @@ -16,7 +16,7 @@ import Gridicon from 'gridicons'; * Internal dependencies */ import { getCurrentUserId } from 'state/current-user/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSelectedSiteId } from 'state/ui/selectors'; import { recordGoogleEvent } from 'state/analytics/actions'; import UsersStore from 'lib/users/store'; diff --git a/client/my-sites/sharing/connections/services/google-my-business.js b/client/my-sites/sharing/connections/services/google-my-business.js index f5f3f69e5835c..6ff9a2d1a8a9b 100644 --- a/client/my-sites/sharing/connections/services/google-my-business.js +++ b/client/my-sites/sharing/connections/services/google-my-business.js @@ -15,10 +15,8 @@ import GoogleMyBusinessLogo from 'my-sites/google-my-business/logo'; import { SharingService, connectFor } from 'my-sites/sharing/connections/service'; import { requestSiteSettings, saveSiteSettings } from 'state/site-settings/actions'; import { getSiteSettings, isRequestingSiteSettings } from 'state/site-settings/selectors'; -import { - getGoogleMyBusinessLocations, - getSiteUserConnectionsForGoogleMyBusiness, -} from 'state/selectors'; +import getGoogleMyBusinessLocations from 'state/selectors/get-google-my-business-locations'; +import getSiteUserConnectionsForGoogleMyBusiness from 'state/selectors/get-site-user-connections-for-google-my-business'; import { connectGoogleMyBusinessLocation, disconnectGoogleMyBusinessLocation, diff --git a/client/my-sites/sharing/controller.js b/client/my-sites/sharing/controller.js index 6f6059ef1e132..ac03e91772e96 100644 --- a/client/my-sites/sharing/controller.js +++ b/client/my-sites/sharing/controller.js @@ -16,7 +16,7 @@ import Sharing from './main'; import SharingButtons from './buttons/buttons'; import SharingConnections from './connections/connections'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { isJetpackSite, isJetpackModuleActive, diff --git a/client/my-sites/sharing/main.jsx b/client/my-sites/sharing/main.jsx index 668d49d822bb5..fe9558a36d27a 100644 --- a/client/my-sites/sharing/main.jsx +++ b/client/my-sites/sharing/main.jsx @@ -13,7 +13,9 @@ import { localize } from 'i18n-calypso'; /** * Internal dependencies */ -import { canCurrentUser, isJetpackModuleActive } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; + +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import DocumentHead from 'components/data/document-head'; import { getSiteSlug, isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; diff --git a/client/my-sites/sidebar/manage-menu.jsx b/client/my-sites/sidebar/manage-menu.jsx index f7ed0ec915d58..826f9bb900700 100644 --- a/client/my-sites/sidebar/manage-menu.jsx +++ b/client/my-sites/sidebar/manage-menu.jsx @@ -30,7 +30,8 @@ import { isJetpackSite, isSingleUserSite, } from 'state/sites/selectors'; -import { areAllSitesSingleUser, canCurrentUser } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; +import canCurrentUser from 'state/selectors/can-current-user'; import { itemLinkMatches } from './utils'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/my-sites/sidebar/sidebar.jsx b/client/my-sites/sidebar/sidebar.jsx index 0e28923405f11..45117ab749c62 100644 --- a/client/my-sites/sidebar/sidebar.jsx +++ b/client/my-sites/sidebar/sidebar.jsx @@ -31,15 +31,13 @@ import { isFreeTrial, isPersonal, isPremium, isBusiness } from 'lib/products-val import { getCurrentUser } from 'state/current-user/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { setNextLayoutFocus, setLayoutFocus } from 'state/ui/layout-focus/actions'; -import { - canCurrentUser, - canCurrentUserManagePlugins, - getPrimarySiteId, - hasJetpackSites, - isDomainOnlySite, - isSiteAutomatedTransfer, - hasSitePendingAutomatedTransfer, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import canCurrentUserManagePlugins from 'state/selectors/can-current-user-manage-plugins'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; +import hasJetpackSites from 'state/selectors/has-jetpack-sites'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { getCustomizerUrl, getSite, diff --git a/client/my-sites/site-indicator/site-indicator.jsx b/client/my-sites/site-indicator/site-indicator.jsx index 707ce630ea7d7..2d7251a8f44f8 100644 --- a/client/my-sites/site-indicator/site-indicator.jsx +++ b/client/my-sites/site-indicator/site-indicator.jsx @@ -21,12 +21,10 @@ import ExternalLink from 'components/external-link'; import { composeAnalytics, recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; import QuerySiteConnectionStatus from 'components/data/query-site-connection-status'; import { getUpdatesBySiteId, isJetpackSite } from 'state/sites/selectors'; -import { - canCurrentUser, - getSiteConnectionStatus, - isRequestingSiteConnectionStatus, - isSiteAutomatedTransfer, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSiteConnectionStatus from 'state/selectors/get-site-connection-status'; +import isRequestingSiteConnectionStatus from 'state/selectors/is-requesting-site-connection-status'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; const WPAdminLink = props => ; diff --git a/client/my-sites/site-settings/comment-display-settings/index.jsx b/client/my-sites/site-settings/comment-display-settings/index.jsx index d040ff1e29774..3bbc80ab1690c 100644 --- a/client/my-sites/site-settings/comment-display-settings/index.jsx +++ b/client/my-sites/site-settings/comment-display-settings/index.jsx @@ -19,7 +19,7 @@ import FormTextInput from 'components/forms/form-text-input'; import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { getSelectedSiteId } from 'state/ui/selectors'; class CommentDisplaySettings extends Component { diff --git a/client/my-sites/site-settings/composing/after-the-deadline.jsx b/client/my-sites/site-settings/composing/after-the-deadline.jsx index b46f027e4a577..6f81723e8f2de 100644 --- a/client/my-sites/site-settings/composing/after-the-deadline.jsx +++ b/client/my-sites/site-settings/composing/after-the-deadline.jsx @@ -22,11 +22,9 @@ import CompactFormToggle from 'components/forms/form-toggle/compact'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; class AfterTheDeadline extends Component { diff --git a/client/my-sites/site-settings/controller.js b/client/my-sites/site-settings/controller.js index 3b2ef6855b6ca..71bf50c022390 100644 --- a/client/my-sites/site-settings/controller.js +++ b/client/my-sites/site-settings/controller.js @@ -20,7 +20,9 @@ import ThemeSetup from './theme-setup'; import ManageConnection from './manage-connection'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { canCurrentUser, isSiteAutomatedTransfer, isVipSite } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; +import isVipSite from 'state/selectors/is-vip-site'; import { SITES_ONCE_CHANGED } from 'state/action-types'; import { setSection } from 'state/ui/actions'; diff --git a/client/my-sites/site-settings/custom-content-types/index.jsx b/client/my-sites/site-settings/custom-content-types/index.jsx index da3b70fca3f57..0209070242597 100644 --- a/client/my-sites/site-settings/custom-content-types/index.jsx +++ b/client/my-sites/site-settings/custom-content-types/index.jsx @@ -17,7 +17,8 @@ import FormFieldset from 'components/forms/form-fieldset'; import FormTextInput from 'components/forms/form-text-input'; import CompactFormToggle from 'components/forms/form-toggle/compact'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackModuleActive, isActivatingJetpackModule } from 'state/selectors'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { activateModule } from 'state/jetpack/modules/actions'; import { isJetpackSite } from 'state/sites/selectors'; import FormSettingExplanation from 'components/forms/form-setting-explanation'; diff --git a/client/my-sites/site-settings/delete-site/index.jsx b/client/my-sites/site-settings/delete-site/index.jsx index b9a2c6abc5898..cc65498fa8bb6 100644 --- a/client/my-sites/site-settings/delete-site/index.jsx +++ b/client/my-sites/site-settings/delete-site/index.jsx @@ -30,7 +30,7 @@ import Notice from 'components/notice'; import QuerySitePurchases from 'components/data/query-site-purchases'; import { deleteSite } from 'state/sites/actions'; import { setSelectedSiteId } from 'state/ui/actions'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import FormLabel from 'components/forms/form-label'; class DeleteSite extends Component { diff --git a/client/my-sites/site-settings/disconnect-site/disconnect-survey.jsx b/client/my-sites/site-settings/disconnect-site/disconnect-survey.jsx index 3413907943bde..4222df2389a4f 100644 --- a/client/my-sites/site-settings/disconnect-site/disconnect-survey.jsx +++ b/client/my-sites/site-settings/disconnect-site/disconnect-survey.jsx @@ -15,7 +15,7 @@ import QuerySitePlans from 'components/data/query-site-plans'; import FormTextInput from 'components/forms/form-text-input'; import SectionHeader from 'components/section-header'; import { addQueryArgs } from 'lib/url'; -import { isSiteOnPaidPlan } from 'state/selectors'; +import isSiteOnPaidPlan from 'state/selectors/is-site-on-paid-plan'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; class DisconnectSurvey extends PureComponent { diff --git a/client/my-sites/site-settings/disconnect-site/too-expensive.jsx b/client/my-sites/site-settings/disconnect-site/too-expensive.jsx index a03f41767aa52..02f6ac1549f78 100644 --- a/client/my-sites/site-settings/disconnect-site/too-expensive.jsx +++ b/client/my-sites/site-settings/disconnect-site/too-expensive.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; import CompactCard from 'components/card/compact'; import Placeholder from 'my-sites/site-settings/placeholder'; import QuerySitePlans from 'components/data/query-site-plans'; -import { getCurrentPlanPurchaseId } from 'state/selectors'; +import getCurrentPlanPurchaseId from 'state/selectors/get-current-plan-purchase-id'; import { getSiteSlug } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { addQueryArgs } from 'lib/url'; diff --git a/client/my-sites/site-settings/disconnect-site/troubleshoot.jsx b/client/my-sites/site-settings/disconnect-site/troubleshoot.jsx index 4d8b29da7dfa4..ed026eca703d2 100644 --- a/client/my-sites/site-settings/disconnect-site/troubleshoot.jsx +++ b/client/my-sites/site-settings/disconnect-site/troubleshoot.jsx @@ -16,7 +16,8 @@ import LoggedOutFormLinkItem from 'components/logged-out-form/link-item'; import LoggedOutFormLinks from 'components/logged-out-form/links'; import { addQueryArgs } from 'lib/route'; import { recordTracksEvent, withAnalytics } from 'state/analytics/actions'; -import { getSiteUrl, isSiteOnFreePlan } from 'state/selectors'; +import getSiteUrl from 'state/selectors/get-site-url'; +import isSiteOnFreePlan from 'state/selectors/is-site-on-free-plan'; import { getSelectedSiteId } from 'state/ui/selectors'; const Troubleshoot = ( { isFreePlan, siteUrl, trackDebugClick, translate } ) => ( diff --git a/client/my-sites/site-settings/form-analytics.jsx b/client/my-sites/site-settings/form-analytics.jsx index c8d6f8ab805c7..eacf1870a328a 100644 --- a/client/my-sites/site-settings/form-analytics.jsx +++ b/client/my-sites/site-settings/form-analytics.jsx @@ -36,7 +36,7 @@ import { siteSupportsGoogleAnalyticsBasicEcommerceTracking, siteSupportsGoogleAnalyticsEnhancedEcommerceTracking, } from 'state/sites/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { FEATURE_GOOGLE_ANALYTICS, TYPE_BUSINESS, TERM_ANNUALLY } from 'lib/plans/constants'; import { findFirstSimilarPlanKey } from 'lib/plans'; diff --git a/client/my-sites/site-settings/form-discussion.jsx b/client/my-sites/site-settings/form-discussion.jsx index 0ca5ef2988ca4..8eb8eab2b9565 100644 --- a/client/my-sites/site-settings/form-discussion.jsx +++ b/client/my-sites/site-settings/form-discussion.jsx @@ -27,7 +27,7 @@ import SectionHeader from 'components/section-header'; import Subscriptions from './subscriptions'; import wrapSettingsForm from './wrap-settings-form'; import { isJetpackSite, siteSupportsJetpackSettingsUi } from 'state/sites/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import JetpackModuleToggle from './jetpack-module-toggle'; diff --git a/client/my-sites/site-settings/form-jetpack-monitor.jsx b/client/my-sites/site-settings/form-jetpack-monitor.jsx index 965adf68c87b0..4c284f917d4c9 100644 --- a/client/my-sites/site-settings/form-jetpack-monitor.jsx +++ b/client/my-sites/site-settings/form-jetpack-monitor.jsx @@ -24,15 +24,13 @@ import QuerySiteMonitorSettings from 'components/data/query-site-monitor-setting import { getSelectedSiteId } from 'state/ui/selectors'; import { updateSiteMonitorSettings } from 'state/sites/monitor/actions'; import { recordGoogleEvent } from 'state/analytics/actions'; -import { - getSiteMonitorSettings, - isActivatingJetpackModule, - isDeactivatingJetpackModule, - isFetchingJetpackModules, - isJetpackModuleActive, - isRequestingSiteMonitorSettings, - isUpdatingSiteMonitorSettings, -} from 'state/selectors'; +import getSiteMonitorSettings from 'state/selectors/get-site-monitor-settings'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isDeactivatingJetpackModule from 'state/selectors/is-deactivating-jetpack-module'; +import isFetchingJetpackModules from 'state/selectors/is-fetching-jetpack-modules'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isRequestingSiteMonitorSettings from 'state/selectors/is-requesting-site-monitor-settings'; +import isUpdatingSiteMonitorSettings from 'state/selectors/is-updating-site-monitor-settings'; class SiteSettingsFormJetpackMonitor extends Component { state = {}; diff --git a/client/my-sites/site-settings/form-security.jsx b/client/my-sites/site-settings/form-security.jsx index b611b52988466..cb1d4793ffc6c 100644 --- a/client/my-sites/site-settings/form-security.jsx +++ b/client/my-sites/site-settings/form-security.jsx @@ -20,11 +20,9 @@ import Sso from './sso'; import QueryJetpackModules from 'components/data/query-jetpack-modules'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { siteSupportsJetpackSettingsUi } from 'state/sites/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import SpamFilteringSettings from './spam-filtering-settings'; import QueryJetpackSettings from 'components/data/query-jetpack-settings'; import { isATEnabled } from 'lib/automated-transfer'; diff --git a/client/my-sites/site-settings/jetpack-ads.jsx b/client/my-sites/site-settings/jetpack-ads.jsx index d30483c92977f..7004cbd1c22bd 100644 --- a/client/my-sites/site-settings/jetpack-ads.jsx +++ b/client/my-sites/site-settings/jetpack-ads.jsx @@ -24,7 +24,7 @@ import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import SectionHeader from 'components/section-header'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { hasFeature } from 'state/sites/plans/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { FEATURE_WORDADS_INSTANT, PLAN_JETPACK_PREMIUM } from 'lib/plans/constants'; class JetpackAds extends Component { diff --git a/client/my-sites/site-settings/jetpack-credentials/credentials-configured/index.jsx b/client/my-sites/site-settings/jetpack-credentials/credentials-configured/index.jsx index 3cb226ba9f06b..84356d579ba92 100644 --- a/client/my-sites/site-settings/jetpack-credentials/credentials-configured/index.jsx +++ b/client/my-sites/site-settings/jetpack-credentials/credentials-configured/index.jsx @@ -16,7 +16,7 @@ import CompactCard from 'components/card/compact'; import RewindCredentialsForm from 'components/rewind-credentials-form'; import Button from 'components/button'; import { deleteCredentials } from 'state/jetpack/credentials/actions'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; class CredentialsConfigured extends Component { state = { diff --git a/client/my-sites/site-settings/jetpack-credentials/credentials-setup-flow/setup-tos.jsx b/client/my-sites/site-settings/jetpack-credentials/credentials-setup-flow/setup-tos.jsx index 009c08c972d1d..dcd3d5b329d69 100644 --- a/client/my-sites/site-settings/jetpack-credentials/credentials-setup-flow/setup-tos.jsx +++ b/client/my-sites/site-settings/jetpack-credentials/credentials-setup-flow/setup-tos.jsx @@ -13,7 +13,7 @@ import CompactCard from 'components/card/compact'; import Gridicon from 'gridicons'; import Button from 'components/button'; import { autoConfigCredentials } from 'state/jetpack/credentials/actions'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; const SetupTos = ( { autoConfigure, canAutoconfigure, reset, translate, goToNextStep } ) => ( diff --git a/client/my-sites/site-settings/jetpack-credentials/index.jsx b/client/my-sites/site-settings/jetpack-credentials/index.jsx index c849bfd077e84..27f293ed6bc79 100644 --- a/client/my-sites/site-settings/jetpack-credentials/index.jsx +++ b/client/my-sites/site-settings/jetpack-credentials/index.jsx @@ -17,7 +17,7 @@ import Notice from 'components/notice'; import QueryRewindState from 'components/data/query-rewind-state'; import SectionHeader from 'components/section-header'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; import { getSiteSlug } from 'state/sites/selectors'; class JetpackCredentials extends Component { diff --git a/client/my-sites/site-settings/jetpack-dev-mode-notice.jsx b/client/my-sites/site-settings/jetpack-dev-mode-notice.jsx index 18df38390307e..f0c283955fc49 100644 --- a/client/my-sites/site-settings/jetpack-dev-mode-notice.jsx +++ b/client/my-sites/site-settings/jetpack-dev-mode-notice.jsx @@ -15,7 +15,7 @@ import Notice from 'components/notice'; import NoticeAction from 'components/notice/notice-action'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackSiteInDevelopmentMode } from 'state/selectors'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import { isJetpackSite, siteSupportsJetpackSettingsUi } from 'state/sites/selectors'; const JetpackDevModeNotice = ( { diff --git a/client/my-sites/site-settings/jetpack-module-toggle.jsx b/client/my-sites/site-settings/jetpack-module-toggle.jsx index 56bf6cb006fa4..ad6140ec0c38c 100644 --- a/client/my-sites/site-settings/jetpack-module-toggle.jsx +++ b/client/my-sites/site-settings/jetpack-module-toggle.jsx @@ -14,12 +14,10 @@ import { localize } from 'i18n-calypso'; import CompactFormToggle from 'components/forms/form-toggle/compact'; import FormSettingExplanation from 'components/forms/form-setting-explanation'; import { activateModule, deactivateModule } from 'state/jetpack/modules/actions'; -import { - getJetpackModule, - isActivatingJetpackModule, - isDeactivatingJetpackModule, - isJetpackModuleActive, -} from 'state/selectors'; +import getJetpackModule from 'state/selectors/get-jetpack-module'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isDeactivatingJetpackModule from 'state/selectors/is-deactivating-jetpack-module'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { isJetpackSite } from 'state/sites/selectors'; class JetpackModuleToggle extends Component { diff --git a/client/my-sites/site-settings/jetpack-site-stats.jsx b/client/my-sites/site-settings/jetpack-site-stats.jsx index 9ad76b32239b9..89ddbbf4d30f8 100644 --- a/client/my-sites/site-settings/jetpack-site-stats.jsx +++ b/client/my-sites/site-settings/jetpack-site-stats.jsx @@ -26,11 +26,9 @@ import SectionHeader from 'components/section-header'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { getSiteRoles } from 'state/site-roles/selectors'; import { getStatsPathForTab } from 'lib/route'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; class JetpackSiteStats extends Component { static defaultProps = { diff --git a/client/my-sites/site-settings/manage-connection/data-synchronization.jsx b/client/my-sites/site-settings/manage-connection/data-synchronization.jsx index c2d27b5be3e2f..c68f368bcfc73 100644 --- a/client/my-sites/site-settings/manage-connection/data-synchronization.jsx +++ b/client/my-sites/site-settings/manage-connection/data-synchronization.jsx @@ -18,7 +18,7 @@ import PublicPostTypes from './public-post-types'; import SectionHeader from 'components/section-header'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; -import { getSiteUrl } from 'state/selectors'; +import getSiteUrl from 'state/selectors/get-site-url'; const DataSynchronization = ( { siteUrl, supportsJetpackSync, translate } ) => { if ( ! supportsJetpackSync ) { diff --git a/client/my-sites/site-settings/manage-connection/disconnect-site-link.jsx b/client/my-sites/site-settings/manage-connection/disconnect-site-link.jsx index 148b0ae8b8bf4..9d5aa21359c72 100644 --- a/client/my-sites/site-settings/manage-connection/disconnect-site-link.jsx +++ b/client/my-sites/site-settings/manage-connection/disconnect-site-link.jsx @@ -14,7 +14,7 @@ import { localize } from 'i18n-calypso'; import SiteToolsLink from 'my-sites/site-settings/site-tools/link'; import { getSiteSlug } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; import { recordTracksEvent } from 'state/analytics/actions'; class DisconnectSiteLink extends PureComponent { diff --git a/client/my-sites/site-settings/manage-connection/site-ownership.jsx b/client/my-sites/site-settings/manage-connection/site-ownership.jsx index 57d68dccbe18f..f74e6f80addae 100644 --- a/client/my-sites/site-settings/manage-connection/site-ownership.jsx +++ b/client/my-sites/site-settings/manage-connection/site-ownership.jsx @@ -22,11 +22,9 @@ import QueryJetpackUserConnection from 'components/data/query-jetpack-user-conne import { getCurrentUser } from 'state/current-user/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { - isJetpackSiteConnected, - isJetpackSiteInDevelopmentMode, - isJetpackUserMaster, -} from 'state/selectors'; +import isJetpackSiteConnected from 'state/selectors/is-jetpack-site-connected'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; +import isJetpackUserMaster from 'state/selectors/is-jetpack-user-master'; class SiteOwnership extends Component { renderPlaceholder() { diff --git a/client/my-sites/site-settings/masterbar.jsx b/client/my-sites/site-settings/masterbar.jsx index f884f32ed9895..9e2d52c05078a 100644 --- a/client/my-sites/site-settings/masterbar.jsx +++ b/client/my-sites/site-settings/masterbar.jsx @@ -16,10 +16,8 @@ import Card from 'components/card'; import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import FormFieldset from 'components/forms/form-fieldset'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; diff --git a/client/my-sites/site-settings/media-settings.jsx b/client/my-sites/site-settings/media-settings.jsx index 1cfb2adbbc908..864b5ca195aad 100644 --- a/client/my-sites/site-settings/media-settings.jsx +++ b/client/my-sites/site-settings/media-settings.jsx @@ -30,13 +30,11 @@ import { FEATURE_VIDEO_UPLOADS_JETPACK_PRO, } from 'lib/plans/constants'; import { hasFeature } from 'state/sites/plans/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, - getMediaStorageLimit, - getMediaStorageUsed, -} from 'state/selectors'; +import getMediaStorageLimit from 'state/selectors/get-media-storage-limit'; +import getMediaStorageUsed from 'state/selectors/get-media-storage-used'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSitePlanSlug, getSiteSlug } from 'state/sites/selectors'; import QueryMediaStorage from 'components/data/query-media-storage'; diff --git a/client/my-sites/site-settings/protect.jsx b/client/my-sites/site-settings/protect.jsx index d5535dfe0ecae..73543241bdc6f 100644 --- a/client/my-sites/site-settings/protect.jsx +++ b/client/my-sites/site-settings/protect.jsx @@ -21,11 +21,9 @@ import FormLabel from 'components/forms/form-label'; import FormSettingExplanation from 'components/forms/form-setting-explanation'; import FormTextarea from 'components/forms/form-textarea'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; diff --git a/client/my-sites/site-settings/publishing-tools/index.jsx b/client/my-sites/site-settings/publishing-tools/index.jsx index f33fec3d5cc95..fc68eb5de7d22 100644 --- a/client/my-sites/site-settings/publishing-tools/index.jsx +++ b/client/my-sites/site-settings/publishing-tools/index.jsx @@ -22,12 +22,10 @@ import FormFieldset from 'components/forms/form-fieldset'; import FormLabel from 'components/forms/form-label'; import { getSelectedSiteId } from 'state/ui/selectors'; import { regeneratePostByEmail } from 'state/jetpack/settings/actions'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, - isRegeneratingJetpackPostByEmail, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; +import isRegeneratingJetpackPostByEmail from 'state/selectors/is-regenerating-jetpack-post-by-email'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import ClipboardButtonInput from 'components/clipboard-button-input'; diff --git a/client/my-sites/site-settings/redirect-non-jetpack/index.jsx b/client/my-sites/site-settings/redirect-non-jetpack/index.jsx index 176fd171fce3c..e1058b2516c42 100644 --- a/client/my-sites/site-settings/redirect-non-jetpack/index.jsx +++ b/client/my-sites/site-settings/redirect-non-jetpack/index.jsx @@ -14,7 +14,7 @@ import page from 'page'; */ import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; const redirectNonJetpack = redirectRoute => WrappedComponent => { class RedirectNonJetpack extends Component { diff --git a/client/my-sites/site-settings/search.jsx b/client/my-sites/site-settings/search.jsx index d012a6d317ff8..8a847feda6824 100644 --- a/client/my-sites/site-settings/search.jsx +++ b/client/my-sites/site-settings/search.jsx @@ -23,11 +23,9 @@ import ExternalLink from 'components/external-link'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import untrailingslashit from 'lib/route/untrailingslashit'; -import { - getJetpackModule, - isActivatingJetpackModule, - isJetpackModuleActive, -} from 'state/selectors'; +import getJetpackModule from 'state/selectors/get-jetpack-module'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { isJetpackSite } from 'state/sites/selectors'; import { isBusiness, isEnterprise, isVipPlan, isJetpackBusiness } from 'lib/products-values'; diff --git a/client/my-sites/site-settings/seo-settings/form.jsx b/client/my-sites/site-settings/seo-settings/form.jsx index 22ed261f53d63..22dfab2c7befe 100644 --- a/client/my-sites/site-settings/seo-settings/form.jsx +++ b/client/my-sites/site-settings/seo-settings/form.jsx @@ -35,7 +35,9 @@ import { getSiteSettingsSaveError, } from 'state/site-settings/selectors'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackModuleActive, isHiddenSite, isPrivateSite } from 'state/selectors'; +import isHiddenSite from 'state/selectors/is-hidden-site'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isPrivateSite from 'state/selectors/is-private-site'; import { toApi as seoTitleToApi } from 'components/seo/meta-title-editor/mappings'; import { recordTracksEvent } from 'state/analytics/actions'; import { requestSite } from 'state/sites/actions'; diff --git a/client/my-sites/site-settings/seo-settings/site-verification.jsx b/client/my-sites/site-settings/seo-settings/site-verification.jsx index c0dd8905c8904..30a53ca9d9d7d 100644 --- a/client/my-sites/site-settings/seo-settings/site-verification.jsx +++ b/client/my-sites/site-settings/seo-settings/site-verification.jsx @@ -25,7 +25,7 @@ import QueryJetpackModules from 'components/data/query-jetpack-modules'; import QuerySiteSettings from 'components/data/query-site-settings'; import SectionHeader from 'components/section-header'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { isJetpackMinimumVersion, isJetpackSite } from 'state/sites/selectors'; import { isSiteSettingsSaveSuccessful, diff --git a/client/my-sites/site-settings/settings-controller.js b/client/my-sites/site-settings/settings-controller.js index 7b3688ea4eaeb..e1a4bc439416e 100644 --- a/client/my-sites/site-settings/settings-controller.js +++ b/client/my-sites/site-settings/settings-controller.js @@ -13,7 +13,7 @@ import analytics from 'lib/analytics'; import { sectionify } from 'lib/route'; import titlecase from 'to-title-case'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; export default { siteSettings( context, next ) { diff --git a/client/my-sites/site-settings/settings-security/main.jsx b/client/my-sites/site-settings/settings-security/main.jsx index 444b0d78e2bb3..b2eb8bbd123eb 100644 --- a/client/my-sites/site-settings/settings-security/main.jsx +++ b/client/my-sites/site-settings/settings-security/main.jsx @@ -20,7 +20,7 @@ import SiteSettingsNavigation from 'my-sites/site-settings/navigation'; import FormSecurity from 'my-sites/site-settings/form-security'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; import JetpackDevModeNotice from 'my-sites/site-settings/jetpack-dev-mode-notice'; import JetpackMonitor from 'my-sites/site-settings/form-jetpack-monitor'; import JetpackManageErrorPage from 'my-sites/jetpack-manage-error-page'; diff --git a/client/my-sites/site-settings/site-icon-setting/index.jsx b/client/my-sites/site-settings/site-icon-setting/index.jsx index 9bb0ab4f28971..610b6388e8522 100644 --- a/client/my-sites/site-settings/site-icon-setting/index.jsx +++ b/client/my-sites/site-settings/site-icon-setting/index.jsx @@ -40,12 +40,10 @@ import { getImageEditorCrop, getImageEditorTransform, } from 'state/ui/editor/image-editor/selectors'; -import { - getSiteIconId, - getSiteIconUrl, - isPrivateSite, - isSiteSupportingImageEditor, -} from 'state/selectors'; +import getSiteIconId from 'state/selectors/get-site-icon-id'; +import getSiteIconUrl from 'state/selectors/get-site-icon-url'; +import isPrivateSite from 'state/selectors/is-private-site'; +import isSiteSupportingImageEditor from 'state/selectors/is-site-supporting-image-editor'; import { errorNotice } from 'state/notices/actions'; class SiteIconSetting extends Component { diff --git a/client/my-sites/site-settings/site-tools/index.jsx b/client/my-sites/site-settings/site-tools/index.jsx index 715ea59cc8ca7..f5f814c7163d5 100644 --- a/client/my-sites/site-settings/site-tools/index.jsx +++ b/client/my-sites/site-settings/site-tools/index.jsx @@ -19,7 +19,8 @@ import SectionHeader from 'components/section-header'; import SiteToolsLink from './link'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; import { isJetpackSite, getSiteAdminUrl } from 'state/sites/selectors'; -import { isSiteAutomatedTransfer, isVipSite } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; +import isVipSite from 'state/selectors/is-vip-site'; import { getSitePurchases, hasLoadedSitePurchasesFromServer, diff --git a/client/my-sites/site-settings/sitemaps.jsx b/client/my-sites/site-settings/sitemaps.jsx index a61360f0644cc..01a7aab332230 100644 --- a/client/my-sites/site-settings/sitemaps.jsx +++ b/client/my-sites/site-settings/sitemaps.jsx @@ -21,11 +21,9 @@ import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; import { getSelectedSite, getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; -import { - getJetpackModule, - isActivatingJetpackModule, - isJetpackModuleActive, -} from 'state/selectors'; +import getJetpackModule from 'state/selectors/get-jetpack-module'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { isJetpackSite } from 'state/sites/selectors'; class Sitemaps extends Component { diff --git a/client/my-sites/site-settings/spam-filtering-settings.jsx b/client/my-sites/site-settings/spam-filtering-settings.jsx index 058379aa98a08..6900f4fae4333 100644 --- a/client/my-sites/site-settings/spam-filtering-settings.jsx +++ b/client/my-sites/site-settings/spam-filtering-settings.jsx @@ -23,7 +23,7 @@ import Gridicon from 'gridicons'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackSettingsSaveFailure } from 'state/selectors'; +import isJetpackSettingsSaveFailure from 'state/selectors/is-jetpack-settings-save-failure'; import FormSettingExplanation from 'components/forms/form-setting-explanation'; import { hasFeature } from 'state/sites/plans/selectors'; import { FEATURE_SPAM_AKISMET_PLUS, PLAN_JETPACK_PERSONAL } from 'lib/plans/constants'; diff --git a/client/my-sites/site-settings/speed-up-site-settings.jsx b/client/my-sites/site-settings/speed-up-site-settings.jsx index c50351143b428..4a245843c3664 100644 --- a/client/my-sites/site-settings/speed-up-site-settings.jsx +++ b/client/my-sites/site-settings/speed-up-site-settings.jsx @@ -15,10 +15,8 @@ import Card from 'components/card'; import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import FormFieldset from 'components/forms/form-fieldset'; import ExternalLink from 'components/external-link'; -import { - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSiteSlug } from 'state/sites/selectors'; import InfoPopover from 'components/info-popover'; diff --git a/client/my-sites/site-settings/sso.jsx b/client/my-sites/site-settings/sso.jsx index 47785f592d451..7210814ee1c6c 100644 --- a/client/my-sites/site-settings/sso.jsx +++ b/client/my-sites/site-settings/sso.jsx @@ -17,11 +17,9 @@ import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import FormFieldset from 'components/forms/form-fieldset'; import CompactFormToggle from 'components/forms/form-toggle/compact'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; diff --git a/client/my-sites/site-settings/subscriptions.jsx b/client/my-sites/site-settings/subscriptions.jsx index d1d654a3204cf..9acff9ff35a2c 100644 --- a/client/my-sites/site-settings/subscriptions.jsx +++ b/client/my-sites/site-settings/subscriptions.jsx @@ -17,11 +17,9 @@ import JetpackModuleToggle from 'my-sites/site-settings/jetpack-module-toggle'; import FormFieldset from 'components/forms/form-fieldset'; import CompactFormToggle from 'components/forms/form-toggle/compact'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; -import { - isJetpackModuleActive, - isJetpackModuleUnavailableInDevelopmentMode, - isJetpackSiteInDevelopmentMode, -} from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import QueryJetpackConnection from 'components/data/query-jetpack-connection'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; diff --git a/client/my-sites/site-settings/theme-enhancements.jsx b/client/my-sites/site-settings/theme-enhancements.jsx index 7f5052eeaab41..e9ab66799b25d 100644 --- a/client/my-sites/site-settings/theme-enhancements.jsx +++ b/client/my-sites/site-settings/theme-enhancements.jsx @@ -24,7 +24,7 @@ import FormSettingExplanation from 'components/forms/form-setting-explanation'; import CompactFormToggle from 'components/forms/form-toggle/compact'; import { getCustomizerUrl } from 'state/sites/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import InfoPopover from 'components/info-popover'; import ExternalLink from 'components/external-link'; diff --git a/client/my-sites/site-settings/wrap-settings-form.jsx b/client/my-sites/site-settings/wrap-settings-form.jsx index 377372599f42b..b14cad75662e3 100644 --- a/client/my-sites/site-settings/wrap-settings-form.jsx +++ b/client/my-sites/site-settings/wrap-settings-form.jsx @@ -22,12 +22,10 @@ import { getSiteSettingsSaveError, getSiteSettings, } from 'state/site-settings/selectors'; -import { - isRequestingJetpackSettings, - isUpdatingJetpackSettings, - isJetpackSettingsSaveFailure, - getJetpackSettings, -} from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; +import isJetpackSettingsSaveFailure from 'state/selectors/is-jetpack-settings-save-failure'; +import isRequestingJetpackSettings from 'state/selectors/is-requesting-jetpack-settings'; +import isUpdatingJetpackSettings from 'state/selectors/is-updating-jetpack-settings'; import { recordGoogleEvent, recordTracksEvent } from 'state/analytics/actions'; import { saveSiteSettings } from 'state/site-settings/actions'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; diff --git a/client/my-sites/sites/sites.jsx b/client/my-sites/sites/sites.jsx index f394e673b39d3..4cc0f427475eb 100644 --- a/client/my-sites/sites/sites.jsx +++ b/client/my-sites/sites/sites.jsx @@ -19,7 +19,7 @@ import Main from 'components/main'; import observe from 'lib/mixins/data-observe'; import SiteSelector from 'components/site-selector'; import { addSiteFragment } from 'lib/route'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { getSiteSlug } from 'state/sites/selectors'; import { getSelectedSite } from 'state/ui/selectors'; diff --git a/client/my-sites/stats/activity-log-banner/success-banner.jsx b/client/my-sites/stats/activity-log-banner/success-banner.jsx index fb6945033cf3d..1f57a00ffa265 100644 --- a/client/my-sites/stats/activity-log-banner/success-banner.jsx +++ b/client/my-sites/stats/activity-log-banner/success-banner.jsx @@ -16,7 +16,7 @@ import HappychatButton from 'components/happychat/button'; import Gridicon from 'gridicons'; import TrackComponentView from 'lib/analytics/track-component-view'; import { recordTracksEvent } from 'state/analytics/actions'; -import { getSiteUrl } from 'state/selectors'; +import getSiteUrl from 'state/selectors/get-site-url'; import { dismissRewindRestoreProgress, dismissRewindBackupProgress, diff --git a/client/my-sites/stats/activity-log-item/index.jsx b/client/my-sites/stats/activity-log-item/index.jsx index e4a34ee872dfb..91dfd5ea05bea 100644 --- a/client/my-sites/stats/activity-log-item/index.jsx +++ b/client/my-sites/stats/activity-log-item/index.jsx @@ -32,14 +32,12 @@ import { rewindRestore, } from 'state/activity-log/actions'; import { recordTracksEvent, withAnalytics } from 'state/analytics/actions'; -import { - getActivityLog, - getRequestedBackup, - getRequestedRewind, - getSiteGmtOffset, - getSiteTimezoneValue, - getRewindState, -} from 'state/selectors'; +import getActivityLog from 'state/selectors/get-activity-log'; +import getRequestedBackup from 'state/selectors/get-requested-backup'; +import getRequestedRewind from 'state/selectors/get-requested-rewind'; +import getRewindState from 'state/selectors/get-rewind-state'; +import getSiteGmtOffset from 'state/selectors/get-site-gmt-offset'; +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; import { adjustMoment } from '../activity-log/utils'; import { getSite } from 'state/sites/selectors'; import { updatePlugin } from 'state/plugins/installed/actions'; diff --git a/client/my-sites/stats/activity-log-switch/index.jsx b/client/my-sites/stats/activity-log-switch/index.jsx index fd834e76ee031..b7c8fd58f9240 100644 --- a/client/my-sites/stats/activity-log-switch/index.jsx +++ b/client/my-sites/stats/activity-log-switch/index.jsx @@ -14,7 +14,7 @@ import { localize } from 'i18n-calypso'; import Card from 'components/card'; import Button from 'components/button'; import { getSelectedSiteSlug } from 'state/ui/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; import { getSiteUrl } from 'state/sites/selectors'; class ActivityLogSwitch extends Component { diff --git a/client/my-sites/stats/activity-log/activity-log-rewind-toggle.jsx b/client/my-sites/stats/activity-log/activity-log-rewind-toggle.jsx index b7c808a52bc92..81d2c3389f6a1 100644 --- a/client/my-sites/stats/activity-log/activity-log-rewind-toggle.jsx +++ b/client/my-sites/stats/activity-log/activity-log-rewind-toggle.jsx @@ -15,7 +15,7 @@ import { localize } from 'i18n-calypso'; */ import Button from 'components/button'; import { activateRewind } from 'state/activity-log/actions'; -import { isRewindActivating } from 'state/selectors'; +import isRewindActivating from 'state/selectors/is-rewind-activating'; import { recordTracksEvent, withAnalytics } from 'state/analytics/actions'; class ActivityLogRewindToggle extends Component { diff --git a/client/my-sites/stats/activity-log/index.jsx b/client/my-sites/stats/activity-log/index.jsx index b28ef0551f044..6c06030859006 100644 --- a/client/my-sites/stats/activity-log/index.jsx +++ b/client/my-sites/stats/activity-log/index.jsx @@ -50,21 +50,19 @@ import { rewindBackup, updateFilter, } from 'state/activity-log/actions'; -import { - canCurrentUser, - getActivityLog, - getActivityLogs, - getActivityLogFilter, - getBackupProgress, - getRequest, - getRequestedBackup, - getRequestedRewind, - getRestoreProgress, - getRewindState, - getSiteGmtOffset, - getSiteTimezoneValue, - getOldestItemTs, -} from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getActivityLog from 'state/selectors/get-activity-log'; +import getActivityLogFilter from 'state/selectors/get-activity-log-filter'; +import getActivityLogs from 'state/selectors/get-activity-logs'; +import getBackupProgress from 'state/selectors/get-backup-progress'; +import getOldestItemTs from 'state/selectors/get-oldest-item-ts'; +import getRequest from 'state/selectors/get-request'; +import getRequestedBackup from 'state/selectors/get-requested-backup'; +import getRequestedRewind from 'state/selectors/get-requested-rewind'; +import getRestoreProgress from 'state/selectors/get-restore-progress'; +import getRewindState from 'state/selectors/get-rewind-state'; +import getSiteGmtOffset from 'state/selectors/get-site-gmt-offset'; +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; const PAGE_SIZE = 20; diff --git a/client/my-sites/stats/activity-log/unavailability-notice.jsx b/client/my-sites/stats/activity-log/unavailability-notice.jsx index c1fea36cdbbf6..a67f0c8ff22e8 100644 --- a/client/my-sites/stats/activity-log/unavailability-notice.jsx +++ b/client/my-sites/stats/activity-log/unavailability-notice.jsx @@ -12,7 +12,7 @@ import { localize } from 'i18n-calypso'; import Banner from 'components/banner'; import { getSiteAdminUrl } from 'state/sites/selectors'; import { getSelectedSiteSlug } from 'state/ui/selectors'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; export const UnavailabilityNotice = ( { adminUrl, diff --git a/client/my-sites/stats/checklist-banner/index.jsx b/client/my-sites/stats/checklist-banner/index.jsx index c27575edac52c..b21fe8f3def6f 100644 --- a/client/my-sites/stats/checklist-banner/index.jsx +++ b/client/my-sites/stats/checklist-banner/index.jsx @@ -20,7 +20,7 @@ import Card from 'components/card'; import Gauge from 'components/gauge'; import ProgressBar from 'components/progress-bar'; import QuerySiteChecklist from 'components/data/query-site-checklist'; -import { getSiteChecklist } from 'state/selectors'; +import getSiteChecklist from 'state/selectors/get-site-checklist'; import { getSite, getSiteSlug } from 'state/sites/selectors'; import { launchTask, onboardingTasks } from 'my-sites/checklist/onboardingChecklist'; import ChecklistShowShare from 'my-sites/checklist/checklist-show/share'; diff --git a/client/my-sites/stats/controller.jsx b/client/my-sites/stats/controller.jsx index f442423ed2e97..25b5fd6d925e2 100644 --- a/client/my-sites/stats/controller.jsx +++ b/client/my-sites/stats/controller.jsx @@ -18,7 +18,7 @@ import { getSite, getSiteOption } from 'state/sites/selectors'; import { getCurrentLayoutFocus } from 'state/ui/layout-focus/selectors'; import { setNextLayoutFocus } from 'state/ui/layout-focus/actions'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { getActivityLogFilter } from 'state/selectors'; +import getActivityLogFilter from 'state/selectors/get-activity-log-filter'; import { isWpComFreePlan } from 'lib/plans'; import { getCurrentPlan } from 'state/sites/plans/selectors'; import FollowList from 'lib/follow-list'; diff --git a/client/my-sites/stats/overview.jsx b/client/my-sites/stats/overview.jsx index c9a0f983fe11d..219999c9b3d1c 100644 --- a/client/my-sites/stats/overview.jsx +++ b/client/my-sites/stats/overview.jsx @@ -25,7 +25,7 @@ import Main from 'components/main'; import StatsFirstView from './stats-first-view'; import JetpackColophon from 'components/jetpack-colophon'; import { getCurrentUser } from 'state/current-user/selectors'; -import { getVisibleSites } from 'state/selectors'; +import getVisibleSites from 'state/selectors/get-visible-sites'; class StatsOverview extends Component { static propTypes = { diff --git a/client/my-sites/stats/site.jsx b/client/my-sites/stats/site.jsx index 180f2d659d5c6..196661d9e5b3e 100644 --- a/client/my-sites/stats/site.jsx +++ b/client/my-sites/stats/site.jsx @@ -35,7 +35,7 @@ import PrivacyPolicyBanner from 'blocks/privacy-policy-banner'; import ChecklistBanner from './checklist-banner'; import QuerySiteSettings from 'components/data/query-site-settings'; import GoogleMyBusinessStatsNudge from 'blocks/google-my-business-stats-nudge'; -import { isGoogleMyBusinessStatsNudgeVisible as isGoogleMyBusinessStatsNudgeVisibleSelector } from 'state/selectors'; +import isGoogleMyBusinessStatsNudgeVisibleSelector from 'state/selectors/is-google-my-business-stats-nudge-visible'; class StatsSite extends Component { constructor( props ) { diff --git a/client/my-sites/stats/stats-date-picker/index.jsx b/client/my-sites/stats/stats-date-picker/index.jsx index 288c44feb008f..7ad7265ebe80c 100644 --- a/client/my-sites/stats/stats-date-picker/index.jsx +++ b/client/my-sites/stats/stats-date-picker/index.jsx @@ -15,7 +15,7 @@ import { connect } from 'react-redux'; * Internal dependencies */ import Tooltip from 'components/tooltip'; -import { getSiteStatsQueryDate } from 'state/selectors'; +import getSiteStatsQueryDate from 'state/selectors/get-site-stats-query-date'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isRequestingSiteStatsForQuery } from 'state/stats/lists/selectors'; import { isAutoRefreshAllowedForQuery } from 'state/stats/lists/utils'; diff --git a/client/my-sites/stats/stats-period-navigation/index.jsx b/client/my-sites/stats/stats-period-navigation/index.jsx index 9d6dc1b316f18..612c7346190eb 100644 --- a/client/my-sites/stats/stats-period-navigation/index.jsx +++ b/client/my-sites/stats/stats-period-navigation/index.jsx @@ -17,7 +17,7 @@ import qs from 'qs'; * Internal dependencies */ import { recordGoogleEvent as recordGoogleEventAction } from 'state/analytics/actions'; -import { isRtl as isRtlSelector } from 'state/selectors'; +import isRtlSelector from 'state/selectors/is-rtl'; class StatsPeriodNavigation extends PureComponent { static propTypes = { diff --git a/client/my-sites/stats/stats-post-detail/index.jsx b/client/my-sites/stats/stats-post-detail/index.jsx index 6cf7af6413403..b44f5c54f50d0 100644 --- a/client/my-sites/stats/stats-post-detail/index.jsx +++ b/client/my-sites/stats/stats-post-detail/index.jsx @@ -34,7 +34,7 @@ import { getSelectedSiteId } from 'state/ui/selectors'; import Button from 'components/button'; import { getSiteSlug, isJetpackSite, isSitePreviewable } from 'state/sites/selectors'; import { getSitePost, isRequestingSitePost, getPostPreviewUrl } from 'state/posts/selectors'; -import { hasNavigated } from 'state/selectors'; +import hasNavigated from 'state/selectors/has-navigated'; import WebPreview from 'components/web-preview'; class StatsPostDetail extends Component { diff --git a/client/my-sites/stats/stats-post-likes/index.jsx b/client/my-sites/stats/stats-post-likes/index.jsx index 0f6906b58c810..5c0f611675d9e 100644 --- a/client/my-sites/stats/stats-post-likes/index.jsx +++ b/client/my-sites/stats/stats-post-likes/index.jsx @@ -20,7 +20,7 @@ import StatsModuleContent from '../stats-module/content-text'; import QueryPostLikes from 'components/data/query-post-likes'; import StatsModulePlaceholder from '../stats-module/placeholder'; import toggleInfo from '../toggle-info'; -import { countPostLikes } from 'state/selectors'; +import countPostLikes from 'state/selectors/count-post-likes'; import PostLikes from 'blocks/post-likes'; export const StatsPostLikes = props => { diff --git a/client/my-sites/stats/stats-views/index.jsx b/client/my-sites/stats/stats-views/index.jsx index a6234ae290eda..ce8b4eb1fbd95 100644 --- a/client/my-sites/stats/stats-views/index.jsx +++ b/client/my-sites/stats/stats-views/index.jsx @@ -15,7 +15,7 @@ import { localize } from 'i18n-calypso'; */ import QuerySiteStats from 'components/data/query-site-stats'; import { getSelectedSiteId, getSelectedSiteSlug } from 'state/ui/selectors'; -import { getSiteStatsViewSummary } from 'state/selectors'; +import getSiteStatsViewSummary from 'state/selectors/get-site-stats-view-summary'; import Card from 'components/card'; import Months from './months'; import SegmentedControl from 'components/segmented-control'; diff --git a/client/my-sites/stats/summary/index.jsx b/client/my-sites/stats/summary/index.jsx index 8cef3587af087..250783d2fd234 100644 --- a/client/my-sites/stats/summary/index.jsx +++ b/client/my-sites/stats/summary/index.jsx @@ -26,7 +26,7 @@ import titlecase from 'to-title-case'; import QueryMedia from 'components/data/query-media'; import JetpackColophon from 'components/jetpack-colophon'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; import AnnualSiteStats from 'my-sites/stats/annual-site-stats'; const StatsStrings = statsStringsFactory(); diff --git a/client/my-sites/theme/theme-features-card.js b/client/my-sites/theme/theme-features-card.js index 39eb5412259fb..b0a8f97e8f171 100644 --- a/client/my-sites/theme/theme-features-card.js +++ b/client/my-sites/theme/theme-features-card.js @@ -15,7 +15,7 @@ import { localize } from 'i18n-calypso'; import Card from 'components/card'; import QueryThemeFilters from 'components/data/query-theme-filters'; import SectionHeader from 'components/section-header'; -import { isValidThemeFilterTerm } from 'state/selectors'; +import isValidThemeFilterTerm from 'state/selectors/is-valid-theme-filter-term'; const ThemeFeaturesCard = ( { isWpcomTheme, siteSlug, features, translate } ) => { if ( isEmpty( features ) ) { diff --git a/client/my-sites/themes/controller.jsx b/client/my-sites/themes/controller.jsx index e2bbad4ab55b6..471d61d21c670 100644 --- a/client/my-sites/themes/controller.jsx +++ b/client/my-sites/themes/controller.jsx @@ -20,7 +20,7 @@ import { DEFAULT_THEME_QUERY } from 'state/themes/constants'; import { requestThemes, requestThemeFilters, setBackPath } from 'state/themes/actions'; import { getThemesForQuery } from 'state/themes/selectors'; import { getAnalyticsData } from './helpers'; -import { getThemeFilters } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; const debug = debugFactory( 'calypso:themes' ); diff --git a/client/my-sites/themes/theme-options.js b/client/my-sites/themes/theme-options.js index b584cfb63da26..be5f7566237aa 100644 --- a/client/my-sites/themes/theme-options.js +++ b/client/my-sites/themes/theme-options.js @@ -33,7 +33,7 @@ import { isThemeAvailableOnJetpackSite, } from 'state/themes/selectors'; import { isJetpackSite, isJetpackSiteMultiSite } from 'state/sites/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getCurrentUser } from 'state/current-user/selectors'; const purchase = config.isEnabled( 'upgrades/checkout' ) diff --git a/client/my-sites/themes/theme-showcase.jsx b/client/my-sites/themes/theme-showcase.jsx index 901eda2e8943c..1909a7580c5d1 100644 --- a/client/my-sites/themes/theme-showcase.jsx +++ b/client/my-sites/themes/theme-showcase.jsx @@ -27,13 +27,11 @@ import { getSiteSlug } from 'state/sites/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; import ThemePreview from './theme-preview'; import config from 'config'; -import { - getThemeFilterTerms, - getThemeFilterToTermTable, - getThemeShowcaseDescription, - getThemeShowcaseTitle, - prependThemeFilterKeys, -} from 'state/selectors'; +import getThemeFilterTerms from 'state/selectors/get-theme-filter-terms'; +import getThemeFilterToTermTable from 'state/selectors/get-theme-filter-to-term-table'; +import getThemeShowcaseDescription from 'state/selectors/get-theme-showcase-description'; +import getThemeShowcaseTitle from 'state/selectors/get-theme-showcase-title'; +import prependThemeFilterKeys from 'state/selectors/prepend-theme-filter-keys'; import { recordTracksEvent } from 'state/analytics/actions'; import ThemesSearchCard from './themes-magic-search-card'; import QueryThemeFilters from 'components/data/query-theme-filters'; diff --git a/client/my-sites/themes/themes-magic-search-card/index.jsx b/client/my-sites/themes/themes-magic-search-card/index.jsx index d5eec63ba29ba..2c230dad1115f 100644 --- a/client/my-sites/themes/themes-magic-search-card/index.jsx +++ b/client/my-sites/themes/themes-magic-search-card/index.jsx @@ -23,7 +23,8 @@ import config from 'config'; import { isMobile } from 'lib/viewport'; import { localize } from 'i18n-calypso'; import MagicSearchWelcome from './welcome'; -import { getThemeFilters, getThemeFilterToTermTable } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; +import getThemeFilterToTermTable from 'state/selectors/get-theme-filter-to-term-table'; //We want those taxonomies if they are used to be presented in this order const preferredOrderOfTaxonomies = [ 'feature', 'layout', 'column', 'subject', 'style' ]; diff --git a/client/my-sites/themes/themes-selection.jsx b/client/my-sites/themes/themes-selection.jsx index 3958c1e142992..ca79179c6993a 100644 --- a/client/my-sites/themes/themes-selection.jsx +++ b/client/my-sites/themes/themes-selection.jsx @@ -31,7 +31,7 @@ import { } from 'state/themes/selectors'; import { setThemePreviewOptions } from 'state/themes/actions'; import config from 'config'; -import { prependThemeFilterKeys } from 'state/selectors'; +import prependThemeFilterKeys from 'state/selectors/prepend-theme-filter-keys'; class ThemesSelection extends Component { static propTypes = { diff --git a/client/my-sites/themes/validate-filters.js b/client/my-sites/themes/validate-filters.js index 0d1c6cbecd077..2b0a5d831f229 100644 --- a/client/my-sites/themes/validate-filters.js +++ b/client/my-sites/themes/validate-filters.js @@ -9,12 +9,11 @@ import page from 'page'; /** * Internal dependencies */ -import { - getThemeFilterTerm, - isValidThemeFilterTerm, - getThemeFilterStringFromTerm, - getThemeFilterTermFromString, -} from 'state/selectors'; +import getThemeFilterStringFromTerm from 'state/selectors/get-theme-filter-string-from-term'; + +import getThemeFilterTerm from 'state/selectors/get-theme-filter-term'; +import getThemeFilterTermFromString from 'state/selectors/get-theme-filter-term-from-string'; +import isValidThemeFilterTerm from 'state/selectors/is-valid-theme-filter-term'; // Reorder and remove invalid filters to redirect to canonical URL export function validateFilters( context, next ) { diff --git a/client/my-sites/types/main.jsx b/client/my-sites/types/main.jsx index d7be4d31cbdae..a19b4f128b577 100644 --- a/client/my-sites/types/main.jsx +++ b/client/my-sites/types/main.jsx @@ -20,7 +20,7 @@ import PostTypeFilter from 'my-sites/post-type-filter'; import PostTypeList from 'my-sites/post-type-list'; import PostTypeUnsupported from './post-type-unsupported'; import PostTypeForbidden from './post-type-forbidden'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getPostType, isPostTypeSupported } from 'state/post-types/selectors'; diff --git a/client/my-sites/types/post-type-unsupported/index.jsx b/client/my-sites/types/post-type-unsupported/index.jsx index be861f8f8eb77..5f6c24c051893 100644 --- a/client/my-sites/types/post-type-unsupported/index.jsx +++ b/client/my-sites/types/post-type-unsupported/index.jsx @@ -15,7 +15,7 @@ import { localize } from 'i18n-calypso'; */ import EmptyContent from 'components/empty-content'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSiteSlug } from 'state/sites/selectors'; /** diff --git a/client/notifications/index.jsx b/client/notifications/index.jsx index 81f7f085d761f..2f63f15927369 100644 --- a/client/notifications/index.jsx +++ b/client/notifications/index.jsx @@ -29,7 +29,8 @@ import analytics from 'lib/analytics'; import config from 'config'; import { recordTracksEvent } from 'state/analytics/actions'; import NotificationsPanel, { refreshNotes } from 'notifications-panel'; -import { getCurrentLocaleSlug, getCurrentLocaleVariant } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; +import getCurrentLocaleVariant from 'state/selectors/get-current-locale-variant'; /** * Returns whether or not the browser session diff --git a/client/post-editor/edit-post-status/index.jsx b/client/post-editor/edit-post-status/index.jsx index fbca3f63f5a55..d1899372b7171 100644 --- a/client/post-editor/edit-post-status/index.jsx +++ b/client/post-editor/edit-post-status/index.jsx @@ -24,7 +24,7 @@ import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPost } from 'state/posts/selectors'; import EditorPublishDate from 'post-editor/editor-publish-date'; import EditorVisibility from 'post-editor/editor-visibility'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; export class EditPostStatus extends Component { static propTypes = { diff --git a/client/post-editor/editor-confirmation-sidebar/index.jsx b/client/post-editor/editor-confirmation-sidebar/index.jsx index d8b4eb57c7a1c..742de9674f2a9 100644 --- a/client/post-editor/editor-confirmation-sidebar/index.jsx +++ b/client/post-editor/editor-confirmation-sidebar/index.jsx @@ -30,7 +30,7 @@ import { isEditedPostPasswordProtectedWithValidPassword, getEditedPost, } from 'state/posts/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; class EditorConfirmationSidebar extends Component { static propTypes = { diff --git a/client/post-editor/editor-delete-post/index.jsx b/client/post-editor/editor-delete-post/index.jsx index 84e230da6c371..c1e778216482b 100644 --- a/client/post-editor/editor-delete-post/index.jsx +++ b/client/post-editor/editor-delete-post/index.jsx @@ -22,7 +22,7 @@ import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPost } from 'state/posts/selectors'; import { trashPost } from 'state/posts/actions'; import { getCurrentUserId } from 'state/current-user/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; class EditorDeletePost extends React.Component { static displayName = 'EditorDeletePost'; diff --git a/client/post-editor/editor-diff-viewer/index.jsx b/client/post-editor/editor-diff-viewer/index.jsx index 1ac016eca0333..81eaa9e3a7783 100644 --- a/client/post-editor/editor-diff-viewer/index.jsx +++ b/client/post-editor/editor-diff-viewer/index.jsx @@ -15,7 +15,7 @@ import Gridicon from 'gridicons'; /** * Internal dependencies */ -import { getPostRevision } from 'state/selectors'; +import getPostRevision from 'state/selectors/get-post-revision'; import TextDiff from 'components/text-diff'; import scrollTo from 'lib/scroll-to'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/post-editor/editor-drawer/index.jsx b/client/post-editor/editor-drawer/index.jsx index eeb97e12906d0..ac039935e8b26 100644 --- a/client/post-editor/editor-drawer/index.jsx +++ b/client/post-editor/editor-drawer/index.jsx @@ -32,7 +32,7 @@ import { isJetpackSite, } from 'state/sites/selectors'; import config from 'config'; -import { areSitePermalinksEditable } from 'state/selectors'; +import areSitePermalinksEditable from 'state/selectors/are-site-permalinks-editable'; import EditorDrawerTaxonomies from './taxonomies'; import EditorDrawerPageOptions from './page-options'; import EditorDrawerLabel from './label'; diff --git a/client/post-editor/editor-featured-image/index.jsx b/client/post-editor/editor-featured-image/index.jsx index 83f026092d3a2..de24a2d1e1e95 100644 --- a/client/post-editor/editor-featured-image/index.jsx +++ b/client/post-editor/editor-featured-image/index.jsx @@ -23,7 +23,7 @@ import FeaturedImageDropZone from './dropzone'; import isDropZoneVisible from 'state/selectors/is-drop-zone-visible'; import Button from 'components/button'; import RemoveButton from 'components/remove-button'; -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; import { getFeaturedImageId } from 'lib/posts/utils'; import QueryMedia from 'components/data/query-media'; import { localize } from 'i18n-calypso'; diff --git a/client/post-editor/editor-forbidden/index.jsx b/client/post-editor/editor-forbidden/index.jsx index e6b002abdd4b3..8b047a11a18cd 100644 --- a/client/post-editor/editor-forbidden/index.jsx +++ b/client/post-editor/editor-forbidden/index.jsx @@ -13,7 +13,7 @@ import { get } from 'lodash'; * Internal dependencies */ import { localize } from 'i18n-calypso'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPostValue } from 'state/posts/selectors'; diff --git a/client/post-editor/editor-ground-control/index.jsx b/client/post-editor/editor-ground-control/index.jsx index 5ca0cf20e0cf6..a969ac857bca7 100644 --- a/client/post-editor/editor-ground-control/index.jsx +++ b/client/post-editor/editor-ground-control/index.jsx @@ -22,7 +22,8 @@ import Button from 'components/button'; import QuickSaveButtons from 'post-editor/editor-ground-control/quick-save-buttons'; import Drafts from 'layout/masterbar/drafts'; import { composeAnalytics, recordTracksEvent, recordGoogleEvent } from 'state/analytics/actions'; -import { canCurrentUser, isVipSite } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isVipSite from 'state/selectors/is-vip-site'; import { isCurrentUserEmailVerified } from 'state/current-user/selectors'; import { getRouteHistory } from 'state/ui/action-log/selectors'; diff --git a/client/post-editor/editor-post-formats/accordion.jsx b/client/post-editor/editor-post-formats/accordion.jsx index c80dab478851a..285faeee74083 100644 --- a/client/post-editor/editor-post-formats/accordion.jsx +++ b/client/post-editor/editor-post-formats/accordion.jsx @@ -19,7 +19,7 @@ import QueryPostFormats from 'components/data/query-post-formats'; import EditorPostFormats from './'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getPostFormats } from 'state/post-formats/selectors'; -import { getSiteDefaultPostFormat } from 'state/selectors'; +import getSiteDefaultPostFormat from 'state/selectors/get-site-default-post-format'; import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPost } from 'state/posts/selectors'; diff --git a/client/post-editor/editor-post-formats/index.jsx b/client/post-editor/editor-post-formats/index.jsx index e6d4472cb7b65..aa41adaa0af37 100644 --- a/client/post-editor/editor-post-formats/index.jsx +++ b/client/post-editor/editor-post-formats/index.jsx @@ -23,7 +23,7 @@ import { getSelectedSiteId } from 'state/ui/selectors'; import { getPostFormats } from 'state/post-formats/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPostValue } from 'state/posts/selectors'; -import { getSiteDefaultPostFormat } from 'state/selectors'; +import getSiteDefaultPostFormat from 'state/selectors/get-site-default-post-format'; import { editPost } from 'state/posts/actions'; const ICONS = { diff --git a/client/post-editor/editor-publish-button/index.jsx b/client/post-editor/editor-publish-button/index.jsx index 56578bd48f1ed..b0e1f77bc0aa0 100644 --- a/client/post-editor/editor-publish-button/index.jsx +++ b/client/post-editor/editor-publish-button/index.jsx @@ -17,7 +17,7 @@ import Button from 'components/button'; import { localize } from 'i18n-calypso'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { isEditedPostPasswordProtected, isEditedPostPasswordProtectedWithValidPassword, diff --git a/client/post-editor/editor-revisions-list/view-buttons.jsx b/client/post-editor/editor-revisions-list/view-buttons.jsx index 6eb1658d47746..f4d1734eaee6c 100644 --- a/client/post-editor/editor-revisions-list/view-buttons.jsx +++ b/client/post-editor/editor-revisions-list/view-buttons.jsx @@ -17,7 +17,7 @@ import { splitPostRevisionsDiffView, unifyPostRevisionsDiffView, } from 'state/posts/revisions/actions'; -import { getPostRevisionsDiffView } from 'state/selectors'; +import getPostRevisionsDiffView from 'state/selectors/get-post-revisions-diff-view'; const EditorRevisionsListViewButtons = ( { translate, diffView, viewSplit, viewUnified } ) => { return ( diff --git a/client/post-editor/editor-revisions/dialog.jsx b/client/post-editor/editor-revisions/dialog.jsx index 2ed085c0d6c00..7e0b5617de335 100644 --- a/client/post-editor/editor-revisions/dialog.jsx +++ b/client/post-editor/editor-revisions/dialog.jsx @@ -11,7 +11,9 @@ import { get, flow } from 'lodash'; /** * Internal dependencies */ -import { getPostRevisionsSelectedRevision, isPostRevisionsDialogVisible } from 'state/selectors'; +import getPostRevisionsSelectedRevision from 'state/selectors/get-post-revisions-selected-revision'; + +import isPostRevisionsDialogVisible from 'state/selectors/is-post-revisions-dialog-visible'; import { getEditorPostId } from 'state/ui/editor/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; diff --git a/client/post-editor/editor-revisions/index.jsx b/client/post-editor/editor-revisions/index.jsx index a6e7798d1233e..f0b4c44ae7464 100644 --- a/client/post-editor/editor-revisions/index.jsx +++ b/client/post-editor/editor-revisions/index.jsx @@ -12,12 +12,10 @@ import { flow, get } from 'lodash'; * Internal dependencies */ import { getEditorPostId } from 'state/ui/editor/selectors'; -import { - getPostRevisions, - getPostRevisionsComparisons, - getPostRevisionsAuthorsId, - getPostRevisionsSelectedRevisionId, -} from 'state/selectors'; +import getPostRevisions from 'state/selectors/get-post-revisions'; +import getPostRevisionsAuthorsId from 'state/selectors/get-post-revisions-authors-id'; +import getPostRevisionsComparisons from 'state/selectors/get-post-revisions-comparisons'; +import getPostRevisionsSelectedRevisionId from 'state/selectors/get-post-revisions-selected-revision-id'; import { getSelectedSiteId } from 'state/ui/selectors'; import { recordTracksEvent } from 'state/analytics/actions'; import EditorDiffViewer from 'post-editor/editor-diff-viewer'; diff --git a/client/post-editor/editor-sharing/accordion.jsx b/client/post-editor/editor-sharing/accordion.jsx index 4a04a9cf63cc2..5cac7fb238add 100644 --- a/client/post-editor/editor-sharing/accordion.jsx +++ b/client/post-editor/editor-sharing/accordion.jsx @@ -28,7 +28,8 @@ import { getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPost, getEditedPostValue } from 'state/posts/selectors'; import { getSiteSlug, isJetpackModuleActive } from 'state/sites/selectors'; import { getSiteUserConnections } from 'state/sharing/publicize/selectors'; -import { hasBrokenSiteUserConnection, isPublicizeEnabled } from 'state/selectors'; +import hasBrokenSiteUserConnection from 'state/selectors/has-broken-site-user-connection'; +import isPublicizeEnabled from 'state/selectors/is-publicize-enabled'; import { recordGoogleEvent } from 'state/analytics/actions'; class EditorSharingAccordion extends React.Component { diff --git a/client/post-editor/editor-sharing/publicize-options.jsx b/client/post-editor/editor-sharing/publicize-options.jsx index 50d3360f34202..5c8c71e49b908 100644 --- a/client/post-editor/editor-sharing/publicize-options.jsx +++ b/client/post-editor/editor-sharing/publicize-options.jsx @@ -28,7 +28,8 @@ import { getEditedPost, getEditedPostValue } from 'state/posts/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; import { getSiteUserConnections } from 'state/sharing/publicize/selectors'; import { fetchConnections as requestConnections } from 'state/sharing/publicize/actions'; -import { canCurrentUser, isPublicizeEnabled } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isPublicizeEnabled from 'state/selectors/is-publicize-enabled'; import { updatePostMetadata } from 'state/posts/actions'; class EditorSharingPublicizeOptions extends React.Component { diff --git a/client/post-editor/editor-term-selector/index.jsx b/client/post-editor/editor-term-selector/index.jsx index 9ab49ca1fa959..dbd4572fe52c9 100644 --- a/client/post-editor/editor-term-selector/index.jsx +++ b/client/post-editor/editor-term-selector/index.jsx @@ -14,7 +14,7 @@ import { cloneDeep, findIndex, map, toArray } from 'lodash'; */ import TermTreeSelector from 'blocks/term-tree-selector'; import AddTerm from './add-term'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { editPost, addTermForPost } from 'state/posts/actions'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; diff --git a/client/post-editor/editor-title/index.jsx b/client/post-editor/editor-title/index.jsx index 05e3d66ff87fc..eaf641ee25129 100644 --- a/client/post-editor/editor-title/index.jsx +++ b/client/post-editor/editor-title/index.jsx @@ -21,7 +21,7 @@ import TextareaAutosize from 'components/textarea-autosize'; import { isMobile } from 'lib/viewport'; import * as stats from 'lib/posts/stats'; import { getSelectedSiteId } from 'state/ui/selectors'; -import { areSitePermalinksEditable } from 'state/selectors'; +import areSitePermalinksEditable from 'state/selectors/are-site-permalinks-editable'; import { isEditorNewPost, getEditorPostId } from 'state/ui/editor/selectors'; import { getEditedPost } from 'state/posts/selectors'; import { editPost } from 'state/posts/actions'; diff --git a/client/post-editor/editor-visibility/index.jsx b/client/post-editor/editor-visibility/index.jsx index 0aadade255234..8fdcbe2215d58 100644 --- a/client/post-editor/editor-visibility/index.jsx +++ b/client/post-editor/editor-visibility/index.jsx @@ -28,7 +28,7 @@ import accept from 'lib/accept'; import { editPost } from 'state/posts/actions'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; -import { isPrivateSite as isPrivateSiteSelector } from 'state/selectors'; +import isPrivateSiteSelector from 'state/selectors/is-private-site'; class EditorVisibility extends React.Component { static propTypes = { diff --git a/client/post-editor/media-modal/detail/detail-item.jsx b/client/post-editor/media-modal/detail/detail-item.jsx index a1aa603452b89..2e02099a14614 100644 --- a/client/post-editor/media-modal/detail/detail-item.jsx +++ b/client/post-editor/media-modal/detail/detail-item.jsx @@ -29,7 +29,8 @@ import { getMimePrefix, isItemBeingUploaded, isVideoPressItem } from 'lib/media/ import config from 'config'; import { getSelectedSiteId } from 'state/ui/selectors'; import { getSiteOption, isJetpackModuleActive, isJetpackSite } from 'state/sites/selectors'; -import { isPrivateSite, canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import isPrivateSite from 'state/selectors/is-private-site'; export class EditorMediaModalDetailItem extends Component { static propTypes = { diff --git a/client/post-editor/media-modal/gallery/edit-item.jsx b/client/post-editor/media-modal/gallery/edit-item.jsx index 7841e81dec430..5da981bfce0b4 100644 --- a/client/post-editor/media-modal/gallery/edit-item.jsx +++ b/client/post-editor/media-modal/gallery/edit-item.jsx @@ -14,7 +14,7 @@ import { connect } from 'react-redux'; import MediaLibraryListItem from 'my-sites/media-library/list-item'; import EditorMediaModalGalleryCaption from './caption'; import EditorMediaModalGalleryRemoveButton from './remove-button'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; class EditorMediaModalGalleryEditItem extends Component { static propTypes = { diff --git a/client/post-editor/post-editor.jsx b/client/post-editor/post-editor.jsx index f70fa0727cddd..82b321dd6edf2 100644 --- a/client/post-editor/post-editor.jsx +++ b/client/post-editor/post-editor.jsx @@ -47,7 +47,8 @@ import { recordTracksEvent } from 'state/analytics/actions'; import { editPost } from 'state/posts/actions'; import { getEditedPostValue, getPostEdits, isEditedPostDirty } from 'state/posts/selectors'; import { getCurrentUserId } from 'state/current-user/selectors'; -import { hasBrokenSiteUserConnection, editedPostHasContent } from 'state/selectors'; +import editedPostHasContent from 'state/selectors/edited-post-has-content'; +import hasBrokenSiteUserConnection from 'state/selectors/has-broken-site-user-connection'; import EditorConfirmationSidebar from 'post-editor/editor-confirmation-sidebar'; import EditorDocumentHead from 'post-editor/editor-document-head'; import EditorPostTypeUnsupported from 'post-editor/editor-post-type-unsupported'; diff --git a/client/reader/following-manage/index.jsx b/client/reader/following-manage/index.jsx index 8739a6f41fae9..9132fcf95da6b 100644 --- a/client/reader/following-manage/index.jsx +++ b/client/reader/following-manage/index.jsx @@ -17,15 +17,13 @@ import CompactCard from 'components/card/compact'; import DocumentHead from 'components/data/document-head'; import SearchInput from 'components/search'; import ReaderMain from 'components/reader-main'; -import { - getReaderFeedsForQuery, - getReaderFeedsCountForQuery, - getReaderRecommendedSites, - getReaderRecommendedSitesPagingOffset, - getBlockedSites, - getReaderAliasedFollowFeedUrl, - getReaderFollowsCount, -} from 'state/selectors'; +import getBlockedSites from 'state/selectors/get-blocked-sites'; +import getReaderAliasedFollowFeedUrl from 'state/selectors/get-reader-aliased-follow-feed-url'; +import getReaderFeedsCountForQuery from 'state/selectors/get-reader-feeds-count-for-query'; +import getReaderFeedsForQuery from 'state/selectors/get-reader-feeds-for-query'; +import getReaderFollowsCount from 'state/selectors/get-reader-follows-count'; +import getReaderRecommendedSites from 'state/selectors/get-reader-recommended-sites'; +import getReaderRecommendedSitesPagingOffset from 'state/selectors/get-reader-recommended-sites-paging-offset'; import QueryReaderFeedsSearch from 'components/data/query-reader-feeds-search'; import QueryReaderRecommendedSites from 'components/data/query-reader-recommended-sites'; import RecommendedSites from 'blocks/reader-recommended-sites'; diff --git a/client/reader/following-manage/subscriptions.jsx b/client/reader/following-manage/subscriptions.jsx index 1bc2920ceed0b..ecd8df5b92efd 100644 --- a/client/reader/following-manage/subscriptions.jsx +++ b/client/reader/following-manage/subscriptions.jsx @@ -21,7 +21,8 @@ import { siteRowRenderer } from 'components/reader-infinite-stream/row-renderers import SyncReaderFollows from 'components/data/sync-reader-follows'; import FollowingManageSearchFollowed from './search-followed'; import FollowingManageSortControls from './sort-controls'; -import { getReaderFollows, getReaderFollowsCount } from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; +import getReaderFollowsCount from 'state/selectors/get-reader-follows-count'; import UrlSearch from 'lib/url-search'; import { getSiteName, getSiteUrl, getSiteDescription, getSiteAuthorName } from 'reader/get-helpers'; import EllipsisMenu from 'components/ellipsis-menu'; diff --git a/client/reader/search-stream/index.jsx b/client/reader/search-stream/index.jsx index 351e3bea5819d..9247975ff3e49 100644 --- a/client/reader/search-stream/index.jsx +++ b/client/reader/search-stream/index.jsx @@ -28,7 +28,7 @@ import { SORT_BY_RELEVANCE, SORT_BY_LAST_UPDATED } from 'state/reader/feed-searc import withDimensions from 'lib/with-dimensions'; import SuggestionProvider from './suggestion-provider'; import Suggestion from './suggestion'; -import { getReaderAliasedFollowFeedUrl } from 'state/selectors'; +import getReaderAliasedFollowFeedUrl from 'state/selectors/get-reader-aliased-follow-feed-url'; import { SEARCH_RESULTS_URL_INPUT } from 'reader/follow-sources'; import FollowButton from 'reader/follow-button'; import MobileBackToSidebar from 'components/mobile-back-to-sidebar'; diff --git a/client/reader/search-stream/site-results.jsx b/client/reader/search-stream/site-results.jsx index 85f707ab0edc9..7a0d9e827ba03 100644 --- a/client/reader/search-stream/site-results.jsx +++ b/client/reader/search-stream/site-results.jsx @@ -11,7 +11,9 @@ import { connect } from 'react-redux'; /** * Internal Dependencies */ -import { getReaderFeedsCountForQuery, getReaderFeedsForQuery } from 'state/selectors'; +import getReaderFeedsCountForQuery from 'state/selectors/get-reader-feeds-count-for-query'; + +import getReaderFeedsForQuery from 'state/selectors/get-reader-feeds-for-query'; import QueryReaderFeedsSearch from 'components/data/query-reader-feeds-search'; import { requestFeedSearch } from 'state/reader/feed-searches/actions'; import ReaderInfiniteStream from 'components/reader-infinite-stream'; diff --git a/client/reader/search-stream/suggestion-provider.jsx b/client/reader/search-stream/suggestion-provider.jsx index 16ca28ab8cce0..6f9644a0a79e1 100644 --- a/client/reader/search-stream/suggestion-provider.jsx +++ b/client/reader/search-stream/suggestion-provider.jsx @@ -11,7 +11,7 @@ import { map, sampleSize } from 'lodash'; */ import { getLocaleSlug } from 'lib/i18n-utils'; import { suggestions } from 'reader/search-stream/suggestions'; -import { getReaderFollowedTags } from 'state/selectors'; +import getReaderFollowedTags from 'state/selectors/get-reader-followed-tags'; import analytics from 'lib/analytics'; /** diff --git a/client/reader/sidebar/index.jsx b/client/reader/sidebar/index.jsx index ea0445df3f96e..05e91c183b78e 100644 --- a/client/reader/sidebar/index.jsx +++ b/client/reader/sidebar/index.jsx @@ -38,7 +38,7 @@ import { isAutomatticTeamMember } from 'reader/lib/teams'; import { getTagStreamUrl } from 'reader/route'; import { recordAction, recordGaEvent, recordTrack } from 'reader/stats'; import { getSubscribedLists } from 'state/reader/lists/selectors'; -import { getReaderTeams } from 'state/selectors'; +import getReaderTeams from 'state/selectors/get-reader-teams'; import { setNextLayoutFocus } from 'state/ui/layout-focus/actions'; import { toggleReaderSidebarLists, toggleReaderSidebarTags } from 'state/ui/reader/sidebar/actions'; diff --git a/client/reader/sidebar/reader-sidebar-tags/index.jsx b/client/reader/sidebar/reader-sidebar-tags/index.jsx index 77d9eef1664a0..3d8e6d2492f99 100644 --- a/client/reader/sidebar/reader-sidebar-tags/index.jsx +++ b/client/reader/sidebar/reader-sidebar-tags/index.jsx @@ -17,7 +17,7 @@ import ReaderSidebarTagsList from './list'; import QueryReaderFollowedTags from 'components/data/query-reader-followed-tags'; import { recordAction, recordGaEvent, recordTrack } from 'reader/stats'; import { requestFollowTag, requestUnfollowTag } from 'state/reader/tags/items/actions'; -import { getReaderFollowedTags } from 'state/selectors'; +import getReaderFollowedTags from 'state/selectors/get-reader-followed-tags'; export class ReaderSidebarTags extends Component { static propTypes = { diff --git a/client/reader/site-stream/featured.jsx b/client/reader/site-stream/featured.jsx index 247ee5b7ac63e..c69022a6c238e 100644 --- a/client/reader/site-stream/featured.jsx +++ b/client/reader/site-stream/featured.jsx @@ -17,7 +17,7 @@ import { recordAction, recordGaEvent, recordTrackForPost } from 'reader/stats'; import cssSafeUrl from 'lib/css-safe-url'; import QueryReaderPost from 'components/data/query-reader-post'; import { getPostsByKeys } from 'state/reader/posts/selectors'; -import { getReaderStream as getStream } from 'state/selectors'; +import getStream from 'state/selectors/get-reader-stream'; import { requestPage } from 'state/reader/streams/actions'; import { keyToString } from 'reader/post-key'; diff --git a/client/reader/stream/index.jsx b/client/reader/stream/index.jsx index a9a3516c9f426..5108aa94fcfb5 100644 --- a/client/reader/stream/index.jsx +++ b/client/reader/stream/index.jsx @@ -22,11 +22,9 @@ import { selectPrevItem, showUpdates, } from 'state/reader/streams/actions'; -import { - getReaderStream as getStream, - getReaderStreamTransformedItems as getTransformedStreamItems, - getReaderStreamShouldRequestRecommendations as shouldRequestRecs, -} from 'state/selectors'; +import getStream from 'state/selectors/get-reader-stream'; +import shouldRequestRecs from 'state/selectors/get-reader-stream-should-request-recommendations'; +import getTransformedStreamItems from 'state/selectors/get-reader-stream-transformed-items'; import { shouldShowLikes } from 'reader/like-helper'; import { like as likePost, unlike as unlikePost } from 'state/posts/likes/actions'; diff --git a/client/reader/tag-stream/main.jsx b/client/reader/tag-stream/main.jsx index c972856c7642e..09cf4ddc1d40e 100644 --- a/client/reader/tag-stream/main.jsx +++ b/client/reader/tag-stream/main.jsx @@ -17,7 +17,8 @@ import EmptyContent from './empty'; import TagStreamHeader from './header'; import { recordAction, recordGaEvent, recordTrack } from 'reader/stats'; import HeaderBack from 'reader/header-back'; -import { getReaderFollowedTags, getReaderTags } from 'state/selectors'; +import getReaderFollowedTags from 'state/selectors/get-reader-followed-tags'; +import getReaderTags from 'state/selectors/get-reader-tags'; import { requestFollowTag, requestUnfollowTag } from 'state/reader/tags/items/actions'; import QueryReaderFollowedTags from 'components/data/query-reader-followed-tags'; import QueryReaderTag from 'components/data/query-reader-tag'; diff --git a/client/reader/update-notice/index.jsx b/client/reader/update-notice/index.jsx index 94b3d5087e2cb..2f432edbcec84 100644 --- a/client/reader/update-notice/index.jsx +++ b/client/reader/update-notice/index.jsx @@ -16,7 +16,7 @@ import Gridicon from 'gridicons'; import DocumentHead from 'components/data/document-head'; import { getDocumentHeadCappedUnreadCount } from 'state/document-head/selectors'; import { getCommentById } from 'state/comments/selectors'; -import { getReaderStream as getStream } from 'state/selectors'; +import getStream from 'state/selectors/get-reader-stream'; class UpdateNotice extends React.PureComponent { static propTypes = { diff --git a/client/signup/steps/plans-atomic-store/index.jsx b/client/signup/steps/plans-atomic-store/index.jsx index e2d4923caff48..edf2d4fb06ac6 100644 --- a/client/signup/steps/plans-atomic-store/index.jsx +++ b/client/signup/steps/plans-atomic-store/index.jsx @@ -14,7 +14,7 @@ import { localize } from 'i18n-calypso'; */ import analytics from 'lib/analytics'; import { cartItems } from 'lib/cart-values'; -import { getSiteId } from 'state/selectors'; +import getSiteId from 'state/selectors/get-site-id'; import SignupActions from 'lib/signup/actions'; import StepWrapper from 'signup/step-wrapper'; import QueryPlans from 'components/data/query-plans'; diff --git a/client/signup/steps/rewind-form-creds/index.jsx b/client/signup/steps/rewind-form-creds/index.jsx index 2c9337a8b8ca7..812e646232761 100644 --- a/client/signup/steps/rewind-form-creds/index.jsx +++ b/client/signup/steps/rewind-form-creds/index.jsx @@ -15,7 +15,7 @@ import StepWrapper from 'signup/step-wrapper'; import Card from 'components/card'; import SignupActions from 'lib/signup/actions'; import RewindCredentialsForm from 'components/rewind-credentials-form'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; import SetupFooter from 'my-sites/site-settings/jetpack-credentials/credentials-setup-flow/setup-footer'; class RewindFormCreds extends Component { diff --git a/client/signup/steps/rewind-migrate/index.jsx b/client/signup/steps/rewind-migrate/index.jsx index bd8584eeb2d9d..1d2b279c8e57c 100644 --- a/client/signup/steps/rewind-migrate/index.jsx +++ b/client/signup/steps/rewind-migrate/index.jsx @@ -15,7 +15,7 @@ import StepWrapper from 'signup/step-wrapper'; import Card from 'components/card'; import SignupActions from 'lib/signup/actions'; import ActivityLogRewindToggle from 'my-sites/stats/activity-log/activity-log-rewind-toggle'; -import { getRewindState } from 'state/selectors'; +import getRewindState from 'state/selectors/get-rewind-state'; class RewindMigrate extends Component { static propTypes = { diff --git a/client/state/comments/middleware.js b/client/state/comments/middleware.js index 10d7dd492eb70..95653e1409639 100644 --- a/client/state/comments/middleware.js +++ b/client/state/comments/middleware.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; * Internal dependencies */ import { COMMENTS_DELETE, COMMENTS_CHANGE_STATUS } from 'state/action-types'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; const handler = ( dispatch, action, getState ) => { switch ( action.type ) { diff --git a/client/state/data-layer/wpcom/jetpack/settings/index.js b/client/state/data-layer/wpcom/jetpack/settings/index.js index ba7b0d133cce6..6478b767bdd6d 100644 --- a/client/state/data-layer/wpcom/jetpack/settings/index.js +++ b/client/state/data-layer/wpcom/jetpack/settings/index.js @@ -13,7 +13,9 @@ import { dispatchRequest } from 'state/data-layer/wpcom-http/utils'; import { errorNotice } from 'state/notices/actions'; import { http } from 'state/data-layer/wpcom-http/actions'; import { JETPACK_SETTINGS_REQUEST, JETPACK_SETTINGS_SAVE } from 'state/action-types'; -import { getJetpackSettings, getSiteUrl, getUnconnectedSiteUrl } from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; +import getSiteUrl from 'state/selectors/get-site-url'; +import getUnconnectedSiteUrl from 'state/selectors/get-unconnected-site-url'; import { filterSettingsByActiveModules, normalizeSettings, diff --git a/client/state/data-layer/wpcom/me/settings/index.js b/client/state/data-layer/wpcom/me/settings/index.js index 63478757fafad..6052caa791091 100644 --- a/client/state/data-layer/wpcom/me/settings/index.js +++ b/client/state/data-layer/wpcom/me/settings/index.js @@ -12,7 +12,7 @@ import { isEmpty, keys, mapValues, noop } from 'lodash'; import profileLinks from './profile-links'; import { decodeEntities } from 'lib/formatting'; import { dispatchRequest } from 'state/data-layer/wpcom-http/utils'; -import { getUnsavedUserSettings } from 'state/selectors'; +import getUnsavedUserSettings from 'state/selectors/get-unsaved-user-settings'; import { http } from 'state/data-layer/wpcom-http/actions'; import { mergeHandlers } from 'state/action-watchers/utils'; import { updateUserSettings, clearUnsavedUserSettings } from 'state/user-settings/actions'; diff --git a/client/state/data-layer/wpcom/read/site/post-email-subscriptions/update/index.js b/client/state/data-layer/wpcom/read/site/post-email-subscriptions/update/index.js index c3552320ce995..f10ccdc7d955e 100644 --- a/client/state/data-layer/wpcom/read/site/post-email-subscriptions/update/index.js +++ b/client/state/data-layer/wpcom/read/site/post-email-subscriptions/update/index.js @@ -13,7 +13,7 @@ import { http } from 'state/data-layer/wpcom-http/actions'; import { dispatchRequest } from 'state/data-layer/wpcom-http/utils'; import { updateNewPostEmailSubscription } from 'state/reader/follows/actions'; import { errorNotice } from 'state/notices/actions'; -import { getReaderFollowForBlog } from 'state/selectors'; +import getReaderFollowForBlog from 'state/selectors/get-reader-follow-for-blog'; import { buildBody } from '../utils'; import { bypassDataLayer } from 'state/data-layer/utils'; diff --git a/client/state/data-layer/wpcom/read/sites/posts/follow/index.js b/client/state/data-layer/wpcom/read/sites/posts/follow/index.js index 7c46b60e91eee..71892c64c8613 100644 --- a/client/state/data-layer/wpcom/read/sites/posts/follow/index.js +++ b/client/state/data-layer/wpcom/read/sites/posts/follow/index.js @@ -17,7 +17,7 @@ import { dispatchRequest } from 'state/data-layer/wpcom-http/utils'; import { errorNotice, successNotice } from 'state/notices/actions'; import { updateConversationFollowStatus } from 'state/reader/conversations/actions'; import { bypassDataLayer } from 'state/data-layer/utils'; -import { getReaderConversationFollowStatus } from 'state/selectors'; +import getReaderConversationFollowStatus from 'state/selectors/get-reader-conversation-follow-status'; export function requestConversationFollow( { dispatch, getState }, action ) { const actionWithRevert = merge( {}, action, { diff --git a/client/state/data-layer/wpcom/read/sites/posts/mute/index.js b/client/state/data-layer/wpcom/read/sites/posts/mute/index.js index feb63b482bc2e..bf5ebe455d3dc 100644 --- a/client/state/data-layer/wpcom/read/sites/posts/mute/index.js +++ b/client/state/data-layer/wpcom/read/sites/posts/mute/index.js @@ -17,7 +17,7 @@ import { dispatchRequest } from 'state/data-layer/wpcom-http/utils'; import { errorNotice, plainNotice } from 'state/notices/actions'; import { updateConversationFollowStatus } from 'state/reader/conversations/actions'; import { bypassDataLayer } from 'state/data-layer/utils'; -import { getReaderConversationFollowStatus } from 'state/selectors'; +import getReaderConversationFollowStatus from 'state/selectors/get-reader-conversation-follow-status'; export function requestConversationMute( { dispatch, getState }, action ) { const actionWithRevert = merge( {}, action, { diff --git a/client/state/data-layer/wpcom/sites/comments/index.js b/client/state/data-layer/wpcom/sites/comments/index.js index 53cb5fde7dd71..e1a53fd54ffe8 100644 --- a/client/state/data-layer/wpcom/sites/comments/index.js +++ b/client/state/data-layer/wpcom/sites/comments/index.js @@ -23,7 +23,7 @@ import replies from './replies'; import likes from './likes'; import { errorNotice, removeNotice } from 'state/notices/actions'; import { getRawSite } from 'state/sites/selectors'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; import { receiveComments, receiveCommentsError as receiveCommentErrorAction, diff --git a/client/state/happychat/middleware-calypso.js b/client/state/happychat/middleware-calypso.js index a4a729f2477e9..24e9f6791968c 100644 --- a/client/state/happychat/middleware-calypso.js +++ b/client/state/happychat/middleware-calypso.js @@ -39,7 +39,7 @@ import getSkills from 'state/happychat/selectors/get-skills'; import isHappychatChatAssigned from 'state/happychat/selectors/is-happychat-chat-assigned'; import isHappychatClientConnected from 'state/happychat/selectors/is-happychat-client-connected'; import { getCurrentUserLocale } from 'state/current-user/selectors'; -import { getCurrentRoute } from 'state/selectors'; +import getCurrentRoute from 'state/selectors/get-current-route'; import { recordTracksEvent, withAnalytics } from 'state/analytics/actions'; const getRouteSetMessage = ( state, path ) => { diff --git a/client/state/help/selectors.js b/client/state/help/selectors.js index 98ab5d006441f..0df70d4940a6c 100644 --- a/client/state/help/selectors.js +++ b/client/state/help/selectors.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getSelectedOrPrimarySiteId } from 'state/selectors'; +import getSelectedOrPrimarySiteId from 'state/selectors/get-selected-or-primary-site-id'; import { getSite } from 'state/sites/selectors'; export const getHelpSiteId = state => state.help.selectedSiteId; diff --git a/client/state/lib/middleware.js b/client/state/lib/middleware.js index 5b56a1720e387..8c19126d8415f 100644 --- a/client/state/lib/middleware.js +++ b/client/state/lib/middleware.js @@ -26,11 +26,9 @@ import { import analytics from 'lib/analytics'; import cartStore from 'lib/cart/store'; import userFactory from 'lib/user'; -import { - isNotificationsOpen, - hasSitePendingAutomatedTransfer, - isFetchingAutomatedTransferStatus, -} from 'state/selectors'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; +import isFetchingAutomatedTransferStatus from 'state/selectors/is-fetching-automated-transfer-status'; +import isNotificationsOpen from 'state/selectors/is-notifications-open'; import { getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; import keyboardShortcuts from 'lib/keyboard-shortcuts'; diff --git a/client/state/navigation/middleware.js b/client/state/navigation/middleware.js index dd18633349967..d1498a802416d 100644 --- a/client/state/navigation/middleware.js +++ b/client/state/navigation/middleware.js @@ -11,7 +11,7 @@ import { get } from 'lodash'; import { addQueryArgs } from 'lib/url'; import { ACTIVITY_LOG_FILTER_SET, ACTIVITY_LOG_FILTER_UPDATE, NAVIGATE } from 'state/action-types'; import { filterStateToQuery } from 'state/activity-log/utils'; -import { getActivityLogFilter } from 'state/selectors'; +import getActivityLogFilter from 'state/selectors/get-activity-log-filter'; export const navigationMiddleware = store => { return next => action => { diff --git a/client/state/reader/streams/actions.js b/client/state/reader/streams/actions.js index 068199e7791dd..eea3410d456a5 100644 --- a/client/state/reader/streams/actions.js +++ b/client/state/reader/streams/actions.js @@ -14,7 +14,7 @@ import { READER_STREAMS_DISMISS_POST, READER_STREAMS_UPDATES_RECEIVE, } from 'state/action-types'; -import { getReaderStream as getStream } from 'state/selectors'; +import getStream from 'state/selectors/get-reader-stream'; import { getStreamType } from 'reader/utils'; import wpcom from 'lib/wp'; diff --git a/client/state/selectors/README.md b/client/state/selectors/README.md index 3d11075075a48..a6e34878e2065 100644 --- a/client/state/selectors/README.md +++ b/client/state/selectors/README.md @@ -14,5 +14,5 @@ When adding a new selector to this directory, make note of the following details To import specific selectors, use the exact path, which leverages the Babel "transform-imports" plugin to transform the import to its individual file: ```javascript -import { getSite } from 'state/selectors'; +import getSite from 'state/selectors/get-site'; ``` diff --git a/client/state/selectors/are-all-sites-single-user.js b/client/state/selectors/are-all-sites-single-user.js index 29c8d7760b8a8..f6f65b6355d60 100644 --- a/client/state/selectors/are-all-sites-single-user.js +++ b/client/state/selectors/are-all-sites-single-user.js @@ -4,7 +4,7 @@ * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; import { isSingleUserSite } from 'state/sites/selectors'; /** diff --git a/client/state/selectors/can-current-user-manage-plugins.js b/client/state/selectors/can-current-user-manage-plugins.js index 54529ee67b04c..6b2d821057adb 100644 --- a/client/state/selectors/can-current-user-manage-plugins.js +++ b/client/state/selectors/can-current-user-manage-plugins.js @@ -10,7 +10,7 @@ import { get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; /** * Returns true if user can manage plugins for at least one site and returns false otherwise diff --git a/client/state/selectors/can-upgrade-to-plan.js b/client/state/selectors/can-upgrade-to-plan.js index ae47574bbda0c..01f29f47e7eb1 100644 --- a/client/state/selectors/can-upgrade-to-plan.js +++ b/client/state/selectors/can-upgrade-to-plan.js @@ -12,7 +12,7 @@ import { PLAN_FREE, PLAN_JETPACK_FREE } from 'lib/plans/constants'; import { getCurrentPlan } from 'state/sites/plans/selectors'; import { getPlan } from 'lib/plans'; import { isJetpackSite } from 'state/sites/selectors'; -import { isSiteAutomatedTransfer } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; /** * Whether a given site can be upgraded to a specific plan. diff --git a/client/state/selectors/find-theme-filter-term.js b/client/state/selectors/find-theme-filter-term.js index 7a2163eae1c1b..57039cb0f5d37 100644 --- a/client/state/selectors/find-theme-filter-term.js +++ b/client/state/selectors/find-theme-filter-term.js @@ -10,7 +10,8 @@ import { filter, get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getThemeFilters, getThemeFilterTerm } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; +import getThemeFilterTerm from 'state/selectors/get-theme-filter-term'; /** * Returns a theme filter term object that corresponds to a given filter term slug diff --git a/client/state/selectors/get-google-my-business-connected-location.js b/client/state/selectors/get-google-my-business-connected-location.js index 7b67e37eaea6d..c55caba32052c 100644 --- a/client/state/selectors/get-google-my-business-connected-location.js +++ b/client/state/selectors/get-google-my-business-connected-location.js @@ -8,7 +8,7 @@ import { filter, last } from 'lodash'; /** * Internal dependencies */ -import { getGoogleMyBusinessLocations } from 'state/selectors'; +import getGoogleMyBusinessLocations from 'state/selectors/get-google-my-business-locations'; /** * Returns the Google My Business location/external user the given site diff --git a/client/state/selectors/get-image-editor-is-greater-than-minimum-dimensions.js b/client/state/selectors/get-image-editor-is-greater-than-minimum-dimensions.js index 326e964ceb01b..a64d075c69b4d 100644 --- a/client/state/selectors/get-image-editor-is-greater-than-minimum-dimensions.js +++ b/client/state/selectors/get-image-editor-is-greater-than-minimum-dimensions.js @@ -10,7 +10,7 @@ import { isInteger } from 'lodash'; * Internal dependencies */ import { MinimumImageDimensions } from 'state/ui/editor/image-editor/constants'; -import { getImageEditorOriginalAspectRatio } from 'state/selectors'; +import getImageEditorOriginalAspectRatio from 'state/selectors/get-image-editor-original-aspect-ratio'; /** * Returns whether the original image size is greater than minimumImageDimensions values. diff --git a/client/state/selectors/get-inline-help-support-variation.js b/client/state/selectors/get-inline-help-support-variation.js index c486defd1d69a..bd9f332d2beb2 100644 --- a/client/state/selectors/get-inline-help-support-variation.js +++ b/client/state/selectors/get-inline-help-support-variation.js @@ -4,7 +4,7 @@ */ import config from 'config'; import { getCurrentUserLocale } from 'state/current-user/selectors'; -import { isDirectlyReady } from 'state/selectors'; +import isDirectlyReady from 'state/selectors/is-directly-ready'; import isHappychatAvailable from 'state/happychat/selectors/is-happychat-available'; import isHappychatUserEligible from 'state/happychat/selectors/is-happychat-user-eligible'; import { isTicketSupportEligible } from 'state/help/ticket/selectors'; diff --git a/client/state/selectors/get-jetpack-onboarding-completed-steps.js b/client/state/selectors/get-jetpack-onboarding-completed-steps.js index d1051bbde14d7..19699d60fc652 100644 --- a/client/state/selectors/get-jetpack-onboarding-completed-steps.js +++ b/client/state/selectors/get-jetpack-onboarding-completed-steps.js @@ -8,7 +8,7 @@ import { reduce } from 'lodash'; /** * Internal dependencies */ -import { isJetpackOnboardingStepCompleted } from 'state/selectors'; +import isJetpackOnboardingStepCompleted from 'state/selectors/is-jetpack-onboarding-step-completed'; /** * Returns the Jetpack onboarding progress of a site for the specified steps. diff --git a/client/state/selectors/get-jetpack-onboarding-pending-steps.js b/client/state/selectors/get-jetpack-onboarding-pending-steps.js index 1249a5318e69c..17bf59a20a56e 100644 --- a/client/state/selectors/get-jetpack-onboarding-pending-steps.js +++ b/client/state/selectors/get-jetpack-onboarding-pending-steps.js @@ -10,7 +10,7 @@ import { reduce } from 'lodash'; */ import { JETPACK_ONBOARDING_STEPS as STEPS } from 'jetpack-onboarding/constants'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; export default function getJetpackOnboardingPendingSteps( state, siteId, steps ) { const stepActionsMap = { diff --git a/client/state/selectors/get-jetpack-onboarding-settings.js b/client/state/selectors/get-jetpack-onboarding-settings.js index ff2c769f0f052..8b7efcce646ba 100644 --- a/client/state/selectors/get-jetpack-onboarding-settings.js +++ b/client/state/selectors/get-jetpack-onboarding-settings.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackSettings } from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; /** * Returns the Jetpack onboarding settings of a given site. diff --git a/client/state/selectors/get-jetpack-setting.js b/client/state/selectors/get-jetpack-setting.js index 4bbda752e6f93..d52c81c1e5ec4 100644 --- a/client/state/selectors/get-jetpack-setting.js +++ b/client/state/selectors/get-jetpack-setting.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackSettings } from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; /** * Returns a certain Jetpack setting on a specified site. diff --git a/client/state/selectors/get-jetpack-settings-save-request-status.js b/client/state/selectors/get-jetpack-settings-save-request-status.js index d2f1ab92c4faa..b398b2fa3ee1e 100644 --- a/client/state/selectors/get-jetpack-settings-save-request-status.js +++ b/client/state/selectors/get-jetpack-settings-save-request-status.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; /** diff --git a/client/state/selectors/get-jetpack-sites.js b/client/state/selectors/get-jetpack-sites.js index 9b844ec1a3179..3f7fb5f3c5eb2 100644 --- a/client/state/selectors/get-jetpack-sites.js +++ b/client/state/selectors/get-jetpack-sites.js @@ -5,7 +5,7 @@ */ import createSelector from 'lib/create-selector'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { isJetpackSite } from 'state/sites/selectors'; /** diff --git a/client/state/selectors/get-jpo-user-hash.js b/client/state/selectors/get-jpo-user-hash.js index 14eadaa64bc1d..3f081c3d11d89 100644 --- a/client/state/selectors/get-jpo-user-hash.js +++ b/client/state/selectors/get-jpo-user-hash.js @@ -10,7 +10,7 @@ import { get } from 'lodash'; */ import createSelector from 'lib/create-selector'; import { getCurrentUserEmail } from 'state/current-user/selectors'; -import { getUnconnectedSite } from 'state/selectors'; +import getUnconnectedSite from 'state/selectors/get-unconnected-site'; /** * Returns a hashed userEmail of a Jetpack onboarding site indexed by the siteID. diff --git a/client/state/selectors/get-media-url.js b/client/state/selectors/get-media-url.js index 7d15fbc0b2289..9dd53899180aa 100644 --- a/client/state/selectors/get-media-url.js +++ b/client/state/selectors/get-media-url.js @@ -5,7 +5,7 @@ */ import safeImageUrl from 'lib/safe-image-url'; -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; /** * Returns the URL for a media item, or null if not known diff --git a/client/state/selectors/get-menus-url.js b/client/state/selectors/get-menus-url.js index 58507e7e81d82..ab6971753c6fc 100644 --- a/client/state/selectors/get-menus-url.js +++ b/client/state/selectors/get-menus-url.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { isCurrentUserEmailVerified } from 'state/current-user/selectors'; import { getSiteAdminUrl, getSiteSlug, isJetpackSite } from 'state/sites/selectors'; diff --git a/client/state/selectors/get-network-sites.js b/client/state/selectors/get-network-sites.js index 07dc38c7ecd41..af35cbb63c5ac 100644 --- a/client/state/selectors/get-network-sites.js +++ b/client/state/selectors/get-network-sites.js @@ -10,7 +10,8 @@ import { filter } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { isMainSiteOf, getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; +import isMainSiteOf from 'state/selectors/is-main-site-of'; import { getSite, isJetpackSiteMainNetworkSite } from 'state/sites/selectors'; /** diff --git a/client/state/selectors/get-newest-site.js b/client/state/selectors/get-newest-site.js index 8e486bd9a832a..92711140264aa 100644 --- a/client/state/selectors/get-newest-site.js +++ b/client/state/selectors/get-newest-site.js @@ -10,7 +10,7 @@ import { sortBy } from 'lodash'; */ import { getSite } from 'state/sites/selectors'; import createSelector from 'lib/create-selector'; -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; /** * Get the newest site of the current user diff --git a/client/state/selectors/get-partner-id-from-query.js b/client/state/selectors/get-partner-id-from-query.js index 75031239899fe..474448e7ad55d 100644 --- a/client/state/selectors/get-partner-id-from-query.js +++ b/client/state/selectors/get-partner-id-from-query.js @@ -8,7 +8,7 @@ import { get, toNumber, isInteger } from 'lodash'; /** * Internal dependencies */ -import { getInitialQueryArguments } from 'state/selectors'; +import getInitialQueryArguments from 'state/selectors/get-initial-query-arguments'; /** * Returns the partner_id query param if present or null. diff --git a/client/state/selectors/get-partner-slug-from-query.js b/client/state/selectors/get-partner-slug-from-query.js index f11b5ff220afb..8d9e6abe6e9fc 100644 --- a/client/state/selectors/get-partner-slug-from-query.js +++ b/client/state/selectors/get-partner-slug-from-query.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getPartnerIdFromQuery } from 'state/selectors'; +import getPartnerIdFromQuery from 'state/selectors/get-partner-id-from-query'; /** * Returns the partner slug when partner_id is present is the query and the diff --git a/client/state/selectors/get-past-billing-transactions.js b/client/state/selectors/get-past-billing-transactions.js index 8d69ec75405c5..a5534ea761092 100644 --- a/client/state/selectors/get-past-billing-transactions.js +++ b/client/state/selectors/get-past-billing-transactions.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getBillingTransactions } from 'state/selectors'; +import getBillingTransactions from 'state/selectors/get-billing-transactions'; /** * Returns all past billing transactions. diff --git a/client/state/selectors/get-post-revisions-comparisons.js b/client/state/selectors/get-post-revisions-comparisons.js index ebaa823188fb1..e354d16984e39 100644 --- a/client/state/selectors/get-post-revisions-comparisons.js +++ b/client/state/selectors/get-post-revisions-comparisons.js @@ -8,7 +8,8 @@ import { get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getPostRevisions, getPostRevisionsDiff } from 'state/selectors'; +import getPostRevisions from 'state/selectors/get-post-revisions'; +import getPostRevisionsDiff from 'state/selectors/get-post-revisions-diff'; const getPostRevisionsComparisons = createSelector( ( state, siteId, postId ) => { diff --git a/client/state/selectors/get-post-revisions-selected-revision.js b/client/state/selectors/get-post-revisions-selected-revision.js index 9652e3ffb2d7c..f449e80948395 100644 --- a/client/state/selectors/get-post-revisions-selected-revision.js +++ b/client/state/selectors/get-post-revisions-selected-revision.js @@ -4,7 +4,8 @@ */ import { getSelectedSiteId } from 'state/ui/selectors'; import { getEditorPostId } from 'state/ui/editor/selectors'; -import { getPostRevision, getPostRevisionsSelectedRevisionId } from 'state/selectors'; +import getPostRevision from 'state/selectors/get-post-revision'; +import getPostRevisionsSelectedRevisionId from 'state/selectors/get-post-revisions-selected-revision-id'; export default function getPostRevisionsSelectedRevision( state ) { const siteId = getSelectedSiteId( state ); diff --git a/client/state/selectors/get-public-sites.js b/client/state/selectors/get-public-sites.js index 3959a1dfca3a6..8c6a17aa5c14c 100644 --- a/client/state/selectors/get-public-sites.js +++ b/client/state/selectors/get-public-sites.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; import { getSite } from 'state/sites/selectors'; import createSelector from 'lib/create-selector'; diff --git a/client/state/selectors/get-reader-stream-next-item.js b/client/state/selectors/get-reader-stream-next-item.js index a4375b2a3a119..8a91842266c4d 100644 --- a/client/state/selectors/get-reader-stream-next-item.js +++ b/client/state/selectors/get-reader-stream-next-item.js @@ -7,7 +7,7 @@ /** * Internal dependencie */ -import { getReaderStreamOffsetItem } from 'state/selectors'; +import getReaderStreamOffsetItem from 'state/selectors/get-reader-stream-offset-item'; function getNextItem( state, currentItem ) { return getReaderStreamOffsetItem( state, currentItem, 1 ); diff --git a/client/state/selectors/get-reader-stream-offset-item.js b/client/state/selectors/get-reader-stream-offset-item.js index 51dca53681816..41c6639dbc8b1 100644 --- a/client/state/selectors/get-reader-stream-offset-item.js +++ b/client/state/selectors/get-reader-stream-offset-item.js @@ -9,7 +9,7 @@ import { findIndex } from 'lodash'; * Internal dependencie */ import { keysAreEqual } from 'reader/post-key'; -import { getReaderCurrentStream as getCurrentStream } from 'state/selectors'; +import getCurrentStream from 'state/selectors/get-reader-current-stream'; /* * given state, an item, and an offset: return the item that is offset away from the currentItem in the list. diff --git a/client/state/selectors/get-reader-stream-prev-item.js b/client/state/selectors/get-reader-stream-prev-item.js index 07e3c80709289..e3c250e4c7f08 100644 --- a/client/state/selectors/get-reader-stream-prev-item.js +++ b/client/state/selectors/get-reader-stream-prev-item.js @@ -7,7 +7,7 @@ /** * Internal dependencie */ -import { getReaderStreamOffsetItem } from 'state/selectors'; +import getReaderStreamOffsetItem from 'state/selectors/get-reader-stream-offset-item'; function getPrevItem( state, currentItem ) { return getReaderStreamOffsetItem( state, currentItem, -1 ); diff --git a/client/state/selectors/get-reader-stream-should-request-recommendations.js b/client/state/selectors/get-reader-stream-should-request-recommendations.js index ddd1437b467ea..f6f2ff767ab66 100644 --- a/client/state/selectors/get-reader-stream-should-request-recommendations.js +++ b/client/state/selectors/get-reader-stream-should-request-recommendations.js @@ -4,7 +4,8 @@ * Internal dependencies */ import { getDistanceBetweenRecs, RECS_PER_BLOCK } from 'reader/stream/utils'; -import { getReaderFollows, getReaderStream } from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; +import getReaderStream from 'state/selectors/get-reader-stream'; /* * shouldRequestRecs is used for calculating whether or not we need more recommendations diff --git a/client/state/selectors/get-reader-stream-transformed-items.js b/client/state/selectors/get-reader-stream-transformed-items.js index a49d031de7702..2cf33be905724 100644 --- a/client/state/selectors/get-reader-stream-transformed-items.js +++ b/client/state/selectors/get-reader-stream-transformed-items.js @@ -3,7 +3,9 @@ /** * Internal dependencies */ -import { getReaderStream, getReaderFollows } from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; + +import getReaderStream from 'state/selectors/get-reader-stream'; import treeSelect from 'lib/tree-select'; import { injectRecommendations, getDistanceBetweenRecs, combineCards } from 'reader/stream/utils'; diff --git a/client/state/selectors/get-selected-or-all-sites-jetpack-can-manage.js b/client/state/selectors/get-selected-or-all-sites-jetpack-can-manage.js index 8b73759d9eed3..3088e4b2b8887 100644 --- a/client/state/selectors/get-selected-or-all-sites-jetpack-can-manage.js +++ b/client/state/selectors/get-selected-or-all-sites-jetpack-can-manage.js @@ -5,7 +5,8 @@ */ import createSelector from 'lib/create-selector'; -import { getSelectedOrAllSites, canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSelectedOrAllSites from 'state/selectors/get-selected-or-all-sites'; import { isJetpackSite } from 'state/sites/selectors'; /** diff --git a/client/state/selectors/get-selected-or-all-sites-with-plugins.js b/client/state/selectors/get-selected-or-all-sites-with-plugins.js index 885e8fd051073..16d357a4794b9 100644 --- a/client/state/selectors/get-selected-or-all-sites-with-plugins.js +++ b/client/state/selectors/get-selected-or-all-sites-with-plugins.js @@ -5,7 +5,8 @@ */ import createSelector from 'lib/create-selector'; -import { getSelectedOrAllSites, canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSelectedOrAllSites from 'state/selectors/get-selected-or-all-sites'; import { getSelectedSiteId } from 'state/ui/selectors'; import { isJetpackSite } from 'state/sites/selectors'; diff --git a/client/state/selectors/get-selected-or-all-sites.js b/client/state/selectors/get-selected-or-all-sites.js index 829b8d14ff6ac..dc59d4a678fca 100644 --- a/client/state/selectors/get-selected-or-all-sites.js +++ b/client/state/selectors/get-selected-or-all-sites.js @@ -5,7 +5,7 @@ */ import createSelector from 'lib/create-selector'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; import { getSelectedSite } from 'state/ui/selectors'; export default createSelector( diff --git a/client/state/selectors/get-selected-or-primary-site-id.js b/client/state/selectors/get-selected-or-primary-site-id.js index b09e1f3b91304..74d371c55f3cc 100644 --- a/client/state/selectors/get-selected-or-primary-site-id.js +++ b/client/state/selectors/get-selected-or-primary-site-id.js @@ -5,7 +5,7 @@ */ import { getSelectedSiteId } from 'state/ui/selectors'; -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; /** * Returns the currently selected ID, or the primary Site ID, if none is selected. diff --git a/client/state/selectors/get-site-comment-parent-depth.js b/client/state/selectors/get-site-comment-parent-depth.js index 3274099dfdd79..5d226cf4608f0 100644 --- a/client/state/selectors/get-site-comment-parent-depth.js +++ b/client/state/selectors/get-site-comment-parent-depth.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSiteComment } from 'state/selectors'; +import getSiteComment from 'state/selectors/get-site-comment'; export const getSiteCommentParentDepth = createSelector( ( state, siteId, commentId ) => { diff --git a/client/state/selectors/get-site-comment-replies-tree.js b/client/state/selectors/get-site-comment-replies-tree.js index d89ac25a71c7c..4d05d57e38d28 100644 --- a/client/state/selectors/get-site-comment-replies-tree.js +++ b/client/state/selectors/get-site-comment-replies-tree.js @@ -8,7 +8,7 @@ import { filter, get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSiteCommentsTree } from 'state/selectors'; +import getSiteCommentsTree from 'state/selectors/get-site-comments-tree'; export const getSiteCommentRepliesTree = createSelector( ( state, siteId, status, commentParentId ) => diff --git a/client/state/selectors/get-site-icon-url.js b/client/state/selectors/get-site-icon-url.js index 2b390ecbc597c..769e24765bdde 100644 --- a/client/state/selectors/get-site-icon-url.js +++ b/client/state/selectors/get-site-icon-url.js @@ -10,7 +10,8 @@ import { get } from 'lodash'; * Internal dependencies */ import { getRawSite } from 'state/sites/selectors'; -import { getSiteIconId, getMediaUrl } from 'state/selectors'; +import getMediaUrl from 'state/selectors/get-media-url'; +import getSiteIconId from 'state/selectors/get-site-icon-id'; /** * Returns a URL to the site's current site icon, or null if no icon exists or diff --git a/client/state/selectors/get-site-slugs-for-upcoming-transactions.js b/client/state/selectors/get-site-slugs-for-upcoming-transactions.js index c07cd0f73810d..977d545d4fa81 100644 --- a/client/state/selectors/get-site-slugs-for-upcoming-transactions.js +++ b/client/state/selectors/get-site-slugs-for-upcoming-transactions.js @@ -11,7 +11,7 @@ import { compact, map, uniq } from 'lodash'; */ import createSelector from 'lib/create-selector'; import { getSiteSlug } from 'state/sites/selectors'; -import { getUpcomingBillingTransactions } from 'state/selectors'; +import getUpcomingBillingTransactions from 'state/selectors/get-upcoming-billing-transactions'; /** * Returns the slugs of all sites that are included in upcoming transactions, indexed by the site IDs. diff --git a/client/state/selectors/get-site-timezone-name.js b/client/state/selectors/get-site-timezone-name.js index 8ca2883d24c16..49d4d8c86c2ca 100644 --- a/client/state/selectors/get-site-timezone-name.js +++ b/client/state/selectors/get-site-timezone-name.js @@ -4,7 +4,9 @@ * Internal dependencies */ -import { getSiteGmtOffset, getSiteTimezoneValue } from 'state/selectors'; +import getSiteGmtOffset from 'state/selectors/get-site-gmt-offset'; + +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; /** * Returns either the site's timezone name (eg 'America/Araguaina'). diff --git a/client/state/selectors/get-sites.js b/client/state/selectors/get-sites.js index 93f2f757d2679..bbb2ad991c298 100644 --- a/client/state/selectors/get-sites.js +++ b/client/state/selectors/get-sites.js @@ -11,7 +11,8 @@ import { partition, sortBy } from 'lodash'; */ import createSelector from 'lib/create-selector'; import { getSite } from 'state/sites/selectors'; -import { getPrimarySiteId, getSitesItems } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; +import getSitesItems from 'state/selectors/get-sites-items'; const sortByNameAndUrl = list => sortBy( list, [ 'name', 'URL' ] ); diff --git a/client/state/selectors/get-theme-filter-string-from-term.js b/client/state/selectors/get-theme-filter-string-from-term.js index 0aa98acac680b..ef7fb32409fad 100644 --- a/client/state/selectors/get-theme-filter-string-from-term.js +++ b/client/state/selectors/get-theme-filter-string-from-term.js @@ -9,7 +9,7 @@ import { includes } from 'lodash'; /** * Internal dependencies */ -import { getThemeFilterTermsTable } from 'state/selectors'; +import getThemeFilterTermsTable from 'state/selectors/get-theme-filter-terms-table'; /** * Given the 'term' part, returns a complete filter diff --git a/client/state/selectors/get-theme-filter-term-from-string.js b/client/state/selectors/get-theme-filter-term-from-string.js index ef4458ec6e467..6e0ef7089f3b4 100644 --- a/client/state/selectors/get-theme-filter-term-from-string.js +++ b/client/state/selectors/get-theme-filter-term-from-string.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { isAmbiguousThemeFilterTerm } from 'state/selectors'; +import isAmbiguousThemeFilterTerm from 'state/selectors/is-ambiguous-theme-filter-term'; /** * return term from a taxonomy:term string diff --git a/client/state/selectors/get-theme-filter-term.js b/client/state/selectors/get-theme-filter-term.js index b3d3d3ea2c2f3..dfd688bd3193c 100644 --- a/client/state/selectors/get-theme-filter-term.js +++ b/client/state/selectors/get-theme-filter-term.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getThemeFilterTerms } from 'state/selectors'; +import getThemeFilterTerms from 'state/selectors/get-theme-filter-terms'; /** * Returns theme filter term object. diff --git a/client/state/selectors/get-theme-filter-terms-table.js b/client/state/selectors/get-theme-filter-terms-table.js index a2b49747c0b6b..ef13a6c195ca3 100644 --- a/client/state/selectors/get-theme-filter-terms-table.js +++ b/client/state/selectors/get-theme-filter-terms-table.js @@ -10,7 +10,8 @@ import { forIn, keys, mapValues } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { isAmbiguousThemeFilterTerm, getThemeFilters } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; +import isAmbiguousThemeFilterTerm from 'state/selectors/is-ambiguous-theme-filter-term'; /** * Return a table of theme filter terms to taxonomies, with diff --git a/client/state/selectors/get-theme-filter-terms.js b/client/state/selectors/get-theme-filter-terms.js index 71df24606b2c9..eff10a1f234e7 100644 --- a/client/state/selectors/get-theme-filter-terms.js +++ b/client/state/selectors/get-theme-filter-terms.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getThemeFilters } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; /** * Returns the list of available terms for a given theme filter. diff --git a/client/state/selectors/get-theme-filter-to-term-table.js b/client/state/selectors/get-theme-filter-to-term-table.js index 8aee9072077f2..344c5878b931f 100644 --- a/client/state/selectors/get-theme-filter-to-term-table.js +++ b/client/state/selectors/get-theme-filter-to-term-table.js @@ -10,7 +10,8 @@ import { forIn, keys, mapValues } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getThemeFilters, getThemeFilterTermFromString } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; +import getThemeFilterTermFromString from 'state/selectors/get-theme-filter-term-from-string'; /** * Return a table of all theme filter terms indexed by diff --git a/client/state/selectors/get-theme-showcase-description.js b/client/state/selectors/get-theme-showcase-description.js index 0250bc40a9aab..7eeeee33cfa50 100644 --- a/client/state/selectors/get-theme-showcase-description.js +++ b/client/state/selectors/get-theme-showcase-description.js @@ -9,7 +9,9 @@ import { get, includes } from 'lodash'; /** * Internal dependencies */ -import { findThemeFilterTerm, getThemeFilterTerm } from 'state/selectors'; +import findThemeFilterTerm from 'state/selectors/find-theme-filter-term'; + +import getThemeFilterTerm from 'state/selectors/get-theme-filter-term'; export default function getThemeShowcaseDescription( state, { filter, tier, vertical } = {} ) { if ( vertical ) { diff --git a/client/state/selectors/get-theme-showcase-title.js b/client/state/selectors/get-theme-showcase-title.js index 51a08c275daaa..51f4ef1ebef59 100644 --- a/client/state/selectors/get-theme-showcase-title.js +++ b/client/state/selectors/get-theme-showcase-title.js @@ -9,7 +9,9 @@ import { get, includes } from 'lodash'; /** * Internal dependencies */ -import { findThemeFilterTerm, getThemeFilterTerm } from 'state/selectors'; +import findThemeFilterTerm from 'state/selectors/find-theme-filter-term'; + +import getThemeFilterTerm from 'state/selectors/get-theme-filter-term'; export default function getThemeShowcaseTitle( state, { filter, tier, vertical } = {} ) { if ( vertical ) { diff --git a/client/state/selectors/get-timezones-label.js b/client/state/selectors/get-timezones-label.js index d8d88cb4e645f..ed36cdca4d827 100644 --- a/client/state/selectors/get-timezones-label.js +++ b/client/state/selectors/get-timezones-label.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { getTimezonesLabels } from 'state/selectors'; +import getTimezonesLabels from 'state/selectors/get-timezones-labels'; /** * Return timezone `label` according to the given timezone key (value) diff --git a/client/state/selectors/get-timezones-labels-by-continent.js b/client/state/selectors/get-timezones-labels-by-continent.js index da5c247427cf2..9f0e0f2c70186 100644 --- a/client/state/selectors/get-timezones-labels-by-continent.js +++ b/client/state/selectors/get-timezones-labels-by-continent.js @@ -9,7 +9,9 @@ import { fromPairs, map } from 'lodash'; /** * Internal dependencies */ -import { getTimezonesByContinent, getTimezonesLabel } from 'state/selectors'; +import getTimezonesByContinent from 'state/selectors/get-timezones-by-continent'; + +import getTimezonesLabel from 'state/selectors/get-timezones-label'; /** * Return the timezones by continent data diff --git a/client/state/selectors/get-timezones.js b/client/state/selectors/get-timezones.js index d96bd703d4213..d33aec88d8d3b 100644 --- a/client/state/selectors/get-timezones.js +++ b/client/state/selectors/get-timezones.js @@ -9,7 +9,7 @@ import { get, map, toPairs } from 'lodash'; /** * Internal dependencies */ -import { getTimezonesLabel } from 'state/selectors'; +import getTimezonesLabel from 'state/selectors/get-timezones-label'; /** * Return all timezones ordered by arrays with diff --git a/client/state/selectors/get-unconnected-site-url.js b/client/state/selectors/get-unconnected-site-url.js index 87f7a51be2cf7..bc88a496d9893 100644 --- a/client/state/selectors/get-unconnected-site-url.js +++ b/client/state/selectors/get-unconnected-site-url.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getUnconnectedSite } from 'state/selectors'; +import getUnconnectedSite from 'state/selectors/get-unconnected-site'; /** * Returns the URL of a particular Jetpack onboarding site. diff --git a/client/state/selectors/get-upcoming-billing-transactions.js b/client/state/selectors/get-upcoming-billing-transactions.js index 731f59dce33e0..a5f3f77e97e55 100644 --- a/client/state/selectors/get-upcoming-billing-transactions.js +++ b/client/state/selectors/get-upcoming-billing-transactions.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getBillingTransactions } from 'state/selectors'; +import getBillingTransactions from 'state/selectors/get-billing-transactions'; /** * Returns all upcoming billing transactions. diff --git a/client/state/selectors/get-upgrade-plan-slug-from-path.js b/client/state/selectors/get-upgrade-plan-slug-from-path.js index b31d61b59be38..de9a8db8bc34f 100644 --- a/client/state/selectors/get-upgrade-plan-slug-from-path.js +++ b/client/state/selectors/get-upgrade-plan-slug-from-path.js @@ -10,7 +10,7 @@ import { find } from 'lodash'; */ import { PLANS_LIST } from 'lib/plans/constants'; import { getPlanPath } from 'lib/plans'; -import { canUpgradeToPlan } from 'state/selectors'; +import canUpgradeToPlan from 'state/selectors/can-upgrade-to-plan'; /** * Given a route (path) fragment used to indicate a plan, return the corresponding plan slug. diff --git a/client/state/selectors/get-visible-sites.js b/client/state/selectors/get-visible-sites.js index 901dedfc56ff9..48a7e848a290e 100644 --- a/client/state/selectors/get-visible-sites.js +++ b/client/state/selectors/get-visible-sites.js @@ -5,7 +5,7 @@ */ import { getSite } from 'state/sites/selectors'; -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; import createSelector from 'lib/create-selector'; /** diff --git a/client/state/selectors/has-jetpack-sites.js b/client/state/selectors/has-jetpack-sites.js index af7ad78a9d370..44c6d8facc838 100644 --- a/client/state/selectors/has-jetpack-sites.js +++ b/client/state/selectors/has-jetpack-sites.js @@ -6,7 +6,7 @@ import createSelector from 'lib/create-selector'; import { isJetpackSite } from 'state/sites/selectors'; -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; /** * Returns true if the user has one or more Jetpack sites, and false otherwise. diff --git a/client/state/selectors/has-site-pending-automated-transfer.js b/client/state/selectors/has-site-pending-automated-transfer.js index a7956199f6f54..333a18f1de732 100644 --- a/client/state/selectors/has-site-pending-automated-transfer.js +++ b/client/state/selectors/has-site-pending-automated-transfer.js @@ -9,7 +9,9 @@ import { get } from 'lodash'; /** * Internal Dependencies */ -import { isSiteAutomatedTransfer, getSiteOptions } from 'state/selectors'; +import getSiteOptions from 'state/selectors/get-site-options'; + +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; /** * Indicates whether there might be an Automated Transfer process running on the backend for diff --git a/client/state/selectors/is-account-recovery-user-data-ready.js b/client/state/selectors/is-account-recovery-user-data-ready.js index 38c7bb2720183..098040885dd68 100644 --- a/client/state/selectors/is-account-recovery-user-data-ready.js +++ b/client/state/selectors/is-account-recovery-user-data-ready.js @@ -9,7 +9,7 @@ import { isString } from 'lodash'; /** * Internal dependencies */ -import { getAccountRecoveryResetUserData } from 'state/selectors'; +import getAccountRecoveryResetUserData from 'state/selectors/get-account-recovery-reset-user-data'; export default state => { const { user, firstname, lastname, url } = getAccountRecoveryResetUserData( state ); diff --git a/client/state/selectors/is-ambiguous-theme-filter-term.js b/client/state/selectors/is-ambiguous-theme-filter-term.js index 91306a99cd91c..cae210054e072 100644 --- a/client/state/selectors/is-ambiguous-theme-filter-term.js +++ b/client/state/selectors/is-ambiguous-theme-filter-term.js @@ -10,7 +10,7 @@ import { filter, get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getThemeFilters } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; /** * Returns true if a theme filter term belongs to more diff --git a/client/state/selectors/is-connected-secondary-network-site.js b/client/state/selectors/is-connected-secondary-network-site.js index c086c7655e19a..cfdba73b935c5 100644 --- a/client/state/selectors/is-connected-secondary-network-site.js +++ b/client/state/selectors/is-connected-secondary-network-site.js @@ -10,7 +10,8 @@ import { some } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSitesItems, isMainSiteOf } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; +import isMainSiteOf from 'state/selectors/is-main-site-of'; /** * Returns true if site with id equal to siteId is a connected secondary network site and false otherwise diff --git a/client/state/selectors/is-eligible-for-domain-to-paid-plan-upsell.js b/client/state/selectors/is-eligible-for-domain-to-paid-plan-upsell.js index 21bbb7473689d..6b710ea13bbac 100644 --- a/client/state/selectors/is-eligible-for-domain-to-paid-plan-upsell.js +++ b/client/state/selectors/is-eligible-for-domain-to-paid-plan-upsell.js @@ -4,7 +4,11 @@ * Internal dependencies */ -import { canCurrentUser, isMappedDomainSite, isSiteOnFreePlan, isVipSite } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; + +import isMappedDomainSite from 'state/selectors/is-mapped-domain-site'; +import isSiteOnFreePlan from 'state/selectors/is-site-on-free-plan'; +import isVipSite from 'state/selectors/is-vip-site'; /** * Returns true if the current user is eligible for a domain to paid plan upsell for the site diff --git a/client/state/selectors/is-eligible-for-free-to-paid-upsell.js b/client/state/selectors/is-eligible-for-free-to-paid-upsell.js index ec821023d12fd..6c61d261a22b8 100644 --- a/client/state/selectors/is-eligible-for-free-to-paid-upsell.js +++ b/client/state/selectors/is-eligible-for-free-to-paid-upsell.js @@ -4,7 +4,11 @@ * Internal dependencies */ -import { canCurrentUser, isMappedDomainSite, isSiteOnFreePlan, isVipSite } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; + +import isMappedDomainSite from 'state/selectors/is-mapped-domain-site'; +import isSiteOnFreePlan from 'state/selectors/is-site-on-free-plan'; +import isVipSite from 'state/selectors/is-vip-site'; /** * Returns true if the current user is eligible to participate in the free to paid plan upsell for the site diff --git a/client/state/selectors/is-email-blacklisted.js b/client/state/selectors/is-email-blacklisted.js index 9784d4867a78d..fbefa629a17b0 100644 --- a/client/state/selectors/is-email-blacklisted.js +++ b/client/state/selectors/is-email-blacklisted.js @@ -7,7 +7,7 @@ import { includes } from 'lodash'; /** * Internal dependencies */ -import { getSiteSetting } from 'state/selectors'; +import getSiteSetting from 'state/selectors/get-site-setting'; /** * Check if a site blacklist contains an email address. diff --git a/client/state/selectors/is-google-my-business-stats-nudge-dismissed.js b/client/state/selectors/is-google-my-business-stats-nudge-dismissed.js index d0a654df4e5a3..b0998dbb4a627 100644 --- a/client/state/selectors/is-google-my-business-stats-nudge-dismissed.js +++ b/client/state/selectors/is-google-my-business-stats-nudge-dismissed.js @@ -8,7 +8,7 @@ import { last } from 'lodash'; /** * Internal dependencies */ -import { getGoogleMyBusinessStatsNudgeDismissCount } from 'state/selectors'; +import getGoogleMyBusinessStatsNudgeDismissCount from 'state/selectors/get-google-my-business-stats-nudge-dismiss-count'; import { getPreference } from 'state/preferences/selectors'; const WEEK_IN_MS = 7 * 24 * 60 * 60 * 1000; diff --git a/client/state/selectors/is-google-my-business-stats-nudge-visible.js b/client/state/selectors/is-google-my-business-stats-nudge-visible.js index 998001ca46a95..2410f5faa4e53 100644 --- a/client/state/selectors/is-google-my-business-stats-nudge-visible.js +++ b/client/state/selectors/is-google-my-business-stats-nudge-visible.js @@ -3,11 +3,10 @@ /** * Internal dependencies */ -import { - isGoogleMyBusinessLocationConnected, - isSiteGoogleMyBusinessEligible, - getSiteOptions, -} from 'state/selectors'; +import getSiteOptions from 'state/selectors/get-site-options'; + +import isGoogleMyBusinessLocationConnected from 'state/selectors/is-google-my-business-location-connected'; +import isSiteGoogleMyBusinessEligible from 'state/selectors/is-site-google-my-business-eligible'; import { isRequestingSiteSettings, getSiteSettings } from 'state/site-settings/selectors'; import versionCompare from 'lib/version-compare'; import { isJetpackSite } from 'state/sites/selectors'; diff --git a/client/state/selectors/is-jetpack-onboarding-step-completed.js b/client/state/selectors/is-jetpack-onboarding-step-completed.js index 594cc4c696234..57f0d5bdfa275 100644 --- a/client/state/selectors/is-jetpack-onboarding-step-completed.js +++ b/client/state/selectors/is-jetpack-onboarding-step-completed.js @@ -10,7 +10,7 @@ import { translate } from 'i18n-calypso'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getJetpackOnboardingSettings } from 'state/selectors'; +import getJetpackOnboardingSettings from 'state/selectors/get-jetpack-onboarding-settings'; import { JETPACK_ONBOARDING_STEPS as STEPS } from 'jetpack-onboarding/constants'; /** diff --git a/client/state/selectors/is-jetpack-settings-save-failure.js b/client/state/selectors/is-jetpack-settings-save-failure.js index a386f52138b1e..63589d45c7032 100644 --- a/client/state/selectors/is-jetpack-settings-save-failure.js +++ b/client/state/selectors/is-jetpack-settings-save-failure.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJetpackSettingsSaveRequestStatus } from 'state/selectors'; +import getJetpackSettingsSaveRequestStatus from 'state/selectors/get-jetpack-settings-save-request-status'; /** * Returns true if the save Jetpack site settings requests is successful diff --git a/client/state/selectors/is-jetpack-site-connected.js b/client/state/selectors/is-jetpack-site-connected.js index 44d013e606f7a..32ef6e1a9ab01 100644 --- a/client/state/selectors/is-jetpack-site-connected.js +++ b/client/state/selectors/is-jetpack-site-connected.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackConnectionStatus } from 'state/selectors'; +import getJetpackConnectionStatus from 'state/selectors/get-jetpack-connection-status'; /** * Returns true if we the Jetpack site is connected. False otherwise. diff --git a/client/state/selectors/is-jetpack-site-in-development-mode.js b/client/state/selectors/is-jetpack-site-in-development-mode.js index 13a4bcad3e304..c31fa7a1230fe 100644 --- a/client/state/selectors/is-jetpack-site-in-development-mode.js +++ b/client/state/selectors/is-jetpack-site-in-development-mode.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackConnectionStatus } from 'state/selectors'; +import getJetpackConnectionStatus from 'state/selectors/get-jetpack-connection-status'; /** * Returns true if we the Jetpack site is in development mode. False otherwise. diff --git a/client/state/selectors/is-jetpack-site-in-staging-mode.js b/client/state/selectors/is-jetpack-site-in-staging-mode.js index ce009dfbc051d..f16aa7642e38d 100644 --- a/client/state/selectors/is-jetpack-site-in-staging-mode.js +++ b/client/state/selectors/is-jetpack-site-in-staging-mode.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackConnectionStatus } from 'state/selectors'; +import getJetpackConnectionStatus from 'state/selectors/get-jetpack-connection-status'; /** * Returns true if we the Jetpack site is in staging mode. False otherwise. diff --git a/client/state/selectors/is-jetpack-user-master.js b/client/state/selectors/is-jetpack-user-master.js index 6d71bc32a99fd..885f2a11ff270 100644 --- a/client/state/selectors/is-jetpack-user-master.js +++ b/client/state/selectors/is-jetpack-user-master.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getJetpackUserConnection } from 'state/selectors'; +import getJetpackUserConnection from 'state/selectors/get-jetpack-user-connection'; /** * Returns true if the Jetpack site current user is the master user who owns the connection. False otherwise. diff --git a/client/state/selectors/is-plugin-upload-complete.js b/client/state/selectors/is-plugin-upload-complete.js index 70af4d1f65776..c09167b97a528 100644 --- a/client/state/selectors/is-plugin-upload-complete.js +++ b/client/state/selectors/is-plugin-upload-complete.js @@ -4,7 +4,9 @@ * Internal dependencies */ -import { isPluginUploadInProgress, getUploadedPluginId } from 'state/selectors'; +import getUploadedPluginId from 'state/selectors/get-uploaded-plugin-id'; + +import isPluginUploadInProgress from 'state/selectors/is-plugin-upload-in-progress'; /** * Indicates whether a plugin upload has completed diff --git a/client/state/selectors/is-primary-domain-by-site-id.js b/client/state/selectors/is-primary-domain-by-site-id.js index 09a43c073c081..fdf98fa17f6ed 100644 --- a/client/state/selectors/is-primary-domain-by-site-id.js +++ b/client/state/selectors/is-primary-domain-by-site-id.js @@ -5,7 +5,7 @@ import { get } from 'lodash'; * Internal dependencies */ -import { getPrimaryDomainBySiteId } from 'state/selectors'; +import getPrimaryDomainBySiteId from 'state/selectors/get-primary-domain-by-site-id'; /** * Return if it's the primary domainfrom state object and diff --git a/client/state/selectors/is-regenerating-jetpack-post-by-email.js b/client/state/selectors/is-regenerating-jetpack-post-by-email.js index 415b29fe4dd09..33480564b402a 100644 --- a/client/state/selectors/is-regenerating-jetpack-post-by-email.js +++ b/client/state/selectors/is-regenerating-jetpack-post-by-email.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; /** diff --git a/client/state/selectors/is-requesting-billing-transaction.js b/client/state/selectors/is-requesting-billing-transaction.js index 43e14379fd029..fda021b7c1bd0 100644 --- a/client/state/selectors/is-requesting-billing-transaction.js +++ b/client/state/selectors/is-requesting-billing-transaction.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { isRequestingBillingTransactions } from 'state/selectors'; +import isRequestingBillingTransactions from 'state/selectors/is-requesting-billing-transactions'; /** * Returns true if we are currently making a request to bulk fetch past billing diff --git a/client/state/selectors/is-requesting-jetpack-settings.js b/client/state/selectors/is-requesting-jetpack-settings.js index 676b8127cd7c5..da08d3fbd354c 100644 --- a/client/state/selectors/is-requesting-jetpack-settings.js +++ b/client/state/selectors/is-requesting-jetpack-settings.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; import { requestJetpackSettings } from 'state/jetpack/settings/actions'; /** diff --git a/client/state/selectors/is-requesting-missing-sites.js b/client/state/selectors/is-requesting-missing-sites.js index 6505f880c05eb..9a7e1ba73fee0 100644 --- a/client/state/selectors/is-requesting-missing-sites.js +++ b/client/state/selectors/is-requesting-missing-sites.js @@ -5,7 +5,7 @@ */ import { getCurrentUser } from 'state/current-user/selectors'; -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; /** * Returns true if we are requesting sites we don't have yet. diff --git a/client/state/selectors/is-site-in-profile-links.js b/client/state/selectors/is-site-in-profile-links.js index 420f84e224e1f..23046c25ea091 100644 --- a/client/state/selectors/is-site-in-profile-links.js +++ b/client/state/selectors/is-site-in-profile-links.js @@ -9,7 +9,7 @@ import { some } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getProfileLinks } from 'state/selectors'; +import getProfileLinks from 'state/selectors/get-profile-links'; /** * Whether the site with the domain in question is currently in the user's profile links. diff --git a/client/state/selectors/is-site-supporting-image-editor.js b/client/state/selectors/is-site-supporting-image-editor.js index 05aabd1d9d7af..6c0e8e87944f6 100644 --- a/client/state/selectors/is-site-supporting-image-editor.js +++ b/client/state/selectors/is-site-supporting-image-editor.js @@ -5,7 +5,7 @@ */ import { isJetpackModuleActive } from 'state/sites/selectors'; -import { isPrivateSite } from 'state/selectors'; +import isPrivateSite from 'state/selectors/is-private-site'; /** * Returns false only if the site is known to not support editing images, or diff --git a/client/state/selectors/is-site-upgradeable.js b/client/state/selectors/is-site-upgradeable.js index 206f2f91e2823..c2b808daf58bc 100644 --- a/client/state/selectors/is-site-upgradeable.js +++ b/client/state/selectors/is-site-upgradeable.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getCurrentUserId } from 'state/current-user/selectors'; import { getRawSite } from 'state/sites/selectors'; diff --git a/client/state/selectors/is-support-variation-determined.js b/client/state/selectors/is-support-variation-determined.js index 6782119fc357b..3c47e047e5856 100644 --- a/client/state/selectors/is-support-variation-determined.js +++ b/client/state/selectors/is-support-variation-determined.js @@ -10,7 +10,8 @@ import { getTicketSupportRequestError, } from 'state/help/ticket/selectors'; import isHappychatUserEligible from 'state/happychat/selectors/is-happychat-user-eligible'; -import { isDirectlyReady, isDirectlyFailed } from 'state/selectors'; +import isDirectlyFailed from 'state/selectors/is-directly-failed'; +import isDirectlyReady from 'state/selectors/is-directly-ready'; import getHappychatConnectionStatus from 'state/happychat/selectors/get-happychat-connection-status'; /** diff --git a/client/state/selectors/is-transient-media.js b/client/state/selectors/is-transient-media.js index 8715dc3f58163..5120bb31b4563 100644 --- a/client/state/selectors/is-transient-media.js +++ b/client/state/selectors/is-transient-media.js @@ -9,7 +9,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; export default function isTransientMedia( state, siteId, mediaId ) { return !! get( getMediaItem( state, siteId, mediaId ), 'transient' ); diff --git a/client/state/selectors/is-updating-jetpack-settings.js b/client/state/selectors/is-updating-jetpack-settings.js index a0e37f3dc92c9..95ede65c3105b 100644 --- a/client/state/selectors/is-updating-jetpack-settings.js +++ b/client/state/selectors/is-updating-jetpack-settings.js @@ -8,7 +8,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getRequest } from 'state/selectors'; +import getRequest from 'state/selectors/get-request'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; /** diff --git a/client/state/selectors/is-valid-theme-filter-term.js b/client/state/selectors/is-valid-theme-filter-term.js index b9cd6cb19ab87..790c0192a1fa4 100644 --- a/client/state/selectors/is-valid-theme-filter-term.js +++ b/client/state/selectors/is-valid-theme-filter-term.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { findThemeFilterTerm } from 'state/selectors'; +import findThemeFilterTerm from 'state/selectors/find-theme-filter-term'; /** * Whether a filter term slug is valid diff --git a/client/state/selectors/prepend-theme-filter-keys.js b/client/state/selectors/prepend-theme-filter-keys.js index 0f934fdee5143..7dcadce5b6fce 100644 --- a/client/state/selectors/prepend-theme-filter-keys.js +++ b/client/state/selectors/prepend-theme-filter-keys.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { getThemeFilterStringFromTerm } from 'state/selectors'; +import getThemeFilterStringFromTerm from 'state/selectors/get-theme-filter-string-from-term'; /** * For a string of terms, recreate full search string in diff --git a/client/state/selectors/should-sync-reader-follows.js b/client/state/selectors/should-sync-reader-follows.js index dff3426b057f4..8e183da5156d6 100644 --- a/client/state/selectors/should-sync-reader-follows.js +++ b/client/state/selectors/should-sync-reader-follows.js @@ -4,7 +4,7 @@ * Internal dependencies */ -import { getReaderFollowsLastSyncTime } from 'state/selectors'; +import getReaderFollowsLastSyncTime from 'state/selectors/get-reader-follows-last-sync-time'; export const MS_BETWEEN_SYNCS = 1000 * 60 * 60; // one hour diff --git a/client/state/selectors/test/are-all-sites-single-user.js b/client/state/selectors/test/are-all-sites-single-user.js index f0a14d3ae8345..f036d47307c5e 100644 --- a/client/state/selectors/test/are-all-sites-single-user.js +++ b/client/state/selectors/test/are-all-sites-single-user.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { areAllSitesSingleUser } from 'state/selectors'; +import areAllSitesSingleUser from 'state/selectors/are-all-sites-single-user'; import { userState } from './fixtures/user-state'; describe( 'areAllSitesSingleUser()', () => { diff --git a/client/state/selectors/test/are-site-permalinks-editable.js b/client/state/selectors/test/are-site-permalinks-editable.js index f80007cdfb45c..9d9b60d12ac0e 100644 --- a/client/state/selectors/test/are-site-permalinks-editable.js +++ b/client/state/selectors/test/are-site-permalinks-editable.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { areSitePermalinksEditable } from 'state/selectors'; +import areSitePermalinksEditable from 'state/selectors/are-site-permalinks-editable'; describe( 'areSitePermalinksEditable()', () => { test( 'should return false if site ID is not tracked', () => { diff --git a/client/state/selectors/test/can-current-user-edit-post.js b/client/state/selectors/test/can-current-user-edit-post.js index d8d81457209fa..3879ba45bf158 100644 --- a/client/state/selectors/test/can-current-user-edit-post.js +++ b/client/state/selectors/test/can-current-user-edit-post.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { canCurrentUserEditPost } from 'state/selectors'; +import canCurrentUserEditPost from 'state/selectors/can-current-user-edit-post'; describe( 'canCurrentUserEditPost()', () => { const fakeGlobalId = 'abcdef1234'; diff --git a/client/state/selectors/test/can-current-user-manage-plugins.js b/client/state/selectors/test/can-current-user-manage-plugins.js index 154d35ac0310f..436bb169ddea5 100644 --- a/client/state/selectors/test/can-current-user-manage-plugins.js +++ b/client/state/selectors/test/can-current-user-manage-plugins.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { canCurrentUserManagePlugins } from 'state/selectors'; +import canCurrentUserManagePlugins from 'state/selectors/can-current-user-manage-plugins'; describe( 'canCurrentUserManagePlugins()', () => { test( 'should return false if no capabilities information exist in state', () => { diff --git a/client/state/selectors/test/can-current-user.js b/client/state/selectors/test/can-current-user.js index c4856b0cda911..c343c13ba5e68 100644 --- a/client/state/selectors/test/can-current-user.js +++ b/client/state/selectors/test/can-current-user.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; describe( 'canCurrentUser()', () => { test( 'should return null if the site is not known', () => { diff --git a/client/state/selectors/test/can-upgrade-to-plan.js b/client/state/selectors/test/can-upgrade-to-plan.js index d4fa7de1c16b7..3bec6328ef968 100644 --- a/client/state/selectors/test/can-upgrade-to-plan.js +++ b/client/state/selectors/test/can-upgrade-to-plan.js @@ -8,7 +8,7 @@ import { includes } from 'lodash'; /** * Internal dependencies */ -import { canUpgradeToPlan } from 'state/selectors'; +import canUpgradeToPlan from 'state/selectors/can-upgrade-to-plan'; import { PLAN_BUSINESS, PLAN_BUSINESS_2_YEARS, diff --git a/client/state/selectors/test/count-post-likes.js b/client/state/selectors/test/count-post-likes.js index 76ef8aa616d4b..f892df112b998 100644 --- a/client/state/selectors/test/count-post-likes.js +++ b/client/state/selectors/test/count-post-likes.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { countPostLikes } from 'state/selectors'; +import countPostLikes from 'state/selectors/count-post-likes'; describe( 'countPostLikes()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/edited-post-has-content.js b/client/state/selectors/test/edited-post-has-content.js index 1f335b40b5132..dbc18e1d01a96 100644 --- a/client/state/selectors/test/edited-post-has-content.js +++ b/client/state/selectors/test/edited-post-has-content.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { editedPostHasContent } from 'state/selectors'; +import editedPostHasContent from 'state/selectors/edited-post-has-content'; import { isEmptyContent } from '../edited-post-has-content'; import PostQueryManager from 'lib/query-manager/post'; diff --git a/client/state/selectors/test/find-theme-filter-term.js b/client/state/selectors/test/find-theme-filter-term.js index 3d85f591d1b9f..0e048811daee3 100644 --- a/client/state/selectors/test/find-theme-filter-term.js +++ b/client/state/selectors/test/find-theme-filter-term.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { findThemeFilterTerm } from 'state/selectors'; +import findThemeFilterTerm from 'state/selectors/find-theme-filter-term'; import { state } from './fixtures/theme-filters'; describe( 'findThemeFilterTerm()', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-options-error.js b/client/state/selectors/test/get-account-recovery-reset-options-error.js index 302fc4f723a50..011d1e5ffb6a6 100644 --- a/client/state/selectors/test/get-account-recovery-reset-options-error.js +++ b/client/state/selectors/test/get-account-recovery-reset-options-error.js @@ -8,7 +8,7 @@ import { assert } from 'chai'; /** * Internal dependencies */ -import { getAccountRecoveryResetOptionsError } from 'state/selectors'; +import getAccountRecoveryResetOptionsError from 'state/selectors/get-account-recovery-reset-options-error'; describe( 'getAccountRecoveryResetOptionsError()', () => { test( 'should return the error under account recovery state tree.', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-options.js b/client/state/selectors/test/get-account-recovery-reset-options.js index cd0636418e525..2b3546fa61ca3 100644 --- a/client/state/selectors/test/get-account-recovery-reset-options.js +++ b/client/state/selectors/test/get-account-recovery-reset-options.js @@ -8,7 +8,7 @@ import { assert } from 'chai'; /** * Internal dependencies */ -import { getAccountRecoveryResetOptions } from 'state/selectors'; +import getAccountRecoveryResetOptions from 'state/selectors/get-account-recovery-reset-options'; describe( 'getAccountRecoveryResetOptions()', () => { test( 'should return the items array under accountRecovery/reset substate tree.', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-password-error.js b/client/state/selectors/test/get-account-recovery-reset-password-error.js index 86c3554501d29..3dc89649b36a6 100644 --- a/client/state/selectors/test/get-account-recovery-reset-password-error.js +++ b/client/state/selectors/test/get-account-recovery-reset-password-error.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getAccountRecoveryResetPasswordError } from 'state/selectors'; +import getAccountRecoveryResetPasswordError from 'state/selectors/get-account-recovery-reset-password-error'; describe( 'getAccountRecoveryResetPasswordError()', () => { test( 'should return the error field under resetPassword state tree.', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-request-error.js b/client/state/selectors/test/get-account-recovery-reset-request-error.js index ee41dfea02842..e17fbb4720796 100644 --- a/client/state/selectors/test/get-account-recovery-reset-request-error.js +++ b/client/state/selectors/test/get-account-recovery-reset-request-error.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getAccountRecoveryResetRequestError } from 'state/selectors'; +import getAccountRecoveryResetRequestError from 'state/selectors/get-account-recovery-reset-request-error'; describe( 'getAccountRecoveryResetRequestError()', () => { test( 'should return the error field in the request-reset substate treee.', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-selected-method.js b/client/state/selectors/test/get-account-recovery-reset-selected-method.js index 05d6f1a4896c2..7f4b03fcf5002 100644 --- a/client/state/selectors/test/get-account-recovery-reset-selected-method.js +++ b/client/state/selectors/test/get-account-recovery-reset-selected-method.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getAccountRecoveryResetSelectedMethod } from 'state/selectors'; +import getAccountRecoveryResetSelectedMethod from 'state/selectors/get-account-recovery-reset-selected-method'; describe( 'getAccountRecoveryResetSelectedMethod()', () => { test( 'should return the method field under the account recovery state tree.', () => { diff --git a/client/state/selectors/test/get-account-recovery-reset-user-data.js b/client/state/selectors/test/get-account-recovery-reset-user-data.js index c88cb87a22caf..9c211bcce657f 100644 --- a/client/state/selectors/test/get-account-recovery-reset-user-data.js +++ b/client/state/selectors/test/get-account-recovery-reset-user-data.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getAccountRecoveryResetUserData } from 'state/selectors'; +import getAccountRecoveryResetUserData from 'state/selectors/get-account-recovery-reset-user-data'; describe( 'getAccountRecoveryResetUserData()', () => { test( 'should return the userData substate tree.', () => { diff --git a/client/state/selectors/test/get-account-recovery-validation-key.js b/client/state/selectors/test/get-account-recovery-validation-key.js index d78c07f2a71bd..18db9f8c7b21d 100644 --- a/client/state/selectors/test/get-account-recovery-validation-key.js +++ b/client/state/selectors/test/get-account-recovery-validation-key.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getAccountRecoveryValidationKey } from 'state/selectors'; +import getAccountRecoveryValidationKey from 'state/selectors/get-account-recovery-validation-key'; describe( 'getAccountRecoveryValidationKey()', () => { test( 'should return the key field under the account recovery state tree.', () => { diff --git a/client/state/selectors/test/get-active-discount.js b/client/state/selectors/test/get-active-discount.js index d57cca35a4649..196aa91cb8b73 100644 --- a/client/state/selectors/test/get-active-discount.js +++ b/client/state/selectors/test/get-active-discount.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getActiveDiscount } from 'state/selectors'; +import getActiveDiscount from 'state/selectors/get-active-discount'; import { isDiscountActive } from 'state/selectors/get-active-discount'; import { hasActivePromotion } from 'state/active-promotions/selectors'; import { getSitePlanSlug } from 'state/sites/selectors'; diff --git a/client/state/selectors/test/get-active-reply-comment-id.js b/client/state/selectors/test/get-active-reply-comment-id.js index 705c97ae628ab..9919d94fc8906 100644 --- a/client/state/selectors/test/get-active-reply-comment-id.js +++ b/client/state/selectors/test/get-active-reply-comment-id.js @@ -2,7 +2,7 @@ /** * Internal dependencies */ -import { getActiveReplyCommentId } from 'state/selectors'; +import getActiveReplyCommentId from 'state/selectors/get-active-reply-comment-id'; describe( 'getActiveReplyCommentId()', () => { test( 'should return the active reply comment ID for a known site and post', () => { diff --git a/client/state/selectors/test/get-activity-log.js b/client/state/selectors/test/get-activity-log.js index bd6ce88e91d38..cec4fdd38a546 100644 --- a/client/state/selectors/test/get-activity-log.js +++ b/client/state/selectors/test/get-activity-log.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getActivityLog } from 'state/selectors'; +import getActivityLog from 'state/selectors/get-activity-log'; import ActivityQueryManager from 'lib/query-manager/activity'; const SITE_ID = 1234; diff --git a/client/state/selectors/test/get-activity-logs.js b/client/state/selectors/test/get-activity-logs.js index 694d2b34de2d2..4b291df71d4fe 100644 --- a/client/state/selectors/test/get-activity-logs.js +++ b/client/state/selectors/test/get-activity-logs.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getActivityLogs } from 'state/selectors'; +import getActivityLogs from 'state/selectors/get-activity-logs'; import ActivityQueryManager from 'lib/query-manager/activity'; const SITE_ID = 1234; diff --git a/client/state/selectors/test/get-application-passwords.js b/client/state/selectors/test/get-application-passwords.js index 98b329ede5cb8..52371ffa9d893 100644 --- a/client/state/selectors/test/get-application-passwords.js +++ b/client/state/selectors/test/get-application-passwords.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getApplicationPasswords } from 'state/selectors'; +import getApplicationPasswords from 'state/selectors/get-application-passwords'; describe( 'getApplicationPasswords()', () => { test( 'should return application passwords of the current user', () => { diff --git a/client/state/selectors/test/get-billing-transaction-app-filter-values.js b/client/state/selectors/test/get-billing-transaction-app-filter-values.js index ad336323c6fc1..a8a39b5b75c45 100644 --- a/client/state/selectors/test/get-billing-transaction-app-filter-values.js +++ b/client/state/selectors/test/get-billing-transaction-app-filter-values.js @@ -2,7 +2,7 @@ /** * Internal dependencies */ -import { getBillingTransactionAppFilterValues } from 'state/selectors'; +import getBillingTransactionAppFilterValues from 'state/selectors/get-billing-transaction-app-filter-values'; describe( 'getBillingTransactionAppFilterValues()', () => { const state = { diff --git a/client/state/selectors/test/get-billing-transaction-date-filter-values.js b/client/state/selectors/test/get-billing-transaction-date-filter-values.js index 87581052a5c11..92aa3f5a71300 100644 --- a/client/state/selectors/test/get-billing-transaction-date-filter-values.js +++ b/client/state/selectors/test/get-billing-transaction-date-filter-values.js @@ -2,7 +2,7 @@ /** * Internal dependencies */ -import { getBillingTransactionDateFilterValues } from 'state/selectors'; +import getBillingTransactionDateFilterValues from 'state/selectors/get-billing-transaction-date-filter-values'; jest.mock( 'i18n-calypso', () => { const moment = require( 'moment' ); diff --git a/client/state/selectors/test/get-billing-transaction-filters.js b/client/state/selectors/test/get-billing-transaction-filters.js index dbd2f8048a206..55d9f2cb6930e 100644 --- a/client/state/selectors/test/get-billing-transaction-filters.js +++ b/client/state/selectors/test/get-billing-transaction-filters.js @@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash'; /** * Internal dependencies */ -import { getBillingTransactionFilters } from 'state/selectors'; +import getBillingTransactionFilters from 'state/selectors/get-billing-transaction-filters'; describe( 'getBillingTransactionFilters()', () => { const state = { diff --git a/client/state/selectors/test/get-billing-transactions-by-type.js b/client/state/selectors/test/get-billing-transactions-by-type.js index 52d2ac02c52e8..e57b0d93f61c4 100644 --- a/client/state/selectors/test/get-billing-transactions-by-type.js +++ b/client/state/selectors/test/get-billing-transactions-by-type.js @@ -8,7 +8,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getBillingTransactionsByType } from 'state/selectors'; +import getBillingTransactionsByType from 'state/selectors/get-billing-transactions-by-type'; describe( 'getBillingTransactionsByType()', () => { const state = { diff --git a/client/state/selectors/test/get-billing-transactions.js b/client/state/selectors/test/get-billing-transactions.js index 98cbfa7d9375e..334ac61496b6a 100644 --- a/client/state/selectors/test/get-billing-transactions.js +++ b/client/state/selectors/test/get-billing-transactions.js @@ -9,7 +9,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getBillingTransactions } from 'state/selectors'; +import getBillingTransactions from 'state/selectors/get-billing-transactions'; describe( 'getBillingTransactions()', () => { test( 'should return all billing transactions if they have been fetched', () => { diff --git a/client/state/selectors/test/get-blocked-sites.js b/client/state/selectors/test/get-blocked-sites.js index 62933ef7fcb28..57672027b4142 100644 --- a/client/state/selectors/test/get-blocked-sites.js +++ b/client/state/selectors/test/get-blocked-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getBlockedSites } from 'state/selectors'; +import getBlockedSites from 'state/selectors/get-blocked-sites'; describe( 'getBlockedSites()', () => { test( 'should return an array of blocked site IDs', () => { diff --git a/client/state/selectors/test/get-blog-stickers.js b/client/state/selectors/test/get-blog-stickers.js index d8f2671e02e87..79a101a06216a 100644 --- a/client/state/selectors/test/get-blog-stickers.js +++ b/client/state/selectors/test/get-blog-stickers.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getBlogStickers } from 'state/selectors'; +import getBlogStickers from 'state/selectors/get-blog-stickers'; describe( 'getBlogStickers()', () => { test( 'should return stickers for a known blog', () => { diff --git a/client/state/selectors/test/get-comments-page.js b/client/state/selectors/test/get-comments-page.js index 5e345d43bc9e3..fe2d0c5942753 100644 --- a/client/state/selectors/test/get-comments-page.js +++ b/client/state/selectors/test/get-comments-page.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getCommentsPage } from 'state/selectors'; +import getCommentsPage from 'state/selectors/get-comments-page'; const SITE_ID = 12345678; const POST_ID = 1234; diff --git a/client/state/selectors/test/get-concierge-appointment-details.js b/client/state/selectors/test/get-concierge-appointment-details.js index 71bc33e0846be..110f7ae601684 100644 --- a/client/state/selectors/test/get-concierge-appointment-details.js +++ b/client/state/selectors/test/get-concierge-appointment-details.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getConciergeAppointmentDetails } from 'state/selectors'; +import getConciergeAppointmentDetails from 'state/selectors/get-concierge-appointment-details'; describe( 'getConciergeAppointmentDetails()', () => { test( 'should be defaulted to null.', () => { diff --git a/client/state/selectors/test/get-concierge-available-times.js b/client/state/selectors/test/get-concierge-available-times.js index 51b46eb803cca..24d7bff713479 100644 --- a/client/state/selectors/test/get-concierge-available-times.js +++ b/client/state/selectors/test/get-concierge-available-times.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getConciergeAvailableTimes } from 'state/selectors'; +import getConciergeAvailableTimes from 'state/selectors/get-concierge-available-times'; describe( 'getConciergeAvailableTimes()', () => { test( 'should be defaulted to null.', () => { diff --git a/client/state/selectors/test/get-connected-applications.js b/client/state/selectors/test/get-connected-applications.js index 9d14e08173a85..3a49e043ae1ac 100644 --- a/client/state/selectors/test/get-connected-applications.js +++ b/client/state/selectors/test/get-connected-applications.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getConnectedApplications } from 'state/selectors'; +import getConnectedApplications from 'state/selectors/get-connected-applications'; describe( 'getConnectedApplications()', () => { test( 'should return connected applications of the current user', () => { diff --git a/client/state/selectors/test/get-current-locale-variant.js b/client/state/selectors/test/get-current-locale-variant.js index 6a72727ba25bb..edcf4bbb8f46c 100644 --- a/client/state/selectors/test/get-current-locale-variant.js +++ b/client/state/selectors/test/get-current-locale-variant.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getCurrentLocaleVariant } from 'state/selectors'; +import getCurrentLocaleVariant from 'state/selectors/get-current-locale-variant'; describe( 'getCurrentLocaleVariant()', () => { test( 'should return null as default', () => { diff --git a/client/state/selectors/test/get-current-plan-purchase-id.js b/client/state/selectors/test/get-current-plan-purchase-id.js index 625eef24707ba..e59eb551a7c0e 100644 --- a/client/state/selectors/test/get-current-plan-purchase-id.js +++ b/client/state/selectors/test/get-current-plan-purchase-id.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getCurrentPlanPurchaseId } from 'state/selectors'; +import getCurrentPlanPurchaseId from 'state/selectors/get-current-plan-purchase-id'; describe( 'getCurrentPlanPurchaseId()', () => { it( 'should return null if the site is unknown', () => { diff --git a/client/state/selectors/test/get-current-user-payment-methods.js b/client/state/selectors/test/get-current-user-payment-methods.js index a05c06f20d88c..49732b6486f97 100644 --- a/client/state/selectors/test/get-current-user-payment-methods.js +++ b/client/state/selectors/test/get-current-user-payment-methods.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { update } from 'state/data-layer/http-data'; -import { getCurrentUserPaymentMethods } from 'state/selectors'; +import getCurrentUserPaymentMethods from 'state/selectors/get-current-user-payment-methods'; describe( 'getCurrentUserPaymentMethods()', () => { const enLangUsCountryState = { diff --git a/client/state/selectors/test/get-filtered-billing-transactions.js b/client/state/selectors/test/get-filtered-billing-transactions.js index 52be23b44a2bf..89429b40de112 100644 --- a/client/state/selectors/test/get-filtered-billing-transactions.js +++ b/client/state/selectors/test/get-filtered-billing-transactions.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getFilteredBillingTransactions } from 'state/selectors'; +import getFilteredBillingTransactions from 'state/selectors/get-filtered-billing-transactions'; describe( 'getBillingTransactionAppFilterValues()', () => { const PAGE_SIZE = 5; diff --git a/client/state/selectors/test/get-google-my-business-stats.js b/client/state/selectors/test/get-google-my-business-stats.js index c19663d021730..f7503dbc27c5e 100644 --- a/client/state/selectors/test/get-google-my-business-stats.js +++ b/client/state/selectors/test/get-google-my-business-stats.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getGoogleMyBusinessStats } from 'state/selectors'; +import getGoogleMyBusinessStats from 'state/selectors/get-google-my-business-stats'; describe( 'getGoogleMyBusinessStats', () => { test( 'should return null if data not available', () => { diff --git a/client/state/selectors/test/get-image-editor-is-greater-than-minimum-dimensions.js b/client/state/selectors/test/get-image-editor-is-greater-than-minimum-dimensions.js index 947a3fa26102c..c48e00b5017d0 100644 --- a/client/state/selectors/test/get-image-editor-is-greater-than-minimum-dimensions.js +++ b/client/state/selectors/test/get-image-editor-is-greater-than-minimum-dimensions.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getImageEditorIsGreaterThanMinimumDimensions } from 'state/selectors'; +import getImageEditorIsGreaterThanMinimumDimensions from 'state/selectors/get-image-editor-is-greater-than-minimum-dimensions'; describe( 'getImageEditorIsGreaterThanMinimumDimensions()', () => { test( 'should return false if the image has not loaded yet and therefore originalAspectRatio not set', () => { diff --git a/client/state/selectors/test/get-image-editor-original-aspect-ratio.js b/client/state/selectors/test/get-image-editor-original-aspect-ratio.js index 89cf5a47af203..68fa3e53a6a82 100644 --- a/client/state/selectors/test/get-image-editor-original-aspect-ratio.js +++ b/client/state/selectors/test/get-image-editor-original-aspect-ratio.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getImageEditorOriginalAspectRatio } from 'state/selectors'; +import getImageEditorOriginalAspectRatio from 'state/selectors/get-image-editor-original-aspect-ratio'; describe( 'getImageEditorOriginalAspectRatio()', () => { test( 'should return null if the image has not loaded yet', () => { diff --git a/client/state/selectors/test/get-jetpack-connection-status.js b/client/state/selectors/test/get-jetpack-connection-status.js index 307edf30f7e92..4e5a423c81608 100644 --- a/client/state/selectors/test/get-jetpack-connection-status.js +++ b/client/state/selectors/test/get-jetpack-connection-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackConnectionStatus } from 'state/selectors'; +import getJetpackConnectionStatus from 'state/selectors/get-jetpack-connection-status'; import { items as ITEMS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'getJetpackConnectionStatus()', () => { diff --git a/client/state/selectors/test/get-jetpack-jumpstart-status.js b/client/state/selectors/test/get-jetpack-jumpstart-status.js index 0fe728564cece..c72af90856c0f 100644 --- a/client/state/selectors/test/get-jetpack-jumpstart-status.js +++ b/client/state/selectors/test/get-jetpack-jumpstart-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackJumpstartStatus } from 'state/selectors'; +import getJetpackJumpstartStatus from 'state/selectors/get-jetpack-jumpstart-status'; import { items as ITEMS_FIXTURE } from './fixtures/jetpack-jumpstart'; describe( 'getJetpackJumpstartStatus()', () => { diff --git a/client/state/selectors/test/get-jetpack-module.js b/client/state/selectors/test/get-jetpack-module.js index 5fcff7ec6cb61..36bcc3a7ff981 100644 --- a/client/state/selectors/test/get-jetpack-module.js +++ b/client/state/selectors/test/get-jetpack-module.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackModule } from 'state/selectors'; +import getJetpackModule from 'state/selectors/get-jetpack-module'; import { moduleData as MODULE_DATA_FIXTURE } from './fixtures/jetpack-modules'; describe( 'getJetpackModule()', () => { diff --git a/client/state/selectors/test/get-jetpack-modules-requiring-connection.js b/client/state/selectors/test/get-jetpack-modules-requiring-connection.js index 3692defaf65d9..d5e5b08134d3f 100644 --- a/client/state/selectors/test/get-jetpack-modules-requiring-connection.js +++ b/client/state/selectors/test/get-jetpack-modules-requiring-connection.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackModulesRequiringConnection } from 'state/selectors'; +import getJetpackModulesRequiringConnection from 'state/selectors/get-jetpack-modules-requiring-connection'; describe( 'getJetpackModulesRequiringConnection()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/get-jetpack-modules.js b/client/state/selectors/test/get-jetpack-modules.js index 9de2ece63cf4e..ff23f8a3493f2 100644 --- a/client/state/selectors/test/get-jetpack-modules.js +++ b/client/state/selectors/test/get-jetpack-modules.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackModules } from 'state/selectors'; +import getJetpackModules from 'state/selectors/get-jetpack-modules'; import { moduleData as MODULE_DATA_FIXTURE } from './fixtures/jetpack-modules'; describe( 'getJetpackModules()', () => { diff --git a/client/state/selectors/test/get-jetpack-onboarding-completed-steps.js b/client/state/selectors/test/get-jetpack-onboarding-completed-steps.js index 62b2ed218c46c..af69a285e2285 100644 --- a/client/state/selectors/test/get-jetpack-onboarding-completed-steps.js +++ b/client/state/selectors/test/get-jetpack-onboarding-completed-steps.js @@ -4,10 +4,8 @@ * Internal dependencies */ import { JETPACK_ONBOARDING_STEPS as STEPS } from 'jetpack-onboarding/constants'; -import { - getJetpackOnboardingCompletedSteps, - isJetpackOnboardingStepCompleted, -} from 'state/selectors'; +import getJetpackOnboardingCompletedSteps from 'state/selectors/get-jetpack-onboarding-completed-steps'; +import isJetpackOnboardingStepCompleted from 'state/selectors/is-jetpack-onboarding-step-completed'; describe( 'getJetpackOnboardingCompletedSteps()', () => { test( 'should return onboading progress for the specified steps', () => { diff --git a/client/state/selectors/test/get-jetpack-onboarding-pending-steps.js b/client/state/selectors/test/get-jetpack-onboarding-pending-steps.js index 4a7872a05822b..b291803654790 100644 --- a/client/state/selectors/test/get-jetpack-onboarding-pending-steps.js +++ b/client/state/selectors/test/get-jetpack-onboarding-pending-steps.js @@ -4,7 +4,7 @@ * Internal dependencies */ import { JETPACK_ONBOARDING_STEPS as STEPS } from 'jetpack-onboarding/constants'; -import { getJetpackOnboardingPendingSteps } from 'state/selectors'; +import getJetpackOnboardingPendingSteps from 'state/selectors/get-jetpack-onboarding-pending-steps'; import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; diff --git a/client/state/selectors/test/get-jetpack-onboarding-settings.js b/client/state/selectors/test/get-jetpack-onboarding-settings.js index 59a727d6f2994..1f38a1c2f6327 100644 --- a/client/state/selectors/test/get-jetpack-onboarding-settings.js +++ b/client/state/selectors/test/get-jetpack-onboarding-settings.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJetpackOnboardingSettings } from 'state/selectors'; +import getJetpackOnboardingSettings from 'state/selectors/get-jetpack-onboarding-settings'; describe( '#getJetpackOnboardingSettings()', () => { const onboardingSettings = { diff --git a/client/state/selectors/test/get-jetpack-remote-install-error-code.js b/client/state/selectors/test/get-jetpack-remote-install-error-code.js index fce5b40f183ef..cd4a15e8e8b98 100644 --- a/client/state/selectors/test/get-jetpack-remote-install-error-code.js +++ b/client/state/selectors/test/get-jetpack-remote-install-error-code.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJetpackRemoteInstallErrorCode } from 'state/selectors'; +import getJetpackRemoteInstallErrorCode from 'state/selectors/get-jetpack-remote-install-error-code'; const url = 'https://yourgroovydomain.com'; diff --git a/client/state/selectors/test/get-jetpack-remote-install-error-message.js b/client/state/selectors/test/get-jetpack-remote-install-error-message.js index 18d6b2fb26810..ef7a22e2e01a8 100644 --- a/client/state/selectors/test/get-jetpack-remote-install-error-message.js +++ b/client/state/selectors/test/get-jetpack-remote-install-error-message.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJetpackRemoteInstallErrorMessage } from 'state/selectors'; +import getJetpackRemoteInstallErrorMessage from 'state/selectors/get-jetpack-remote-install-error-message'; const url = 'https://yourgroovydomain.com'; diff --git a/client/state/selectors/test/get-jetpack-setting.js b/client/state/selectors/test/get-jetpack-setting.js index 98de3240f4777..ab0c9f149dded 100644 --- a/client/state/selectors/test/get-jetpack-setting.js +++ b/client/state/selectors/test/get-jetpack-setting.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackSetting } from 'state/selectors'; +import getJetpackSetting from 'state/selectors/get-jetpack-setting'; import { settings as SETTINGS_FIXTURE } from './fixtures/jetpack-settings'; describe( 'getJetpackSetting()', () => { diff --git a/client/state/selectors/test/get-jetpack-settings-save-request-status.js b/client/state/selectors/test/get-jetpack-settings-save-request-status.js index 7c2a5f2230cb7..8dccf11f303cb 100644 --- a/client/state/selectors/test/get-jetpack-settings-save-request-status.js +++ b/client/state/selectors/test/get-jetpack-settings-save-request-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackSettingsSaveRequestStatus } from 'state/selectors'; +import getJetpackSettingsSaveRequestStatus from 'state/selectors/get-jetpack-settings-save-request-status'; import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; import { settings as SETTINGS_FIXTURE } from './fixtures/jetpack-settings'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; diff --git a/client/state/selectors/test/get-jetpack-settings.js b/client/state/selectors/test/get-jetpack-settings.js index 14eeecf3f2259..9eeaa1b9d9263 100644 --- a/client/state/selectors/test/get-jetpack-settings.js +++ b/client/state/selectors/test/get-jetpack-settings.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJetpackSettings } from 'state/selectors'; +import getJetpackSettings from 'state/selectors/get-jetpack-settings'; import { settings as SETTINGS_FIXTURE } from './fixtures/jetpack-settings'; describe( 'getJetpackSettings()', () => { diff --git a/client/state/selectors/test/get-jetpack-sites.js b/client/state/selectors/test/get-jetpack-sites.js index c756548e1099d..2ff592aa437cc 100644 --- a/client/state/selectors/test/get-jetpack-sites.js +++ b/client/state/selectors/test/get-jetpack-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackSites } from 'state/selectors'; +import getJetpackSites from 'state/selectors/get-jetpack-sites'; import { userState } from './fixtures/user-state'; describe( 'getJetpackSites()', () => { diff --git a/client/state/selectors/test/get-jetpack-user-connection.js b/client/state/selectors/test/get-jetpack-user-connection.js index 39fc65f72a62b..8b66138143fab 100644 --- a/client/state/selectors/test/get-jetpack-user-connection.js +++ b/client/state/selectors/test/get-jetpack-user-connection.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getJetpackUserConnection } from 'state/selectors'; +import getJetpackUserConnection from 'state/selectors/get-jetpack-user-connection'; import { dataItems } from './fixtures/jetpack-connection'; describe( 'getJetpackUserConnection()', () => { diff --git a/client/state/selectors/test/get-jpo-user-hash.js b/client/state/selectors/test/get-jpo-user-hash.js index f7e2fff537a9b..274c31e478165 100644 --- a/client/state/selectors/test/get-jpo-user-hash.js +++ b/client/state/selectors/test/get-jpo-user-hash.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getJpoUserHash } from 'state/selectors'; +import getJpoUserHash from 'state/selectors/get-jpo-user-hash'; describe( '#getJpoUserHash()', () => { const userEmail = 'contact@yourgroovydomain.com'; diff --git a/client/state/selectors/test/get-locale-suggestions.js b/client/state/selectors/test/get-locale-suggestions.js index a149f3ee346e3..0d2ee7fc45b8c 100644 --- a/client/state/selectors/test/get-locale-suggestions.js +++ b/client/state/selectors/test/get-locale-suggestions.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getLocaleSuggestions } from 'state/selectors'; +import getLocaleSuggestions from 'state/selectors/get-locale-suggestions'; describe( 'getLocaleSuggestions()', () => { test( 'should return null if no items found', () => { diff --git a/client/state/selectors/test/get-localized-language-names.js b/client/state/selectors/test/get-localized-language-names.js index 73eca42aba3af..77993bfe7a5f9 100644 --- a/client/state/selectors/test/get-localized-language-names.js +++ b/client/state/selectors/test/get-localized-language-names.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getLocalizedLanguageNames } from 'state/selectors'; +import getLocalizedLanguageNames from 'state/selectors/get-localized-language-names'; describe( 'getLocalizedLanguageNames()', () => { test( 'should return', () => { diff --git a/client/state/selectors/test/get-magic-login-current-view.js b/client/state/selectors/test/get-magic-login-current-view.js index aaca3ba80b656..cf1ca4c71bd98 100644 --- a/client/state/selectors/test/get-magic-login-current-view.js +++ b/client/state/selectors/test/get-magic-login-current-view.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMagicLoginCurrentView } from 'state/selectors'; +import getMagicLoginCurrentView from 'state/selectors/get-magic-login-current-view'; describe( 'getMagicLoginCurrentView()', () => { test( 'should return null if there is no information yet', () => { diff --git a/client/state/selectors/test/get-magic-login-request-auth-error.js b/client/state/selectors/test/get-magic-login-request-auth-error.js index 0356381c2e4ae..ce7b90014de7c 100644 --- a/client/state/selectors/test/get-magic-login-request-auth-error.js +++ b/client/state/selectors/test/get-magic-login-request-auth-error.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMagicLoginRequestAuthError } from 'state/selectors'; +import getMagicLoginRequestAuthError from 'state/selectors/get-magic-login-request-auth-error'; describe( 'getMagicLoginRequestAuthError()', () => { test( 'should return null if there is no information yet', () => { diff --git a/client/state/selectors/test/get-magic-login-request-email-error.js b/client/state/selectors/test/get-magic-login-request-email-error.js index f115190bdf152..58a0aa5a67633 100644 --- a/client/state/selectors/test/get-magic-login-request-email-error.js +++ b/client/state/selectors/test/get-magic-login-request-email-error.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMagicLoginRequestEmailError } from 'state/selectors'; +import getMagicLoginRequestEmailError from 'state/selectors/get-magic-login-request-email-error'; describe( 'getMagicLoginRequestEmailError()', () => { test( 'should return null if there is no information yet', () => { diff --git a/client/state/selectors/test/get-magic-login-requested-auth-successfully.js b/client/state/selectors/test/get-magic-login-requested-auth-successfully.js index fb1b1b21f9862..b9723e1c236d5 100644 --- a/client/state/selectors/test/get-magic-login-requested-auth-successfully.js +++ b/client/state/selectors/test/get-magic-login-requested-auth-successfully.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMagicLoginRequestedAuthSuccessfully } from 'state/selectors'; +import getMagicLoginRequestedAuthSuccessfully from 'state/selectors/get-magic-login-requested-auth-successfully'; describe( 'getMagicLoginRequestedAuthSuccessfully()', () => { test( 'should return false if there is no information yet', () => { diff --git a/client/state/selectors/test/get-magic-login-requested-email-successfully.js b/client/state/selectors/test/get-magic-login-requested-email-successfully.js index 42d0f23855b6b..530693c6be590 100644 --- a/client/state/selectors/test/get-magic-login-requested-email-successfully.js +++ b/client/state/selectors/test/get-magic-login-requested-email-successfully.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMagicLoginRequestedEmailSuccessfully } from 'state/selectors'; +import getMagicLoginRequestedEmailSuccessfully from 'state/selectors/get-magic-login-requested-email-successfully'; describe( 'getMagicLoginRequestedEmailSuccessfully()', () => { test( 'should return false if there is no information yet', () => { diff --git a/client/state/selectors/test/get-media-item.js b/client/state/selectors/test/get-media-item.js index f3b97971f12f2..b6f9231438b34 100644 --- a/client/state/selectors/test/get-media-item.js +++ b/client/state/selectors/test/get-media-item.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMediaItem } from 'state/selectors'; +import getMediaItem from 'state/selectors/get-media-item'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'getMediaItem()', () => { diff --git a/client/state/selectors/test/get-media-storage-limit.js b/client/state/selectors/test/get-media-storage-limit.js index 5acd00f2beb59..6ec75f0abf296 100644 --- a/client/state/selectors/test/get-media-storage-limit.js +++ b/client/state/selectors/test/get-media-storage-limit.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMediaStorageLimit } from 'state/selectors'; +import getMediaStorageLimit from 'state/selectors/get-media-storage-limit'; describe( 'getMediaStorageLimit()', () => { test( 'should return null if the site is unknown', () => { diff --git a/client/state/selectors/test/get-media-storage-used.js b/client/state/selectors/test/get-media-storage-used.js index c213bf1fff373..ef65b9c181329 100644 --- a/client/state/selectors/test/get-media-storage-used.js +++ b/client/state/selectors/test/get-media-storage-used.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMediaStorageUsed } from 'state/selectors'; +import getMediaStorageUsed from 'state/selectors/get-media-storage-used'; describe( 'getMediaStorageUsed()', () => { test( 'should return null if the site is unknown', () => { diff --git a/client/state/selectors/test/get-media-url.js b/client/state/selectors/test/get-media-url.js index 52c46d4b660d7..1c329ed67c894 100644 --- a/client/state/selectors/test/get-media-url.js +++ b/client/state/selectors/test/get-media-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMediaUrl } from 'state/selectors'; +import getMediaUrl from 'state/selectors/get-media-url'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'getMediaUrl()', () => { diff --git a/client/state/selectors/test/get-media.js b/client/state/selectors/test/get-media.js index 590ab96ddb3a8..75b749f0c1246 100644 --- a/client/state/selectors/test/get-media.js +++ b/client/state/selectors/test/get-media.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMedia } from 'state/selectors'; +import getMedia from 'state/selectors/get-media'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'getMedia()', () => { diff --git a/client/state/selectors/test/get-menu-item-types.js b/client/state/selectors/test/get-menu-item-types.js index 17e9d72099943..caea6daec691b 100644 --- a/client/state/selectors/test/get-menu-item-types.js +++ b/client/state/selectors/test/get-menu-item-types.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMenuItemTypes } from 'state/selectors'; +import getMenuItemTypes from 'state/selectors/get-menu-item-types'; describe( 'getMenuItemTypes()', () => { const defaultItems = [ diff --git a/client/state/selectors/test/get-menus-url.js b/client/state/selectors/test/get-menus-url.js index 164599e9d84ea..8a6dc0aed5798 100644 --- a/client/state/selectors/test/get-menus-url.js +++ b/client/state/selectors/test/get-menus-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getMenusUrl } from 'state/selectors'; +import getMenusUrl from 'state/selectors/get-menus-url'; const state = { currentUser: { diff --git a/client/state/selectors/test/get-network-sites.js b/client/state/selectors/test/get-network-sites.js index 678709a639067..ae9a604c533b9 100644 --- a/client/state/selectors/test/get-network-sites.js +++ b/client/state/selectors/test/get-network-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getNetworkSites } from 'state/selectors'; +import getNetworkSites from 'state/selectors/get-network-sites'; import { userState } from './fixtures/user-state'; describe( 'getNetworkSites()', () => { diff --git a/client/state/selectors/test/get-new-application-password.js b/client/state/selectors/test/get-new-application-password.js index 8d5cd24d61d5a..2b523a8743b8f 100644 --- a/client/state/selectors/test/get-new-application-password.js +++ b/client/state/selectors/test/get-new-application-password.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getNewApplicationPassword } from 'state/selectors'; +import getNewApplicationPassword from 'state/selectors/get-new-application-password'; describe( 'getNewApplicationPassword()', () => { test( 'should return the new application password if it exists', () => { diff --git a/client/state/selectors/test/get-newest-site.js b/client/state/selectors/test/get-newest-site.js index 63b728f83e3fc..454a535699f5a 100644 --- a/client/state/selectors/test/get-newest-site.js +++ b/client/state/selectors/test/get-newest-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getNewestSite } from 'state/selectors'; +import getNewestSite from 'state/selectors/get-newest-site'; const site = { ID: 2916288, name: 'WordPress.com Example Blog' }; const currentUserState = { diff --git a/client/state/selectors/test/get-order-transaction-error.js b/client/state/selectors/test/get-order-transaction-error.js index cb6bba15a6655..5743e98be2259 100644 --- a/client/state/selectors/test/get-order-transaction-error.js +++ b/client/state/selectors/test/get-order-transaction-error.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getOrderTransactionError } from 'state/selectors'; +import getOrderTransactionError from 'state/selectors/get-order-transaction-error'; describe( 'getOrderTransactionError()', () => { const orderId = 123; diff --git a/client/state/selectors/test/get-order-transaction.js b/client/state/selectors/test/get-order-transaction.js index a36927245f0a2..ee91919963a1e 100644 --- a/client/state/selectors/test/get-order-transaction.js +++ b/client/state/selectors/test/get-order-transaction.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getOrderTransaction } from 'state/selectors'; +import getOrderTransaction from 'state/selectors/get-order-transaction'; describe( 'getOrderTransaction()', () => { test( 'should default to null', () => { diff --git a/client/state/selectors/test/get-original-user-setting.js b/client/state/selectors/test/get-original-user-setting.js index 5ca192ed1ca75..d9740350b4dac 100644 --- a/client/state/selectors/test/get-original-user-setting.js +++ b/client/state/selectors/test/get-original-user-setting.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getOriginalUserSetting } from 'state/selectors'; +import getOriginalUserSetting from 'state/selectors/get-original-user-setting'; describe( 'getOriginalUserSetting()', () => { test( 'should return null if the server values were not received yet', () => { diff --git a/client/state/selectors/test/get-parent-comment.js b/client/state/selectors/test/get-parent-comment.js index 691af34e34619..cb1c4151798c7 100644 --- a/client/state/selectors/test/get-parent-comment.js +++ b/client/state/selectors/test/get-parent-comment.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getParentComment } from 'state/selectors'; +import getParentComment from 'state/selectors/get-parent-comment'; const state = { comments: { diff --git a/client/state/selectors/test/get-partner-id-from-query.js b/client/state/selectors/test/get-partner-id-from-query.js index d9ef11316aaa6..d954e8f5c5e63 100644 --- a/client/state/selectors/test/get-partner-id-from-query.js +++ b/client/state/selectors/test/get-partner-id-from-query.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getPartnerIdFromQuery } from 'state/selectors'; +import getPartnerIdFromQuery from 'state/selectors/get-partner-id-from-query'; describe( '#getPartnerIdFromQuery', () => { test( 'should return null when no argument', () => { diff --git a/client/state/selectors/test/get-partner-slug-from-query.js b/client/state/selectors/test/get-partner-slug-from-query.js index 21815d4290a2b..0ee6a11e2f4ad 100644 --- a/client/state/selectors/test/get-partner-slug-from-query.js +++ b/client/state/selectors/test/get-partner-slug-from-query.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getPartnerSlugFromQuery } from 'state/selectors'; +import getPartnerSlugFromQuery from 'state/selectors/get-partner-slug-from-query'; describe( '#getPartnerSlugFromQuery', () => { test( 'should return null when no argument', () => { diff --git a/client/state/selectors/test/get-past-billing-transaction.js b/client/state/selectors/test/get-past-billing-transaction.js index 1d58efbd8d8c7..4aea4b3c82760 100644 --- a/client/state/selectors/test/get-past-billing-transaction.js +++ b/client/state/selectors/test/get-past-billing-transaction.js @@ -8,7 +8,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getPastBillingTransaction } from 'state/selectors'; +import getPastBillingTransaction from 'state/selectors/get-past-billing-transaction'; describe( 'getPastBillingTransaction()', () => { const state = { diff --git a/client/state/selectors/test/get-past-billing-transactions.js b/client/state/selectors/test/get-past-billing-transactions.js index 84fdf947e3533..a034318c04d07 100644 --- a/client/state/selectors/test/get-past-billing-transactions.js +++ b/client/state/selectors/test/get-past-billing-transactions.js @@ -9,7 +9,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getPastBillingTransactions } from 'state/selectors'; +import getPastBillingTransactions from 'state/selectors/get-past-billing-transactions'; describe( 'getPastBillingTransactions()', () => { test( 'should return the past billing transactions', () => { diff --git a/client/state/selectors/test/get-payment-country-code.js b/client/state/selectors/test/get-payment-country-code.js index b2cee9e868b19..93e472a1a9a9e 100644 --- a/client/state/selectors/test/get-payment-country-code.js +++ b/client/state/selectors/test/get-payment-country-code.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getPaymentCountryCode } from 'state/selectors'; +import getPaymentCountryCode from 'state/selectors/get-payment-country-code'; describe( 'getPaymentCountryCode()', () => { test( 'should return null if there is no payment country available', () => { diff --git a/client/state/selectors/test/get-plugin-upload-error.js b/client/state/selectors/test/get-plugin-upload-error.js index dd9366cee0f97..f43a74a2ba7f3 100644 --- a/client/state/selectors/test/get-plugin-upload-error.js +++ b/client/state/selectors/test/get-plugin-upload-error.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPluginUploadError } from 'state/selectors'; +import getPluginUploadError from 'state/selectors/get-plugin-upload-error'; const siteId = 77203074; const error = { diff --git a/client/state/selectors/test/get-plugin-upload-progress.js b/client/state/selectors/test/get-plugin-upload-progress.js index 87dc88f351549..3e640d6ccef2f 100644 --- a/client/state/selectors/test/get-plugin-upload-progress.js +++ b/client/state/selectors/test/get-plugin-upload-progress.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPluginUploadProgress } from 'state/selectors'; +import getPluginUploadProgress from 'state/selectors/get-plugin-upload-progress'; const siteId = 77203074; diff --git a/client/state/selectors/test/get-post-likes.js b/client/state/selectors/test/get-post-likes.js index b68c8316e8dbc..a9d19e76818f7 100644 --- a/client/state/selectors/test/get-post-likes.js +++ b/client/state/selectors/test/get-post-likes.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPostLikes } from 'state/selectors'; +import getPostLikes from 'state/selectors/get-post-likes'; describe( 'getPostLikes()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/get-poster-upload-progress.js b/client/state/selectors/test/get-poster-upload-progress.js index 300606af185f2..7d00a84e50639 100644 --- a/client/state/selectors/test/get-poster-upload-progress.js +++ b/client/state/selectors/test/get-poster-upload-progress.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPosterUploadProgress } from 'state/selectors'; +import getPosterUploadProgress from 'state/selectors/get-poster-upload-progress'; describe( 'getPosterUploadProgress()', () => { test( 'should return the upload progress', () => { diff --git a/client/state/selectors/test/get-poster-url.js b/client/state/selectors/test/get-poster-url.js index 7a29fd5fe8220..80b45b565f0a3 100644 --- a/client/state/selectors/test/get-poster-url.js +++ b/client/state/selectors/test/get-poster-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPosterUrl } from 'state/selectors'; +import getPosterUrl from 'state/selectors/get-poster-url'; describe( 'getPosterUrl()', () => { test( 'should return the current video editor poster', () => { diff --git a/client/state/selectors/test/get-primary-site-id.js b/client/state/selectors/test/get-primary-site-id.js index b8f1f7a3884c2..805a5de7930b7 100644 --- a/client/state/selectors/test/get-primary-site-id.js +++ b/client/state/selectors/test/get-primary-site-id.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPrimarySiteId } from 'state/selectors'; +import getPrimarySiteId from 'state/selectors/get-primary-site-id'; describe( 'getPrimarySiteId()', () => { test( 'should return null if there is no current user', () => { diff --git a/client/state/selectors/test/get-profile-links-error-type.js b/client/state/selectors/test/get-profile-links-error-type.js index 916a90694160d..65ab14410bf03 100644 --- a/client/state/selectors/test/get-profile-links-error-type.js +++ b/client/state/selectors/test/get-profile-links-error-type.js @@ -2,7 +2,7 @@ /** * Internal dependencies */ -import { getProfileLinksErrorType } from 'state/selectors'; +import getProfileLinksErrorType from 'state/selectors/get-profile-links-error-type'; describe( 'getProfileLinksErrorType()', () => { const profileLinks = [ diff --git a/client/state/selectors/test/get-profile-links.js b/client/state/selectors/test/get-profile-links.js index 9144bd44fdea6..3f806f9292198 100644 --- a/client/state/selectors/test/get-profile-links.js +++ b/client/state/selectors/test/get-profile-links.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getProfileLinks } from 'state/selectors'; +import getProfileLinks from 'state/selectors/get-profile-links'; describe( 'getProfileLinks()', () => { const profileLinks = [ diff --git a/client/state/selectors/test/get-public-sites.js b/client/state/selectors/test/get-public-sites.js index 60c70c61dec08..8e8dbd7858f88 100644 --- a/client/state/selectors/test/get-public-sites.js +++ b/client/state/selectors/test/get-public-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getPublicSites } from 'state/selectors'; +import getPublicSites from 'state/selectors/get-public-sites'; import { userState } from './fixtures/user-state'; describe( 'getPublicSites()', () => { diff --git a/client/state/selectors/test/get-raw-offsets.js b/client/state/selectors/test/get-raw-offsets.js index 416a1c7e5db17..ded665065e32b 100644 --- a/client/state/selectors/test/get-raw-offsets.js +++ b/client/state/selectors/test/get-raw-offsets.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getRawOffsets } from 'state/selectors'; +import getRawOffsets from 'state/selectors/get-raw-offsets'; describe( 'getRawOffsets()', () => { test( "should return null if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-reader-aliased-follow-feed-url.js b/client/state/selectors/test/get-reader-aliased-follow-feed-url.js index 87804f9fcb152..a45d78b71fb68 100644 --- a/client/state/selectors/test/get-reader-aliased-follow-feed-url.js +++ b/client/state/selectors/test/get-reader-aliased-follow-feed-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getReaderAliasedFollowFeedUrl } from 'state/selectors'; +import getReaderAliasedFollowFeedUrl from 'state/selectors/get-reader-aliased-follow-feed-url'; const site1UrlKey = 'discover.wordpress.com'; const site1Aliases = [ 'site1 alias!', 'site1 second alias!' ]; diff --git a/client/state/selectors/test/get-reader-conversation-follow-status.js b/client/state/selectors/test/get-reader-conversation-follow-status.js index 007bf56a851f4..4759c53af9711 100644 --- a/client/state/selectors/test/get-reader-conversation-follow-status.js +++ b/client/state/selectors/test/get-reader-conversation-follow-status.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getReaderConversationFollowStatus } from 'state/selectors'; +import getReaderConversationFollowStatus from 'state/selectors/get-reader-conversation-follow-status'; describe( 'getReaderConversationFollowStatus()', () => { test( 'should return F for a known followed post', () => { diff --git a/client/state/selectors/test/get-reader-follows.js b/client/state/selectors/test/get-reader-follows.js index c8a3f170cb17d..f8330f9fff525 100644 --- a/client/state/selectors/test/get-reader-follows.js +++ b/client/state/selectors/test/get-reader-follows.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { getReaderFollows } from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; import { userState } from './fixtures/user-state'; describe( 'getReaderFollows()', () => { diff --git a/client/state/selectors/test/get-reader-stream-offset-item.js b/client/state/selectors/test/get-reader-stream-offset-item.js index 9091fb69caf29..b2a0cc0d89a08 100644 --- a/client/state/selectors/test/get-reader-stream-offset-item.js +++ b/client/state/selectors/test/get-reader-stream-offset-item.js @@ -7,7 +7,7 @@ import freeze from 'deep-freeze'; /** * Internal Dependencies */ -import { getReaderStreamOffsetItem as getOffsetItem } from 'state/selectors'; +import getOffsetItem from 'state/selectors/get-reader-stream-offset-item'; jest.mock( 'lib/user/utils', () => ( { getLocaleSlug: () => 'en' } ) ); jest.mock( 'reader/stream/utils' ); diff --git a/client/state/selectors/test/get-reader-stream-should-request-recommendations.js b/client/state/selectors/test/get-reader-stream-should-request-recommendations.js index 983813ea77e2d..7a87619261e1d 100644 --- a/client/state/selectors/test/get-reader-stream-should-request-recommendations.js +++ b/client/state/selectors/test/get-reader-stream-should-request-recommendations.js @@ -7,10 +7,9 @@ import _ from 'lodash'; /** * Internal Dependencies */ -import { - getReaderStreamShouldRequestRecommendations as shouldRequestRecs, - getReaderFollows, -} from 'state/selectors'; +import getReaderFollows from 'state/selectors/get-reader-follows'; + +import shouldRequestRecs from 'state/selectors/get-reader-stream-should-request-recommendations'; import { getDistanceBetweenRecs } from 'reader/stream/utils'; jest.mock( 'lib/user/utils', () => ( { getLocaleSlug: () => 'en' } ) ); diff --git a/client/state/selectors/test/get-restore-error.js b/client/state/selectors/test/get-restore-error.js index 0f5d974e8f97d..3cfff4e108024 100644 --- a/client/state/selectors/test/get-restore-error.js +++ b/client/state/selectors/test/get-restore-error.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getRestoreError } from 'state/selectors'; +import getRestoreError from 'state/selectors/get-restore-error'; const SITE_ID = 1234; diff --git a/client/state/selectors/test/get-restore-progress.js b/client/state/selectors/test/get-restore-progress.js index bfd5afddafe19..a4d3dbf9c9b79 100644 --- a/client/state/selectors/test/get-restore-progress.js +++ b/client/state/selectors/test/get-restore-progress.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getRestoreProgress } from 'state/selectors'; +import getRestoreProgress from 'state/selectors/get-restore-progress'; const SITE_ID = 1234; diff --git a/client/state/selectors/test/get-selected-or-all-sites-jetpack-can-manage.js b/client/state/selectors/test/get-selected-or-all-sites-jetpack-can-manage.js index 91f041c279fe9..9f338e0e8deeb 100644 --- a/client/state/selectors/test/get-selected-or-all-sites-jetpack-can-manage.js +++ b/client/state/selectors/test/get-selected-or-all-sites-jetpack-can-manage.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSelectedOrAllSitesJetpackCanManage } from 'state/selectors'; +import getSelectedOrAllSitesJetpackCanManage from 'state/selectors/get-selected-or-all-sites-jetpack-can-manage'; import { userState } from './fixtures/user-state'; describe( 'getSelectedOrAllSitesJetpackCanManage()', () => { diff --git a/client/state/selectors/test/get-selected-or-all-sites-with-plugins.js b/client/state/selectors/test/get-selected-or-all-sites-with-plugins.js index 685566f255c41..62cfa9c203b5d 100644 --- a/client/state/selectors/test/get-selected-or-all-sites-with-plugins.js +++ b/client/state/selectors/test/get-selected-or-all-sites-with-plugins.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSelectedOrAllSitesWithPlugins } from 'state/selectors'; +import getSelectedOrAllSitesWithPlugins from 'state/selectors/get-selected-or-all-sites-with-plugins'; import { userState } from './fixtures/user-state'; describe( 'getSelectedOrAllSitesWithPlugins()', () => { diff --git a/client/state/selectors/test/get-selected-or-primary-site-id.js b/client/state/selectors/test/get-selected-or-primary-site-id.js index 0c8d3d336d2b2..ab92df5159382 100644 --- a/client/state/selectors/test/get-selected-or-primary-site-id.js +++ b/client/state/selectors/test/get-selected-or-primary-site-id.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSelectedOrPrimarySiteId } from 'state/selectors'; +import getSelectedOrPrimarySiteId from 'state/selectors/get-selected-or-primary-site-id'; describe( 'getSelectedOrPrimarySiteId()', () => { describe( 'with no current user', () => { diff --git a/client/state/selectors/test/get-sharing-buttons.js b/client/state/selectors/test/get-sharing-buttons.js index 1cec7627b0a92..32f1136bfdecb 100644 --- a/client/state/selectors/test/get-sharing-buttons.js +++ b/client/state/selectors/test/get-sharing-buttons.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSharingButtons } from 'state/selectors'; +import getSharingButtons from 'state/selectors/get-sharing-buttons'; describe( 'getSharingButtons()', () => { test( 'should return null if the site is not tracked', () => { diff --git a/client/state/selectors/test/get-simple-payments.js b/client/state/selectors/test/get-simple-payments.js index 354d304fcc029..d5bf6bd1a3482 100644 --- a/client/state/selectors/test/get-simple-payments.js +++ b/client/state/selectors/test/get-simple-payments.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSimplePayments } from 'state/selectors'; +import getSimplePayments from 'state/selectors/get-simple-payments'; const simplePayment1 = { ID: 1, diff --git a/client/state/selectors/test/get-site-comment-counts.js b/client/state/selectors/test/get-site-comment-counts.js index fac394358de93..84831451d9369 100644 --- a/client/state/selectors/test/get-site-comment-counts.js +++ b/client/state/selectors/test/get-site-comment-counts.js @@ -7,7 +7,7 @@ /** * Internal dependencies */ -import { getSiteCommentCounts } from 'state/selectors'; +import getSiteCommentCounts from 'state/selectors/get-site-comment-counts'; describe( 'getSiteCommentCounts()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/get-site-connection-status.js b/client/state/selectors/test/get-site-connection-status.js index eeace370523d6..c3aea95886cf3 100644 --- a/client/state/selectors/test/get-site-connection-status.js +++ b/client/state/selectors/test/get-site-connection-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteConnectionStatus } from 'state/selectors'; +import getSiteConnectionStatus from 'state/selectors/get-site-connection-status'; describe( 'getSiteConnectionStatus()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/get-site-default-post-format.js b/client/state/selectors/test/get-site-default-post-format.js index c31b5ab5acb9e..c673cdcf19922 100644 --- a/client/state/selectors/test/get-site-default-post-format.js +++ b/client/state/selectors/test/get-site-default-post-format.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteDefaultPostFormat } from 'state/selectors'; +import getSiteDefaultPostFormat from 'state/selectors/get-site-default-post-format'; describe( 'getSiteDefaultPostFormat()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/get-site-gmt-offset.js b/client/state/selectors/test/get-site-gmt-offset.js index 9ad9549d90b96..cb9bcc3d2f9d8 100644 --- a/client/state/selectors/test/get-site-gmt-offset.js +++ b/client/state/selectors/test/get-site-gmt-offset.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteGmtOffset } from 'state/selectors'; +import getSiteGmtOffset from 'state/selectors/get-site-gmt-offset'; describe( 'getSiteGmtOffset()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/get-site-icon-id.js b/client/state/selectors/test/get-site-icon-id.js index b46a51e6fc8c0..b37bee74cfff7 100644 --- a/client/state/selectors/test/get-site-icon-id.js +++ b/client/state/selectors/test/get-site-icon-id.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteIconId } from 'state/selectors'; +import getSiteIconId from 'state/selectors/get-site-icon-id'; describe( 'getSiteIconId()', () => { test( 'should return null if neither the site nor settings are known', () => { diff --git a/client/state/selectors/test/get-site-icon-url.js b/client/state/selectors/test/get-site-icon-url.js index 9150faf487df6..254d0cf21edcc 100644 --- a/client/state/selectors/test/get-site-icon-url.js +++ b/client/state/selectors/test/get-site-icon-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteIconUrl } from 'state/selectors'; +import getSiteIconUrl from 'state/selectors/get-site-icon-url'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'getSiteIconUrl()', () => { diff --git a/client/state/selectors/test/get-site-monitor-settings.js b/client/state/selectors/test/get-site-monitor-settings.js index 2632440be11bb..8a9baebfebf7d 100644 --- a/client/state/selectors/test/get-site-monitor-settings.js +++ b/client/state/selectors/test/get-site-monitor-settings.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteMonitorSettings } from 'state/selectors'; +import getSiteMonitorSettings from 'state/selectors/get-site-monitor-settings'; describe( 'getSiteMonitorSettings()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/get-site-options.js b/client/state/selectors/test/get-site-options.js index 1a56b3790494d..9bb82ba512b57 100644 --- a/client/state/selectors/test/get-site-options.js +++ b/client/state/selectors/test/get-site-options.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteOptions } from 'state/selectors'; +import getSiteOptions from 'state/selectors/get-site-options'; import { userState } from './fixtures/user-state'; describe( 'getSiteOptions()', () => { diff --git a/client/state/selectors/test/get-site-setting.js b/client/state/selectors/test/get-site-setting.js index 929d460e5c961..4c3c862d1e46b 100644 --- a/client/state/selectors/test/get-site-setting.js +++ b/client/state/selectors/test/get-site-setting.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteSetting } from 'state/selectors'; +import getSiteSetting from 'state/selectors/get-site-setting'; describe( 'getSiteSettings()', () => { const state = { diff --git a/client/state/selectors/test/get-site-slugs-for-upcoming-transactions.js b/client/state/selectors/test/get-site-slugs-for-upcoming-transactions.js index 0845f419d5d90..76cb0a1f88067 100644 --- a/client/state/selectors/test/get-site-slugs-for-upcoming-transactions.js +++ b/client/state/selectors/test/get-site-slugs-for-upcoming-transactions.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteSlugsForUpcomingTransactions } from 'state/selectors'; +import getSiteSlugsForUpcomingTransactions from 'state/selectors/get-site-slugs-for-upcoming-transactions'; describe( 'getSiteSlugsForUpcomingTransactions()', () => { beforeEach( () => { diff --git a/client/state/selectors/test/get-site-stats-query-date.js b/client/state/selectors/test/get-site-stats-query-date.js index ef38df88a3c28..d710069db25d8 100644 --- a/client/state/selectors/test/get-site-stats-query-date.js +++ b/client/state/selectors/test/get-site-stats-query-date.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteStatsQueryDate } from 'state/selectors'; +import getSiteStatsQueryDate from 'state/selectors/get-site-stats-query-date'; describe( 'getSiteStatsQueryDate()', () => { test( 'should return undefined if no request exists', () => { diff --git a/client/state/selectors/test/get-site-stats-view-summary.js b/client/state/selectors/test/get-site-stats-view-summary.js index 7a22ff55ed37e..7c4447d861f11 100644 --- a/client/state/selectors/test/get-site-stats-view-summary.js +++ b/client/state/selectors/test/get-site-stats-view-summary.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteStatsViewSummary } from 'state/selectors'; +import getSiteStatsViewSummary from 'state/selectors/get-site-stats-view-summary'; describe( 'getSiteStatsViewSummary()', () => { test( 'should return null if no data exists', () => { diff --git a/client/state/selectors/test/get-site-timezone-name.js b/client/state/selectors/test/get-site-timezone-name.js index 2bc058c29fef1..d4e364d54a442 100644 --- a/client/state/selectors/test/get-site-timezone-name.js +++ b/client/state/selectors/test/get-site-timezone-name.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteTimezoneName } from 'state/selectors'; +import getSiteTimezoneName from 'state/selectors/get-site-timezone-name'; describe( 'getSiteTimezoneName()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/get-site-timezone-value.js b/client/state/selectors/test/get-site-timezone-value.js index 6ffd3de7f111f..e92aea9b0eb44 100644 --- a/client/state/selectors/test/get-site-timezone-value.js +++ b/client/state/selectors/test/get-site-timezone-value.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteTimezoneValue } from 'state/selectors'; +import getSiteTimezoneValue from 'state/selectors/get-site-timezone-value'; describe( 'getSiteTimezoneValue()', () => { test( 'should return null if the site has never been fetched', () => { diff --git a/client/state/selectors/test/get-site-url.js b/client/state/selectors/test/get-site-url.js index 45cc8d33b1c08..6a1fcf763f784 100644 --- a/client/state/selectors/test/get-site-url.js +++ b/client/state/selectors/test/get-site-url.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSiteUrl } from 'state/selectors'; +import getSiteUrl from 'state/selectors/get-site-url'; describe( 'getSiteUrl()', () => { test( 'should return null if the site is unknown', () => { diff --git a/client/state/selectors/test/get-sites-items.js b/client/state/selectors/test/get-sites-items.js index 3817ef3bfd387..ce373f4816861 100644 --- a/client/state/selectors/test/get-sites-items.js +++ b/client/state/selectors/test/get-sites-items.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; describe( 'getSitesItems()', () => { test( 'should return site items if sites exist', () => { diff --git a/client/state/selectors/test/get-sites.js b/client/state/selectors/test/get-sites.js index 7e8a974a2bc3b..6a31ce59aabac 100644 --- a/client/state/selectors/test/get-sites.js +++ b/client/state/selectors/test/get-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getSites } from 'state/selectors'; +import getSites from 'state/selectors/get-sites'; const currentUserState = { currentUser: { diff --git a/client/state/selectors/test/get-theme-filter-string-from-term.js b/client/state/selectors/test/get-theme-filter-string-from-term.js index 167932e102893..6dfc8a85f706c 100644 --- a/client/state/selectors/test/get-theme-filter-string-from-term.js +++ b/client/state/selectors/test/get-theme-filter-string-from-term.js @@ -8,7 +8,7 @@ import { assert } from 'chai'; /** * Internal dependencies */ -import { getThemeFilterStringFromTerm } from 'state/selectors'; +import getThemeFilterStringFromTerm from 'state/selectors/get-theme-filter-string-from-term'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterStringFromTerm', () => { diff --git a/client/state/selectors/test/get-theme-filter-term-from-string.js b/client/state/selectors/test/get-theme-filter-term-from-string.js index 8f1a2e3539980..aa7525d847920 100644 --- a/client/state/selectors/test/get-theme-filter-term-from-string.js +++ b/client/state/selectors/test/get-theme-filter-term-from-string.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeFilterTermFromString } from 'state/selectors'; +import getThemeFilterTermFromString from 'state/selectors/get-theme-filter-term-from-string'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterTermFromString()', () => { diff --git a/client/state/selectors/test/get-theme-filter-term.js b/client/state/selectors/test/get-theme-filter-term.js index 5d7fba98950c8..330df50def2c5 100644 --- a/client/state/selectors/test/get-theme-filter-term.js +++ b/client/state/selectors/test/get-theme-filter-term.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeFilterTerm } from 'state/selectors'; +import getThemeFilterTerm from 'state/selectors/get-theme-filter-term'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterTerm()', () => { diff --git a/client/state/selectors/test/get-theme-filter-terms-table.js b/client/state/selectors/test/get-theme-filter-terms-table.js index 83b178954871c..ff8053df21cce 100644 --- a/client/state/selectors/test/get-theme-filter-terms-table.js +++ b/client/state/selectors/test/get-theme-filter-terms-table.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { state } from './fixtures/theme-filters'; -import { getThemeFilterTermsTable } from 'state/selectors'; +import getThemeFilterTermsTable from 'state/selectors/get-theme-filter-terms-table'; describe( 'getThemeFilterTermsTable()', () => { test( 'should return a dictionary mapping terms to taxonomies', () => { diff --git a/client/state/selectors/test/get-theme-filter-terms.js b/client/state/selectors/test/get-theme-filter-terms.js index 5c58a35c563e9..f8cb13d98c143 100644 --- a/client/state/selectors/test/get-theme-filter-terms.js +++ b/client/state/selectors/test/get-theme-filter-terms.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeFilterTerms } from 'state/selectors'; +import getThemeFilterTerms from 'state/selectors/get-theme-filter-terms'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterTerms()', () => { diff --git a/client/state/selectors/test/get-theme-filter-to-term-table.js b/client/state/selectors/test/get-theme-filter-to-term-table.js index 666cbe0b04627..03861956be99a 100644 --- a/client/state/selectors/test/get-theme-filter-to-term-table.js +++ b/client/state/selectors/test/get-theme-filter-to-term-table.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeFilterToTermTable } from 'state/selectors'; +import getThemeFilterToTermTable from 'state/selectors/get-theme-filter-to-term-table'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterToTermTable()', () => { diff --git a/client/state/selectors/test/get-theme-filters.js b/client/state/selectors/test/get-theme-filters.js index 7c4f517db4e96..73b5b7b9d12a5 100644 --- a/client/state/selectors/test/get-theme-filters.js +++ b/client/state/selectors/test/get-theme-filters.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeFilters } from 'state/selectors'; +import getThemeFilters from 'state/selectors/get-theme-filters'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterTerms()', () => { diff --git a/client/state/selectors/test/get-theme-showcase-description.js b/client/state/selectors/test/get-theme-showcase-description.js index afc7eec99fbbc..b0d206e0d73d5 100644 --- a/client/state/selectors/test/get-theme-showcase-description.js +++ b/client/state/selectors/test/get-theme-showcase-description.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeShowcaseDescription } from 'state/selectors'; +import getThemeShowcaseDescription from 'state/selectors/get-theme-showcase-description'; import { state } from './fixtures/theme-filters'; describe( 'getThemeShowcaseDescription()', () => { diff --git a/client/state/selectors/test/get-theme-showcase-title.js b/client/state/selectors/test/get-theme-showcase-title.js index c56d92d6c9575..07a67a30cfbab 100644 --- a/client/state/selectors/test/get-theme-showcase-title.js +++ b/client/state/selectors/test/get-theme-showcase-title.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getThemeShowcaseTitle } from 'state/selectors'; +import getThemeShowcaseTitle from 'state/selectors/get-theme-showcase-title'; import { state } from './fixtures/theme-filters'; describe( 'getThemeShowcaseTitle()', () => { diff --git a/client/state/selectors/test/get-timezones-by-continent.js b/client/state/selectors/test/get-timezones-by-continent.js index e0a68faeab0c8..98c77659ee843 100644 --- a/client/state/selectors/test/get-timezones-by-continent.js +++ b/client/state/selectors/test/get-timezones-by-continent.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getTimezonesByContinent } from 'state/selectors'; +import getTimezonesByContinent from 'state/selectors/get-timezones-by-continent'; describe( 'getTimezonesByContinent()', () => { test( "should return null if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-timezones-label.js b/client/state/selectors/test/get-timezones-label.js index 18212ad6c22d7..58c678db2e76b 100644 --- a/client/state/selectors/test/get-timezones-label.js +++ b/client/state/selectors/test/get-timezones-label.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getTimezonesLabel } from 'state/selectors'; +import getTimezonesLabel from 'state/selectors/get-timezones-label'; describe( 'getTimezonesLabel()', () => { test( "should return null if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-timezones-labels-by-continent.js b/client/state/selectors/test/get-timezones-labels-by-continent.js index 1c510106a5fc7..e5f7d5d8f11f5 100644 --- a/client/state/selectors/test/get-timezones-labels-by-continent.js +++ b/client/state/selectors/test/get-timezones-labels-by-continent.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getTimezonesLabelsByContinent } from 'state/selectors'; +import getTimezonesLabelsByContinent from 'state/selectors/get-timezones-labels-by-continent'; describe( 'getTimezonesLabelsByContinent()', () => { test( "should return null if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-timezones-labels.js b/client/state/selectors/test/get-timezones-labels.js index ce398e268150b..8209d7443b2ab 100644 --- a/client/state/selectors/test/get-timezones-labels.js +++ b/client/state/selectors/test/get-timezones-labels.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getTimezonesLabels } from 'state/selectors'; +import getTimezonesLabels from 'state/selectors/get-timezones-labels'; describe( 'getTimezonesLabels()', () => { test( "should return {} if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-timezones.js b/client/state/selectors/test/get-timezones.js index 156aa30bef464..d9914126a94dc 100644 --- a/client/state/selectors/test/get-timezones.js +++ b/client/state/selectors/test/get-timezones.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getTimezones } from 'state/selectors'; +import getTimezones from 'state/selectors/get-timezones'; describe( 'getTimezones()', () => { test( "should return [] if `timezones` aren't synced", () => { diff --git a/client/state/selectors/test/get-unconnected-site-id-by-slug.js b/client/state/selectors/test/get-unconnected-site-id-by-slug.js index fd074c69d6c7f..bf689afe27abe 100644 --- a/client/state/selectors/test/get-unconnected-site-id-by-slug.js +++ b/client/state/selectors/test/get-unconnected-site-id-by-slug.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getUnconnectedSiteIdBySlug } from 'state/selectors'; +import getUnconnectedSiteIdBySlug from 'state/selectors/get-unconnected-site-id-by-slug'; describe( '#getUnconnectedSiteIdBySlug()', () => { test( 'should return null if we have no credentials for the current site slug', () => { diff --git a/client/state/selectors/test/get-unconnected-site-url.js b/client/state/selectors/test/get-unconnected-site-url.js index 8d4525759e57b..52762757999bc 100644 --- a/client/state/selectors/test/get-unconnected-site-url.js +++ b/client/state/selectors/test/get-unconnected-site-url.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getUnconnectedSiteUrl } from 'state/selectors'; +import getUnconnectedSiteUrl from 'state/selectors/get-unconnected-site-url'; describe( '#getUnconnectedSiteUrl()', () => { const credentials = { diff --git a/client/state/selectors/test/get-unconnected-site.js b/client/state/selectors/test/get-unconnected-site.js index bd87795253146..46e5a064749fe 100644 --- a/client/state/selectors/test/get-unconnected-site.js +++ b/client/state/selectors/test/get-unconnected-site.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getUnconnectedSite } from 'state/selectors'; +import getUnconnectedSite from 'state/selectors/get-unconnected-site'; describe( '#getUnconnectedSite()', () => { const site = { diff --git a/client/state/selectors/test/get-upcoming-billing-transactions.js b/client/state/selectors/test/get-upcoming-billing-transactions.js index 5e2083df31573..7c2730d29e839 100644 --- a/client/state/selectors/test/get-upcoming-billing-transactions.js +++ b/client/state/selectors/test/get-upcoming-billing-transactions.js @@ -9,7 +9,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getUpcomingBillingTransactions } from 'state/selectors'; +import getUpcomingBillingTransactions from 'state/selectors/get-upcoming-billing-transactions'; describe( 'getUpcomingBillingTransactions()', () => { test( 'should return the upcoming billing transactions', () => { diff --git a/client/state/selectors/test/get-upgrade-plan-slug-from-path.js b/client/state/selectors/test/get-upgrade-plan-slug-from-path.js index fd4ccc17c13c6..d4eb58cf274a0 100644 --- a/client/state/selectors/test/get-upgrade-plan-slug-from-path.js +++ b/client/state/selectors/test/get-upgrade-plan-slug-from-path.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { getUpgradePlanSlugFromPath } from 'state/selectors'; +import getUpgradePlanSlugFromPath from 'state/selectors/get-upgrade-plan-slug-from-path'; import { PLAN_FREE, PLAN_PERSONAL, PLAN_PREMIUM } from 'lib/plans/constants'; describe( 'getUpgradePlanSlugFromPath', () => { diff --git a/client/state/selectors/test/get-uploaded-plugin-id.js b/client/state/selectors/test/get-uploaded-plugin-id.js index 512b3389d8687..98d39745541a5 100644 --- a/client/state/selectors/test/get-uploaded-plugin-id.js +++ b/client/state/selectors/test/get-uploaded-plugin-id.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getUploadedPluginId } from 'state/selectors'; +import getUploadedPluginId from 'state/selectors/get-uploaded-plugin-id'; const siteId = 77203074; diff --git a/client/state/selectors/test/get-user-devices.js b/client/state/selectors/test/get-user-devices.js index a40cb20fd49ce..bb871034cdd6e 100644 --- a/client/state/selectors/test/get-user-devices.js +++ b/client/state/selectors/test/get-user-devices.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getUserDevices } from 'state/selectors'; +import getUserDevices from 'state/selectors/get-user-devices'; describe( '#getUserDevices()', () => { test( 'should return an empty array if there are no devices', () => { diff --git a/client/state/selectors/test/get-user-setting.js b/client/state/selectors/test/get-user-setting.js index 28bc55d657f16..cb235a2f839c1 100644 --- a/client/state/selectors/test/get-user-setting.js +++ b/client/state/selectors/test/get-user-setting.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getUserSetting } from 'state/selectors'; +import getUserSetting from 'state/selectors/get-user-setting'; describe( 'getUserSetting()', () => { test( 'should return null if neither server nor local unsaved settings contain the key', () => { diff --git a/client/state/selectors/test/get-visible-sites.js b/client/state/selectors/test/get-visible-sites.js index 25df4d529ab88..013fe0632782d 100644 --- a/client/state/selectors/test/get-visible-sites.js +++ b/client/state/selectors/test/get-visible-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { getVisibleSites } from 'state/selectors'; +import getVisibleSites from 'state/selectors/get-visible-sites'; import { userState } from './fixtures/user-state'; describe( 'getVisibleSites()', () => { diff --git a/client/state/selectors/test/has-broken-site-user-connection.js b/client/state/selectors/test/has-broken-site-user-connection.js index e8da7fc84eb39..55a4d5b60f7ff 100644 --- a/client/state/selectors/test/has-broken-site-user-connection.js +++ b/client/state/selectors/test/has-broken-site-user-connection.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasBrokenSiteUserConnection } from 'state/selectors'; +import hasBrokenSiteUserConnection from 'state/selectors/has-broken-site-user-connection'; describe( 'hasBrokenSiteUserConnection()', () => { test( 'should return false if no connections for site', () => { diff --git a/client/state/selectors/test/has-initialized-sites.js b/client/state/selectors/test/has-initialized-sites.js index 4568e78f6022f..c9ad5d568d9e5 100644 --- a/client/state/selectors/test/has-initialized-sites.js +++ b/client/state/selectors/test/has-initialized-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasInitializedSites } from 'state/selectors'; +import hasInitializedSites from 'state/selectors/has-initialized-sites'; describe( 'hasInitializedSites()', () => { test( 'should return false if site selection has not occurred', () => { diff --git a/client/state/selectors/test/has-jetpack-sites.js b/client/state/selectors/test/has-jetpack-sites.js index b16f315011dae..4f49c5e60f87f 100644 --- a/client/state/selectors/test/has-jetpack-sites.js +++ b/client/state/selectors/test/has-jetpack-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasJetpackSites } from 'state/selectors'; +import hasJetpackSites from 'state/selectors/has-jetpack-sites'; describe( 'hasJetpackSites()', () => { test( 'it should return false if sites are empty', () => { diff --git a/client/state/selectors/test/has-loaded-sites.js b/client/state/selectors/test/has-loaded-sites.js index 20a8e0230e37e..809a004e73303 100644 --- a/client/state/selectors/test/has-loaded-sites.js +++ b/client/state/selectors/test/has-loaded-sites.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasLoadedSites } from 'state/selectors'; +import hasLoadedSites from 'state/selectors/has-loaded-sites'; describe( 'hasLoadedSites()', () => { it( 'should return false if site items are null', () => { diff --git a/client/state/selectors/test/has-navigated.js b/client/state/selectors/test/has-navigated.js index 16e76ca716343..e18a4e32344f2 100644 --- a/client/state/selectors/test/has-navigated.js +++ b/client/state/selectors/test/has-navigated.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasNavigated } from 'state/selectors'; +import hasNavigated from 'state/selectors/has-navigated'; import { ROUTE_SET } from 'state/action-types'; describe( 'hasNavigated()', () => { diff --git a/client/state/selectors/test/has-pending-comment-requests.js b/client/state/selectors/test/has-pending-comment-requests.js index 50a710ab78b83..d7f67e6dc4c8a 100644 --- a/client/state/selectors/test/has-pending-comment-requests.js +++ b/client/state/selectors/test/has-pending-comment-requests.js @@ -8,7 +8,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { hasPendingCommentRequests } from 'state/selectors'; +import hasPendingCommentRequests from 'state/selectors/has-pending-comment-requests'; import { COMMENTS_CHANGE_STATUS } from 'state/action-types'; import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; diff --git a/client/state/selectors/test/has-site-pending-automated-transfer.js b/client/state/selectors/test/has-site-pending-automated-transfer.js index 9e931b51d5593..8110287158321 100644 --- a/client/state/selectors/test/has-site-pending-automated-transfer.js +++ b/client/state/selectors/test/has-site-pending-automated-transfer.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { hasSitePendingAutomatedTransfer } from 'state/selectors'; +import hasSitePendingAutomatedTransfer from 'state/selectors/has-site-pending-automated-transfer'; describe( 'hasSitePendingAutomatedTransfer()', () => { test( 'should return null if the specified site was not found in the state', () => { diff --git a/client/state/selectors/test/has-user-asked-a-directly-question.js b/client/state/selectors/test/has-user-asked-a-directly-question.js index 564fa472c8b6c..2ad9265710fd2 100644 --- a/client/state/selectors/test/has-user-asked-a-directly-question.js +++ b/client/state/selectors/test/has-user-asked-a-directly-question.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { hasUserAskedADirectlyQuestion } from 'state/selectors'; +import hasUserAskedADirectlyQuestion from 'state/selectors/has-user-asked-a-directly-question'; describe( 'hasUserAskedADirectlyQuestion()', () => { const questionData = deepFreeze( { diff --git a/client/state/selectors/test/is-account-recovery-reset-options-ready.js b/client/state/selectors/test/is-account-recovery-reset-options-ready.js index ebb733f35c1e4..2185f601a618d 100644 --- a/client/state/selectors/test/is-account-recovery-reset-options-ready.js +++ b/client/state/selectors/test/is-account-recovery-reset-options-ready.js @@ -8,7 +8,7 @@ import { assert } from 'chai'; /** * Internal dependencies */ -import { isAccountRecoveryResetOptionsReady } from 'state/selectors'; +import isAccountRecoveryResetOptionsReady from 'state/selectors/is-account-recovery-reset-options-ready'; describe( 'isAccountRecoveryResetOptionsReady()', () => { test( 'should return false if items array is empty', () => { diff --git a/client/state/selectors/test/is-account-recovery-reset-password-succeeded.js b/client/state/selectors/test/is-account-recovery-reset-password-succeeded.js index 3dc64c5da437a..2f00daa902aa5 100644 --- a/client/state/selectors/test/is-account-recovery-reset-password-succeeded.js +++ b/client/state/selectors/test/is-account-recovery-reset-password-succeeded.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isAccountRecoveryResetPasswordSucceeded } from 'state/selectors'; +import isAccountRecoveryResetPasswordSucceeded from 'state/selectors/is-account-recovery-reset-password-succeeded'; describe( 'isAccountRecoveryResetPasswordSucceeded()', () => { test( 'should return succeeded field under resetPassword state tree.', () => { diff --git a/client/state/selectors/test/is-account-recovery-user-data-ready.js b/client/state/selectors/test/is-account-recovery-user-data-ready.js index 237dc05edebdf..eef797fdabb55 100644 --- a/client/state/selectors/test/is-account-recovery-user-data-ready.js +++ b/client/state/selectors/test/is-account-recovery-user-data-ready.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isAccountRecoveryUserDataReady } from 'state/selectors'; +import isAccountRecoveryUserDataReady from 'state/selectors/is-account-recovery-user-data-ready'; describe( 'isAccountRecoveryUserDataReady()', () => { test( 'should return true if user field is set', () => { diff --git a/client/state/selectors/test/is-activating-jetpack-jumpstart.js b/client/state/selectors/test/is-activating-jetpack-jumpstart.js index 1d8acdc959e1f..64a250e4e3f4c 100644 --- a/client/state/selectors/test/is-activating-jetpack-jumpstart.js +++ b/client/state/selectors/test/is-activating-jetpack-jumpstart.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isActivatingJetpackJumpstart } from 'state/selectors'; +import isActivatingJetpackJumpstart from 'state/selectors/is-activating-jetpack-jumpstart'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-jumpstart'; describe( 'isActivatingJetpackJumpstart()', () => { diff --git a/client/state/selectors/test/is-activating-jetpack-module.js b/client/state/selectors/test/is-activating-jetpack-module.js index ef0349b0985c4..9ecdc98d6e94c 100644 --- a/client/state/selectors/test/is-activating-jetpack-module.js +++ b/client/state/selectors/test/is-activating-jetpack-module.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isActivatingJetpackModule } from 'state/selectors'; +import isActivatingJetpackModule from 'state/selectors/is-activating-jetpack-module'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-modules'; describe( 'isActivatingJetpackModule()', () => { diff --git a/client/state/selectors/test/is-ambiguous-theme-filter-term.js b/client/state/selectors/test/is-ambiguous-theme-filter-term.js index 9355fee22a106..abaea23ca69c4 100644 --- a/client/state/selectors/test/is-ambiguous-theme-filter-term.js +++ b/client/state/selectors/test/is-ambiguous-theme-filter-term.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isAmbiguousThemeFilterTerm } from 'state/selectors'; +import isAmbiguousThemeFilterTerm from 'state/selectors/is-ambiguous-theme-filter-term'; import { state } from './fixtures/theme-filters'; describe( 'isAmbiguousThemeFilterTerm()', () => { diff --git a/client/state/selectors/test/is-business-plan-user.js b/client/state/selectors/test/is-business-plan-user.js index 3105b9acf7ade..c16dd4bca405f 100644 --- a/client/state/selectors/test/is-business-plan-user.js +++ b/client/state/selectors/test/is-business-plan-user.js @@ -8,7 +8,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isBusinessPlanUser } from 'state/selectors'; +import isBusinessPlanUser from 'state/selectors/is-business-plan-user'; import { PLAN_BUSINESS, PLAN_BUSINESS_2_YEARS } from 'lib/plans/constants'; describe( 'isBusinessPlanUser()', () => { diff --git a/client/state/selectors/test/is-comments-tree-initialized.js b/client/state/selectors/test/is-comments-tree-initialized.js index cc15c5007e969..d9904ac95774a 100644 --- a/client/state/selectors/test/is-comments-tree-initialized.js +++ b/client/state/selectors/test/is-comments-tree-initialized.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isCommentsTreeInitialized } from 'state/selectors'; +import isCommentsTreeInitialized from 'state/selectors/is-comments-tree-initialized'; describe( 'isCommentsTreeInitialized()', () => { test( 'should return false if no data is available', () => { diff --git a/client/state/selectors/test/is-connected-secondary-network-site.js b/client/state/selectors/test/is-connected-secondary-network-site.js index 59b8743bb480e..cfa98b581395d 100644 --- a/client/state/selectors/test/is-connected-secondary-network-site.js +++ b/client/state/selectors/test/is-connected-secondary-network-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isConnectedSecondaryNetworkSite } from 'state/selectors'; +import isConnectedSecondaryNetworkSite from 'state/selectors/is-connected-secondary-network-site'; describe( 'isConnectedSecondaryNetworkSite()', () => { test( 'should return false if no sites exist in state', () => { diff --git a/client/state/selectors/test/is-deactivating-jetpack-jumpstart.js b/client/state/selectors/test/is-deactivating-jetpack-jumpstart.js index 8100cf0d38606..7a73675f6e7d0 100644 --- a/client/state/selectors/test/is-deactivating-jetpack-jumpstart.js +++ b/client/state/selectors/test/is-deactivating-jetpack-jumpstart.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDeactivatingJetpackJumpstart } from 'state/selectors'; +import isDeactivatingJetpackJumpstart from 'state/selectors/is-deactivating-jetpack-jumpstart'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-jumpstart'; describe( 'isDeactivatingJetpackJumpstart()', () => { diff --git a/client/state/selectors/test/is-deactivating-jetpack-module.js b/client/state/selectors/test/is-deactivating-jetpack-module.js index faea7ff6b216b..5500bc8730811 100644 --- a/client/state/selectors/test/is-deactivating-jetpack-module.js +++ b/client/state/selectors/test/is-deactivating-jetpack-module.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDeactivatingJetpackModule } from 'state/selectors'; +import isDeactivatingJetpackModule from 'state/selectors/is-deactivating-jetpack-module'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-modules'; describe( 'isDeactivatingJetpackModule()', () => { diff --git a/client/state/selectors/test/is-deleting-site.js b/client/state/selectors/test/is-deleting-site.js index 691f124194b16..51b8b04e19d92 100644 --- a/client/state/selectors/test/is-deleting-site.js +++ b/client/state/selectors/test/is-deleting-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDeletingSite } from 'state/selectors'; +import isDeletingSite from 'state/selectors/is-deleting-site'; describe( 'isDeletingSite()', () => { test( 'should return false if no requests have been triggered', () => { diff --git a/client/state/selectors/test/is-directly-failed.js b/client/state/selectors/test/is-directly-failed.js index 88cf046ca0a4f..41276d0c92d26 100644 --- a/client/state/selectors/test/is-directly-failed.js +++ b/client/state/selectors/test/is-directly-failed.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDirectlyFailed } from 'state/selectors'; +import isDirectlyFailed from 'state/selectors/is-directly-failed'; import { STATUS_ERROR, STATUS_INITIALIZING, diff --git a/client/state/selectors/test/is-directly-ready.js b/client/state/selectors/test/is-directly-ready.js index 31ad172f1ac07..6fcdc1b439645 100644 --- a/client/state/selectors/test/is-directly-ready.js +++ b/client/state/selectors/test/is-directly-ready.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDirectlyReady } from 'state/selectors'; +import isDirectlyReady from 'state/selectors/is-directly-ready'; import { STATUS_ERROR, STATUS_INITIALIZING, diff --git a/client/state/selectors/test/is-directly-uninitialized.js b/client/state/selectors/test/is-directly-uninitialized.js index 3fed0326dc6a4..8099decb7e851 100644 --- a/client/state/selectors/test/is-directly-uninitialized.js +++ b/client/state/selectors/test/is-directly-uninitialized.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDirectlyUninitialized } from 'state/selectors'; +import isDirectlyUninitialized from 'state/selectors/is-directly-uninitialized'; import { STATUS_ERROR, STATUS_INITIALIZING, diff --git a/client/state/selectors/test/is-domain-only-site.js b/client/state/selectors/test/is-domain-only-site.js index 3a7edfa790f51..dac8284262c5c 100644 --- a/client/state/selectors/test/is-domain-only-site.js +++ b/client/state/selectors/test/is-domain-only-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDomainOnlySite } from 'state/selectors'; +import isDomainOnlySite from 'state/selectors/is-domain-only-site'; describe( '#isDomainOnlySite()', () => { const siteId = 77203074; diff --git a/client/state/selectors/test/is-drop-zone-visible.js b/client/state/selectors/test/is-drop-zone-visible.js index 790040003c188..aa09d67847b23 100644 --- a/client/state/selectors/test/is-drop-zone-visible.js +++ b/client/state/selectors/test/is-drop-zone-visible.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isDropZoneVisible } from 'state/selectors'; +import isDropZoneVisible from 'state/selectors/is-drop-zone-visible'; describe( 'isDropZoneVisible()', () => { test( 'should return false as a default state', () => { diff --git a/client/state/selectors/test/is-email-blacklisted.js b/client/state/selectors/test/is-email-blacklisted.js index b6ec5fe7741a3..2d1cf362be6f4 100644 --- a/client/state/selectors/test/is-email-blacklisted.js +++ b/client/state/selectors/test/is-email-blacklisted.js @@ -7,7 +7,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isEmailBlacklisted } from 'state/selectors'; +import isEmailBlacklisted from 'state/selectors/is-email-blacklisted'; const email = 'foo@bar.baz'; diff --git a/client/state/selectors/test/is-fetching-automated-transfer-status.js b/client/state/selectors/test/is-fetching-automated-transfer-status.js index b45174a8eee51..ec4284658b6fe 100644 --- a/client/state/selectors/test/is-fetching-automated-transfer-status.js +++ b/client/state/selectors/test/is-fetching-automated-transfer-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isFetchingAutomatedTransferStatus } from 'state/selectors'; +import isFetchingAutomatedTransferStatus from 'state/selectors/is-fetching-automated-transfer-status'; describe( 'isFetchingAutomatedTransferStatus()', () => { test( diff --git a/client/state/selectors/test/is-fetching-jetpack-modules.js b/client/state/selectors/test/is-fetching-jetpack-modules.js index d25424dcbd5b9..9a11f6a6b6771 100644 --- a/client/state/selectors/test/is-fetching-jetpack-modules.js +++ b/client/state/selectors/test/is-fetching-jetpack-modules.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isFetchingJetpackModules } from 'state/selectors'; +import isFetchingJetpackModules from 'state/selectors/is-fetching-jetpack-modules'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-modules'; describe( 'isFetchingJetpackModules()', () => { diff --git a/client/state/selectors/test/is-fetching-magic-login-auth.js b/client/state/selectors/test/is-fetching-magic-login-auth.js index 078c404bfd016..9c48a7d05223f 100644 --- a/client/state/selectors/test/is-fetching-magic-login-auth.js +++ b/client/state/selectors/test/is-fetching-magic-login-auth.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isFetchingMagicLoginAuth } from 'state/selectors'; +import isFetchingMagicLoginAuth from 'state/selectors/is-fetching-magic-login-auth'; describe( 'isFetchingMagicLoginAuth()', () => { test( 'should return false if there is no fetching information yet', () => { diff --git a/client/state/selectors/test/is-fetching-magic-login-email.js b/client/state/selectors/test/is-fetching-magic-login-email.js index 1215325c2e211..d26d64e30d6f1 100644 --- a/client/state/selectors/test/is-fetching-magic-login-email.js +++ b/client/state/selectors/test/is-fetching-magic-login-email.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isFetchingMagicLoginEmail } from 'state/selectors'; +import isFetchingMagicLoginEmail from 'state/selectors/is-fetching-magic-login-email'; describe( 'isFetchingMagicLoginEmail()', () => { test( 'should return false if there is no fetching information yet', () => { diff --git a/client/state/selectors/test/is-fetching-order-transaction.js b/client/state/selectors/test/is-fetching-order-transaction.js index 0a9acab3f7083..bc2e4a161f04b 100644 --- a/client/state/selectors/test/is-fetching-order-transaction.js +++ b/client/state/selectors/test/is-fetching-order-transaction.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { isFetchingOrderTransaction } from 'state/selectors'; +import isFetchingOrderTransaction from 'state/selectors/is-fetching-order-transaction'; describe( 'isFetchingOrderTransaction', () => { const orderId = 123; diff --git a/client/state/selectors/test/is-following-reader-conversation.js b/client/state/selectors/test/is-following-reader-conversation.js index 77a123716efab..a3fc3355a245b 100644 --- a/client/state/selectors/test/is-following-reader-conversation.js +++ b/client/state/selectors/test/is-following-reader-conversation.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { isFollowingReaderConversation } from 'state/selectors'; +import isFollowingReaderConversation from 'state/selectors/is-following-reader-conversation'; describe( 'isFollowingReaderConversation()', () => { test( 'should return true for a known followed post', () => { diff --git a/client/state/selectors/test/is-hidden-site.js b/client/state/selectors/test/is-hidden-site.js index d54286e728871..cf44a5887ef66 100644 --- a/client/state/selectors/test/is-hidden-site.js +++ b/client/state/selectors/test/is-hidden-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isHiddenSite } from 'state/selectors'; +import isHiddenSite from 'state/selectors/is-hidden-site'; describe( 'isHiddenSite()', () => { test( 'should return null if the site is not known', () => { diff --git a/client/state/selectors/test/is-jetpack-module-active.js b/client/state/selectors/test/is-jetpack-module-active.js index 4206d477f0a3c..6d02aa9c6b047 100644 --- a/client/state/selectors/test/is-jetpack-module-active.js +++ b/client/state/selectors/test/is-jetpack-module-active.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackModuleActive } from 'state/selectors'; +import isJetpackModuleActive from 'state/selectors/is-jetpack-module-active'; import { modules as MODULES_FIXTURE } from './fixtures/jetpack-modules'; describe( 'isJetpackModuleActive()', () => { diff --git a/client/state/selectors/test/is-jetpack-module-unavailable-in-development-mode.js b/client/state/selectors/test/is-jetpack-module-unavailable-in-development-mode.js index 27c7a7f5ecbf9..cf9f3888ec04a 100644 --- a/client/state/selectors/test/is-jetpack-module-unavailable-in-development-mode.js +++ b/client/state/selectors/test/is-jetpack-module-unavailable-in-development-mode.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackModuleUnavailableInDevelopmentMode } from 'state/selectors'; +import isJetpackModuleUnavailableInDevelopmentMode from 'state/selectors/is-jetpack-module-unavailable-in-development-mode'; describe( 'isJetpackModuleUnavailableInDevelopmentMode()', () => { test( 'should return null if the site modules are not known', () => { diff --git a/client/state/selectors/test/is-jetpack-onboarding-step-completed.js b/client/state/selectors/test/is-jetpack-onboarding-step-completed.js index ca549c2480b2c..3eef1435f633f 100644 --- a/client/state/selectors/test/is-jetpack-onboarding-step-completed.js +++ b/client/state/selectors/test/is-jetpack-onboarding-step-completed.js @@ -4,7 +4,7 @@ * Internal dependencies */ import { JETPACK_ONBOARDING_STEPS as STEPS } from 'jetpack-onboarding/constants'; -import { isJetpackOnboardingStepCompleted } from 'state/selectors'; +import isJetpackOnboardingStepCompleted from 'state/selectors/is-jetpack-onboarding-step-completed'; describe( 'isJetpackOnboardingStepCompleted()', () => { test( 'should return false for a null site ID', () => { diff --git a/client/state/selectors/test/is-jetpack-remote-install-complete.js b/client/state/selectors/test/is-jetpack-remote-install-complete.js index 09f1caa8ef25f..ff9fff3529766 100644 --- a/client/state/selectors/test/is-jetpack-remote-install-complete.js +++ b/client/state/selectors/test/is-jetpack-remote-install-complete.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { isJetpackRemoteInstallComplete } from 'state/selectors'; +import isJetpackRemoteInstallComplete from 'state/selectors/is-jetpack-remote-install-complete'; const url = 'https://yourgroovydomain.com'; diff --git a/client/state/selectors/test/is-jetpack-settings-save-failure.js b/client/state/selectors/test/is-jetpack-settings-save-failure.js index 88eebdb8d2153..169f4bb57e36b 100644 --- a/client/state/selectors/test/is-jetpack-settings-save-failure.js +++ b/client/state/selectors/test/is-jetpack-settings-save-failure.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; -import { isJetpackSettingsSaveFailure } from 'state/selectors'; +import isJetpackSettingsSaveFailure from 'state/selectors/is-jetpack-settings-save-failure'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; import { settings as SETTINGS_FIXTURE } from './fixtures/jetpack-settings'; diff --git a/client/state/selectors/test/is-jetpack-site-connected.js b/client/state/selectors/test/is-jetpack-site-connected.js index 02e2047a8309b..a4b89c01015f5 100644 --- a/client/state/selectors/test/is-jetpack-site-connected.js +++ b/client/state/selectors/test/is-jetpack-site-connected.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackSiteConnected } from 'state/selectors'; +import isJetpackSiteConnected from 'state/selectors/is-jetpack-site-connected'; import { items as ITEMS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'isJetpackSiteConnected()', () => { diff --git a/client/state/selectors/test/is-jetpack-site-in-development-mode.js b/client/state/selectors/test/is-jetpack-site-in-development-mode.js index 7a8866f40df62..d44a936c771dd 100644 --- a/client/state/selectors/test/is-jetpack-site-in-development-mode.js +++ b/client/state/selectors/test/is-jetpack-site-in-development-mode.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackSiteInDevelopmentMode } from 'state/selectors'; +import isJetpackSiteInDevelopmentMode from 'state/selectors/is-jetpack-site-in-development-mode'; import { items as ITEMS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'isJetpackSiteInDevelopmentMode()', () => { diff --git a/client/state/selectors/test/is-jetpack-site-in-staging-mode.js b/client/state/selectors/test/is-jetpack-site-in-staging-mode.js index f9840d8aaf952..899dfafc758e9 100644 --- a/client/state/selectors/test/is-jetpack-site-in-staging-mode.js +++ b/client/state/selectors/test/is-jetpack-site-in-staging-mode.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackSiteInStagingMode } from 'state/selectors'; +import isJetpackSiteInStagingMode from 'state/selectors/is-jetpack-site-in-staging-mode'; import { items as ITEMS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'isJetpackSiteInStagingMode()', () => { diff --git a/client/state/selectors/test/is-jetpack-user-master.js b/client/state/selectors/test/is-jetpack-user-master.js index 8ea192b6618d1..657a480d1d92d 100644 --- a/client/state/selectors/test/is-jetpack-user-master.js +++ b/client/state/selectors/test/is-jetpack-user-master.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isJetpackUserMaster } from 'state/selectors'; +import isJetpackUserMaster from 'state/selectors/is-jetpack-user-master'; import { dataItems } from './fixtures/jetpack-connection'; describe( 'isJetpackUserMaster()', () => { diff --git a/client/state/selectors/test/is-main-site-of.js b/client/state/selectors/test/is-main-site-of.js index 3716a678947cb..2848f34b771a5 100644 --- a/client/state/selectors/test/is-main-site-of.js +++ b/client/state/selectors/test/is-main-site-of.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isMainSiteOf } from 'state/selectors'; +import isMainSiteOf from 'state/selectors/is-main-site-of'; describe( 'isMainSiteOf()', () => { test( 'should return null if no sites exist in state', () => { diff --git a/client/state/selectors/test/is-mapped-domain-site.js b/client/state/selectors/test/is-mapped-domain-site.js index e1fddf2ef48c2..5d27decc30a00 100644 --- a/client/state/selectors/test/is-mapped-domain-site.js +++ b/client/state/selectors/test/is-mapped-domain-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isMappedDomainSite } from 'state/selectors'; +import isMappedDomainSite from 'state/selectors/is-mapped-domain-site'; describe( '#isMappedDomainSite()', () => { const siteId = 77203074; diff --git a/client/state/selectors/test/is-notifications-open.js b/client/state/selectors/test/is-notifications-open.js index ad34b42cd5205..ca3a6dec8d330 100644 --- a/client/state/selectors/test/is-notifications-open.js +++ b/client/state/selectors/test/is-notifications-open.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isNotificationsOpen } from 'state/selectors'; +import isNotificationsOpen from 'state/selectors/is-notifications-open'; describe( 'isNotificationsOpen()', () => { test( 'returns true if notifications are open', () => { diff --git a/client/state/selectors/test/is-past-billing-transaction-error.js b/client/state/selectors/test/is-past-billing-transaction-error.js index 660098e15a3f4..d8bb59a44fa6d 100644 --- a/client/state/selectors/test/is-past-billing-transaction-error.js +++ b/client/state/selectors/test/is-past-billing-transaction-error.js @@ -2,7 +2,7 @@ /** * Internal dependencies */ -import { isPastBillingTransactionError } from 'state/selectors'; +import isPastBillingTransactionError from 'state/selectors/is-past-billing-transaction-error'; describe( 'getPastBillingTransactionError()', () => { const state = { diff --git a/client/state/selectors/test/is-plugin-active.js b/client/state/selectors/test/is-plugin-active.js index da9aeb8934f0a..d86e7784b0ca9 100644 --- a/client/state/selectors/test/is-plugin-active.js +++ b/client/state/selectors/test/is-plugin-active.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isPluginActive } from 'state/selectors'; +import isPluginActive from 'state/selectors/is-plugin-active'; const helloDolly = { id: 'hello-dolly/hello', diff --git a/client/state/selectors/test/is-plugin-upload-complete.js b/client/state/selectors/test/is-plugin-upload-complete.js index 8c14ef811ab65..48e000432bf01 100644 --- a/client/state/selectors/test/is-plugin-upload-complete.js +++ b/client/state/selectors/test/is-plugin-upload-complete.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isPluginUploadComplete } from 'state/selectors'; +import isPluginUploadComplete from 'state/selectors/is-plugin-upload-complete'; const siteId = 77203074; diff --git a/client/state/selectors/test/is-plugin-upload-in-progress.js b/client/state/selectors/test/is-plugin-upload-in-progress.js index 4c076783e04c8..a411d6d4ebc5f 100644 --- a/client/state/selectors/test/is-plugin-upload-in-progress.js +++ b/client/state/selectors/test/is-plugin-upload-in-progress.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isPluginUploadInProgress } from 'state/selectors'; +import isPluginUploadInProgress from 'state/selectors/is-plugin-upload-in-progress'; const siteId = 77203074; diff --git a/client/state/selectors/test/is-private-site.js b/client/state/selectors/test/is-private-site.js index c661fd653124f..742d9156647fb 100644 --- a/client/state/selectors/test/is-private-site.js +++ b/client/state/selectors/test/is-private-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isPrivateSite } from 'state/selectors'; +import isPrivateSite from 'state/selectors/is-private-site'; describe( 'isPrivateSite()', () => { test( 'should return null if neither the site nor settings are known', () => { diff --git a/client/state/selectors/test/is-publicize-enabled.js b/client/state/selectors/test/is-publicize-enabled.js index a1d979f959795..4ba8ec21ab23b 100644 --- a/client/state/selectors/test/is-publicize-enabled.js +++ b/client/state/selectors/test/is-publicize-enabled.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isPublicizeEnabled } from 'state/selectors'; +import isPublicizeEnabled from 'state/selectors/is-publicize-enabled'; describe( 'isPublicizeEnabled()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/is-regenerating-jetpack-post-by-email.js b/client/state/selectors/test/is-regenerating-jetpack-post-by-email.js index 3ec08c89f8b7a..ebd3b5a3473bb 100644 --- a/client/state/selectors/test/is-regenerating-jetpack-post-by-email.js +++ b/client/state/selectors/test/is-regenerating-jetpack-post-by-email.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; -import { isRegeneratingJetpackPostByEmail } from 'state/selectors'; +import isRegeneratingJetpackPostByEmail from 'state/selectors/is-regenerating-jetpack-post-by-email'; import { regeneratePostByEmail } from 'state/jetpack/settings/actions'; describe( 'isRegeneratingJetpackPostByEmail()', () => { diff --git a/client/state/selectors/test/is-requesting-account-recovery-reset-options.js b/client/state/selectors/test/is-requesting-account-recovery-reset-options.js index 995e26e72947c..6456a0f744afd 100644 --- a/client/state/selectors/test/is-requesting-account-recovery-reset-options.js +++ b/client/state/selectors/test/is-requesting-account-recovery-reset-options.js @@ -8,7 +8,7 @@ import { assert } from 'chai'; /** * Internal dependencies */ -import { isRequestingAccountRecoveryResetOptions } from 'state/selectors'; +import isRequestingAccountRecoveryResetOptions from 'state/selectors/is-requesting-account-recovery-reset-options'; describe( 'isRequestingAccountRecoveryResetOptions()', () => { test( 'should return the isRequesting flag under the accountRecovery.reset.options substate tree.', () => { diff --git a/client/state/selectors/test/is-requesting-account-recovery-reset.js b/client/state/selectors/test/is-requesting-account-recovery-reset.js index 4010f4ebaae48..6a93ea8f2a2c4 100644 --- a/client/state/selectors/test/is-requesting-account-recovery-reset.js +++ b/client/state/selectors/test/is-requesting-account-recovery-reset.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isRequestingAccountRecoveryReset } from 'state/selectors'; +import isRequestingAccountRecoveryReset from 'state/selectors/is-requesting-account-recovery-reset'; describe( 'isRequestingAccountRecoveryReset()', () => { test( 'should return the requesting status flag under the request-reset state tree.', () => { diff --git a/client/state/selectors/test/is-requesting-billing-transaction.js b/client/state/selectors/test/is-requesting-billing-transaction.js index 9c37958d45cef..e9fe1e17fec17 100644 --- a/client/state/selectors/test/is-requesting-billing-transaction.js +++ b/client/state/selectors/test/is-requesting-billing-transaction.js @@ -7,7 +7,7 @@ import { cloneDeep } from 'lodash'; /** * Internal dependencies */ -import { isRequestingBillingTransaction } from 'state/selectors'; +import isRequestingBillingTransaction from 'state/selectors/is-requesting-billing-transaction'; describe( 'isRequestingBillingTransaction()', () => { const state = { diff --git a/client/state/selectors/test/is-requesting-billing-transactions.js b/client/state/selectors/test/is-requesting-billing-transactions.js index e2fc5e6ecbede..57fda96406603 100644 --- a/client/state/selectors/test/is-requesting-billing-transactions.js +++ b/client/state/selectors/test/is-requesting-billing-transactions.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingBillingTransactions } from 'state/selectors'; +import isRequestingBillingTransactions from 'state/selectors/is-requesting-billing-transactions'; describe( 'isRequestingBillingTransactions()', () => { test( 'should return true if the billing transactions are being fetched', () => { diff --git a/client/state/selectors/test/is-requesting-jetpack-connection-status.js b/client/state/selectors/test/is-requesting-jetpack-connection-status.js index b5c272e884834..19d48cc236314 100644 --- a/client/state/selectors/test/is-requesting-jetpack-connection-status.js +++ b/client/state/selectors/test/is-requesting-jetpack-connection-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingJetpackConnectionStatus } from 'state/selectors'; +import isRequestingJetpackConnectionStatus from 'state/selectors/is-requesting-jetpack-connection-status'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'isRequestingJetpackConnectionStatus()', () => { diff --git a/client/state/selectors/test/is-requesting-jetpack-jumpstart-status.js b/client/state/selectors/test/is-requesting-jetpack-jumpstart-status.js index 12b32897eec10..93680b022c942 100644 --- a/client/state/selectors/test/is-requesting-jetpack-jumpstart-status.js +++ b/client/state/selectors/test/is-requesting-jetpack-jumpstart-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingJetpackJumpstartStatus } from 'state/selectors'; +import isRequestingJetpackJumpstartStatus from 'state/selectors/is-requesting-jetpack-jumpstart-status'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-jumpstart'; describe( 'isRequestingJetpackJumpstartStatus()', () => { diff --git a/client/state/selectors/test/is-requesting-jetpack-settings.js b/client/state/selectors/test/is-requesting-jetpack-settings.js index ecf37d41f8a52..227278dc2a952 100644 --- a/client/state/selectors/test/is-requesting-jetpack-settings.js +++ b/client/state/selectors/test/is-requesting-jetpack-settings.js @@ -4,7 +4,7 @@ * Internal dependencies */ import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; -import { isRequestingJetpackSettings } from 'state/selectors'; +import isRequestingJetpackSettings from 'state/selectors/is-requesting-jetpack-settings'; import { requestJetpackSettings } from 'state/jetpack/settings/actions'; describe( 'isRequestingJetpackSettings()', () => { diff --git a/client/state/selectors/test/is-requesting-jetpack-user-connection.js b/client/state/selectors/test/is-requesting-jetpack-user-connection.js index f10ada47b37ce..20c9655328102 100644 --- a/client/state/selectors/test/is-requesting-jetpack-user-connection.js +++ b/client/state/selectors/test/is-requesting-jetpack-user-connection.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingJetpackUserConnection } from 'state/selectors'; +import isRequestingJetpackUserConnection from 'state/selectors/is-requesting-jetpack-user-connection'; import { requests as REQUESTS_FIXTURE } from './fixtures/jetpack-connection'; describe( 'isRequestingJetpackUserConnection()', () => { diff --git a/client/state/selectors/test/is-requesting-media-item.js b/client/state/selectors/test/is-requesting-media-item.js index 2bb3d11b663cc..a64b021953ee0 100644 --- a/client/state/selectors/test/is-requesting-media-item.js +++ b/client/state/selectors/test/is-requesting-media-item.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingMediaItem } from 'state/selectors'; +import isRequestingMediaItem from 'state/selectors/is-requesting-media-item'; describe( 'isRequestingMediaItem()', () => { const state = { diff --git a/client/state/selectors/test/is-requesting-media.js b/client/state/selectors/test/is-requesting-media.js index 815e56a810b33..7425eebcd4c93 100644 --- a/client/state/selectors/test/is-requesting-media.js +++ b/client/state/selectors/test/is-requesting-media.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingMedia } from 'state/selectors'; +import isRequestingMedia from 'state/selectors/is-requesting-media'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'isRequestingMedia()', () => { diff --git a/client/state/selectors/test/is-requesting-reader-teams.js b/client/state/selectors/test/is-requesting-reader-teams.js index d2f3cf5784f49..afeec64a97fae 100644 --- a/client/state/selectors/test/is-requesting-reader-teams.js +++ b/client/state/selectors/test/is-requesting-reader-teams.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingReaderTeams } from 'state/selectors'; +import isRequestingReaderTeams from 'state/selectors/is-requesting-reader-teams'; describe( 'isRequestingReaderTeams()', () => { test( 'should return false if not requesting teams', () => { diff --git a/client/state/selectors/test/is-requesting-reset-password.js b/client/state/selectors/test/is-requesting-reset-password.js index 66dff329dcbf3..4c6c691c668f0 100644 --- a/client/state/selectors/test/is-requesting-reset-password.js +++ b/client/state/selectors/test/is-requesting-reset-password.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isRequestingResetPassword } from 'state/selectors'; +import isRequestingResetPassword from 'state/selectors/is-requesting-reset-password'; describe( 'isRequestingResetPassword()', () => { test( 'should return isRequesting field under resetPassword state tree.', () => { diff --git a/client/state/selectors/test/is-requesting-sharing-buttons.js b/client/state/selectors/test/is-requesting-sharing-buttons.js index 31f042e2da35d..cd83312bf2aae 100644 --- a/client/state/selectors/test/is-requesting-sharing-buttons.js +++ b/client/state/selectors/test/is-requesting-sharing-buttons.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingSharingButtons } from 'state/selectors'; +import isRequestingSharingButtons from 'state/selectors/is-requesting-sharing-buttons'; describe( 'isRequestingSharingButtons()', () => { test( 'should return false if the site is not attached', () => { diff --git a/client/state/selectors/test/is-requesting-site-connection-status.js b/client/state/selectors/test/is-requesting-site-connection-status.js index 960b58f2f8794..b5bd1cd45c53e 100644 --- a/client/state/selectors/test/is-requesting-site-connection-status.js +++ b/client/state/selectors/test/is-requesting-site-connection-status.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingSiteConnectionStatus } from 'state/selectors'; +import isRequestingSiteConnectionStatus from 'state/selectors/is-requesting-site-connection-status'; describe( 'isRequestingSiteConnectionStatus()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/is-requesting-site-monitor-settings.js b/client/state/selectors/test/is-requesting-site-monitor-settings.js index dd94225594c19..89692262753c8 100644 --- a/client/state/selectors/test/is-requesting-site-monitor-settings.js +++ b/client/state/selectors/test/is-requesting-site-monitor-settings.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRequestingSiteMonitorSettings } from 'state/selectors'; +import isRequestingSiteMonitorSettings from 'state/selectors/is-requesting-site-monitor-settings'; describe( 'isRequestingSiteMonitorSettings()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/is-rewind-activating.js b/client/state/selectors/test/is-rewind-activating.js index 29494c7746d0c..2a43fa1b2e10f 100644 --- a/client/state/selectors/test/is-rewind-activating.js +++ b/client/state/selectors/test/is-rewind-activating.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isRewindActivating } from 'state/selectors'; +import isRewindActivating from 'state/selectors/is-rewind-activating'; const siteId = 77203074; diff --git a/client/state/selectors/test/is-rtl.js b/client/state/selectors/test/is-rtl.js index 3a595d4ed7e35..868e8c397c242 100644 --- a/client/state/selectors/test/is-rtl.js +++ b/client/state/selectors/test/is-rtl.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isRtl } from 'state/selectors'; +import isRtl from 'state/selectors/is-rtl'; describe( 'isRtl()', () => { test( 'should return null if the value is not known', () => { diff --git a/client/state/selectors/test/is-saving-sharing-buttons.js b/client/state/selectors/test/is-saving-sharing-buttons.js index 491ff3f97e3fd..61680d9fc0efc 100644 --- a/client/state/selectors/test/is-saving-sharing-buttons.js +++ b/client/state/selectors/test/is-saving-sharing-buttons.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isSavingSharingButtons } from 'state/selectors'; +import isSavingSharingButtons from 'state/selectors/is-saving-sharing-buttons'; describe( 'isRequestingSharingButtons()', () => { test( 'should return false if the site is not attached', () => { diff --git a/client/state/selectors/test/is-sending-billing-receipt-email.js b/client/state/selectors/test/is-sending-billing-receipt-email.js index 6fe95c5c01466..86b31b8efc140 100644 --- a/client/state/selectors/test/is-sending-billing-receipt-email.js +++ b/client/state/selectors/test/is-sending-billing-receipt-email.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isSendingBillingReceiptEmail } from 'state/selectors'; +import isSendingBillingReceiptEmail from 'state/selectors/is-sending-billing-receipt-email'; describe( 'isSendingBillingReceiptEmail()', () => { test( 'should return true if the receipt email is being sent for that receiptId', () => { diff --git a/client/state/selectors/test/is-sharing-buttons-save-successful.js b/client/state/selectors/test/is-sharing-buttons-save-successful.js index 4cece85c228cb..b2a53a2807fa4 100644 --- a/client/state/selectors/test/is-sharing-buttons-save-successful.js +++ b/client/state/selectors/test/is-sharing-buttons-save-successful.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isSharingButtonsSaveSuccessful } from 'state/selectors'; +import isSharingButtonsSaveSuccessful from 'state/selectors/is-sharing-buttons-save-successful'; describe( 'isRequestingSharingButtons()', () => { test( 'should return false if the site is not attached', () => { diff --git a/client/state/selectors/test/is-site-blocked.js b/client/state/selectors/test/is-site-blocked.js index 7ef392267e6f8..d4d29dcdf4953 100644 --- a/client/state/selectors/test/is-site-blocked.js +++ b/client/state/selectors/test/is-site-blocked.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { isSiteBlocked } from 'state/selectors'; +import isSiteBlocked from 'state/selectors/is-site-blocked'; describe( 'isSiteBlocked()', () => { test( 'should return true if the specified site is blocked', () => { diff --git a/client/state/selectors/test/is-site-in-profile-links.js b/client/state/selectors/test/is-site-in-profile-links.js index 4e78435c1bfda..b239f81014123 100644 --- a/client/state/selectors/test/is-site-in-profile-links.js +++ b/client/state/selectors/test/is-site-in-profile-links.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { isSiteInProfileLinks } from 'state/selectors'; +import isSiteInProfileLinks from 'state/selectors/is-site-in-profile-links'; describe( 'isSiteInProfileLinks()', () => { const profileLinks = [ diff --git a/client/state/selectors/test/is-site-supporting-image-editor.js b/client/state/selectors/test/is-site-supporting-image-editor.js index c6f6002ee09a3..a4fd323588b34 100644 --- a/client/state/selectors/test/is-site-supporting-image-editor.js +++ b/client/state/selectors/test/is-site-supporting-image-editor.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isSiteSupportingImageEditor } from 'state/selectors'; +import isSiteSupportingImageEditor from 'state/selectors/is-site-supporting-image-editor'; describe( 'isSiteSupportingImageEditor()', () => { test( 'should return true if site is not tracked', () => { diff --git a/client/state/selectors/test/is-site-upgradeable.js b/client/state/selectors/test/is-site-upgradeable.js index 7bbb4c8ab8c74..7aceeaec2e710 100644 --- a/client/state/selectors/test/is-site-upgradeable.js +++ b/client/state/selectors/test/is-site-upgradeable.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isSiteUpgradeable } from 'state/selectors'; +import isSiteUpgradeable from 'state/selectors/is-site-upgradeable'; describe( 'isSiteUpgradeable()', () => { test( 'should return null if no siteId is given', () => { diff --git a/client/state/selectors/test/is-transient-media.js b/client/state/selectors/test/is-transient-media.js index d3f9d027c8d30..06283e865a90f 100644 --- a/client/state/selectors/test/is-transient-media.js +++ b/client/state/selectors/test/is-transient-media.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isTransientMedia } from 'state/selectors'; +import isTransientMedia from 'state/selectors/is-transient-media'; import MediaQueryManager from 'lib/query-manager/media'; describe( 'isTransientMedia()', () => { diff --git a/client/state/selectors/test/is-updating-jetpack-settings.js b/client/state/selectors/test/is-updating-jetpack-settings.js index a4162b1484a06..f344a546d1262 100644 --- a/client/state/selectors/test/is-updating-jetpack-settings.js +++ b/client/state/selectors/test/is-updating-jetpack-settings.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { getRequestKey } from 'state/data-layer/wpcom-http/utils'; -import { isUpdatingJetpackSettings } from 'state/selectors'; +import isUpdatingJetpackSettings from 'state/selectors/is-updating-jetpack-settings'; import { settings as SETTINGS_FIXTURE } from './fixtures/jetpack-settings'; import { saveJetpackSettings } from 'state/jetpack/settings/actions'; diff --git a/client/state/selectors/test/is-updating-site-monitor-settings.js b/client/state/selectors/test/is-updating-site-monitor-settings.js index b6b1dc29a1007..4786fa3aa6a18 100644 --- a/client/state/selectors/test/is-updating-site-monitor-settings.js +++ b/client/state/selectors/test/is-updating-site-monitor-settings.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isUpdatingSiteMonitorSettings } from 'state/selectors'; +import isUpdatingSiteMonitorSettings from 'state/selectors/is-updating-site-monitor-settings'; describe( 'isUpdatingSiteMonitorSettings()', () => { const siteId = 2916284; diff --git a/client/state/selectors/test/is-valid-theme-filter-term.js b/client/state/selectors/test/is-valid-theme-filter-term.js index 7d1e0b12fac49..80d617e5ae81a 100644 --- a/client/state/selectors/test/is-valid-theme-filter-term.js +++ b/client/state/selectors/test/is-valid-theme-filter-term.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isValidThemeFilterTerm } from 'state/selectors'; +import isValidThemeFilterTerm from 'state/selectors/is-valid-theme-filter-term'; import { state } from './fixtures/theme-filters'; describe( 'isValidThemeFilterTerm()', () => { diff --git a/client/state/selectors/test/is-validating-account-recovery-key.js b/client/state/selectors/test/is-validating-account-recovery-key.js index 77420c20e03b0..ab1135ff59455 100644 --- a/client/state/selectors/test/is-validating-account-recovery-key.js +++ b/client/state/selectors/test/is-validating-account-recovery-key.js @@ -9,7 +9,7 @@ import deepFreeze from 'deep-freeze'; /** * Internal dependencies */ -import { isValidatingAccountRecoveryKey } from 'state/selectors'; +import isValidatingAccountRecoveryKey from 'state/selectors/is-validating-account-recovery-key'; describe( 'isValidatingAccountRecoveryKey()', () => { test( 'should return the requesting field under the validate substate tree.', () => { diff --git a/client/state/selectors/test/is-vip-site.js b/client/state/selectors/test/is-vip-site.js index 21f6c5d796a10..dbc410f08e5a8 100644 --- a/client/state/selectors/test/is-vip-site.js +++ b/client/state/selectors/test/is-vip-site.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { isVipSite } from 'state/selectors'; +import isVipSite from 'state/selectors/is-vip-site'; describe( 'isVipSite()', () => { test( 'returns null if site does not exist', () => { diff --git a/client/state/selectors/test/prepend-theme-filter-keys.js b/client/state/selectors/test/prepend-theme-filter-keys.js index 8c3ac2ed80fd3..39dd7c3231dd9 100644 --- a/client/state/selectors/test/prepend-theme-filter-keys.js +++ b/client/state/selectors/test/prepend-theme-filter-keys.js @@ -8,7 +8,7 @@ import { assert, expect } from 'chai'; /** * Internal dependencies */ -import { prependThemeFilterKeys } from 'state/selectors'; +import prependThemeFilterKeys from 'state/selectors/prepend-theme-filter-keys'; import { state } from './fixtures/theme-filters'; describe( 'getThemeFilterStringFromTerm', () => { diff --git a/client/state/selectors/test/should-show-video-editor-error.js b/client/state/selectors/test/should-show-video-editor-error.js index 9916b415072d8..5b6726147dfae 100644 --- a/client/state/selectors/test/should-show-video-editor-error.js +++ b/client/state/selectors/test/should-show-video-editor-error.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { shouldShowVideoEditorError } from 'state/selectors'; +import shouldShowVideoEditorError from 'state/selectors/should-show-video-editor-error'; describe( 'shouldShowVideoEditorError()', () => { test( 'should return the poster error state', () => { diff --git a/client/state/selectors/test/should-sync-reader-follows.js b/client/state/selectors/test/should-sync-reader-follows.js index 0a328979032e7..3b0f3e01c6a61 100644 --- a/client/state/selectors/test/should-sync-reader-follows.js +++ b/client/state/selectors/test/should-sync-reader-follows.js @@ -8,7 +8,7 @@ import { expect } from 'chai'; /** * Internal dependencies */ -import { shouldSyncReaderFollows } from 'state/selectors'; +import shouldSyncReaderFollows from 'state/selectors/should-sync-reader-follows'; import { MS_BETWEEN_SYNCS } from 'state/selectors/should-sync-reader-follows'; describe( 'shouldSyncReaderFollows', () => { diff --git a/client/state/selectors/test/user-has-any-atomic-sites.js b/client/state/selectors/test/user-has-any-atomic-sites.js index a3e10aceb99e3..907cc6d82e7fb 100644 --- a/client/state/selectors/test/user-has-any-atomic-sites.js +++ b/client/state/selectors/test/user-has-any-atomic-sites.js @@ -3,7 +3,7 @@ /** * Internal dependencies */ -import { userHasAnyAtomicSites } from 'state/selectors'; +import userHasAnyAtomicSites from 'state/selectors/user-has-any-atomic-sites'; describe( 'userHasAnyAtomicSites()', () => { test( 'should return false if no sites in state', () => { diff --git a/client/state/selectors/test/user-has-any-paid-plans.js b/client/state/selectors/test/user-has-any-paid-plans.js index 32dda796da448..9f7bb2ea6a185 100644 --- a/client/state/selectors/test/user-has-any-paid-plans.js +++ b/client/state/selectors/test/user-has-any-paid-plans.js @@ -9,7 +9,7 @@ import { expect } from 'chai'; * Internal dependencies */ import { PLAN_BUSINESS, PLAN_FREE } from 'lib/plans/constants'; -import { userHasAnyPaidPlans } from 'state/selectors'; +import userHasAnyPaidPlans from 'state/selectors/user-has-any-paid-plans'; describe( 'userHasAnyPaidPlans()', () => { test( 'should return false if no sites in state', () => { diff --git a/client/state/selectors/user-has-any-atomic-sites.js b/client/state/selectors/user-has-any-atomic-sites.js index 95f2a557b0193..192e47d8c9ed1 100644 --- a/client/state/selectors/user-has-any-atomic-sites.js +++ b/client/state/selectors/user-has-any-atomic-sites.js @@ -9,7 +9,8 @@ import { some } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSitesItems, isSiteAutomatedTransfer as isAtomicSite } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; +import isAtomicSite from 'state/selectors/is-site-automated-transfer'; /** * Whether the user currently has any Atomic sites diff --git a/client/state/selectors/user-has-any-paid-plans.js b/client/state/selectors/user-has-any-paid-plans.js index fb98ece4ad822..b55d1bdc956fa 100644 --- a/client/state/selectors/user-has-any-paid-plans.js +++ b/client/state/selectors/user-has-any-paid-plans.js @@ -9,7 +9,7 @@ import { some } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { getSitesItems } from 'state/selectors'; +import getSitesItems from 'state/selectors/get-sites-items'; import { isPlan } from 'lib/products-values'; /** diff --git a/client/state/selectors/utils/index.js b/client/state/selectors/utils/index.js index ce506507b22d4..4a82656449e91 100644 --- a/client/state/selectors/utils/index.js +++ b/client/state/selectors/utils/index.js @@ -10,7 +10,7 @@ import { moment } from 'i18n-calypso'; /** * Internal dependencies */ -import { getPublicizeConnection } from 'state/selectors'; +import getPublicizeConnection from 'state/selectors/get-publicize-connection'; /** * Propagate publicize-connections with the share actions diff --git a/client/state/sharing/publicize/selectors.js b/client/state/sharing/publicize/selectors.js index b4e05424f0790..4aca58186e053 100644 --- a/client/state/sharing/publicize/selectors.js +++ b/client/state/sharing/publicize/selectors.js @@ -10,7 +10,7 @@ import { filter, get } from 'lodash'; * Internal dependencies */ import createSelector from 'lib/create-selector'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { getCurrentUserId } from 'state/current-user/selectors'; import { getSelectedSiteId } from 'state/ui/selectors'; diff --git a/client/state/sharing/services/selectors.js b/client/state/sharing/services/selectors.js index 7cee6bb734bf2..e97a589175ae1 100644 --- a/client/state/sharing/services/selectors.js +++ b/client/state/sharing/services/selectors.js @@ -10,7 +10,7 @@ import { filter } from 'lodash'; * Internal dependencies */ import config from 'config'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { isJetpackSite, isJetpackModuleActive } from 'state/sites/selectors'; /** diff --git a/client/state/sites/selectors.js b/client/state/sites/selectors.js index 4332bde03b0e6..d10db9afa6093 100644 --- a/client/state/sites/selectors.js +++ b/client/state/sites/selectors.js @@ -36,7 +36,9 @@ import { fromApi as seoTitleFromApi } from 'components/seo/meta-title-editor/map import versionCompare from 'lib/version-compare'; import { getCustomizerFocus } from 'my-sites/customize/panels'; import { getSiteComputedAttributes } from './utils'; -import { isSiteUpgradeable, getSiteOptions, getSitesItems } from 'state/selectors'; +import getSiteOptions from 'state/selectors/get-site-options'; +import getSitesItems from 'state/selectors/get-sites-items'; +import isSiteUpgradeable from 'state/selectors/is-site-upgradeable'; /** * Returns a raw site object by its ID. diff --git a/client/state/sites/utils.js b/client/state/sites/utils.js index 4c03b9b5bb415..61ef83fe1a154 100644 --- a/client/state/sites/utils.js +++ b/client/state/sites/utils.js @@ -14,7 +14,8 @@ import { isSiteConflicting, isSitePreviewable, } from 'state/sites/selectors'; -import { canCurrentUser, getSiteOptions } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; +import getSiteOptions from 'state/selectors/get-site-options'; import { withoutHttp } from 'lib/url'; /** diff --git a/client/state/themes/actions.js b/client/state/themes/actions.js index 575f41e4b7b34..0d04b662678ba 100644 --- a/client/state/themes/actions.js +++ b/client/state/themes/actions.js @@ -69,7 +69,8 @@ import { normalizeWporgTheme, } from './utils'; import { getSiteTitle, isJetpackSite } from 'state/sites/selectors'; -import { isSiteAutomatedTransfer, prependThemeFilterKeys } from 'state/selectors'; +import isSiteAutomatedTransfer from 'state/selectors/is-site-automated-transfer'; +import prependThemeFilterKeys from 'state/selectors/prepend-theme-filter-keys'; import i18n from 'i18n-calypso'; import accept from 'lib/accept'; diff --git a/client/state/ui/guided-tours/contexts.js b/client/state/ui/guided-tours/contexts.js index bdd089fdb9280..98ee9442f021f 100644 --- a/client/state/ui/guided-tours/contexts.js +++ b/client/state/ui/guided-tours/contexts.js @@ -17,7 +17,7 @@ import MediaStore from 'lib/media/store'; import { getSectionName, getSelectedSite, getSelectedSiteId } from 'state/ui/selectors'; import { getLastAction } from 'state/ui/action-log/selectors'; import { getCurrentUser } from 'state/current-user/selectors'; -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; import { hasDefaultSiteTitle, isCurrentPlanPaid } from 'state/sites/selectors'; const { getAll: getAllMedia } = MediaStore; diff --git a/client/state/ui/guided-tours/selectors/index.js b/client/state/ui/guided-tours/selectors/index.js index a5501548be10d..97705a9dbd77c 100644 --- a/client/state/ui/guided-tours/selectors/index.js +++ b/client/state/ui/guided-tours/selectors/index.js @@ -24,7 +24,8 @@ import debugFactory from 'debug'; */ import { GUIDED_TOUR_UPDATE, ROUTE_SET } from 'state/action-types'; import { getSectionName } from 'state/ui/selectors'; -import { getInitialQueryArguments, getCurrentQueryArguments } from 'state/selectors'; +import getCurrentQueryArguments from 'state/selectors/get-current-query-arguments'; +import getInitialQueryArguments from 'state/selectors/get-initial-query-arguments'; import { getActionLog } from 'state/ui/action-log/selectors'; import { getPreference, preferencesLastFetchedTimestamp } from 'state/preferences/selectors'; import { shouldViewBeVisible } from 'state/ui/first-view/selectors'; diff --git a/client/state/user-settings/actions.js b/client/state/user-settings/actions.js index 1ea26f284e5a8..e14772139a68c 100644 --- a/client/state/user-settings/actions.js +++ b/client/state/user-settings/actions.js @@ -10,7 +10,7 @@ import { get } from 'lodash'; /** * Internal dependencies */ -import { getUserSettings } from 'state/selectors'; +import getUserSettings from 'state/selectors/get-user-settings'; import { USER_SETTINGS_REQUEST, USER_SETTINGS_SAVE, diff --git a/docs/our-approach-to-data.md b/docs/our-approach-to-data.md index 56e625bc3d842..de4074354358e 100644 --- a/docs/our-approach-to-data.md +++ b/docs/our-approach-to-data.md @@ -191,7 +191,7 @@ export default connect( ( state, ownProps ) => { } )( PostsList ); ``` -In this example, the `PostsList` function defines the visual `PostsList` component. +In this example, the `PostsList` function defines the visual `PostsList` component. It expects an array of `posts` passed as a prop, which it renders as a `ul`. The `connect` function wraps this purely presentational component to produce an app component. `connect` accepts two arguments. Both pass props to the component. The first argument provides data; the second sets the component up to handle behavior. @@ -227,7 +227,7 @@ export default connect( )( localize( PostDeleteButton ) ); ``` -In this example we pass both arguments to `connect`. +In this example we pass both arguments to `connect`. `connect` is a [currying](https://www.sitepoint.com/currying-in-functional-javascript/) function: after we invoke it with the `mapStateToProps` and `mapDispatchToProps` arguments we call it a second time, this time passing the `PostDeleteButton` visual component. `connect` takes this component class and returns a new one which is connected to the store. The resulting component can have additional props which were not defined in the original class. @@ -264,7 +264,7 @@ Much like action types, because selectors operate on the entire global state obj When using selectors, you can import directly from `state/selectors`. For example: ```js -import { canCurrentUser } from 'state/selectors'; +import canCurrentUser from 'state/selectors/can-current-user'; ``` In this example, the logic for the selector exists at the file `state/selectors/can-current-user.js`. diff --git a/package.json b/package.json index 30c6b8abc3faf..f21dcc2698b5f 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "babel-plugin-add-module-exports": "0.2.1", "babel-plugin-transform-class-properties": "6.24.1", "babel-plugin-transform-export-extensions": "6.22.0", - "babel-plugin-transform-imports": "1.4.1", "blob": "0.0.4", "body-parser": "1.17.2", "bounding-client-rect": "1.0.5", diff --git a/server/render/index.js b/server/render/index.js index 9f5dc66f3013c..3ca321ad7de35 100644 --- a/server/render/index.js +++ b/server/render/index.js @@ -22,7 +22,8 @@ import { getDocumentHeadLink, } from 'state/document-head/selectors'; import isRTL from 'state/selectors/is-rtl'; -import { getCurrentLocaleSlug, getCurrentLocaleVariant } from 'state/selectors'; +import getCurrentLocaleSlug from 'state/selectors/get-current-locale-slug'; +import getCurrentLocaleVariant from 'state/selectors/get-current-locale-variant'; import { reducer } from 'state'; import { SERIALIZE } from 'state/action-types'; import stateCache from 'state-cache';