Merge branch 'fix/attachments-cleanup' into 'develop'
[akkoma] / priv / static / packs / flavours / glitch / async / followers.js.map
index c66c2025ad9c95336e37ca9713513d998f1a5ef1..906304c8ae3be587c7f075988dfe6b8c6c02522f 100644 (file)
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/followers/index.js"],"names":["Followers","connect","state","props","accountIds","getIn","params","accountId","hasMore","e","_e$target","target","scrollTop","scrollHeight","clientHeight","_this","dispatch","expandFollowers","preventDefault","prevRouterProps","_ref","location","mastodonModalOpen","componentWillMount","this","fetchAccount","fetchFollowers","componentWillReceiveProps","nextProps","render","_this$props","loadMore","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_components_load_more__WEBPACK_IMPORTED_MODULE_14__","onClick","handleLoadMore","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_12__","flavours_glitch_components_column_back_button__WEBPACK_IMPORTED_MODULE_15__","react_router_scroll_4__WEBPACK_IMPORTED_MODULE_10__","scrollKey","shouldUpdateScroll","className","onScroll","handleScroll","flavours_glitch_features_account_timeline_containers_header_container__WEBPACK_IMPORTED_MODULE_13__","hideTabs","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","bool"],"mappings":"6SAwBqBA,EADpBC,kBALuB,SAACC,EAAOC,GAAR,MAAmB,CACzCC,WAAYF,EAAMG,MAAM,CAAC,aAAc,YAAaF,EAAMG,OAAOC,UAAW,UAC5EC,UAAWN,EAAMG,MAAM,CAAC,aAAc,YAAaF,EAAMG,OAAOC,UAAW,2NAyB5D,SAACE,GAAM,IAAAC,EAC8BD,EAAEE,OADhCD,EACZE,YADYF,EACDG,aADCH,EACaI,cAEgBC,EAAKZ,MAAMK,SAC1DO,EAAKZ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WuC,UAAQ,IAChE1C,EAAW2C,IAAI,SAAAC,GAAE,OAAIhB,OAAAC,EAAA,EAAAD,CAACiB,EAAA,EAAD,CAA2BD,GAAIA,EAAIE,UAAU,GAAtBF,KAC5CjB,OAnBPC,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,UACEL,OAAAC,EAAA,EAAAD,CAACmB,EAAA,EAAD,SA/C6BC,+BAElB,CACjB9C,OAAQ+C,IAAUC,OAAOC,WACzBvC,SAAUqC,IAAUG,KAAKD,WACzBnD,WAAYqD,IAAmBC,KAC/BlD,QAAS6C,IAAUM","file":"flavours/glitch/async/followers.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 {\n  fetchAccount,\n  fetchFollowers,\n  expandFollowers,\n} from 'flavours/glitch/actions/accounts';\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 HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';\nimport LoadMore from 'flavours/glitch/components/load_more';\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', 'followers', props.params.accountId, 'items']),\n  hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),\n});\n\n@connect(mapStateToProps)\nexport default class Followers extends ImmutablePureComponent {\n\n  static propTypes = {\n    params: PropTypes.object.isRequired,\n    dispatch: PropTypes.func.isRequired,\n    accountIds: ImmutablePropTypes.list,\n    hasMore: PropTypes.bool,\n  };\n\n  componentWillMount () {\n    this.props.dispatch(fetchAccount(this.props.params.accountId));\n    this.props.dispatch(fetchFollowers(this.props.params.accountId));\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(fetchFollowers(nextProps.params.accountId));\n    }\n  }\n\n  handleScroll = (e) => {\n    const { scrollTop, scrollHeight, clientHeight } = e.target;\n\n    if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {\n      this.props.dispatch(expandFollowers(this.props.params.accountId));\n    }\n  }\n\n  handleLoadMore = (e) => {\n    e.preventDefault();\n    this.props.dispatch(expandFollowers(this.props.params.accountId));\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, hasMore } = this.props;\n\n    let loadMore = null;\n\n    if (!accountIds) {\n      return (\n        <Column>\n          <LoadingIndicator />\n        </Column>\n      );\n    }\n\n    if (hasMore) {\n      loadMore = <LoadMore onClick={this.handleLoadMore} />;\n    }\n\n    return (\n      <Column>\n        <ColumnBackButton />\n\n        <ScrollContainer scrollKey='followers' shouldUpdateScroll={this.shouldUpdateScroll}>\n          <div className='scrollable' onScroll={this.handleScroll}>\n            <div className='followers'>\n              <HeaderContainer accountId={this.props.params.accountId} hideTabs />\n              {accountIds.map(id => <AccountContainer key={id} id={id} withNote={false} />)}\n              {loadMore}\n            </div>\n          </div>\n        </ScrollContainer>\n      </Column>\n    );\n  }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/followers/index.js"],"names":["Followers","connect","state","props","isAccount","getIn","params","accountId","accountIds","hasMore","column","scrollTop","e","target","scrollHeight","clientHeight","dispatch","expandFollowers","leading","c","componentWillMount","this","fetchAccount","fetchFollowers","componentWillReceiveProps","nextProps","render","emptyMessage","id","defaultMessage","ref","setRef","onClick","handleHeaderClick","scrollKey","onLoadMore","handleLoadMore","prepend","hideTabs","alwaysPrepend","map","withNote","ImmutablePureComponent","PropTypes","object","isRequired","func","ImmutablePropTypes","list","bool"],"mappings":"8UA2BMA,EADUC,kBANQ,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,W,wMA4BvD,WAClB,EAAKG,OAAOC,c,0CAGC,SAACC,GAAO,IAAD,EAC8BA,EAAEC,OADhC,EACZF,YADY,EACDG,aADC,EACaC,cAEgB,EAAKZ,MAAMM,SAC1D,EAAKN,MAAMa,SAASC,YAAgB,EAAKd,MAAMG,OAAOC,c,4CAIzC,IAAS,WACxB,EAAKJ,MAAMa,SAASC,YAAgB,EAAKd,MAAMG,OAAOC,aACrD,IAAK,CAAEW,SAAS,K,oCAEV,SAAAC,GACP,EAAKT,OAASS,I,8CA/BhBC,mBAAA,WACOC,KAAKlB,MAAMK,aACda,KAAKlB,MAAMa,SAASM,YAAaD,KAAKlB,MAAMG,OAAOC,YACnDc,KAAKlB,MAAMa,SAASO,YAAeF,KAAKlB,MAAMG,OAAOC,c,EAIzDiB,0BAAA,SAA2BC,GACrBA,EAAUnB,OAAOC,YAAcc,KAAKlB,MAAMG,OAAOC,WAAakB,EAAUnB,OAAOC,YACjFc,KAAKlB,MAAMa,SAASM,YAAaG,EAAUnB,OAAOC,YAClDc,KAAKlB,MAAMa,SAASO,YAAeE,EAAUnB,OAAOC,c,EAwBxDmB,OAAA,WAAW,IAAD,EACmCL,KAAKlB,MAAxCK,EADA,EACAA,WAAYC,EADZ,EACYA,QAEpB,IAHQ,EACqBL,UAG3B,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAKI,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMmB,EAAe,YAAC,IAAD,CAAkBC,GAAG,0BAA0BC,eAAe,kCAEnF,OACE,kBAAC,IAAD,CAAQC,IAAKT,KAAKU,QAChB,YAAC,IAAD,CAAqBC,QAASX,KAAKY,oBAEnC,YAAC,IAAD,CACEC,UAAU,YACVzB,QAASA,EACT0B,WAAYd,KAAKe,eACjBC,QAAS,YAAC,IAAD,CAAiB9B,UAAWc,KAAKlB,MAAMG,OAAOC,UAAW+B,UAAQ,IAC1EC,eAAa,EACbZ,aAAcA,QANhB,EAQGnB,EAAWgC,IAAI,SAAAZ,GAAE,OAChB,YAAC,IAAD,CAA2BA,GAAIA,EAAIa,UAAU,GAAtBb,Q,GA9EXc,K,0BAEH,CACjBpC,OAAQqC,IAAUC,OAAOC,WACzB7B,SAAU2B,IAAUG,KAAKD,WACzBrC,WAAYuC,IAAmBC,KAC/BvC,QAASkC,IAAUM,KACnB7C,UAAWuC,IAAUM,O","file":"flavours/glitch/async/followers.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { debounce } from 'lodash';\nimport LoadingIndicator from 'flavours/glitch/components/loading_indicator';\nimport {\n  fetchAccount,\n  fetchFollowers,\n  expandFollowers,\n} from 'flavours/glitch/actions/accounts';\nimport { FormattedMessage } from 'react-intl';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ProfileColumnHeader from 'flavours/glitch/features/account/components/profile_column_header';\nimport HeaderContainer from 'flavours/glitch/features/account_timeline/containers/header_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport MissingIndicator from 'flavours/glitch/components/missing_indicator';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst mapStateToProps = (state, props) => ({\n  isAccount: !!state.getIn(['accounts', props.params.accountId]),\n  accountIds: state.getIn(['user_lists', 'followers', props.params.accountId, 'items']),\n  hasMore: !!state.getIn(['user_lists', 'followers', props.params.accountId, 'next']),\n});\n\nexport default @connect(mapStateToProps)\nclass Followers extends ImmutablePureComponent {\n\n  static propTypes = {\n    params: PropTypes.object.isRequired,\n    dispatch: PropTypes.func.isRequired,\n    accountIds: ImmutablePropTypes.list,\n    hasMore: PropTypes.bool,\n    isAccount: PropTypes.bool,\n  };\n\n  componentWillMount () {\n    if (!this.props.accountIds) {\n      this.props.dispatch(fetchAccount(this.props.params.accountId));\n      this.props.dispatch(fetchFollowers(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(fetchFollowers(nextProps.params.accountId));\n    }\n  }\n\n  handleHeaderClick = () => {\n    this.column.scrollTop();\n  }\n\n  handleScroll = (e) => {\n    const { scrollTop, scrollHeight, clientHeight } = e.target;\n\n    if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {\n      this.props.dispatch(expandFollowers(this.props.params.accountId));\n    }\n  }\n\n  handleLoadMore = debounce(() => {\n    this.props.dispatch(expandFollowers(this.props.params.accountId));\n  }, 300, { leading: true });\n\n  setRef = c => {\n    this.column = c;\n  }\n\n  render () {\n    const { accountIds, hasMore, isAccount } = 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 = <FormattedMessage id='account.followers.empty' defaultMessage='No one follows this user yet.' />;\n\n    return (\n      <Column ref={this.setRef}>\n        <ProfileColumnHeader onClick={this.handleHeaderClick} />\n\n        <ScrollableList\n          scrollKey='followers'\n          hasMore={hasMore}\n          onLoadMore={this.handleLoadMore}\n          prepend={<HeaderContainer accountId={this.props.params.accountId} hideTabs />}\n          alwaysPrepend\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":""}
\ No newline at end of file