@dashx/react-native 1.0.8 → 1.1.1

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 (166) hide show
  1. package/.gitattributes +1 -0
  2. package/.gitignore +46 -0
  3. package/.nvmrc +1 -0
  4. package/README.md +268 -39
  5. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/results.bin +1 -0
  6. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/BuildConfig.dex +0 -0
  7. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXPackage.dex +0 -0
  8. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXReactNativeModule.dex +0 -0
  9. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/ReactNativeLibraryInfoProvider.dex +0 -0
  10. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil$1.dex +0 -0
  11. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil.dex +0 -0
  12. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil$1.dex +0 -0
  13. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil.dex +0 -0
  14. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils$WhenMappings.dex +0 -0
  15. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils.dex +0 -0
  16. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  17. package/android/build/.transforms/f3c6049e7ab4bb564c79f3a246b8575e/results.bin +1 -0
  18. package/android/build/.transforms/f3c6049e7ab4bb564c79f3a246b8575e/transformed/classes/classes_dex/classes.dex +0 -0
  19. package/android/build/generated/source/buildConfig/debug/com/dashx/rn/sdk/BuildConfig.java +12 -0
  20. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  21. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  22. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  23. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  24. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  25. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  26. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  27. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  28. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  29. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  30. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  31. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  32. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  33. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/services/com.dashx.android.DashXLibraryInfoProvider +1 -0
  34. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/BuildConfig.class +0 -0
  35. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/ArrayUtil$1.class +0 -0
  36. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/ArrayUtil.class +0 -0
  37. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/MapUtil$1.class +0 -0
  38. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/MapUtil.class +0 -0
  39. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  40. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  41. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  42. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  43. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  44. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  45. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/BuildConfig.class +0 -0
  46. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/DashXPackage.class +0 -0
  47. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/DashXReactNativeModule.class +0 -0
  48. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/ReactNativeLibraryInfoProvider.class +0 -0
  49. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/ArrayUtil$1.class +0 -0
  50. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/ArrayUtil.class +0 -0
  51. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/MapUtil$1.class +0 -0
  52. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/MapUtil.class +0 -0
  53. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/Utils$WhenMappings.class +0 -0
  54. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/Utils.class +0 -0
  55. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  56. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  57. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  58. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  59. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  60. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  61. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  62. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  63. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  64. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  65. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  66. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  67. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  145. package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  146. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  147. package/android/build/tmp/kotlin-classes/debug/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  148. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXPackage.class +0 -0
  149. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXReactNativeModule.class +0 -0
  150. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/ReactNativeLibraryInfoProvider.class +0 -0
  151. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/util/Utils$WhenMappings.class +0 -0
  152. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/util/Utils.class +0 -0
  153. package/android/build.gradle +13 -29
  154. package/android/gradlew +185 -0
  155. package/android/gradlew.bat +89 -0
  156. package/android/src/main/AndroidManifest.xml +1 -2
  157. package/android/src/main/java/com/dashx/rn/sdk/DashXReactNativeModule.kt +31 -98
  158. package/android/src/main/java/com/dashx/rn/sdk/ReactNativeLibraryInfoProvider.kt +8 -0
  159. package/android/src/main/resources/META-INF/services/com.dashx.android.DashXLibraryInfoProvider +1 -0
  160. package/babel.config.js +3 -0
  161. package/index.d.ts +92 -0
  162. package/index.js +104 -63
  163. package/package.json +8 -14
  164. package/yarn.lock +6244 -0
  165. package/ContentOptionsBuilder.js +0 -62
  166. package/utils.js +0 -21
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ *.pbxproj -text
package/.gitignore ADDED
@@ -0,0 +1,46 @@
1
+
2
+ # OSX
3
+ #
4
+ .DS_Store
5
+
6
+ # node.js
7
+ #
8
+ node_modules/
9
+ npm-debug.log
10
+ yarn-error.log
11
+
12
+ # Xcode
13
+ #
14
+ build/
15
+ *.pbxuser
16
+ !default.pbxuser
17
+ *.mode1v3
18
+ !default.mode1v3
19
+ *.mode2v3
20
+ !default.mode2v3
21
+ *.perspectivev3
22
+ !default.perspectivev3
23
+ xcuserdata
24
+ *.xccheckout
25
+ *.moved-aside
26
+ DerivedData
27
+ *.hmap
28
+ *.ipa
29
+ *.xcuserstate
30
+ project.xcworkspace
31
+
32
+ # Android/IntelliJ
33
+ #
34
+ build/
35
+ .idea
36
+ .gradle
37
+ local.properties
38
+ *.iml
39
+
40
+ # BUCK
41
+ buck-out/
42
+ \.buckd/
43
+ *.keystore
44
+
45
+ # VS Code
46
+ .vscode/
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v24
package/README.md CHANGED
@@ -20,62 +20,123 @@
20
20
 
21
21
  # @dashx/react-native
22
22
 
23
+ [![npm version](https://img.shields.io/npm/v/@dashx/react-native.svg)](https://www.npmjs.com/package/@dashx/react-native)
24
+ [![license](https://img.shields.io/npm/l/@dashx/react-native.svg)](https://github.com/dashxhq/dashx-react-native/blob/main/LICENSE)
25
+ [![platforms](https://img.shields.io/badge/platforms-Android%20%7C%20iOS-brightgreen.svg)](#requirements)
26
+
23
27
  _DashX SDK for React Native_
24
28
 
29
+ ## Requirements
30
+
31
+ | Platform | Minimum Version |
32
+ |----------|----------------|
33
+ | iOS | 12.0+ |
34
+ | Android | SDK 26 (Android 8.0)+ |
35
+ | React Native | 0.71+ |
36
+ | Node.js | 16.0+ |
37
+
38
+ > **Note:** This SDK uses native modules and is **not compatible with Expo Go**. Use a [development build](https://docs.expo.dev/develop/development-builds/introduction/) if you are using Expo.
39
+
25
40
  ## Install
26
41
 
27
- **npm**
28
42
  ```sh
29
43
  npm install @dashx/react-native
30
44
  ```
31
45
 
32
- **yarn**
46
+ or
47
+
33
48
  ```sh
34
49
  yarn add @dashx/react-native
35
50
  ```
36
51
 
37
52
  ### Setup for Android
38
53
 
39
- DashX requires Google Services installed in your app for Firebase to work:
54
+ DashX requires Google Services for Firebase Cloud Messaging:
40
55
 
41
- - Add `google-services` plugin in your `/android/build.gradle`
56
+ 1. Add the `google-services` plugin in your `/android/build.gradle`:
42
57
 
43
58
  ```gradle
44
59
  buildscript {
45
60
  dependencies {
46
61
  // ... other dependencies
47
- classpath 'com.google.gms:google-services:4.3.3'
62
+ classpath 'com.google.gms:google-services:4.4.2'
48
63
  }
49
64
  }
50
65
  ```
51
66
 
52
- - Add this line in your `/android/app/build.gradle`
67
+ 2. Apply the plugin in your `/android/app/build.gradle`:
53
68
 
54
69
  ```gradle
55
70
  apply plugin: 'com.google.gms.google-services'
56
71
  ```
57
72
 
58
- - Add your Android app on Firebase Console: `Project Overview > Add App > Android`
59
-
60
- - Download `google-services.json` from there.
73
+ 3. Add your Android app on [Firebase Console](https://console.firebase.google.com/): **Project Overview > Add App > Android**
61
74
 
62
- - Add `google-services.json` at the following location: `/android/app/google-services.json`
75
+ 4. Download `google-services.json` and place it at `/android/app/google-services.json`
63
76
 
64
77
  ### Setup for iOS
65
78
 
66
- - At the top of the file `/ios/{projectName}/AppDelegate.m` before [#if defined(FB_SONARKIT_ENABLED)](https://github.com/react-native-camera/react-native-camera/issues/3008#issuecomment-726432198), import Firebase:
79
+ 1. Add Firebase pods to your `Podfile`:
80
+
81
+ ```ruby
82
+ pod 'FirebaseMessaging', :modular_headers => true
83
+ ```
84
+
85
+ 2. Run pod install:
86
+
87
+ ```sh
88
+ cd ios && pod install
89
+ ```
90
+
91
+ 3. Add your iOS app on [Firebase Console](https://console.firebase.google.com/): **Project Overview > Add App > iOS**
92
+
93
+ 4. Download `GoogleService-Info.plist` and add it to your Xcode project (right-click project > **Add Files**, ensure **Copy items if needed** is checked).
94
+
95
+ #### Option A: Using `DashXRCTAppDelegate` (Recommended)
96
+
97
+ The SDK ships a `DashXRCTAppDelegate` class that handles Firebase configuration, FCM token management, and push notification display out of the box. Subclass it in your `AppDelegate`:
98
+
99
+ ```swift
100
+ import DashXReactNative
101
+
102
+ @main
103
+ class AppDelegate: DashXRCTAppDelegate {
104
+ override func sourceURL(for bridge: RCTBridge) -> URL? {
105
+ bundleURL()
106
+ }
107
+
108
+ override func bundleURL() -> URL? {
109
+ #if DEBUG
110
+ RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
111
+ #else
112
+ Bundle.main.url(forResource: "main", withExtension: "jsbundle")
113
+ #endif
114
+ }
115
+
116
+ // Called when a notification is tapped
117
+ override func notificationClicked(message: [AnyHashable: Any], actionIdentifier: String) {
118
+ // Handle notification tap
119
+ }
120
+
121
+ // Called when a notification arrives while the app is in the foreground
122
+ override func notificationDeliveredInForeground(message: [AnyHashable: Any]) -> UNNotificationPresentationOptions {
123
+ return [.banner, .sound]
124
+ }
125
+ }
126
+ ```
127
+
128
+ #### Option B: Manual setup in AppDelegate
129
+
130
+ If you prefer manual control, import Firebase at the top of `/ios/{projectName}/AppDelegate.m`:
67
131
 
68
132
  ```objective-c
69
133
  #import <FirebaseCore/FirebaseCore.h>
70
134
  #import <FirebaseMessaging/FirebaseMessaging.h>
71
135
  ```
72
136
 
73
- - In the same file, inside your `didFinishLaunchingWithOptions` add this:
137
+ Then inside `didFinishLaunchingWithOptions`:
74
138
 
75
139
  ```objective-c
76
- // Register for remote notifications. This shows a permission dialog on first run, to
77
- // show the dialog at a more appropriate time move this registration accordingly.
78
- // [START register_for_notifications]
79
140
  [UNUserNotificationCenter currentNotificationCenter].delegate = self;
80
141
  UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
81
142
  [[UNUserNotificationCenter currentNotificationCenter]
@@ -84,55 +145,223 @@ UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizatio
84
145
  }];
85
146
 
86
147
  [application registerForRemoteNotifications];
87
- // [END register_for_notifications]
88
148
 
89
- // [START configure_firebase]
90
149
  if ([FIRApp defaultApp] == nil) {
91
150
  [FIRApp configure];
92
151
  }
93
- // [END configure_firebase]
94
152
 
95
- // [START set_messaging_delegate]
96
153
  [FIRMessaging messaging].delegate = self;
97
- // [END set_messaging_delegate]
98
154
  ```
99
155
 
100
- - In your `Podfile` add this:
156
+ ## Usage
101
157
 
102
- ```ruby
103
- pod 'FirebaseMessaging', :modular_headers => true
158
+ ```js
159
+ import DashX from '@dashx/react-native';
104
160
  ```
105
161
 
106
- - Add your iOS app on Firebase Console: `Project Overview > Add App > iOS`
162
+ ### Configure
107
163
 
108
- - Download `GoogleService-Info.plist`
164
+ Initialize the SDK as early as possible (e.g. in your root component or `App.js`):
109
165
 
110
- - Add `GoogleService-Info.plist` using XCode by right clicking on project and select `Add Files`, select your downloaded file and make sure `Copy items if needed` is checked.
166
+ ```js
167
+ DashX.configure({
168
+ publicKey: 'your-public-key',
169
+ // baseURI: 'https://api.dashx.com', // optional, custom API endpoint
170
+ // targetEnvironment: 'production', // optional
171
+ });
172
+ ```
111
173
 
112
- ## Usage
174
+ | Option | Type | Required | Description |
175
+ |--------|------|----------|-------------|
176
+ | `publicKey` | `string` | Yes | Your DashX public key |
177
+ | `baseURI` | `string` | No | Custom API base URI |
178
+ | `targetEnvironment` | `string` | No | Target environment name |
113
179
 
114
- For detailed usage, refer to the [documentation](https://docs.dashx.com/developer).
180
+ ### Identify a user
115
181
 
116
- ## Contributing
182
+ ```js
183
+ DashX.identify({
184
+ firstName: 'John',
185
+ lastName: 'Doe',
186
+ email: 'john@example.com',
187
+ });
188
+ ```
117
189
 
118
- Please follow [these steps](https://github.com/dashxhq/dashx-js/tree/master/examples/react-native#setting-up-development-environment) to set-up development environment.
190
+ ### Set identity with token
119
191
 
120
- You'll also need Apollo CLI to generate files.
192
+ ```js
193
+ DashX.setIdentity('user-uid', 'user-token');
194
+ ```
121
195
 
122
- ```sh
123
- $ npm i -g apollo
196
+ ### Reset
197
+
198
+ Clear the current identity:
199
+
200
+ ```js
201
+ DashX.reset();
124
202
  ```
125
203
 
126
- For the next steps, please follow the guide for the respective platform:
204
+ ### Track events
127
205
 
128
- - [Android](android/README.md)
129
- - [iOS](ios/README.md)
206
+ ```js
207
+ DashX.track('Item Purchased', {
208
+ itemId: 'sku-123',
209
+ price: 9.99,
210
+ });
211
+ ```
212
+
213
+ ### Track screen views
214
+
215
+ ```js
216
+ DashX.screen('HomeScreen', {
217
+ referrer: 'DeepLink',
218
+ });
219
+ ```
220
+
221
+ ### Push notifications
222
+
223
+ Subscribe the current device to push notifications:
224
+
225
+ ```js
226
+ DashX.subscribe();
227
+ ```
228
+
229
+ Unsubscribe:
230
+
231
+ ```js
232
+ DashX.unsubscribe();
233
+ ```
234
+
235
+ ### Listen for incoming messages
236
+
237
+ Register a listener to handle push notifications when they arrive:
238
+
239
+ ```js
240
+ import { useEffect } from 'react';
241
+
242
+ useEffect(() => {
243
+ const subscription = DashX.onMessageReceived((message) => {
244
+ console.log('Notification received:', message);
245
+ });
246
+
247
+ return () => subscription.remove();
248
+ }, []);
249
+ ```
250
+
251
+ ### Notification preferences
252
+
253
+ Fetch the user's stored notification preferences:
254
+
255
+ ```js
256
+ const preferences = await DashX.fetchStoredPreferences();
257
+ console.log(preferences);
258
+ ```
259
+
260
+ Save updated preferences:
261
+
262
+ ```js
263
+ await DashX.saveStoredPreferences({
264
+ marketing_emails: true,
265
+ product_updates: false,
266
+ });
267
+ ```
268
+
269
+ ### Logging
270
+
271
+ Set the SDK log level for debugging:
272
+
273
+ ```js
274
+ DashX.setLogLevel(1); // 0 = off, 1 = errors, 2 = debug
275
+ ```
276
+
277
+ ### Android example
278
+
279
+ Below is a full example of integrating DashX in a React Native Android app:
280
+
281
+ ```js
282
+ // App.js
283
+ import React, { useEffect } from 'react';
284
+ import { View, Text, Button, StyleSheet } from 'react-native';
285
+ import DashX from '@dashx/react-native';
286
+
287
+ export default function App() {
288
+ useEffect(() => {
289
+ DashX.configure({ publicKey: 'your-public-key' });
290
+ DashX.subscribe();
291
+ }, []);
292
+
293
+ const handleLogin = () => {
294
+ DashX.setIdentity('user-123', 'auth-token');
295
+ DashX.identify({
296
+ firstName: 'Jane',
297
+ lastName: 'Doe',
298
+ email: 'jane@example.com',
299
+ });
300
+ };
301
+
302
+ const handleTrack = () => {
303
+ DashX.track('Button Pressed', { screen: 'Home' });
304
+ };
305
+
306
+ const handleLogout = () => {
307
+ DashX.unsubscribe();
308
+ DashX.reset();
309
+ };
310
+
311
+ return (
312
+ <View style={styles.container}>
313
+ <Text style={styles.title}>DashX React Native Demo</Text>
314
+ <Button title="Login" onPress={handleLogin} />
315
+ <Button title="Track Event" onPress={handleTrack} />
316
+ <Button title="Logout" onPress={handleLogout} />
317
+ </View>
318
+ );
319
+ }
320
+
321
+ const styles = StyleSheet.create({
322
+ container: { flex: 1, justifyContent: 'center', alignItems: 'center' },
323
+ title: { fontSize: 24, marginBottom: 20 },
324
+ });
325
+ ```
326
+
327
+ ## API Reference
328
+
329
+ | Method | Signature | Returns | Description |
330
+ |--------|-----------|---------|-------------|
331
+ | `configure` | `(options: object)` | `void` | Initialize the SDK with your public key |
332
+ | `identify` | `(options: object)` | `void` | Identify the current user with traits |
333
+ | `setIdentity` | `(uid: string, token: string)` | `void` | Set user identity with UID and auth token |
334
+ | `reset` | `()` | `void` | Clear the current user identity |
335
+ | `track` | `(event: string, data?: object)` | `void` | Track a named event with optional data |
336
+ | `screen` | `(screenName: string, data?: object)` | `void` | Track a screen view with optional data |
337
+ | `subscribe` | `()` | `void` | Subscribe device for push notifications |
338
+ | `unsubscribe` | `()` | `void` | Unsubscribe device from push notifications |
339
+ | `fetchStoredPreferences` | `()` | `Promise<object>` | Fetch stored notification preferences |
340
+ | `saveStoredPreferences` | `(data: object)` | `Promise<object>` | Save notification preferences |
341
+ | `setLogLevel` | `(level: number)` | `void` | Set SDK log verbosity |
342
+ | `onMessageReceived` | `(callback: function)` | `EmitterSubscription` | Listen for incoming push notifications |
343
+
344
+ For detailed usage and advanced features, refer to the [DashX documentation](https://docs.dashx.com/developer).
345
+
346
+ ## Contributing
347
+
348
+ Please follow [these steps](https://github.com/dashxhq/dashx-js/tree/master/examples/react-native#setting-up-development-environment) to set up the development environment.
349
+
350
+ You'll also need Apollo CLI to generate files:
351
+
352
+ ```sh
353
+ npm i -g apollo
354
+ ```
130
355
 
131
356
  ## Publishing
132
357
 
133
- Simply use `yarn publish` to bump the version & release. Once done, push the commit that yarn adds to GitHub:
358
+ Use `yarn publish` to bump the version and release, then push the commit:
134
359
 
135
360
  ```sh
136
- $ yarn publish
137
- $ git push origin main
361
+ yarn publish
362
+ git push origin main
138
363
  ```
364
+
365
+ ## License
366
+
367
+ MIT
@@ -0,0 +1 @@
1
+ o/bundleLibRuntimeToDirDebug
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Automatically generated file. DO NOT MODIFY
3
+ */
4
+ package com.dashx.rn.sdk;
5
+
6
+ public final class BuildConfig {
7
+ public static final boolean DEBUG = Boolean.parseBoolean("true");
8
+ public static final String LIBRARY_PACKAGE_NAME = "com.dashx.rn.sdk";
9
+ public static final String BUILD_TYPE = "debug";
10
+ // Field from default config.
11
+ public static final String VERSION_NAME = "0.0.1";
12
+ }
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.dashx.rn.sdk" >
4
+
5
+ <uses-sdk android:minSdkVersion="26" />
6
+
7
+ </manifest>
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 3,
3
+ "artifactType": {
4
+ "type": "AAPT_FRIENDLY_MERGED_MANIFESTS",
5
+ "kind": "Directory"
6
+ },
7
+ "applicationId": "com.dashx.rn.sdk",
8
+ "variantName": "debug",
9
+ "elements": [
10
+ {
11
+ "type": "SINGLE",
12
+ "filters": [],
13
+ "attributes": [],
14
+ "outputFile": "AndroidManifest.xml"
15
+ }
16
+ ],
17
+ "elementType": "File"
18
+ }
@@ -0,0 +1,6 @@
1
+ aarFormatVersion=1.0
2
+ aarMetadataVersion=1.0
3
+ minCompileSdk=1
4
+ minCompileSdkExtension=0
5
+ minAndroidGradlePluginVersion=1.0.0
6
+ coreLibraryDesugaringEnabled=false
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="main" generated-set="main$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/main/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="debug" generated-set="debug$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/debug/res"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated$Generated" generated="true" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/build/generated/res/resValues/debug"/></dataSet><dataSet aapt-namespace="http://schemas.android.com/apk/res-auto" config="generated" generated-set="generated$Generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/build/generated/res/resValues/debug"/></dataSet><mergedItems/></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/main/assets"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/debug/assets"/></dataSet><dataSet config="generated" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/build/intermediates/shader_assets/debug/compileDebugShaders/out"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/main/jniLibs"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/debug/jniLibs"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <merger version="3"><dataSet config="main" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/main/shaders"/></dataSet><dataSet config="debug" ignore_pattern="!.svn:!.git:!.ds_store:!*.scc:.*:&lt;dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"><source path="/Users/gulshan/Work/dashx-demo-rn/node_modules/@dashx/react-native/android/src/debug/shaders"/></dataSet></merger>
@@ -0,0 +1,2 @@
1
+ R_DEF: Internal format may change without notice
2
+ local
@@ -0,0 +1,7 @@
1
+ 1<?xml version="1.0" encoding="utf-8"?>
2
+ 2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ 3 package="com.dashx.rn.sdk" >
4
+ 4
5
+ 5 <uses-sdk android:minSdkVersion="26" />
6
+ 6
7
+ 7</manifest>
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
+ package="com.dashx.rn.sdk" >
4
+
5
+ <uses-sdk android:minSdkVersion="26" />
6
+
7
+ </manifest>