mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-30 17:11:40 +00:00
1 line
16 KiB
Plaintext
1 line
16 KiB
Plaintext
{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_editor/components/account.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_editor/components/search.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_editor/components/edit_list_form.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/list_editor/index.js"],"names":["messages","defineMessages","remove","id","defaultMessage","add","Account","connect","getAccount","makeGetAccount","state","_ref","accountId","added","account","getIn","includes","dispatch","_ref2","onRemove","removeFromListEditor","onAdd","addToListEditor","injectIntl","render","button","_this$props","this","props","intl","Object","jsx","icon_button","icon","title","formatMessage","onClick","className","avatar","size","display_name","ImmutablePureComponent","ImmutablePropTypes","map","isRequired","PropTypes","object","func","bool","search","Search","value","onSubmit","fetchListSuggestions","onClear","clearListSuggestions","onChange","changeListSuggestions","e","_this","target","keyCode","hasValue","length","style","display","type","handleChange","onKeyUp","handleKeyUp","placeholder","role","tabIndex","handleClear","classNames","active","aria-label","React","PureComponent","ListForm","disabled","changeListEditorTitle","submitListEditor","preventDefault","handleSubmit","handleClick","ListEditor","accountIds","searchAccountIds","onInitialize","listId","setupListEditor","onReset","resetListEditor","componentDidMount","componentWillUnmount","_this$props2","showSearch","edit_list_form_ListForm","search_Search","account_Account","optional_motion","defaultStyle","x","spring","stiffness","damping","transform","visibility","string","onClose","list"],"mappings":"8PAYMA,EAAWC,YAAe,CAC9BC,OAAM,CAAAC,GAAA,uBAAAC,eAAA,oBACNC,IAAG,CAAAF,GAAA,oBAAAC,eAAA,iBAqBCE,EAFUC,kBAhBY,WAC1B,IAAMC,EAAaC,cAOnB,OALwB,SAACC,EAADC,GAAA,IAAUC,EAAVD,EAAUC,UAAWC,EAArBF,EAAqBE,MAArB,MAAkC,CACxDC,QAASN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AAAC,EAAA,EAAAD,CAACsE,EAAD,CAAyBxF,UAAWA,GAAtBA,cA3CxC6B,+BAEJ,CACjBiD,OAAQ7C,IAAUgE,OAAOjE,WACzBkE,QAASjE,IAAUE,KAAKH,WACxBf,KAAMgB,IAAUC,OAAOF,WACvB6C,aAAc5C,IAAUE,KAAKH,WAC7BU,QAAST,IAAUE,KAAKH,WACxBgD,QAAS/C,IAAUE,KAAKH,WACxB2C,WAAY7C,IAAmBqE,KAAKnE,WACpC4C,iBAAkB9C,IAAmBqE,KAAKnE","file":"features/list_editor.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\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 IconButton from '../../../components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { removeFromListEditor, addToListEditor } 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 makeMapStateToProps = () => {\n const getAccount = makeGetAccount();\n\n const mapStateToProps = (state, { accountId, added }) => ({\n account: getAccount(state, accountId),\n added: typeof added === 'undefined' ? state.getIn(['listEditor', 'accounts', 'items']).includes(accountId) : added,\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { accountId }) => ({\n onRemove: () => dispatch(removeFromListEditor(accountId)),\n onAdd: () => dispatch(addToListEditor(accountId)),\n});\n\nexport default @connect(makeMapStateToProps, mapDispatchToProps)\n@injectIntl\nclass Account extends ImmutablePureComponent {\n\n static propTypes = {\n account: 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 { account, 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='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\n <div className='account__relationship'>\n {button}\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { fetchListSuggestions, clearListSuggestions, changeListSuggestions } from '../../../actions/lists';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n search: { id: 'lists.search', defaultMessage: 'Search among people you follow' },\n});\n\nconst mapStateToProps = state => ({\n value: state.getIn(['listEditor', 'suggestions', 'value']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onSubmit: value => dispatch(fetchListSuggestions(value)),\n onClear: () => dispatch(clearListSuggestions()),\n onChange: value => dispatch(changeListSuggestions(value)),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass Search extends React.PureComponent {\n\n static propTypes = {\n intl: PropTypes.object.isRequired,\n value: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n };\n\n handleChange = e => {\n this.props.onChange(e.target.value);\n }\n\n handleKeyUp = e => {\n if (e.keyCode === 13) {\n this.props.onSubmit(this.props.value);\n }\n }\n\n handleClear = () => {\n this.props.onClear();\n }\n\n render () {\n const { value, intl } = this.props;\n const hasValue = value.length > 0;\n\n return (\n <div className='list-editor__search search'>\n <label>\n <span style={{ display: 'none' }}>{intl.formatMessage(messages.search)}</span>\n\n <input\n className='search__input'\n type='text'\n value={value}\n onChange={this.handleChange}\n onKeyUp={this.handleKeyUp}\n placeholder={intl.formatMessage(messages.search)}\n />\n </label>\n\n <div role='button' tabIndex='0' className='search__icon' onClick={this.handleClear}>\n <Icon id='search' className={classNames({ active: !hasValue })} />\n <Icon id='times-circle' aria-label={intl.formatMessage(messages.search)} className={classNames({ active: hasValue })} />\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport { changeListEditorTitle, submitListEditor } from '../../../actions/lists';\nimport IconButton from '../../../components/icon_button';\nimport { defineMessages, injectIntl } from 'react-intl';\n\nconst messages = defineMessages({\n title: { id: 'lists.edit.submit', defaultMessage: 'Change title' },\n});\n\nconst mapStateToProps = state => ({\n value: state.getIn(['listEditor', 'title']),\n disabled: !state.getIn(['listEditor', 'isChanged']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onChange: value => dispatch(changeListEditorTitle(value)),\n onSubmit: () => dispatch(submitListEditor(false)),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass ListForm extends React.PureComponent {\n\n static propTypes = {\n value: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n intl: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n onSubmit: PropTypes.func.isRequired,\n };\n\n handleChange = e => {\n this.props.onChange(e.target.value);\n }\n\n handleSubmit = e => {\n e.preventDefault();\n this.props.onSubmit();\n }\n\n handleClick = () => {\n this.props.onSubmit();\n }\n\n render () {\n const { value, disabled, intl } = this.props;\n\n const title = intl.formatMessage(messages.title);\n\n return (\n <form className='column-inline-form' onSubmit={this.handleSubmit}>\n <input\n className='setting-text'\n value={value}\n onChange={this.handleChange}\n />\n\n <IconButton\n disabled={disabled}\n icon='check'\n title={title}\n onClick={this.handleClick}\n />\n </form>\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 { setupListEditor, clearListSuggestions, resetListEditor } from '../../actions/lists';\nimport Account from './components/account';\nimport Search from './components/search';\nimport EditListForm from './components/edit_list_form';\nimport Motion from '../ui/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\n\nconst mapStateToProps = state => ({\n accountIds: state.getIn(['listEditor', 'accounts', 'items']),\n searchAccountIds: state.getIn(['listEditor', 'suggestions', 'items']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onInitialize: listId => dispatch(setupListEditor(listId)),\n onClear: () => dispatch(clearListSuggestions()),\n onReset: () => dispatch(resetListEditor()),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass ListEditor extends ImmutablePureComponent {\n\n static propTypes = {\n listId: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n onInitialize: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onReset: PropTypes.func.isRequired,\n accountIds: ImmutablePropTypes.list.isRequired,\n searchAccountIds: ImmutablePropTypes.list.isRequired,\n };\n\n componentDidMount () {\n const { onInitialize, listId } = this.props;\n onInitialize(listId);\n }\n\n componentWillUnmount () {\n const { onReset } = this.props;\n onReset();\n }\n\n render () {\n const { accountIds, searchAccountIds, onClear } = this.props;\n const showSearch = searchAccountIds.size > 0;\n\n return (\n <div className='modal-root__modal list-editor'>\n <EditListForm />\n\n <Search />\n\n <div className='drawer__pager'>\n <div className='drawer__inner list-editor__accounts'>\n {accountIds.map(accountId => <Account key={accountId} accountId={accountId} added />)}\n </div>\n\n {showSearch && <div role='button' tabIndex='-1' className='drawer__backdrop' onClick={onClear} />}\n\n <Motion defaultStyle={{ x: -100 }} style={{ x: spring(showSearch ? 0 : -100, { stiffness: 210, damping: 20 }) }}>\n {({ x }) => (\n <div className='drawer__inner backdrop' style={{ transform: x === 0 ? null : `translateX(${x}%)`, visibility: x === -100 ? 'hidden' : 'visible' }}>\n {searchAccountIds.map(accountId => <Account key={accountId} accountId={accountId} />)}\n </div>\n )}\n </Motion>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""} |