@janiscommerce/ui-native 1.25.2 → 1.27.0-beta.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 (208) hide show
  1. package/package.json +14 -11
  2. package/dist/android/app/_BUCK +0 -55
  3. package/dist/android/app/build.gradle +0 -230
  4. package/dist/android/app/build_defs.bzl +0 -19
  5. package/dist/android/app/debug.keystore +0 -0
  6. package/dist/android/app/proguard-rules.pro +0 -10
  7. package/dist/android/app/src/debug/AndroidManifest.xml +0 -13
  8. package/dist/android/app/src/debug/java/com/myapp/ReactNativeFlipper.java +0 -72
  9. package/dist/android/app/src/main/AndroidManifest.xml +0 -25
  10. package/dist/android/app/src/main/assets/fonts/Roboto-Bold.ttf +0 -0
  11. package/dist/android/app/src/main/assets/fonts/Roboto-Light.ttf +0 -0
  12. package/dist/android/app/src/main/assets/fonts/Roboto-Medium.ttf +0 -0
  13. package/dist/android/app/src/main/assets/fonts/Roboto-Regular.ttf +0 -0
  14. package/dist/android/app/src/main/assets/fonts/janis-font-icon.ttf +0 -0
  15. package/dist/android/app/src/main/java/com/myapp/MainActivity.java +0 -15
  16. package/dist/android/app/src/main/java/com/myapp/MainApplication.java +0 -80
  17. package/dist/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  18. package/dist/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  19. package/dist/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  20. package/dist/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  21. package/dist/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  22. package/dist/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  23. package/dist/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  24. package/dist/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  25. package/dist/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  26. package/dist/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  27. package/dist/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  28. package/dist/android/app/src/main/res/values/strings.xml +0 -3
  29. package/dist/android/app/src/main/res/values/styles.xml +0 -9
  30. package/dist/android/build.gradle +0 -42
  31. package/dist/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  32. package/dist/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  33. package/dist/android/gradle.properties +0 -28
  34. package/dist/android/gradlew +0 -185
  35. package/dist/android/gradlew.bat +0 -89
  36. package/dist/android/settings.gradle +0 -6
  37. package/dist/components/atoms/BaseButton/index.d.ts +0 -10
  38. package/dist/components/atoms/BaseButton/index.js +0 -24
  39. package/dist/components/atoms/BaseCardList/index.d.ts +0 -8
  40. package/dist/components/atoms/BaseCardList/index.js +0 -33
  41. package/dist/components/atoms/BaseInput/index.d.ts +0 -10
  42. package/dist/components/atoms/BaseInput/index.js +0 -7
  43. package/dist/components/atoms/BaseToast/index.d.ts +0 -17
  44. package/dist/components/atoms/BaseToast/index.js +0 -31
  45. package/dist/components/atoms/BaseToast/utils/index.d.ts +0 -7
  46. package/dist/components/atoms/BaseToast/utils/index.js +0 -7
  47. package/dist/components/atoms/CheckBox/icon/CheckedIcon.d.ts +0 -13
  48. package/dist/components/atoms/CheckBox/icon/CheckedIcon.js +0 -14
  49. package/dist/components/atoms/CheckBox/index.d.ts +0 -15
  50. package/dist/components/atoms/CheckBox/index.js +0 -43
  51. package/dist/components/atoms/Collapsible/index.d.ts +0 -24
  52. package/dist/components/atoms/Collapsible/index.js +0 -59
  53. package/dist/components/atoms/Icon/assets/fonts/selection.json +0 -1
  54. package/dist/components/atoms/Icon/index.d.ts +0 -9
  55. package/dist/components/atoms/Icon/index.js +0 -14
  56. package/dist/components/atoms/Image/index.d.ts +0 -10
  57. package/dist/components/atoms/Image/index.js +0 -30
  58. package/dist/components/atoms/Input/index.d.ts +0 -31
  59. package/dist/components/atoms/Input/index.js +0 -94
  60. package/dist/components/atoms/Input/utils/index.d.ts +0 -28
  61. package/dist/components/atoms/Input/utils/index.js +0 -44
  62. package/dist/components/atoms/List/index.d.ts +0 -26
  63. package/dist/components/atoms/List/index.js +0 -21
  64. package/dist/components/atoms/Loading/LoadingSvg/index.d.ts +0 -8
  65. package/dist/components/atoms/Loading/LoadingSvg/index.js +0 -13
  66. package/dist/components/atoms/Loading/index.d.ts +0 -12
  67. package/dist/components/atoms/Loading/index.js +0 -60
  68. package/dist/components/atoms/Modal/index.d.ts +0 -15
  69. package/dist/components/atoms/Modal/index.js +0 -83
  70. package/dist/components/atoms/RadioButton/index.d.ts +0 -22
  71. package/dist/components/atoms/RadioButton/index.js +0 -49
  72. package/dist/components/atoms/StatusChip/index.d.ts +0 -8
  73. package/dist/components/atoms/StatusChip/index.js +0 -44
  74. package/dist/components/atoms/Svg/index.d.ts +0 -24
  75. package/dist/components/atoms/Svg/index.js +0 -31
  76. package/dist/components/atoms/Svg/svgs/EmptyIllustration.d.ts +0 -4
  77. package/dist/components/atoms/Svg/svgs/EmptyIllustration.js +0 -23
  78. package/dist/components/atoms/Svg/svgs/EmptyListIllustration.d.ts +0 -4
  79. package/dist/components/atoms/Svg/svgs/EmptyListIllustration.js +0 -73
  80. package/dist/components/atoms/Svg/svgs/EmptyNotifications.d.ts +0 -4
  81. package/dist/components/atoms/Svg/svgs/EmptyNotifications.js +0 -17
  82. package/dist/components/atoms/Svg/svgs/JanisCommerceLogo.d.ts +0 -4
  83. package/dist/components/atoms/Svg/svgs/JanisCommerceLogo.js +0 -48
  84. package/dist/components/atoms/Svg/svgs/JanisCommerceLogoBeta.d.ts +0 -4
  85. package/dist/components/atoms/Svg/svgs/JanisCommerceLogoBeta.js +0 -50
  86. package/dist/components/atoms/Svg/svgs/JanisCommerceLogoQa.d.ts +0 -4
  87. package/dist/components/atoms/Svg/svgs/JanisCommerceLogoQa.js +0 -50
  88. package/dist/components/atoms/Svg/svgs/JanisIso.d.ts +0 -4
  89. package/dist/components/atoms/Svg/svgs/JanisIso.js +0 -29
  90. package/dist/components/atoms/Svg/svgs/LoginIllustration.d.ts +0 -4
  91. package/dist/components/atoms/Svg/svgs/LoginIllustration.js +0 -31
  92. package/dist/components/atoms/Svg/svgs/index.d.ts +0 -12
  93. package/dist/components/atoms/Svg/svgs/index.js +0 -19
  94. package/dist/components/atoms/SwipeUp/childComponents/index.d.ts +0 -11
  95. package/dist/components/atoms/SwipeUp/childComponents/index.js +0 -22
  96. package/dist/components/atoms/SwipeUp/index.d.ts +0 -10
  97. package/dist/components/atoms/SwipeUp/index.js +0 -11
  98. package/dist/components/atoms/Text/index.d.ts +0 -8
  99. package/dist/components/atoms/Text/index.js +0 -19
  100. package/dist/components/atoms/Typography/index.d.ts +0 -13
  101. package/dist/components/atoms/Typography/index.js +0 -13
  102. package/dist/components/atoms/Typography/utils/getStyleByTypography/index.d.ts +0 -8
  103. package/dist/components/atoms/Typography/utils/getStyleByTypography/index.js +0 -19
  104. package/dist/components/molecules/Avatar/index.d.ts +0 -22
  105. package/dist/components/molecules/Avatar/index.js +0 -64
  106. package/dist/components/molecules/Avatar/utils/formatPlaceholder/index.d.ts +0 -12
  107. package/dist/components/molecules/Avatar/utils/formatPlaceholder/index.js +0 -20
  108. package/dist/components/molecules/BaseDetail/components/BaseDetailModal/index.d.ts +0 -8
  109. package/dist/components/molecules/BaseDetail/components/BaseDetailModal/index.js +0 -12
  110. package/dist/components/molecules/BaseDetail/components/BaseDetailSwipe/index.d.ts +0 -7
  111. package/dist/components/molecules/BaseDetail/components/BaseDetailSwipe/index.js +0 -12
  112. package/dist/components/molecules/BaseDetail/components/index.d.ts +0 -3
  113. package/dist/components/molecules/BaseDetail/components/index.js +0 -3
  114. package/dist/components/molecules/BaseDetail/index.d.ts +0 -8
  115. package/dist/components/molecules/BaseDetail/index.js +0 -9
  116. package/dist/components/molecules/BaseDetail/types/index.d.ts +0 -15
  117. package/dist/components/molecules/BaseDetail/types/index.js +0 -1
  118. package/dist/components/molecules/Button/index.d.ts +0 -50
  119. package/dist/components/molecules/Button/index.js +0 -57
  120. package/dist/components/molecules/Button/types/index.d.ts +0 -45
  121. package/dist/components/molecules/Button/types/index.js +0 -1
  122. package/dist/components/molecules/Button/utils/getButtonStyles/index.d.ts +0 -3
  123. package/dist/components/molecules/Button/utils/getButtonStyles/index.js +0 -84
  124. package/dist/components/molecules/Button/utils/getButtonStyles/utils/constants/index.d.ts +0 -5
  125. package/dist/components/molecules/Button/utils/getButtonStyles/utils/constants/index.js +0 -5
  126. package/dist/components/molecules/Button/utils/getButtonStyles/utils/defaultValues/index.d.ts +0 -5
  127. package/dist/components/molecules/Button/utils/getButtonStyles/utils/defaultValues/index.js +0 -5
  128. package/dist/components/molecules/Button/utils/getButtonStyles/utils/styleConfigs/index.d.ts +0 -120
  129. package/dist/components/molecules/Button/utils/getButtonStyles/utils/styleConfigs/index.js +0 -123
  130. package/dist/components/molecules/Carousel/index.d.ts +0 -19
  131. package/dist/components/molecules/Carousel/index.js +0 -35
  132. package/dist/components/molecules/Carousel/utils/index.d.ts +0 -13
  133. package/dist/components/molecules/Carousel/utils/index.js +0 -102
  134. package/dist/components/molecules/ErrorBoundary/components/ErrorFallback/index.d.ts +0 -3
  135. package/dist/components/molecules/ErrorBoundary/components/ErrorFallback/index.js +0 -24
  136. package/dist/components/molecules/ErrorBoundary/index.d.ts +0 -20
  137. package/dist/components/molecules/ErrorBoundary/index.js +0 -37
  138. package/dist/components/molecules/Input/index.d.ts +0 -26
  139. package/dist/components/molecules/Input/index.js +0 -94
  140. package/dist/components/molecules/Input/utils/handleChangeText/index.d.ts +0 -3
  141. package/dist/components/molecules/Input/utils/handleChangeText/index.js +0 -16
  142. package/dist/components/molecules/ItemSelectionButton/index.d.ts +0 -11
  143. package/dist/components/molecules/ItemSelectionButton/index.js +0 -66
  144. package/dist/components/molecules/LayoutWithBottomButtons/index.d.ts +0 -11
  145. package/dist/components/molecules/LayoutWithBottomButtons/index.js +0 -72
  146. package/dist/components/molecules/LayoutWithBottomButtons/utils/index.d.ts +0 -364
  147. package/dist/components/molecules/LayoutWithBottomButtons/utils/index.js +0 -148
  148. package/dist/components/molecules/MainCardList/index.d.ts +0 -14
  149. package/dist/components/molecules/MainCardList/index.js +0 -60
  150. package/dist/components/molecules/ProgressBar/index.d.ts +0 -11
  151. package/dist/components/molecules/ProgressBar/index.js +0 -58
  152. package/dist/components/molecules/ProgressBar/utils/index.d.ts +0 -20
  153. package/dist/components/molecules/ProgressBar/utils/index.js +0 -52
  154. package/dist/components/molecules/Select/Components/Dropdown/index.d.ts +0 -10
  155. package/dist/components/molecules/Select/Components/Dropdown/index.js +0 -23
  156. package/dist/components/molecules/Select/Components/Modal/index.d.ts +0 -8
  157. package/dist/components/molecules/Select/Components/Modal/index.js +0 -59
  158. package/dist/components/molecules/Select/Components/Options/index.d.ts +0 -18
  159. package/dist/components/molecules/Select/Components/Options/index.js +0 -75
  160. package/dist/components/molecules/Select/Components/SwitcherComponent/index.d.ts +0 -13
  161. package/dist/components/molecules/Select/Components/SwitcherComponent/index.js +0 -8
  162. package/dist/components/molecules/Select/index.d.ts +0 -51
  163. package/dist/components/molecules/Select/index.js +0 -178
  164. package/dist/components/molecules/Select/utils/index.d.ts +0 -2
  165. package/dist/components/molecules/Select/utils/index.js +0 -7
  166. package/dist/components/molecules/SwipeList/index.d.ts +0 -11
  167. package/dist/components/molecules/SwipeList/index.js +0 -31
  168. package/dist/components/molecules/Tabs/index.d.ts +0 -23
  169. package/dist/components/molecules/Tabs/index.js +0 -112
  170. package/dist/components/molecules/Toast/index.d.ts +0 -23
  171. package/dist/components/molecules/Toast/index.js +0 -102
  172. package/dist/components/molecules/Toast/utils/index.d.ts +0 -7
  173. package/dist/components/molecules/Toast/utils/index.js +0 -7
  174. package/dist/components/organisms/FullScreenMessage/index.d.ts +0 -21
  175. package/dist/components/organisms/FullScreenMessage/index.js +0 -73
  176. package/dist/components/organisms/LoadingFullScreen/index.d.ts +0 -12
  177. package/dist/components/organisms/LoadingFullScreen/index.js +0 -41
  178. package/dist/components/organisms/ProductDetail/components/ProductInfo/index.d.ts +0 -9
  179. package/dist/components/organisms/ProductDetail/components/ProductInfo/index.js +0 -44
  180. package/dist/components/organisms/ProductDetail/index.d.ts +0 -9
  181. package/dist/components/organisms/ProductDetail/index.js +0 -10
  182. package/dist/components/organisms/SwipeItemSelectionList/index.d.ts +0 -14
  183. package/dist/components/organisms/SwipeItemSelectionList/index.js +0 -37
  184. package/dist/index.d.ts +0 -37
  185. package/dist/index.js +0 -41
  186. package/dist/ios/MyApp/AppDelegate.h +0 -8
  187. package/dist/ios/MyApp/AppDelegate.m +0 -58
  188. package/dist/ios/MyApp/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  189. package/dist/ios/MyApp/Images.xcassets/Contents.json +0 -6
  190. package/dist/ios/MyApp/Info.plist +0 -55
  191. package/dist/ios/MyApp/LaunchScreen.storyboard +0 -58
  192. package/dist/ios/MyApp/main.m +0 -9
  193. package/dist/ios/MyApp.xcodeproj/project.pbxproj +0 -791
  194. package/dist/ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp-tvOS.xcscheme +0 -88
  195. package/dist/ios/MyApp.xcodeproj/xcshareddata/xcschemes/MyApp.xcscheme +0 -88
  196. package/dist/ios/MyAppTests/Info.plist +0 -24
  197. package/dist/ios/MyAppTests/MyAppTests.m +0 -65
  198. package/dist/ios/Podfile +0 -33
  199. package/dist/scale/index.d.ts +0 -8
  200. package/dist/scale/index.js +0 -13
  201. package/dist/theme/palette.d.ts +0 -13
  202. package/dist/theme/palette.js +0 -63
  203. package/dist/theme/typography.d.ts +0 -37
  204. package/dist/theme/typography.js +0 -94
  205. package/dist/ts/interfaces/colors.d.ts +0 -55
  206. package/dist/ts/interfaces/colors.js +0 -1
  207. package/dist/utils/index.d.ts +0 -3
  208. package/dist/utils/index.js +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@janiscommerce/ui-native",
3
- "version": "1.25.2",
3
+ "version": "1.27.0-beta.0",
4
4
  "description": "components library for Janis app",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -44,12 +44,15 @@
44
44
  },
45
45
  "homepage": "https://github.com/janis-commerce/ui-native#readme",
46
46
  "peerDependencies": {
47
- "react": ">=17.0.2 <19.0.0",
48
- "react-native": ">=0.67.5 <0.75.0",
47
+ "react": ">=17.0.2 <20.0.0",
48
+ "react-native": ">=0.71.5 <0.82.0",
49
49
  "react-native-gesture-handler": ">=2.9.0",
50
50
  "react-native-fast-image": "^8.5.11",
51
- "react-native-reanimated": "2.17.0",
52
- "react-native-toast-message": ">=1.6.0"
51
+ "react-native-reanimated": ">=3.16.0",
52
+ "react-native-toast-message": ">=1.6.0",
53
+ "react-native-svg": ">=12.0.0",
54
+ "react-native-safe-area-context": ">=4.6.0",
55
+ "@react-native-async-storage/async-storage": ">=1.19.0"
53
56
  },
54
57
  "devDependencies": {
55
58
  "@babel/core": "^7.12.9",
@@ -99,7 +102,13 @@
99
102
  "react-dom": "^17.0.2",
100
103
  "react-native": "0.67.5",
101
104
  "react-native-fast-image": "^8.5.11",
105
+ "react-native-gesture-handler": ">=2.9.0",
106
+ "react-native-reanimated": "2.17.0",
107
+ "react-native-toast-message": ">=1.6.0",
108
+ "react-native-svg": "12.1.1",
109
+ "react-native-safe-area-context": "^4.6.4",
102
110
  "react-native-svg-transformer": "^1.0.0",
111
+ "@react-native-async-storage/async-storage": "^1.19.0",
103
112
  "react-native-web": "^0.15.0",
104
113
  "react-test-renderer": "17.0.2",
105
114
  "setup-env": "^2.0.0",
@@ -125,15 +134,9 @@
125
134
  },
126
135
  "dependencies": {
127
136
  "@gorhom/bottom-sheet": "^4.6.3",
128
- "@react-native-async-storage/async-storage": "^1.19.0",
129
137
  "@react-native-community/datetimepicker": "^7.4.0",
130
138
  "@react-native-community/slider": "^4.4.2",
131
139
  "babel-plugin-module-resolver": "^5.0.2",
132
- "react-native-gesture-handler": ">=2.9.0",
133
- "react-native-reanimated": "2.17.0",
134
- "react-native-safe-area-context": "^4.6.4",
135
- "react-native-svg": "12.1.1",
136
- "react-native-toast-message": ">=1.6.0",
137
140
  "react-native-vector-icons": "^9.2.0"
138
141
  }
139
142
  }
@@ -1,55 +0,0 @@
1
- # To learn about Buck see [Docs](https://buckbuild.com/).
2
- # To run your application with Buck:
3
- # - install Buck
4
- # - `npm start` - to start the packager
5
- # - `cd android`
6
- # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
- # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
- # - `buck install -r android/app` - compile, install and run application
9
- #
10
-
11
- load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
- lib_deps = []
14
-
15
- create_aar_targets(glob(["libs/*.aar"]))
16
-
17
- create_jar_targets(glob(["libs/*.jar"]))
18
-
19
- android_library(
20
- name = "all-libs",
21
- exported_deps = lib_deps,
22
- )
23
-
24
- android_library(
25
- name = "app-code",
26
- srcs = glob([
27
- "src/main/java/**/*.java",
28
- ]),
29
- deps = [
30
- ":all-libs",
31
- ":build_config",
32
- ":res",
33
- ],
34
- )
35
-
36
- android_build_config(
37
- name = "build_config",
38
- package = "com.myapp",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.myapp",
44
- res = "src/main/res",
45
- )
46
-
47
- android_binary(
48
- name = "app",
49
- keystore = "//android/keystores:debug",
50
- manifest = "src/main/AndroidManifest.xml",
51
- package_type = "debug",
52
- deps = [
53
- ":app-code",
54
- ],
55
- )
@@ -1,230 +0,0 @@
1
- apply plugin: "com.android.application"
2
-
3
- import com.android.build.OutputFile
4
-
5
- /**
6
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
- * and bundleReleaseJsAndAssets).
8
- * These basically call `react-native bundle` with the correct arguments during the Android build
9
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
- * bundle directly from the development server. Below you can see all the possible configurations
11
- * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
- *
14
- * project.ext.react = [
15
- * // the name of the generated asset file containing your JS bundle
16
- * bundleAssetName: "index.android.bundle",
17
- *
18
- * // the entry file for bundle generation. If none specified and
19
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20
- * // default. Can be overridden with ENTRY_FILE environment variable.
21
- * entryFile: "index.android.js",
22
- *
23
- * // https://reactnative.dev/docs/performance#enable-the-ram-format
24
- * bundleCommand: "ram-bundle",
25
- *
26
- * // whether to bundle JS and assets in debug mode
27
- * bundleInDebug: false,
28
- *
29
- * // whether to bundle JS and assets in release mode
30
- * bundleInRelease: true,
31
- *
32
- * // whether to bundle JS and assets in another build variant (if configured).
33
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34
- * // The configuration property can be in the following formats
35
- * // 'bundleIn${productFlavor}${buildType}'
36
- * // 'bundleIn${buildType}'
37
- * // bundleInFreeDebug: true,
38
- * // bundleInPaidRelease: true,
39
- * // bundleInBeta: true,
40
- *
41
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
42
- * // for example: to disable dev mode in the staging build type (if configured)
43
- * devDisabledInStaging: true,
44
- * // The configuration property can be in the following formats
45
- * // 'devDisabledIn${productFlavor}${buildType}'
46
- * // 'devDisabledIn${buildType}'
47
- *
48
- * // the root of your project, i.e. where "package.json" lives
49
- * root: "../../",
50
- *
51
- * // where to put the JS bundle asset in debug mode
52
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53
- *
54
- * // where to put the JS bundle asset in release mode
55
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56
- *
57
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
58
- * // require('./image.png')), in debug mode
59
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60
- *
61
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
62
- * // require('./image.png')), in release mode
63
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64
- *
65
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69
- * // for example, you might want to remove it from here.
70
- * inputExcludes: ["android/**", "ios/**"],
71
- *
72
- * // override which node gets called and with what additional arguments
73
- * nodeExecutableAndArgs: ["node"],
74
- *
75
- * // supply additional arguments to the packager
76
- * extraPackagerArgs: []
77
- * ]
78
- */
79
-
80
- project.ext.react = [
81
- enableHermes: false, // clean and rebuild if changing
82
- ]
83
-
84
- apply from: "../../node_modules/react-native/react.gradle"
85
-
86
- /**
87
- * Set this to true to create two separate APKs instead of one:
88
- * - An APK that only works on ARM devices
89
- * - An APK that only works on x86 devices
90
- * The advantage is the size of the APK is reduced by about 4MB.
91
- * Upload all the APKs to the Play Store and people will download
92
- * the correct one based on the CPU architecture of their device.
93
- */
94
- def enableSeparateBuildPerCPUArchitecture = false
95
-
96
- /**
97
- * Run Proguard to shrink the Java bytecode in release builds.
98
- */
99
- def enableProguardInReleaseBuilds = false
100
-
101
- /**
102
- * The preferred build flavor of JavaScriptCore.
103
- *
104
- * For example, to use the international variant, you can use:
105
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106
- *
107
- * The international variant includes ICU i18n library and necessary data
108
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109
- * give correct results when using with locales other than en-US. Note that
110
- * this variant is about 6MiB larger per architecture than default.
111
- */
112
- def jscFlavor = 'org.webkit:android-jsc:+'
113
-
114
- /**
115
- * Whether to enable the Hermes VM.
116
- *
117
- * This should be set on project.ext.react and that value will be read here. If it is not set
118
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119
- * and the benefits of using Hermes will therefore be sharply reduced.
120
- */
121
- def enableHermes = project.ext.react.get("enableHermes", false);
122
-
123
- /**
124
- * Architectures to build native code for in debug.
125
- */
126
- def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
127
-
128
- android {
129
- ndkVersion rootProject.ext.ndkVersion
130
-
131
- compileSdkVersion rootProject.ext.compileSdkVersion
132
-
133
- defaultConfig {
134
- applicationId "com.myapp"
135
- minSdkVersion rootProject.ext.minSdkVersion
136
- targetSdkVersion rootProject.ext.targetSdkVersion
137
- versionCode 1
138
- versionName "1.0"
139
- }
140
- splits {
141
- abi {
142
- reset()
143
- enable enableSeparateBuildPerCPUArchitecture
144
- universalApk false // If true, also generate a universal APK
145
- include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
146
- }
147
- }
148
- signingConfigs {
149
- debug {
150
- storeFile file('debug.keystore')
151
- storePassword 'android'
152
- keyAlias 'androiddebugkey'
153
- keyPassword 'android'
154
- }
155
- }
156
- buildTypes {
157
- debug {
158
- signingConfig signingConfigs.debug
159
- if (nativeArchitectures) {
160
- ndk {
161
- abiFilters nativeArchitectures.split(',')
162
- }
163
- }
164
- }
165
- release {
166
- // Caution! In production, you need to generate your own keystore file.
167
- // see https://reactnative.dev/docs/signed-apk-android.
168
- signingConfig signingConfigs.debug
169
- minifyEnabled enableProguardInReleaseBuilds
170
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
171
- }
172
- }
173
-
174
- // applicationVariants are e.g. debug, release
175
- applicationVariants.all { variant ->
176
- variant.outputs.each { output ->
177
- // For each separate APK per architecture, set a unique version code as described here:
178
- // https://developer.android.com/studio/build/configure-apk-splits.html
179
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
180
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
181
- def abi = output.getFilter(OutputFile.ABI)
182
- if (abi != null) { // null for the universal-debug, universal-release variants
183
- output.versionCodeOverride =
184
- defaultConfig.versionCode * 1000 + versionCodes.get(abi)
185
- }
186
-
187
- }
188
- }
189
- }
190
-
191
- dependencies {
192
- implementation fileTree(dir: "libs", include: ["*.jar"])
193
- //noinspection GradleDynamicVersion
194
- implementation "com.facebook.react:react-native:+" // From node_modules
195
-
196
- implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
197
-
198
- implementation project(':react-native-vector-icons')
199
-
200
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
201
- exclude group:'com.facebook.fbjni'
202
- }
203
-
204
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
205
- exclude group:'com.facebook.flipper'
206
- exclude group:'com.squareup.okhttp3', module:'okhttp'
207
- }
208
-
209
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
210
- exclude group:'com.facebook.flipper'
211
- }
212
-
213
- if (enableHermes) {
214
- def hermesPath = "../../node_modules/hermes-engine/android/";
215
- debugImplementation files(hermesPath + "hermes-debug.aar")
216
- releaseImplementation files(hermesPath + "hermes-release.aar")
217
- } else {
218
- implementation jscFlavor
219
- }
220
- }
221
-
222
- // Run this once to be able to run the application with BUCK
223
- // puts all compile dependencies into folder libs for BUCK to use
224
- task copyDownloadableDepsToLibs(type: Copy) {
225
- from configurations.implementation
226
- into 'libs'
227
- }
228
-
229
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
230
- apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")
@@ -1,19 +0,0 @@
1
- """Helper definitions to glob .aar and .jar targets"""
2
-
3
- def create_aar_targets(aarfiles):
4
- for aarfile in aarfiles:
5
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
- lib_deps.append(":" + name)
7
- android_prebuilt_aar(
8
- name = name,
9
- aar = aarfile,
10
- )
11
-
12
- def create_jar_targets(jarfiles):
13
- for jarfile in jarfiles:
14
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
- lib_deps.append(":" + name)
16
- prebuilt_jar(
17
- name = name,
18
- binary_jar = jarfile,
19
- )
Binary file
@@ -1,10 +0,0 @@
1
- # Add project specific ProGuard rules here.
2
- # By default, the flags in this file are appended to flags specified
3
- # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
- # You can edit the include path and order by changing the proguardFiles
5
- # directive in build.gradle.
6
- #
7
- # For more details, see
8
- # http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
- # Add any project specific keep options here:
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- xmlns:tools="http://schemas.android.com/tools">
4
-
5
- <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6
-
7
- <application
8
- android:usesCleartextTraffic="true"
9
- tools:targetApi="28"
10
- tools:ignore="GoogleAppIndexingWarning">
11
- <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
12
- </application>
13
- </manifest>
@@ -1,72 +0,0 @@
1
- /**
2
- * Copyright (c) Facebook, Inc. and its affiliates.
3
- *
4
- * <p>This source code is licensed under the MIT license found in the LICENSE file in the root
5
- * directory of this source tree.
6
- */
7
- package com.myapp;
8
-
9
- import android.content.Context;
10
- import com.facebook.flipper.android.AndroidFlipperClient;
11
- import com.facebook.flipper.android.utils.FlipperUtils;
12
- import com.facebook.flipper.core.FlipperClient;
13
- import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14
- import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15
- import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16
- import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17
- import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18
- import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19
- import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20
- import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21
- import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22
- import com.facebook.react.ReactInstanceManager;
23
- import com.facebook.react.bridge.ReactContext;
24
- import com.facebook.react.modules.network.NetworkingModule;
25
- import okhttp3.OkHttpClient;
26
-
27
- public class ReactNativeFlipper {
28
- public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29
- if (FlipperUtils.shouldEnableFlipper(context)) {
30
- final FlipperClient client = AndroidFlipperClient.getInstance(context);
31
-
32
- client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
33
- client.addPlugin(new ReactFlipperPlugin());
34
- client.addPlugin(new DatabasesFlipperPlugin(context));
35
- client.addPlugin(new SharedPreferencesFlipperPlugin(context));
36
- client.addPlugin(CrashReporterPlugin.getInstance());
37
-
38
- NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
39
- NetworkingModule.setCustomClientBuilder(
40
- new NetworkingModule.CustomClientBuilder() {
41
- @Override
42
- public void apply(OkHttpClient.Builder builder) {
43
- builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
44
- }
45
- });
46
- client.addPlugin(networkFlipperPlugin);
47
- client.start();
48
-
49
- // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
50
- // Hence we run if after all native modules have been initialized
51
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
52
- if (reactContext == null) {
53
- reactInstanceManager.addReactInstanceEventListener(
54
- new ReactInstanceManager.ReactInstanceEventListener() {
55
- @Override
56
- public void onReactContextInitialized(ReactContext reactContext) {
57
- reactInstanceManager.removeReactInstanceEventListener(this);
58
- reactContext.runOnNativeModulesQueueThread(
59
- new Runnable() {
60
- @Override
61
- public void run() {
62
- client.addPlugin(new FrescoFlipperPlugin());
63
- }
64
- });
65
- }
66
- });
67
- } else {
68
- client.addPlugin(new FrescoFlipperPlugin());
69
- }
70
- }
71
- }
72
- }
@@ -1,25 +0,0 @@
1
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
2
- package="com.myapp">
3
-
4
- <uses-permission android:name="android.permission.INTERNET" />
5
-
6
- <application
7
- android:name=".MainApplication"
8
- android:label="@string/app_name"
9
- android:icon="@mipmap/ic_launcher"
10
- android:roundIcon="@mipmap/ic_launcher_round"
11
- android:allowBackup="false"
12
- android:theme="@style/AppTheme">
13
- <activity
14
- android:name=".MainActivity"
15
- android:label="@string/app_name"
16
- android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
17
- android:launchMode="singleTask"
18
- android:windowSoftInputMode="adjustResize">
19
- <intent-filter>
20
- <action android:name="android.intent.action.MAIN" />
21
- <category android:name="android.intent.category.LAUNCHER" />
22
- </intent-filter>
23
- </activity>
24
- </application>
25
- </manifest>
@@ -1,15 +0,0 @@
1
- package com.myapp;
2
-
3
- import com.facebook.react.ReactActivity;
4
-
5
- public class MainActivity extends ReactActivity {
6
-
7
- /**
8
- * Returns the name of the main component registered from JavaScript. This is used to schedule
9
- * rendering of the component.
10
- */
11
- @Override
12
- protected String getMainComponentName() {
13
- return "ui-native";
14
- }
15
- }
@@ -1,80 +0,0 @@
1
- package com.myapp;
2
-
3
- import android.app.Application;
4
- import android.content.Context;
5
- import com.facebook.react.PackageList;
6
- import com.facebook.react.ReactApplication;
7
- import com.facebook.react.ReactInstanceManager;
8
- import com.facebook.react.ReactNativeHost;
9
- import com.facebook.react.ReactPackage;
10
- import com.facebook.soloader.SoLoader;
11
- import java.lang.reflect.InvocationTargetException;
12
- import java.util.List;
13
-
14
- public class MainApplication extends Application implements ReactApplication {
15
-
16
- private final ReactNativeHost mReactNativeHost =
17
- new ReactNativeHost(this) {
18
- @Override
19
- public boolean getUseDeveloperSupport() {
20
- return BuildConfig.DEBUG;
21
- }
22
-
23
- @Override
24
- protected List<ReactPackage> getPackages() {
25
- @SuppressWarnings("UnnecessaryLocalVariable")
26
- List<ReactPackage> packages = new PackageList(this).getPackages();
27
- // Packages that cannot be autolinked yet can be added manually here, for example:
28
- // packages.add(new MyReactNativePackage());
29
- return packages;
30
- }
31
-
32
- @Override
33
- protected String getJSMainModuleName() {
34
- return "index";
35
- }
36
- };
37
-
38
- @Override
39
- public ReactNativeHost getReactNativeHost() {
40
- return mReactNativeHost;
41
- }
42
-
43
- @Override
44
- public void onCreate() {
45
- super.onCreate();
46
- SoLoader.init(this, /* native exopackage */ false);
47
- initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
48
- }
49
-
50
- /**
51
- * Loads Flipper in React Native templates. Call this in the onCreate method with something like
52
- * initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
53
- *
54
- * @param context
55
- * @param reactInstanceManager
56
- */
57
- private static void initializeFlipper(
58
- Context context, ReactInstanceManager reactInstanceManager) {
59
- if (BuildConfig.DEBUG) {
60
- try {
61
- /*
62
- We use reflection here to pick up the class that initializes Flipper,
63
- since Flipper library is not available in release mode
64
- */
65
- Class<?> aClass = Class.forName("com.myapp.ReactNativeFlipper");
66
- aClass
67
- .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
68
- .invoke(null, context, reactInstanceManager);
69
- } catch (ClassNotFoundException e) {
70
- e.printStackTrace();
71
- } catch (NoSuchMethodException e) {
72
- e.printStackTrace();
73
- } catch (IllegalAccessException e) {
74
- e.printStackTrace();
75
- } catch (InvocationTargetException e) {
76
- e.printStackTrace();
77
- }
78
- }
79
- }
80
- }
@@ -1,36 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- Copyright (C) 2014 The Android Open Source Project
3
-
4
- Licensed under the Apache License, Version 2.0 (the "License");
5
- you may not use this file except in compliance with the License.
6
- You may obtain a copy of the License at
7
-
8
- http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- Unless required by applicable law or agreed to in writing, software
11
- distributed under the License is distributed on an "AS IS" BASIS,
12
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- See the License for the specific language governing permissions and
14
- limitations under the License.
15
- -->
16
- <inset xmlns:android="http://schemas.android.com/apk/res/android"
17
- android:insetLeft="@dimen/abc_edit_text_inset_horizontal_material"
18
- android:insetRight="@dimen/abc_edit_text_inset_horizontal_material"
19
- android:insetTop="@dimen/abc_edit_text_inset_top_material"
20
- android:insetBottom="@dimen/abc_edit_text_inset_bottom_material">
21
-
22
- <selector>
23
- <!--
24
- This file is a copy of abc_edit_text_material (https://bit.ly/3k8fX7I).
25
- The item below with state_pressed="false" and state_focused="false" causes a NullPointerException.
26
- NullPointerException:tempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable(android.content.res.Resources)'
27
-
28
- <item android:state_pressed="false" android:state_focused="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
29
-
30
- For more info, see https://bit.ly/3CdLStv (react-native/pull/29452) and https://bit.ly/3nxOMoR.
31
- -->
32
- <item android:state_enabled="false" android:drawable="@drawable/abc_textfield_default_mtrl_alpha"/>
33
- <item android:drawable="@drawable/abc_textfield_activated_mtrl_alpha"/>
34
- </selector>
35
-
36
- </inset>
@@ -1,3 +0,0 @@
1
- <resources>
2
- <string name="app_name">ui-native</string>
3
- </resources>