fansunited-frontend-components 1.2.0 → 1.3.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/ProfileStats.js CHANGED
@@ -5,7 +5,7 @@ import { css as a } from "@emotion/react";
5
5
  import { useDisableCache as dt, searchEntitiesByQuery as Dt, useColors as Lt, useCurrentThemeMode as Bt, toIntlLocale as Nt, useIsRtl as _t, DirectionalIcon as Ht } from "fansunited-frontend-core";
6
6
  import { useTranslation as jt } from "react-i18next";
7
7
  import { ChevronRightIcon as Gt, SearchIcon as Qt, CloseIcon as pt, CheckIcon as Ut, AddIcon as ut, StarRoundedIcon as Vt, EditOutlinedIcon as Yt } from "fansunited-frontend-core/ui/icons";
8
- import { w as Kt } from "./chunks/withVersionStamp-C1gbpK3-.js";
8
+ import { w as Kt } from "./chunks/withVersionStamp-BOktiTgW.js";
9
9
  class mt extends Error {
10
10
  }
11
11
  const ft = (e) => {
package/README.md CHANGED
@@ -3814,6 +3814,8 @@ Football score predictor component with two templates: the default **multi-tab**
3814
3814
  | `userIsLoggedIn` | `boolean` | Determine if the user is logged in (default: false) |
3815
3815
  | `signInCTA` | `SignInCTADetails` | Sign in call to action button configuration |
3816
3816
  | `tabs` | `PredictorTab[]` | Tabs to enable (default: all tabs). Ignored by `"embed"` |
3817
+ | `tab` | `PredictorTab` | Render only this tab — no tab bar, no URL hash handling. Wins over `tabs`. See [Page per tab](#predictor-page-per-tab). Ignored by `"embed"` |
3818
+ | `showHeader` | `boolean` | Show the hero header (default: true, or false when `tab` is set). Ignored by `"embed"` |
3817
3819
  | `defaultImagePlaceholderUrl` | `string` | Fallback image shown when the template has no `image` configured. Used by both templates |
3818
3820
  | `header` | `PredictorHeaderConfig` | Size and framing of the standard hero banner. See [Header Banner](#predictor-header-banner). Ignored by `"embed"` |
3819
3821
  | `playTabBanners` | `PlayTabBanner[]` | Custom banners rendered in the Play tab. Ignored by `"embed"` |
@@ -3975,6 +3977,25 @@ type PredictorTab = "play" | "leaderboard" | "private-leagues" | "rules" | "priz
3975
3977
  | `"rules"` | Searchable game rules and scoring system |
3976
3978
  | `"prizes"` | Prize distribution and rewards information |
3977
3979
 
3980
+ #### Predictor Page per Tab
3981
+
3982
+ > Applies to `template="standard"` only.
3983
+
3984
+ When each tab lives on its own page of your site (`/play`, `/leaderboard`, `/private-leagues`, …), pass `tab` instead of `tabs`. The component renders only that tab: no tab bar, since your site's navigation takes its place, and no hero header unless you set `showHeader`. It neither reads nor writes the URL hash, so your routes stay clean.
3985
+
3986
+ ```tsx
3987
+ // /play
3988
+ <Predictor {...otherProps} tab="play" />
3989
+
3990
+ // /leaderboard
3991
+ <Predictor {...otherProps} tab="leaderboard" />
3992
+
3993
+ // /private-leagues, with the template's banner on top
3994
+ <Predictor {...otherProps} tab="private-leagues" showHeader />
3995
+ ```
3996
+
3997
+ Changing `tab` on a mounted component switches to that tab, so client-side routing can reuse one instance. Each page fetches the template on its own. Each page also sends its own `widget_view` and `tab_view` events. Point the embed template's `submitCTA.url` at your Play page — that is where the handoff is read.
3998
+
3978
3999
  #### Sign in Configuration
3979
4000
 
3980
4001
  Control user authentication using the `userIsLoggedIn` and `signInCTA` props.
@@ -4433,6 +4454,8 @@ Full-featured competitive picks predictor component with a multi-tab interface f
4433
4454
  | `userIsLoggedIn` | `boolean` | `false` | Whether the current user is authenticated |
4434
4455
  | `signInCTA` | `SignInCTADetails` | — | Sign in call to action button configuration |
4435
4456
  | `tabs` | `TopXTab[]` | all tabs | Tabs to enable |
4457
+ | `tab` | `TopXTab` | — | Render only this tab — no tab bar, no URL hash handling. Wins over `tabs`. See [Page per tab](#topx-page-per-tab) |
4458
+ | `showHeader` | `boolean` | `true` (`false` with `tab`) | Show the hero header |
4436
4459
  | `defaultImagePlaceholderUrl` | `string` | — | Fallback image URL for the hero header |
4437
4460
  | `playTabBanners` | `PlayTabBanner[]` | — | Custom banners rendered in the Play tab |
4438
4461
  | `consents` | `ConsentDef[]` | — | Consent definitions required before predicting |
@@ -4468,6 +4491,23 @@ type TopXTab = "play" | "leaderboard" | "private-leagues" | "rules" | "prizes";
4468
4491
  | `"rules"` | Searchable game rules and scoring system |
4469
4492
  | `"prizes"` | Prize distribution and rewards information |
4470
4493
 
4494
+ #### TopX Page per Tab
4495
+
4496
+ When each tab lives on its own page of your site (`/play`, `/leaderboard`, `/private-leagues`, …), pass `tab` instead of `tabs`. The component renders only that tab: no tab bar, since your site's navigation takes its place, and no hero header unless you set `showHeader`. It neither reads nor writes the URL hash, so your routes stay clean.
4497
+
4498
+ ```tsx
4499
+ // /play
4500
+ <TopX {...otherProps} tab="play" />
4501
+
4502
+ // /leaderboard
4503
+ <TopX {...otherProps} tab="leaderboard" />
4504
+
4505
+ // /private-leagues, with the template's banner on top
4506
+ <TopX {...otherProps} tab="private-leagues" showHeader />
4507
+ ```
4508
+
4509
+ Changing `tab` on a mounted component switches to that tab, so client-side routing can reuse one instance. Each page fetches the template on its own.
4510
+
4471
4511
  #### Game Navigation Label
4472
4512
 
4473
4513
  The `gameNavLabel` prop controls how each game is labelled in the Play tab's navigation header — the title shown between the previous/next arrow buttons.
package/Standings.js CHANGED
@@ -7,7 +7,7 @@ import { hexToRgb as Ge, useDisableCache as je, extractSdkErrorMessage as it, us
7
7
  import { MatchFilters as ke } from "fansunited-sdk-esm/models";
8
8
  import { EmojiEventsIcon as dt } from "fansunited-frontend-core/ui/icons";
9
9
  import { createPortal as ut } from "react-dom";
10
- import { w as pt } from "./chunks/withVersionStamp-C1gbpK3-.js";
10
+ import { w as pt } from "./chunks/withVersionStamp-BOktiTgW.js";
11
11
  const ft = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").trim().replace(
12
12
  /\S+/g,
13
13
  (n) => n.charAt(0).toUpperCase() + n.slice(1).toLowerCase()