2019-02-10 11:55:22 -07:00
|
|
|
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/lists/index.js"],"names":["messages","defineMessages","heading","id","defaultMessage","subheading","getOrderedLists","createSelector","state","get","lists","toList","filter","item","sort","a","b","localeCompare","Lists","connect","injectIntl","componentWillMount","this","props","dispatch","fetchLists","render","_this$props","intl","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","flavours_glitch_features_ui_components_column__WEBPACK_IMPORTED_MODULE_8__","icon","formatMessage","flavours_glitch_components_column_back_button_slim__WEBPACK_IMPORTED_MODULE_9__","_components_new_list_form__WEBPACK_IMPORTED_MODULE_15__","className","flavours_glitch_features_ui_components_column_subheading__WEBPACK_IMPORTED_MODULE_14__","text","map","list","flavours_glitch_features_ui_components_column_link__WEBPACK_IMPORTED_MODULE_13__","to","flavours_glitch_components_loading_indicator__WEBPACK_IMPORTED_MODULE_7__","ImmutablePureComponent","params","PropTypes","object","isRequired","func","ImmutablePropTypes"],"mappings":"4SAeMA,EAAWC,YAAe,CAC9BC,QAAO,CAAAC,GAAA,eAAAC,eAAA,SACPC,WAAU,CAAAF,GAAA,mBAAAC,eAAA,gBAGNE,EAAkBC,YAAe,CAAC,SAAAC,GAAK,OAAIA,EAAMC,IAAI,WAAW,SAAAC,GACpE,OAAKA,EAIEA,EAAMC,SAASC,OAAO,SAAAC,GAAI,QAAMA,IAAMC,KAAK,SAACC,EAAGC,GAAJ,OAAUD,EAAEN,IAAI,SAASQ,cAAcD,EAAEP,IAAI,YAHtFC,IAYUQ,EAFpBC,kBAJuB,SAAAX,GAAK,MAAK,CAChCE,MAAOJ,EAAgBE,QAIxBY,2HAUCC,mBAAA,WACEC,KAAKC,MAAMC,SAASC,kBAGtBC,OAAA,WAAU,IAAAC,EACgBL,KAAKC,MAArBK,EADAD,EACAC,KAAMlB,EADNiB,EACMjB,MAEd,OAAKA,EASHmB,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,CAAQC,KAAK,OAAO9B,QAAS0B,EAAKK,cAAcjC,EAASE,eAAzD,EACE2B,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,IAEAL,OAAAC,EAAA,EAAAD,CAACM,EAAA,EAAD,IAEAN,OAAAC,EAAA,EAAAD,CAAA,OAAKO,UAAU,mBAAf,EACEP,OAAAC,EAAA,EAAAD,CAACQ,EAAA,EAAD,CAAkBC,KAAMV,EAAKK,cAAcjC,EAASK,cAEnDK,EAAM6B,IAAI,SAAAC,GAAI,OACbX,OAAAC,EAAA,EAAAD,CAACY,EAAA,EAAD,CAAiCC,GAAE,mBAAqBF,EAAK/B,IAAI,MAASuB,KAAK,UAAUM,KAAME,EAAK/B,IAAI,UAAvF+B,EAAK/B,IAAI,WAhB9BoB,OAAAC,EAAA,EAAAD,CAACE,EAAA,EAAD,UACEF,OAAAC,EAAA,EAAAD,CAACc,EAAA,EAAD,SAnByBC,+BAEd,CACjBC,OAAQC,IAAUC,OAAOC,WACzBxB,SAAUsB,IAAUG,KAAKD,WACzBtC,MAAOwC,IAAmBV,KAC1BZ,KAAMkB,IAAUC,OAAOC","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 } 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';\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\n@connect(mapStateToProps)\n@injectIntl\nexport default class 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 };\n\n componentWillMount () {\n this.props.dispatch(fetchLists());\n }\n\n render () {\n const { intl, lists } = this.props;\n\
|