Merge pull request #1167 from esteemapp/refactor/components-str

import/export refact for components [should review after profile !!]
This commit is contained in:
Mustafa Buyukcelebi 2019-09-25 11:29:07 +03:00 committed by GitHub
commit e20eecb8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 238 additions and 113 deletions

View File

@ -1 +1,3 @@
export { default } from './view/checkboxView';
import CheckBox from './view/checkboxView';
export { CheckBox };

View File

@ -1,37 +1,182 @@
import { CircularButton, TextButton, IconButton } from './buttons';
import { AvatarHeader } from './avatarHeader';
import { BasicHeader } from './basicHeader';
import { BottomTabBar } from './bottomTabBar';
import { CheckBox } from './checkbox';
import { CircularButton, TextButton, SquareButton } from './buttons';
import { CollapsibleCard } from './collapsibleCard';
import { ContainerHeader } from './containerHeader';
import { DateTimePicker } from './dateTimePicker';
import { DropdownButton } from './dropdownButton';
import { FilterBar } from './filterBar';
import { FormatedCurrency } from './formatedElements';
import { FormInput } from './formInput';
import { Header } from './header';
import { Icon } from './icon';
import { IconButton } from './iconButton';
import { InformationArea } from './informationArea';
import { InformationBox } from './informationBox';
import { LoginHeader } from './loginHeader';
import { MainButton } from './mainButton';
import { MarkdownEditor } from './markdownEditor';
import { Modal } from './modal';
import { NotificationLine } from './notificationLine';
import { NumericKeyboard } from './numericKeyboard';
import { ParentPost } from './parentPost';
import { PercentBar } from './percentBar';
import { PinAnimatedInput } from './pinAnimatedInput';
import { PostCard } from './postCard';
import { PostDisplay } from './postView';
import { PostDropdown } from './postDropdown';
import { PostForm } from './postForm';
import { PostHeaderDescription, PostBody, Tags } from './postElements';
import { PostListItem } from './postListItem';
import { ProfileSummary } from './profileSummary';
import { PulseAnimation } from './animations';
import { SearchInput } from './searchInput';
import { SearchModal } from './searchModal';
import { SettingsItem } from './settingsItem';
import { SideMenu } from './sideMenu';
import { SummaryArea, TagArea, TextArea, TitleArea } from './editorElements';
import { TabBar } from './tabBar';
import { TextInput } from './textInput';
import Icon from './icon';
import { ToastNotification } from './toastNotification';
import { ToggleSwitch } from './toggleSwitch';
import { TransferFormItem } from './transferFormItem';
import { Upvote } from './upvote';
import { UserAvatar } from './userAvatar';
import Logo from './logo/logo';
import Modal from './modal';
import PostBoost from './postBoost/postBoostView';
import PostButton from './postButton/postButtonView';
import ProfileEditForm from './profileEditForm/profileEditFormView';
import Promote from './promote/promoteView';
import ScaleSlider from './scaleSlider/scaleSliderView';
import UserListItem from './basicUIElements/view/userListItem/userListItem';
// View
import { Comment } from './comment';
import { Comments } from './comments';
import { CommentsDisplay } from './commentsDisplay';
import { LeaderBoard } from './leaderboard';
import { Notification } from './notification';
import { Points } from './points';
import { Posts } from './posts';
import { Transaction } from './transaction';
import { VotersDisplay } from './votersDisplay';
import { Wallet } from './wallet';
import { WalletDetails } from './walletDetails';
import PostBoost from './postBoost/postBoostView';
import Profile from './profile/profileView';
import Promote from './promote/promoteView';
// Basic UI Elements
import {
BoostPlaceHolder,
Card,
Chip,
GrayWrapper,
LineBreak,
ListItemPlaceHolder,
ListPlaceHolder,
NoInternetConnection,
NoPost,
PostCardPlaceHolder,
PostPlaceHolder,
ProfileSummaryPlaceHolder,
StickyBar,
Tag,
TextWithIcon,
UserListItem,
WalletDetailsPlaceHolder,
WalletLineItem,
WalletUnclaimedPlaceHolder,
} from './basicUIElements';
export {
Card,
Chip,
GrayWrapper,
LineBreak,
ListItemPlaceHolder,
ListPlaceHolder,
BoostPlaceHolder,
NoInternetConnection,
NoPost,
PostCardPlaceHolder,
PostPlaceHolder,
ProfileSummaryPlaceHolder,
StickyBar,
Tag,
TextWithIcon,
UserListItem,
WalletDetailsPlaceHolder,
WalletLineItem,
WalletUnclaimedPlaceHolder,
AvatarHeader,
BasicHeader,
InformationBox,
BottomTabBar,
CheckBox,
CircularButton,
CollapsibleCard,
Comment,
Comments,
CommentsDisplay,
ContainerHeader,
DateTimePicker,
DropdownButton,
FilterBar,
FormatedCurrency,
FormInput,
Header,
Icon,
IconButton,
InformationArea,
LeaderBoard,
LoginHeader,
Logo,
MainButton,
MarkdownEditor,
Modal,
Notification,
NotificationLine,
NumericKeyboard,
ParentPost,
PercentBar,
PinAnimatedInput,
Points,
PostBody,
PostBoost,
PostButton,
PostCard,
PostDisplay,
PostDropdown,
PostForm,
PostHeaderDescription,
PostListItem,
Posts,
Profile,
ProfileEditForm,
ProfileSummary,
Promote,
PulseAnimation,
ScaleSlider,
SearchInput,
SearchModal,
SettingsItem,
SideMenu,
SquareButton,
SummaryArea,
TabBar,
TagArea,
Tags,
TextArea,
TextButton,
TextInput,
UserListItem,
Promote,
PostBoost,
TitleArea,
ToastNotification,
ToggleSwitch,
Transaction,
TransferFormItem,
Upvote,
UserAvatar,
VotersDisplay,
Wallet,
WalletDetails,
};

View File

@ -1 +1,3 @@
export { default } from './view/informationBox';
import InformationBox from './view/informationBoxView';
export { InformationBox };

View File

@ -8,7 +8,7 @@ import { injectIntl } from 'react-intl';
// Components
import { ContainerHeader } from '../../containerHeader';
import { FilterBar } from '../../filterBar';
import NotificationLine from '../../notificationLine';
import { NotificationLine } from '../..';
import { ListPlaceHolder } from '../../basicUIElements';
// Utils

View File

@ -1,3 +1,3 @@
import NotificationLineView from './view/notificationLineView';
import NotificationLine from './view/notificationLineView';
export default NotificationLineView;
export { NotificationLine };

View File

@ -1,7 +1,8 @@
import React from 'react';
import { View } from 'react-native';
import times from 'lodash/times';
import { CircularButton, IconButton } from '../../buttons';
import { CircularButton } from '../../buttons';
import { IconButton } from '../../iconButton';
import styles from './numericKeyboardStyles';
@ -26,11 +27,11 @@ const NumericKeyboard = ({ onPress }) => (
onPress={value => onPress && onPress(value)}
/>
<IconButton
handleOnPress={() => onPress && onPress('clear')}
onPress={() => onPress && onPress('clear')}
isCircle
buttonStyle={styles.buttonWithoutBorder}
style={styles.iconButton}
name="backspace"
name="ios-backspace"
/>
</View>
</View>

View File

@ -8,7 +8,7 @@ import {
ActivityIndicator,
Linking,
} from 'react-native';
import { get, has } from 'lodash';
import get from 'lodash/get';
// Constants
import LIGHT_COVER_IMAGE from '../../../assets/default_cover_image.png';

View File

@ -1,3 +1,3 @@
import SearchInput from './view/searchInputView';
export default SearchInput;
export { SearchInput };

View File

@ -4,8 +4,7 @@ import FastImage from 'react-native-fast-image';
import { get, has } from 'lodash';
// Components
import { Modal } from '../..';
import SearchInput from '../../searchInput';
import { Modal, SearchInput } from '../..';
// Styles
import styles from './searchModalStyles';

View File

@ -6,7 +6,7 @@ import ActionSheet from 'react-native-actionsheet';
import VersionNumber from 'react-native-version-number';
// Components
import { IconButton } from '../../buttons';
import { IconButton } from '../../iconButton';
import { Icon } from '../../icon';
import { UserAvatar } from '../../userAvatar';
@ -121,13 +121,13 @@ class SideMenuView extends Component {
<View style={styles.userInfoWrapper}>
<IconButton
name={isAddAccountIconActive ? 'arrow-dropup' : 'add-circle-outline'}
name={isAddAccountIconActive ? 'arrow-dropup' : 'ios-add-circle-outline'}
androidName={
isAddAccountIconActive ? 'md-arrow-dropup' : 'ios-add-circle-outline'
}
color="white"
size={20}
handleOnPress={() => this._handleOnPressAddAccountIcon()}
onPress={this._handleOnPressAddAccountIcon}
style={styles.addAccountIcon}
/>
</View>

View File

@ -7,8 +7,7 @@ import ROUTES from '../constants/routeNames';
// Components
import { Icon, IconContainer } from '../components/icon';
import { Home, Notification, Profile, Points } from '../screens';
import { PostButton } from '../components';
import { BottomTabBar } from '../components/bottomTabBar';
import { PostButton, BottomTabBar } from '../components';
const BaseNavigator = createBottomTabNavigator(
{

View File

@ -9,8 +9,7 @@ import { ReduxNavigation } from '../../../navigation/reduxNavigation';
import { toastNotification as toastNotificationAction } from '../../../redux/actions/uiAction';
// Components
import { NoInternetConnection } from '../../../components/basicUIElements';
import { ToastNotification } from '../../../components/toastNotification';
import { ToastNotification, NoInternetConnection } from '../../../components';
// Themes (Styles)
import darkTheme from '../../../themes/darkTheme';

View File

@ -5,13 +5,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import ActionSheet from 'react-native-actionsheet';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import {
PostCardPlaceHolder,
UserListItem,
WalletDetailsPlaceHolder,
} from '../../../components/basicUIElements';
import { TabBar } from '../../../components/tabBar';
import { UserListItem, WalletDetailsPlaceHolder, BasicHeader, TabBar } from '../../../components';
// Styles
import globalStyles from '../../../globalStyles';

View File

@ -4,10 +4,7 @@ import { View, Text } from 'react-native';
import get from 'lodash/get';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { MainButton } from '../../../components/mainButton';
import { Icon } from '../../../components/icon';
import { BoostPlaceHolder } from '../../../components/basicUIElements';
import { BasicHeader, Icon, MainButton, BoostPlaceHolder } from '../../../components';
// Styles
import globalStyles from '../../../globalStyles';

View File

@ -11,10 +11,7 @@ import { catchDraftImage } from '../../../utils/image';
import { getFormatedCreatedDate } from '../../../utils/time';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { PostListItem } from '../../../components/postListItem';
import { PostCardPlaceHolder } from '../../../components/basicUIElements';
import { TabBar } from '../../../components/tabBar';
import { BasicHeader, TabBar, PostListItem, PostCardPlaceHolder } from '../../../components';
// Styles
import globalStyles from '../../../globalStyles';

View File

@ -7,9 +7,14 @@ import get from 'lodash/get';
import { getWordsCount } from '../../../utils/editor';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { TitleArea, TagArea, TextArea, SummaryArea } from '../../../components/editorElements';
import { PostForm } from '../../../components/postForm';
import {
BasicHeader,
TitleArea,
TagArea,
TextArea,
SummaryArea,
PostForm,
} from '../../../components';
// Styles
import globalStyles from '../../../globalStyles';

View File

@ -6,8 +6,7 @@ import { injectIntl } from 'react-intl';
// Constants
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { UserListItem } from '../../../components/basicUIElements';
import { BasicHeader, UserListItem } from '../../../components';
// Utils
import styles from './followScreenStyles';

View File

@ -4,9 +4,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import { injectIntl } from 'react-intl';
// Components
import { TabBar } from '../../../components/tabBar';
import { Posts } from '../../../components/posts';
import { Header } from '../../../components/header';
import { TabBar, Posts, Header } from '../../../components';
// Styles
import styles from './homeStyles';

View File

@ -8,13 +8,15 @@ import { injectIntl } from 'react-intl';
import SteemConnect from '../../steem-connect/steemConnect';
// Internal Components
import { FormInput } from '../../../components/formInput';
import { InformationArea } from '../../../components/informationArea';
import { LoginHeader } from '../../../components/loginHeader';
import { MainButton } from '../../../components/mainButton';
import { Modal } from '../../../components';
import { TabBar } from '../../../components/tabBar';
import { TextButton } from '../../../components/buttons';
import {
FormInput,
InformationArea,
LoginHeader,
MainButton,
Modal,
TabBar,
TextButton,
} from '../../../components';
// Constants
import { default as ROUTES } from '../../../constants/routeNames';

View File

@ -4,11 +4,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import { injectIntl } from 'react-intl';
// Components
import { TabBar } from '../../../components/tabBar';
import { Notification } from '../../../components/notification';
import { Header } from '../../../components/header';
import { NoPost } from '../../../components/basicUIElements';
import { LeaderBoard } from '../../../components/leaderboard';
import { TabBar, LeaderBoard, Notification, Header, NoPost } from '../../../components';
// Styles
import styles from './notificationStyles';

View File

@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { NumericKeyboard, PinAnimatedInput } from '../../../components';
import { UserAvatar } from '../../../components/userAvatar';
import { UserAvatar } from '../../../components';
import styles from './pinCodeStyles';

View File

@ -6,9 +6,7 @@ import { View } from 'react-native';
import { PointsContainer } from '../../../containers';
// Components
import { Header } from '../../../components/header';
import { NoPost } from '../../../components/basicUIElements';
import { Points } from '../../../components/points';
import { Header, Points, NoPost } from '../../../components';
// Styles
import styles from './pointsStyles';

View File

@ -3,9 +3,7 @@ import React, { PureComponent, Fragment } from 'react';
// Constants
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { PostDisplay } from '../../../components/postView';
import { PostDropdown } from '../../../components/postDropdown';
import { BasicHeader, PostDisplay, PostDropdown } from '../../../components';
class PostScreen extends PureComponent {
/* Props

View File

@ -5,8 +5,7 @@ import ActionSheet from 'react-native-actionsheet';
import { ProfileEditContainer } from '../../../containers';
import AvatarHeader from '../../../components/avatarHeader/avatarHeaderView';
import ProfileEditForm from '../../../components/profileEditForm/profileEditFormView';
import { AvatarHeader, ProfileEditForm } from '../../../components';
class ProfileEditScreen extends PureComponent {
/* Props

View File

@ -5,8 +5,7 @@ import { useIntl } from 'react-intl';
// Constants
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { UserListItem } from '../../../components/basicUIElements';
import { BasicHeader, UserListItem } from '../../../components';
import AccountListContainer from '../../../containers/accountListContainer';

View File

@ -4,9 +4,7 @@ import ScrollableTabView from 'react-native-scrollable-tab-view';
import { injectIntl } from 'react-intl';
// Components
import { TabBar } from '../../../components/tabBar';
import { Posts } from '../../../components/posts';
import SearchInput from '../../../components/searchInput';
import { SearchInput, Posts, TabBar } from '../../../components';
// Styles
import styles from './searchResultStyles';

View File

@ -12,9 +12,7 @@ import CURRENCY, { VALUE as CURRENCY_VALUE } from '../../../constants/options/cu
import NSFW from '../../../constants/options/nsfw';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { SettingsItem } from '../../../components/settingsItem';
import { CollapsibleCard } from '../../../components/collapsibleCard';
import { BasicHeader, SettingsItem, CollapsibleCard } from '../../../components';
// Styles
import styles from './settingsStyles';

View File

@ -10,14 +10,16 @@ import AUTH_TYPE from '../../../constants/authType';
import { steemConnectOptions } from '../../../constants/steemConnectOptions';
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { TransferFormItem } from '../../../components/transferFormItem';
import { DropdownButton } from '../../../components/dropdownButton';
import { TextInput } from '../../../components/textInput';
import { MainButton } from '../../../components/mainButton';
import { UserAvatar } from '../../../components/userAvatar';
import { Icon } from '../../../components/icon';
import { Modal } from '../../../components/modal';
import {
BasicHeader,
TransferFormItem,
DropdownButton,
TextInput,
MainButton,
UserAvatar,
Icon,
Modal,
} from '../../../components';
import parseToken from '../../../utils/parseToken';
import { isEmptyDate } from '../../../utils/time';

View File

@ -8,15 +8,17 @@ import get from 'lodash/get';
import { getWithdrawRoutes } from '../../../providers/steem/dsteem';
import AUTH_TYPE from '../../../constants/authType';
import { BasicHeader } from '../../../components/basicHeader';
import { TransferFormItem } from '../../../components/transferFormItem';
import { MainButton } from '../../../components/mainButton';
import { DropdownButton } from '../../../components/dropdownButton';
import { Modal } from '../../../components/modal';
import { SquareButton } from '../../../components/buttons';
import InformationBox from '../../../components/informationBox';
import { Icon } from '../../../components/icon';
import { IconButton } from '../../../components/iconButton';
import {
BasicHeader,
TransferFormItem,
MainButton,
DropdownButton,
Modal,
SquareButton,
InformationBox,
Icon,
IconButton,
} from '../../../components';
import WithdrawAccountModal from './withdrawAccountModal';
import parseToken from '../../../utils/parseToken';

View File

@ -7,14 +7,16 @@ import get from 'lodash/get';
import { steemConnectOptions } from '../../../constants/steemConnectOptions';
import AUTH_TYPE from '../../../constants/authType';
import { BasicHeader } from '../../../components/basicHeader';
import { TextInput } from '../../../components/textInput';
import { TransferFormItem } from '../../../components/transferFormItem';
import { MainButton } from '../../../components/mainButton';
import { DropdownButton } from '../../../components/dropdownButton';
import { UserAvatar } from '../../../components/userAvatar';
import { Icon } from '../../../components/icon';
import { Modal } from '../../../components/modal';
import {
BasicHeader,
TextInput,
TransferFormItem,
MainButton,
DropdownButton,
UserAvatar,
Icon,
Modal,
} from '../../../components';
import styles from './transferStyles';

View File

@ -6,11 +6,7 @@ import { injectIntl } from 'react-intl';
// Constants
// Components
import { TransferFormItem } from '../../../components/transferFormItem';
import CheckBox from '../../../components/checkbox';
import { MainButton } from '../../../components/mainButton';
import { TextInput } from '../../../components/textInput';
import { UserAvatar } from '../../../components/userAvatar';
import { CheckBox, TransferFormItem, MainButton, TextInput, UserAvatar } from '../../../components';
// Styles
import styles from './transferStyles';

View File

@ -5,9 +5,7 @@ import { useIntl } from 'react-intl';
// Constants
// Components
import { BasicHeader } from '../../../components/basicHeader';
import { FilterBar } from '../../../components/filterBar';
import { VotersDisplay } from '../../../components/votersDisplay';
import { BasicHeader, FilterBar, VotersDisplay } from '../../../components';
import AccountListContainer from '../../../containers/accountListContainer';