@agg-build/ui 4.27.0 → 4.28.0
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/index.js +19 -8
- package/dist/index.mjs +19 -8
- package/dist/{modals-BReGwJzz.mjs → modals-C4TIbZLT.mjs} +56 -41
- package/dist/{modals-CSexQO1C.js → modals-CKSsH-b_.js} +56 -41
- package/dist/modals.js +1 -1
- package/dist/modals.mjs +1 -1
- package/dist/{pages-xvAzj6c2.js → pages-B-6yedLV.js} +9 -5
- package/dist/{pages-CMlCYngA.mjs → pages-Bnoy3wG8.mjs} +9 -5
- package/dist/pages.js +2 -2
- package/dist/pages.mjs +2 -2
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/{trading-CXsZFd3l.js → trading-BfetYLvs.js} +1 -1
- package/dist/{trading-CDkNdjGx.mjs → trading-DJZxQENx.mjs} +1 -1
- package/dist/trading.js +1 -1
- package/dist/trading.mjs +1 -1
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.mts +1 -0
- package/dist/types/auth/connect-button-view/connect-button-view.constants.d.ts +1 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.mts +7 -0
- package/dist/types/auth/connect-button-view/connect-button-view.types.d.ts +7 -0
- package/dist/types/auth/connect-button-view/index.d.mts +1 -1
- package/dist/types/auth/connect-button-view/index.d.ts +1 -1
- package/dist/types/profile/tabs/accounts-wallets-tab.d.mts +3 -1
- package/dist/types/profile/tabs/accounts-wallets-tab.d.ts +3 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_primitives = require("./primitives-CqxNeV7H.js");
|
|
4
4
|
const require_manage_betdex_account_modal = require("./manage-betdex-account-modal-21ZVLsz0.js");
|
|
5
|
-
const require_trading = require("./trading-
|
|
6
|
-
const require_pages = require("./pages-
|
|
7
|
-
const require_modals = require("./modals-
|
|
5
|
+
const require_trading = require("./trading-BfetYLvs.js");
|
|
6
|
+
const require_pages = require("./pages-B-6yedLV.js");
|
|
7
|
+
const require_modals = require("./modals-CKSsH-b_.js");
|
|
8
8
|
const require_list = require("./list-D8v2SmY1.js");
|
|
9
9
|
const require_event_trading_state_utils = require("./event-trading-state.utils-s4DEc4iA.js");
|
|
10
10
|
require("./events.js");
|
|
@@ -87,6 +87,7 @@ const profileMenuSeparatorClassName = require_primitives.cn("h-px w-full bg-agg-
|
|
|
87
87
|
const profileMenuActionItemClassName = require_primitives.cn("flex w-full items-center gap-3 px-5 py-4 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground", "outline-none", "hover:bg-agg-secondary-hover focus:bg-agg-secondary-hover");
|
|
88
88
|
const avatarRootClassName = require_primitives.cn("inline-flex size-6 shrink-0 items-center justify-center rounded-agg-full bg-agg-separator");
|
|
89
89
|
require_primitives.cn("h-[66%] w-[66%] text-agg-muted-foreground");
|
|
90
|
+
const authHighlightedMethodClassName = require_primitives.cn("ring-2 ring-agg-primary ring-offset-0");
|
|
90
91
|
//#endregion
|
|
91
92
|
//#region src/auth/connect-button-view/index.tsx
|
|
92
93
|
const WalletAvatar = ({ className }) => {
|
|
@@ -98,13 +99,14 @@ const WalletAvatar = ({ className }) => {
|
|
|
98
99
|
});
|
|
99
100
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_pages.DefaultAvatar, { className: require_primitives.cn("size-6 shrink-0 rounded-full", className) });
|
|
100
101
|
};
|
|
101
|
-
const AuthMethodActionButton = ({ activeMethodId, className, disabled, method, onSelect, renderLabel = true }) => {
|
|
102
|
+
const AuthMethodActionButton = ({ activeMethodId, className, disabled, isHighlighted = false, method, onSelect, renderLabel = true }) => {
|
|
102
103
|
const labels = (0, _agg_build_hooks.useLabels)();
|
|
103
104
|
const isMethodLoading = activeMethodId === method.id;
|
|
104
105
|
const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
|
|
105
106
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
106
107
|
type: "button",
|
|
107
|
-
className,
|
|
108
|
+
className: require_primitives.cn(className, isHighlighted && authHighlightedMethodClassName),
|
|
109
|
+
"data-highlighted": isHighlighted || void 0,
|
|
108
110
|
disabled: isMethodDisabled,
|
|
109
111
|
"aria-busy": isMethodLoading || void 0,
|
|
110
112
|
"aria-label": labels.auth.signInWithMethod(method.label),
|
|
@@ -117,7 +119,7 @@ const AuthMethodActionButton = ({ activeMethodId, className, disabled, method, o
|
|
|
117
119
|
}), renderLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: labels.auth.connect(method.label) }) : null]
|
|
118
120
|
});
|
|
119
121
|
};
|
|
120
|
-
const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeContent, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, isBusy, isChooserOpen, notice, onChooserOpenChange, onEmailChange, onEmailSubmit, onMethodSelect, socialMethods, walletMethods, isPaperMode = false }) => {
|
|
122
|
+
const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeContent, chooserNotice, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, highlightedMethodId, isBusy, isChooserOpen, notice, onChooserOpenChange, onEmailChange, onEmailSubmit, onMethodSelect, socialMethods, walletMethods, isPaperMode = false }) => {
|
|
121
123
|
const labels = (0, _agg_build_hooks.useLabels)();
|
|
122
124
|
const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
|
|
123
125
|
const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
|
|
@@ -158,6 +160,10 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
158
160
|
children: challengeContent ? challengeContent : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
159
161
|
className: authMethodsListClassName,
|
|
160
162
|
children: [
|
|
163
|
+
chooserNotice ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
164
|
+
className: require_primitives.cn(authNoticeClassName, classNames?.authNotice),
|
|
165
|
+
children: chooserNotice
|
|
166
|
+
}) : null,
|
|
161
167
|
emailMethod ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
|
|
162
168
|
className: authSectionClassName,
|
|
163
169
|
onSubmit: (event) => {
|
|
@@ -166,7 +172,8 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
166
172
|
},
|
|
167
173
|
children: [
|
|
168
174
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
169
|
-
className: authInputFormClassName,
|
|
175
|
+
className: require_primitives.cn(authInputFormClassName, highlightedMethodId === emailMethod.id && authHighlightedMethodClassName),
|
|
176
|
+
"data-highlighted": highlightedMethodId === emailMethod.id || void 0,
|
|
170
177
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
171
178
|
id: "agg-auth-email",
|
|
172
179
|
type: "email",
|
|
@@ -211,6 +218,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
211
218
|
activeMethodId,
|
|
212
219
|
className: require_primitives.cn(authSocialButtonClassName, classNames?.authMethodButton),
|
|
213
220
|
disabled: disabled || isBusy,
|
|
221
|
+
isHighlighted: highlightedMethodId === method.id,
|
|
214
222
|
method,
|
|
215
223
|
onSelect: onMethodSelect,
|
|
216
224
|
renderLabel: false
|
|
@@ -246,6 +254,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
246
254
|
activeMethodId,
|
|
247
255
|
className: require_primitives.cn(authWalletButtonClassName, classNames?.authMethodButton),
|
|
248
256
|
disabled: disabled || isBusy,
|
|
257
|
+
isHighlighted: highlightedMethodId === method.id,
|
|
249
258
|
method,
|
|
250
259
|
onSelect: onMethodSelect
|
|
251
260
|
}, method.id))
|
|
@@ -289,7 +298,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
289
298
|
]
|
|
290
299
|
});
|
|
291
300
|
};
|
|
292
|
-
const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, challengeContent, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, isAuthenticated, isBalanceLoading, isBusy, isChooserOpen, isProfileMenuOpen, notice, onChooserOpenChange, onDepositClick, onDisconnectClick, onEmailChange, onEmailSubmit, onMethodSelect, onProfileCardClick, onProfileClick, onProfileMenuOpenChange, socialMethods, onWithdrawClick, profileLabel, totalBalance, positionsBalance, claimReadyCount = 0, onClaimWinningsClick, walletMethods, isDepositBlocked = false }) => {
|
|
301
|
+
const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, challengeContent, chooserNotice, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, highlightedMethodId, isAuthenticated, isBalanceLoading, isBusy, isChooserOpen, isProfileMenuOpen, notice, onChooserOpenChange, onDepositClick, onDisconnectClick, onEmailChange, onEmailSubmit, onMethodSelect, onProfileCardClick, onProfileClick, onProfileMenuOpenChange, socialMethods, onWithdrawClick, profileLabel, totalBalance, positionsBalance, claimReadyCount = 0, onClaimWinningsClick, walletMethods, isDepositBlocked = false }) => {
|
|
293
302
|
const labels = (0, _agg_build_hooks.useLabels)();
|
|
294
303
|
const { isPaperMode } = (0, _agg_build_hooks.useResolvedExecutionMode)();
|
|
295
304
|
const { general: { rootClassName }, features: { enableAnimations } } = (0, _agg_build_hooks.useSdkUiConfig)();
|
|
@@ -304,12 +313,14 @@ const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, chal
|
|
|
304
313
|
activeMethodId,
|
|
305
314
|
buttonProps,
|
|
306
315
|
challengeContent,
|
|
316
|
+
chooserNotice,
|
|
307
317
|
classNames,
|
|
308
318
|
disabled,
|
|
309
319
|
emailMethod,
|
|
310
320
|
emailError,
|
|
311
321
|
emailValue,
|
|
312
322
|
errorMessage,
|
|
323
|
+
highlightedMethodId,
|
|
313
324
|
isBusy,
|
|
314
325
|
isChooserOpen,
|
|
315
326
|
notice,
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as HomePage, a as UserProfilePage, b as DefaultAvatar, c as USER_PROFILE_TAB_ACTIVITY, d as ManageBalancesModal, f as EventMarketPage, g as useEventOpenOrders, h as EventOpenOrdersCard, i as LEADERBOARD_METRICS, l as USER_PROFILE_TAB_OPEN_ORDERS, m as EventOpenOrders, n as LEADERBOARD_DEFAULT_METRIC, o as formatShareAmount, p as formatRecurringCountdown, r as LEADERBOARD_DEFAULT_PERIOD, s as buildAggTxExplorerHref, t as LeaderboardPage, u as USER_PROFILE_TAB_POSITIONS, v as useHomePageModals, y as ConditionalWrapper } from "./pages-
|
|
2
|
+
import { _ as HomePage, a as UserProfilePage, b as DefaultAvatar, c as USER_PROFILE_TAB_ACTIVITY, d as ManageBalancesModal, f as EventMarketPage, g as useEventOpenOrders, h as EventOpenOrdersCard, i as LEADERBOARD_METRICS, l as USER_PROFILE_TAB_OPEN_ORDERS, m as EventOpenOrders, n as LEADERBOARD_DEFAULT_METRIC, o as formatShareAmount, p as formatRecurringCountdown, r as LEADERBOARD_DEFAULT_PERIOD, s as buildAggTxExplorerHref, t as LeaderboardPage, u as USER_PROFILE_TAB_POSITIONS, v as useHomePageModals, y as ConditionalWrapper } from "./pages-Bnoy3wG8.mjs";
|
|
3
3
|
import { $t as GoogleIcon, An as ArbitrumIcon, At as UploadIcon, B as Skeleton, Bn as getMotionClassName, Bt as RevenueAltIcon, Cn as BestPricesIcon, Ct as WarningIcon, Dn as ArrowsToDotIcon, Dt as WalletIcon, En as BadgeCheckThinIcon, Et as WalletAvatarIcon, Fn as cn, Ft as StayInControlIcon, Gn as shortenAddress, Gt as PaperModeIcon, H as PlaceOrderRouteCardSkeleton, Hn as isTruthy, Ht as PolygonIcon, In as formatAmountDisplay, It as SparklesFilledIcon, Jn as AGG_DOCS_URL, Jt as ActivityChartIcon, Kn as toDate, Kt as LockIcon, Ln as formatCompactUsd, Lt as SolanaIcon, Mn as AppleIcon, Mt as TriangleUpIcon, Nn as AggLogo, Nt as TriangleDownIcon, On as ArrowTrendUpIcon, Ot as UsdcIcon, P as VenueLogo, Pn as AggErrorBoundary, Pt as SuccessCheckIcon, Q as RemoteImage, Qt as HourglassStartIcon, Rn as formatTokenAmount, Rt as ShieldTrustIcon, Sn as BnbIcon, St as WarningFilledIcon, Tn as BankIcon, Tt as WalletFilledIcon, Un as isValidDateValue, Ut as PlaySquareIcon, V as skeletonViews, Vn as getScrollBehavior, Vt as ProfileIcon, Wn as resolveResolvedOutcomeLabel, Wt as PencilIcon, Xn as AGG_ROOT_CLASS_NAME, Xt as InfoIcon, Yn as AGG_PRIVACY_POLICY_URL, Zn as AGG_TERMS_OF_SERVICE_URL, Zt as ImageIcon, _n as CircleOverlapIcon, _t as Badge, a as Tabs, an as DocumentIcon, bn as CheckCircleIcon, bt as Icon, c as Typography, cn as CreditCardIcon, ct as Footer, d as NumberValue, dn as CloseIcon, dt as LineChart, en as EthereumIcon, f as Modal, fn as ChevronUpIcon, g as Search, gn as CircleXmarkIcon, gt as Button, h as Header, hn as ChevronDownIcon, ht as Calendar, i as useToast, in as DownloadIcon, jn as AppsIcon, jt as TriangleUpFilledIcon, kn as ArrowRightIcon, kt as UserTrustIcon, l as typographyVariants, ln as CreateAccountIcon, lt as CurrencyInput, m as InlineAlert, mn as ChevronLeftIcon, mt as Card, n as ToastProvider, nn as ExternalLinkIcon, on as DotsHorizontalIcon, p as LoadingIcon, pn as ChevronRightIcon, pt as SwitchButton, qn as AGG_DEFAULT_URL, qt as LinkAccountsIcon, r as useOptionalToast, rn as ErrorFilledIcon, s as StateMessage, sn as DisconnectIcon, t as Tooltip, tn as GiftBonusIcon, u as Select, un as CopyIcon, ut as CopyButton, vn as ChartLineIcon, vt as badgeSizes, wn as BaseIcon, wt as PaperPlaneIcon, xn as BoltIcon, xt as iconNames, yn as ChartCandlestickIcon, yt as AutocompleteSelect, z as venueLogoNames, zn as formatUsd, zt as SearchIcon } from "./primitives-Dz5aF8ma.mjs";
|
|
4
4
|
import { d as ConnectProphetxModal, f as ConnectKalshiModal, m as GeoBlockBanner, n as WithdrawModal, p as SharedKycModal, r as buildTerminalSummary, u as ConnectNovigModal } from "./manage-betdex-account-modal-D2vKHird.mjs";
|
|
5
|
-
import { _ as DEPOSIT_MODAL_OPEN_EVENT, a as PlaceOrderFailureView, b as requestAggWithdrawModalOpen, c as PlaceOrderExecutionView, d as useSharedKycFlow, f as createAggClientSharedKycInitiator, g as parseVenue, h as parseAmount, i as PlaceOrderSuccessView, m as SettlementDetails, n as useClaimWinnings, o as PlaceOrderExecutionGroups, p as venueRequiresSharedKyc, r as PlaceOrder, s as PlaceOrderExecutionHeader, t as useResolvedMarketClaim, u as FundKalshiModal, v as WITHDRAW_MODAL_OPEN_EVENT, x as AggNotificationEventsProvider, y as requestAggDepositModalOpen } from "./trading-
|
|
6
|
-
import { a as DepositModal, c as CARD_NETWORK_OPTIONS, d as ConnectAccountsStep, f as ProfileSetupStep, i as PaperOnboardingModal, l as OnboardingModal, m as PaperTradingBadge, n as ProfileModal, o as clearPendingCardSession, p as HowItWorksStep, r as PaperTradingOnboarding, s as getPendingCardSession, t as GeoBlockModal, u as ConnectOnchainModal } from "./modals-
|
|
5
|
+
import { _ as DEPOSIT_MODAL_OPEN_EVENT, a as PlaceOrderFailureView, b as requestAggWithdrawModalOpen, c as PlaceOrderExecutionView, d as useSharedKycFlow, f as createAggClientSharedKycInitiator, g as parseVenue, h as parseAmount, i as PlaceOrderSuccessView, m as SettlementDetails, n as useClaimWinnings, o as PlaceOrderExecutionGroups, p as venueRequiresSharedKyc, r as PlaceOrder, s as PlaceOrderExecutionHeader, t as useResolvedMarketClaim, u as FundKalshiModal, v as WITHDRAW_MODAL_OPEN_EVENT, x as AggNotificationEventsProvider, y as requestAggDepositModalOpen } from "./trading-DJZxQENx.mjs";
|
|
6
|
+
import { a as DepositModal, c as CARD_NETWORK_OPTIONS, d as ConnectAccountsStep, f as ProfileSetupStep, i as PaperOnboardingModal, l as OnboardingModal, m as PaperTradingBadge, n as ProfileModal, o as clearPendingCardSession, p as HowItWorksStep, r as PaperTradingOnboarding, s as getPendingCardSession, t as GeoBlockModal, u as ConnectOnchainModal } from "./modals-C4TIbZLT.mjs";
|
|
7
7
|
import { C as EventListItem, _ as SportsLiveScore, b as mergeVenueOutcomeOrderbooks, c as MarketDetails, d as OrderbookWithStates, f as useCenterOrderbookSpread, g as SettlementSummary, h as resolveEventDetailsSyncKey, l as MarketDetailsList, m as EventListItemDetails, n as EventListVenueStrip, p as orderbookRowLimitDefault, t as EventList, u as Orderbook, v as collectEligibleVenueOutcomeIds, w as EventListItemV2, y as collectEligibleVenueOutcomes } from "./list-DD7roCVl.mjs";
|
|
8
8
|
import { C as useEventTradingContext, S as resolveUnifiedOrderBookEntries, _ as getTradingValueLabel, a as Settlement, b as formatProbabilityCents, c as resolveDifferenceIconClassName, d as getTradingAveragePriceLabel, f as getTradingBalanceLabel, g as getTradingSlippageLabel, h as getTradingSharesLabel, i as SETTLEMENT_SECTION_ID, l as defaultSettlementSectionLabel, m as getTradingPriceLabel, o as getSettlementDifferenceId, p as getTradingDateLabel, s as prepareSettlementDifferences, u as defaultTradingDisclaimer, v as getTradingVenueLabel, x as resolveOrderBookRows } from "./event-trading-state.utils-B3my25Re.mjs";
|
|
9
9
|
import "./events.mjs";
|
|
@@ -85,6 +85,7 @@ const profileMenuSeparatorClassName = cn("h-px w-full bg-agg-separator");
|
|
|
85
85
|
const profileMenuActionItemClassName = cn("flex w-full items-center gap-3 px-5 py-4 font-agg-sans text-agg-sm leading-agg-5 text-agg-foreground", "outline-none", "hover:bg-agg-secondary-hover focus:bg-agg-secondary-hover");
|
|
86
86
|
const avatarRootClassName = cn("inline-flex size-6 shrink-0 items-center justify-center rounded-agg-full bg-agg-separator");
|
|
87
87
|
cn("h-[66%] w-[66%] text-agg-muted-foreground");
|
|
88
|
+
const authHighlightedMethodClassName = cn("ring-2 ring-agg-primary ring-offset-0");
|
|
88
89
|
//#endregion
|
|
89
90
|
//#region src/auth/connect-button-view/index.tsx
|
|
90
91
|
const WalletAvatar = ({ className }) => {
|
|
@@ -96,13 +97,14 @@ const WalletAvatar = ({ className }) => {
|
|
|
96
97
|
});
|
|
97
98
|
return /* @__PURE__ */ jsx(DefaultAvatar, { className: cn("size-6 shrink-0 rounded-full", className) });
|
|
98
99
|
};
|
|
99
|
-
const AuthMethodActionButton = ({ activeMethodId, className, disabled, method, onSelect, renderLabel = true }) => {
|
|
100
|
+
const AuthMethodActionButton = ({ activeMethodId, className, disabled, isHighlighted = false, method, onSelect, renderLabel = true }) => {
|
|
100
101
|
const labels = useLabels();
|
|
101
102
|
const isMethodLoading = activeMethodId === method.id;
|
|
102
103
|
const isMethodDisabled = disabled || !method.isAvailable || activeMethodId !== null && !isMethodLoading;
|
|
103
104
|
return /* @__PURE__ */ jsxs("button", {
|
|
104
105
|
type: "button",
|
|
105
|
-
className,
|
|
106
|
+
className: cn(className, isHighlighted && authHighlightedMethodClassName),
|
|
107
|
+
"data-highlighted": isHighlighted || void 0,
|
|
106
108
|
disabled: isMethodDisabled,
|
|
107
109
|
"aria-busy": isMethodLoading || void 0,
|
|
108
110
|
"aria-label": labels.auth.signInWithMethod(method.label),
|
|
@@ -115,7 +117,7 @@ const AuthMethodActionButton = ({ activeMethodId, className, disabled, method, o
|
|
|
115
117
|
}), renderLabel ? /* @__PURE__ */ jsx("span", { children: labels.auth.connect(method.label) }) : null]
|
|
116
118
|
});
|
|
117
119
|
};
|
|
118
|
-
const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeContent, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, isBusy, isChooserOpen, notice, onChooserOpenChange, onEmailChange, onEmailSubmit, onMethodSelect, socialMethods, walletMethods, isPaperMode = false }) => {
|
|
120
|
+
const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeContent, chooserNotice, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, highlightedMethodId, isBusy, isChooserOpen, notice, onChooserOpenChange, onEmailChange, onEmailSubmit, onMethodSelect, socialMethods, walletMethods, isPaperMode = false }) => {
|
|
119
121
|
const labels = useLabels();
|
|
120
122
|
const hasConfiguredMethods = emailMethod !== null || socialMethods.length > 0 || walletMethods.length > 0;
|
|
121
123
|
const showWalletDivider = walletMethods.length > 0 && (emailMethod !== null || socialMethods.length > 0);
|
|
@@ -156,6 +158,10 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
156
158
|
children: challengeContent ? challengeContent : /* @__PURE__ */ jsxs("div", {
|
|
157
159
|
className: authMethodsListClassName,
|
|
158
160
|
children: [
|
|
161
|
+
chooserNotice ? /* @__PURE__ */ jsx("p", {
|
|
162
|
+
className: cn(authNoticeClassName, classNames?.authNotice),
|
|
163
|
+
children: chooserNotice
|
|
164
|
+
}) : null,
|
|
159
165
|
emailMethod ? /* @__PURE__ */ jsxs("form", {
|
|
160
166
|
className: authSectionClassName,
|
|
161
167
|
onSubmit: (event) => {
|
|
@@ -164,7 +170,8 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
164
170
|
},
|
|
165
171
|
children: [
|
|
166
172
|
/* @__PURE__ */ jsxs("div", {
|
|
167
|
-
className: authInputFormClassName,
|
|
173
|
+
className: cn(authInputFormClassName, highlightedMethodId === emailMethod.id && authHighlightedMethodClassName),
|
|
174
|
+
"data-highlighted": highlightedMethodId === emailMethod.id || void 0,
|
|
168
175
|
children: [/* @__PURE__ */ jsx("input", {
|
|
169
176
|
id: "agg-auth-email",
|
|
170
177
|
type: "email",
|
|
@@ -209,6 +216,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
209
216
|
activeMethodId,
|
|
210
217
|
className: cn(authSocialButtonClassName, classNames?.authMethodButton),
|
|
211
218
|
disabled: disabled || isBusy,
|
|
219
|
+
isHighlighted: highlightedMethodId === method.id,
|
|
212
220
|
method,
|
|
213
221
|
onSelect: onMethodSelect,
|
|
214
222
|
renderLabel: false
|
|
@@ -244,6 +252,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
244
252
|
activeMethodId,
|
|
245
253
|
className: cn(authWalletButtonClassName, classNames?.authMethodButton),
|
|
246
254
|
disabled: disabled || isBusy,
|
|
255
|
+
isHighlighted: highlightedMethodId === method.id,
|
|
247
256
|
method,
|
|
248
257
|
onSelect: onMethodSelect
|
|
249
258
|
}, method.id))
|
|
@@ -287,7 +296,7 @@ const UnauthenticatedConnectView = ({ activeMethodId, buttonProps, challengeCont
|
|
|
287
296
|
]
|
|
288
297
|
});
|
|
289
298
|
};
|
|
290
|
-
const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, challengeContent, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, isAuthenticated, isBalanceLoading, isBusy, isChooserOpen, isProfileMenuOpen, notice, onChooserOpenChange, onDepositClick, onDisconnectClick, onEmailChange, onEmailSubmit, onMethodSelect, onProfileCardClick, onProfileClick, onProfileMenuOpenChange, socialMethods, onWithdrawClick, profileLabel, totalBalance, positionsBalance, claimReadyCount = 0, onClaimWinningsClick, walletMethods, isDepositBlocked = false }) => {
|
|
299
|
+
const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, challengeContent, chooserNotice, classNames, disabled, emailMethod, emailError, emailValue, errorMessage, highlightedMethodId, isAuthenticated, isBalanceLoading, isBusy, isChooserOpen, isProfileMenuOpen, notice, onChooserOpenChange, onDepositClick, onDisconnectClick, onEmailChange, onEmailSubmit, onMethodSelect, onProfileCardClick, onProfileClick, onProfileMenuOpenChange, socialMethods, onWithdrawClick, profileLabel, totalBalance, positionsBalance, claimReadyCount = 0, onClaimWinningsClick, walletMethods, isDepositBlocked = false }) => {
|
|
291
300
|
const labels = useLabels();
|
|
292
301
|
const { isPaperMode } = useResolvedExecutionMode();
|
|
293
302
|
const { general: { rootClassName }, features: { enableAnimations } } = useSdkUiConfig();
|
|
@@ -302,12 +311,14 @@ const AuthConnectButtonView = ({ activeMethodId, addressLabel, buttonProps, chal
|
|
|
302
311
|
activeMethodId,
|
|
303
312
|
buttonProps,
|
|
304
313
|
challengeContent,
|
|
314
|
+
chooserNotice,
|
|
305
315
|
classNames,
|
|
306
316
|
disabled,
|
|
307
317
|
emailMethod,
|
|
308
318
|
emailError,
|
|
309
319
|
emailValue,
|
|
310
320
|
errorMessage,
|
|
321
|
+
highlightedMethodId,
|
|
311
322
|
isBusy,
|
|
312
323
|
isChooserOpen,
|
|
313
324
|
notice,
|
|
@@ -2258,7 +2258,7 @@ const ConnectedAccountRow = ({ icon, label, connectedLabel, connected, iconClass
|
|
|
2258
2258
|
}), connected ? /* @__PURE__ */ jsx(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ jsx(ConnectTextButton, { onClick: onConnect })]
|
|
2259
2259
|
});
|
|
2260
2260
|
};
|
|
2261
|
-
const AccountsWalletsTab = ({ socialAccounts, email, wallets = [], onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onConnectEmail }) => {
|
|
2261
|
+
const AccountsWalletsTab = ({ socialAccounts, email, otherIdentityNotice, wallets = [], onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onConnectEmail }) => {
|
|
2262
2262
|
const twitter = socialAccounts?.twitter;
|
|
2263
2263
|
const google = socialAccounts?.google;
|
|
2264
2264
|
const apple = socialAccounts?.apple;
|
|
@@ -2267,46 +2267,53 @@ const AccountsWalletsTab = ({ socialAccounts, email, wallets = [], onConnectTwit
|
|
|
2267
2267
|
className: "agg-accounts-wallets-tab flex flex-col gap-6",
|
|
2268
2268
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
2269
2269
|
className: "agg-social-accounts-section flex flex-col gap-3",
|
|
2270
|
-
children: [
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2270
|
+
children: [
|
|
2271
|
+
/* @__PURE__ */ jsx(SectionTitle$1, { children: "Connected accounts" }),
|
|
2272
|
+
otherIdentityNotice ? /* @__PURE__ */ jsx("p", {
|
|
2273
|
+
className: "text-agg-sm leading-agg-5 text-agg-muted-foreground",
|
|
2274
|
+
children: otherIdentityNotice
|
|
2275
|
+
}) : null,
|
|
2276
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2277
|
+
className: "agg-social-accounts-list flex flex-col gap-4",
|
|
2278
|
+
children: [
|
|
2279
|
+
/* @__PURE__ */ jsx(ConnectedAccountRow, {
|
|
2280
|
+
icon: "google",
|
|
2281
|
+
iconClassName: "text-agg-foreground",
|
|
2282
|
+
label: "Google",
|
|
2283
|
+
connected: google?.connected,
|
|
2284
|
+
connectedLabel: google?.handle,
|
|
2285
|
+
onConnect: onConnectGoogle,
|
|
2286
|
+
onDisconnect: onDisconnectGoogle
|
|
2287
|
+
}),
|
|
2288
|
+
/* @__PURE__ */ jsx(ConnectedAccountRow, {
|
|
2289
|
+
icon: "apple",
|
|
2290
|
+
iconClassName: "text-agg-foreground",
|
|
2291
|
+
label: "Apple",
|
|
2292
|
+
connected: apple?.connected,
|
|
2293
|
+
connectedLabel: apple?.handle,
|
|
2294
|
+
onConnect: onConnectApple,
|
|
2295
|
+
onDisconnect: onDisconnectApple
|
|
2296
|
+
}),
|
|
2297
|
+
/* @__PURE__ */ jsx(ConnectedAccountRow, {
|
|
2298
|
+
icon: "twitter",
|
|
2299
|
+
iconClassName: "text-agg-foreground",
|
|
2300
|
+
label: "X (Twitter)",
|
|
2301
|
+
connected: twitter?.connected,
|
|
2302
|
+
connectedLabel: twitter?.handle,
|
|
2303
|
+
onConnect: onConnectTwitter,
|
|
2304
|
+
onDisconnect: onDisconnectTwitter
|
|
2305
|
+
}),
|
|
2306
|
+
/* @__PURE__ */ jsx(ConnectedAccountRow, {
|
|
2307
|
+
icon: "email",
|
|
2308
|
+
iconClassName: "text-agg-foreground",
|
|
2309
|
+
label: "Email address",
|
|
2310
|
+
connected: hasEmail,
|
|
2311
|
+
connectedLabel: email ?? void 0,
|
|
2312
|
+
onConnect: onConnectEmail
|
|
2313
|
+
})
|
|
2314
|
+
]
|
|
2315
|
+
})
|
|
2316
|
+
]
|
|
2310
2317
|
}), wallets.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
2311
2318
|
className: "agg-wallets-section flex flex-col gap-3",
|
|
2312
2319
|
children: [/* @__PURE__ */ jsx(SectionTitle$1, { children: "Wallets" }), /* @__PURE__ */ jsx("div", {
|
|
@@ -2445,6 +2452,11 @@ const TradingAccessTab = ({ venueAccounts, onConnectKalshi, onDisconnectKalshi,
|
|
|
2445
2452
|
TradingAccessTab.displayName = "TradingAccessTab";
|
|
2446
2453
|
//#endregion
|
|
2447
2454
|
//#region src/profile/index.tsx
|
|
2455
|
+
const OTHER_IDENTITY_NAMES = {
|
|
2456
|
+
email: "an email link",
|
|
2457
|
+
google: "Google",
|
|
2458
|
+
apple: "Apple"
|
|
2459
|
+
};
|
|
2448
2460
|
const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile, socialAccounts, wallets, email, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, onKycError, onConnectKalshi, onDisconnectExchange }) => {
|
|
2449
2461
|
const client = useAggClient();
|
|
2450
2462
|
const { user } = useAggAuthState();
|
|
@@ -2604,6 +2616,8 @@ const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onD
|
|
|
2604
2616
|
apple: { connected: isAccountConnected(["apple"]) }
|
|
2605
2617
|
};
|
|
2606
2618
|
const resolvedEmail = email ?? user?.accounts?.find((account) => String(account.provider).toLowerCase() === "email")?.providerAccountId ?? user?.identities?.find((identity) => String(identity.provider ?? "").toLowerCase() === "email")?.providerAccountId ?? null;
|
|
2619
|
+
const otherIdentityNames = (user?.otherIdentities ?? []).map((identity) => OTHER_IDENTITY_NAMES[identity.provider]);
|
|
2620
|
+
const otherIdentityNotice = otherIdentityNames.length > 0 ? `You also have a separate account that signs in with ${otherIdentityNames.join(" or ")}. Funds there aren't shown here.` : void 0;
|
|
2607
2621
|
const resolveRedirectUrl = () => {
|
|
2608
2622
|
if (typeof window === "undefined") return "http://localhost";
|
|
2609
2623
|
return `${window.location.origin}${window.location.pathname}${window.location.search}`;
|
|
@@ -2879,6 +2893,7 @@ const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onD
|
|
|
2879
2893
|
socialAccounts: resolvedSocialAccounts,
|
|
2880
2894
|
wallets: resolvedWallets,
|
|
2881
2895
|
email: resolvedEmail,
|
|
2896
|
+
otherIdentityNotice,
|
|
2882
2897
|
onConnectTwitter: providerActionMap.twitter.connect,
|
|
2883
2898
|
onDisconnectTwitter: providerActionMap.twitter.disconnect,
|
|
2884
2899
|
onConnectGoogle: providerActionMap.google.connect,
|
|
@@ -2259,7 +2259,7 @@ const ConnectedAccountRow = ({ icon, label, connectedLabel, connected, iconClass
|
|
|
2259
2259
|
}), connected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DisconnectTextButton, { onClick: onDisconnect }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectTextButton, { onClick: onConnect })]
|
|
2260
2260
|
});
|
|
2261
2261
|
};
|
|
2262
|
-
const AccountsWalletsTab = ({ socialAccounts, email, wallets = [], onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onConnectEmail }) => {
|
|
2262
|
+
const AccountsWalletsTab = ({ socialAccounts, email, otherIdentityNotice, wallets = [], onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onConnectEmail }) => {
|
|
2263
2263
|
const twitter = socialAccounts?.twitter;
|
|
2264
2264
|
const google = socialAccounts?.google;
|
|
2265
2265
|
const apple = socialAccounts?.apple;
|
|
@@ -2268,46 +2268,53 @@ const AccountsWalletsTab = ({ socialAccounts, email, wallets = [], onConnectTwit
|
|
|
2268
2268
|
className: "agg-accounts-wallets-tab flex flex-col gap-6",
|
|
2269
2269
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2270
2270
|
className: "agg-social-accounts-section flex flex-col gap-3",
|
|
2271
|
-
children: [
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2271
|
+
children: [
|
|
2272
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionTitle$1, { children: "Connected accounts" }),
|
|
2273
|
+
otherIdentityNotice ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2274
|
+
className: "text-agg-sm leading-agg-5 text-agg-muted-foreground",
|
|
2275
|
+
children: otherIdentityNotice
|
|
2276
|
+
}) : null,
|
|
2277
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2278
|
+
className: "agg-social-accounts-list flex flex-col gap-4",
|
|
2279
|
+
children: [
|
|
2280
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectedAccountRow, {
|
|
2281
|
+
icon: "google",
|
|
2282
|
+
iconClassName: "text-agg-foreground",
|
|
2283
|
+
label: "Google",
|
|
2284
|
+
connected: google?.connected,
|
|
2285
|
+
connectedLabel: google?.handle,
|
|
2286
|
+
onConnect: onConnectGoogle,
|
|
2287
|
+
onDisconnect: onDisconnectGoogle
|
|
2288
|
+
}),
|
|
2289
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectedAccountRow, {
|
|
2290
|
+
icon: "apple",
|
|
2291
|
+
iconClassName: "text-agg-foreground",
|
|
2292
|
+
label: "Apple",
|
|
2293
|
+
connected: apple?.connected,
|
|
2294
|
+
connectedLabel: apple?.handle,
|
|
2295
|
+
onConnect: onConnectApple,
|
|
2296
|
+
onDisconnect: onDisconnectApple
|
|
2297
|
+
}),
|
|
2298
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectedAccountRow, {
|
|
2299
|
+
icon: "twitter",
|
|
2300
|
+
iconClassName: "text-agg-foreground",
|
|
2301
|
+
label: "X (Twitter)",
|
|
2302
|
+
connected: twitter?.connected,
|
|
2303
|
+
connectedLabel: twitter?.handle,
|
|
2304
|
+
onConnect: onConnectTwitter,
|
|
2305
|
+
onDisconnect: onDisconnectTwitter
|
|
2306
|
+
}),
|
|
2307
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ConnectedAccountRow, {
|
|
2308
|
+
icon: "email",
|
|
2309
|
+
iconClassName: "text-agg-foreground",
|
|
2310
|
+
label: "Email address",
|
|
2311
|
+
connected: hasEmail,
|
|
2312
|
+
connectedLabel: email ?? void 0,
|
|
2313
|
+
onConnect: onConnectEmail
|
|
2314
|
+
})
|
|
2315
|
+
]
|
|
2316
|
+
})
|
|
2317
|
+
]
|
|
2311
2318
|
}), wallets.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2312
2319
|
className: "agg-wallets-section flex flex-col gap-3",
|
|
2313
2320
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionTitle$1, { children: "Wallets" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -2446,6 +2453,11 @@ const TradingAccessTab = ({ venueAccounts, onConnectKalshi, onDisconnectKalshi,
|
|
|
2446
2453
|
TradingAccessTab.displayName = "TradingAccessTab";
|
|
2447
2454
|
//#endregion
|
|
2448
2455
|
//#region src/profile/index.tsx
|
|
2456
|
+
const OTHER_IDENTITY_NAMES = {
|
|
2457
|
+
email: "an email link",
|
|
2458
|
+
google: "Google",
|
|
2459
|
+
apple: "Apple"
|
|
2460
|
+
};
|
|
2449
2461
|
const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onDeleteProfile, socialAccounts, wallets, email, onConnectTwitter, onDisconnectTwitter, onConnectGoogle, onDisconnectGoogle, onConnectApple, onDisconnectApple, onDisconnectWallet, onConnectEmail, onKycError, onConnectKalshi, onDisconnectExchange }) => {
|
|
2450
2462
|
const client = (0, _agg_build_hooks.useAggClient)();
|
|
2451
2463
|
const { user } = (0, _agg_build_hooks.useAggAuthState)();
|
|
@@ -2605,6 +2617,8 @@ const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onD
|
|
|
2605
2617
|
apple: { connected: isAccountConnected(["apple"]) }
|
|
2606
2618
|
};
|
|
2607
2619
|
const resolvedEmail = email ?? user?.accounts?.find((account) => String(account.provider).toLowerCase() === "email")?.providerAccountId ?? user?.identities?.find((identity) => String(identity.provider ?? "").toLowerCase() === "email")?.providerAccountId ?? null;
|
|
2620
|
+
const otherIdentityNames = (user?.otherIdentities ?? []).map((identity) => OTHER_IDENTITY_NAMES[identity.provider]);
|
|
2621
|
+
const otherIdentityNotice = otherIdentityNames.length > 0 ? `You also have a separate account that signs in with ${otherIdentityNames.join(" or ")}. Funds there aren't shown here.` : void 0;
|
|
2608
2622
|
const resolveRedirectUrl = () => {
|
|
2609
2623
|
if (typeof window === "undefined") return "http://localhost";
|
|
2610
2624
|
return `${window.location.origin}${window.location.pathname}${window.location.search}`;
|
|
@@ -2880,6 +2894,7 @@ const ProfileModal = ({ open, onOpenChange, username, avatarPreview, onSave, onD
|
|
|
2880
2894
|
socialAccounts: resolvedSocialAccounts,
|
|
2881
2895
|
wallets: resolvedWallets,
|
|
2882
2896
|
email: resolvedEmail,
|
|
2897
|
+
otherIdentityNotice,
|
|
2883
2898
|
onConnectTwitter: providerActionMap.twitter.connect,
|
|
2884
2899
|
onDisconnectTwitter: providerActionMap.twitter.disconnect,
|
|
2885
2900
|
onConnectGoogle: providerActionMap.google.connect,
|
package/dist/modals.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_manage_betdex_account_modal = require("./manage-betdex-account-modal-21ZVLsz0.js");
|
|
4
|
-
const require_modals = require("./modals-
|
|
4
|
+
const require_modals = require("./modals-CKSsH-b_.js");
|
|
5
5
|
exports.CARD_NETWORK_OPTIONS = require_modals.CARD_NETWORK_OPTIONS;
|
|
6
6
|
exports.ConnectAccountsStep = require_modals.ConnectAccountsStep;
|
|
7
7
|
exports.ConnectKalshiModal = require_manage_betdex_account_modal.ConnectKalshiModal;
|
package/dist/modals.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { d as ConnectProphetxModal, f as ConnectKalshiModal, m as GeoBlockBanner, n as WithdrawModal, p as SharedKycModal, r as buildTerminalSummary, u as ConnectNovigModal } from "./manage-betdex-account-modal-D2vKHird.mjs";
|
|
3
|
-
import { a as DepositModal, c as CARD_NETWORK_OPTIONS, d as ConnectAccountsStep, f as ProfileSetupStep, i as PaperOnboardingModal, l as OnboardingModal, m as PaperTradingBadge, n as ProfileModal, o as clearPendingCardSession, p as HowItWorksStep, r as PaperTradingOnboarding, s as getPendingCardSession, t as GeoBlockModal, u as ConnectOnchainModal } from "./modals-
|
|
3
|
+
import { a as DepositModal, c as CARD_NETWORK_OPTIONS, d as ConnectAccountsStep, f as ProfileSetupStep, i as PaperOnboardingModal, l as OnboardingModal, m as PaperTradingBadge, n as ProfileModal, o as clearPendingCardSession, p as HowItWorksStep, r as PaperTradingOnboarding, s as getPendingCardSession, t as GeoBlockModal, u as ConnectOnchainModal } from "./modals-C4TIbZLT.mjs";
|
|
4
4
|
export { CARD_NETWORK_OPTIONS, ConnectAccountsStep, ConnectKalshiModal, ConnectNovigModal, ConnectOnchainModal, ConnectProphetxModal, DepositModal, GeoBlockBanner, GeoBlockModal, HowItWorksStep, OnboardingModal, PaperOnboardingModal, PaperTradingBadge, PaperTradingOnboarding, ProfileModal, ProfileSetupStep, SharedKycModal, WithdrawModal, buildTerminalSummary, clearPendingCardSession, getPendingCardSession };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
const require_primitives = require("./primitives-CqxNeV7H.js");
|
|
3
|
-
const require_trading = require("./trading-
|
|
3
|
+
const require_trading = require("./trading-BfetYLvs.js");
|
|
4
4
|
const require_list = require("./list-D8v2SmY1.js");
|
|
5
5
|
const require_event_trading_state_utils = require("./event-trading-state.utils-s4DEc4iA.js");
|
|
6
6
|
let react = require("react");
|
|
@@ -284,8 +284,7 @@ const HomeSearchResults = ({ activeTabValue, query, resolvedTabs, getEventHref,
|
|
|
284
284
|
q: query,
|
|
285
285
|
type: "events",
|
|
286
286
|
categoryIds: activeTabValue === "trending" ? void 0 : activeCategoryTab?.categoryIds,
|
|
287
|
-
limit: SEARCH_RESULTS_LIMIT
|
|
288
|
-
deep: true
|
|
287
|
+
limit: SEARCH_RESULTS_LIMIT
|
|
289
288
|
});
|
|
290
289
|
const openEvents = (0, react.useMemo)(() => {
|
|
291
290
|
let filtered = require_primitives.filterOpenEvents(searchResults);
|
|
@@ -1687,6 +1686,7 @@ const YES_NO_LABELS = /* @__PURE__ */ new Set(["yes", "no"]);
|
|
|
1687
1686
|
const LINE_MARKET_TYPES = /* @__PURE__ */ new Set(["spread", "total"]);
|
|
1688
1687
|
const PLAYER_PROP_COUNT_PATTERN = /\+\s|\bo\/u\b|\bover\/under\b/i;
|
|
1689
1688
|
const REG_TIME_TITLE_PATTERN = /^reg(?:ular)?\s*time\s*:/i;
|
|
1689
|
+
const REGULATION_ONLY_PATTERN = /\(\s*60\s*min\s*\)/i;
|
|
1690
1690
|
const toTrimmedString = (value) => {
|
|
1691
1691
|
return typeof value === "string" ? value.trim() : "";
|
|
1692
1692
|
};
|
|
@@ -2103,7 +2103,7 @@ const isBinarySportsMoneylineMarket = (market) => {
|
|
|
2103
2103
|
const sportsMarketType = normalizeSportsMarketType(market.sportsMarketType);
|
|
2104
2104
|
const question = toTrimmedString(market.question);
|
|
2105
2105
|
const aggKey = resolveSportsMarketAggKey(market);
|
|
2106
|
-
return sportsMarketType === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label)) && (marketSubtype === "moneyline" || REG_TIME_TITLE_PATTERN.test(question) || aggKey.includes("_ml_"));
|
|
2106
|
+
return sportsMarketType === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && !REGULATION_ONLY_PATTERN.test(question) && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label)) && (marketSubtype === "moneyline" || REG_TIME_TITLE_PATTERN.test(question) || aggKey.includes("_ml_"));
|
|
2107
2107
|
};
|
|
2108
2108
|
const AGGKEY_LINE_TOKEN_PATTERN = /_\d{1,3}(?:p\d+)?(?=_|$)/g;
|
|
2109
2109
|
const resolveSportsLineFamilyKey = (market) => {
|
|
@@ -2272,7 +2272,10 @@ const resolveTotalStatUnit = (markets, marketCategory) => {
|
|
|
2272
2272
|
}
|
|
2273
2273
|
return null;
|
|
2274
2274
|
};
|
|
2275
|
-
const SPORTS_LEG_TITLE_OVERRIDES = {
|
|
2275
|
+
const SPORTS_LEG_TITLE_OVERRIDES = {
|
|
2276
|
+
nrfi: "NRFI",
|
|
2277
|
+
moneyline_3_way: "Regulation Time (3-Way)"
|
|
2278
|
+
};
|
|
2276
2279
|
const SPORTS_LEG_TITLE_SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
2277
2280
|
"to",
|
|
2278
2281
|
"the",
|
|
@@ -6648,6 +6651,7 @@ const SOLD_POSITION_SHARES_THRESHOLD = .1;
|
|
|
6648
6651
|
const isUserProfileLimitOrder = (order) => order.orderType === "limit" || order.orderType == null && order.limitPriceLabel != null;
|
|
6649
6652
|
const shouldIncludeByShares = (position) => {
|
|
6650
6653
|
if (typeof position.totalShares !== "number") return true;
|
|
6654
|
+
if (position.marketStatus === "resolved" && position.totalShares > 0) return true;
|
|
6651
6655
|
return position.totalShares >= SOLD_POSITION_SHARES_THRESHOLD;
|
|
6652
6656
|
};
|
|
6653
6657
|
const getActivityErrorMessage = (item) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { $ as SkeletonBlock, B as Skeleton, Fn as cn, Gn as shortenAddress, M as formatRecurringMarketWindowTimeEt, P as VenueLogo, Pn as AggErrorBoundary, Q as RemoteImage, V as skeletonViews, Yt as SearchEmptyIcon, a as Tabs, at as sortCategoriesForNavigation, bt as Icon, c as Typography, dn as CloseIcon, f as Modal, g as Search, gt as Button, h as Header, it as resolveTabVenus, j as formatRecurringMarketPillTimeEt, k as normalizeVenueMarketCluster, p as LoadingIcon, r as useOptionalToast, s as StateMessage, t as Tooltip, tt as filterOpenEvents, zn as formatUsd$1 } from "./primitives-Dz5aF8ma.mjs";
|
|
3
|
-
import { _ as DEPOSIT_MODAL_OPEN_EVENT, l as formatChainIdLabel, m as SettlementDetails, n as useClaimWinnings, r as PlaceOrder, t as useResolvedMarketClaim, v as WITHDRAW_MODAL_OPEN_EVENT } from "./trading-
|
|
3
|
+
import { _ as DEPOSIT_MODAL_OPEN_EVENT, l as formatChainIdLabel, m as SettlementDetails, n as useClaimWinnings, r as PlaceOrder, t as useResolvedMarketClaim, v as WITHDRAW_MODAL_OPEN_EVENT } from "./trading-DJZxQENx.mjs";
|
|
4
4
|
import { C as EventListItem, S as resolveMarketFromVenueMarkets, T as isErrorWithStatus, a as useEventListTabsHeaderOverflow, c as MarketDetails, i as useEventListTabs, l as MarketDetailsList, m as EventListItemDetails, o as DEFAULT_EVENT_LIST_SORT, r as EventListTabs, s as EVENT_LIST_SORT_VALUES, t as EventList, x as resolveHeaderOutcomeItems } from "./list-DD7roCVl.mjs";
|
|
5
5
|
import { y as getDisplayOutcomePrice } from "./event-trading-state.utils-B3my25Re.mjs";
|
|
6
6
|
import * as React from "react";
|
|
@@ -294,8 +294,7 @@ const HomeSearchResults = ({ activeTabValue, query, resolvedTabs, getEventHref,
|
|
|
294
294
|
q: query,
|
|
295
295
|
type: "events",
|
|
296
296
|
categoryIds: activeTabValue === "trending" ? void 0 : activeCategoryTab?.categoryIds,
|
|
297
|
-
limit: SEARCH_RESULTS_LIMIT
|
|
298
|
-
deep: true
|
|
297
|
+
limit: SEARCH_RESULTS_LIMIT
|
|
299
298
|
});
|
|
300
299
|
const openEvents = useMemo(() => {
|
|
301
300
|
let filtered = filterOpenEvents(searchResults);
|
|
@@ -1697,6 +1696,7 @@ const YES_NO_LABELS = /* @__PURE__ */ new Set(["yes", "no"]);
|
|
|
1697
1696
|
const LINE_MARKET_TYPES = /* @__PURE__ */ new Set(["spread", "total"]);
|
|
1698
1697
|
const PLAYER_PROP_COUNT_PATTERN = /\+\s|\bo\/u\b|\bover\/under\b/i;
|
|
1699
1698
|
const REG_TIME_TITLE_PATTERN = /^reg(?:ular)?\s*time\s*:/i;
|
|
1699
|
+
const REGULATION_ONLY_PATTERN = /\(\s*60\s*min\s*\)/i;
|
|
1700
1700
|
const toTrimmedString = (value) => {
|
|
1701
1701
|
return typeof value === "string" ? value.trim() : "";
|
|
1702
1702
|
};
|
|
@@ -2113,7 +2113,7 @@ const isBinarySportsMoneylineMarket = (market) => {
|
|
|
2113
2113
|
const sportsMarketType = normalizeSportsMarketType(market.sportsMarketType);
|
|
2114
2114
|
const question = toTrimmedString(market.question);
|
|
2115
2115
|
const aggKey = resolveSportsMarketAggKey(market);
|
|
2116
|
-
return sportsMarketType === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label)) && (marketSubtype === "moneyline" || REG_TIME_TITLE_PATTERN.test(question) || aggKey.includes("_ml_"));
|
|
2116
|
+
return sportsMarketType === "moneyline" && marketGroup === "game_lines" && normalizeSportsPeriod(market.period) === "full" && !REGULATION_ONLY_PATTERN.test(question) && normalizedOutcomeLabels.length === 2 && normalizedOutcomeLabels.every((label) => YES_NO_LABELS.has(label)) && (marketSubtype === "moneyline" || REG_TIME_TITLE_PATTERN.test(question) || aggKey.includes("_ml_"));
|
|
2117
2117
|
};
|
|
2118
2118
|
const AGGKEY_LINE_TOKEN_PATTERN = /_\d{1,3}(?:p\d+)?(?=_|$)/g;
|
|
2119
2119
|
const resolveSportsLineFamilyKey = (market) => {
|
|
@@ -2282,7 +2282,10 @@ const resolveTotalStatUnit = (markets, marketCategory) => {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
return null;
|
|
2284
2284
|
};
|
|
2285
|
-
const SPORTS_LEG_TITLE_OVERRIDES = {
|
|
2285
|
+
const SPORTS_LEG_TITLE_OVERRIDES = {
|
|
2286
|
+
nrfi: "NRFI",
|
|
2287
|
+
moneyline_3_way: "Regulation Time (3-Way)"
|
|
2288
|
+
};
|
|
2286
2289
|
const SPORTS_LEG_TITLE_SMALL_WORDS = /* @__PURE__ */ new Set([
|
|
2287
2290
|
"to",
|
|
2288
2291
|
"the",
|
|
@@ -6658,6 +6661,7 @@ const SOLD_POSITION_SHARES_THRESHOLD = .1;
|
|
|
6658
6661
|
const isUserProfileLimitOrder = (order) => order.orderType === "limit" || order.orderType == null && order.limitPriceLabel != null;
|
|
6659
6662
|
const shouldIncludeByShares = (position) => {
|
|
6660
6663
|
if (typeof position.totalShares !== "number") return true;
|
|
6664
|
+
if (position.marketStatus === "resolved" && position.totalShares > 0) return true;
|
|
6661
6665
|
return position.totalShares >= SOLD_POSITION_SHARES_THRESHOLD;
|
|
6662
6666
|
};
|
|
6663
6667
|
const getActivityErrorMessage = (item) => {
|
package/dist/pages.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const require_trading = require("./trading-
|
|
4
|
-
const require_pages = require("./pages-
|
|
3
|
+
const require_trading = require("./trading-BfetYLvs.js");
|
|
4
|
+
const require_pages = require("./pages-B-6yedLV.js");
|
|
5
5
|
exports.DEPOSIT_MODAL_OPEN_EVENT = require_trading.DEPOSIT_MODAL_OPEN_EVENT;
|
|
6
6
|
exports.EventMarketPage = require_pages.EventMarketPage;
|
|
7
7
|
exports.EventOpenOrders = require_pages.EventOpenOrders;
|