@tagadapay/plugin-sdk 2.8.8 → 2.8.9
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/dist/react/config/environment.d.ts +1 -22
- package/dist/react/config/environment.js +1 -132
- package/dist/react/utils/deviceInfo.d.ts +1 -39
- package/dist/react/utils/deviceInfo.js +1 -163
- package/dist/react/utils/jwtDecoder.d.ts +1 -14
- package/dist/react/utils/jwtDecoder.js +1 -86
- package/dist/react/utils/tokenStorage.d.ts +1 -16
- package/dist/react/utils/tokenStorage.js +1 -53
- package/dist/v2/core/client.d.ts +92 -0
- package/dist/v2/core/client.js +386 -0
- package/dist/v2/core/config/environment.d.ts +22 -0
- package/dist/v2/core/config/environment.js +140 -0
- package/dist/v2/core/pathRemapping.js +61 -3
- package/dist/v2/core/resources/apiClient.d.ts +8 -0
- package/dist/v2/core/resources/apiClient.js +30 -9
- package/dist/v2/core/resources/funnel.d.ts +14 -0
- package/dist/v2/core/resources/payments.d.ts +23 -0
- package/dist/v2/core/types.d.ts +271 -0
- package/dist/v2/core/types.js +4 -0
- package/dist/v2/core/utils/deviceInfo.d.ts +39 -0
- package/dist/v2/core/utils/deviceInfo.js +162 -0
- package/dist/v2/core/utils/eventDispatcher.d.ts +10 -0
- package/dist/v2/core/utils/eventDispatcher.js +24 -0
- package/dist/v2/core/utils/jwtDecoder.d.ts +14 -0
- package/dist/v2/core/utils/jwtDecoder.js +85 -0
- package/dist/v2/core/utils/pluginConfig.js +6 -0
- package/dist/v2/core/utils/tokenStorage.d.ts +19 -0
- package/dist/v2/core/utils/tokenStorage.js +52 -0
- package/dist/v2/react/components/DebugDrawer.js +90 -1
- package/dist/v2/react/hooks/__examples__/FunnelContextExample.d.ts +12 -0
- package/dist/v2/react/hooks/__examples__/FunnelContextExample.js +54 -0
- package/dist/v2/react/hooks/useFunnel.d.ts +1 -1
- package/dist/v2/react/hooks/useFunnel.js +209 -32
- package/dist/v2/react/hooks/useGoogleAutocomplete.js +26 -18
- package/dist/v2/react/hooks/useISOData.js +4 -2
- package/dist/v2/react/hooks/useOffersQuery.d.ts +24 -29
- package/dist/v2/react/hooks/useOffersQuery.js +164 -204
- package/dist/v2/react/hooks/usePaymentQuery.js +99 -6
- package/dist/v2/react/providers/TagadaProvider.d.ts +8 -21
- package/dist/v2/react/providers/TagadaProvider.js +79 -673
- package/package.json +1 -1
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TagadaState } from '../../core/client';
|
|
3
|
+
import { RawPluginConfig } from '../../core/utils/pluginConfig';
|
|
4
|
+
import { Environment, EnvironmentConfig } from '../../core/types';
|
|
3
5
|
import { ApiService } from '../../../react/services/apiService';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
interface TagadaContextValue {
|
|
7
|
-
auth: AuthState;
|
|
8
|
-
session: Session | null;
|
|
9
|
-
customer: Customer | null;
|
|
10
|
-
locale: Locale;
|
|
11
|
-
currency: Currency;
|
|
12
|
-
store: Store | null;
|
|
13
|
-
environment: EnvironmentConfig;
|
|
6
|
+
import { formatMoney, formatMoneyWithoutSymbol, formatSimpleMoney, getCurrencyInfo, minorUnitsToMajorUnits, moneyStringOrNumberToMinorUnits, convertCurrency } from '../../../react/utils/money';
|
|
7
|
+
interface TagadaContextValue extends TagadaState {
|
|
14
8
|
apiService: ApiService;
|
|
15
|
-
isLoading: boolean;
|
|
16
|
-
isInitialized: boolean;
|
|
17
|
-
isSessionInitialized: boolean;
|
|
18
|
-
debugMode: boolean;
|
|
19
|
-
pluginConfig: PluginConfig;
|
|
20
|
-
pluginConfigLoading: boolean;
|
|
21
9
|
debugCheckout: {
|
|
22
10
|
isActive: boolean;
|
|
23
11
|
data: any;
|
|
@@ -40,7 +28,7 @@ interface TagadaContextValue {
|
|
|
40
28
|
notifyCheckoutChanged: () => Promise<void>;
|
|
41
29
|
notifyOrderBumpChanged: () => Promise<void>;
|
|
42
30
|
unregisterCheckoutRefresh: (refreshFn?: () => Promise<void>) => void;
|
|
43
|
-
unregisterOrderBumpRefresh: () => void;
|
|
31
|
+
unregisterOrderBumpRefresh: (refreshFn?: () => Promise<void>) => void;
|
|
44
32
|
};
|
|
45
33
|
money: {
|
|
46
34
|
formatMoney: typeof formatMoney;
|
|
@@ -61,8 +49,7 @@ interface TagadaProviderProps {
|
|
|
61
49
|
blockUntilSessionReady?: boolean;
|
|
62
50
|
rawPluginConfig?: RawPluginConfig;
|
|
63
51
|
}
|
|
64
|
-
export declare function TagadaProvider({ children, environment, customApiConfig,
|
|
65
|
-
localConfig, blockUntilSessionReady,
|
|
66
|
-
rawPluginConfig, }: TagadaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function TagadaProvider({ children, environment, customApiConfig, // Ignored for now in TagadaClient, or need to add support
|
|
53
|
+
debugMode, localConfig, blockUntilSessionReady, rawPluginConfig, }: TagadaProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
67
54
|
export declare function useTagadaContext(): TagadaContextValue;
|
|
68
55
|
export {};
|