@os1-platform/dispatch-mobile 2.1.5 → 2.1.7
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/lib/commonjs/analytics/firebase/FirebaseLogging.js +24 -0
- package/lib/commonjs/analytics/firebase/FirebaseLogging.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js +44 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js +83 -0
- package/lib/commonjs/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentryModels.js +6 -0
- package/lib/commonjs/analytics/sentry/SentryModels.js.map +1 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js +78 -0
- package/lib/commonjs/analytics/sentry/SentrySdkConstants.js.map +1 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js +51 -0
- package/lib/commonjs/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js +23 -0
- package/lib/commonjs/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js +16 -0
- package/lib/commonjs/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js +52 -2
- package/lib/commonjs/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js +16 -0
- package/lib/commonjs/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js +41 -4
- package/lib/commonjs/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js +16 -0
- package/lib/commonjs/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js +23 -0
- package/lib/commonjs/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js +41 -18
- package/lib/commonjs/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
- package/lib/commonjs/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
- package/lib/commonjs/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
- package/lib/commonjs/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js +71 -6
- package/lib/commonjs/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
- package/lib/commonjs/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js +37 -0
- package/lib/commonjs/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
- package/lib/commonjs/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js +16 -0
- package/lib/commonjs/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js +44 -0
- package/lib/commonjs/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js +40 -1
- package/lib/commonjs/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
- package/lib/commonjs/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
- package/lib/commonjs/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/commonjs/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
- package/lib/commonjs/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/commonjs/components/widgets/CancelOrderDialog.js +16 -0
- package/lib/commonjs/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/commonjs/components/widgets/Card.js +17 -1
- package/lib/commonjs/components/widgets/Card.js.map +1 -1
- package/lib/commonjs/components/widgets/ModalWidget.js +22 -2
- package/lib/commonjs/components/widgets/ModalWidget.js.map +1 -1
- package/lib/commonjs/components/widgets/SearchBar.js +9 -0
- package/lib/commonjs/components/widgets/SearchBar.js.map +1 -1
- package/lib/commonjs/components/widgets/SnackBarCustom.js +9 -0
- package/lib/commonjs/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/commonjs/components/widgets/SplitTextInput.js +9 -0
- package/lib/commonjs/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/commonjs/components/widgets/TabsComponent.js +12 -1
- package/lib/commonjs/components/widgets/TabsComponent.js.map +1 -1
- package/lib/commonjs/index.js +53 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/manager/location/LocationManager.js +9 -2
- package/lib/commonjs/manager/location/LocationManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js +3 -3
- package/lib/commonjs/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js +3 -2
- package/lib/commonjs/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js +8 -1
- package/lib/commonjs/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js +3 -1
- package/lib/commonjs/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js +77 -3
- package/lib/commonjs/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js +17 -3
- package/lib/commonjs/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js +206 -6
- package/lib/commonjs/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/commonjs/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/commonjs/models/sdk.js.map +1 -1
- package/lib/commonjs/styles/executionTasks/CommonStyles.js +4 -4
- package/lib/commonjs/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js +18 -1
- package/lib/commonjs/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DoodleScreen.js +9 -0
- package/lib/commonjs/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js +10 -1
- package/lib/commonjs/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FormsScreen.js +7 -0
- package/lib/commonjs/ui/screens/FormsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/GeofenceScreen.js +12 -0
- package/lib/commonjs/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js +9 -0
- package/lib/commonjs/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentScreen.js +9 -0
- package/lib/commonjs/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PickupScreen.js +9 -0
- package/lib/commonjs/ui/screens/PickupScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js +12 -0
- package/lib/commonjs/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/commonjs/utils/ExecTaskUtils.js +30 -13
- package/lib/commonjs/utils/ExecTaskUtils.js.map +1 -1
- package/lib/commonjs/utils/Logger.js +54 -41
- package/lib/commonjs/utils/Logger.js.map +1 -1
- package/lib/commonjs/utils/SyncManagerUtils.js +12 -2
- package/lib/commonjs/utils/SyncManagerUtils.js.map +1 -1
- package/lib/commonjs/utils/utils.js +24 -0
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/module/analytics/firebase/FirebaseLogging.js +17 -0
- package/lib/module/analytics/firebase/FirebaseLogging.js.map +1 -0
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js +37 -0
- package/lib/module/analytics/sentry/SentryAnalyticsSingleton.js.map +1 -0
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js +74 -0
- package/lib/module/analytics/sentry/SentryAnalyticsUtils.js.map +1 -0
- package/lib/module/analytics/sentry/SentryModels.js +2 -0
- package/lib/module/analytics/sentry/SentryModels.js.map +1 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js +72 -0
- package/lib/module/analytics/sentry/SentrySdkConstants.js.map +1 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js +51 -0
- package/lib/module/components/executiontasks/cancellation/CancelET.js.map +1 -1
- package/lib/module/components/executiontasks/captureInput/CaptureText.js +23 -0
- package/lib/module/components/executiontasks/captureInput/CaptureText.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/DeliverET.js +16 -0
- package/lib/module/components/executiontasks/deliver/DeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js +52 -2
- package/lib/module/components/executiontasks/deliver/SLDeliverET.js.map +1 -1
- package/lib/module/components/executiontasks/display/DisplayModalET.js +16 -0
- package/lib/module/components/executiontasks/display/DisplayModalET.js.map +1 -1
- package/lib/module/components/executiontasks/doodle/SignatureET.js +41 -4
- package/lib/module/components/executiontasks/doodle/SignatureET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/DropCashET.js +16 -0
- package/lib/module/components/executiontasks/dropCash/DropCashET.js.map +1 -1
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js +23 -0
- package/lib/module/components/executiontasks/dropCash/SLDropCash.js.map +1 -1
- package/lib/module/components/executiontasks/forms/FormGenerator.js +41 -18
- package/lib/module/components/executiontasks/forms/FormGenerator.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js +14 -3
- package/lib/module/components/executiontasks/forms/widgets/DateTimeWidget.js.map +1 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js +12 -1
- package/lib/module/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureSchema.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js +29 -16
- package/lib/module/components/executiontasks/imageCapture/CaptureUtils.js.map +1 -1
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js +72 -7
- package/lib/module/components/executiontasks/imageCapture/ImageCapture.js.map +1 -1
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js +23 -0
- package/lib/module/components/executiontasks/payments/completePayment/CompletePaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js +37 -0
- package/lib/module/components/executiontasks/payments/init/InitPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js +23 -0
- package/lib/module/components/executiontasks/payments/processPayment/ProcessPaymentET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/PickupET.js +16 -0
- package/lib/module/components/executiontasks/pickup/PickupET.js.map +1 -1
- package/lib/module/components/executiontasks/pickup/SLPickupET.js +44 -0
- package/lib/module/components/executiontasks/pickup/SLPickupET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/ScanET.js +40 -1
- package/lib/module/components/executiontasks/scan/ScanET.js.map +1 -1
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js +23 -0
- package/lib/module/components/executiontasks/scan/sub_components/SummaryPage.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js +30 -0
- package/lib/module/components/executiontasks/validateOTP/ValidateOTPET.js.map +1 -1
- package/lib/module/components/executiontasks/validateOTP/sub-components/OTPInput.js.map +1 -1
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js +9 -0
- package/lib/module/components/executiontasks/verifyOtp/VerifyOtpET.js.map +1 -1
- package/lib/module/components/widgets/CancelOrderDialog.js +16 -0
- package/lib/module/components/widgets/CancelOrderDialog.js.map +1 -1
- package/lib/module/components/widgets/Card.js +17 -1
- package/lib/module/components/widgets/Card.js.map +1 -1
- package/lib/module/components/widgets/ModalWidget.js +22 -2
- package/lib/module/components/widgets/ModalWidget.js.map +1 -1
- package/lib/module/components/widgets/SearchBar.js +9 -0
- package/lib/module/components/widgets/SearchBar.js.map +1 -1
- package/lib/module/components/widgets/SnackBarCustom.js +9 -0
- package/lib/module/components/widgets/SnackBarCustom.js.map +1 -1
- package/lib/module/components/widgets/SplitTextInput.js +9 -0
- package/lib/module/components/widgets/SplitTextInput.js.map +1 -1
- package/lib/module/components/widgets/TabsComponent.js +12 -1
- package/lib/module/components/widgets/TabsComponent.js.map +1 -1
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/manager/location/LocationManager.js +9 -2
- package/lib/module/manager/location/LocationManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSDKManager.js +3 -3
- package/lib/module/manager/sdk/DispatchSDKManager.js.map +1 -1
- package/lib/module/manager/sdk/DispatchSdkCache.js +3 -2
- package/lib/module/manager/sdk/DispatchSdkCache.js.map +1 -1
- package/lib/module/manager/sdk/callbacksHandler.js +8 -1
- package/lib/module/manager/sdk/callbacksHandler.js.map +1 -1
- package/lib/module/manager/syncmanager/DBConfig.js +3 -1
- package/lib/module/manager/syncmanager/DBConfig.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js +77 -3
- package/lib/module/manager/syncmanager/document/DocumentHttpClient.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentManager.js +17 -3
- package/lib/module/manager/syncmanager/document/DocumentManager.js.map +1 -1
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js +207 -7
- package/lib/module/manager/syncmanager/document/DocumentSyncManager.js.map +1 -1
- package/lib/module/models/execTasks/ETBaseModels.js.map +1 -1
- package/lib/module/models/sdk.js.map +1 -1
- package/lib/module/styles/executionTasks/CommonStyles.js +5 -5
- package/lib/module/styles/executionTasks/CommonStyles.js.map +1 -1
- package/lib/module/ui/screens/DeliverScreen.js +18 -1
- package/lib/module/ui/screens/DeliverScreen.js.map +1 -1
- package/lib/module/ui/screens/DoodleScreen.js +9 -0
- package/lib/module/ui/screens/DoodleScreen.js.map +1 -1
- package/lib/module/ui/screens/DropCashScreen.js +10 -0
- package/lib/module/ui/screens/DropCashScreen.js.map +1 -1
- package/lib/module/ui/screens/FormsScreen.js +7 -0
- package/lib/module/ui/screens/FormsScreen.js.map +1 -1
- package/lib/module/ui/screens/GeofenceScreen.js +12 -0
- package/lib/module/ui/screens/GeofenceScreen.js.map +1 -1
- package/lib/module/ui/screens/ImageCaptureScreen.js +9 -0
- package/lib/module/ui/screens/ImageCaptureScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentScreen.js +9 -0
- package/lib/module/ui/screens/PaymentScreen.js.map +1 -1
- package/lib/module/ui/screens/PickupScreen.js +9 -0
- package/lib/module/ui/screens/PickupScreen.js.map +1 -1
- package/lib/module/ui/screens/ValidateOTPScreen.js +12 -0
- package/lib/module/ui/screens/ValidateOTPScreen.js.map +1 -1
- package/lib/module/utils/ExecTaskUtils.js +30 -13
- package/lib/module/utils/ExecTaskUtils.js.map +1 -1
- package/lib/module/utils/Logger.js +54 -39
- package/lib/module/utils/Logger.js.map +1 -1
- package/lib/module/utils/SyncManagerUtils.js +12 -2
- package/lib/module/utils/SyncManagerUtils.js.map +1 -1
- package/lib/module/utils/utils.js +22 -0
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/typescript/analytics/firebase/FirebaseLogging.d.ts +2 -0
- package/lib/typescript/analytics/sentry/SentryAnalyticsSingleton.d.ts +11 -0
- package/lib/typescript/analytics/sentry/SentryAnalyticsUtils.d.ts +2 -0
- package/lib/typescript/analytics/sentry/SentryModels.d.ts +15 -0
- package/lib/typescript/analytics/sentry/SentrySdkConstants.d.ts +66 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureSchema.d.ts +4 -0
- package/lib/typescript/components/executiontasks/imageCapture/CaptureUtils.d.ts +7 -1
- package/lib/typescript/index.d.ts +7 -0
- package/lib/typescript/manager/dispatch/DispatchStateContainer.d.ts +2 -0
- package/lib/typescript/manager/location/LocationManager.d.ts +1 -0
- package/lib/typescript/manager/sdk/DispatchSdkCache.d.ts +2 -0
- package/lib/typescript/manager/sdk/callbacksHandler.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/DBConfig.d.ts +4 -0
- package/lib/typescript/manager/syncmanager/document/DocumentManager.d.ts +3 -1
- package/lib/typescript/manager/syncmanager/document/DocumentSyncManager.d.ts +5 -1
- package/lib/typescript/models/execTasks/ETBaseModels.d.ts +25 -6
- package/lib/typescript/models/sdk.d.ts +1 -0
- package/lib/typescript/styles/executionTasks/CommonStyles.d.ts +4 -4
- package/lib/typescript/utils/Logger.d.ts +0 -3
- package/lib/typescript/utils/SyncManagerUtils.d.ts +1 -1
- package/lib/typescript/utils/utils.d.ts +4 -0
- package/package.json +10 -7
- package/src/analytics/firebase/FirebaseLogging.ts +25 -0
- package/src/analytics/sentry/SentryAnalyticsSingleton.ts +35 -0
- package/src/analytics/sentry/SentryAnalyticsUtils.ts +77 -0
- package/src/analytics/sentry/SentryModels.ts +18 -0
- package/src/analytics/sentry/SentrySdkConstants.ts +77 -0
- package/src/components/executiontasks/cancellation/CancelET.tsx +25 -2
- package/src/components/executiontasks/captureInput/CaptureText.tsx +15 -2
- package/src/components/executiontasks/deliver/DeliverET.tsx +8 -0
- package/src/components/executiontasks/deliver/SLDeliverET.tsx +22 -5
- package/src/components/executiontasks/display/DisplayModalET.tsx +8 -0
- package/src/components/executiontasks/doodle/SignatureET.tsx +37 -4
- package/src/components/executiontasks/dropCash/DropCashET.tsx +9 -0
- package/src/components/executiontasks/dropCash/SLDropCash.tsx +11 -0
- package/src/components/executiontasks/forms/FormGenerator.tsx +46 -29
- package/src/components/executiontasks/forms/widgets/DateTimeWidget.tsx +10 -3
- package/src/components/executiontasks/forms/widgets/QRBarcodeScannerWidget.tsx +8 -1
- package/src/components/executiontasks/imageCapture/CaptureSchema.ts +4 -0
- package/src/components/executiontasks/imageCapture/CaptureUtils.ts +45 -18
- package/src/components/executiontasks/imageCapture/ImageCapture.tsx +42 -7
- package/src/components/executiontasks/payments/completePayment/CompletePaymentET.tsx +11 -0
- package/src/components/executiontasks/payments/init/InitPaymentET.tsx +17 -0
- package/src/components/executiontasks/payments/processPayment/ProcessPaymentET.tsx +11 -0
- package/src/components/executiontasks/pickup/PickupET.tsx +8 -0
- package/src/components/executiontasks/pickup/SLPickupET.tsx +19 -0
- package/src/components/executiontasks/scan/ScanET.tsx +19 -1
- package/src/components/executiontasks/scan/sub_components/SummaryPage.tsx +11 -0
- package/src/components/executiontasks/validateOTP/ValidateOTPET.tsx +14 -0
- package/src/components/executiontasks/validateOTP/sub-components/OTPInput.tsx +2 -0
- package/src/components/executiontasks/verifyOtp/VerifyOtpET.tsx +5 -0
- package/src/components/widgets/CancelOrderDialog.tsx +7 -0
- package/src/components/widgets/Card.tsx +9 -1
- package/src/components/widgets/ModalWidget.tsx +16 -2
- package/src/components/widgets/SearchBar.tsx +6 -1
- package/src/components/widgets/SnackBarCustom.tsx +4 -0
- package/src/components/widgets/SplitTextInput.tsx +6 -0
- package/src/components/widgets/TabsComponent.tsx +8 -1
- package/src/index.tsx +10 -3
- package/src/manager/location/LocationManager.ts +8 -1
- package/src/manager/sdk/DispatchSDKManager.ts +8 -2
- package/src/manager/sdk/DispatchSdkCache.ts +2 -1
- package/src/manager/sdk/callbacksHandler.ts +12 -1
- package/src/manager/syncmanager/DBConfig.ts +4 -0
- package/src/manager/syncmanager/document/DocumentHttpClient.ts +105 -5
- package/src/manager/syncmanager/document/DocumentManager.ts +28 -2
- package/src/manager/syncmanager/document/DocumentSyncManager.ts +230 -5
- package/src/models/execTasks/ETBaseModels.ts +20 -7
- package/src/models/sdk.ts +1 -0
- package/src/styles/executionTasks/CommonStyles.ts +5 -5
- package/src/ui/screens/DeliverScreen.tsx +9 -0
- package/src/ui/screens/DoodleScreen.tsx +5 -0
- package/src/ui/screens/DropCashScreen.tsx +6 -0
- package/src/ui/screens/FormsScreen.tsx +3 -0
- package/src/ui/screens/GeofenceScreen.tsx +11 -1
- package/src/ui/screens/ImageCaptureScreen.tsx +5 -0
- package/src/ui/screens/PaymentScreen.tsx +5 -0
- package/src/ui/screens/PickupScreen.tsx +7 -1
- package/src/ui/screens/ValidateOTPScreen.tsx +10 -0
- package/src/utils/ExecTaskUtils.ts +36 -10
- package/src/utils/Logger.ts +50 -51
- package/src/utils/SyncManagerUtils.ts +20 -2
- package/src/utils/utils.ts +23 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativePaper","_reactNativeSvg","_OTPInput","_interopRequireDefault","_useTimer","_CommonStyles","_utils","_constants","_ETConfig","_ExecTaskUtils","_EventCodeContainer","_SnackBarCustom","_MaterialIcons","_constants2","_utils2","_GoBackModal","_native","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ValidateOTPET","props","_props$generationLogi","_props$generationLogi2","showBackModal","setShowBackModal","useState","useFocusEffect","React","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","hasGoBackConnector","applicableReasons","navigation","goBack","BackHandler","addEventListener","removeEventListener","useLayoutEffect","setOptions","title","headerLeft","createElement","onPress","_props$taskMeta2","name","color","size","style","paddingRight","paddingTop","retryConfig","parseRetryConfig","generationLogic","initialMinute","Math","floor","delay","initialSeconds","parseInt","toFixed","timer","resetTimer","useTimer","sendOTP","setSendOTP","Boolean","generateOnLoad","retryCount","setRetryCount","userInput","setUserInput","captureInput","otpCode","setOTPCode","hasError","setHasError","errorMessage","setErrorMessage","snackBar","setSnackBar","show","type","SnackBarType","SUCCESS","message","renderButtons","View","styles","bottomView","Button","CommonStyles","nextButton","width","marginStart","labelStyle","nextButtonLabel","mode","uppercase","_props$generationLogi3","response","generateOTP","api","ERROR_GENERATING_OTP","FAILURE","length","INVALID_OTP_LENGTH","replace","isValid","checkForValidation","validation","INVALID_OTP","_props$applicableReas","onSubmitET","getBaseETResponse","EntityCode","VALIDATE_OTP_ET","getEventCodeByET","ExecutionTaskID","success","mergedObjectiveId","cancelButton","marginEnd","cancelButtonLabel","_props$applicableReas2","failure","renderRetryButton","_props$generationLogi4","enableRetry","retryButton","disabled","maxAttempt","buttonTitle","renderErrorMessage","Text","renderModal","showModal","setShowModal","onSuccess","GO_BACK_EVENT_CODE","onFailure","Provider","mainContainer","flex","justifyContent","alignItems","marginHorizontal","marginBottom","Platform","OS","SvgXml","xml","mobileSVG","marginTop","titleText","visible","onDismiss","_props$captureInput","otpContainer","otpTitle","input","_default","exports","StyleSheet","create","flexDirection","padding","backgroundColor","fontFamily","Fonts","IBMPlexSans_400Regular","fontStyle","fontSize","lineHeight","letterSpacing","textAlign","marginVertical","subText","modalContent","modalView","borderRadius"],"sources":["ValidateOTPET.tsx"],"sourcesContent":["import { View, Text, StyleSheet, BackHandler, Platform } from 'react-native';\nimport React, { useState, useLayoutEffect } from 'react';\nimport { Button, Modal, Portal, Provider } from 'react-native-paper';\nimport { SvgXml } from 'react-native-svg';\nimport OTPInput from './sub-components/OTPInput';\nimport type { ValidateOTPInput } from './ValidateOTPSchema';\nimport useTimer from '../../../utils/hooks/useTimer';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { generateOTP, parseRetryConfig } from './utils';\nimport { checkForValidation } from './utils';\nimport {\n ERROR_GENERATING_OTP,\n INVALID_OTP,\n INVALID_OTP_LENGTH,\n mobileSVG,\n} from './constants';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport SnackBarCustom, {\n SnackBarType,\n} from '../../../components/widgets/SnackBarCustom';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { useFocusEffect } from '@react-navigation/native';\n\nconst ValidateOTPET = (props: ValidateOTPInput) => {\n const [showBackModal, setShowBackModal] = useState(false);\n\n // Handle back-button click\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const retryConfig = parseRetryConfig(props.generationLogic?.retryConfig);\n\n const initialMinute = Math.floor(retryConfig.delay / 60);\n const initialSeconds = parseInt((retryConfig.delay % 60).toFixed(0));\n const [timer, resetTimer] = useTimer({\n initialMinute,\n initialSeconds,\n });\n\n const [sendOTP, setSendOTP] = useState(\n Boolean(props.generationLogic?.generateOnLoad)\n );\n const [retryCount, setRetryCount] = useState(0);\n\n const [userInput, setUserInput] = useState({\n captureInput: '',\n });\n const { captureInput: otpCode } = userInput;\n\n const setOTPCode = (otpCode: string) => {\n setUserInput({ ...userInput, captureInput: otpCode });\n };\n\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n\n const [snackBar, setSnackBar] = useState({\n show: false,\n type: SnackBarType.SUCCESS,\n message: '',\n });\n\n const renderButtons = () => {\n return (\n <View style={styles.bottomView}>\n <View>\n <Button\n style={[CommonStyles.nextButton, { width: 165, marginStart: 10 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n uppercase={false}\n onPress={async () => {\n // send OTP Generation using props\n if (\n sendOTP &&\n props.generationLogic &&\n props.generationLogic?.generateOnLoad\n ) {\n const response = await generateOTP(props.generationLogic.api);\n resetTimer();\n if (response) setSendOTP(false);\n else\n setSnackBar({\n show: true,\n message: ERROR_GENERATING_OTP,\n type: SnackBarType.FAILURE,\n });\n }\n // check for Validation\n else if (!sendOTP) {\n if (otpCode.length < props.captureInput.length) {\n setSnackBar({\n show: true,\n message: INVALID_OTP_LENGTH.replace(\n '<length>',\n `${props.captureInput.length}`\n ),\n type: SnackBarType.FAILURE,\n });\n } else {\n const isValid = await checkForValidation(\n otpCode,\n props.validation,\n { userInput }\n );\n\n if (!isValid) {\n setErrorMessage(INVALID_OTP);\n setHasError(true);\n } else {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n true,\n getEventCodeByET(\n ExecutionTaskID.VALIDATE_OTP_ET,\n true,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n }\n }\n }\n }}\n >\n Proceed\n </Button>\n </View>\n <View>\n <Button\n style={[CommonStyles.cancelButton, { width: 165, marginEnd: 10 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n // Cancel the ET\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n false,\n getEventCodeByET(\n ExecutionTaskID.VALIDATE_OTP_ET,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n }}\n >\n Skip\n </Button>\n </View>\n </View>\n );\n };\n\n const renderRetryButton = () => {\n const generationLogic = props.generationLogic;\n const enableRetry = props.generationLogic?.enableRetry;\n\n if (generationLogic && enableRetry) {\n return (\n <View style={styles.retryButton}>\n <Button\n disabled={Boolean(timer) || retryCount === retryConfig.maxAttempt}\n uppercase={false}\n onPress={async () => {\n setOTPCode('');\n setRetryCount((retryCount) => retryCount + 1);\n await generateOTP(generationLogic.api);\n resetTimer();\n }}\n >{`${retryConfig.buttonTitle} ${timer ? `in ${timer}` : ''}`}</Button>\n </View>\n );\n } else return null;\n };\n\n const renderErrorMessage = () => {\n return errorMessage ? (\n <Text style={styles.errorMessage}>{errorMessage}</Text>\n ) : null;\n };\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n if (sendOTP) {\n return (\n <Provider>\n <View style={CommonStyles.mainContainer}>\n {renderModal()}\n <View\n style={{\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n marginHorizontal: 18,\n }}\n >\n <View style={{ marginBottom: 16 }}>\n {Platform.OS === 'android' && <SvgXml xml={mobileSVG} /> }\n </View>\n <View style={{ marginTop: 16 }}>\n <Text style={styles.titleText}>\n Do you want to proceed to OTP verification? This will send a\n verification code to your consignee.\n </Text>\n </View>\n </View>\n {renderButtons()}\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n />\n </View>\n </Provider>\n );\n }\n if (!sendOTP) {\n return (\n <Provider>\n <View style={CommonStyles.mainContainer}>\n {renderModal()}\n <View style={styles.otpContainer}>\n <View style={styles.otpTitle}>\n <Text>\n Enter the {props.captureInput?.length} digit OTP sent to the\n consignee to confirm order completion\n </Text>\n </View>\n <OTPInput\n input={props.captureInput}\n otpCode={otpCode}\n setOTPCode={setOTPCode}\n hasError={hasError}\n setHasError={setHasError}\n setErrorMessage={setErrorMessage}\n />\n {renderErrorMessage()}\n {renderRetryButton()}\n </View>\n {renderButtons()}\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n />\n </View>\n </Provider>\n );\n }\n return null;\n};\n\nexport default ValidateOTPET;\n\nconst styles = StyleSheet.create({\n bottomView: {\n flexDirection: 'row-reverse',\n justifyContent: 'space-evenly',\n padding: 16,\n backgroundColor: 'white',\n },\n titleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 16,\n lineHeight: 20,\n letterSpacing: 0.25,\n textAlign: 'center',\n color: '#3D445C',\n marginBottom: 10,\n },\n otpTitle: {\n marginTop: 10,\n marginBottom: 20,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 16,\n lineHeight: 20,\n letterSpacing: 0.25,\n color: '#3D445C',\n alignItems: 'center',\n },\n otpContainer: {\n marginTop: 20,\n marginBottom: 40,\n marginHorizontal: 10,\n flex: 1,\n },\n retryButton: {\n alignItems: 'flex-start',\n marginVertical: 10,\n },\n errorMessage: {\n marginTop: 16,\n marginHorizontal: 10,\n color: '#DC2626',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n },\n subText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AAEA,IAAAO,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AAEA,IAAAU,UAAA,GAAAV,OAAA;AAMA,IAAAW,SAAA,GAAAX,OAAA;AAIA,IAAAY,cAAA,GAAAZ,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,eAAA,GAAAZ,uBAAA,CAAAF,OAAA;AAGA,IAAAe,cAAA,GAAAT,sBAAA,CAAAN,OAAA;AACA,IAAAgB,WAAA,GAAAhB,OAAA;AACA,IAAAiB,OAA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E,EAAE;IACXc,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativePaper","_reactNativeSvg","_OTPInput","_interopRequireDefault","_useTimer","_CommonStyles","_utils","_constants","_ETConfig","_ExecTaskUtils","_EventCodeContainer","_SnackBarCustom","_MaterialIcons","_constants2","_utils2","_GoBackModal","_native","_SentrySdkConstants","_SentryAnalyticsUtils","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ValidateOTPET","props","_props$generationLogi","_props$generationLogi2","showBackModal","setShowBackModal","useState","useFocusEffect","React","useCallback","onBackPress","_props$taskMeta","taskMeta","enableGoBack","hasGoBackConnector","applicableReasons","navigation","goBack","BackHandler","addEventListener","removeEventListener","useLayoutEffect","setOptions","title","headerLeft","createElement","onPress","_props$taskMeta2","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","VALIDATE_OTP_ET_SCREEN","name","color","size","style","paddingRight","paddingTop","retryConfig","parseRetryConfig","generationLogic","initialMinute","Math","floor","delay","initialSeconds","parseInt","toFixed","timer","resetTimer","useTimer","sendOTP","setSendOTP","Boolean","generateOnLoad","retryCount","setRetryCount","userInput","setUserInput","captureInput","otpCode","setOTPCode","hasError","setHasError","errorMessage","setErrorMessage","snackBar","setSnackBar","show","type","SnackBarType","SUCCESS","message","renderButtons","View","styles","bottomView","Button","CommonStyles","nextButton","width","marginStart","labelStyle","nextButtonLabel","mode","uppercase","_props$generationLogi3","response","generateOTP","api","ERROR_GENERATING_OTP","FAILURE","length","INVALID_OTP_LENGTH","replace","isValid","checkForValidation","validation","INVALID_OTP","_props$applicableReas","onSubmitET","getBaseETResponse","EntityCode","VALIDATE_OTP_ET","getEventCodeByET","ExecutionTaskID","success","mergedObjectiveId","cancelButton","marginEnd","cancelButtonLabel","_props$applicableReas2","failure","renderRetryButton","_props$generationLogi4","enableRetry","retryButton","disabled","maxAttempt","buttonTitle","renderErrorMessage","Text","renderModal","showModal","setShowModal","onSuccess","GO_BACK_EVENT_CODE","onFailure","Provider","mainContainer","flex","justifyContent","alignItems","marginHorizontal","marginBottom","Platform","OS","SvgXml","xml","mobileSVG","marginTop","titleText","visible","onDismiss","_props$captureInput","otpContainer","otpTitle","input","_default","exports","StyleSheet","create","flexDirection","padding","backgroundColor","fontFamily","Fonts","IBMPlexSans_400Regular","fontStyle","fontSize","lineHeight","letterSpacing","textAlign","marginVertical","subText","modalContent","modalView","borderRadius"],"sources":["ValidateOTPET.tsx"],"sourcesContent":["import { View, Text, StyleSheet, BackHandler, Platform } from 'react-native';\nimport React, { useState, useLayoutEffect } from 'react';\nimport { Button, Modal, Portal, Provider } from 'react-native-paper';\nimport { SvgXml } from 'react-native-svg';\nimport OTPInput from './sub-components/OTPInput';\nimport type { ValidateOTPInput } from './ValidateOTPSchema';\nimport useTimer from '../../../utils/hooks/useTimer';\nimport {\n CommonStyles,\n Fonts,\n} from '../../../styles/executionTasks/CommonStyles';\nimport { generateOTP, parseRetryConfig } from './utils';\nimport { checkForValidation } from './utils';\nimport {\n ERROR_GENERATING_OTP,\n INVALID_OTP,\n INVALID_OTP_LENGTH,\n mobileSVG,\n} from './constants';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport { getEventCodeByET } from '../../../manager/dispatchCodes/EventCodeContainer';\nimport SnackBarCustom, {\n SnackBarType,\n} from '../../../components/widgets/SnackBarCustom';\nimport Icon from 'react-native-vector-icons/MaterialIcons';\nimport { GO_BACK_EVENT_CODE } from '../../../constants/constants';\nimport { hasGoBackConnector } from '../../../components/utils';\nimport GoBackModal from '../../../components/widgets/GoBackModal';\nimport { useFocusEffect } from '@react-navigation/native';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../../analytics/sentry/SentryAnalyticsUtils';\n\nconst ValidateOTPET = (props: ValidateOTPInput) => {\n const [showBackModal, setShowBackModal] = useState(false);\n\n // Handle back-button click\n useFocusEffect(\n React.useCallback(() => {\n const onBackPress = () => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n ) {\n setShowBackModal(true);\n return true;\n } else {\n props.navigation.goBack();\n return true;\n }\n };\n BackHandler.addEventListener('hardwareBackPress', onBackPress);\n return () =>\n BackHandler.removeEventListener('hardwareBackPress', onBackPress);\n }, [])\n );\n\n useLayoutEffect(() => {\n props.navigation.setOptions({\n title: props.title,\n headerLeft: () => {\n return (\n <Icon\n onPress={() => {\n if (\n props.taskMeta?.enableGoBack &&\n hasGoBackConnector(props.applicableReasons)\n )\n setShowBackModal(true);\n else props.navigation.goBack();\n const cta = 'Arrow Back';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.VALIDATE_OTP_ET_SCREEN, cta: cta }); \n \n }}\n name=\"arrow-back\"\n color={'black'}\n size={25}\n style={{\n paddingRight: 15,\n paddingTop: 5,\n }}\n />\n );\n },\n });\n }, [props.navigation, props.title]);\n\n const retryConfig = parseRetryConfig(props.generationLogic?.retryConfig);\n\n const initialMinute = Math.floor(retryConfig.delay / 60);\n const initialSeconds = parseInt((retryConfig.delay % 60).toFixed(0));\n const [timer, resetTimer] = useTimer({\n initialMinute,\n initialSeconds,\n });\n\n const [sendOTP, setSendOTP] = useState(\n Boolean(props.generationLogic?.generateOnLoad)\n );\n const [retryCount, setRetryCount] = useState(0);\n\n const [userInput, setUserInput] = useState({\n captureInput: '',\n });\n const { captureInput: otpCode } = userInput;\n\n const setOTPCode = (otpCode: string) => {\n setUserInput({ ...userInput, captureInput: otpCode });\n };\n\n const [hasError, setHasError] = useState(false);\n const [errorMessage, setErrorMessage] = useState('');\n\n const [snackBar, setSnackBar] = useState({\n show: false,\n type: SnackBarType.SUCCESS,\n message: '',\n });\n\n const renderButtons = () => {\n return (\n <View style={styles.bottomView}>\n <View>\n <Button\n style={[CommonStyles.nextButton, { width: 165, marginStart: 10 }]}\n labelStyle={CommonStyles.nextButtonLabel}\n mode={'contained'}\n uppercase={false}\n onPress={async () => {\n // send OTP Generation using props\n if (\n sendOTP &&\n props.generationLogic &&\n props.generationLogic?.generateOnLoad\n ) {\n const response = await generateOTP(props.generationLogic.api);\n resetTimer();\n if (response) setSendOTP(false);\n else\n setSnackBar({\n show: true,\n message: ERROR_GENERATING_OTP,\n type: SnackBarType.FAILURE,\n });\n }\n // check for Validation\n else if (!sendOTP) {\n if (otpCode.length < props.captureInput.length) {\n setSnackBar({\n show: true,\n message: INVALID_OTP_LENGTH.replace(\n '<length>',\n `${props.captureInput.length}`\n ),\n type: SnackBarType.FAILURE,\n });\n } else {\n const isValid = await checkForValidation(\n otpCode,\n props.validation,\n { userInput }\n );\n\n if (!isValid) {\n setErrorMessage(INVALID_OTP);\n setHasError(true);\n } else {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n true,\n getEventCodeByET(\n ExecutionTaskID.VALIDATE_OTP_ET,\n true,\n props.applicableReasons?.success\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n }\n }\n }\n const cta = 'Proceed';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.VALIDATE_OTP_ET_SCREEN, cta: cta }); \n \n }}\n >\n Proceed\n </Button>\n </View>\n <View>\n <Button\n style={[CommonStyles.cancelButton, { width: 165, marginEnd: 10 }]}\n labelStyle={CommonStyles.cancelButtonLabel}\n mode={'outlined'}\n uppercase={false}\n onPress={async () => {\n // Cancel the ET\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n false,\n getEventCodeByET(\n ExecutionTaskID.VALIDATE_OTP_ET,\n false,\n props.applicableReasons?.failure\n ),\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n const cta = 'Skip';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.VALIDATE_OTP_ET_SCREEN, cta: cta }); \n \n }}\n >\n Skip\n </Button>\n </View>\n </View>\n );\n };\n\n const renderRetryButton = () => {\n const generationLogic = props.generationLogic;\n const enableRetry = props.generationLogic?.enableRetry;\n\n if (generationLogic && enableRetry) {\n return (\n <View style={styles.retryButton}>\n <Button\n disabled={Boolean(timer) || retryCount === retryConfig.maxAttempt}\n uppercase={false}\n onPress={async () => {\n setOTPCode('');\n setRetryCount((retryCount) => retryCount + 1);\n await generateOTP(generationLogic.api);\n resetTimer();\n const cta = retryConfig.buttonTitle;\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.VALIDATE_OTP_ET_SCREEN, cta: cta }); \n \n }}\n >{`${retryConfig.buttonTitle} ${timer ? `in ${timer}` : ''}`}</Button>\n </View>\n );\n } else return null;\n };\n\n const renderErrorMessage = () => {\n return errorMessage ? (\n <Text style={styles.errorMessage}>{errorMessage}</Text>\n ) : null;\n };\n\n const renderModal = () => {\n return (\n <GoBackModal\n showModal={showBackModal}\n setShowModal={setShowBackModal}\n onSuccess={async () => {\n props.onSubmitET({\n ...(await getBaseETResponse(\n EntityCode.VALIDATE_OTP_ET,\n false,\n GO_BACK_EVENT_CODE,\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VALIDATE_OTP_ET\n )),\n });\n setShowBackModal(false);\n }}\n onFailure={() => setShowBackModal(false)}\n />\n );\n };\n\n if (sendOTP) {\n return (\n <Provider>\n <View style={CommonStyles.mainContainer}>\n {renderModal()}\n <View\n style={{\n flex: 1,\n justifyContent: 'center',\n alignItems: 'center',\n marginHorizontal: 18,\n }}\n >\n <View style={{ marginBottom: 16 }}>\n {Platform.OS === 'android' && <SvgXml xml={mobileSVG} /> }\n </View>\n <View style={{ marginTop: 16 }}>\n <Text style={styles.titleText}>\n Do you want to proceed to OTP verification? This will send a\n verification code to your consignee.\n </Text>\n </View>\n </View>\n {renderButtons()}\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n />\n </View>\n </Provider>\n );\n }\n if (!sendOTP) {\n return (\n <Provider>\n <View style={CommonStyles.mainContainer}>\n {renderModal()}\n <View style={styles.otpContainer}>\n <View style={styles.otpTitle}>\n <Text>\n Enter the {props.captureInput?.length} digit OTP sent to the\n consignee to confirm order completion\n </Text>\n </View>\n <OTPInput\n input={props.captureInput}\n otpCode={otpCode}\n setOTPCode={setOTPCode}\n hasError={hasError}\n setHasError={setHasError}\n setErrorMessage={setErrorMessage}\n />\n {renderErrorMessage()}\n {renderRetryButton()}\n </View>\n {renderButtons()}\n <SnackBarCustom\n type={snackBar.type}\n message={`${snackBar.message}`}\n visible={snackBar.show}\n onDismiss={() => {\n setSnackBar({\n show: false,\n message: '',\n type: SnackBarType.SUCCESS,\n });\n }}\n />\n </View>\n </Provider>\n );\n }\n return null;\n};\n\nexport default ValidateOTPET;\n\nconst styles = StyleSheet.create({\n bottomView: {\n flexDirection: 'row-reverse',\n justifyContent: 'space-evenly',\n padding: 16,\n backgroundColor: 'white',\n },\n titleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 16,\n lineHeight: 20,\n letterSpacing: 0.25,\n textAlign: 'center',\n color: '#3D445C',\n marginBottom: 10,\n },\n otpTitle: {\n marginTop: 10,\n marginBottom: 20,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 16,\n lineHeight: 20,\n letterSpacing: 0.25,\n color: '#3D445C',\n alignItems: 'center',\n },\n otpContainer: {\n marginTop: 20,\n marginBottom: 40,\n marginHorizontal: 10,\n flex: 1,\n },\n retryButton: {\n alignItems: 'flex-start',\n marginVertical: 10,\n },\n errorMessage: {\n marginTop: 16,\n marginHorizontal: 10,\n color: '#DC2626',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n },\n subText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 14,\n letterSpacing: 0.25,\n lineHeight: 20,\n textAlign: 'center',\n color: '#000000',\n marginBottom: 10,\n },\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n flex: 1,\n marginBottom: 60,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AAEA,IAAAO,SAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAIA,IAAAS,MAAA,GAAAT,OAAA;AAEA,IAAAU,UAAA,GAAAV,OAAA;AAMA,IAAAW,SAAA,GAAAX,OAAA;AAIA,IAAAY,cAAA,GAAAZ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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_SplitTextInput","_interopRequireDefault","_CommonStyles","_ValidateOTPSchema","_constants","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","OTPInput","props","maximumCodeLength","input","length","keyboardType","inputType","InputType","NUMBER","useEffect","validationRegex","otpCode","regex","RegExp","hasError","test","setHasError","setErrorMessage","INVALID_REGEX","createElement","Fragment","Pressable","onPress","Keyboard","dismiss","styles","text","value","onChange","setOTPCode","maxLength","_default","exports","StyleSheet","create","fontFamily","Platform","OS","Fonts","IBMPlexSans_400Regular","color","fontSize","textAlign","errorMessage","marginTop","marginHorizontal","lineHeight"],"sources":["OTPInput.tsx"],"sourcesContent":["import { StyleSheet, Pressable, Keyboard, Platform } from 'react-native';\nimport React, { useEffect } from 'react';\nimport SplitTextInput from '../../../widgets/SplitTextInput';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport { InputType, CaptureInput } from '../ValidateOTPSchema';\nimport { INVALID_REGEX } from '../constants';\n\nexport interface OTPInputProps {\n input: CaptureInput;\n otpCode: string;\n setOTPCode: (otpCode: string) => void;\n hasError: boolean;\n setHasError: (hasError: boolean) => void;\n setErrorMessage: (errorMessage: string) => void;\n}\n\nconst OTPInput = (props: OTPInputProps) => {\n const maximumCodeLength = props.input.length;\n const keyboardType =\n props.input.inputType === InputType.NUMBER ? 'number-pad' : 'default';\n\n useEffect(() => {\n if (\n props.input.validationRegex &&\n props.otpCode.length === maximumCodeLength\n ) {\n const regex = new RegExp(props.input.validationRegex);\n const hasError = !regex.test(props.otpCode);\n\n props.setHasError(hasError);\n if (hasError) props.setErrorMessage(INVALID_REGEX);\n else props.setErrorMessage('');\n }\n }, [props.otpCode]);\n\n return (\n <>\n <Pressable onPress={Keyboard.dismiss}>\n <SplitTextInput\n styles={styles.text}\n value={props.otpCode}\n onChange={(text) => {\n if (props.input.validationRegex) {\n }\n if (props.hasError) {\n props.setErrorMessage('');\n props.setHasError(false);\n }\n props.setOTPCode(text);\n }}\n maxLength={maximumCodeLength}\n keyboardType={keyboardType}\n hasError={props.hasError}\n />\n </Pressable>\n </>\n );\n};\n\nexport default OTPInput;\n\nconst styles = StyleSheet.create({\n text: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n color: '#3D445C',\n fontSize: 20,\n textAlign: 'center',\n },\n errorMessage: {\n marginTop: 16,\n marginHorizontal: 10,\n color: '#DC2626',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontSize: 12,\n lineHeight: 16,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAA6C,SAAAI,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAZ,CAAA,oBAAAY,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAY,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAX,CAAA,EAAAY,CAAA,UAAAI,CAAA,KAAAA,CAAA,CAAAX,GAAA,IAAAW,CAAA,CAAAC,GAAA,IAAAR,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAI,CAAA,IAAAV,CAAA,CAAAM,CAAA,IAAAZ,CAAA,CAAAY,CAAA,YAAAN,CAAA,CAAAR,OAAA,GAAAE,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAc,GAAA,CAAAjB,CAAA,EAAAM,CAAA,GAAAA,CAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_SplitTextInput","_interopRequireDefault","_CommonStyles","_ValidateOTPSchema","_constants","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","OTPInput","props","maximumCodeLength","input","length","keyboardType","inputType","InputType","NUMBER","useEffect","validationRegex","otpCode","regex","RegExp","hasError","test","setHasError","setErrorMessage","INVALID_REGEX","createElement","Fragment","Pressable","onPress","Keyboard","dismiss","styles","text","value","onChange","setOTPCode","maxLength","_default","exports","StyleSheet","create","fontFamily","Platform","OS","Fonts","IBMPlexSans_400Regular","color","fontSize","textAlign","errorMessage","marginTop","marginHorizontal","lineHeight"],"sources":["OTPInput.tsx"],"sourcesContent":["import { StyleSheet, Pressable, Keyboard, Platform } from 'react-native';\nimport React, { useEffect } from 'react';\nimport SplitTextInput from '../../../widgets/SplitTextInput';\nimport { Fonts } from '../../../../styles/executionTasks/CommonStyles';\nimport { InputType, CaptureInput } from '../ValidateOTPSchema';\nimport { INVALID_REGEX } from '../constants';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../../../analytics/sentry/SentryAnalyticsUtils';\n\nexport interface OTPInputProps {\n input: CaptureInput;\n otpCode: string;\n setOTPCode: (otpCode: string) => void;\n hasError: boolean;\n setHasError: (hasError: boolean) => void;\n setErrorMessage: (errorMessage: string) => void;\n}\n\nconst OTPInput = (props: OTPInputProps) => {\n const maximumCodeLength = props.input.length;\n const keyboardType =\n props.input.inputType === InputType.NUMBER ? 'number-pad' : 'default';\n\n useEffect(() => {\n if (\n props.input.validationRegex &&\n props.otpCode.length === maximumCodeLength\n ) {\n const regex = new RegExp(props.input.validationRegex);\n const hasError = !regex.test(props.otpCode);\n\n props.setHasError(hasError);\n if (hasError) props.setErrorMessage(INVALID_REGEX);\n else props.setErrorMessage('');\n }\n }, [props.otpCode]);\n\n return (\n <>\n <Pressable onPress={Keyboard.dismiss}>\n <SplitTextInput\n styles={styles.text}\n value={props.otpCode}\n onChange={(text) => {\n if (props.input.validationRegex) {\n }\n if (props.hasError) {\n props.setErrorMessage('');\n props.setHasError(false);\n }\n props.setOTPCode(text);\n }}\n maxLength={maximumCodeLength}\n keyboardType={keyboardType}\n hasError={props.hasError}\n />\n </Pressable>\n </>\n );\n};\n\nexport default OTPInput;\n\nconst styles = StyleSheet.create({\n text: {\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n color: '#3D445C',\n fontSize: 20,\n textAlign: 'center',\n },\n errorMessage: {\n marginTop: 16,\n marginHorizontal: 10,\n color: '#DC2626',\n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("../../widgets/Toaster");
|
|
12
12
|
var _ExecTaskUtils = require("../../../utils/ExecTaskUtils");
|
|
13
13
|
var _ETConfig = require("../../../models/execTasks/ETConfig");
|
|
14
|
+
var _SentrySdkConstants = require("../../../analytics/sentry/SentrySdkConstants");
|
|
15
|
+
var _SentryAnalyticsUtils = require("../../../analytics/sentry/SentryAnalyticsUtils");
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
18
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -48,6 +50,13 @@ const VerifyOtpET = props => {
|
|
|
48
50
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Haven't received the sms?"), /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
|
|
49
51
|
onPress: () => {
|
|
50
52
|
(0, _Toaster.showToast)('Resending OTP');
|
|
53
|
+
const cta = 'Send again';
|
|
54
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
55
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
56
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
57
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.VERIFY_OTP_ET_SCREEN,
|
|
58
|
+
cta: cta
|
|
59
|
+
});
|
|
51
60
|
},
|
|
52
61
|
style: styles.sendAgainText
|
|
53
62
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, null, "Send again")))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeOtpTextinput","_interopRequireDefault","_reactNativePaper","_Toaster","_ExecTaskUtils","_ETConfig","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","VerifyOtpET","props","otpInput","useRef","backButtonHandler","useEffect","BackHandler","addEventListener","removeEventListener","createElement","View","style","styles","otpInputTextView","Text","veriOtpText","textInputStyle","otpInputStyle","ref","inputCount","tintColor","Colors","blue300","handleTextChange","value","length","onSubmit","getBaseETResponse","EntityCode","VERIFY_INPUT","mergedObjectiveId","ExecutionTaskID","otpNotReceivedView","Pressable","onPress","showToast","sendAgainText","_default","exports","StyleSheet","create","backIconView","marginTop","marginStart","fontSize","color","black","borderRadius","borderWidth","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection"],"sources":["VerifyOtpET.tsx"],"sourcesContent":["import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\n// @ts-ignore\nimport OTPTextView from 'react-native-otp-textinput';\nimport { Colors } from 'react-native-paper';\nimport { showToast } from '../../widgets/Toaster';\nimport type { OtpInputSchema } from './VerifyOtpSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\n\nconst VerifyOtpET = (props: OtpInputSchema) => {\n const otpInput = useRef();\n\n function backButtonHandler() {\n return true;\n }\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', backButtonHandler);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);\n };\n }, []);\n\n return (\n <View>\n <View style={styles.otpInputTextView}>\n <Text style={styles.veriOtpText}>Verify OTP</Text>\n <OTPTextView\n textInputStyle={styles.otpInputStyle}\n ref={otpInput}\n inputCount={props.inputCount}\n tintColor={Colors.blue300}\n handleTextChange={async (value: string) => {\n if (value.length === props.inputCount) {\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_INPUT,\n true,\n '',\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_INPUT\n )),\n });\n }\n }}\n />\n <View style={styles.otpNotReceivedView}>\n <Text>Haven't received the sms?</Text>\n\n <Pressable\n onPress={() => {\n showToast('Resending OTP');\n }}\n style={styles.sendAgainText}\n >\n <Text>Send again</Text>\n </Pressable>\n </View>\n </View>\n </View>\n );\n};\nexport default VerifyOtpET;\n\nconst styles = StyleSheet.create({\n backIconView: {\n marginTop: 22,\n marginStart: 22,\n },\n veriOtpText: {\n fontSize: 24,\n color: Colors.black,\n marginTop: 40,\n },\n otpInputStyle: {\n borderRadius: 4,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 12,\n marginTop: 32,\n },\n otpInputTextView: {\n marginHorizontal: 17,\n },\n otpNotReceivedView: {\n flexDirection: 'row',\n marginTop: 10,\n },\n sendAgainText: {\n marginHorizontal: 8,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAEA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeOtpTextinput","_interopRequireDefault","_reactNativePaper","_Toaster","_ExecTaskUtils","_ETConfig","_SentrySdkConstants","_SentryAnalyticsUtils","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","VerifyOtpET","props","otpInput","useRef","backButtonHandler","useEffect","BackHandler","addEventListener","removeEventListener","createElement","View","style","styles","otpInputTextView","Text","veriOtpText","textInputStyle","otpInputStyle","ref","inputCount","tintColor","Colors","blue300","handleTextChange","value","length","onSubmit","getBaseETResponse","EntityCode","VERIFY_INPUT","mergedObjectiveId","ExecutionTaskID","otpNotReceivedView","Pressable","onPress","showToast","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","VERIFY_OTP_ET_SCREEN","sendAgainText","_default","exports","StyleSheet","create","backIconView","marginTop","marginStart","fontSize","color","black","borderRadius","borderWidth","paddingHorizontal","paddingVertical","marginHorizontal","flexDirection"],"sources":["VerifyOtpET.tsx"],"sourcesContent":["import { BackHandler, Pressable, StyleSheet, Text, View } from 'react-native';\nimport React, { useEffect, useRef } from 'react';\n// @ts-ignore\nimport OTPTextView from 'react-native-otp-textinput';\nimport { Colors } from 'react-native-paper';\nimport { showToast } from '../../widgets/Toaster';\nimport type { OtpInputSchema } from './VerifyOtpSchema';\nimport { getBaseETResponse } from '../../../utils/ExecTaskUtils';\nimport {\n EntityCode,\n ExecutionTaskID,\n} from '../../../models/execTasks/ETConfig';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../../analytics/sentry/SentryAnalyticsUtils';\n\nconst VerifyOtpET = (props: OtpInputSchema) => {\n const otpInput = useRef();\n\n function backButtonHandler() {\n return true;\n }\n useEffect(() => {\n BackHandler.addEventListener('hardwareBackPress', backButtonHandler);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', backButtonHandler);\n };\n }, []);\n\n return (\n <View>\n <View style={styles.otpInputTextView}>\n <Text style={styles.veriOtpText}>Verify OTP</Text>\n <OTPTextView\n textInputStyle={styles.otpInputStyle}\n ref={otpInput}\n inputCount={props.inputCount}\n tintColor={Colors.blue300}\n handleTextChange={async (value: string) => {\n if (value.length === props.inputCount) {\n props.onSubmit({\n ...(await getBaseETResponse(\n EntityCode.VERIFY_INPUT,\n true,\n '',\n '',\n props.mergedObjectiveId,\n ExecutionTaskID.VERIFY_INPUT\n )),\n });\n }\n }}\n />\n <View style={styles.otpNotReceivedView}>\n <Text>Haven't received the sms?</Text>\n\n <Pressable\n onPress={() => {\n showToast('Resending OTP');\n const cta = 'Send again';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.VERIFY_OTP_ET_SCREEN, cta: cta }); \n \n }}\n style={styles.sendAgainText}\n >\n <Text>Send again</Text>\n </Pressable>\n </View>\n </View>\n </View>\n );\n};\nexport default VerifyOtpET;\n\nconst styles = StyleSheet.create({\n backIconView: {\n marginTop: 22,\n marginStart: 22,\n },\n veriOtpText: {\n fontSize: 24,\n color: Colors.black,\n marginTop: 40,\n },\n otpInputStyle: {\n borderRadius: 4,\n borderWidth: 1,\n paddingHorizontal: 16,\n paddingVertical: 12,\n marginTop: 32,\n },\n otpInputTextView: {\n marginHorizontal: 17,\n },\n otpNotReceivedView: {\n flexDirection: 'row',\n marginTop: 10,\n },\n sendAgainText: {\n marginHorizontal: 8,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAEA,IAAAO,cAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AAIA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,qBAAA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;IAChBiD,gBAAgB,EAAE;EACpB,CAAC;EACD9B,kBAAkB,EAAE;IAClB+B,aAAa,EAAE,KAAK;IACpBV,SAAS,EAAE;EACb,CAAC;EACDN,aAAa,EAAE;IACbe,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC"}
|
|
@@ -10,6 +10,8 @@ var _CommonStyles = require("../../styles/executionTasks/CommonStyles");
|
|
|
10
10
|
var _reactNativePaper = require("react-native-paper");
|
|
11
11
|
var _MaterialCommunityIcons = _interopRequireDefault(require("react-native-vector-icons/MaterialCommunityIcons"));
|
|
12
12
|
var _SdkColors = _interopRequireWildcard(require("../../styles/SdkColors"));
|
|
13
|
+
var _SentrySdkConstants = require("../../analytics/sentry/SentrySdkConstants");
|
|
14
|
+
var _SentryAnalyticsUtils = require("../../analytics/sentry/SentryAnalyticsUtils");
|
|
13
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -55,6 +57,13 @@ const CancelOrderDialog = props => {
|
|
|
55
57
|
style: _CommonStyles.CommonStyles.nextButton,
|
|
56
58
|
onPress: () => {
|
|
57
59
|
props.onSubmit(true);
|
|
60
|
+
const cta = props.positiveButtonTitle ?? 'Yes';
|
|
61
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
62
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
63
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
64
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.CANCEL_ORDER_DIALOG_SCREEN,
|
|
65
|
+
cta: cta
|
|
66
|
+
});
|
|
58
67
|
},
|
|
59
68
|
testID: "primary"
|
|
60
69
|
}, props.positiveButtonTitle ?? 'Yes'), /*#__PURE__*/_react.default.createElement(_reactNativePaper.Button, {
|
|
@@ -66,6 +75,13 @@ const CancelOrderDialog = props => {
|
|
|
66
75
|
}],
|
|
67
76
|
onPress: async () => {
|
|
68
77
|
props.onSubmit(false);
|
|
78
|
+
const cta = props.negativeButtonTitle ?? 'No';
|
|
79
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
80
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
81
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
82
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.CANCEL_ORDER_DIALOG_SCREEN,
|
|
83
|
+
cta: cta
|
|
84
|
+
});
|
|
69
85
|
},
|
|
70
86
|
testID: "secondary"
|
|
71
87
|
}, props.negativeButtonTitle ?? 'No')))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_CommonStyles","_reactNativePaper","_MaterialCommunityIcons","_SdkColors","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","CancelOrderDialog","props","createElement","Modal","animationType","transparent","visible","onRequestClose","View","style","styles","wrapper","content","showIcon","iconName","alignSelf","size","name","color","SdkColors","ColorTheme","LIGHT","primaryButton","Title","fontFamily","Platform","OS","Fonts","IBMPlexSans_600SemiBold","marginTop","marginBottom","textAlign","label","message","Paragraph","fontSize","IBMPlexSans_400Regular","Button","mode","uppercase","labelStyle","CommonStyles","nextButtonLabel","nextButton","onPress","onSubmit","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_CommonStyles","_reactNativePaper","_MaterialCommunityIcons","_SdkColors","_interopRequireWildcard","_SentrySdkConstants","_SentryAnalyticsUtils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","CancelOrderDialog","props","createElement","Modal","animationType","transparent","visible","onRequestClose","View","style","styles","wrapper","content","showIcon","iconName","alignSelf","size","name","color","SdkColors","ColorTheme","LIGHT","primaryButton","Title","fontFamily","Platform","OS","Fonts","IBMPlexSans_600SemiBold","marginTop","marginBottom","textAlign","label","message","Paragraph","fontSize","IBMPlexSans_400Regular","Button","mode","uppercase","labelStyle","CommonStyles","nextButtonLabel","nextButton","onPress","onSubmit","cta","positiveButtonTitle","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","CANCEL_ORDER_DIALOG_SCREEN","testID","cancelButtonLabel","cancelButton","negativeButtonTitle","StyleSheet","create","backgroundColor","padding","borderRadius","width","flex","alignItems","justifyContent","_default","exports"],"sources":["CancelOrderDialog.tsx"],"sourcesContent":["import React from 'react';\nimport { Modal, Platform, StyleSheet, View } from 'react-native';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { Button, Paragraph, Title } from 'react-native-paper';\nimport Icon from 'react-native-vector-icons/MaterialCommunityIcons';\nimport SdkColors, { ColorTheme } from '../../styles/SdkColors';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\nconst CancelOrderDialog = (props: CancelDialogProps) => {\n return (\n <Modal\n animationType=\"none\"\n transparent={true}\n visible={props.visible}\n onRequestClose={() => {}}\n >\n <View style={styles.wrapper}>\n <View style={styles.content}>\n {props.showIcon && props.iconName && (\n <Icon\n style={{ alignSelf: 'center' }}\n size={34}\n name={props.iconName}\n color={SdkColors[ColorTheme.LIGHT].primaryButton}\n />\n )}\n <Title\n style={{\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n marginTop: 0,\n marginBottom: 15,\n textAlign: 'center',\n color: '#000000',\n }}\n >\n {props.label ?? 'Cancel Order'}\n </Title>\n {props.message && (\n <Paragraph\n style={{\n textAlign: 'center',\n fontSize: 14,\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n }}\n >\n {props.message}\n </Paragraph>\n )}\n <View style={{ marginTop: 20 }}>\n <Button\n mode={'outlined'}\n uppercase={false}\n labelStyle={CommonStyles.nextButtonLabel}\n style={CommonStyles.nextButton}\n onPress={() => {\n props.onSubmit(true);\n const cta = props.positiveButtonTitle ?? 'Yes';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.CANCEL_ORDER_DIALOG_SCREEN, cta: cta }); \n \n }}\n testID=\"primary\"\n >\n {props.positiveButtonTitle ?? 'Yes'}\n </Button>\n <Button\n uppercase={false}\n mode={'outlined'}\n labelStyle={CommonStyles.cancelButtonLabel}\n style={[CommonStyles.cancelButton, { marginTop: 10 }]}\n onPress={async () => {\n props.onSubmit(false);\n const cta = props.negativeButtonTitle ?? 'No';\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.CANCEL_ORDER_DIALOG_SCREEN, cta: cta });\n }}\n testID=\"secondary\"\n >\n {props.negativeButtonTitle ?? 'No'}\n </Button>\n </View>\n </View>\n </View>\n </Modal>\n );\n};\n\nconst styles = StyleSheet.create({\n content: {\n backgroundColor: 'white',\n padding: 20,\n borderRadius: 5,\n width: '80%',\n },\n wrapper: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(0,0,0,0.7)',\n },\n});\n\nexport default CancelOrderDialog;\n\nexport interface CancelDialogProps {\n visible: boolean;\n onSubmit: (success: boolean) => void;\n label?: string;\n message?: string;\n positiveButtonTitle?: string;\n negativeButtonTitle?: string;\n showIcon?: boolean;\n iconName?: string;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,uBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,UAAA,GAAAC,uBAAA,CAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAR,OAAA;AAAsF,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ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E;IACPoD,eAAe,EAAE,OAAO;IACxBC,OAAO,EAAE,EAAE;IACXC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE;EACT,CAAC;EACDxD,OAAO,EAAE;IACPyD,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBN,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAO,QAAA,GAAAC,OAAA,CAAAxF,OAAA,GAEYgB,iBAAiB"}
|
|
@@ -8,6 +8,8 @@ var _reactNative = require("react-native");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactNativePaper = require("react-native-paper");
|
|
10
10
|
var _vectorIcons = require("@expo/vector-icons");
|
|
11
|
+
var _SentrySdkConstants = require("../../analytics/sentry/SentrySdkConstants");
|
|
12
|
+
var _SentryAnalyticsUtils = require("../../analytics/sentry/SentryAnalyticsUtils");
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
const Card = props => {
|
|
13
15
|
var _props$selectConfig, _props$renderAddition;
|
|
@@ -19,6 +21,13 @@ const Card = props => {
|
|
|
19
21
|
onPress: () => {
|
|
20
22
|
var _props$selectConfig2, _props$selectConfig3;
|
|
21
23
|
(_props$selectConfig2 = props.selectConfig) === null || _props$selectConfig2 === void 0 || _props$selectConfig2.onSelect((_props$selectConfig3 = props.selectConfig) === null || _props$selectConfig3 === void 0 ? void 0 : _props$selectConfig3.props);
|
|
24
|
+
const cta = "Checkbox checked";
|
|
25
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
26
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
27
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
28
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.CARD_WIDGET_SCREEN,
|
|
29
|
+
cta: cta
|
|
30
|
+
});
|
|
22
31
|
},
|
|
23
32
|
theme: {
|
|
24
33
|
roundness: 5
|
|
@@ -34,7 +43,14 @@ const Card = props => {
|
|
|
34
43
|
}), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
35
44
|
onPress: () => {
|
|
36
45
|
var _props$editConfig, _props$editConfig2;
|
|
37
|
-
|
|
46
|
+
(_props$editConfig = props.editConfig) === null || _props$editConfig === void 0 || _props$editConfig.onEdit((_props$editConfig2 = props.editConfig) === null || _props$editConfig2 === void 0 ? void 0 : _props$editConfig2.props);
|
|
47
|
+
const cta = "Edit";
|
|
48
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
49
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
50
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
51
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.CARD_WIDGET_SCREEN,
|
|
52
|
+
cta: cta
|
|
53
|
+
});
|
|
38
54
|
},
|
|
39
55
|
style: styles.icon
|
|
40
56
|
}, /*#__PURE__*/_react.default.createElement(_vectorIcons.Feather, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativePaper","_vectorIcons","obj","__esModule","default","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","View","style","styles","container","Checkbox","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","theme","roundness","body","header","Text","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","TouchableOpacity","_props$editConfig","_props$editConfig2","onEdit","icon","Feather","name","size","color","_default","exports","StyleSheet","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 '@expo/vector-icons';\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 }}\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 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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativePaper","_vectorIcons","_SentrySdkConstants","_SentryAnalyticsUtils","obj","__esModule","default","Card","props","_props$selectConfig","_props$renderAddition","isSelected","selectConfig","createElement","View","style","styles","container","Checkbox","status","onPress","_props$selectConfig2","_props$selectConfig3","onSelect","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","CARD_WIDGET_SCREEN","theme","roundness","body","header","Text","title","renderAdditionalHeader","call","Body","editConfig","Fragment","divider","TouchableOpacity","_props$editConfig","_props$editConfig2","onEdit","icon","Feather","name","size","color","_default","exports","StyleSheet","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 '@expo/vector-icons';\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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBA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Q;IACnBC,MAAM,EAAE;EACV;AACF,CAAC,CAAC"}
|
|
@@ -8,6 +8,8 @@ var _reactNative = require("react-native");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _reactNativePaper = require("react-native-paper");
|
|
10
10
|
var _CommonStyles = require("../../styles/executionTasks/CommonStyles");
|
|
11
|
+
var _SentrySdkConstants = require("../../analytics/sentry/SentrySdkConstants");
|
|
12
|
+
var _SentryAnalyticsUtils = require("../../analytics/sentry/SentryAnalyticsUtils");
|
|
11
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
14
|
const ModalWidget = props => {
|
|
13
15
|
var _props$renderAddition, _props$renderChildren, _props$renderAddition2;
|
|
@@ -50,13 +52,31 @@ const ModalWidget = props => {
|
|
|
50
52
|
style: buttonStyle
|
|
51
53
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
52
54
|
style: [_CommonStyles.CommonStyles.nextButton, primaryBtnStyles],
|
|
53
|
-
onPress:
|
|
55
|
+
onPress: () => {
|
|
56
|
+
props.primaryButton.onPress();
|
|
57
|
+
const cta = props.primaryButton.label;
|
|
58
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
59
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
60
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
61
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.MODEL_WIDGET_SCREEN,
|
|
62
|
+
cta: cta
|
|
63
|
+
});
|
|
64
|
+
},
|
|
54
65
|
disabled: primaryButtonDisabled
|
|
55
66
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
56
67
|
style: [_CommonStyles.CommonStyles.nextButtonLabel, primaryBtnLabelStyles]
|
|
57
68
|
}, props.primaryButton.label)), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
58
69
|
style: [_CommonStyles.CommonStyles.cancelButton, secondaryBtnStyles],
|
|
59
|
-
onPress:
|
|
70
|
+
onPress: () => {
|
|
71
|
+
props.secondaryButton.onPress();
|
|
72
|
+
const cta = props.secondaryButton.label;
|
|
73
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
74
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
75
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
76
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.MODEL_WIDGET_SCREEN,
|
|
77
|
+
cta: cta
|
|
78
|
+
});
|
|
79
|
+
},
|
|
60
80
|
disabled: secondaryButtonDisabled
|
|
61
81
|
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
62
82
|
style: [_CommonStyles.CommonStyles.cancelButtonLabel, secondaryBtnLabelStyles]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativePaper","_CommonStyles","obj","__esModule","default","ModalWidget","props","_props$renderAddition","_props$renderChildren","_props$renderAddition2","dismissable","contentContainerStyle","modalStyle","title","styles","titleStyle","subTitle","subTitleStyle","bodyStyle","buttonStyle","primaryButton","disabled","primaryButtonDisabled","primaryBtnStyles","labelStyles","primaryBtnLabelStyles","secondaryButton","secondaryButtonDisabled","secondaryBtnStyles","secondaryBtnLabelStyles","createElement","Portal","Modal","visible","showModal","modalContent","View","style","modalView","renderAdditionalHeader","call","Text","titleText","label","subTitleText","renderChildren","TouchableOpacity","CommonStyles","nextButton","onPress","nextButtonLabel","cancelButton","cancelButtonLabel","renderAdditionalButtons","_default","exports","StyleSheet","create","marginStart","marginEnd","marginBottom","flex","backgroundColor","padding","borderRadius","justifyContent","fontFamily","Platform","OS","Fonts","IBMPlexSans_600SemiBold","fontStyle","fontSize","lineHeight","textAlign","color","IBMPlexSans_400Regular"],"sources":["ModalWidget.tsx"],"sourcesContent":["import { View, Text, StyleSheet, ViewStyle, TextStyle, Platform } from 'react-native';\nimport React from 'react';\nimport { Portal, Modal } from 'react-native-paper';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { TouchableOpacity } from 'react-native';\n\ninterface ButtonProps {\n label: string;\n disabled?: boolean;\n onPress: (() => void) | (() => Promise<any>);\n styles?: ViewStyle;\n labelStyles?: TextStyle;\n}\n\ninterface TitleProps {\n label: string;\n styles?: TextStyle;\n}\n\nexport interface ModalProps {\n showModal: boolean;\n dismissable?: boolean;\n title: TitleProps;\n subTitle?: TitleProps;\n contentContainerStyle?: ViewStyle;\n modalStyle?: ViewStyle;\n bodyStyle?: ViewStyle;\n renderChildren?: () => JSX.Element;\n buttonStyle?: ViewStyle;\n primaryButton: ButtonProps;\n secondaryButton: ButtonProps;\n renderAdditionalButtons?: () => JSX.Element;\n renderAdditionalHeader?: () => JSX.Element;\n}\n\nconst ModalWidget = (props: ModalProps) => {\n const {\n dismissable = true,\n contentContainerStyle = {},\n modalStyle = {},\n title: { styles: titleStyle = {} },\n subTitle: { styles: subTitleStyle = {} } = {},\n bodyStyle = {},\n buttonStyle = {},\n primaryButton: {\n disabled: primaryButtonDisabled = false,\n styles: primaryBtnStyles = {},\n labelStyles: primaryBtnLabelStyles = {},\n },\n secondaryButton: {\n disabled: secondaryButtonDisabled = false,\n styles: secondaryBtnStyles = {},\n labelStyles: secondaryBtnLabelStyles = {},\n },\n } = props;\n return (\n <Portal>\n <Modal\n visible={props.showModal}\n dismissable={dismissable}\n contentContainerStyle={[styles.modalContent, contentContainerStyle]}\n >\n <View style={[styles.modalView, modalStyle]}>\n <View style={bodyStyle}>\n {props.renderAdditionalHeader?.()}\n <Text style={[styles.titleText, titleStyle]}>\n {props.title.label}\n </Text>\n {props.subTitle ? (\n <Text style={[styles.subTitleText, subTitleStyle]}>\n {props.subTitle.label}\n </Text>\n ) : null}\n {props.renderChildren?.()}\n </View>\n\n <View style={buttonStyle}>\n <TouchableOpacity\n style={[CommonStyles.nextButton, primaryBtnStyles]}\n onPress={props.primaryButton.onPress}\n disabled={primaryButtonDisabled}\n >\n <Text\n style={[CommonStyles.nextButtonLabel, primaryBtnLabelStyles]}\n >\n {props.primaryButton.label}\n </Text>\n </TouchableOpacity>\n <TouchableOpacity\n style={[CommonStyles.cancelButton, secondaryBtnStyles]}\n onPress={props.secondaryButton.onPress}\n disabled={secondaryButtonDisabled}\n >\n <Text\n style={[\n CommonStyles.cancelButtonLabel,\n secondaryBtnLabelStyles,\n ]}\n >\n {props.secondaryButton.label}\n </Text>\n </TouchableOpacity>\n {props.renderAdditionalButtons?.()}\n </View>\n </View>\n </Modal>\n </Portal>\n );\n};\n\nexport default ModalWidget;\n\ninterface StyleSheetType {\n modalContent: ViewStyle;\n modalView: ViewStyle;\n titleText: TextStyle;\n subTitleText: TextStyle;\n}\n\nconst styles = StyleSheet.create<StyleSheetType>({\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n marginBottom: 60,\n flex: 1,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n marginBottom: 10,\n },\n subTitleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_400Regular\n : 'IBMPlexSans-Regular',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n color: '#000000',\n marginBottom: 10,\n },\n});\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA+E,SAAAE,uBAAAG,GAAA,WAAA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;EACDhB,YAAY,EAAE;IACZqB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EACRC,qBAAQ,CAACC,EAAE,KAAK,SAAS,GACrBC,mBAAK,CAACO,sBAAsB,GAC5B,qBAAqB;IAC3BL,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdE,KAAK,EAAE,SAAS;IAChBf,YAAY,EAAE;EAChB;AACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativePaper","_CommonStyles","_SentrySdkConstants","_SentryAnalyticsUtils","obj","__esModule","default","ModalWidget","props","_props$renderAddition","_props$renderChildren","_props$renderAddition2","dismissable","contentContainerStyle","modalStyle","title","styles","titleStyle","subTitle","subTitleStyle","bodyStyle","buttonStyle","primaryButton","disabled","primaryButtonDisabled","primaryBtnStyles","labelStyles","primaryBtnLabelStyles","secondaryButton","secondaryButtonDisabled","secondaryBtnStyles","secondaryBtnLabelStyles","createElement","Portal","Modal","visible","showModal","modalContent","View","style","modalView","renderAdditionalHeader","call","Text","titleText","label","subTitleText","renderChildren","TouchableOpacity","CommonStyles","nextButton","onPress","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","MODEL_WIDGET_SCREEN","nextButtonLabel","cancelButton","cancelButtonLabel","renderAdditionalButtons","_default","exports","StyleSheet","create","marginStart","marginEnd","marginBottom","flex","backgroundColor","padding","borderRadius","justifyContent","fontFamily","Platform","OS","Fonts","IBMPlexSans_600SemiBold","fontStyle","fontSize","lineHeight","textAlign","color","IBMPlexSans_400Regular"],"sources":["ModalWidget.tsx"],"sourcesContent":["import { View, Text, StyleSheet, ViewStyle, TextStyle, Platform } from 'react-native';\nimport React from 'react';\nimport { Portal, Modal } from 'react-native-paper';\nimport { CommonStyles, Fonts } from '../../styles/executionTasks/CommonStyles';\nimport { TouchableOpacity } from 'react-native';\nimport { ScreenNameSdkConstants, SentryEventNameSdkConstants, SeverityLevelValue } from '../../analytics/sentry/SentrySdkConstants';\nimport { fireEventWithScreenName } from '../../analytics/sentry/SentryAnalyticsUtils';\n\ninterface ButtonProps {\n label: string;\n disabled?: boolean;\n onPress: (() => void) | (() => Promise<any>);\n styles?: ViewStyle;\n labelStyles?: TextStyle;\n}\n\ninterface TitleProps {\n label: string;\n styles?: TextStyle;\n}\n\nexport interface ModalProps {\n showModal: boolean;\n dismissable?: boolean;\n title: TitleProps;\n subTitle?: TitleProps;\n contentContainerStyle?: ViewStyle;\n modalStyle?: ViewStyle;\n bodyStyle?: ViewStyle;\n renderChildren?: () => JSX.Element;\n buttonStyle?: ViewStyle;\n primaryButton: ButtonProps;\n secondaryButton: ButtonProps;\n renderAdditionalButtons?: () => JSX.Element;\n renderAdditionalHeader?: () => JSX.Element;\n}\n\nconst ModalWidget = (props: ModalProps) => {\n const {\n dismissable = true,\n contentContainerStyle = {},\n modalStyle = {},\n title: { styles: titleStyle = {} },\n subTitle: { styles: subTitleStyle = {} } = {},\n bodyStyle = {},\n buttonStyle = {},\n primaryButton: {\n disabled: primaryButtonDisabled = false,\n styles: primaryBtnStyles = {},\n labelStyles: primaryBtnLabelStyles = {},\n },\n secondaryButton: {\n disabled: secondaryButtonDisabled = false,\n styles: secondaryBtnStyles = {},\n labelStyles: secondaryBtnLabelStyles = {},\n },\n } = props;\n return (\n <Portal>\n <Modal\n visible={props.showModal}\n dismissable={dismissable}\n contentContainerStyle={[styles.modalContent, contentContainerStyle]}\n >\n <View style={[styles.modalView, modalStyle]}>\n <View style={bodyStyle}>\n {props.renderAdditionalHeader?.()}\n <Text style={[styles.titleText, titleStyle]}>\n {props.title.label}\n </Text>\n {props.subTitle ? (\n <Text style={[styles.subTitleText, subTitleStyle]}>\n {props.subTitle.label}\n </Text>\n ) : null}\n {props.renderChildren?.()}\n </View>\n\n <View style={buttonStyle}>\n <TouchableOpacity\n style={[CommonStyles.nextButton, primaryBtnStyles]}\n onPress={() => {\n props.primaryButton.onPress();\n const cta = props.primaryButton.label;\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.MODEL_WIDGET_SCREEN, cta: cta });\n \n\n }}\n disabled={primaryButtonDisabled}\n >\n <Text\n style={[CommonStyles.nextButtonLabel, primaryBtnLabelStyles]}\n >\n {props.primaryButton.label}\n </Text>\n </TouchableOpacity>\n <TouchableOpacity\n style={[CommonStyles.cancelButton, secondaryBtnStyles]}\n onPress={() => {\n props.secondaryButton.onPress();\n const cta = props.secondaryButton.label;\n fireEventWithScreenName({ severityLevel: SeverityLevelValue.LOG, eventName: SentryEventNameSdkConstants.BUTTON_CLICKED, screenName: ScreenNameSdkConstants.MODEL_WIDGET_SCREEN, cta: cta });\n \n\n }}\n disabled={secondaryButtonDisabled}\n >\n <Text\n style={[\n CommonStyles.cancelButtonLabel,\n secondaryBtnLabelStyles,\n ]}\n >\n {props.secondaryButton.label}\n </Text>\n </TouchableOpacity>\n {props.renderAdditionalButtons?.()}\n </View>\n </View>\n </Modal>\n </Portal>\n );\n};\n\nexport default ModalWidget;\n\ninterface StyleSheetType {\n modalContent: ViewStyle;\n modalView: ViewStyle;\n titleText: TextStyle;\n subTitleText: TextStyle;\n}\n\nconst styles = StyleSheet.create<StyleSheetType>({\n modalContent: {\n marginStart: 60,\n marginEnd: 60,\n marginBottom: 60,\n flex: 1,\n },\n modalView: {\n backgroundColor: 'white',\n padding: 15,\n borderRadius: 9,\n },\n titleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexSans_600SemiBold\n : 'IBMPlexSans-SemiBold',\n fontStyle: 'normal',\n fontSize: 14,\n lineHeight: 20,\n textAlign: 'center',\n color: '#111111',\n marginBottom: 10,\n },\n subTitleText: {\n justifyContent: 'center',\n fontFamily:\n Platform.OS === 'android'\n ? Fonts.IBMPlexS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B;AACF,CAAC,CAAC"}
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
+
var _SentrySdkConstants = require("../../analytics/sentry/SentrySdkConstants");
|
|
11
|
+
var _SentryAnalyticsUtils = require("../../analytics/sentry/SentryAnalyticsUtils");
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
13
|
const SearchBar = props => {
|
|
12
14
|
const {
|
|
@@ -19,6 +21,13 @@ const SearchBar = props => {
|
|
|
19
21
|
const handleClear = () => {
|
|
20
22
|
props.onClear();
|
|
21
23
|
setSearchText('');
|
|
24
|
+
const cta = "Clear";
|
|
25
|
+
(0, _SentryAnalyticsUtils.fireEventWithScreenName)({
|
|
26
|
+
severityLevel: _SentrySdkConstants.SeverityLevelValue.LOG,
|
|
27
|
+
eventName: _SentrySdkConstants.SentryEventNameSdkConstants.BUTTON_CLICKED,
|
|
28
|
+
screenName: _SentrySdkConstants.ScreenNameSdkConstants.SEARCH_BAR_SCREEN,
|
|
29
|
+
cta: cta
|
|
30
|
+
});
|
|
22
31
|
};
|
|
23
32
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
24
33
|
style: styles.container
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_vectorIcons","obj","__esModule","default","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","createElement","View","style","styles","container","TouchableOpacity","iconContainer","EvilIcons","name","size","color","inputContainer","TextInput","input","placeholder","onChangeText","value","onPress","MaterialIcons","StyleSheet","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight","_default","exports"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport { EvilIcons, MaterialIcons } from '@expo/vector-icons';\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 };\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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_vectorIcons","_SentrySdkConstants","_SentryAnalyticsUtils","obj","__esModule","default","SearchBar","props","searchText","setSearchText","handleSearch","text","onChangeSearch","handleClear","onClear","cta","fireEventWithScreenName","severityLevel","SeverityLevelValue","LOG","eventName","SentryEventNameSdkConstants","BUTTON_CLICKED","screenName","ScreenNameSdkConstants","SEARCH_BAR_SCREEN","createElement","View","style","styles","container","TouchableOpacity","iconContainer","EvilIcons","name","size","color","inputContainer","TextInput","input","placeholder","onChangeText","value","onPress","MaterialIcons","StyleSheet","create","flexDirection","alignItems","backgroundColor","borderRadius","paddingHorizontal","borderWidth","borderColor","marginHorizontal","flex","height","paddingLeft","paddingRight","_default","exports"],"sources":["SearchBar.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';\nimport { EvilIcons, MaterialIcons } from '@expo/vector-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,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AAAsF,SAAAD,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAUtF,MAAMG,SAAS,GAAIC,KAAqB,IAAK;EAC3C,MAAM;IAAEC,UAAU;IAAEC;EAAc,CAAC,GAAGF,KAAK;EAC3C,MAAMG,YAAY,GAAIC,IAAY,IAAK;IACrCJ,KAAK,CAACK,cAAc,CAACD,IAAI,CAAC;EAC5B,CAAC;EACD,MAAME,WAAW,GAAGA,CAAA,KAAM;IACxBN,KAAK,CAACO,OAAO,CAAC,CAAC;IACfL,aAAa,CAAC,EAAE,CAAC;IACjB,MAAMM,GAAG,GAAG,OAAO;IACnB,IAAAC,6CAAuB,EAAC;MAAEC,aAAa,EAAEC,sCAAkB,CAACC,GAAG;MAAEC,SAAS,EAAEC,+CAA2B,CAACC,cAAc;MAAEC,UAAU,EAAEC,0CAAsB,CAACC,iBAAiB;MAAEV,GAAG,EAAEA;IAAI,CAAC,CAAC;EAE3L,CAAC;EAED,oBACEnB,MAAA,CAAAS,OAAA,CAAAqB,aAAA,CAAC3B,YAAA,CAAA4B,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;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