@sensiblestats/widget-react 0.42.0 → 0.43.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/CHANGELOG.md +13 -0
- package/dist/index.cjs +9 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.43.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Betting cards (insight, market-odds, odds-movement) now render a server-supplied `kickoffLabel`
|
|
8
|
+
in the operator's timezone and language when present, falling back to browser-zone formatting of
|
|
9
|
+
`kickoffUtc` for older servers.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
- @sensiblestats/widget-sdk@0.31.0
|
|
15
|
+
|
|
3
16
|
## 0.42.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -534,7 +534,8 @@ function toInsightVM(insight) {
|
|
|
534
534
|
homeCrest: str(insight.homeTeamImagePath),
|
|
535
535
|
awayCrest: str(insight.awayTeamImagePath),
|
|
536
536
|
competitionCrest: str(insight.competitionImagePath),
|
|
537
|
-
kickoffUtc: str(insight.kickoffUtc)
|
|
537
|
+
kickoffUtc: str(insight.kickoffUtc),
|
|
538
|
+
kickoffLabel: str(insight.kickoffLabel)
|
|
538
539
|
};
|
|
539
540
|
}
|
|
540
541
|
function toSlipSelection(vm, conversationId) {
|
|
@@ -583,6 +584,7 @@ function toMarketOddsVM(card) {
|
|
|
583
584
|
competitionCrest: str(card.competitionImagePath),
|
|
584
585
|
competition: str(card.competitionName),
|
|
585
586
|
kickoffUtc: str(card.kickoffUtc),
|
|
587
|
+
kickoffLabel: str(card.kickoffLabel),
|
|
586
588
|
bookmaker: rows.map((r) => str(r.bookmakerName)).find(Boolean),
|
|
587
589
|
updatedAt: updated.length > 0 ? updated[updated.length - 1] : void 0,
|
|
588
590
|
isLive: rows.some((r) => r.isLive === true),
|
|
@@ -1937,7 +1939,8 @@ function CardFixture({ it }) {
|
|
|
1937
1939
|
}
|
|
1938
1940
|
function InsightCard({ it, ui, slip, monitor }) {
|
|
1939
1941
|
const live = it.isLive || it.phase === "live";
|
|
1940
|
-
const
|
|
1942
|
+
const kickoffFallback = it.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(it.kickoffUtc) : void 0;
|
|
1943
|
+
const kickoff = it.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
1941
1944
|
const hasNamedTeams = !!it.homeTeamName && !!it.awayTeamName;
|
|
1942
1945
|
const leftIsFixture = hasNamedTeams || !!it.fixture;
|
|
1943
1946
|
const showPin = !!monitor && it.pinEnabled;
|
|
@@ -1947,11 +1950,7 @@ function InsightCard({ it, ui, slip, monitor }) {
|
|
|
1947
1950
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-bi-live-dot", "aria-hidden": "true" }),
|
|
1948
1951
|
ui?.liveLabel ?? "Live"
|
|
1949
1952
|
] }) : null,
|
|
1950
|
-
kickoff ? /* @__PURE__ */ (0, import_jsx_runtime13.
|
|
1951
|
-
kickoff.dayLabel,
|
|
1952
|
-
" ",
|
|
1953
|
-
kickoff.time
|
|
1954
|
-
] }) : null,
|
|
1953
|
+
kickoff ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ss-w-bi-kick", children: kickoff }) : null,
|
|
1955
1954
|
showPin && ui ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(PinToggle, { ui, monitor, pin: { kind: "match", matchId: it.matchId } }) : null
|
|
1956
1955
|
] });
|
|
1957
1956
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ss-w-binsight", children: [
|
|
@@ -2024,7 +2023,8 @@ function OddsRow({ vm, row, ui, slip, inSlipIds }) {
|
|
|
2024
2023
|
}
|
|
2025
2024
|
function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }) {
|
|
2026
2025
|
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
2027
|
-
const
|
|
2026
|
+
const kickoffFallback = vm.kickoffUtc && ui?.bettingKickoff ? ui.bettingKickoff(vm.kickoffUtc) : void 0;
|
|
2027
|
+
const kickoff = vm.kickoffLabel ?? (kickoffFallback ? `${kickoffFallback.dayLabel} ${kickoffFallback.time}` : void 0);
|
|
2028
2028
|
const hasNamedTeams = !!vm.homeTeamName && !!vm.awayTeamName;
|
|
2029
2029
|
const showPin = !!monitor && vm.pinEnabled;
|
|
2030
2030
|
const showMarketPin = showPin && !pinRef;
|
|
@@ -2041,11 +2041,7 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
|
|
|
2041
2041
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ss-w-bi-live-dot", "aria-hidden": "true" }),
|
|
2042
2042
|
ui?.liveLabel ?? "Live"
|
|
2043
2043
|
] }) : null,
|
|
2044
|
-
kickoff ? /* @__PURE__ */ (0, import_jsx_runtime14.
|
|
2045
|
-
kickoff.dayLabel,
|
|
2046
|
-
" ",
|
|
2047
|
-
kickoff.time
|
|
2048
|
-
] }) : null,
|
|
2044
|
+
kickoff ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ss-w-bi-kick", children: kickoff }) : null,
|
|
2049
2045
|
showPin && ui ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2050
2046
|
PinToggle,
|
|
2051
2047
|
{
|