@sensiblestats/widget-react 0.83.0 → 0.84.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 +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- 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.84.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Render a 2nd stat on price cards when the server sends `insights[1]`. Falls back to the single `insight` stat unchanged when a card only has one, so older payloads render exactly as before.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @sensiblestats/widget-sdk@0.54.0
|
|
13
|
+
|
|
3
14
|
## 0.83.0
|
|
4
15
|
|
|
5
16
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -1215,6 +1215,7 @@ function toMarketOddsVM(card) {
|
|
|
1215
1215
|
mainLine: str(card.mainLine),
|
|
1216
1216
|
pinEnabled: card.pinEnabled === true,
|
|
1217
1217
|
statText: card.insight && typeof card.insight === "object" ? str(card.insight.text) : void 0,
|
|
1218
|
+
statTexts: Array.isArray(card.insights) ? card.insights.map((i) => str(i?.text)).filter((t) => !!t) : void 0,
|
|
1218
1219
|
tag: card.tag === "your_market" ? "your_market" : void 0,
|
|
1219
1220
|
live: card.live ?? null,
|
|
1220
1221
|
marketCount: typeof card.marketCount === "number" && Number.isFinite(card.marketCount) ? card.marketCount : void 0
|
|
@@ -4467,7 +4468,7 @@ function MarketOddsCard({ vm, ui, slip, monitor, inSlipIds, hideHeader, pinRef }
|
|
|
4467
4468
|
] }) : null
|
|
4468
4469
|
] }) : null
|
|
4469
4470
|
] }),
|
|
4470
|
-
|
|
4471
|
+
!hideHeader && !pinRef ? (vm.statTexts && vm.statTexts.length > 0 ? vm.statTexts : vm.statText ? [vm.statText] : []).map((text, i) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "ss-w-mo-stat", children: text }, i)) : null,
|
|
4471
4472
|
isClosed ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "ss-w-mo-closed", children: closedReason === "suspended" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: ui?.liveCard.suspended ?? "Market suspended" }) : closedReason === "no_live_price" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: ui?.liveCard.noPrice ?? "No live price available" }) : closedReason === "full_time" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: ui?.liveCard.fullTime ?? "Full time" }) : null }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
4472
4473
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ss-w-mo-rows", children: [
|
|
4473
4474
|
vm.mainRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(OddsRow, { vm, row, ui, slip, inSlipIds, history, suppressSlip: isStale }, row.key)),
|