Merge branch 'release-docs' into 'develop'
[akkoma] / priv / static / packs / modals / report_modal.js.map
index f8ab1ea1a43c4e27ddcfba188be2c60a703e4150..110d02e7ca002e7a4f13a33c67be7f1432423a84 100644 (file)
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/report/components/status_check_box.js","webpack:///./app/javascript/mastodon/features/report/containers/status_check_box_container.js","webpack:///./app/javascript/mastodon/features/ui/components/report_modal.js","webpack:///./node_modules/lodash/noop.js"],"names":["status_check_box_StatusCheckBox","render","_props","this","props","status","checked","onToggle","disabled","media","get","size","some","item","getIn","video","jsx_default","bundle","fetchComponent","async_components","loading","renderLoadingVideoPlayer","Component","preview","src","alt","width","height","inline","sensitive","onOpenVideo","noop_default","a","renderLoadingMediaGallery","onOpenMedia","className","status_content","component_default","onChange","react_default","PureComponent","status_check_box_container","Object","es","state","_ref","id","immutable","includes","dispatch","_ref2","e","reports","target","messages","index_es","close","defaultMessage","placeholder","submit","report_modal_ReportModal","getAccount","selectors","accountId","isSubmitting","account","comment","forward","statusIds","union","handleCommentChange","_this","value","handleForwardChange","handleSubmit","handleKeyDown","keyCode","ctrlKey","metaKey","componentDidMount","timelines","withReplies","componentWillReceiveProps","nextProps","intl","onClose","domain","split","icon_button","title","formatMessage","icon","onClick","values","onKeyDown","htmlFor","components_button","text","map","statusId","react_immutable_pure_component_es","propTypes","prop_types_default","bool","ImmutablePropTypes_default","orderedSet","isRequired","string","func","object","module","exports"],"mappings":"gUASqBA,4GASnBC,kBAAU,IAAAC,EACwCC,KAAKC,MAA7CC,EADAH,EACAG,OAAQC,EADRJ,EACQI,QAASC,EADjBL,EACiBK,SAAUC,EAD3BN,EAC2BM,SAC/BC,EAAQ,KAEZ,GAAIJ,EAAOK,IAAI,UACb,OAAO,KAGT,GAAIL,EAAOK,IAAI,qBAAqBC,KAAO,EACzC,GAAIN,EAAOK,IAAI,qBAAqBE,KAAK,SAAAC,GAAA,MAA6B,YAArBA,EAAKH,IAAI,gBAEn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qFnC,KAAKsE,sBAL1FzD,IAAA,SAAA+E,QAMoB,iBANpB5D,UAM+C,8BAN/C,EAAAnB,IAMwEuC,EAAA,GANxET,GAM4F,iBAN5FW,eAM4H,sBAN5HoC,QAM4JxC,OAAQiC,QA1B7KtE,IA+BSgF,EAAA,GA/BTxF,SA+B0BwD,EA/B1BiC,KA+B8Cb,EAAKM,cAAcpC,EAASK,QA/B1EiC,QA+B4FzF,KAAKuE,gBA/BjG1D,IAAA,OAAAmB,UAkCqB,+BAlCrB,EAAAnB,IAAA,gBAoCWoD,EAAU8B,IAAI,SAAAC,GAAA,OAAAnF,IAAayB,GAAbK,GAAgCqD,EAAhC3F,SAAmEwD,GAApBmC,aArFnCC,EAAA,KAEhCC,WACLrC,aAAcsC,EAAAtE,EAAUuE,KACxBtC,QAASuC,EAAAxE,EAAmBkE,IAC5B9B,UAAWoC,EAAAxE,EAAmByE,WAAWC,WACzCxC,QAASoC,EAAAtE,EAAU2E,OAAOD,WAC1BvC,QAASmC,EAAAtE,EAAUuE,KACnBtD,SAAUqD,EAAAtE,EAAU4E,KAAKF,WACzBtB,KAAMkB,EAAAtE,EAAU6E,OAAOH,4CClC3BI,EAAOC,QAJP","file":"modals/report_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\nimport noop from 'lodash/noop';\nimport StatusContent from '../../../components/status_content';\nimport { MediaGallery, Video } from '../../ui/util/async-components';\nimport Bundle from '../../ui/components/bundle';\n\nexport default class StatusCheckBox extends React.PureComponent {\n\n  static propTypes = {\n    status: ImmutablePropTypes.map.isRequired,\n    checked: PropTypes.bool,\n    onToggle: PropTypes.func.isRequired,\n    disabled: PropTypes.bool,\n  };\n\n  render () {\n    const { status, checked, onToggle, disabled } = this.props;\n    let media = null;\n\n    if (status.get('reblog')) {\n      return null;\n    }\n\n    if (status.get('media_attachments').size > 0) {\n      if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {\n\n      } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n        const video = status.getIn(['media_attachments', 0]);\n\n        media = (\n          <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >\n            {Component => (\n              <Component\n                preview={video.get('preview_url')}\n                src={video.get('url')}\n                alt={video.get('description')}\n                width={239}\n                height={110}\n                inline\n                sensitive={status.get('sensitive')}\n                onOpenVideo={noop}\n              />\n            )}\n          </Bundle>\n        );\n      } else {\n        media = (\n          <Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} >\n            {Component => <Component media={status.get('media_attachments')} sensitive={status.get('sensitive')} height={110} onOpenMedia={noop} />}\n          </Bundle>\n        );\n      }\n    }\n\n    return (\n      <div className='status-check-box'>\n        <div className='status-check-box__status'>\n          <StatusContent status={status} />\n          {media}\n        </div>\n\n        <div className='status-check-box-toggle'>\n          <Toggle checked={checked} onChange={onToggle} disabled={disabled} />\n        </div>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport StatusCheckBox from '../components/status_check_box';\nimport { toggleStatusReport } from '../../../actions/reports';\nimport { Set as ImmutableSet } from 'immutable';\n\nconst mapStateToProps = (state, { id }) => ({\n  status: state.getIn(['statuses', id]),\n  checked: state.getIn(['reports', 'new', 'status_ids'], ImmutableSet()).includes(id),\n});\n\nconst mapDispatchToProps = (dispatch, { id }) => ({\n\n  onToggle (e) {\n    dispatch(toggleStatusReport(id, e.target.checked));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports';\nimport { expandAccountTimeline } from '../../../actions/timelines';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { makeGetAccount } from '../../../selectors';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport StatusCheckBox from '../../report/containers/status_check_box_container';\nimport { OrderedSet } from 'immutable';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Button from '../../../components/button';\nimport Toggle from 'react-toggle';\nimport IconButton from '../../../components/icon_button';\n\nconst messages = defineMessages({\n  close: { id: 'lightbox.close', defaultMessage: 'Close' },\n  placeholder: { id: 'report.placeholder', defaultMessage: 'Additional comments' },\n  submit: { id: 'report.submit', defaultMessage: 'Submit' },\n});\n\nconst makeMapStateToProps = () => {\n  const getAccount = makeGetAccount();\n\n  const mapStateToProps = state => {\n    const accountId = state.getIn(['reports', 'new', 'account_id']);\n\n    return {\n      isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n      account: getAccount(state, accountId),\n      comment: state.getIn(['reports', 'new', 'comment']),\n      forward: state.getIn(['reports', 'new', 'forward']),\n      statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),\n    };\n  };\n\n  return mapStateToProps;\n};\n\n@connect(makeMapStateToProps)\n@injectIntl\nexport default class ReportModal extends ImmutablePureComponent {\n\n  static propTypes = {\n    isSubmitting: PropTypes.bool,\n    account: ImmutablePropTypes.map,\n    statusIds: ImmutablePropTypes.orderedSet.isRequired,\n    comment: PropTypes.string.isRequired,\n    forward: PropTypes.bool,\n    dispatch: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleCommentChange = e => {\n    this.props.dispatch(changeReportComment(e.target.value));\n  }\n\n  handleForwardChange = e => {\n    this.props.dispatch(changeReportForward(e.target.checked));\n  }\n\n  handleSubmit = () => {\n    this.props.dispatch(submitReport());\n  }\n\n  handleKeyDown = e => {\n    if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n      this.handleSubmit();\n    }\n  }\n\n  componentDidMount () {\n    this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));\n  }\n\n  componentWillReceiveProps (nextProps) {\n    if (this.props.account !== nextProps.account && nextProps.account) {\n      this.props.dispatch(expandAccountTimeline(nextProps.account.get('id'), { withReplies: true }));\n    }\n  }\n\n  render () {\n    const { account, comment, intl, statusIds, isSubmitting, forward, onClose } = this.props;\n\n    if (!account) {\n      return null;\n    }\n\n    const domain = account.get('acct').split('@')[1];\n\n    return (\n      <div className='modal-root__modal report-modal'>\n        <div className='report-modal__target'>\n          <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />\n          <FormattedMessage id='report.target' defaultMessage='Report {target}' values={{ target: <strong>{account.get('acct')}</strong> }} />\n        </div>\n\n        <div className='report-modal__container'>\n          <div className='report-modal__comment'>\n            <p><FormattedMessage id='report.hint' defaultMessage='The report will be sent to your instance moderators. You can provide an explanation of why you are reporting this account below:' /></p>\n\n            <textarea\n              className='setting-text light'\n              placeholder={intl.formatMessage(messages.placeholder)}\n              value={comment}\n              onChange={this.handleCommentChange}\n              onKeyDown={this.handleKeyDown}\n              disabled={isSubmitting}\n            />\n\n            {domain && (\n              <div>\n                <p><FormattedMessage id='report.forward_hint' defaultMessage='The account is from another server. Send an anonymized copy of the report there as well?' /></p>\n\n                <div className='setting-toggle'>\n                  <Toggle id='report-forward' checked={forward} disabled={isSubmitting} onChange={this.handleForwardChange} />\n                  <label htmlFor='report-forward' className='setting-toggle__label'><FormattedMessage id='report.forward' defaultMessage='Forward to {target}' values={{ target: domain }} /></label>\n                </div>\n              </div>\n            )}\n\n            <Button disabled={isSubmitting} text={intl.formatMessage(messages.submit)} onClick={this.handleSubmit} />\n          </div>\n\n          <div className='report-modal__statuses'>\n            <div>\n              {statusIds.map(statusId => <StatusCheckBox id={statusId} key={statusId} disabled={isSubmitting} />)}\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n}\n","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n  // No operation performed.\n}\n\nmodule.exports = noop;\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/report/components/status_check_box.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/report/containers/status_check_box_container.js","webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/mastodon/features/ui/components/report_modal.js"],"names":["StatusCheckBox","render","_this$props","this","props","status","checked","onToggle","disabled","media","get","size","some","item","getIn","video","Object","jsx","bundle","fetchComponent","Video","loading","renderLoadingVideoPlayer","Component","preview","src","alt","width","height","inline","sensitive","onOpenVideo","noop","MediaGallery","renderLoadingMediaGallery","onOpenMedia","className","status_content","component_default","a","onChange","React","PureComponent","connect","state","_ref","id","ImmutableSet","includes","dispatch","_ref2","e","toggleStatusReport","target","messages","defineMessages","close","defaultMessage","placeholder","submit","ReportModal","getAccount","makeGetAccount","accountId","isSubmitting","account","comment","forward","statusIds","OrderedSet","union","injectIntl","_this","changeReportComment","value","changeReportForward","submitReport","keyCode","ctrlKey","metaKey","handleSubmit","componentDidMount","expandAccountTimeline","withReplies","componentWillReceiveProps","nextProps","intl","onClose","domain","split","icon_button","title","formatMessage","icon","onClick","index_es","values","handleCommentChange","onKeyDown","handleKeyDown","autoFocus","handleForwardChange","htmlFor","components_button","text","map","statusId","status_check_box_container","ImmutablePureComponent","PropTypes","bool","ImmutablePropTypes","orderedSet","isRequired","string","func","object"],"mappings":"gSASqBA,oGASnBC,OAAA,WAAU,IAAAC,EACwCC,KAAKC,MAA7CC,EADAH,EACAG,OAAQC,EADRJ,EACQI,QAASC,EADjBL,EACiBK,SAAUC,EAD3BN,EAC2BM,SAC/BC,EAAQ,KAEZ,GAAIJ,EAAOK,IAAI,UACb,OAAO,KAGT,GAA2C,EAAvCL,EAAOK,IAAI,qBAAqBC,KAClC,GAAIN,EAAOK,IAAI,qBAAqBE,KAAK,SAAAC,GAAI,MAAyB,YAArBA,EAAKH,IAAI,gBAEnD,GAAuD,UAAnDL,EAAOS,MAAM,CAA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AAA,EAAAD,CAAC+E,EAAA,EAAD,CAAkBjD,GAAG,sBAAsBW,eAAe,8FAE7DzC,OAAAC,EAAA,EAAAD,CAAA,OAAKoB,UAAU,uBAAf,EACEpB,OAAAC,EAAA,EAAAD,CAACsB,EAAAC,EAAD,CAAQO,GAAG,iBAAiBxC,QAAS6D,EAAS3D,SAAUwD,EAAcxB,SAAUrC,KAAKkG,sBACrFrF,OAAAC,EAAA,EAAAD,CAAA,SAAOsF,QAAQ,iBAAiBlE,UAAU,8BAA1C,EAAkEpB,OAAAC,EAAA,EAAAD,CAAC+E,EAAA,EAAD,CAAkBjD,GAAG,iBAAiBW,eAAe,sBAAsBuC,OAAQ,CAAE3C,OAAQmC,QAKrKxE,OAAAC,EAAA,EAAAD,CAACuF,EAAA,EAAD,CAAQ/F,SAAUwD,EAAcwC,KAAMlB,EAAKM,cAActC,EAASK,QAASmC,QAAS3F,KAAK6E,gBAG3FhE,OAAAC,EAAA,EAAAD,CAAA,OAAKoB,UAAU,+BAAf,EACEpB,OAAAC,EAAA,EAAAD,CAAA,gBACGoD,EAAUqC,IAAI,SAAAC,GAAQ,OAAI1F,OAAAC,EAAA,EAAAD,CAAC2F,EAAD,CAAgB7D,GAAI4D,EAAyBlG,SAAUwD,GAApB0C,aAtFlDE,+BAEL,CACjB5C,aAAc6C,IAAUC,KACxB7C,QAAS8C,IAAmBN,IAC5BrC,UAAW2C,IAAmBC,WAAWC,WACzC/C,QAAS2C,IAAUK,OAAOD,WAC1B9C,QAAS0C,IAAUC,KACnB7D,SAAU4D,IAAUM,KAAKF,WACzB3B,KAAMuB,IAAUO,OAAOH","file":"modals/report_modal.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Toggle from 'react-toggle';\nimport noop from 'lodash/noop';\nimport StatusContent from '../../../components/status_content';\nimport { MediaGallery, Video } from '../../ui/util/async-components';\nimport Bundle from '../../ui/components/bundle';\n\nexport default class StatusCheckBox extends React.PureComponent {\n\n  static propTypes = {\n    status: ImmutablePropTypes.map.isRequired,\n    checked: PropTypes.bool,\n    onToggle: PropTypes.func.isRequired,\n    disabled: PropTypes.bool,\n  };\n\n  render () {\n    const { status, checked, onToggle, disabled } = this.props;\n    let media = null;\n\n    if (status.get('reblog')) {\n      return null;\n    }\n\n    if (status.get('media_attachments').size > 0) {\n      if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {\n\n      } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n        const video = status.getIn(['media_attachments', 0]);\n\n        media = (\n          <Bundle fetchComponent={Video} loading={this.renderLoadingVideoPlayer} >\n            {Component => (\n              <Component\n                preview={video.get('preview_url')}\n                src={video.get('url')}\n                alt={video.get('description')}\n                width={239}\n                height={110}\n                inline\n                sensitive={status.get('sensitive')}\n                onOpenVideo={noop}\n              />\n            )}\n          </Bundle>\n        );\n      } else {\n        media = (\n          <Bundle fetchComponent={MediaGallery} loading={this.renderLoadingMediaGallery} >\n            {Component => <Component media={status.get('media_attachments')} sensitive={status.get('sensitive')} height={110} onOpenMedia={noop} />}\n          </Bundle>\n        );\n      }\n    }\n\n    return (\n      <div className='status-check-box'>\n        <div className='status-check-box__status'>\n          <StatusContent status={status} />\n          {media}\n        </div>\n\n        <div className='status-check-box-toggle'>\n          <Toggle checked={checked} onChange={onToggle} disabled={disabled} />\n        </div>\n      </div>\n    );\n  }\n\n}\n","import { connect } from 'react-redux';\nimport StatusCheckBox from '../components/status_check_box';\nimport { toggleStatusReport } from '../../../actions/reports';\nimport { Set as ImmutableSet } from 'immutable';\n\nconst mapStateToProps = (state, { id }) => ({\n  status: state.getIn(['statuses', id]),\n  checked: state.getIn(['reports', 'new', 'status_ids'], ImmutableSet()).includes(id),\n});\n\nconst mapDispatchToProps = (dispatch, { id }) => ({\n\n  onToggle (e) {\n    dispatch(toggleStatusReport(id, e.target.checked));\n  },\n\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StatusCheckBox);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { changeReportComment, changeReportForward, submitReport } from '../../../actions/reports';\nimport { expandAccountTimeline } from '../../../actions/timelines';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { makeGetAccount } from '../../../selectors';\nimport { defineMessages, FormattedMessage, injectIntl } from 'react-intl';\nimport StatusCheckBox from '../../report/containers/status_check_box_container';\nimport { OrderedSet } from 'immutable';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Button from '../../../components/button';\nimport Toggle from 'react-toggle';\nimport IconButton from '../../../components/icon_button';\n\nconst messages = defineMessages({\n  close: { id: 'lightbox.close', defaultMessage: 'Close' },\n  placeholder: { id: 'report.placeholder', defaultMessage: 'Additional comments' },\n  submit: { id: 'report.submit', defaultMessage: 'Submit' },\n});\n\nconst makeMapStateToProps = () => {\n  const getAccount = makeGetAccount();\n\n  const mapStateToProps = state => {\n    const accountId = state.getIn(['reports', 'new', 'account_id']);\n\n    return {\n      isSubmitting: state.getIn(['reports', 'new', 'isSubmitting']),\n      account: getAccount(state, accountId),\n      comment: state.getIn(['reports', 'new', 'comment']),\n      forward: state.getIn(['reports', 'new', 'forward']),\n      statusIds: OrderedSet(state.getIn(['timelines', `account:${accountId}:with_replies`, 'items'])).union(state.getIn(['reports', 'new', 'status_ids'])),\n    };\n  };\n\n  return mapStateToProps;\n};\n\nexport default @connect(makeMapStateToProps)\n@injectIntl\nclass ReportModal extends ImmutablePureComponent {\n\n  static propTypes = {\n    isSubmitting: PropTypes.bool,\n    account: ImmutablePropTypes.map,\n    statusIds: ImmutablePropTypes.orderedSet.isRequired,\n    comment: PropTypes.string.isRequired,\n    forward: PropTypes.bool,\n    dispatch: PropTypes.func.isRequired,\n    intl: PropTypes.object.isRequired,\n  };\n\n  handleCommentChange = e => {\n    this.props.dispatch(changeReportComment(e.target.value));\n  }\n\n  handleForwardChange = e => {\n    this.props.dispatch(changeReportForward(e.target.checked));\n  }\n\n  handleSubmit = () => {\n    this.props.dispatch(submitReport());\n  }\n\n  handleKeyDown = e => {\n    if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {\n      this.handleSubmit();\n    }\n  }\n\n  componentDidMount () {\n    this.props.dispatch(expandAccountTimeline(this.props.account.get('id'), { withReplies: true }));\n  }\n\n  componentWillReceiveProps (nextProps) {\n    if (this.props.account !== nextProps.account && nextProps.account) {\n      this.props.dispatch(expandAccountTimeline(nextProps.account.get('id'), { withReplies: true }));\n    }\n  }\n\n  render () {\n    const { account, comment, intl, statusIds, isSubmitting, forward, onClose } = this.props;\n\n    if (!account) {\n      return null;\n    }\n\n    const domain = account.get('acct').split('@')[1];\n\n    return (\n      <div className='modal-root__modal report-modal'>\n        <div className='report-modal__target'>\n          <IconButton className='media-modal__close' title={intl.formatMessage(messages.close)} icon='times' onClick={onClose} size={16} />\n          <FormattedMessage id='report.target' defaultMessage='Report {target}' values={{ target: <strong>{account.get('acct')}</strong> }} />\n        </div>\n\n        <div className='report-modal__container'>\n          <div className='report-modal__comment'>\n            <p><FormattedMessage id='report.hint' defaultMessage='The report will be sent to your server moderators. You can provide an explanation of why you are reporting this account below:' /></p>\n\n            <textarea\n              className='setting-text light'\n              placeholder={intl.formatMessage(messages.placeholder)}\n              value={comment}\n              onChange={this.handleCommentChange}\n              onKeyDown={this.handleKeyDown}\n              disabled={isSubmitting}\n              autoFocus\n            />\n\n            {domain && (\n              <div>\n                <p><FormattedMessage id='report.forward_hint' defaultMessage='The account is from another server. Send an anonymized copy of the report there as well?' /></p>\n\n                <div className='setting-toggle'>\n                  <Toggle id='report-forward' checked={forward} disabled={isSubmitting} onChange={this.handleForwardChange} />\n                  <label htmlFor='report-forward' className='setting-toggle__label'><FormattedMessage id='report.forward' defaultMessage='Forward to {target}' values={{ target: domain }} /></label>\n                </div>\n              </div>\n            )}\n\n            <Button disabled={isSubmitting} text={intl.formatMessage(messages.submit)} onClick={this.handleSubmit} />\n          </div>\n\n          <div className='report-modal__statuses'>\n            <div>\n              {statusIds.map(statusId => <StatusCheckBox id={statusId} key={statusId} disabled={isSubmitting} />)}\n            </div>\n          </div>\n        </div>\n      </div>\n    );\n  }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file