react-native-unit-components 0.1.0 → 1.0.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 (406) hide show
  1. package/README.md +157 -2
  2. package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +27 -0
  3. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsEvent.kt +21 -0
  4. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +2 -1
  5. package/android/src/main/java/com/unitreactnativecomponents/visapresentation/UNGooglePayView.kt +197 -0
  6. package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
  7. package/android/src/main/res/drawable/un_add_to_googlepay_button_content.xml +54 -0
  8. package/android/src/main/res/drawable/un_black_add_to_googlepay_button_content.xml +54 -0
  9. package/android/src/main/res/drawable/un_black_googlepay_button_background.xml +6 -0
  10. package/android/src/main/res/drawable/un_black_googlepay_button_background_image.9.png +0 -0
  11. package/android/src/main/res/drawable/un_black_googlepay_button_content.xml +48 -0
  12. package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background.xml +6 -0
  13. package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
  14. package/android/src/main/res/drawable/un_black_googlepay_button_overlay.xml +12 -0
  15. package/android/src/main/res/drawable/un_border.xml +6 -0
  16. package/android/src/main/res/drawable/un_condensed_googlepay.xml +27 -0
  17. package/android/src/main/res/drawable/un_googlepay_button_background.xml +18 -0
  18. package/android/src/main/res/drawable/un_googlepay_button_background_image.9.png +0 -0
  19. package/android/src/main/res/drawable/un_googlepay_button_background_image_focused.9.png +0 -0
  20. package/android/src/main/res/drawable/un_googlepay_button_background_image_pressed.9.png +0 -0
  21. package/android/src/main/res/drawable/un_googlepay_button_content.xml +48 -0
  22. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background.xml +18 -0
  23. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image.9.png +0 -0
  24. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  25. package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  26. package/android/src/main/res/drawable/un_googlepay_button_overlay.xml +11 -0
  27. package/android/src/main/res/drawable/un_ic_launcher_foreground.xml +30 -0
  28. package/android/src/main/res/drawable/un_ic_unit_logo.xml +25 -0
  29. package/android/src/main/res/drawable/un_ic_visa.xml +13 -0
  30. package/android/src/main/res/drawable-bg/un_add_to_googlepay_button_content.xml +54 -0
  31. package/android/src/main/res/drawable-bg/un_black_add_to_googlepay_button_content.xml +54 -0
  32. package/android/src/main/res/drawable-ca/un_add_to_googlepay_button_content.xml +30 -0
  33. package/android/src/main/res/drawable-ca/un_black_add_to_googlepay_button_content.xml +30 -0
  34. package/android/src/main/res/drawable-cs/un_add_to_googlepay_button_content.xml +54 -0
  35. package/android/src/main/res/drawable-cs/un_black_add_to_googlepay_button_content.xml +54 -0
  36. package/android/src/main/res/drawable-da/un_add_to_googlepay_button_content.xml +30 -0
  37. package/android/src/main/res/drawable-da/un_black_add_to_googlepay_button_content.xml +30 -0
  38. package/android/src/main/res/drawable-de/un_add_to_googlepay_button_content.xml +60 -0
  39. package/android/src/main/res/drawable-de/un_black_add_to_googlepay_button_content.xml +60 -0
  40. package/android/src/main/res/drawable-el/un_add_to_googlepay_button_content.xml +67 -0
  41. package/android/src/main/res/drawable-el/un_black_add_to_googlepay_button_content.xml +67 -0
  42. package/android/src/main/res/drawable-es/un_add_to_googlepay_button_content.xml +54 -0
  43. package/android/src/main/res/drawable-es/un_black_add_to_googlepay_button_content.xml +54 -0
  44. package/android/src/main/res/drawable-et/un_add_to_googlepay_button_content.xml +64 -0
  45. package/android/src/main/res/drawable-et/un_black_add_to_googlepay_button_content.xml +64 -0
  46. package/android/src/main/res/drawable-fi/un_add_to_googlepay_button_content.xml +39 -0
  47. package/android/src/main/res/drawable-fi/un_black_add_to_googlepay_button_content.xml +39 -0
  48. package/android/src/main/res/drawable-fr/un_add_to_googlepay_button_content.xml +54 -0
  49. package/android/src/main/res/drawable-fr/un_black_add_to_googlepay_button_content.xml +54 -0
  50. package/android/src/main/res/drawable-hr/un_add_to_googlepay_button_content.xml +54 -0
  51. package/android/src/main/res/drawable-hr/un_black_add_to_googlepay_button_content.xml +54 -0
  52. package/android/src/main/res/drawable-hu/un_add_to_googlepay_button_content.xml +64 -0
  53. package/android/src/main/res/drawable-hu/un_black_add_to_googlepay_button_content.xml +64 -0
  54. package/android/src/main/res/drawable-in/un_add_to_googlepay_button_content.xml +54 -0
  55. package/android/src/main/res/drawable-in/un_black_add_to_googlepay_button_content.xml +54 -0
  56. package/android/src/main/res/drawable-it/un_add_to_googlepay_button_content.xml +54 -0
  57. package/android/src/main/res/drawable-it/un_black_add_to_googlepay_button_content.xml +54 -0
  58. package/android/src/main/res/drawable-iw/un_add_to_googlepay_button_content.xml +41 -0
  59. package/android/src/main/res/drawable-iw/un_black_add_to_googlepay_button_content.xml +41 -0
  60. package/android/src/main/res/drawable-ja/un_add_to_googlepay_button_content.xml +54 -0
  61. package/android/src/main/res/drawable-ja/un_black_add_to_googlepay_button_content.xml +54 -0
  62. package/android/src/main/res/drawable-ko/un_add_to_googlepay_button_content.xml +54 -0
  63. package/android/src/main/res/drawable-ko/un_black_add_to_googlepay_button_content.xml +54 -0
  64. package/android/src/main/res/drawable-lt/un_add_to_googlepay_button_content.xml +70 -0
  65. package/android/src/main/res/drawable-lt/un_black_add_to_googlepay_button_content.xml +70 -0
  66. package/android/src/main/res/drawable-lv/un_add_to_googlepay_button_content.xml +61 -0
  67. package/android/src/main/res/drawable-lv/un_black_add_to_googlepay_button_content.xml +61 -0
  68. package/android/src/main/res/drawable-ms/un_add_to_googlepay_button_content.xml +54 -0
  69. package/android/src/main/res/drawable-ms/un_black_add_to_googlepay_button_content.xml +54 -0
  70. package/android/src/main/res/drawable-nb/un_add_to_googlepay_button_content.xml +30 -0
  71. package/android/src/main/res/drawable-nb/un_black_add_to_googlepay_button_content.xml +30 -0
  72. package/android/src/main/res/drawable-nl/un_add_to_googlepay_button_content.xml +58 -0
  73. package/android/src/main/res/drawable-nl/un_black_add_to_googlepay_button_content.xml +54 -0
  74. package/android/src/main/res/drawable-pl/un_add_to_googlepay_button_content.xml +30 -0
  75. package/android/src/main/res/drawable-pl/un_black_add_to_googlepay_button_content.xml +30 -0
  76. package/android/src/main/res/drawable-pt/un_add_to_googlepay_button_content.xml +54 -0
  77. package/android/src/main/res/drawable-pt/un_black_add_to_googlepay_button_content.xml +54 -0
  78. package/android/src/main/res/drawable-ro/un_add_to_googlepay_button_content.xml +58 -0
  79. package/android/src/main/res/drawable-ro/un_black_add_to_googlepay_button_content.xml +58 -0
  80. package/android/src/main/res/drawable-ru/un_add_to_googlepay_button_content.xml +54 -0
  81. package/android/src/main/res/drawable-ru/un_black_add_to_googlepay_button_content.xml +54 -0
  82. package/android/src/main/res/drawable-sk/un_add_to_googlepay_button_content.xml +54 -0
  83. package/android/src/main/res/drawable-sk/un_black_add_to_googlepay_button_content.xml +54 -0
  84. package/android/src/main/res/drawable-sl/un_add_to_googlepay_button_content.xml +54 -0
  85. package/android/src/main/res/drawable-sl/un_black_add_to_googlepay_button_content.xml +54 -0
  86. package/android/src/main/res/drawable-sr/un_add_to_googlepay_button_content.xml +54 -0
  87. package/android/src/main/res/drawable-sr/un_black_add_to_googlepay_button_content.xml +54 -0
  88. package/android/src/main/res/drawable-sv/un_add_to_googlepay_button_content.xml +30 -0
  89. package/android/src/main/res/drawable-sv/un_black_add_to_googlepay_button_content.xml +30 -0
  90. package/android/src/main/res/drawable-th/un_add_to_googlepay_button_content.xml +54 -0
  91. package/android/src/main/res/drawable-th/un_black_add_to_googlepay_button_content.xml +54 -0
  92. package/android/src/main/res/drawable-tr/un_add_to_googlepay_button_content.xml +54 -0
  93. package/android/src/main/res/drawable-tr/un_black_add_to_googlepay_button_content.xml +54 -0
  94. package/android/src/main/res/drawable-uk/un_add_to_googlepay_button_content.xml +54 -0
  95. package/android/src/main/res/drawable-uk/un_black_add_to_googlepay_button_content.xml +54 -0
  96. package/android/src/main/res/drawable-v21/un_black_googlepay_button_background.xml +7 -0
  97. package/android/src/main/res/drawable-v21/un_black_googlepay_button_background_image.9.png +0 -0
  98. package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background.xml +7 -0
  99. package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
  100. package/android/src/main/res/drawable-v24/ic_launcher_background.xml +170 -0
  101. package/android/src/main/res/drawable-v24/un_border.xml +6 -0
  102. package/android/src/main/res/drawable-v24/un_ic_launcher_foreground.xml +30 -0
  103. package/android/src/main/res/drawable-v24/un_ic_unit_logo.xml +25 -0
  104. package/android/src/main/res/drawable-v24/un_ic_visa.xml +13 -0
  105. package/android/src/main/res/drawable-zh/un_add_to_googlepay_button_content.xml +54 -0
  106. package/android/src/main/res/drawable-zh/un_black_add_to_googlepay_button_content.xml +54 -0
  107. package/android/src/main/res/layout/un_black_add_to_googlepay_button.xml +32 -0
  108. package/android/src/main/res/layout/un_view_google_push_provisioning.xml +45 -0
  109. package/android/src/main/res/layout/un_white_add_to_googlepay_button.xml +31 -0
  110. package/android/src/main/res/layout/un_white_add_to_googlepay_button_no_shadow.xml +31 -0
  111. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
  112. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
  113. package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  114. package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  115. package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  116. package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  117. package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_background_image.9.png +0 -0
  118. package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  119. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image.9.png +0 -0
  120. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_focused.9.png +0 -0
  121. package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  122. package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  123. package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  124. package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  125. package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  126. package/android/src/main/res/mipmap-xhdpi/white_googlepay_button_no_shadow_background_image.9.png +0 -0
  127. package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_background_image.9.png +0 -0
  128. package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  129. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image.9.png +0 -0
  130. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_focused.9.png +0 -0
  131. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  132. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
  133. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  134. package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  135. package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  136. package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  137. package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_background_image.9.png +0 -0
  138. package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
  139. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image.9.png +0 -0
  140. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_focused.9.png +0 -0
  141. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
  142. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
  143. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
  144. package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
  145. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  146. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  147. package/android/src/main/res/values/colors.xml +14 -0
  148. package/android/src/main/res/values/googlepay_strings.xml +7 -0
  149. package/android/src/main/res/values/strings.xml +4 -0
  150. package/android/src/main/res/values/themes.xml +16 -0
  151. package/android/src/main/res/values-night/themes.xml +16 -0
  152. package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +8 -8
  153. package/ios/UnitReactNativeComponentsViewManager.m +3 -2
  154. package/ios/UnitReactNativeComponentsViewManager.swift +39 -25
  155. package/lib/commonjs/assets/images/close.png +0 -0
  156. package/lib/commonjs/assets/images/index.js +16 -0
  157. package/lib/commonjs/assets/images/index.js.map +1 -0
  158. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +28 -0
  159. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -0
  160. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +20 -0
  161. package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -0
  162. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +39 -0
  163. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -0
  164. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +40 -0
  165. package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -0
  166. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +9 -0
  167. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -0
  168. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +195 -0
  169. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -0
  170. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js +23 -0
  171. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -0
  172. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +49 -0
  173. package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -0
  174. package/lib/commonjs/components/{Card/CardComponent.js → UNCardComponent/UNCardComponent.js} +42 -46
  175. package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -0
  176. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +42 -0
  177. package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -0
  178. package/lib/commonjs/components/index.js +34 -8
  179. package/lib/commonjs/components/index.js.map +1 -1
  180. package/lib/commonjs/custom.d.js +2 -0
  181. package/lib/commonjs/custom.d.js.map +1 -0
  182. package/lib/commonjs/helpers/{BottomSheet.js → BottomSheet/BottomSheet.js} +38 -83
  183. package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -0
  184. package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js +82 -0
  185. package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js.map +1 -0
  186. package/lib/commonjs/helpers/EventBus.js +5 -13
  187. package/lib/commonjs/helpers/EventBus.js.map +1 -1
  188. package/lib/commonjs/hooks/listenerToBus.js +31 -0
  189. package/lib/commonjs/hooks/listenerToBus.js.map +1 -0
  190. package/lib/commonjs/hooks/useAppStateListener.js +34 -0
  191. package/lib/commonjs/hooks/useAppStateListener.js.map +1 -0
  192. package/lib/commonjs/index.js +33 -0
  193. package/lib/commonjs/index.js.map +1 -1
  194. package/lib/commonjs/messages/nativeMessages/index.js +13 -0
  195. package/lib/commonjs/messages/nativeMessages/index.js.map +1 -0
  196. package/lib/commonjs/messages/webMessages/bookPaymentMessage.js +13 -0
  197. package/lib/commonjs/messages/webMessages/bookPaymentMessage.js.map +1 -0
  198. package/lib/commonjs/{webComponent → messages}/webMessages/cardMessage.js +1 -1
  199. package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -0
  200. package/lib/commonjs/messages/webMessages/index.js +6 -0
  201. package/lib/commonjs/messages/webMessages/index.js.map +1 -0
  202. package/lib/commonjs/{webComponent → messages}/webMessages/pageMessage.js +0 -0
  203. package/lib/commonjs/messages/webMessages/pageMessage.js.map +1 -0
  204. package/lib/commonjs/{webComponent → messages}/webMessages/unitMessages.js +0 -0
  205. package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -0
  206. package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js +13 -0
  207. package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
  208. package/lib/commonjs/scripts/html/bodyHtml.js +52 -0
  209. package/lib/commonjs/scripts/html/bodyHtml.js.map +1 -0
  210. package/lib/commonjs/scripts/html/bodyScript.js +78 -0
  211. package/lib/commonjs/scripts/html/bodyScript.js.map +1 -0
  212. package/lib/commonjs/sharedTypes/bookPayment.types.js +6 -0
  213. package/lib/commonjs/sharedTypes/bookPayment.types.js.map +1 -0
  214. package/lib/commonjs/sharedTypes/card.types.js +6 -0
  215. package/lib/commonjs/sharedTypes/card.types.js.map +1 -0
  216. package/lib/commonjs/sharedTypes/index.js +32 -0
  217. package/lib/commonjs/sharedTypes/index.js.map +1 -0
  218. package/lib/commonjs/sharedTypes/types.js +2 -0
  219. package/lib/commonjs/sharedTypes/types.js.map +1 -0
  220. package/lib/commonjs/styles/variables.js +17 -0
  221. package/lib/commonjs/styles/variables.js.map +1 -0
  222. package/lib/commonjs/unitSdkManager/UnitSdk.api.js +54 -0
  223. package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -0
  224. package/lib/commonjs/unitSdkManager/UnitSdkManager.js +51 -0
  225. package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -0
  226. package/lib/commonjs/webComponent/WebComponent.js +47 -15
  227. package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
  228. package/lib/commonjs/webComponent/html.js +22 -45
  229. package/lib/commonjs/webComponent/html.js.map +1 -1
  230. package/lib/module/assets/images/close.png +0 -0
  231. package/lib/module/assets/images/index.js +2 -0
  232. package/lib/module/assets/images/index.js.map +1 -0
  233. package/lib/module/components/UNActivityComponent/UNActivityComponent.js +13 -0
  234. package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -0
  235. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +10 -0
  236. package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -0
  237. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +23 -0
  238. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -0
  239. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +26 -0
  240. package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -0
  241. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +2 -0
  242. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -0
  243. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +163 -0
  244. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -0
  245. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js +13 -0
  246. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -0
  247. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +29 -0
  248. package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -0
  249. package/lib/module/components/UNCardComponent/UNCardComponent.js +65 -0
  250. package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -0
  251. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +24 -0
  252. package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -0
  253. package/lib/module/components/index.js +4 -2
  254. package/lib/module/components/index.js.map +1 -1
  255. package/lib/module/custom.d.js +2 -0
  256. package/lib/module/custom.d.js.map +1 -0
  257. package/lib/module/helpers/{BottomSheet.js → BottomSheet/BottomSheet.js} +36 -82
  258. package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -0
  259. package/lib/module/helpers/BottomSheet/BottomSheet.styles.js +70 -0
  260. package/lib/module/helpers/BottomSheet/BottomSheet.styles.js.map +1 -0
  261. package/lib/module/helpers/EventBus.js +4 -11
  262. package/lib/module/helpers/EventBus.js.map +1 -1
  263. package/lib/module/hooks/listenerToBus.js +18 -0
  264. package/lib/module/hooks/listenerToBus.js.map +1 -0
  265. package/lib/module/hooks/useAppStateListener.js +23 -0
  266. package/lib/module/hooks/useAppStateListener.js.map +1 -0
  267. package/lib/module/index.js +2 -0
  268. package/lib/module/index.js.map +1 -1
  269. package/lib/module/messages/nativeMessages/index.js +6 -0
  270. package/lib/module/messages/nativeMessages/index.js.map +1 -0
  271. package/lib/module/messages/webMessages/bookPaymentMessage.js +6 -0
  272. package/lib/module/messages/webMessages/bookPaymentMessage.js.map +1 -0
  273. package/lib/module/messages/webMessages/cardMessage.js +6 -0
  274. package/lib/module/messages/webMessages/cardMessage.js.map +1 -0
  275. package/lib/module/messages/webMessages/index.js +2 -0
  276. package/lib/module/messages/webMessages/index.js.map +1 -0
  277. package/lib/module/{webComponent → messages}/webMessages/pageMessage.js +0 -0
  278. package/lib/module/messages/webMessages/pageMessage.js.map +1 -0
  279. package/lib/module/{webComponent → messages}/webMessages/unitMessages.js +0 -0
  280. package/lib/module/messages/webMessages/unitMessages.js.map +1 -0
  281. package/lib/module/nativeComponent/UNNativeAddToWalletButton.js +4 -0
  282. package/lib/module/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
  283. package/lib/module/scripts/html/bodyHtml.js +42 -0
  284. package/lib/module/scripts/html/bodyHtml.js.map +1 -0
  285. package/lib/module/scripts/html/bodyScript.js +64 -0
  286. package/lib/module/scripts/html/bodyScript.js.map +1 -0
  287. package/lib/module/sharedTypes/bookPayment.types.js +2 -0
  288. package/lib/module/sharedTypes/bookPayment.types.js.map +1 -0
  289. package/lib/module/sharedTypes/card.types.js +2 -0
  290. package/lib/module/sharedTypes/card.types.js.map +1 -0
  291. package/lib/module/sharedTypes/index.js +3 -0
  292. package/lib/module/sharedTypes/index.js.map +1 -0
  293. package/lib/module/sharedTypes/types.js +2 -0
  294. package/lib/module/sharedTypes/types.js.map +1 -0
  295. package/lib/module/styles/variables.js +10 -0
  296. package/lib/module/styles/variables.js.map +1 -0
  297. package/lib/module/unitSdkManager/UnitSdk.api.js +37 -0
  298. package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -0
  299. package/lib/module/unitSdkManager/UnitSdkManager.js +38 -0
  300. package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -0
  301. package/lib/module/webComponent/WebComponent.js +46 -14
  302. package/lib/module/webComponent/WebComponent.js.map +1 -1
  303. package/lib/module/webComponent/html.js +18 -44
  304. package/lib/module/webComponent/html.js.map +1 -1
  305. package/lib/typescript/assets/images/index.d.ts +1 -0
  306. package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +6 -0
  307. package/lib/typescript/components/UNActivityComponent/UNActivityComponent.utils.d.ts +2 -0
  308. package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +11 -0
  309. package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +3 -0
  310. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +1 -0
  311. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +7 -0
  312. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +9 -0
  313. package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +5 -0
  314. package/lib/typescript/components/{Card/CardComponent.d.ts → UNCardComponent/UNCardComponent.d.ts} +3 -1
  315. package/lib/typescript/components/UNCardComponent/UNCardComponent.utils.d.ts +6 -0
  316. package/lib/typescript/components/index.d.ts +4 -2
  317. package/lib/typescript/helpers/{BottomSheet.d.ts → BottomSheet/BottomSheet.d.ts} +3 -0
  318. package/lib/typescript/helpers/BottomSheet/BottomSheet.styles.d.ts +63 -0
  319. package/lib/typescript/helpers/EventBus.d.ts +5 -7
  320. package/lib/typescript/hooks/listenerToBus.d.ts +7 -0
  321. package/lib/typescript/hooks/useAppStateListener.d.ts +1 -0
  322. package/lib/typescript/index.d.ts +2 -0
  323. package/lib/typescript/messages/nativeMessages/index.d.ts +3 -0
  324. package/lib/typescript/messages/webMessages/bookPaymentMessage.d.ts +8 -0
  325. package/lib/typescript/{webComponent → messages}/webMessages/cardMessage.d.ts +3 -2
  326. package/lib/typescript/messages/webMessages/index.d.ts +11 -0
  327. package/lib/typescript/{webComponent → messages}/webMessages/pageMessage.d.ts +0 -0
  328. package/lib/typescript/{webComponent → messages}/webMessages/unitMessages.d.ts +0 -0
  329. package/lib/typescript/nativeComponent/UNNativeAddToWalletButton.d.ts +6 -0
  330. package/lib/typescript/scripts/html/bodyHtml.d.ts +7 -0
  331. package/lib/typescript/scripts/html/bodyScript.d.ts +11 -0
  332. package/lib/typescript/sharedTypes/bookPayment.types.d.ts +26 -0
  333. package/lib/typescript/sharedTypes/card.types.d.ts +56 -0
  334. package/lib/typescript/sharedTypes/index.d.ts +2 -0
  335. package/lib/typescript/sharedTypes/types.d.ts +27 -0
  336. package/lib/typescript/styles/variables.d.ts +9 -0
  337. package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +3 -0
  338. package/lib/typescript/unitSdkManager/UnitSdkManager.d.ts +15 -0
  339. package/lib/typescript/webComponent/WebComponent.d.ts +9 -11
  340. package/lib/typescript/webComponent/html.d.ts +6 -1
  341. package/package.json +9 -5
  342. package/{unit-react-native-components.podspec → react-native-unit-components.podspec} +1 -1
  343. package/src/assets/images/close.png +0 -0
  344. package/src/assets/images/index.ts +1 -0
  345. package/src/components/UNActivityComponent/UNActivityComponent.tsx +21 -0
  346. package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +11 -0
  347. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +37 -0
  348. package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.ts +29 -0
  349. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +1 -0
  350. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.ts +13 -0
  351. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +167 -0
  352. package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +34 -0
  353. package/src/components/UNCardComponent/UNCardComponent.tsx +73 -0
  354. package/src/components/UNCardComponent/UNCardComponent.utils.ts +28 -0
  355. package/src/components/index.ts +4 -2
  356. package/src/custom.d.ts +5 -0
  357. package/src/helpers/BottomSheet/BottomSheet.styles.ts +70 -0
  358. package/src/helpers/{BottomSheet.tsx → BottomSheet/BottomSheet.tsx} +74 -110
  359. package/src/helpers/EventBus.ts +13 -13
  360. package/src/hooks/listenerToBus.ts +23 -0
  361. package/src/hooks/useAppStateListener.ts +25 -0
  362. package/src/index.tsx +5 -1
  363. package/src/messages/nativeMessages/index.ts +3 -0
  364. package/src/messages/webMessages/bookPaymentMessage.ts +12 -0
  365. package/src/{webComponent → messages}/webMessages/cardMessage.ts +4 -2
  366. package/src/messages/webMessages/index.ts +21 -0
  367. package/src/{webComponent → messages}/webMessages/pageMessage.ts +1 -1
  368. package/src/{webComponent → messages}/webMessages/unitMessages.ts +1 -0
  369. package/src/nativeComponent/UNNativeAddToWalletButton.tsx +12 -0
  370. package/src/scripts/html/bodyHtml.ts +46 -0
  371. package/src/scripts/html/bodyScript.ts +67 -0
  372. package/src/sharedTypes/bookPayment.types.ts +27 -0
  373. package/src/sharedTypes/card.types.ts +59 -0
  374. package/src/sharedTypes/index.ts +2 -0
  375. package/src/sharedTypes/types.ts +35 -0
  376. package/src/styles/variables.ts +9 -0
  377. package/src/unitSdkManager/UnitSdk.api.ts +31 -0
  378. package/src/unitSdkManager/UnitSdkManager.ts +33 -0
  379. package/src/webComponent/WebComponent.tsx +55 -45
  380. package/src/webComponent/html.ts +22 -46
  381. package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsViewManager.kt +0 -19
  382. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -143
  383. package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +0 -1
  384. package/lib/commonjs/components/Card/CardComponent.js.map +0 -1
  385. package/lib/commonjs/helpers/BottomSheet.js.map +0 -1
  386. package/lib/commonjs/nativeComponenet/NativeComponentExample.js +0 -19
  387. package/lib/commonjs/nativeComponenet/NativeComponentExample.js.map +0 -1
  388. package/lib/commonjs/webComponent/webMessages/cardMessage.js.map +0 -1
  389. package/lib/commonjs/webComponent/webMessages/pageMessage.js.map +0 -1
  390. package/lib/commonjs/webComponent/webMessages/unitMessages.js.map +0 -1
  391. package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -118
  392. package/lib/module/components/BottomSheet/BottomSheetComponent.js.map +0 -1
  393. package/lib/module/components/Card/CardComponent.js +0 -75
  394. package/lib/module/components/Card/CardComponent.js.map +0 -1
  395. package/lib/module/helpers/BottomSheet.js.map +0 -1
  396. package/lib/module/nativeComponenet/NativeComponentExample.js +0 -10
  397. package/lib/module/nativeComponenet/NativeComponentExample.js.map +0 -1
  398. package/lib/module/webComponent/webMessages/cardMessage.js +0 -6
  399. package/lib/module/webComponent/webMessages/cardMessage.js.map +0 -1
  400. package/lib/module/webComponent/webMessages/pageMessage.js.map +0 -1
  401. package/lib/module/webComponent/webMessages/unitMessages.js.map +0 -1
  402. package/lib/typescript/components/BottomSheet/BottomSheetComponent.d.ts +0 -1
  403. package/lib/typescript/nativeComponenet/NativeComponentExample.d.ts +0 -7
  404. package/src/components/BottomSheet/BottomSheetComponent.tsx +0 -113
  405. package/src/components/Card/CardComponent.tsx +0 -75
  406. package/src/nativeComponenet/NativeComponentExample.tsx +0 -26
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getStylesObject","StyleSheet","create","container","position","top","bottom","left","right"],"sources":["UNBottomSheetComponent.styles.ts"],"sourcesContent":["import { StyleSheet } from 'react-native';\n\nexport const getStylesObject = () => {\n return StyleSheet.create({\n container: {\n position: 'absolute',\n top: 0,\n bottom: 0,\n left: 0,\n right: 0\n }\n });\n};\n"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,eAAe,GAAG,MAAM;EACnC,OAAOC,uBAAA,CAAWC,MAAX,CAAkB;IACvBC,SAAS,EAAE;MACTC,QAAQ,EAAE,UADD;MAETC,GAAG,EAAE,CAFI;MAGTC,MAAM,EAAE,CAHC;MAITC,IAAI,EAAE,CAJG;MAKTC,KAAK,EAAE;IALE;EADY,CAAlB,CAAP;AASD,CAVM"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resetHtml = exports.renderingBottomSheetRequest = exports.handleHtmlFullHeight = exports.getBottomSheetScript = void 0;
7
+
8
+ var _unitMessages = require("../../messages/webMessages/unitMessages");
9
+
10
+ var _UNBottomSheetComponent = require("./UNBottomSheetComponent.constants");
11
+
12
+ const getBottomSheetScript = () => {
13
+ return `
14
+ window.addEventListener("${_unitMessages.UnitMessage.UNIT_REQUEST_REFRESH}", (e) => {
15
+ postMessageToSDK({ type: "${_unitMessages.UnitMessage.UNIT_REQUEST_REFRESH}", details: e.detail })
16
+ });
17
+ `;
18
+ };
19
+
20
+ exports.getBottomSheetScript = getBottomSheetScript;
21
+
22
+ const renderingBottomSheetRequest = (currentWebView, renderingRequest) => {
23
+ currentWebView === null || currentWebView === void 0 ? void 0 : currentWebView.injectJavaScript(`
24
+ document.activeElement && document.activeElement.blur();
25
+ dispatchRenderingEvent('${renderingRequest}');
26
+ `);
27
+ };
28
+
29
+ exports.renderingBottomSheetRequest = renderingBottomSheetRequest;
30
+
31
+ const resetHtml = currentWebView => {
32
+ currentWebView === null || currentWebView === void 0 ? void 0 : currentWebView.injectJavaScript(`
33
+ document.activeElement && document.activeElement.blur();
34
+ document.getElementById('webViewContainer').style.height = null;
35
+ `);
36
+ };
37
+
38
+ exports.resetHtml = resetHtml;
39
+
40
+ const handleHtmlFullHeight = (currentWebView, windowHeight) => {
41
+ const bottomSheetHeight = windowHeight * _UNBottomSheetComponent.BOTTOM_SHEET_MAX_PRECANTAGE_SIZE;
42
+ currentWebView && (currentWebView === null || currentWebView === void 0 ? void 0 : currentWebView.injectJavaScript(`
43
+ document.getElementById('webViewContainer').style.height = '${bottomSheetHeight}px';
44
+ `));
45
+ return bottomSheetHeight;
46
+ };
47
+
48
+ exports.handleHtmlFullHeight = handleHtmlFullHeight;
49
+ //# sourceMappingURL=UNBottomSheetComponent.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getBottomSheetScript","UnitMessage","UNIT_REQUEST_REFRESH","renderingBottomSheetRequest","currentWebView","renderingRequest","injectJavaScript","resetHtml","handleHtmlFullHeight","windowHeight","bottomSheetHeight","BOTTOM_SHEET_MAX_PRECANTAGE_SIZE"],"sources":["UNBottomSheetComponent.utils.ts"],"sourcesContent":["import type WebView from 'react-native-webview';\nimport { UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { BOTTOM_SHEET_MAX_PRECANTAGE_SIZE } from './UNBottomSheetComponent.constants';\n\nexport const getBottomSheetScript = () => {\n return `\n window.addEventListener(\"${UnitMessage.UNIT_REQUEST_REFRESH}\", (e) => {\n postMessageToSDK({ type: \"${UnitMessage.UNIT_REQUEST_REFRESH}\", details: e.detail })\n });\n `;\n};\n\nexport const renderingBottomSheetRequest = (currentWebView: WebView, renderingRequest: string) => {\n currentWebView?.injectJavaScript(`\n document.activeElement && document.activeElement.blur();\n dispatchRenderingEvent('${renderingRequest}');\n `);\n};\n\nexport const resetHtml = (currentWebView: WebView) => {\n currentWebView?.injectJavaScript(`\n document.activeElement && document.activeElement.blur();\n document.getElementById('webViewContainer').style.height = null;\n `);\n};\n\nexport const handleHtmlFullHeight = (currentWebView: WebView | null, windowHeight: number) => {\n const bottomSheetHeight = windowHeight * BOTTOM_SHEET_MAX_PRECANTAGE_SIZE;\n currentWebView && currentWebView?.injectJavaScript(`\n document.getElementById('webViewContainer').style.height = '${bottomSheetHeight}px';\n `);\n\n return bottomSheetHeight;\n};\n"],"mappings":";;;;;;;AACA;;AACA;;AAEO,MAAMA,oBAAoB,GAAG,MAAM;EACxC,OAAQ;AACV,+BAA+BC,yBAAA,CAAYC,oBAAqB;AAChE,kCAAkCD,yBAAA,CAAYC,oBAAqB;AACnE;AACA,GAJE;AAKD,CANM;;;;AAQA,MAAMC,2BAA2B,GAAG,CAACC,cAAD,EAA0BC,gBAA1B,KAAuD;EAChGD,cAAc,SAAd,IAAAA,cAAc,WAAd,YAAAA,cAAc,CAAEE,gBAAhB,CAAkC;AACpC;AACA,8BAA8BD,gBAAiB;AAC/C,GAHE;AAID,CALM;;;;AAOA,MAAME,SAAS,GAAIH,cAAD,IAA6B;EACpDA,cAAc,SAAd,IAAAA,cAAc,WAAd,YAAAA,cAAc,CAAEE,gBAAhB,CAAkC;AACpC;AACA;AACA,GAHE;AAID,CALM;;;;AAOA,MAAME,oBAAoB,GAAG,CAACJ,cAAD,EAAiCK,YAAjC,KAA0D;EAC5F,MAAMC,iBAAiB,GAAGD,YAAY,GAAGE,wDAAzC;EACAP,cAAc,KAAIA,cAAJ,aAAIA,cAAJ,uBAAIA,cAAc,CAAEE,gBAAhB,CAAkC;AACtD,kEAAkEI,iBAAkB;AACpF,GAFoB,CAAJ,CAAd;EAIA,OAAOA,iBAAP;AACD,CAPM"}
@@ -9,14 +9,24 @@ var _react = _interopRequireWildcard(require("react"));
9
9
 
10
10
  var _reactNative = require("react-native");
11
11
 
12
- var _pageMessage = require("../../webComponent/webMessages/pageMessage");
12
+ var _pageMessage = require("../../messages/webMessages/pageMessage");
13
13
 
14
- var _unitMessages = require("../../webComponent/webMessages/unitMessages");
14
+ var _unitMessages = require("../../messages/webMessages/unitMessages");
15
15
 
16
- var _EventBus = _interopRequireWildcard(require("../../helpers/EventBus"));
16
+ var _EventBus = _interopRequireDefault(require("../../helpers/EventBus"));
17
17
 
18
18
  var _WebComponent = require("../../webComponent/WebComponent");
19
19
 
20
+ var _listenerToBus = require("../../hooks/listenerToBus");
21
+
22
+ var _UNCardComponent = require("./UNCardComponent.utils");
23
+
24
+ var _bodyHtml = require("../../scripts/html/bodyHtml");
25
+
26
+ var _cardMessage = require("../../messages/webMessages/cardMessage");
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+
20
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
31
 
22
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -24,52 +34,43 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
24
34
  const UNCardComponent = props => {
25
35
  const [height, setHeight] = (0, _react.useState)(0);
26
36
  const [requestRefreshEvent, setRequestRefreshEvent] = (0, _react.useState)(null);
27
- const webRef = (0, _react.useRef)(null);
28
- (0, _react.useEffect)(() => {
29
- _EventBus.default.Instance.addListener(_EventBus.BusEvent.CARD_STATUS_CHANGED, _cardStatusChanged);
30
37
 
31
- _EventBus.default.Instance.addListener(_EventBus.BusEvent.REQUEST_REFRESH, _requestRefresh);
38
+ const windowWidth = _reactNative.Dimensions.get('window').width;
32
39
 
33
- return () => {
34
- _EventBus.default.Instance.removeListener(_cardStatusChanged);
35
-
36
- _EventBus.default.Instance.removeListener(_requestRefresh);
37
- };
38
- }, []);
40
+ const webRef = (0, _react.useRef)(null);
39
41
 
40
- const _cardStatusChanged = card => {
42
+ const cardStatusChanged = card => {
41
43
  if (props.onStatusChanged) {
42
44
  props.onStatusChanged(card);
43
45
  }
44
46
  };
45
47
 
46
- const _requestRefresh = data => {
48
+ const requestRefresh = data => {
47
49
  setRequestRefreshEvent(data);
48
50
  };
49
51
 
52
+ (0, _listenerToBus.useListenerToBus)([{
53
+ busEventKey: _cardMessage.CardMessage.CARD_STATUS_CHANGED,
54
+ action: cardStatusChanged
55
+ }, {
56
+ busEventKey: _unitMessages.UnitMessage.UNIT_REQUEST_REFRESH,
57
+ action: requestRefresh
58
+ }]);
50
59
  (0, _react.useEffect)(() => {
51
- if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(_WebComponent.WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == props.cardId) {
52
- var _webRef$current;
53
-
54
- (_webRef$current = webRef.current) === null || _webRef$current === void 0 ? void 0 : _webRef$current.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
55
- }
60
+ (0, _UNCardComponent.injectRefreshEventIfNeeded)(webRef.current, requestRefreshEvent, props.cardId);
56
61
  }, [requestRefreshEvent]);
57
62
 
58
- const getCardParams = () => {
59
- return `
60
- cardId="${props.cardId}"
61
- customerToken="${props.customerToken}"
62
- src="https://d1xlopvhx2cz8k.cloudfront.net/resources/outlay.json"
63
- `;
64
- };
63
+ const handleMessage = message => {
64
+ switch (message.type) {
65
+ case _unitMessages.UnitMessage.UNIT_REQUEST_RENDERING:
66
+ _EventBus.default.Instance.event(_unitMessages.UnitMessage.UNIT_REQUEST_RENDERING, message.details.data);
67
+
68
+ break;
65
69
 
66
- const getCardScript = () => {
67
- return `
68
- const dispatchRefreshEvent = (details) => {
69
- const event = new CustomEvent("unitRequestRefresh",{ detail: JSON.parse(details) })
70
- window.dispatchEvent(event)
71
- }
72
- `;
70
+ case _pageMessage.PageMessage.PAGE_HEIGHT:
71
+ setHeight(message.details.height);
72
+ break;
73
+ }
73
74
  };
74
75
 
75
76
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
@@ -79,19 +80,14 @@ const UNCardComponent = props => {
79
80
  }, /*#__PURE__*/_react.default.createElement(_WebComponent.WebComponent, {
80
81
  ref: webRef,
81
82
  type: _WebComponent.WebComponentType.card,
82
- params: getCardParams(),
83
- script: getCardScript(),
84
- onMessage: message => {
85
- if (message.type === _unitMessages.UnitMessage.UNIT_REQUEST_RENDERING) {
86
- _EventBus.default.Instance.event(_EventBus.BusEvent.REQUEST_RENDERING, message.details.data);
87
- }
88
-
89
- if (message.type == _pageMessage.PageMessage.PAGE_HEIGHT) {
90
- setHeight(message.details.height);
91
- }
92
- }
83
+ presentationMode: _bodyHtml.PresentationMode.Default,
84
+ params: (0, _UNCardComponent.getCardParams)(props),
85
+ script: (0, _UNCardComponent.getCardScript)(),
86
+ onMessage: message => handleMessage(message),
87
+ width: windowWidth,
88
+ isScrollable: false
93
89
  }));
94
90
  };
95
91
 
96
92
  exports.UNCardComponent = UNCardComponent;
97
- //# sourceMappingURL=CardComponent.js.map
93
+ //# sourceMappingURL=UNCardComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["UNCardComponent","props","height","setHeight","useState","requestRefreshEvent","setRequestRefreshEvent","windowWidth","Dimensions","get","width","webRef","useRef","cardStatusChanged","card","onStatusChanged","requestRefresh","data","useListenerToBus","busEventKey","CardMessage","CARD_STATUS_CHANGED","action","UnitMessage","UNIT_REQUEST_REFRESH","useEffect","injectRefreshEventIfNeeded","current","cardId","handleMessage","message","type","UNIT_REQUEST_RENDERING","EventBus","Instance","event","details","PageMessage","PAGE_HEIGHT","WebComponentType","PresentationMode","Default","getCardParams","getCardScript"],"sources":["UNCardComponent.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { Dimensions, View } from 'react-native';\nimport type WebView from 'react-native-webview';\nimport { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';\nimport { RequestRefreshEvent, RequestRenderingEvent, UnitMessage } from '../../messages/webMessages/unitMessages';\nimport EventBus from '../../helpers/EventBus';\nimport { WebComponent, WebComponentType } from '../../webComponent/WebComponent';\nimport { useListenerToBus } from '../../hooks/listenerToBus';\nimport type { WebViewMessage } from '../../messages/webMessages';\nimport { getCardParams, getCardScript, injectRefreshEventIfNeeded } from './UNCardComponent.utils';\nimport { PresentationMode } from '../../scripts/html/bodyHtml';\nimport type { UNCardData } from '../../sharedTypes';\nimport { CardMessage } from '../../messages/webMessages/cardMessage';\n\nexport interface UNCardComponentProps {\n cardId: string;\n customerToken: string;\n theme?: string;\n onStatusChanged?: (card: UNCardData) => void;\n}\n\nexport const UNCardComponent = (props: UNCardComponentProps) => {\n const [height, setHeight] = useState(0);\n const [requestRefreshEvent, setRequestRefreshEvent] = useState<RequestRefreshEvent | null>(null);\n const windowWidth = Dimensions.get('window').width;\n\n const webRef = useRef<WebView>(null);\n\n const cardStatusChanged = (card: UNCardData) => {\n if (props.onStatusChanged) {\n props.onStatusChanged(card);\n }\n };\n\n const requestRefresh = (data: RequestRefreshEvent) => {\n setRequestRefreshEvent(data);\n };\n\n useListenerToBus([\n { busEventKey: CardMessage.CARD_STATUS_CHANGED, action: cardStatusChanged },\n { busEventKey: UnitMessage.UNIT_REQUEST_REFRESH, action: requestRefresh },\n ]);\n\n useEffect(() => {\n injectRefreshEventIfNeeded(webRef.current, requestRefreshEvent, props.cardId);\n }, [requestRefreshEvent]);\n\n const handleMessage = (message: WebViewMessage) => {\n switch (message.type) {\n case UnitMessage.UNIT_REQUEST_RENDERING:\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_RENDERING, (message.details as RequestRenderingEvent).data);\n break;\n case PageMessage.PAGE_HEIGHT:\n setHeight((message.details as HeightEvent).height);\n break;\n }\n };\n\n return (\n <View style={{ height }}>\n <WebComponent\n ref={webRef}\n type={WebComponentType.card}\n presentationMode={PresentationMode.Default}\n params={getCardParams(props)}\n script={getCardScript()}\n onMessage={message => handleMessage(message)}\n width={windowWidth}\n isScrollable={false}\n />\n </View>\n );\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA;;;;;;;;AASO,MAAMA,eAAe,GAAIC,KAAD,IAAiC;EAC9D,MAAM,CAACC,MAAD,EAASC,SAAT,IAAsB,IAAAC,eAAA,EAAS,CAAT,CAA5B;EACA,MAAM,CAACC,mBAAD,EAAsBC,sBAAtB,IAAgD,IAAAF,eAAA,EAAqC,IAArC,CAAtD;;EACA,MAAMG,WAAW,GAAGC,uBAAA,CAAWC,GAAX,CAAe,QAAf,EAAyBC,KAA7C;;EAEA,MAAMC,MAAM,GAAG,IAAAC,aAAA,EAAgB,IAAhB,CAAf;;EAEA,MAAMC,iBAAiB,GAAIC,IAAD,IAAsB;IAC9C,IAAIb,KAAK,CAACc,eAAV,EAA2B;MACzBd,KAAK,CAACc,eAAN,CAAsBD,IAAtB;IACD;EACF,CAJD;;EAMA,MAAME,cAAc,GAAIC,IAAD,IAA+B;IACpDX,sBAAsB,CAACW,IAAD,CAAtB;EACD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ports.injectRefreshEventIfNeeded = exports.getCardScript = exports.getCardParams = void 0;
7
+
8
+ var _WebComponent = require("../../webComponent/WebComponent");
9
+
10
+ var _unitMessages = require("../../messages/webMessages/unitMessages");
11
+
12
+ var _UnitSdkManager = require("../../unitSdkManager/UnitSdkManager");
13
+
14
+ const getCardParams = props => {
15
+ return `
16
+ card-id="${props.cardId}"
17
+ customer-token="${props.customerToken}"
18
+ theme="${props.theme ?? _UnitSdkManager.UnitSDK.getTheme()}"
19
+ `;
20
+ };
21
+
22
+ exports.getCardParams = getCardParams;
23
+
24
+ const getCardScript = () => {
25
+ return `
26
+ const dispatchRefreshEvent = (details) => {
27
+ const event = new CustomEvent("${_unitMessages.UnitMessage.UNIT_REQUEST_REFRESH}",{ detail: JSON.parse(details) })
28
+ window.dispatchEvent(event)
29
+ }
30
+ `;
31
+ };
32
+
33
+ exports.getCardScript = getCardScript;
34
+
35
+ const injectRefreshEventIfNeeded = (currentWeb, requestRefreshEvent, cardId) => {
36
+ if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(_WebComponent.WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == cardId) {
37
+ currentWeb === null || currentWeb === void 0 ? void 0 : currentWeb.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);
38
+ }
39
+ };
40
+
41
+ exports.injectRefreshEventIfNeeded = injectRefreshEventIfNeeded;
42
+ //# sourceMappingURL=UNCardComponent.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getCardParams","props","cardId","customerToken","theme","UnitSDK","getTheme","getCardScript","UnitMessage","UNIT_REQUEST_REFRESH","injectRefreshEventIfNeeded","currentWeb","requestRefreshEvent","dependencies","includes","WebComponentType","card","valueOf","resourceId","injectJavaScript","JSON","stringify"],"sources":["UNCardComponent.utils.ts"],"sourcesContent":["import type WebView from 'react-native-webview';\nimport type { UNCardComponentProps } from './UNCardComponent';\nimport { WebComponentType } from '../../webComponent/WebComponent';\nimport { RequestRefreshEvent, UnitMessage } from '../../messages/webMessages/unitMessages';\nimport { UnitSDK } from '../../unitSdkManager/UnitSdkManager';\n\nexport const getCardParams = (props: UNCardComponentProps) => {\n return `\n card-id=\"${props.cardId}\"\n customer-token=\"${props.customerToken}\"\n theme=\"${props.theme ?? UnitSDK.getTheme()}\"\n `;\n};\n\nexport const getCardScript = () => {\n return `\n const dispatchRefreshEvent = (details) => {\n const event = new CustomEvent(\"${UnitMessage.UNIT_REQUEST_REFRESH}\",{ detail: JSON.parse(details) })\n window.dispatchEvent(event)\n }\n `;\n};\n\nexport const injectRefreshEventIfNeeded = (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => {\n if (requestRefreshEvent && requestRefreshEvent.dependencies.includes(WebComponentType.card.valueOf()) && requestRefreshEvent.resourceId == cardId) {\n currentWeb?.injectJavaScript(`dispatchRefreshEvent('${JSON.stringify(requestRefreshEvent)}')`);\n }\n};\n"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAEO,MAAMA,aAAa,GAAIC,KAAD,IAAiC;EAC5D,OAAQ;AACV,eAAeA,KAAK,CAACC,MAAO;AAC5B,sBAAsBD,KAAK,CAACE,aAAc;AAC1C,aAAaF,KAAK,CAACG,KAAN,IAAeC,uBAAA,CAAQC,QAAR,EAAmB;AAC/C,GAJE;AAKD,CANM;;;;AAQA,MAAMC,aAAa,GAAG,MAAM;EACjC,OAAQ;AACV;AACA,qCAAqCC,yBAAA,CAAYC,oBAAqB;AACtE;AACA;AACA,GALE;AAMD,CAPM;;;;AASA,MAAMC,0BAA0B,GAAG,CAACC,UAAD,EAA6BC,mBAA7B,EAA8EV,MAA9E,KAAiG;EACzI,IAAIU,mBAAmB,IAAIA,mBAAmB,CAACC,YAApB,CAAiCC,QAAjC,CAA0CC,8BAAA,CAAiBC,IAAjB,CAAsBC,OAAtB,EAA1C,CAAvB,IAAqGL,mBAAmB,CAACM,UAApB,IAAkChB,MAA3I,EAAmJ;IACjJS,UAAU,SAAV,IAAAA,UAAU,WAAV,YAAAA,UAAU,CAAEQ,gBAAZ,CAA8B,yBAAwBC,IAAI,CAACC,SAAL,CAAeT,mBAAf,CAAoC,IAA1F;EACD;AACF,CAJM"}
@@ -4,28 +4,54 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _CardComponent = require("./Card/CardComponent");
7
+ var _UNCardComponent = require("./UNCardComponent/UNCardComponent");
8
8
 
9
- Object.keys(_CardComponent).forEach(function (key) {
9
+ Object.keys(_UNCardComponent).forEach(function (key) {
10
10
  if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _CardComponent[key]) return;
11
+ if (key in exports && exports[key] === _UNCardComponent[key]) return;
12
12
  Object.defineProperty(exports, key, {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _CardComponent[key];
15
+ return _UNCardComponent[key];
16
16
  }
17
17
  });
18
18
  });
19
19
 
20
- var _BottomSheetComponent = require("./BottomSheet/BottomSheetComponent");
20
+ var _UNBottomSheetComponent = require("./UNBottomSheetComponent/UNBottomSheetComponent");
21
21
 
22
- Object.keys(_BottomSheetComponent).forEach(function (key) {
22
+ Object.keys(_UNBottomSheetComponent).forEach(function (key) {
23
23
  if (key === "default" || key === "__esModule") return;
24
- if (key in exports && exports[key] === _BottomSheetComponent[key]) return;
24
+ if (key in exports && exports[key] === _UNBottomSheetComponent[key]) return;
25
25
  Object.defineProperty(exports, key, {
26
26
  enumerable: true,
27
27
  get: function () {
28
- return _BottomSheetComponent[key];
28
+ return _UNBottomSheetComponent[key];
29
+ }
30
+ });
31
+ });
32
+
33
+ var _UNBookPaymentComponent = require("./UNBookPaymentComponent/UNBookPaymentComponent");
34
+
35
+ Object.keys(_UNBookPaymentComponent).forEach(function (key) {
36
+ if (key === "default" || key === "__esModule") return;
37
+ if (key in exports && exports[key] === _UNBookPaymentComponent[key]) return;
38
+ Object.defineProperty(exports, key, {
39
+ enumerable: true,
40
+ get: function () {
41
+ return _UNBookPaymentComponent[key];
42
+ }
43
+ });
44
+ });
45
+
46
+ var _UNActivityComponent = require("./UNActivityComponent/UNActivityComponent");
47
+
48
+ Object.keys(_UNActivityComponent).forEach(function (key) {
49
+ if (key === "default" || key === "__esModule") return;
50
+ if (key in exports && exports[key] === _UNActivityComponent[key]) return;
51
+ Object.defineProperty(exports, key, {
52
+ enumerable: true,
53
+ get: function () {
54
+ return _UNActivityComponent[key];
29
55
  }
30
56
  });
31
57
  });
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './Card/CardComponent'\nexport * from './BottomSheet/BottomSheetComponent'\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from './UNCardComponent/UNCardComponent';\nexport * from './UNBottomSheetComponent/UNBottomSheetComponent';\nexport * from './UNBookPaymentComponent/UNBookPaymentComponent';\nexport * from './UNActivityComponent/UNActivityComponent';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=custom.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["custom.d.ts"],"sourcesContent":["declare module '*.png' {\n import { ImageSourcePropType } from 'react-native';\n const content: ImageSourcePropType;\n export default content;\n}\n"],"mappings":""}
@@ -11,6 +11,12 @@ var _reactNative = require("react-native");
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
+ var _images = require("../../assets/images");
15
+
16
+ var _UNBottomSheetComponent = require("../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants");
17
+
18
+ var _BottomSheet = require("./BottomSheet.styles");
19
+
14
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
21
 
16
22
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -22,6 +28,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
22
28
  const BottomSheet = props => {
23
29
  const panelHeightValue = (0, _react.useRef)(new _reactNative.Animated.Value(props.sliderMaxHeight)).current;
24
30
  const fadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
31
+ const styles = (0, _BottomSheet.getStylesObject)(fadeAnim);
25
32
  const [isPanelOpened, setIsPanelOpened] = (0, _react.useState)(props.isOpen);
26
33
  const [contentHeight, setContentHeight] = (0, _react.useState)(undefined);
27
34
  const [currentHeight, setCurrentHeight] = (0, _react.useState)(props.sliderMaxHeight);
@@ -29,12 +36,16 @@ const BottomSheet = props => {
29
36
 
30
37
  const _parentPanResponder = _reactNative.PanResponder.create({
31
38
  onMoveShouldSetPanResponderCapture: (_, gestureState) => {
32
- return Math.abs(gestureState.dy) > 10;
39
+ return props.shouldEnableBottomSheetScroll && Math.abs(gestureState.dy) > 10;
33
40
  },
34
41
 
35
42
  onPanResponderMove(_, gestureState) {
43
+ if (props.shouldEnableBottomSheetScroll && gestureState.dy < 5) {
44
+ props.handleWebViewScroll();
45
+ }
46
+
36
47
  if (currentHeight + gestureState.dy < 0) return;
37
- if (!props.expandToMaxHeightEnabled && currentHeight + gestureState.dy < sliderMaxHeight - contentHeight) return;
48
+ if (!props.expandToMaxHeightEnabled && contentHeight && currentHeight + gestureState.dy < sliderMaxHeight - contentHeight) return;
38
49
  panelHeightValue.setValue(currentHeight + gestureState.dy);
39
50
  setDy(gestureState.dy);
40
51
  },
@@ -43,7 +54,7 @@ const BottomSheet = props => {
43
54
  if (dy > 0) {
44
55
  collapse();
45
56
  } else if (!props.expandToMaxHeightEnabled) {
46
- setToContentHeight(contentHeight);
57
+ contentHeight && setToContentHeight(contentHeight);
47
58
  } else if (dy < 0) {
48
59
  expand();
49
60
  } else {
@@ -107,7 +118,7 @@ const BottomSheet = props => {
107
118
  animationDuration
108
119
  } = props;
109
120
 
110
- if (currentHeight > sliderMaxHeight - contentHeight) {
121
+ if (contentHeight && currentHeight > sliderMaxHeight - contentHeight) {
111
122
  setToContentHeight(contentHeight);
112
123
  return;
113
124
  }
@@ -121,27 +132,13 @@ const BottomSheet = props => {
121
132
  };
122
133
 
123
134
  const collapse = () => {
124
- if (currentHeight > sliderMaxHeight - contentHeight) {
135
+ if (contentHeight && currentHeight > sliderMaxHeight - contentHeight) {
125
136
  _dismiss();
126
137
 
127
138
  return;
128
139
  }
129
140
 
130
- setToContentHeight(contentHeight); // Animated.timing(panelHeightValue, {
131
- // duration: animationDuration,
132
- // easing: Easing.quad,
133
- // toValue: sliderMaxHeight - contentHeight!,
134
- // useNativeDriver: false,
135
- // }).start(() => {
136
- // const isPanelOpenedNewValue = !isPanelOpened
137
- // setIsPanelOpened(isPanelOpenedNewValue)
138
- // if (isPanelOpenedNewValue) {
139
- // // onOpen();
140
- // } else {
141
- // // onClose();
142
- // Keyboard.dismiss();
143
- // }
144
- // });
141
+ contentHeight && setToContentHeight(contentHeight);
145
142
  };
146
143
 
147
144
  const _onBackPress = () => {
@@ -150,8 +147,7 @@ const BottomSheet = props => {
150
147
  };
151
148
 
152
149
  const _setSize = e => {
153
- let newContentHeight = e.nativeEvent.layout.height;
154
- if (newContentHeight !== 0) newContentHeight += 42;
150
+ const newContentHeight = e.nativeEvent.layout.height;
155
151
  setContentHeight(newContentHeight);
156
152
  setToContentHeight(newContentHeight);
157
153
  };
@@ -166,7 +162,9 @@ const BottomSheet = props => {
166
162
  easing: _reactNative.Easing.quad,
167
163
  toValue: sliderMaxHeight,
168
164
  useNativeDriver: false
169
- }).start(() => {});
165
+ }).start(() => {
166
+ null;
167
+ });
170
168
 
171
169
  fadeOut();
172
170
  };
@@ -176,21 +174,11 @@ const BottomSheet = props => {
176
174
  children
177
175
  } = props;
178
176
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
179
- style: {
180
- position: 'absolute',
181
- top: 0,
182
- bottom: 0,
183
- right: 0,
184
- left: 0
185
- },
177
+ style: styles.outsideContainer,
186
178
  activeOpacity: 1,
187
179
  onPress: _dismiss
188
180
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
189
- style: {
190
- backgroundColor: 'black',
191
- flex: 1,
192
- opacity: fadeAnim
193
- }
181
+ style: styles.animation
194
182
  })), /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, _extends({}, _parentPanResponder.panHandlers, {
195
183
  style: { ...styles.container,
196
184
  height: sliderMaxHeight,
@@ -201,15 +189,20 @@ const BottomSheet = props => {
201
189
  }), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
202
190
  style: styles.outerContent
203
191
  }, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
204
- activeOpacity: 1
205
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
206
- style: styles.lineContainer
207
- }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
208
- style: styles.line
209
- }))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
210
- onLayout: _setSize,
211
- style: [styles.innerContent]
212
- }, children))));
192
+ activeOpacity: 1,
193
+ style: styles.closeButton,
194
+ onPress: _dismiss
195
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.Image, {
196
+ source: _images.CloseIcon
197
+ })), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
198
+ onLayout: _setSize
199
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.KeyboardAvoidingView, {
200
+ behavior: "padding",
201
+ style: {
202
+ height: props.height
203
+ },
204
+ keyboardVerticalOffset: props.height * (1 - _UNBottomSheetComponent.BOTTOM_SHEET_MAX_PRECANTAGE_SIZE)
205
+ }, children)))));
213
206
  };
214
207
 
215
208
  BottomSheet.propTypes = {
@@ -225,50 +218,12 @@ BottomSheet.propTypes = {
225
218
  BottomSheet.defaultProps = {
226
219
  children: /*#__PURE__*/_react.default.createElement(_reactNative.View, null),
227
220
  isOpen: true,
228
- sliderMaxHeight: _reactNative.Dimensions.get('window').height * 0.95,
221
+ sliderMaxHeight: _reactNative.Dimensions.get('window').height * _UNBottomSheetComponent.BOTTOM_SHEET_MAX_PRECANTAGE_SIZE,
229
222
  animationDuration: 200,
230
223
  onOpen: () => null,
231
224
  onClose: () => null,
232
225
  expandToMaxHeightEnabled: false
233
226
  };
234
-
235
- const styles = _reactNative.StyleSheet.create({
236
- container: {
237
- flex: 1,
238
- marginTop: 60,
239
- paddingHorizontal: 12,
240
- shadowColor: '#000000',
241
- shadowOffset: {
242
- width: 0,
243
- height: 6
244
- },
245
- shadowOpacity: 0.37,
246
- shadowRadius: 7.49,
247
- elevation: 12,
248
- borderTopLeftRadius: 15,
249
- borderTopRightRadius: 15,
250
- backgroundColor: '#ffffff'
251
- },
252
- lineContainer: {
253
- borderTopLeftRadius: 30,
254
- borderTopRightRadius: 30,
255
- alignItems: 'center'
256
- },
257
- line: {
258
- width: 35,
259
- height: 4,
260
- borderRadius: 2,
261
- marginTop: 18,
262
- backgroundColor: '#D5DDE0'
263
- },
264
- outerContent: {
265
- flex: -1
266
- },
267
- innerContent: {
268
- flex: -1
269
- }
270
- });
271
-
272
227
  var _default = BottomSheet;
273
228
  exports.default = _default;
274
229
  //# sourceMappingURL=BottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BottomSheet","props","panelHeightValue","useRef","Animated","Value","sliderMaxHeight","current","fadeAnim","styles","getStylesObject","isPanelOpened","setIsPanelOpened","useState","isOpen","contentHeight","setContentHeight","undefined","currentHeight","setCurrentHeight","dy","setDy","_parentPanResponder","PanResponder","create","onMoveShouldSetPanResponderCapture","_","gestureState","shouldEnableBottomSheetScroll","Math","abs","onPanResponderMove","handleWebViewScroll","expandToMaxHeightEnabled","setValue","onPanResponderRelease","collapse","setToContentHeight","expand","useEffect","fadeIn","_dismiss","BackHandler","addEventListener","_onBackPress","id","addListener","e","value","removeEventListener","removeListener","timing","toValue","duration","useNativeDriver","start","fadeOut","onClose","animationDuration","easing","Easing","quad","_setSize","newContentHeight","nativeEvent","layout","height","children","outsideContainer","animation","panHandlers","container","transform","translateY","outerContent","closeButton","CloseIcon","BOTTOM_SHEET_MAX_PRECANTAGE_SIZE","propTypes","PropTypes","oneOfType","node","bool","number","func","onOpen","defaultProps","Dimensions","get"],"sources":["BottomSheet.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport {\n Animated,\n BackHandler,\n Dimensions,\n Easing,\n Image,\n KeyboardAvoidingView,\n LayoutChangeEvent,\n PanResponder,\n TouchableOpacity,\n View,\n} from 'react-native';\nimport PropTypes from 'prop-types';\nimport { CloseIcon } from '../../assets/images';\nimport { BOTTOM_SHEET_MAX_PRECANTAGE_SIZE } from '../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants';\nimport { getStylesObject } from './BottomSheet.styles';\n\nexport interface BottomSheetProps {\n isOpen: boolean\n children: ReactNode\n sliderMaxHeight: number\n onOpen: () => void\n onClose: () => void\n height: number,\n animationDuration: number,\n expandToMaxHeightEnabled: boolean\n handleWebViewScroll: () => void\n shouldEnableBottomSheetScroll: boolean\n}\n\nconst BottomSheet = (props: BottomSheetProps) => {\n const panelHeightValue = useRef(new Animated.Value(props.sliderMaxHeight)).current;\n const fadeAnim = useRef(new Animated.Value(0)).current;\n const styles = getStylesObject(fadeAnim);\n const [isPanelOpened, setIsPanelOpened] = useState(props.isOpen);\n const [contentHeight, setContentHeight] = useState<number | undefined>(undefined);\n\n const [currentHeight, setCurrentHeight] = useState<number>(props.sliderMaxHeight);\n\n const [dy, setDy] = useState(0);\n\n const _parentPanResponder = PanResponder.create({\n onMoveShouldSetPanResponderCapture: (_, gestureState) => {\n return props.shouldEnableBottomSheetScroll && Math.abs(gestureState.dy) > 10;\n },\n onPanResponderMove(_, gestureState) {\n if (props.shouldEnableBottomSheetScroll && gestureState.dy < 5) {\n props.handleWebViewScroll();\n }\n if (currentHeight + gestureState.dy < 0) return;\n if (!props.expandToMaxHeightEnabled && contentHeight && currentHeight + gestureState.dy < sliderMaxHeight - contentHeight) return;\n panelHeightValue.setValue(currentHeight + gestureState.dy);\n setDy(gestureState.dy);\n },\n onPanResponderRelease: () => {\n if (dy > 0) {\n collapse();\n } else if (!props.expandToMaxHeightEnabled) {\n contentHeight && setToContentHeight(contentHeight);\n } else if (dy < 0) {\n expand();\n } else {\n expand();\n }\n }\n });\n\n useEffect(() => {\n if (props.isOpen && !isPanelOpened) {\n fadeIn();\n } else if (isPanelOpened) {\n setContentHeight(0);\n _dismiss();\n }\n }, [props.isOpen]);\n\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', _onBackPress);\n const id = panelHeightValue.addListener(e => setCurrentHeight(e.value));\n\n return (() => {\n BackHandler.removeEventListener('hardwareBackPress', _onBackPress);\n panelHeightValue.removeListener(id);\n });\n }, []);\n\n const fadeIn = () => {\n Animated.timing(fadeAnim, {\n toValue: 0.3,\n duration: 500,\n useNativeDriver: false\n }).start(() => { setIsPanelOpened(true); });\n };\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration: 500,\n useNativeDriver: false\n }).start(() => {\n setIsPanelOpened(false);\n props.onClose();\n });\n };\n\n const setToContentHeight = (contentHeight: number) => {\n Animated.timing(panelHeightValue, {\n duration: props.animationDuration,\n easing: Easing.quad,\n toValue: sliderMaxHeight - contentHeight,\n useNativeDriver: false,\n }).start();\n };\n\n const expand = () => {\n const { animationDuration } = props;\n\n if (contentHeight && currentHeight > (sliderMaxHeight - contentHeight)) {\n setToContentHeight(contentHeight);\n return;\n }\n\n Animated.timing(panelHeightValue, {\n duration: animationDuration,\n easing: Easing.quad,\n toValue: 0,\n useNativeDriver: false,\n }).start();\n };\n\n const collapse = () => {\n if (contentHeight && currentHeight > (sliderMaxHeight - contentHeight)) {\n _dismiss();\n return;\n }\n\n contentHeight && setToContentHeight(contentHeight);\n };\n\n const _onBackPress = () => {\n isPanelOpened && collapse();\n return isPanelOpened;\n };\n\n const _setSize = (e: LayoutChangeEvent) => {\n const newContentHeight = e.nativeEvent.layout.height;\n\n setContentHeight(newContentHeight);\n setToContentHeight(newContentHeight);\n };\n\n const _dismiss = () => {\n const { animationDuration } = props;\n Animated.timing(panelHeightValue, {\n duration: animationDuration,\n easing: Easing.quad,\n toValue: sliderMaxHeight,\n useNativeDriver: false,\n }).start(() => {\n null;\n });\n fadeOut();\n };\n\n const {\n sliderMaxHeight,\n children,\n } = props;\n\n return (\n <>\n <TouchableOpacity\n style={styles.outsideContainer} activeOpacity={1}\n onPress={_dismiss}\n >\n <Animated.View\n style={styles.animation}\n >\n </Animated.View>\n </TouchableOpacity>\n <Animated.View\n {..._parentPanResponder.panHandlers}\n style={{\n ...styles.container,\n height: sliderMaxHeight,\n transform: [\n { translateY: panelHeightValue },\n ],\n }}\n >\n <View\n style={styles.outerContent}\n >\n <TouchableOpacity\n activeOpacity={1}\n style={styles.closeButton}\n onPress={_dismiss}\n >\n <Image source={CloseIcon} />\n </TouchableOpacity>\n\n <View\n onLayout={_setSize}\n >\n <KeyboardAvoidingView\n behavior=\"padding\"\n style={{ height: props.height }}\n keyboardVerticalOffset={props.height * (1 - BOTTOM_SHEET_MAX_PRECANTAGE_SIZE)}\n >\n {children}\n </KeyboardAvoidingView>\n </View>\n </View>\n </Animated.View>\n </>\n );\n};\n\nBottomSheet.propTypes = {\n children: PropTypes.oneOfType([PropTypes.node]),\n isOpen: PropTypes.bool,\n sliderMaxHeight: PropTypes.number,\n animation: PropTypes.func,\n animationDuration: PropTypes.number,\n onOpen: PropTypes.func,\n onClose: PropTypes.func,\n expandToMaxHeightEnabled: PropTypes.bool\n};\n\nBottomSheet.defaultProps = {\n children: <View />,\n isOpen: true,\n sliderMaxHeight: Dimensions.get('window').height * BOTTOM_SHEET_MAX_PRECANTAGE_SIZE,\n animationDuration: 200,\n onOpen: () => null,\n onClose: () => null,\n expandToMaxHeightEnabled: false\n};\n\nexport default BottomSheet;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAYA;;AACA;;AACA;;AACA;;;;;;;;;;AAeA,MAAMA,WAAW,GAAIC,KAAD,IAA6B;EAC/C,MAAMC,gBAAgB,GAAG,IAAAC,aAAA,EAAO,IAAIC,qBAAA,CAASC,KAAb,CAAmBJ,KAAK,CAACK,eAAzB,CAAP,EAAkDC,OAA3E;EACA,MAAMC,QAAQ,GAAG,IAAAL,aAAA,EAAO,IAAIC,qBAAA,CAASC,KAAb,CAAmB,CAAnB,CAAP,EAA8BE,OAA/C;EACA,MAAME,MAAM,GAAG,IAAAC,4BAAA,EAAgBF,QAAhB,CAAf;EACA,MAAM,CAACG,aAAD,EAAgBC,gBAAhB,IAAoC,IAAAC,eAAA,EAASZ,KAAK,CAACa,MAAf,CAA1C;EACA,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoC,IAAAH,eAAA,EAA6BI,SAA7B,CAA1C;EAEA,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoC,IAAAN,eAAA,EAAiBZ,KAAK,CAACK,eAAvB,CAA1C;EAEA,MAAM,CAACc,EAAD,EAAKC,KAAL,IAAc,IAAAR,eAAA,EAAS,CAAT,CAApB;;EAEA,MAAMS,mBAAmB,GAAGC,yBAAA,CAAaC,MAAb,CAAoB;IAC9CC,kCAAkC,EAAE,CAACC,CAAD,EAAIC,YAAJ,KAAqB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