@sensiblestats/widget-react 0.87.0 → 0.88.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 +11 -0
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.88.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8973968: Show team short codes in the Form & H2H block's column headers and win labels instead of repeating the full team name, falling back to the full name when no short code is known.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [8973968]
|
|
12
|
+
- @sensiblestats/widget-sdk@0.58.0
|
|
13
|
+
|
|
3
14
|
## 0.87.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -6326,10 +6326,12 @@ function FormDots({ form, ui }) {
|
|
|
6326
6326
|
}
|
|
6327
6327
|
function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
6328
6328
|
const [expanded, setExpanded] = (0, import_react44.useState)(false);
|
|
6329
|
-
const { homeForm, awayForm, h2h } = formAndH2H;
|
|
6329
|
+
const { homeForm, awayForm, h2h, homeShortCode, awayShortCode } = formAndH2H;
|
|
6330
6330
|
if (homeForm.length === 0 && awayForm.length === 0 && !h2h) {
|
|
6331
6331
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_jsx_runtime53.Fragment, {});
|
|
6332
6332
|
}
|
|
6333
|
+
const homeLabel = homeShortCode || homeTeamName;
|
|
6334
|
+
const awayLabel = awayShortCode || awayTeamName;
|
|
6333
6335
|
const total = h2h ? h2h.wins + h2h.draws + h2h.losses : 0;
|
|
6334
6336
|
const winsPct = total > 0 && h2h ? h2h.wins / total * 100 : 0;
|
|
6335
6337
|
const drawsPct = total > 0 && h2h ? h2h.draws / total * 100 : 0;
|
|
@@ -6360,11 +6362,11 @@ function MonitorFormH2H({ formAndH2H, homeTeamName, awayTeamName, ui }) {
|
|
|
6360
6362
|
expanded && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "ss-w-h2h-body", children: [
|
|
6361
6363
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "ss-w-h2h-forms", children: [
|
|
6362
6364
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "ss-w-h2h-form-col", children: [
|
|
6363
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ss-w-h2h-form-team", children:
|
|
6365
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ss-w-h2h-form-team", children: homeLabel }),
|
|
6364
6366
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FormDots, { form: homeForm, ui })
|
|
6365
6367
|
] }),
|
|
6366
6368
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "ss-w-h2h-form-col ss-w-h2h-form-col--away", children: [
|
|
6367
|
-
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ss-w-h2h-form-team", children:
|
|
6369
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ss-w-h2h-form-team", children: awayLabel }),
|
|
6368
6370
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(FormDots, { form: awayForm, ui })
|
|
6369
6371
|
] })
|
|
6370
6372
|
] }),
|