courthive-components 6.0.0 → 6.0.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.
|
@@ -10,4 +10,6 @@ export type StatusCodePickerHandle = {
|
|
|
10
10
|
export declare function buildStatusCodePicker(params: {
|
|
11
11
|
groups?: StatusCodeGroups;
|
|
12
12
|
labels?: ScoringModalLabels;
|
|
13
|
+
/** The code already recorded on the matchUp, so re-opening the dialog shows what was saved. */
|
|
14
|
+
initialCode?: string;
|
|
13
15
|
}): StatusCodePickerHandle;
|
|
@@ -9717,39 +9717,39 @@ function vd(e) {
|
|
|
9717
9717
|
//#region src/components/scoring/statusCodePicker.ts
|
|
9718
9718
|
var yd = "statusCodeSelectV2";
|
|
9719
9719
|
function bd(e) {
|
|
9720
|
-
let { groups: t, labels: n = {} } = e,
|
|
9721
|
-
|
|
9722
|
-
let
|
|
9723
|
-
|
|
9724
|
-
let
|
|
9725
|
-
|
|
9726
|
-
let
|
|
9727
|
-
|
|
9728
|
-
let
|
|
9729
|
-
let e =
|
|
9730
|
-
|
|
9720
|
+
let { groups: t, labels: n = {}, initialCode: r } = e, i = document.createElement("div");
|
|
9721
|
+
i.style.display = "none", i.style.marginTop = "0.6em";
|
|
9722
|
+
let a = document.createElement("div");
|
|
9723
|
+
a.textContent = (n.reasonCode || "Reason") + ":", a.style.fontSize = "0.75rem", a.style.fontWeight = "500", a.style.marginBottom = "0.25em", a.style.color = "var(--chc-text-primary)", i.appendChild(a);
|
|
9724
|
+
let o = document.createElement("select");
|
|
9725
|
+
o.id = yd, o.className = "input", o.style.fontSize = "0.8rem", o.style.width = "100%", o.style.backgroundColor = "var(--chc-bg-primary)", o.style.color = "var(--chc-text-primary)", o.style.border = "1px solid var(--chc-border-primary)", i.appendChild(o);
|
|
9726
|
+
let s = document.createElement("div");
|
|
9727
|
+
s.style.fontSize = "0.7rem", s.style.marginTop = "0.2em", s.style.color = "var(--chc-text-secondary)", i.appendChild(s);
|
|
9728
|
+
let c = r, l = [], u = () => {
|
|
9729
|
+
let e = l.find((e) => e.matchUpStatusCode === c);
|
|
9730
|
+
s.textContent = e?.description ?? "", s.style.display = e?.description ? "block" : "none";
|
|
9731
9731
|
};
|
|
9732
|
-
return
|
|
9733
|
-
|
|
9732
|
+
return o.addEventListener("change", () => {
|
|
9733
|
+
c = o.value || void 0, u();
|
|
9734
9734
|
}), {
|
|
9735
|
-
element:
|
|
9735
|
+
element: i,
|
|
9736
9736
|
update: (e) => {
|
|
9737
|
-
if (
|
|
9738
|
-
|
|
9737
|
+
if (l = gd(t, e), !l.length) {
|
|
9738
|
+
i.style.display = "none", o.innerHTML = "", c = void 0, u();
|
|
9739
9739
|
return;
|
|
9740
9740
|
}
|
|
9741
|
-
|
|
9742
|
-
let
|
|
9743
|
-
|
|
9744
|
-
for (let e of
|
|
9741
|
+
c && !l.some((e) => e.matchUpStatusCode === c) && (c = void 0), o.innerHTML = "";
|
|
9742
|
+
let r = document.createElement("option");
|
|
9743
|
+
r.value = "", r.textContent = n.noReasonCode || "No reason given", o.appendChild(r);
|
|
9744
|
+
for (let e of l) {
|
|
9745
9745
|
let t = document.createElement("option");
|
|
9746
9746
|
t.value = e.matchUpStatusCode;
|
|
9747
9747
|
let n = vd(e);
|
|
9748
|
-
t.textContent = n ? `${_d(e)} — ${n}` : _d(e),
|
|
9748
|
+
t.textContent = n ? `${_d(e)} — ${n}` : _d(e), o.appendChild(t);
|
|
9749
9749
|
}
|
|
9750
|
-
return
|
|
9750
|
+
return o.value = c ?? "", i.style.display = "block", u(), c;
|
|
9751
9751
|
},
|
|
9752
|
-
getSelectedCode: () =>
|
|
9752
|
+
getSelectedCode: () => c
|
|
9753
9753
|
};
|
|
9754
9754
|
}
|
|
9755
9755
|
//#endregion
|
|
@@ -9767,6 +9767,7 @@ var xd = "Irregular Endings:", Sd = {
|
|
|
9767
9767
|
];
|
|
9768
9768
|
function wd(e) {
|
|
9769
9769
|
let { matchUp: t, callback: n, onClose: r, labels: i = {}, matchUpStatusCodes: a } = e, o = bd({
|
|
9770
|
+
initialCode: hd(t?.matchUpStatusCodes?.[0]),
|
|
9770
9771
|
groups: a,
|
|
9771
9772
|
labels: i
|
|
9772
9773
|
}), s = gc().scoringApproach || "dynamicSets", c = !!(t.score?.sets?.length || t.matchUpStatus), l = null, u = !1, d = (e) => {
|
|
@@ -9788,7 +9789,7 @@ function wd(e) {
|
|
|
9788
9789
|
let n = document.createElement("div");
|
|
9789
9790
|
n.style.padding = "1em";
|
|
9790
9791
|
let r = document.createElement("div");
|
|
9791
|
-
return n.appendChild(r), n.appendChild(o.element), o.update(l?.matchUpStatus), e === "freeScore" ? ld({
|
|
9792
|
+
return n.appendChild(r), n.appendChild(o.element), o.update(l?.matchUpStatus ?? t.matchUpStatus), e === "freeScore" ? ld({
|
|
9792
9793
|
matchUp: t,
|
|
9793
9794
|
container: r,
|
|
9794
9795
|
onScoreChange: d,
|
|
@@ -15555,7 +15556,7 @@ function Cw(e) {
|
|
|
15555
15556
|
var ww = {
|
|
15556
15557
|
name: "courthive-components",
|
|
15557
15558
|
packageManager: "pnpm@12.5.1",
|
|
15558
|
-
version: "6.0.
|
|
15559
|
+
version: "6.0.1",
|
|
15559
15560
|
engines: { node: ">=22" },
|
|
15560
15561
|
description: "Components for competitions projects",
|
|
15561
15562
|
files: ["dist"],
|
|
@@ -15646,7 +15647,7 @@ var ww = {
|
|
|
15646
15647
|
semver: "7.8.5",
|
|
15647
15648
|
storybook: "^10.2.17",
|
|
15648
15649
|
"tabulator-tables": "6.5.3",
|
|
15649
|
-
"tods-competition-factory": "
|
|
15650
|
+
"tods-competition-factory": "7.1.1",
|
|
15650
15651
|
typescript: "^6.0.2",
|
|
15651
15652
|
vite: "8.3.0",
|
|
15652
15653
|
"vite-plugin-dts": "^5.0.0",
|