@fadyshawky/react-native-magic 2.1.0 → 2.1.2
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 +2 -1
- package/README.md +7 -2
- package/package.json +1 -89
- package/scripts/askPackageName.js +0 -0
- package/template/.env.example +3 -0
- package/template/android/app/build.gradle +3 -3
- package/template/android/app/src/main/java/com/reactnativemagic/MainActivity.kt +8 -2
- package/template/android/app/src/main/java/com/reactnativemagic/MainApplication.kt +12 -29
- package/template/android/build.gradle +7 -5
- package/template/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/template/package.json +58 -44
- package/template/src/common/components/Cards.tsx +1 -1
- package/template/src/common/components/EmptyView.tsx +1 -1
- package/template/src/common/components/OTPInput.tsx +1 -1
- package/template/src/common/components/PrimaryButton.tsx +5 -5
- package/template/src/common/components/PrimaryTextInput.tsx +4 -4
- package/template/src/common/components/RadioButton.tsx +1 -1
- package/template/src/common/components/RadioIcon.tsx +4 -4
- package/template/src/common/components/TryAgain.tsx +3 -3
- package/template/src/common/validations/errorValidations.ts +1 -1
- package/template/src/navigation/TabBar.tsx +5 -5
- package/template/src/screens/index.tsx +0 -15
- package/template/tsconfig.json +5 -4
package/.vscode/settings.json
CHANGED
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ Then run:
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
npm start
|
|
37
|
-
npm run ios # or
|
|
37
|
+
npm run ios # or an Android variant below
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## First steps after creating your app
|
|
@@ -69,7 +69,12 @@ src/
|
|
|
69
69
|
|---------|-------------|
|
|
70
70
|
| `npm start` | Start Metro bundler |
|
|
71
71
|
| `npm run ios` | Run on iOS |
|
|
72
|
-
| `npm run android` | Run
|
|
72
|
+
| `npm run android:prod:debug` | Run Android (production, debug) |
|
|
73
|
+
| `npm run android:prod:release` | Run Android (production, release) |
|
|
74
|
+
| `npm run android:staging:debug` | Run Android (staging, debug) |
|
|
75
|
+
| `npm run android:staging:release` | Run Android (staging, release) |
|
|
76
|
+
| `npm run android:development:debug` | Run Android (development, debug) |
|
|
77
|
+
| `npm run android:development:release` | Run Android (development, release) |
|
|
73
78
|
| `npm test` | Run tests |
|
|
74
79
|
| `npm run lint` | Lint code |
|
|
75
80
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fadyshawky/react-native-magic",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Plug-and-play React Native template: TypeScript, Redux, React Navigation, scalable architecture. Init and start developing without hassle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native-magic",
|
|
@@ -19,94 +19,6 @@
|
|
|
19
19
|
"author": "Fady Shawky",
|
|
20
20
|
"type": "commonjs",
|
|
21
21
|
"main": "index.js",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@fontsource/poppins": "^5.1.0",
|
|
24
|
-
"@react-native-async-storage/async-storage": "^2.1.0",
|
|
25
|
-
"@react-native-camera-roll/camera-roll": "^7.9.0",
|
|
26
|
-
"@react-native-community/datetimepicker": "^8.2.0",
|
|
27
|
-
"@react-native-community/image-editor": "^4.2.1",
|
|
28
|
-
"@react-native-community/netinfo": "^11.4.1",
|
|
29
|
-
"@react-native-community/slider": "^4.5.5",
|
|
30
|
-
"@react-navigation/bottom-tabs": "^7.2.0",
|
|
31
|
-
"@react-navigation/drawer": "^7.1.1",
|
|
32
|
-
"@react-navigation/material-top-tabs": "^7.1.0",
|
|
33
|
-
"@react-navigation/native": "^7.0.14",
|
|
34
|
-
"@react-navigation/native-stack": "^7.2.0",
|
|
35
|
-
"@reduxjs/toolkit": "^2.5.0",
|
|
36
|
-
"@shopify/flash-list": "^1.7.2",
|
|
37
|
-
"@types/intl": "^1.2.2",
|
|
38
|
-
"@types/jest": "^29.5.14",
|
|
39
|
-
"@types/lodash": "^4.17.13",
|
|
40
|
-
"@types/react-native-vector-icons": "^6.4.18",
|
|
41
|
-
"@types/react-redux": "^7.1.34",
|
|
42
|
-
"axios": "^1.7.9",
|
|
43
|
-
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
44
|
-
"dayjs": "^1.11.13",
|
|
45
|
-
"detox": "^20.28.0",
|
|
46
|
-
"intl": "^1.2.5",
|
|
47
|
-
"lodash": "^4.17.21",
|
|
48
|
-
"mime": "^4.0.6",
|
|
49
|
-
"patch-package": "^8.0.0",
|
|
50
|
-
"react": "^18.3.1",
|
|
51
|
-
"react-native": "^0.76.5",
|
|
52
|
-
"react-native-actions-sheet": "^0.9.7",
|
|
53
|
-
"react-native-animated-pagination-dots": "^0.1.73",
|
|
54
|
-
"react-native-calendars": "^1.1307.0",
|
|
55
|
-
"react-native-config": "^1.5.3",
|
|
56
|
-
"react-native-device-info": "^14.0.2",
|
|
57
|
-
"react-native-dropdown-select-list": "^2.0.5",
|
|
58
|
-
"react-native-gesture-handler": "^2.21.2",
|
|
59
|
-
"react-native-image-crop-picker": "^0.41.6",
|
|
60
|
-
"react-native-image-resource-generator": "^1.0.2",
|
|
61
|
-
"react-native-in-app-review": "^4.3.3",
|
|
62
|
-
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
|
63
|
-
"react-native-localization": "^2.3.2",
|
|
64
|
-
"react-native-mask-input": "^1.2.3",
|
|
65
|
-
"react-native-orientation-locker": "^1.7.0",
|
|
66
|
-
"react-native-pager-view": "^6.6.1",
|
|
67
|
-
"react-native-permissions": "^5.2.1",
|
|
68
|
-
"react-native-safe-area-context": "^5.0.0",
|
|
69
|
-
"react-native-screens": "^4.4.0",
|
|
70
|
-
"react-native-sfsymbols": "^1.2.2",
|
|
71
|
-
"react-native-share": "^12.0.3",
|
|
72
|
-
"react-native-snackbar": "^2.8.0",
|
|
73
|
-
"react-native-svg": "^15.10.1",
|
|
74
|
-
"react-native-tab-view": "^4.0.5",
|
|
75
|
-
"react-native-vector-icons": "^10.2.0",
|
|
76
|
-
"react-native-vision-camera": "^4.6.3",
|
|
77
|
-
"react-native-webview": "^13.12.5",
|
|
78
|
-
"react-redux": "^9.2.0",
|
|
79
|
-
"redux": "^5.0.1",
|
|
80
|
-
"redux-persist": "^6.0.0",
|
|
81
|
-
"redux-persist-transform-filter": "^0.0.22"
|
|
82
|
-
},
|
|
83
|
-
"devDependencies": {
|
|
84
|
-
"@babel/core": "^7.25.2",
|
|
85
|
-
"@babel/preset-env": "^7.26.0",
|
|
86
|
-
"@babel/runtime": "^7.26.0",
|
|
87
|
-
"@jest/globals": "^29.7.0",
|
|
88
|
-
"@react-native-community/cli": "15.0.1",
|
|
89
|
-
"@react-native-community/cli-platform-android": "15.0.1",
|
|
90
|
-
"@react-native-community/cli-platform-ios": "15.0.1",
|
|
91
|
-
"@react-native/babel-preset": "^0.76.5",
|
|
92
|
-
"@react-native/eslint-config": "^0.76.5",
|
|
93
|
-
"@react-native/metro-config": "^0.76.5",
|
|
94
|
-
"@react-native/typescript-config": "^0.76.5",
|
|
95
|
-
"@types/react": "^18.3.18",
|
|
96
|
-
"@types/react-test-renderer": "^18.3.1",
|
|
97
|
-
"babel-jest": "^29.7.0",
|
|
98
|
-
"eslint": "^8.57.1",
|
|
99
|
-
"eslint-plugin-import": "^2.31.0",
|
|
100
|
-
"eslint-plugin-jest": "^28.10.0",
|
|
101
|
-
"eslint-plugin-react": "^7.37.2",
|
|
102
|
-
"eslint-plugin-react-hooks": "^5.1.0",
|
|
103
|
-
"eslint-plugin-react-native": "^4.1.0",
|
|
104
|
-
"eslint-plugin-unused-imports": "^4.1.4",
|
|
105
|
-
"jest": "^29.7.0",
|
|
106
|
-
"prettier": "^2.8.8",
|
|
107
|
-
"react-test-renderer": "^18.3.1",
|
|
108
|
-
"typescript": "^5.0.4"
|
|
109
|
-
},
|
|
110
22
|
"scripts": {
|
|
111
23
|
"test": "exit 0"
|
|
112
24
|
},
|
|
File without changes
|
package/template/.env.example
CHANGED
|
@@ -123,8 +123,8 @@ android {
|
|
|
123
123
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
124
124
|
multiDexEnabled true
|
|
125
125
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
126
|
-
versionCode project.env.get("ANDROID_VERSION_CODE")
|
|
127
|
-
versionName project.env.get("ANDROID_VERSION_NAME")
|
|
126
|
+
versionCode project.env.get("ANDROID_VERSION_CODE")?.toInteger() ?: 1
|
|
127
|
+
versionName project.env.get("ANDROID_VERSION_NAME") ?: "1.0.0"
|
|
128
128
|
resValue "string", "build_config_package", project.env.get("ANDROID_APP_ID")
|
|
129
129
|
|
|
130
130
|
ndk {
|
|
@@ -169,7 +169,7 @@ android {
|
|
|
169
169
|
def projectName = project.env.get("PROJECT_NAME")
|
|
170
170
|
def SEP = "_"
|
|
171
171
|
|
|
172
|
-
def newApkName = projectName + SEP + project.env.get("ENV") + SEP + project.env.get("ANDROID_VERSION_NAME") + SEP + project.env.get("ANDROID_VERSION_CODE") + ".apk"
|
|
172
|
+
def newApkName = projectName + SEP + project.env.get("ENV") + SEP + (project.env.get("ANDROID_VERSION_NAME") ?: "1.0.0") + SEP + (project.env.get("ANDROID_VERSION_CODE")?.toInteger() ?: 1) + ".apk"
|
|
173
173
|
|
|
174
174
|
|
|
175
175
|
println "Naming File ... " + newApkName
|
|
@@ -5,11 +5,17 @@ import com.facebook.react.ReactActivity
|
|
|
5
5
|
import com.facebook.react.ReactActivityDelegate
|
|
6
6
|
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
|
7
7
|
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
|
8
|
+
import com.swmansion.rnscreens.fragment.restoration.RNScreensFragmentFactory
|
|
8
9
|
|
|
9
10
|
class MainActivity : ReactActivity() {
|
|
10
11
|
|
|
12
|
+
/**
|
|
13
|
+
* Prevents crash on activity recreation: "Screen fragments should never be restored".
|
|
14
|
+
* See https://github.com/software-mansion/react-native-screens/issues/17
|
|
15
|
+
*/
|
|
11
16
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
12
|
-
|
|
17
|
+
supportFragmentManager.fragmentFactory = RNScreensFragmentFactory()
|
|
18
|
+
super.onCreate(savedInstanceState)
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
/**
|
|
@@ -24,4 +30,4 @@ class MainActivity : ReactActivity() {
|
|
|
24
30
|
*/
|
|
25
31
|
override fun createReactActivityDelegate(): ReactActivityDelegate =
|
|
26
32
|
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
|
|
27
|
-
}
|
|
33
|
+
}
|
|
@@ -4,41 +4,24 @@ import android.app.Application
|
|
|
4
4
|
import com.facebook.react.PackageList
|
|
5
5
|
import com.facebook.react.ReactApplication
|
|
6
6
|
import com.facebook.react.ReactHost
|
|
7
|
-
import com.facebook.react.
|
|
8
|
-
import com.facebook.react.ReactPackage
|
|
9
|
-
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|
7
|
+
import com.facebook.react.ReactNativeApplicationEntryPoint.loadReactNative
|
|
10
8
|
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
|
|
11
|
-
import com.facebook.react.defaults.DefaultReactNativeHost
|
|
12
|
-
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
|
13
|
-
import com.facebook.soloader.SoLoader
|
|
14
9
|
|
|
15
10
|
class MainApplication : Application(), ReactApplication {
|
|
16
11
|
|
|
17
|
-
override val
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG
|
|
28
|
-
|
|
29
|
-
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
|
|
30
|
-
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override val reactHost: ReactHost
|
|
34
|
-
get() = getDefaultReactHost(applicationContext, reactNativeHost)
|
|
12
|
+
override val reactHost: ReactHost by lazy {
|
|
13
|
+
getDefaultReactHost(
|
|
14
|
+
context = applicationContext,
|
|
15
|
+
packageList =
|
|
16
|
+
PackageList(this).packages.apply {
|
|
17
|
+
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
18
|
+
// add(MyReactNativePackage())
|
|
19
|
+
},
|
|
20
|
+
)
|
|
21
|
+
}
|
|
35
22
|
|
|
36
23
|
override fun onCreate() {
|
|
37
24
|
super.onCreate()
|
|
38
|
-
|
|
39
|
-
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
|
40
|
-
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
|
41
|
-
load()
|
|
42
|
-
}
|
|
25
|
+
loadReactNative(this)
|
|
43
26
|
}
|
|
44
27
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
ext {
|
|
3
|
-
buildToolsVersion = "
|
|
3
|
+
buildToolsVersion = "36.0.0"
|
|
4
4
|
minSdkVersion = 24
|
|
5
|
-
compileSdkVersion =
|
|
6
|
-
targetSdkVersion =
|
|
7
|
-
ndkVersion = "
|
|
8
|
-
kotlinVersion = "1.
|
|
5
|
+
compileSdkVersion = 36
|
|
6
|
+
targetSdkVersion = 36
|
|
7
|
+
ndkVersion = "27.1.12297006"
|
|
8
|
+
kotlinVersion = "2.1.20"
|
|
9
9
|
}
|
|
10
10
|
repositories {
|
|
11
11
|
google()
|
|
@@ -15,6 +15,8 @@ buildscript {
|
|
|
15
15
|
classpath("com.android.tools.build:gradle")
|
|
16
16
|
classpath("com.facebook.react:react-native-gradle-plugin")
|
|
17
17
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
|
18
|
+
classpath 'com.google.gms:google-services:4.4.4'
|
|
19
|
+
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
distributionBase=GRADLE_USER_HOME
|
|
2
2
|
distributionPath=wrapper/dists
|
|
3
|
-
distributionUrl=https\://services.gradle.org/distributions/gradle-
|
|
3
|
+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
|
|
4
4
|
networkTimeout=10000
|
|
5
5
|
validateDistributionUrl=true
|
|
6
6
|
zipStoreBase=GRADLE_USER_HOME
|
package/template/package.json
CHANGED
|
@@ -3,58 +3,72 @@
|
|
|
3
3
|
"version": "0.0.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"android": "react-native run-android",
|
|
6
|
+
"android:prod:debug": "react-native run-android --mode=productionDebug",
|
|
7
|
+
"android:prod:release": "react-native run-android --mode=productionRelease",
|
|
8
|
+
"android:staging:debug": "react-native run-android --mode=stagingDebug",
|
|
9
|
+
"android:staging:release": "react-native run-android --mode=stagingRelease",
|
|
10
|
+
"android:development:debug": "react-native run-android --mode=developmentDebug",
|
|
11
|
+
"android:development:release": "react-native run-android --mode=developmentRelease",
|
|
7
12
|
"ios": "react-native run-ios",
|
|
8
13
|
"lint": "eslint .",
|
|
9
14
|
"start": "react-native start",
|
|
10
15
|
"test": "jest"
|
|
11
16
|
},
|
|
12
17
|
"dependencies": {
|
|
13
|
-
"@react-native
|
|
14
|
-
"@react-
|
|
15
|
-
"@react-
|
|
16
|
-
"@react-navigation/
|
|
17
|
-
"@
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"react
|
|
26
|
-
"react-
|
|
27
|
-
"react-native
|
|
28
|
-
"react-native-
|
|
29
|
-
"react-native-
|
|
30
|
-
"react-native-
|
|
31
|
-
"react-native-
|
|
32
|
-
"react-native-
|
|
33
|
-
"react-native-
|
|
34
|
-
"react-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
18
|
+
"@good-react-native/gradient-border": "1.0.2",
|
|
19
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
20
|
+
"@react-native-masked-view/masked-view": "0.3.2",
|
|
21
|
+
"@react-navigation/bottom-tabs": "7.15.5",
|
|
22
|
+
"@react-navigation/native": "7.1.33",
|
|
23
|
+
"@react-navigation/native-stack": "7.14.4",
|
|
24
|
+
"@reduxjs/toolkit": "2.11.2",
|
|
25
|
+
"axios": "1.13.6",
|
|
26
|
+
"babel-plugin-transform-remove-console": "6.9.4",
|
|
27
|
+
"dayjs": "1.11.19",
|
|
28
|
+
"intl": "1.2.5",
|
|
29
|
+
"lodash": "4.17.23",
|
|
30
|
+
"react": "19.2.3",
|
|
31
|
+
"react-dom": "19.2.3",
|
|
32
|
+
"react-native": "0.84.1",
|
|
33
|
+
"react-native-actions-sheet": "10.1.2",
|
|
34
|
+
"react-native-config": "1.6.1",
|
|
35
|
+
"react-native-device-info": "15.0.2",
|
|
36
|
+
"react-native-gesture-handler": "2.30.0",
|
|
37
|
+
"react-native-keyboard-aware-scroll-view": "0.9.5",
|
|
38
|
+
"react-native-linear-gradient": "2.8.3",
|
|
39
|
+
"react-native-localization": "2.3.2",
|
|
40
|
+
"react-native-reanimated": "4.2.2",
|
|
41
|
+
"react-native-restart": "0.0.27",
|
|
42
|
+
"react-native-safe-area-context": "5.7.0",
|
|
43
|
+
"react-native-screens": "4.24.0",
|
|
44
|
+
"react-native-sfsymbols": "1.2.2",
|
|
45
|
+
"react-native-snackbar": "3.0.1",
|
|
46
|
+
"react-native-vector-icons": "10.3.0",
|
|
47
|
+
"react-native-worklets": "0.7.4",
|
|
48
|
+
"react-redux": "9.2.0",
|
|
49
|
+
"redux": "5.0.1",
|
|
50
|
+
"redux-persist": "6.0.0",
|
|
51
|
+
"redux-persist-transform-filter": "0.0.22"
|
|
38
52
|
},
|
|
39
53
|
"devDependencies": {
|
|
40
|
-
"@babel/core": "
|
|
41
|
-
"@babel/preset-env": "
|
|
42
|
-
"@babel/runtime": "
|
|
43
|
-
"@react-native-community/cli": "
|
|
44
|
-
"@react-native-community/cli-platform-android": "
|
|
45
|
-
"@react-native-community/cli-platform-ios": "
|
|
46
|
-
"@react-native/babel-preset": "
|
|
47
|
-
"@react-native/eslint-config": "
|
|
48
|
-
"@react-native/metro-config": "
|
|
49
|
-
"@react-native/typescript-config": "
|
|
50
|
-
"@types/jest": "
|
|
51
|
-
"@types/react": "
|
|
52
|
-
"@types/react-test-renderer": "
|
|
53
|
-
"eslint": "
|
|
54
|
-
"jest": "
|
|
55
|
-
"prettier": "
|
|
56
|
-
"react-test-renderer": "
|
|
57
|
-
"typescript": "
|
|
54
|
+
"@babel/core": "7.29.0",
|
|
55
|
+
"@babel/preset-env": "7.29.0",
|
|
56
|
+
"@babel/runtime": "7.28.6",
|
|
57
|
+
"@react-native-community/cli": "20.1.2",
|
|
58
|
+
"@react-native-community/cli-platform-android": "20.1.2",
|
|
59
|
+
"@react-native-community/cli-platform-ios": "20.1.2",
|
|
60
|
+
"@react-native/babel-preset": "0.84.1",
|
|
61
|
+
"@react-native/eslint-config": "0.84.1",
|
|
62
|
+
"@react-native/metro-config": "0.84.1",
|
|
63
|
+
"@react-native/typescript-config": "0.84.1",
|
|
64
|
+
"@types/jest": "30.0.0",
|
|
65
|
+
"@types/react": "19.2.14",
|
|
66
|
+
"@types/react-test-renderer": "19.1.0",
|
|
67
|
+
"eslint": "10.0.2",
|
|
68
|
+
"jest": "30.2.0",
|
|
69
|
+
"prettier": "3.8.1",
|
|
70
|
+
"react-test-renderer": "19.2.3",
|
|
71
|
+
"typescript": "5.9.3"
|
|
58
72
|
},
|
|
59
73
|
"engines": {
|
|
60
74
|
"node": ">=20"
|
|
@@ -22,7 +22,7 @@ const styles = StyleSheet.create({
|
|
|
22
22
|
...CommonStyles.normalText,
|
|
23
23
|
fontWeight: '600',
|
|
24
24
|
textAlign: 'center',
|
|
25
|
-
marginBottom: CommonSizes.spacing.
|
|
25
|
+
marginBottom: CommonSizes.spacing.xSmall,
|
|
26
26
|
} as TextStyle,
|
|
27
27
|
description: {
|
|
28
28
|
...CommonStyles.normalText,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
TouchablePlatformProps,
|
|
18
18
|
} from '../../../types';
|
|
19
19
|
import {useTheme} from '../../core/theme/ThemeProvider';
|
|
20
|
-
import {
|
|
20
|
+
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
21
21
|
import {createThemedStyles} from '../../core/theme/commonStyles';
|
|
22
22
|
import {Theme} from '../../core/theme/types';
|
|
23
23
|
import {IconPlatform} from './IconPlatform';
|
|
@@ -271,10 +271,10 @@ function createSmallSolidStyles(theme: Theme): IStyles {
|
|
|
271
271
|
const commonStyles = createThemedStyles(theme);
|
|
272
272
|
return StyleSheet.create({
|
|
273
273
|
button: {
|
|
274
|
-
padding:
|
|
274
|
+
padding: CommonSizes.spacing.medium,
|
|
275
275
|
alignItems: 'center',
|
|
276
276
|
justifyContent: 'center',
|
|
277
|
-
borderRadius:
|
|
277
|
+
borderRadius: CommonSizes.borderRadius.xLarge,
|
|
278
278
|
flexDirection: 'row',
|
|
279
279
|
backgroundColor: theme.colors.indigoBlue,
|
|
280
280
|
// width: 175,
|
|
@@ -295,10 +295,10 @@ function createSmallOutlineStyles(theme: Theme): IStyles {
|
|
|
295
295
|
const commonStyles = createThemedStyles(theme);
|
|
296
296
|
return StyleSheet.create({
|
|
297
297
|
button: {
|
|
298
|
-
padding:
|
|
298
|
+
padding: CommonSizes.spacing.medium,
|
|
299
299
|
alignItems: 'center',
|
|
300
300
|
justifyContent: 'center',
|
|
301
|
-
borderRadius:
|
|
301
|
+
borderRadius: CommonSizes.borderRadius.xLarge,
|
|
302
302
|
flexDirection: 'row',
|
|
303
303
|
backgroundColor: 'transparent',
|
|
304
304
|
width: 175,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
ViewStyle,
|
|
23
23
|
} from 'react-native';
|
|
24
24
|
import {useTheme} from '../../core/theme/ThemeProvider';
|
|
25
|
-
import {
|
|
25
|
+
import {PrimaryColors, AlertColors} from '../../core/theme/colors';
|
|
26
26
|
import {isIos} from '../../core/theme/commonConsts';
|
|
27
27
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
28
28
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
@@ -268,13 +268,13 @@ function getInputContainerStyle(
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
const selectionColor =
|
|
271
|
+
const selectionColor = PrimaryColors.PlatinateBlue_400;
|
|
272
272
|
|
|
273
273
|
const commonInputContainer: TextStyle = {
|
|
274
274
|
flexDirection: 'row',
|
|
275
275
|
alignItems: 'center',
|
|
276
276
|
justifyContent: 'center',
|
|
277
|
-
minHeight: CommonSizes.spacing.
|
|
277
|
+
minHeight: CommonSizes.spacing.xxxLarge,
|
|
278
278
|
textAlignVertical: 'center',
|
|
279
279
|
textAlign: 'center',
|
|
280
280
|
width: '100%',
|
|
@@ -307,7 +307,7 @@ const styles = StyleSheet.create({
|
|
|
307
307
|
...commonInputContainer,
|
|
308
308
|
...Platform.select({
|
|
309
309
|
android: {
|
|
310
|
-
borderColor:
|
|
310
|
+
borderColor: AlertColors.error_400,
|
|
311
311
|
},
|
|
312
312
|
}),
|
|
313
313
|
} as TextStyle,
|
|
@@ -46,7 +46,7 @@ export const RadioButton: FC<IProps> = memo(
|
|
|
46
46
|
const commonLabel: TextStyle = {
|
|
47
47
|
...CommonStyles.normalText,
|
|
48
48
|
flex: 1,
|
|
49
|
-
paddingStart: CommonSizes.spacing.
|
|
49
|
+
paddingStart: CommonSizes.spacing.xSmall,
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
const styles = StyleSheet.create({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {FC, memo, useMemo} from 'react';
|
|
2
2
|
import {StyleSheet, View, ViewStyle} from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import {PrimaryColors} from '../../core/theme/colors';
|
|
4
4
|
|
|
5
5
|
interface IProps {
|
|
6
6
|
isSelected: boolean;
|
|
@@ -41,14 +41,14 @@ const commonInnerCircle: ViewStyle = {
|
|
|
41
41
|
const styles = StyleSheet.create({
|
|
42
42
|
outerCircle: {
|
|
43
43
|
...commonOuterCircle,
|
|
44
|
-
borderColor:
|
|
44
|
+
borderColor: PrimaryColors.PlatinateBlue_400,
|
|
45
45
|
} as ViewStyle,
|
|
46
46
|
outerCircleSelected: {
|
|
47
47
|
...commonOuterCircle,
|
|
48
|
-
borderColor:
|
|
48
|
+
borderColor: PrimaryColors.PlatinateBlue_400,
|
|
49
49
|
} as ViewStyle,
|
|
50
50
|
innerCircle: {
|
|
51
51
|
...commonInnerCircle,
|
|
52
|
-
backgroundColor:
|
|
52
|
+
backgroundColor: PrimaryColors.PlatinateBlue_400,
|
|
53
53
|
} as ViewStyle,
|
|
54
54
|
});
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
TouchableOpacity,
|
|
7
7
|
View,
|
|
8
8
|
} from 'react-native';
|
|
9
|
-
import {
|
|
9
|
+
import {PrimaryColors} from '../../core/theme/colors';
|
|
10
10
|
import {CommonSizes} from '../../core/theme/commonSizes';
|
|
11
11
|
import {CommonStyles} from '../../core/theme/commonStyles';
|
|
12
12
|
import {localization} from '../localization/localization';
|
|
@@ -38,11 +38,11 @@ const styles = StyleSheet.create({
|
|
|
38
38
|
title: {
|
|
39
39
|
...CommonStyles.normalText,
|
|
40
40
|
textAlign: 'center',
|
|
41
|
-
marginBottom: CommonSizes.spacing.
|
|
41
|
+
marginBottom: CommonSizes.spacing.xSmall,
|
|
42
42
|
} as TextStyle,
|
|
43
43
|
description: {
|
|
44
44
|
...CommonStyles.normalText,
|
|
45
|
-
color:
|
|
45
|
+
color: PrimaryColors.PlatinateBlue_400,
|
|
46
46
|
textAlign: 'center',
|
|
47
47
|
textDecorationLine: 'underline',
|
|
48
48
|
} as TextStyle,
|
|
@@ -3,7 +3,7 @@ import {unwrapResult} from '@reduxjs/toolkit';
|
|
|
3
3
|
import {Alert} from 'react-native';
|
|
4
4
|
import {IErrorResult, ErrorRepresentationType} from '../../../types';
|
|
5
5
|
import Snackbar from 'react-native-snackbar';
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
export function handlePromiseResult(
|
|
8
8
|
promiseAction: Promise<any>,
|
|
9
9
|
successMessage?: string,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useRTL,
|
|
17
17
|
useTranslation,
|
|
18
18
|
} from '../common/localization/LocalizationProvider';
|
|
19
|
-
import {
|
|
19
|
+
import {PrimaryColors} from '../core/theme/colors';
|
|
20
20
|
import {CommonSizes} from '../core/theme/commonSizes';
|
|
21
21
|
import {CommonStyles} from '../core/theme/commonStyles';
|
|
22
22
|
import {scaleHeight, scaleWidth} from '../core/theme/scaling';
|
|
@@ -125,11 +125,11 @@ const styles = StyleSheet.create({
|
|
|
125
125
|
flexDirection: 'row',
|
|
126
126
|
alignItems: 'center',
|
|
127
127
|
height: scaleHeight(130),
|
|
128
|
-
borderTopLeftRadius: CommonSizes.borderRadius.
|
|
129
|
-
borderTopRightRadius: CommonSizes.borderRadius.
|
|
128
|
+
borderTopLeftRadius: CommonSizes.borderRadius.xxLarge,
|
|
129
|
+
borderTopRightRadius: CommonSizes.borderRadius.xxLarge,
|
|
130
130
|
justifyContent: 'space-evenly',
|
|
131
131
|
...CommonStyles.dropShadow,
|
|
132
|
-
backgroundColor:
|
|
132
|
+
backgroundColor: PrimaryColors.PlatinateBlue_600,
|
|
133
133
|
position: 'absolute',
|
|
134
134
|
bottom: 0,
|
|
135
135
|
left: 0,
|
|
@@ -141,6 +141,6 @@ const styles = StyleSheet.create({
|
|
|
141
141
|
},
|
|
142
142
|
label: {},
|
|
143
143
|
labelFocused: {
|
|
144
|
-
color:
|
|
144
|
+
color: PrimaryColors.PlatinateBlue_400,
|
|
145
145
|
},
|
|
146
146
|
});
|
|
@@ -1,24 +1,9 @@
|
|
|
1
1
|
// Authentication Screens
|
|
2
2
|
export {Login} from './Login/Login';
|
|
3
3
|
export {OTPScreen as OTP} from './OTP/OTPScreen';
|
|
4
|
-
export {ForceChangePasswordScreen as ForceChangePassword} from './ForceChangePassword/ForceChangePasswordScreen';
|
|
5
4
|
|
|
6
5
|
// Main Navigation Screens
|
|
7
6
|
export {HomeScreen as Home} from './home/HomeScreen';
|
|
8
7
|
export {Profile} from './profile/Profile';
|
|
9
8
|
export {Splash} from './splash/Splash';
|
|
10
9
|
|
|
11
|
-
// Service Related Screens
|
|
12
|
-
export {Categories} from './Categories/Categories';
|
|
13
|
-
export {Services} from './Services/Services';
|
|
14
|
-
export {SingleService} from './SingleService/SingleService';
|
|
15
|
-
export {Providers} from './Providers/Providers';
|
|
16
|
-
export {InquiredBill} from './InquiredBill/InquiredBill';
|
|
17
|
-
export {PaymentConfirmation} from './PaymentConfirmation/PaymentConfirmation';
|
|
18
|
-
|
|
19
|
-
// History and Receipt Screens
|
|
20
|
-
export {History} from './History/History';
|
|
21
|
-
export {Favorites} from './Favorites/Favorites';
|
|
22
|
-
|
|
23
|
-
// Device and Card Related Screens
|
|
24
|
-
export {ReceiptScreen} from './ReceiptScreen/ReceiptScreen';
|
package/template/tsconfig.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "@react-native/typescript-config
|
|
2
|
+
"extends": "@react-native/typescript-config",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
"types": ["jest"]
|
|
5
|
+
},
|
|
6
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
7
|
+
"exclude": ["**/node_modules", "**/Pods"]
|
|
7
8
|
}
|