Pleroma/priv/static/packs/flavours/glitch/async/lists.js.map
Haelwenn (lanodan) Monnier 2a850abbeb
MastoFE: Bundle 2020-01-20
2020-02-29 06:41:13 +01:00

1 line
4.5 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/lists/index.js"],"names":["messages","defineMessages","heading","subheading","getOrderedLists","createSelector","state","get","lists","toList","filter","item","sort","a","b","localeCompare","Lists","connect","injectIntl","componentWillMount","this","props","dispatch","fetchLists","render","intl","multiColumn","emptyMessage","id","defaultMessage","bindToDocument","icon","formatMessage","text","scrollKey","map","list","to","ImmutablePureComponent","params","PropTypes","object","isRequired","func","ImmutablePropTypes","bool"],"mappings":"2TAgBMA,EAAWC,YAAe,CAC9BC,QAAQ,CAAD,0CACPC,WAAW,CAAD,qDAGNC,EAAkBC,YAAe,CAAC,SAAAC,GAAK,OAAIA,EAAMC,IAAI,YAAW,SAAAC,GACpE,OAAKA,EAIEA,EAAMC,SAASC,QAAO,SAAAC,GAAI,QAAMA,KAAMC,MAAK,SAACC,EAAGC,GAAJ,OAAUD,EAAEN,IAAI,SAASQ,cAAcD,EAAEP,IAAI,aAHtFC,KAYLQ,EAFUC,mBAJQ,SAAAX,GAAK,MAAK,CAChCE,MAAOJ,EAAgBE,M,GAIxBY,a,8GAWCC,mBAAA,WACEC,KAAKC,MAAMC,SAASC,gB,EAGtBC,OAAA,WAAW,IAAD,EAC6BJ,KAAKC,MAAlCI,EADA,EACAA,KAAMjB,EADN,EACMA,MAAOkB,EADb,EACaA,YAErB,IAAKlB,EACH,OACE,YAAC,IAAD,UACE,YAAC,IAAD,KAKN,IAAMmB,EAAe,YAAC,IAAD,CAAkBC,GAAG,qBAAqBC,eAAe,6EAE9E,OACE,YAAC,IAAD,CAAQC,gBAAiBJ,EAAaK,KAAK,OAAO7B,QAASuB,EAAKO,cAAchC,EAASE,eAAvF,EACE,YAAC,IAAD,IAEA,YAAC,IAAD,IAEA,YAAC,IAAD,CAAkB+B,KAAMR,EAAKO,cAAchC,EAASG,cACpD,YAAC,IAAD,CACE+B,UAAU,QACVP,aAAcA,EACdG,gBAAiBJ,QAHnB,EAKGlB,EAAM2B,KAAI,SAAAC,GAAI,OACb,YAAC,IAAD,CAAiCC,GAAE,mBAAqBD,EAAK7B,IAAI,MAASwB,KAAK,UAAUE,KAAMG,EAAK7B,IAAI,UAAvF6B,EAAK7B,IAAI,a,GAxClB+B,K,0BAEC,CACjBC,OAAQC,IAAUC,OAAOC,WACzBpB,SAAUkB,IAAUG,KAAKD,WACzBlC,MAAOoC,IAAmBR,KAC1BX,KAAMe,IAAUC,OAAOC,WACvBhB,YAAac,IAAUK,O","file":"flavours/glitch/async/lists.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 Column from 'flavours/glitch/features/ui/components/column';\nimport ColumnBackButtonSlim from 'flavours/glitch/components/column_back_button_slim';\nimport { fetchLists } from 'flavours/glitch/actions/lists';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ColumnLink from 'flavours/glitch/features/ui/components/column_link';\nimport ColumnSubheading from 'flavours/glitch/features/ui/components/column_subheading';\nimport NewListForm from './components/new_list_form';\nimport { createSelector } from 'reselect';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\n\nconst messages = defineMessages({\n heading: { id: 'column.lists', defaultMessage: 'Lists' },\n subheading: { id: 'lists.subheading', defaultMessage: 'Your lists' },\n});\n\nconst getOrderedLists = createSelector([state => state.get('lists')], lists => {\n if (!lists) {\n return lists;\n }\n\n return lists.toList().filter(item => !!item).sort((a, b) => a.get('title').localeCompare(b.get('title')));\n});\n\nconst mapStateToProps = state => ({\n lists: getOrderedLists(state),\n});\n\nexport default @connect(mapStateToProps)\n@injectIntl\nclass Lists extends ImmutablePureComponent {\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n lists: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n multiColumn: PropTypes.bool,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchLists());\n }\n\n render () {\n const { intl, lists, multiColumn } = this.props;\n\n if (!lists) {\n return (\n <Column>\n <LoadingIndicator />\n </Column>\n );\n }\n\n const emptyMessage = <FormattedMessage id='empty_column.lists' defaultMessage=\"You don't have any lists yet. When you create one, it will show up here.\" />;\n\n return (\n <Column bindToDocument={!multiColumn} icon='bars' heading={intl.formatMessage(messages.heading)}>\n <ColumnBackButtonSlim />\n\n <NewListForm />\n\n <ColumnSubheading text={intl.formatMessage(messages.subheading)} />\n <ScrollableList\n scrollKey='lists'\n emptyMessage={emptyMessage}\n bindToDocument={!multiColumn}\n >\n {lists.map(list =>\n <ColumnLink key={list.get('id')} to={`/timelines/list/${list.get('id')}`} icon='list-ul' text={list.get('title')} />\n )}\n </ScrollableList>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}