@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.
Files changed (165) hide show
  1. package/.vscode/settings.json +7 -0
  2. package/README.md +269 -0
  3. package/package.json +36 -0
  4. package/template/.bundle/config +2 -0
  5. package/template/.env.development +5 -0
  6. package/template/.env.production +5 -0
  7. package/template/.env.staging +5 -0
  8. package/template/.eslintrc.js +4 -0
  9. package/template/.prettierrc.js +7 -0
  10. package/template/.watchmanconfig +1 -0
  11. package/template/App.tsx +34 -0
  12. package/template/Gemfile +9 -0
  13. package/template/Gemfile.lock +117 -0
  14. package/template/README.md +79 -0
  15. package/template/__tests__/App.test.tsx +17 -0
  16. package/template/android/app/build.gradle +128 -0
  17. package/template/android/app/debug.keystore +0 -0
  18. package/template/android/app/proguard-rules.pro +10 -0
  19. package/template/android/app/src/debug/AndroidManifest.xml +9 -0
  20. package/template/android/app/src/main/AndroidManifest.xml +26 -0
  21. package/template/android/app/src/main/java/com/reactnativemagic/MainActivity.kt +22 -0
  22. package/template/android/app/src/main/java/com/reactnativemagic/MainApplication.kt +44 -0
  23. package/template/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
  24. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  25. package/template/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  26. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  27. package/template/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  28. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  29. package/template/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  30. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  31. package/template/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  32. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  33. package/template/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  34. package/template/android/app/src/main/res/values/strings.xml +3 -0
  35. package/template/android/app/src/main/res/values/styles.xml +9 -0
  36. package/template/android/build.gradle +21 -0
  37. package/template/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  38. package/template/android/gradle/wrapper/gradle-wrapper.properties +7 -0
  39. package/template/android/gradle.properties +39 -0
  40. package/template/android/gradlew +252 -0
  41. package/template/android/gradlew.bat +94 -0
  42. package/template/android/settings.gradle +6 -0
  43. package/template/app.json +4 -0
  44. package/template/babel.config.js +3 -0
  45. package/template/index.js +9 -0
  46. package/template/install-dev.sh +1 -0
  47. package/template/install.sh +1 -0
  48. package/template/ios/.xcode.env +11 -0
  49. package/template/ios/Podfile +42 -0
  50. package/template/ios/Podfile.lock +2461 -0
  51. package/template/ios/reactnativemagic/AppDelegate.h +6 -0
  52. package/template/ios/reactnativemagic/AppDelegate.mm +31 -0
  53. package/template/ios/reactnativemagic/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
  54. package/template/ios/reactnativemagic/Images.xcassets/Contents.json +6 -0
  55. package/template/ios/reactnativemagic/Info.plist +52 -0
  56. package/template/ios/reactnativemagic/LaunchScreen.storyboard +47 -0
  57. package/template/ios/reactnativemagic/PrivacyInfo.xcprivacy +46 -0
  58. package/template/ios/reactnativemagic/main.m +10 -0
  59. package/template/ios/reactnativemagic copy-Info.plist +52 -0
  60. package/template/ios/reactnativemagic.xcodeproj/project.pbxproj +836 -0
  61. package/template/ios/reactnativemagic.xcodeproj/xcshareddata/xcschemes/reactnativemagic.xcscheme +88 -0
  62. package/template/ios/reactnativemagic.xcworkspace/contents.xcworkspacedata +10 -0
  63. package/template/ios/reactnativemagic.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +8 -0
  64. package/template/ios/reactnativemagicTests/Info.plist +24 -0
  65. package/template/ios/reactnativemagicTests/reactnativemagicTests.m +66 -0
  66. package/template/ios/tmp.xcconfig +2 -0
  67. package/template/jest.config.js +3 -0
  68. package/template/metro.config.js +11 -0
  69. package/template/package-lock.json +18315 -0
  70. package/template/package.json +125 -0
  71. package/template/resources/symbols/SFSymbols.ts +2614 -0
  72. package/template/src/common/ImageResources.g.ts +14 -0
  73. package/template/src/common/components/Background.tsx +34 -0
  74. package/template/src/common/components/EmptyView.tsx +31 -0
  75. package/template/src/common/components/FlatListWrapper.tsx +66 -0
  76. package/template/src/common/components/IconPlatform.tsx +17 -0
  77. package/template/src/common/components/ImageCropPickerButton.tsx +108 -0
  78. package/template/src/common/components/LoadingComponent.tsx +16 -0
  79. package/template/src/common/components/PhotoTakingButton.tsx +99 -0
  80. package/template/src/common/components/PrimaryButton.tsx +305 -0
  81. package/template/src/common/components/PrimaryTextInput.tsx +287 -0
  82. package/template/src/common/components/RadioButton.tsx +73 -0
  83. package/template/src/common/components/RadioIcon.tsx +63 -0
  84. package/template/src/common/components/Separator.tsx +39 -0
  85. package/template/src/common/components/Svg.tsx +25 -0
  86. package/template/src/common/components/TouchablePlatform.tsx +70 -0
  87. package/template/src/common/components/TryAgain.tsx +56 -0
  88. package/template/src/common/helpers/arrayHelpers.ts +29 -0
  89. package/template/src/common/helpers/calculatePage.ts +16 -0
  90. package/template/src/common/helpers/colorHelpers.ts +34 -0
  91. package/template/src/common/helpers/defaultKeyIdExtractor.ts +5 -0
  92. package/template/src/common/helpers/dialogsHelpers.ts +66 -0
  93. package/template/src/common/helpers/imageHelpers.ts +5 -0
  94. package/template/src/common/helpers/inAppReviewHelper.ts +31 -0
  95. package/template/src/common/helpers/netInfoHelpers.ts +42 -0
  96. package/template/src/common/helpers/orientationHelpers.ts +25 -0
  97. package/template/src/common/helpers/regexHelpers.ts +7 -0
  98. package/template/src/common/helpers/shareHelpers.ts +47 -0
  99. package/template/src/common/helpers/stringsHelpers.ts +15 -0
  100. package/template/src/common/hooks/useBackHandler.ts +10 -0
  101. package/template/src/common/hooks/useDebounce.ts +17 -0
  102. package/template/src/common/hooks/useEventRegister.ts +50 -0
  103. package/template/src/common/hooks/useFlatListActions.ts +31 -0
  104. package/template/src/common/hooks/usePrevious.ts +11 -0
  105. package/template/src/common/hooks/useWhyDidYouUpdate.ts +27 -0
  106. package/template/src/common/localization/dateFormatter.ts +108 -0
  107. package/template/src/common/localization/intlFormatter.ts +37 -0
  108. package/template/src/common/localization/localization.ts +51 -0
  109. package/template/src/common/localization/translations/commonLocalization.ts +29 -0
  110. package/template/src/common/localization/translations/emptyLocalization.ts +6 -0
  111. package/template/src/common/localization/translations/errorsLocalization.ts +22 -0
  112. package/template/src/common/localization/translations/homeLocalization.ts +5 -0
  113. package/template/src/common/localization/translations/loginLocalization.ts +14 -0
  114. package/template/src/common/localization/translations/onboardingLocalization.ts +13 -0
  115. package/template/src/common/localization/translations/pagesLocalization.ts +14 -0
  116. package/template/src/common/localization/translations/profileLocalization.ts +6 -0
  117. package/template/src/common/urls/baseUrlOpener.ts +31 -0
  118. package/template/src/common/urls/emailUrl.ts +20 -0
  119. package/template/src/common/urls/httpUrl.ts +19 -0
  120. package/template/src/common/urls/mapUrl.ts +22 -0
  121. package/template/src/common/urls/phoneUrl.ts +16 -0
  122. package/template/src/common/utils/createPerfectSize.ts +15 -0
  123. package/template/src/common/utils/listHandlers.ts +30 -0
  124. package/template/src/common/utils/newState.ts +5 -0
  125. package/template/src/common/utils/serializeQueryParams.ts +10 -0
  126. package/template/src/common/validations/authValidations.ts +15 -0
  127. package/template/src/common/validations/commonValidations.ts +39 -0
  128. package/template/src/common/validations/errorValidations.ts +72 -0
  129. package/template/src/common/validations/hooks/useDatesError.ts +40 -0
  130. package/template/src/common/validations/hooks/useInputError.ts +30 -0
  131. package/template/src/common/validations/profileValidations.ts +30 -0
  132. package/template/src/common/validations/validationConstants.ts +20 -0
  133. package/template/src/core/api/responseHandlers.ts +43 -0
  134. package/template/src/core/api/serverHeaders.ts +39 -0
  135. package/template/src/core/store/app/appSlice.ts +12 -0
  136. package/template/src/core/store/app/appState.ts +3 -0
  137. package/template/src/core/store/reduxHelpers.ts +11 -0
  138. package/template/src/core/store/rootReducer.ts +10 -0
  139. package/template/src/core/store/store.tsx +41 -0
  140. package/template/src/core/store/user/userActions.ts +31 -0
  141. package/template/src/core/store/user/userSlice.ts +62 -0
  142. package/template/src/core/store/user/userState.ts +44 -0
  143. package/template/src/core/theme/colors.ts +117 -0
  144. package/template/src/core/theme/commonConsts.ts +45 -0
  145. package/template/src/core/theme/commonSizes.ts +70 -0
  146. package/template/src/core/theme/commonStyles.ts +228 -0
  147. package/template/src/core/theme/fonts.ts +12 -0
  148. package/template/src/navigation/AuthStack.tsx +39 -0
  149. package/template/src/navigation/HeaderComponents.tsx +104 -0
  150. package/template/src/navigation/MainNavigation.tsx +55 -0
  151. package/template/src/navigation/MainStack.tsx +99 -0
  152. package/template/src/navigation/RootNavigation.tsx +33 -0
  153. package/template/src/navigation/TabBar.tsx +94 -0
  154. package/template/src/navigation/TopTabBar.tsx +75 -0
  155. package/template/src/navigation/types.ts +5 -0
  156. package/template/src/screens/Login/Login.tsx +114 -0
  157. package/template/src/screens/Settings/Settings.tsx +5 -0
  158. package/template/src/screens/main/Main.tsx +5 -0
  159. package/template/src/screens/profile/Profile.tsx +5 -0
  160. package/template/src/screens/splash/Splash.tsx +19 -0
  161. package/template/src/sheetManager/sheets.tsx +14 -0
  162. package/template/tsconfig.json +3 -0
  163. package/template/types/index.ts +108 -0
  164. package/template/types/react-native-config.d.ts +19 -0
  165. package/template.config.js +4 -0
@@ -0,0 +1,94 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
18
+
19
+ @if "%DEBUG%"=="" @echo off
20
+ @rem ##########################################################################
21
+ @rem
22
+ @rem Gradle startup script for Windows
23
+ @rem
24
+ @rem ##########################################################################
25
+
26
+ @rem Set local scope for the variables with windows NT shell
27
+ if "%OS%"=="Windows_NT" setlocal
28
+
29
+ set DIRNAME=%~dp0
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
32
+ set APP_BASE_NAME=%~n0
33
+ set APP_HOME=%DIRNAME%
34
+
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
38
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40
+
41
+ @rem Find java.exe
42
+ if defined JAVA_HOME goto findJavaFromJavaHome
43
+
44
+ set JAVA_EXE=java.exe
45
+ %JAVA_EXE% -version >NUL 2>&1
46
+ if %ERRORLEVEL% equ 0 goto execute
47
+
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
53
+
54
+ goto fail
55
+
56
+ :findJavaFromJavaHome
57
+ set JAVA_HOME=%JAVA_HOME:"=%
58
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59
+
60
+ if exist "%JAVA_EXE%" goto execute
61
+
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
67
+
68
+ goto fail
69
+
70
+ :execute
71
+ @rem Setup the command line
72
+
73
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74
+
75
+
76
+ @rem Execute Gradle
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78
+
79
+ :end
80
+ @rem End local scope for the variables with windows NT shell
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
82
+
83
+ :fail
84
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85
+ rem the _cmd.exe /c_ return code!
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
90
+
91
+ :mainEnd
92
+ if "%OS%"=="Windows_NT" endlocal
93
+
94
+ :omega
@@ -0,0 +1,6 @@
1
+ pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
2
+ plugins { id("com.facebook.react.settings") }
3
+ extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
4
+ rootProject.name = 'reactnativemagic'
5
+ include ':app'
6
+ includeBuild('../node_modules/@react-native/gradle-plugin')
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "reactnativemagic",
3
+ "displayName": "reactnativemagic"
4
+ }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['module:@react-native/babel-preset'],
3
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @format
3
+ */
4
+
5
+ import {AppRegistry} from 'react-native';
6
+ import App from './App';
7
+ import {name as appName} from './app.json';
8
+
9
+ AppRegistry.registerComponent(appName, () => App);
@@ -0,0 +1 @@
1
+ npm i --legacy-peer-deps --save-dev@babel/core @babel/preset-env @babel/runtime @react-native/babel-preset @react-native/eslint-config @react-native/metro-config @react-native/typescript-config @types/lodash @types/react @types/react-test-renderer babel-jest eslint jest prettier react-test-renderer typescript
@@ -0,0 +1 @@
1
+ npm i --legacy-peer-deps @react-native-async-storage/async-storage @react-native-camera-roll/camera-roll @react-native-community/datetimepicker @react-native-community/image-editor @react-native-community/netinfo @react-native-community/slider @react-navigation/bottom-tabs @react-navigation/drawer @react-navigation/material-top-tabs @react-navigation/native @react-navigation/native-stack @reduxjs/toolkit @shopify/flash-list @types/intl @types/jest @types/react-native-vector-icons @types/react-redux @typescript-eslint/eslint-plugin @typescript-eslint/parser axios babel-plugin-transform-remove-console dayjs detox eslint-config-react-strong eslint-import-resolver-typescript eslint-plugin-import eslint-plugin-jest eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-native eslint-plugin-unused-imports husky intl lint-staged lodash metro-react-native-babel-preset mime moment patch-package react react-dom react-native react-native-actions-sheet react-native-animated-pagination-dots react-native-bundle-visualizer react-native-calendars react-native-camera react-native-config react-native-config-node react-native-dev-menu react-native-device-info react-native-dropdown-select-list react-native-gesture-handler react-native-image-crop-picker react-native-image-resource-generator react-native-in-app-review react-native-keyboard-aware-scroll-view react-native-localization react-native-mask-input react-native-pager-view react-native-permissions react-native-reanimated react-native-reanimated-carousel react-native-safe-area-context react-native-screens react-native-sfsymbols react-native-share react-native-size-matters react-native-snackbar react-native-svg react-native-tab-view react-native-vector-icons react-native-version react-native-webview react-redux redux redux-persist redux-persist-transform-filter rn-fetch-blob @gorhom/bottom-sheet react-native-vision-camera
@@ -0,0 +1,11 @@
1
+ # This `.xcode.env` file is versioned and is used to source the environment
2
+ # used when running script phases inside Xcode.
3
+ # To customize your local environment, you can create an `.xcode.env.local`
4
+ # file that is not versioned.
5
+
6
+ # NODE_BINARY variable contains the PATH to the node executable.
7
+ #
8
+ # Customize the NODE_BINARY variable here.
9
+ # For example, to use nvm with brew, add the following line
10
+ # . "$(brew --prefix nvm)/nvm.sh" --no-use
11
+ export NODE_BINARY=$(command -v node)
@@ -0,0 +1,42 @@
1
+ # Resolve react_native_pods.rb with node to allow for hoisting
2
+ require Pod::Executable.execute_command('node', ['-p',
3
+ 'require.resolve(
4
+ "react-native/scripts/react_native_pods.rb",
5
+ {paths: [process.argv[1]]},
6
+ )', __dir__]).strip
7
+
8
+ platform :ios, min_ios_version_supported
9
+ prepare_react_native_project!
10
+
11
+ linkage = ENV['USE_FRAMEWORKS']
12
+ if linkage != nil
13
+ Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
14
+ use_frameworks! :linkage => linkage.to_sym
15
+ end
16
+
17
+ target 'reactnativemagic' do
18
+ config = use_native_modules!
19
+ pod 'react-native-config/Extension', :path => '../node_modules/react-native-config'
20
+
21
+ use_react_native!(
22
+ :path => config[:reactNativePath],
23
+ :hermes_enabled => true,
24
+ :fabric_enabled => false,
25
+ # An absolute path to your application root.
26
+ :app_path => "#{Pod::Config.instance.installation_root}/.."
27
+ )
28
+
29
+ target 'reactnativemagicTests' do
30
+ inherit! :complete
31
+ # Pods for testing
32
+ end
33
+
34
+ post_install do |installer|
35
+ # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
36
+ react_native_post_install(
37
+ installer,
38
+ config[:reactNativePath],
39
+ :mac_catalyst_enabled => false
40
+ )
41
+ end
42
+ end