courthive-components 6.10.1 → 6.10.3
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/dist/components/scoring/scoreEntryCard.d.ts +2 -3
- package/dist/components/scoring/types.d.ts +2 -2
- package/dist/courthive-components.es.js +52 -45
- package/dist/courthive-components.umd.js +50 -50
- package/dist/dist-D160D4O-.mjs +3374 -0
- package/dist/range-CbB5sPGX.mjs +452 -0
- package/package.json +6 -6
- package/dist/dist-DtcVkd_L.mjs +0 -2852
- package/dist/range-BLOZcKzY.mjs +0 -430
|
@@ -159,9 +159,8 @@ export type ScoreEntryCardParams = {
|
|
|
159
159
|
/**
|
|
160
160
|
* Whether a recorded outcome may be REMOVED. Only the draw knows whether a later match depends on the
|
|
161
161
|
* result, so the host reads it from the engine (the factory's `CLEAR_SCORE` matchUp action) rather than
|
|
162
|
-
* the dialog guessing. `false` disables
|
|
163
|
-
*
|
|
164
|
-
* submission the engine will refuse. Omitted, `[Clear]` behaves as it always has.
|
|
162
|
+
* the dialog guessing. `false` disables submitting an empty replacement for a recorded result.
|
|
163
|
+
* `[Clear]` still resets the entry form so the operator can type a replacement score.
|
|
165
164
|
*/
|
|
166
165
|
clearable?: boolean;
|
|
167
166
|
/** Scoped statuses refused by the factory SCORE action. */
|
|
@@ -73,8 +73,8 @@ export type ScoringModalParams = {
|
|
|
73
73
|
/**
|
|
74
74
|
* Whether a recorded outcome may be REMOVED. Only the draw knows whether a later match depends on the
|
|
75
75
|
* result, so the host reads it from the engine (the factory's `CLEAR_SCORE` matchUp action) rather than
|
|
76
|
-
* the dialog guessing. `false`
|
|
77
|
-
*
|
|
76
|
+
* the dialog guessing. `false` disables submitting an empty replacement for a recorded result.
|
|
77
|
+
* `[Clear]` still resets the entry form so the operator can type a replacement score.
|
|
78
78
|
*/
|
|
79
79
|
clearable?: boolean;
|
|
80
80
|
/** Scoped statuses refused by the factory SCORE action. Omitted preserves the unrestricted vocabulary. */
|
|
@@ -2887,7 +2887,7 @@ function ki({ value: e } = {}) {
|
|
|
2887
2887
|
//#endregion
|
|
2888
2888
|
//#region src/components/renderStructure/renderSideScore.ts
|
|
2889
2889
|
function Ai({ gameScoreOnly: e, scoreStripes: t, set: n, sideNumber: r }) {
|
|
2890
|
-
let i = r === n?.winningSide || n?.winningSide ? "loser" : void 0, a = r === 2 ? n.side2Score : n.side1Score, o = n.side2TiebreakScore !== void 0 || n.side1TiebreakScore !== void 0, s = r === 2 ? n.side2TiebreakScore : n.side1TiebreakScore, c = (a === void 0 || n.tiebreakSet === !0) && s !== void 0, l = c ? s : a, u = t && n.setNumber % 2 ? "var(--chc-bg-secondary)" : "transparent", d = n.editing ? n.editing === r : void 0, f;
|
|
2890
|
+
let i = r === n?.winningSide && "winner" || (n?.winningSide ? "loser" : void 0), a = r === 2 ? n.side2Score : n.side1Score, o = n.side2TiebreakScore !== void 0 || n.side1TiebreakScore !== void 0, s = r === 2 ? n.side2TiebreakScore : n.side1TiebreakScore, c = (a === void 0 || n.tiebreakSet === !0) && s !== void 0, l = c ? s : a, u = t && n.setNumber % 2 ? "var(--chc-bg-secondary)" : "transparent", d = n.editing ? n.editing === r : void 0, f;
|
|
2891
2891
|
if (d) f = ki({ value: l });
|
|
2892
2892
|
else if (f = document.createElement("p"), f.className = Ti({ variant: i }), f.classList.add("tmx-st"), f.setAttribute("setNumber", n.setNumber), f.style.backgroundColor = u, f.innerHTML = l != null && !Number.isNaN(Number(l)) ? l : "", !e) {
|
|
2893
2893
|
let e = document.createElement("span");
|
|
@@ -10305,6 +10305,9 @@ function rp(e) {
|
|
|
10305
10305
|
groups: a,
|
|
10306
10306
|
labels: i
|
|
10307
10307
|
}), l = Sl(i), u = Bl().scoringApproach || "dynamicSets", d = !!(t.score?.sets?.length || t.matchUpStatus), f = !!(t.winningSide || t.score?.sets?.length || t.matchUpStatus && t.matchUpStatus !== "TO_BE_PLAYED"), p = o === !1 && f, m = null, h = !1, g = !1, _ = (e) => {
|
|
10308
|
+
let t = !e.winningSide && !e.sets?.length && !e.score?.trim() && (!e.matchUpStatus || e.matchUpStatus === "TO_BE_PLAYED");
|
|
10309
|
+
return p && t ? !1 : !Cl(e.matchUpStatus, s, l) && (u === "inlineScoring" || e.isValid || h && d);
|
|
10310
|
+
}, v = (e) => {
|
|
10308
10311
|
if (g) return;
|
|
10309
10312
|
let t = Cl(e.matchUpStatus, s, l);
|
|
10310
10313
|
m = t ? {
|
|
@@ -10313,48 +10316,48 @@ function rp(e) {
|
|
|
10313
10316
|
error: t
|
|
10314
10317
|
} : e, c.update(e?.matchUpStatus), h && (e.sets?.length > 0 || e.score) && (h = !1);
|
|
10315
10318
|
let n = document.getElementById("submitScoreV2");
|
|
10316
|
-
n && (n.disabled = !(
|
|
10319
|
+
n && (n.disabled = !_(e));
|
|
10317
10320
|
let r = document.getElementById("clearScoreV2");
|
|
10318
10321
|
if (r) {
|
|
10319
10322
|
let t = document.getElementById("scoreInputV2");
|
|
10320
|
-
if (t) r.disabled = !t.value.trim();
|
|
10323
|
+
if (t) r.disabled = !t.value.trim() && !(f && !h);
|
|
10321
10324
|
else {
|
|
10322
10325
|
let t = e.sets && e.sets.length > 0, n = e.matchUpStatus && e.matchUpStatus !== "COMPLETED" && e.matchUpStatus !== "TO_BE_PLAYED";
|
|
10323
|
-
r.disabled = !(t || n);
|
|
10326
|
+
r.disabled = !(t || n || f && !h);
|
|
10324
10327
|
}
|
|
10325
10328
|
}
|
|
10326
|
-
},
|
|
10329
|
+
}, y = () => {
|
|
10327
10330
|
window.cleanupDialPad && (window.cleanupDialPad(), window.cleanupDialPad = void 0), window.resetDialPad && (window.resetDialPad = void 0), window.resetDynamicSets && (window.resetDynamicSets = void 0), window.resetInlineScoring && (window.resetInlineScoring = void 0);
|
|
10328
|
-
},
|
|
10331
|
+
}, b = (e) => {
|
|
10329
10332
|
let n = rd(t, m), r = document.createElement("div");
|
|
10330
10333
|
r.style.padding = "1em";
|
|
10331
10334
|
let a = document.createElement("div");
|
|
10332
10335
|
return r.appendChild(a), r.appendChild(c.element), r.appendChild(wl(s, l)), c.update(m?.matchUpStatus ?? t.matchUpStatus), e === "freeScore" ? Bf({
|
|
10333
10336
|
matchUp: n,
|
|
10334
10337
|
container: a,
|
|
10335
|
-
onScoreChange:
|
|
10338
|
+
onScoreChange: v,
|
|
10336
10339
|
disabledMatchUpStatuses: s,
|
|
10337
10340
|
labels: i
|
|
10338
10341
|
}) : e === "dynamicSets" ? wu({
|
|
10339
10342
|
matchUp: n,
|
|
10340
10343
|
container: a,
|
|
10341
|
-
onScoreChange:
|
|
10344
|
+
onScoreChange: v,
|
|
10342
10345
|
disabledMatchUpStatuses: s,
|
|
10343
10346
|
labels: i
|
|
10344
10347
|
}) : e === "dialPad" ? nd({
|
|
10345
10348
|
matchUp: n,
|
|
10346
10349
|
container: a,
|
|
10347
|
-
onScoreChange:
|
|
10350
|
+
onScoreChange: v,
|
|
10348
10351
|
disabledMatchUpStatuses: s,
|
|
10349
10352
|
labels: i
|
|
10350
10353
|
}) : e === "inlineScoring" && Lu({
|
|
10351
10354
|
matchUp: n,
|
|
10352
10355
|
container: a,
|
|
10353
|
-
onScoreChange:
|
|
10356
|
+
onScoreChange: v,
|
|
10354
10357
|
disabledMatchUpStatuses: s,
|
|
10355
10358
|
labels: i
|
|
10356
10359
|
}), r;
|
|
10357
|
-
},
|
|
10360
|
+
}, x = {
|
|
10358
10361
|
freeScore: `
|
|
10359
10362
|
<strong>${i.scoreTips || "Score Entry Tips:"}</strong><br><br>
|
|
10360
10363
|
<strong>${i.setScores || "Set Scores:"}</strong> Space or dash-separated (e.g., "6-4 6-3")<br><br>
|
|
@@ -10383,34 +10386,34 @@ function rp(e) {
|
|
|
10383
10386
|
<strong>${i.irregularEndings || ep}</strong> Retired, Walkover, Default available for irregular endings.
|
|
10384
10387
|
`,
|
|
10385
10388
|
inlineScoring: "\n <strong>Inline Scoring:</strong><br><br>\n Click on <strong>game scores</strong> to add a game for that side.<br><br>\n Click on <strong>point scores</strong> to award a point.<br><br>\n Use the <strong>LIVE</strong> pill to set an irregular ending (Retired, Walkover, etc.).<br><br>\n <strong>Undo/Redo/Clear</strong> buttons control scoring history.\n "
|
|
10386
|
-
},
|
|
10389
|
+
}, S = () => np.map((e) => ({
|
|
10387
10390
|
label: tp[e],
|
|
10388
10391
|
active: e === u,
|
|
10389
|
-
onClick: () =>
|
|
10390
|
-
})),
|
|
10391
|
-
info:
|
|
10392
|
-
menu: { menuItems:
|
|
10392
|
+
onClick: () => E(e)
|
|
10393
|
+
})), C = () => ({
|
|
10394
|
+
info: x[u],
|
|
10395
|
+
menu: { menuItems: S() },
|
|
10393
10396
|
clickAway: !1
|
|
10394
|
-
}),
|
|
10397
|
+
}), w = () => {
|
|
10395
10398
|
setTimeout(() => {
|
|
10396
10399
|
if (g) return;
|
|
10397
10400
|
let e = document.getElementById("clearScoreV2");
|
|
10398
|
-
e && (e.style.backgroundColor = "var(--chc-clear-btn-bg)", e.style.color = "var(--chc-clear-btn-text)", d && (e.disabled = !1)), m &&
|
|
10401
|
+
e && (e.style.backgroundColor = "var(--chc-clear-btn-bg)", e.style.color = "var(--chc-clear-btn-text)", d && (e.disabled = !1)), m && v(m);
|
|
10399
10402
|
}, 0);
|
|
10400
|
-
},
|
|
10401
|
-
e !== u && (
|
|
10402
|
-
content:
|
|
10403
|
-
config:
|
|
10404
|
-
}),
|
|
10403
|
+
}, T, E = (e) => {
|
|
10404
|
+
e !== u && (y(), h = !1, u = e, Vl({ scoringApproach: e }), T && (T.update({
|
|
10405
|
+
content: b(e),
|
|
10406
|
+
config: C()
|
|
10407
|
+
}), w()));
|
|
10405
10408
|
};
|
|
10406
|
-
|
|
10409
|
+
T = Te.open({
|
|
10407
10410
|
title: i.title || "Score Entry",
|
|
10408
|
-
content:
|
|
10409
|
-
config:
|
|
10411
|
+
content: b(u),
|
|
10412
|
+
config: C(),
|
|
10410
10413
|
buttons: [
|
|
10411
10414
|
{
|
|
10412
10415
|
onClick: () => {
|
|
10413
|
-
|
|
10416
|
+
y();
|
|
10414
10417
|
},
|
|
10415
10418
|
label: i.cancel || "Cancel",
|
|
10416
10419
|
intent: "none",
|
|
@@ -10439,8 +10442,8 @@ function rp(e) {
|
|
|
10439
10442
|
intent: "is-primary",
|
|
10440
10443
|
disabled: u !== "inlineScoring",
|
|
10441
10444
|
onClick: () => {
|
|
10442
|
-
if (m &&
|
|
10443
|
-
|
|
10445
|
+
if (m && _(m)) {
|
|
10446
|
+
y();
|
|
10444
10447
|
let e = c.getSelectedCode();
|
|
10445
10448
|
n(e ? {
|
|
10446
10449
|
...m,
|
|
@@ -10450,11 +10453,11 @@ function rp(e) {
|
|
|
10450
10453
|
},
|
|
10451
10454
|
close: !0
|
|
10452
10455
|
}
|
|
10453
|
-
]
|
|
10456
|
+
],
|
|
10454
10457
|
onClose: () => {
|
|
10455
10458
|
g = !0, r?.();
|
|
10456
10459
|
}
|
|
10457
|
-
}),
|
|
10460
|
+
}), w();
|
|
10458
10461
|
}
|
|
10459
10462
|
//#endregion
|
|
10460
10463
|
//#region src/components/scoring/regions/setColumns.ts
|
|
@@ -11764,7 +11767,7 @@ function Xm(e) {
|
|
|
11764
11767
|
}
|
|
11765
11768
|
//#endregion
|
|
11766
11769
|
//#region src/components/scoring/scoreEntryCard.ts
|
|
11767
|
-
var { RETIRED: Zm, WALKOVER: Qm, DEFAULTED: $m, IN_PROGRESS: eh, CANCELLED: th, AWAITING_RESULT: nh, SUSPENDED: rh } = h, ih = "chc-sec-btn", ah = "chc-sec-btn chc-sec-btn-pill", oh = "chc-sec-check", sh = "chc-sec-other-menu", ch = "chc-sec-other-item", lh = "aria-label", uh = "chc-sec-spacer", dh = "Other…", fh = "Other", ph = "chc-sec-band-headline", mh = "chc-sec-band-detail", hh = "The recorded result will be removed — Submit to clear it.", gh = "
|
|
11770
|
+
var { RETIRED: Zm, WALKOVER: Qm, DEFAULTED: $m, IN_PROGRESS: eh, CANCELLED: th, AWAITING_RESULT: nh, SUSPENDED: rh } = h, ih = "chc-sec-btn", ah = "chc-sec-btn chc-sec-btn-pill", oh = "chc-sec-check", sh = "chc-sec-other-menu", ch = "chc-sec-other-item", lh = "aria-label", uh = "chc-sec-spacer", dh = "Other…", fh = "Other", ph = "chc-sec-band-headline", mh = "chc-sec-band-detail", hh = "The recorded result will be removed — Submit to clear it.", gh = "Enter a replacement score: a later match depends on this result.", _h = "aria-pressed", vh = "aria-expanded", yh = "M20 6 9 17l-5-5", bh = 62, xh = 6, Sh = "(width <= 560px)";
|
|
11768
11771
|
function Ch() {
|
|
11769
11772
|
return globalThis.matchMedia?.(Sh).matches ?? !1;
|
|
11770
11773
|
}
|
|
@@ -11861,10 +11864,10 @@ function kh(e) {
|
|
|
11861
11864
|
}
|
|
11862
11865
|
function j() {
|
|
11863
11866
|
let r = q("chc-sec-footer"), i = Mh("Cancel", ih);
|
|
11864
|
-
return i.dataset.action = "cancel", i.addEventListener("click", () => e.onCancel?.()), C.dataset.action = "clear",
|
|
11867
|
+
return i.dataset.action = "cancel", i.addEventListener("click", () => e.onCancel?.()), C.dataset.action = "clear", C.addEventListener("click", () => {
|
|
11865
11868
|
a.set(Mp(M())), n.clear?.(), d = void 0, f = !1, l = !0, e.onClear?.(), L(), n.focusFirst?.();
|
|
11866
11869
|
}), S.dataset.action = "submit", S.addEventListener("click", () => {
|
|
11867
|
-
if (Cl(oe().matchUpStatus, e.disabledMatchUpStatuses, t)) return;
|
|
11870
|
+
if (c && !ue() || Cl(oe().matchUpStatus, e.disabledMatchUpStatuses, t)) return;
|
|
11868
11871
|
if (ce()) {
|
|
11869
11872
|
e.onSubmit?.({ cleared: !0 });
|
|
11870
11873
|
return;
|
|
@@ -11987,7 +11990,7 @@ function kh(e) {
|
|
|
11987
11990
|
function le() {
|
|
11988
11991
|
R(), ne();
|
|
11989
11992
|
let e = oe();
|
|
11990
|
-
Ce(e), S.disabled = !!I() || !(ce() || e.isValid || !e.hasEnding && F()), C.disabled = !ue()
|
|
11993
|
+
Ce(e), S.disabled = c && !ue() || !!I() || !(ce() || e.isValid || !e.hasEnding && F()), C.disabled = !ue(), S.title = c && !ue() ? t.clearRefused ?? gh : "";
|
|
11991
11994
|
}
|
|
11992
11995
|
function ue() {
|
|
11993
11996
|
let e = N();
|
|
@@ -12149,6 +12152,10 @@ function kh(e) {
|
|
|
12149
12152
|
b.replaceChildren(), b.dataset.tone = "warn", b.setAttribute("role", "status"), b.append(Ah(ph, r)), we(!0);
|
|
12150
12153
|
return;
|
|
12151
12154
|
}
|
|
12155
|
+
if (c && !ue()) {
|
|
12156
|
+
b.replaceChildren(), b.dataset.tone = "warn", b.setAttribute("role", "status"), b.append(Ah(ph, t.clearRefused ?? gh)), we(!0);
|
|
12157
|
+
return;
|
|
12158
|
+
}
|
|
12152
12159
|
if (ce()) {
|
|
12153
12160
|
b.replaceChildren(), b.dataset.tone = "warn", b.setAttribute("role", "status"), b.append(Ah(ph, t.clearedHeadline ?? hh)), we(!0);
|
|
12154
12161
|
return;
|
|
@@ -18025,8 +18032,8 @@ function RO(e) {
|
|
|
18025
18032
|
}
|
|
18026
18033
|
var zO = {
|
|
18027
18034
|
name: "courthive-components",
|
|
18028
|
-
packageManager: "pnpm@12.
|
|
18029
|
-
version: "6.10.
|
|
18035
|
+
packageManager: "pnpm@12.14.0",
|
|
18036
|
+
version: "6.10.3",
|
|
18030
18037
|
engines: { node: ">=22" },
|
|
18031
18038
|
description: "Components for competitions projects",
|
|
18032
18039
|
files: ["dist"],
|
|
@@ -18109,13 +18116,13 @@ var zO = {
|
|
|
18109
18116
|
"@types/d3": "^7.4.3",
|
|
18110
18117
|
"@types/leaflet": "^1.9.12",
|
|
18111
18118
|
"@types/vanillajs-datepicker": "^1.3.5",
|
|
18112
|
-
"@typescript-eslint/eslint-plugin": "8.71.
|
|
18113
|
-
"@typescript-eslint/parser": "8.71.
|
|
18119
|
+
"@typescript-eslint/eslint-plugin": "8.71.2",
|
|
18120
|
+
"@typescript-eslint/parser": "8.71.2",
|
|
18114
18121
|
"@vitest/browser": "^5.0.3",
|
|
18115
18122
|
"@vitest/browser-playwright": "^5.0.3",
|
|
18116
18123
|
"@vitest/coverage-v8": "^5.0.0",
|
|
18117
18124
|
"@vitest/ui": "^5.0.0",
|
|
18118
|
-
eslint: "10.
|
|
18125
|
+
eslint: "10.13.0",
|
|
18119
18126
|
"eslint-plugin-sonarjs": "4.2.2",
|
|
18120
18127
|
"eslint-plugin-storybook": "^10.2.17",
|
|
18121
18128
|
"gh-pages": "6.3.0",
|
|
@@ -18129,7 +18136,7 @@ var zO = {
|
|
|
18129
18136
|
semver: "7.8.5",
|
|
18130
18137
|
storybook: "^10.2.17",
|
|
18131
18138
|
"tabulator-tables": "6.6.1",
|
|
18132
|
-
"tods-competition-factory": "7.
|
|
18139
|
+
"tods-competition-factory": "7.18.0",
|
|
18133
18140
|
typescript: "^6.0.2",
|
|
18134
18141
|
vite: "8.3.4",
|
|
18135
18142
|
"vite-plugin-dts": "^5.0.0",
|
|
@@ -26221,8 +26228,8 @@ var XK = class {
|
|
|
26221
26228
|
}, ZK, QK, $K, eq = !1;
|
|
26222
26229
|
async function tq() {
|
|
26223
26230
|
if (!ZK) {
|
|
26224
|
-
let e = await import("./dist-
|
|
26225
|
-
ZK = e.TimepickerUI, QK = e.PluginRegistry, $K = (await import("./range-
|
|
26231
|
+
let e = await import("./dist-D160D4O-.mjs");
|
|
26232
|
+
ZK = e.TimepickerUI, QK = e.PluginRegistry, $K = (await import("./range-CbB5sPGX.mjs")).RangePlugin, !eq && QK && $K && (QK.register($K), eq = !0);
|
|
26226
26233
|
}
|
|
26227
26234
|
}
|
|
26228
26235
|
var nq = class {
|
|
@@ -27927,8 +27934,8 @@ var { BLOCK_TYPES: zq } = t, Bq = class {
|
|
|
27927
27934
|
}, Vq, Hq, Uq, Wq = !1;
|
|
27928
27935
|
async function Gq() {
|
|
27929
27936
|
if (!Vq) {
|
|
27930
|
-
let e = await import("./dist-
|
|
27931
|
-
Vq = e.TimepickerUI, Hq = e.PluginRegistry, Uq = (await import("./range-
|
|
27937
|
+
let e = await import("./dist-D160D4O-.mjs");
|
|
27938
|
+
Vq = e.TimepickerUI, Hq = e.PluginRegistry, Uq = (await import("./range-CbB5sPGX.mjs")).RangePlugin, !Wq && Hq && Uq && (Hq.register(Uq), Wq = !0);
|
|
27932
27939
|
}
|
|
27933
27940
|
}
|
|
27934
27941
|
var Kq = 0;
|