@datatechsolutions/ui 2.11.89 → 2.11.91
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/astrlabe/index.js +108 -106
- package/dist/astrlabe/index.mjs +5 -3
- package/dist/astrlabe/workflow-canvas.js +5 -3
- package/dist/astrlabe/workflow-canvas.mjs +4 -2
- package/dist/{chunk-G7DZU3NM.mjs → chunk-256TJHVO.mjs} +3 -3
- package/dist/{chunk-G7DZU3NM.mjs.map → chunk-256TJHVO.mjs.map} +1 -1
- package/dist/{chunk-D4TESEYK.mjs → chunk-36G7GAPU.mjs} +24 -7
- package/dist/chunk-36G7GAPU.mjs.map +1 -0
- package/dist/{chunk-NBCOVUQP.mjs → chunk-6OWD54HK.mjs} +3 -3
- package/dist/{chunk-NBCOVUQP.mjs.map → chunk-6OWD54HK.mjs.map} +1 -1
- package/dist/{chunk-5HXDJBVX.mjs → chunk-7JFAOHZ3.mjs} +4 -4
- package/dist/{chunk-5HXDJBVX.mjs.map → chunk-7JFAOHZ3.mjs.map} +1 -1
- package/dist/{chunk-SAYVWIMJ.js → chunk-AP7OWR6S.js} +4 -4
- package/dist/{chunk-SAYVWIMJ.js.map → chunk-AP7OWR6S.js.map} +1 -1
- package/dist/{chunk-URDQSUW6.js → chunk-B5NZVS4A.js} +67 -67
- package/dist/{chunk-URDQSUW6.js.map → chunk-B5NZVS4A.js.map} +1 -1
- package/dist/{chunk-UUHV5KHF.js → chunk-BVCS7RBR.js} +33 -33
- package/dist/{chunk-UUHV5KHF.js.map → chunk-BVCS7RBR.js.map} +1 -1
- package/dist/{chunk-X2KCCQPL.js → chunk-C7KAF363.js} +55 -55
- package/dist/{chunk-X2KCCQPL.js.map → chunk-C7KAF363.js.map} +1 -1
- package/dist/{chunk-HK6J6HQP.mjs → chunk-CBVRUJ7N.mjs} +11 -24
- package/dist/chunk-CBVRUJ7N.mjs.map +1 -0
- package/dist/{chunk-F4TOOARV.mjs → chunk-CG3P5Z5U.mjs} +3 -3
- package/dist/{chunk-F4TOOARV.mjs.map → chunk-CG3P5Z5U.mjs.map} +1 -1
- package/dist/{chunk-RV555OEO.mjs → chunk-E2ZGFN2H.mjs} +4 -4
- package/dist/{chunk-RV555OEO.mjs.map → chunk-E2ZGFN2H.mjs.map} +1 -1
- package/dist/{chunk-Q2MG7S2E.js → chunk-E32B2MVK.js} +15 -15
- package/dist/{chunk-Q2MG7S2E.js.map → chunk-E32B2MVK.js.map} +1 -1
- package/dist/{chunk-GEUGFYLO.mjs → chunk-FDSU7GPS.mjs} +3 -3
- package/dist/{chunk-GEUGFYLO.mjs.map → chunk-FDSU7GPS.mjs.map} +1 -1
- package/dist/{chunk-UVEPTYZC.js → chunk-GWRJ5L36.js} +12 -12
- package/dist/{chunk-UVEPTYZC.js.map → chunk-GWRJ5L36.js.map} +1 -1
- package/dist/{chunk-XOZMUCMF.mjs → chunk-HPIKJS5B.mjs} +3 -3
- package/dist/{chunk-XOZMUCMF.mjs.map → chunk-HPIKJS5B.mjs.map} +1 -1
- package/dist/{chunk-TOEMSC4P.mjs → chunk-IEWFVP42.mjs} +6 -6
- package/dist/{chunk-TOEMSC4P.mjs.map → chunk-IEWFVP42.mjs.map} +1 -1
- package/dist/{chunk-ZJQ5RLGK.mjs → chunk-J4QUCX27.mjs} +1177 -390
- package/dist/chunk-J4QUCX27.mjs.map +1 -0
- package/dist/{chunk-TLDVFFAK.mjs → chunk-KHAMY7MA.mjs} +3 -3
- package/dist/{chunk-TLDVFFAK.mjs.map → chunk-KHAMY7MA.mjs.map} +1 -1
- package/dist/{chunk-YXPHJ2BQ.js → chunk-L5VEY7G4.js} +13 -2
- package/dist/chunk-L5VEY7G4.js.map +1 -0
- package/dist/{chunk-2URBM4LA.js → chunk-MLAIUJYC.js} +6 -6
- package/dist/{chunk-2URBM4LA.js.map → chunk-MLAIUJYC.js.map} +1 -1
- package/dist/{chunk-64G2HBRQ.mjs → chunk-OE4Z4FKM.mjs} +13 -3
- package/dist/chunk-OE4Z4FKM.mjs.map +1 -0
- package/dist/{chunk-LBALE4JX.js → chunk-OQDWU6AE.js} +67 -67
- package/dist/{chunk-LBALE4JX.js.map → chunk-OQDWU6AE.js.map} +1 -1
- package/dist/{chunk-JUTOBBBI.mjs → chunk-Q7WGFPGK.mjs} +4 -4
- package/dist/{chunk-JUTOBBBI.mjs.map → chunk-Q7WGFPGK.mjs.map} +1 -1
- package/dist/{chunk-TZ62G5WM.js → chunk-R5KUEOPU.js} +84 -66
- package/dist/chunk-R5KUEOPU.js.map +1 -0
- package/dist/{chunk-3YVQXDKJ.js → chunk-SIBJRWUB.js} +4 -4
- package/dist/{chunk-3YVQXDKJ.js.map → chunk-SIBJRWUB.js.map} +1 -1
- package/dist/{chunk-ZARCUQA6.js → chunk-SOYGVHPZ.js} +53 -53
- package/dist/{chunk-ZARCUQA6.js.map → chunk-SOYGVHPZ.js.map} +1 -1
- package/dist/{chunk-4667D2ZT.mjs → chunk-U4BTEKZT.mjs} +3 -3
- package/dist/{chunk-4667D2ZT.mjs.map → chunk-U4BTEKZT.mjs.map} +1 -1
- package/dist/{chunk-NAQ32ZPG.mjs → chunk-URMZJ3WF.mjs} +7 -7
- package/dist/{chunk-NAQ32ZPG.mjs.map → chunk-URMZJ3WF.mjs.map} +1 -1
- package/dist/{chunk-SUHNSUMH.mjs → chunk-VPNZDLR6.mjs} +4 -4
- package/dist/{chunk-SUHNSUMH.mjs.map → chunk-VPNZDLR6.mjs.map} +1 -1
- package/dist/{chunk-SV4SMITM.js → chunk-WIKMIULO.js} +36 -36
- package/dist/{chunk-SV4SMITM.js.map → chunk-WIKMIULO.js.map} +1 -1
- package/dist/{chunk-K26RY4EQ.js → chunk-WY3YDQXK.js} +26 -26
- package/dist/{chunk-K26RY4EQ.js.map → chunk-WY3YDQXK.js.map} +1 -1
- package/dist/{chunk-ZHHRWC27.js → chunk-Y4DNREFH.js} +135 -148
- package/dist/chunk-Y4DNREFH.js.map +1 -0
- package/dist/{chunk-MXFEU7A6.js → chunk-YMGJ4FZZ.js} +4 -4
- package/dist/{chunk-MXFEU7A6.js.map → chunk-YMGJ4FZZ.js.map} +1 -1
- package/dist/{chunk-KNXAOJAK.js → chunk-YN4IEDE4.js} +1250 -461
- package/dist/chunk-YN4IEDE4.js.map +1 -0
- package/dist/index.d.mts +306 -2
- package/dist/index.d.ts +306 -2
- package/dist/index.js +754 -744
- package/dist/index.mjs +3 -1
- package/dist/platform/admin/index.js +12 -10
- package/dist/platform/admin/index.mjs +6 -4
- package/dist/platform/agents-workspace.js +8 -8
- package/dist/platform/agents-workspace.mjs +7 -7
- package/dist/platform/app-shell.js +5 -3
- package/dist/platform/app-shell.mjs +4 -2
- package/dist/platform/auth/index.js +29 -27
- package/dist/platform/auth/index.mjs +6 -4
- package/dist/platform/billing/index.js +5 -3
- package/dist/platform/billing/index.mjs +4 -2
- package/dist/platform/impersonation/index.js +5 -3
- package/dist/platform/impersonation/index.mjs +4 -2
- package/dist/platform/index.js +100 -100
- package/dist/platform/index.mjs +20 -20
- package/dist/platform/pages/index.d.mts +2 -2
- package/dist/platform/pages/index.d.ts +2 -2
- package/dist/platform/pages/index.js +197 -195
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +9 -7
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +9 -7
- package/dist/platform/settings/index.mjs +8 -6
- package/dist/platform/workflow-api-client.d.mts +1 -1
- package/dist/platform/workflow-api-client.d.ts +1 -1
- package/dist/platform/workflow-api-client.js +64 -60
- package/dist/platform/workflow-api-client.mjs +1 -1
- package/dist/platform/workflow-canvas-shell.js +6 -4
- package/dist/platform/workflow-canvas-shell.mjs +5 -3
- package/dist/{workflow-api-client-Dy1Ph8W-.d.ts → workflow-api-client-CXN5iaih.d.ts} +34 -2
- package/dist/{workflow-api-client-C8gPn_D1.d.mts → workflow-api-client-XU83zq0k.d.mts} +34 -2
- package/package.json +1 -1
- package/dist/chunk-64G2HBRQ.mjs.map +0 -1
- package/dist/chunk-D4TESEYK.mjs.map +0 -1
- package/dist/chunk-HK6J6HQP.mjs.map +0 -1
- package/dist/chunk-KNXAOJAK.js.map +0 -1
- package/dist/chunk-TZ62G5WM.js.map +0 -1
- package/dist/chunk-YXPHJ2BQ.js.map +0 -1
- package/dist/chunk-ZHHRWC27.js.map +0 -1
- package/dist/chunk-ZJQ5RLGK.mjs.map +0 -1
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
5
5
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
6
6
|
var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
|
|
7
|
+
var chunkL5VEY7G4_js = require('./chunk-L5VEY7G4.js');
|
|
7
8
|
var Headless6 = require('@headlessui/react');
|
|
8
9
|
var clsx = require('clsx');
|
|
9
10
|
var React12 = require('react');
|
|
10
11
|
var framerMotion = require('framer-motion');
|
|
11
12
|
var jsxRuntime = require('react/jsx-runtime');
|
|
12
13
|
var solid = require('@heroicons/react/20/solid');
|
|
14
|
+
var solid$1 = require('@heroicons/react/24/solid');
|
|
13
15
|
var HeroIcons = require('@heroicons/react/24/outline');
|
|
14
16
|
var Popover = require('@radix-ui/react-popover');
|
|
15
17
|
var reactDom = require('react-dom');
|
|
16
18
|
var dateFns = require('date-fns');
|
|
17
19
|
var locale = require('date-fns/locale');
|
|
18
|
-
var solid$1 = require('@heroicons/react/24/solid');
|
|
19
20
|
var reactTransitionProgress = require('react-transition-progress');
|
|
20
21
|
var lucideReact = require('lucide-react');
|
|
21
22
|
var d3Geo = require('d3-geo');
|
|
@@ -2167,185 +2168,1251 @@ function ChartRenderer({ spec, width = 640, height = 280, className }) {
|
|
|
2167
2168
|
})
|
|
2168
2169
|
] })
|
|
2169
2170
|
}
|
|
2170
|
-
),
|
|
2171
|
-
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-2 flex flex-wrap gap-3 text-xs text-slate-600 dark:text-slate-400", children: seriesComputed.map((series) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
2172
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2173
|
-
"span",
|
|
2174
|
-
{
|
|
2175
|
-
className: "inline-block h-2 w-2 rounded-full",
|
|
2176
|
-
style: { backgroundColor: series.color },
|
|
2177
|
-
"aria-hidden": true
|
|
2171
|
+
),
|
|
2172
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-2 flex flex-wrap gap-3 text-xs text-slate-600 dark:text-slate-400", children: seriesComputed.map((series) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
2173
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2174
|
+
"span",
|
|
2175
|
+
{
|
|
2176
|
+
className: "inline-block h-2 w-2 rounded-full",
|
|
2177
|
+
style: { backgroundColor: series.color },
|
|
2178
|
+
"aria-hidden": true
|
|
2179
|
+
}
|
|
2180
|
+
),
|
|
2181
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: series.name })
|
|
2182
|
+
] }, series.name)) })
|
|
2183
|
+
] });
|
|
2184
|
+
}
|
|
2185
|
+
function buildTicks(min, max, count) {
|
|
2186
|
+
const step2 = (max - min) / (count - 1);
|
|
2187
|
+
const ticks = [];
|
|
2188
|
+
for (let index = 0; index < count; index += 1) {
|
|
2189
|
+
ticks.push(min + step2 * index);
|
|
2190
|
+
}
|
|
2191
|
+
return ticks;
|
|
2192
|
+
}
|
|
2193
|
+
function formatTick(value, unit) {
|
|
2194
|
+
const formatted = Math.abs(value) >= 1e3 ? value.toFixed(0) : value.toFixed(Math.abs(value) < 10 ? 2 : 1);
|
|
2195
|
+
return unit ? `${formatted}${unit}` : formatted;
|
|
2196
|
+
}
|
|
2197
|
+
function renderXLabels(data, count, width, height) {
|
|
2198
|
+
const indexes = count > 6 ? [0, Math.floor(count / 3), Math.floor(2 * count / 3), count - 1] : Array.from({ length: count }, (_, index) => index);
|
|
2199
|
+
return indexes.map((index) => {
|
|
2200
|
+
const x = xScale(index, count, width);
|
|
2201
|
+
const label = String(data[index]?.x ?? "");
|
|
2202
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2203
|
+
"text",
|
|
2204
|
+
{
|
|
2205
|
+
x,
|
|
2206
|
+
y: height + 16,
|
|
2207
|
+
textAnchor: "middle",
|
|
2208
|
+
className: "fill-current text-[10px] font-mono",
|
|
2209
|
+
children: label
|
|
2210
|
+
},
|
|
2211
|
+
`x-${index}`
|
|
2212
|
+
);
|
|
2213
|
+
});
|
|
2214
|
+
}
|
|
2215
|
+
function renderLine(series, type, count, domain, width, height) {
|
|
2216
|
+
const points = series.values.map((value, index) => ({
|
|
2217
|
+
x: xScale(index, count, width),
|
|
2218
|
+
y: yScale(value, domain, height)
|
|
2219
|
+
}));
|
|
2220
|
+
const linePath = points.reduce((acc, point, index) => index === 0 ? `M${point.x},${point.y}` : `${acc} L${point.x},${point.y}`, "");
|
|
2221
|
+
const areaPath = type === "area" && points.length > 0 ? `${linePath} L${points[points.length - 1]?.x ?? 0},${height} L${points[0]?.x ?? 0},${height} Z` : null;
|
|
2222
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
2223
|
+
areaPath && /* @__PURE__ */ jsxRuntime.jsx("path", { d: areaPath, fill: series.color, fillOpacity: 0.15 }),
|
|
2224
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: linePath, stroke: series.color, strokeWidth: 2, fill: "none" }),
|
|
2225
|
+
points.map((point, index) => /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: point.x, cy: point.y, r: 2.5, fill: series.color }, `${series.name}-${index}`))
|
|
2226
|
+
] }, series.name);
|
|
2227
|
+
}
|
|
2228
|
+
function renderBars(series, seriesIndex, seriesCount, count, domain, width, height) {
|
|
2229
|
+
const slot = count > 1 ? width / (count - 1) : width;
|
|
2230
|
+
const barWidth = Math.max(2, slot * 0.8 / seriesCount);
|
|
2231
|
+
const offset = seriesCount * barWidth / 2;
|
|
2232
|
+
return /* @__PURE__ */ jsxRuntime.jsx("g", { children: series.values.map((value, index) => {
|
|
2233
|
+
const cx = xScale(index, count, width);
|
|
2234
|
+
const barX = cx - offset + seriesIndex * barWidth;
|
|
2235
|
+
const y = yScale(value, domain, height);
|
|
2236
|
+
const barHeight = height - y;
|
|
2237
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2238
|
+
"rect",
|
|
2239
|
+
{
|
|
2240
|
+
x: barX,
|
|
2241
|
+
y,
|
|
2242
|
+
width: barWidth,
|
|
2243
|
+
height: Math.max(0, barHeight),
|
|
2244
|
+
fill: series.color,
|
|
2245
|
+
fillOpacity: 0.85,
|
|
2246
|
+
rx: 2
|
|
2247
|
+
},
|
|
2248
|
+
`${series.name}-${index}`
|
|
2249
|
+
);
|
|
2250
|
+
}) }, series.name);
|
|
2251
|
+
}
|
|
2252
|
+
function ItemSummary({
|
|
2253
|
+
icon,
|
|
2254
|
+
title,
|
|
2255
|
+
subtitle,
|
|
2256
|
+
metadata,
|
|
2257
|
+
iconContainerClassName = "flex size-10 flex-shrink-0 items-center justify-center rounded-lg bg-indigo-100 dark:bg-indigo-900/30",
|
|
2258
|
+
titleClassName = "truncate text-sm font-semibold text-gray-900 dark:text-white",
|
|
2259
|
+
subtitleClassName = "truncate text-xs text-gray-500 dark:text-gray-400",
|
|
2260
|
+
metadataContainerClassName = "mt-2 flex flex-wrap gap-3",
|
|
2261
|
+
metadataLabelClassName = "text-xs text-gray-500 dark:text-gray-400",
|
|
2262
|
+
metadataValueClassName = "text-xs font-medium text-gray-900 dark:text-white"
|
|
2263
|
+
}) {
|
|
2264
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 min-w-0 items-start gap-3", children: [
|
|
2265
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: iconContainerClassName, children: icon }) : null,
|
|
2266
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2267
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title }),
|
|
2268
|
+
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: subtitleClassName, children: subtitle }) : null,
|
|
2269
|
+
metadata && metadata.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: metadataContainerClassName, children: metadata.map((metadataItem, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
2270
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataLabelClassName, children: metadataItem.label }),
|
|
2271
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataValueClassName, children: metadataItem.value })
|
|
2272
|
+
] }, index)) }) : null
|
|
2273
|
+
] })
|
|
2274
|
+
] });
|
|
2275
|
+
}
|
|
2276
|
+
function isPlainTextTitle(title) {
|
|
2277
|
+
return typeof title === "string" || typeof title === "number";
|
|
2278
|
+
}
|
|
2279
|
+
function getTestIdFromTitle(title) {
|
|
2280
|
+
if (isPlainTextTitle(title)) {
|
|
2281
|
+
return `entity-card-${String(title).toLowerCase().replace(/\s+/g, "-")}`;
|
|
2282
|
+
}
|
|
2283
|
+
return "entity-card";
|
|
2284
|
+
}
|
|
2285
|
+
function StatusBadgeInternal({ status }) {
|
|
2286
|
+
const tCommon = chunkYXN2K77G_js.useTranslations("common");
|
|
2287
|
+
if (typeof status !== "boolean") {
|
|
2288
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: status });
|
|
2289
|
+
}
|
|
2290
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2291
|
+
"span",
|
|
2292
|
+
{
|
|
2293
|
+
className: `shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${status ? "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300" : "bg-white/40 text-slate-500 dark:bg-white/[0.08] dark:text-slate-400"}`,
|
|
2294
|
+
children: status ? tCommon("active") : tCommon("inactive")
|
|
2295
|
+
}
|
|
2296
|
+
);
|
|
2297
|
+
}
|
|
2298
|
+
function EntityCard({
|
|
2299
|
+
icon,
|
|
2300
|
+
title,
|
|
2301
|
+
subtitle,
|
|
2302
|
+
status,
|
|
2303
|
+
accentGradient,
|
|
2304
|
+
children,
|
|
2305
|
+
footer,
|
|
2306
|
+
onClick,
|
|
2307
|
+
className = "",
|
|
2308
|
+
dragProps
|
|
2309
|
+
}) {
|
|
2310
|
+
const isInteractive = Boolean(onClick);
|
|
2311
|
+
const plainTextTitle = isPlainTextTitle(title) ? String(title) : void 0;
|
|
2312
|
+
const handleKeyDown = React12.useCallback(
|
|
2313
|
+
(event) => {
|
|
2314
|
+
if (onClick && (event.key === "Enter" || event.key === " ")) {
|
|
2315
|
+
event.preventDefault();
|
|
2316
|
+
onClick();
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
[onClick]
|
|
2320
|
+
);
|
|
2321
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2322
|
+
Card,
|
|
2323
|
+
{
|
|
2324
|
+
role: isInteractive ? "article" : "listitem",
|
|
2325
|
+
"aria-label": isInteractive ? plainTextTitle : void 0,
|
|
2326
|
+
"data-testid": getTestIdFromTitle(title),
|
|
2327
|
+
tabIndex: isInteractive ? 0 : void 0,
|
|
2328
|
+
onKeyDown: isInteractive ? handleKeyDown : void 0,
|
|
2329
|
+
className: `group overflow-hidden transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md ${isInteractive ? "cursor-pointer" : ""} ${className}`,
|
|
2330
|
+
onPress: onClick,
|
|
2331
|
+
pressable: isInteractive,
|
|
2332
|
+
...dragProps,
|
|
2333
|
+
children: [
|
|
2334
|
+
accentGradient && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-1.5 w-full bg-gradient-to-r ${accentGradient}` }),
|
|
2335
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
2336
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2337
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "entity-card-title", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2338
|
+
ItemSummary,
|
|
2339
|
+
{
|
|
2340
|
+
icon,
|
|
2341
|
+
title,
|
|
2342
|
+
subtitle: subtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "entity-card-subtitle", children: subtitle }) : void 0,
|
|
2343
|
+
iconContainerClassName: "shrink-0",
|
|
2344
|
+
titleClassName: isPlainTextTitle(title) ? "truncate font-semibold text-slate-900 dark:text-white" : "font-semibold text-slate-900 dark:text-white",
|
|
2345
|
+
subtitleClassName: "mt-0.5 text-xs text-slate-500 dark:text-slate-400"
|
|
2346
|
+
}
|
|
2347
|
+
) }),
|
|
2348
|
+
status !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(StatusBadgeInternal, { status })
|
|
2349
|
+
] }),
|
|
2350
|
+
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children }),
|
|
2351
|
+
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 border-t border-white/30 pt-3 dark:border-white/10 flex gap-2 justify-end opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100", children: footer })
|
|
2352
|
+
] })
|
|
2353
|
+
]
|
|
2354
|
+
}
|
|
2355
|
+
);
|
|
2356
|
+
}
|
|
2357
|
+
var TONE_STYLES = {
|
|
2358
|
+
error: { container: "border-red-500/30 bg-red-500/20 text-red-600 dark:text-red-400", dot: "bg-red-500" },
|
|
2359
|
+
warning: { container: "border-amber-500/30 bg-amber-500/20 text-amber-600 dark:text-amber-400", dot: "bg-amber-500" },
|
|
2360
|
+
info: { container: "border-blue-500/30 bg-blue-500/20 text-blue-600 dark:text-blue-400", dot: "bg-blue-500" },
|
|
2361
|
+
neutral: { container: "border-slate-500/30 bg-slate-500/20 text-slate-600 dark:text-slate-400", dot: "bg-slate-500" },
|
|
2362
|
+
success: { container: "border-emerald-500/30 bg-emerald-500/20 text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" }
|
|
2363
|
+
};
|
|
2364
|
+
var LEGACY_STATUS_STYLES = {
|
|
2365
|
+
pending: "border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-700/30 dark:bg-yellow-900/20 dark:text-yellow-400",
|
|
2366
|
+
approved: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400",
|
|
2367
|
+
rejected: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
|
|
2368
|
+
active: "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-700/30 dark:bg-emerald-900/20 dark:text-emerald-400",
|
|
2369
|
+
inactive: "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400",
|
|
2370
|
+
processing: "border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-700/30 dark:bg-blue-900/20 dark:text-blue-400",
|
|
2371
|
+
error: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
|
|
2372
|
+
success: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400"
|
|
2373
|
+
};
|
|
2374
|
+
var LEGACY_DOT_STYLES = {
|
|
2375
|
+
pending: "bg-yellow-500",
|
|
2376
|
+
approved: "bg-green-500",
|
|
2377
|
+
rejected: "bg-red-500",
|
|
2378
|
+
active: "bg-emerald-500",
|
|
2379
|
+
inactive: "bg-slate-500",
|
|
2380
|
+
processing: "bg-blue-500",
|
|
2381
|
+
error: "bg-red-500",
|
|
2382
|
+
success: "bg-green-500"
|
|
2383
|
+
};
|
|
2384
|
+
var SIZE_STYLES = {
|
|
2385
|
+
sm: "px-2 py-0.5 text-xs",
|
|
2386
|
+
md: "px-2.5 py-1 text-xs"
|
|
2387
|
+
};
|
|
2388
|
+
var DEFAULT_LEGACY_STYLE = "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400";
|
|
2389
|
+
var StatusBadge = React12.forwardRef(function StatusBadge2({ status, label, size = "md", className = "", ...props }, ref) {
|
|
2390
|
+
if ("statusConfig" in props && props.statusConfig) {
|
|
2391
|
+
const configuredStatus = props.statusConfig[status];
|
|
2392
|
+
if (!configuredStatus) {
|
|
2393
|
+
return null;
|
|
2394
|
+
}
|
|
2395
|
+
const toneStyle = TONE_STYLES[configuredStatus.tone ?? "neutral"];
|
|
2396
|
+
const IconComponent = configuredStatus.icon;
|
|
2397
|
+
const resolvedLabel2 = label ?? configuredStatus.label;
|
|
2398
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2399
|
+
"div",
|
|
2400
|
+
{
|
|
2401
|
+
ref,
|
|
2402
|
+
role: "status",
|
|
2403
|
+
"aria-label": `Status: ${status}`,
|
|
2404
|
+
"data-testid": `status-badge-${status}`,
|
|
2405
|
+
className: `inline-flex items-center gap-1.5 rounded-full border font-semibold backdrop-blur-sm ${SIZE_STYLES[size]} ${toneStyle.container} ${className}`,
|
|
2406
|
+
children: [
|
|
2407
|
+
IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-3 w-3 ${configuredStatus.animateIcon ? "animate-spin motion-reduce:animate-none" : ""}` }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${toneStyle.dot}` }),
|
|
2408
|
+
resolvedLabel2
|
|
2409
|
+
]
|
|
2410
|
+
}
|
|
2411
|
+
);
|
|
2412
|
+
}
|
|
2413
|
+
const legacyStyle = LEGACY_STATUS_STYLES[status] ?? DEFAULT_LEGACY_STYLE;
|
|
2414
|
+
const legacyDot = LEGACY_DOT_STYLES[status] ?? "bg-slate-500";
|
|
2415
|
+
const resolvedLabel = label ?? status;
|
|
2416
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2417
|
+
"div",
|
|
2418
|
+
{
|
|
2419
|
+
ref,
|
|
2420
|
+
role: "status",
|
|
2421
|
+
"aria-label": `Status: ${status}`,
|
|
2422
|
+
"data-testid": `status-badge-${status}`,
|
|
2423
|
+
className: `inline-flex items-center gap-1.5 rounded-full border font-semibold ${SIZE_STYLES[size]} ${legacyStyle} ${className}`,
|
|
2424
|
+
children: [
|
|
2425
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${legacyDot}` }),
|
|
2426
|
+
resolvedLabel
|
|
2427
|
+
]
|
|
2428
|
+
}
|
|
2429
|
+
);
|
|
2430
|
+
});
|
|
2431
|
+
function classNames(...classes) {
|
|
2432
|
+
return classes.filter(Boolean).join(" ");
|
|
2433
|
+
}
|
|
2434
|
+
function StepTimeline({
|
|
2435
|
+
steps,
|
|
2436
|
+
progressLabel,
|
|
2437
|
+
onStepClick,
|
|
2438
|
+
renderCompleteContent
|
|
2439
|
+
}) {
|
|
2440
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:border-t lg:border-b lg:border-gray-200 dark:lg:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": progressLabel, className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2441
|
+
"ol",
|
|
2442
|
+
{
|
|
2443
|
+
role: "list",
|
|
2444
|
+
className: "overflow-hidden rounded-md lg:flex lg:rounded-none lg:border-r lg:border-l lg:border-gray-200 dark:lg:border-white/15",
|
|
2445
|
+
children: steps.map((step2, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2446
|
+
"button",
|
|
2447
|
+
{
|
|
2448
|
+
type: "button",
|
|
2449
|
+
onClick: () => onStepClick?.(stepIndex),
|
|
2450
|
+
disabled: step2.status === "upcoming",
|
|
2451
|
+
className: classNames(
|
|
2452
|
+
step2.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
2453
|
+
stepIndex === 0 ? "rounded-t-md border-b-0" : "",
|
|
2454
|
+
stepIndex === steps.length - 1 ? "rounded-b-md border-t-0" : "",
|
|
2455
|
+
"w-full overflow-hidden border border-gray-200 text-left transition-colors lg:border-0 dark:border-white/15"
|
|
2456
|
+
),
|
|
2457
|
+
children: [
|
|
2458
|
+
step2.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
|
|
2459
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2460
|
+
"span",
|
|
2461
|
+
{
|
|
2462
|
+
"aria-hidden": "true",
|
|
2463
|
+
className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
|
|
2464
|
+
}
|
|
2465
|
+
),
|
|
2466
|
+
renderCompleteContent ? renderCompleteContent(step2) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
2467
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx(solid$1.CheckIcon, { "aria-hidden": "true", className: "h-5 w-5 text-white" }) }) }),
|
|
2468
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
2469
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step2.name }),
|
|
2470
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
2471
|
+
] })
|
|
2472
|
+
] })
|
|
2473
|
+
] }) : step2.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
|
|
2474
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2475
|
+
"span",
|
|
2476
|
+
{
|
|
2477
|
+
"aria-hidden": "true",
|
|
2478
|
+
className: "absolute top-0 left-0 h-full w-1 bg-blue-600 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:bg-blue-500"
|
|
2479
|
+
}
|
|
2480
|
+
),
|
|
2481
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
2482
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step2.id }) }) }),
|
|
2483
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
2484
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step2.name }),
|
|
2485
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
2486
|
+
] })
|
|
2487
|
+
] })
|
|
2488
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
|
|
2489
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2490
|
+
"span",
|
|
2491
|
+
{
|
|
2492
|
+
"aria-hidden": "true",
|
|
2493
|
+
className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
|
|
2494
|
+
}
|
|
2495
|
+
),
|
|
2496
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
2497
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step2.id }) }) }),
|
|
2498
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
2499
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.name }),
|
|
2500
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
2501
|
+
] })
|
|
2502
|
+
] })
|
|
2503
|
+
] }),
|
|
2504
|
+
stepIndex !== 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute inset-0 top-0 left-0 hidden w-3 lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2505
|
+
"svg",
|
|
2506
|
+
{
|
|
2507
|
+
fill: "none",
|
|
2508
|
+
viewBox: "0 0 12 82",
|
|
2509
|
+
preserveAspectRatio: "none",
|
|
2510
|
+
className: "h-full w-full text-gray-200 dark:text-white/15",
|
|
2511
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0.5 0V31L10.5 41L0.5 51V82", stroke: "currentColor", vectorEffect: "non-scaling-stroke" })
|
|
2512
|
+
}
|
|
2513
|
+
) }) : null
|
|
2514
|
+
]
|
|
2515
|
+
}
|
|
2516
|
+
) }, step2.id))
|
|
2517
|
+
}
|
|
2518
|
+
) }) });
|
|
2519
|
+
}
|
|
2520
|
+
function AgentAnalysisCard({ name, avatar, duration, output }) {
|
|
2521
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3 transition-all duration-300", children: [
|
|
2522
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
|
|
2523
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-lg" }),
|
|
2524
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2525
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-semibold text-white", children: name }),
|
|
2526
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[8px] text-gray-500", children: duration })
|
|
2527
|
+
] }),
|
|
2528
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-3.5 w-3.5 text-emerald-400 shrink-0" })
|
|
2529
|
+
] }),
|
|
2530
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: output })
|
|
2531
|
+
] });
|
|
2532
|
+
}
|
|
2533
|
+
function DashboardView({
|
|
2534
|
+
spec,
|
|
2535
|
+
className,
|
|
2536
|
+
renderInputRequest
|
|
2537
|
+
}) {
|
|
2538
|
+
const layout = spec.layout ?? "grid";
|
|
2539
|
+
const hasCharts = (spec.charts?.length ?? 0) > 0;
|
|
2540
|
+
const chartGrid = layout === "grid" && (spec.charts?.length ?? 0) > 1 ? "grid grid-cols-1 gap-4 lg:grid-cols-2" : "grid grid-cols-1 gap-4";
|
|
2541
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className ?? "space-y-6", children: [
|
|
2542
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { children: [
|
|
2543
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-semibold text-slate-900 dark:text-slate-100", children: spec.title }),
|
|
2544
|
+
spec.subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-slate-500 dark:text-slate-400", children: spec.subtitle })
|
|
2545
|
+
] }),
|
|
2546
|
+
spec.kpis && spec.kpis.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2547
|
+
"section",
|
|
2548
|
+
{
|
|
2549
|
+
className: spec.kpis.length > 3 ? "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4" : "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
2550
|
+
children: spec.kpis.map((kpi, index) => /* @__PURE__ */ jsxRuntime.jsx(KpiCard, { kpi }, `${kpi.label}-${index}`))
|
|
2551
|
+
}
|
|
2552
|
+
),
|
|
2553
|
+
hasCharts && /* @__PURE__ */ jsxRuntime.jsx("section", { className: chartGrid, children: spec.charts?.map((chart, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2554
|
+
"div",
|
|
2555
|
+
{
|
|
2556
|
+
className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900",
|
|
2557
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ChartRenderer, { spec: chart })
|
|
2558
|
+
},
|
|
2559
|
+
`${chart.title}-${index}`
|
|
2560
|
+
)) }),
|
|
2561
|
+
spec.table && spec.table.rows.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900", children: [
|
|
2562
|
+
spec.table.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "border-b border-zinc-950/10 px-5 py-3 text-sm font-semibold text-slate-900 dark:border-white/10 dark:text-slate-100", children: spec.table.title }),
|
|
2563
|
+
/* @__PURE__ */ jsxRuntime.jsx(DashboardTableView, { table: spec.table })
|
|
2564
|
+
] }),
|
|
2565
|
+
spec.recommendation && spec.recommendation.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-indigo-500/20 bg-indigo-500/5 p-4 dark:border-indigo-400/30 dark:bg-indigo-500/10", children: [
|
|
2566
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-indigo-700 dark:text-indigo-300", children: "Recommendation" }),
|
|
2567
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-indigo-900 dark:text-indigo-100", children: spec.recommendation })
|
|
2568
|
+
] }),
|
|
2569
|
+
spec.sections && spec.sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children: spec.sections.map((section, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2570
|
+
DashboardSectionRenderer,
|
|
2571
|
+
{
|
|
2572
|
+
section,
|
|
2573
|
+
renderInputRequest
|
|
2574
|
+
},
|
|
2575
|
+
`${section.type}-${index}`
|
|
2576
|
+
)) }),
|
|
2577
|
+
spec.meta && Object.keys(spec.meta).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "flex flex-wrap gap-4 text-[10px] text-slate-400 dark:text-slate-500", children: Object.entries(spec.meta).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2578
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold uppercase tracking-wide", children: key }),
|
|
2579
|
+
": ",
|
|
2580
|
+
value
|
|
2581
|
+
] }, key)) })
|
|
2582
|
+
] });
|
|
2583
|
+
}
|
|
2584
|
+
function KpiCard({ kpi }) {
|
|
2585
|
+
const value = typeof kpi.value === "number" ? formatNumber(kpi.value) : kpi.value;
|
|
2586
|
+
const displayValue = kpi.unit ? `${value}${kpi.unit}` : value;
|
|
2587
|
+
const variant = kpi.tone ?? "default";
|
|
2588
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2589
|
+
MetricCard,
|
|
2590
|
+
{
|
|
2591
|
+
title: kpi.label,
|
|
2592
|
+
value: displayValue,
|
|
2593
|
+
variant,
|
|
2594
|
+
trend: kpi.deltaPct !== void 0 ? { value: kpi.deltaPct } : void 0
|
|
2595
|
+
}
|
|
2596
|
+
);
|
|
2597
|
+
}
|
|
2598
|
+
function DashboardTableView({ table }) {
|
|
2599
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700", children: [
|
|
2600
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-zinc-50 dark:bg-zinc-800/50", children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: table.columns.map((column) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2601
|
+
"th",
|
|
2602
|
+
{
|
|
2603
|
+
scope: "col",
|
|
2604
|
+
className: `px-4 py-2 text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400 ${columnAlign(column.align)}`,
|
|
2605
|
+
children: column.label
|
|
2606
|
+
},
|
|
2607
|
+
column.key
|
|
2608
|
+
)) }) }),
|
|
2609
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-zinc-100 dark:divide-zinc-800", children: table.rows.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "hover:bg-zinc-50/70 dark:hover:bg-zinc-800/30", children: table.columns.map((column) => {
|
|
2610
|
+
const raw = row[column.key] ?? "";
|
|
2611
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2612
|
+
"td",
|
|
2613
|
+
{
|
|
2614
|
+
className: `px-4 py-2 text-slate-700 dark:text-slate-300 ${columnAlign(column.align)}`,
|
|
2615
|
+
children: formatCell(raw, column.format)
|
|
2616
|
+
},
|
|
2617
|
+
column.key
|
|
2618
|
+
);
|
|
2619
|
+
}) }, rowIndex)) })
|
|
2620
|
+
] }) });
|
|
2621
|
+
}
|
|
2622
|
+
function columnAlign(align) {
|
|
2623
|
+
if (align === "right") return "text-right";
|
|
2624
|
+
if (align === "center") return "text-center";
|
|
2625
|
+
return "text-left";
|
|
2626
|
+
}
|
|
2627
|
+
function formatCell(value, format3) {
|
|
2628
|
+
if (value === null || value === void 0 || value === "") return "\u2014";
|
|
2629
|
+
if (format3 === "currency" && typeof value === "number") {
|
|
2630
|
+
return new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" }).format(value);
|
|
2631
|
+
}
|
|
2632
|
+
if (format3 === "percent" && typeof value === "number") {
|
|
2633
|
+
return `${(value * 100).toFixed(1)}%`;
|
|
2634
|
+
}
|
|
2635
|
+
if (format3 === "number" && typeof value === "number") {
|
|
2636
|
+
return formatNumber(value);
|
|
2637
|
+
}
|
|
2638
|
+
return String(value);
|
|
2639
|
+
}
|
|
2640
|
+
function formatNumber(value) {
|
|
2641
|
+
if (Math.abs(value) >= 1e3) return new Intl.NumberFormat("en-US").format(Math.round(value));
|
|
2642
|
+
return value.toFixed(Math.abs(value) < 10 ? 2 : 1);
|
|
2643
|
+
}
|
|
2644
|
+
function DashboardSectionRenderer({
|
|
2645
|
+
section,
|
|
2646
|
+
renderInputRequest
|
|
2647
|
+
}) {
|
|
2648
|
+
switch (section.type) {
|
|
2649
|
+
case "entity":
|
|
2650
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EntitySection, { data: section.data });
|
|
2651
|
+
case "narrative":
|
|
2652
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NarrativeSection, { data: section.data });
|
|
2653
|
+
case "lifecycle":
|
|
2654
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LifecycleSection, { data: section.data });
|
|
2655
|
+
case "receipt":
|
|
2656
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReceiptSection, { data: section.data });
|
|
2657
|
+
case "approval":
|
|
2658
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ApprovalSection, { data: section.data });
|
|
2659
|
+
case "fiscal":
|
|
2660
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FiscalSection, { data: section.data });
|
|
2661
|
+
case "feed":
|
|
2662
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FeedSection, { data: section.data });
|
|
2663
|
+
case "score":
|
|
2664
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScoreSection, { data: section.data });
|
|
2665
|
+
case "note":
|
|
2666
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NoteSection, { data: section.data });
|
|
2667
|
+
case "input_request":
|
|
2668
|
+
return renderInputRequest ? /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderInputRequest(section.data) }) : /* @__PURE__ */ jsxRuntime.jsx(InputRequestReadOnly, { data: section.data });
|
|
2669
|
+
default:
|
|
2670
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NoteSection, { data: { body: JSON.stringify(section, null, 2), tone: "info" } });
|
|
2671
|
+
}
|
|
2672
|
+
}
|
|
2673
|
+
function InputRequestReadOnly({ data }) {
|
|
2674
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-sky-500/20 bg-sky-500/5 p-4 dark:border-sky-400/30 dark:bg-sky-500/10", children: [
|
|
2675
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.prompt }),
|
|
2676
|
+
data.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-400", children: data.description }),
|
|
2677
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-3 space-y-1", children: data.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "text-xs", children: [
|
|
2678
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-medium text-slate-700 dark:text-slate-300", children: [
|
|
2679
|
+
field.label,
|
|
2680
|
+
field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-rose-500", children: "*" })
|
|
2681
|
+
] }),
|
|
2682
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-2 text-slate-500 dark:text-slate-400", children: [
|
|
2683
|
+
"(",
|
|
2684
|
+
field.kind,
|
|
2685
|
+
")"
|
|
2686
|
+
] })
|
|
2687
|
+
] }, field.key)) }),
|
|
2688
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-[11px] italic text-slate-500 dark:text-slate-400", children: "Esta requisi\xE7\xE3o requer entrada do operador \u2014 abra a run ao vivo para responder." })
|
|
2689
|
+
] });
|
|
2690
|
+
}
|
|
2691
|
+
function EntitySection({ data }) {
|
|
2692
|
+
const statusKey = data.status?.tone === "success" ? "success" : data.status?.tone === "danger" ? "error" : data.status?.tone === "warning" ? "pending" : data.status?.tone === "info" ? "processing" : "active";
|
|
2693
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2694
|
+
EntityCard,
|
|
2695
|
+
{
|
|
2696
|
+
title: data.title,
|
|
2697
|
+
subtitle: data.subtitle,
|
|
2698
|
+
status: data.status ? /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: statusKey, label: data.status.label }) : void 0,
|
|
2699
|
+
children: data.fields && data.fields.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2700
|
+
ItemSummary,
|
|
2701
|
+
{
|
|
2702
|
+
title: "",
|
|
2703
|
+
metadata: data.fields.map((f) => ({ label: f.label, value: String(f.value) }))
|
|
2704
|
+
}
|
|
2705
|
+
)
|
|
2706
|
+
}
|
|
2707
|
+
);
|
|
2708
|
+
}
|
|
2709
|
+
function NarrativeSection({ data }) {
|
|
2710
|
+
if (data.agent) {
|
|
2711
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2712
|
+
AgentAnalysisCard,
|
|
2713
|
+
{
|
|
2714
|
+
name: data.agent.name,
|
|
2715
|
+
avatar: data.agent.avatarUrl ?? "",
|
|
2716
|
+
duration: data.durationMs !== void 0 ? `${(data.durationMs / 1e3).toFixed(1)}s` : "",
|
|
2717
|
+
output: data.body
|
|
2718
|
+
}
|
|
2719
|
+
);
|
|
2720
|
+
}
|
|
2721
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
|
|
2722
|
+
data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
|
|
2723
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-line text-sm leading-relaxed text-slate-700 dark:text-slate-300", children: data.body })
|
|
2724
|
+
] });
|
|
2725
|
+
}
|
|
2726
|
+
function LifecycleSection({ data }) {
|
|
2727
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
|
|
2728
|
+
data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-3 text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
|
|
2729
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2730
|
+
StepTimeline,
|
|
2731
|
+
{
|
|
2732
|
+
steps: data.steps,
|
|
2733
|
+
progressLabel: data.progressLabel ?? data.title ?? "Progress"
|
|
2734
|
+
}
|
|
2735
|
+
)
|
|
2736
|
+
] });
|
|
2737
|
+
}
|
|
2738
|
+
function ReceiptSection({ data }) {
|
|
2739
|
+
const currency = data.currency ?? "BRL";
|
|
2740
|
+
const fmt = (v) => typeof v === "number" ? new Intl.NumberFormat("pt-BR", { style: "currency", currency }).format(v) : v;
|
|
2741
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900", children: [
|
|
2742
|
+
data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "border-b border-zinc-950/10 px-5 py-3 text-sm font-semibold text-slate-900 dark:border-white/10 dark:text-slate-100", children: data.title }),
|
|
2743
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "min-w-full divide-y divide-zinc-200 text-sm dark:divide-zinc-700", children: [
|
|
2744
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-zinc-50 dark:bg-zinc-800/50", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2745
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-left text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Item" }),
|
|
2746
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Qtd" }),
|
|
2747
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Unit." }),
|
|
2748
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-4 py-2 text-right text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Total" })
|
|
2749
|
+
] }) }),
|
|
2750
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-zinc-100 dark:divide-zinc-800", children: data.items.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2751
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-left text-slate-700 dark:text-slate-300", children: item.description }),
|
|
2752
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-slate-700 dark:text-slate-300", children: item.quantity }),
|
|
2753
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-slate-700 dark:text-slate-300", children: fmt(item.unitPrice) }),
|
|
2754
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right font-medium text-slate-900 dark:text-slate-100", children: fmt(item.total) })
|
|
2755
|
+
] }, i)) }),
|
|
2756
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tfoot", { className: "border-t border-zinc-200 dark:border-zinc-700", children: [
|
|
2757
|
+
data.subtotal !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2758
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-1.5 text-right text-xs text-slate-500", children: "Subtotal" }),
|
|
2759
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-1.5 text-right text-xs text-slate-700 dark:text-slate-300", children: fmt(data.subtotal) })
|
|
2760
|
+
] }),
|
|
2761
|
+
data.tax !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2762
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-1.5 text-right text-xs text-slate-500", children: "Tributos" }),
|
|
2763
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-1.5 text-right text-xs text-slate-700 dark:text-slate-300", children: fmt(data.tax) })
|
|
2764
|
+
] }),
|
|
2765
|
+
/* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
2766
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 3, className: "px-4 py-2 text-right text-sm font-semibold text-slate-900 dark:text-slate-100", children: "Total" }),
|
|
2767
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-2 text-right text-sm font-semibold text-slate-900 dark:text-slate-100", children: fmt(data.total) })
|
|
2768
|
+
] })
|
|
2769
|
+
] })
|
|
2770
|
+
] }) })
|
|
2771
|
+
] });
|
|
2772
|
+
}
|
|
2773
|
+
function ApprovalSection({ data }) {
|
|
2774
|
+
const tone = data.decision === "approved" ? "success" : data.decision === "rejected" ? "danger" : "warning";
|
|
2775
|
+
const accentClasses = TONE_BLOCK[tone];
|
|
2776
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: `rounded-xl border p-4 ${accentClasses}`, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2777
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2778
|
+
data.prompt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-slate-500 dark:text-slate-400", children: data.prompt }),
|
|
2779
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-sm font-semibold capitalize text-slate-900 dark:text-slate-100", children: [
|
|
2780
|
+
data.decision,
|
|
2781
|
+
data.by?.name && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-normal text-slate-500 dark:text-slate-400", children: [
|
|
2782
|
+
" ",
|
|
2783
|
+
"\u2014 ",
|
|
2784
|
+
data.by.name
|
|
2785
|
+
] })
|
|
2786
|
+
] }),
|
|
2787
|
+
data.reason && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-700 dark:text-slate-300", children: data.reason })
|
|
2788
|
+
] }),
|
|
2789
|
+
data.at && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] uppercase tracking-wide text-slate-500 dark:text-slate-400", children: formatTimestamp(data.at) })
|
|
2790
|
+
] }) });
|
|
2791
|
+
}
|
|
2792
|
+
function FiscalSection({ data }) {
|
|
2793
|
+
const env = data.environment ?? "homologation";
|
|
2794
|
+
const envLabel = env === "production" ? "Produ\xE7\xE3o (SEFAZ)" : "Homologa\xE7\xE3o (sandbox)";
|
|
2795
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-emerald-500/20 bg-emerald-500/5 p-4 dark:border-emerald-400/30 dark:bg-emerald-500/10", children: [
|
|
2796
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-emerald-800 dark:text-emerald-200", children: "NF-e emitida" }),
|
|
2797
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "mt-2 grid grid-cols-1 gap-x-4 gap-y-1 text-xs sm:grid-cols-2", children: [
|
|
2798
|
+
data.number && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2799
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "N\xFAmero" }),
|
|
2800
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium text-emerald-900 dark:text-emerald-100", children: data.number })
|
|
2801
|
+
] }),
|
|
2802
|
+
data.accessKey && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
|
|
2803
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Chave de acesso" }),
|
|
2804
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "break-all font-mono text-[11px] text-emerald-900 dark:text-emerald-100", children: data.accessKey })
|
|
2805
|
+
] }),
|
|
2806
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2807
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Ambiente" }),
|
|
2808
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: "font-medium text-emerald-900 dark:text-emerald-100", children: envLabel })
|
|
2809
|
+
] }),
|
|
2810
|
+
data.statusUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
|
|
2811
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-emerald-700/70 dark:text-emerald-300/70", children: "Status" }),
|
|
2812
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2813
|
+
"a",
|
|
2814
|
+
{
|
|
2815
|
+
href: data.statusUrl,
|
|
2816
|
+
target: "_blank",
|
|
2817
|
+
rel: "noreferrer",
|
|
2818
|
+
className: "text-emerald-900 underline hover:text-emerald-700 dark:text-emerald-100",
|
|
2819
|
+
children: data.statusUrl
|
|
2820
|
+
}
|
|
2821
|
+
) })
|
|
2822
|
+
] })
|
|
2823
|
+
] })
|
|
2824
|
+
] });
|
|
2825
|
+
}
|
|
2826
|
+
function FeedSection({ data }) {
|
|
2827
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: [
|
|
2828
|
+
data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-2 text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
|
|
2829
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2", children: data.items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2830
|
+
"li",
|
|
2831
|
+
{
|
|
2832
|
+
className: `rounded-lg border px-3 py-2 ${TONE_BLOCK[item.tone ?? "default"]}`,
|
|
2833
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
2834
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
|
|
2835
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium text-slate-900 dark:text-slate-100", children: item.title }),
|
|
2836
|
+
item.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-slate-600 dark:text-slate-400", children: item.description })
|
|
2837
|
+
] }),
|
|
2838
|
+
item.timestamp && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-[10px] uppercase tracking-wide text-slate-500 dark:text-slate-400", children: formatTimestamp(item.timestamp) })
|
|
2839
|
+
] })
|
|
2840
|
+
},
|
|
2841
|
+
index
|
|
2842
|
+
)) })
|
|
2843
|
+
] });
|
|
2844
|
+
}
|
|
2845
|
+
function ScoreSection({ data }) {
|
|
2846
|
+
const tone = data.score >= 70 ? "success" : data.score >= 40 ? "warning" : "danger";
|
|
2847
|
+
const variant = tone;
|
|
2848
|
+
return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "rounded-xl border border-zinc-950/10 bg-white p-4 dark:border-white/10 dark:bg-zinc-900", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-3", children: [
|
|
2849
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2850
|
+
MetricCard,
|
|
2851
|
+
{
|
|
2852
|
+
title: data.label,
|
|
2853
|
+
value: `${Math.round(data.score)}`,
|
|
2854
|
+
variant
|
|
2855
|
+
}
|
|
2856
|
+
),
|
|
2857
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sm:col-span-2", children: [
|
|
2858
|
+
data.qualification && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium capitalize text-slate-900 dark:text-slate-100", children: data.qualification }),
|
|
2859
|
+
data.reasoning && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs leading-relaxed text-slate-600 dark:text-slate-400", children: data.reasoning })
|
|
2860
|
+
] })
|
|
2861
|
+
] }) });
|
|
2862
|
+
}
|
|
2863
|
+
function NoteSection({ data }) {
|
|
2864
|
+
const accentClasses = TONE_BLOCK[data.tone ?? "default"];
|
|
2865
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: `rounded-xl border p-4 ${accentClasses}`, children: [
|
|
2866
|
+
data.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.title }),
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-line text-sm text-slate-700 dark:text-slate-300", children: data.body })
|
|
2868
|
+
] });
|
|
2869
|
+
}
|
|
2870
|
+
var TONE_BLOCK = {
|
|
2871
|
+
default: "border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900",
|
|
2872
|
+
info: "border-sky-500/20 bg-sky-500/5 dark:border-sky-400/30 dark:bg-sky-500/10",
|
|
2873
|
+
success: "border-emerald-500/20 bg-emerald-500/5 dark:border-emerald-400/30 dark:bg-emerald-500/10",
|
|
2874
|
+
warning: "border-amber-500/20 bg-amber-500/5 dark:border-amber-400/30 dark:bg-amber-500/10",
|
|
2875
|
+
danger: "border-rose-500/20 bg-rose-500/5 dark:border-rose-400/30 dark:bg-rose-500/10"
|
|
2876
|
+
};
|
|
2877
|
+
function formatTimestamp(iso) {
|
|
2878
|
+
try {
|
|
2879
|
+
const dt = new Date(iso);
|
|
2880
|
+
if (Number.isNaN(dt.getTime())) return iso;
|
|
2881
|
+
return dt.toLocaleString("pt-BR", {
|
|
2882
|
+
day: "2-digit",
|
|
2883
|
+
month: "2-digit",
|
|
2884
|
+
hour: "2-digit",
|
|
2885
|
+
minute: "2-digit"
|
|
2886
|
+
});
|
|
2887
|
+
} catch {
|
|
2888
|
+
return iso;
|
|
2889
|
+
}
|
|
2890
|
+
}
|
|
2891
|
+
function InputRequestForm({
|
|
2892
|
+
runId,
|
|
2893
|
+
data,
|
|
2894
|
+
onResolved
|
|
2895
|
+
}) {
|
|
2896
|
+
const [values, setValues] = React12.useState(
|
|
2897
|
+
() => initialValues(data.fields)
|
|
2898
|
+
);
|
|
2899
|
+
const [submitting, setSubmitting] = React12.useState(false);
|
|
2900
|
+
const [resolved, setResolved] = React12.useState(null);
|
|
2901
|
+
const [error, setError] = React12.useState(null);
|
|
2902
|
+
async function submit(decision) {
|
|
2903
|
+
if (submitting || resolved) return;
|
|
2904
|
+
setSubmitting(true);
|
|
2905
|
+
setError(null);
|
|
2906
|
+
try {
|
|
2907
|
+
const payload = decision === "approved" ? sanitizeForSubmit(values) : void 0;
|
|
2908
|
+
const reason = decision === "rejected" ? typeof values.reason === "string" ? values.reason : "rejected" : void 0;
|
|
2909
|
+
await chunkL5VEY7G4_js.submitApproval(runId, data.nodeId, {
|
|
2910
|
+
approved: decision === "approved",
|
|
2911
|
+
...payload ? { payload } : {},
|
|
2912
|
+
...reason ? { reason } : {}
|
|
2913
|
+
});
|
|
2914
|
+
setResolved({
|
|
2915
|
+
approved: decision === "approved",
|
|
2916
|
+
message: decision === "approved" ? "Aprovado \u2014 workflow retomado." : "Rejeitado \u2014 workflow encerrado."
|
|
2917
|
+
});
|
|
2918
|
+
onResolved?.({
|
|
2919
|
+
approved: decision === "approved",
|
|
2920
|
+
payload: payload ?? {}
|
|
2921
|
+
});
|
|
2922
|
+
} catch (e) {
|
|
2923
|
+
setError(
|
|
2924
|
+
e instanceof Error ? e.message : "Falha ao registrar a decis\xE3o."
|
|
2925
|
+
);
|
|
2926
|
+
} finally {
|
|
2927
|
+
setSubmitting(false);
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
function onFieldChange(key, value) {
|
|
2931
|
+
setValues((prev) => ({ ...prev, [key]: value }));
|
|
2932
|
+
}
|
|
2933
|
+
function onSubmitForm(event) {
|
|
2934
|
+
event.preventDefault();
|
|
2935
|
+
void submit("approved");
|
|
2936
|
+
}
|
|
2937
|
+
const accentClasses = TONE_BLOCK2[data.tone ?? "info"];
|
|
2938
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2939
|
+
"form",
|
|
2940
|
+
{
|
|
2941
|
+
onSubmit: onSubmitForm,
|
|
2942
|
+
className: `rounded-xl border p-4 ${accentClasses}`,
|
|
2943
|
+
children: [
|
|
2944
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
2945
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-slate-900 dark:text-slate-100", children: data.prompt }),
|
|
2946
|
+
data.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-slate-600 dark:text-slate-400", children: data.description })
|
|
2947
|
+
] }),
|
|
2948
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-3", children: data.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2949
|
+
FieldInput,
|
|
2950
|
+
{
|
|
2951
|
+
field,
|
|
2952
|
+
value: values[field.key],
|
|
2953
|
+
disabled: submitting || Boolean(resolved),
|
|
2954
|
+
onChange: (value) => onFieldChange(field.key, value)
|
|
2955
|
+
},
|
|
2956
|
+
field.key
|
|
2957
|
+
)) }),
|
|
2958
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-xs text-rose-700 dark:text-rose-300", children: error }),
|
|
2959
|
+
resolved ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-xs font-medium text-emerald-800 dark:text-emerald-200", children: resolved.message }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex flex-wrap items-center justify-end gap-2", children: [
|
|
2960
|
+
data.rejectLabel !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2961
|
+
"button",
|
|
2962
|
+
{
|
|
2963
|
+
type: "button",
|
|
2964
|
+
disabled: submitting,
|
|
2965
|
+
onClick: () => submit("rejected"),
|
|
2966
|
+
className: "rounded-md border border-rose-500/30 bg-rose-500/5 px-3 py-1.5 text-sm font-medium text-rose-700 hover:bg-rose-500/10 disabled:opacity-50 dark:text-rose-300",
|
|
2967
|
+
children: data.rejectLabel ?? "Rejeitar"
|
|
2968
|
+
}
|
|
2969
|
+
),
|
|
2970
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2971
|
+
"button",
|
|
2972
|
+
{
|
|
2973
|
+
type: "submit",
|
|
2974
|
+
disabled: submitting,
|
|
2975
|
+
className: "rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500 disabled:opacity-50",
|
|
2976
|
+
children: submitting ? "Enviando\u2026" : data.submitLabel ?? "Aprovar"
|
|
2977
|
+
}
|
|
2978
|
+
)
|
|
2979
|
+
] })
|
|
2980
|
+
]
|
|
2981
|
+
}
|
|
2982
|
+
);
|
|
2983
|
+
}
|
|
2984
|
+
function FieldInput({
|
|
2985
|
+
field,
|
|
2986
|
+
value,
|
|
2987
|
+
disabled,
|
|
2988
|
+
onChange
|
|
2989
|
+
}) {
|
|
2990
|
+
const labelEl = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2991
|
+
"label",
|
|
2992
|
+
{
|
|
2993
|
+
htmlFor: `input-${field.key}`,
|
|
2994
|
+
className: "block text-xs font-medium text-slate-700 dark:text-slate-300",
|
|
2995
|
+
children: [
|
|
2996
|
+
field.label,
|
|
2997
|
+
field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-rose-500", children: "*" })
|
|
2998
|
+
]
|
|
2999
|
+
}
|
|
3000
|
+
);
|
|
3001
|
+
const helpEl = field.helpText ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-[11px] text-slate-500 dark:text-slate-400", children: field.helpText }) : null;
|
|
3002
|
+
switch (field.kind) {
|
|
3003
|
+
case "text":
|
|
3004
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3005
|
+
labelEl,
|
|
3006
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3007
|
+
"input",
|
|
3008
|
+
{
|
|
3009
|
+
id: `input-${field.key}`,
|
|
3010
|
+
type: "text",
|
|
3011
|
+
disabled,
|
|
3012
|
+
required: field.required,
|
|
3013
|
+
placeholder: field.placeholder,
|
|
3014
|
+
value: typeof value === "string" ? value : "",
|
|
3015
|
+
onChange: (e) => onChange(e.target.value),
|
|
3016
|
+
className: INPUT_CLASSES
|
|
3017
|
+
}
|
|
3018
|
+
),
|
|
3019
|
+
helpEl
|
|
3020
|
+
] });
|
|
3021
|
+
case "number":
|
|
3022
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3023
|
+
labelEl,
|
|
3024
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3025
|
+
"input",
|
|
3026
|
+
{
|
|
3027
|
+
id: `input-${field.key}`,
|
|
3028
|
+
type: "number",
|
|
3029
|
+
disabled,
|
|
3030
|
+
required: field.required,
|
|
3031
|
+
placeholder: field.placeholder,
|
|
3032
|
+
min: field.min,
|
|
3033
|
+
max: field.max,
|
|
3034
|
+
step: field.step,
|
|
3035
|
+
value: typeof value === "number" ? value : typeof value === "string" ? value : "",
|
|
3036
|
+
onChange: (e) => {
|
|
3037
|
+
const raw = e.target.value;
|
|
3038
|
+
onChange(raw === "" ? "" : Number(raw));
|
|
3039
|
+
},
|
|
3040
|
+
className: INPUT_CLASSES
|
|
3041
|
+
}
|
|
3042
|
+
),
|
|
3043
|
+
helpEl
|
|
3044
|
+
] });
|
|
3045
|
+
case "textarea":
|
|
3046
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3047
|
+
labelEl,
|
|
3048
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3049
|
+
"textarea",
|
|
3050
|
+
{
|
|
3051
|
+
id: `input-${field.key}`,
|
|
3052
|
+
disabled,
|
|
3053
|
+
required: field.required,
|
|
3054
|
+
placeholder: field.placeholder,
|
|
3055
|
+
rows: field.rows ?? 3,
|
|
3056
|
+
value: typeof value === "string" ? value : "",
|
|
3057
|
+
onChange: (e) => onChange(e.target.value),
|
|
3058
|
+
className: INPUT_CLASSES
|
|
3059
|
+
}
|
|
3060
|
+
),
|
|
3061
|
+
helpEl
|
|
3062
|
+
] });
|
|
3063
|
+
case "select":
|
|
3064
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
3065
|
+
labelEl,
|
|
3066
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3067
|
+
"select",
|
|
3068
|
+
{
|
|
3069
|
+
id: `input-${field.key}`,
|
|
3070
|
+
disabled,
|
|
3071
|
+
required: field.required,
|
|
3072
|
+
value: typeof value === "string" ? value : "",
|
|
3073
|
+
onChange: (e) => onChange(e.target.value),
|
|
3074
|
+
className: INPUT_CLASSES,
|
|
3075
|
+
children: [
|
|
3076
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: "Selecione\u2026" }),
|
|
3077
|
+
field.options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))
|
|
3078
|
+
]
|
|
3079
|
+
}
|
|
3080
|
+
),
|
|
3081
|
+
helpEl
|
|
3082
|
+
] });
|
|
3083
|
+
case "boolean":
|
|
3084
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3085
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3086
|
+
"input",
|
|
3087
|
+
{
|
|
3088
|
+
id: `input-${field.key}`,
|
|
3089
|
+
type: "checkbox",
|
|
3090
|
+
disabled,
|
|
3091
|
+
checked: Boolean(value),
|
|
3092
|
+
onChange: (e) => onChange(e.target.checked),
|
|
3093
|
+
className: "h-4 w-4 rounded border-zinc-300 text-emerald-600 focus:ring-emerald-500"
|
|
3094
|
+
}
|
|
3095
|
+
),
|
|
3096
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3097
|
+
"label",
|
|
3098
|
+
{
|
|
3099
|
+
htmlFor: `input-${field.key}`,
|
|
3100
|
+
className: "text-xs text-slate-700 dark:text-slate-300",
|
|
3101
|
+
children: field.label
|
|
3102
|
+
}
|
|
3103
|
+
)
|
|
3104
|
+
] });
|
|
3105
|
+
default:
|
|
3106
|
+
return null;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
function initialValues(fields) {
|
|
3110
|
+
const out = {};
|
|
3111
|
+
for (const field of fields) {
|
|
3112
|
+
if ("defaultValue" in field && field.defaultValue !== void 0) {
|
|
3113
|
+
out[field.key] = field.defaultValue;
|
|
3114
|
+
} else if (field.kind === "boolean") {
|
|
3115
|
+
out[field.key] = false;
|
|
3116
|
+
} else {
|
|
3117
|
+
out[field.key] = "";
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
3120
|
+
return out;
|
|
3121
|
+
}
|
|
3122
|
+
function sanitizeForSubmit(values) {
|
|
3123
|
+
const out = {};
|
|
3124
|
+
for (const [key, value] of Object.entries(values)) {
|
|
3125
|
+
if (value === "" || value === void 0) continue;
|
|
3126
|
+
out[key] = value;
|
|
3127
|
+
}
|
|
3128
|
+
return out;
|
|
3129
|
+
}
|
|
3130
|
+
var INPUT_CLASSES = "mt-1 block w-full rounded-md border border-zinc-300 bg-white px-2.5 py-1.5 text-sm text-slate-900 shadow-sm focus:border-emerald-500 focus:outline-none focus:ring-1 focus:ring-emerald-500 disabled:opacity-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-slate-100";
|
|
3131
|
+
var TONE_BLOCK2 = {
|
|
3132
|
+
default: "border-zinc-950/10 bg-white dark:border-white/10 dark:bg-zinc-900",
|
|
3133
|
+
info: "border-sky-500/20 bg-sky-500/5 dark:border-sky-400/30 dark:bg-sky-500/10",
|
|
3134
|
+
success: "border-emerald-500/20 bg-emerald-500/5 dark:border-emerald-400/30 dark:bg-emerald-500/10",
|
|
3135
|
+
warning: "border-amber-500/20 bg-amber-500/5 dark:border-amber-400/30 dark:bg-amber-500/10",
|
|
3136
|
+
danger: "border-rose-500/20 bg-rose-500/5 dark:border-rose-400/30 dark:bg-rose-500/10"
|
|
3137
|
+
};
|
|
3138
|
+
function StreamingDashboard({
|
|
3139
|
+
runId,
|
|
3140
|
+
initialSpec,
|
|
3141
|
+
initialStatus,
|
|
3142
|
+
className
|
|
3143
|
+
}) {
|
|
3144
|
+
const [spec, setSpec] = React12.useState(
|
|
3145
|
+
initialSpec ?? null
|
|
3146
|
+
);
|
|
3147
|
+
const [timeline, setTimeline] = React12.useState([]);
|
|
3148
|
+
const [phase, setPhase] = React12.useState(
|
|
3149
|
+
() => derivePhase(initialStatus)
|
|
3150
|
+
);
|
|
3151
|
+
const [error, setError] = React12.useState(null);
|
|
3152
|
+
const specRef = React12.useRef(initialSpec ?? null);
|
|
3153
|
+
React12.useEffect(() => {
|
|
3154
|
+
if (phase === "completed" || phase === "failed" || phase === "cancelled") {
|
|
3155
|
+
return;
|
|
3156
|
+
}
|
|
3157
|
+
const unsubscribe = chunkL5VEY7G4_js.subscribeToRunEvents(
|
|
3158
|
+
runId,
|
|
3159
|
+
(event) => handleEvent(event),
|
|
3160
|
+
(err) => {
|
|
3161
|
+
console.warn("streaming-dashboard sse error", err);
|
|
3162
|
+
}
|
|
3163
|
+
);
|
|
3164
|
+
return unsubscribe;
|
|
3165
|
+
}, [runId]);
|
|
3166
|
+
function handleEvent(event) {
|
|
3167
|
+
switch (event.type) {
|
|
3168
|
+
case "run-started":
|
|
3169
|
+
setPhase("running");
|
|
3170
|
+
break;
|
|
3171
|
+
case "node-started":
|
|
3172
|
+
if (event.nodeId) {
|
|
3173
|
+
setTimeline((prev) => upsertTimelineRunning(prev, event));
|
|
3174
|
+
}
|
|
3175
|
+
break;
|
|
3176
|
+
case "node-completed":
|
|
3177
|
+
if (event.nodeId) {
|
|
3178
|
+
setTimeline(
|
|
3179
|
+
(prev) => upsertTimelineDone(prev, event, "done")
|
|
3180
|
+
);
|
|
3181
|
+
mergeNodeOutput(event);
|
|
3182
|
+
}
|
|
3183
|
+
break;
|
|
3184
|
+
case "node-failed":
|
|
3185
|
+
if (event.nodeId) {
|
|
3186
|
+
setTimeline(
|
|
3187
|
+
(prev) => upsertTimelineDone(prev, event, "failed")
|
|
3188
|
+
);
|
|
3189
|
+
}
|
|
3190
|
+
break;
|
|
3191
|
+
case "run-paused":
|
|
3192
|
+
setPhase("paused");
|
|
3193
|
+
if (event.nodeId) {
|
|
3194
|
+
setTimeline(
|
|
3195
|
+
(prev) => upsertTimelineDone(prev, event, "paused")
|
|
3196
|
+
);
|
|
3197
|
+
}
|
|
3198
|
+
appendPauseSection(event);
|
|
3199
|
+
break;
|
|
3200
|
+
case "ui-render":
|
|
3201
|
+
appendSectionFromEvent(event);
|
|
3202
|
+
break;
|
|
3203
|
+
case "run-completed":
|
|
3204
|
+
setPhase("completed");
|
|
3205
|
+
break;
|
|
3206
|
+
case "run-failed":
|
|
3207
|
+
setPhase("failed");
|
|
3208
|
+
setError(
|
|
3209
|
+
event.data?.error ?? "Workflow run failed"
|
|
3210
|
+
);
|
|
3211
|
+
break;
|
|
3212
|
+
}
|
|
3213
|
+
}
|
|
3214
|
+
function mergeNodeOutput(event) {
|
|
3215
|
+
const output = event.data?.outputs;
|
|
3216
|
+
if (!output) return;
|
|
3217
|
+
const candidateSpec = isDashboardSpecLike(output) ? output : null;
|
|
3218
|
+
if (candidateSpec) {
|
|
3219
|
+
setSpec((prev) => mergeSpec(prev, candidateSpec));
|
|
3220
|
+
specRef.current = mergeSpec(specRef.current, candidateSpec);
|
|
3221
|
+
return;
|
|
3222
|
+
}
|
|
3223
|
+
if (isSectionLike(output)) {
|
|
3224
|
+
const section = output;
|
|
3225
|
+
setSpec((prev) => appendSectionToSpec(prev, section));
|
|
3226
|
+
specRef.current = appendSectionToSpec(specRef.current, section);
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
function appendSectionFromEvent(event) {
|
|
3230
|
+
const sectionPayload = event.data?.section ?? event.data;
|
|
3231
|
+
if (!sectionPayload || !sectionPayload.type) return;
|
|
3232
|
+
setSpec((prev) => appendSectionToSpec(prev, sectionPayload));
|
|
3233
|
+
specRef.current = appendSectionToSpec(specRef.current, sectionPayload);
|
|
3234
|
+
}
|
|
3235
|
+
function appendPauseSection(event) {
|
|
3236
|
+
const promptValue = event.data?.prompt;
|
|
3237
|
+
const payloadValue = event.data?.payload;
|
|
3238
|
+
const prompt = typeof promptValue === "string" ? promptValue : void 0;
|
|
3239
|
+
const section = {
|
|
3240
|
+
type: "note",
|
|
3241
|
+
data: {
|
|
3242
|
+
title: "Aguardando aprova\xE7\xE3o",
|
|
3243
|
+
body: prompt ? prompt : "O workflow pausou e aguarda decis\xE3o do operador.",
|
|
3244
|
+
tone: "warning"
|
|
3245
|
+
}
|
|
3246
|
+
};
|
|
3247
|
+
setSpec((prev) => appendSectionToSpec(prev, section));
|
|
3248
|
+
specRef.current = appendSectionToSpec(specRef.current, section);
|
|
3249
|
+
if (payloadValue && typeof payloadValue === "object") {
|
|
3250
|
+
const followUp = {
|
|
3251
|
+
type: "note",
|
|
3252
|
+
data: {
|
|
3253
|
+
title: "Contexto",
|
|
3254
|
+
body: JSON.stringify(payloadValue, null, 2),
|
|
3255
|
+
tone: "info"
|
|
2178
3256
|
}
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
3257
|
+
};
|
|
3258
|
+
setSpec((prev) => appendSectionToSpec(prev, followUp));
|
|
3259
|
+
specRef.current = appendSectionToSpec(specRef.current, followUp);
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: className ?? "space-y-6", children: [
|
|
3263
|
+
/* @__PURE__ */ jsxRuntime.jsx(PhaseBadge, { phase }),
|
|
3264
|
+
timeline.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(Timeline, { entries: timeline }),
|
|
3265
|
+
spec && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3266
|
+
DashboardView,
|
|
3267
|
+
{
|
|
3268
|
+
spec,
|
|
3269
|
+
renderInputRequest: (data) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3270
|
+
InputRequestForm,
|
|
3271
|
+
{
|
|
3272
|
+
runId,
|
|
3273
|
+
data,
|
|
3274
|
+
onResolved: (result) => {
|
|
3275
|
+
setPhase(result.approved ? "running" : "failed");
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
)
|
|
3279
|
+
}
|
|
3280
|
+
),
|
|
3281
|
+
!spec && phase !== "completed" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-dashed border-zinc-300 p-8 text-center text-sm text-slate-500 dark:border-zinc-700 dark:text-slate-400", children: phase === "paused" ? "Run paused \u2014 aguardando entrada do operador." : "Aguardando dados do workflow\u2026" }),
|
|
3282
|
+
error && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-rose-500/30 bg-rose-500/10 p-4 text-sm text-rose-900 dark:text-rose-100", children: [
|
|
3283
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-semibold", children: "Run falhou" }),
|
|
3284
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 whitespace-pre-line text-xs", children: error })
|
|
3285
|
+
] })
|
|
2182
3286
|
] });
|
|
2183
3287
|
}
|
|
2184
|
-
function
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
3288
|
+
function derivePhase(status) {
|
|
3289
|
+
switch (String(status ?? "").toLowerCase()) {
|
|
3290
|
+
case "completed":
|
|
3291
|
+
return "completed";
|
|
3292
|
+
case "failed":
|
|
3293
|
+
return "failed";
|
|
3294
|
+
case "cancelled":
|
|
3295
|
+
return "cancelled";
|
|
3296
|
+
case "paused_for_approval":
|
|
3297
|
+
return "paused";
|
|
3298
|
+
case "running":
|
|
3299
|
+
return "running";
|
|
3300
|
+
case "pending":
|
|
3301
|
+
case "":
|
|
3302
|
+
return "pending";
|
|
3303
|
+
default:
|
|
3304
|
+
return "pending";
|
|
2189
3305
|
}
|
|
2190
|
-
return ticks;
|
|
2191
|
-
}
|
|
2192
|
-
function formatTick(value, unit) {
|
|
2193
|
-
const formatted = Math.abs(value) >= 1e3 ? value.toFixed(0) : value.toFixed(Math.abs(value) < 10 ? 2 : 1);
|
|
2194
|
-
return unit ? `${formatted}${unit}` : formatted;
|
|
2195
|
-
}
|
|
2196
|
-
function renderXLabels(data, count, width, height) {
|
|
2197
|
-
const indexes = count > 6 ? [0, Math.floor(count / 3), Math.floor(2 * count / 3), count - 1] : Array.from({ length: count }, (_, index) => index);
|
|
2198
|
-
return indexes.map((index) => {
|
|
2199
|
-
const x = xScale(index, count, width);
|
|
2200
|
-
const label = String(data[index]?.x ?? "");
|
|
2201
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2202
|
-
"text",
|
|
2203
|
-
{
|
|
2204
|
-
x,
|
|
2205
|
-
y: height + 16,
|
|
2206
|
-
textAnchor: "middle",
|
|
2207
|
-
className: "fill-current text-[10px] font-mono",
|
|
2208
|
-
children: label
|
|
2209
|
-
},
|
|
2210
|
-
`x-${index}`
|
|
2211
|
-
);
|
|
2212
|
-
});
|
|
2213
3306
|
}
|
|
2214
|
-
function
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
] }, series.name);
|
|
3307
|
+
function PhaseBadge({ phase }) {
|
|
3308
|
+
const map = {
|
|
3309
|
+
pending: { status: "pending", label: "Pendente" },
|
|
3310
|
+
running: { status: "processing", label: "Em execu\xE7\xE3o" },
|
|
3311
|
+
paused: { status: "pending", label: "Aguardando aprova\xE7\xE3o" },
|
|
3312
|
+
completed: { status: "success", label: "Conclu\xEDdo" },
|
|
3313
|
+
failed: { status: "error", label: "Falhou" },
|
|
3314
|
+
cancelled: { status: "inactive", label: "Cancelado" }
|
|
3315
|
+
};
|
|
3316
|
+
const entry = map[phase];
|
|
3317
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxRuntime.jsx(StatusBadge, { status: entry.status, label: entry.label }) });
|
|
2226
3318
|
}
|
|
2227
|
-
function
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
const cx = xScale(index, count, width);
|
|
2233
|
-
const barX = cx - offset + seriesIndex * barWidth;
|
|
2234
|
-
const y = yScale(value, domain, height);
|
|
2235
|
-
const barHeight = height - y;
|
|
2236
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2237
|
-
"rect",
|
|
3319
|
+
function Timeline({ entries }) {
|
|
3320
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "flex flex-wrap gap-2", children: entries.map((entry) => {
|
|
3321
|
+
const dotClass = entry.status === "done" ? "bg-emerald-500" : entry.status === "failed" ? "bg-rose-500" : entry.status === "paused" ? "bg-amber-500" : "animate-pulse bg-sky-500";
|
|
3322
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3323
|
+
"li",
|
|
2238
3324
|
{
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
3325
|
+
className: "flex items-center gap-2 rounded-full border border-zinc-950/10 bg-white px-3 py-1 text-xs dark:border-white/10 dark:bg-zinc-900",
|
|
3326
|
+
title: entry.error ?? entry.nodeId,
|
|
3327
|
+
children: [
|
|
3328
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${dotClass}` }),
|
|
3329
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-700 dark:text-slate-300", children: entry.nodeId }),
|
|
3330
|
+
entry.nodeType && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-wide text-slate-400", children: entry.nodeType })
|
|
3331
|
+
]
|
|
2246
3332
|
},
|
|
2247
|
-
|
|
3333
|
+
entry.nodeId
|
|
2248
3334
|
);
|
|
2249
|
-
}) }
|
|
3335
|
+
}) });
|
|
2250
3336
|
}
|
|
2251
|
-
function
|
|
2252
|
-
|
|
2253
|
-
const
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
3337
|
+
function upsertTimelineRunning(prev, event) {
|
|
3338
|
+
if (!event.nodeId) return prev;
|
|
3339
|
+
const idx = prev.findIndex((entry) => entry.nodeId === event.nodeId);
|
|
3340
|
+
const nodeType = typeof event.data?.nodeType === "string" ? event.data.nodeType : void 0;
|
|
3341
|
+
const fresh = {
|
|
3342
|
+
nodeId: event.nodeId,
|
|
3343
|
+
nodeType,
|
|
3344
|
+
status: "running",
|
|
3345
|
+
startedAt: event.timestamp
|
|
3346
|
+
};
|
|
3347
|
+
if (idx === -1) return [...prev, fresh];
|
|
3348
|
+
const next = [...prev];
|
|
3349
|
+
next[idx] = { ...next[idx], ...fresh };
|
|
3350
|
+
return next;
|
|
3351
|
+
}
|
|
3352
|
+
function upsertTimelineDone(prev, event, status) {
|
|
3353
|
+
if (!event.nodeId) return prev;
|
|
3354
|
+
const idx = prev.findIndex((entry) => entry.nodeId === event.nodeId);
|
|
3355
|
+
const nodeType = typeof event.data?.nodeType === "string" ? event.data.nodeType : void 0;
|
|
3356
|
+
const error = typeof event.data?.error === "string" ? event.data.error : void 0;
|
|
3357
|
+
if (idx === -1) {
|
|
3358
|
+
return [
|
|
3359
|
+
...prev,
|
|
2262
3360
|
{
|
|
2263
|
-
|
|
2264
|
-
|
|
3361
|
+
nodeId: event.nodeId,
|
|
3362
|
+
nodeType,
|
|
3363
|
+
status,
|
|
3364
|
+
startedAt: event.timestamp,
|
|
3365
|
+
finishedAt: event.timestamp,
|
|
3366
|
+
error
|
|
2265
3367
|
}
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
spec.table.title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "border-b border-zinc-950/10 px-5 py-3 text-sm font-semibold text-slate-900 dark:border-white/10 dark:text-slate-100", children: spec.table.title }),
|
|
2277
|
-
/* @__PURE__ */ jsxRuntime.jsx(DashboardTableView, { table: spec.table })
|
|
2278
|
-
] }),
|
|
2279
|
-
spec.recommendation && spec.recommendation.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-indigo-500/20 bg-indigo-500/5 p-4 dark:border-indigo-400/30 dark:bg-indigo-500/10", children: [
|
|
2280
|
-
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-sm font-semibold text-indigo-700 dark:text-indigo-300", children: "Recommendation" }),
|
|
2281
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-indigo-900 dark:text-indigo-100", children: spec.recommendation })
|
|
2282
|
-
] }),
|
|
2283
|
-
spec.meta && Object.keys(spec.meta).length > 0 && /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "flex flex-wrap gap-4 text-[10px] text-slate-400 dark:text-slate-500", children: Object.entries(spec.meta).map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
2284
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold uppercase tracking-wide", children: key }),
|
|
2285
|
-
": ",
|
|
2286
|
-
value
|
|
2287
|
-
] }, key)) })
|
|
2288
|
-
] });
|
|
3368
|
+
];
|
|
3369
|
+
}
|
|
3370
|
+
const next = [...prev];
|
|
3371
|
+
next[idx] = {
|
|
3372
|
+
...next[idx],
|
|
3373
|
+
status,
|
|
3374
|
+
finishedAt: event.timestamp,
|
|
3375
|
+
error: error ?? next[idx].error
|
|
3376
|
+
};
|
|
3377
|
+
return next;
|
|
2289
3378
|
}
|
|
2290
|
-
function
|
|
2291
|
-
|
|
2292
|
-
const
|
|
2293
|
-
|
|
2294
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2295
|
-
MetricCard,
|
|
2296
|
-
{
|
|
2297
|
-
title: kpi.label,
|
|
2298
|
-
value: displayValue,
|
|
2299
|
-
variant,
|
|
2300
|
-
trend: kpi.deltaPct !== void 0 ? { value: kpi.deltaPct } : void 0
|
|
2301
|
-
}
|
|
2302
|
-
);
|
|
3379
|
+
function isDashboardSpecLike(value) {
|
|
3380
|
+
if (!value || typeof value !== "object") return false;
|
|
3381
|
+
const candidate = value;
|
|
3382
|
+
return typeof candidate.title === "string" || Array.isArray(candidate.sections) || Array.isArray(candidate.kpis) || Array.isArray(candidate.charts) || typeof candidate.recommendation === "string";
|
|
2303
3383
|
}
|
|
2304
|
-
function
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
{
|
|
2309
|
-
scope: "col",
|
|
2310
|
-
className: `px-4 py-2 text-xs font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400 ${columnAlign(column.align)}`,
|
|
2311
|
-
children: column.label
|
|
2312
|
-
},
|
|
2313
|
-
column.key
|
|
2314
|
-
)) }) }),
|
|
2315
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-zinc-100 dark:divide-zinc-800", children: table.rows.map((row, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "hover:bg-zinc-50/70 dark:hover:bg-zinc-800/30", children: table.columns.map((column) => {
|
|
2316
|
-
const raw = row[column.key] ?? "";
|
|
2317
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2318
|
-
"td",
|
|
2319
|
-
{
|
|
2320
|
-
className: `px-4 py-2 text-slate-700 dark:text-slate-300 ${columnAlign(column.align)}`,
|
|
2321
|
-
children: formatCell(raw, column.format)
|
|
2322
|
-
},
|
|
2323
|
-
column.key
|
|
2324
|
-
);
|
|
2325
|
-
}) }, rowIndex)) })
|
|
2326
|
-
] }) });
|
|
3384
|
+
function isSectionLike(value) {
|
|
3385
|
+
if (!value || typeof value !== "object") return false;
|
|
3386
|
+
const candidate = value;
|
|
3387
|
+
return typeof candidate.type === "string" && "data" in candidate;
|
|
2327
3388
|
}
|
|
2328
|
-
function
|
|
2329
|
-
if (
|
|
2330
|
-
|
|
2331
|
-
|
|
3389
|
+
function mergeSpec(prev, next) {
|
|
3390
|
+
if (!prev) return next;
|
|
3391
|
+
return {
|
|
3392
|
+
...prev,
|
|
3393
|
+
...next,
|
|
3394
|
+
title: next.title ?? prev.title,
|
|
3395
|
+
sections: mergeSections(prev.sections, next.sections)
|
|
3396
|
+
};
|
|
2332
3397
|
}
|
|
2333
|
-
function
|
|
2334
|
-
if (
|
|
2335
|
-
if (
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
3398
|
+
function mergeSections(a, b) {
|
|
3399
|
+
if (!a && !b) return void 0;
|
|
3400
|
+
if (!a) return b;
|
|
3401
|
+
if (!b) return a;
|
|
3402
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3403
|
+
const merged = [];
|
|
3404
|
+
for (const section of [...a, ...b]) {
|
|
3405
|
+
const key = JSON.stringify(section);
|
|
3406
|
+
if (seen.has(key)) continue;
|
|
3407
|
+
seen.add(key);
|
|
3408
|
+
merged.push(section);
|
|
2340
3409
|
}
|
|
2341
|
-
|
|
2342
|
-
return formatNumber(value);
|
|
2343
|
-
}
|
|
2344
|
-
return String(value);
|
|
3410
|
+
return merged;
|
|
2345
3411
|
}
|
|
2346
|
-
function
|
|
2347
|
-
|
|
2348
|
-
|
|
3412
|
+
function appendSectionToSpec(prev, section) {
|
|
3413
|
+
const base = prev ?? { title: "" };
|
|
3414
|
+
const sections = base.sections ? [...base.sections, section] : [section];
|
|
3415
|
+
return { ...base, sections };
|
|
2349
3416
|
}
|
|
2350
3417
|
|
|
2351
3418
|
// src/types/dashboard-spec.ts
|
|
@@ -2355,8 +3422,9 @@ function validateDashboardSpec(spec) {
|
|
|
2355
3422
|
const hasKpis = (spec.kpis?.length ?? 0) > 0;
|
|
2356
3423
|
const hasTable = (spec.table?.rows.length ?? 0) > 0;
|
|
2357
3424
|
const hasRecommendation = Boolean(spec.recommendation?.trim());
|
|
2358
|
-
|
|
2359
|
-
|
|
3425
|
+
const hasSections = (spec.sections?.length ?? 0) > 0;
|
|
3426
|
+
if (!hasCharts && !hasKpis && !hasTable && !hasRecommendation && !hasSections) {
|
|
3427
|
+
issues.push({ kind: "empty", message: "Dashboard has no content (no charts, KPIs, table, recommendation, or sections)." });
|
|
2360
3428
|
}
|
|
2361
3429
|
spec.charts?.forEach((chart, chartIndex) => {
|
|
2362
3430
|
if (chart.series.length === 0) {
|
|
@@ -2385,19 +3453,6 @@ function validateDashboardSpec(spec) {
|
|
|
2385
3453
|
}
|
|
2386
3454
|
return issues;
|
|
2387
3455
|
}
|
|
2388
|
-
function AgentAnalysisCard({ name, avatar, duration, output }) {
|
|
2389
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3 transition-all duration-300", children: [
|
|
2390
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
|
|
2391
|
-
/* @__PURE__ */ jsxRuntime.jsx("img", { src: avatar, alt: "", className: "h-6 w-6 rounded-lg" }),
|
|
2392
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
2393
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[10px] font-semibold text-white", children: name }),
|
|
2394
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[8px] text-gray-500", children: duration })
|
|
2395
|
-
] }),
|
|
2396
|
-
/* @__PURE__ */ jsxRuntime.jsx(HeroIcons.CheckCircleIcon, { className: "h-3.5 w-3.5 text-emerald-400 shrink-0" })
|
|
2397
|
-
] }),
|
|
2398
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[8px] text-gray-400 leading-relaxed", children: output })
|
|
2399
|
-
] });
|
|
2400
|
-
}
|
|
2401
3456
|
function RecommendationCard({ price, delta, confidence, margin, minMax }) {
|
|
2402
3457
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "liquid-surface rounded-xl p-3.5", children: [
|
|
2403
3458
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2 flex items-center gap-1.5 text-[11px] font-semibold text-gray-400", children: [
|
|
@@ -3777,7 +4832,7 @@ function ProgressIndicator({
|
|
|
3777
4832
|
stiffness: 500,
|
|
3778
4833
|
damping: 30
|
|
3779
4834
|
},
|
|
3780
|
-
children: showNumbers && (isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4835
|
+
children: showNumbers && (isCompleted ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon3, { className: "w-4 h-4" }) : index + 1)
|
|
3781
4836
|
}
|
|
3782
4837
|
),
|
|
3783
4838
|
index < steps - 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3792,7 +4847,7 @@ function ProgressIndicator({
|
|
|
3792
4847
|
] }, index);
|
|
3793
4848
|
}) });
|
|
3794
4849
|
}
|
|
3795
|
-
function
|
|
4850
|
+
function CheckIcon3({ className }) {
|
|
3796
4851
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3797
4852
|
"svg",
|
|
3798
4853
|
{
|
|
@@ -5750,42 +6805,18 @@ var FormField = React12__namespace.default.forwardRef(
|
|
|
5750
6805
|
}
|
|
5751
6806
|
);
|
|
5752
6807
|
FormField.displayName = "FormField";
|
|
5753
|
-
var FormSection = React12__namespace.default.forwardRef(
|
|
5754
|
-
({ title, description, children, className, ...props }, ref) => {
|
|
5755
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: clsx__default.default("space-y-4", className), ...props, children: [
|
|
5756
|
-
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
5757
|
-
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-gray-900 dark:text-white", children: title }),
|
|
5758
|
-
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: description })
|
|
5759
|
-
] }),
|
|
5760
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
|
|
5761
|
-
] });
|
|
5762
|
-
}
|
|
5763
|
-
);
|
|
5764
|
-
FormSection.displayName = "FormSection";
|
|
5765
|
-
function ItemSummary({
|
|
5766
|
-
icon,
|
|
5767
|
-
title,
|
|
5768
|
-
subtitle,
|
|
5769
|
-
metadata,
|
|
5770
|
-
iconContainerClassName = "flex size-10 flex-shrink-0 items-center justify-center rounded-lg bg-indigo-100 dark:bg-indigo-900/30",
|
|
5771
|
-
titleClassName = "truncate text-sm font-semibold text-gray-900 dark:text-white",
|
|
5772
|
-
subtitleClassName = "truncate text-xs text-gray-500 dark:text-gray-400",
|
|
5773
|
-
metadataContainerClassName = "mt-2 flex flex-wrap gap-3",
|
|
5774
|
-
metadataLabelClassName = "text-xs text-gray-500 dark:text-gray-400",
|
|
5775
|
-
metadataValueClassName = "text-xs font-medium text-gray-900 dark:text-white"
|
|
5776
|
-
}) {
|
|
5777
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 min-w-0 items-start gap-3", children: [
|
|
5778
|
-
icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: iconContainerClassName, children: icon }) : null,
|
|
5779
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
5780
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: titleClassName, children: title }),
|
|
5781
|
-
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: subtitleClassName, children: subtitle }) : null,
|
|
5782
|
-
metadata && metadata.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: metadataContainerClassName, children: metadata.map((metadataItem, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
5783
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataLabelClassName, children: metadataItem.label }),
|
|
5784
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: metadataValueClassName, children: metadataItem.value })
|
|
5785
|
-
] }, index)) }) : null
|
|
5786
|
-
] })
|
|
5787
|
-
] });
|
|
5788
|
-
}
|
|
6808
|
+
var FormSection = React12__namespace.default.forwardRef(
|
|
6809
|
+
({ title, description, children, className, ...props }, ref) => {
|
|
6810
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: clsx__default.default("space-y-4", className), ...props, children: [
|
|
6811
|
+
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
6812
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-semibold text-gray-900 dark:text-white", children: title }),
|
|
6813
|
+
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: description })
|
|
6814
|
+
] }),
|
|
6815
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-4", children })
|
|
6816
|
+
] });
|
|
6817
|
+
}
|
|
6818
|
+
);
|
|
6819
|
+
FormSection.displayName = "FormSection";
|
|
5789
6820
|
var CONTAINER_STYLES2 = {
|
|
5790
6821
|
default: "bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700",
|
|
5791
6822
|
compact: "bg-transparent",
|
|
@@ -5849,80 +6880,6 @@ var ListItem = React12__namespace.default.forwardRef(
|
|
|
5849
6880
|
}
|
|
5850
6881
|
);
|
|
5851
6882
|
ListItem.displayName = "ListItem";
|
|
5852
|
-
var TONE_STYLES = {
|
|
5853
|
-
error: { container: "border-red-500/30 bg-red-500/20 text-red-600 dark:text-red-400", dot: "bg-red-500" },
|
|
5854
|
-
warning: { container: "border-amber-500/30 bg-amber-500/20 text-amber-600 dark:text-amber-400", dot: "bg-amber-500" },
|
|
5855
|
-
info: { container: "border-blue-500/30 bg-blue-500/20 text-blue-600 dark:text-blue-400", dot: "bg-blue-500" },
|
|
5856
|
-
neutral: { container: "border-slate-500/30 bg-slate-500/20 text-slate-600 dark:text-slate-400", dot: "bg-slate-500" },
|
|
5857
|
-
success: { container: "border-emerald-500/30 bg-emerald-500/20 text-emerald-600 dark:text-emerald-400", dot: "bg-emerald-500" }
|
|
5858
|
-
};
|
|
5859
|
-
var LEGACY_STATUS_STYLES = {
|
|
5860
|
-
pending: "border-yellow-200 bg-yellow-50 text-yellow-700 dark:border-yellow-700/30 dark:bg-yellow-900/20 dark:text-yellow-400",
|
|
5861
|
-
approved: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400",
|
|
5862
|
-
rejected: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
|
|
5863
|
-
active: "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-700/30 dark:bg-emerald-900/20 dark:text-emerald-400",
|
|
5864
|
-
inactive: "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400",
|
|
5865
|
-
processing: "border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-700/30 dark:bg-blue-900/20 dark:text-blue-400",
|
|
5866
|
-
error: "border-red-200 bg-red-50 text-red-700 dark:border-red-700/30 dark:bg-red-900/20 dark:text-red-400",
|
|
5867
|
-
success: "border-green-200 bg-green-50 text-green-700 dark:border-green-700/30 dark:bg-green-900/20 dark:text-green-400"
|
|
5868
|
-
};
|
|
5869
|
-
var LEGACY_DOT_STYLES = {
|
|
5870
|
-
pending: "bg-yellow-500",
|
|
5871
|
-
approved: "bg-green-500",
|
|
5872
|
-
rejected: "bg-red-500",
|
|
5873
|
-
active: "bg-emerald-500",
|
|
5874
|
-
inactive: "bg-slate-500",
|
|
5875
|
-
processing: "bg-blue-500",
|
|
5876
|
-
error: "bg-red-500",
|
|
5877
|
-
success: "bg-green-500"
|
|
5878
|
-
};
|
|
5879
|
-
var SIZE_STYLES = {
|
|
5880
|
-
sm: "px-2 py-0.5 text-xs",
|
|
5881
|
-
md: "px-2.5 py-1 text-xs"
|
|
5882
|
-
};
|
|
5883
|
-
var DEFAULT_LEGACY_STYLE = "border-white/30 dark:border-white/10 bg-slate-500/10 text-slate-700 dark:bg-slate-900/20 dark:text-slate-400";
|
|
5884
|
-
var StatusBadge = React12.forwardRef(function StatusBadge2({ status, label, size = "md", className = "", ...props }, ref) {
|
|
5885
|
-
if ("statusConfig" in props && props.statusConfig) {
|
|
5886
|
-
const configuredStatus = props.statusConfig[status];
|
|
5887
|
-
if (!configuredStatus) {
|
|
5888
|
-
return null;
|
|
5889
|
-
}
|
|
5890
|
-
const toneStyle = TONE_STYLES[configuredStatus.tone ?? "neutral"];
|
|
5891
|
-
const IconComponent = configuredStatus.icon;
|
|
5892
|
-
const resolvedLabel2 = label ?? configuredStatus.label;
|
|
5893
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5894
|
-
"div",
|
|
5895
|
-
{
|
|
5896
|
-
ref,
|
|
5897
|
-
role: "status",
|
|
5898
|
-
"aria-label": `Status: ${status}`,
|
|
5899
|
-
"data-testid": `status-badge-${status}`,
|
|
5900
|
-
className: `inline-flex items-center gap-1.5 rounded-full border font-semibold backdrop-blur-sm ${SIZE_STYLES[size]} ${toneStyle.container} ${className}`,
|
|
5901
|
-
children: [
|
|
5902
|
-
IconComponent ? /* @__PURE__ */ jsxRuntime.jsx(IconComponent, { className: `h-3 w-3 ${configuredStatus.animateIcon ? "animate-spin motion-reduce:animate-none" : ""}` }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${toneStyle.dot}` }),
|
|
5903
|
-
resolvedLabel2
|
|
5904
|
-
]
|
|
5905
|
-
}
|
|
5906
|
-
);
|
|
5907
|
-
}
|
|
5908
|
-
const legacyStyle = LEGACY_STATUS_STYLES[status] ?? DEFAULT_LEGACY_STYLE;
|
|
5909
|
-
const legacyDot = LEGACY_DOT_STYLES[status] ?? "bg-slate-500";
|
|
5910
|
-
const resolvedLabel = label ?? status;
|
|
5911
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5912
|
-
"div",
|
|
5913
|
-
{
|
|
5914
|
-
ref,
|
|
5915
|
-
role: "status",
|
|
5916
|
-
"aria-label": `Status: ${status}`,
|
|
5917
|
-
"data-testid": `status-badge-${status}`,
|
|
5918
|
-
className: `inline-flex items-center gap-1.5 rounded-full border font-semibold ${SIZE_STYLES[size]} ${legacyStyle} ${className}`,
|
|
5919
|
-
children: [
|
|
5920
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: `h-2 w-2 rounded-full ${legacyDot}` }),
|
|
5921
|
-
resolvedLabel
|
|
5922
|
-
]
|
|
5923
|
-
}
|
|
5924
|
-
);
|
|
5925
|
-
});
|
|
5926
6883
|
function ProfileIdentityCard({
|
|
5927
6884
|
displayName,
|
|
5928
6885
|
profileInitial,
|
|
@@ -7276,95 +8233,6 @@ function TimePicker({
|
|
|
7276
8233
|
) })
|
|
7277
8234
|
] });
|
|
7278
8235
|
}
|
|
7279
|
-
function classNames(...classes) {
|
|
7280
|
-
return classes.filter(Boolean).join(" ");
|
|
7281
|
-
}
|
|
7282
|
-
function StepTimeline({
|
|
7283
|
-
steps,
|
|
7284
|
-
progressLabel,
|
|
7285
|
-
onStepClick,
|
|
7286
|
-
renderCompleteContent
|
|
7287
|
-
}) {
|
|
7288
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:border-t lg:border-b lg:border-gray-200 dark:lg:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": progressLabel, className: "mx-auto max-w-7xl px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7289
|
-
"ol",
|
|
7290
|
-
{
|
|
7291
|
-
role: "list",
|
|
7292
|
-
className: "overflow-hidden rounded-md lg:flex lg:rounded-none lg:border-r lg:border-l lg:border-gray-200 dark:lg:border-white/15",
|
|
7293
|
-
children: steps.map((step2, stepIndex) => /* @__PURE__ */ jsxRuntime.jsx("li", { className: "relative overflow-hidden lg:flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7294
|
-
"button",
|
|
7295
|
-
{
|
|
7296
|
-
type: "button",
|
|
7297
|
-
onClick: () => onStepClick?.(stepIndex),
|
|
7298
|
-
disabled: step2.status === "upcoming",
|
|
7299
|
-
className: classNames(
|
|
7300
|
-
step2.status === "upcoming" ? "cursor-not-allowed" : "cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",
|
|
7301
|
-
stepIndex === 0 ? "rounded-t-md border-b-0" : "",
|
|
7302
|
-
stepIndex === steps.length - 1 ? "rounded-b-md border-t-0" : "",
|
|
7303
|
-
"w-full overflow-hidden border border-gray-200 text-left transition-colors lg:border-0 dark:border-white/15"
|
|
7304
|
-
),
|
|
7305
|
-
children: [
|
|
7306
|
-
step2.status === "complete" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
|
|
7307
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7308
|
-
"span",
|
|
7309
|
-
{
|
|
7310
|
-
"aria-hidden": "true",
|
|
7311
|
-
className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
|
|
7312
|
-
}
|
|
7313
|
-
),
|
|
7314
|
-
renderCompleteContent ? renderCompleteContent(step2) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
7315
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-full bg-blue-600 dark:bg-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx(solid$1.CheckIcon, { "aria-hidden": "true", className: "h-5 w-5 text-white" }) }) }),
|
|
7316
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
7317
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-900 dark:text-white", children: step2.name }),
|
|
7318
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
7319
|
-
] })
|
|
7320
|
-
] })
|
|
7321
|
-
] }) : step2.status === "current" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "aria-current": "step", children: [
|
|
7322
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7323
|
-
"span",
|
|
7324
|
-
{
|
|
7325
|
-
"aria-hidden": "true",
|
|
7326
|
-
className: "absolute top-0 left-0 h-full w-1 bg-blue-600 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:bg-blue-500"
|
|
7327
|
-
}
|
|
7328
|
-
),
|
|
7329
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
7330
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-blue-600 dark:border-blue-500", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-blue-600 dark:text-blue-400", children: step2.id }) }) }),
|
|
7331
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
7332
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blue-600 dark:text-blue-400", children: step2.name }),
|
|
7333
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
7334
|
-
] })
|
|
7335
|
-
] })
|
|
7336
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group", children: [
|
|
7337
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7338
|
-
"span",
|
|
7339
|
-
{
|
|
7340
|
-
"aria-hidden": "true",
|
|
7341
|
-
className: "absolute top-0 left-0 h-full w-1 bg-transparent group-hover:bg-gray-200 lg:top-auto lg:bottom-0 lg:h-1 lg:w-full dark:group-hover:bg-white/20"
|
|
7342
|
-
}
|
|
7343
|
-
),
|
|
7344
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: classNames(stepIndex !== 0 ? "lg:pl-9" : "", "flex items-start px-6 py-5 text-sm font-medium"), children: [
|
|
7345
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-full border-2 border-gray-300 dark:border-white/15", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500 dark:text-gray-400", children: step2.id }) }) }),
|
|
7346
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-0.5 ml-4 flex min-w-0 flex-col", children: [
|
|
7347
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.name }),
|
|
7348
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-gray-500 dark:text-gray-400", children: step2.description })
|
|
7349
|
-
] })
|
|
7350
|
-
] })
|
|
7351
|
-
] }),
|
|
7352
|
-
stepIndex !== 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "absolute inset-0 top-0 left-0 hidden w-3 lg:block", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7353
|
-
"svg",
|
|
7354
|
-
{
|
|
7355
|
-
fill: "none",
|
|
7356
|
-
viewBox: "0 0 12 82",
|
|
7357
|
-
preserveAspectRatio: "none",
|
|
7358
|
-
className: "h-full w-full text-gray-200 dark:text-white/15",
|
|
7359
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0.5 0V31L10.5 41L0.5 51V82", stroke: "currentColor", vectorEffect: "non-scaling-stroke" })
|
|
7360
|
-
}
|
|
7361
|
-
) }) : null
|
|
7362
|
-
]
|
|
7363
|
-
}
|
|
7364
|
-
) }, step2.id))
|
|
7365
|
-
}
|
|
7366
|
-
) }) });
|
|
7367
|
-
}
|
|
7368
8236
|
function PageHeading({ breadcrumbs, title, subtitle, icon, meta, actions }) {
|
|
7369
8237
|
const t = chunkYXN2K77G_js.useTranslations("common");
|
|
7370
8238
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 lg:flex lg:items-start lg:justify-between", children: [
|
|
@@ -8228,87 +9096,6 @@ function SearchFilterToolbar({
|
|
|
8228
9096
|
] }) })
|
|
8229
9097
|
] });
|
|
8230
9098
|
}
|
|
8231
|
-
function isPlainTextTitle(title) {
|
|
8232
|
-
return typeof title === "string" || typeof title === "number";
|
|
8233
|
-
}
|
|
8234
|
-
function getTestIdFromTitle(title) {
|
|
8235
|
-
if (isPlainTextTitle(title)) {
|
|
8236
|
-
return `entity-card-${String(title).toLowerCase().replace(/\s+/g, "-")}`;
|
|
8237
|
-
}
|
|
8238
|
-
return "entity-card";
|
|
8239
|
-
}
|
|
8240
|
-
function StatusBadgeInternal({ status }) {
|
|
8241
|
-
const tCommon = chunkYXN2K77G_js.useTranslations("common");
|
|
8242
|
-
if (typeof status !== "boolean") {
|
|
8243
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: status });
|
|
8244
|
-
}
|
|
8245
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8246
|
-
"span",
|
|
8247
|
-
{
|
|
8248
|
-
className: `shrink-0 rounded-full px-2 py-0.5 text-xs font-medium ${status ? "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300" : "bg-white/40 text-slate-500 dark:bg-white/[0.08] dark:text-slate-400"}`,
|
|
8249
|
-
children: status ? tCommon("active") : tCommon("inactive")
|
|
8250
|
-
}
|
|
8251
|
-
);
|
|
8252
|
-
}
|
|
8253
|
-
function EntityCard({
|
|
8254
|
-
icon,
|
|
8255
|
-
title,
|
|
8256
|
-
subtitle,
|
|
8257
|
-
status,
|
|
8258
|
-
accentGradient,
|
|
8259
|
-
children,
|
|
8260
|
-
footer,
|
|
8261
|
-
onClick,
|
|
8262
|
-
className = "",
|
|
8263
|
-
dragProps
|
|
8264
|
-
}) {
|
|
8265
|
-
const isInteractive = Boolean(onClick);
|
|
8266
|
-
const plainTextTitle = isPlainTextTitle(title) ? String(title) : void 0;
|
|
8267
|
-
const handleKeyDown = React12.useCallback(
|
|
8268
|
-
(event) => {
|
|
8269
|
-
if (onClick && (event.key === "Enter" || event.key === " ")) {
|
|
8270
|
-
event.preventDefault();
|
|
8271
|
-
onClick();
|
|
8272
|
-
}
|
|
8273
|
-
},
|
|
8274
|
-
[onClick]
|
|
8275
|
-
);
|
|
8276
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8277
|
-
Card,
|
|
8278
|
-
{
|
|
8279
|
-
role: isInteractive ? "article" : "listitem",
|
|
8280
|
-
"aria-label": isInteractive ? plainTextTitle : void 0,
|
|
8281
|
-
"data-testid": getTestIdFromTitle(title),
|
|
8282
|
-
tabIndex: isInteractive ? 0 : void 0,
|
|
8283
|
-
onKeyDown: isInteractive ? handleKeyDown : void 0,
|
|
8284
|
-
className: `group overflow-hidden transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md ${isInteractive ? "cursor-pointer" : ""} ${className}`,
|
|
8285
|
-
onPress: onClick,
|
|
8286
|
-
pressable: isInteractive,
|
|
8287
|
-
...dragProps,
|
|
8288
|
-
children: [
|
|
8289
|
-
accentGradient && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `h-1.5 w-full bg-gradient-to-r ${accentGradient}` }),
|
|
8290
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
|
|
8291
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
8292
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "entity-card-title", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8293
|
-
ItemSummary,
|
|
8294
|
-
{
|
|
8295
|
-
icon,
|
|
8296
|
-
title,
|
|
8297
|
-
subtitle: subtitle ? /* @__PURE__ */ jsxRuntime.jsx("span", { "data-testid": "entity-card-subtitle", children: subtitle }) : void 0,
|
|
8298
|
-
iconContainerClassName: "shrink-0",
|
|
8299
|
-
titleClassName: isPlainTextTitle(title) ? "truncate font-semibold text-slate-900 dark:text-white" : "font-semibold text-slate-900 dark:text-white",
|
|
8300
|
-
subtitleClassName: "mt-0.5 text-xs text-slate-500 dark:text-slate-400"
|
|
8301
|
-
}
|
|
8302
|
-
) }),
|
|
8303
|
-
status !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(StatusBadgeInternal, { status })
|
|
8304
|
-
] }),
|
|
8305
|
-
children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children }),
|
|
8306
|
-
footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 border-t border-white/30 pt-3 dark:border-white/10 flex gap-2 justify-end opacity-0 transition-opacity duration-200 group-hover:opacity-100 group-focus-within:opacity-100", children: footer })
|
|
8307
|
-
] })
|
|
8308
|
-
]
|
|
8309
|
-
}
|
|
8310
|
-
);
|
|
8311
|
-
}
|
|
8312
9099
|
var COLOR_MAP = {
|
|
8313
9100
|
blue: {
|
|
8314
9101
|
activeGradient: "bg-gradient-to-br from-blue-500 to-blue-600 ring-2 ring-blue-500 shadow-lg",
|
|
@@ -25053,6 +25840,7 @@ exports.InfoPopover = InfoPopover;
|
|
|
25053
25840
|
exports.InlineForm = InlineForm;
|
|
25054
25841
|
exports.InlineSpinner = InlineSpinner;
|
|
25055
25842
|
exports.Input = Input;
|
|
25843
|
+
exports.InputRequestForm = InputRequestForm;
|
|
25056
25844
|
exports.InteractiveGeoMap = InteractiveGeoMap;
|
|
25057
25845
|
exports.InventoryDemo = InventoryDemo;
|
|
25058
25846
|
exports.ItemSummary = ItemSummary;
|
|
@@ -25231,6 +26019,7 @@ exports.StatusToggle = StatusToggle;
|
|
|
25231
26019
|
exports.StepFormPage = StepFormPage;
|
|
25232
26020
|
exports.StepNavigationButtons = StepNavigationButtons;
|
|
25233
26021
|
exports.StepTimeline = StepTimeline;
|
|
26022
|
+
exports.StreamingDashboard = StreamingDashboard;
|
|
25234
26023
|
exports.Strong = Strong;
|
|
25235
26024
|
exports.Subheading = Subheading;
|
|
25236
26025
|
exports.SwipeableRow = SwipeableRow;
|
|
@@ -25577,5 +26366,5 @@ exports.usePullToRefresh = usePullToRefresh;
|
|
|
25577
26366
|
exports.validateDashboardSpec = validateDashboardSpec;
|
|
25578
26367
|
exports.xScale = xScale;
|
|
25579
26368
|
exports.yScale = yScale;
|
|
25580
|
-
//# sourceMappingURL=chunk-
|
|
25581
|
-
//# sourceMappingURL=chunk-
|
|
26369
|
+
//# sourceMappingURL=chunk-YN4IEDE4.js.map
|
|
26370
|
+
//# sourceMappingURL=chunk-YN4IEDE4.js.map
|