Ver código fonte

Reorg notifications feature files

j8
Bettenbuk Zoltan 6 anos atrás
pai
commit
10e951c17c

+ 2
- 0
react/features/notifications/actionTypes.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 /**
2 4
  * The type of (redux) action which signals that all the stored notifications
3 5
  * need to be cleared.

+ 3
- 0
react/features/notifications/components/index.native.js Ver arquivo

@@ -0,0 +1,3 @@
1
+// @flow
2
+
3
+export * from './native';

+ 3
- 0
react/features/notifications/components/index.web.js Ver arquivo

@@ -0,0 +1,3 @@
1
+// @flow
2
+
3
+export * from './web';

react/features/notifications/components/Notification.native.js → react/features/notifications/components/native/Notification.js Ver arquivo

@@ -3,12 +3,13 @@
3 3
 import React from 'react';
4 4
 import { Text, TouchableOpacity, View } from 'react-native';
5 5
 
6
-import { Icon } from '../../base/font-icons';
7
-import { translate } from '../../base/i18n';
6
+import { Icon } from '../../../base/font-icons';
7
+import { translate } from '../../../base/i18n';
8 8
 
9 9
 import AbstractNotification, {
10 10
     type Props
11
-} from './AbstractNotification';
11
+} from '../AbstractNotification';
12
+
12 13
 import styles from './styles';
13 14
 
14 15
 /**

react/features/notifications/components/NotificationsContainer.native.js → react/features/notifications/components/native/NotificationsContainer.js Ver arquivo

@@ -3,12 +3,13 @@
3 3
 import React from 'react';
4 4
 import { View } from 'react-native';
5 5
 
6
-import { connect } from '../../base/redux';
6
+import { connect } from '../../../base/redux';
7 7
 
8 8
 import AbstractNotificationsContainer, {
9 9
     _abstractMapStateToProps,
10 10
     type Props as AbstractProps
11
-} from './AbstractNotificationsContainer';
11
+} from '../AbstractNotificationsContainer';
12
+
12 13
 import Notification from './Notification';
13 14
 import styles from './styles';
14 15
 

react/features/notifications/components/index.js → react/features/notifications/components/native/index.js Ver arquivo

@@ -1,2 +1,4 @@
1
+// @flow
2
+
1 3
 export { default as Notification } from './Notification';
2 4
 export { default as NotificationsContainer } from './NotificationsContainer';

react/features/notifications/components/styles.js → react/features/notifications/components/native/styles.js Ver arquivo

@@ -1,11 +1,11 @@
1 1
 // @flow
2 2
 
3
-import { BoxModel, createStyleSheet, ColorPalette } from '../../base/styles';
3
+import { BoxModel, ColorPalette } from '../../../base/styles';
4 4
 
5 5
 /**
6 6
  * The styles of the React {@code Components} of the feature notifications.
7 7
  */
8
-export default createStyleSheet({
8
+export default {
9 9
 
10 10
     /**
11 11
      * The content (left) column of the notification.
@@ -58,4 +58,4 @@ export default createStyleSheet({
58 58
     notificationContent: {
59 59
         flexDirection: 'column'
60 60
     }
61
-});
61
+};

react/features/notifications/components/Notification.web.js → react/features/notifications/components/web/Notification.js Ver arquivo

@@ -7,13 +7,13 @@ import WarningIcon from '@atlaskit/icon/glyph/warning';
7 7
 import { colors } from '@atlaskit/theme';
8 8
 import React from 'react';
9 9
 
10
-import { translate } from '../../base/i18n';
10
+import { translate } from '../../../base/i18n';
11 11
 
12
-import { NOTIFICATION_TYPE } from '../constants';
12
+import { NOTIFICATION_TYPE } from '../../constants';
13 13
 
14 14
 import AbstractNotification, {
15 15
     type Props
16
-} from './AbstractNotification';
16
+} from '../AbstractNotification';
17 17
 
18 18
 declare var interfaceConfig: Object;
19 19
 

react/features/notifications/components/NotificationsContainer.web.js → react/features/notifications/components/web/NotificationsContainer.js Ver arquivo

@@ -3,12 +3,13 @@
3 3
 import { FlagGroup } from '@atlaskit/flag';
4 4
 import React from 'react';
5 5
 
6
-import { connect } from '../../base/redux';
6
+import { connect } from '../../../base/redux';
7 7
 
8 8
 import AbstractNotificationsContainer, {
9 9
     _abstractMapStateToProps as _mapStateToProps,
10 10
     type Props
11
-} from './AbstractNotificationsContainer';
11
+} from '../AbstractNotificationsContainer';
12
+
12 13
 import Notification from './Notification';
13 14
 
14 15
 /**

+ 4
- 0
react/features/notifications/components/web/index.js Ver arquivo

@@ -0,0 +1,4 @@
1
+// @flow
2
+
3
+export { default as Notification } from './Notification';
4
+export { default as NotificationsContainer } from './NotificationsContainer';

+ 2
- 0
react/features/notifications/constants.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 /**
2 4
  * The set of possible notification types.
3 5
  *

+ 3
- 1
react/features/notifications/functions.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import { toState } from '../base/redux';
2 4
 
3 5
 /**
@@ -7,7 +9,7 @@ import { toState } from '../base/redux';
7 9
  * @param {Object|Function} stateful - The redux store state.
8 10
  * @returns {boolean}
9 11
  */
10
-export function areThereNotifications(stateful) {
12
+export function areThereNotifications(stateful: Object | Function) {
11 13
     const state = toState(stateful);
12 14
     const { enabled, notifications } = state['features/notifications'];
13 15
 

+ 2
- 0
react/features/notifications/index.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 export * from './actions';
2 4
 export * from './actionTypes';
3 5
 export * from './components';

+ 2
- 0
react/features/notifications/reducer.js Ver arquivo

@@ -1,3 +1,5 @@
1
+// @flow
2
+
1 3
 import { ReducerRegistry } from '../base/redux';
2 4
 
3 5
 import {

Carregando…
Cancelar
Salvar