@tagadapay/plugin-sdk 2.6.2 → 2.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1090 -623
- package/dist/react/hooks/{useExpressPayment.d.ts → useExpressPaymentMethods.d.ts} +13 -10
- package/dist/react/hooks/{useExpressPayment.js → useExpressPaymentMethods.js} +17 -8
- package/dist/react/index.d.ts +7 -6
- package/dist/react/index.js +5 -4
- package/dist/react/providers/TagadaProvider.js +5 -5
- package/dist/v2/core/googleAutocomplete.js +10 -4
- package/dist/v2/react/providers/TagadaProvider.js +5 -5
- package/package.json +90 -90
|
@@ -30,9 +30,17 @@ type ExpressShippingMethod = {
|
|
|
30
30
|
identifier: string;
|
|
31
31
|
detail: string;
|
|
32
32
|
};
|
|
33
|
-
export interface
|
|
33
|
+
export interface ExpressPaymentMethodsContextType {
|
|
34
|
+
paymentMethods: PaymentMethod[] | undefined;
|
|
34
35
|
applePayPaymentMethod?: PaymentMethod;
|
|
35
36
|
googlePayPaymentMethod?: PaymentMethod;
|
|
37
|
+
paypalPaymentMethod?: PaymentMethod;
|
|
38
|
+
klarnaPaymentMethod?: PaymentMethod;
|
|
39
|
+
availableExpressPaymentMethodIds: string[];
|
|
40
|
+
setAvailableExpressPaymentMethodIds: (value: string[]) => void;
|
|
41
|
+
handleAddExpressId: (id: string) => void;
|
|
42
|
+
shippingMethods: ExpressShippingMethod[];
|
|
43
|
+
lineItems: ExpressOrderLineItem[];
|
|
36
44
|
reComputeOrderSummary: () => Promise<{
|
|
37
45
|
lineItems: ExpressOrderLineItem[];
|
|
38
46
|
total: {
|
|
@@ -41,12 +49,6 @@ export interface ExpressPaymentContextType {
|
|
|
41
49
|
};
|
|
42
50
|
shippingMethods: ExpressShippingMethod[];
|
|
43
51
|
} | undefined>;
|
|
44
|
-
loading?: boolean;
|
|
45
|
-
availableExpressPaymentMethodIds: string[];
|
|
46
|
-
setAvailableExpressPaymentMethodIds: (value: string[]) => void;
|
|
47
|
-
shippingMethods: ExpressShippingMethod[];
|
|
48
|
-
lineItems: ExpressOrderLineItem[];
|
|
49
|
-
handleAddExpressId: (id: string) => void;
|
|
50
52
|
updateCheckoutSessionValues: (input: {
|
|
51
53
|
data: {
|
|
52
54
|
shippingAddress: Address;
|
|
@@ -58,14 +60,15 @@ export interface ExpressPaymentContextType {
|
|
|
58
60
|
email: string;
|
|
59
61
|
};
|
|
60
62
|
}) => Promise<void>;
|
|
63
|
+
loading?: boolean;
|
|
61
64
|
error: string | null;
|
|
62
65
|
setError: (error: string | null) => void;
|
|
63
66
|
}
|
|
64
|
-
interface
|
|
67
|
+
interface ExpressPaymentMethodsProviderProps {
|
|
65
68
|
children: ReactNode;
|
|
66
69
|
customerId?: string;
|
|
67
70
|
checkout?: CheckoutData;
|
|
68
71
|
}
|
|
69
|
-
export declare const
|
|
70
|
-
export declare const
|
|
72
|
+
export declare const ExpressPaymentMethodsProvider: React.FC<ExpressPaymentMethodsProviderProps>;
|
|
73
|
+
export declare const useExpressPaymentMethods: () => ExpressPaymentMethodsContextType;
|
|
71
74
|
export {};
|
|
@@ -3,8 +3,8 @@ import React, { createContext, useCallback, useContext, useMemo, useState } from
|
|
|
3
3
|
import { useTagadaContext } from '../providers/TagadaProvider';
|
|
4
4
|
import { useOrderSummary } from './useOrderSummary';
|
|
5
5
|
import { useShippingRates } from './useShippingRates';
|
|
6
|
-
const
|
|
7
|
-
export const
|
|
6
|
+
const ExpressPaymentMethodsContext = createContext(undefined);
|
|
7
|
+
export const ExpressPaymentMethodsProvider = ({ children, customerId, checkout, }) => {
|
|
8
8
|
const { apiService } = useTagadaContext();
|
|
9
9
|
const [availableExpressPaymentMethodIds, setAvailableExpressPaymentMethodIds] = useState([]);
|
|
10
10
|
const [error, setError] = useState(null);
|
|
@@ -37,7 +37,7 @@ export const ExpressPaymentProvider = ({ children, customerId, checkout, }) => {
|
|
|
37
37
|
return () => {
|
|
38
38
|
mounted = false;
|
|
39
39
|
};
|
|
40
|
-
}, [apiService, checkoutSessionId]);
|
|
40
|
+
}, [apiService, checkoutSessionId, checkout]);
|
|
41
41
|
const handleAddExpressId = (id) => {
|
|
42
42
|
setAvailableExpressPaymentMethodIds((prev) => (prev.includes(id) ? prev : [...prev, id]));
|
|
43
43
|
};
|
|
@@ -128,14 +128,20 @@ export const ExpressPaymentProvider = ({ children, customerId, checkout, }) => {
|
|
|
128
128
|
body: input,
|
|
129
129
|
});
|
|
130
130
|
}, [apiService, customerId]);
|
|
131
|
+
// Identify specific payment method types
|
|
131
132
|
const enabledApplePayPaymentMethod = useMemo(() => paymentMethods?.find((p) => p.type === 'apple_pay'), [paymentMethods]);
|
|
132
133
|
const enabledGooglePayPaymentMethod = useMemo(() => paymentMethods?.find((p) => p.type === 'google_pay'), [paymentMethods]);
|
|
134
|
+
const enabledPaypalPaymentMethod = useMemo(() => paymentMethods?.find((p) => p.type === 'paypal'), [paymentMethods]);
|
|
135
|
+
const enabledKlarnaPaymentMethod = useMemo(() => paymentMethods?.find((p) => p.type === 'klarna'), [paymentMethods]);
|
|
133
136
|
const loading = !paymentMethods || isLoadingPaymentMethods || isLoadingOrderSummary;
|
|
134
137
|
const contextValue = {
|
|
138
|
+
paymentMethods: paymentMethods || undefined,
|
|
135
139
|
availableExpressPaymentMethodIds,
|
|
136
140
|
setAvailableExpressPaymentMethodIds,
|
|
137
141
|
applePayPaymentMethod: enabledApplePayPaymentMethod,
|
|
138
142
|
googlePayPaymentMethod: enabledGooglePayPaymentMethod,
|
|
143
|
+
paypalPaymentMethod: enabledPaypalPaymentMethod,
|
|
144
|
+
klarnaPaymentMethod: enabledKlarnaPaymentMethod,
|
|
139
145
|
shippingMethods,
|
|
140
146
|
lineItems,
|
|
141
147
|
reComputeOrderSummary,
|
|
@@ -146,13 +152,16 @@ export const ExpressPaymentProvider = ({ children, customerId, checkout, }) => {
|
|
|
146
152
|
error,
|
|
147
153
|
setError,
|
|
148
154
|
};
|
|
149
|
-
const hasAnyEnabled = Boolean(enabledApplePayPaymentMethod ||
|
|
150
|
-
|
|
155
|
+
const hasAnyEnabled = Boolean(enabledApplePayPaymentMethod ||
|
|
156
|
+
enabledGooglePayPaymentMethod ||
|
|
157
|
+
enabledPaypalPaymentMethod ||
|
|
158
|
+
enabledKlarnaPaymentMethod);
|
|
159
|
+
return (_jsx(ExpressPaymentMethodsContext.Provider, { value: contextValue, children: hasAnyEnabled ? _jsx(_Fragment, { children: children }) : _jsx(_Fragment, {}) }));
|
|
151
160
|
};
|
|
152
|
-
export const
|
|
153
|
-
const context = useContext(
|
|
161
|
+
export const useExpressPaymentMethods = () => {
|
|
162
|
+
const context = useContext(ExpressPaymentMethodsContext);
|
|
154
163
|
if (context === undefined) {
|
|
155
|
-
throw new Error('
|
|
164
|
+
throw new Error('useExpressPaymentMethods must be used within an ExpressPaymentMethodsProvider');
|
|
156
165
|
}
|
|
157
166
|
return context;
|
|
158
167
|
};
|
package/dist/react/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
export { TagadaProvider } from './providers/TagadaProvider';
|
|
5
5
|
export { useAuth } from './hooks/useAuth';
|
|
6
6
|
export { useCheckout } from './hooks/useCheckout';
|
|
7
|
+
export { useCheckoutSession } from './hooks/useCheckoutSession';
|
|
8
|
+
export { useCheckoutToken } from './hooks/useCheckoutToken';
|
|
7
9
|
export { useClubOffers } from './hooks/useClubOffers';
|
|
8
10
|
export { useCurrency } from './hooks/useCurrency';
|
|
9
11
|
export { useCustomer } from './hooks/useCustomer';
|
|
@@ -20,8 +22,6 @@ export { useOffers } from './hooks/useOffers';
|
|
|
20
22
|
export { useOrderBump } from './hooks/useOrderBump';
|
|
21
23
|
export { useOrderBumpV2 } from './hooks/useOrderBumpV2';
|
|
22
24
|
export { useOrderBumpV3 } from './hooks/useOrderBumpV3';
|
|
23
|
-
export { useCheckoutToken } from './hooks/useCheckoutToken';
|
|
24
|
-
export { useCheckoutSession } from './hooks/useCheckoutSession';
|
|
25
25
|
export { usePostPurchases } from './hooks/usePostPurchases';
|
|
26
26
|
export { useProducts } from './hooks/useProducts';
|
|
27
27
|
export { useSession } from './hooks/useSession';
|
|
@@ -32,7 +32,7 @@ export { useVipOffers } from './hooks/useVipOffers';
|
|
|
32
32
|
export { useTagadaContext } from './providers/TagadaProvider';
|
|
33
33
|
export { clearPluginConfigCache, debugPluginConfig, getPluginConfig, useBasePath, usePluginConfig } from './hooks/usePluginConfig';
|
|
34
34
|
export type { PluginConfig } from './hooks/usePluginConfig';
|
|
35
|
-
export { getAvailableLanguages, useCountryOptions, useISOData,
|
|
35
|
+
export { getAvailableLanguages, useCountryOptions, useISOData, useLanguageImport, useRegionOptions } from './hooks/useISOData';
|
|
36
36
|
export type { ISOCountry, ISORegion, UseISODataResult } from './hooks/useISOData';
|
|
37
37
|
export type { GeoLocationData, UseGeoLocationOptions, UseGeoLocationReturn } from './hooks/useGeoLocation';
|
|
38
38
|
export type { ExtractedAddress, GoogleAddressComponent, GooglePlaceDetails, GooglePrediction, UseGoogleAutocompleteOptions, UseGoogleAutocompleteResult } from './hooks/useGoogleAutocomplete';
|
|
@@ -43,15 +43,16 @@ export { usePaymentPolling } from './hooks/usePaymentPolling';
|
|
|
43
43
|
export { useThreeds } from './hooks/useThreeds';
|
|
44
44
|
export { useThreedsModal } from './hooks/useThreedsModal';
|
|
45
45
|
export { useApplePay } from './hooks/useApplePay';
|
|
46
|
-
export {
|
|
46
|
+
export { ExpressPaymentMethodsProvider, useExpressPaymentMethods } from './hooks/useExpressPaymentMethods';
|
|
47
|
+
export type { ExpressPaymentMethodsContextType } from './hooks/useExpressPaymentMethods';
|
|
47
48
|
export type { AuthState, Currency, Customer, CustomerInfos, Environment, EnvironmentConfig, Locale, Order, OrderAddress, OrderItem, OrderSummary, PickupPoint, Session, Store } from './types';
|
|
48
49
|
export type { CheckoutData, CheckoutInitParams, CheckoutLineItem, CheckoutSession, CheckoutSessionPreview, Promotion, UseCheckoutOptions, UseCheckoutResult } from './hooks/useCheckout';
|
|
49
50
|
export type { Discount, DiscountCodeValidation, UseDiscountsOptions, UseDiscountsResult } from './hooks/useDiscounts';
|
|
51
|
+
export type { UseCheckoutSessionOptions, UseCheckoutSessionResult } from './hooks/useCheckoutSession';
|
|
52
|
+
export type { UseCheckoutTokenOptions, UseCheckoutTokenResult } from './hooks/useCheckoutToken';
|
|
50
53
|
export type { OrderBumpPreview, UseOrderBumpOptions, UseOrderBumpResult } from './hooks/useOrderBump';
|
|
51
54
|
export type { UseOrderBumpV2Options, UseOrderBumpV2Result } from './hooks/useOrderBumpV2';
|
|
52
55
|
export type { UseOrderBumpV3Options, UseOrderBumpV3Result } from './hooks/useOrderBumpV3';
|
|
53
|
-
export type { UseCheckoutTokenOptions, UseCheckoutTokenResult } from './hooks/useCheckoutToken';
|
|
54
|
-
export type { UseCheckoutSessionOptions, UseCheckoutSessionResult } from './hooks/useCheckoutSession';
|
|
55
56
|
export type { UseVipOffersOptions, UseVipOffersResult, VipOffer, VipPreviewResponse } from './hooks/useVipOffers';
|
|
56
57
|
export type { PostPurchaseOffer, PostPurchaseOfferItem, PostPurchaseOfferLineItem, PostPurchaseOfferSummary, UsePostPurchasesOptions, UsePostPurchasesResult } from './hooks/usePostPurchases';
|
|
57
58
|
export type { Payment, PaymentPollingHook, PollingOptions } from './hooks/usePaymentPolling';
|
package/dist/react/index.js
CHANGED
|
@@ -7,6 +7,8 @@ export { TagadaProvider } from './providers/TagadaProvider';
|
|
|
7
7
|
// Hook exports
|
|
8
8
|
export { useAuth } from './hooks/useAuth';
|
|
9
9
|
export { useCheckout } from './hooks/useCheckout';
|
|
10
|
+
export { useCheckoutSession } from './hooks/useCheckoutSession';
|
|
11
|
+
export { useCheckoutToken } from './hooks/useCheckoutToken';
|
|
10
12
|
export { useClubOffers } from './hooks/useClubOffers';
|
|
11
13
|
export { useCurrency } from './hooks/useCurrency';
|
|
12
14
|
export { useCustomer } from './hooks/useCustomer';
|
|
@@ -23,8 +25,6 @@ export { useOffers } from './hooks/useOffers';
|
|
|
23
25
|
export { useOrderBump } from './hooks/useOrderBump';
|
|
24
26
|
export { useOrderBumpV2 } from './hooks/useOrderBumpV2';
|
|
25
27
|
export { useOrderBumpV3 } from './hooks/useOrderBumpV3';
|
|
26
|
-
export { useCheckoutToken } from './hooks/useCheckoutToken';
|
|
27
|
-
export { useCheckoutSession } from './hooks/useCheckoutSession';
|
|
28
28
|
export { usePostPurchases } from './hooks/usePostPurchases';
|
|
29
29
|
export { useProducts } from './hooks/useProducts';
|
|
30
30
|
export { useSession } from './hooks/useSession';
|
|
@@ -35,7 +35,7 @@ export { useTagadaContext } from './providers/TagadaProvider';
|
|
|
35
35
|
// Plugin configuration hooks
|
|
36
36
|
export { clearPluginConfigCache, debugPluginConfig, getPluginConfig, useBasePath, usePluginConfig } from './hooks/usePluginConfig';
|
|
37
37
|
// ISO Data hooks
|
|
38
|
-
export { getAvailableLanguages, useCountryOptions, useISOData,
|
|
38
|
+
export { getAvailableLanguages, useCountryOptions, useISOData, useLanguageImport, useRegionOptions } from './hooks/useISOData';
|
|
39
39
|
// Order hook exports
|
|
40
40
|
export { useOrder } from './hooks/useOrder';
|
|
41
41
|
// Payment hooks exports
|
|
@@ -46,7 +46,8 @@ export { useThreedsModal } from './hooks/useThreedsModal';
|
|
|
46
46
|
// Apple Pay hooks exports
|
|
47
47
|
export { useApplePay } from './hooks/useApplePay';
|
|
48
48
|
// Express Payment context exports
|
|
49
|
-
|
|
49
|
+
// Express Payment Methods (extended functionality)
|
|
50
|
+
export { ExpressPaymentMethodsProvider, useExpressPaymentMethods } from './hooks/useExpressPaymentMethods';
|
|
50
51
|
// Component exports
|
|
51
52
|
export { ApplePayButton, Button } from './components';
|
|
52
53
|
// Utility exports
|
|
@@ -38,11 +38,11 @@ const InitializationLoader = () => (_jsxs("div", { style: {
|
|
|
38
38
|
borderTop: '1.5px solid #9ca3af',
|
|
39
39
|
borderRadius: '50%',
|
|
40
40
|
animation: 'tagada-spin 1s linear infinite',
|
|
41
|
-
} }), _jsx("span", { children: "Loading..." }), _jsx("style", { children: `
|
|
42
|
-
@keyframes tagada-spin {
|
|
43
|
-
0% { transform: rotate(0deg); }
|
|
44
|
-
100% { transform: rotate(360deg); }
|
|
45
|
-
}
|
|
41
|
+
} }), _jsx("span", { children: "Loading..." }), _jsx("style", { children: `
|
|
42
|
+
@keyframes tagada-spin {
|
|
43
|
+
0% { transform: rotate(0deg); }
|
|
44
|
+
100% { transform: rotate(360deg); }
|
|
45
|
+
}
|
|
46
46
|
` })] }));
|
|
47
47
|
const TagadaContext = createContext(null);
|
|
48
48
|
export function TagadaProvider({ children, environment, customApiConfig, debugMode, // Remove default, will be set based on environment
|
|
@@ -8,7 +8,7 @@ export class GoogleAutocompleteCore {
|
|
|
8
8
|
*/
|
|
9
9
|
static initialize(apiKey) {
|
|
10
10
|
this.apiKey = apiKey;
|
|
11
|
-
if (typeof window !== 'undefined' && window.google) {
|
|
11
|
+
if (typeof window !== 'undefined' && window.google?.maps?.places) {
|
|
12
12
|
this.service = new window.google.maps.places.AutocompleteService();
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -25,7 +25,10 @@ export class GoogleAutocompleteCore {
|
|
|
25
25
|
types: options.types || ['address'],
|
|
26
26
|
componentRestrictions: options.componentRestrictions,
|
|
27
27
|
}, (predictions, status) => {
|
|
28
|
-
if (
|
|
28
|
+
if (typeof window !== 'undefined' &&
|
|
29
|
+
window.google?.maps?.places &&
|
|
30
|
+
status === window.google.maps.places.PlacesServiceStatus.OK &&
|
|
31
|
+
predictions) {
|
|
29
32
|
resolve(predictions);
|
|
30
33
|
}
|
|
31
34
|
else {
|
|
@@ -38,7 +41,7 @@ export class GoogleAutocompleteCore {
|
|
|
38
41
|
* Get place details
|
|
39
42
|
*/
|
|
40
43
|
static async getPlaceDetails(placeId) {
|
|
41
|
-
if (typeof window === 'undefined' || !window.google) {
|
|
44
|
+
if (typeof window === 'undefined' || !window.google?.maps?.places) {
|
|
42
45
|
return null;
|
|
43
46
|
}
|
|
44
47
|
return new Promise((resolve, reject) => {
|
|
@@ -47,7 +50,10 @@ export class GoogleAutocompleteCore {
|
|
|
47
50
|
placeId,
|
|
48
51
|
fields: ['place_id', 'formatted_address', 'address_components', 'geometry'],
|
|
49
52
|
}, (place, status) => {
|
|
50
|
-
if (
|
|
53
|
+
if (typeof window !== 'undefined' &&
|
|
54
|
+
window.google?.maps?.places &&
|
|
55
|
+
status === window.google.maps.places.PlacesServiceStatus.OK &&
|
|
56
|
+
place) {
|
|
51
57
|
resolve(place);
|
|
52
58
|
}
|
|
53
59
|
else {
|
|
@@ -41,11 +41,11 @@ const InitializationLoader = () => (_jsxs("div", { style: {
|
|
|
41
41
|
borderTop: '1.5px solid #9ca3af',
|
|
42
42
|
borderRadius: '50%',
|
|
43
43
|
animation: 'tagada-spin 1s linear infinite',
|
|
44
|
-
} }), _jsx("span", { children: "Loading..." }), _jsx("style", { children: `
|
|
45
|
-
@keyframes tagada-spin {
|
|
46
|
-
0% { transform: rotate(0deg); }
|
|
47
|
-
100% { transform: rotate(360deg); }
|
|
48
|
-
}
|
|
44
|
+
} }), _jsx("span", { children: "Loading..." }), _jsx("style", { children: `
|
|
45
|
+
@keyframes tagada-spin {
|
|
46
|
+
0% { transform: rotate(0deg); }
|
|
47
|
+
100% { transform: rotate(360deg); }
|
|
48
|
+
}
|
|
49
49
|
` })] }));
|
|
50
50
|
const TagadaContext = createContext(null);
|
|
51
51
|
// Global instance tracking for TagadaProvider
|
package/package.json
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@tagadapay/plugin-sdk",
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"description": "Modern React SDK for building Tagada Pay plugins",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./react": {
|
|
14
|
-
"types": "./dist/react/index.d.ts",
|
|
15
|
-
"import": "./dist/react/index.js",
|
|
16
|
-
"require": "./dist/react/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./v2": {
|
|
19
|
-
"types": "./dist/v2/index.d.ts",
|
|
20
|
-
"import": "./dist/v2/index.js",
|
|
21
|
-
"require": "./dist/v2/index.js"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"scripts": {
|
|
25
|
-
"build": "tsc",
|
|
26
|
-
"clean": "rm -rf dist",
|
|
27
|
-
"lint": "echo \"No linting configured\"",
|
|
28
|
-
"test": "echo \"No tests yet\" && exit 0",
|
|
29
|
-
"dev": "tsc --watch",
|
|
30
|
-
"prepublishOnly": "npm run clean && npm run build",
|
|
31
|
-
"publish:patch": "npm version patch && npm publish",
|
|
32
|
-
"publish:minor": "npm version minor && npm publish",
|
|
33
|
-
"publish:major": "npm version major && npm publish",
|
|
34
|
-
"publish:beta": "npm version prerelease --preid=beta && npm publish --tag beta",
|
|
35
|
-
"publish:alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha",
|
|
36
|
-
"version:patch": "npm version patch",
|
|
37
|
-
"version:minor": "npm version minor",
|
|
38
|
-
"version:major": "npm version major",
|
|
39
|
-
"version:beta": "npm version prerelease --preid=beta",
|
|
40
|
-
"version:alpha": "npm version prerelease --preid=alpha",
|
|
41
|
-
"version:check": "node version-sync.js check",
|
|
42
|
-
"version:sync": "node version-sync.js sync",
|
|
43
|
-
"version:list": "node version-sync.js list",
|
|
44
|
-
"version:next": "node version-sync.js next",
|
|
45
|
-
"postversion": "echo \"✅ Version updated to $(node -p 'require(\"./package.json\").version')\" && (git push && git push --tags || echo \"⚠️ Git push failed - you may need to pull and push manually\")"
|
|
46
|
-
},
|
|
47
|
-
"keywords": [
|
|
48
|
-
"tagadapay",
|
|
49
|
-
"cms",
|
|
50
|
-
"plugin",
|
|
51
|
-
"sdk",
|
|
52
|
-
"react",
|
|
53
|
-
"typescript"
|
|
54
|
-
],
|
|
55
|
-
"author": "Tagada Pay",
|
|
56
|
-
"license": "MIT",
|
|
57
|
-
"dependencies": {
|
|
58
|
-
"@basis-theory/apple-pay-js": "^2.0.2",
|
|
59
|
-
"@basis-theory/basis-theory-js": "^4.30.0",
|
|
60
|
-
"@basis-theory/basis-theory-react": "^1.32.5",
|
|
61
|
-
"@basis-theory/web-threeds": "^1.0.1",
|
|
62
|
-
"@tanstack/react-query": "^5.90.2",
|
|
63
|
-
"axios": "^1.10.0",
|
|
64
|
-
"iso3166-2-db": "^2.3.11",
|
|
65
|
-
"react-intl": "^7.1.11",
|
|
66
|
-
"swr": "^2.3.6"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@types/node": "^18.0.0",
|
|
70
|
-
"@types/react": "^19",
|
|
71
|
-
"@types/react-dom": "^19",
|
|
72
|
-
"typescript": "^5.0.0"
|
|
73
|
-
},
|
|
74
|
-
"peerDependencies": {
|
|
75
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
76
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
77
|
-
},
|
|
78
|
-
"files": [
|
|
79
|
-
"dist/**/*",
|
|
80
|
-
"README.md"
|
|
81
|
-
],
|
|
82
|
-
"repository": {
|
|
83
|
-
"type": "git",
|
|
84
|
-
"url": "git+https://github.com/tagadapay/plugin-sdk.git"
|
|
85
|
-
},
|
|
86
|
-
"bugs": {
|
|
87
|
-
"url": "https://github.com/tagadapay/plugin-sdk/issues"
|
|
88
|
-
},
|
|
89
|
-
"homepage": "https://github.com/tagadapay/plugin-sdk#readme"
|
|
90
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@tagadapay/plugin-sdk",
|
|
3
|
+
"version": "2.6.4",
|
|
4
|
+
"description": "Modern React SDK for building Tagada Pay plugins",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./react": {
|
|
14
|
+
"types": "./dist/react/index.d.ts",
|
|
15
|
+
"import": "./dist/react/index.js",
|
|
16
|
+
"require": "./dist/react/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./v2": {
|
|
19
|
+
"types": "./dist/v2/index.d.ts",
|
|
20
|
+
"import": "./dist/v2/index.js",
|
|
21
|
+
"require": "./dist/v2/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsc",
|
|
26
|
+
"clean": "rm -rf dist",
|
|
27
|
+
"lint": "echo \"No linting configured\"",
|
|
28
|
+
"test": "echo \"No tests yet\" && exit 0",
|
|
29
|
+
"dev": "tsc --watch",
|
|
30
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
31
|
+
"publish:patch": "npm version patch && npm publish",
|
|
32
|
+
"publish:minor": "npm version minor && npm publish",
|
|
33
|
+
"publish:major": "npm version major && npm publish",
|
|
34
|
+
"publish:beta": "npm version prerelease --preid=beta && npm publish --tag beta",
|
|
35
|
+
"publish:alpha": "npm version prerelease --preid=alpha && npm publish --tag alpha",
|
|
36
|
+
"version:patch": "npm version patch",
|
|
37
|
+
"version:minor": "npm version minor",
|
|
38
|
+
"version:major": "npm version major",
|
|
39
|
+
"version:beta": "npm version prerelease --preid=beta",
|
|
40
|
+
"version:alpha": "npm version prerelease --preid=alpha",
|
|
41
|
+
"version:check": "node version-sync.js check",
|
|
42
|
+
"version:sync": "node version-sync.js sync",
|
|
43
|
+
"version:list": "node version-sync.js list",
|
|
44
|
+
"version:next": "node version-sync.js next",
|
|
45
|
+
"postversion": "echo \"✅ Version updated to $(node -p 'require(\"./package.json\").version')\" && (git push && git push --tags || echo \"⚠️ Git push failed - you may need to pull and push manually\")"
|
|
46
|
+
},
|
|
47
|
+
"keywords": [
|
|
48
|
+
"tagadapay",
|
|
49
|
+
"cms",
|
|
50
|
+
"plugin",
|
|
51
|
+
"sdk",
|
|
52
|
+
"react",
|
|
53
|
+
"typescript"
|
|
54
|
+
],
|
|
55
|
+
"author": "Tagada Pay",
|
|
56
|
+
"license": "MIT",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@basis-theory/apple-pay-js": "^2.0.2",
|
|
59
|
+
"@basis-theory/basis-theory-js": "^4.30.0",
|
|
60
|
+
"@basis-theory/basis-theory-react": "^1.32.5",
|
|
61
|
+
"@basis-theory/web-threeds": "^1.0.1",
|
|
62
|
+
"@tanstack/react-query": "^5.90.2",
|
|
63
|
+
"axios": "^1.10.0",
|
|
64
|
+
"iso3166-2-db": "^2.3.11",
|
|
65
|
+
"react-intl": "^7.1.11",
|
|
66
|
+
"swr": "^2.3.6"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/node": "^18.0.0",
|
|
70
|
+
"@types/react": "^19",
|
|
71
|
+
"@types/react-dom": "^19",
|
|
72
|
+
"typescript": "^5.0.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
76
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
77
|
+
},
|
|
78
|
+
"files": [
|
|
79
|
+
"dist/**/*",
|
|
80
|
+
"README.md"
|
|
81
|
+
],
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "git+https://github.com/tagadapay/plugin-sdk.git"
|
|
85
|
+
},
|
|
86
|
+
"bugs": {
|
|
87
|
+
"url": "https://github.com/tagadapay/plugin-sdk/issues"
|
|
88
|
+
},
|
|
89
|
+
"homepage": "https://github.com/tagadapay/plugin-sdk#readme"
|
|
90
|
+
}
|