Reorg notifications feature files

This commit is contained in:
Bettenbuk Zoltan
2019-03-29 18:52:44 +01:00
committed by Zoltan Bettenbuk
parent f12317dc59
commit 10e951c17c
14 changed files with 39 additions and 14 deletions
@@ -1,3 +1,5 @@
// @flow
/**
* The type of (redux) action which signals that all the stored notifications
* need to be cleared.
@@ -0,0 +1,3 @@
// @flow
export * from './native';
@@ -0,0 +1,3 @@
// @flow
export * from './web';
@@ -3,12 +3,13 @@
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { Icon } from '../../base/font-icons';
import { translate } from '../../base/i18n';
import { Icon } from '../../../base/font-icons';
import { translate } from '../../../base/i18n';
import AbstractNotification, {
type Props
} from './AbstractNotification';
} from '../AbstractNotification';
import styles from './styles';
/**
@@ -3,12 +3,13 @@
import React from 'react';
import { View } from 'react-native';
import { connect } from '../../base/redux';
import { connect } from '../../../base/redux';
import AbstractNotificationsContainer, {
_abstractMapStateToProps,
type Props as AbstractProps
} from './AbstractNotificationsContainer';
} from '../AbstractNotificationsContainer';
import Notification from './Notification';
import styles from './styles';
@@ -1,2 +1,4 @@
// @flow
export { default as Notification } from './Notification';
export { default as NotificationsContainer } from './NotificationsContainer';
@@ -1,11 +1,11 @@
// @flow
import { BoxModel, createStyleSheet, ColorPalette } from '../../base/styles';
import { BoxModel, ColorPalette } from '../../../base/styles';
/**
* The styles of the React {@code Components} of the feature notifications.
*/
export default createStyleSheet({
export default {
/**
* The content (left) column of the notification.
@@ -58,4 +58,4 @@ export default createStyleSheet({
notificationContent: {
flexDirection: 'column'
}
});
};
@@ -7,13 +7,13 @@ import WarningIcon from '@atlaskit/icon/glyph/warning';
import { colors } from '@atlaskit/theme';
import React from 'react';
import { translate } from '../../base/i18n';
import { translate } from '../../../base/i18n';
import { NOTIFICATION_TYPE } from '../constants';
import { NOTIFICATION_TYPE } from '../../constants';
import AbstractNotification, {
type Props
} from './AbstractNotification';
} from '../AbstractNotification';
declare var interfaceConfig: Object;
@@ -3,12 +3,13 @@
import { FlagGroup } from '@atlaskit/flag';
import React from 'react';
import { connect } from '../../base/redux';
import { connect } from '../../../base/redux';
import AbstractNotificationsContainer, {
_abstractMapStateToProps as _mapStateToProps,
type Props
} from './AbstractNotificationsContainer';
} from '../AbstractNotificationsContainer';
import Notification from './Notification';
/**
@@ -0,0 +1,4 @@
// @flow
export { default as Notification } from './Notification';
export { default as NotificationsContainer } from './NotificationsContainer';
@@ -1,3 +1,5 @@
// @flow
/**
* The set of possible notification types.
*
+3 -1
View File
@@ -1,3 +1,5 @@
// @flow
import { toState } from '../base/redux';
/**
@@ -7,7 +9,7 @@ import { toState } from '../base/redux';
* @param {Object|Function} stateful - The redux store state.
* @returns {boolean}
*/
export function areThereNotifications(stateful) {
export function areThereNotifications(stateful: Object | Function) {
const state = toState(stateful);
const { enabled, notifications } = state['features/notifications'];
+2
View File
@@ -1,3 +1,5 @@
// @flow
export * from './actions';
export * from './actionTypes';
export * from './components';
+2
View File
@@ -1,3 +1,5 @@
// @flow
import { ReducerRegistry } from '../base/redux';
import {