@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/dist/index.js CHANGED
@@ -1383,7 +1383,7 @@ function parseCustomTotal(text2, format2) {
1383
1383
  }
1384
1384
 
1385
1385
  // src/version.generated.ts
1386
- var WIDGET_REACT_VERSION = "0.165.2";
1386
+ var WIDGET_REACT_VERSION = "0.165.3";
1387
1387
 
1388
1388
  // src/config.ts
1389
1389
  var COLOR_KEYS = ["accent", "cta", "surface", "ink"];
@@ -17881,13 +17881,14 @@ function MatchdayPredictorGame({
17881
17881
  ] });
17882
17882
  }
17883
17883
  const r = clientState.result;
17884
+ const finalScore = r.homeScore !== void 0 && r.awayScore !== void 0 ? { h: r.homeScore, a: r.awayScore } : null;
17884
17885
  return /* @__PURE__ */ jsxs119("div", { className: "ss-g-screen", "data-game": "matchday-predictor", "data-testid": "game-screen-matchday-predictor", children: [
17885
17886
  header,
17886
17887
  /* @__PURE__ */ jsxs119("div", { className: "ss-g-body", children: [
17887
- config && /* @__PURE__ */ jsx137(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: r.homeScore, a: r.awayScore, t }),
17888
- /* @__PURE__ */ jsx137(ResultCard, { tone: "neutral", title: t.fullTime(r.homeScore, r.awayScore), onBack, ui }),
17888
+ config && finalScore && /* @__PURE__ */ jsx137(ScoreCard, { home: config.homeTeam, away: config.awayTeam, h: finalScore.h, a: finalScore.a, t }),
17889
+ /* @__PURE__ */ jsx137(ResultCard, { tone: "neutral", title: finalScore ? t.fullTime(finalScore.h, finalScore.a) : t.outcome, onBack, ui }),
17889
17890
  /* @__PURE__ */ jsxs119("ul", { className: "ss-g-mp-rows", children: [
17890
- /* @__PURE__ */ jsx137(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
17891
+ clientState.exactScoreCorrect !== void 0 && /* @__PURE__ */ jsx137(OutcomeRow, { label: t.exactScore, ok: clientState.exactScoreCorrect, t }),
17891
17892
  /* @__PURE__ */ jsx137(OutcomeRow, { label: t.outcome, ok: clientState.outcomeCorrect, t }),
17892
17893
  !clientState.firstScorerVoid && /* @__PURE__ */ jsx137(OutcomeRow, { label: t.firstScorerRow, ok: clientState.firstScorerCorrect, detail: r.firstScorerName, t })
17893
17894
  ] })
@@ -20131,7 +20132,9 @@ function MatchRow({ ui, row }) {
20131
20132
  row.yellowCards > 0 ? `${row.yellowCards}${ui.statHeadYellow}` : null,
20132
20133
  row.sentOff ? ui.statHeadRed : null
20133
20134
  ].filter((x) => x !== null);
20134
- const sub = [`${ui.resultLetter[row.result]} ${row.goalsFor}\u2013${row.goalsAgainst}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
20135
+ const letter = row.result == null ? null : ui.resultLetter[row.result];
20136
+ const score = `${row.goalsFor}\u2013${row.goalsAgainst}`;
20137
+ const sub = [letter === null ? score : `${letter} ${score}`, `${row.minutes}\u2032`, ...extras].join(" \xB7 ");
20135
20138
  const rating = typeof row.rating === "number" && Number.isFinite(row.rating) ? Math.round(row.rating * 10) / 10 : null;
20136
20139
  const pillTone = row.result === "W" ? "pos" : row.result === "L" ? "neg" : "draw";
20137
20140
  return /* @__PURE__ */ jsxs138("div", { className: "ss-w-pd-match", children: [
@@ -20140,7 +20143,7 @@ function MatchRow({ ui, row }) {
20140
20143
  /* @__PURE__ */ jsx161("div", { className: "ss-w-pd-match-opp", children: ui.matchLogOpponent(row.opponentName, row.isHome) }),
20141
20144
  /* @__PURE__ */ jsx161("div", { className: "ss-w-pd-match-sub", children: sub })
20142
20145
  ] }),
20143
- /* @__PURE__ */ jsx161("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: ui.resultLetter[row.result] }),
20146
+ letter !== null && /* @__PURE__ */ jsx161("div", { className: `ss-w-pd-pill ss-w-pd-pill--${pillTone}`, children: letter }),
20144
20147
  rating === null ? /* @__PURE__ */ jsx161("div", { className: "ss-w-pd-chip-empty" }) : /* @__PURE__ */ jsx161("div", { className: `ss-w-pd-chip ss-w-pd-chip--${ratingTone(rating)}`, children: formatFixed(rating, ui.locale, 1) })
20145
20148
  ] });
20146
20149
  }