forked from AkkomaGang/akkoma
1 line
No EOL
7.9 KiB
Text
1 line
No EOL
7.9 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/pinned_accounts_editor/containers/account_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/pinned_accounts_editor/containers/search_container.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/flavours/glitch/features/pinned_accounts_editor/index.js"],"names":["injectIntl","connect","getAccount","makeGetAccount","state","accountId","added","account","getIn","includes","dispatch","onRemove","unpinAccount","onAdd","pinAccount","Account","value","onSubmit","fetchPinnedAccountsSuggestions","onClear","clearPinnedAccountsSuggestions","onChange","changePinnedAccountsSuggestions","Search","PinnedAccountsEditor","accountIds","searchAccountIds","onInitialize","fetchPinnedAccounts","onReset","resetPinnedAccountsEditor","componentDidMount","this","props","componentWillUnmount","render","showSearch","size","className","id","defaultMessage","map","role","tabIndex","onClick","defaultStyle","x","style","spring","stiffness","damping","transform","visibility","ImmutablePureComponent","onClose","PropTypes","func","isRequired","intl","object","title","string","ImmutablePropTypes","list"],"mappings":"+QAuBeA,cAAWC,mBAhBE,WAC1B,IAAMC,EAAaC,cAOnB,OALwB,SAACC,EAAD,OAAUC,EAAV,EAAUA,UAAWC,EAArB,EAAqBA,MAArB,MAAkC,CACxDC,QAASL,EAAWE,EAAOC,GAC3BC,WAAwB,IAAVA,EAAwBF,EAAMI,MAAM,CAAC,uBAAwB,WAAY,UAAUC,SAASJ,GAAaC,OAMhG,SAACI,EAAD,OAAaL,EAAb,EAAaA,UAAb,MAA8B,CACvDM,SAAU,kBAAMD,EAASE,YAAaP,KACtCQ,MAAO,kBAAMH,EAASI,YAAWT,QAGTJ,CAAiDc,M,UCH5Df,cAAWC,mBAVF,SAAAG,GAAK,MAAK,CAChCY,MAAOZ,EAAMI,MAAM,CAAC,uBAAwB,cAAe,c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EI,UAAiB,IAANL,EAAU,KAAV,cAA+BA,EAA/B,KAAsCM,YAAmB,MAAPN,EAAa,SAAW,iBAAtI,EACEpB,EAAiBe,KAAI,SAAApC,GAAS,OAAI,YAAC,EAAD,CAAkCA,UAAWA,GAAtBA,c,GA3CvCgD,K,0BAEd,CACjBC,QAASC,IAAUC,KAAKC,WACxBC,KAAMH,IAAUI,OAAOF,WACvB9B,aAAc4B,IAAUC,KAAKC,WAC7BtC,QAASoC,IAAUC,KAAKC,WACxB5B,QAAS0B,IAAUC,KAAKC,WACxBG,MAAOL,IAAUM,OAAOJ,WACxBhC,WAAYqC,IAAmBC,KAAKN,WACpC/B,iBAAkBoC,IAAmBC,KAAKN,a","file":"flavours/glitch/async/pinned_accounts_editor.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport { makeGetAccount } from 'flavours/glitch/selectors';\nimport { injectIntl } from 'react-intl';\nimport { pinAccount, unpinAccount } from 'flavours/glitch/actions/accounts';\nimport Account from 'flavours/glitch/features/list_editor/components/account';\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(['pinnedAccountsEditor', 'accounts', 'items']).includes(accountId) : added,\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = (dispatch, { accountId }) => ({\n onRemove: () => dispatch(unpinAccount(accountId)),\n onAdd: () => dispatch(pinAccount(accountId)),\n});\n\nexport default injectIntl(connect(makeMapStateToProps, mapDispatchToProps)(Account));\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { injectIntl } from 'react-intl';\nimport {\n fetchPinnedAccountsSuggestions,\n clearPinnedAccountsSuggestions,\n changePinnedAccountsSuggestions\n} from '../../../actions/accounts';\nimport Search from 'flavours/glitch/features/list_editor/components/search';\n\nconst mapStateToProps = state => ({\n value: state.getIn(['pinnedAccountsEditor', 'suggestions', 'value']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onSubmit: value => dispatch(fetchPinnedAccountsSuggestions(value)),\n onClear: () => dispatch(clearPinnedAccountsSuggestions()),\n onChange: value => dispatch(changePinnedAccountsSuggestions(value)),\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(Search));\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, FormattedMessage } from 'react-intl';\nimport { fetchPinnedAccounts, clearPinnedAccountsSuggestions, resetPinnedAccountsEditor } from 'flavours/glitch/actions/accounts';\nimport AccountContainer from './containers/account_container';\nimport SearchContainer from './containers/search_container';\nimport Motion from 'flavours/glitch/util/optional_motion';\nimport spring from 'react-motion/lib/spring';\n\nconst mapStateToProps = state => ({\n accountIds: state.getIn(['pinnedAccountsEditor', 'accounts', 'items']),\n searchAccountIds: state.getIn(['pinnedAccountsEditor', 'suggestions', 'items']),\n});\n\nconst mapDispatchToProps = dispatch => ({\n onInitialize: () => dispatch(fetchPinnedAccounts()),\n onClear: () => dispatch(clearPinnedAccountsSuggestions()),\n onReset: () => dispatch(resetPinnedAccountsEditor()),\n});\n\nexport default @connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nclass PinnedAccountsEditor extends ImmutablePureComponent {\n\n static propTypes = {\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 title: PropTypes.string.isRequired,\n accountIds: ImmutablePropTypes.list.isRequired,\n searchAccountIds: ImmutablePropTypes.list.isRequired,\n };\n\n componentDidMount () {\n const { onInitialize } = this.props;\n onInitialize();\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 <h4><FormattedMessage id='endorsed_accounts_editor.endorsed_accounts' defaultMessage='Featured accounts' /></h4>\n\n <SearchContainer />\n\n <div className='drawer__pager'>\n <div className='drawer__inner list-editor__accounts'>\n {accountIds.map(accountId => <AccountContainer 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 => <AccountContainer key={accountId} accountId={accountId} />)}\n </div>)\n }\n </Motion>\n </div>\n </div>\n );\n }\n\n}\n"],"sourceRoot":""} |