Skip to content

Commit 6614fed

Browse files
refactor: rename prefix CheckoutEventProvider with Shopify
1 parent 4d6bd51 commit 6614fed

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

modules/@shopify/checkout-sheet-kit/package.snapshot.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"ios/ShopifyCheckoutSheetKit+EventSerialization.swift",
2727
"ios/ShopifyCheckoutSheetKit+Extensions.swift",
2828
"ios/UIView+UIViewController.swift",
29-
"lib/commonjs/CheckoutEventProvider.js",
30-
"lib/commonjs/CheckoutEventProvider.js.map",
29+
"lib/commonjs/ShopifyCheckoutEventProvider.js",
30+
"lib/commonjs/ShopifyCheckoutEventProvider.js.map",
3131
"lib/commonjs/components/AcceleratedCheckoutButtons.js",
3232
"lib/commonjs/components/AcceleratedCheckoutButtons.js.map",
3333
"lib/commonjs/components/Checkout.js",
@@ -42,8 +42,8 @@
4242
"lib/commonjs/index.d.js.map",
4343
"lib/commonjs/index.js",
4444
"lib/commonjs/index.js.map",
45-
"lib/module/CheckoutEventProvider.js",
46-
"lib/module/CheckoutEventProvider.js.map",
45+
"lib/module/ShopifyCheckoutEventProvider.js",
46+
"lib/module/ShopifyCheckoutEventProvider.js.map",
4747
"lib/module/components/AcceleratedCheckoutButtons.js",
4848
"lib/module/components/AcceleratedCheckoutButtons.js.map",
4949
"lib/module/components/Checkout.js",
@@ -58,8 +58,8 @@
5858
"lib/module/index.d.js.map",
5959
"lib/module/index.js",
6060
"lib/module/index.js.map",
61-
"lib/typescript/src/CheckoutEventProvider.d.ts",
62-
"lib/typescript/src/CheckoutEventProvider.d.ts.map",
61+
"lib/typescript/src/ShopifyCheckoutEventProvider.d.ts",
62+
"lib/typescript/src/ShopifyCheckoutEventProvider.d.ts.map",
6363
"lib/typescript/src/components/AcceleratedCheckoutButtons.d.ts",
6464
"lib/typescript/src/components/AcceleratedCheckoutButtons.d.ts.map",
6565
"lib/typescript/src/components/Checkout.d.ts",
@@ -69,7 +69,7 @@
6969
"lib/typescript/src/index.d.ts",
7070
"lib/typescript/src/index.d.ts.map",
7171
"package.json",
72-
"src/CheckoutEventProvider.tsx",
72+
"src/ShopifyCheckoutEventProvider.tsx",
7373
"src/components/AcceleratedCheckoutButtons.tsx",
7474
"src/components/Checkout.tsx",
7575
"src/context.tsx",

modules/@shopify/checkout-sheet-kit/src/CheckoutEventProvider.tsx renamed to modules/@shopify/checkout-sheet-kit/src/ShopifyCheckoutEventProvider.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ const CheckoutEventContext = createContext<CheckoutEventContextType | null>(
3030
null,
3131
);
3232

33-
export interface CheckoutEventProviderProps {
33+
export interface ShopifyCheckoutEventProviderProps {
3434
children: React.ReactNode;
3535
}
3636

3737
/**
38-
* CheckoutEventProvider manages active checkout events and provides methods to respond to them.
38+
* ShopifyCheckoutEventProvider manages active checkout events and provides methods to respond to them.
3939
* This provider maintains references to active events and the webview to enable native callbacks.
4040
*/
41-
export const CheckoutEventProvider = ({
41+
export const ShopifyCheckoutEventProvider = ({
4242
children,
43-
}: CheckoutEventProviderProps) => {
43+
}: ShopifyCheckoutEventProviderProps) => {
4444
const webViewRef = useRef<React.RefObject<any> | null>(null);
4545

4646
const registerWebView = useCallback((ref: React.RefObject<any>) => {

modules/@shopify/checkout-sheet-kit/src/components/Checkout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
findNodeHandle,
3131
type ViewStyle,
3232
} from 'react-native';
33-
import {useCheckoutEvents} from '../CheckoutEventProvider';
33+
import {useCheckoutEvents} from '../ShopifyCheckoutEventProvider';
3434
import type {
3535
CheckoutAddressChangeStart,
3636
CheckoutCompleteEvent,

modules/@shopify/checkout-sheet-kit/src/events.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ export interface CartInput {
515515
export interface CheckoutAddressChangeStart {
516516
/**
517517
* Unique identifier for this event instance.
518-
* Use this ID with the CheckoutEventProvider to respond to the event.
518+
* Use this ID with the ShopifyCheckoutEventProvider to respond to the event.
519519
*/
520520
id: string;
521521

@@ -540,7 +540,7 @@ export interface CheckoutAddressChangeStart {
540540

541541
/**
542542
* Response payload for CheckoutAddressChangeStart event.
543-
* Use with CheckoutEventProvider.respondToEvent() or useShopifyEvent().respondWith()
543+
* Use with ShopifyCheckoutEventProvider.respondToEvent() or useShopifyEvent().respondWith()
544544
*
545545
* Note: This response is only used when native address selection is enabled
546546
* for the authenticated app.
@@ -653,7 +653,7 @@ export interface CheckoutSession {
653653
export interface CheckoutSubmitStart {
654654
/**
655655
* Unique identifier for this event instance.
656-
* Use this ID with the CheckoutEventProvider to respond to the event.
656+
* Use this ID with the ShopifyCheckoutEventProvider to respond to the event.
657657
*/
658658
id: string;
659659

@@ -684,7 +684,7 @@ export interface PaymentTokenInput {
684684

685685
/**
686686
* Response payload for CheckoutSubmitStart event.
687-
* Use with CheckoutEventProvider.respondToEvent() or useShopifyEvent().respondWith()
687+
* Use with ShopifyCheckoutEventProvider.respondToEvent() or useShopifyEvent().respondWith()
688688
*
689689
* Note: This response is only used when native payment delegation is enabled
690690
* for the authenticated app.

modules/@shopify/checkout-sheet-kit/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ export type {
531531
RenderStateChangeEvent,
532532
} from './components/AcceleratedCheckoutButtons';
533533
export type {ShopifyCheckoutProps as CheckoutProps, ShopifyCheckoutRef as CheckoutRef} from './components/Checkout';
534-
export type {CheckoutEventProviderProps} from './CheckoutEventProvider';
534+
export type {ShopifyCheckoutEventProviderProps} from './ShopifyCheckoutEventProvider';
535535

536536
// Components
537537
export {
@@ -540,7 +540,7 @@ export {
540540
} from './components/AcceleratedCheckoutButtons';
541541
export {ShopifyCheckout} from './components/Checkout';
542542
export {
543-
CheckoutEventProvider,
543+
ShopifyCheckoutEventProvider,
544544
useCheckoutEvents,
545545
useShopifyEvent,
546-
} from './CheckoutEventProvider';
546+
} from './ShopifyCheckoutEventProvider';

sample/src/screens/BuyNow/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {createNativeStackNavigator} from '@react-navigation/native-stack';
2121
import type {RouteProp} from '@react-navigation/native';
2222
import React from 'react';
2323
import {Button} from 'react-native';
24-
import {CheckoutEventProvider} from '@shopify/checkout-sheet-kit';
24+
import {ShopifyCheckoutEventProvider} from '@shopify/checkout-sheet-kit';
2525
import type {RootStackParamList} from '../../App';
2626
import CheckoutScreen from './CheckoutScreen';
2727
import AddressScreen from './AddressScreen';
@@ -40,7 +40,7 @@ type BuyNowStackProps = {
4040
export default function BuyNowStack(props: BuyNowStackProps) {
4141
const {colors} = useTheme();
4242
return (
43-
<CheckoutEventProvider>
43+
<ShopifyCheckoutEventProvider>
4444
<BuyNowStackNavigator.Navigator
4545
initialRouteName="Checkout"
4646
screenOptions={({navigation}) => ({
@@ -72,6 +72,6 @@ export default function BuyNowStack(props: BuyNowStackProps) {
7272
options={{title: 'Payment Details'}}
7373
/>
7474
</BuyNowStackNavigator.Navigator>
75-
</CheckoutEventProvider>
75+
</ShopifyCheckoutEventProvider>
7676
);
7777
}

0 commit comments

Comments
 (0)