@lydianpay/sdk-web 2.3.0 → 3.0.1
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 +7 -7
- package/dist/chunks/{index-C4FghA5o.js → index-NI3RoQG3.js} +7575 -10102
- package/dist/chunks/{index-D40m-QBR.js → index-YAGlsS0s.js} +1 -1
- package/dist/chunks/{metamask-sdk-Dx44aYBT.js → metamask-sdk-CFm2IK48.js} +1 -1
- package/dist/chunks/mount-bhuHFGLm.js +12914 -0
- package/dist/lydian.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/constants.d.ts +0 -17
- package/dist/types/types.d.ts +7 -2
- package/dist/types/ui/Checkout.d.ts +42 -141
- package/dist/types/ui/brandingHelpers.d.ts +0 -4
- package/dist/types/ui/countdownBanner.d.ts +4 -1
- package/dist/types/ui/countries.d.ts +1 -1
- package/dist/types/ui/networkListHelpers.d.ts +2 -2
- package/dist/types/ui/optionFilter.d.ts +4 -1
- package/dist/types/ui/react/AlertBanner.d.ts +6 -0
- package/dist/types/ui/react/AssetSelectScreen.d.ts +6 -0
- package/dist/types/ui/react/CheckoutApp.d.ts +9 -0
- package/dist/types/ui/react/CloseTransactionDialogBody.d.ts +7 -0
- package/dist/types/ui/react/ConnectWithQrScreen.d.ts +6 -0
- package/dist/types/ui/react/ConnectingWalletScreen.d.ts +6 -0
- package/dist/types/ui/react/CopyField.d.ts +16 -0
- package/dist/types/ui/react/DetailCard.d.ts +12 -0
- package/dist/types/ui/react/DownloadWalletScreen.d.ts +4 -0
- package/dist/types/ui/react/FileDropzone.d.ts +8 -0
- package/dist/types/ui/react/FormField.d.ts +19 -0
- package/dist/types/ui/react/FormSelect.d.ts +12 -0
- package/dist/types/ui/react/KycScreen.d.ts +6 -0
- package/dist/types/ui/react/LoadingScreen.d.ts +9 -0
- package/dist/types/ui/react/NetworkSelectScreen.d.ts +6 -0
- package/dist/types/ui/{buttons/optionButton.d.ts → react/OptionButton.d.ts} +4 -3
- package/dist/types/ui/react/OtpInput.d.ts +4 -0
- package/dist/types/ui/react/PayButtons.d.ts +4 -0
- package/dist/types/ui/react/PaymentFailureScreen.d.ts +6 -0
- package/dist/types/ui/react/PaymentHeaderSection.d.ts +13 -0
- package/dist/types/ui/react/PaymentSuccessScreen.d.ts +6 -0
- package/dist/types/ui/react/RestoreDetailsDialogBody.d.ts +5 -0
- package/dist/types/ui/react/ScanToPayScreen.d.ts +6 -0
- package/dist/types/ui/react/SearchSelect.d.ts +11 -0
- package/dist/types/ui/react/SummaryRow.d.ts +11 -0
- package/dist/types/ui/react/TimerBanner.d.ts +4 -0
- package/dist/types/ui/react/WalletSelectScreen.d.ts +6 -0
- package/dist/types/ui/react/WarningIcon.d.ts +4 -0
- package/dist/types/ui/react/callbacksFixture.d.ts +6 -0
- package/dist/types/ui/react/checkoutStore.d.ts +138 -0
- package/dist/types/ui/react/checkoutTargets.d.ts +14 -0
- package/dist/types/ui/react/mount.d.ts +10 -0
- package/dist/types/ui/scanToPayView.d.ts +36 -0
- package/dist/types/ui/walletSelection.d.ts +4 -0
- package/dist/types/utils/collections.d.ts +0 -2
- package/dist/types/utils/index.d.ts +0 -8
- package/package.json +12 -3
- package/dist/types/ui/buttons/assetButton.d.ts +0 -2
- package/dist/types/ui/buttons/networkButton.d.ts +0 -2
- package/dist/types/ui/buttons/walletButton.d.ts +0 -6
- package/dist/types/ui/components/additionalInfoContent.d.ts +0 -1
- package/dist/types/ui/components/alertBanner.d.ts +0 -8
- package/dist/types/ui/components/assetSelectContent.d.ts +0 -1
- package/dist/types/ui/components/changePaymentMethodRow.d.ts +0 -1
- package/dist/types/ui/components/closeTransactionModal.d.ts +0 -1
- package/dist/types/ui/components/connectWithQrContent.d.ts +0 -1
- package/dist/types/ui/components/connectingWalletContent.d.ts +0 -1
- package/dist/types/ui/components/copyButton.d.ts +0 -7
- package/dist/types/ui/components/copyField.d.ts +0 -10
- package/dist/types/ui/components/detailCard.d.ts +0 -6
- package/dist/types/ui/components/detailRow.d.ts +0 -9
- package/dist/types/ui/components/downloadWalletContent.d.ts +0 -1
- package/dist/types/ui/components/featuredWalletBanner.d.ts +0 -3
- package/dist/types/ui/components/fieldShell.d.ts +0 -7
- package/dist/types/ui/components/fileDropzone.d.ts +0 -8
- package/dist/types/ui/components/formField.d.ts +0 -8
- package/dist/types/ui/components/formSelect.d.ts +0 -12
- package/dist/types/ui/components/loadingContent.d.ts +0 -1
- package/dist/types/ui/components/logoHeader.d.ts +0 -1
- package/dist/types/ui/components/networkPill.d.ts +0 -5
- package/dist/types/ui/components/networkSelectContent.d.ts +0 -1
- package/dist/types/ui/components/payButtons.d.ts +0 -1
- package/dist/types/ui/components/paymentFailureContent.d.ts +0 -1
- package/dist/types/ui/components/paymentHeader.d.ts +0 -1
- package/dist/types/ui/components/paymentSuccessContent.d.ts +0 -1
- package/dist/types/ui/components/restoreDetailsModal.d.ts +0 -1
- package/dist/types/ui/components/scanToPayContent.d.ts +0 -1
- package/dist/types/ui/components/searchSelectField.d.ts +0 -18
- package/dist/types/ui/components/summaryRow.d.ts +0 -7
- package/dist/types/ui/components/summaryRowGroup.d.ts +0 -7
- package/dist/types/ui/components/timerBanner.d.ts +0 -1
- package/dist/types/ui/components/underpaidContent.d.ts +0 -3
- package/dist/types/ui/components/walletSelectContent.d.ts +0 -1
- package/dist/types/ui/domHelpers.d.ts +0 -3
- package/dist/types/ui/restoreDetailsController.d.ts +0 -48
- package/dist/types/ui/searchSelectController.d.ts +0 -28
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { DisplayAsset } from './types';
|
|
2
|
-
export declare const CryptoTransactionStatusPending = 0;
|
|
3
|
-
export declare const CryptoTransactionStatusSuccess = 1;
|
|
4
|
-
export declare const CryptoTransactionStatusPendingKYCVerification = -3;
|
|
5
|
-
export declare const TransactionStatusPending = 0;
|
|
6
|
-
export declare const TransactionStatusSuccess = 1;
|
|
7
|
-
export declare const PaymentStatusUnpaid = 0;
|
|
8
|
-
export declare const PaymentStatusPartiallyPaid = 1;
|
|
9
|
-
export declare const PaymentStatusPaid = 2;
|
|
10
|
-
export declare const PaymentStatusOverpaid = 3;
|
|
11
|
-
export declare const PaymentRequestStatusExpired = -1;
|
|
12
|
-
export declare const PaymentRequestStatusPending = 0;
|
|
13
|
-
export declare const PaymentRequestStatusConfirmed = 1;
|
|
14
|
-
export declare const BaseUrlDev = "https://api.lydian.dev";
|
|
15
|
-
export declare const BaseUrlSandbox = "https://api.sandbox.lydian.com";
|
|
16
|
-
export declare const BaseUrlProduction = "https://api.lydian.com";
|
|
17
2
|
export declare const DEFAULT_LOGO_URL = "https://pay.lydian.com/lydian-wordmark-aqua-2.svg";
|
|
18
|
-
export declare const LYDIAN_LOGO_DOMAINS: string[];
|
|
19
|
-
export declare const FONT_DOMAINS: string[];
|
|
20
3
|
export declare const DEFAULT_FONT_URL = "https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap";
|
|
21
4
|
export declare const DEFAULT_FONT_LINK_ID = "lydian-default-font";
|
|
22
5
|
export declare const AllowedAssetArbitrum = "ARB";
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const currencies: readonly ["USD", "TRY"];
|
|
1
|
+
export declare const currencies: readonly ["USD", "TRY", "PHP"];
|
|
2
2
|
export type Currency = (typeof currencies)[number];
|
|
3
3
|
export declare function isCurrency(value: unknown): value is Currency;
|
|
4
4
|
export type Transaction = {
|
|
@@ -160,7 +160,7 @@ export type GetSessionResponse = {
|
|
|
160
160
|
cancelURL: string;
|
|
161
161
|
successURL: string;
|
|
162
162
|
failureURL: string;
|
|
163
|
-
|
|
163
|
+
allowedAssets: SessionAllowedAsset[] | null;
|
|
164
164
|
allowedWalletsConfig: AllowedWalletConfig[] | null;
|
|
165
165
|
recommendedNetwork: string;
|
|
166
166
|
merchantName?: string;
|
|
@@ -274,6 +274,11 @@ export type GetTransactionResponse = {
|
|
|
274
274
|
remainingLocal: number;
|
|
275
275
|
payments: PaymentRequest[];
|
|
276
276
|
};
|
|
277
|
+
export type SessionAllowedAsset = {
|
|
278
|
+
code: string;
|
|
279
|
+
type?: string;
|
|
280
|
+
networks?: string[] | null;
|
|
281
|
+
};
|
|
277
282
|
export type Asset = {
|
|
278
283
|
code: string;
|
|
279
284
|
type?: string;
|
|
@@ -3,140 +3,53 @@ export declare class Checkout extends HTMLElement {
|
|
|
3
3
|
private shadow;
|
|
4
4
|
private initOptions;
|
|
5
5
|
private API;
|
|
6
|
-
private session;
|
|
6
|
+
private get session();
|
|
7
|
+
private set session(value);
|
|
7
8
|
private sessionPromoted;
|
|
8
|
-
private
|
|
9
|
+
private reactChunkReady;
|
|
10
|
+
private uiUnavailable;
|
|
11
|
+
private get cryptoTransaction();
|
|
12
|
+
private set cryptoTransaction(value);
|
|
9
13
|
private linkedTransaction;
|
|
10
14
|
private consecutivePollFailures;
|
|
11
15
|
private pollInFlight;
|
|
12
16
|
private walletChainWarned;
|
|
13
17
|
private getCryptoTransactionIntervalID;
|
|
14
18
|
private readonly sessionQuoteWatcher;
|
|
15
|
-
private containerPaymentSuccess;
|
|
16
|
-
private containerPaymentFailure;
|
|
17
|
-
private containerQRCode;
|
|
18
|
-
private lydianProcessingContainer;
|
|
19
|
-
private btnCancelLoading;
|
|
20
19
|
private paymentHeaderWasVisible;
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private paymentIdField;
|
|
24
|
-
private btnClosePaymentFailure;
|
|
25
|
-
private containerWalletSelect;
|
|
26
|
-
private modalContainerWalletSelect;
|
|
27
|
-
private containerConnectingWallet;
|
|
28
|
-
private modalContainerConnectingWallet;
|
|
29
|
-
private containerConnectWithQr;
|
|
30
|
-
private modalContainerConnectWithQr;
|
|
31
|
-
private containerDownloadWallet;
|
|
32
|
-
private modalContainerDownloadWallet;
|
|
33
|
-
private containerNetworks;
|
|
34
|
-
private containerNetworkList;
|
|
20
|
+
private connectQrElement;
|
|
21
|
+
private pairingQrStyling;
|
|
35
22
|
private lydianConnect;
|
|
36
23
|
private walletConnection;
|
|
37
24
|
private connectedAccount;
|
|
38
25
|
private connectAbort;
|
|
39
|
-
private pendingPairingUri;
|
|
26
|
+
private get pendingPairingUri();
|
|
27
|
+
private set pendingPairingUri(value);
|
|
40
28
|
private connecting;
|
|
41
|
-
private btnCancelAssetSelection;
|
|
42
|
-
private btnCancelNetworkSelection;
|
|
43
|
-
private btnNetworkSummaryRow;
|
|
44
|
-
private btnWalletSummaryRow;
|
|
45
|
-
private btnAssetWalletSummaryRow;
|
|
46
|
-
private assetSelectTotalAmount;
|
|
47
|
-
private assetMarkupNotice;
|
|
48
|
-
private paymentHeader;
|
|
49
|
-
private merchantLogoHeader;
|
|
50
|
-
private changePaymentMethodRow;
|
|
51
|
-
private btnHeaderBack;
|
|
52
29
|
private headerBackAction;
|
|
53
|
-
private btnChangePaymentMethod;
|
|
54
30
|
private logoHeaderWasVisible;
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private paymentHeaderMerchant;
|
|
59
|
-
private containerCryptoPayment;
|
|
60
|
-
private containerAssets;
|
|
31
|
+
private readonly checkoutStore;
|
|
32
|
+
private checkoutApp;
|
|
33
|
+
private kycDraftSource;
|
|
61
34
|
private canvasQRCode;
|
|
62
|
-
private
|
|
63
|
-
private displayQrSubtotal;
|
|
64
|
-
private displayQrNetworkFee;
|
|
65
|
-
private displayQrMarkup;
|
|
66
|
-
private qrMarkupRow;
|
|
67
|
-
private displayWalletAddress;
|
|
68
|
-
private qrNetworkLogo;
|
|
69
|
-
private qrNetworkName;
|
|
70
|
-
private btnCancelQr;
|
|
71
|
-
private btnOpenInWallet;
|
|
72
|
-
private btnOpenInWalletLabel;
|
|
73
|
-
private scanPayHeading;
|
|
74
|
-
private displayCopyNetwork;
|
|
75
|
-
private displayCopyAmount;
|
|
76
|
-
private btnDownloadQr;
|
|
77
|
-
private btnChangeCoin;
|
|
35
|
+
private scanQrPanel;
|
|
78
36
|
private qrCodeStyling;
|
|
79
|
-
private qrCodeLink;
|
|
80
|
-
private scanToPayRoot;
|
|
81
|
-
private qrUnavailableNotice;
|
|
82
|
-
private qrCopyFeedback;
|
|
83
37
|
private pendingWalletSend;
|
|
84
38
|
private countdownBanner;
|
|
85
|
-
private isCheckoutSettled;
|
|
86
|
-
private
|
|
87
|
-
private
|
|
88
|
-
private selectedAsset;
|
|
89
|
-
private
|
|
90
|
-
private selectedNetwork;
|
|
91
|
-
private selectedWallet;
|
|
39
|
+
private get isCheckoutSettled();
|
|
40
|
+
private set isCheckoutSettled(value);
|
|
41
|
+
private get selectedAsset();
|
|
42
|
+
private set selectedAsset(value);
|
|
43
|
+
private get selectedNetwork();
|
|
44
|
+
private set selectedNetwork(value);
|
|
45
|
+
private get selectedWallet();
|
|
46
|
+
private set selectedWallet(value);
|
|
92
47
|
private modal;
|
|
93
|
-
private modalContainerPaymentSuccess;
|
|
94
|
-
private modalContainerPaymentFailure;
|
|
95
|
-
private modalContainerQRCode;
|
|
96
|
-
private modalContainerNetworks;
|
|
97
|
-
private modalContainerCryptoPayment;
|
|
98
|
-
private displaySuccessAmount;
|
|
99
|
-
private successOverpaidBanner;
|
|
100
|
-
private btnDoneSuccess;
|
|
101
|
-
private underpaidSlot;
|
|
102
|
-
private underpaidNoticeSlot;
|
|
103
|
-
private underpaidActionsSlot;
|
|
104
|
-
private labelAssetTotal;
|
|
105
|
-
private scanExactAmountNotice;
|
|
106
|
-
private modalButtonChooseDifferentAsset;
|
|
107
48
|
private modalCloseTransactionModal;
|
|
108
|
-
private
|
|
109
|
-
private
|
|
110
|
-
private
|
|
111
|
-
private
|
|
112
|
-
private modalContainerKYCAndTravelRules;
|
|
113
|
-
private email;
|
|
114
|
-
private firstName;
|
|
115
|
-
private lastName;
|
|
116
|
-
private street;
|
|
117
|
-
private city;
|
|
118
|
-
private region;
|
|
119
|
-
private postalCode;
|
|
120
|
-
private countryInput;
|
|
121
|
-
private countryCombobox;
|
|
122
|
-
private documentType;
|
|
123
|
-
private documentFileFront;
|
|
124
|
-
private documentFileBackContainer;
|
|
125
|
-
private documentFileBack;
|
|
126
|
-
private buttonKYCVerificationAndTravelRules;
|
|
127
|
-
private btnCancelKyc;
|
|
128
|
-
private storeKYC;
|
|
129
|
-
private restoreController;
|
|
130
|
-
private kycStepLabel;
|
|
131
|
-
private kycStepBasic;
|
|
132
|
-
private kycStepAddress;
|
|
133
|
-
private kycStepDocument;
|
|
134
|
-
private btnKycWalletSummaryRow;
|
|
135
|
-
private btnKycNetworkSummaryRow;
|
|
136
|
-
private btnCoinSummaryRow;
|
|
137
|
-
private kycSteps;
|
|
138
|
-
private restoreContext;
|
|
139
|
-
private currentKycStepIndex;
|
|
49
|
+
private closeTransactionModalBody;
|
|
50
|
+
private modalRestoreDetails;
|
|
51
|
+
private get restoreContext();
|
|
52
|
+
private set restoreContext(value);
|
|
140
53
|
private brandFontLink;
|
|
141
54
|
constructor();
|
|
142
55
|
initialize(options: CheckoutInitOptions): Promise<void>;
|
|
@@ -149,29 +62,20 @@ export declare class Checkout extends HTMLElement {
|
|
|
149
62
|
private fetchLinkedTransaction;
|
|
150
63
|
disconnectedCallback(): void;
|
|
151
64
|
private renewExpiredQuote;
|
|
152
|
-
private updateDisplayedAmounts;
|
|
153
|
-
private isScreenVisible;
|
|
154
65
|
private ensureFreshSession;
|
|
155
66
|
private markPromotedFrom;
|
|
156
67
|
private loadInitialState;
|
|
157
68
|
private setSelectedAsset;
|
|
158
69
|
private setSelectedNetwork;
|
|
159
70
|
private setSelectedWallet;
|
|
160
|
-
private setDetailRow;
|
|
161
|
-
private hideDetailRow;
|
|
162
|
-
private syncDetailCards;
|
|
163
71
|
private showPaymentSuccess;
|
|
164
72
|
private hidePaymentHeader;
|
|
165
73
|
private showUnderpaid;
|
|
166
|
-
private safeFormatCurrency;
|
|
167
|
-
private safeFormatLocal;
|
|
168
74
|
private reportFailure;
|
|
169
75
|
private showErrorBanner;
|
|
170
|
-
private flushPendingErrorBanner;
|
|
171
76
|
private clearErrorBanner;
|
|
172
77
|
private showPaymentFailure;
|
|
173
|
-
private
|
|
174
|
-
private hidePaymentSuccess;
|
|
78
|
+
private confirmCloseTransaction;
|
|
175
79
|
private setProcessingMessage;
|
|
176
80
|
private showProcessing;
|
|
177
81
|
private hideProcessing;
|
|
@@ -186,14 +90,21 @@ export declare class Checkout extends HTMLElement {
|
|
|
186
90
|
private refreshExpirationCountdown;
|
|
187
91
|
private endCheckout;
|
|
188
92
|
private returnToCoinSelection;
|
|
93
|
+
private drawPendingQrCode;
|
|
189
94
|
private hideQRCode;
|
|
190
95
|
private render;
|
|
191
96
|
private initializeComponents;
|
|
192
|
-
private wireWarningIconFallbacks;
|
|
193
97
|
private wireCopyFields;
|
|
194
98
|
private copyAndFlash;
|
|
195
99
|
private flashCopyFeedback;
|
|
100
|
+
private scanToPayCallbacks;
|
|
101
|
+
private resolveAppTargets;
|
|
102
|
+
private clearSelection;
|
|
103
|
+
private chooseNetwork;
|
|
104
|
+
private chooseAsset;
|
|
196
105
|
private attachListeners;
|
|
106
|
+
private requireApi;
|
|
107
|
+
private openRestoreDetails;
|
|
197
108
|
private startListeningCryptoTransaction;
|
|
198
109
|
private readTransactionOnce;
|
|
199
110
|
private collectUnderpaidBalance;
|
|
@@ -201,16 +112,15 @@ export declare class Checkout extends HTMLElement {
|
|
|
201
112
|
private settleTerminalTransaction;
|
|
202
113
|
private updatePaymentHeader;
|
|
203
114
|
private setAssetButtons;
|
|
204
|
-
private attachListenersOnAssets;
|
|
205
115
|
private setWalletButtons;
|
|
206
|
-
private
|
|
116
|
+
private chooseWallet;
|
|
207
117
|
private flowSettings;
|
|
118
|
+
private syncFlowSettings;
|
|
208
119
|
private hasConnectableWallet;
|
|
209
120
|
private connectSelectedWallet;
|
|
210
121
|
private releaseTopLayer;
|
|
211
122
|
private reclaimTopLayer;
|
|
212
123
|
private failWalletConnect;
|
|
213
|
-
private hideConnectScreens;
|
|
214
124
|
private syncChangeMethodButton;
|
|
215
125
|
private setHeaderBack;
|
|
216
126
|
private hideWalletFlowScreens;
|
|
@@ -218,13 +128,13 @@ export declare class Checkout extends HTMLElement {
|
|
|
218
128
|
private showConnectingWallet;
|
|
219
129
|
private showOpenWalletButton;
|
|
220
130
|
private showWalletOpenFailed;
|
|
131
|
+
private openSelectedWallet;
|
|
132
|
+
private cancelConnect;
|
|
221
133
|
private showConnectWithQr;
|
|
222
|
-
private
|
|
134
|
+
private drawPendingPairingQr;
|
|
223
135
|
private showDownloadWallet;
|
|
224
136
|
private showWalletSelectFromDownload;
|
|
225
|
-
private setTextById;
|
|
226
137
|
private setNetworkButtons;
|
|
227
|
-
private attachListenerOnNetworks;
|
|
228
138
|
private applyBranding;
|
|
229
139
|
private beginPayment;
|
|
230
140
|
private beginTransaction;
|
|
@@ -232,17 +142,8 @@ export declare class Checkout extends HTMLElement {
|
|
|
232
142
|
private walletSendForSigning;
|
|
233
143
|
private signAndSubmit;
|
|
234
144
|
private showKycScreen;
|
|
235
|
-
private
|
|
236
|
-
private
|
|
237
|
-
private fillWalletSummaryRow;
|
|
238
|
-
private populateKycSummaryRows;
|
|
239
|
-
private applyKycFieldVisibility;
|
|
240
|
-
private renderKycStep;
|
|
241
|
-
private syncKycContinueEnabled;
|
|
242
|
-
private readKycFieldValues;
|
|
243
|
-
private showKycFieldError;
|
|
244
|
-
private clearKycFieldErrors;
|
|
245
|
-
private handleKycContinue;
|
|
145
|
+
private showScreen;
|
|
146
|
+
private stashKycDraft;
|
|
246
147
|
private submitKycVerification;
|
|
247
148
|
private showDocumentOnlyKycScreen;
|
|
248
149
|
private restoreWithCustomerUUID;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export declare const isSafeColor: (color?: string) => color is string;
|
|
2
|
-
export declare const isSafeFontFamily: (fontFamily?: string) => fontFamily is string;
|
|
3
|
-
export declare const isAllowedFontUrl: (fontUrl?: string) => fontUrl is string;
|
|
4
|
-
export declare const isAllowedLogoUrl: (logoUrl?: string) => logoUrl is string;
|
|
5
1
|
export declare const resolveLogoUrl: (logoUrl?: string) => string;
|
|
6
2
|
export declare const sanitizeTermNotice: (rawHtml: string) => string;
|
|
@@ -10,14 +10,16 @@ type ClockElement = {
|
|
|
10
10
|
};
|
|
11
11
|
export declare class CountdownBannerController {
|
|
12
12
|
private readonly slot;
|
|
13
|
-
private
|
|
13
|
+
private clock;
|
|
14
14
|
private interval;
|
|
15
15
|
private targetExpiry;
|
|
16
16
|
private wasVisible;
|
|
17
|
+
private lastClockText;
|
|
17
18
|
constructor({ slot, clock }: {
|
|
18
19
|
slot: SlotElement | null;
|
|
19
20
|
clock: ClockElement | null;
|
|
20
21
|
});
|
|
22
|
+
setClock(clock: ClockElement | null): void;
|
|
21
23
|
refresh(expiry: number | null): void;
|
|
22
24
|
show(): void;
|
|
23
25
|
hide(): void;
|
|
@@ -26,5 +28,6 @@ export declare class CountdownBannerController {
|
|
|
26
28
|
suspend(): void;
|
|
27
29
|
resume(): void;
|
|
28
30
|
private startClock;
|
|
31
|
+
private paintClock;
|
|
29
32
|
}
|
|
30
33
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SelectOption } from './
|
|
1
|
+
import type { SelectOption } from './optionFilter';
|
|
2
2
|
export declare function countryOptions(locale?: string): SelectOption[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AllowedWalletConfig, Asset, GetSessionResponse } from '../types';
|
|
2
|
-
export declare function resolveAllowedAssets(
|
|
1
|
+
import { AllowedWalletConfig, Asset, GetSessionResponse, SessionAllowedAsset } from '../types';
|
|
2
|
+
export declare function resolveAllowedAssets(allowedAssets: SessionAllowedAsset[] | null | undefined): Asset[];
|
|
3
3
|
export declare function collectNetworksFromAssets(allowedAssets: Asset[]): string[];
|
|
4
4
|
export declare function hoistRecommendedNetwork({ networks, recommendedNetwork, }: {
|
|
5
5
|
networks: string[];
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export type SelectOption = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
2
5
|
export declare function filterOptions(options: SelectOption[], query: string): SelectOption[];
|
|
3
6
|
export declare function resolveOption(options: SelectOption[], query: string): SelectOption | null;
|
|
4
7
|
export declare function initialHighlightIndex(options: SelectOption[], value: string | undefined): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CheckoutCallbacks, CheckoutStore } from './checkoutStore';
|
|
3
|
+
import type { CheckoutAppTargets } from './checkoutTargets';
|
|
4
|
+
export type { CheckoutAppTargets };
|
|
5
|
+
export default function CheckoutApp({ store, callbacks, targets, }: {
|
|
6
|
+
store: CheckoutStore;
|
|
7
|
+
callbacks: CheckoutCallbacks;
|
|
8
|
+
targets: CheckoutAppTargets;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { CloseDialogVariant } from './checkoutStore';
|
|
3
|
+
export default function CloseTransactionDialogBody({ variant, onAccept, onReject, }: {
|
|
4
|
+
variant: CloseDialogVariant;
|
|
5
|
+
onAccept: () => void;
|
|
6
|
+
onReject: () => void;
|
|
7
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function CopyButton({ label, copyLabel, buttonClass, feedbackClass, }: {
|
|
3
|
+
label: string;
|
|
4
|
+
copyLabel?: string;
|
|
5
|
+
buttonClass?: string;
|
|
6
|
+
feedbackClass?: string;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
export default function CopyField({ valueId, label, copyLabel, value, copyValue, valueSizeClass, wrap, }: {
|
|
9
|
+
valueId: string;
|
|
10
|
+
label: string;
|
|
11
|
+
copyLabel?: string;
|
|
12
|
+
value: string;
|
|
13
|
+
copyValue?: string;
|
|
14
|
+
valueSizeClass?: string;
|
|
15
|
+
wrap?: boolean;
|
|
16
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type DetailRowSpec = {
|
|
3
|
+
label: string;
|
|
4
|
+
rowId: string;
|
|
5
|
+
valueId: string;
|
|
6
|
+
value: string;
|
|
7
|
+
emphasis?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export default function DetailCard({ heading, rows }: {
|
|
10
|
+
heading: string;
|
|
11
|
+
rows: DetailRowSpec[];
|
|
12
|
+
}): React.JSX.Element | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function FieldShell({ id, label, labelFor, error, children, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
labelFor: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export default function FormField({ id, label, placeholder, value, onChange, type, autoComplete, error, inputRef, }: {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
placeholder: string;
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
type?: string;
|
|
16
|
+
autoComplete?: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
inputRef?: React.Ref<HTMLInputElement>;
|
|
19
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SelectOption } from '../optionFilter';
|
|
3
|
+
export default function FormSelect({ id, label, options, value, onChange, placeholder, ariaLabel, error, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
options: SelectOption[];
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function LoadingScreen({ message, subMessage, cancellable, logoUrl, logoAlt, onCancel, }: {
|
|
3
|
+
message: string | null;
|
|
4
|
+
subMessage: string | null;
|
|
5
|
+
cancellable: boolean;
|
|
6
|
+
logoUrl: string | null;
|
|
7
|
+
logoAlt: string;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
}): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
export type OptionButtonVariant = 'network' | 'asset';
|
|
2
|
-
export
|
|
3
|
+
export default function OptionButton({ id, imageUrl, imageAlt, label, secondaryLabel, secondaryValue, trailingNote, badgeLabel, variant, onClick, }: {
|
|
3
4
|
id: string;
|
|
4
5
|
imageUrl: string;
|
|
5
6
|
imageAlt: string;
|
|
@@ -9,5 +10,5 @@ export type OptionButtonProps = {
|
|
|
9
10
|
trailingNote?: string;
|
|
10
11
|
badgeLabel?: string;
|
|
11
12
|
variant?: OptionButtonVariant;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function PaymentHeaderSection({ logoVisible, logoUrl, logoAlt, backVisible, onBack, headerVisible, merchant, amount, changeMethodVisible, onChangePaymentMethod, }: {
|
|
3
|
+
logoVisible: boolean;
|
|
4
|
+
logoUrl: string | null;
|
|
5
|
+
logoAlt: string;
|
|
6
|
+
backVisible: boolean;
|
|
7
|
+
onBack: () => void;
|
|
8
|
+
headerVisible: boolean;
|
|
9
|
+
merchant: string | null;
|
|
10
|
+
amount: string;
|
|
11
|
+
changeMethodVisible: boolean;
|
|
12
|
+
onChangePaymentMethod: () => void;
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { SelectOption } from '../optionFilter';
|
|
3
|
+
export default function SearchSelect({ id, label, placeholder, options, value, onChange, error, }: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
options: SelectOption[];
|
|
8
|
+
value: string;
|
|
9
|
+
onChange: (value: string) => void;
|
|
10
|
+
error?: string;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export default function SummaryRow({ id, leadingLabel, logoUrl, name, onClick, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
leadingLabel: string;
|
|
5
|
+
logoUrl: string;
|
|
6
|
+
name: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export declare function SummaryRowGroup({ children }: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}): React.JSX.Element;
|