@sensiblestats/widget-react 0.113.0 → 0.114.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 +6 -0
- package/dist/index.cjs +23 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -361,6 +361,7 @@ var STRINGS = {
|
|
|
361
361
|
v8Draws: (n) => n === 1 ? "draw" : "draws",
|
|
362
362
|
v8MarketAria: "Market",
|
|
363
363
|
v8GamesAria: "Games",
|
|
364
|
+
v8AllMarkets: "All markets",
|
|
364
365
|
v8UsualPrefix: "\u2605 Your usual: ",
|
|
365
366
|
v8LeaguesGroup: "Leagues",
|
|
366
367
|
v8GamesGroup: "Games",
|
|
@@ -1041,6 +1042,7 @@ var STRINGS = {
|
|
|
1041
1042
|
v8Draws: () => "beraberlik",
|
|
1042
1043
|
v8MarketAria: "Market",
|
|
1043
1044
|
v8GamesAria: "Ma\xE7lar",
|
|
1045
|
+
v8AllMarkets: "T\xFCm marketler",
|
|
1044
1046
|
v8UsualPrefix: "\u2605 Her zamanki: ",
|
|
1045
1047
|
v8LeaguesGroup: "Ligler",
|
|
1046
1048
|
v8GamesGroup: "Ma\xE7lar",
|
|
@@ -1477,7 +1479,7 @@ function parseOddsFormat(value) {
|
|
|
1477
1479
|
}
|
|
1478
1480
|
|
|
1479
1481
|
// src/version.generated.ts
|
|
1480
|
-
var WIDGET_REACT_VERSION = "0.
|
|
1482
|
+
var WIDGET_REACT_VERSION = "0.114.0";
|
|
1481
1483
|
|
|
1482
1484
|
// src/config.ts
|
|
1483
1485
|
function normalizeUi(cfg) {
|
|
@@ -1764,6 +1766,7 @@ function normalizeUi(cfg) {
|
|
|
1764
1766
|
v8Meetings: strings.v8Meetings,
|
|
1765
1767
|
v8Draws: strings.v8Draws,
|
|
1766
1768
|
v8MarketAria: strings.v8MarketAria,
|
|
1769
|
+
v8AllMarkets: strings.v8AllMarkets,
|
|
1767
1770
|
v8GamesAria: strings.v8GamesAria,
|
|
1768
1771
|
v8UsualPrefix: strings.v8UsualPrefix,
|
|
1769
1772
|
v8LeaguesGroup: strings.v8LeaguesGroup,
|
|
@@ -14933,6 +14936,7 @@ function openingGames(preset) {
|
|
|
14933
14936
|
const option = options.find((o) => o.id === preset.gamesOptionId) ?? options.find((o) => sameIds(o.matchIds, preset.matchIds)) ?? null;
|
|
14934
14937
|
return option ? { options, option } : { options: null, option: null };
|
|
14935
14938
|
}
|
|
14939
|
+
var ALL_MARKETS = "*";
|
|
14936
14940
|
var usableMarkets = (preset) => preset.marketOptions && preset.marketOptions.some((m) => m.key === preset.marketKey) ? preset.marketOptions : null;
|
|
14937
14941
|
function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, sport, operatorUserId, anonymousUserId, onCoolOff }) {
|
|
14938
14942
|
const { oddsFormat } = useOddsSettings();
|
|
@@ -14959,7 +14963,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
14959
14963
|
const [widenedNote, setWidenedNote] = (0, import_react87.useState)(saved?.widenedNote ?? false);
|
|
14960
14964
|
const requestFor = (v) => ({
|
|
14961
14965
|
sport,
|
|
14962
|
-
marketKey: v.marketKey,
|
|
14966
|
+
...v.marketKey !== null ? { marketKey: v.marketKey } : {},
|
|
14963
14967
|
matchIds: v.widen ? [] : v.matchIds,
|
|
14964
14968
|
legs: v.legs,
|
|
14965
14969
|
// The total row is hidden for Singles, so a total picked earlier must not narrow them; the pick stays in state for the way back.
|
|
@@ -15014,7 +15018,7 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15014
15018
|
(0, import_react87.useEffect)(() => {
|
|
15015
15019
|
if (market) setSeen(market);
|
|
15016
15020
|
}, [market]);
|
|
15017
|
-
const marketName = marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
|
|
15021
|
+
const marketName = view.marketKey === null ? null : marketOptions?.find((m) => m.key === view.marketKey)?.label ?? market ?? seen;
|
|
15018
15022
|
const paused = ready && grid.status === "paused";
|
|
15019
15023
|
const coolOff = status === "ready" && grid === null;
|
|
15020
15024
|
const empty2 = ready && (grid.status === "miss" || grid.status === "ok" && (rows === null || rows.length === 0));
|
|
@@ -15046,9 +15050,22 @@ function SentenceBuilder({ preset, ui, conversation, memory: memory3, slip, spor
|
|
|
15046
15050
|
] }) }) : conversation ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
|
|
15047
15051
|
marketOptions ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15048
15052
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
15049
|
-
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime124.
|
|
15050
|
-
|
|
15051
|
-
|
|
15053
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "ss-w-v8-slot", "data-mine": marketOptions.find((m) => m.key === view.marketKey)?.usual || void 0, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
15054
|
+
"select",
|
|
15055
|
+
{
|
|
15056
|
+
className: "ss-w-v8-select",
|
|
15057
|
+
"aria-label": ui.v8MarketAria,
|
|
15058
|
+
value: view.marketKey ?? ALL_MARKETS,
|
|
15059
|
+
onChange: (e) => {
|
|
15060
|
+
const picked = e.target.value === ALL_MARKETS ? null : e.target.value;
|
|
15061
|
+
if (picked !== view.marketKey) ask({ ...view, marketKey: picked });
|
|
15062
|
+
},
|
|
15063
|
+
children: [
|
|
15064
|
+
marketOptions.map((m) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: m.key, children: m.usual ? `${ui.v8UsualPrefix}${m.label}` : m.label }, m.key)),
|
|
15065
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("option", { value: ALL_MARKETS, children: ui.v8AllMarkets })
|
|
15066
|
+
]
|
|
15067
|
+
}
|
|
15068
|
+
) })
|
|
15052
15069
|
] }) : marketName ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "ss-w-v8-builder-ln", children: [
|
|
15053
15070
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-w", children: ui.v8BuilderShow }),
|
|
15054
15071
|
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { className: "ss-w-v8-builder-market", children: marketName })
|