mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-05 16:13:12 +00:00
1 line
9.5 KiB
Plaintext
1 line
9.5 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_adder/components/list.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_adder/components/account.js","webpack:///app/javascript/builds/pleroma/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","fixedWidth","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":"4OAUMA,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,M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mC,GAAM,OAAI9C,OAAAC,EAAA,EAAAD,CAAC+C,EAAD,CAAmBlE,OAAQiE,GAAhBA,WAlCpBrC,+BAEH,CACjBW,UAAWP,IAAUmC,OAAOpC,WAC5BqC,QAASpC,IAAUE,KAAKH,WACxBb,KAAMc,IAAUC,OAAOF,WACvByB,aAAcxB,IAAUE,KAAKH,WAC7B2B,QAAS1B,IAAUE,KAAKH,WACxBwB,QAAS1B,IAAmB3B,KAAK6B","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';\nimport Icon from 'mastodon/components/icon';\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 <Icon id='list-ul' className='column-link__icon' fixedWidth />\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":""} |