@dashx/react-native 1.0.8 → 1.1.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 (171) hide show
  1. package/.gitattributes +1 -0
  2. package/.gitignore +46 -0
  3. package/.nvmrc +1 -0
  4. package/README.md +251 -39
  5. package/android/build/.transforms/103e3bf16f310520880af8bd348f4f94/results.bin +1 -0
  6. package/android/build/.transforms/103e3bf16f310520880af8bd348f4f94/transformed/classes/classes_dex/classes.dex +0 -0
  7. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/results.bin +1 -0
  8. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/BuildConfig.dex +0 -0
  9. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXPackage.dex +0 -0
  10. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXReactNativeModule.dex +0 -0
  11. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil$1.dex +0 -0
  12. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil.dex +0 -0
  13. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil$1.dex +0 -0
  14. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil.dex +0 -0
  15. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils$WhenMappings.dex +0 -0
  16. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils.dex +0 -0
  17. package/android/build/.transforms/1a91a107d670af17a51b8ccf1674f99e/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  18. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/results.bin +1 -0
  19. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/BuildConfig.dex +0 -0
  20. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXPackage.dex +0 -0
  21. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/DashXReactNativeModule.dex +0 -0
  22. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil$1.dex +0 -0
  23. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/ArrayUtil.dex +0 -0
  24. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil$1.dex +0 -0
  25. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/MapUtil.dex +0 -0
  26. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils$WhenMappings.dex +0 -0
  27. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/dashx/rn/sdk/util/Utils.dex +0 -0
  28. package/android/build/.transforms/9dceace6c3787533d2dbb1a387e9284c/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  29. package/android/build/.transforms/f3c6049e7ab4bb564c79f3a246b8575e/results.bin +1 -0
  30. package/android/build/.transforms/f3c6049e7ab4bb564c79f3a246b8575e/transformed/classes/classes_dex/classes.dex +0 -0
  31. package/android/build/generated/source/buildConfig/debug/com/dashx/rn/sdk/BuildConfig.java +12 -0
  32. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  33. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  34. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  35. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  36. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  37. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  38. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  39. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  40. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  41. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  42. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  43. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  44. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  45. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  46. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/BuildConfig.class +0 -0
  47. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/ArrayUtil$1.class +0 -0
  48. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/ArrayUtil.class +0 -0
  49. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/MapUtil$1.class +0 -0
  50. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/dashx/rn/sdk/util/MapUtil.class +0 -0
  51. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  52. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  53. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  54. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  55. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/BuildConfig.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/DashXPackage.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/DashXReactNativeModule.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/ArrayUtil$1.class +0 -0
  61. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/ArrayUtil.class +0 -0
  62. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/MapUtil$1.class +0 -0
  63. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/MapUtil.class +0 -0
  64. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/Utils$WhenMappings.class +0 -0
  65. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/dashx/rn/sdk/util/Utils.class +0 -0
  66. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  67. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  68. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  69. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  70. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  156. package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  157. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  158. package/android/build/tmp/kotlin-classes/debug/META-INF/dashx_react-native_debug.kotlin_module +0 -0
  159. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXPackage.class +0 -0
  160. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/DashXReactNativeModule.class +0 -0
  161. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/util/Utils$WhenMappings.class +0 -0
  162. package/android/build/tmp/kotlin-classes/debug/com/dashx/rn/sdk/util/Utils.class +0 -0
  163. package/android/build.gradle +12 -27
  164. package/android/gradlew +185 -0
  165. package/android/gradlew.bat +89 -0
  166. package/android/src/main/AndroidManifest.xml +1 -2
  167. package/android/src/main/java/com/dashx/rn/sdk/DashXReactNativeModule.kt +20 -96
  168. package/babel.config.js +3 -0
  169. package/package.json +4 -5
  170. package/utils/RestAPIClient.js +154 -0
  171. package/yarn.lock +7251 -0
@@ -0,0 +1,89 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%" == "" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%" == "" set DIRNAME=.
29
+ set APP_BASE_NAME=%~n0
30
+ set APP_HOME=%DIRNAME%
31
+
32
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
+
35
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
+
38
+ @rem Find java.exe
39
+ if defined JAVA_HOME goto findJavaFromJavaHome
40
+
41
+ set JAVA_EXE=java.exe
42
+ %JAVA_EXE% -version >NUL 2>&1
43
+ if "%ERRORLEVEL%" == "0" goto execute
44
+
45
+ echo.
46
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
+ echo.
48
+ echo Please set the JAVA_HOME variable in your environment to match the
49
+ echo location of your Java installation.
50
+
51
+ goto fail
52
+
53
+ :findJavaFromJavaHome
54
+ set JAVA_HOME=%JAVA_HOME:"=%
55
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
+
57
+ if exist "%JAVA_EXE%" goto execute
58
+
59
+ echo.
60
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
+ echo.
62
+ echo Please set the JAVA_HOME variable in your environment to match the
63
+ echo location of your Java installation.
64
+
65
+ goto fail
66
+
67
+ :execute
68
+ @rem Setup the command line
69
+
70
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
+
72
+
73
+ @rem Execute Gradle
74
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
+
76
+ :end
77
+ @rem End local scope for the variables with windows NT shell
78
+ if "%ERRORLEVEL%"=="0" goto mainEnd
79
+
80
+ :fail
81
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
+ rem the _cmd.exe /c_ return code!
83
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
+ exit /b 1
85
+
86
+ :mainEnd
87
+ if "%OS%"=="Windows_NT" endlocal
88
+
89
+ :omega
@@ -1,5 +1,4 @@
1
1
 
2
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
- package="com.dashx.rn.sdk">
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
4
3
 
5
4
  </manifest>
@@ -1,15 +1,11 @@
1
1
  package com.dashx.rn.sdk
2
2
 
3
- import android.content.pm.PackageInfo
4
- import android.content.pm.PackageManager.NameNotFoundException
5
3
  import android.net.Uri
6
4
  import com.dashx.rn.sdk.util.*
7
- import com.dashx.sdk.DashXClient as DashX
8
- import com.dashx.sdk.DashXLog
9
- import com.dashx.sdk.DashXLog.LogLevel
10
- import com.dashx.sdk.data.LibraryInfo
5
+ import com.dashx.android.DashX
6
+ import com.dashx.android.DashXLog
7
+ import com.dashx.android.DashXLog.LogLevel
11
8
  import com.facebook.react.bridge.*
12
- import java.io.File
13
9
  import kotlinx.serialization.decodeFromString
14
10
  import kotlinx.serialization.encodeToString
15
11
  import kotlinx.serialization.json.Json
@@ -17,7 +13,6 @@ import kotlinx.serialization.json.JsonObject
17
13
 
18
14
  class DashXReactNativeModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
19
15
  private val tag = DashXReactNativeModule::class.java.simpleName
20
- private var dashXClient: DashX? = null
21
16
 
22
17
  override fun getName(): String {
23
18
  return "DashXReactNative"
@@ -31,29 +26,28 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
31
26
 
32
27
  @ReactMethod
33
28
  fun configure(options: ReadableMap) {
34
- dashXClient = DashX.configure(
29
+ DashX.configure(
35
30
  reactContext,
36
31
  options.getString("publicKey")!!,
37
32
  options.getStringIfPresent("baseURI"),
38
- options.getStringIfPresent("targetEnvironment"),
39
- LibraryInfo("dashx-react-native", BuildConfig.VERSION_NAME)
33
+ options.getStringIfPresent("targetEnvironment")
40
34
  )
41
35
  }
42
36
 
43
37
  @ReactMethod
44
38
  fun identify(options: ReadableMap?) {
45
39
  val optionsHashMap = options?.toHashMap()
46
- dashXClient?.identify(optionsHashMap as HashMap<String, String>?)
40
+ DashX.identify(optionsHashMap as HashMap<String, String>?)
47
41
  }
48
42
 
49
43
  @ReactMethod
50
44
  fun setIdentity(uid: String?, token: String?) {
51
- dashXClient?.setIdentity(uid, token)
45
+ DashX.setIdentity(uid, token)
52
46
  }
53
47
 
54
48
  @ReactMethod
55
49
  fun reset() {
56
- dashXClient?.reset()
50
+ DashX.reset()
57
51
  }
58
52
 
59
53
  @ReactMethod
@@ -65,25 +59,22 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
65
59
  return
66
60
  }
67
61
 
68
- dashXClient?.track(event, jsonData)
62
+ DashX.track(event, jsonData)
69
63
  }
70
64
 
71
65
  @ReactMethod
72
66
  fun screen(screenName: String, data: ReadableMap?) {
73
- dashXClient?.screen(screenName, data?.toHashMap() as HashMap<String, String>)
67
+ DashX.screen(screenName, data?.toHashMap() as HashMap<String, String>)
74
68
  }
75
69
 
76
70
  @ReactMethod
77
71
  fun fetchContent(urn: String, options: ReadableMap?, promise: Promise) {
78
- dashXClient?.fetchContent(
72
+ DashX.fetchRecord(
79
73
  urn,
80
74
  options?.getBooleanIfPresent("preview"),
81
75
  options?.getStringIfPresent("language"),
82
- listOf(options?.getArray("fields")) as List<String>?,
83
- listOf(options?.getArray("include")) as List<String>?,
84
- listOf(options?.getArray("exclude")) as List<String>?,
85
76
  onError = {
86
- promise.reject("EUNSPECIFIED", it)
77
+ promise.reject("EUNSPECIFIED", it.message)
87
78
  },
88
79
  onSuccess = {
89
80
  promise.resolve(convertJsonToMap(convertKJsonToJson(it)))
@@ -107,19 +98,11 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
107
98
  throw Exception("Encountered an error while parsing order")
108
99
  }
109
100
 
110
- dashXClient?.searchContent(
101
+ DashX.searchRecords(
111
102
  contentType,
112
- options?.getString("returnType") ?: "all",
113
103
  convertJsonToKJson(jsonFilter),
114
- convertJsonToKJson(jsonOrder),
115
- options?.getIntIfPresent("limit"),
116
- options?.getBooleanIfPresent("preview"),
117
- options?.getStringIfPresent("language"),
118
- listOf(options?.getArray("fields")) as List<String>?,
119
- listOf(options?.getArray("include")) as List<String>?,
120
- listOf(options?.getArray("exclude")) as List<String>?,
121
104
  onError = {
122
- promise.reject("EUNSPECIFIED", it)
105
+ promise.reject("EUNSPECIFIED", it.message)
123
106
  },
124
107
  onSuccess = { content ->
125
108
  val readableArray = Arguments.createArray()
@@ -131,54 +114,11 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
131
114
  )
132
115
  }
133
116
 
134
- @ReactMethod
135
- fun addItemToCart(
136
- itemId: String,
137
- pricingId: String,
138
- quantity: String,
139
- reset: Boolean? = false,
140
- custom: ReadableMap? = null,
141
- promise: Promise
142
- ) {
143
- val jsonCustom = try {
144
- convertMapToJson(custom)
145
- } catch (e: Exception) {
146
- DashXLog.d(tag, e.message)
147
- throw Exception("Encountered an error while parsing custom")
148
- }
149
-
150
- dashXClient?.addItemToCart(
151
- itemId,
152
- pricingId,
153
- quantity,
154
- reset ?: false,
155
- convertJsonToKJson(jsonCustom),
156
- onError = {
157
- promise.reject("EUNSPECIFIED", it)
158
- },
159
- onSuccess = { content ->
160
- promise.resolve(convertJsonToMap(convertKJsonToJson(Json.decodeFromString<JsonObject>(Json.encodeToString(content)))))
161
- }
162
- )
163
- }
164
-
165
- @ReactMethod
166
- fun fetchCart(promise: Promise) {
167
- dashXClient?.fetchCart(
168
- onError = {
169
- promise.reject("EUNSPECIFIED", it)
170
- },
171
- onSuccess = { content ->
172
- promise.resolve(convertJsonToMap(convertKJsonToJson(Json.decodeFromString<JsonObject>(Json.encodeToString(content)))))
173
- }
174
- )
175
- }
176
-
177
117
  @ReactMethod
178
118
  fun fetchStoredPreferences(promise: Promise) {
179
- dashXClient?.fetchStoredPreferences(
119
+ DashX.fetchStoredPreferences(
180
120
  onError = {
181
- promise.reject("EUNSPECIFIED", it)
121
+ promise.reject("EUNSPECIFIED", it.message)
182
122
  },
183
123
  onSuccess = { content ->
184
124
  promise.resolve(convertJsonToMap(convertKJsonToJson(Json.decodeFromString<JsonObject>(Json.encodeToString(content)))))
@@ -190,10 +130,10 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
190
130
  fun saveStoredPreferences(preferenceData: ReadableMap?, promise: Promise) {
191
131
  val preferencesString = MapUtil.toJSONElement(preferenceData).toString()
192
132
 
193
- dashXClient?.saveStoredPreferences(
133
+ DashX.saveStoredPreferences(
194
134
  Json.decodeFromString<JsonObject>(preferencesString),
195
135
  onError = {
196
- promise.reject("EUNSPECIFIED", it)
136
+ promise.reject("EUNSPECIFIED", it.message)
197
137
  },
198
138
  onSuccess = { content ->
199
139
  promise.resolve(convertJsonToMap(convertKJsonToJson(Json.decodeFromString<JsonObject>(Json.encodeToString(content)))))
@@ -203,27 +143,11 @@ class DashXReactNativeModule(private val reactContext: ReactApplicationContext)
203
143
 
204
144
  @ReactMethod
205
145
  fun subscribe() {
206
- dashXClient?.subscribe()
146
+ DashX.subscribe()
207
147
  }
208
148
 
209
149
  @ReactMethod
210
150
  fun unsubscribe() {
211
- dashXClient?.unsubscribe()
212
- }
213
-
214
- //FIXME Amend the logic to work with React Native content URIs
215
- fun getFilePathFromURIString(contentUriString: String): String {
216
- val sanitizedURI = contentUriString.replace("\"", "")
217
- val path = Uri.parse(sanitizedURI).path
218
- val index = path?.indexOf(':')
219
-
220
- if (index == null) {
221
- return ""
222
- }
223
-
224
- // Remove unnecessary URI component
225
- val filePath = path!!.substring(index!! + 1)
226
-
227
- return filePath
151
+ DashX.unsubscribe()
228
152
  }
229
153
  }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['module:metro-react-native-babel-preset'],
3
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dashx/react-native",
3
3
  "title": "DashX React Native",
4
- "version": "1.0.8",
4
+ "version": "1.1.0",
5
5
  "description": "DashX SDK for React Native",
6
6
  "main": "index.js",
7
7
  "files": [
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "devDependencies": {
56
56
  "@commitlint/config-conventional": "^17.0.2",
57
- "@react-native/eslint-config": "^0.72.2",
57
+ "@react-native/eslint-config": "0.77.3",
58
58
  "del-cli": "^5.0.0",
59
59
  "eslint": "^8.4.1",
60
60
  "eslint-config-prettier": "^8.5.0",
@@ -62,15 +62,14 @@
62
62
  "jest": "^28.1.1",
63
63
  "pod-install": "^0.1.0",
64
64
  "prettier": "^2.0.5",
65
- "react": "18.2.0",
66
- "react-native": "0.72.3",
65
+ "react": "18.3.1",
66
+ "react-native": "0.77.3",
67
67
  "react-native-builder-bob": "^0.21.3",
68
68
  "turbo": "^1.10.7"
69
69
  },
70
70
  "engines": {
71
71
  "node": ">= 16.0.0"
72
72
  },
73
- "packageManager": "^yarn@1.22.15",
74
73
  "dependencies": {
75
74
  "react-native-get-real-path": "github:Wraptime/react-native-get-real-path"
76
75
  },
@@ -0,0 +1,154 @@
1
+ import { Platform } from 'react-native'
2
+ import RNFetchBlob from 'rn-fetch-blob'
3
+ import axios from 'axios'
4
+
5
+ /** Prepare headers headers for the authenticated calls */
6
+ const getNetworkHeaders = (config, customHeaders) => {
7
+ return {
8
+ 'X-Public-Key': `${config.publicKey}`,
9
+ //TODO Include identity token as well in the request in future. Currently backend returns "incorrect format" error
10
+ // "X-Identity-Token": `${config.identityToken}`,
11
+ 'X-Target-Environment': `${config.targetEnvironment}`,
12
+ Accept: '*/*',
13
+ ...customHeaders,
14
+ }
15
+ }
16
+
17
+ const getNetworkRequestData = (config, customHeaders = {}) => {
18
+ return {
19
+ url: config.baseUri,
20
+ headers: getNetworkHeaders(config, customHeaders),
21
+ }
22
+ }
23
+
24
+ export const prepareExternalAsset = async (externalColumnId, config) => {
25
+ const request = {
26
+ ...getNetworkRequestData(config),
27
+ method: 'POST',
28
+ data: {
29
+ query: `mutation PrepareExternalAsset($input: PrepareExternalAssetInput!) {
30
+ prepareExternalAsset(input: $input) {
31
+ id
32
+ installationId
33
+ externalColumnId
34
+ storageProviderId
35
+ status
36
+ data
37
+ createdAt
38
+ updatedAt
39
+ }
40
+ }`,
41
+ variables: {
42
+ input: {
43
+ externalColumnId,
44
+ },
45
+ },
46
+ },
47
+ }
48
+
49
+ const response = await axios.request(request)
50
+
51
+ return response?.data?.data?.prepareExternalAsset
52
+ }
53
+
54
+ export const queryExternalAsset = async (assetId, config) => {
55
+ const response = await axios.request({
56
+ ...getNetworkRequestData(config),
57
+ method: 'POST',
58
+ data: {
59
+ query: `query ExternalAsset($id: ID!) {
60
+ externalAsset(id: $id) {
61
+ id
62
+ status
63
+ data
64
+ }
65
+ }`,
66
+ variables: {
67
+ id: assetId,
68
+ },
69
+ },
70
+ })
71
+
72
+ return response?.data?.data?.externalAsset
73
+ }
74
+
75
+ export const uploadFile = async (url, file, config) => {
76
+ if (!file || Object.keys(file).length === 0) {
77
+ throw new Error('File is empty')
78
+ }
79
+
80
+ let { uri, path, type } = file
81
+ const uriTransformer = Platform.select({
82
+ ios: () => (uri || path).replace('file://', ''),
83
+ android: () => {
84
+ return uri || path
85
+ },
86
+ })
87
+
88
+ const fileName =
89
+ file.filename || file.name || `${(uri || path).split('/').pop()}`
90
+
91
+ const transformedFile = {
92
+ filename: fileName,
93
+ name: fileName,
94
+ uri: uriTransformer(),
95
+ type,
96
+ }
97
+
98
+ const response = await RNFetchBlob.fetch(
99
+ 'PUT',
100
+ config.baseUri,
101
+ getNetworkHeaders(config, { type }),
102
+ RNFetchBlob.wrap(transformedFile.uri)
103
+ )
104
+ return response.data?.data
105
+ }
106
+
107
+ const pollTillAssetIsReady = async (assetId, config, retryCount) => {
108
+ return new Promise(function (resolve, reject) {
109
+ const retryWindowMillis = 3000
110
+
111
+ function queryAssetWithRetryTimeout(retry) {
112
+ if (retry === 0) {
113
+ return resolve({ id: assetId })
114
+ }
115
+
116
+ queryExternalAsset(assetId, config)
117
+ .then((assetResponse) => {
118
+ if (assetResponse?.status === 'ready') {
119
+ resolve(assetResponse)
120
+ } else {
121
+ setTimeout(function () {
122
+ queryAssetWithRetryTimeout(retry - 1)
123
+ }, retryWindowMillis)
124
+ }
125
+ })
126
+ .catch(reject)
127
+ }
128
+
129
+ queryAssetWithRetryTimeout(retryCount)
130
+ })
131
+ }
132
+
133
+ export const uploadExternalAsset = async (
134
+ file,
135
+ externalColumnId,
136
+ config,
137
+ onSuccess,
138
+ onFailure
139
+ ) => {
140
+ try {
141
+ const preparedAsset = await prepareExternalAsset(externalColumnId, config)
142
+
143
+ const uploadUrl = preparedAsset?.data?.upload?.url,
144
+ assetId = preparedAsset?.id
145
+
146
+ await uploadFile(uploadUrl, file, config)
147
+
148
+ const response = await pollTillAssetIsReady(assetId, config, 10)
149
+
150
+ onSuccess(response)
151
+ } catch (error) {
152
+ onFailure(error)
153
+ }
154
+ }