courthive-components 4.2.0 → 4.3.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.
|
@@ -15274,7 +15274,7 @@ function OC(e) {
|
|
|
15274
15274
|
var kC = {
|
|
15275
15275
|
name: "courthive-components",
|
|
15276
15276
|
packageManager: "pnpm@12.3.4",
|
|
15277
|
-
version: "4.
|
|
15277
|
+
version: "4.3.0",
|
|
15278
15278
|
engines: { node: ">=22" },
|
|
15279
15279
|
description: "Components for competitions projects",
|
|
15280
15280
|
files: ["dist"],
|
|
@@ -28978,27 +28978,32 @@ function Bq(e, t, n, r) {
|
|
|
28978
28978
|
return i && n.has(i) ? Lq : i && t.has(i) || e.hasScore && e.winningSide === void 0 && (!i || !r.has(i)) ? Iq : i && r.has(i) || e.winningSide !== void 0 ? zq : Rq;
|
|
28979
28979
|
}
|
|
28980
28980
|
function Vq(e, t) {
|
|
28981
|
-
let n = t?.inProgressStatuses ?? Nq, r = t?.suspendedStatuses ?? Pq, i = t?.completedStatuses ?? Fq, a = e.cells,
|
|
28982
|
-
for (let t = 0; t <
|
|
28983
|
-
let
|
|
28984
|
-
if (!
|
|
28985
|
-
let
|
|
28986
|
-
if (
|
|
28981
|
+
let n = t?.inProgressStatuses ?? Nq, r = t?.suspendedStatuses ?? Pq, i = t?.completedStatuses ?? Fq, a = t?.dueMatchUpIds, o = e.cells, s = -1, c = -1;
|
|
28982
|
+
for (let t = 0; t < o.length; t++) {
|
|
28983
|
+
let l = o[t];
|
|
28984
|
+
if (!l) continue;
|
|
28985
|
+
let u = Bq(l, n, r, i);
|
|
28986
|
+
if (u === Iq || u === Lq) return {
|
|
28987
28987
|
courtId: e.courtId,
|
|
28988
|
-
state:
|
|
28989
|
-
matchUp:
|
|
28988
|
+
state: u,
|
|
28989
|
+
matchUp: l,
|
|
28990
28990
|
rowIndex: t
|
|
28991
28991
|
};
|
|
28992
|
-
|
|
28992
|
+
u === Rq && l.calledAt && s === -1 && (s = t), u === Rq && !l.calledAt && c === -1 && a?.has(l.matchUpId) && (c = t);
|
|
28993
28993
|
}
|
|
28994
|
-
return
|
|
28994
|
+
return s === -1 ? c === -1 ? {
|
|
28995
28995
|
courtId: e.courtId,
|
|
28996
28996
|
state: "free"
|
|
28997
|
+
} : {
|
|
28998
|
+
courtId: e.courtId,
|
|
28999
|
+
state: "due",
|
|
29000
|
+
matchUp: o[c],
|
|
29001
|
+
rowIndex: c
|
|
28997
29002
|
} : {
|
|
28998
29003
|
courtId: e.courtId,
|
|
28999
29004
|
state: "next",
|
|
29000
|
-
matchUp:
|
|
29001
|
-
rowIndex:
|
|
29005
|
+
matchUp: o[s],
|
|
29006
|
+
rowIndex: s
|
|
29002
29007
|
};
|
|
29003
29008
|
}
|
|
29004
29009
|
function Hq(e, t) {
|
|
@@ -29116,7 +29121,7 @@ function Zq(e, t, n, r, i) {
|
|
|
29116
29121
|
});
|
|
29117
29122
|
}
|
|
29118
29123
|
function Qq(e) {
|
|
29119
|
-
return e === "in-progress" ? "LIVE" : e === "suspended" ? "SUSP" : e === "next" ? "NEXT" : null;
|
|
29124
|
+
return e === "in-progress" ? "LIVE" : e === "suspended" ? "SUSP" : e === "next" ? "NEXT" : e === "due" ? "DUE" : null;
|
|
29120
29125
|
}
|
|
29121
29126
|
function $q(e, t, n, r, i) {
|
|
29122
29127
|
let a = document.createElement("div");
|
|
@@ -29141,7 +29146,7 @@ function $q(e, t, n, r, i) {
|
|
|
29141
29146
|
let o = Qq(e.state);
|
|
29142
29147
|
if (o) {
|
|
29143
29148
|
let t = document.createElement("span");
|
|
29144
|
-
t.className = "spl-active-strip-state-pill", t.textContent = o, e.state === "suspended" && (t.title = "Suspended"), a.appendChild(t);
|
|
29149
|
+
t.className = "spl-active-strip-state-pill", t.textContent = o, e.state === "suspended" && (t.title = "Suspended"), e.state === "due" && (t.title = "Should have started — not called to court"), a.appendChild(t);
|
|
29145
29150
|
}
|
|
29146
29151
|
return Zq(a, e, t, n, r.statusOptions), a;
|
|
29147
29152
|
}
|
|
@@ -29165,10 +29170,13 @@ function tJ(e = {}, t = {}) {
|
|
|
29165
29170
|
}
|
|
29166
29171
|
function a() {
|
|
29167
29172
|
n.innerHTML = "", r.gridTemplateColumns ? (n.style.display = "grid", n.style.gridTemplateColumns = r.gridTemplateColumns) : (n.style.display = "", n.style.gridTemplateColumns = ""), n.style.minWidth = r.minWidth ?? "", n.appendChild(eJ(t));
|
|
29168
|
-
let a =
|
|
29169
|
-
|
|
29170
|
-
|
|
29171
|
-
|
|
29173
|
+
let a = r.dueMatchUpIds ? {
|
|
29174
|
+
...t.statusOptions,
|
|
29175
|
+
dueMatchUpIds: new Set(r.dueMatchUpIds)
|
|
29176
|
+
} : t.statusOptions, o = Hq(r.grid, a);
|
|
29177
|
+
for (let a of o) {
|
|
29178
|
+
let o = r.courtBlocks?.[a.courtId];
|
|
29179
|
+
n.appendChild($q(a, e, i, t, o));
|
|
29172
29180
|
}
|
|
29173
29181
|
}
|
|
29174
29182
|
function o(e) {
|