@sensiblestats/widget-react 0.13.0 → 0.13.1
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 +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,7 +39,8 @@ var STRINGS = {
|
|
|
39
39
|
chartTimeLabel: (ms) => new Intl.DateTimeFormat("en-GB", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)),
|
|
40
40
|
chartAria: (opening, current, direction, hours) => {
|
|
41
41
|
const span = hours % 24 === 0 ? `${hours / 24} day${hours / 24 === 1 ? "" : "s"}` : `${hours} hour${hours === 1 ? "" : "s"}`;
|
|
42
|
-
|
|
42
|
+
const drift = direction ? `, ${direction}` : "";
|
|
43
|
+
return `Price movement over the last ${span}: opened at ${opening}, currently ${current}${drift}.`;
|
|
43
44
|
},
|
|
44
45
|
inSlip: "In slip",
|
|
45
46
|
slipAdded: (n) => n === void 0 ? "Added to slip" : `Added to slip (${n} selection${n === 1 ? "" : "s"})`,
|
|
@@ -85,7 +86,8 @@ var STRINGS = {
|
|
|
85
86
|
chartTimeLabel: (ms) => new Intl.DateTimeFormat("tr-TR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }).format(new Date(ms)),
|
|
86
87
|
chartAria: (opening, current, direction, hours) => {
|
|
87
88
|
const span = hours % 24 === 0 ? `${hours / 24} g\xFCn` : `${hours} saat`;
|
|
88
|
-
|
|
89
|
+
const drift = direction ? `, ${direction}` : "";
|
|
90
|
+
return `Son ${span} i\xE7indeki oran hareketi: ${opening} ile a\xE7\u0131ld\u0131, \u015Fu anda ${current}${drift}.`;
|
|
89
91
|
},
|
|
90
92
|
inSlip: "Kuponda",
|
|
91
93
|
slipAdded: (n) => n === void 0 ? "Kupona eklendi" : `Kupona eklendi (${n} se\xE7im)`,
|
|
@@ -990,7 +992,9 @@ function directionWord(vm, ui) {
|
|
|
990
992
|
return "";
|
|
991
993
|
}
|
|
992
994
|
function OddsMovementCard({ vm, ui }) {
|
|
993
|
-
const
|
|
995
|
+
const word = directionWord(vm, ui);
|
|
996
|
+
const drift = word ? `, ${word}` : "";
|
|
997
|
+
const aria = ui?.chartAria ? ui.chartAria(vm.opening, vm.current, word, vm.windowHours) : `Price movement over the last ${vm.windowHours} hours: opened at ${vm.opening}, currently ${vm.current}${drift}.`;
|
|
994
998
|
return /* @__PURE__ */ jsxs9("div", { className: "ss-w-omcard", children: [
|
|
995
999
|
/* @__PURE__ */ jsxs9("div", { className: "ss-w-om-head", children: [
|
|
996
1000
|
/* @__PURE__ */ jsx12("span", { className: "ss-w-om-market", children: vm.market }),
|