@adoptai/genui-components 0.1.32 → 0.1.45
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/README.md +5 -0
- package/dist/builders/BuilderForm.d.ts +16 -1
- package/dist/builders/BuilderForm.d.ts.map +1 -1
- package/dist/builders/EscalationCard.d.ts +6 -1
- package/dist/builders/EscalationCard.d.ts.map +1 -1
- package/dist/builders/FieldRenderer.d.ts +5 -1
- package/dist/builders/FieldRenderer.d.ts.map +1 -1
- package/dist/builders/FormBuilder.d.ts +7 -1
- package/dist/builders/FormBuilder.d.ts.map +1 -1
- package/dist/builders/StepperBuilder.d.ts +6 -1
- package/dist/builders/StepperBuilder.d.ts.map +1 -1
- package/dist/builders/fields.d.ts +5 -1
- package/dist/builders/fields.d.ts.map +1 -1
- package/dist/builders/resolver.d.ts +11 -0
- package/dist/builders/resolver.d.ts.map +1 -1
- package/dist/composites/aging-report/resolver.cjs +1 -1
- package/dist/composites/aging-report/resolver.cjs.map +1 -1
- package/dist/composites/aging-report/resolver.js +1 -1
- package/dist/composites/aging-report/resolver.js.map +1 -1
- package/dist/composites/alert/resolver.cjs +87 -0
- package/dist/composites/alert/resolver.cjs.map +1 -1
- package/dist/composites/alert/resolver.js +87 -0
- package/dist/composites/alert/resolver.js.map +1 -1
- package/dist/composites/audit-trail/resolver.cjs +86 -0
- package/dist/composites/audit-trail/resolver.cjs.map +1 -1
- package/dist/composites/audit-trail/resolver.js +86 -0
- package/dist/composites/audit-trail/resolver.js.map +1 -1
- package/dist/composites/balance-sheet/resolver.cjs +1 -1
- package/dist/composites/balance-sheet/resolver.cjs.map +1 -1
- package/dist/composites/balance-sheet/resolver.js +1 -1
- package/dist/composites/balance-sheet/resolver.js.map +1 -1
- package/dist/composites/cited-answer/resolver.cjs +86 -0
- package/dist/composites/cited-answer/resolver.cjs.map +1 -1
- package/dist/composites/cited-answer/resolver.js +86 -0
- package/dist/composites/cited-answer/resolver.js.map +1 -1
- package/dist/composites/compliance-checklist/resolver.cjs +86 -0
- package/dist/composites/compliance-checklist/resolver.cjs.map +1 -1
- package/dist/composites/compliance-checklist/resolver.js +86 -0
- package/dist/composites/compliance-checklist/resolver.js.map +1 -1
- package/dist/composites/connect-integration/resolver.cjs +465 -0
- package/dist/composites/connect-integration/resolver.cjs.map +1 -0
- package/dist/composites/connect-integration/resolver.js +463 -0
- package/dist/composites/connect-integration/resolver.js.map +1 -0
- package/dist/composites/document-preview/resolver.cjs +86 -0
- package/dist/composites/document-preview/resolver.cjs.map +1 -1
- package/dist/composites/document-preview/resolver.js +86 -0
- package/dist/composites/document-preview/resolver.js.map +1 -1
- package/dist/composites/download-card/resolver.cjs +86 -0
- package/dist/composites/download-card/resolver.cjs.map +1 -1
- package/dist/composites/download-card/resolver.js +86 -0
- package/dist/composites/download-card/resolver.js.map +1 -1
- package/dist/composites/engagement-pipeline/resolver.cjs +86 -0
- package/dist/composites/engagement-pipeline/resolver.cjs.map +1 -1
- package/dist/composites/engagement-pipeline/resolver.js +86 -0
- package/dist/composites/engagement-pipeline/resolver.js.map +1 -1
- package/dist/composites/entity-card-grid/resolver.cjs +2 -2
- package/dist/composites/entity-card-grid/resolver.cjs.map +1 -1
- package/dist/composites/entity-card-grid/resolver.js +2 -2
- package/dist/composites/entity-card-grid/resolver.js.map +1 -1
- package/dist/composites/general-ledger/resolver.cjs +1 -0
- package/dist/composites/general-ledger/resolver.cjs.map +1 -1
- package/dist/composites/general-ledger/resolver.d.ts.map +1 -1
- package/dist/composites/general-ledger/resolver.js +1 -0
- package/dist/composites/general-ledger/resolver.js.map +1 -1
- package/dist/composites/income-statement/resolver.cjs +1 -1
- package/dist/composites/income-statement/resolver.cjs.map +1 -1
- package/dist/composites/income-statement/resolver.js +1 -1
- package/dist/composites/income-statement/resolver.js.map +1 -1
- package/dist/composites/integrations-list/resolver.cjs +511 -0
- package/dist/composites/integrations-list/resolver.cjs.map +1 -0
- package/dist/composites/integrations-list/resolver.js +509 -0
- package/dist/composites/integrations-list/resolver.js.map +1 -0
- package/dist/composites/invoice-detail/resolver.cjs +86 -0
- package/dist/composites/invoice-detail/resolver.cjs.map +1 -1
- package/dist/composites/invoice-detail/resolver.js +86 -0
- package/dist/composites/invoice-detail/resolver.js.map +1 -1
- package/dist/composites/job-tracker/resolver.cjs +86 -0
- package/dist/composites/job-tracker/resolver.cjs.map +1 -1
- package/dist/composites/job-tracker/resolver.js +86 -0
- package/dist/composites/job-tracker/resolver.js.map +1 -1
- package/dist/composites/key-value-list/resolver.cjs +114 -3
- package/dist/composites/key-value-list/resolver.cjs.map +1 -1
- package/dist/composites/key-value-list/resolver.d.ts.map +1 -1
- package/dist/composites/key-value-list/resolver.js +114 -3
- package/dist/composites/key-value-list/resolver.js.map +1 -1
- package/dist/composites/legal-test-result/resolver.cjs +86 -0
- package/dist/composites/legal-test-result/resolver.cjs.map +1 -1
- package/dist/composites/legal-test-result/resolver.js +86 -0
- package/dist/composites/legal-test-result/resolver.js.map +1 -1
- package/dist/composites/news-feed/resolver.cjs +86 -0
- package/dist/composites/news-feed/resolver.cjs.map +1 -1
- package/dist/composites/news-feed/resolver.js +86 -0
- package/dist/composites/news-feed/resolver.js.map +1 -1
- package/dist/composites/pipeline-preview/resolver.cjs +926 -0
- package/dist/composites/pipeline-preview/resolver.cjs.map +1 -0
- package/dist/composites/pipeline-preview/resolver.js +924 -0
- package/dist/composites/pipeline-preview/resolver.js.map +1 -0
- package/dist/composites/provenance-chain/resolver.cjs +86 -0
- package/dist/composites/provenance-chain/resolver.cjs.map +1 -1
- package/dist/composites/provenance-chain/resolver.js +86 -0
- package/dist/composites/provenance-chain/resolver.js.map +1 -1
- package/dist/composites/reconciliation-view/resolver.cjs +90 -32
- package/dist/composites/reconciliation-view/resolver.cjs.map +1 -1
- package/dist/composites/reconciliation-view/resolver.d.ts.map +1 -1
- package/dist/composites/reconciliation-view/resolver.js +91 -33
- package/dist/composites/reconciliation-view/resolver.js.map +1 -1
- package/dist/composites/stacked-breakdown/resolver.cjs +13 -2
- package/dist/composites/stacked-breakdown/resolver.cjs.map +1 -1
- package/dist/composites/stacked-breakdown/resolver.d.ts.map +1 -1
- package/dist/composites/stacked-breakdown/resolver.js +13 -2
- package/dist/composites/stacked-breakdown/resolver.js.map +1 -1
- package/dist/composites/stat-grid/resolver.cjs +169 -5
- package/dist/composites/stat-grid/resolver.cjs.map +1 -1
- package/dist/composites/stat-grid/resolver.d.ts.map +1 -1
- package/dist/composites/stat-grid/resolver.js +170 -6
- package/dist/composites/stat-grid/resolver.js.map +1 -1
- package/dist/composites/status-card/resolver.cjs +86 -0
- package/dist/composites/status-card/resolver.cjs.map +1 -1
- package/dist/composites/status-card/resolver.js +86 -0
- package/dist/composites/status-card/resolver.js.map +1 -1
- package/dist/composites/tabs-panel/resolver.cjs +86 -0
- package/dist/composites/tabs-panel/resolver.cjs.map +1 -1
- package/dist/composites/tabs-panel/resolver.js +86 -0
- package/dist/composites/tabs-panel/resolver.js.map +1 -1
- package/dist/composites/transaction-feed/resolver.cjs +86 -0
- package/dist/composites/transaction-feed/resolver.cjs.map +1 -1
- package/dist/composites/transaction-feed/resolver.js +86 -0
- package/dist/composites/transaction-feed/resolver.js.map +1 -1
- package/dist/composites/trial-balance/resolver.cjs +1 -1
- package/dist/composites/trial-balance/resolver.cjs.map +1 -1
- package/dist/composites/trial-balance/resolver.js +1 -1
- package/dist/composites/trial-balance/resolver.js.map +1 -1
- package/dist/composites/variance-analysis/resolver.cjs +1 -1
- package/dist/composites/variance-analysis/resolver.cjs.map +1 -1
- package/dist/composites/variance-analysis/resolver.js +1 -1
- package/dist/composites/variance-analysis/resolver.js.map +1 -1
- package/dist/composites/workflow-stepper/resolver.cjs +976 -0
- package/dist/composites/workflow-stepper/resolver.cjs.map +1 -0
- package/dist/composites/workflow-stepper/resolver.d.ts +20 -0
- package/dist/composites/workflow-stepper/resolver.d.ts.map +1 -0
- package/dist/composites/workflow-stepper/resolver.js +969 -0
- package/dist/composites/workflow-stepper/resolver.js.map +1 -0
- package/dist/index.cjs +1268 -275
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1105 -120
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +1153 -211
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +1015 -73
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +1152 -210
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +1015 -73
- package/dist/resolver.js.map +1 -1
- package/dist/schemas/index.cjs +75 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.ts +122 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +75 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/workflow-stepper.d.ts +122 -0
- package/dist/schemas/workflow-stepper.d.ts.map +1 -0
- package/dist/shared/FitText.d.ts +22 -0
- package/dist/shared/FitText.d.ts.map +1 -0
- package/dist/shared/InteractionContext.d.ts +20 -0
- package/dist/shared/InteractionContext.d.ts.map +1 -0
- package/dist/shared/Markdown.d.ts +2 -1
- package/dist/shared/Markdown.d.ts.map +1 -1
- package/dist/shared/styles.d.ts +14 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/tool-definitions.json +114 -3
- package/package.json +2 -2
package/dist/resolver.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React41 = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var dagre = require('@dagrejs/dagre');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
@@ -37,7 +37,7 @@ function _interopNamespace(e) {
|
|
|
37
37
|
return Object.freeze(n);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var React41__default = /*#__PURE__*/_interopDefault(React41);
|
|
41
41
|
var dagre__default = /*#__PURE__*/_interopDefault(dagre);
|
|
42
42
|
var XLSX__namespace = /*#__PURE__*/_interopNamespace(XLSX);
|
|
43
43
|
var Papa__default = /*#__PURE__*/_interopDefault(Papa);
|
|
@@ -111,7 +111,7 @@ var init_theme = __esm({
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
function useTheme() {
|
|
114
|
-
return
|
|
114
|
+
return React41.useContext(GenUIThemeContext);
|
|
115
115
|
}
|
|
116
116
|
var DEFAULT_TOKENS, GenUIThemeContext;
|
|
117
117
|
var init_ThemeContext = __esm({
|
|
@@ -127,7 +127,7 @@ var init_ThemeContext = __esm({
|
|
|
127
127
|
SECONDARY,
|
|
128
128
|
CHART_PALETTE: [...CHART_PALETTE]
|
|
129
129
|
};
|
|
130
|
-
GenUIThemeContext =
|
|
130
|
+
GenUIThemeContext = React41.createContext(DEFAULT_TOKENS);
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
function renderInline(text) {
|
|
@@ -228,6 +228,24 @@ function renderInline(text) {
|
|
|
228
228
|
}
|
|
229
229
|
return parts;
|
|
230
230
|
}
|
|
231
|
+
function parseTableRow(line) {
|
|
232
|
+
let s = line.trim();
|
|
233
|
+
if (s.startsWith("|")) s = s.slice(1);
|
|
234
|
+
if (s.endsWith("|") && !s.endsWith("\\|")) s = s.slice(0, -1);
|
|
235
|
+
return s.split(new RegExp("(?<!\\\\)\\|")).map((c) => c.trim().replace(/\\\|/g, "|"));
|
|
236
|
+
}
|
|
237
|
+
function isTableSeparator(line) {
|
|
238
|
+
if (!line.includes("-")) return false;
|
|
239
|
+
const cells = parseTableRow(line);
|
|
240
|
+
return cells.length > 0 && cells.every((c) => /^:?-{1,}:?$/.test(c));
|
|
241
|
+
}
|
|
242
|
+
function alignFromSeparator(cell) {
|
|
243
|
+
const left = cell.startsWith(":");
|
|
244
|
+
const right = cell.endsWith(":");
|
|
245
|
+
if (left && right) return "center";
|
|
246
|
+
if (right) return "right";
|
|
247
|
+
return "left";
|
|
248
|
+
}
|
|
231
249
|
function MarkdownBlock({ content }) {
|
|
232
250
|
var _a;
|
|
233
251
|
const lines = content.split("\n");
|
|
@@ -358,6 +376,74 @@ function MarkdownBlock({ content }) {
|
|
|
358
376
|
);
|
|
359
377
|
continue;
|
|
360
378
|
}
|
|
379
|
+
if (trimmed.includes("|") && i + 1 < lines.length && isTableSeparator(lines[i + 1])) {
|
|
380
|
+
const headers = parseTableRow(trimmed);
|
|
381
|
+
const aligns = parseTableRow(lines[i + 1]).map(alignFromSeparator);
|
|
382
|
+
i += 2;
|
|
383
|
+
const rows = [];
|
|
384
|
+
while (i < lines.length) {
|
|
385
|
+
const li = lines[i].trim();
|
|
386
|
+
if (!li || !li.includes("|")) break;
|
|
387
|
+
rows.push(parseTableRow(li));
|
|
388
|
+
i++;
|
|
389
|
+
}
|
|
390
|
+
const colAlign = (idx) => {
|
|
391
|
+
var _a2;
|
|
392
|
+
return (_a2 = aligns[idx]) != null ? _a2 : "left";
|
|
393
|
+
};
|
|
394
|
+
elements.push(
|
|
395
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { margin: "6px 0 10px 0", overflowX: "auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
396
|
+
"table",
|
|
397
|
+
{
|
|
398
|
+
style: {
|
|
399
|
+
borderCollapse: "collapse",
|
|
400
|
+
width: "100%",
|
|
401
|
+
fontSize: "12px",
|
|
402
|
+
lineHeight: 1.4
|
|
403
|
+
},
|
|
404
|
+
children: [
|
|
405
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: headers.map((h, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
406
|
+
"th",
|
|
407
|
+
{
|
|
408
|
+
style: {
|
|
409
|
+
textAlign: colAlign(idx),
|
|
410
|
+
padding: "6px 10px",
|
|
411
|
+
borderBottom: `1px solid ${BORDER}`,
|
|
412
|
+
background: PAPER,
|
|
413
|
+
fontWeight: 600,
|
|
414
|
+
color: MUTED,
|
|
415
|
+
fontSize: "10px",
|
|
416
|
+
textTransform: "uppercase",
|
|
417
|
+
letterSpacing: "0.04em",
|
|
418
|
+
whiteSpace: "nowrap"
|
|
419
|
+
},
|
|
420
|
+
children: renderInline(h)
|
|
421
|
+
},
|
|
422
|
+
idx
|
|
423
|
+
)) }) }),
|
|
424
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows.map((cells, rIdx) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: headers.map((_, cIdx) => {
|
|
425
|
+
var _a2;
|
|
426
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
427
|
+
"td",
|
|
428
|
+
{
|
|
429
|
+
style: {
|
|
430
|
+
textAlign: colAlign(cIdx),
|
|
431
|
+
padding: "6px 10px",
|
|
432
|
+
borderBottom: `1px solid ${BORDER}`,
|
|
433
|
+
color: "var(--foreground)",
|
|
434
|
+
verticalAlign: "top"
|
|
435
|
+
},
|
|
436
|
+
children: renderInline((_a2 = cells[cIdx]) != null ? _a2 : "")
|
|
437
|
+
},
|
|
438
|
+
cIdx
|
|
439
|
+
);
|
|
440
|
+
}) }, rIdx)) })
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
) }, key++)
|
|
444
|
+
);
|
|
445
|
+
continue;
|
|
446
|
+
}
|
|
361
447
|
elements.push(
|
|
362
448
|
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "0 0 8px 0", lineHeight: 1.65 }, children: renderInline(trimmed) }, key++)
|
|
363
449
|
);
|
|
@@ -771,11 +857,11 @@ async function getMermaid(t) {
|
|
|
771
857
|
}
|
|
772
858
|
function MermaidFallback({ diagram, title }) {
|
|
773
859
|
const tokens = useTheme();
|
|
774
|
-
const [svg, setSvg] =
|
|
775
|
-
const [err, setErr] =
|
|
776
|
-
const [full, setFull] =
|
|
777
|
-
const idRef =
|
|
778
|
-
|
|
860
|
+
const [svg, setSvg] = React41.useState("");
|
|
861
|
+
const [err, setErr] = React41.useState(false);
|
|
862
|
+
const [full, setFull] = React41.useState(false);
|
|
863
|
+
const idRef = React41.useRef(0);
|
|
864
|
+
React41.useEffect(() => {
|
|
779
865
|
const id = ++renderSeq;
|
|
780
866
|
idRef.current = id;
|
|
781
867
|
setErr(false);
|
|
@@ -844,7 +930,7 @@ function FullscreenModalInner({ nodes, edges, title, onClose }) {
|
|
|
844
930
|
] }) });
|
|
845
931
|
}
|
|
846
932
|
function FullscreenModal({ nodes, edges, title, onClose }) {
|
|
847
|
-
|
|
933
|
+
React41.useEffect(() => {
|
|
848
934
|
const h = (e) => {
|
|
849
935
|
if (e.key === "Escape") onClose();
|
|
850
936
|
};
|
|
@@ -857,8 +943,8 @@ function FullscreenModal({ nodes, edges, title, onClose }) {
|
|
|
857
943
|
);
|
|
858
944
|
}
|
|
859
945
|
function usePrefersReducedMotion() {
|
|
860
|
-
const [reduced, setReduced] =
|
|
861
|
-
|
|
946
|
+
const [reduced, setReduced] = React41.useState(false);
|
|
947
|
+
React41.useEffect(() => {
|
|
862
948
|
var _a;
|
|
863
949
|
if (typeof matchMedia === "undefined") return;
|
|
864
950
|
const mq = matchMedia("(prefers-reduced-motion: reduce)");
|
|
@@ -902,9 +988,9 @@ function topoOrder(nodeIds, edges) {
|
|
|
902
988
|
}
|
|
903
989
|
function useAutoplay(order, enabled) {
|
|
904
990
|
const reduced = usePrefersReducedMotion();
|
|
905
|
-
const [step, setStep] =
|
|
991
|
+
const [step, setStep] = React41.useState(0);
|
|
906
992
|
const key = order.join("|");
|
|
907
|
-
|
|
993
|
+
React41.useEffect(() => {
|
|
908
994
|
if (!enabled || reduced || order.length === 0) {
|
|
909
995
|
setStep(0);
|
|
910
996
|
return;
|
|
@@ -926,7 +1012,7 @@ function useAutoplay(order, enabled) {
|
|
|
926
1012
|
timer = setTimeout(tick, 850);
|
|
927
1013
|
return () => clearTimeout(timer);
|
|
928
1014
|
}, [enabled, reduced, key]);
|
|
929
|
-
return
|
|
1015
|
+
return React41.useMemo(() => {
|
|
930
1016
|
const m = {};
|
|
931
1017
|
order.forEach((id, i) => {
|
|
932
1018
|
m[id] = i < step ? "done" : i === step ? "active" : "pending";
|
|
@@ -948,13 +1034,13 @@ function resolveStates(nodes, nodeStates) {
|
|
|
948
1034
|
}
|
|
949
1035
|
function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
950
1036
|
const tokens = useTheme();
|
|
951
|
-
const [full, setFull] =
|
|
952
|
-
const [focused, setFocused] =
|
|
953
|
-
const [boxW, setBoxW] =
|
|
954
|
-
const containerRef =
|
|
955
|
-
const parsed =
|
|
956
|
-
const layout =
|
|
957
|
-
const themedEdges =
|
|
1037
|
+
const [full, setFull] = React41.useState(false);
|
|
1038
|
+
const [focused, setFocused] = React41.useState(false);
|
|
1039
|
+
const [boxW, setBoxW] = React41.useState(640);
|
|
1040
|
+
const containerRef = React41.useRef(null);
|
|
1041
|
+
const parsed = React41.useMemo(() => parseMermaidFlow(diagram), [diagram]);
|
|
1042
|
+
const layout = React41.useMemo(() => parsed ? computeLayout(parsed) : null, [parsed]);
|
|
1043
|
+
const themedEdges = React41.useMemo(
|
|
958
1044
|
() => {
|
|
959
1045
|
var _a;
|
|
960
1046
|
return ((_a = layout == null ? void 0 : layout.edges) != null ? _a : []).map((e) => __spreadProps(__spreadValues({}, e), {
|
|
@@ -966,7 +1052,7 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
966
1052
|
},
|
|
967
1053
|
[layout, tokens.ACCENT, tokens.MUTED]
|
|
968
1054
|
);
|
|
969
|
-
const order =
|
|
1055
|
+
const order = React41.useMemo(
|
|
970
1056
|
() => {
|
|
971
1057
|
var _a, _b;
|
|
972
1058
|
return topoOrder(((_a = layout == null ? void 0 : layout.nodes) != null ? _a : []).map((n) => n.id), (_b = layout == null ? void 0 : layout.edges) != null ? _b : []);
|
|
@@ -974,19 +1060,19 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
974
1060
|
[layout]
|
|
975
1061
|
);
|
|
976
1062
|
const autoStatus = useAutoplay(order, !!autoplay);
|
|
977
|
-
const staticStatus =
|
|
1063
|
+
const staticStatus = React41.useMemo(() => {
|
|
978
1064
|
var _a;
|
|
979
1065
|
return resolveStates((_a = layout == null ? void 0 : layout.nodes) != null ? _a : [], nodeStates);
|
|
980
1066
|
}, [layout, nodeStates]);
|
|
981
1067
|
const statusMap = autoplay ? autoStatus : staticStatus;
|
|
982
|
-
const displayNodes =
|
|
1068
|
+
const displayNodes = React41.useMemo(
|
|
983
1069
|
() => {
|
|
984
1070
|
var _a;
|
|
985
1071
|
return ((_a = layout == null ? void 0 : layout.nodes) != null ? _a : []).map((n) => __spreadProps(__spreadValues({}, n), { data: __spreadProps(__spreadValues({}, n.data), { status: statusMap[n.id] }) }));
|
|
986
1072
|
},
|
|
987
1073
|
[layout, statusMap]
|
|
988
1074
|
);
|
|
989
|
-
const displayEdges =
|
|
1075
|
+
const displayEdges = React41.useMemo(
|
|
990
1076
|
() => themedEdges.map((e) => {
|
|
991
1077
|
const ss = statusMap[e.source];
|
|
992
1078
|
const ts = statusMap[e.target];
|
|
@@ -1006,13 +1092,13 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1006
1092
|
const [nodes, setNodes, onNC] = react.useNodesState(displayNodes);
|
|
1007
1093
|
const [edges, setEdges, onEC] = react.useEdgesState(displayEdges);
|
|
1008
1094
|
const rf = react.useReactFlow();
|
|
1009
|
-
|
|
1095
|
+
React41.useEffect(() => {
|
|
1010
1096
|
setNodes(displayNodes);
|
|
1011
1097
|
}, [displayNodes, setNodes]);
|
|
1012
|
-
|
|
1098
|
+
React41.useEffect(() => {
|
|
1013
1099
|
setEdges(displayEdges);
|
|
1014
1100
|
}, [displayEdges, setEdges]);
|
|
1015
|
-
|
|
1101
|
+
React41.useEffect(() => {
|
|
1016
1102
|
const id = requestAnimationFrame(() => {
|
|
1017
1103
|
try {
|
|
1018
1104
|
rf.fitView({ padding: 0.1 });
|
|
@@ -1021,14 +1107,14 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1021
1107
|
});
|
|
1022
1108
|
return () => cancelAnimationFrame(id);
|
|
1023
1109
|
}, [layout, rf]);
|
|
1024
|
-
const handleClickOutside =
|
|
1110
|
+
const handleClickOutside = React41.useCallback((e) => {
|
|
1025
1111
|
if (containerRef.current && !containerRef.current.contains(e.target)) setFocused(false);
|
|
1026
1112
|
}, []);
|
|
1027
|
-
|
|
1113
|
+
React41.useEffect(() => {
|
|
1028
1114
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1029
1115
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1030
1116
|
}, [handleClickOutside]);
|
|
1031
|
-
|
|
1117
|
+
React41.useEffect(() => {
|
|
1032
1118
|
const el = containerRef.current;
|
|
1033
1119
|
if (!el) return;
|
|
1034
1120
|
let raf = 0;
|
|
@@ -1187,15 +1273,15 @@ __export(PdfViewer_exports, {
|
|
|
1187
1273
|
PdfViewer: () => PdfViewer
|
|
1188
1274
|
});
|
|
1189
1275
|
function PdfViewer({ url, base64, onLoadSuccess }) {
|
|
1190
|
-
const [numPages, setNumPages] =
|
|
1191
|
-
const [currentPage, setCurrentPage] =
|
|
1192
|
-
const [loading, setLoading] =
|
|
1193
|
-
const handleLoad =
|
|
1276
|
+
const [numPages, setNumPages] = React41.useState(0);
|
|
1277
|
+
const [currentPage, setCurrentPage] = React41.useState(1);
|
|
1278
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1279
|
+
const handleLoad = React41.useCallback(({ numPages: n }) => {
|
|
1194
1280
|
setNumPages(n);
|
|
1195
1281
|
setLoading(false);
|
|
1196
1282
|
onLoadSuccess == null ? void 0 : onLoadSuccess(n);
|
|
1197
1283
|
}, [onLoadSuccess]);
|
|
1198
|
-
|
|
1284
|
+
React41.useEffect(() => {
|
|
1199
1285
|
if (numPages <= 1) return;
|
|
1200
1286
|
const handler = (e) => {
|
|
1201
1287
|
var _a;
|
|
@@ -1291,13 +1377,13 @@ __export(ExcelViewer_exports, {
|
|
|
1291
1377
|
ExcelViewer: () => ExcelViewer
|
|
1292
1378
|
});
|
|
1293
1379
|
function ExcelViewer({ url, base64, onLoadSuccess }) {
|
|
1294
|
-
const [sheetNames, setSheetNames] =
|
|
1295
|
-
const [activeSheet, setActiveSheet] =
|
|
1296
|
-
const [data, setData] =
|
|
1297
|
-
const [loading, setLoading] =
|
|
1298
|
-
const [error, setError] =
|
|
1299
|
-
const wbRef =
|
|
1300
|
-
|
|
1380
|
+
const [sheetNames, setSheetNames] = React41.useState([]);
|
|
1381
|
+
const [activeSheet, setActiveSheet] = React41.useState(0);
|
|
1382
|
+
const [data, setData] = React41.useState([]);
|
|
1383
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1384
|
+
const [error, setError] = React41.useState(null);
|
|
1385
|
+
const wbRef = React41.useRef(null);
|
|
1386
|
+
React41.useEffect(() => {
|
|
1301
1387
|
let cancelled = false;
|
|
1302
1388
|
setLoading(true);
|
|
1303
1389
|
setError(null);
|
|
@@ -1355,7 +1441,7 @@ function ExcelViewer({ url, base64, onLoadSuccess }) {
|
|
|
1355
1441
|
const rows = XLSX__namespace.utils.sheet_to_json(wbRef.current.Sheets[wbRef.current.SheetNames[idx]], { header: 1 });
|
|
1356
1442
|
setData(rows);
|
|
1357
1443
|
};
|
|
1358
|
-
|
|
1444
|
+
React41.useEffect(() => {
|
|
1359
1445
|
if (sheetNames.length <= 1) return;
|
|
1360
1446
|
const handler = (e) => {
|
|
1361
1447
|
var _a;
|
|
@@ -1480,10 +1566,10 @@ __export(CsvViewer_exports, {
|
|
|
1480
1566
|
});
|
|
1481
1567
|
function CsvViewer({ url, base64, delimiter, maxRows }) {
|
|
1482
1568
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2 } = useTheme();
|
|
1483
|
-
const [rows, setRows] =
|
|
1484
|
-
const [loading, setLoading] =
|
|
1485
|
-
const [error, setError] =
|
|
1486
|
-
|
|
1569
|
+
const [rows, setRows] = React41.useState([]);
|
|
1570
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1571
|
+
const [error, setError] = React41.useState(null);
|
|
1572
|
+
React41.useEffect(() => {
|
|
1487
1573
|
let cancelled = false;
|
|
1488
1574
|
setLoading(true);
|
|
1489
1575
|
setError(null);
|
|
@@ -1602,10 +1688,10 @@ __export(TextViewer_exports, {
|
|
|
1602
1688
|
});
|
|
1603
1689
|
function TextViewer({ url, base64, markdown = false, maxLines }) {
|
|
1604
1690
|
const { MUTED: MUTED2 } = useTheme();
|
|
1605
|
-
const [text, setText] =
|
|
1606
|
-
const [loading, setLoading] =
|
|
1607
|
-
const [error, setError] =
|
|
1608
|
-
|
|
1691
|
+
const [text, setText] = React41.useState("");
|
|
1692
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1693
|
+
const [error, setError] = React41.useState(null);
|
|
1694
|
+
React41.useEffect(() => {
|
|
1609
1695
|
let cancelled = false;
|
|
1610
1696
|
setLoading(true);
|
|
1611
1697
|
setError(null);
|
|
@@ -1703,10 +1789,10 @@ function sanitize(html) {
|
|
|
1703
1789
|
}
|
|
1704
1790
|
function DocxViewer({ url, base64 }) {
|
|
1705
1791
|
const { MUTED: MUTED2, BORDER: BORDER4 } = useTheme();
|
|
1706
|
-
const [html, setHtml] =
|
|
1707
|
-
const [loading, setLoading] =
|
|
1708
|
-
const [error, setError] =
|
|
1709
|
-
|
|
1792
|
+
const [html, setHtml] = React41.useState("");
|
|
1793
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1794
|
+
const [error, setError] = React41.useState(null);
|
|
1795
|
+
React41.useEffect(() => {
|
|
1710
1796
|
let cancelled = false;
|
|
1711
1797
|
setLoading(true);
|
|
1712
1798
|
setError(null);
|
|
@@ -5146,6 +5232,79 @@ var pipelinePreviewTool = {
|
|
|
5146
5232
|
required: ["type", "name", "steps"]
|
|
5147
5233
|
}
|
|
5148
5234
|
};
|
|
5235
|
+
var workflowStepperSchema = zod.z.object({
|
|
5236
|
+
type: zod.z.literal("workflow-stepper"),
|
|
5237
|
+
id: zod.z.string().optional(),
|
|
5238
|
+
title: zod.z.string(),
|
|
5239
|
+
period: zod.z.string().optional(),
|
|
5240
|
+
badge: zod.z.string().optional(),
|
|
5241
|
+
active_step: zod.z.string().optional(),
|
|
5242
|
+
steps: zod.z.array(
|
|
5243
|
+
zod.z.object({
|
|
5244
|
+
id: zod.z.string(),
|
|
5245
|
+
n: zod.z.number().int().positive().optional(),
|
|
5246
|
+
title: zod.z.string(),
|
|
5247
|
+
sub: zod.z.string().optional(),
|
|
5248
|
+
status: zod.z.enum(["done", "active", "review", "pending", "failed"]),
|
|
5249
|
+
assignees: zod.z.array(
|
|
5250
|
+
zod.z.object({
|
|
5251
|
+
name: zod.z.string(),
|
|
5252
|
+
kind: zod.z.enum(["agent", "human"]),
|
|
5253
|
+
initials: zod.z.string().max(3).optional(),
|
|
5254
|
+
color: zod.z.string().optional(),
|
|
5255
|
+
role: zod.z.string().optional()
|
|
5256
|
+
})
|
|
5257
|
+
).max(6).optional()
|
|
5258
|
+
})
|
|
5259
|
+
).min(2).max(12)
|
|
5260
|
+
});
|
|
5261
|
+
var workflowStepperTool = {
|
|
5262
|
+
name: "render_workflow_stepper",
|
|
5263
|
+
description: "Render a recurring-process workflow stepper \u2014 a horizontal strip of sequential step cards (e.g. a monthly close pipeline) with per-step status (done/active/review/pending/failed) and human + agent assignee avatars. Use for org processes with named steps and owners, NOT for generic progress bars or project phase summaries.",
|
|
5264
|
+
input_schema: {
|
|
5265
|
+
type: "object",
|
|
5266
|
+
properties: {
|
|
5267
|
+
type: { type: "string", enum: ["workflow-stepper"] },
|
|
5268
|
+
id: { type: "string", description: "Stable id for update-in-place rendering" },
|
|
5269
|
+
title: { type: "string", description: "Process name, e.g. 'Monthly Close'" },
|
|
5270
|
+
period: { type: "string", description: "Period label, e.g. 'Period 04 \xB7 FY2026'" },
|
|
5271
|
+
badge: { type: "string", description: "Framework/compliance badge, e.g. 'SOX controlled'" },
|
|
5272
|
+
active_step: { type: "string", description: "Id of the currently active step" },
|
|
5273
|
+
steps: {
|
|
5274
|
+
type: "array",
|
|
5275
|
+
minItems: 2,
|
|
5276
|
+
maxItems: 12,
|
|
5277
|
+
items: {
|
|
5278
|
+
type: "object",
|
|
5279
|
+
properties: {
|
|
5280
|
+
id: { type: "string" },
|
|
5281
|
+
n: { type: "number", description: "Step number; defaults to index + 1" },
|
|
5282
|
+
title: { type: "string" },
|
|
5283
|
+
sub: { type: "string", description: "Short status caption, e.g. '7 accounts \xB7 2 exceptions'" },
|
|
5284
|
+
status: { type: "string", enum: ["done", "active", "review", "pending", "failed"] },
|
|
5285
|
+
assignees: {
|
|
5286
|
+
type: "array",
|
|
5287
|
+
maxItems: 6,
|
|
5288
|
+
items: {
|
|
5289
|
+
type: "object",
|
|
5290
|
+
properties: {
|
|
5291
|
+
name: { type: "string" },
|
|
5292
|
+
kind: { type: "string", enum: ["agent", "human"] },
|
|
5293
|
+
initials: { type: "string" },
|
|
5294
|
+
color: { type: "string" },
|
|
5295
|
+
role: { type: "string" }
|
|
5296
|
+
},
|
|
5297
|
+
required: ["name", "kind"]
|
|
5298
|
+
}
|
|
5299
|
+
}
|
|
5300
|
+
},
|
|
5301
|
+
required: ["id", "title", "status"]
|
|
5302
|
+
}
|
|
5303
|
+
}
|
|
5304
|
+
},
|
|
5305
|
+
required: ["type", "title", "steps"]
|
|
5306
|
+
}
|
|
5307
|
+
};
|
|
5149
5308
|
|
|
5150
5309
|
// src/schemas/index.ts
|
|
5151
5310
|
var schemaRegistry = {
|
|
@@ -5204,7 +5363,8 @@ var schemaRegistry = {
|
|
|
5204
5363
|
"scatter-chart": { schema: scatterChartSchema, tool: scatterChartTool },
|
|
5205
5364
|
"connect-integration": { schema: connectIntegrationSchema, tool: connectIntegrationTool },
|
|
5206
5365
|
"integrations-list": { schema: integrationsListSchema, tool: integrationsListTool },
|
|
5207
|
-
"pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool }
|
|
5366
|
+
"pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
|
|
5367
|
+
"workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool }
|
|
5208
5368
|
};
|
|
5209
5369
|
|
|
5210
5370
|
// src/schemas/coercePayload.ts
|
|
@@ -5286,16 +5446,16 @@ init_theme();
|
|
|
5286
5446
|
var DOT_COLOR = "#aaaaaa";
|
|
5287
5447
|
var DOT_HOVER = "#555555";
|
|
5288
5448
|
function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "component" }) {
|
|
5289
|
-
const [open, setOpen] =
|
|
5290
|
-
const [view, setView] =
|
|
5291
|
-
const contentRef =
|
|
5292
|
-
const menuRef =
|
|
5293
|
-
const btnRef =
|
|
5294
|
-
const close =
|
|
5449
|
+
const [open, setOpen] = React41.useState(false);
|
|
5450
|
+
const [view, setView] = React41.useState("main");
|
|
5451
|
+
const contentRef = React41.useRef(null);
|
|
5452
|
+
const menuRef = React41.useRef(null);
|
|
5453
|
+
const btnRef = React41.useRef(null);
|
|
5454
|
+
const close = React41.useCallback(() => {
|
|
5295
5455
|
setOpen(false);
|
|
5296
5456
|
setView("main");
|
|
5297
5457
|
}, []);
|
|
5298
|
-
|
|
5458
|
+
React41.useEffect(() => {
|
|
5299
5459
|
if (!open) return;
|
|
5300
5460
|
const handler = (e) => {
|
|
5301
5461
|
var _a, _b;
|
|
@@ -5306,7 +5466,7 @@ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "c
|
|
|
5306
5466
|
document.addEventListener("mousedown", handler);
|
|
5307
5467
|
return () => document.removeEventListener("mousedown", handler);
|
|
5308
5468
|
}, [open, close]);
|
|
5309
|
-
const handleDownloadPNG =
|
|
5469
|
+
const handleDownloadPNG = React41.useCallback(async () => {
|
|
5310
5470
|
if (!contentRef.current) return;
|
|
5311
5471
|
try {
|
|
5312
5472
|
const url = await htmlToImage.toPng(contentRef.current, { backgroundColor: "white", pixelRatio: 2 });
|
|
@@ -5318,7 +5478,7 @@ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "c
|
|
|
5318
5478
|
}
|
|
5319
5479
|
close();
|
|
5320
5480
|
}, [filename, close]);
|
|
5321
|
-
const handleCSV =
|
|
5481
|
+
const handleCSV = React41.useCallback(() => {
|
|
5322
5482
|
onDownloadCSV == null ? void 0 : onDownloadCSV();
|
|
5323
5483
|
close();
|
|
5324
5484
|
}, [onDownloadCSV, close]);
|
|
@@ -5430,12 +5590,12 @@ function MenuButton({ label, onClick }) {
|
|
|
5430
5590
|
);
|
|
5431
5591
|
}
|
|
5432
5592
|
function useColumnVisibility(columns) {
|
|
5433
|
-
const [hidden, setHidden] =
|
|
5434
|
-
const visibleColumns =
|
|
5593
|
+
const [hidden, setHidden] = React41.useState(/* @__PURE__ */ new Set());
|
|
5594
|
+
const visibleColumns = React41.useMemo(
|
|
5435
5595
|
() => columns.filter((c) => !hidden.has(c.key)),
|
|
5436
5596
|
[columns, hidden]
|
|
5437
5597
|
);
|
|
5438
|
-
const toggle =
|
|
5598
|
+
const toggle = React41.useCallback((key) => {
|
|
5439
5599
|
setHidden((prev) => {
|
|
5440
5600
|
const next = new Set(prev);
|
|
5441
5601
|
if (next.has(key)) next.delete(key);
|
|
@@ -5443,8 +5603,8 @@ function useColumnVisibility(columns) {
|
|
|
5443
5603
|
return next;
|
|
5444
5604
|
});
|
|
5445
5605
|
}, []);
|
|
5446
|
-
const showAll =
|
|
5447
|
-
const hideAll =
|
|
5606
|
+
const showAll = React41.useCallback(() => setHidden(/* @__PURE__ */ new Set()), []);
|
|
5607
|
+
const hideAll = React41.useCallback(
|
|
5448
5608
|
() => setHidden(new Set(columns.map((c) => c.key))),
|
|
5449
5609
|
[columns]
|
|
5450
5610
|
);
|
|
@@ -5694,6 +5854,56 @@ function AlertResolver(p) {
|
|
|
5694
5854
|
|
|
5695
5855
|
// src/composites/stat-grid/resolver.tsx
|
|
5696
5856
|
init_Markdown();
|
|
5857
|
+
function FitText({ children, max = 22, min = 13, title, className, style }) {
|
|
5858
|
+
const ref = React41.useRef(null);
|
|
5859
|
+
const [size, setSize] = React41.useState(max);
|
|
5860
|
+
React41.useLayoutEffect(() => {
|
|
5861
|
+
const el = ref.current;
|
|
5862
|
+
if (!el) return void 0;
|
|
5863
|
+
const fit = () => {
|
|
5864
|
+
let s = max;
|
|
5865
|
+
el.style.fontSize = `${s}px`;
|
|
5866
|
+
while (s > min && el.scrollWidth > el.clientWidth + 1) {
|
|
5867
|
+
s -= 1;
|
|
5868
|
+
el.style.fontSize = `${s}px`;
|
|
5869
|
+
}
|
|
5870
|
+
setSize(s);
|
|
5871
|
+
};
|
|
5872
|
+
fit();
|
|
5873
|
+
if (typeof ResizeObserver === "undefined") return void 0;
|
|
5874
|
+
const ro = new ResizeObserver(fit);
|
|
5875
|
+
ro.observe(el);
|
|
5876
|
+
return () => ro.disconnect();
|
|
5877
|
+
}, [children, max, min]);
|
|
5878
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5879
|
+
"span",
|
|
5880
|
+
{
|
|
5881
|
+
ref,
|
|
5882
|
+
title,
|
|
5883
|
+
className,
|
|
5884
|
+
style: __spreadValues({
|
|
5885
|
+
display: "block",
|
|
5886
|
+
minWidth: 0,
|
|
5887
|
+
maxWidth: "100%",
|
|
5888
|
+
whiteSpace: "nowrap",
|
|
5889
|
+
overflow: "hidden",
|
|
5890
|
+
textOverflow: "ellipsis",
|
|
5891
|
+
fontSize: `${size}px`
|
|
5892
|
+
}, style),
|
|
5893
|
+
children
|
|
5894
|
+
}
|
|
5895
|
+
);
|
|
5896
|
+
}
|
|
5897
|
+
|
|
5898
|
+
// src/shared/styles.ts
|
|
5899
|
+
var TRUNCATE = {
|
|
5900
|
+
minWidth: 0,
|
|
5901
|
+
overflow: "hidden",
|
|
5902
|
+
textOverflow: "ellipsis",
|
|
5903
|
+
whiteSpace: "nowrap"
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5906
|
+
// src/composites/stat-grid/resolver.tsx
|
|
5697
5907
|
init_ThemeContext();
|
|
5698
5908
|
var changeColor = (type) => {
|
|
5699
5909
|
if (type === "positive") return "#15803d";
|
|
@@ -5704,15 +5914,28 @@ var cardStyle = {
|
|
|
5704
5914
|
border: "1px solid #dedede",
|
|
5705
5915
|
borderRadius: "0.75rem",
|
|
5706
5916
|
background: "white",
|
|
5707
|
-
padding: "14px"
|
|
5917
|
+
padding: "14px",
|
|
5918
|
+
// Let the card shrink inside the grid track so big values can't push it
|
|
5919
|
+
// wider than its column.
|
|
5920
|
+
minWidth: 0,
|
|
5921
|
+
overflow: "hidden"
|
|
5708
5922
|
};
|
|
5709
5923
|
function StatGridResolver(p) {
|
|
5710
5924
|
var _a;
|
|
5711
5925
|
const { MUTED: MUTED2 } = useTheme();
|
|
5712
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: "stat-grid", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", display: "grid", gap: "10px", gridTemplateColumns: "repeat(auto-fill, minmax(140px, 1fr))" }, children: ((_a = p.stats) != null ? _a : []).map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: cardStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", padding: "4px 0" }, children: [
|
|
5713
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "11.5px", color: MUTED2, letterSpacing: "0.02em", textTransform: "uppercase", margin: 0 }, children: stat.label }),
|
|
5714
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5715
|
-
|
|
5926
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: "stat-grid", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", display: "grid", gap: "10px", gridTemplateColumns: "repeat(auto-fill, minmax(min(140px, 100%), 1fr))" }, children: ((_a = p.stats) != null ? _a : []).map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: cardStyle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px", padding: "4px 0", minWidth: 0 }, children: [
|
|
5927
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { style: __spreadValues({ fontSize: "11.5px", color: MUTED2, letterSpacing: "0.02em", textTransform: "uppercase", margin: 0 }, TRUNCATE), children: stat.label }),
|
|
5928
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5929
|
+
FitText,
|
|
5930
|
+
{
|
|
5931
|
+
max: 22,
|
|
5932
|
+
min: 13,
|
|
5933
|
+
title: typeof stat.value === "string" ? stat.value : void 0,
|
|
5934
|
+
style: { fontFamily: "var(--font-serif)", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.01em", lineHeight: 1.1, fontVariantNumeric: "tabular-nums" },
|
|
5935
|
+
children: stat.value
|
|
5936
|
+
}
|
|
5937
|
+
),
|
|
5938
|
+
stat.change && /* @__PURE__ */ jsxRuntime.jsx("p", { style: __spreadValues({ fontSize: "12px", fontWeight: 500, color: changeColor(stat.changeType), fontVariantNumeric: "tabular-nums", margin: 0 }, TRUNCATE), children: stat.change }),
|
|
5716
5939
|
stat.description && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "11.5px", color: "#888888", lineHeight: 1.4, margin: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { inline: true, content: stat.description }) })
|
|
5717
5940
|
] }) }, i)) }) });
|
|
5718
5941
|
}
|
|
@@ -5721,7 +5944,7 @@ init_ThemeContext();
|
|
|
5721
5944
|
function TabsPanelResolver(p) {
|
|
5722
5945
|
var _a;
|
|
5723
5946
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
5724
|
-
const [activeIdx, setActiveIdx] =
|
|
5947
|
+
const [activeIdx, setActiveIdx] = React41.useState(0);
|
|
5725
5948
|
const activeTab = p.tabs[activeIdx];
|
|
5726
5949
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: "tabs-panel", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "0" }, children: [
|
|
5727
5950
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5879,17 +6102,17 @@ function SparklineTableResolver(p) {
|
|
|
5879
6102
|
// src/composites/heatmap-table/resolver.tsx
|
|
5880
6103
|
init_theme();
|
|
5881
6104
|
init_ThemeContext();
|
|
5882
|
-
function heatColor(
|
|
5883
|
-
const clamped = Math.max(-3, Math.min(3,
|
|
6105
|
+
function heatColor(z58) {
|
|
6106
|
+
const clamped = Math.max(-3, Math.min(3, z58));
|
|
5884
6107
|
const abs = Math.abs(clamped);
|
|
5885
6108
|
const lightness = 95 - abs * 8;
|
|
5886
6109
|
const hue = clamped >= 0 ? 142 : 0;
|
|
5887
6110
|
return `hsl(${hue} 60% ${lightness}%)`;
|
|
5888
6111
|
}
|
|
5889
|
-
function heatTextColor(
|
|
5890
|
-
const abs = Math.abs(
|
|
5891
|
-
if (abs > 2) return
|
|
5892
|
-
if (abs > 1) return
|
|
6112
|
+
function heatTextColor(z58) {
|
|
6113
|
+
const abs = Math.abs(z58);
|
|
6114
|
+
if (abs > 2) return z58 >= 0 ? "#14532d" : "#7f1d1d";
|
|
6115
|
+
if (abs > 1) return z58 >= 0 ? "#166534" : "#991b1b";
|
|
5893
6116
|
return "var(--foreground)";
|
|
5894
6117
|
}
|
|
5895
6118
|
var th2 = {
|
|
@@ -5987,7 +6210,7 @@ var thStyle2 = {
|
|
|
5987
6210
|
function ScreenerTableResolver(p) {
|
|
5988
6211
|
var _a, _b, _c, _d, _e, _f;
|
|
5989
6212
|
const { ACCENT: ACCENT2, BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2 } = useTheme();
|
|
5990
|
-
const [activeFilters, setActiveFilters] =
|
|
6213
|
+
const [activeFilters, setActiveFilters] = React41.useState(new Set((_a = p.activeFilters) != null ? _a : []));
|
|
5991
6214
|
const { visibleColumns, hidden, toggle, showAll, hideAll, allColumns } = useColumnVisibility((_b = p.columns) != null ? _b : []);
|
|
5992
6215
|
const toggleFilter = (f) => setActiveFilters((prev) => {
|
|
5993
6216
|
const next = new Set(prev);
|
|
@@ -6057,7 +6280,7 @@ var th3 = {
|
|
|
6057
6280
|
};
|
|
6058
6281
|
function GroupRows({ group, columns, depth }) {
|
|
6059
6282
|
var _a, _b;
|
|
6060
|
-
const [open, setOpen] =
|
|
6283
|
+
const [open, setOpen] = React41.useState(true);
|
|
6061
6284
|
const indent = depth * 14;
|
|
6062
6285
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6063
6286
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6162,7 +6385,7 @@ var dotColor = {
|
|
|
6162
6385
|
function NewsFeedResolver(p) {
|
|
6163
6386
|
var _a, _b;
|
|
6164
6387
|
const { ACCENT: ACCENT2, MUTED: MUTED2 } = useTheme();
|
|
6165
|
-
const [filter, setFilter] =
|
|
6388
|
+
const [filter, setFilter] = React41.useState(null);
|
|
6166
6389
|
const sentiments = ["positive", "neutral", "negative"].filter(
|
|
6167
6390
|
(s) => {
|
|
6168
6391
|
var _a2;
|
|
@@ -6204,9 +6427,9 @@ function NewsFeedResolver(p) {
|
|
|
6204
6427
|
] }) });
|
|
6205
6428
|
}
|
|
6206
6429
|
function useSeriesToggle(seriesKeys) {
|
|
6207
|
-
const [hidden, setHidden] =
|
|
6208
|
-
const isVisible =
|
|
6209
|
-
const toggle =
|
|
6430
|
+
const [hidden, setHidden] = React41.useState(/* @__PURE__ */ new Set());
|
|
6431
|
+
const isVisible = React41.useCallback((key) => !hidden.has(key), [hidden]);
|
|
6432
|
+
const toggle = React41.useCallback((key) => {
|
|
6210
6433
|
setHidden((prev) => {
|
|
6211
6434
|
const next = new Set(prev);
|
|
6212
6435
|
if (next.has(key)) next.delete(key);
|
|
@@ -6214,7 +6437,7 @@ function useSeriesToggle(seriesKeys) {
|
|
|
6214
6437
|
return next;
|
|
6215
6438
|
});
|
|
6216
6439
|
}, []);
|
|
6217
|
-
const showAll =
|
|
6440
|
+
const showAll = React41.useCallback(() => setHidden(/* @__PURE__ */ new Set()), []);
|
|
6218
6441
|
return { hidden, isVisible, toggle, showAll, allKeys: seriesKeys };
|
|
6219
6442
|
}
|
|
6220
6443
|
|
|
@@ -6509,7 +6732,7 @@ function WaterfallChartResolver(p) {
|
|
|
6509
6732
|
] }) });
|
|
6510
6733
|
}
|
|
6511
6734
|
init_ThemeContext();
|
|
6512
|
-
var FlowGraph2 =
|
|
6735
|
+
var FlowGraph2 = React41__default.default.lazy(
|
|
6513
6736
|
() => Promise.resolve().then(() => (init_FlowGraph(), FlowGraph_exports)).then((m) => ({ default: m.FlowGraph }))
|
|
6514
6737
|
);
|
|
6515
6738
|
function FlowCanvasRenderer({
|
|
@@ -6550,7 +6773,7 @@ function FlowCanvasRenderer({
|
|
|
6550
6773
|
overflow: "hidden",
|
|
6551
6774
|
background: "#ffffff",
|
|
6552
6775
|
position: "relative"
|
|
6553
|
-
}, diagram ? {} : { height: "320px" }), children: diagram ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6776
|
+
}, diagram ? {} : { height: "320px" }), children: diagram ? /* @__PURE__ */ jsxRuntime.jsx(React41.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(FlowGraph2, { diagram, title, autoplay, nodeStates }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
|
|
6554
6777
|
position: "absolute",
|
|
6555
6778
|
inset: 0,
|
|
6556
6779
|
display: "flex",
|
|
@@ -6762,7 +6985,7 @@ function TrialBalanceResolver(p) {
|
|
|
6762
6985
|
color: balanced ? "#15803d" : "#dc2626"
|
|
6763
6986
|
}, children: balanced ? "\u2713 Balanced" : "\u2717 Unbalanced" })
|
|
6764
6987
|
] }),
|
|
6765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
6988
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", minWidth: 0, borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
6766
6989
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Code", "Account", "Debit", "Credit"].map((h, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
6767
6990
|
fontSize: "11px",
|
|
6768
6991
|
fontWeight: 500,
|
|
@@ -6783,7 +7006,7 @@ function TrialBalanceResolver(p) {
|
|
|
6783
7006
|
gDebit += a.debit;
|
|
6784
7007
|
gCredit += a.credit;
|
|
6785
7008
|
});
|
|
6786
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7009
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
6787
7010
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 4, style: {
|
|
6788
7011
|
padding: "8px 12px",
|
|
6789
7012
|
fontSize: "12px",
|
|
@@ -6940,7 +7163,7 @@ function AgingReportResolver(p) {
|
|
|
6940
7163
|
p.asOfDate
|
|
6941
7164
|
] })
|
|
6942
7165
|
] }),
|
|
6943
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
|
|
7166
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", minWidth: 0, borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
|
|
6944
7167
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
6945
7168
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { fontSize: "11px", fontWeight: 500, color: MUTED2, padding: "8px 12px", textAlign: "left", borderBottom: `1px solid ${BORDER4}`, background: PAPER2, textTransform: "uppercase", letterSpacing: "0.02em" }, children: "Entity" }),
|
|
6946
7169
|
buckets.map((b, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: { fontSize: "11px", fontWeight: 500, color: MUTED2, padding: "8px 12px", textAlign: "right", borderBottom: `1px solid ${BORDER4}`, background: PAPER2, textTransform: "uppercase", letterSpacing: "0.02em", whiteSpace: "nowrap" }, children: b }, i)),
|
|
@@ -6997,7 +7220,7 @@ function VarianceAnalysisResolver(p) {
|
|
|
6997
7220
|
p.title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 600, color: "var(--foreground)", letterSpacing: "-0.005em" }, children: p.title }),
|
|
6998
7221
|
p.period && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "11px", color: MUTED2 }, children: p.period })
|
|
6999
7222
|
] }),
|
|
7000
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "480px" }, children: [
|
|
7223
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", minWidth: 0, borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "480px" }, children: [
|
|
7001
7224
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Line Item", "Budget", "Actual", "Variance $", "Variance %", ""].map((h, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
7002
7225
|
fontSize: "11px",
|
|
7003
7226
|
fontWeight: 500,
|
|
@@ -7115,6 +7338,8 @@ function StackedBreakdownResolver(p) {
|
|
|
7115
7338
|
alignItems: "center",
|
|
7116
7339
|
gap: "6px",
|
|
7117
7340
|
fontSize: "12px",
|
|
7341
|
+
maxWidth: "100%",
|
|
7342
|
+
minWidth: 0,
|
|
7118
7343
|
color: isVisible(cat.name) ? MUTED2 : "#b3b3b3",
|
|
7119
7344
|
cursor: "pointer",
|
|
7120
7345
|
userSelect: "none",
|
|
@@ -7126,12 +7351,13 @@ function StackedBreakdownResolver(p) {
|
|
|
7126
7351
|
width: "10px",
|
|
7127
7352
|
height: "10px",
|
|
7128
7353
|
borderRadius: "2px",
|
|
7354
|
+
flexShrink: 0,
|
|
7129
7355
|
background: (_a2 = cat.color) != null ? _a2 : PALETTE2[ci % PALETTE2.length],
|
|
7130
7356
|
display: "inline-block",
|
|
7131
7357
|
opacity: isVisible(cat.name) ? 1 : 0.3,
|
|
7132
7358
|
transition: "opacity 0.15s"
|
|
7133
7359
|
} }),
|
|
7134
|
-
cat.name
|
|
7360
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: TRUNCATE, title: cat.name, children: cat.name })
|
|
7135
7361
|
]
|
|
7136
7362
|
},
|
|
7137
7363
|
cat.name
|
|
@@ -7153,7 +7379,7 @@ function StackedBreakdownResolver(p) {
|
|
|
7153
7379
|
((_b2 = p.periods) != null ? _b2 : []).map((_, pi) => {
|
|
7154
7380
|
var _a3, _b3;
|
|
7155
7381
|
const v = pi < ((_a3 = cat.values) != null ? _a3 : []).length ? ((_b3 = cat.values) != null ? _b3 : [])[pi] : 0;
|
|
7156
|
-
return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 12px", fontSize: "13px", textAlign: "right", fontVariantNumeric: "tabular-nums", borderBottom: `1px solid #f2f2f2`, color: v < 0 ? "#dc2626" : void 0 }, children: v < 0 ? `(${fmt5(Math.abs(v), p.currency)})` : fmt5(v, p.currency) }, pi);
|
|
7382
|
+
return /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 12px", fontSize: "13px", textAlign: "right", fontVariantNumeric: "tabular-nums", whiteSpace: "nowrap", borderBottom: `1px solid #f2f2f2`, color: v < 0 ? "#dc2626" : void 0 }, children: v < 0 ? `(${fmt5(Math.abs(v), p.currency)})` : fmt5(v, p.currency) }, pi);
|
|
7157
7383
|
})
|
|
7158
7384
|
] }, cat.name);
|
|
7159
7385
|
}),
|
|
@@ -7317,7 +7543,7 @@ function ItemRow({ item }) {
|
|
|
7317
7543
|
] });
|
|
7318
7544
|
}
|
|
7319
7545
|
function Section({ section }) {
|
|
7320
|
-
const [open, setOpen] =
|
|
7546
|
+
const [open, setOpen] = React41.useState(true);
|
|
7321
7547
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7322
7548
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7323
7549
|
"button",
|
|
@@ -7439,7 +7665,7 @@ function ReconciliationViewResolver(p) {
|
|
|
7439
7665
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
7440
7666
|
const sourceA = (_a = p.sourceA) != null ? _a : { label: "Source A" };
|
|
7441
7667
|
const sourceB = (_b = p.sourceB) != null ? _b : { label: "Source B" };
|
|
7442
|
-
const [activeTab, setActiveTab] =
|
|
7668
|
+
const [activeTab, setActiveTab] = React41.useState("matched");
|
|
7443
7669
|
const balanceA = (_d = (_c = p.summary) == null ? void 0 : _c.balanceA) != null ? _d : 0;
|
|
7444
7670
|
const balanceB = (_f = (_e = p.summary) == null ? void 0 : _e.balanceB) != null ? _f : 0;
|
|
7445
7671
|
const difference = (_h = (_g = p.summary) == null ? void 0 : _g.difference) != null ? _h : balanceA - balanceB;
|
|
@@ -7526,7 +7752,7 @@ function ReconciliationViewResolver(p) {
|
|
|
7526
7752
|
{
|
|
7527
7753
|
style: {
|
|
7528
7754
|
display: "grid",
|
|
7529
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(
|
|
7755
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(120px, 100%), 1fr))",
|
|
7530
7756
|
gap: "0",
|
|
7531
7757
|
marginBottom: "14px",
|
|
7532
7758
|
borderRadius: "10px",
|
|
@@ -7534,31 +7760,28 @@ function ReconciliationViewResolver(p) {
|
|
|
7534
7760
|
overflow: "hidden"
|
|
7535
7761
|
},
|
|
7536
7762
|
children: [
|
|
7537
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "10px 12px", background: PAPER2 }, children: [
|
|
7763
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "10px 12px", background: PAPER2, minWidth: 0 }, children: [
|
|
7538
7764
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7539
7765
|
"div",
|
|
7540
7766
|
{
|
|
7541
|
-
style: {
|
|
7767
|
+
style: __spreadValues({
|
|
7542
7768
|
fontSize: "10px",
|
|
7543
7769
|
fontWeight: 500,
|
|
7544
7770
|
color: MUTED2,
|
|
7545
7771
|
textTransform: "uppercase",
|
|
7546
7772
|
letterSpacing: "0.04em",
|
|
7547
7773
|
marginBottom: "4px"
|
|
7548
|
-
},
|
|
7774
|
+
}, TRUNCATE),
|
|
7549
7775
|
children: sourceA.label
|
|
7550
7776
|
}
|
|
7551
7777
|
),
|
|
7552
7778
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7553
|
-
|
|
7779
|
+
FitText,
|
|
7554
7780
|
{
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
fontVariantNumeric: "tabular-nums",
|
|
7560
|
-
letterSpacing: "-0.01em"
|
|
7561
|
-
},
|
|
7781
|
+
max: 15,
|
|
7782
|
+
min: 11,
|
|
7783
|
+
title: fmt6(balanceA, p.currency),
|
|
7784
|
+
style: { fontWeight: 600, color: "var(--foreground)", fontVariantNumeric: "tabular-nums", letterSpacing: "-0.01em" },
|
|
7562
7785
|
children: fmt6(balanceA, p.currency)
|
|
7563
7786
|
}
|
|
7564
7787
|
)
|
|
@@ -7570,33 +7793,31 @@ function ReconciliationViewResolver(p) {
|
|
|
7570
7793
|
padding: "10px 12px",
|
|
7571
7794
|
background: PAPER2,
|
|
7572
7795
|
borderLeft: `1px solid ${BORDER4}`,
|
|
7573
|
-
borderRight: `1px solid ${BORDER4}
|
|
7796
|
+
borderRight: `1px solid ${BORDER4}`,
|
|
7797
|
+
minWidth: 0
|
|
7574
7798
|
},
|
|
7575
7799
|
children: [
|
|
7576
7800
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7577
7801
|
"div",
|
|
7578
7802
|
{
|
|
7579
|
-
style: {
|
|
7803
|
+
style: __spreadValues({
|
|
7580
7804
|
fontSize: "10px",
|
|
7581
7805
|
fontWeight: 500,
|
|
7582
7806
|
color: MUTED2,
|
|
7583
7807
|
textTransform: "uppercase",
|
|
7584
7808
|
letterSpacing: "0.04em",
|
|
7585
7809
|
marginBottom: "4px"
|
|
7586
|
-
},
|
|
7810
|
+
}, TRUNCATE),
|
|
7587
7811
|
children: sourceB.label
|
|
7588
7812
|
}
|
|
7589
7813
|
),
|
|
7590
7814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7591
|
-
|
|
7815
|
+
FitText,
|
|
7592
7816
|
{
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
fontVariantNumeric: "tabular-nums",
|
|
7598
|
-
letterSpacing: "-0.01em"
|
|
7599
|
-
},
|
|
7817
|
+
max: 15,
|
|
7818
|
+
min: 11,
|
|
7819
|
+
title: fmt6(balanceB, p.currency),
|
|
7820
|
+
style: { fontWeight: 600, color: "var(--foreground)", fontVariantNumeric: "tabular-nums", letterSpacing: "-0.01em" },
|
|
7600
7821
|
children: fmt6(balanceB, p.currency)
|
|
7601
7822
|
}
|
|
7602
7823
|
)
|
|
@@ -7608,7 +7829,8 @@ function ReconciliationViewResolver(p) {
|
|
|
7608
7829
|
{
|
|
7609
7830
|
style: {
|
|
7610
7831
|
padding: "10px 12px",
|
|
7611
|
-
background: difference === 0 ? "#f0fdf4" : "#fef2f2"
|
|
7832
|
+
background: difference === 0 ? "#f0fdf4" : "#fef2f2",
|
|
7833
|
+
minWidth: 0
|
|
7612
7834
|
},
|
|
7613
7835
|
children: [
|
|
7614
7836
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7648,15 +7870,12 @@ function ReconciliationViewResolver(p) {
|
|
|
7648
7870
|
}
|
|
7649
7871
|
),
|
|
7650
7872
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7651
|
-
|
|
7873
|
+
FitText,
|
|
7652
7874
|
{
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
fontVariantNumeric: "tabular-nums",
|
|
7658
|
-
letterSpacing: "-0.01em"
|
|
7659
|
-
},
|
|
7875
|
+
max: 15,
|
|
7876
|
+
min: 11,
|
|
7877
|
+
title: fmt6(difference, p.currency),
|
|
7878
|
+
style: { fontWeight: 700, color: difference === 0 ? MATCH_GREEN : DIFF_RED, fontVariantNumeric: "tabular-nums", letterSpacing: "-0.01em" },
|
|
7660
7879
|
children: fmt6(difference, p.currency)
|
|
7661
7880
|
}
|
|
7662
7881
|
)
|
|
@@ -8089,7 +8308,7 @@ function ChangesView({ changes }) {
|
|
|
8089
8308
|
}
|
|
8090
8309
|
function EventCard({ event }) {
|
|
8091
8310
|
var _a;
|
|
8092
|
-
const [showChanges, setShowChanges] =
|
|
8311
|
+
const [showChanges, setShowChanges] = React41.useState(false);
|
|
8093
8312
|
const ac = (_a = actionConfig[event.action]) != null ? _a : actionConfig.commented;
|
|
8094
8313
|
const hasChanges = event.changes && event.changes.length > 0;
|
|
8095
8314
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "12px", position: "relative" }, children: [
|
|
@@ -8147,23 +8366,23 @@ function AuditTrailResolver(p) {
|
|
|
8147
8366
|
}
|
|
8148
8367
|
init_Markdown();
|
|
8149
8368
|
function useFullscreen(ref) {
|
|
8150
|
-
const [isFullscreen, setIsFullscreen] =
|
|
8151
|
-
|
|
8369
|
+
const [isFullscreen, setIsFullscreen] = React41.useState(false);
|
|
8370
|
+
React41.useEffect(() => {
|
|
8152
8371
|
const handler = () => {
|
|
8153
8372
|
setIsFullscreen(!!document.fullscreenElement);
|
|
8154
8373
|
};
|
|
8155
8374
|
document.addEventListener("fullscreenchange", handler);
|
|
8156
8375
|
return () => document.removeEventListener("fullscreenchange", handler);
|
|
8157
8376
|
}, []);
|
|
8158
|
-
const enter =
|
|
8377
|
+
const enter = React41.useCallback(() => {
|
|
8159
8378
|
var _a, _b;
|
|
8160
8379
|
(_b = (_a = ref.current) == null ? void 0 : _a.requestFullscreen) == null ? void 0 : _b.call(_a);
|
|
8161
8380
|
}, [ref]);
|
|
8162
|
-
const exit =
|
|
8381
|
+
const exit = React41.useCallback(() => {
|
|
8163
8382
|
var _a;
|
|
8164
8383
|
if (document.fullscreenElement) (_a = document.exitFullscreen) == null ? void 0 : _a.call(document);
|
|
8165
8384
|
}, []);
|
|
8166
|
-
const toggle =
|
|
8385
|
+
const toggle = React41.useCallback(() => {
|
|
8167
8386
|
if (isFullscreen) exit();
|
|
8168
8387
|
else enter();
|
|
8169
8388
|
}, [isFullscreen, enter, exit]);
|
|
@@ -8173,10 +8392,10 @@ function useFullscreen(ref) {
|
|
|
8173
8392
|
// src/composites/document-preview/resolver.tsx
|
|
8174
8393
|
init_theme();
|
|
8175
8394
|
init_ThemeContext();
|
|
8176
|
-
var PdfViewer2 =
|
|
8395
|
+
var PdfViewer2 = React41__default.default.lazy(
|
|
8177
8396
|
() => Promise.resolve().then(() => (init_PdfViewer(), PdfViewer_exports)).then((m) => ({ default: m.PdfViewer }))
|
|
8178
8397
|
);
|
|
8179
|
-
var ExcelViewer2 =
|
|
8398
|
+
var ExcelViewer2 = React41__default.default.lazy(
|
|
8180
8399
|
() => Promise.resolve().then(() => (init_ExcelViewer(), ExcelViewer_exports)).then((m) => ({ default: m.ExcelViewer }))
|
|
8181
8400
|
);
|
|
8182
8401
|
var highlightColors = {
|
|
@@ -8226,8 +8445,8 @@ function DownloadIcon() {
|
|
|
8226
8445
|
function DocumentPreviewResolver(p) {
|
|
8227
8446
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
8228
8447
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
8229
|
-
const [currentPage, setCurrentPage] =
|
|
8230
|
-
const containerRef =
|
|
8448
|
+
const [currentPage, setCurrentPage] = React41.useState(0);
|
|
8449
|
+
const containerRef = React41.useRef(null);
|
|
8231
8450
|
const { isFullscreen, toggle } = useFullscreen(containerRef);
|
|
8232
8451
|
const hasRealFile = !!(((_a = p.source) == null ? void 0 : _a.url) || ((_b = p.source) == null ? void 0 : _b.base64));
|
|
8233
8452
|
const isPdf = p.documentType === "pdf";
|
|
@@ -8235,9 +8454,9 @@ function DocumentPreviewResolver(p) {
|
|
|
8235
8454
|
const totalPages = ((_c = p.pages) != null ? _c : []).length;
|
|
8236
8455
|
const page = p.pages[currentPage];
|
|
8237
8456
|
const pageHighlights = ((_d = p.highlights) != null ? _d : []).filter((h) => h.pageIndex === currentPage);
|
|
8238
|
-
const handlePdfLoad =
|
|
8457
|
+
const handlePdfLoad = React41.useCallback(() => {
|
|
8239
8458
|
}, []);
|
|
8240
|
-
const handleExcelLoad =
|
|
8459
|
+
const handleExcelLoad = React41.useCallback(() => {
|
|
8241
8460
|
}, []);
|
|
8242
8461
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_e = p.title) != null ? _e : "document-preview", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8243
8462
|
"div",
|
|
@@ -8350,7 +8569,7 @@ function DocumentPreviewResolver(p) {
|
|
|
8350
8569
|
display: "flex",
|
|
8351
8570
|
flexDirection: "column"
|
|
8352
8571
|
}, children: [
|
|
8353
|
-
hasRealFile && isPdf ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
8572
|
+
hasRealFile && isPdf ? /* @__PURE__ */ jsxRuntime.jsx(React41.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(PdfViewer2, { url: (_q = p.source) == null ? void 0 : _q.url, base64: (_r = p.source) == null ? void 0 : _r.base64, onLoadSuccess: handlePdfLoad }) }) : hasRealFile && isExcel ? /* @__PURE__ */ jsxRuntime.jsx(React41.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(ExcelViewer2, { url: (_s = p.source) == null ? void 0 : _s.url, base64: (_t = p.source) == null ? void 0 : _t.base64, onLoadSuccess: handleExcelLoad }) }) : (page == null ? void 0 : page.imageUrl) ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsx("img", { src: page.imageUrl, alt: page.label, style: { maxWidth: "100%", borderRadius: "4px" } }) }) : (page == null ? void 0 : page.content) ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontFamily: "var(--font-sans, system-ui)", fontSize: "13px", color: "var(--foreground)", lineHeight: 1.6, margin: 0, padding: "20px" }, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { content: page.content }) }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "120px", color: MUTED2, fontSize: "13px" }, children: [
|
|
8354
8573
|
"No content available for ",
|
|
8355
8574
|
(_u = page == null ? void 0 : page.label) != null ? _u : "this page"
|
|
8356
8575
|
] }),
|
|
@@ -8413,7 +8632,7 @@ function ConfidenceBar({ confidence, height = 6 }) {
|
|
|
8413
8632
|
}
|
|
8414
8633
|
function StepCard({ step, isLast }) {
|
|
8415
8634
|
var _a;
|
|
8416
|
-
const [expanded, setExpanded] =
|
|
8635
|
+
const [expanded, setExpanded] = React41.useState(false);
|
|
8417
8636
|
const cfg = stepTypeConfig[step.stepType];
|
|
8418
8637
|
const detail = (_a = step.detail) != null ? _a : "";
|
|
8419
8638
|
const isLong = detail.length > 100;
|
|
@@ -8918,7 +9137,7 @@ function ExampleRow({ example }) {
|
|
|
8918
9137
|
);
|
|
8919
9138
|
}
|
|
8920
9139
|
function PartSection({ part, defaultOpen }) {
|
|
8921
|
-
const [open, setOpen] =
|
|
9140
|
+
const [open, setOpen] = React41.useState(defaultOpen);
|
|
8922
9141
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8923
9142
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8924
9143
|
"button",
|
|
@@ -9048,7 +9267,7 @@ function EngagementPipelineResolver(p) {
|
|
|
9048
9267
|
const defaultActive = phases.findIndex(
|
|
9049
9268
|
(ph) => ph.status === "in-progress" || ph.status === "blocked"
|
|
9050
9269
|
);
|
|
9051
|
-
const [activeIdx, setActiveIdx] =
|
|
9270
|
+
const [activeIdx, setActiveIdx] = React41.useState(defaultActive >= 0 ? defaultActive : 0);
|
|
9052
9271
|
const activePhase = phases[activeIdx];
|
|
9053
9272
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_b = p.title) != null ? _b : "engagement-pipeline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "12px" }, children: [
|
|
9054
9273
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
@@ -9132,7 +9351,7 @@ function EngagementPipelineResolver(p) {
|
|
|
9132
9351
|
const color = (_a2 = statusColor2[phase.status]) != null ? _a2 : "#d6d3d1";
|
|
9133
9352
|
const isCurrent = i === activeIdx;
|
|
9134
9353
|
const size = isCurrent ? 28 : 20;
|
|
9135
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9354
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
9136
9355
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9137
9356
|
"div",
|
|
9138
9357
|
{
|
|
@@ -9439,7 +9658,7 @@ function Avatar({ name, avatar, hovered }) {
|
|
|
9439
9658
|
function EntityCardGridResolver(p) {
|
|
9440
9659
|
var _a, _b;
|
|
9441
9660
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
9442
|
-
const [hoveredId, setHoveredId] =
|
|
9661
|
+
const [hoveredId, setHoveredId] = React41.useState(null);
|
|
9443
9662
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_a = p.title) != null ? _a : "entity-card-grid", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "10px" }, children: [
|
|
9444
9663
|
p.title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9445
9664
|
"p",
|
|
@@ -9460,7 +9679,7 @@ function EntityCardGridResolver(p) {
|
|
|
9460
9679
|
{
|
|
9461
9680
|
style: {
|
|
9462
9681
|
display: "grid",
|
|
9463
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(220px, 1fr))`,
|
|
9682
|
+
gridTemplateColumns: `repeat(auto-fit, minmax(min(220px, 100%), 1fr))`,
|
|
9464
9683
|
gap: "12px",
|
|
9465
9684
|
width: "100%"
|
|
9466
9685
|
},
|
|
@@ -9551,7 +9770,7 @@ function EntityCardGridResolver(p) {
|
|
|
9551
9770
|
{
|
|
9552
9771
|
style: {
|
|
9553
9772
|
display: "grid",
|
|
9554
|
-
gridTemplateColumns: item.fields.length > 2 ? "repeat(auto-fit, minmax(90px, 1fr))" : "1fr",
|
|
9773
|
+
gridTemplateColumns: item.fields.length > 2 ? "repeat(auto-fit, minmax(min(90px, 100%), 1fr))" : "1fr",
|
|
9555
9774
|
gap: "6px 12px",
|
|
9556
9775
|
borderTop: `1px solid ${BORDER4}`,
|
|
9557
9776
|
paddingTop: "8px"
|
|
@@ -9695,7 +9914,7 @@ function StepRow({ step }) {
|
|
|
9695
9914
|
function JobTrackerResolver(p) {
|
|
9696
9915
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
9697
9916
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, PAPER: PAPER2 } = useTheme();
|
|
9698
|
-
const [stepsOpen, setStepsOpen] =
|
|
9917
|
+
const [stepsOpen, setStepsOpen] = React41.useState(true);
|
|
9699
9918
|
const barColor = (_a = statusColors2[p.status]) != null ? _a : MUTED2;
|
|
9700
9919
|
const badge = (_b = statusBadgeConfig[p.status]) != null ? _b : statusBadgeConfig.queued;
|
|
9701
9920
|
const progress = (_c = p.progress) != null ? _c : p.status === "completed" ? 100 : 0;
|
|
@@ -10135,7 +10354,7 @@ function CitationCard({
|
|
|
10135
10354
|
);
|
|
10136
10355
|
}
|
|
10137
10356
|
function FollowUpItem({ text }) {
|
|
10138
|
-
const [hovered, setHovered] =
|
|
10357
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10139
10358
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10140
10359
|
"span",
|
|
10141
10360
|
{
|
|
@@ -10160,7 +10379,7 @@ function CitationMarker({
|
|
|
10160
10379
|
index,
|
|
10161
10380
|
onClick
|
|
10162
10381
|
}) {
|
|
10163
|
-
const [hovered, setHovered] =
|
|
10382
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10164
10383
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10165
10384
|
"sup",
|
|
10166
10385
|
{
|
|
@@ -10189,7 +10408,7 @@ function CitationMarker({
|
|
|
10189
10408
|
function CitedAnswerResolver(p) {
|
|
10190
10409
|
var _a, _b, _c, _d, _e;
|
|
10191
10410
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, SECONDARY: SECONDARY2 } = useTheme();
|
|
10192
|
-
const [expandedIds, setExpandedIds] =
|
|
10411
|
+
const [expandedIds, setExpandedIds] = React41.useState(/* @__PURE__ */ new Set());
|
|
10193
10412
|
const toggleCitation = (id) => {
|
|
10194
10413
|
setExpandedIds((prev) => {
|
|
10195
10414
|
const next = new Set(prev);
|
|
@@ -10493,7 +10712,7 @@ function TransactionFeedResolver(p) {
|
|
|
10493
10712
|
var _a, _b, _c, _d, _e;
|
|
10494
10713
|
const { BORDER: BORDER4, MUTED: MUTED2 } = useTheme();
|
|
10495
10714
|
const currency = (_a = p.currency) != null ? _a : "USD";
|
|
10496
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
10715
|
+
const [hoveredIndex, setHoveredIndex] = React41.useState(null);
|
|
10497
10716
|
const hasBalance = ((_b = p.transactions) != null ? _b : []).some((tx) => tx.balance != null);
|
|
10498
10717
|
const totalInflows = p.transactions.filter((tx) => tx.amount > 0 && tx.status !== "reversed").reduce((sum, tx) => sum + tx.amount, 0);
|
|
10499
10718
|
const totalOutflows = p.transactions.filter((tx) => tx.amount < 0 && tx.status !== "reversed").reduce((sum, tx) => sum + tx.amount, 0);
|
|
@@ -10650,7 +10869,7 @@ function formatDate2(dateStr) {
|
|
|
10650
10869
|
}
|
|
10651
10870
|
function FileRow({ item }) {
|
|
10652
10871
|
var _a;
|
|
10653
|
-
const [hovered, setHovered] =
|
|
10872
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10654
10873
|
const cfg = getDocConfig(item.docType);
|
|
10655
10874
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10656
10875
|
"div",
|
|
@@ -10726,8 +10945,8 @@ function FileRow({ item }) {
|
|
|
10726
10945
|
);
|
|
10727
10946
|
}
|
|
10728
10947
|
function GroupSection({ groupName, items }) {
|
|
10729
|
-
const [open, setOpen] =
|
|
10730
|
-
const [headerHovered, setHeaderHovered] =
|
|
10948
|
+
const [open, setOpen] = React41.useState(true);
|
|
10949
|
+
const [headerHovered, setHeaderHovered] = React41.useState(false);
|
|
10731
10950
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10732
10951
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10733
10952
|
"button",
|
|
@@ -10913,15 +11132,15 @@ function isExpirySoon(expiresAt) {
|
|
|
10913
11132
|
|
|
10914
11133
|
// src/shared/viewers/PreviewHost.tsx
|
|
10915
11134
|
init_ThemeContext();
|
|
10916
|
-
var PdfViewer3 =
|
|
11135
|
+
var PdfViewer3 = React41.lazy(
|
|
10917
11136
|
() => Promise.resolve().then(() => (init_PdfViewer(), PdfViewer_exports)).then((m) => ({ default: m.PdfViewer }))
|
|
10918
11137
|
);
|
|
10919
|
-
var ExcelViewer3 =
|
|
11138
|
+
var ExcelViewer3 = React41.lazy(
|
|
10920
11139
|
() => Promise.resolve().then(() => (init_ExcelViewer(), ExcelViewer_exports)).then((m) => ({ default: m.ExcelViewer }))
|
|
10921
11140
|
);
|
|
10922
|
-
var CsvViewer2 =
|
|
10923
|
-
var TextViewer2 =
|
|
10924
|
-
var DocxViewer2 =
|
|
11141
|
+
var CsvViewer2 = React41.lazy(() => Promise.resolve().then(() => (init_CsvViewer(), CsvViewer_exports)).then((m) => ({ default: m.CsvViewer })));
|
|
11142
|
+
var TextViewer2 = React41.lazy(() => Promise.resolve().then(() => (init_TextViewer(), TextViewer_exports)).then((m) => ({ default: m.TextViewer })));
|
|
11143
|
+
var DocxViewer2 = React41.lazy(() => Promise.resolve().then(() => (init_DocxViewer(), DocxViewer_exports)).then((m) => ({ default: m.DocxViewer })));
|
|
10925
11144
|
var PEEK_ROWS = 20;
|
|
10926
11145
|
var PEEK_LINES = 40;
|
|
10927
11146
|
function PreviewHost({ kind, source, mode = "full" }) {
|
|
@@ -10951,7 +11170,7 @@ function PreviewHost({ kind, source, mode = "full" }) {
|
|
|
10951
11170
|
default:
|
|
10952
11171
|
return null;
|
|
10953
11172
|
}
|
|
10954
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11173
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React41.Suspense, { fallback, children: viewer });
|
|
10955
11174
|
}
|
|
10956
11175
|
|
|
10957
11176
|
// src/shared/PreviewModal.tsx
|
|
@@ -10967,7 +11186,7 @@ function PreviewModal({
|
|
|
10967
11186
|
onDownload
|
|
10968
11187
|
}) {
|
|
10969
11188
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
10970
|
-
|
|
11189
|
+
React41.useEffect(() => {
|
|
10971
11190
|
if (!open) return;
|
|
10972
11191
|
const onKey = (e) => {
|
|
10973
11192
|
if (e.key === "Escape") onClose();
|
|
@@ -11140,17 +11359,17 @@ function FileCard({
|
|
|
11140
11359
|
previewDisabled = false
|
|
11141
11360
|
}) {
|
|
11142
11361
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
11143
|
-
const [cardHover, setCardHover] =
|
|
11144
|
-
const [btnHover, setBtnHover] =
|
|
11145
|
-
const [pvHover, setPvHover] =
|
|
11362
|
+
const [cardHover, setCardHover] = React41.useState(false);
|
|
11363
|
+
const [btnHover, setBtnHover] = React41.useState(false);
|
|
11364
|
+
const [pvHover, setPvHover] = React41.useState(false);
|
|
11146
11365
|
const previewKind = previewKindFor(fileType, filename);
|
|
11147
11366
|
const canPreview = !previewDisabled && previewKind !== null && (!!previewUrl || !!fetchPreviewBlob);
|
|
11148
|
-
const [peekOpen, setPeekOpen] =
|
|
11149
|
-
const [modalOpen, setModalOpen] =
|
|
11150
|
-
const [source, setSource] =
|
|
11151
|
-
const [pvLoading, setPvLoading] =
|
|
11152
|
-
const [pvError, setPvError] =
|
|
11153
|
-
const ensureSource =
|
|
11367
|
+
const [peekOpen, setPeekOpen] = React41.useState(false);
|
|
11368
|
+
const [modalOpen, setModalOpen] = React41.useState(false);
|
|
11369
|
+
const [source, setSource] = React41.useState(previewUrl ? { url: previewUrl } : null);
|
|
11370
|
+
const [pvLoading, setPvLoading] = React41.useState(false);
|
|
11371
|
+
const [pvError, setPvError] = React41.useState(null);
|
|
11372
|
+
const ensureSource = React41.useCallback(async () => {
|
|
11154
11373
|
if (source) return source;
|
|
11155
11374
|
if (previewUrl) {
|
|
11156
11375
|
const s = { url: previewUrl };
|
|
@@ -11172,7 +11391,7 @@ function FileCard({
|
|
|
11172
11391
|
setPvLoading(false);
|
|
11173
11392
|
}
|
|
11174
11393
|
}, [source, previewUrl, fetchPreviewBlob]);
|
|
11175
|
-
const togglePeek =
|
|
11394
|
+
const togglePeek = React41.useCallback(async () => {
|
|
11176
11395
|
if (peekOpen) {
|
|
11177
11396
|
setPeekOpen(false);
|
|
11178
11397
|
return;
|
|
@@ -11180,7 +11399,7 @@ function FileCard({
|
|
|
11180
11399
|
setPeekOpen(true);
|
|
11181
11400
|
await ensureSource();
|
|
11182
11401
|
}, [peekOpen, ensureSource]);
|
|
11183
|
-
const openModal =
|
|
11402
|
+
const openModal = React41.useCallback(async () => {
|
|
11184
11403
|
const s = await ensureSource();
|
|
11185
11404
|
if (s) setModalOpen(true);
|
|
11186
11405
|
}, [ensureSource]);
|
|
@@ -11295,7 +11514,7 @@ function FileCard({
|
|
|
11295
11514
|
whiteSpace: "nowrap"
|
|
11296
11515
|
},
|
|
11297
11516
|
children: [
|
|
11298
|
-
metaTokens.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11517
|
+
metaTokens.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
11299
11518
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#c4c4c4" }, children: "\xB7" }),
|
|
11300
11519
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t })
|
|
11301
11520
|
] }, i)),
|
|
@@ -11639,7 +11858,7 @@ function ServiceCard({ item, isHovered, onHover, onLeave: onLeave2 }) {
|
|
|
11639
11858
|
function OpsDashboardResolver(p) {
|
|
11640
11859
|
var _a, _b, _c;
|
|
11641
11860
|
const { BORDER: BORDER4, MUTED: MUTED2 } = useTheme();
|
|
11642
|
-
const [hoveredId, setHoveredId] =
|
|
11861
|
+
const [hoveredId, setHoveredId] = React41.useState(null);
|
|
11643
11862
|
const hasRunning = ((_a = p.items) != null ? _a : []).some((item) => item.state === "running");
|
|
11644
11863
|
return /* @__PURE__ */ jsxRuntime.jsxs(ComponentActions, { filename: (_b = p.title) != null ? _b : "ops-dashboard", children: [
|
|
11645
11864
|
hasRunning && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
|
|
@@ -11692,8 +11911,8 @@ function formatDate3(value) {
|
|
|
11692
11911
|
}
|
|
11693
11912
|
}
|
|
11694
11913
|
function CopyButton({ value, rowHovered }) {
|
|
11695
|
-
const [copied, setCopied] =
|
|
11696
|
-
const [btnHovered, setBtnHovered] =
|
|
11914
|
+
const [copied, setCopied] = React41.useState(false);
|
|
11915
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
11697
11916
|
const handleCopy = () => {
|
|
11698
11917
|
navigator.clipboard.writeText(value).then(() => {
|
|
11699
11918
|
setCopied(true);
|
|
@@ -11779,13 +11998,13 @@ function ValueCell({ item }) {
|
|
|
11779
11998
|
)
|
|
11780
11999
|
] });
|
|
11781
12000
|
case "currency":
|
|
11782
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "13px", fontWeight: 600, fontVariantNumeric: "tabular-nums", marginLeft: "auto" }, children: item.value });
|
|
12001
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { title: item.value, style: __spreadValues({ fontSize: "13px", fontWeight: 600, fontVariantNumeric: "tabular-nums", marginLeft: "auto" }, TRUNCATE), children: item.value });
|
|
11783
12002
|
default:
|
|
11784
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "13px", color: "var(--foreground)" }, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { inline: true, content: item.value }) });
|
|
12003
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "13px", color: "var(--foreground)", minWidth: 0, overflowWrap: "anywhere" }, children: /* @__PURE__ */ jsxRuntime.jsx(Markdown, { inline: true, content: item.value }) });
|
|
11785
12004
|
}
|
|
11786
12005
|
}
|
|
11787
12006
|
function KVRow({ item, isLast, index }) {
|
|
11788
|
-
const [hovered, setHovered] =
|
|
12007
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
11789
12008
|
const altBg = index % 2 === 1 ? "#fcfcfc" : "white";
|
|
11790
12009
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11791
12010
|
"div",
|
|
@@ -11814,7 +12033,7 @@ function KVRow({ item, isLast, index }) {
|
|
|
11814
12033
|
children: item.key
|
|
11815
12034
|
}
|
|
11816
12035
|
),
|
|
11817
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { flex: 1, display: "flex", alignItems: "center", gap: "6px" }, children: /* @__PURE__ */ jsxRuntime.jsx(ValueCell, { item }) }),
|
|
12036
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { flex: 1, minWidth: 0, display: "flex", alignItems: "center", gap: "6px" }, children: /* @__PURE__ */ jsxRuntime.jsx(ValueCell, { item }) }),
|
|
11818
12037
|
item.copyable && /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value: item.value, rowHovered: hovered })
|
|
11819
12038
|
]
|
|
11820
12039
|
}
|
|
@@ -11870,7 +12089,7 @@ function KeyValueListResolver(p) {
|
|
|
11870
12089
|
var _a3;
|
|
11871
12090
|
return sum + ((_a3 = g.items) != null ? _a3 : []).length;
|
|
11872
12091
|
}, 0);
|
|
11873
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12092
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
11874
12093
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11875
12094
|
"div",
|
|
11876
12095
|
{
|
|
@@ -12006,7 +12225,7 @@ function BalanceSheetResolver(p) {
|
|
|
12006
12225
|
color: balanced ? "#15803d" : "#dc2626"
|
|
12007
12226
|
}, children: balanced ? "\u2713 A = L + E" : "\u2717 Out of Balance" })
|
|
12008
12227
|
] }),
|
|
12009
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
12228
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", minWidth: 0, borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
12010
12229
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
12011
12230
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12012
12231
|
fontSize: "11px",
|
|
@@ -12048,7 +12267,7 @@ function BalanceSheetResolver(p) {
|
|
|
12048
12267
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
12049
12268
|
((_p = p.sections) != null ? _p : []).map((section) => {
|
|
12050
12269
|
var _a2;
|
|
12051
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12270
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12052
12271
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan, style: {
|
|
12053
12272
|
padding: "8px 12px",
|
|
12054
12273
|
fontSize: "12px",
|
|
@@ -12061,7 +12280,7 @@ function BalanceSheetResolver(p) {
|
|
|
12061
12280
|
}, children: (_a2 = categoryLabels2[section.category]) != null ? _a2 : section.category }) }),
|
|
12062
12281
|
section.subsections.map((sub, si) => {
|
|
12063
12282
|
var _a3;
|
|
12064
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12065
12284
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan, style: {
|
|
12066
12285
|
padding: "6px 10px 6px 24px",
|
|
12067
12286
|
fontSize: "12px",
|
|
@@ -12223,7 +12442,7 @@ function IncomeStatementResolver(p) {
|
|
|
12223
12442
|
].filter(Boolean).join(" \xB7 ") })
|
|
12224
12443
|
] }),
|
|
12225
12444
|
p.title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontFamily: "var(--font-serif)", fontSize: "15px", fontWeight: 400, color: "var(--foreground)", letterSpacing: "-0.01em", margin: 0 }, children: p.title }),
|
|
12226
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
12445
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { overflowX: "auto", minWidth: 0, borderRadius: "0.75rem", border: `1px solid ${BORDER4}`, boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", minWidth: "380px" }, children: [
|
|
12227
12446
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
12228
12447
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12229
12448
|
fontSize: "11px",
|
|
@@ -12237,7 +12456,7 @@ function IncomeStatementResolver(p) {
|
|
|
12237
12456
|
textAlign: "left",
|
|
12238
12457
|
whiteSpace: "nowrap"
|
|
12239
12458
|
}, children: "\xA0" }),
|
|
12240
|
-
periods.map((period) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12459
|
+
periods.map((period) => /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12241
12460
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12242
12461
|
fontSize: "11px",
|
|
12243
12462
|
fontWeight: 500,
|
|
@@ -12268,7 +12487,7 @@ function IncomeStatementResolver(p) {
|
|
|
12268
12487
|
sections.map((section, si) => {
|
|
12269
12488
|
var _a2;
|
|
12270
12489
|
const isSubtotal = section.sectionType === "subtotal";
|
|
12271
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12272
12491
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: colCount, style: {
|
|
12273
12492
|
padding: "8px 12px",
|
|
12274
12493
|
fontSize: "12px",
|
|
@@ -12299,7 +12518,7 @@ function IncomeStatementResolver(p) {
|
|
|
12299
12518
|
var _a4;
|
|
12300
12519
|
const val = (_a4 = amounts[pi]) != null ? _a4 : 0;
|
|
12301
12520
|
const isNeg = val < 0;
|
|
12302
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12521
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12303
12522
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12304
12523
|
padding: "6px 10px",
|
|
12305
12524
|
fontSize: "13px",
|
|
@@ -12334,7 +12553,7 @@ function IncomeStatementResolver(p) {
|
|
|
12334
12553
|
var _a2;
|
|
12335
12554
|
const val = (_a2 = grossProfit[pi]) != null ? _a2 : 0;
|
|
12336
12555
|
const isNeg = val < 0;
|
|
12337
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12556
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12338
12557
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12339
12558
|
padding: "8px 10px",
|
|
12340
12559
|
fontSize: "12px",
|
|
@@ -12369,7 +12588,7 @@ function IncomeStatementResolver(p) {
|
|
|
12369
12588
|
var _a2;
|
|
12370
12589
|
const val = (_a2 = operatingIncome[pi]) != null ? _a2 : 0;
|
|
12371
12590
|
const isNeg = val < 0;
|
|
12372
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12591
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12373
12592
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12374
12593
|
padding: "8px 10px",
|
|
12375
12594
|
fontSize: "12px",
|
|
@@ -12403,7 +12622,7 @@ function IncomeStatementResolver(p) {
|
|
|
12403
12622
|
var _a2;
|
|
12404
12623
|
const val = (_a2 = netIncome[pi]) != null ? _a2 : 0;
|
|
12405
12624
|
const isNeg = val < 0;
|
|
12406
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12625
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12407
12626
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12408
12627
|
padding: "10px 10px",
|
|
12409
12628
|
fontSize: "13px",
|
|
@@ -12623,7 +12842,7 @@ function CashFlowStatementResolver(p) {
|
|
|
12623
12842
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
12624
12843
|
activities.map((activity, ai) => {
|
|
12625
12844
|
var _a2, _b2, _c2;
|
|
12626
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12845
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12627
12846
|
ai > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12628
12847
|
"td",
|
|
12629
12848
|
{
|
|
@@ -13006,6 +13225,7 @@ function GeneralLedgerResolver(p) {
|
|
|
13006
13225
|
{
|
|
13007
13226
|
style: {
|
|
13008
13227
|
overflowX: "auto",
|
|
13228
|
+
minWidth: 0,
|
|
13009
13229
|
borderRadius: "0.75rem",
|
|
13010
13230
|
border: `1px solid ${BORDER4}`,
|
|
13011
13231
|
boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)"
|
|
@@ -15035,8 +15255,8 @@ var PRIORITY_STYLES = {
|
|
|
15035
15255
|
function EscalationCardResolver(p) {
|
|
15036
15256
|
var _a, _b, _c, _d;
|
|
15037
15257
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
15038
|
-
const [cardHovered, setCardHovered] =
|
|
15039
|
-
const [btnHovered, setBtnHovered] =
|
|
15258
|
+
const [cardHovered, setCardHovered] = React41.useState(false);
|
|
15259
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
15040
15260
|
const priorityStyle = p.priority ? PRIORITY_STYLES[p.priority] : null;
|
|
15041
15261
|
const railColor = (_a = priorityStyle == null ? void 0 : priorityStyle.color) != null ? _a : ACCENT2;
|
|
15042
15262
|
const iconBg = (_b = priorityStyle == null ? void 0 : priorityStyle.bg) != null ? _b : "#fff2ec";
|
|
@@ -15883,9 +16103,9 @@ var CONNECTED_GREEN = "#15803d";
|
|
|
15883
16103
|
function ConnectIntegrationResolver(p) {
|
|
15884
16104
|
var _a;
|
|
15885
16105
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
15886
|
-
const [cardHovered, setCardHovered] =
|
|
15887
|
-
const [btnHovered, setBtnHovered] =
|
|
15888
|
-
const [imgFailed, setImgFailed] =
|
|
16106
|
+
const [cardHovered, setCardHovered] = React41.useState(false);
|
|
16107
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
16108
|
+
const [imgFailed, setImgFailed] = React41.useState(false);
|
|
15889
16109
|
const name = (p.integrationName || "Integration").trim();
|
|
15890
16110
|
const initial = name.charAt(0).toUpperCase();
|
|
15891
16111
|
const iconSrc = p.iconUrl || brandIconUrl(name);
|
|
@@ -16047,9 +16267,9 @@ function IntegrationsListResolver(p) {
|
|
|
16047
16267
|
var _a, _b;
|
|
16048
16268
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
16049
16269
|
const integrations = Array.isArray(p.integrations) ? p.integrations : [];
|
|
16050
|
-
const [rowHover, setRowHover] =
|
|
16051
|
-
const [btnHover, setBtnHover] =
|
|
16052
|
-
const [failed, setFailed] =
|
|
16270
|
+
const [rowHover, setRowHover] = React41.useState(null);
|
|
16271
|
+
const [btnHover, setBtnHover] = React41.useState(null);
|
|
16272
|
+
const [failed, setFailed] = React41.useState({});
|
|
16053
16273
|
const connectedCount = integrations.filter((i) => i.status === "connected").length;
|
|
16054
16274
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_a = p.title) != null ? _a : "integrations", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "11px" }, children: [
|
|
16055
16275
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
|
|
@@ -16532,13 +16752,13 @@ var ellipsis = {
|
|
|
16532
16752
|
function PipelinePreviewResolver(p) {
|
|
16533
16753
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
16534
16754
|
const { MUTED: MUTED2, PAPER: PAPER2, BORDER: BORDER4, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
16535
|
-
const [btnHovered, setBtnHovered] =
|
|
16755
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
16536
16756
|
const stateCfg = STATE_CONFIG[(_a = p.state) != null ? _a : "draft"];
|
|
16537
16757
|
const destinations = (_b = p.destinations) != null ? _b : [];
|
|
16538
16758
|
const steps = (_c = p.steps) != null ? _c : [];
|
|
16539
16759
|
const workstreams = (_d = p.workstreams) != null ? _d : [];
|
|
16540
16760
|
const scheduleLabel = p.schedule ? p.schedule.type === "manual" ? "Manual" : (_f = (_e = p.schedule.label) != null ? _e : p.schedule.cron) != null ? _f : "Scheduled" : null;
|
|
16541
|
-
const { nodes, edges, viewBox, vbW, vbH } =
|
|
16761
|
+
const { nodes, edges, viewBox, vbW, vbH } = React41.useMemo(() => {
|
|
16542
16762
|
const res = layoutGraph(steps);
|
|
16543
16763
|
const b = layoutBounds(res.nodes);
|
|
16544
16764
|
const pad = 24;
|
|
@@ -16552,7 +16772,7 @@ function PipelinePreviewResolver(p) {
|
|
|
16552
16772
|
vbH: h
|
|
16553
16773
|
};
|
|
16554
16774
|
}, [steps]);
|
|
16555
|
-
const nodeMap =
|
|
16775
|
+
const nodeMap = React41.useMemo(() => {
|
|
16556
16776
|
const m = {};
|
|
16557
16777
|
nodes.forEach((n) => m[n.id] = n);
|
|
16558
16778
|
return m;
|
|
@@ -16920,6 +17140,726 @@ function PipelinePreviewResolver(p) {
|
|
|
16920
17140
|
)
|
|
16921
17141
|
] }) });
|
|
16922
17142
|
}
|
|
17143
|
+
init_ThemeContext();
|
|
17144
|
+
var DEFAULT_INTERACTION = {
|
|
17145
|
+
selectedStepId: null,
|
|
17146
|
+
onStepSelect: void 0
|
|
17147
|
+
};
|
|
17148
|
+
var GenUIInteractionContext = React41.createContext(DEFAULT_INTERACTION);
|
|
17149
|
+
function useGenUIInteraction() {
|
|
17150
|
+
return React41.useContext(GenUIInteractionContext);
|
|
17151
|
+
}
|
|
17152
|
+
var STATUS_COLORS3 = {
|
|
17153
|
+
done: "#15803d",
|
|
17154
|
+
active: "",
|
|
17155
|
+
// filled from theme ACCENT at render time
|
|
17156
|
+
review: "#f59e0b",
|
|
17157
|
+
pending: "#9ca3af",
|
|
17158
|
+
failed: "#dc2626"
|
|
17159
|
+
};
|
|
17160
|
+
var STATUS_LABELS = {
|
|
17161
|
+
done: "Complete",
|
|
17162
|
+
active: "In progress",
|
|
17163
|
+
review: "In review",
|
|
17164
|
+
pending: "Pending",
|
|
17165
|
+
failed: "Failed"
|
|
17166
|
+
};
|
|
17167
|
+
var HUMAN_PALETTE = ["#2563eb", "#0f766e", "#7c3aed", "#b45309", "#be185d", "#4d7c0f"];
|
|
17168
|
+
function hashColor(name) {
|
|
17169
|
+
let h = 0;
|
|
17170
|
+
for (let i = 0; i < name.length; i++) h = h * 31 + name.charCodeAt(i) | 0;
|
|
17171
|
+
return HUMAN_PALETTE[Math.abs(h) % HUMAN_PALETTE.length];
|
|
17172
|
+
}
|
|
17173
|
+
function initialsOf(a) {
|
|
17174
|
+
var _a, _b, _c, _d;
|
|
17175
|
+
if (a.initials) return a.initials.slice(0, 2).toUpperCase();
|
|
17176
|
+
const parts = a.name.trim().split(/\s+/);
|
|
17177
|
+
return (((_b = (_a = parts[0]) == null ? void 0 : _a[0]) != null ? _b : "") + ((_d = (_c = parts[1]) == null ? void 0 : _c[0]) != null ? _d : "")).toUpperCase() || "?";
|
|
17178
|
+
}
|
|
17179
|
+
function SparkMark({ size, color }) {
|
|
17180
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17181
|
+
"path",
|
|
17182
|
+
{
|
|
17183
|
+
d: "M12 2C12 2 12.8 6.5 14.5 9.5C16.2 12.5 20 13 20 13C20 13 16.2 13.5 14.5 16.5C12.8 19.5 12 24 12 24C12 24 11.2 19.5 9.5 16.5C7.8 13.5 4 13 4 13C4 13 7.8 12.5 9.5 9.5C11.2 6.5 12 2 12 2Z",
|
|
17184
|
+
fill: color
|
|
17185
|
+
}
|
|
17186
|
+
) });
|
|
17187
|
+
}
|
|
17188
|
+
function AvatarStack({ assignees, accent }) {
|
|
17189
|
+
const shown = assignees.slice(0, 4);
|
|
17190
|
+
const overflow = assignees.length - shown.length;
|
|
17191
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
17192
|
+
shown.map((a, i) => {
|
|
17193
|
+
const isAgent = a.kind === "agent";
|
|
17194
|
+
const bg = isAgent ? `${accent}1f` : a.color || hashColor(a.name);
|
|
17195
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17196
|
+
"div",
|
|
17197
|
+
{
|
|
17198
|
+
title: `${a.name}${a.role ? ` \xB7 ${a.role}` : isAgent ? " \xB7 agent" : ""}`,
|
|
17199
|
+
style: {
|
|
17200
|
+
width: 20,
|
|
17201
|
+
height: 20,
|
|
17202
|
+
borderRadius: "50%",
|
|
17203
|
+
flexShrink: 0,
|
|
17204
|
+
marginLeft: i === 0 ? 0 : -7,
|
|
17205
|
+
zIndex: shown.length - i,
|
|
17206
|
+
display: "flex",
|
|
17207
|
+
alignItems: "center",
|
|
17208
|
+
justifyContent: "center",
|
|
17209
|
+
background: bg,
|
|
17210
|
+
border: "1.5px solid white",
|
|
17211
|
+
boxShadow: isAgent ? `inset 0 0 0 1px ${accent}59` : "none"
|
|
17212
|
+
},
|
|
17213
|
+
children: isAgent ? /* @__PURE__ */ jsxRuntime.jsx(SparkMark, { size: 11, color: accent }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 8, fontWeight: 700, color: "white", letterSpacing: "0.02em" }, children: initialsOf(a) })
|
|
17214
|
+
},
|
|
17215
|
+
`${a.name}-${i}`
|
|
17216
|
+
);
|
|
17217
|
+
}),
|
|
17218
|
+
overflow > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17219
|
+
"span",
|
|
17220
|
+
{
|
|
17221
|
+
style: {
|
|
17222
|
+
marginLeft: -7,
|
|
17223
|
+
zIndex: 0,
|
|
17224
|
+
width: 20,
|
|
17225
|
+
height: 20,
|
|
17226
|
+
borderRadius: "50%",
|
|
17227
|
+
background: "#f2f2f2",
|
|
17228
|
+
border: "1.5px solid white",
|
|
17229
|
+
display: "flex",
|
|
17230
|
+
alignItems: "center",
|
|
17231
|
+
justifyContent: "center",
|
|
17232
|
+
fontSize: 8,
|
|
17233
|
+
fontWeight: 700,
|
|
17234
|
+
color: "#777777"
|
|
17235
|
+
},
|
|
17236
|
+
children: [
|
|
17237
|
+
"+",
|
|
17238
|
+
overflow
|
|
17239
|
+
]
|
|
17240
|
+
}
|
|
17241
|
+
)
|
|
17242
|
+
] });
|
|
17243
|
+
}
|
|
17244
|
+
function IndexDot({ step, index, accent }) {
|
|
17245
|
+
var _a;
|
|
17246
|
+
const n = (_a = step.n) != null ? _a : index + 1;
|
|
17247
|
+
const base = {
|
|
17248
|
+
width: 18,
|
|
17249
|
+
height: 18,
|
|
17250
|
+
borderRadius: "50%",
|
|
17251
|
+
flexShrink: 0,
|
|
17252
|
+
display: "flex",
|
|
17253
|
+
alignItems: "center",
|
|
17254
|
+
justifyContent: "center",
|
|
17255
|
+
fontSize: 10,
|
|
17256
|
+
fontWeight: 700,
|
|
17257
|
+
lineHeight: 1
|
|
17258
|
+
};
|
|
17259
|
+
if (step.status === "done") {
|
|
17260
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#15803d", color: "white" }), children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10 }, children: "\u2713" }) });
|
|
17261
|
+
}
|
|
17262
|
+
if (step.status === "failed") {
|
|
17263
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#dc2626", color: "white" }), children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 10 }, children: "!" }) });
|
|
17264
|
+
}
|
|
17265
|
+
if (step.status === "active") {
|
|
17266
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: accent, color: "white" }), children: n });
|
|
17267
|
+
}
|
|
17268
|
+
if (step.status === "review") {
|
|
17269
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "white", border: "1.5px solid #f59e0b", color: "#b45309" }), children: n });
|
|
17270
|
+
}
|
|
17271
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, base), { background: "#f2f2f2", color: "#9ca3af" }), children: n });
|
|
17272
|
+
}
|
|
17273
|
+
var CARD_MIN = 132;
|
|
17274
|
+
var CARD_GAP = 16;
|
|
17275
|
+
var AUTO_COMPACT_BELOW = 360;
|
|
17276
|
+
function useContainerWidth(ref) {
|
|
17277
|
+
const [w, setW] = React41__default.default.useState(0);
|
|
17278
|
+
React41__default.default.useLayoutEffect(() => {
|
|
17279
|
+
const el = ref.current;
|
|
17280
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
17281
|
+
const ro = new ResizeObserver((entries) => {
|
|
17282
|
+
var _a;
|
|
17283
|
+
const cr = (_a = entries[0]) == null ? void 0 : _a.contentRect;
|
|
17284
|
+
if (cr) setW(cr.width);
|
|
17285
|
+
});
|
|
17286
|
+
ro.observe(el);
|
|
17287
|
+
setW(el.getBoundingClientRect().width);
|
|
17288
|
+
return () => ro.disconnect();
|
|
17289
|
+
}, [ref]);
|
|
17290
|
+
return w;
|
|
17291
|
+
}
|
|
17292
|
+
var KEYFRAMES = `
|
|
17293
|
+
@keyframes wfsPulse{0%,100%{opacity:1}50%{opacity:.35}}
|
|
17294
|
+
@keyframes wfsLampPulse{0%,100%{box-shadow:0 0 0 0 var(--wfs-accent,#6366f1)73}50%{box-shadow:0 0 0 4px transparent}}
|
|
17295
|
+
@keyframes wfsRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
|
|
17296
|
+
@keyframes wfsShimmer{0%{background-position:-200px 0}100%{background-position:calc(200px + 100%) 0}}
|
|
17297
|
+
.wfs-rise{animation:wfsRise 0.32s cubic-bezier(0.22,1,0.36,1) both}
|
|
17298
|
+
@media (prefers-reduced-motion: reduce){
|
|
17299
|
+
.wfs-anim,.wfs-rise,.wfs-shim{animation:none !important}
|
|
17300
|
+
.wfs-rise{opacity:1 !important;transform:none !important}
|
|
17301
|
+
}`;
|
|
17302
|
+
function ProgressMeter({
|
|
17303
|
+
done,
|
|
17304
|
+
total,
|
|
17305
|
+
accent,
|
|
17306
|
+
muted,
|
|
17307
|
+
loading
|
|
17308
|
+
}) {
|
|
17309
|
+
const pct = total > 0 ? Math.round(done / total * 100) : 0;
|
|
17310
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17311
|
+
"div",
|
|
17312
|
+
{
|
|
17313
|
+
"data-testid": "workflow-stepper-progress",
|
|
17314
|
+
style: { display: "flex", alignItems: "center", gap: 8, padding: "0 2px 6px" },
|
|
17315
|
+
children: [
|
|
17316
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17317
|
+
"span",
|
|
17318
|
+
{
|
|
17319
|
+
style: {
|
|
17320
|
+
fontSize: 10.5,
|
|
17321
|
+
fontWeight: 600,
|
|
17322
|
+
color: muted,
|
|
17323
|
+
fontVariantNumeric: "tabular-nums",
|
|
17324
|
+
letterSpacing: "0.01em",
|
|
17325
|
+
whiteSpace: "nowrap"
|
|
17326
|
+
},
|
|
17327
|
+
children: loading ? "\u2014" : `${done} / ${total} \xB7 ${pct}%`
|
|
17328
|
+
}
|
|
17329
|
+
),
|
|
17330
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17331
|
+
"span",
|
|
17332
|
+
{
|
|
17333
|
+
style: {
|
|
17334
|
+
flex: 1,
|
|
17335
|
+
height: 3,
|
|
17336
|
+
borderRadius: 3,
|
|
17337
|
+
background: "#eceff4",
|
|
17338
|
+
overflow: "hidden",
|
|
17339
|
+
minWidth: 40
|
|
17340
|
+
},
|
|
17341
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17342
|
+
"span",
|
|
17343
|
+
{
|
|
17344
|
+
className: loading ? "wfs-shim" : void 0,
|
|
17345
|
+
style: {
|
|
17346
|
+
display: "block",
|
|
17347
|
+
height: "100%",
|
|
17348
|
+
width: loading ? "100%" : `${pct}%`,
|
|
17349
|
+
borderRadius: 3,
|
|
17350
|
+
background: loading ? `linear-gradient(90deg, #eceff4, ${accent}55, #eceff4)` : accent,
|
|
17351
|
+
backgroundSize: loading ? "200px 100%" : void 0,
|
|
17352
|
+
animation: loading ? "wfsShimmer 1.1s linear infinite" : void 0,
|
|
17353
|
+
transition: "width 0.45s cubic-bezier(0.22,1,0.36,1)"
|
|
17354
|
+
}
|
|
17355
|
+
}
|
|
17356
|
+
)
|
|
17357
|
+
}
|
|
17358
|
+
)
|
|
17359
|
+
]
|
|
17360
|
+
}
|
|
17361
|
+
);
|
|
17362
|
+
}
|
|
17363
|
+
function WorkflowStepperRenderer({
|
|
17364
|
+
data,
|
|
17365
|
+
selectedStep = null,
|
|
17366
|
+
onSelectStep,
|
|
17367
|
+
density = "auto",
|
|
17368
|
+
loading = false,
|
|
17369
|
+
loadingSteps = 6,
|
|
17370
|
+
showProgress = true
|
|
17371
|
+
}) {
|
|
17372
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17373
|
+
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
17374
|
+
const steps = (_a = data.steps) != null ? _a : [];
|
|
17375
|
+
const activeStepId = (_d = (_c = data.active_step) != null ? _c : (_b = steps.find((s) => s.status === "active")) == null ? void 0 : _b.id) != null ? _d : null;
|
|
17376
|
+
const interactive = typeof onSelectStep === "function";
|
|
17377
|
+
const statusColor3 = (s) => s === "active" ? ACCENT2 : STATUS_COLORS3[s];
|
|
17378
|
+
const doneCount = steps.filter((s) => s.status === "done").length;
|
|
17379
|
+
const rootRef = React41__default.default.useRef(null);
|
|
17380
|
+
const containerW = useContainerWidth(rootRef);
|
|
17381
|
+
let resolved = density === "auto" ? "full" : density;
|
|
17382
|
+
if (density === "auto" && containerW > 0) {
|
|
17383
|
+
const needed = steps.length * CARD_MIN + Math.max(0, steps.length - 1) * CARD_GAP;
|
|
17384
|
+
resolved = containerW < AUTO_COMPACT_BELOW || needed > containerW * 1.6 ? "compact" : "full";
|
|
17385
|
+
}
|
|
17386
|
+
const scrollerRef = React41__default.default.useRef(null);
|
|
17387
|
+
React41__default.default.useEffect(() => {
|
|
17388
|
+
if (resolved !== "full" || loading) return;
|
|
17389
|
+
const sc = scrollerRef.current;
|
|
17390
|
+
if (!sc) return;
|
|
17391
|
+
const el = sc.querySelector(
|
|
17392
|
+
`[data-testid="workflow-stepper-step-${selectedStep != null ? selectedStep : activeStepId}"]`
|
|
17393
|
+
);
|
|
17394
|
+
if (el && sc.scrollWidth > sc.clientWidth) {
|
|
17395
|
+
el.scrollIntoView({ inline: "center", block: "nearest", behavior: "smooth" });
|
|
17396
|
+
}
|
|
17397
|
+
}, [resolved, loading, selectedStep, activeStepId]);
|
|
17398
|
+
const [edges, setEdges] = React41__default.default.useState({
|
|
17399
|
+
left: false,
|
|
17400
|
+
right: false
|
|
17401
|
+
});
|
|
17402
|
+
const updateEdges = React41__default.default.useCallback(() => {
|
|
17403
|
+
const sc = scrollerRef.current;
|
|
17404
|
+
if (!sc) return;
|
|
17405
|
+
const max = sc.scrollWidth - sc.clientWidth;
|
|
17406
|
+
const sl = sc.scrollLeft;
|
|
17407
|
+
const left = sl > 1;
|
|
17408
|
+
const right = sl < max - 1;
|
|
17409
|
+
setEdges((prev) => prev.left === left && prev.right === right ? prev : { left, right });
|
|
17410
|
+
}, []);
|
|
17411
|
+
React41__default.default.useLayoutEffect(() => {
|
|
17412
|
+
if (resolved !== "full" || loading) return;
|
|
17413
|
+
updateEdges();
|
|
17414
|
+
const sc = scrollerRef.current;
|
|
17415
|
+
if (!sc || typeof ResizeObserver === "undefined") return;
|
|
17416
|
+
const ro = new ResizeObserver(updateEdges);
|
|
17417
|
+
ro.observe(sc);
|
|
17418
|
+
return () => ro.disconnect();
|
|
17419
|
+
}, [resolved, loading, steps.length, updateEdges]);
|
|
17420
|
+
const edgeMask = edges.left || edges.right ? `linear-gradient(90deg, ${edges.left ? "transparent 0, #000 14px" : "#000 0"}, ${edges.right ? "#000 calc(100% - 14px), transparent 100%" : "#000 100%"})` : void 0;
|
|
17421
|
+
const themeStyle = { ["--wfs-accent"]: ACCENT2 };
|
|
17422
|
+
if (loading) {
|
|
17423
|
+
const ghosts = Array.from({ length: Math.max(2, loadingSteps) });
|
|
17424
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-testid": "workflow-stepper-loading", style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle), children: [
|
|
17425
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: KEYFRAMES }),
|
|
17426
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(ProgressMeter, { done: 0, total: 0, accent: ACCENT2, muted: MUTED2, loading: true }),
|
|
17427
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "stretch", gap: CARD_GAP, padding: "2px 2px 6px", overflow: "hidden" }, children: ghosts.map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17428
|
+
"div",
|
|
17429
|
+
{
|
|
17430
|
+
className: "wfs-shim",
|
|
17431
|
+
"aria-hidden": "true",
|
|
17432
|
+
style: {
|
|
17433
|
+
flex: "0 1 168px",
|
|
17434
|
+
minWidth: CARD_MIN,
|
|
17435
|
+
height: 84,
|
|
17436
|
+
borderRadius: 10,
|
|
17437
|
+
border: `1px solid ${BORDER4}`,
|
|
17438
|
+
background: `linear-gradient(90deg, #f4f6f9, #eceff4 40%, #f4f6f9 80%)`,
|
|
17439
|
+
backgroundSize: "200px 100%",
|
|
17440
|
+
animation: "wfsShimmer 1.1s linear infinite",
|
|
17441
|
+
animationDelay: `${i * 0.08}s`
|
|
17442
|
+
}
|
|
17443
|
+
},
|
|
17444
|
+
i
|
|
17445
|
+
)) })
|
|
17446
|
+
] });
|
|
17447
|
+
}
|
|
17448
|
+
if (resolved === "compact") {
|
|
17449
|
+
const activeStep = (_e = steps.find((s) => s.id === activeStepId)) != null ? _e : null;
|
|
17450
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17451
|
+
"div",
|
|
17452
|
+
{
|
|
17453
|
+
ref: rootRef,
|
|
17454
|
+
"data-testid": "workflow-stepper-compact",
|
|
17455
|
+
style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle),
|
|
17456
|
+
children: [
|
|
17457
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: KEYFRAMES }),
|
|
17458
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(ProgressMeter, { done: doneCount, total: steps.length, accent: ACCENT2, muted: MUTED2 }),
|
|
17459
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 12, minWidth: 0 }, children: [
|
|
17460
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", flexShrink: 0 }, children: steps.map((s, i) => {
|
|
17461
|
+
const sel = selectedStep === s.id;
|
|
17462
|
+
const act = s.status === "active";
|
|
17463
|
+
const done = s.status === "done";
|
|
17464
|
+
const reached = s.status !== "pending";
|
|
17465
|
+
const clickable = interactive && reached;
|
|
17466
|
+
const size = act ? 11 : done ? 9 : 8;
|
|
17467
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
17468
|
+
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17469
|
+
"span",
|
|
17470
|
+
{
|
|
17471
|
+
"aria-hidden": "true",
|
|
17472
|
+
style: {
|
|
17473
|
+
width: 14,
|
|
17474
|
+
height: 1.5,
|
|
17475
|
+
borderRadius: 1,
|
|
17476
|
+
background: steps[i - 1].status === "done" ? "#15803d" : "#e5e7eb",
|
|
17477
|
+
transition: "background 0.36s ease-out"
|
|
17478
|
+
}
|
|
17479
|
+
}
|
|
17480
|
+
),
|
|
17481
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17482
|
+
"button",
|
|
17483
|
+
{
|
|
17484
|
+
type: "button",
|
|
17485
|
+
disabled: interactive && !reached,
|
|
17486
|
+
"aria-disabled": interactive && !reached ? true : void 0,
|
|
17487
|
+
title: `${s.title} \xB7 ${STATUS_LABELS[s.status]}`,
|
|
17488
|
+
onClick: clickable ? () => onSelectStep == null ? void 0 : onSelectStep(sel ? null : s.id) : void 0,
|
|
17489
|
+
"data-testid": `workflow-stepper-step-${s.id}`,
|
|
17490
|
+
"data-status": s.status,
|
|
17491
|
+
"data-reached": reached || void 0,
|
|
17492
|
+
className: act ? "wfs-anim" : void 0,
|
|
17493
|
+
style: {
|
|
17494
|
+
position: "relative",
|
|
17495
|
+
width: size,
|
|
17496
|
+
height: size,
|
|
17497
|
+
padding: 0,
|
|
17498
|
+
borderRadius: "50%",
|
|
17499
|
+
background: statusColor3(s.status),
|
|
17500
|
+
flexShrink: 0,
|
|
17501
|
+
// border-box so the selected 2px border can't grow the dot
|
|
17502
|
+
// and reflow the rail.
|
|
17503
|
+
boxSizing: "border-box",
|
|
17504
|
+
opacity: reached ? 1 : 0.55,
|
|
17505
|
+
border: sel ? `2px solid ${ACCENT2}` : done ? "none" : "1px solid rgba(255,255,255,0.6)",
|
|
17506
|
+
boxShadow: sel ? "0 0 0 2px #fff" : "none",
|
|
17507
|
+
cursor: clickable ? "pointer" : "default",
|
|
17508
|
+
transition: "width 0.15s, height 0.15s",
|
|
17509
|
+
animation: act ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
|
|
17510
|
+
}
|
|
17511
|
+
}
|
|
17512
|
+
)
|
|
17513
|
+
] }, s.id);
|
|
17514
|
+
}) }),
|
|
17515
|
+
activeStep && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17516
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", style: { width: 1, height: 16, background: "#e6eaf1", flexShrink: 0 } }),
|
|
17517
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: [
|
|
17518
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17519
|
+
"span",
|
|
17520
|
+
{
|
|
17521
|
+
"aria-hidden": "true",
|
|
17522
|
+
style: {
|
|
17523
|
+
width: 17,
|
|
17524
|
+
height: 17,
|
|
17525
|
+
borderRadius: "50%",
|
|
17526
|
+
flexShrink: 0,
|
|
17527
|
+
display: "flex",
|
|
17528
|
+
alignItems: "center",
|
|
17529
|
+
justifyContent: "center",
|
|
17530
|
+
fontSize: 9.5,
|
|
17531
|
+
fontWeight: 700,
|
|
17532
|
+
lineHeight: 1,
|
|
17533
|
+
background: activeStep.status === "done" ? "#15803d" : activeStep.status === "review" ? "#fff" : activeStep.status === "failed" ? "#dc2626" : ACCENT2,
|
|
17534
|
+
color: activeStep.status === "review" ? "#b45309" : "#fff",
|
|
17535
|
+
border: activeStep.status === "review" ? "1.5px solid #f59e0b" : "none"
|
|
17536
|
+
},
|
|
17537
|
+
children: activeStep.status === "done" ? "\u2713" : activeStep.status === "failed" ? "!" : (_f = activeStep.n) != null ? _f : steps.findIndex((x) => x.id === activeStep.id) + 1
|
|
17538
|
+
}
|
|
17539
|
+
),
|
|
17540
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17541
|
+
"span",
|
|
17542
|
+
{
|
|
17543
|
+
style: {
|
|
17544
|
+
fontSize: 12.5,
|
|
17545
|
+
fontWeight: 650,
|
|
17546
|
+
color: "var(--foreground)",
|
|
17547
|
+
letterSpacing: "-0.01em",
|
|
17548
|
+
whiteSpace: "nowrap",
|
|
17549
|
+
overflow: "hidden",
|
|
17550
|
+
textOverflow: "ellipsis",
|
|
17551
|
+
minWidth: 0
|
|
17552
|
+
},
|
|
17553
|
+
children: [
|
|
17554
|
+
activeStep.title,
|
|
17555
|
+
activeStep.sub ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 400, color: MUTED2 }, children: [
|
|
17556
|
+
" \xB7 ",
|
|
17557
|
+
activeStep.sub
|
|
17558
|
+
] }) : null
|
|
17559
|
+
]
|
|
17560
|
+
}
|
|
17561
|
+
)
|
|
17562
|
+
] })
|
|
17563
|
+
] })
|
|
17564
|
+
] })
|
|
17565
|
+
]
|
|
17566
|
+
}
|
|
17567
|
+
);
|
|
17568
|
+
}
|
|
17569
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: rootRef, "data-testid": "workflow-stepper", style: __spreadValues({ width: "100%", minWidth: 0 }, themeStyle), children: [
|
|
17570
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: KEYFRAMES }),
|
|
17571
|
+
showProgress && /* @__PURE__ */ jsxRuntime.jsx(ProgressMeter, { done: doneCount, total: steps.length, accent: ACCENT2, muted: MUTED2 }),
|
|
17572
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17573
|
+
"div",
|
|
17574
|
+
{
|
|
17575
|
+
ref: scrollerRef,
|
|
17576
|
+
className: "wfs-scroller",
|
|
17577
|
+
onScroll: updateEdges,
|
|
17578
|
+
style: {
|
|
17579
|
+
display: "flex",
|
|
17580
|
+
alignItems: "stretch",
|
|
17581
|
+
overflowX: "auto",
|
|
17582
|
+
scrollSnapType: "x proximity",
|
|
17583
|
+
padding: "2px 2px 4px",
|
|
17584
|
+
// Thin, always-styled scrollbar (Firefox + Windows/desktop WebKit
|
|
17585
|
+
// where overlay scrollbars aren't available). macOS/mobile show
|
|
17586
|
+
// overlay scrollbars on scroll; harmless either way.
|
|
17587
|
+
scrollbarWidth: "thin",
|
|
17588
|
+
scrollbarColor: "#c2c9d6 transparent",
|
|
17589
|
+
// Edge fade ONLY on the side(s) with hidden content — never when the
|
|
17590
|
+
// row isn't scrollable, so the last card's right edge stays crisp.
|
|
17591
|
+
maskImage: edgeMask,
|
|
17592
|
+
WebkitMaskImage: edgeMask
|
|
17593
|
+
},
|
|
17594
|
+
children: [
|
|
17595
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
17596
|
+
.wfs-scroller::-webkit-scrollbar{height:8px}
|
|
17597
|
+
.wfs-scroller::-webkit-scrollbar-track{background:transparent}
|
|
17598
|
+
.wfs-scroller::-webkit-scrollbar-thumb{background:#c2c9d6;border-radius:8px;border:2px solid transparent;background-clip:padding-box}
|
|
17599
|
+
.wfs-scroller:hover::-webkit-scrollbar-thumb{background:#aab2c2;background-clip:padding-box}
|
|
17600
|
+
` }),
|
|
17601
|
+
steps.map((step, i) => {
|
|
17602
|
+
var _a2;
|
|
17603
|
+
const isSelected = selectedStep === step.id;
|
|
17604
|
+
const isActive = step.status === "active";
|
|
17605
|
+
const reached = step.status !== "pending";
|
|
17606
|
+
const clickable = interactive && reached;
|
|
17607
|
+
const color = statusColor3(step.status);
|
|
17608
|
+
const humans = ((_a2 = step.assignees) != null ? _a2 : []).filter((a) => a.kind === "human");
|
|
17609
|
+
const roleCaption = humans.map((h) => h.role).filter(Boolean).slice(0, 2).join(" \xB7 ");
|
|
17610
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
17611
|
+
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17612
|
+
"div",
|
|
17613
|
+
{
|
|
17614
|
+
style: {
|
|
17615
|
+
width: CARD_GAP,
|
|
17616
|
+
flexShrink: 0,
|
|
17617
|
+
display: "flex",
|
|
17618
|
+
alignItems: "center"
|
|
17619
|
+
},
|
|
17620
|
+
"aria-hidden": "true",
|
|
17621
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17622
|
+
"div",
|
|
17623
|
+
{
|
|
17624
|
+
style: {
|
|
17625
|
+
width: "100%",
|
|
17626
|
+
height: 1.5,
|
|
17627
|
+
borderRadius: 1,
|
|
17628
|
+
// Fill sweep: completed rails wash green left→right.
|
|
17629
|
+
background: steps[i - 1].status === "done" ? "linear-gradient(90deg, #15803d, #15803d)" : "#e5e7eb",
|
|
17630
|
+
backgroundSize: "100% 100%",
|
|
17631
|
+
transition: "background 0.36s ease-out"
|
|
17632
|
+
}
|
|
17633
|
+
}
|
|
17634
|
+
)
|
|
17635
|
+
}
|
|
17636
|
+
),
|
|
17637
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17638
|
+
"div",
|
|
17639
|
+
{
|
|
17640
|
+
role: clickable ? "button" : void 0,
|
|
17641
|
+
tabIndex: clickable ? 0 : void 0,
|
|
17642
|
+
"aria-disabled": interactive && !reached ? true : void 0,
|
|
17643
|
+
className: "wfs-rise",
|
|
17644
|
+
"data-testid": `workflow-stepper-step-${step.id}`,
|
|
17645
|
+
"data-status": step.status,
|
|
17646
|
+
"data-selected": isSelected || void 0,
|
|
17647
|
+
"data-reached": reached || void 0,
|
|
17648
|
+
onClick: clickable ? () => onSelectStep == null ? void 0 : onSelectStep(isSelected ? null : step.id) : void 0,
|
|
17649
|
+
onKeyDown: clickable ? (e) => {
|
|
17650
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
17651
|
+
e.preventDefault();
|
|
17652
|
+
onSelectStep == null ? void 0 : onSelectStep(isSelected ? null : step.id);
|
|
17653
|
+
}
|
|
17654
|
+
} : void 0,
|
|
17655
|
+
onMouseEnter: clickable ? (e) => {
|
|
17656
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
17657
|
+
e.currentTarget.style.boxShadow = "0 3px 10px rgba(15,23,42,0.08)";
|
|
17658
|
+
} : void 0,
|
|
17659
|
+
onMouseLeave: clickable ? (e) => {
|
|
17660
|
+
e.currentTarget.style.transform = "none";
|
|
17661
|
+
e.currentTarget.style.boxShadow = "0 1px 2px rgba(0,0,0,0.04)";
|
|
17662
|
+
} : void 0,
|
|
17663
|
+
style: {
|
|
17664
|
+
position: "relative",
|
|
17665
|
+
flex: "0 1 168px",
|
|
17666
|
+
minWidth: CARD_MIN,
|
|
17667
|
+
maxWidth: 208,
|
|
17668
|
+
scrollSnapAlign: "center",
|
|
17669
|
+
borderRadius: 10,
|
|
17670
|
+
boxSizing: "border-box",
|
|
17671
|
+
// Selection changes border COLOR only (constant 1px width) so
|
|
17672
|
+
// the card never reflows the row on click.
|
|
17673
|
+
border: `1px solid ${isSelected ? ACCENT2 : BORDER4}`,
|
|
17674
|
+
background: isSelected ? `${ACCENT2}0d` : "white",
|
|
17675
|
+
boxShadow: "0 1px 2px rgba(0,0,0,0.04)",
|
|
17676
|
+
padding: "10px 11px",
|
|
17677
|
+
display: "flex",
|
|
17678
|
+
flexDirection: "column",
|
|
17679
|
+
gap: 7,
|
|
17680
|
+
cursor: clickable ? "pointer" : "default",
|
|
17681
|
+
opacity: reached ? 1 : 0.62,
|
|
17682
|
+
transition: "border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.12s",
|
|
17683
|
+
animationDelay: `${Math.min(i, 10) * 0.04}s`,
|
|
17684
|
+
overflow: "hidden"
|
|
17685
|
+
},
|
|
17686
|
+
children: [
|
|
17687
|
+
isActive && !isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17688
|
+
"span",
|
|
17689
|
+
{
|
|
17690
|
+
style: {
|
|
17691
|
+
position: "absolute",
|
|
17692
|
+
left: 0,
|
|
17693
|
+
top: 6,
|
|
17694
|
+
bottom: 6,
|
|
17695
|
+
width: 2,
|
|
17696
|
+
borderRadius: 2,
|
|
17697
|
+
background: ACCENT2
|
|
17698
|
+
}
|
|
17699
|
+
}
|
|
17700
|
+
),
|
|
17701
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
17702
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
|
|
17703
|
+
/* @__PURE__ */ jsxRuntime.jsx(IndexDot, { step, index: i, accent: ACCENT2 }),
|
|
17704
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17705
|
+
"span",
|
|
17706
|
+
{
|
|
17707
|
+
className: isActive ? "wfs-anim" : void 0,
|
|
17708
|
+
style: {
|
|
17709
|
+
width: 6,
|
|
17710
|
+
height: 6,
|
|
17711
|
+
borderRadius: "50%",
|
|
17712
|
+
background: color,
|
|
17713
|
+
animation: isActive ? "wfsLampPulse 1.8s ease-in-out infinite" : "none"
|
|
17714
|
+
}
|
|
17715
|
+
}
|
|
17716
|
+
)
|
|
17717
|
+
] }),
|
|
17718
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17719
|
+
"span",
|
|
17720
|
+
{
|
|
17721
|
+
style: {
|
|
17722
|
+
fontSize: 9,
|
|
17723
|
+
fontWeight: 600,
|
|
17724
|
+
letterSpacing: "0.05em",
|
|
17725
|
+
textTransform: "uppercase",
|
|
17726
|
+
color
|
|
17727
|
+
},
|
|
17728
|
+
children: STATUS_LABELS[step.status]
|
|
17729
|
+
}
|
|
17730
|
+
)
|
|
17731
|
+
] }),
|
|
17732
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { minWidth: 0 }, children: [
|
|
17733
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17734
|
+
"div",
|
|
17735
|
+
{
|
|
17736
|
+
style: {
|
|
17737
|
+
fontSize: 12.5,
|
|
17738
|
+
fontWeight: 600,
|
|
17739
|
+
color: "var(--foreground)",
|
|
17740
|
+
lineHeight: 1.25,
|
|
17741
|
+
letterSpacing: "-0.01em",
|
|
17742
|
+
overflow: "hidden",
|
|
17743
|
+
textOverflow: "ellipsis",
|
|
17744
|
+
whiteSpace: "nowrap"
|
|
17745
|
+
},
|
|
17746
|
+
children: step.title
|
|
17747
|
+
}
|
|
17748
|
+
),
|
|
17749
|
+
step.sub && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17750
|
+
"div",
|
|
17751
|
+
{
|
|
17752
|
+
style: {
|
|
17753
|
+
fontSize: 10.5,
|
|
17754
|
+
color: MUTED2,
|
|
17755
|
+
marginTop: 2,
|
|
17756
|
+
overflow: "hidden",
|
|
17757
|
+
textOverflow: "ellipsis",
|
|
17758
|
+
whiteSpace: "nowrap"
|
|
17759
|
+
},
|
|
17760
|
+
children: step.sub
|
|
17761
|
+
}
|
|
17762
|
+
)
|
|
17763
|
+
] }),
|
|
17764
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17765
|
+
"div",
|
|
17766
|
+
{
|
|
17767
|
+
style: {
|
|
17768
|
+
display: "flex",
|
|
17769
|
+
alignItems: "center",
|
|
17770
|
+
justifyContent: "space-between",
|
|
17771
|
+
marginTop: "auto",
|
|
17772
|
+
minHeight: 20
|
|
17773
|
+
},
|
|
17774
|
+
children: [
|
|
17775
|
+
step.assignees && step.assignees.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(AvatarStack, { assignees: step.assignees, accent: ACCENT2 }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
17776
|
+
roleCaption && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17777
|
+
"span",
|
|
17778
|
+
{
|
|
17779
|
+
style: {
|
|
17780
|
+
fontSize: 9,
|
|
17781
|
+
color: "#9ca3af",
|
|
17782
|
+
fontWeight: 500,
|
|
17783
|
+
textAlign: "right",
|
|
17784
|
+
maxWidth: 76,
|
|
17785
|
+
lineHeight: 1.2,
|
|
17786
|
+
overflow: "hidden"
|
|
17787
|
+
},
|
|
17788
|
+
children: roleCaption
|
|
17789
|
+
}
|
|
17790
|
+
)
|
|
17791
|
+
]
|
|
17792
|
+
}
|
|
17793
|
+
)
|
|
17794
|
+
]
|
|
17795
|
+
}
|
|
17796
|
+
)
|
|
17797
|
+
] }, step.id);
|
|
17798
|
+
})
|
|
17799
|
+
]
|
|
17800
|
+
}
|
|
17801
|
+
)
|
|
17802
|
+
] });
|
|
17803
|
+
}
|
|
17804
|
+
function WorkflowStepperResolver(p) {
|
|
17805
|
+
var _a;
|
|
17806
|
+
const { selectedStepId, onStepSelect } = useGenUIInteraction();
|
|
17807
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_a = p.title) != null ? _a : "workflow-stepper", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: 10 }, children: [
|
|
17808
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 8, flexWrap: "wrap" }, children: [
|
|
17809
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17810
|
+
"p",
|
|
17811
|
+
{
|
|
17812
|
+
style: {
|
|
17813
|
+
fontFamily: "var(--font-serif)",
|
|
17814
|
+
fontSize: "15px",
|
|
17815
|
+
fontWeight: 400,
|
|
17816
|
+
color: "var(--foreground)",
|
|
17817
|
+
letterSpacing: "-0.01em",
|
|
17818
|
+
margin: 0
|
|
17819
|
+
},
|
|
17820
|
+
children: p.title
|
|
17821
|
+
}
|
|
17822
|
+
),
|
|
17823
|
+
p.period && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17824
|
+
"span",
|
|
17825
|
+
{
|
|
17826
|
+
style: {
|
|
17827
|
+
fontSize: 11,
|
|
17828
|
+
fontWeight: 600,
|
|
17829
|
+
padding: "2px 8px",
|
|
17830
|
+
borderRadius: 9999,
|
|
17831
|
+
background: "#f2f2f2",
|
|
17832
|
+
color: "#777777",
|
|
17833
|
+
fontVariantNumeric: "tabular-nums"
|
|
17834
|
+
},
|
|
17835
|
+
children: p.period
|
|
17836
|
+
}
|
|
17837
|
+
),
|
|
17838
|
+
p.badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17839
|
+
"span",
|
|
17840
|
+
{
|
|
17841
|
+
style: {
|
|
17842
|
+
fontSize: 11,
|
|
17843
|
+
fontWeight: 600,
|
|
17844
|
+
padding: "2px 8px",
|
|
17845
|
+
borderRadius: 9999,
|
|
17846
|
+
border: "1px solid #dedede",
|
|
17847
|
+
color: "#777777"
|
|
17848
|
+
},
|
|
17849
|
+
children: p.badge
|
|
17850
|
+
}
|
|
17851
|
+
)
|
|
17852
|
+
] }),
|
|
17853
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17854
|
+
WorkflowStepperRenderer,
|
|
17855
|
+
{
|
|
17856
|
+
data: p,
|
|
17857
|
+
selectedStep: selectedStepId,
|
|
17858
|
+
onSelectStep: onStepSelect
|
|
17859
|
+
}
|
|
17860
|
+
)
|
|
17861
|
+
] }) });
|
|
17862
|
+
}
|
|
16923
17863
|
function resolveUI(rawPayload) {
|
|
16924
17864
|
const payload = coercePayload(rawPayload);
|
|
16925
17865
|
switch (payload.type) {
|
|
@@ -17035,6 +17975,8 @@ function resolveUI(rawPayload) {
|
|
|
17035
17975
|
return /* @__PURE__ */ jsxRuntime.jsx(IntegrationsListResolver, __spreadValues({}, payload));
|
|
17036
17976
|
case "pipeline-preview":
|
|
17037
17977
|
return /* @__PURE__ */ jsxRuntime.jsx(PipelinePreviewResolver, __spreadValues({}, payload));
|
|
17978
|
+
case "workflow-stepper":
|
|
17979
|
+
return /* @__PURE__ */ jsxRuntime.jsx(WorkflowStepperResolver, __spreadValues({}, payload));
|
|
17038
17980
|
default: {
|
|
17039
17981
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17040
17982
|
"div",
|