akkoma/priv/static/packs/flavours/glitch/async/favourites.js.map

1 line
4.1 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/favourites/index.js"],"names":["Favourites","connect","state","props","accountIds","getIn","params","statusId","prevRouterProps","_ref","location","mastodonModalOpen","componentWillMount","this","dispatch","fetchFavourites","componentWillReceiveProps","nextProps","render","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_12__","flavours_glitch_components_column_back_button__WEBPACK_IMPORTED_MODULE_13__","react_router_scroll_4__WEBPACK_IMPORTED_MODULE_10__","scrollKey","shouldUpdateScroll","className","map","id","flavours_glitch_containers_account_container__WEBPACK_IMPORTED_MODULE_11__","withNote","flavours_glitch_components_loading_indicator__WEBPACK_IMPORTED_MODULE_8__","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list"],"mappings":"2RAiBqBA,EADpBC,kBAJuB,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,gBAAiBF,EAAMG,OAAOC,sNAsBhD,SAACC,EAADC,GAAmC,IAAfC,EAAeD,EAAfC,SACvC,UAAOF,GAAmB,IAAIE,UAAY,IAAIR,OAAS,IAAIS,qBAClDD,EAASR,OAASQ,EAASR,MAAMS,mEAZ5CC,mBAAA,WACEC,KAAKV,MAAMW,SAASC,YAAgBF,KAAKV,MAAMG,OAAOC,cAGxDS,0BAAA,SAA2BC,GACrBA,EAAUX,OAAOC,WAAaM,KAAKV,MAAMG,OAAOC,UAAYU,EAAUX,OAAOC,UAC/EM,KAAKV,MAAMW,SAASC,YAAgBE,EAAUX,OAAOC,cASzDW,OAAA,WAAU,IACAd,EAAeS,KAAKV,MAApBC,WAER,OAAKA,EASHe,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,UACEF,OAAAC,EAAA,EAAAD,CAACG,EAAA,EAAD,IAEAH,OAAAC,EAAA,EAAAD,CAACI,EAAA,EAAD,CAAiBC,UAAU,aAAaC,mBAAoBZ,KAAKY,yBAAjE,EACEN,OAAAC,EAAA,EAAAD,CAAA,OAAKO,UAAU,mBAAf,EACGtB,EAAWuB,IAAI,SAAAC,GAAE,OAAIT,OAAAC,EAAA,EAAAD,CAACU,EAAA,EAAD,CAA2BD,GAAIA,EAAIE,UAAU,GAAtBF,QAZjDT,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,UACEF,OAAAC,EAAA,EAAAD,CAACY,EAAA,EAAD,SA7B8BC,+BAEnB,CACjB1B,OAAQ2B,IAAUC,OAAOC,WACzBrB,SAAUmB,IAAUG,KAAKD,WACzB/B,WAAYiC,IAAmBC","file":"flavours/glitch/async/favourites.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 { fetchFavourites } from 'flavours/glitch/actions/interactions';\nimport { ScrollContainer } from 'react-router-scroll-4';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnBackButton from 'flavours/glitch/components/column_back_button';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\nconst mapStateToProps = (state, props) => ({\n accountIds: state.getIn(['user_lists', 'favourited_by', props.params.statusId]),\n});\n\n@connect(mapStateToProps)\nexport default class Favourites extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n accountIds: ImmutablePropTypes.list,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchFavourites(this.props.params.statusId));\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {\n this.props.dispatch(fetchFavourites(nextProps.params.statusId));\n }\n }\n\n shouldUpdateScroll = (prevRouterProps, { location }) => {\n if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;\n return !(location.state && location.state.mastodonModalOpen);\n }\n\n render () {\n const { accountIds } = this.props;\n\n if (!accountIds) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n return (\n <Column>\n <ColumnBackButton />\n\n <ScrollContainer scrollKey='favourites' shouldUpdateScroll={this.shouldUpdateScroll}>\n <div className='scrollable'>\n {accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}\n </div>\n </ScrollContainer>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}