Merge branch 'docs_updating' into 'develop'
[akkoma] / priv / static / packs / flavours / glitch / async / reblogs.js.map
1 {"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/reblogs/index.js"],"names":["messages","defineMessages","heading","Reblogs","connect","state","props","accountIds","getIn","params","statusId","injectIntl","column","scrollTop","c","componentWillMount","this","dispatch","fetchReblogs","componentWillReceiveProps","nextProps","render","intl","emptyMessage","id","defaultMessage","ref","setRef","icon","title","formatMessage","onClick","handleHeaderClick","showBackButton","scrollKey","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list"],"mappings":"2SAaMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,wDASHC,EAFUC,kBAJQ,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,eAAgBF,EAAMG,OAAOC,a,GAIrEC,a,sMAsBqB,WAClB,EAAKC,OAAOC,c,oCAGL,SAAAC,GACP,EAAKF,OAASE,I,8CAjBhBC,mBAAA,WACOC,KAAKV,MAAMC,YACdS,KAAKV,MAAMW,SAASC,YAAaF,KAAKV,MAAMG,OAAOC,Y,EAIvDS,0BAAA,SAA0BC,GACpBA,EAAUX,OAAOC,WAAaM,KAAKV,MAAMG,OAAOC,UAAYU,EAAUX,OAAOC,UAC/EM,KAAKV,MAAMW,SAASC,YAAaE,EAAUX,OAAOC,Y,EAYtDW,OAAA,WAAW,IAAD,EACqBL,KAAKV,MAA1BgB,EADA,EACAA,KAAMf,EADN,EACMA,WAEd,IAAKA,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMgB,EAAe,YAAC,IAAD,CAAkBC,GAAG,uBAAuBC,eAAe,iFAEhF,OACE,kBAAC,IAAD,CAAQC,IAAKV,KAAKW,QAChB,YAAC,IAAD,CACEC,KAAK,UACLC,MAAOP,EAAKQ,cAAc9B,EAASE,SACnC6B,QAASf,KAAKgB,kBACdC,gBAAc,IAGhB,YAAC,IAAD,CACEC,UAAU,UACVX,aAAcA,QAFhB,EAIGhB,EAAW4B,IAAI,SAAAX,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIY,UAAU,GAAtBZ,Q,GAxDba,K,0BAED,CACjB5B,OAAQ6B,IAAUC,OAAOC,WACzBvB,SAAUqB,IAAUG,KAAKD,WACzBjC,WAAYmC,IAAmBC,KAC/BrB,KAAMgB,IAAUC,OAAOC,a","file":"flavours/glitch/async/reblogs.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport { fetchReblogs } from 'flavours/glitch/actions/interactions';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.reblogged_by', defaultMessage: 'Boosted by' },\n});\n\nconst mapStateToProps = (state, props) => ({\n accountIds: state.getIn(['user_lists', 'reblogged_by', props.params.statusId]),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Reblogs extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n accountIds: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n };\n\n componentWillMount () {\n if (!this.props.accountIds) {\n this.props.dispatch(fetchReblogs(this.props.params.statusId));\n }\n }\n\n componentWillReceiveProps(nextProps) {\n if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {\n this.props.dispatch(fetchReblogs(nextProps.params.statusId));\n }\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n render () {\n const { intl, accountIds } = this.props;\n\n if (!accountIds) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = <FormattedMessage id='status.reblogs.empty' defaultMessage='No one has boosted this toot yet. When someone does, they will show up here.' />;\n\n return (\n <Column ref={this.setRef}>\n <ColumnHeader\n icon='retweet'\n title={intl.formatMessage(messages.heading)}\n onClick={this.handleHeaderClick}\n showBackButton\n />\n\n <ScrollableList\n scrollKey='reblogs'\n emptyMessage={emptyMessage}\n >\n {accountIds.map(id =>\n <AccountContainer key={id} id={id} withNote={false} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}