@os1-platform/dispatch-mobile 3.2.0 → 3.2.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/android/.gradle/8.13/checksums/checksums.lock +0 -0
- package/android/.gradle/8.13/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.13/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.13/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/{8.10.2 → 8.13}/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/8.13/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
- package/android/.idea/caches/deviceStreaming.xml +193 -12
- package/android/build.gradle +13 -5
- package/android/gradle.properties +3 -3
- package/android/src/main/AndroidManifest.xml +2 -1
- package/android/src/main/java/com/dispatchsdk/location/LocationModule.kt +3 -3
- package/android/src/main/java/com/dispatchsdk/sync/SyncEventService.kt +2 -3
- package/android/src/main/java/com/dispatchsdk/utils/DispatchSdkUtils.kt +2 -1
- package/dispatch-mobile.podspec +1 -1
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +1 -2
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -1
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js +1 -2
- package/lib/commonjs/components/dispatch/DispatchExecNavigator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +4 -5
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +1 -2
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/CollectPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/PaymentUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/components/CompletePayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/components/InitPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js +1 -2
- package/lib/commonjs/components/executiontasks/collectPayment/components/PaymentContactDetails.js.map +1 -1
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js +4 -5
- package/lib/commonjs/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +1 -2
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +1 -2
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +1 -2
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +2 -3
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +1 -2
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +1 -2
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/DropdownWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +4 -5
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js +1 -2
- package/lib/commonjs/components/executiontasks/forms/widgets/TimeRangeSelector.js.map +1 -1
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js +1 -2
- package/lib/commonjs/components/executiontasks/httpRequest/HttpRequestET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +1 -2
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +1 -2
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +1 -2
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +1 -2
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +1 -2
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +1 -2
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +4 -5
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js +1 -2
- package/lib/commonjs/components/executiontasks/scan/sub_components/CScanner.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js +1 -2
- package/lib/commonjs/components/executiontasks/scan/sub_components/ERDropDown.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +6 -6
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/utils.js +1 -2
- package/lib/commonjs/components/executiontasks/scan/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/components/ContactListView.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/components/ContactListView.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/components/OTPView.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js +8 -11
- package/lib/commonjs/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js +1 -2
- package/lib/commonjs/components/executiontasks/validateOTP/utils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js +1 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/GeofenceUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js +1 -2
- package/lib/commonjs/components/executiontasks/verifyLocation/VerifyLocationET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +2 -3
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/AlertDisplay.js +1 -2
- package/lib/commonjs/components/widgets/AlertDisplay.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +1 -2
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +2 -2
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +4 -3
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +12 -12
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +2 -3
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +1 -2
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/components/widgets/Timer.js +1 -2
- package/lib/commonjs/components/widgets/Timer.js.map +1 -1
- package/lib/commonjs/index.js +1 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js +1 -2
- package/lib/commonjs/manager/dispatch/DispatchStateContainer.js.map +1 -1
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js +1 -2
- package/lib/commonjs/manager/dispatchCodes/ReasonCodeContainer.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +1 -2
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/AppSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/database.js +1 -2
- package/lib/commonjs/manager/syncmanager/database.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +1 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/events/ETEventsManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js +1 -2
- package/lib/commonjs/manager/syncmanager/events/EventsSyncManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js +1 -2
- package/lib/commonjs/manager/syncmanager/events/SyncHttpClient.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +1 -2
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/CancellationScreen.js +1 -2
- package/lib/commonjs/ui/screens/CancellationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CaptureInputScreen.js +1 -2
- package/lib/commonjs/ui/screens/CaptureInputScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js +1 -2
- package/lib/commonjs/ui/screens/CollectPaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js +1 -2
- package/lib/commonjs/ui/screens/CompleteObjectiveScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +1 -2
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DisplayScreen.js +1 -2
- package/lib/commonjs/ui/screens/DisplayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +1 -2
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +1 -2
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +1 -2
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +1 -2
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +1 -2
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +1 -2
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +1 -2
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ScanScreen.js +1 -2
- package/lib/commonjs/ui/screens/ScanScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js +1 -2
- package/lib/commonjs/ui/screens/StartWorkFlowScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +1 -2
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js +1 -2
- package/lib/commonjs/ui/screens/WithBaseDispatchScreen.js.map +1 -1
- package/lib/commonjs/utils/SdkUtils.js +1 -2
- package/lib/commonjs/utils/SdkUtils.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +1 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/fcm/FCM.js +1 -2
- package/lib/commonjs/utils/fcm/FCM.js.map +1 -1
- package/lib/commonjs/utils/fcm/FcmUtils.js +1 -2
- package/lib/commonjs/utils/fcm/FcmUtils.js.map +1 -1
- package/lib/commonjs/utils/hooks/useModal.js +1 -2
- package/lib/commonjs/utils/hooks/useModal.js.map +1 -1
- package/lib/commonjs/utils/storage.js +1 -2
- package/lib/commonjs/utils/storage.js.map +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js +1 -1
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js +3 -3
- package/lib/module/components/executiontasks/collectPayment/components/ProcessPayment.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +2 -2
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +2 -2
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +3 -3
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js +7 -9
- package/lib/module/components/executiontasks/validateOTP/components/VerificationComplete.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/Card.js +1 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +2 -1
- package/lib/module/components/widgets/SearchBar.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +6 -6
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +1 -1
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/typescript/src/components/executiontasks/httpRequest/HttpEtUtils.d.ts +1 -1
- package/lib/typescript/src/network/GraphQLClient.d.ts +5 -5
- package/lib/typescript/src/network/NetworkClient.d.ts +3 -3
- package/lib/typescript/src/network/client.d.ts +1 -1
- package/lib/typescript/src/resources/Login.d.ts +7 -7
- package/lib/typescript/src/resources/network.d.ts +1 -1
- package/lib/typescript/src/utils/ApiUtils.d.ts +2 -2
- package/package.json +80 -75
- package/src/components/executiontasks/cancellation/CancelET.tsx +1 -1
- package/src/components/executiontasks/collectPayment/components/ProcessPayment.tsx +3 -3
- package/src/components/executiontasks/doodle/SignatureET.tsx +1 -1
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +2 -2
- package/src/components/executiontasks/scan/ScanET.tsx +2 -2
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +3 -3
- package/src/components/executiontasks/validateOTP/components/VerificationComplete.tsx +7 -7
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +1 -1
- package/src/components/widgets/Card.tsx +1 -1
- package/src/components/widgets/SearchBar.tsx +2 -1
- package/src/components/widgets/SnackBarCustom.tsx +6 -6
- package/src/components/widgets/SplitTextInput.tsx +1 -1
- package/android/.gradle/8.10.2/checksums/checksums.lock +0 -0
- package/android/.gradle/8.10.2/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.10.2/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.10.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.10.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.10.2/gc.properties +0 -0
- /package/android/.gradle/{8.10.2 → 8.13}/fileChanges/last-build.bin +0 -0
- /package/android/.gradle/{8.10.2 → 8.13}/fileHashes/resourceHashesCache.bin +0 -0
- /package/android/.gradle/{8.10.2/dependencies-accessors → 8.13}/gc.properties +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","StyleSheet","TouchableOpacity","React","Checkbox","Feather","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","style","styles","container","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","CARD_WIDGET_SCREEN","theme","roundness","body","header","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","_props$editConfig","_props$editConfig2","onEdit","icon","name","size","color","create","flexDirection","justifyContent","alignItems","paddingVertical","paddingHorizontal","marginVertical","marginHorizontal","borderWidth","borderColor","borderRadius","flex","fontSize","fontStyle","fontWeight","lineHeight","marginRight","height","width","backgroundColor","alignSelf","margin"],"sources":["Card.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';\nimport React from 'react';\nimport { Checkbox } from 'react-native-paper';\nimport
|
|
1
|
+
{"version":3,"names":["View","Text","StyleSheet","TouchableOpacity","React","Checkbox","Feather","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","style","styles","container","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","CARD_WIDGET_SCREEN","theme","roundness","body","header","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","_props$editConfig","_props$editConfig2","onEdit","icon","name","size","color","create","flexDirection","justifyContent","alignItems","paddingVertical","paddingHorizontal","marginVertical","marginHorizontal","borderWidth","borderColor","borderRadius","flex","fontSize","fontStyle","fontWeight","lineHeight","marginRight","height","width","backgroundColor","alignSelf","margin"],"sources":["Card.tsx"],"sourcesContent":["import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';\nimport React from 'react';\nimport { Checkbox } from 'react-native-paper';\nimport Feather from '@react-native-vector-icons/feather';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\ninterface CardProps {\n title: string;\n renderAdditionalHeader?: () => JSX.Element;\n Body: JSX.Element;\n editConfig?: {\n props: any;\n onEdit: (props: any) => void;\n };\n selectConfig?: {\n isSelected: boolean;\n props: any;\n onSelect: (props: any) => void;\n };\n}\n\nconst Card = (props: CardProps) => {\n const isSelected = props.selectConfig?.isSelected ? 'checked' : 'unchecked';\n\n return (\n <View style={styles.container}>\n {props.selectConfig ? (\n <View>\n <Checkbox\n status={isSelected}\n onPress={() => {\n props.selectConfig?.onSelect(props.selectConfig?.props);\n const cta = \"Checkbox checked\";\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.CARD_WIDGET_SCREEN, cta: cta }); \n }}\n theme={{ roundness: 5 }}\n />\n </View>\n ) : null}\n <View style={styles.body}>\n <View style={styles.header}>\n <Text style={styles.title}>{props.title}</Text>\n {props.renderAdditionalHeader?.()}\n </View>\n {props.Body}\n </View>\n {props.editConfig ? (\n <>\n <View style={styles.divider} />\n <TouchableOpacity\n onPress={() => {props.editConfig?.onEdit(props.editConfig?.props)\n const cta = \"Edit\";\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.CARD_WIDGET_SCREEN, cta: cta }); \n \n }}\n style={styles.icon}\n >\n <Feather name=\"edit\" size={24} color=\"#5B80F7\" />\n </TouchableOpacity>\n </>\n ) : null}\n </View>\n );\n};\n\nexport default Card;\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n paddingVertical: 12,\n paddingHorizontal: 16,\n marginVertical: 10,\n marginHorizontal: 16,\n borderWidth: 1,\n borderColor: '#E0E3EB',\n borderRadius: 8,\n // height: 150,\n },\n header: {\n flexDirection: 'row',\n alignItems: 'center',\n },\n body: {\n flex: 1,\n },\n title: {\n fontSize: 16,\n fontStyle: 'normal',\n fontWeight: '500',\n lineHeight: 24,\n marginRight: 8,\n },\n divider: {\n height: '90%',\n width: 2,\n backgroundColor: '#E0E3EB',\n alignSelf: 'center',\n },\n icon: {\n alignSelf: 'center',\n margin: 10,\n },\n});\n"],"mappings":"AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AACvE,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,OAAO,MAAM,oCAAoC;AACxD,SAASC,sBAAsB,EAAEC,2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AM,GAAGjB,UAAU,CAACiD,MAAM,CAAC;EAC/B/B,SAAS,EAAE;IACTgC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,YAAY;IAC5BC,UAAU,EAAE,YAAY;IACxBC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBC,cAAc,EAAE,EAAE;IAClBC,gBAAgB,EAAE,EAAE;IACpBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;IACd;EACF,CAAC;EACDzB,MAAM,EAAE;IACNgB,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE;EACd,CAAC;EACDnB,IAAI,EAAE;IACJ2B,IAAI,EAAE;EACR,CAAC;EACDzB,KAAK,EAAE;IACL0B,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,QAAQ;IACnBC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,WAAW,EAAE;EACf,CAAC;EACDxB,OAAO,EAAE;IACPyB,MAAM,EAAE,KAAK;IACbC,KAAK,EAAE,CAAC;IACRC,eAAe,EAAE,SAAS;IAC1BC,SAAS,EAAE;EACb,CAAC;EACDxB,IAAI,EAAE;IACJwB,SAAS,EAAE,QAAQ;IACnBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import EvilIcons from '@react-native-vector-icons/evil-icons';
|
|
4
|
+
import MaterialIcons from '@react-native-vector-icons/material-icons';
|
|
4
5
|
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
5
6
|
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
6
7
|
const SearchBar = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","TextInput","TouchableOpacity","StyleSheet","EvilIcons","MaterialIcons","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SEARCH_BAR_SCREEN","createElement","style","styles","container","iconContainer","name","size","color","inputContainer","input","placeholder","onChangeText","value","onPress","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport
|
|
1
|
+
{"version":3,"names":["React","View","TextInput","TouchableOpacity","StyleSheet","EvilIcons","MaterialIcons","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SEARCH_BAR_SCREEN","createElement","style","styles","container","iconContainer","name","size","color","inputContainer","input","placeholder","onChangeText","value","onPress","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport EvilIcons from '@react-native-vector-icons/evil-icons';\nimport MaterialIcons from '@react-native-vector-icons/material-icons';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n \ninterface SearchBarProps {\n searchText: string;\n setSearchText: (searchText: string) => void;\n onChangeSearch: (searchText: string) => any;\n placeholder: string;\n onClear: () => any;\n}\n\nconst SearchBar = (props: SearchBarProps) => {\n const { searchText, setSearchText } = props;\n const handleSearch = (text: string) => {\n props.onChangeSearch(text);\n };\n const handleClear = () => {\n props.onClear();\n setSearchText('');\n const cta = \"Clear\";\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.SEARCH_BAR_SCREEN, cta: cta });\n\n };\n\n return (\n <View style={styles.container}>\n <TouchableOpacity style={styles.iconContainer}>\n <EvilIcons name=\"search\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n <View style={styles.inputContainer}>\n <TextInput\n style={styles.input}\n placeholder={props.placeholder}\n onChangeText={(text) => {\n handleSearch(text);\n setSearchText(text);\n }}\n value={searchText}\n />\n </View>\n {searchText ? (\n <TouchableOpacity style={styles.iconContainer} onPress={handleClear}>\n <MaterialIcons name=\"clear\" size={24} color=\"#525B7A\" />\n </TouchableOpacity>\n ) : null}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#ffffff',\n borderRadius: 6,\n paddingHorizontal: 12,\n borderWidth: 1,\n borderColor: '#DDDDDD',\n marginHorizontal: 16,\n },\n inputContainer: {\n flex: 1,\n },\n input: {\n height: 40,\n },\n iconContainer: {\n paddingLeft: 4,\n paddingRight: 8,\n },\n});\n\nexport default SearchBar;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAoB,OAAO;AACvC,SAASC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAC5E,OAAOC,SAAS,MAAM,uCAAuC;AAC7D,OAAOC,aAAa,MAAM,2CAA2C;AACrE,SAASC,sBAAsB,EAAEC,2BAA2B,EAAEC,kBAAkB,QAAQ,2CAA2C;AACnI,SAASC,uBAAuB,QAAQ,6CAA6C;AAUrF,MAAMC,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAM;IAAEC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,aAAc;IAACS,OAAO,EAAEtB;EAAY,gBAClElB,KAAA,CAAA2B,aAAA,CAACrB,aAAa;IAAC0B,IAAI,EAAC,OAAO;IAACC,IAAI,EAAE,EAAG;IAACC,KAAK,EAAC;EAAS,CAAE,CACvC,CAAC,GACjB,IACA,CAAC;AAEX,CAAC;AAED,MAAML,MAAM,GAAGzB,UAAU,CAACqC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,SAAS;IAC1BC,YAAY,EAAE,CAAC;IACfC,iBAAiB,EAAE,EAAE;IACrBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,gBAAgB,EAAE;EACpB,CAAC;EACDd,cAAc,EAAE;IACde,IAAI,EAAE;EACR,CAAC;EACDd,KAAK,EAAE;IACLe,MAAM,EAAE;EACV,CAAC;EACDpB,aAAa,EAAE;IACbqB,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAe1C,SAAS","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Animated, Platform, SafeAreaView, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
import { Surface, withTheme } from 'react-native-paper';
|
|
4
|
-
import
|
|
4
|
+
import AntDesign from '@react-native-vector-icons/ant-design';
|
|
5
5
|
import { Fonts } from '../../styles/executionTasks/CommonStyles';
|
|
6
6
|
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';
|
|
7
7
|
import { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';
|
|
@@ -103,23 +103,23 @@ const SnackbarCustom = ({
|
|
|
103
103
|
}, /*#__PURE__*/React.createElement(View, {
|
|
104
104
|
style: type && type === SnackBarType.FAILURE ? styles.fail : type && type === SnackBarType.WARNING ? styles.warn : type && type === SnackBarType.PAYMENT_WARNING ? styles.paymentWarn : type && type === SnackBarType.OTP_SUCCESS ? styles.otpSuccess : type && type === SnackBarType.OTP_FAILED ? styles.otpFailed : styles.main
|
|
105
105
|
}, type && type === SnackBarType.FAILURE ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
106
|
-
name: "
|
|
106
|
+
name: "exclamation-circle",
|
|
107
107
|
size: 20,
|
|
108
108
|
color: "white"
|
|
109
109
|
}) : type && type === SnackBarType.PAYMENT_WARNING ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
110
|
-
name: "
|
|
110
|
+
name: "info-circle",
|
|
111
111
|
size: 20,
|
|
112
112
|
color: "#D97706"
|
|
113
113
|
}) : type && type === SnackBarType.OTP_SUCCESS ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
114
|
-
name: "
|
|
114
|
+
name: "check-circle",
|
|
115
115
|
size: 20,
|
|
116
116
|
color: "#059669"
|
|
117
117
|
}) : type && type === SnackBarType.OTP_FAILED ? /*#__PURE__*/React.createElement(AntDesign, {
|
|
118
|
-
name: "
|
|
118
|
+
name: "close-circle",
|
|
119
119
|
size: 20,
|
|
120
120
|
color: "#DC2626"
|
|
121
121
|
}) : /*#__PURE__*/React.createElement(AntDesign, {
|
|
122
|
-
name: "
|
|
122
|
+
name: "check-circle",
|
|
123
123
|
size: 20,
|
|
124
124
|
color: "white"
|
|
125
125
|
}), /*#__PURE__*/React.createElement(Text, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","Platform","SafeAreaView","StyleSheet","Text","View","Surface","withTheme","AntDesign","Fonts","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","DURATION_MEDIUM","SnackBarType","SnackbarCustom","visible","duration","onDismiss","message","theme","type","customBottom","customTop","current","opacity","useRef","Value","hidden","setHidden","useState","hideTimeout","undefined","scale","animation","isDarkColorType","PAYMENT_WARNING","OTP_FAILED","OTP_SUCCESS","useEffect","clearTimeout","useLayoutEffect","timing","toValue","useNativeDriver","start","finished","isInfinity","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","setTimeout","colors","roundness","createElement","pointerEvents","style","styles","wrapper","bottom","top","accessibilityLiveRegion","container","borderRadius","transform","interpolate","inputRange","outputRange","FAILURE","fail","WARNING","warn","paymentWarn","otpSuccess","otpFailed","main","name","size","color","messageStyle","onPress","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SCAN_BAR_CUSTOM_SCREEN","create","position","width","zIndex","elevation","flexDirection","justifyContent","alignItems","margin","padding","backgroundColor","flex","fontSize","marginStart","marginEnd","fontWeight","lineHeight","fontFamily","OS","IBMPlexSans_400Regular"],"sources":["SnackBarCustom.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Animated,\n Platform,\n SafeAreaView,\n StyleProp,\n StyleSheet,\n Text,\n View,\n ViewStyle,\n} from 'react-native';\nimport { Surface, withTheme, MD3Theme } from 'react-native-paper';\nimport { AntDesign } from '@expo/vector-icons';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\nimport {\n ScreenNameSdkConstants,\n SentryEventNameSdkConstants,\n SeverityLevelValue,\n} from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\nexport interface SnackbarProps {\n visible: boolean;\n duration?: number;\n onDismiss: () => void;\n message: string;\n type?: SnackBarType;\n theme: MD3Theme;\n customBottom?: number;\n customTop?: number;\n}\nconst DURATION_MEDIUM = 4500;\n\nexport enum SnackBarType {\n SUCCESS,\n FAILURE,\n WARNING,\n PAYMENT_WARNING,\n OTP_SUCCESS,\n OTP_FAILED,\n}\n\nconst SnackbarCustom = ({\n visible,\n duration = DURATION_MEDIUM,\n onDismiss,\n message,\n theme,\n type,\n customBottom = 110,\n customTop,\n}: SnackbarProps) => {\n const { current: opacity } = React.useRef<Animated.Value>(\n new Animated.Value(0.0)\n );\n const [hidden, setHidden] = React.useState<boolean>(true);\n\n const hideTimeout = React.useRef<NodeJS.Timeout | undefined>(undefined);\n const { scale } = theme.animation;\n\n const isDarkColorType =\n type === SnackBarType.PAYMENT_WARNING ||\n type === SnackBarType.OTP_FAILED ||\n type === SnackBarType.OTP_SUCCESS;\n\n React.useEffect(() => {\n return () => {\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n };\n }, []);\n\n React.useLayoutEffect(() => {\n if (visible) {\n // show\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n setHidden(false);\n Animated.timing(opacity, {\n toValue: 1,\n duration: 200 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n const isInfinity =\n duration === Number.POSITIVE_INFINITY ||\n duration === Number.NEGATIVE_INFINITY;\n\n if (finished && !isInfinity) {\n hideTimeout.current = setTimeout(\n onDismiss,\n duration\n ) as unknown as NodeJS.Timeout;\n }\n }\n });\n } else {\n // hide\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n\n Animated.timing(opacity, {\n toValue: 0,\n duration: 100 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) setHidden(true);\n });\n }\n }, [visible, duration, opacity, scale, onDismiss]);\n\n const { colors, roundness } = theme;\n\n if (hidden) return null;\n\n if (!message) return null;\n\n return (\n <SafeAreaView\n pointerEvents=\"box-none\"\n style={[\n styles.wrapper,\n { bottom: customBottom },\n customTop !== undefined ? { top: customTop } : {},\n ]}\n >\n <Surface\n pointerEvents=\"box-none\"\n accessibilityLiveRegion=\"polite\"\n style={\n [\n styles.container,\n {\n borderRadius: roundness ? roundness : 8,\n opacity: opacity,\n transform: [\n {\n scale: visible\n ? opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n })\n : 1,\n },\n ],\n },\n // { backgroundColor: colors.onSurface },\n ] as StyleProp<ViewStyle>\n }\n >\n <View\n style={\n type && type === SnackBarType.FAILURE\n ? styles.fail\n : type && type === SnackBarType.WARNING\n ? styles.warn\n : type && type === SnackBarType.PAYMENT_WARNING\n ? styles.paymentWarn\n : type && type === SnackBarType.OTP_SUCCESS\n ? styles.otpSuccess\n : type && type === SnackBarType.OTP_FAILED\n ? styles.otpFailed\n : styles.main\n }\n >\n {type && type === SnackBarType.FAILURE ? (\n <AntDesign name=\"exclamationcircleo\" size={20} color=\"white\" />\n ) : type && type === SnackBarType.PAYMENT_WARNING ? (\n <AntDesign name=\"infocirlceo\" size={20} color=\"#D97706\" />\n ) : type && type === SnackBarType.OTP_SUCCESS ? (\n <AntDesign name=\"checkcircleo\" size={20} color=\"#059669\" />\n ) : type && type === SnackBarType.OTP_FAILED ? (\n <AntDesign name=\"closecircleo\" size={20} color=\"#DC2626\" />\n ) : (\n <AntDesign name=\"checkcircleo\" size={20} color=\"white\" />\n )}\n <Text\n style={[\n styles.messageStyle,\n type === SnackBarType.PAYMENT_WARNING && { color: '#B45309' },\n type === SnackBarType.OTP_SUCCESS && { color: '#059669' },\n type === SnackBarType.OTP_FAILED && { color: '#DC2626' },\n ]}\n >\n {message}\n </Text>\n <AntDesign\n name=\"close\"\n size={20}\n color={isDarkColorType ? '#3D445C' : 'white'}\n onPress={() => {\n setHidden(true);\n onDismiss();\n const cta = 'Close';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.BUTTON_CLICKED,\n screenName: ScreenNameSdkConstants.SCAN_BAR_CUSTOM_SCREEN,\n cta: cta,\n });\n }}\n />\n </View>\n </Surface>\n </SafeAreaView>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: 'absolute',\n bottom: 110,\n width: '100%',\n zIndex: 1000,\n },\n container: {\n elevation: 6,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: 8,\n borderRadius: 8,\n },\n main: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#059669',\n flex: 1,\n borderRadius: 8,\n },\n fail: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#DC2626',\n flex: 1,\n borderRadius: 8,\n },\n warn: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#D97706',\n flex: 1,\n borderRadius: 8,\n },\n paymentWarn: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#FFFBEB',\n flex: 1,\n borderRadius: 8,\n },\n otpSuccess: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#ECFDF5',\n flex: 1,\n borderRadius: 8,\n },\n otpFailed: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#FEF2F2',\n flex: 1,\n borderRadius: 8,\n },\n messageStyle: {\n fontSize: 14,\n marginStart: 8,\n marginEnd: 8,\n width: '80%',\n color: '#ffffff',\n flex: 1,\n fontWeight: '400',\n lineHeight: 20,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans_400Regular',\n },\n});\n\nexport default withTheme(SnackbarCustom);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EAEZC,UAAU,EACVC,IAAI,EACJC,IAAI,QAEC,cAAc;AACrB,SAASC,OAAO,EAAEC,SAAS,QAAkB,oBAAoB;AACjE,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,0CAA0C;AAChE,SACEC,sBAAsB,EACtBC,2BAA2B,EAC3BC,kBAAkB,QACb,2CAA2C;AAClD,SAASC,uBAAuB,QAAQ,6CAA6C;AAYrF,MAAMC,eAAe,GAAG,IAAI;AAE5B,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AASx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;IACXJ,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBG,eAAe,EAAE,SAAS;IAC1BC,IAAI,EAAE,CAAC;IACPpC,YAAY,EAAE;EAChB,CAAC;EACDW,SAAS,EAAE;IACTuB,OAAO,EAAE,EAAE;IACXJ,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBG,eAAe,EAAE,SAAS;IAC1BC,IAAI,EAAE,CAAC;IACPpC,YAAY,EAAE;EAChB,CAAC;EACDgB,YAAY,EAAE;IACZqB,QAAQ,EAAE,EAAE;IACZC,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE,CAAC;IACZZ,KAAK,EAAE,KAAK;IACZZ,KAAK,EAAE,SAAS;IAChBqB,IAAI,EAAE,CAAC;IACPI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,UAAU,EACRzG,QAAQ,CAAC0G,EAAE,KAAK,SAAS,GACrBlG,KAAK,CAACmG,sBAAsB,GAC5B;EACR;AACF,CAAC,CAAC;AAEF,eAAerG,SAAS,CAACS,cAAc,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["React","Animated","Platform","SafeAreaView","StyleSheet","Text","View","Surface","withTheme","AntDesign","Fonts","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","DURATION_MEDIUM","SnackBarType","SnackbarCustom","visible","duration","onDismiss","message","theme","type","customBottom","customTop","current","opacity","useRef","Value","hidden","setHidden","useState","hideTimeout","undefined","scale","animation","isDarkColorType","PAYMENT_WARNING","OTP_FAILED","OTP_SUCCESS","useEffect","clearTimeout","useLayoutEffect","timing","toValue","useNativeDriver","start","finished","isInfinity","Number","POSITIVE_INFINITY","NEGATIVE_INFINITY","setTimeout","colors","roundness","createElement","pointerEvents","style","styles","wrapper","bottom","top","accessibilityLiveRegion","container","borderRadius","transform","interpolate","inputRange","outputRange","FAILURE","fail","WARNING","warn","paymentWarn","otpSuccess","otpFailed","main","name","size","color","messageStyle","onPress","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SCAN_BAR_CUSTOM_SCREEN","create","position","width","zIndex","elevation","flexDirection","justifyContent","alignItems","margin","padding","backgroundColor","flex","fontSize","marginStart","marginEnd","fontWeight","lineHeight","fontFamily","OS","IBMPlexSans_400Regular"],"sources":["SnackBarCustom.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Animated,\n Platform,\n SafeAreaView,\n StyleProp,\n StyleSheet,\n Text,\n View,\n ViewStyle,\n} from 'react-native';\nimport { Surface, withTheme, MD3Theme } from 'react-native-paper';\nimport AntDesign from '@react-native-vector-icons/ant-design';\nimport { Fonts } from '../../styles/executionTasks/CommonStyles';\nimport {\n ScreenNameSdkConstants,\n SentryEventNameSdkConstants,\n SeverityLevelValue,\n} from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\nexport interface SnackbarProps {\n visible: boolean;\n duration?: number;\n onDismiss: () => void;\n message: string;\n type?: SnackBarType;\n theme: MD3Theme;\n customBottom?: number;\n customTop?: number;\n}\nconst DURATION_MEDIUM = 4500;\n\nexport enum SnackBarType {\n SUCCESS,\n FAILURE,\n WARNING,\n PAYMENT_WARNING,\n OTP_SUCCESS,\n OTP_FAILED,\n}\n\nconst SnackbarCustom = ({\n visible,\n duration = DURATION_MEDIUM,\n onDismiss,\n message,\n theme,\n type,\n customBottom = 110,\n customTop,\n}: SnackbarProps) => {\n const { current: opacity } = React.useRef<Animated.Value>(\n new Animated.Value(0.0)\n );\n const [hidden, setHidden] = React.useState<boolean>(true);\n\n const hideTimeout = React.useRef<NodeJS.Timeout | undefined>(undefined);\n const { scale } = theme.animation;\n\n const isDarkColorType =\n type === SnackBarType.PAYMENT_WARNING ||\n type === SnackBarType.OTP_FAILED ||\n type === SnackBarType.OTP_SUCCESS;\n\n React.useEffect(() => {\n return () => {\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n };\n }, []);\n\n React.useLayoutEffect(() => {\n if (visible) {\n // show\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n setHidden(false);\n Animated.timing(opacity, {\n toValue: 1,\n duration: 200 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) {\n const isInfinity =\n duration === Number.POSITIVE_INFINITY ||\n duration === Number.NEGATIVE_INFINITY;\n\n if (finished && !isInfinity) {\n hideTimeout.current = setTimeout(\n onDismiss,\n duration\n ) as unknown as NodeJS.Timeout;\n }\n }\n });\n } else {\n // hide\n if (hideTimeout.current) clearTimeout(hideTimeout.current);\n\n Animated.timing(opacity, {\n toValue: 0,\n duration: 100 * scale,\n useNativeDriver: true,\n }).start(({ finished }) => {\n if (finished) setHidden(true);\n });\n }\n }, [visible, duration, opacity, scale, onDismiss]);\n\n const { colors, roundness } = theme;\n\n if (hidden) return null;\n\n if (!message) return null;\n\n return (\n <SafeAreaView\n pointerEvents=\"box-none\"\n style={[\n styles.wrapper,\n { bottom: customBottom },\n customTop !== undefined ? { top: customTop } : {},\n ]}\n >\n <Surface\n pointerEvents=\"box-none\"\n accessibilityLiveRegion=\"polite\"\n style={\n [\n styles.container,\n {\n borderRadius: roundness ? roundness : 8,\n opacity: opacity,\n transform: [\n {\n scale: visible\n ? opacity.interpolate({\n inputRange: [0, 1],\n outputRange: [0.9, 1],\n })\n : 1,\n },\n ],\n },\n // { backgroundColor: colors.onSurface },\n ] as StyleProp<ViewStyle>\n }\n >\n <View\n style={\n type && type === SnackBarType.FAILURE\n ? styles.fail\n : type && type === SnackBarType.WARNING\n ? styles.warn\n : type && type === SnackBarType.PAYMENT_WARNING\n ? styles.paymentWarn\n : type && type === SnackBarType.OTP_SUCCESS\n ? styles.otpSuccess\n : type && type === SnackBarType.OTP_FAILED\n ? styles.otpFailed\n : styles.main\n }\n >\n {type && type === SnackBarType.FAILURE ? (\n <AntDesign name=\"exclamation-circle\" size={20} color=\"white\" />\n ) : type && type === SnackBarType.PAYMENT_WARNING ? (\n <AntDesign name=\"info-circle\" size={20} color=\"#D97706\" />\n ) : type && type === SnackBarType.OTP_SUCCESS ? (\n <AntDesign name=\"check-circle\" size={20} color=\"#059669\" />\n ) : type && type === SnackBarType.OTP_FAILED ? (\n <AntDesign name=\"close-circle\" size={20} color=\"#DC2626\" />\n ) : (\n <AntDesign name=\"check-circle\" size={20} color=\"white\" />\n )}\n <Text\n style={[\n styles.messageStyle,\n type === SnackBarType.PAYMENT_WARNING && { color: '#B45309' },\n type === SnackBarType.OTP_SUCCESS && { color: '#059669' },\n type === SnackBarType.OTP_FAILED && { color: '#DC2626' },\n ]}\n >\n {message}\n </Text>\n <AntDesign\n name=\"close\"\n size={20}\n color={isDarkColorType ? '#3D445C' : 'white'}\n onPress={() => {\n setHidden(true);\n onDismiss();\n const cta = 'Close';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.BUTTON_CLICKED,\n screenName: ScreenNameSdkConstants.SCAN_BAR_CUSTOM_SCREEN,\n cta: cta,\n });\n }}\n />\n </View>\n </Surface>\n </SafeAreaView>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n position: 'absolute',\n bottom: 110,\n width: '100%',\n zIndex: 1000,\n },\n container: {\n elevation: 6,\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n margin: 8,\n borderRadius: 8,\n },\n main: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#059669',\n flex: 1,\n borderRadius: 8,\n },\n fail: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#DC2626',\n flex: 1,\n borderRadius: 8,\n },\n warn: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#D97706',\n flex: 1,\n borderRadius: 8,\n },\n paymentWarn: {\n padding: 16,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#FFFBEB',\n flex: 1,\n borderRadius: 8,\n },\n otpSuccess: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#ECFDF5',\n flex: 1,\n borderRadius: 8,\n },\n otpFailed: {\n padding: 12,\n flexDirection: 'row',\n alignItems: 'center',\n backgroundColor: '#FEF2F2',\n flex: 1,\n borderRadius: 8,\n },\n messageStyle: {\n fontSize: 14,\n marginStart: 8,\n marginEnd: 8,\n width: '80%',\n color: '#ffffff',\n flex: 1,\n fontWeight: '400',\n lineHeight: 20,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans_400Regular',\n },\n});\n\nexport default withTheme(SnackbarCustom);\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,QAAQ,EACRC,QAAQ,EACRC,YAAY,EAEZC,UAAU,EACVC,IAAI,EACJC,IAAI,QAEC,cAAc;AACrB,SAASC,OAAO,EAAEC,SAAS,QAAkB,oBAAoB;AACjE,OAAOC,SAAS,MAAM,uCAAuC;AAC7D,SAASC,KAAK,QAAQ,0CAA0C;AAChE,SACEC,sBAAsB,EACtBC,2BAA2B,EAC3BC,kBAAkB,QACb,2CAA2C;AAClD,SAASC,uBAAuB,QAAQ,6CAA6C;AAYrF,MAAMC,eAAe,GAAG,IAAI;AAE5B,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AASxB,MAAMC,cAAc,GAAGA,CAAC;EACtBC,OAAO;EACPC,QAAQ,GAAGJ,eAAe;EAC1BK,SAAS;EACTC,OAAO;EACPC,KAAK;EACLC,IAAI;EACJC,YAAY,GAAG,GAAG;EAClBC;AACa,CAAC,KAAK;EACnB,MAAM;IAAEC,OAAO,EAAEC;EAAQ,CAAC,GAAG3B,KAA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AQ;IACpBG,eAAe,EAAE,SAAS;IAC1BC,IAAI,EAAE,CAAC;IACPpC,YAAY,EAAE;EAChB,CAAC;EACDgB,YAAY,EAAE;IACZqB,QAAQ,EAAE,EAAE;IACZC,WAAW,EAAE,CAAC;IACdC,SAAS,EAAE,CAAC;IACZZ,KAAK,EAAE,KAAK;IACZZ,KAAK,EAAE,SAAS;IAChBqB,IAAI,EAAE,CAAC;IACPI,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,UAAU,EACRzG,QAAQ,CAAC0G,EAAE,KAAK,SAAS,GACrBlG,KAAK,CAACmG,sBAAsB,GAC5B;EACR;AACF,CAAC,CAAC;AAEF,eAAerG,SAAS,CAACS,cAAc,CAAC","ignoreList":[]}
|
|
@@ -15,7 +15,7 @@ const SplitTextInput = ({
|
|
|
15
15
|
keyboardType,
|
|
16
16
|
hasError
|
|
17
17
|
}) => {
|
|
18
|
-
const inputRef = useRef();
|
|
18
|
+
const inputRef = useRef(null);
|
|
19
19
|
const boxArray = new Array(maxLength).fill(0);
|
|
20
20
|
const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);
|
|
21
21
|
const handleOnPress = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useState","View","Text","Pressable","StyleSheet","TextInput","Keyboard","sHeight","sWidth","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","SplitTextInput","styles","value","onChange","maxLength","keyboardType","hasError","inputRef","boxArray","Array","fill","isInputBoxFocused","setIsInputBoxFocused","handleOnPress","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SPLIT_TEXT_INPUT_SCREEN","current","focus","handleOnBlur","blur","dismiss","length","boxDigit","_","index","digit","isCurrentValue","isLastValue","isCodeComplete","isValueFocused","splitBoxesStyle","widgetStyles","errorSplitBoxes","splitBoxes","focusedSplitBoxes","createElement","style","key","Fragment","onPress","splitContainer","map","textInputHidden","onChangeText","ref","onBlur","returnKeyLabel","returnKeyType","onSubmitEditing","onFocus","create","width","flexDirection","justifyContent","gap","flexWrap","borderColor","borderWidth","borderRadius","padding","minWidth","maxWidth","flex","alignSelf","minHeight","height","maxHeight","display","alignContent","position","opacity","backgroundColor"],"sources":["SplitTextInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n// External imports\nimport React, { useEffect, useRef, useState } from 'react';\nimport {\n View,\n Text,\n Pressable,\n StyleSheet,\n TextInput,\n KeyboardTypeOptions,\n Keyboard,\n} from 'react-native';\n\n// Internal imports\nimport { sHeight, sWidth } from '../utils/Scale';\nimport {\n ScreenNameSdkConstants,\n SentryEventNameSdkConstants,\n SeverityLevelValue,\n} from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\nexport interface SplitTextInputProps {\n styles: any;\n value: string;\n onChange: (text: string) => void;\n maxLength: number;\n keyboardType: KeyboardTypeOptions;\n hasError: boolean;\n}\n\nconst SplitTextInput = ({\n styles,\n value,\n onChange,\n maxLength,\n keyboardType,\n hasError,\n}: SplitTextInputProps) => {\n const inputRef: any = useRef();\n const boxArray = new Array(maxLength).fill(0);\n const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);\n\n const handleOnPress = () => {\n const cta = 'Split Text Input';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.BUTTON_CLICKED,\n screenName: ScreenNameSdkConstants.SPLIT_TEXT_INPUT_SCREEN,\n cta: cta,\n });\n\n setIsInputBoxFocused(true);\n inputRef.current.focus();\n };\n\n const handleOnBlur = () => {\n setIsInputBoxFocused(false);\n inputRef.current.blur();\n Keyboard.dismiss();\n };\n\n useEffect(() => {\n if (value?.length === maxLength) {\n setIsInputBoxFocused(false);\n inputRef.current.blur();\n Keyboard.dismiss();\n }\n }, [maxLength, value?.length]);\n const boxDigit = (_: number, index: number) => {\n const digit = value[index] || '';\n\n const isCurrentValue = index === value.length;\n const isLastValue = index === maxLength - 1;\n const isCodeComplete = value.length === maxLength;\n\n const isValueFocused = isCurrentValue || (isLastValue && isCodeComplete);\n\n const splitBoxesStyle = hasError\n ? widgetStyles.errorSplitBoxes\n : isInputBoxFocused && isValueFocused\n ? // || value[index]\n [widgetStyles.splitBoxes, widgetStyles.focusedSplitBoxes]\n : widgetStyles.splitBoxes;\n\n return (\n <View style={splitBoxesStyle} key={index}>\n <Text style={styles}>{digit}</Text>\n </View>\n );\n };\n\n return (\n <>\n <Pressable onPress={handleOnPress} style={widgetStyles.splitContainer}>\n {boxArray.map(boxDigit)}\n </Pressable>\n <TextInput\n style={widgetStyles.textInputHidden}\n value={value}\n onChangeText={onChange}\n maxLength={maxLength}\n ref={inputRef}\n onBlur={handleOnBlur}\n keyboardType={keyboardType}\n returnKeyLabel={'Done'}\n returnKeyType=\"done\"\n onSubmitEditing={() => Keyboard.dismiss()}\n onFocus={handleOnPress}\n />\n </>\n );\n};\n\nexport default SplitTextInput;\nconst widgetStyles = StyleSheet.create({\n splitContainer: {\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 16,\n flexWrap: 'wrap',\n },\n splitBoxes: {\n borderColor: '#DDE3F9',\n borderWidth: 1,\n borderRadius: 6,\n padding: 8,\n width: sWidth(36),\n minWidth: sWidth(36),\n maxWidth: sWidth(36),\n flex: 1,\n alignSelf: 'stretch',\n minHeight: sHeight(48),\n height: sHeight(48),\n maxHeight: sHeight(48),\n display: 'flex',\n justifyContent: 'center',\n alignContent: 'center',\n },\n focusedSplitBoxes: {\n borderColor: '#5B80F7', // Override specific properties\n },\n\n errorSplitBoxes: {\n borderColor: '#DC2626',\n borderWidth: 2,\n borderRadius: 5,\n padding: 12,\n minWidth: 50,\n },\n textInputHidden: {\n height: sHeight(48),\n width: '100%',\n position: 'absolute',\n opacity: 0,\n backgroundColor: 'red',\n },\n});\n"],"mappings":"AAAA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,UAAU,EACVC,SAAS,EAETC,QAAQ,QACH,cAAc;;AAErB;AACA,SAASC,OAAO,EAAEC,MAAM,QAAQ,gBAAgB;AAChD,SACEC,sBAAsB,EACtBC,2BAA2B,EAC3BC,kBAAkB,QACb,2CAA2C;AAClD,SAASC,uBAAuB,QAAQ,6CAA6C;AAWrF,MAAMC,cAAc,GAAGA,CAAC;EACtBC,MAAM;EACNC,KAAK;EACLC,QAAQ;EACRC,SAAS;EACTC,YAAY;EACZC;AACmB,CAAC,KAAK;EACzB,MAAMC,QAAa,GAAGrB,MAAM,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","View","Text","Pressable","StyleSheet","TextInput","Keyboard","sHeight","sWidth","ScreenNameSdkConstants","SentryEventNameSdkConstants","SeverityLevelValue","fireEventWithScreenName","SplitTextInput","styles","value","onChange","maxLength","keyboardType","hasError","inputRef","boxArray","Array","fill","isInputBoxFocused","setIsInputBoxFocused","handleOnPress","cta","severityLevel","LOG","eventName","BUTTON_CLICKED","screenName","SPLIT_TEXT_INPUT_SCREEN","current","focus","handleOnBlur","blur","dismiss","length","boxDigit","_","index","digit","isCurrentValue","isLastValue","isCodeComplete","isValueFocused","splitBoxesStyle","widgetStyles","errorSplitBoxes","splitBoxes","focusedSplitBoxes","createElement","style","key","Fragment","onPress","splitContainer","map","textInputHidden","onChangeText","ref","onBlur","returnKeyLabel","returnKeyType","onSubmitEditing","onFocus","create","width","flexDirection","justifyContent","gap","flexWrap","borderColor","borderWidth","borderRadius","padding","minWidth","maxWidth","flex","alignSelf","minHeight","height","maxHeight","display","alignContent","position","opacity","backgroundColor"],"sources":["SplitTextInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n// External imports\nimport React, { useEffect, useRef, useState } from 'react';\nimport {\n View,\n Text,\n Pressable,\n StyleSheet,\n TextInput,\n KeyboardTypeOptions,\n Keyboard,\n} from 'react-native';\n\n// Internal imports\nimport { sHeight, sWidth } from '../utils/Scale';\nimport {\n ScreenNameSdkConstants,\n SentryEventNameSdkConstants,\n SeverityLevelValue,\n} from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\nexport interface SplitTextInputProps {\n styles: any;\n value: string;\n onChange: (text: string) => void;\n maxLength: number;\n keyboardType: KeyboardTypeOptions;\n hasError: boolean;\n}\n\nconst SplitTextInput = ({\n styles,\n value,\n onChange,\n maxLength,\n keyboardType,\n hasError,\n}: SplitTextInputProps) => {\n const inputRef: any = useRef(null);\n const boxArray = new Array(maxLength).fill(0);\n const [isInputBoxFocused, setIsInputBoxFocused] = useState(false);\n\n const handleOnPress = () => {\n const cta = 'Split Text Input';\n fireEventWithScreenName({\n severityLevel: SeverityLevelValue.LOG,\n eventName: SentryEventNameSdkConstants.BUTTON_CLICKED,\n screenName: ScreenNameSdkConstants.SPLIT_TEXT_INPUT_SCREEN,\n cta: cta,\n });\n\n setIsInputBoxFocused(true);\n inputRef.current.focus();\n };\n\n const handleOnBlur = () => {\n setIsInputBoxFocused(false);\n inputRef.current.blur();\n Keyboard.dismiss();\n };\n\n useEffect(() => {\n if (value?.length === maxLength) {\n setIsInputBoxFocused(false);\n inputRef.current.blur();\n Keyboard.dismiss();\n }\n }, [maxLength, value?.length]);\n const boxDigit = (_: number, index: number) => {\n const digit = value[index] || '';\n\n const isCurrentValue = index === value.length;\n const isLastValue = index === maxLength - 1;\n const isCodeComplete = value.length === maxLength;\n\n const isValueFocused = isCurrentValue || (isLastValue && isCodeComplete);\n\n const splitBoxesStyle = hasError\n ? widgetStyles.errorSplitBoxes\n : isInputBoxFocused && isValueFocused\n ? // || value[index]\n [widgetStyles.splitBoxes, widgetStyles.focusedSplitBoxes]\n : widgetStyles.splitBoxes;\n\n return (\n <View style={splitBoxesStyle} key={index}>\n <Text style={styles}>{digit}</Text>\n </View>\n );\n };\n\n return (\n <>\n <Pressable onPress={handleOnPress} style={widgetStyles.splitContainer}>\n {boxArray.map(boxDigit)}\n </Pressable>\n <TextInput\n style={widgetStyles.textInputHidden}\n value={value}\n onChangeText={onChange}\n maxLength={maxLength}\n ref={inputRef}\n onBlur={handleOnBlur}\n keyboardType={keyboardType}\n returnKeyLabel={'Done'}\n returnKeyType=\"done\"\n onSubmitEditing={() => Keyboard.dismiss()}\n onFocus={handleOnPress}\n />\n </>\n );\n};\n\nexport default SplitTextInput;\nconst widgetStyles = StyleSheet.create({\n splitContainer: {\n width: '100%',\n flexDirection: 'row',\n justifyContent: 'flex-start',\n gap: 16,\n flexWrap: 'wrap',\n },\n splitBoxes: {\n borderColor: '#DDE3F9',\n borderWidth: 1,\n borderRadius: 6,\n padding: 8,\n width: sWidth(36),\n minWidth: sWidth(36),\n maxWidth: sWidth(36),\n flex: 1,\n alignSelf: 'stretch',\n minHeight: sHeight(48),\n height: sHeight(48),\n maxHeight: sHeight(48),\n display: 'flex',\n justifyContent: 'center',\n alignContent: 'center',\n },\n focusedSplitBoxes: {\n borderColor: '#5B80F7', // Override specific properties\n },\n\n errorSplitBoxes: {\n borderColor: '#DC2626',\n borderWidth: 2,\n borderRadius: 5,\n padding: 12,\n minWidth: 50,\n },\n textInputHidden: {\n height: sHeight(48),\n width: '100%',\n position: 'absolute',\n opacity: 0,\n backgroundColor: 'red',\n },\n});\n"],"mappings":"AAAA;AACA;AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,UAAU,EACVC,SAAS,EAETC,QAAQ,QACH,cAAc;;AAErB;AACA,SAASC,OAAO,EAAEC,MAAM,QAAQ,gBAAgB;AAChD,SACEC,sBAAsB,EACtBC,2BAA2B,EAC3BC,kBAAkB,QACb,2CAA2C;AAClD,SAASC,uBAAuB,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C,EAAE,CAAC;IACnB8D,KAAK,EAAE,MAAM;IACbkB,QAAQ,EAAE,UAAU;IACpBC,OAAO,EAAE,CAAC;IACVC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { APIData, HttpRequestETOutput } from './HttpRequestETSchema';
|
|
2
|
-
export declare function getApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
2
|
+
export declare function getApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
3
3
|
export declare function getOutputUsingJsonpath(json: object, jsonPath: string): any;
|
|
4
4
|
export declare function getHttpETOutput(apiResponse: object, jsonPath: string, success: boolean, mergedObjectiveId: Array<string>): Promise<HttpRequestETOutput>;
|
|
@@ -4,11 +4,11 @@ export default class GraphQLClient {
|
|
|
4
4
|
private constructor();
|
|
5
5
|
static init(baseURL: string): GraphQLClient;
|
|
6
6
|
static getInstance(): GraphQLClient;
|
|
7
|
-
fetchReasonCodes(): Promise<import("@apollo/client").
|
|
8
|
-
createFmsFolder(folderName: string, desc: string): Promise<import("@apollo/client").
|
|
9
|
-
postCustodyIn(data: any[], dspID: string): Promise<import("@apollo/client").
|
|
10
|
-
postCustodyOut(data: any[], dspID: string): Promise<import("@apollo/client").
|
|
11
|
-
postWorkflowUpdate(data: any, workflowId: string): Promise<import("@apollo/client").
|
|
7
|
+
fetchReasonCodes(): Promise<import("@apollo/client").InteropApolloQueryResult<any> | undefined>;
|
|
8
|
+
createFmsFolder(folderName: string, desc: string): Promise<import("@apollo/client").InteropMutateResult<any> | undefined>;
|
|
9
|
+
postCustodyIn(data: any[], dspID: string): Promise<import("@apollo/client").InteropMutateResult<any> | undefined>;
|
|
10
|
+
postCustodyOut(data: any[], dspID: string): Promise<import("@apollo/client").InteropMutateResult<any> | undefined>;
|
|
11
|
+
postWorkflowUpdate(data: any, workflowId: string): Promise<import("@apollo/client").InteropMutateResult<any> | undefined>;
|
|
12
12
|
}
|
|
13
13
|
export declare enum API_CONTENT_TYPES {
|
|
14
14
|
APPLICATION_JSON = "application/json"
|
|
@@ -4,7 +4,7 @@ export default class NetworkClient extends HttpClient {
|
|
|
4
4
|
constructor(baseURL: string);
|
|
5
5
|
requestGet(endpoint: string, headers: Headers, queryParams?: {
|
|
6
6
|
[key: string]: string | number | boolean;
|
|
7
|
-
}): Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
requestPost(endpoint: string, requestBody: any, headers: Headers): Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
requestPut(endpoint: string, requestBody: any, headers: Headers): Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
+
}): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
requestPost(endpoint: string, requestBody: any, headers: Headers): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
requestPut(endpoint: string, requestBody: any, headers: Headers): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
10
|
}
|
|
@@ -4,6 +4,6 @@ export default abstract class HttpClient {
|
|
|
4
4
|
protected constructor(baseURL: string);
|
|
5
5
|
private _initializeResponseInterceptor;
|
|
6
6
|
protected _handleRequest: (request: InternalAxiosRequestConfig) => InternalAxiosRequestConfig<any>;
|
|
7
|
-
protected _handleResponse: (response: AxiosResponse) => AxiosResponse<any, any>;
|
|
7
|
+
protected _handleResponse: (response: AxiosResponse) => AxiosResponse<any, any, {}>;
|
|
8
8
|
protected _handleError: (error: any) => Promise<never>;
|
|
9
9
|
}
|
|
@@ -2,13 +2,13 @@ import HttpClient from '../network/client';
|
|
|
2
2
|
import type { AccessTokenPayload, LoginPayload, RefreshTokenPayload } from '../models/auth';
|
|
3
3
|
declare class Login extends HttpClient {
|
|
4
4
|
constructor();
|
|
5
|
-
loginMobilePassword: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
6
|
-
loginMobileOtp: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
7
|
-
loginMpin: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
8
|
-
loginUserName: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
9
|
-
loginCredential: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
10
|
-
validateToken: (accessToken: AccessTokenPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
11
|
-
refreshToken: (refreshTokenPayload: RefreshTokenPayload) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
5
|
+
loginMobilePassword: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
6
|
+
loginMobileOtp: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
7
|
+
loginMpin: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
8
|
+
loginUserName: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
9
|
+
loginCredential: (payload: LoginPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
10
|
+
validateToken: (accessToken: AccessTokenPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
11
|
+
refreshToken: (refreshTokenPayload: RefreshTokenPayload) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
12
12
|
}
|
|
13
13
|
declare const Auth: Login;
|
|
14
14
|
export default Auth;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import HttpClient from '../network/client';
|
|
2
2
|
declare class Network extends HttpClient {
|
|
3
3
|
constructor();
|
|
4
|
-
heartBeat: () => Promise<import("axios").AxiosResponse<any, any>>;
|
|
4
|
+
heartBeat: () => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
5
5
|
}
|
|
6
6
|
declare const network: Network;
|
|
7
7
|
export default network;
|
|
@@ -58,8 +58,8 @@ export declare const getAddHeaders: (array?: KeyValueArray[]) => {
|
|
|
58
58
|
export declare const getQueryParams: (array?: KeyValueArray[]) => {
|
|
59
59
|
[k: string]: any;
|
|
60
60
|
};
|
|
61
|
-
export declare function getApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
62
|
-
export declare function getAxiosApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any>>;
|
|
61
|
+
export declare function getApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
62
|
+
export declare function getAxiosApiResponse(apiData: APIData): Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
63
63
|
export declare const createApiData: (payload: any, props: any, endpoint: string, httpMethod: HTTPMethod, headers: Headers[] | null, customApiConfig?: Partial<APIData>) => APIData;
|
|
64
64
|
export declare function parseBody(body: any, userInput: any): any;
|
|
65
65
|
export declare function parseKeyValue(array: KeyValueArray[], userInput: any): void[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@os1-platform/dispatch-mobile",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "Dispatch SDK React Native Package",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"ios"
|
|
50
50
|
],
|
|
51
51
|
"license": "MIT",
|
|
52
|
-
"author": "
|
|
53
|
-
"homepage": "https://github.com/
|
|
52
|
+
"author": "Anuj Sharma <anuj.sharma11@delhivery.com> (https://github.com/delhivery/platform-coreos-dispatch-sdk)",
|
|
53
|
+
"homepage": "https://github.com/delhivery/platform-coreos-dispatch-sdk?tab=readme-ov-file#readme",
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@apollo/client": "^3.5.6",
|
|
56
56
|
"@babel/core": "^7.25.2",
|
|
@@ -59,25 +59,25 @@
|
|
|
59
59
|
"@babel/runtime": "^7.25.0",
|
|
60
60
|
"@commitlint/config-conventional": "^11.0.0",
|
|
61
61
|
"@expo-google-fonts/ibm-plex-sans": "0.4.1",
|
|
62
|
-
"@react-native-async-storage/async-storage": "1.
|
|
63
|
-
"@react-native-community/cli": "
|
|
64
|
-
"@react-native-community/cli-platform-android": "
|
|
65
|
-
"@react-native-community/cli-platform-ios": "
|
|
66
|
-
"@react-native-community/datetimepicker": "8.
|
|
62
|
+
"@react-native-async-storage/async-storage": "2.1.2",
|
|
63
|
+
"@react-native-community/cli": "18.0.0",
|
|
64
|
+
"@react-native-community/cli-platform-android": "18.0.0",
|
|
65
|
+
"@react-native-community/cli-platform-ios": "18.0.0",
|
|
66
|
+
"@react-native-community/datetimepicker": "8.4.1",
|
|
67
67
|
"@react-native-community/netinfo": "11.4.1",
|
|
68
|
-
"@react-native-cookies/cookies": "^6.
|
|
69
|
-
"@react-native-firebase/analytics": "
|
|
70
|
-
"@react-native-firebase/app": "
|
|
71
|
-
"@react-native-firebase/crashlytics": "
|
|
72
|
-
"@react-native-firebase/messaging": "
|
|
73
|
-
"@react-native-firebase/remote-config": "
|
|
74
|
-
"@react-native/eslint-config": "0.
|
|
75
|
-
"@react-native/metro-config": "0.
|
|
76
|
-
"@react-native/typescript-config": "0.
|
|
77
|
-
"@react-navigation/native": "
|
|
78
|
-
"@react-navigation/native-stack": "
|
|
68
|
+
"@react-native-cookies/cookies": "^6.2.1",
|
|
69
|
+
"@react-native-firebase/analytics": "22.4.0",
|
|
70
|
+
"@react-native-firebase/app": "22.4.0",
|
|
71
|
+
"@react-native-firebase/crashlytics": "22.4.0",
|
|
72
|
+
"@react-native-firebase/messaging": "22.4.0",
|
|
73
|
+
"@react-native-firebase/remote-config": "22.4.0",
|
|
74
|
+
"@react-native/eslint-config": "0.79.6",
|
|
75
|
+
"@react-native/metro-config": "0.79.6",
|
|
76
|
+
"@react-native/typescript-config": "0.79.6",
|
|
77
|
+
"@react-navigation/native": "7.1.6",
|
|
78
|
+
"@react-navigation/native-stack": "7.3.5",
|
|
79
79
|
"@release-it/conventional-changelog": "^2.0.0",
|
|
80
|
-
"@sentry/react-native": "~6.
|
|
80
|
+
"@sentry/react-native": "~6.22.0",
|
|
81
81
|
"@tsconfig/react-native": "^3.0.0",
|
|
82
82
|
"@types/enzyme": "^3.10.10",
|
|
83
83
|
"@types/i18n-js": "^3.8.8",
|
|
@@ -85,87 +85,93 @@
|
|
|
85
85
|
"@types/json-logic-js": "^1.2.1",
|
|
86
86
|
"@types/jsonpath-plus": "^5.0.2",
|
|
87
87
|
"@types/lodash": "^4.14.182",
|
|
88
|
-
"@types/react": "
|
|
89
|
-
"@types/react-test-renderer": "^18.0.0",
|
|
88
|
+
"@types/react": "^19.0.0",
|
|
90
89
|
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
|
91
90
|
"@typescript-eslint/parser": "^5.29.0",
|
|
92
|
-
"axios": "1.
|
|
91
|
+
"axios": "1.14.0",
|
|
93
92
|
"babel-plugin-module-resolver": "^4.0.0",
|
|
94
93
|
"commitlint": "^11.0.0",
|
|
95
94
|
"eslint": "^8.19.0",
|
|
96
95
|
"eslint-config-prettier": "^8.5.0",
|
|
97
96
|
"eslint-plugin-prettier": "^4.0.0",
|
|
98
|
-
"expo": "~
|
|
99
|
-
"expo-blur": "~14.
|
|
100
|
-
"expo-camera": "~16.
|
|
101
|
-
"expo-file-system": "~18.
|
|
102
|
-
"expo-font": "~13.
|
|
103
|
-
"expo-image
|
|
104
|
-
"expo-
|
|
105
|
-
"expo-
|
|
97
|
+
"expo": "~53.0.20",
|
|
98
|
+
"expo-blur": "~14.1.5",
|
|
99
|
+
"expo-camera": "~16.1.11",
|
|
100
|
+
"expo-file-system": "~18.1.11",
|
|
101
|
+
"expo-font": "~13.3.2",
|
|
102
|
+
"expo-image": "~2.4.1",
|
|
103
|
+
"expo-image-picker": "~16.1.4",
|
|
104
|
+
"expo-location": "~18.1.6",
|
|
105
|
+
"expo-sqlite": "~15.2.14",
|
|
106
106
|
"graphql": "^16.2.0",
|
|
107
107
|
"husky": "^4.2.5",
|
|
108
108
|
"jest": "^29.6.3",
|
|
109
|
-
"jest-expo": "~
|
|
109
|
+
"jest-expo": "~53.0.10",
|
|
110
110
|
"msw": "^0.34.0",
|
|
111
111
|
"patch-package": "^8.0.0",
|
|
112
112
|
"pod-install": "^0.1.0",
|
|
113
113
|
"postinstall-postinstall": "^2.1.0",
|
|
114
114
|
"prettier": "2.8.8",
|
|
115
|
-
"react": "
|
|
116
|
-
"react-dom": "
|
|
117
|
-
"react-native": "0.
|
|
115
|
+
"react": "19.0.0",
|
|
116
|
+
"react-dom": "19.0.0",
|
|
117
|
+
"react-native": "0.79.6",
|
|
118
118
|
"react-native-builder-bob": "^0.18.0",
|
|
119
|
-
"react-native-compressor": "^1.
|
|
119
|
+
"react-native-compressor": "^1.16.0",
|
|
120
120
|
"react-native-dropdown-picker": "^5.4.0",
|
|
121
|
-
"react-native-fast-image": "^8.6.3",
|
|
122
121
|
"react-native-get-random-values": "~1.11.0",
|
|
123
|
-
"react-native-image-picker": "
|
|
124
|
-
"react-native-paper": "5.
|
|
125
|
-
"react-native-safe-area-context": "5.
|
|
126
|
-
"react-native-screens": "4.
|
|
127
|
-
"react-test-renderer": "18.3.1",
|
|
122
|
+
"react-native-image-picker": "8.2.1",
|
|
123
|
+
"react-native-paper": "5.15.0",
|
|
124
|
+
"react-native-safe-area-context": "5.4.0",
|
|
125
|
+
"react-native-screens": "~4.11.1",
|
|
128
126
|
"release-it": "^14.2.2",
|
|
129
127
|
"typescript": "^5.3.3"
|
|
130
128
|
},
|
|
131
129
|
"peerDependencies": {
|
|
132
130
|
"@apollo/client": "^3.5.6",
|
|
133
131
|
"@expo-google-fonts/ibm-plex-sans": "^0.4.1",
|
|
134
|
-
"@react-native-async-storage/async-storage": "2.
|
|
135
|
-
"@react-native-community/datetimepicker": "8.
|
|
132
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
133
|
+
"@react-native-community/datetimepicker": "8.4.1",
|
|
136
134
|
"@react-native-community/netinfo": "11.4.1",
|
|
137
|
-
"@react-native-firebase/analytics": "
|
|
138
|
-
"@react-native-firebase/app": "
|
|
139
|
-
"@react-native-firebase/crashlytics": "
|
|
140
|
-
"@react-native-firebase/messaging": "
|
|
141
|
-
"@react-native-firebase/remote-config": "
|
|
142
|
-
"@react-
|
|
143
|
-
"@react-navigation/native
|
|
144
|
-
"@
|
|
145
|
-
"
|
|
146
|
-
"
|
|
147
|
-
"expo
|
|
148
|
-
"expo-
|
|
149
|
-
"expo-
|
|
150
|
-
"expo-
|
|
151
|
-
"expo-
|
|
152
|
-
"expo-
|
|
153
|
-
"expo-
|
|
135
|
+
"@react-native-firebase/analytics": "22.4.0",
|
|
136
|
+
"@react-native-firebase/app": "22.4.0",
|
|
137
|
+
"@react-native-firebase/crashlytics": "22.4.0",
|
|
138
|
+
"@react-native-firebase/messaging": "22.4.0",
|
|
139
|
+
"@react-native-firebase/remote-config": "22.4.0",
|
|
140
|
+
"@react-native-community/slider": "5.2.0",
|
|
141
|
+
"@react-navigation/native": "7.1.6",
|
|
142
|
+
"@react-navigation/native-stack": "7.3.5",
|
|
143
|
+
"@sentry/react-native": "~6.22.0",
|
|
144
|
+
"axios": "1.14.0",
|
|
145
|
+
"expo": "~53.0.20",
|
|
146
|
+
"expo-blur": "~14.1.5",
|
|
147
|
+
"expo-camera": "~16.1.11",
|
|
148
|
+
"expo-file-system": "~18.1.11",
|
|
149
|
+
"expo-font": "~13.3.2",
|
|
150
|
+
"expo-image": "~2.4.1",
|
|
151
|
+
"expo-image-picker": "~16.1.4",
|
|
152
|
+
"expo-location": "~18.1.6",
|
|
153
|
+
"expo-sqlite": "~15.2.14",
|
|
154
154
|
"graphql": "^16.2.0",
|
|
155
|
-
"react": "
|
|
156
|
-
"react-native": "0.
|
|
157
|
-
"react-native-compressor": "^1.
|
|
155
|
+
"react": "19.0.0",
|
|
156
|
+
"react-native": "0.79.6",
|
|
157
|
+
"react-native-compressor": "^1.16.0",
|
|
158
158
|
"react-native-dropdown-picker": "^5.4.0",
|
|
159
159
|
"react-native-get-random-values": "~1.11.0",
|
|
160
|
-
"react-native-paper": "5.
|
|
161
|
-
"react-native-safe-area-context": "5.
|
|
162
|
-
"react-native-screens": "4.
|
|
160
|
+
"react-native-paper": "5.15.0",
|
|
161
|
+
"react-native-safe-area-context": "5.4.0",
|
|
162
|
+
"react-native-screens": "~4.11.1"
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
|
-
"@coralogix/react-native-sdk": "^1.0.
|
|
166
|
-
"@os1-platform/platform-coreos-execution-engine-sdk": "1.1.
|
|
165
|
+
"@coralogix/react-native-sdk": "^1.0.26",
|
|
166
|
+
"@os1-platform/platform-coreos-execution-engine-sdk": "1.1.7",
|
|
167
|
+
"@react-native-vector-icons/ant-design": "^12.3.0",
|
|
168
|
+
"@react-native-vector-icons/entypo": "^12.3.0",
|
|
169
|
+
"@react-native-vector-icons/evil-icons": "^12.3.0",
|
|
170
|
+
"@react-native-vector-icons/feather": "^12.3.0",
|
|
171
|
+
"@react-native-vector-icons/material-design-icons": "^12.3.0",
|
|
172
|
+
"@react-native-vector-icons/material-icons": "^12.3.0",
|
|
167
173
|
"@rjsf/core": "^2.2.0",
|
|
168
|
-
"apollo-link-timeout": "^
|
|
174
|
+
"apollo-link-timeout": "^5.0.4",
|
|
169
175
|
"decompress": "^4.2.1",
|
|
170
176
|
"i18n-js": "^4.3.2",
|
|
171
177
|
"json-logic-js": "^2.0.1",
|
|
@@ -174,15 +180,14 @@
|
|
|
174
180
|
"latlng-to-dms": "^1.0.2",
|
|
175
181
|
"lodash": "^4.17.21",
|
|
176
182
|
"react-native-fs": "^2.20.0",
|
|
177
|
-
"
|
|
183
|
+
"promise": "^8.3.0",
|
|
184
|
+
"react-native-image-marker": "1.2.11",
|
|
178
185
|
"react-native-otp-textinput": "1.1.7",
|
|
179
|
-
"react-native-svg": "15.11.
|
|
186
|
+
"react-native-svg": "15.11.2",
|
|
180
187
|
"recyclerlistview": "^4.2.0",
|
|
181
188
|
"rjsf-native": "^1.0.14",
|
|
182
189
|
"toggle-switch-react-native": "^3.3.0",
|
|
183
|
-
"uuid-by-string": "^4.0.0"
|
|
184
|
-
"@react-native-vector-icons/material-design-icons": "^12.3.0",
|
|
185
|
-
"@react-native-vector-icons/material-icons": "^12.3.0"
|
|
190
|
+
"uuid-by-string": "^4.0.0"
|
|
186
191
|
},
|
|
187
192
|
"husky": {},
|
|
188
193
|
"commitlint": {
|
|
@@ -21,7 +21,7 @@ import ReasonCodeContainer from '../../../manager/dispatchCodes/ReasonCodeContai
|
|
|
21
21
|
import type { ReasonsRow } from '../../../manager/syncmanager/DBConfig';
|
|
22
22
|
import EventCodeContainer from '../../../manager/dispatchCodes/EventCodeContainer';
|
|
23
23
|
import IconButton from '../../widgets/IconButton';
|
|
24
|
-
import
|
|
24
|
+
import AntDesign from '@react-native-vector-icons/ant-design';
|
|
25
25
|
import { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../analytics/sentry/SentrySdkConstants';
|
|
26
26
|
import { fireEventWithScreenName } from '../../../analytics/sentry/SentryAnalyticsUtils';
|
|
27
27
|
|