@fadyshawky/react-native-magic 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +7 -0
- package/README.md +269 -0
- package/package.json +36 -0
- package/template/.bundle/config +2 -0
- package/template/.env.development +5 -0
- package/template/.env.production +5 -0
- package/template/.env.staging +5 -0
- package/template/.eslintrc.js +4 -0
- package/template/.prettierrc.js +7 -0
- package/template/.watchmanconfig +1 -0
- package/template/App.tsx +34 -0
- package/template/Gemfile +9 -0
- package/template/Gemfile.lock +117 -0
- package/template/README.md +79 -0
- package/template/__tests__/App.test.tsx +17 -0
- package/template/android/app/build.gradle +128 -0
- package/template/android/app/debug.keystore +0 -0
- package/template/android/app/proguard-rules.pro +10 -0
- package/template/android/app/src/debug/AndroidManifest.xml +9 -0
- package/template/android/app/src/main/AndroidManifest.xml +26 -0
- package/template/android/app/src/main/java/com/reactnativemagic/MainActivity.kt +22 -0
- package/template/android/app/src/main/java/com/reactnativemagic/MainApplication.kt +44 -0
- package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/template/android/app/src/main/res/values/strings.xml +3 -0
- package/template/android/app/src/main/res/values/styles.xml +9 -0
- package/template/android/build.gradle +21 -0
- package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/template/android/gradle.properties +39 -0
- package/template/android/gradlew +252 -0
- package/template/android/gradlew.bat +94 -0
- package/template/android/settings.gradle +6 -0
- package/template/app.json +4 -0
- package/template/babel.config.js +3 -0
- package/template/index.js +9 -0
- package/template/install-dev.sh +1 -0
- package/template/install.sh +1 -0
- package/template/ios/.xcode.env +11 -0
- package/template/ios/Podfile +42 -0
- package/template/ios/Podfile.lock +2461 -0
- package/template/ios/reactnativemagic/AppDelegate.h +6 -0
- package/template/ios/reactnativemagic/AppDelegate.mm +31 -0
- package/template/ios/reactnativemagic/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/template/ios/reactnativemagic/Images.xcassets/Contents.json +6 -0
- package/template/ios/reactnativemagic/Info.plist +52 -0
- package/template/ios/reactnativemagic/LaunchScreen.storyboard +47 -0
- package/template/ios/reactnativemagic/PrivacyInfo.xcprivacy +46 -0
- package/template/ios/reactnativemagic/main.m +10 -0
- package/template/ios/reactnativemagic copy-Info.plist +52 -0
- package/template/ios/reactnativemagic.xcodeproj/project.pbxproj +836 -0
- package/template/ios/reactnativemagic.xcodeproj/xcshareddata/xcschemes/reactnativemagic.xcscheme +88 -0
- package/template/ios/reactnativemagic.xcworkspace/contents.xcworkspacedata +10 -0
- package/template/ios/reactnativemagic.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
- package/template/ios/reactnativemagicTests/Info.plist +24 -0
- package/template/ios/reactnativemagicTests/reactnativemagicTests.m +66 -0
- package/template/ios/tmp.xcconfig +2 -0
- package/template/jest.config.js +3 -0
- package/template/metro.config.js +11 -0
- package/template/package-lock.json +18315 -0
- package/template/package.json +125 -0
- package/template/resources/symbols/SFSymbols.ts +2614 -0
- package/template/src/common/ImageResources.g.ts +14 -0
- package/template/src/common/components/Background.tsx +34 -0
- package/template/src/common/components/EmptyView.tsx +31 -0
- package/template/src/common/components/FlatListWrapper.tsx +66 -0
- package/template/src/common/components/IconPlatform.tsx +17 -0
- package/template/src/common/components/ImageCropPickerButton.tsx +108 -0
- package/template/src/common/components/LoadingComponent.tsx +16 -0
- package/template/src/common/components/PhotoTakingButton.tsx +99 -0
- package/template/src/common/components/PrimaryButton.tsx +305 -0
- package/template/src/common/components/PrimaryTextInput.tsx +287 -0
- package/template/src/common/components/RadioButton.tsx +73 -0
- package/template/src/common/components/RadioIcon.tsx +63 -0
- package/template/src/common/components/Separator.tsx +39 -0
- package/template/src/common/components/Svg.tsx +25 -0
- package/template/src/common/components/TouchablePlatform.tsx +70 -0
- package/template/src/common/components/TryAgain.tsx +56 -0
- package/template/src/common/helpers/arrayHelpers.ts +29 -0
- package/template/src/common/helpers/calculatePage.ts +16 -0
- package/template/src/common/helpers/colorHelpers.ts +34 -0
- package/template/src/common/helpers/defaultKeyIdExtractor.ts +5 -0
- package/template/src/common/helpers/dialogsHelpers.ts +66 -0
- package/template/src/common/helpers/imageHelpers.ts +5 -0
- package/template/src/common/helpers/inAppReviewHelper.ts +31 -0
- package/template/src/common/helpers/netInfoHelpers.ts +42 -0
- package/template/src/common/helpers/orientationHelpers.ts +25 -0
- package/template/src/common/helpers/regexHelpers.ts +7 -0
- package/template/src/common/helpers/shareHelpers.ts +47 -0
- package/template/src/common/helpers/stringsHelpers.ts +15 -0
- package/template/src/common/hooks/useBackHandler.ts +10 -0
- package/template/src/common/hooks/useDebounce.ts +17 -0
- package/template/src/common/hooks/useEventRegister.ts +50 -0
- package/template/src/common/hooks/useFlatListActions.ts +31 -0
- package/template/src/common/hooks/usePrevious.ts +11 -0
- package/template/src/common/hooks/useWhyDidYouUpdate.ts +27 -0
- package/template/src/common/localization/dateFormatter.ts +108 -0
- package/template/src/common/localization/intlFormatter.ts +37 -0
- package/template/src/common/localization/localization.ts +51 -0
- package/template/src/common/localization/translations/commonLocalization.ts +29 -0
- package/template/src/common/localization/translations/emptyLocalization.ts +6 -0
- package/template/src/common/localization/translations/errorsLocalization.ts +22 -0
- package/template/src/common/localization/translations/homeLocalization.ts +5 -0
- package/template/src/common/localization/translations/loginLocalization.ts +14 -0
- package/template/src/common/localization/translations/onboardingLocalization.ts +13 -0
- package/template/src/common/localization/translations/pagesLocalization.ts +14 -0
- package/template/src/common/localization/translations/profileLocalization.ts +6 -0
- package/template/src/common/urls/baseUrlOpener.ts +31 -0
- package/template/src/common/urls/emailUrl.ts +20 -0
- package/template/src/common/urls/httpUrl.ts +19 -0
- package/template/src/common/urls/mapUrl.ts +22 -0
- package/template/src/common/urls/phoneUrl.ts +16 -0
- package/template/src/common/utils/createPerfectSize.ts +15 -0
- package/template/src/common/utils/listHandlers.ts +30 -0
- package/template/src/common/utils/newState.ts +5 -0
- package/template/src/common/utils/serializeQueryParams.ts +10 -0
- package/template/src/common/validations/authValidations.ts +15 -0
- package/template/src/common/validations/commonValidations.ts +39 -0
- package/template/src/common/validations/errorValidations.ts +72 -0
- package/template/src/common/validations/hooks/useDatesError.ts +40 -0
- package/template/src/common/validations/hooks/useInputError.ts +30 -0
- package/template/src/common/validations/profileValidations.ts +30 -0
- package/template/src/common/validations/validationConstants.ts +20 -0
- package/template/src/core/api/responseHandlers.ts +43 -0
- package/template/src/core/api/serverHeaders.ts +39 -0
- package/template/src/core/store/app/appSlice.ts +12 -0
- package/template/src/core/store/app/appState.ts +3 -0
- package/template/src/core/store/reduxHelpers.ts +11 -0
- package/template/src/core/store/rootReducer.ts +10 -0
- package/template/src/core/store/store.tsx +41 -0
- package/template/src/core/store/user/userActions.ts +31 -0
- package/template/src/core/store/user/userSlice.ts +62 -0
- package/template/src/core/store/user/userState.ts +44 -0
- package/template/src/core/theme/colors.ts +117 -0
- package/template/src/core/theme/commonConsts.ts +45 -0
- package/template/src/core/theme/commonSizes.ts +70 -0
- package/template/src/core/theme/commonStyles.ts +228 -0
- package/template/src/core/theme/fonts.ts +12 -0
- package/template/src/navigation/AuthStack.tsx +39 -0
- package/template/src/navigation/HeaderComponents.tsx +104 -0
- package/template/src/navigation/MainNavigation.tsx +55 -0
- package/template/src/navigation/MainStack.tsx +99 -0
- package/template/src/navigation/RootNavigation.tsx +33 -0
- package/template/src/navigation/TabBar.tsx +94 -0
- package/template/src/navigation/TopTabBar.tsx +75 -0
- package/template/src/navigation/types.ts +5 -0
- package/template/src/screens/Login/Login.tsx +114 -0
- package/template/src/screens/Settings/Settings.tsx +5 -0
- package/template/src/screens/main/Main.tsx +5 -0
- package/template/src/screens/profile/Profile.tsx +5 -0
- package/template/src/screens/splash/Splash.tsx +19 -0
- package/template/src/sheetManager/sheets.tsx +14 -0
- package/template/tsconfig.json +3 -0
- package/template/types/index.ts +108 -0
- package/template/types/react-native-config.d.ts +19 -0
- package/template.config.js +4 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {ColorValue, PressableProps, TextStyle, ViewStyle} from 'react-native';
|
|
2
|
+
import {RehydrateAction} from 'redux-persist';
|
|
3
|
+
import {IconProps} from 'react-native-vector-icons/Icon';
|
|
4
|
+
import {SFSymbolProps} from 'react-native-sfsymbols';
|
|
5
|
+
import {RootState} from '../src/core/store/rootReducer';
|
|
6
|
+
import {SFSymbols} from '../resources/symbols/SFSymbols';
|
|
7
|
+
|
|
8
|
+
export interface ICalendarSpec {
|
|
9
|
+
sameDay: string;
|
|
10
|
+
nextDay: string;
|
|
11
|
+
lastDay: string;
|
|
12
|
+
nextWeek: string;
|
|
13
|
+
lastWeek: string;
|
|
14
|
+
sameElse: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface IIconPlatformProps
|
|
18
|
+
extends Omit<IconProps, 'name' | 'color'>,
|
|
19
|
+
Omit<SFSymbolProps, 'name'> {
|
|
20
|
+
iosName?: SFSymbols;
|
|
21
|
+
androidName?: string;
|
|
22
|
+
color?: ColorValue;
|
|
23
|
+
style?: TextStyle | ViewStyle;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum AppEnvironment {
|
|
27
|
+
development = 'development',
|
|
28
|
+
test = 'test',
|
|
29
|
+
staging = 'staging',
|
|
30
|
+
production = 'production',
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface INavigationPage {
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface IOnboardingData {
|
|
39
|
+
header: string;
|
|
40
|
+
body: string;
|
|
41
|
+
icon: SFSymbols | string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export enum LoadState {
|
|
45
|
+
needLoad = 'needLoad',
|
|
46
|
+
idle = 'idle',
|
|
47
|
+
error = 'error',
|
|
48
|
+
allIsLoaded = 'allIsLoaded',
|
|
49
|
+
|
|
50
|
+
firstLoad = 'firstLoad',
|
|
51
|
+
pullToRefresh = 'pullToRefresh',
|
|
52
|
+
refreshing = 'refreshing',
|
|
53
|
+
loadingMore = 'loadingMore',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface TouchablePlatformProps extends Omit<PressableProps, 'style'> {
|
|
57
|
+
style?: ViewStyle;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export enum ButtonType {
|
|
61
|
+
solid = 'solid',
|
|
62
|
+
borderless = 'borderless',
|
|
63
|
+
outline = 'outline',
|
|
64
|
+
outlineNegative = 'outlineNegative',
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
68
|
+
export interface IListState<T> {
|
|
69
|
+
data: T[];
|
|
70
|
+
loadState: LoadState;
|
|
71
|
+
error: string | null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
75
|
+
export interface ISection<T> {
|
|
76
|
+
data: T[];
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface RehydrateAppAction extends RehydrateAction {
|
|
82
|
+
payload?: RootState;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export enum ErrorRepresentationType {
|
|
86
|
+
input = 'input',
|
|
87
|
+
toast = 'toast',
|
|
88
|
+
alert = 'alert',
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface IErrorResult {
|
|
92
|
+
message: string;
|
|
93
|
+
visualRepresentation: ErrorRepresentationType;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ISize {
|
|
97
|
+
extraSmall: number;
|
|
98
|
+
extraSmallPlus: number;
|
|
99
|
+
small: number;
|
|
100
|
+
smallPlus: number;
|
|
101
|
+
medium: number;
|
|
102
|
+
mediumPlus: number;
|
|
103
|
+
extraMedium: number;
|
|
104
|
+
large: number;
|
|
105
|
+
largePlus: number;
|
|
106
|
+
extraLarge: number;
|
|
107
|
+
extraLargePlus: number;
|
|
108
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {AppEnvironment} from './index';
|
|
2
|
+
|
|
3
|
+
declare module 'react-native-config' {
|
|
4
|
+
interface EnvironmentVariables {
|
|
5
|
+
API_URL: string;
|
|
6
|
+
ENVIRONMENT: AppEnvironment;
|
|
7
|
+
IGNORE_NET_INFO: boolean;
|
|
8
|
+
SIZE_MATTERS_BASE_WIDTH: number;
|
|
9
|
+
SIZE_MATTERS_BASE_HEIGHT: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
// eslint-disable-next-line import/no-unused-modules
|
|
14
|
+
export const Config: EnvironmentVariables;
|
|
15
|
+
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
// eslint-disable-next-line import/no-default-export,import/no-unused-modules
|
|
18
|
+
export default Config;
|
|
19
|
+
}
|