{"version":3,"sources":["webpack:///app/javascript/builds/pleroma/mastofe/app/javascript/flavours/glitch/features/ui/components/onboarding_modal.js"],"names":["noop","messages","defineMessages","home_title","id","defaultMessage","notifications_title","local_title","federated_title","PageOne","_ref","acct","domain","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_3__","className","style","flex","react_intl__WEBPACK_IMPORTED_MODULE_6__","values","handle","PageTwo","_ref2","intl","myAccount","flavours_glitch_features_compose_components_navigation_bar__WEBPACK_IMPORTED_MODULE_11__","account","flavours_glitch_features_compose_components_compose_form__WEBPACK_IMPORTED_MODULE_10__","privacy","text","spoilerText","suggestions","PageThree","_ref3","flavours_glitch_features_compose_components_search__WEBPACK_IMPORTED_MODULE_12__","value","onChange","onSubmit","onClear","onShow","illustration","flavours_glitch_components_permalink__WEBPACK_IMPORTED_MODULE_9__","to","href","introductions","PageFour","_ref4","_column_header__WEBPACK_IMPORTED_MODULE_13__","icon","type","formatMessage","marginBottom","PageSix","_ref5","admin","adminSection","get","guidelines","target","fork","rel","Mastodon","github","apps","OnboardingModal","connect","state","getIn","me","injectIntl","currentIndex","e","preventDefault","_this","props","onClose","i","Number","currentTarget","getAttribute","setState","_ref6","Math","max","pages","_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_0__","_ref7","min","length","index","_ref8","key","handlePrev","handleNext","componentWillMount","_this$props","this","componentDidMount","window","addEventListener","handleKeyUp","componentWillUnmount","render","_this2","nextOrDoneBtn","onClick","handleClose","react_swipeable_views__WEBPACK_IMPORTED_MODULE_7___default","a","onChangeIndex","handleSwipe","map","page","classNames","onboarding-modal__page__wrapper--active","handleSkip","_","active","role","tabIndex","data-index","handleDot","React","PureComponent"],"mappings":"iSAcMA,EAAO,aAEPC,EAAWC,YAAe,CAC9BC,WAAU,CAAAC,GAAA,cAAAC,eAAA,QACVC,oBAAmB,CAAAF,GAAA,uBAAAC,eAAA,iBACnBE,YAAW,CAAAH,GAAA,mBAAAC,eAAA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gCAArF,EACGqE,EAAM2B,IAAI,SAACC,EAAMpC,GAChB,IAAM7D,EAAYkG,IAAW,kCAAmC,CAC9DC,0CAA2CtC,IAAMN,IAEnD,OACEzD,OAAAC,EAAA,EAAAD,CAAA,OAAaE,UAAWA,GAAd6D,EAA0BoC,MAK1CnG,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,oCAAf,EACEF,OAAAC,EAAA,EAAAD,CAAA,gBACEA,OAAAC,EAAA,EAAAD,CAAA,UACE4F,QAAST,KAAKmB,WACdpG,UAAU,qDAFZ,EAIEF,OAAAC,EAAA,EAAAD,CAACK,EAAA,EAAD,CAAkBd,GAAG,kBAAkBC,eAAe,WAI1DQ,OAAAC,EAAA,EAAAD,CAAA,OAAKE,UAAU,+BAAf,EACGqE,EAAM2B,IAAI,SAACK,EAAGxC,GACb,IAAM7D,EAAYkG,IAAW,wBAAyB,CACpDI,OAAQzC,IAAMN,IAEhB,OACEzD,OAAAC,EAAA,EAAAD,CAAA,OAEEyG,KAAK,SACLC,SAAS,IACTC,aAAY5C,EACZ6B,QAASF,EAAKkB,UACd1G,UAAWA,GANb,OACc6D,MAWpB/D,OAAAC,EAAA,EAAAD,CAAA,gBACG2F,SA3IgCkB,IAAMC","file":"flavours/glitch/async/onboarding_modal.js","sourcesContent":["import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ReactSwipeableViews from 'react-swipeable-views';\nimport classNames from 'classnames';\nimport Permalink from 'flavours/glitch/components/permalink';\nimport ComposeForm from 'flavours/glitch/features/compose/components/compose_form';\nimport DrawerAccount from 'flavours/glitch/features/compose/components/navigation_bar';\nimport Search from 'flavours/glitch/features/compose/components/search';\nimport ColumnHeader from './column_header';\nimport { me } from 'flavours/glitch/util/initial_state';\n\nconst noop = () => { };\n\nconst messages = defineMessages({\n home_title: { id: 'column.home', defaultMessage: 'Home' },\n notifications_title: { id: 'column.notifications', defaultMessage: 'Notifications' },\n local_title: { id: 'column.community', defaultMessage: 'Local timeline' },\n federated_title: { id: 'column.public', defaultMessage: 'Federated timeline' },\n});\n\nconst PageOne = ({ acct, domain }) => (\n
\n
\n
\n
\n\n
\n

\n

\n

@{acct}@{domain} }} />

\n
\n
\n);\n\nPageOne.propTypes = {\n acct: PropTypes.string.isRequired,\n domain: PropTypes.string.isRequired,\n};\n\nconst PageTwo = ({ intl, myAccount }) => (\n
\n
\n
\n \n \n
\n
\n\n

\n
\n);\n\nPageTwo.propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n};\n\nconst PageThree = ({ intl, myAccount }) => (\n
\n
\n \n\n
\n \n
\n
\n\n

#illustration, introductions: #introductions }} />

\n

\n
\n);\n\nPageThree.propTypes = {\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n};\n\nconst PageFour = ({ domain, intl }) => (\n
\n
\n
\n
\n
\n

\n
\n\n
\n
\n

\n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n\n

\n
\n
\n);\n\nPageFour.propTypes = {\n domain: PropTypes.string.isRequired,\n intl: PropTypes.object.isRequired,\n};\n\nconst PageSix = ({ admin, domain }) => {\n let adminSection = '';\n\n if (admin) {\n adminSection = (\n

\n @{admin.get('acct')} }} />\n
\n }} />\n

\n );\n }\n\n return (\n
\n

\n {adminSection}\n

fork, Mastodon: Mastodon, github: GitHub }} />

\n

}} />

\n

\n
\n );\n};\n\nPageSix.propTypes = {\n admin: ImmutablePropTypes.map,\n domain: PropTypes.string.isRequired,\n};\n\nconst mapStateToProps = state => ({\n myAccount: state.getIn(['accounts', me]),\n admin: state.getIn(['accounts', state.getIn(['meta', 'admin'])]),\n domain: state.getIn(['meta', 'domain']),\n});\n\n@connect(mapStateToProps)\n@injectIntl\nexport default class OnboardingModal extends React.PureComponent {\n\n static propTypes = {\n onClose: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n myAccount: ImmutablePropTypes.map.isRequired,\n domain: PropTypes.string.isRequired,\n admin: ImmutablePropTypes.map,\n };\n\n state = {\n currentIndex: 0,\n };\n\n componentWillMount() {\n const { myAccount, admin, domain, intl } = this.props;\n this.pages = [\n ,\n ,\n ,\n ,\n ,\n ];\n };\n\n componentDidMount() {\n window.addEventListener('keyup', this.handleKeyUp);\n }\n\n componentWillUnmount() {\n window.addEventListener('keyup', this.handleKeyUp);\n }\n\n handleSkip = (e) => {\n e.preventDefault();\n this.props.onClose();\n }\n\n handleDot = (e) => {\n const i = Number(e.currentTarget.getAttribute('data-index'));\n e.preventDefault();\n this.setState({ currentIndex: i });\n }\n\n handlePrev = () => {\n this.setState(({ currentIndex }) => ({\n currentIndex: Math.max(0, currentIndex - 1),\n }));\n }\n\n handleNext = () => {\n const { pages } = this;\n this.setState(({ currentIndex }) => ({\n currentIndex: Math.min(currentIndex + 1, pages.length - 1),\n }));\n }\n\n handleSwipe = (index) => {\n this.setState({ currentIndex: index });\n }\n\n handleKeyUp = ({ key }) => {\n switch (key) {\n case 'ArrowLeft':\n this.handlePrev();\n break;\n case 'ArrowRight':\n this.handleNext();\n break;\n }\n }\n\n handleClose = () => {\n this.props.onClose();\n }\n\n render () {\n const { pages } = this;\n const { currentIndex } = this.state;\n const hasMore = currentIndex < pages.length - 1;\n\n const nextOrDoneBtn = hasMore ? (\n \n \n \n ) : (\n \n \n \n );\n\n return (\n
\n \n {pages.map((page, i) => {\n const className = classNames('onboarding-modal__page__wrapper', {\n 'onboarding-modal__page__wrapper--active': i === currentIndex,\n });\n return (\n
{page}
\n );\n })}\n
\n\n
\n
\n \n \n \n
\n\n
\n {pages.map((_, i) => {\n const className = classNames('onboarding-modal__dot', {\n active: i === currentIndex,\n });\n return (\n \n );\n })}\n
\n\n
\n {nextOrDoneBtn}\n
\n
\n
\n );\n }\n\n}\n"],"sourceRoot":""}