forked from AkkomaGang/akkoma
1 line
No EOL
45 KiB
Text
1 line
No EOL
45 KiB
Text
{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/components/follow.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/components/notification.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/containers/notification_container.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/components/clear_column_button.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/components/column_settings.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/containers/column_settings_container.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/components/filter_bar.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/containers/filter_bar_container.js","webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/flavours/glitch/features/notifications/index.js"],"names":["NotificationFollow","_this$props","_this","props","notification","onMoveUp","get","_this$props2","onMoveDown","handleOpenProfile","context","router","history","push","getIn","e","preventDefault","_this$props3","onMention","getHandlers","moveUp","this","handleMoveUp","moveDown","handleMoveDown","open","handleOpen","openProfile","mention","handleMention","reply","render","_this$props4","account","hidden","displayName","link","Object","jsx","permalink","className","href","title","to","dangerouslySetInnerHTML","__html","react_hotkeys_index_es","handlers","tabIndex","index_es","id","defaultMessage","values","name","account_container","withNote","overlay_container","ImmutablePureComponent","PropTypes","bool","string","isRequired","ImmutablePropTypes","map","Notification","getScrollPosition","updateScrollBottom","follow_NotificationFollow","status_container","containerId","contextType","withDismiss","prepend","muted","func","connect","getNotification","makeGetNotification","state","accountId","notifCleaning","dispatch","mentionCompose","ClearColumnButton","onClick","React","Component","ColumnSettings","path","checked","onChange","concat","settings","pushSettings","onClear","filterShowStr","filterAdvancedStr","alertStr","showStr","soundStr","showPushSettings","pushStr","pushMeta","clear_column_button_ClearColumnButton","role","aria-labelledby","setting_toggle","prefix","settingPath","label","meta","onPushChange","PureComponent","messages","defineMessages","clearMessage","clearConfirm","injectIntl","_ref","intl","changePushNotifications","slice","changeSetting","setFilter","openModal","message","formatMessage","confirm","onConfirm","clearNotifications","tooltips","mentions","favourites","boosts","follows","FilterBar","notificationType","selectFilter","selectedFilter","advancedMode","newActiveFilter","getNotifications","createSelector","ImmutableList","filter","item","keys","showFilterBar","allowedType","excludedTypes","notifications","filterNot","includes","Notifications","localSettings","isLoading","isUnread","hasMore","notifCleaningActive","onEnterCleaningMode","yes","enterNotificationClearingMode","onMount","mountNotifications","onUnmount","unmountNotifications","maxId","expandNotifications","debounce_default","last","leading","scrollTopNotifications","columnId","removeColumn","addColumn","dir","moveColumn","column","scrollTop","c","elementIndex","findIndex","_selectChild","index","element","node","querySelector","focus","componentDidMount","componentWillUnmount","_this2","shouldUpdateScroll","multiColumn","pinned","emptyMessage","scrollableContent","filterBarContainer","filter_bar_container","size","load_gap","disabled","handleLoadGap","notification_container","scrollContainer","scrollable_list","scrollKey","trackScroll","showLoading","onLoadMore","handleLoadOlder","onScrollToTop","handleScrollToTop","onScroll","handleScroll","react_default","a","createElement","ref","setColumnRef","extraClasses","column_header","icon","active","onPin","handlePin","onMove","handleMove","handleHeaderClick","column_settings_container"],"mappings":"oTAaqBA,4MASJ,WAAM,IAAAC,EACgBC,EAAKC,MAAhCC,EADWH,EACXG,cACRC,EAFmBJ,EACGI,UACbD,EAAaE,IAAI,kEAGX,WAAM,IAAAC,EACgBL,EAAKC,MAAlCC,EADaG,EACbH,cACRI,EAFqBD,EACCC,YACXJ,EAAaE,IAAI,8DAGjB,WACXJ,EAAKO,kFAGa,WAAM,IAChBL,EAAiBF,EAAKC,MAAtBC,a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6I,EACdlE,UAAWkE,EAAK3I,IAAI,WACpBD,SAAUyL,EAAKxK,aACfd,WAAYsL,EAAKtK,gBAJZyH,EAAK3I,IAAI,SAQE,KAGtBe,KAAK8K,kBAAoBA,EAEzB,IAAMQ,EACJtK,OAAAC,EAAA,EAAAD,CAACuK,EAAA,EAAD,CACEC,UAAS,iBAAmBjC,EAC5BkC,aAAcb,EACdtC,UAAWA,EACXoD,YAAapD,GAAoC,IAAvBL,EAAcgD,KACxCzC,QAASA,EACTqC,aAAcA,EACdc,WAAY3L,KAAK4L,gBACjBC,cAAe7L,KAAK8L,kBACpBC,SAAU/L,KAAKgM,aACftB,mBAAoBA,QAVtB,EAYGI,GAIL,OACEmB,EAAAC,EAAAC,cAACvC,EAAA,EAAD,CACEwC,IAAKpM,KAAKqM,aACVrK,KAAK,gBACLsK,aAActM,KAAKlB,MAAM2J,oBAAsB,iBAAmB,KAClEjD,MAAOU,EAAKO,cAAcb,EAASvE,QAEnCL,OAAAC,EAAA,EAAAD,CAACuL,EAAA,EAAD,CACEC,KAAK,OACLC,OAAQlE,EACRlH,MAAO6E,EAAKO,cAAcb,EAASvE,OACnCqL,MAAO1M,KAAK2M,UACZC,OAAQ5M,KAAK6M,WACb9I,QAAS/D,KAAK8M,kBACdlC,OAAQA,EACRD,YAAaA,EACbtC,cAAerI,KAAKlB,MAAMuJ,cAC1B1E,eAAa,EACb8E,oBAAqBzI,KAAKlB,MAAM2J,oBAChCC,oBAAqB1I,KAAKlB,MAAM4J,0BAZlC,EAcE1H,OAAAC,EAAA,EAAAD,CAAC+L,EAAD,KAEDhC,EACAO,OA7KkCtH,IAAM2B,4CAoBzB,CACpB8F,aAAa","file":"flavours/glitch/async/notifications.js","sourcesContent":["// Package imports.\nimport React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { HotKeys } from 'react-hotkeys';\n\n// Our imports.\nimport Permalink from 'flavours/glitch/components/permalink';\nimport AccountContainer from 'flavours/glitch/containers/account_container';\nimport NotificationOverlayContainer from '../containers/overlay_container';\n\nexport default class NotificationFollow extends ImmutablePureComponent {\n\n static propTypes = {\n hidden: PropTypes.bool,\n id: PropTypes.string.isRequired,\n account: ImmutablePropTypes.map.isRequired,\n notification: ImmutablePropTypes.map.isRequired,\n };\n\n handleMoveUp = () => {\n const { notification, onMoveUp } = this.props;\n onMoveUp(notification.get('id'));\n }\n\n handleMoveDown = () => {\n const { notification, onMoveDown } = this.props;\n onMoveDown(notification.get('id'));\n }\n\n handleOpen = () => {\n this.handleOpenProfile();\n }\n\n handleOpenProfile = () => {\n const { notification } = this.props;\n this.context.router.history.push(`/accounts/${notification.getIn(['account', 'id'])}`);\n }\n\n handleMention = e => {\n e.preventDefault();\n\n const { notification, onMention } = this.props;\n onMention(notification.get('account'), this.context.router.history);\n }\n\n getHandlers () {\n return {\n moveUp: this.handleMoveUp,\n moveDown: this.handleMoveDown,\n open: this.handleOpen,\n openProfile: this.handleOpenProfile,\n mention: this.handleMention,\n reply: this.handleMention,\n };\n }\n\n render () {\n const { account, notification, hidden } = this.props;\n\n // Links to the display name.\n const displayName = account.get('display_name_html') || account.get('username');\n const link = (\n <bdi><Permalink\n className='notification__display-name'\n href={account.get('url')}\n title={account.get('acct')}\n to={`/accounts/${account.get('id')}`}\n dangerouslySetInnerHTML={{ __html: displayName }}\n /></bdi>\n );\n\n // Renders.\n return (\n <HotKeys handlers={this.getHandlers()}>\n <div className='notification notification-follow focusable' tabIndex='0'>\n <div className='notification__message'>\n <div className='notification__favourite-icon-wrapper'>\n <i className='fa fa-fw fa-user-plus' />\n </div>\n\n <FormattedMessage\n id='notification.follow'\n defaultMessage='{name} followed you'\n values={{ name: link }}\n />\n </div>\n\n <AccountContainer hidden={hidden} id={account.get('id')} withNote={false} />\n <NotificationOverlayContainer notification={notification} />\n </div>\n </HotKeys>\n );\n }\n\n}\n","// Package imports.\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\n\n// Our imports,\nimport StatusContainer from 'flavours/glitch/containers/status_container';\nimport NotificationFollow from './follow';\n\nexport default class Notification extends ImmutablePureComponent {\n\n static propTypes = {\n notification: ImmutablePropTypes.map.isRequired,\n hidden: PropTypes.bool,\n onMoveUp: PropTypes.func.isRequired,\n onMoveDown: PropTypes.func.isRequired,\n onMention: PropTypes.func.isRequired,\n getScrollPosition: PropTypes.func,\n updateScrollBottom: PropTypes.func,\n };\n\n render () {\n const {\n hidden,\n notification,\n onMoveDown,\n onMoveUp,\n onMention,\n getScrollPosition,\n updateScrollBottom,\n } = this.props;\n\n switch(notification.get('type')) {\n case 'follow':\n return (\n <NotificationFollow\n hidden={hidden}\n id={notification.get('id')}\n account={notification.get('account')}\n notification={notification}\n onMoveDown={onMoveDown}\n onMoveUp={onMoveUp}\n onMention={onMention}\n />\n );\n case 'mention':\n return (\n <StatusContainer\n containerId={notification.get('id')}\n hidden={hidden}\n id={notification.get('status')}\n notification={notification}\n onMoveDown={onMoveDown}\n onMoveUp={onMoveUp}\n onMention={onMention}\n contextType='notifications'\n getScrollPosition={getScrollPosition}\n updateScrollBottom={updateScrollBottom}\n withDismiss\n />\n );\n case 'favourite':\n return (\n <StatusContainer\n containerId={notification.get('id')}\n hidden={hidden}\n id={notification.get('status')}\n account={notification.get('account')}\n prepend='favourite'\n muted\n notification={notification}\n onMoveDown={onMoveDown}\n onMoveUp={onMoveUp}\n onMention={onMention}\n getScrollPosition={getScrollPosition}\n updateScrollBottom={updateScrollBottom}\n withDismiss\n />\n );\n case 'reblog':\n return (\n <StatusContainer\n containerId={notification.get('id')}\n hidden={hidden}\n id={notification.get('status')}\n account={notification.get('account')}\n prepend='reblog'\n muted\n notification={notification}\n onMoveDown={onMoveDown}\n onMoveUp={onMoveUp}\n onMention={onMention}\n getScrollPosition={getScrollPosition}\n updateScrollBottom={updateScrollBottom}\n withDismiss\n />\n );\n default:\n return null;\n }\n }\n\n}\n","// Package imports.\nimport { connect } from 'react-redux';\n\n// Our imports.\nimport { makeGetNotification } from 'flavours/glitch/selectors';\nimport Notification from '../components/notification';\nimport { mentionCompose } from 'flavours/glitch/actions/compose';\n\nconst makeMapStateToProps = () => {\n const getNotification = makeGetNotification();\n\n const mapStateToProps = (state, props) => ({\n notification: getNotification(state, props.notification, props.accountId),\n notifCleaning: state.getIn(['notifications', 'cleaningMode']),\n });\n\n return mapStateToProps;\n};\n\nconst mapDispatchToProps = dispatch => ({\n onMention: (account, router) => {\n dispatch(mentionCompose(account, router));\n },\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(Notification);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\n\nexport default class ClearColumnButton extends React.Component {\n\n static propTypes = {\n onClick: PropTypes.func.isRequired,\n };\n\n render () {\n return (\n <button className='text-btn column-header__setting-btn' tabIndex='0' onClick={this.props.onClick}><i className='fa fa-eraser' /> <FormattedMessage id='notifications.clear' defaultMessage='Clear notifications' /></button>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { FormattedMessage } from 'react-intl';\nimport ClearColumnButton from './clear_column_button';\nimport SettingToggle from './setting_toggle';\n\nexport default class ColumnSettings extends React.PureComponent {\n\n static propTypes = {\n settings: ImmutablePropTypes.map.isRequired,\n pushSettings: ImmutablePropTypes.map.isRequired,\n onChange: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n };\n\n onPushChange = (path, checked) => {\n this.props.onChange(['push', ...path], checked);\n }\n\n render () {\n const { settings, pushSettings, onChange, onClear } = this.props;\n\n const filterShowStr = <FormattedMessage id='notifications.column_settings.filter_bar.show' defaultMessage='Show' />;\n const filterAdvancedStr = <FormattedMessage id='notifications.column_settings.filter_bar.advanced' defaultMessage='Display all categories' />;\n const alertStr = <FormattedMessage id='notifications.column_settings.alert' defaultMessage='Desktop notifications' />;\n const showStr = <FormattedMessage id='notifications.column_settings.show' defaultMessage='Show in column' />;\n const soundStr = <FormattedMessage id='notifications.column_settings.sound' defaultMessage='Play sound' />;\n\n const showPushSettings = pushSettings.get('browserSupport') && pushSettings.get('isSubscribed');\n const pushStr = showPushSettings && <FormattedMessage id='notifications.column_settings.push' defaultMessage='Push notifications' />;\n const pushMeta = showPushSettings && <FormattedMessage id='notifications.column_settings.push_meta' defaultMessage='This device' />;\n\n return (\n <div>\n <div className='column-settings__row'>\n <ClearColumnButton onClick={onClear} />\n </div>\n\n <div role='group' aria-labelledby='notifications-filter-bar'>\n <span id='notifications-filter-bar' className='column-settings__section'>\n <FormattedMessage id='notifications.column_settings.filter_bar.category' defaultMessage='Quick filter bar' />\n </span>\n <div className='column-settings__row'>\n <SettingToggle id='show-filter-bar' prefix='notifications' settings={settings} settingPath={['quickFilter', 'show']} onChange={onChange} label={filterShowStr} />\n <SettingToggle id='show-filter-bar' prefix='notifications' settings={settings} settingPath={['quickFilter', 'advanced']} onChange={onChange} label={filterAdvancedStr} />\n </div>\n </div>\n\n <div role='group' aria-labelledby='notifications-follow'>\n <span id='notifications-follow' className='column-settings__section'><FormattedMessage id='notifications.column_settings.follow' defaultMessage='New followers:' /></span>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'follow']} onChange={onChange} label={alertStr} />\n {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'follow']} meta={pushMeta} onChange={this.onPushChange} label={pushStr} />}\n <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'follow']} onChange={onChange} label={showStr} />\n <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'follow']} onChange={onChange} label={soundStr} />\n </div>\n </div>\n\n <div role='group' aria-labelledby='notifications-favourite'>\n <span id='notifications-favourite' className='column-settings__section'><FormattedMessage id='notifications.column_settings.favourite' defaultMessage='Favourites:' /></span>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'favourite']} onChange={onChange} label={alertStr} />\n {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'favourite']} meta={pushMeta} onChange={this.onPushChange} label={pushStr} />}\n <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'favourite']} onChange={onChange} label={showStr} />\n <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'favourite']} onChange={onChange} label={soundStr} />\n </div>\n </div>\n\n <div role='group' aria-labelledby='notifications-mention'>\n <span id='notifications-mention' className='column-settings__section'><FormattedMessage id='notifications.column_settings.mention' defaultMessage='Mentions:' /></span>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'mention']} onChange={onChange} label={alertStr} />\n {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'mention']} meta={pushMeta} onChange={this.onPushChange} label={pushStr} />}\n <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'mention']} onChange={onChange} label={showStr} />\n <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'mention']} onChange={onChange} label={soundStr} />\n </div>\n </div>\n\n <div role='group' aria-labelledby='notifications-reblog'>\n <span id='notifications-reblog' className='column-settings__section'><FormattedMessage id='notifications.column_settings.reblog' defaultMessage='Boosts:' /></span>\n\n <div className='column-settings__row'>\n <SettingToggle prefix='notifications_desktop' settings={settings} settingPath={['alerts', 'reblog']} onChange={onChange} label={alertStr} />\n {showPushSettings && <SettingToggle prefix='notifications_push' settings={pushSettings} settingPath={['alerts', 'reblog']} meta={pushMeta} onChange={this.onPushChange} label={pushStr} />}\n <SettingToggle prefix='notifications' settings={settings} settingPath={['shows', 'reblog']} onChange={onChange} label={showStr} />\n <SettingToggle prefix='notifications' settings={settings} settingPath={['sounds', 'reblog']} onChange={onChange} label={soundStr} />\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import { connect } from 'react-redux';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ColumnSettings from '../components/column_settings';\nimport { changeSetting } from 'flavours/glitch/actions/settings';\nimport { setFilter } from 'flavours/glitch/actions/notifications';\nimport { clearNotifications } from 'flavours/glitch/actions/notifications';\nimport { changeAlerts as changePushNotifications } from 'flavours/glitch/actions/push_notifications';\nimport { openModal } from 'flavours/glitch/actions/modal';\n\nconst messages = defineMessages({\n clearMessage: { id: 'notifications.clear_confirmation', defaultMessage: 'Are you sure you want to permanently clear all your notifications?' },\n clearConfirm: { id: 'notifications.clear', defaultMessage: 'Clear notifications' },\n});\n\nconst mapStateToProps = state => ({\n settings: state.getIn(['settings', 'notifications']),\n pushSettings: state.get('push_notifications'),\n});\n\nconst mapDispatchToProps = (dispatch, { intl }) => ({\n\n onChange (path, checked) {\n if (path[0] === 'push') {\n dispatch(changePushNotifications(path.slice(1), checked));\n } else if (path[0] === 'quickFilter') {\n dispatch(changeSetting(['notifications', ...path], checked));\n dispatch(setFilter('all'));\n } else {\n dispatch(changeSetting(['notifications', ...path], checked));\n }\n },\n\n onClear () {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.clearMessage),\n confirm: intl.formatMessage(messages.clearConfirm),\n onConfirm: () => dispatch(clearNotifications()),\n }));\n },\n\n});\n\nexport default injectIntl(connect(mapStateToProps, mapDispatchToProps)(ColumnSettings));\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\n\nconst tooltips = defineMessages({\n mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' },\n favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favourites' },\n boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' },\n follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' },\n});\n\nexport default @injectIntl\nclass FilterBar extends React.PureComponent {\n\n static propTypes = {\n selectFilter: PropTypes.func.isRequired,\n selectedFilter: PropTypes.string.isRequired,\n advancedMode: PropTypes.bool.isRequired,\n intl: PropTypes.object.isRequired,\n };\n\n onClick (notificationType) {\n return () => this.props.selectFilter(notificationType);\n }\n\n render () {\n const { selectedFilter, advancedMode, intl } = this.props;\n const renderedElement = !advancedMode ? (\n <div className='notification__filter-bar'>\n <button\n className={selectedFilter === 'all' ? 'active' : ''}\n onClick={this.onClick('all')}\n >\n <FormattedMessage\n id='notifications.filter.all'\n defaultMessage='All'\n />\n </button>\n <button\n className={selectedFilter === 'mention' ? 'active' : ''}\n onClick={this.onClick('mention')}\n >\n <FormattedMessage\n id='notifications.filter.mentions'\n defaultMessage='Mentions'\n />\n </button>\n </div>\n ) : (\n <div className='notification__filter-bar'>\n <button\n className={selectedFilter === 'all' ? 'active' : ''}\n onClick={this.onClick('all')}\n >\n <FormattedMessage\n id='notifications.filter.all'\n defaultMessage='All'\n />\n </button>\n <button\n className={selectedFilter === 'mention' ? 'active' : ''}\n onClick={this.onClick('mention')}\n title={intl.formatMessage(tooltips.mentions)}\n >\n <i className='fa fa-fw fa-at' />\n </button>\n <button\n className={selectedFilter === 'favourite' ? 'active' : ''}\n onClick={this.onClick('favourite')}\n title={intl.formatMessage(tooltips.favourites)}\n >\n <i className='fa fa-fw fa-star' />\n </button>\n <button\n className={selectedFilter === 'reblog' ? 'active' : ''}\n onClick={this.onClick('reblog')}\n title={intl.formatMessage(tooltips.boosts)}\n >\n <i className='fa fa-fw fa-retweet' />\n </button>\n <button\n className={selectedFilter === 'follow' ? 'active' : ''}\n onClick={this.onClick('follow')}\n title={intl.formatMessage(tooltips.follows)}\n >\n <i className='fa fa-fw fa-user-plus' />\n </button>\n </div>\n );\n return renderedElement;\n }\n\n}\n","import { connect } from 'react-redux';\nimport FilterBar from '../components/filter_bar';\nimport { setFilter } from '../../../actions/notifications';\n\nconst makeMapStateToProps = state => ({\n selectedFilter: state.getIn(['settings', 'notifications', 'quickFilter', 'active']),\n advancedMode: state.getIn(['settings', 'notifications', 'quickFilter', 'advanced']),\n});\n\nconst mapDispatchToProps = (dispatch) => ({\n selectFilter (newActiveFilter) {\n dispatch(setFilter(newActiveFilter));\n },\n});\n\nexport default connect(makeMapStateToProps, mapDispatchToProps)(FilterBar);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Column from 'flavours/glitch/components/column';\nimport ColumnHeader from 'flavours/glitch/components/column_header';\nimport {\n enterNotificationClearingMode,\n expandNotifications,\n scrollTopNotifications,\n mountNotifications,\n unmountNotifications,\n} from 'flavours/glitch/actions/notifications';\nimport { addColumn, removeColumn, moveColumn } from 'flavours/glitch/actions/columns';\nimport NotificationContainer from './containers/notification_container';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ColumnSettingsContainer from './containers/column_settings_container';\nimport FilterBarContainer from './containers/filter_bar_container';\nimport { createSelector } from 'reselect';\nimport { List as ImmutableList } from 'immutable';\nimport { debounce } from 'lodash';\nimport ScrollableList from 'flavours/glitch/components/scrollable_list';\nimport LoadGap from 'flavours/glitch/components/load_gap';\n\nconst messages = defineMessages({\n title: { id: 'column.notifications', defaultMessage: 'Notifications' },\n});\n\nconst getNotifications = createSelector([\n state => state.getIn(['settings', 'notifications', 'quickFilter', 'show']),\n state => state.getIn(['settings', 'notifications', 'quickFilter', 'active']),\n state => ImmutableList(state.getIn(['settings', 'notifications', 'shows']).filter(item => !item).keys()),\n state => state.getIn(['notifications', 'items']),\n], (showFilterBar, allowedType, excludedTypes, notifications) => {\n if (!showFilterBar || allowedType === 'all') {\n // used if user changed the notification settings after loading the notifications from the server\n // otherwise a list of notifications will come pre-filtered from the backend\n // we need to turn it off for FilterBar in order not to block ourselves from seeing a specific category\n return notifications.filterNot(item => item !== null && excludedTypes.includes(item.get('type')));\n }\n return notifications.filter(item => item !== null && allowedType === item.get('type'));\n});\n\nconst mapStateToProps = state => ({\n showFilterBar: state.getIn(['settings', 'notifications', 'quickFilter', 'show']),\n notifications: getNotifications(state),\n localSettings: state.get('local_settings'),\n isLoading: state.getIn(['notifications', 'isLoading'], true),\n isUnread: state.getIn(['notifications', 'unread']) > 0,\n hasMore: state.getIn(['notifications', 'hasMore']),\n notifCleaningActive: state.getIn(['notifications', 'cleaningMode']),\n});\n\n/* glitch */\nconst mapDispatchToProps = dispatch => ({\n onEnterCleaningMode(yes) {\n dispatch(enterNotificationClearingMode(yes));\n },\n onMount() {\n dispatch(mountNotifications());\n },\n onUnmount() {\n dispatch(unmountNotifications());\n },\n dispatch,\n});\n\n@connect(mapStateToProps, mapDispatchToProps)\n@injectIntl\nexport default class Notifications extends React.PureComponent {\n\n static propTypes = {\n columnId: PropTypes.string,\n notifications: ImmutablePropTypes.list.isRequired,\n showFilterBar: PropTypes.bool.isRequired,\n dispatch: PropTypes.func.isRequired,\n shouldUpdateScroll: PropTypes.func,\n intl: PropTypes.object.isRequired,\n isLoading: PropTypes.bool,\n isUnread: PropTypes.bool,\n multiColumn: PropTypes.bool,\n hasMore: PropTypes.bool,\n localSettings: ImmutablePropTypes.map,\n notifCleaningActive: PropTypes.bool,\n onEnterCleaningMode: PropTypes.func,\n onMount: PropTypes.func,\n onUnmount: PropTypes.func,\n };\n\n static defaultProps = {\n trackScroll: true,\n };\n\n handleLoadGap = (maxId) => {\n this.props.dispatch(expandNotifications({ maxId }));\n };\n\n handleLoadOlder = debounce(() => {\n const last = this.props.notifications.last();\n this.props.dispatch(expandNotifications({ maxId: last && last.get('id') }));\n }, 300, { leading: true });\n\n handleScrollToTop = debounce(() => {\n this.props.dispatch(scrollTopNotifications(true));\n }, 100);\n\n handleScroll = debounce(() => {\n this.props.dispatch(scrollTopNotifications(false));\n }, 100);\n\n handlePin = () => {\n const { columnId, dispatch } = this.props;\n\n if (columnId) {\n dispatch(removeColumn(columnId));\n } else {\n dispatch(addColumn('NOTIFICATIONS', {}));\n }\n }\n\n handleMove = (dir) => {\n const { columnId, dispatch } = this.props;\n dispatch(moveColumn(columnId, dir));\n }\n\n handleHeaderClick = () => {\n this.column.scrollTop();\n }\n\n setColumnRef = c => {\n this.column = c;\n }\n\n handleMoveUp = id => {\n const elementIndex = this.props.notifications.findIndex(item => item !== null && item.get('id') === id) - 1;\n this._selectChild(elementIndex);\n }\n\n handleMoveDown = id => {\n const elementIndex = this.props.notifications.findIndex(item => item !== null && item.get('id') === id) + 1;\n this._selectChild(elementIndex);\n }\n\n _selectChild (index) {\n const element = this.column.node.querySelector(`article:nth-of-type(${index + 1}) .focusable`);\n\n if (element) {\n element.focus();\n }\n }\n\n componentDidMount () {\n const { onMount } = this.props;\n if (onMount) {\n onMount();\n }\n }\n\n componentWillUnmount () {\n const { onUnmount } = this.props;\n if (onUnmount) {\n onUnmount();\n }\n }\n\n render () {\n const { intl, notifications, shouldUpdateScroll, isLoading, isUnread, columnId, multiColumn, hasMore, showFilterBar } = this.props;\n const pinned = !!columnId;\n const emptyMessage = <FormattedMessage id='empty_column.notifications' defaultMessage=\"You don't have any notifications yet. Interact with others to start the conversation.\" />;\n\n let scrollableContent = null;\n\n const filterBarContainer = showFilterBar\n ? (<FilterBarContainer />)\n : null;\n\n if (isLoading && this.scrollableContent) {\n scrollableContent = this.scrollableContent;\n } else if (notifications.size > 0 || hasMore) {\n scrollableContent = notifications.map((item, index) => item === null ? (\n <LoadGap\n key={'gap:' + notifications.getIn([index + 1, 'id'])}\n disabled={isLoading}\n maxId={index > 0 ? notifications.getIn([index - 1, 'id']) : null}\n onClick={this.handleLoadGap}\n />\n ) : (\n <NotificationContainer\n key={item.get('id')}\n notification={item}\n accountId={item.get('account')}\n onMoveUp={this.handleMoveUp}\n onMoveDown={this.handleMoveDown}\n />\n ));\n } else {\n scrollableContent = null;\n }\n\n this.scrollableContent = scrollableContent;\n\n const scrollContainer = (\n <ScrollableList\n scrollKey={`notifications-${columnId}`}\n trackScroll={!pinned}\n isLoading={isLoading}\n showLoading={isLoading && notifications.size === 0}\n hasMore={hasMore}\n emptyMessage={emptyMessage}\n onLoadMore={this.handleLoadOlder}\n onScrollToTop={this.handleScrollToTop}\n onScroll={this.handleScroll}\n shouldUpdateScroll={shouldUpdateScroll}\n >\n {scrollableContent}\n </ScrollableList>\n );\n\n return (\n <Column\n ref={this.setColumnRef}\n name='notifications'\n extraClasses={this.props.notifCleaningActive ? 'notif-cleaning' : null}\n label={intl.formatMessage(messages.title)}\n >\n <ColumnHeader\n icon='bell'\n active={isUnread}\n title={intl.formatMessage(messages.title)}\n onPin={this.handlePin}\n onMove={this.handleMove}\n onClick={this.handleHeaderClick}\n pinned={pinned}\n multiColumn={multiColumn}\n localSettings={this.props.localSettings}\n notifCleaning\n notifCleaningActive={this.props.notifCleaningActive} // this is used to toggle the header text\n onEnterCleaningMode={this.props.onEnterCleaningMode}\n >\n <ColumnSettingsContainer />\n </ColumnHeader>\n {filterBarContainer}\n {scrollContainer}\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""} |