honkoma/priv/static/packs/features/following.js.map

1 line
5.8 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/following/index.js"],"names":["Following","connect","state","props","isAccount","getIn","params","accountId","accountIds","hasMore","blockedBy","dispatch","expandFollowing","leading","componentWillMount","this","fetchAccount","fetchFollowing","componentWillReceiveProps","nextProps","render","shouldUpdateScroll","multiColumn","emptyMessage","id","defaultMessage","scrollKey","onLoadMore","handleLoadMore","prepend","hideTabs","alwaysPrepend","bindToDocument","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"2UA4BMA,EADUC,mBAPQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,YAAaF,EAAMG,MAAM,CAAC,WAAYF,EAAMG,OAAOC,YACnDC,WAAYN,EAAMG,MAAM,CAAC,aAAc,YAAaF,EAAMG,OAAOC,UAAW,UAC5EE,UAAWP,EAAMG,MAAM,CAAC,aAAc,YAAaF,EAAMG,OAAOC,UAAW,SAC3EG,UAAWR,EAAMG,MAAM,CAAC,gBAAiBF,EAAMG,OAAOC,UAAW,eAAe,M,qMA+B/D,KAAS,WACxB,EAAKJ,MAAMQ,SAASC,YAAgB,EAAKT,MAAMG,OAAOC,cACrD,IAAK,CAAEM,SAAS,K,8CAhBnBC,mBAAA,WACOC,KAAKZ,MAAMK,aACdO,KAAKZ,MAAMQ,SAASK,YAAaD,KAAKZ,MAAMG,OAAOC,YACnDQ,KAAKZ,MAAMQ,SAASM,YAAeF,KAAKZ,MAAMG,OAAOC,c,EAIzDW,0BAAA,SAA2BC,GACrBA,EAAUb,OAAOC,YAAcQ,KAAKZ,MAAMG,OAAOC,WAAaY,EAAUb,OAAOC,YACjFQ,KAAKZ,MAAMQ,SAASK,YAAaG,EAAUb,OAAOC,YAClDQ,KAAKZ,MAAMQ,SAASM,YAAeE,EAAUb,OAAOC,c,EAQxDa,OAAA,WAAW,IAAD,EAC+EL,KAAKZ,MAApFkB,EADA,EACAA,mBAAoBb,EADpB,EACoBA,WAAYC,EADhC,EACgCA,QAASC,EADzC,EACyCA,UAAWN,EADpD,EACoDA,UAAWkB,EAD/D,EAC+DA,YAEvE,IAAKlB,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAKI,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMe,EAAeb,EAAY,YAAC,IAAD,CAAkBc,GAAG,mCAAmCC,eAAe,wBAA2B,YAAC,IAAD,CAAkBD,GAAG,wBAAwBC,eAAe,yCAE/L,OACE,YAAC,IAAD,UACE,YAAC,IAAD,CAAkBH,YAAaA,IAE/B,YAAC,IAAD,CACEI,UAAU,YACVjB,QAASA,EACTkB,WAAYZ,KAAKa,eACjBP,mBAAoBA,EACpBQ,QAAS,YAAC,IAAD,CAAiBtB,UAAWQ,KAAKZ,MAAMG,OAAOC,UAAWuB,UAAQ,IAC1EC,eAAa,EACbR,aAAcA,EACdS,gBAAiBV,QARnB,EAUGZ,EAAY,GAAKF,EAAWyB,KAAI,SAAAT,GAAE,OACjC,YAAC,IAAD,CAA2BA,GAAIA,EAAIU,UAAU,GAAtBV,S,GAnEXW,K,0BAEH,CACjB7B,OAAQ8B,IAAUC,OAAOC,WACzB3B,SAAUyB,IAAUG,KAAKD,WACzBjB,mBAAoBe,IAAUG,KAC9B/B,WAAYgC,IAAmBC,KAC/BhC,QAAS2B,IAAUM,KACnBhC,UAAW0B,IAAUM,KACrBtC,UAAWgC,IAAUM,KACrBpB,YAAac,IAAUM,O","file":"features/following.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport LoadingIndicator from '../../components/loading_indicator';\nimport {\n fetchAccount,\n fetchFollowing,\n expandFollowing,\n} from '../../actions/accounts';\nimport { FormattedMessage } from 'react-intl';\nimport AccountContainer from '../../containers/account_container';\nimport Column from '../ui/components/column';\nimport HeaderContainer from '../account_timeline/containers/header_container';\nimport ColumnBackButton from '../../components/column_back_button';\nimport ScrollableList from '../../components/scrollable_list';\nimport MissingIndicator from 'mastodon/components/missing_indicator';\n\nconst mapStateToProps = (state, props) => ({\n isAccount: !!state.getIn(['accounts', props.params.accountId]),\n accountIds: state.getIn(['user_lists', 'following', props.params.accountId, 'items']),\n hasMore: !!state.getIn(['user_lists', 'following', props.params.accountId, 'next']),\n blockedBy: state.getIn(['relationships', props.params.accountId, 'blocked_by'], false),\n});\n\nexport default @connect(mapStateToProps)\nclass Following extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n accountIds: ImmutablePropTypes.list,\n hasMore: PropTypes.bool,\n blockedBy: PropTypes.bool,\n isAccount: PropTypes.bool,\n multiColumn: PropTypes.bool,\n };\n\n componentWillMount () {\n if (!this.props.accountIds) {\n this.props.dispatch(fetchAccount(this.props.params.accountId));\n this.props.dispatch(fetchFollowing(this.props.params.accountId));\n }\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.params.accountId !== this.props.params.accountId && nextProps.params.accountId) {\n this.props.dispatch(fetchAccount(nextProps.params.accountId));\n this.props.dispatch(fetchFollowing(nextProps.params.accountId));\n }\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandFollowing(this.props.params.accountId));\n }, 300, { leading: true });\n\n render () {\n const { shouldUpdateScroll, accountIds, hasMore, blockedBy, isAccount, multiColumn } = this.props;\n\n if (!isAccount) {\n return (\n <Column>\n <MissingIndicator />\n </Column>\n );\n }\n\n if (!accountIds) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = blockedBy ? <FormattedMessage id='empty_column.account_unavailable' defaultMessage='Profile unavailable' /> : <FormattedMessage id='account.follows.empty' defaultMessage=\"This user doesn't follow anyone yet.\" />;\n\n return (\n <Column>\n <ColumnBackButton multiColumn={multiColumn} />\n\n <ScrollableList\n scrollKey='following'\n hasMore={hasMore}\n onLoadMore={this.handleLoadMore}\n shouldUpdateScroll={shouldUpdateScroll}\n prepend={<HeaderContainer accountId={this.props.params.accountId} hideTabs />}\n alwaysPrepend\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n >\n {blockedBy ? [] : accountIds.map(id =>\n <AccountContainer key={id} id={id} withNote={false} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}