Rn elements 76 plus - #57
Open
manideepk90 wants to merge 40 commits into
Open
Conversation
…ypeScript - Deleted obsolete ReasonML files: AppearanceTransformer.res, EventValidator.res, NewArchUtils.res, PaymentSheetEventManager.res, ReactNativeUtils.res, ResponseHandler.res, CvcWidget.res, NativePaymentWidget.res, PaymentWidget.res. - Introduced new TypeScript files: EventValidator.ts, NewArchUtils.ts, ReactNativeUtils.ts, NativePaymentWidget.ts, CVCElementView.tsx, PaymentElement.ts, PaymentElementView.tsx, CvcWidget.ts, NativePaymentWidgetImpl.ts. - Updated CVC and Payment widgets to use new TypeScript components and utility functions. - Enhanced event validation and response handling in the new TypeScript implementations.
- Introduced NativePaymentElementView.mm to serve as the Fabric host view for PaymentElement and CVCWidget. - Created NativePaymentWidgetViewRegistry to manage the registration of inner NativePaymentWidgetView instances. - Updated NativePaymentWidget to support both old-arch and new-arch (Fabric) view management. - Refactored CvcWidget to CVCElement and PaymentElement to use the new Fabric architecture. - Added HyperElements context to manage payment sessions and elements. - Enhanced error handling and event forwarding for payment results and events. - Removed deprecated CvcWidget and PaymentElement implementations.
…ction - Removed the support for 'paymentElement' and 'cvcWidget' types in createElements. - Updated the Elements interface to remove create method overloads for specific element types. - Changed the parameters of presentPaymentSheet and getCustomerSavedPaymentMethods methods to use Object type. - Adjusted TypeScript configuration to allow builds even with errors. - Updated yarn.lock to reflect changes in package dependencies.
- Updated podspec to include public header files for better accessibility. - Modified autolinking.gradle to change the project name for dependency resolution. - Introduced HyperModule as a native module for the New Architecture, facilitating communication between JS and native layers. - Implemented HyperModule.mm to handle event emissions and method forwarding to Swift. - Enhanced ApplePayView to support dynamic property updates. - Refactored PaymentHandler to utilize the new HyperModule implementation. - Removed legacy HyperModule.m and replaced it with a Swift implementation in HyperModuleImpl.swift. - Added RNBridgeFactory to manage the internal React Native surface and support TurboModules. - Updated package.json to reflect new project name and versioning. - Adjusted repository URLs to point to the new GitHub location.
…n multiple components
- Updated autolinking configuration to use the correct project name. - Refactored ReactNativeHyperswitchModule to utilize a new method for bundle creation. - Simplified event emission in HyperModule.mm by removing unnecessary widget events. - Commented out legacy widget event handling in NativePaymentWidget and related classes. - Removed bridge references in RNViewManager for a payment-sheet-only build. - Updated package.json to reflect the new version and correct issue tracking URL.
…d for bundle creation. - Simplified event emission in HyperModule.mm by removing unnecessary widget events. - Commented out legacy widget event handling in NativePaymentWidget and related classes. - Removed bridge references in RNViewManager for a payment-sheet-only build. - Updated package.json to reflect the new version and correct issue tracking URL.
- Added 'requires_capture' status to the payment status mapping in PaymentSession.ts. - Adjusted the order of fallback values for 'type' in mapNativeResponseToPaymentResult to prioritize 'parsed.type' over 'parsed.status'. - Removed unused imports and commented out sdkAuthorization, hyperswitchConfig, and paymentSessionConfig in CVCElement and PaymentElement views for cleaner code.
- Deleted RNBridgeFactory.h and RNBridgeFactory.mm files as they are no longer needed. - Updated parsePaymentMethod function to handle JSON parsing errors more gracefully, returning null on failure. - Exported SavedPaymentMethods types from index.ts for better accessibility. - Renamed SavedPaymentMethodsConfiguration interface to SavedPaymentMethodsConfig for consistency. - Removed unnecessary console log in LaunchOptions.ts.
…chitecture support - Renamed NativePaymentWidgetView to RCTNativePaymentWidget in PaymentElementViewManager. - Updated HyperModule to support new architecture with UIManagerType. - Refactored findViewWithRootTag to use UIManagerHelper for better view resolution. - Simplified bundle creation in PaymentWidgetView. - Added new codegen components for ApplePay and PaymentWidget. - Moved NativeHyperswitchModule and related types to codegen for better structure. - Removed deprecated hooks and unused modules to streamline codebase. - Updated context and utility functions to align with new module structure.
…and event handling - Updated HyperFragment to support new architecture with dynamic ReactContext retrieval. - Enhanced callback handling in HyperFragment for payment intents and events. - Introduced emitDeviceEvent method for consistent event emission across architectures. - Refactored PaymentElement to include onReady callback and improved view registration logic. - Cleaned up unused code and improved readability across both HyperFragment and PaymentElement.
manideepk90
marked this pull request as ready for review
August 2, 2026 22:26
Contributor
Author
|
Need to update the bundle in both android and ios to support the 0.82+ |
manideepk90
force-pushed
the
rn-elements-76-plus
branch
from
August 2, 2026 22:38
4056f50 to
e7d711c
Compare
manideepk90
commented
Aug 2, 2026
manideepk90
left a comment
Contributor
Author
There was a problem hiding this comment.
Add the GooglePayNativeComponent and try to add the viewManager in android
- Added a new initializer in StandardResult to convert PaymentResult to StandardResult, ensuring proper handling of completed, canceled, and failed payment results. - Updated PaymentWidgetNativeComponent to use UnsafeMixed for options, aligning with Android's ReadableMap. - Modified getCustomerSavedPaymentMethods to include paymentMethodLayout customization in the configuration. - Changed PaymentEventResult payload type from Record<string, unknown> to string for consistency. - Updated onPaymentResult type to include eventName and payload in NativeEventEnvelope. - Adjusted CVCElement to parse payload string into an object. - Refactored PaymentElement to stringify payload in the onChange event and updated internal payment result handling.
…nd UI adjustments
…s after React context teardown
- Introduced HyperModule in package.json for improved module management. - Expanded NativeHyperModule with new event types for payment results and widget actions. - Updated PaymentSession to handle intent updates more robustly. - Added ApplePayButton and GooglePayButton components for better payment integration. - Refactored CVCElement and PaymentElement to utilize new event types and improve type safety. - Enhanced event validation and warning mechanisms for subscribed events.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.