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.
- package/README.md +157 -2
- package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +27 -0
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsEvent.kt +21 -0
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +2 -1
- package/android/src/main/java/com/unitreactnativecomponents/visapresentation/UNGooglePayView.kt +197 -0
- package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
- package/android/src/main/res/drawable/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_background.xml +6 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_content.xml +48 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background.xml +6 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/drawable/un_black_googlepay_button_overlay.xml +12 -0
- package/android/src/main/res/drawable/un_border.xml +6 -0
- package/android/src/main/res/drawable/un_condensed_googlepay.xml +27 -0
- package/android/src/main/res/drawable/un_googlepay_button_background.xml +18 -0
- package/android/src/main/res/drawable/un_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_background_image_focused.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_background_image_pressed.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_content.xml +48 -0
- package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background.xml +18 -0
- package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_focused.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
- package/android/src/main/res/drawable/un_googlepay_button_overlay.xml +11 -0
- package/android/src/main/res/drawable/un_ic_launcher_foreground.xml +30 -0
- package/android/src/main/res/drawable/un_ic_unit_logo.xml +25 -0
- package/android/src/main/res/drawable/un_ic_visa.xml +13 -0
- package/android/src/main/res/drawable-bg/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-bg/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ca/un_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-ca/un_black_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-cs/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-cs/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-da/un_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-da/un_black_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-de/un_add_to_googlepay_button_content.xml +60 -0
- package/android/src/main/res/drawable-de/un_black_add_to_googlepay_button_content.xml +60 -0
- package/android/src/main/res/drawable-el/un_add_to_googlepay_button_content.xml +67 -0
- package/android/src/main/res/drawable-el/un_black_add_to_googlepay_button_content.xml +67 -0
- package/android/src/main/res/drawable-es/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-es/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-et/un_add_to_googlepay_button_content.xml +64 -0
- package/android/src/main/res/drawable-et/un_black_add_to_googlepay_button_content.xml +64 -0
- package/android/src/main/res/drawable-fi/un_add_to_googlepay_button_content.xml +39 -0
- package/android/src/main/res/drawable-fi/un_black_add_to_googlepay_button_content.xml +39 -0
- package/android/src/main/res/drawable-fr/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-fr/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-hr/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-hr/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-hu/un_add_to_googlepay_button_content.xml +64 -0
- package/android/src/main/res/drawable-hu/un_black_add_to_googlepay_button_content.xml +64 -0
- package/android/src/main/res/drawable-in/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-in/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-it/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-it/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-iw/un_add_to_googlepay_button_content.xml +41 -0
- package/android/src/main/res/drawable-iw/un_black_add_to_googlepay_button_content.xml +41 -0
- package/android/src/main/res/drawable-ja/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ja/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ko/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ko/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-lt/un_add_to_googlepay_button_content.xml +70 -0
- package/android/src/main/res/drawable-lt/un_black_add_to_googlepay_button_content.xml +70 -0
- package/android/src/main/res/drawable-lv/un_add_to_googlepay_button_content.xml +61 -0
- package/android/src/main/res/drawable-lv/un_black_add_to_googlepay_button_content.xml +61 -0
- package/android/src/main/res/drawable-ms/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ms/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-nb/un_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-nb/un_black_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-nl/un_add_to_googlepay_button_content.xml +58 -0
- package/android/src/main/res/drawable-nl/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-pl/un_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-pl/un_black_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-pt/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-pt/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ro/un_add_to_googlepay_button_content.xml +58 -0
- package/android/src/main/res/drawable-ro/un_black_add_to_googlepay_button_content.xml +58 -0
- package/android/src/main/res/drawable-ru/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-ru/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sk/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sk/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sl/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sl/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sr/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sr/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-sv/un_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-sv/un_black_add_to_googlepay_button_content.xml +30 -0
- package/android/src/main/res/drawable-th/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-th/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-tr/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-tr/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-uk/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-uk/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-v21/un_black_googlepay_button_background.xml +7 -0
- package/android/src/main/res/drawable-v21/un_black_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background.xml +7 -0
- package/android/src/main/res/drawable-v21/un_black_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/drawable-v24/ic_launcher_background.xml +170 -0
- package/android/src/main/res/drawable-v24/un_border.xml +6 -0
- package/android/src/main/res/drawable-v24/un_ic_launcher_foreground.xml +30 -0
- package/android/src/main/res/drawable-v24/un_ic_unit_logo.xml +25 -0
- package/android/src/main/res/drawable-v24/un_ic_visa.xml +13 -0
- package/android/src/main/res/drawable-zh/un_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/drawable-zh/un_black_add_to_googlepay_button_content.xml +54 -0
- package/android/src/main/res/layout/un_black_add_to_googlepay_button.xml +32 -0
- package/android/src/main/res/layout/un_view_google_push_provisioning.xml +45 -0
- package/android/src/main/res/layout/un_white_add_to_googlepay_button.xml +31 -0
- package/android/src/main/res/layout/un_white_add_to_googlepay_button_no_shadow.xml +31 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +5 -0
- package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +5 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/googlepay_button_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xhdpi/white_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/black_googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_focused.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/googlepay_button_no_shadow_background_image_pressed.9.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
- package/android/src/main/res/values/colors.xml +14 -0
- package/android/src/main/res/values/googlepay_strings.xml +7 -0
- package/android/src/main/res/values/strings.xml +4 -0
- package/android/src/main/res/values/themes.xml +16 -0
- package/android/src/main/res/values-night/themes.xml +16 -0
- package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +8 -8
- package/ios/UnitReactNativeComponentsViewManager.m +3 -2
- package/ios/UnitReactNativeComponentsViewManager.swift +39 -25
- package/lib/commonjs/assets/images/close.png +0 -0
- package/lib/commonjs/assets/images/index.js +16 -0
- package/lib/commonjs/assets/images/index.js.map +1 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +28 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js +20 -0
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +39 -0
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +40 -0
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +9 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js +195 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js +23 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +49 -0
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -0
- package/lib/commonjs/components/{Card/CardComponent.js → UNCardComponent/UNCardComponent.js} +42 -46
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +42 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -0
- package/lib/commonjs/components/index.js +34 -8
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/custom.d.js +2 -0
- package/lib/commonjs/custom.d.js.map +1 -0
- package/lib/commonjs/helpers/{BottomSheet.js → BottomSheet/BottomSheet.js} +38 -83
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js +82 -0
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.styles.js.map +1 -0
- package/lib/commonjs/helpers/EventBus.js +5 -13
- package/lib/commonjs/helpers/EventBus.js.map +1 -1
- package/lib/commonjs/hooks/listenerToBus.js +31 -0
- package/lib/commonjs/hooks/listenerToBus.js.map +1 -0
- package/lib/commonjs/hooks/useAppStateListener.js +34 -0
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -0
- package/lib/commonjs/index.js +33 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/messages/nativeMessages/index.js +13 -0
- package/lib/commonjs/messages/nativeMessages/index.js.map +1 -0
- package/lib/commonjs/messages/webMessages/bookPaymentMessage.js +13 -0
- package/lib/commonjs/messages/webMessages/bookPaymentMessage.js.map +1 -0
- package/lib/commonjs/{webComponent → messages}/webMessages/cardMessage.js +1 -1
- package/lib/commonjs/messages/webMessages/cardMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/index.js +6 -0
- package/lib/commonjs/messages/webMessages/index.js.map +1 -0
- package/lib/commonjs/{webComponent → messages}/webMessages/pageMessage.js +0 -0
- package/lib/commonjs/messages/webMessages/pageMessage.js.map +1 -0
- package/lib/commonjs/{webComponent → messages}/webMessages/unitMessages.js +0 -0
- package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -0
- package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js +13 -0
- package/lib/commonjs/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
- package/lib/commonjs/scripts/html/bodyHtml.js +52 -0
- package/lib/commonjs/scripts/html/bodyHtml.js.map +1 -0
- package/lib/commonjs/scripts/html/bodyScript.js +78 -0
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -0
- package/lib/commonjs/sharedTypes/bookPayment.types.js +6 -0
- package/lib/commonjs/sharedTypes/bookPayment.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/card.types.js +6 -0
- package/lib/commonjs/sharedTypes/card.types.js.map +1 -0
- package/lib/commonjs/sharedTypes/index.js +32 -0
- package/lib/commonjs/sharedTypes/index.js.map +1 -0
- package/lib/commonjs/sharedTypes/types.js +2 -0
- package/lib/commonjs/sharedTypes/types.js.map +1 -0
- package/lib/commonjs/styles/variables.js +17 -0
- package/lib/commonjs/styles/variables.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js +54 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.api.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +51 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +47 -15
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +22 -45
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/assets/images/close.png +0 -0
- package/lib/module/assets/images/index.js +2 -0
- package/lib/module/assets/images/index.js.map +1 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +13 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js +10 -0
- package/lib/module/components/UNActivityComponent/UNActivityComponent.utils.js.map +1 -0
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +23 -0
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -0
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js +26 -0
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js +2 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js +163 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js +13 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.js.map +1 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js +29 -0
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.js.map +1 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.js +65 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +24 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -0
- package/lib/module/components/index.js +4 -2
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/custom.d.js +2 -0
- package/lib/module/custom.d.js.map +1 -0
- package/lib/module/helpers/{BottomSheet.js → BottomSheet/BottomSheet.js} +36 -82
- package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -0
- package/lib/module/helpers/BottomSheet/BottomSheet.styles.js +70 -0
- package/lib/module/helpers/BottomSheet/BottomSheet.styles.js.map +1 -0
- package/lib/module/helpers/EventBus.js +4 -11
- package/lib/module/helpers/EventBus.js.map +1 -1
- package/lib/module/hooks/listenerToBus.js +18 -0
- package/lib/module/hooks/listenerToBus.js.map +1 -0
- package/lib/module/hooks/useAppStateListener.js +23 -0
- package/lib/module/hooks/useAppStateListener.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/messages/nativeMessages/index.js +6 -0
- package/lib/module/messages/nativeMessages/index.js.map +1 -0
- package/lib/module/messages/webMessages/bookPaymentMessage.js +6 -0
- package/lib/module/messages/webMessages/bookPaymentMessage.js.map +1 -0
- package/lib/module/messages/webMessages/cardMessage.js +6 -0
- package/lib/module/messages/webMessages/cardMessage.js.map +1 -0
- package/lib/module/messages/webMessages/index.js +2 -0
- package/lib/module/messages/webMessages/index.js.map +1 -0
- package/lib/module/{webComponent → messages}/webMessages/pageMessage.js +0 -0
- package/lib/module/messages/webMessages/pageMessage.js.map +1 -0
- package/lib/module/{webComponent → messages}/webMessages/unitMessages.js +0 -0
- package/lib/module/messages/webMessages/unitMessages.js.map +1 -0
- package/lib/module/nativeComponent/UNNativeAddToWalletButton.js +4 -0
- package/lib/module/nativeComponent/UNNativeAddToWalletButton.js.map +1 -0
- package/lib/module/scripts/html/bodyHtml.js +42 -0
- package/lib/module/scripts/html/bodyHtml.js.map +1 -0
- package/lib/module/scripts/html/bodyScript.js +64 -0
- package/lib/module/scripts/html/bodyScript.js.map +1 -0
- package/lib/module/sharedTypes/bookPayment.types.js +2 -0
- package/lib/module/sharedTypes/bookPayment.types.js.map +1 -0
- package/lib/module/sharedTypes/card.types.js +2 -0
- package/lib/module/sharedTypes/card.types.js.map +1 -0
- package/lib/module/sharedTypes/index.js +3 -0
- package/lib/module/sharedTypes/index.js.map +1 -0
- package/lib/module/sharedTypes/types.js +2 -0
- package/lib/module/sharedTypes/types.js.map +1 -0
- package/lib/module/styles/variables.js +10 -0
- package/lib/module/styles/variables.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdk.api.js +37 -0
- package/lib/module/unitSdkManager/UnitSdk.api.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdkManager.js +38 -0
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +46 -14
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/html.js +18 -44
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/assets/images/index.d.ts +1 -0
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.d.ts +6 -0
- package/lib/typescript/components/UNActivityComponent/UNActivityComponent.utils.d.ts +2 -0
- package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +11 -0
- package/lib/typescript/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.d.ts +3 -0
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts +1 -0
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts +7 -0
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.d.ts +9 -0
- package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.d.ts +5 -0
- package/lib/typescript/components/{Card/CardComponent.d.ts → UNCardComponent/UNCardComponent.d.ts} +3 -1
- package/lib/typescript/components/UNCardComponent/UNCardComponent.utils.d.ts +6 -0
- package/lib/typescript/components/index.d.ts +4 -2
- package/lib/typescript/helpers/{BottomSheet.d.ts → BottomSheet/BottomSheet.d.ts} +3 -0
- package/lib/typescript/helpers/BottomSheet/BottomSheet.styles.d.ts +63 -0
- package/lib/typescript/helpers/EventBus.d.ts +5 -7
- package/lib/typescript/hooks/listenerToBus.d.ts +7 -0
- package/lib/typescript/hooks/useAppStateListener.d.ts +1 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/messages/nativeMessages/index.d.ts +3 -0
- package/lib/typescript/messages/webMessages/bookPaymentMessage.d.ts +8 -0
- package/lib/typescript/{webComponent → messages}/webMessages/cardMessage.d.ts +3 -2
- package/lib/typescript/messages/webMessages/index.d.ts +11 -0
- package/lib/typescript/{webComponent → messages}/webMessages/pageMessage.d.ts +0 -0
- package/lib/typescript/{webComponent → messages}/webMessages/unitMessages.d.ts +0 -0
- package/lib/typescript/nativeComponent/UNNativeAddToWalletButton.d.ts +6 -0
- package/lib/typescript/scripts/html/bodyHtml.d.ts +7 -0
- package/lib/typescript/scripts/html/bodyScript.d.ts +11 -0
- package/lib/typescript/sharedTypes/bookPayment.types.d.ts +26 -0
- package/lib/typescript/sharedTypes/card.types.d.ts +56 -0
- package/lib/typescript/sharedTypes/index.d.ts +2 -0
- package/lib/typescript/sharedTypes/types.d.ts +27 -0
- package/lib/typescript/styles/variables.d.ts +9 -0
- package/lib/typescript/unitSdkManager/UnitSdk.api.d.ts +3 -0
- package/lib/typescript/unitSdkManager/UnitSdkManager.d.ts +15 -0
- package/lib/typescript/webComponent/WebComponent.d.ts +9 -11
- package/lib/typescript/webComponent/html.d.ts +6 -1
- package/package.json +9 -5
- package/{unit-react-native-components.podspec → react-native-unit-components.podspec} +1 -1
- package/src/assets/images/close.png +0 -0
- package/src/assets/images/index.ts +1 -0
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +21 -0
- package/src/components/UNActivityComponent/UNActivityComponent.utils.ts +11 -0
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +37 -0
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.utils.ts +29 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.ts +1 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.styles.ts +13 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +167 -0
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.utils.ts +34 -0
- package/src/components/UNCardComponent/UNCardComponent.tsx +73 -0
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +28 -0
- package/src/components/index.ts +4 -2
- package/src/custom.d.ts +5 -0
- package/src/helpers/BottomSheet/BottomSheet.styles.ts +70 -0
- package/src/helpers/{BottomSheet.tsx → BottomSheet/BottomSheet.tsx} +74 -110
- package/src/helpers/EventBus.ts +13 -13
- package/src/hooks/listenerToBus.ts +23 -0
- package/src/hooks/useAppStateListener.ts +25 -0
- package/src/index.tsx +5 -1
- package/src/messages/nativeMessages/index.ts +3 -0
- package/src/messages/webMessages/bookPaymentMessage.ts +12 -0
- package/src/{webComponent → messages}/webMessages/cardMessage.ts +4 -2
- package/src/messages/webMessages/index.ts +21 -0
- package/src/{webComponent → messages}/webMessages/pageMessage.ts +1 -1
- package/src/{webComponent → messages}/webMessages/unitMessages.ts +1 -0
- package/src/nativeComponent/UNNativeAddToWalletButton.tsx +12 -0
- package/src/scripts/html/bodyHtml.ts +46 -0
- package/src/scripts/html/bodyScript.ts +67 -0
- package/src/sharedTypes/bookPayment.types.ts +27 -0
- package/src/sharedTypes/card.types.ts +59 -0
- package/src/sharedTypes/index.ts +2 -0
- package/src/sharedTypes/types.ts +35 -0
- package/src/styles/variables.ts +9 -0
- package/src/unitSdkManager/UnitSdk.api.ts +31 -0
- package/src/unitSdkManager/UnitSdkManager.ts +33 -0
- package/src/webComponent/WebComponent.tsx +55 -45
- package/src/webComponent/html.ts +22 -46
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsViewManager.kt +0 -19
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js +0 -143
- package/lib/commonjs/components/BottomSheet/BottomSheetComponent.js.map +0 -1
- package/lib/commonjs/components/Card/CardComponent.js.map +0 -1
- package/lib/commonjs/helpers/BottomSheet.js.map +0 -1
- package/lib/commonjs/nativeComponenet/NativeComponentExample.js +0 -19
- package/lib/commonjs/nativeComponenet/NativeComponentExample.js.map +0 -1
- package/lib/commonjs/webComponent/webMessages/cardMessage.js.map +0 -1
- package/lib/commonjs/webComponent/webMessages/pageMessage.js.map +0 -1
- package/lib/commonjs/webComponent/webMessages/unitMessages.js.map +0 -1
- package/lib/module/components/BottomSheet/BottomSheetComponent.js +0 -118
- package/lib/module/components/BottomSheet/BottomSheetComponent.js.map +0 -1
- package/lib/module/components/Card/CardComponent.js +0 -75
- package/lib/module/components/Card/CardComponent.js.map +0 -1
- package/lib/module/helpers/BottomSheet.js.map +0 -1
- package/lib/module/nativeComponenet/NativeComponentExample.js +0 -10
- package/lib/module/nativeComponenet/NativeComponentExample.js.map +0 -1
- package/lib/module/webComponent/webMessages/cardMessage.js +0 -6
- package/lib/module/webComponent/webMessages/cardMessage.js.map +0 -1
- package/lib/module/webComponent/webMessages/pageMessage.js.map +0 -1
- package/lib/module/webComponent/webMessages/unitMessages.js.map +0 -1
- package/lib/typescript/components/BottomSheet/BottomSheetComponent.d.ts +0 -1
- package/lib/typescript/nativeComponenet/NativeComponentExample.d.ts +0 -7
- package/src/components/BottomSheet/BottomSheetComponent.tsx +0 -113
- package/src/components/Card/CardComponent.tsx +0 -75
- package/src/nativeComponenet/NativeComponentExample.tsx +0 -26
|
@@ -1,44 +1,76 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1
2
|
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import { Dimensions } from 'react-native';
|
|
3
3
|
import { WebView } from 'react-native-webview';
|
|
4
|
-
import EventBus
|
|
5
|
-
import html from './html';
|
|
6
|
-
import { UnitMessage } from '
|
|
4
|
+
import EventBus from '../helpers/EventBus';
|
|
5
|
+
import html, { HTML_PLACEHOLDER } from './html';
|
|
6
|
+
import { UnitMessage } from '../messages/webMessages/unitMessages';
|
|
7
|
+
import { useListenerToBus } from '../hooks/listenerToBus';
|
|
8
|
+
import { getHtmlBody } from '../scripts/html/bodyHtml';
|
|
9
|
+
import { fetchUnitScript, globalUnitScript } from '../unitSdkManager/UnitSdk.api';
|
|
10
|
+
import { NativeMessage } from '../messages/nativeMessages';
|
|
7
11
|
export let WebComponentType;
|
|
8
12
|
|
|
9
13
|
(function (WebComponentType) {
|
|
10
14
|
WebComponentType["card"] = "unit-elements-card";
|
|
15
|
+
WebComponentType["bookPayment"] = "unit-elements-book-payment";
|
|
16
|
+
WebComponentType["activity"] = "unit-elements-activity";
|
|
11
17
|
WebComponentType["slot"] = "unit-elements-sdk-slot";
|
|
12
18
|
})(WebComponentType || (WebComponentType = {}));
|
|
13
19
|
|
|
14
|
-
export const WebComponent = /*#__PURE__*/React.forwardRef((props, webRef)
|
|
20
|
+
export const WebComponent = /*#__PURE__*/React.forwardRef(function WebComponent(props, webRef) {
|
|
21
|
+
const [unitScript, setUnitScript] = useState(globalUnitScript);
|
|
15
22
|
const [sourceHtml, setSourceHtml] = useState(null);
|
|
16
|
-
const
|
|
23
|
+
const width = props.width ?? '100%';
|
|
24
|
+
|
|
25
|
+
const listenerAction = data => {
|
|
26
|
+
setUnitScript(data.unitScript);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
useListenerToBus([{
|
|
30
|
+
busEventKey: NativeMessage.IS_SCRIPT_FETCHED,
|
|
31
|
+
action: listenerAction
|
|
32
|
+
}]);
|
|
17
33
|
useEffect(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
if (!unitScript) {
|
|
35
|
+
fetchUnitScript();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let newHtml = html.replace(HTML_PLACEHOLDER.BODY, getHtmlBody(props.type.valueOf(), props.params, props.presentationMode));
|
|
40
|
+
newHtml = newHtml.replace(HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE, props.script || '');
|
|
21
41
|
setSourceHtml(newHtml);
|
|
22
|
-
}, [props.params]);
|
|
42
|
+
}, [props.params, unitScript]);
|
|
23
43
|
|
|
24
44
|
const onMessage = e => {
|
|
25
45
|
const message = JSON.parse(e.nativeEvent.data);
|
|
26
46
|
|
|
27
47
|
if (message.type == UnitMessage.UNIT_REQUEST_REFRESH && message.details) {
|
|
28
|
-
EventBus.Instance.event(
|
|
48
|
+
EventBus.Instance.event(UnitMessage.UNIT_REQUEST_REFRESH, message.details);
|
|
29
49
|
} else {
|
|
30
|
-
props.onMessage(message);
|
|
50
|
+
props.onMessage && props.onMessage(message);
|
|
31
51
|
}
|
|
32
52
|
};
|
|
33
53
|
|
|
34
54
|
if (!sourceHtml) return null;
|
|
55
|
+
|
|
56
|
+
const _onScroll = event => {
|
|
57
|
+
if (props.handleScroll) {
|
|
58
|
+
props.handleScroll(event);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return null;
|
|
62
|
+
};
|
|
63
|
+
|
|
35
64
|
return /*#__PURE__*/React.createElement(WebView, {
|
|
36
65
|
ref: webRef,
|
|
37
66
|
cacheEnabled: false,
|
|
38
|
-
scrollEnabled:
|
|
67
|
+
scrollEnabled: props.isScrollable,
|
|
68
|
+
onScroll: _onScroll,
|
|
39
69
|
overScrollMode: "never",
|
|
70
|
+
injectedJavaScript: unitScript,
|
|
40
71
|
style: {
|
|
41
|
-
width:
|
|
72
|
+
width: width,
|
|
73
|
+
flex: 1
|
|
42
74
|
},
|
|
43
75
|
source: {
|
|
44
76
|
html: sourceHtml
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","WebView","EventBus","html","HTML_PLACEHOLDER","UnitMessage","useListenerToBus","getHtmlBody","fetchUnitScript","globalUnitScript","NativeMessage","WebComponentType","WebComponent","forwardRef","props","webRef","unitScript","setUnitScript","sourceHtml","setSourceHtml","width","listenerAction","data","busEventKey","IS_SCRIPT_FETCHED","action","newHtml","replace","BODY","type","valueOf","params","presentationMode","SCRIPT_FROM_NATIVE","script","onMessage","e","message","JSON","parse","nativeEvent","UNIT_REQUEST_REFRESH","details","Instance","event","_onScroll","handleScroll","isScrollable","flex"],"sources":["WebComponent.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useState } from 'react';\nimport { WebView, WebViewMessageEvent } from 'react-native-webview';\nimport EventBus from '../helpers/EventBus';\nimport html, { HTML_PLACEHOLDER } from './html';\nimport { RequestRefreshEvent, UnitMessage } from '../messages/webMessages/unitMessages';\nimport { useListenerToBus } from '../hooks/listenerToBus';\nimport { getHtmlBody, PresentationMode } from '../scripts/html/bodyHtml';\nimport { fetchUnitScript, globalUnitScript } from '../unitSdkManager/UnitSdk.api';\nimport { NativeMessage } from '../messages/nativeMessages';\nimport type { WebViewMessage } from '../messages/webMessages';\n\nexport interface WebComponentProps {\n type: WebComponentType;\n presentationMode?: PresentationMode,\n params?: string;\n onMessage?: (message: WebViewMessage) => void;\n script?: string;\n isScrollable?: boolean,\n handleScroll?: (event: any) => void,\n width?: number;\n}\n\nexport enum WebComponentType {\n card = 'unit-elements-card',\n bookPayment = 'unit-elements-book-payment',\n activity = 'unit-elements-activity',\n slot = 'unit-elements-sdk-slot'\n}\n\nexport const WebComponent = React.forwardRef<WebView, WebComponentProps>(function WebComponent(props, webRef) {\n const [unitScript, setUnitScript] = useState<string | undefined>(globalUnitScript);\n const [sourceHtml, setSourceHtml] = useState<string | null>(null);\n const width = props.width ?? '100%';\n\n const listenerAction = (data: { unitScript?: string }) => {\n setUnitScript(data.unitScript);\n };\n\n useListenerToBus([{ busEventKey: NativeMessage.IS_SCRIPT_FETCHED, action: listenerAction }]);\n\n useEffect(() => {\n if (!unitScript) {\n fetchUnitScript();\n return;\n }\n\n let newHtml = html.replace(HTML_PLACEHOLDER.BODY, getHtmlBody(props.type.valueOf(), props.params, props.presentationMode));\n newHtml = newHtml.replace(HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE, props.script || '');\n setSourceHtml(newHtml);\n\n }, [props.params, unitScript]);\n\n const onMessage = (e: WebViewMessageEvent) => {\n const message = JSON.parse(e.nativeEvent.data) as WebViewMessage;\n if (message.type == UnitMessage.UNIT_REQUEST_REFRESH && message.details) {\n EventBus.Instance.event(UnitMessage.UNIT_REQUEST_REFRESH, message.details as RequestRefreshEvent);\n } else {\n props.onMessage && props.onMessage(message);\n }\n };\n\n if (!sourceHtml) return null;\n\n const _onScroll = (event: any) => {\n if (props.handleScroll) {\n props.handleScroll(event);\n }\n\n return null;\n };\n\n return (\n <WebView\n ref={webRef}\n cacheEnabled={false}\n scrollEnabled={props.isScrollable}\n onScroll={_onScroll}\n overScrollMode=\"never\"\n injectedJavaScript={unitScript}\n style={{ width: width, flex: 1 }}\n source={{ html: sourceHtml }}\n onMessage={onMessage} />\n );\n});\n"],"mappings":"AAAA;AACA,OAAOA,KAAP,IAAgBC,SAAhB,EAA2BC,QAA3B,QAA2C,OAA3C;AACA,SAASC,OAAT,QAA6C,sBAA7C;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,IAAP,IAAeC,gBAAf,QAAuC,QAAvC;AACA,SAA8BC,WAA9B,QAAiD,sCAAjD;AACA,SAASC,gBAAT,QAAiC,wBAAjC;AACA,SAASC,WAAT,QAA8C,0BAA9C;AACA,SAASC,eAAT,EAA0BC,gBAA1B,QAAkD,+BAAlD;AACA,SAASC,aAAT,QAA8B,4BAA9B;AAcA,WAAYC,gBAAZ;;WAAYA,gB;EAAAA,gB;EAAAA,gB;EAAAA,gB;EAAAA,gB;GAAAA,gB,KAAAA,gB;;AAOZ,OAAO,MAAMC,YAAY,gBAAGd,KAAK,CAACe,UAAN,CAA6C,SAASD,YAAT,CAAsBE,KAAtB,EAA6BC,MAA7B,EAAqC;EAC5G,MAAM,CAACC,UAAD,EAAaC,aAAb,IAA8BjB,QAAQ,CAAqBS,gBAArB,CAA5C;EACA,MAAM,CAACS,UAAD,EAAaC,aAAb,IAA8BnB,QAAQ,CAAgB,IAAhB,CAA5C;EACA,MAAMoB,KAAK,GAAGN,KAAK,CAACM,KAAN,IAAe,MAA7B;;EAEA,MAAMC,cAAc,GAAIC,IAAD,IAAmC;IACxDL,aAAa,CAACK,IAAI,CAACN,UAAN,CAAb;EACD,CAFD;;EAIAV,gBAAgB,CAAC,CAAC;IAAEiB,WAAW,EAAEb,aAAa,CAACc,iBAA7B;IAAgDC,MAAM,EAAEJ;EAAxD,CAAD,CAAD,CAAhB;EAEAtB,SAAS,CAAC,MAAM;IACd,IAAI,CAACiB,UAAL,EAAiB;MACfR,eAAe;MACf;IACD;;IAED,IAAIkB,OAAO,GAAGvB,IAAI,CAACwB,OAAL,CAAavB,gBAAgB,CAACwB,IAA9B,EAAoCrB,WAAW,CAACO,KAAK,CAACe,IAAN,CAAWC,OAAX,EAAD,EAAuBhB,KAAK,CAACiB,MAA7B,EAAqCjB,KAAK,CAACkB,gBAA3C,CAA/C,CAAd;IACAN,OAAO,GAAGA,OAAO,CAACC,OAAR,CAAgBvB,gBAAgB,CAAC6B,kBAAjC,EAAqDnB,KAAK,CAACoB,MAAN,IAAgB,EAArE,CAAV;IACAf,aAAa,CAACO,OAAD,CAAb;EAED,CAVQ,EAUN,CAACZ,KAAK,CAACiB,MAAP,EAAef,UAAf,CAVM,CAAT;;EAYA,MAAMmB,SAAS,GAAIC,CAAD,IAA4B;IAC5C,MAAMC,OAAO,GAAGC,IAAI,CAACC,KAAL,CAAWH,CAAC,CAACI,WAAF,CAAclB,IAAzB,CAAhB;;IACA,IAAIe,OAAO,CAACR,IAAR,IAAgBxB,WAAW,CAACoC,oBAA5B,IAAoDJ,OAAO,CAACK,OAAhE,EAAyE;MACvExC,QAAQ,CAACyC,QAAT,CAAkBC,KAAlB,CAAwBvC,WAAW,CAACoC,oBAApC,EAA0DJ,OAAO,CAACK,OAAlE;IACD,CAFD,MAEO;MACL5B,KAAK,CAACqB,SAAN,IAAmBrB,KAAK,CAACqB,SAAN,CAAgBE,OAAhB,CAAnB;IACD;EACF,CAPD;;EASA,IAAI,CAACnB,UAAL,EAAiB,OAAO,IAAP;;EAEjB,MAAM2B,SAAS,GAAID,KAAD,IAAgB;IAChC,IAAI9B,KAAK,CAACgC,YAAV,EAAwB;MACtBhC,KAAK,CAACgC,YAAN,CAAmBF,KAAnB;IACD;;IAED,OAAO,IAAP;EACD,CAND;;EAQA,oBACE,oBAAC,OAAD;IACE,GAAG,EAAE7B,MADP;IAEE,YAAY,EAAE,KAFhB;IAGE,aAAa,EAAED,KAAK,CAACiC,YAHvB;IAIE,QAAQ,EAAEF,SAJZ;IAKE,cAAc,EAAC,OALjB;IAME,kBAAkB,EAAE7B,UANtB;IAOE,KAAK,EAAE;MAAEI,KAAK,EAAEA,KAAT;MAAgB4B,IAAI,EAAE;IAAtB,CAPT;IAQE,MAAM,EAAE;MAAE7C,IAAI,EAAEe;IAAR,CARV;IASE,SAAS,EAAEiB;EATb,EADF;AAYD,CAtD2B,CAArB"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { DISPTACH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT } from '../scripts/html/bodyScript';
|
|
2
|
+
export const HTML_PLACEHOLDER = {
|
|
3
|
+
SCRIPT_UNIT: '<SCRIPT_UNIT>',
|
|
4
|
+
BODY: '<BODY_HTML_CODE>',
|
|
5
|
+
SCRIPT_FROM_NATIVE: '<SCRIPT_FROM_NATIVE>'
|
|
6
|
+
};
|
|
1
7
|
const htmlText = `
|
|
2
8
|
<!DOCTYPE html>
|
|
3
9
|
<html lang="en">
|
|
@@ -7,64 +13,32 @@ const htmlText = `
|
|
|
7
13
|
<script>
|
|
8
14
|
window.UnitMobileSDK = true
|
|
9
15
|
</script>
|
|
10
|
-
<script src="https://unit-white-labeled-banking.netlify.app/client-events.js"></script>
|
|
11
16
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
|
|
12
17
|
</html>
|
|
13
18
|
|
|
14
|
-
<body style="margin: 0">
|
|
15
|
-
|
|
19
|
+
<body style="margin: 0;">
|
|
20
|
+
${HTML_PLACEHOLDER.BODY}
|
|
16
21
|
|
|
17
22
|
<script>
|
|
18
|
-
|
|
19
|
-
if ('ReactNativeWebView' in window) {
|
|
20
|
-
const messageString = JSON.stringify(message)
|
|
21
|
-
window['ReactNativeWebView'].postMessage(messageString)
|
|
22
|
-
}
|
|
23
|
-
}
|
|
23
|
+
${POST_MESSAGE_TO_SDK}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
setTimeout(() => {
|
|
27
|
-
const height = window.document.documentElement.getBoundingClientRect().height + 36
|
|
28
|
-
postMessageToSDK({ type: "pageHeight", details: { height } })
|
|
29
|
-
})
|
|
30
|
-
}
|
|
25
|
+
${POST_PAGE_HEIGHT}
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
postMessageToSDK({ type: "pageLoaded" })
|
|
34
|
-
});
|
|
27
|
+
${LISTENERS.isPageLoaded}
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
postMessageToSDK({ type: "unitRequestRendering", details: { data: JSON.stringify(e.detail) }})
|
|
38
|
-
});
|
|
29
|
+
${LISTENERS.onLoad}
|
|
39
30
|
|
|
40
|
-
|
|
41
|
-
postHeight()
|
|
42
|
-
postMessageToSDK({ type: "unitOnLoad" })
|
|
43
|
-
});
|
|
31
|
+
${LISTENERS.requestRendering}
|
|
44
32
|
|
|
45
|
-
|
|
46
|
-
postMessageToSDK({ type: "unitRequestCloseFlow" })
|
|
47
|
-
});
|
|
33
|
+
${LISTENERS.requestOpenLink}
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
postMessageToSDK({ type: "unitRequestOpenLink", details: e.detail })
|
|
51
|
-
});
|
|
35
|
+
${LISTENERS.requestCloseFlow}
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
const response = e.detail
|
|
55
|
-
response.then((data) => {
|
|
56
|
-
postMessageToSDK({ type: "cardStatusChanged", details: { card: JSON.stringify(data.data) }})
|
|
57
|
-
}).catch((e) => {
|
|
58
|
-
console.log(e)
|
|
59
|
-
})
|
|
60
|
-
});
|
|
37
|
+
${LISTENERS.cardStatusChange}
|
|
61
38
|
|
|
62
|
-
|
|
63
|
-
const event = new CustomEvent("unitRequestRendering",{ detail: JSON.parse(details) })
|
|
64
|
-
window.dispatchEvent(event)
|
|
65
|
-
}
|
|
39
|
+
${DISPTACH_RENDERING_EVENT}
|
|
66
40
|
|
|
67
|
-
|
|
41
|
+
${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}
|
|
68
42
|
</script>
|
|
69
43
|
</body>
|
|
70
44
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["htmlText"],"sources":["html.ts"],"sourcesContent":["const htmlText = `\n <!DOCTYPE html>\n <html lang=\"en\">\n\n <head lang=\"en\">\n <title>Unit Web SDK Demo</title>\n <script>\n window.UnitMobileSDK = true\n </script>\n <
|
|
1
|
+
{"version":3,"names":["DISPTACH_RENDERING_EVENT","LISTENERS","POST_MESSAGE_TO_SDK","POST_PAGE_HEIGHT","HTML_PLACEHOLDER","SCRIPT_UNIT","BODY","SCRIPT_FROM_NATIVE","htmlText","isPageLoaded","onLoad","requestRendering","requestOpenLink","requestCloseFlow","cardStatusChange"],"sources":["html.ts"],"sourcesContent":["import { DISPTACH_RENDERING_EVENT, LISTENERS, POST_MESSAGE_TO_SDK, POST_PAGE_HEIGHT } from '../scripts/html/bodyScript';\n\nexport const HTML_PLACEHOLDER = {\n SCRIPT_UNIT: '<SCRIPT_UNIT>',\n BODY: '<BODY_HTML_CODE>',\n SCRIPT_FROM_NATIVE: '<SCRIPT_FROM_NATIVE>'\n};\n\nconst htmlText = `\n <!DOCTYPE html>\n <html lang=\"en\">\n\n <head lang=\"en\">\n <title>Unit Web SDK Demo</title>\n <script>\n window.UnitMobileSDK = true\n </script>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=0\">\n </html>\n\n <body style=\"margin: 0;\">\n ${HTML_PLACEHOLDER.BODY}\n\n <script>\n ${POST_MESSAGE_TO_SDK}\n\n ${POST_PAGE_HEIGHT}\n\n ${LISTENERS.isPageLoaded}\n\n ${LISTENERS.onLoad}\n\n ${LISTENERS.requestRendering}\n\n ${LISTENERS.requestOpenLink}\n\n ${LISTENERS.requestCloseFlow}\n\n ${LISTENERS.cardStatusChange}\n\n ${DISPTACH_RENDERING_EVENT}\n\n ${HTML_PLACEHOLDER.SCRIPT_FROM_NATIVE}\n </script>\n </body>\n`;\n\nexport default htmlText;\n"],"mappings":"AAAA,SAASA,wBAAT,EAAmCC,SAAnC,EAA8CC,mBAA9C,EAAmEC,gBAAnE,QAA2F,4BAA3F;AAEA,OAAO,MAAMC,gBAAgB,GAAG;EAC9BC,WAAW,EAAE,eADiB;EAE9BC,IAAI,EAAE,kBAFwB;EAG9BC,kBAAkB,EAAE;AAHU,CAAzB;AAMP,MAAMC,QAAQ,GAAI;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMJ,gBAAgB,CAACE,IAAK;AAC5B;AACA;AACA,QAAQJ,mBAAoB;AAC5B;AACA,QAAQC,gBAAiB;AACzB;AACA,QAAQF,SAAS,CAACQ,YAAa;AAC/B;AACA,QAAQR,SAAS,CAACS,MAAO;AACzB;AACA,QAAQT,SAAS,CAACU,gBAAiB;AACnC;AACA,QAAQV,SAAS,CAACW,eAAgB;AAClC;AACA,QAAQX,SAAS,CAACY,gBAAiB;AACnC;AACA,QAAQZ,SAAS,CAACa,gBAAiB;AACnC;AACA,QAAQd,wBAAyB;AACjC;AACA,QAAQI,gBAAgB,CAACG,kBAAmB;AAC5C;AACA;AACA,CArCA;AAuCA,eAAeC,QAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CloseIcon } from './close.png';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UNBookPaymentData } from '../../sharedTypes';
|
|
2
|
+
export interface UNBookPaymentComponentProps {
|
|
3
|
+
accountId: string;
|
|
4
|
+
customerToken: string;
|
|
5
|
+
isSameCustomer: boolean;
|
|
6
|
+
counterPartyAccountId: string;
|
|
7
|
+
counterPartyName: string;
|
|
8
|
+
theme?: string;
|
|
9
|
+
onPaymentCreated?: (data: UNBookPaymentData) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const UNBookPaymentComponent: (props: UNBookPaymentComponentProps) => JSX.Element;
|
package/lib/typescript/components/UNBottomSheetComponent/UNBottomSheetComponent.constants.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BOTTOM_SHEET_MAX_PRECANTAGE_SIZE = 0.9;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type WebView from 'react-native-webview';
|
|
2
|
+
export declare const getBottomSheetScript: () => string;
|
|
3
|
+
export declare const renderingBottomSheetRequest: (currentWebView: WebView, renderingRequest: string) => void;
|
|
4
|
+
export declare const resetHtml: (currentWebView: WebView) => void;
|
|
5
|
+
export declare const handleHtmlFullHeight: (currentWebView: WebView | null, windowHeight: number) => number;
|
package/lib/typescript/components/{Card/CardComponent.d.ts → UNCardComponent/UNCardComponent.d.ts}
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { UNCardData } from '../../sharedTypes';
|
|
1
2
|
export interface UNCardComponentProps {
|
|
2
3
|
cardId: string;
|
|
3
4
|
customerToken: string;
|
|
4
|
-
|
|
5
|
+
theme?: string;
|
|
6
|
+
onStatusChanged?: (card: UNCardData) => void;
|
|
5
7
|
}
|
|
6
8
|
export declare const UNCardComponent: (props: UNCardComponentProps) => JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type WebView from 'react-native-webview';
|
|
2
|
+
import type { UNCardComponentProps } from './UNCardComponent';
|
|
3
|
+
import { RequestRefreshEvent } from '../../messages/webMessages/unitMessages';
|
|
4
|
+
export declare const getCardParams: (props: UNCardComponentProps) => string;
|
|
5
|
+
export declare const getCardScript: () => string;
|
|
6
|
+
export declare const injectRefreshEventIfNeeded: (currentWeb: WebView | null, requestRefreshEvent: RequestRefreshEvent | null, cardId: string) => void;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './UNCardComponent/UNCardComponent';
|
|
2
|
+
export * from './UNBottomSheetComponent/UNBottomSheetComponent';
|
|
3
|
+
export * from './UNBookPaymentComponent/UNBookPaymentComponent';
|
|
4
|
+
export * from './UNActivityComponent/UNActivityComponent';
|
|
@@ -6,8 +6,11 @@ export interface BottomSheetProps {
|
|
|
6
6
|
sliderMaxHeight: number;
|
|
7
7
|
onOpen: () => void;
|
|
8
8
|
onClose: () => void;
|
|
9
|
+
height: number;
|
|
9
10
|
animationDuration: number;
|
|
10
11
|
expandToMaxHeightEnabled: boolean;
|
|
12
|
+
handleWebViewScroll: () => void;
|
|
13
|
+
shouldEnableBottomSheetScroll: boolean;
|
|
11
14
|
}
|
|
12
15
|
declare const BottomSheet: {
|
|
13
16
|
(props: BottomSheetProps): JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare const getStylesObject: (fadeAnim: any) => {
|
|
2
|
+
outsideContainer: {
|
|
3
|
+
position: "absolute";
|
|
4
|
+
top: number;
|
|
5
|
+
bottom: number;
|
|
6
|
+
right: number;
|
|
7
|
+
left: number;
|
|
8
|
+
};
|
|
9
|
+
animation: {
|
|
10
|
+
backgroundColor: string;
|
|
11
|
+
flex: number;
|
|
12
|
+
opacity: any;
|
|
13
|
+
};
|
|
14
|
+
container: {
|
|
15
|
+
position: "relative";
|
|
16
|
+
flex: number;
|
|
17
|
+
marginTop: number;
|
|
18
|
+
shadowColor: string;
|
|
19
|
+
shadowOffset: {
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
shadowOpacity: number;
|
|
24
|
+
shadowRadius: number;
|
|
25
|
+
elevation: number;
|
|
26
|
+
borderTopLeftRadius: number;
|
|
27
|
+
borderTopRightRadius: number;
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
overflow: "hidden";
|
|
30
|
+
};
|
|
31
|
+
lineContainer: {
|
|
32
|
+
borderTopLeftRadius: number;
|
|
33
|
+
borderTopRightRadius: number;
|
|
34
|
+
alignItems: "center";
|
|
35
|
+
};
|
|
36
|
+
line: {
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
borderRadius: number;
|
|
40
|
+
marginTop: number;
|
|
41
|
+
backgroundColor: string;
|
|
42
|
+
};
|
|
43
|
+
outerContent: {
|
|
44
|
+
flex: number;
|
|
45
|
+
};
|
|
46
|
+
innerContent: {
|
|
47
|
+
flex: number;
|
|
48
|
+
};
|
|
49
|
+
closeButton: {
|
|
50
|
+
position: "absolute";
|
|
51
|
+
display: "flex";
|
|
52
|
+
alignItems: "center";
|
|
53
|
+
justifyContent: "center";
|
|
54
|
+
width: number;
|
|
55
|
+
height: number;
|
|
56
|
+
backgroundColor: string;
|
|
57
|
+
borderRadius: number;
|
|
58
|
+
padding: number;
|
|
59
|
+
top: number;
|
|
60
|
+
right: number;
|
|
61
|
+
zIndex: number;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
REQUEST_REFRESH = "requestRefresh"
|
|
5
|
-
}
|
|
1
|
+
import type { NativeMessage } from '../messages/nativeMessages';
|
|
2
|
+
import type { WebViewMessageType } from '../messages/webMessages';
|
|
3
|
+
export declare type BusEventKey = NativeMessage | WebViewMessageType;
|
|
6
4
|
export default class EventBus {
|
|
7
5
|
private static _instance;
|
|
8
6
|
private eventListeners;
|
|
9
7
|
private constructor();
|
|
10
8
|
static get Instance(): EventBus;
|
|
11
|
-
event(event:
|
|
12
|
-
addListener(event:
|
|
9
|
+
event(event: BusEventKey, data: any): void;
|
|
10
|
+
addListener(event: BusEventKey, listener: (data: any) => void): void;
|
|
13
11
|
removeListener(listener: (data: any) => void): void;
|
|
14
12
|
private _remove;
|
|
15
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useAppStateListener: () => boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { UNBookPaymentData } from '../../sharedTypes';
|
|
2
|
+
export declare enum BookPaymentMessage {
|
|
3
|
+
PAYMENT_CREATED = "unitPaymentCreated"
|
|
4
|
+
}
|
|
5
|
+
export interface PaymentCreatedEvent {
|
|
6
|
+
data: UNBookPaymentData;
|
|
7
|
+
}
|
|
8
|
+
export declare type BookPaymentEvent = PaymentCreatedEvent;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { UNCardData } from '../../sharedTypes';
|
|
1
2
|
export declare enum CardMessage {
|
|
2
|
-
|
|
3
|
+
CARD_STATUS_CHANGED = "unitCardStatusChanged"
|
|
3
4
|
}
|
|
4
5
|
export interface CardStatusChangedEvent {
|
|
5
|
-
card:
|
|
6
|
+
card: UNCardData;
|
|
6
7
|
}
|
|
7
8
|
export declare type CardEvent = CardStatusChangedEvent;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BookPaymentEvent, BookPaymentMessage } from './bookPaymentMessage';
|
|
2
|
+
import type { CardEvent, CardMessage } from './cardMessage';
|
|
3
|
+
import type { PageEvent, PageMessage } from './pageMessage';
|
|
4
|
+
import type { UnitEvent, UnitMessage } from './unitMessages';
|
|
5
|
+
export declare type WebViewMessageType = PageMessage | CardMessage | UnitMessage | BookPaymentMessage;
|
|
6
|
+
declare type WebViewEvent = PageEvent | UnitEvent | CardEvent | BookPaymentEvent;
|
|
7
|
+
export interface WebViewMessage {
|
|
8
|
+
type: WebViewMessageType;
|
|
9
|
+
details?: WebViewEvent;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const webViewId = "webViewContainer";
|
|
2
|
+
export declare enum PresentationMode {
|
|
3
|
+
CoverInjectedHeight = "coverInjectedHeight",
|
|
4
|
+
Inherit = "inherit",
|
|
5
|
+
Default = "deafult"
|
|
6
|
+
}
|
|
7
|
+
export declare const getHtmlBody: (unitComponent: string, unitComponentProps?: string, presentationMode?: PresentationMode) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const POST_MESSAGE_TO_SDK = "\n const postMessageToSDK = (message) => {\n if ('ReactNativeWebView' in window) {\n const messageString = JSON.stringify(message)\n window['ReactNativeWebView'].postMessage(messageString)\n }\n }\n";
|
|
2
|
+
export declare const POST_PAGE_HEIGHT: string;
|
|
3
|
+
export declare const LISTENERS: {
|
|
4
|
+
isPageLoaded: string;
|
|
5
|
+
requestRendering: string;
|
|
6
|
+
onLoad: string;
|
|
7
|
+
requestCloseFlow: string;
|
|
8
|
+
requestOpenLink: string;
|
|
9
|
+
cardStatusChange: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const DISPTACH_RENDERING_EVENT: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Tags, Relationship } from "./types";
|
|
2
|
+
declare type BookPaymentStatus = "Sent" | "Rejected";
|
|
3
|
+
export declare type UNBookPaymentData = {
|
|
4
|
+
type: "bookPayment";
|
|
5
|
+
id: string;
|
|
6
|
+
attributes: {
|
|
7
|
+
createdAt: string | Date;
|
|
8
|
+
status: BookPaymentStatus;
|
|
9
|
+
reason: string;
|
|
10
|
+
direction: 'Debit' | 'Credit';
|
|
11
|
+
description: string;
|
|
12
|
+
transactionSummaryOverride?: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
tags: Tags;
|
|
15
|
+
};
|
|
16
|
+
relationships: {
|
|
17
|
+
account: Relationship;
|
|
18
|
+
customer?: Relationship;
|
|
19
|
+
customers?: Relationship;
|
|
20
|
+
counterpartyAccount: Relationship;
|
|
21
|
+
counterpartyCustomer: Relationship;
|
|
22
|
+
transaction: Relationship;
|
|
23
|
+
recurringPayment: Relationship;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Address, FullName, Limits, Relationship, Tags } from "./types";
|
|
2
|
+
export declare type UNCardData = IndividualDebitCard | BusinessDebitCard;
|
|
3
|
+
declare type CardStatus = "Active" | "Inactive" | "Stolen" | "Lost" | "Frozen" | "ClosedByCustomer" | "SuspectedFraud";
|
|
4
|
+
declare type IndividualDebitCard = {
|
|
5
|
+
id: string;
|
|
6
|
+
type: "individualDebitCard" | "individualVirtualDebitCard";
|
|
7
|
+
attributes: {
|
|
8
|
+
createdAt: string;
|
|
9
|
+
last4Digits: string;
|
|
10
|
+
expirationDate: string;
|
|
11
|
+
status: CardStatus;
|
|
12
|
+
shippingAddress?: Address;
|
|
13
|
+
updatedAt?: string;
|
|
14
|
+
design?: string;
|
|
15
|
+
additionalEmbossedText?: string;
|
|
16
|
+
idempotencyKey?: string;
|
|
17
|
+
tags?: Tags;
|
|
18
|
+
limits?: Limits;
|
|
19
|
+
printOnlyBusinessName?: boolean;
|
|
20
|
+
};
|
|
21
|
+
relationships: {
|
|
22
|
+
account: Relationship;
|
|
23
|
+
customer: Relationship;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare type BusinessDebitCard = {
|
|
27
|
+
id: string;
|
|
28
|
+
type: "businessDebitCard" | "businessVirtualDebitCard";
|
|
29
|
+
attributes: {
|
|
30
|
+
fullName: FullName;
|
|
31
|
+
dateOfBirth: string;
|
|
32
|
+
address: Address;
|
|
33
|
+
shippingAddress?: Address;
|
|
34
|
+
phone: string;
|
|
35
|
+
email: string;
|
|
36
|
+
createdAt: string;
|
|
37
|
+
last4Digits: string;
|
|
38
|
+
expirationDate: string;
|
|
39
|
+
status: CardStatus;
|
|
40
|
+
updatedAt?: string;
|
|
41
|
+
ssn?: string;
|
|
42
|
+
passport?: string;
|
|
43
|
+
nationality?: string;
|
|
44
|
+
design?: string;
|
|
45
|
+
additionalEmbossedText?: string;
|
|
46
|
+
idempotencyKey?: string;
|
|
47
|
+
tags?: Record<string, string>;
|
|
48
|
+
limits?: Limits;
|
|
49
|
+
printOnlyBusinessName?: boolean;
|
|
50
|
+
};
|
|
51
|
+
relationships: {
|
|
52
|
+
account: Relationship;
|
|
53
|
+
customer: Relationship;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare type Address = {
|
|
2
|
+
street: string;
|
|
3
|
+
street2?: string;
|
|
4
|
+
city: string;
|
|
5
|
+
state: string;
|
|
6
|
+
postalCode: string;
|
|
7
|
+
country: string;
|
|
8
|
+
};
|
|
9
|
+
export declare type Limits = {
|
|
10
|
+
dailyWithdrawal?: string | number;
|
|
11
|
+
dailyPurchase?: string | number;
|
|
12
|
+
monthlyWithdrawal?: string | number;
|
|
13
|
+
monthlyPurchase?: string | number;
|
|
14
|
+
};
|
|
15
|
+
declare type Data = {
|
|
16
|
+
type: string;
|
|
17
|
+
id: string;
|
|
18
|
+
};
|
|
19
|
+
export declare type Relationship = {
|
|
20
|
+
data: null | [] | Data | Data[];
|
|
21
|
+
};
|
|
22
|
+
export declare type FullName = {
|
|
23
|
+
first: string;
|
|
24
|
+
last: string;
|
|
25
|
+
};
|
|
26
|
+
export declare type Tags = Record<string, string>;
|
|
27
|
+
export {};
|