@whop/embedded-components-vanilla-js 0.0.5-beta.3 → 0.0.5-beta.30
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/lib/index.d.ts +47 -1
- package/dist/url.js +1 -1
- package/dist/url.mjs +1 -1
- package/package.json +1 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -60,6 +60,42 @@ interface WhopElement<ElementOptions, ElementEvents extends ListenerSignature<El
|
|
|
60
60
|
getSnapshot: () => ElementSnapshot;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
interface AddPayoutMethodElementEvents {
|
|
64
|
+
error: (error: unknown) => void;
|
|
65
|
+
ready: (element: AddPayoutMethodElement) => void;
|
|
66
|
+
optionsUpdated: (options: AddPayoutMethodElementOptions) => void;
|
|
67
|
+
snapshot: (snapshot: AddPayoutMethodElementSnapshot) => void;
|
|
68
|
+
close: (ev: CustomEvent) => void;
|
|
69
|
+
complete: (ev: CustomEvent<AddPayoutMethodElement>) => void;
|
|
70
|
+
}
|
|
71
|
+
interface AddPayoutMethodElementOptions {
|
|
72
|
+
onReady?: (element: AddPayoutMethodElement) => void;
|
|
73
|
+
onClose?: (ev: CustomEvent) => void;
|
|
74
|
+
onComplete?: (ev: CustomEvent<AddPayoutMethodElement>) => void;
|
|
75
|
+
}
|
|
76
|
+
interface AddPayoutMethodElementSnapshot {
|
|
77
|
+
state: "loading" | "ready";
|
|
78
|
+
}
|
|
79
|
+
type AddPayoutMethodElement = WhopElement<AddPayoutMethodElementOptions, AddPayoutMethodElementEvents, AddPayoutMethodElementSnapshot>;
|
|
80
|
+
|
|
81
|
+
interface AutomaticWithdrawElementEvents {
|
|
82
|
+
error: (error: unknown) => void;
|
|
83
|
+
ready: (element: AutomaticWithdrawElement) => void;
|
|
84
|
+
optionsUpdated: (options: AutomaticWithdrawElementOptions) => void;
|
|
85
|
+
snapshot: (snapshot: AutomaticWithdrawElementSnapshot) => void;
|
|
86
|
+
close: (ev: CustomEvent) => void;
|
|
87
|
+
complete: (ev: CustomEvent<AutomaticWithdrawElement>) => void;
|
|
88
|
+
}
|
|
89
|
+
interface AutomaticWithdrawElementOptions {
|
|
90
|
+
onReady?: (element: AutomaticWithdrawElement) => void;
|
|
91
|
+
onClose?: (ev: CustomEvent) => void;
|
|
92
|
+
onComplete?: (ev: CustomEvent<AutomaticWithdrawElement>) => void;
|
|
93
|
+
}
|
|
94
|
+
interface AutomaticWithdrawElementSnapshot {
|
|
95
|
+
state: "loading" | "ready";
|
|
96
|
+
}
|
|
97
|
+
type AutomaticWithdrawElement = WhopElement<AutomaticWithdrawElementOptions, AutomaticWithdrawElementEvents, AutomaticWithdrawElementSnapshot>;
|
|
98
|
+
|
|
63
99
|
interface BalanceElementEvents {
|
|
64
100
|
error: (error: unknown) => void;
|
|
65
101
|
ready: (element: BalanceElement) => void;
|
|
@@ -394,12 +430,20 @@ interface PayoutsSessionEvents {
|
|
|
394
430
|
ready: () => void;
|
|
395
431
|
}
|
|
396
432
|
type PayoutsSessionElements = {
|
|
433
|
+
"add-payout-method-element": [
|
|
434
|
+
AddPayoutMethodElementOptions,
|
|
435
|
+
AddPayoutMethodElement
|
|
436
|
+
];
|
|
397
437
|
"balance-element": [BalanceElementOptions, BalanceElement];
|
|
398
438
|
"withdraw-button-element": [
|
|
399
439
|
WithdrawButtonElementOptions,
|
|
400
440
|
WithdrawButtonElement
|
|
401
441
|
];
|
|
402
442
|
"withdraw-element": [WithdrawElementOptions, WithdrawElement];
|
|
443
|
+
"automatic-withdraw-element": [
|
|
444
|
+
AutomaticWithdrawElementOptions,
|
|
445
|
+
AutomaticWithdrawElement
|
|
446
|
+
];
|
|
403
447
|
"verify-element": [VerifyElementOptions, VerifyElement];
|
|
404
448
|
"withdrawals-element": [WithdrawalsElementOptions, WithdrawalsElement];
|
|
405
449
|
"withdrawal-breakdown-element": [
|
|
@@ -441,6 +485,8 @@ interface PayoutsSession extends TypedEmitter<PayoutsSessionEvents> {
|
|
|
441
485
|
type: T;
|
|
442
486
|
}, options: PayoutsSessionElements[T][0]): PayoutsSessionElements[T][1];
|
|
443
487
|
showWithdrawModal: <Force extends boolean = false>(options: WithdrawElementOptions | ((modal: ModalContainer) => WithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
488
|
+
showAddPayoutMethodModal: <Force extends boolean = false>(options: AddPayoutMethodElementOptions | ((modal: ModalContainer) => AddPayoutMethodElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
489
|
+
showAutomaticWithdrawModal: <Force extends boolean = false>(options: AutomaticWithdrawElementOptions | ((modal: ModalContainer) => AutomaticWithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
444
490
|
showVerifyModal: <Force extends boolean = false>(options: VerifyElementOptions | ((modal: ModalContainer) => VerifyElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
445
491
|
showWithdrawalBreakdownModal: <Force extends boolean = false>(options: WithdrawalBreakdownElementOptions | ((modal: ModalContainer) => WithdrawalBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
446
492
|
showChangeAccountCountryModal: <Force extends boolean = false>(options: ChangeAccountCountryElementOptions | ((modal: ModalContainer) => ChangeAccountCountryElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
@@ -481,4 +527,4 @@ interface WhopElementsEvents {
|
|
|
481
527
|
optionsUpdated: (options: WhopElementsOptions) => void;
|
|
482
528
|
}
|
|
483
529
|
|
|
484
|
-
export type { Appearance, BalanceElement, BalanceElementOptions, BalanceElementSnapshot, BnplReserveBalanceBreakdownElement, BnplReserveBalanceBreakdownElementOptions, BnplReserveBalanceBreakdownElementSnapshot, ChangeAccountCountryElement, ChangeAccountCountryElementOptions, ChangeAccountCountryElementSnapshot, ExpandedPayoutsSessionOptions, GenerateWithdrawalReceiptElement, GenerateWithdrawalReceiptElementOptions, GenerateWithdrawalReceiptElementSnapshot, GetToken, I18nSupportedLocale, PayoutsSession, PayoutsSessionEvents, PayoutsSessionOptions, PendingBalanceBreakdownElement, PendingBalanceBreakdownElementOptions, PendingBalanceBreakdownElementSnapshot, RegularReserveBalanceBreakdownElement, RegularReserveBalanceBreakdownElementOptions, RegularReserveBalanceBreakdownElementSnapshot, ResetAccountElement, ResetAccountElementOptions, ResetAccountElementSnapshot, StatusBannerElement, StatusBannerElementOptions, StatusBannerElementSnapshot, StatusBannerType, TotalBalanceBreakdownElement, TotalBalanceBreakdownElementOptions, TotalBalanceBreakdownElementSnapshot, VerifyElement, VerifyElementOptions, VerifyElementSnapshot, WhopElement, WhopElements, WhopElementsConstructor, WhopElementsEvents, WhopElementsOptions, WithdrawButtonElement, WithdrawButtonElementOptions, WithdrawElement, WithdrawElementOptions, WithdrawElementSnapshot, WithdrawalBreakdownElement, WithdrawalBreakdownElementOptions, WithdrawalBreakdownElementSnapshot, WithdrawalsElement, WithdrawalsElementOptions, WithdrawalsElementSnapshot };
|
|
530
|
+
export type { AddPayoutMethodElement, AddPayoutMethodElementOptions, AddPayoutMethodElementSnapshot, Appearance, AutomaticWithdrawElement, AutomaticWithdrawElementOptions, AutomaticWithdrawElementSnapshot, BalanceElement, BalanceElementOptions, BalanceElementSnapshot, BnplReserveBalanceBreakdownElement, BnplReserveBalanceBreakdownElementOptions, BnplReserveBalanceBreakdownElementSnapshot, ChangeAccountCountryElement, ChangeAccountCountryElementOptions, ChangeAccountCountryElementSnapshot, ExpandedPayoutsSessionOptions, GenerateWithdrawalReceiptElement, GenerateWithdrawalReceiptElementOptions, GenerateWithdrawalReceiptElementSnapshot, GetToken, I18nSupportedLocale, PayoutsSession, PayoutsSessionElements, PayoutsSessionEvents, PayoutsSessionOptions, PendingBalanceBreakdownElement, PendingBalanceBreakdownElementOptions, PendingBalanceBreakdownElementSnapshot, RegularReserveBalanceBreakdownElement, RegularReserveBalanceBreakdownElementOptions, RegularReserveBalanceBreakdownElementSnapshot, ResetAccountElement, ResetAccountElementOptions, ResetAccountElementSnapshot, StatusBannerElement, StatusBannerElementOptions, StatusBannerElementSnapshot, StatusBannerType, TotalBalanceBreakdownElement, TotalBalanceBreakdownElementOptions, TotalBalanceBreakdownElementSnapshot, VerifyElement, VerifyElementOptions, VerifyElementSnapshot, WhopElement, WhopElements, WhopElementsConstructor, WhopElementsEvents, WhopElementsOptions, WithdrawButtonElement, WithdrawButtonElementOptions, WithdrawElement, WithdrawElementOptions, WithdrawElementSnapshot, WithdrawalBreakdownElement, WithdrawalBreakdownElementOptions, WithdrawalBreakdownElementSnapshot, WithdrawalsElement, WithdrawalsElementOptions, WithdrawalsElementSnapshot };
|
package/dist/url.js
CHANGED
|
@@ -22,6 +22,6 @@ __export(url_exports, {
|
|
|
22
22
|
SCRIPT_URL: () => SCRIPT_URL
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(url_exports);
|
|
25
|
-
const ORIGIN = "https://0-0-5-beta-
|
|
25
|
+
const ORIGIN = "https://0-0-5-beta-30.elements.whop.com/";
|
|
26
26
|
const SCRIPT_URL = new URL(`/release/elements.js`, ORIGIN).toString();
|
|
27
27
|
//# sourceMappingURL=url.js.map
|
package/dist/url.mjs
CHANGED