@funkit/connect 8.2.0 → 8.2.1-next.2
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/CHANGELOG.md +59 -2
- package/dist/{chunk-WIDI2TYC.js → chunk-BP7VOYBS.js} +51 -2
- package/dist/{chunk-JIC2XXGY.js → chunk-KKGSXLMH.js} +12 -2
- package/dist/{chunk-QHRAQNOB.js → chunk-MYPFORR2.js} +12 -2
- package/dist/clients/fanatics.css +4375 -3286
- package/dist/clients/fanatics.d.ts +18 -7
- package/dist/clients/fanatics.js +739 -337
- package/dist/components/AsyncImage/useAsyncImage.d.ts +2 -0
- package/dist/components/Box/Box.d.ts +47 -47
- package/dist/components/Dialog/Dialog.d.ts +3 -1
- package/dist/components/Dialog/DialogContent.css.d.ts +9 -0
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +10 -0
- package/dist/components/FunInput/FunInput.d.ts +4 -0
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
- package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +4 -1
- package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +8 -3
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +1 -0
- package/dist/components/HelpAlert/HelpAlert.d.ts +1 -0
- package/dist/components/Icons/ApplePayIcon.d.ts +4 -0
- package/dist/components/Icons/FanaticsCreditCardIcon.d.ts +4 -0
- package/dist/components/Icons/GooglePayIcon.d.ts +4 -0
- package/dist/components/Icons/RevolutPayIcon.d.ts +4 -0
- package/dist/components/Icons/SepaBankIcon.d.ts +4 -0
- package/dist/components/Icons/VenmoIcon.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Text/Text.d.ts +1 -0
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +10 -0
- package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinnerLoading.d.ts +6 -0
- package/dist/components/TransactionStatus/AnimatedText.d.ts +10 -0
- package/dist/components/TransactionStatus/DotsDivider.d.ts +2 -0
- package/dist/components/TransactionStatus/StepSpinner.d.ts +17 -0
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +5 -7
- package/dist/components/TransactionStatus/TransactionStatusLoading.d.ts +6 -0
- package/dist/css/sprinkles.css.d.ts +241 -49
- package/dist/domains/paymentMethods.d.ts +8 -1
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +1 -1
- package/dist/index.css +4458 -3331
- package/dist/index.js +4275 -3096
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -0
- package/dist/modals/CheckoutModal/{SelectAsset.d.ts → SelectAsset/SelectAsset.d.ts} +3 -3
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +12 -0
- package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +24 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -1
- package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
- package/dist/providers/FunkitConfigContext.d.ts +94 -11
- package/dist/providers/FunkitThemeProvider.d.ts +291 -3
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/checkout.d.ts +6 -0
- package/dist/utils/customer.d.ts +2 -3
- package/dist/utils/flags/config.d.ts +2 -2
- package/dist/wallets/walletConnectors/index.js +7 -7
- package/package.json +4 -4
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FunkitCheckoutConfig } from '../../../providers/FunkitCheckoutContext';
|
|
3
3
|
interface CheckoutPrimaryInfoProps {
|
|
4
|
+
showLeftAlignedDollarValueWithLabel: boolean;
|
|
4
5
|
showTokenAmount: boolean;
|
|
5
6
|
config: FunkitCheckoutConfig;
|
|
6
7
|
usdAmount?: number;
|
|
7
8
|
isLoading?: boolean;
|
|
8
9
|
}
|
|
9
|
-
export declare function CheckoutPrimaryInfo({ showTokenAmount, usdAmount, config, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
10
|
+
export declare function CheckoutPrimaryInfo({ showLeftAlignedDollarValueWithLabel, showTokenAmount, usdAmount, config, isLoading, }: CheckoutPrimaryInfoProps): React.JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -65,6 +65,8 @@ export interface AmountInputDerivedState extends AmountInputState {
|
|
|
65
65
|
};
|
|
66
66
|
isValid: boolean;
|
|
67
67
|
placeholder: string;
|
|
68
|
+
/** Decimal separator based on locale (e.g., '.' for en-US, ',' for de-DE) */
|
|
69
|
+
decimalSeparator: string;
|
|
68
70
|
}
|
|
69
71
|
export type AmountInputAction = {
|
|
70
72
|
/** Switches between fiat and crypto input mode */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
import
|
|
4
|
-
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '
|
|
2
|
+
import { type PaymentMethodAccountInfo, type PaymentMethodBrokerageInfo } from '../../../domains/paymentMethods';
|
|
3
|
+
import type { TransferTokenDefault } from '../../../hooks/useTokenChain';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../stepTransition';
|
|
5
5
|
export type SelectAssetState = CheckoutModalCommonState & {
|
|
6
6
|
paymentMethodInfo: PaymentMethodBrokerageInfo | PaymentMethodAccountInfo;
|
|
7
7
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import type { PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
|
+
import type { TransferTokenDefault } from '../../../hooks/useTokenChain';
|
|
4
|
+
interface SelectAssetInfoSectionProps {
|
|
5
|
+
totalBalance: number;
|
|
6
|
+
paymentMethodInfo: PaymentMethodInfo;
|
|
7
|
+
onTokenTransfer: (transferToken: TransferTokenDefault) => void;
|
|
8
|
+
onSelectSource: () => void;
|
|
9
|
+
isSourceNavWidgetEnabled: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const SelectAssetInfoSection: FC<SelectAssetInfoSectionProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
import { type PaymentMethodInfo } from '../../../domains/paymentMethods';
|
|
3
|
+
import type { AssetHoldingsItem } from '../../../domains/wallet';
|
|
4
|
+
interface AssetOption {
|
|
5
|
+
asset: AssetHoldingsItem;
|
|
6
|
+
badgeText: string;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
isUserSelected: boolean;
|
|
9
|
+
priority: number;
|
|
10
|
+
minUsdRequired?: number;
|
|
11
|
+
}
|
|
12
|
+
interface SelectAssetListProps {
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
assetOptions: AssetOption[];
|
|
15
|
+
selectedChainTokenSymbol: string | undefined;
|
|
16
|
+
paymentMethodInfo: PaymentMethodInfo;
|
|
17
|
+
navigateOnAssetClick: boolean;
|
|
18
|
+
onBalanceTopUpSwitch?: () => void;
|
|
19
|
+
onClose?: () => void;
|
|
20
|
+
onAssetSelect: (chainSymbolKey: string) => void;
|
|
21
|
+
onContinueWithToken: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const SelectAssetList: FC<SelectAssetListProps>;
|
|
24
|
+
export {};
|
|
@@ -19,7 +19,7 @@ import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAcco
|
|
|
19
19
|
import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
|
|
20
20
|
import { type MeldQuotesNext, type MeldQuotesState } from './MeldQuotes/MeldQuotes';
|
|
21
21
|
import { type MeldRedirectNext, type MeldRedirectState } from './MeldRedirect/MeldRedirect';
|
|
22
|
-
import { type SelectAssetNext, type SelectAssetState } from './SelectAsset';
|
|
22
|
+
import { type SelectAssetNext, type SelectAssetState } from './SelectAsset/SelectAsset';
|
|
23
23
|
import { type SourceChangeNext, type SourceChangeState } from './SourceChange/SourceChange';
|
|
24
24
|
import { type TransferTokenNext, type TransferTokenState } from './TransferToken/TransferToken';
|
|
25
25
|
import { type FiatAccountDetailNext, type FiatAccountDetailState } from './VirtualFiatAccount/FiatAccountDetail';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const baseStyles: string;
|
|
2
|
-
export declare const homeCheckoutDisplayRowStyle: Record<"
|
|
2
|
+
export declare const homeCheckoutDisplayRowStyle: Record<"hoverBackground" | "defaultBorder" | "defaultBackground", string>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import type { BluvoExchangeType } from '../consts/bluvo';
|
|
3
|
+
import type { PaymentMethod } from '../domains/paymentMethods';
|
|
2
4
|
export interface FunkitTextCustomizationsConfig {
|
|
3
5
|
virtualFiat: string;
|
|
4
6
|
brokerageOrExchange: string;
|
|
@@ -12,9 +14,44 @@ export interface FunkitTextCustomizationsConfig {
|
|
|
12
14
|
transferTokens: string;
|
|
13
15
|
receiveDropdownTitle: string;
|
|
14
16
|
receiveDropdownLabel: string;
|
|
17
|
+
txStatus?: {
|
|
18
|
+
failed?: {
|
|
19
|
+
description?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
};
|
|
22
|
+
delayed?: {
|
|
23
|
+
description?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
26
|
+
depositPending?: {
|
|
27
|
+
description?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
};
|
|
30
|
+
depositSucceeded?: {
|
|
31
|
+
description?: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
};
|
|
34
|
+
submitting?: {
|
|
35
|
+
description?: string;
|
|
36
|
+
title?: string;
|
|
37
|
+
};
|
|
38
|
+
waitingForExchange?: {
|
|
39
|
+
description?: string;
|
|
40
|
+
title?: string;
|
|
41
|
+
};
|
|
42
|
+
withdrawalPending?: {
|
|
43
|
+
description?: string;
|
|
44
|
+
title?: string;
|
|
45
|
+
};
|
|
46
|
+
withdrawalSucceeded?: {
|
|
47
|
+
description?: string;
|
|
48
|
+
title?: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
15
51
|
confirmationScreen: {
|
|
16
52
|
payAmountLabel: string;
|
|
17
53
|
receiveAmountLabel: string;
|
|
54
|
+
sourceLabel?: string;
|
|
18
55
|
};
|
|
19
56
|
paymentMethodSubtitles: {
|
|
20
57
|
accountBalance?: string;
|
|
@@ -39,6 +76,13 @@ export interface FunkitUiSelectedRouteConfig {
|
|
|
39
76
|
/** Label for passthrough routes - defaults to "Native Bridge" */
|
|
40
77
|
passthroughLabel?: string;
|
|
41
78
|
}
|
|
79
|
+
export type FunkitPaymentMethodIconsConfig = Partial<Record<PaymentMethod, {
|
|
80
|
+
src: string;
|
|
81
|
+
size?: {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
};
|
|
85
|
+
}>>;
|
|
42
86
|
export interface FunkitUiCustomizationsConfig {
|
|
43
87
|
/** Title alignment - defaults to "center" */
|
|
44
88
|
alignTitle?: 'left' | 'center';
|
|
@@ -46,15 +90,25 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
46
90
|
callToActionsUppercase?: boolean;
|
|
47
91
|
/** Whether to enable compact list style for option boxes - defaults to false */
|
|
48
92
|
enableCompactList?: boolean;
|
|
93
|
+
checkoutHistory?: {
|
|
94
|
+
/** Whether to show the bottom "Get help" text in a {@link FunAlert} - defaults to true */
|
|
95
|
+
showGetHelpAsAlert?: boolean;
|
|
96
|
+
/** Show a simplified UI with less rows and no "More details" section - defaults to false */
|
|
97
|
+
simplifiedUi?: boolean;
|
|
98
|
+
};
|
|
49
99
|
confirmationScreen?: {
|
|
50
100
|
/** Custom destination icon and text used in checkout summary */
|
|
51
101
|
destinationConfig?: FunkitUiDestinationConfig;
|
|
52
102
|
/** when source and destination are the same address, show destination as payment method instead of source - defaults to false */
|
|
53
103
|
preferDestinationWhenSame?: boolean;
|
|
104
|
+
/** Whether to show the bottom disclaimer in a {@link FunAlert} - defaults to true */
|
|
105
|
+
showDisclaimerAsAlert?: boolean;
|
|
54
106
|
/** Whether to show the total payment amount in USD below the token amount equivalent - defaults to false */
|
|
55
107
|
showPaymentAmountUsd?: boolean;
|
|
56
108
|
/** Whether to show the total receive amount in USD below the token amount equivalent - defaults to false */
|
|
57
109
|
showReceiveAmountUsd?: boolean;
|
|
110
|
+
/** Whether to show the amount summary above the payment method summary rather than below - defaults to false */
|
|
111
|
+
showAmountSummaryAbovePaymentMethod?: boolean;
|
|
58
112
|
/**
|
|
59
113
|
* Whether and how to show transaction fee's digest.
|
|
60
114
|
* - "none": show nothing (default)
|
|
@@ -63,17 +117,29 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
63
117
|
showTransactionDigest?: 'none' | 'chainDependent';
|
|
64
118
|
/** Whether to show the amount of tokens below the USD equivalent - defaults to true */
|
|
65
119
|
showTokenAmount?: boolean;
|
|
120
|
+
/** Instead of showing the dollar value centered, show it left-aligned with "Deposit" label - defaults to false */
|
|
121
|
+
showLeftAlignedDollarValueWithLabel?: boolean;
|
|
122
|
+
/** Whether to show "Instant" instead of "< 1 min" for time estimates under 1 minute - defaults to false */
|
|
123
|
+
showInstantTimeEstimate?: boolean;
|
|
66
124
|
/**
|
|
67
125
|
* Config for "Selected Route" row. When defined, the row is shown.
|
|
68
126
|
* Omit to hide the selected route row (default).
|
|
69
127
|
*/
|
|
70
128
|
selectedRouteConfig?: FunkitUiSelectedRouteConfig;
|
|
129
|
+
/**
|
|
130
|
+
* How to indicate the current step during transaction progress.
|
|
131
|
+
* - "spinner": show the animated spinner (default)
|
|
132
|
+
* - "textual": show a textual "1 of 2" step indicator instead
|
|
133
|
+
*/
|
|
134
|
+
stepIndicatorType?: 'spinner' | 'textual';
|
|
71
135
|
};
|
|
72
136
|
inputAmountScreen?: {
|
|
73
137
|
/** Whether to allow entering an amount of tokens, rather than only USD - defaults to true */
|
|
74
138
|
allowTokenAmountInput?: boolean;
|
|
75
139
|
};
|
|
76
140
|
selectAssetScreen?: {
|
|
141
|
+
/** Whether the secondary token symbol is visible - defaults to true */
|
|
142
|
+
isSecondaryTokenSymbolVisible?: boolean;
|
|
77
143
|
/** Whether to navigate directly on asset click, rather than having to select then click Continue - defaults to false */
|
|
78
144
|
navigateOnAssetClick?: boolean;
|
|
79
145
|
/**
|
|
@@ -97,6 +163,13 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
97
163
|
connectExchangeScreen?: {
|
|
98
164
|
/** Function that returns a custom React component to render before other UIs in the connect exchange screen */
|
|
99
165
|
customTopComponent?: () => ReactNode;
|
|
166
|
+
/** Function that returns a custom React component to render instead of the normal page */
|
|
167
|
+
CustomComponent?: ComponentType<{
|
|
168
|
+
appName: string;
|
|
169
|
+
exchangeIcon: JSX.Element | null;
|
|
170
|
+
exchangeName: string;
|
|
171
|
+
exchangeType: BluvoExchangeType | null;
|
|
172
|
+
}>;
|
|
100
173
|
};
|
|
101
174
|
sourceChangeScreen?: {
|
|
102
175
|
/** Whether to show target asset selection menu if dynamicTargetAssetCandidates exist - defaults to false */
|
|
@@ -105,24 +178,34 @@ export interface FunkitUiCustomizationsConfig {
|
|
|
105
178
|
showWalletOnInsufficientBalance?: boolean;
|
|
106
179
|
/** Function that returns a custom React component to render before other UIs in the source change screen */
|
|
107
180
|
customTopComponent?: () => ReactNode;
|
|
181
|
+
paymentMethodIcons?: {
|
|
182
|
+
primary?: FunkitPaymentMethodIconsConfig;
|
|
183
|
+
/** Custom secondary icon or "value icon" in the context of FunPaymentMethodItem */
|
|
184
|
+
secondary?: FunkitPaymentMethodIconsConfig;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
customIcons?: {
|
|
188
|
+
paymentDestination?: ComponentType;
|
|
189
|
+
paymentSource?: ComponentType;
|
|
190
|
+
timeEstimate?: ComponentType;
|
|
191
|
+
youReceive?: ComponentType;
|
|
192
|
+
youSend?: ComponentType;
|
|
108
193
|
};
|
|
109
194
|
}
|
|
110
195
|
/**
|
|
111
|
-
* Makes all properties of T required except for
|
|
196
|
+
* Makes all properties of T required except for custom components which remains optional.
|
|
112
197
|
* Used for internal screen configs where we want defaults for all settings but allow
|
|
113
|
-
*
|
|
198
|
+
* custom slot components to be optionally provided.
|
|
114
199
|
*/
|
|
115
|
-
type
|
|
116
|
-
customTopComponent?: () => ReactNode;
|
|
117
|
-
};
|
|
200
|
+
type RequiredExceptCustomComponents<T> = Required<Omit<T & {}, `${string}Component`>>;
|
|
118
201
|
export type FunkitUiCustomizationsConfigInternal = Required<FunkitUiCustomizationsConfig> & {
|
|
119
202
|
confirmationScreen: FunkitUiCustomizationsConfig['confirmationScreen'] & Required<Omit<FunkitUiCustomizationsConfig['confirmationScreen'] & {}, 'destinationConfig' | 'selectedRouteConfig'>>;
|
|
120
203
|
inputAmountScreen: Required<FunkitUiCustomizationsConfig['inputAmountScreen'] & {}>;
|
|
121
|
-
selectAssetScreen:
|
|
122
|
-
transferCryptoScreen:
|
|
123
|
-
selectBrokerageScreen:
|
|
124
|
-
connectExchangeScreen:
|
|
125
|
-
sourceChangeScreen:
|
|
204
|
+
selectAssetScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['selectAssetScreen']>;
|
|
205
|
+
transferCryptoScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['transferCryptoScreen']>;
|
|
206
|
+
selectBrokerageScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['selectBrokerageScreen']>;
|
|
207
|
+
connectExchangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['connectExchangeScreen']>;
|
|
208
|
+
sourceChangeScreen: RequiredExceptCustomComponents<FunkitUiCustomizationsConfig['sourceChangeScreen']>;
|
|
126
209
|
};
|
|
127
210
|
export declare const DEFAULT_TEXT_CUSTOMIZATIONS: FunkitTextCustomizationsConfig;
|
|
128
211
|
export declare const DEFAULT_UI_CUSTOMIZATIONS: FunkitUiCustomizationsConfigInternal;
|