pleroma/priv/static/packs/features/list_adder.js.map

1 line
9.5 KiB
Plaintext

{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/list_adder/components/list.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/list_adder/components/account.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/list_adder/index.js"],"names":["messages","defineMessages","remove","id","defaultMessage","add","List","connect","state","_ref","listId","added","list","get","getIn","includes","dispatch","_ref2","onRemove","removeFromListAdder","onAdd","addToListAdder","injectIntl","render","button","_this$props","this","props","intl","Object","jsx","icon_button","icon","title","formatMessage","onClick","className","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","PropTypes","object","func","bool","Account","getAccount","makeGetAccount","accountId","account","avatar","size","display_name","getOrderedLists","createSelector","lists","toList","filter","item","sort","a","b","localeCompare","ListAdder","listIds","onInitialize","setupListAdder","onReset","resetListAdder","componentDidMount","componentWillUnmount","_this$props2","account_Account","new_list_form","ListId","list_List","string","onClose"],"mappings":"oOASMA,EAAWC,YAAe,CAC9BC,OAAM,CAAAC,GAAA,uBAAAC,eAAA,oBACNC,IAAG,CAAAF,GAAA,oBAAAC,eAAA,iBAeCE,EAFUC,kBAVQ,SAACC,EAADC,GAAA,IAAUC,EAAVD,EAAUC,OAAQC,EAAlBF,EAAkBE,MAAlB,MAA+B,CACrDC,KAAMJ,EAAMK,IAAI,SAASA,IAAIH,GAC7BC,WAAwB,IAAVA,EAAwBH,EAAMM,MAAM,CAAC,YAAa,QAAS,UAAUC,SAASL,GAAUC,IAG7E,SAACK,EAADC,GAAA,IAAaP,EAAbO,EAAaP,OAAb,MAA2B,CACpDQ,SAAU,kBAAMF,EAASG,YAAoBT,KAC7CU,MAAO,kBAAMJ,EAASK,YAAeX,UAItCY,mHAeCC,OAAA,WAAU,IAGJC,EAHIC,EACuCC,KAAKC,MAA5Cf,EADAa,EACAb,KAA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QgE,GAAhBA,WAlCpBrC,+BAEH,CACjBW,UAAWP,IAAUmC,OAAOpC,WAC5BqC,QAASpC,IAAUE,KAAKH,WACxBZ,KAAMa,IAAUC,OAAOF,WACvByB,aAAcxB,IAAUE,KAAKH,WAC7B2B,QAAS1B,IAAUE,KAAKH,WACxBwB,QAAS1B,IAAmB1B,KAAK4B","file":"features/list_adder.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport IconButton from '../../../components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { removeFromListAdder, addToListAdder } from '../../../actions/lists';\n\nconst messages = defineMessages({\n remove: { id: 'lists.account.remove', defaultMessage: 'Remove from list' },\n add: { id: 'lists.account.add', defaultMessage: 'Add to list' },\n});\n\nconst MapStateToProps = (state, { listId, added }) => ({\n list: state.get('lists').get(listId),\n added: typeof added === 'undefined' ? state.getIn(['listAdder', 'lists', 'items']).includes(listId) : added,\n});\n\nconst mapDispatchToProps = (dispatch, { listId }) => ({\n onRemove: () => dispatch(removeFromListAdder(listId)),\n onAdd: () => dispatch(addToListAdder(listId)),\n});\n\nexport default @connect(MapStateToProps, mapDispatchToProps)\n@injectIntl\nclass List extends ImmutablePureComponent {\n\n static propTypes = {\n list: ImmutablePropTypes.map.isRequired,\n intl: PropTypes.object.isRequired,\n onRemove: PropTypes.func.isRequired,\n onAdd: PropTypes.func.isRequired,\n added: PropTypes.bool,\n };\n\n static defaultProps = {\n added: false,\n };\n\n render () {\n const { list, intl, onRemove, onAdd, added } = this.props;\n\n let button;\n\n if (added) {\n button = <IconButton icon='times' title={intl.formatMessage(messages.remove)} onClick={onRemove} />;\n } else {\n button = <IconButton icon='plus' title={intl.formatMessage(messages.add)} onClick={onAdd} />;\n }\n\n return (\n <div className='list'>\n <div className='list__wrapper'>\n <div className='list__display-name'>\n <i className='fa fa-fw fa-list-ul column-link__icon' />\n {list.get('title')}\n </div>\n\n <div className='account__relationship'>\n {button}\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { makeGetAccount } from '../../../selectors';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Avatar from '../../../components/avatar';\nimport DisplayName from '../../../components/display_name';\nimport { injectIntl } from 'react-intl';\n\nconst makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = (state, { accountId }) => ({\n account: getAccount(state, accountId),\n });\n\n return mapStateToProps;\n};\n\n\nexport default @connect(makeMapStateToProps)\n@injectIntl\nclass Account extends ImmutablePureComponent {\n\n static propTypes = {\n account: ImmutablePropTypes.map.isRequired,\n };\n\n render () {\n const { account } = this.props;\n return (\n <div className='account'>\n <div className='account__wrapper'>\n <div className='account__display-name'>\n <div className='account__avatar-wrapper'><Avatar account={account} size={36} /></div>\n <DisplayName account={account} />\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { connect } from 'react-redux';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { injectIntl } from 'react-intl';\nimport { setupListAdder, resetListAdder } from '../../actions/lists';\nimport { createSelector } from 'reselect';\nimport List from './components/list';\nimport Account from './components/account';\nimport NewListForm from '../lists/components/new_list_form';\n// hack\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 listIds: getOrderedLists(state).map(list=>list.get('id')),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onInitialize: accountId => dispatch(setupListAdder(accountId)),\n onReset: () => dispatch(resetListAdder()),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass ListAdder extends ImmutablePureComponent {\n\n static propTypes = {\n accountId: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n onInitialize: PropTypes.func.isRequired,\n onReset: PropTypes.func.isRequired,\n listIds: ImmutablePropTypes.list.isRequired,\n };\n\n componentDidMount () {\n const { onInitialize, accountId } = this.props;\n onInitialize(accountId);\n }\n\n componentWillUnmount () {\n const { onReset } = this.props;\n onReset();\n }\n\n render () {\n const { accountId, listIds } = this.props;\n\n return (\n <div className='modal-root__modal list-adder'>\n <div className='list-adder__account'>\n <Account accountId={accountId} />\n </div>\n\n <NewListForm />\n\n\n <div className='list-adder__lists'>\n {listIds.map(ListId => <List key={ListId} listId={ListId} />)}\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""}