@sensiblestats/widget-react 0.165.2 → 0.165.3
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 +8 -0
- package/dist/index.cjs +9 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.165.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d97b383: A match log row and a matchday predictor game with no result show no letter, pill or grade.
|
|
8
|
+
- Updated dependencies [d97b383]
|
|
9
|
+
- @sensiblestats/widget-sdk@0.121.1
|
|
10
|
+
|
|
3
11
|
## 0.165.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1422,7 +1422,7 @@ function parseCustomTotal(text2, format2) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
1424
|
// src/version.generated.ts
|
|
1425
|
-
var WIDGET_REACT_VERSION = "0.165.
|
|
1425
|
+
var WIDGET_REACT_VERSION = "0.165.3";
|
|
1426
1426
|
|
|
1427
1427
|
// src/config.ts
|
|
1428
1428
|
var COLOR_KEYS = ["accent", "cta", "surface", "ink"];
|
|
@@ -17920,13 +17920,14 @@ function MatchdayPredictorGame({
|
|
|
17920
17920
|
] });
|
|
17921
17921
|
}
|
|
17922
17922
|
const r = clientState.result;
|
|
17923
|
+
const finalScore = r.homeScore !== void 0 && r.awayScore !== void 0 ? { h: r.homeScore, a: r.awayScore } : null;
|
|
17923
17924
|
return /* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
|
|
17924
17925
|
header,
|
|
17925
17926
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("div", { className: "ss-g-body", children: [
|
|
17926
|
-
config && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h:
|
|
17927
|
-
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ResultCard, { tone: "neutral", title: t.fullTime(
|
|
17927
|
+
config && finalScore && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: finalScore.h, a: finalScore.a, t }),
|
|
17928
|
+
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(ResultCard, { tone: "neutral", title: finalScore ? t.fullTime(finalScore.h, finalScore.a) : t.outcome, onBack, ui }),
|
|
17928
17929
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsxs)("ul", { className: "ss-g-mp-rows", children: [
|
|
17929
|
-
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
17930
|
+
clientState.exactScoreCorrect !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
|
|
17930
17931
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
|
|
17931
17932
|
!clientState.firstScorerVoid && /* @__PURE__ */ (0, import_jsx_runtime137.jsx)(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
|
|
17932
17933
|
] })
|
|
@@ -20170,7 +20171,9 @@ function MatchRow({ ui, row }) {
|
|
|
20170
20171
|
row.yellowCards > 0 ? `${row.yellowCards}${ui.statHeadYellow}` : null,
|
|
20171
20172
|
row.sentOff ? ui.statHeadRed : null
|
|
20172
20173
|
].filter((x) => x !== null);
|
|
20173
|
-
const
|
|
20174
|
+
const letter = row.result == null ? null : ui.resultLetter[row.result];
|
|
20175
|
+
const score = `${row.goalsFor}\u2013${row.goalsAgainst}`;
|
|
20176
|
+
const sub = [letter === null ? score : `${letter} ${score}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
|
|
20174
20177
|
const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
|
|
20175
20178
|
const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
|
|
20176
20179
|
return /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "ss-w-pd-match", children: [
|
|
@@ -20179,7 +20182,7 @@ function MatchRow({ ui, row }) {
|
|
|
20179
20182
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
|
|
20180
20183
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-match-sub", children: sub })
|
|
20181
20184
|
] }),
|
|
20182
|
-
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children:
|
|
20185
|
+
letter !== null && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: letter }),
|
|
20183
20186
|
rating === null ? /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
|
|
20184
20187
|
] });
|
|
20185
20188
|
}
|