@whop/embedded-components-vanilla-js 0.0.5-beta.15 → 0.0.5-beta.16
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 +24 -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,24 @@ interface WhopElement<ElementOptions, ElementEvents extends ListenerSignature<El
|
|
|
60
60
|
getSnapshot: () => ElementSnapshot;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
interface AutomaticWithdrawElementEvents {
|
|
64
|
+
error: (error: unknown) => void;
|
|
65
|
+
ready: (element: AutomaticWithdrawElement) => void;
|
|
66
|
+
optionsUpdated: (options: AutomaticWithdrawElementOptions) => void;
|
|
67
|
+
snapshot: (snapshot: AutomaticWithdrawElementSnapshot) => void;
|
|
68
|
+
close: (ev: CustomEvent) => void;
|
|
69
|
+
complete: (ev: CustomEvent<AutomaticWithdrawElement>) => void;
|
|
70
|
+
}
|
|
71
|
+
interface AutomaticWithdrawElementOptions {
|
|
72
|
+
onReady?: (element: AutomaticWithdrawElement) => void;
|
|
73
|
+
onClose?: (ev: CustomEvent) => void;
|
|
74
|
+
onComplete?: (ev: CustomEvent<AutomaticWithdrawElement>) => void;
|
|
75
|
+
}
|
|
76
|
+
interface AutomaticWithdrawElementSnapshot {
|
|
77
|
+
state: "loading" | "ready";
|
|
78
|
+
}
|
|
79
|
+
type AutomaticWithdrawElement = WhopElement<AutomaticWithdrawElementOptions, AutomaticWithdrawElementEvents, AutomaticWithdrawElementSnapshot>;
|
|
80
|
+
|
|
63
81
|
interface BalanceElementEvents {
|
|
64
82
|
error: (error: unknown) => void;
|
|
65
83
|
ready: (element: BalanceElement) => void;
|
|
@@ -400,6 +418,10 @@ type PayoutsSessionElements = {
|
|
|
400
418
|
WithdrawButtonElement
|
|
401
419
|
];
|
|
402
420
|
"withdraw-element": [WithdrawElementOptions, WithdrawElement];
|
|
421
|
+
"automatic-withdraw-element": [
|
|
422
|
+
AutomaticWithdrawElementOptions,
|
|
423
|
+
AutomaticWithdrawElement
|
|
424
|
+
];
|
|
403
425
|
"verify-element": [VerifyElementOptions, VerifyElement];
|
|
404
426
|
"withdrawals-element": [WithdrawalsElementOptions, WithdrawalsElement];
|
|
405
427
|
"withdrawal-breakdown-element": [
|
|
@@ -441,6 +463,7 @@ interface PayoutsSession extends TypedEmitter<PayoutsSessionEvents> {
|
|
|
441
463
|
type: T;
|
|
442
464
|
}, options: PayoutsSessionElements[T][0]): PayoutsSessionElements[T][1];
|
|
443
465
|
showWithdrawModal: <Force extends boolean = false>(options: WithdrawElementOptions | ((modal: ModalContainer) => WithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
466
|
+
showAutomaticWithdrawModal: <Force extends boolean = false>(options: AutomaticWithdrawElementOptions | ((modal: ModalContainer) => AutomaticWithdrawElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
444
467
|
showVerifyModal: <Force extends boolean = false>(options: VerifyElementOptions | ((modal: ModalContainer) => VerifyElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
445
468
|
showWithdrawalBreakdownModal: <Force extends boolean = false>(options: WithdrawalBreakdownElementOptions | ((modal: ModalContainer) => WithdrawalBreakdownElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
446
469
|
showChangeAccountCountryModal: <Force extends boolean = false>(options: ChangeAccountCountryElementOptions | ((modal: ModalContainer) => ChangeAccountCountryElementOptions), force?: Force) => Force extends true ? ModalContainer : ModalContainer | undefined;
|
|
@@ -481,4 +504,4 @@ interface WhopElementsEvents {
|
|
|
481
504
|
optionsUpdated: (options: WhopElementsOptions) => void;
|
|
482
505
|
}
|
|
483
506
|
|
|
484
|
-
export type { Appearance, 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 };
|
|
507
|
+
export type { 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-16.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