spc-pleroma/priv/static/packs/flavours/glitch/async/favourited_statuses.js.map

1 line
5.7 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/favourited_statuses/index.js"],"names":["messages","defineMessages","heading","id","defaultMessage","Favourites","connect","state","statusIds","getIn","isLoading","hasMore","injectIntl","_this$props","_this","props","columnId","dispatch","removeColumn","addColumn","dir","_this$props2","moveColumn","column","scrollTop","c","lodash_debounce__WEBPACK_IMPORTED_MODULE_4___default","expandFavouritedStatuses","leading","componentWillMount","this","fetchFavouritedStatuses","render","_this$props3","intl","multiColumn","pinned","react__WEBPACK_IMPORTED_MODULE_5___default","a","createElement","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_10__","ref","setRef","name","label","formatMessage","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_components_column_header__WEBPACK_IMPORTED_MODULE_11__","icon","title","onPin","handlePin","onMove","handleMove","onClick","handleHeaderClick","showBackButton","flavours_glitch_components_status_list__WEBPACK_IMPORTED_MODULE_13__","trackScroll","scrollKey","onLoadMore","handleLoadMore","ImmutablePureComponent","PropTypes","func","isRequired","ImmutablePropTypes","list","object","string","bool"],"mappings":"mTAaMA,EAAWC,YAAe,CAC9BC,QAAO,CAAAC,GAAA,oBAAAC,eAAA,gBAWYC,EAFpBC,kBANuB,SAAAC,GAAK,MAAK,CAChCC,UAAWD,EAAME,MAAM,CAAC,eAAgB,aAAc,UACtDC,UAAWH,EAAME,MAAM,CAAC,eAAgB,aAAc,cAAc,GACpEE,UAAWJ,EAAME,MAAM,CAAC,eAAgB,aAAc,cAIvDG,wNAiBa,WAAM,IAAAC,EACeC,EAAKC,MAA5BC,EADQH,EACRG,SAAUC,EADFJ,EACEI,SAGhBA,EADED,EACOE,YAAaF,GAEbG,YAAU,aAAc,4DAIxB,SAACC,GAAQ,IAAAC,EACWP,EAAKC,MAA5BC,EADYK,EACZL,UACRC,EAFoBI,EACFJ,UACTK,YAAWN,EAAUI,kEAGZ,WAClBN,EAAKS,OAAOC,+DAGL,SAAAC,GACPX,EAAKS,OAASE,6DAGCC,IAAS,WACxBZ,EAAKC,MAAME,SAASU,gBACnB,IAAK,CAAEC,SAAS,mDA7BnBC,mBAAA,WACEC,KAAKf,MAAME,SAASc,kBA8BtBC,OAAA,WAAU,IAAAC,EAC+DH,KAAKf,MAApEmB,EADAD,EACAC,KAAM1B,EADNyB,EACMzB,UAAWQ,EADjBiB,EACiBjB,SAAUmB,EAD3BF,EAC2BE,YAAaxB,EADxCsB,EACwCtB,QAASD,EADjDuB,EACiDvB,UACnD0B,IAAWpB,EAEjB,OACEqB,EAAAC,EAAAC,cAACC,EAAA,EAAD,CAAQC,IAAKX,KAAKY,OAAQC,KAAK,aAAaC,MAAOV,EAAKW,cAAc7C,EAASE,UAC7E4C,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,CACEC,KAAK,OACLC,MAAOhB,EAAKW,cAAc7C,EAASE,SACnCiD,MAAOrB,KAAKsB,UACZC,OAAQvB,KAAKwB,WACbC,QAASzB,KAAK0B,kBACdpB,OAAQA,EACRD,YAAaA,EACbsB,gBAAc,IAGhBX,OAAAC,EAAA,EAAAD,CAACY,EAAA,EAAD,CACEC,aAAcvB,EACd5B,UAAWA,EACXoD,UAAS,uBAAyB5C,EAClCL,QAASA,EACTD,UAAWA,EACXmD,WAAY/B,KAAKgC,sBAlEaC,+BAEnB,CACjB9C,SAAU+C,IAAUC,KAAKC,WACzB1D,UAAW2D,IAAmBC,KAAKF,WACnChC,KAAM8B,IAAUK,OAAOH,WACvBlD,SAAUgD,IAAUM,OACpBnC,YAAa6B,IAAUO,KACvB5D,QAASqD,IAAUO,KACnB7D,UAAWsD,IAAUO","file":"flavours/glitch/async/favourited_statuses.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { fetchFavouritedStatuses, expandFavouritedStatuses } from 'flavours/glitch/actions/favourites';\nimport Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';\nimport StatusList from 'flavours/glitch/components/status_list';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { debounce } from 'lodash';\n\nconst messages = defineMessages({\n heading: { id: 'column.favourites', defaultMessage: 'Favourites' },\n});\n\nconst mapStateToProps = state => ({\n statusIds: state.getIn(['status_lists', 'favourites', 'items']),\n isLoading: state.getIn(['status_lists', 'favourites', 'isLoading'], true),\n hasMore: !!state.getIn(['status_lists', 'favourites', 'next']),\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class Favourites extends ImmutablePureComponent {\n\n static propTypes = {\n dispatch: PropTypes.func.isRequired,\n statusIds: ImmutablePropTypes.list.isRequired,\n intl: PropTypes.object.isRequired,\n columnId: PropTypes.string,\n multiColumn: PropTypes.bool,\n hasMore: PropTypes.bool,\n isLoading: PropTypes.bool,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchFavouritedStatuses());\n }\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('FAVOURITES', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setRef = c => {\n this.column = c;\n }\n\n handleLoadMore = debounce(() => {\n this.props.dispatch(expandFavouritedStatuses());\n }, 300, { leading: true })\n\n render () {\n const { intl, statusIds, columnId, multiColumn, hasMore, isLoading } = this.props;\n const pinned = !!columnId;\n\n return (\n <Column ref={this.setRef} name='favourites' label={intl.formatMessage(messages.heading)}>\n <ColumnHeader\n icon='star'\n title={intl.formatMessage(messages.heading)}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n showBackButton\n />\n\n <StatusList\n trackScroll={!pinned}\n statusIds={statusIds}\n scrollKey={`favourited_statuses-${columnId}`}\n hasMore={hasMore}\n isLoading={isLoading}\n onLoadMore={this.handleLoadMore}\n />\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}