@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.23
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/actions/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +17 -16
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPreviewPanel.js +25 -24
- package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +110 -94
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/scorecard/ScorecardPanel.js +271 -257
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +603 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +37 -12
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +11 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +264 -250
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +124 -113
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +139 -126
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +78 -67
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,19 +3,21 @@ import { LoadingState as o } from "../shared/LoadingState.js";
|
|
|
3
3
|
import { ErrorState as s } from "../shared/ErrorState.js";
|
|
4
4
|
import { Card as c } from "../shared/Card.js";
|
|
5
5
|
import "../shared/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
6
|
+
import { EntityShareButton as ee } from "../sharing/EntityShareButton.js";
|
|
7
|
+
import "../sharing/index.js";
|
|
8
|
+
import { DIRECTION_OPTIONS as te, METRIC_TYPE_OPTIONS as ne, STATUS_OPTIONS as re, deriveStatus as ie, statusConfig as l } from "./scorecardConstants.js";
|
|
9
|
+
import { ScorecardEmptyState as u } from "./ScorecardEmptyState.js";
|
|
8
10
|
import { ScorecardsOverviewPanel as ae } from "./ScorecardsOverviewPanel.js";
|
|
9
11
|
import { MetricTrend as oe } from "./MetricTrend.js";
|
|
10
|
-
import { useCallback as
|
|
12
|
+
import { useCallback as d, useEffect as se, useState as f } from "react";
|
|
11
13
|
import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
-
import { Info as le, Pencil as ue, Plus as
|
|
13
|
-
import { useActiveContext as
|
|
14
|
-
import { AnimatePresence as
|
|
15
|
-
import { Fragment as
|
|
16
|
-
import { MotionItem as
|
|
14
|
+
import { Info as le, Pencil as ue, Plus as de, RefreshCw as fe, Trash2 as pe, TrendingUp as me } from "lucide-react";
|
|
15
|
+
import { useActiveContext as he } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
16
|
+
import { AnimatePresence as p, motion as m } from "framer-motion";
|
|
17
|
+
import { Fragment as ge, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
18
|
+
import { MotionItem as _e, MotionList as ve } from "@burdenoff/fe-libs/shared/motion";
|
|
17
19
|
//#region src/components/scorecard/ScorecardPanel.tsx
|
|
18
|
-
var
|
|
20
|
+
var _ = {
|
|
19
21
|
name: "",
|
|
20
22
|
description: "",
|
|
21
23
|
type: "CUSTOM",
|
|
@@ -28,27 +30,27 @@ var v = {
|
|
|
28
30
|
remediation: "",
|
|
29
31
|
iframeUrl: "",
|
|
30
32
|
iframeHeight: ""
|
|
31
|
-
},
|
|
32
|
-
let { t:
|
|
33
|
-
let n =
|
|
33
|
+
}, v = "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary outline-none focus:border-action-primary-bg", y = ({ ownerType: y, ownerId: b, onAddMetric: x }) => {
|
|
34
|
+
let { t: S } = ce(), C = d((e, t) => {
|
|
35
|
+
let n = S(e);
|
|
34
36
|
return n === e ? t : n;
|
|
35
|
-
}, [
|
|
37
|
+
}, [S]), { workspaceId: ye } = he(), [be, w] = f(null), [xe, T] = f(!1), [E, D] = f(null), [O, k] = f(null), [A, j] = f(null), [M, N] = f(_), [P, F] = f(null), [Se, I] = f(null), { data: Ce, loading: L, error: R, refetch: z } = n({
|
|
36
38
|
variables: {
|
|
37
|
-
ownerType:
|
|
38
|
-
ownerId:
|
|
39
|
+
ownerType: y,
|
|
40
|
+
ownerId: b
|
|
39
41
|
},
|
|
40
|
-
skip: !
|
|
42
|
+
skip: !b,
|
|
41
43
|
fetchPolicy: "cache-and-network"
|
|
42
|
-
}), [
|
|
43
|
-
|
|
44
|
+
}), [we, { loading: Te }] = a(), [Ee, { loading: De }] = e(), [Oe, { loading: ke }] = i(), [Ae, { loading: B }] = r(), [je] = t(), V = Ce?.vibecontrolsScorecard ?? null, H = Te || De || ke, U = E !== null, W = () => {
|
|
45
|
+
N(_), F(null), D(null);
|
|
44
46
|
}, G = () => {
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
+
if (x) {
|
|
48
|
+
x();
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
|
-
W(),
|
|
50
|
-
},
|
|
51
|
-
e.stopPropagation(),
|
|
51
|
+
W(), T(!0);
|
|
52
|
+
}, Me = (e, t) => {
|
|
53
|
+
e.stopPropagation(), N({
|
|
52
54
|
name: t.name,
|
|
53
55
|
description: t.description ?? "",
|
|
54
56
|
type: t.type,
|
|
@@ -61,35 +63,35 @@ var v = {
|
|
|
61
63
|
remediation: t.remediation ?? "",
|
|
62
64
|
iframeUrl: t.iframeUrl ?? "",
|
|
63
65
|
iframeHeight: t.iframeHeight !== null && t.iframeHeight !== void 0 ? String(t.iframeHeight) : ""
|
|
64
|
-
}),
|
|
65
|
-
},
|
|
66
|
-
e.stopPropagation(),
|
|
66
|
+
}), F(null), D(t.id), T(!0);
|
|
67
|
+
}, Ne = (e, t) => {
|
|
68
|
+
e.stopPropagation(), j(null), k({
|
|
67
69
|
id: t.id,
|
|
68
70
|
name: t.name
|
|
69
71
|
});
|
|
70
72
|
}, K = () => {
|
|
71
|
-
H || (
|
|
72
|
-
}, q =
|
|
73
|
-
B || (
|
|
73
|
+
H || (T(!1), W());
|
|
74
|
+
}, q = d(() => {
|
|
75
|
+
B || (k(null), j(null));
|
|
74
76
|
}, [B]);
|
|
75
77
|
se(() => {
|
|
76
|
-
if (!
|
|
78
|
+
if (!O) return;
|
|
77
79
|
let e = (e) => {
|
|
78
80
|
e.key === "Escape" && q();
|
|
79
81
|
};
|
|
80
82
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
81
|
-
}, [
|
|
82
|
-
let
|
|
83
|
-
if (
|
|
84
|
-
|
|
83
|
+
}, [O, q]);
|
|
84
|
+
let Pe = async () => {
|
|
85
|
+
if (O) {
|
|
86
|
+
j(null);
|
|
85
87
|
try {
|
|
86
|
-
await
|
|
88
|
+
await Ae({ variables: { id: O.id } }), await z(), k(null);
|
|
87
89
|
} catch (e) {
|
|
88
|
-
|
|
90
|
+
j(e instanceof Error ? e.message : "Failed to remove metric");
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
}, J = (e, t) => {
|
|
92
|
-
|
|
94
|
+
N((n) => ({
|
|
93
95
|
...n,
|
|
94
96
|
[e]: t
|
|
95
97
|
}));
|
|
@@ -99,65 +101,65 @@ var v = {
|
|
|
99
101
|
let r = Number(n);
|
|
100
102
|
if (!Number.isFinite(r)) throw Error(`${t} must be a valid number`);
|
|
101
103
|
return r;
|
|
102
|
-
},
|
|
104
|
+
}, Fe = async () => {
|
|
103
105
|
if (V?.id) return V.id;
|
|
104
|
-
let e = (await
|
|
105
|
-
ownerType:
|
|
106
|
-
ownerId:
|
|
106
|
+
let e = (await we({ variables: { input: {
|
|
107
|
+
ownerType: y,
|
|
108
|
+
ownerId: b
|
|
107
109
|
} } })).data?.upsertVibecontrolsScorecard.id;
|
|
108
|
-
if (!e) throw Error(
|
|
110
|
+
if (!e) throw Error(C("scorecard.scorecardCreateFailed", "Unable to create scorecard"));
|
|
109
111
|
return e;
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
+
}, Ie = async (e) => {
|
|
113
|
+
I(e);
|
|
112
114
|
try {
|
|
113
|
-
await
|
|
115
|
+
await je({ variables: {
|
|
114
116
|
templateId: e,
|
|
115
|
-
ownerType:
|
|
116
|
-
ownerId:
|
|
117
|
+
ownerType: y,
|
|
118
|
+
ownerId: b
|
|
117
119
|
} }), await z();
|
|
118
120
|
} finally {
|
|
119
|
-
|
|
121
|
+
I(null);
|
|
120
122
|
}
|
|
121
|
-
},
|
|
122
|
-
e.preventDefault(),
|
|
123
|
-
let t =
|
|
123
|
+
}, Le = async (e) => {
|
|
124
|
+
e.preventDefault(), F(null);
|
|
125
|
+
let t = M.name.trim();
|
|
124
126
|
if (!t) {
|
|
125
|
-
|
|
127
|
+
F(C("scorecard.metricNameRequired", "Metric name is required"));
|
|
126
128
|
return;
|
|
127
129
|
}
|
|
128
|
-
let n =
|
|
130
|
+
let n = M.statusMode === "AUTO" ? void 0 : M.statusMode;
|
|
129
131
|
try {
|
|
130
132
|
let e = {
|
|
131
133
|
name: t,
|
|
132
|
-
description:
|
|
133
|
-
type:
|
|
134
|
-
value: Y(
|
|
135
|
-
threshold: Y(
|
|
136
|
-
unit:
|
|
137
|
-
direction:
|
|
138
|
-
weight: Y(
|
|
134
|
+
description: M.description.trim() || null,
|
|
135
|
+
type: M.type,
|
|
136
|
+
value: Y(M.value, C("scorecard.value", "Value")) ?? null,
|
|
137
|
+
threshold: Y(M.threshold, C("scorecard.threshold", "Threshold")) ?? null,
|
|
138
|
+
unit: M.unit.trim() || null,
|
|
139
|
+
direction: M.direction,
|
|
140
|
+
weight: Y(M.weight, C("scorecard.weight", "Weight")) ?? 1,
|
|
139
141
|
status: n ?? null,
|
|
140
|
-
remediation:
|
|
141
|
-
iframeUrl:
|
|
142
|
-
iframeHeight: Y(
|
|
142
|
+
remediation: M.remediation.trim() || null,
|
|
143
|
+
iframeUrl: M.iframeUrl.trim() || null,
|
|
144
|
+
iframeHeight: Y(M.iframeHeight, C("scorecard.iframeHeight", "Iframe height")) ?? null
|
|
143
145
|
};
|
|
144
|
-
|
|
145
|
-
id:
|
|
146
|
+
E ? await Oe({ variables: {
|
|
147
|
+
id: E,
|
|
146
148
|
input: e
|
|
147
|
-
} }) : await
|
|
148
|
-
scorecardId: await
|
|
149
|
+
} }) : await Ee({ variables: {
|
|
150
|
+
scorecardId: await Fe(),
|
|
149
151
|
input: e
|
|
150
|
-
} }), await z(),
|
|
152
|
+
} }), await z(), T(!1), W();
|
|
151
153
|
} catch (e) {
|
|
152
|
-
|
|
154
|
+
F(e instanceof Error ? e.message : E ? "Failed to update metric" : "Failed to add metric");
|
|
153
155
|
}
|
|
154
|
-
},
|
|
156
|
+
}, Re = M.statusMode === "AUTO" ? ie(M.value.trim() ? Number(M.value) : null, M.threshold.trim() ? Number(M.threshold) : null, M.direction) : M.statusMode, X = () => /* @__PURE__ */ h(p, { children: O && /* @__PURE__ */ h(m.div, {
|
|
155
157
|
initial: { opacity: 0 },
|
|
156
158
|
animate: { opacity: 1 },
|
|
157
159
|
exit: { opacity: 0 },
|
|
158
160
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4",
|
|
159
161
|
onClick: q,
|
|
160
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ g(m.div, {
|
|
161
163
|
initial: {
|
|
162
164
|
scale: .96,
|
|
163
165
|
y: 12
|
|
@@ -176,54 +178,54 @@ var v = {
|
|
|
176
178
|
"aria-modal": "true",
|
|
177
179
|
"aria-labelledby": "scorecard-delete-title",
|
|
178
180
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ g("div", {
|
|
180
182
|
className: "border-b border-border-default px-5 py-4",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
182
184
|
id: "scorecard-delete-title",
|
|
183
185
|
className: "text-lg font-semibold text-text-primary",
|
|
184
|
-
children:
|
|
185
|
-
}), /* @__PURE__ */
|
|
186
|
+
children: C("scorecard.removeMetricTitle", "Remove metric")
|
|
187
|
+
}), /* @__PURE__ */ h("p", {
|
|
186
188
|
className: "mt-1 text-sm text-text-secondary",
|
|
187
|
-
children:
|
|
189
|
+
children: C("scorecard.removeMetricConfirm", "Are you sure you want to remove this metric? This cannot be undone.")
|
|
188
190
|
})]
|
|
189
191
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ g("div", {
|
|
191
193
|
className: "px-5 py-4 text-sm text-text-primary",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ h("p", {
|
|
193
195
|
className: "font-medium",
|
|
194
|
-
children:
|
|
195
|
-
}),
|
|
196
|
+
children: O.name
|
|
197
|
+
}), A && /* @__PURE__ */ h("p", {
|
|
196
198
|
className: "mt-3 rounded-md border border-status-error-border bg-status-error-bg px-3 py-2 text-sm text-status-error-text",
|
|
197
|
-
children:
|
|
199
|
+
children: A
|
|
198
200
|
})]
|
|
199
201
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ g("div", {
|
|
201
203
|
className: "flex items-center justify-end gap-3 border-t border-border-default px-5 py-4",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ h("button", {
|
|
203
205
|
type: "button",
|
|
204
206
|
onClick: q,
|
|
205
207
|
disabled: B,
|
|
206
208
|
className: "rounded-md border border-border-default px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60",
|
|
207
|
-
children:
|
|
208
|
-
}), /* @__PURE__ */
|
|
209
|
+
children: C("common.cancel", "Cancel")
|
|
210
|
+
}), /* @__PURE__ */ h("button", {
|
|
209
211
|
type: "button",
|
|
210
|
-
onClick:
|
|
212
|
+
onClick: Pe,
|
|
211
213
|
disabled: B,
|
|
212
214
|
className: "rounded-md bg-status-error-bg px-4 py-2 text-sm text-status-error-text hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
|
|
213
|
-
children: B ?
|
|
215
|
+
children: B ? C("scorecard.removingMetric", "Removing...") : C("scorecard.removeMetric", "Remove metric")
|
|
214
216
|
})]
|
|
215
217
|
})
|
|
216
218
|
]
|
|
217
219
|
})
|
|
218
220
|
}) }), Z = () => {
|
|
219
|
-
let e = l[
|
|
220
|
-
return /* @__PURE__ */
|
|
221
|
+
let e = l[Re] ?? l.UNKNOWN;
|
|
222
|
+
return /* @__PURE__ */ h(p, { children: xe && /* @__PURE__ */ h(m.div, {
|
|
221
223
|
initial: { opacity: 0 },
|
|
222
224
|
animate: { opacity: 1 },
|
|
223
225
|
exit: { opacity: 0 },
|
|
224
226
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-overlay p-4",
|
|
225
227
|
onClick: K,
|
|
226
|
-
children: /* @__PURE__ */
|
|
228
|
+
children: /* @__PURE__ */ h(m.div, {
|
|
227
229
|
initial: {
|
|
228
230
|
scale: .96,
|
|
229
231
|
y: 12
|
|
@@ -238,226 +240,226 @@ var v = {
|
|
|
238
240
|
},
|
|
239
241
|
className: "w-full max-w-2xl rounded-xl border border-border-default bg-bg-surface shadow-xl",
|
|
240
242
|
onClick: (e) => e.stopPropagation(),
|
|
241
|
-
children: /* @__PURE__ */
|
|
242
|
-
onSubmit:
|
|
243
|
+
children: /* @__PURE__ */ g("form", {
|
|
244
|
+
onSubmit: Le,
|
|
243
245
|
className: "flex max-h-[85vh] flex-col",
|
|
244
246
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ g("div", {
|
|
246
248
|
className: "border-b border-border-default px-5 py-4",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
248
250
|
className: "text-lg font-semibold text-text-primary",
|
|
249
|
-
children: U ?
|
|
250
|
-
}), /* @__PURE__ */
|
|
251
|
+
children: U ? C("scorecard.editMetricTitle", "Edit scorecard metric") : C("scorecard.addMetricTitle", "Add scorecard metric")
|
|
252
|
+
}), /* @__PURE__ */ h("p", {
|
|
251
253
|
className: "mt-1 text-sm text-text-secondary",
|
|
252
|
-
children:
|
|
254
|
+
children: C("scorecard.addMetricDescription", "Define a metric. Status is derived from value vs threshold unless you pin it.")
|
|
253
255
|
})]
|
|
254
256
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ g("div", {
|
|
256
258
|
className: "space-y-4 overflow-y-auto px-5 py-4",
|
|
257
259
|
children: [
|
|
258
|
-
|
|
260
|
+
P && /* @__PURE__ */ h("div", {
|
|
259
261
|
className: "rounded-md border border-status-error-border bg-status-error-bg px-3 py-2 text-sm text-status-error-text",
|
|
260
|
-
children:
|
|
262
|
+
children: P
|
|
261
263
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ g("label", {
|
|
263
265
|
className: "block space-y-1.5",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ h("span", {
|
|
265
267
|
className: "text-sm font-medium text-text-primary",
|
|
266
|
-
children:
|
|
267
|
-
}), /* @__PURE__ */
|
|
268
|
+
children: C("scorecard.metricName", "Metric name")
|
|
269
|
+
}), /* @__PURE__ */ h("input", {
|
|
268
270
|
"aria-label": "control",
|
|
269
|
-
value:
|
|
271
|
+
value: M.name,
|
|
270
272
|
onChange: (e) => J("name", e.target.value),
|
|
271
|
-
className:
|
|
272
|
-
placeholder:
|
|
273
|
+
className: v,
|
|
274
|
+
placeholder: C("scorecard.metricNamePlaceholder", "Test coverage")
|
|
273
275
|
})]
|
|
274
276
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ g("label", {
|
|
276
278
|
className: "block space-y-1.5",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ h("span", {
|
|
278
280
|
className: "text-sm font-medium text-text-primary",
|
|
279
|
-
children:
|
|
280
|
-
}), /* @__PURE__ */
|
|
281
|
+
children: C("scorecard.metricDescription", "Description")
|
|
282
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
281
283
|
"aria-label": "control",
|
|
282
|
-
value:
|
|
284
|
+
value: M.description,
|
|
283
285
|
onChange: (e) => J("description", e.target.value),
|
|
284
|
-
className: `min-h-16 ${
|
|
285
|
-
placeholder:
|
|
286
|
+
className: `min-h-16 ${v}`,
|
|
287
|
+
placeholder: C("scorecard.metricDescriptionPlaceholder", "Explain what this metric measures")
|
|
286
288
|
})]
|
|
287
289
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ g("div", {
|
|
289
291
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ g("label", {
|
|
291
293
|
className: "block space-y-1.5",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ h("span", {
|
|
293
295
|
className: "text-sm font-medium text-text-primary",
|
|
294
|
-
children:
|
|
295
|
-
}), /* @__PURE__ */
|
|
296
|
-
value:
|
|
296
|
+
children: C("scorecard.metricType", "Type")
|
|
297
|
+
}), /* @__PURE__ */ h("select", {
|
|
298
|
+
value: M.type,
|
|
297
299
|
onChange: (e) => J("type", e.target.value),
|
|
298
|
-
className:
|
|
299
|
-
children:
|
|
300
|
+
className: v,
|
|
301
|
+
children: ne.map((e) => /* @__PURE__ */ h("option", {
|
|
300
302
|
value: e.value,
|
|
301
303
|
children: e.label
|
|
302
304
|
}, e.value))
|
|
303
305
|
})]
|
|
304
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ g("label", {
|
|
305
307
|
className: "block space-y-1.5",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ h("span", {
|
|
307
309
|
className: "text-sm font-medium text-text-primary",
|
|
308
|
-
children:
|
|
309
|
-
}), /* @__PURE__ */
|
|
310
|
-
value:
|
|
310
|
+
children: C("scorecard.metricDirection", "Direction")
|
|
311
|
+
}), /* @__PURE__ */ h("select", {
|
|
312
|
+
value: M.direction,
|
|
311
313
|
onChange: (e) => J("direction", e.target.value),
|
|
312
|
-
className:
|
|
313
|
-
children:
|
|
314
|
+
className: v,
|
|
315
|
+
children: te.map((e) => /* @__PURE__ */ h("option", {
|
|
314
316
|
value: e.value,
|
|
315
317
|
children: e.label
|
|
316
318
|
}, e.value))
|
|
317
319
|
})]
|
|
318
320
|
})]
|
|
319
321
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ g("div", {
|
|
321
323
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-4",
|
|
322
324
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ g("label", {
|
|
324
326
|
className: "block space-y-1.5",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ h("span", {
|
|
326
328
|
className: "text-sm font-medium text-text-primary",
|
|
327
|
-
children:
|
|
328
|
-
}), /* @__PURE__ */
|
|
329
|
+
children: C("scorecard.value", "Value")
|
|
330
|
+
}), /* @__PURE__ */ h("input", {
|
|
329
331
|
"aria-label": "value",
|
|
330
|
-
value:
|
|
332
|
+
value: M.value,
|
|
331
333
|
onChange: (e) => J("value", e.target.value),
|
|
332
334
|
inputMode: "decimal",
|
|
333
|
-
className:
|
|
335
|
+
className: v,
|
|
334
336
|
placeholder: "86"
|
|
335
337
|
})]
|
|
336
338
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ g("label", {
|
|
338
340
|
className: "block space-y-1.5",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ h("span", {
|
|
340
342
|
className: "text-sm font-medium text-text-primary",
|
|
341
|
-
children:
|
|
342
|
-
}), /* @__PURE__ */
|
|
343
|
+
children: C("scorecard.threshold", "Threshold")
|
|
344
|
+
}), /* @__PURE__ */ h("input", {
|
|
343
345
|
"aria-label": "threshold",
|
|
344
|
-
value:
|
|
346
|
+
value: M.threshold,
|
|
345
347
|
onChange: (e) => J("threshold", e.target.value),
|
|
346
348
|
inputMode: "decimal",
|
|
347
|
-
className:
|
|
349
|
+
className: v,
|
|
348
350
|
placeholder: "80"
|
|
349
351
|
})]
|
|
350
352
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ g("label", {
|
|
352
354
|
className: "block space-y-1.5",
|
|
353
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ h("span", {
|
|
354
356
|
className: "text-sm font-medium text-text-primary",
|
|
355
|
-
children:
|
|
356
|
-
}), /* @__PURE__ */
|
|
357
|
+
children: C("scorecard.unit", "Unit")
|
|
358
|
+
}), /* @__PURE__ */ h("input", {
|
|
357
359
|
"aria-label": "unit",
|
|
358
|
-
value:
|
|
360
|
+
value: M.unit,
|
|
359
361
|
onChange: (e) => J("unit", e.target.value),
|
|
360
|
-
className:
|
|
362
|
+
className: v,
|
|
361
363
|
placeholder: "%"
|
|
362
364
|
})]
|
|
363
365
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ g("label", {
|
|
365
367
|
className: "block space-y-1.5",
|
|
366
|
-
children: [/* @__PURE__ */
|
|
368
|
+
children: [/* @__PURE__ */ h("span", {
|
|
367
369
|
className: "text-sm font-medium text-text-primary",
|
|
368
|
-
children:
|
|
369
|
-
}), /* @__PURE__ */
|
|
370
|
+
children: C("scorecard.weight", "Weight")
|
|
371
|
+
}), /* @__PURE__ */ h("input", {
|
|
370
372
|
"aria-label": "weight",
|
|
371
|
-
value:
|
|
373
|
+
value: M.weight,
|
|
372
374
|
onChange: (e) => J("weight", e.target.value),
|
|
373
375
|
inputMode: "decimal",
|
|
374
|
-
className:
|
|
376
|
+
className: v,
|
|
375
377
|
placeholder: "1"
|
|
376
378
|
})]
|
|
377
379
|
})
|
|
378
380
|
]
|
|
379
381
|
}),
|
|
380
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ g("div", {
|
|
381
383
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
382
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ g("label", {
|
|
383
385
|
className: "block space-y-1.5",
|
|
384
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ h("span", {
|
|
385
387
|
className: "text-sm font-medium text-text-primary",
|
|
386
|
-
children:
|
|
387
|
-
}), /* @__PURE__ */
|
|
388
|
-
value:
|
|
388
|
+
children: C("scorecard.metricStatus", "Status")
|
|
389
|
+
}), /* @__PURE__ */ h("select", {
|
|
390
|
+
value: M.statusMode,
|
|
389
391
|
onChange: (e) => J("statusMode", e.target.value),
|
|
390
|
-
className:
|
|
391
|
-
children:
|
|
392
|
+
className: v,
|
|
393
|
+
children: re.map((e) => /* @__PURE__ */ h("option", {
|
|
392
394
|
value: e.value,
|
|
393
395
|
children: e.label
|
|
394
396
|
}, e.value))
|
|
395
397
|
})]
|
|
396
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ h("div", {
|
|
397
399
|
className: "flex items-end",
|
|
398
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ g("div", {
|
|
399
401
|
className: `flex items-center gap-2 rounded-md px-3 py-2 text-sm ${e.bg} ${e.text}`,
|
|
400
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ h(e.icon, { className: "size-4" }), /* @__PURE__ */ g("span", { children: [M.statusMode === "AUTO" ? "Derived: " : "Pinned: ", e.label] })]
|
|
401
403
|
})
|
|
402
404
|
})]
|
|
403
405
|
}),
|
|
404
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ g("label", {
|
|
405
407
|
className: "block space-y-1.5",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
408
|
+
children: [/* @__PURE__ */ h("span", {
|
|
407
409
|
className: "text-sm font-medium text-text-primary",
|
|
408
|
-
children:
|
|
409
|
-
}), /* @__PURE__ */
|
|
410
|
+
children: C("scorecard.remediation", "Remediation guidance")
|
|
411
|
+
}), /* @__PURE__ */ h("textarea", {
|
|
410
412
|
"aria-label": "control",
|
|
411
|
-
value:
|
|
413
|
+
value: M.remediation,
|
|
412
414
|
onChange: (e) => J("remediation", e.target.value),
|
|
413
|
-
className: `min-h-16 ${
|
|
414
|
-
placeholder:
|
|
415
|
+
className: `min-h-16 ${v}`,
|
|
416
|
+
placeholder: C("scorecard.remediationPlaceholder", "What should someone do when this metric is failing?")
|
|
415
417
|
})]
|
|
416
418
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ g("div", {
|
|
418
420
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-[1fr_10rem]",
|
|
419
|
-
children: [/* @__PURE__ */
|
|
421
|
+
children: [/* @__PURE__ */ g("label", {
|
|
420
422
|
className: "block space-y-1.5",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ h("span", {
|
|
422
424
|
className: "text-sm font-medium text-text-primary",
|
|
423
|
-
children:
|
|
424
|
-
}), /* @__PURE__ */
|
|
425
|
+
children: C("scorecard.iframeUrl", "Embed URL")
|
|
426
|
+
}), /* @__PURE__ */ h("input", {
|
|
425
427
|
"aria-label": "control",
|
|
426
|
-
value:
|
|
428
|
+
value: M.iframeUrl,
|
|
427
429
|
onChange: (e) => J("iframeUrl", e.target.value),
|
|
428
|
-
className:
|
|
429
|
-
placeholder:
|
|
430
|
+
className: v,
|
|
431
|
+
placeholder: C("scorecard.iframeUrlPlaceholder", "Optional dashboard URL")
|
|
430
432
|
})]
|
|
431
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), /* @__PURE__ */ g("label", {
|
|
432
434
|
className: "block space-y-1.5",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ h("span", {
|
|
434
436
|
className: "text-sm font-medium text-text-primary",
|
|
435
|
-
children:
|
|
436
|
-
}), /* @__PURE__ */
|
|
437
|
+
children: C("scorecard.iframeHeight", "Iframe height")
|
|
438
|
+
}), /* @__PURE__ */ h("input", {
|
|
437
439
|
"aria-label": "iframe height",
|
|
438
|
-
value:
|
|
440
|
+
value: M.iframeHeight,
|
|
439
441
|
onChange: (e) => J("iframeHeight", e.target.value),
|
|
440
442
|
inputMode: "numeric",
|
|
441
|
-
className:
|
|
443
|
+
className: v,
|
|
442
444
|
placeholder: "320"
|
|
443
445
|
})]
|
|
444
446
|
})]
|
|
445
447
|
})
|
|
446
448
|
]
|
|
447
449
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ g("div", {
|
|
449
451
|
className: "flex items-center justify-end gap-3 border-t border-border-default px-5 py-4",
|
|
450
|
-
children: [/* @__PURE__ */
|
|
452
|
+
children: [/* @__PURE__ */ h("button", {
|
|
451
453
|
type: "button",
|
|
452
454
|
onClick: K,
|
|
453
455
|
disabled: H,
|
|
454
456
|
className: "rounded-md border border-border-default px-4 py-2 text-sm text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-60",
|
|
455
|
-
children:
|
|
456
|
-
}), /* @__PURE__ */
|
|
457
|
+
children: C("common.cancel", "Cancel")
|
|
458
|
+
}), /* @__PURE__ */ h("button", {
|
|
457
459
|
type: "submit",
|
|
458
460
|
disabled: H,
|
|
459
461
|
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm text-action-primary-text hover:bg-action-primary-bg-hover disabled:cursor-not-allowed disabled:opacity-60",
|
|
460
|
-
children: H ?
|
|
462
|
+
children: H ? C("scorecard.savingMetric", "Saving...") : U ? C("scorecard.updateMetric", "Update Metric") : C("scorecard.saveMetric", "Save Metric")
|
|
461
463
|
})]
|
|
462
464
|
})
|
|
463
465
|
]
|
|
@@ -465,133 +467,145 @@ var v = {
|
|
|
465
467
|
})
|
|
466
468
|
}) });
|
|
467
469
|
};
|
|
468
|
-
if (
|
|
469
|
-
if (R && !V) return /* @__PURE__ */
|
|
470
|
-
title:
|
|
470
|
+
if (L && !V) return /* @__PURE__ */ h(o, { message: C("scorecard.loading", "Loading scorecard...") });
|
|
471
|
+
if (R && !V) return /* @__PURE__ */ h(s, {
|
|
472
|
+
title: C("scorecard.failedLoad", "Failed to load scorecard"),
|
|
471
473
|
message: R.message,
|
|
472
474
|
onRetry: () => z()
|
|
473
475
|
});
|
|
474
|
-
if (!V || V.metrics.length === 0) return /* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
ownerType:
|
|
477
|
-
ownerId:
|
|
478
|
-
workspaceId:
|
|
479
|
-
applyingTemplateId:
|
|
480
|
-
onApplyTemplate:
|
|
476
|
+
if (!V || V.metrics.length === 0) return /* @__PURE__ */ g(ge, { children: [
|
|
477
|
+
/* @__PURE__ */ h(u, {
|
|
478
|
+
ownerType: y,
|
|
479
|
+
ownerId: b,
|
|
480
|
+
workspaceId: ye,
|
|
481
|
+
applyingTemplateId: Se,
|
|
482
|
+
onApplyTemplate: Ie,
|
|
481
483
|
onAddManual: G
|
|
482
484
|
}),
|
|
483
485
|
Z(),
|
|
484
486
|
X()
|
|
485
487
|
] });
|
|
486
488
|
let Q = V.overallScore ?? 0, $ = Q >= 80 ? "text-status-success-text" : Q >= 50 ? "text-status-warning-text" : "text-status-error-text";
|
|
487
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ g("div", {
|
|
488
490
|
className: "space-y-6",
|
|
489
491
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ h(c, {
|
|
491
493
|
padding: "lg",
|
|
492
|
-
children: /* @__PURE__ */
|
|
494
|
+
children: /* @__PURE__ */ g("div", {
|
|
493
495
|
className: "flex items-center justify-between",
|
|
494
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("p", {
|
|
495
497
|
className: "flex items-center gap-1.5 text-sm font-medium text-text-secondary",
|
|
496
|
-
children: [
|
|
498
|
+
children: [C("scorecard.overallScore", "Overall Score"), /* @__PURE__ */ h("span", {
|
|
497
499
|
title: "Weighted average of each metric's score (0–100). Status is derived from value vs threshold.",
|
|
498
|
-
children: /* @__PURE__ */
|
|
500
|
+
children: /* @__PURE__ */ h(le, { className: "size-3.5 text-text-muted" })
|
|
499
501
|
})]
|
|
500
|
-
}), /* @__PURE__ */
|
|
502
|
+
}), /* @__PURE__ */ g("p", {
|
|
501
503
|
className: `text-4xl font-bold ${$}`,
|
|
502
|
-
children: [Q, /* @__PURE__ */
|
|
504
|
+
children: [Q, /* @__PURE__ */ h("span", {
|
|
503
505
|
className: "text-lg text-text-muted",
|
|
504
506
|
children: "/100"
|
|
505
507
|
})]
|
|
506
|
-
})] }), /* @__PURE__ */
|
|
508
|
+
})] }), /* @__PURE__ */ g("div", {
|
|
507
509
|
className: "flex items-center gap-2",
|
|
508
510
|
children: [
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__PURE__ */ h(me, { className: `size-6 ${$}` }),
|
|
512
|
+
/* @__PURE__ */ h(ee, {
|
|
513
|
+
entity: "scorecard",
|
|
514
|
+
resource: {
|
|
515
|
+
id: V.id,
|
|
516
|
+
name: V.id,
|
|
517
|
+
owner: {
|
|
518
|
+
ownerId: b,
|
|
519
|
+
ownerType: y
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
label: C("scorecard.share", "Share")
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ h("button", {
|
|
511
525
|
type: "button",
|
|
512
526
|
onClick: () => z(),
|
|
513
527
|
className: "rounded-md p-2 text-text-secondary transition-colors hover:bg-bg-sunken",
|
|
514
|
-
title:
|
|
515
|
-
children: /* @__PURE__ */
|
|
528
|
+
title: C("common.refresh", "Refresh"),
|
|
529
|
+
children: /* @__PURE__ */ h(fe, { className: "size-4" })
|
|
516
530
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
531
|
+
/* @__PURE__ */ g("button", {
|
|
518
532
|
type: "button",
|
|
519
533
|
onClick: G,
|
|
520
534
|
className: "flex items-center gap-2 rounded-md bg-action-primary-bg px-3 py-2 text-sm text-action-primary-text transition-colors hover:bg-action-primary-bg-hover",
|
|
521
|
-
children: [/* @__PURE__ */
|
|
535
|
+
children: [/* @__PURE__ */ h(de, { className: "size-4" }), C("scorecard.addMetric", "Add Metric")]
|
|
522
536
|
})
|
|
523
537
|
]
|
|
524
538
|
})]
|
|
525
539
|
})
|
|
526
540
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ h(ve, {
|
|
528
542
|
stagger: .04,
|
|
529
543
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
530
544
|
children: V.metrics.map((e) => {
|
|
531
|
-
let t = l[e.status] || l.UNKNOWN, n = t.icon, r = e.value ?? 0, i = e.threshold ?? 100, a = i > 0 ? Math.min(100, Math.max(0, r / i * 100)) : 0, o =
|
|
532
|
-
return /* @__PURE__ */
|
|
545
|
+
let t = l[e.status] || l.UNKNOWN, n = t.icon, r = e.value ?? 0, i = e.threshold ?? 100, a = i > 0 ? Math.min(100, Math.max(0, r / i * 100)) : 0, o = be === e.id, s = e.remediation && (e.status === "WARNING" || e.status === "FAILING");
|
|
546
|
+
return /* @__PURE__ */ h(_e, { children: /* @__PURE__ */ g(c, {
|
|
533
547
|
hoverable: !0,
|
|
534
548
|
padding: "none",
|
|
535
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ g("div", {
|
|
536
550
|
role: "button",
|
|
537
551
|
tabIndex: 0,
|
|
538
|
-
onClick: () =>
|
|
552
|
+
onClick: () => w(o ? null : e.id),
|
|
539
553
|
onKeyDown: (t) => {
|
|
540
|
-
t.target === t.currentTarget && (t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
554
|
+
t.target === t.currentTarget && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), w(o ? null : e.id));
|
|
541
555
|
},
|
|
542
556
|
className: "cursor-pointer rounded-lg p-4 focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
543
557
|
"aria-expanded": o,
|
|
544
558
|
"aria-label": `${e.name} metric details`,
|
|
545
559
|
children: [
|
|
546
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ g("div", {
|
|
547
561
|
className: "flex items-start justify-between gap-2",
|
|
548
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ g("div", {
|
|
549
563
|
className: "min-w-0 flex-1",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ h("p", {
|
|
551
565
|
className: "truncate text-sm font-medium text-text-primary",
|
|
552
566
|
children: e.name
|
|
553
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ g("p", {
|
|
554
568
|
className: "mt-0.5 flex items-center gap-1.5 text-xs text-text-muted",
|
|
555
569
|
children: [
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
e.weight && e.weight !== 1 ? /* @__PURE__ */
|
|
558
|
-
e.statusOverride ? /* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ h("span", { children: e.direction === "LOWER_IS_BETTER" ? "↓ lower better" : "↑ higher better" }),
|
|
571
|
+
e.weight && e.weight !== 1 ? /* @__PURE__ */ g("span", { children: ["· ×", e.weight] }) : null,
|
|
572
|
+
e.statusOverride ? /* @__PURE__ */ h("span", { children: "· pinned" }) : null
|
|
559
573
|
]
|
|
560
574
|
})]
|
|
561
|
-
}), /* @__PURE__ */
|
|
575
|
+
}), /* @__PURE__ */ g("div", {
|
|
562
576
|
className: "flex flex-shrink-0 items-center gap-1",
|
|
563
577
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ h("button", {
|
|
565
579
|
type: "button",
|
|
566
|
-
onClick: (t) =>
|
|
580
|
+
onClick: (t) => Me(t, e),
|
|
567
581
|
className: "rounded-md p-1 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
568
|
-
"aria-label":
|
|
569
|
-
title:
|
|
570
|
-
children: /* @__PURE__ */
|
|
582
|
+
"aria-label": C("scorecard.editMetric", "Edit metric"),
|
|
583
|
+
title: C("scorecard.editMetric", "Edit metric"),
|
|
584
|
+
children: /* @__PURE__ */ h(ue, { className: "size-4" })
|
|
571
585
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ h("button", {
|
|
573
587
|
type: "button",
|
|
574
|
-
onClick: (t) =>
|
|
588
|
+
onClick: (t) => Ne(t, e),
|
|
575
589
|
className: "rounded-md p-1 text-text-secondary hover:bg-status-error-bg hover:text-status-error-text focus:outline-none focus:ring-2 focus:ring-status-error-text",
|
|
576
|
-
"aria-label":
|
|
577
|
-
title:
|
|
578
|
-
children: /* @__PURE__ */
|
|
590
|
+
"aria-label": C("scorecard.removeMetric", "Remove metric"),
|
|
591
|
+
title: C("scorecard.removeMetric", "Remove metric"),
|
|
592
|
+
children: /* @__PURE__ */ h(pe, { className: "size-4" })
|
|
579
593
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ h("div", {
|
|
581
595
|
className: `flex size-7 items-center justify-center rounded-full ${t.bg}`,
|
|
582
|
-
children: /* @__PURE__ */
|
|
596
|
+
children: /* @__PURE__ */ h(n, { className: `size-4 ${t.text}` })
|
|
583
597
|
})
|
|
584
598
|
]
|
|
585
599
|
})]
|
|
586
600
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ g("div", {
|
|
588
602
|
className: "mt-3",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ g("div", {
|
|
590
604
|
className: "flex items-baseline justify-between",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
605
|
+
children: [/* @__PURE__ */ g("span", {
|
|
592
606
|
className: "text-lg font-bold text-text-primary",
|
|
593
607
|
children: [r, e.unit ? ` ${e.unit}` : ""]
|
|
594
|
-
}), /* @__PURE__ */
|
|
608
|
+
}), /* @__PURE__ */ g("span", {
|
|
595
609
|
className: "text-xs text-text-muted",
|
|
596
610
|
children: [
|
|
597
611
|
"/ ",
|
|
@@ -599,9 +613,9 @@ var v = {
|
|
|
599
613
|
e.unit ? ` ${e.unit}` : ""
|
|
600
614
|
]
|
|
601
615
|
})]
|
|
602
|
-
}), /* @__PURE__ */
|
|
616
|
+
}), /* @__PURE__ */ h("div", {
|
|
603
617
|
className: "mt-1.5 h-1.5 w-full overflow-hidden rounded-full bg-bg-sunken",
|
|
604
|
-
children: /* @__PURE__ */
|
|
618
|
+
children: /* @__PURE__ */ h(m.div, {
|
|
605
619
|
initial: { width: 0 },
|
|
606
620
|
animate: { width: `${a}%` },
|
|
607
621
|
transition: {
|
|
@@ -612,12 +626,12 @@ var v = {
|
|
|
612
626
|
})
|
|
613
627
|
})]
|
|
614
628
|
}),
|
|
615
|
-
s && /* @__PURE__ */
|
|
629
|
+
s && /* @__PURE__ */ h("p", {
|
|
616
630
|
className: "mt-2 rounded-md border border-status-warning-border bg-status-warning-bg px-2 py-1.5 text-xs text-status-warning-text",
|
|
617
631
|
children: e.remediation
|
|
618
632
|
})
|
|
619
633
|
]
|
|
620
|
-
}), /* @__PURE__ */
|
|
634
|
+
}), /* @__PURE__ */ h(p, { children: o && /* @__PURE__ */ g(m.div, {
|
|
621
635
|
initial: {
|
|
622
636
|
height: 0,
|
|
623
637
|
opacity: 0
|
|
@@ -632,13 +646,13 @@ var v = {
|
|
|
632
646
|
},
|
|
633
647
|
transition: { duration: .2 },
|
|
634
648
|
className: "overflow-hidden border-t border-border-default",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
649
|
+
children: [/* @__PURE__ */ h("div", {
|
|
636
650
|
className: "px-4 py-3",
|
|
637
|
-
children: /* @__PURE__ */
|
|
651
|
+
children: /* @__PURE__ */ h(oe, {
|
|
638
652
|
metricId: e.id,
|
|
639
653
|
colorClass: t.text
|
|
640
654
|
})
|
|
641
|
-
}), e.iframeUrl && /* @__PURE__ */
|
|
655
|
+
}), e.iframeUrl && /* @__PURE__ */ h("iframe", {
|
|
642
656
|
src: e.iframeUrl,
|
|
643
657
|
className: "w-full border-0",
|
|
644
658
|
style: { height: e.iframeHeight ? `${e.iframeHeight}px` : "200px" },
|
|
@@ -649,9 +663,9 @@ var v = {
|
|
|
649
663
|
}) }, e.id);
|
|
650
664
|
})
|
|
651
665
|
}),
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
ownerType:
|
|
654
|
-
highlightOwnerId:
|
|
666
|
+
/* @__PURE__ */ h(ae, {
|
|
667
|
+
ownerType: y,
|
|
668
|
+
highlightOwnerId: b
|
|
655
669
|
}),
|
|
656
670
|
Z(),
|
|
657
671
|
X()
|
|
@@ -659,6 +673,6 @@ var v = {
|
|
|
659
673
|
});
|
|
660
674
|
};
|
|
661
675
|
//#endregion
|
|
662
|
-
export {
|
|
676
|
+
export { y as ScorecardPanel };
|
|
663
677
|
|
|
664
678
|
//# sourceMappingURL=ScorecardPanel.js.map
|