@adoptai/genui-components 0.1.33 → 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/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/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/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/key-value-list/resolver.cjs +28 -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 +28 -3
- package/dist/composites/key-value-list/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/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 +83 -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 +84 -6
- package/dist/composites/stat-grid/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 +1182 -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 +1019 -120
- package/dist/index.js.map +1 -1
- package/dist/renderer.cjs +1067 -211
- package/dist/renderer.cjs.map +1 -1
- package/dist/renderer.js +929 -73
- package/dist/renderer.js.map +1 -1
- package/dist/resolver.cjs +1066 -210
- package/dist/resolver.cjs.map +1 -1
- package/dist/resolver.d.ts.map +1 -1
- package/dist/resolver.js +929 -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/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) {
|
|
@@ -857,11 +857,11 @@ async function getMermaid(t) {
|
|
|
857
857
|
}
|
|
858
858
|
function MermaidFallback({ diagram, title }) {
|
|
859
859
|
const tokens = useTheme();
|
|
860
|
-
const [svg, setSvg] =
|
|
861
|
-
const [err, setErr] =
|
|
862
|
-
const [full, setFull] =
|
|
863
|
-
const idRef =
|
|
864
|
-
|
|
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(() => {
|
|
865
865
|
const id = ++renderSeq;
|
|
866
866
|
idRef.current = id;
|
|
867
867
|
setErr(false);
|
|
@@ -930,7 +930,7 @@ function FullscreenModalInner({ nodes, edges, title, onClose }) {
|
|
|
930
930
|
] }) });
|
|
931
931
|
}
|
|
932
932
|
function FullscreenModal({ nodes, edges, title, onClose }) {
|
|
933
|
-
|
|
933
|
+
React41.useEffect(() => {
|
|
934
934
|
const h = (e) => {
|
|
935
935
|
if (e.key === "Escape") onClose();
|
|
936
936
|
};
|
|
@@ -943,8 +943,8 @@ function FullscreenModal({ nodes, edges, title, onClose }) {
|
|
|
943
943
|
);
|
|
944
944
|
}
|
|
945
945
|
function usePrefersReducedMotion() {
|
|
946
|
-
const [reduced, setReduced] =
|
|
947
|
-
|
|
946
|
+
const [reduced, setReduced] = React41.useState(false);
|
|
947
|
+
React41.useEffect(() => {
|
|
948
948
|
var _a;
|
|
949
949
|
if (typeof matchMedia === "undefined") return;
|
|
950
950
|
const mq = matchMedia("(prefers-reduced-motion: reduce)");
|
|
@@ -988,9 +988,9 @@ function topoOrder(nodeIds, edges) {
|
|
|
988
988
|
}
|
|
989
989
|
function useAutoplay(order, enabled) {
|
|
990
990
|
const reduced = usePrefersReducedMotion();
|
|
991
|
-
const [step, setStep] =
|
|
991
|
+
const [step, setStep] = React41.useState(0);
|
|
992
992
|
const key = order.join("|");
|
|
993
|
-
|
|
993
|
+
React41.useEffect(() => {
|
|
994
994
|
if (!enabled || reduced || order.length === 0) {
|
|
995
995
|
setStep(0);
|
|
996
996
|
return;
|
|
@@ -1012,7 +1012,7 @@ function useAutoplay(order, enabled) {
|
|
|
1012
1012
|
timer = setTimeout(tick, 850);
|
|
1013
1013
|
return () => clearTimeout(timer);
|
|
1014
1014
|
}, [enabled, reduced, key]);
|
|
1015
|
-
return
|
|
1015
|
+
return React41.useMemo(() => {
|
|
1016
1016
|
const m = {};
|
|
1017
1017
|
order.forEach((id, i) => {
|
|
1018
1018
|
m[id] = i < step ? "done" : i === step ? "active" : "pending";
|
|
@@ -1034,13 +1034,13 @@ function resolveStates(nodes, nodeStates) {
|
|
|
1034
1034
|
}
|
|
1035
1035
|
function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
1036
1036
|
const tokens = useTheme();
|
|
1037
|
-
const [full, setFull] =
|
|
1038
|
-
const [focused, setFocused] =
|
|
1039
|
-
const [boxW, setBoxW] =
|
|
1040
|
-
const containerRef =
|
|
1041
|
-
const parsed =
|
|
1042
|
-
const layout =
|
|
1043
|
-
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(
|
|
1044
1044
|
() => {
|
|
1045
1045
|
var _a;
|
|
1046
1046
|
return ((_a = layout == null ? void 0 : layout.edges) != null ? _a : []).map((e) => __spreadProps(__spreadValues({}, e), {
|
|
@@ -1052,7 +1052,7 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1052
1052
|
},
|
|
1053
1053
|
[layout, tokens.ACCENT, tokens.MUTED]
|
|
1054
1054
|
);
|
|
1055
|
-
const order =
|
|
1055
|
+
const order = React41.useMemo(
|
|
1056
1056
|
() => {
|
|
1057
1057
|
var _a, _b;
|
|
1058
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 : []);
|
|
@@ -1060,19 +1060,19 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1060
1060
|
[layout]
|
|
1061
1061
|
);
|
|
1062
1062
|
const autoStatus = useAutoplay(order, !!autoplay);
|
|
1063
|
-
const staticStatus =
|
|
1063
|
+
const staticStatus = React41.useMemo(() => {
|
|
1064
1064
|
var _a;
|
|
1065
1065
|
return resolveStates((_a = layout == null ? void 0 : layout.nodes) != null ? _a : [], nodeStates);
|
|
1066
1066
|
}, [layout, nodeStates]);
|
|
1067
1067
|
const statusMap = autoplay ? autoStatus : staticStatus;
|
|
1068
|
-
const displayNodes =
|
|
1068
|
+
const displayNodes = React41.useMemo(
|
|
1069
1069
|
() => {
|
|
1070
1070
|
var _a;
|
|
1071
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] }) }));
|
|
1072
1072
|
},
|
|
1073
1073
|
[layout, statusMap]
|
|
1074
1074
|
);
|
|
1075
|
-
const displayEdges =
|
|
1075
|
+
const displayEdges = React41.useMemo(
|
|
1076
1076
|
() => themedEdges.map((e) => {
|
|
1077
1077
|
const ss = statusMap[e.source];
|
|
1078
1078
|
const ts = statusMap[e.target];
|
|
@@ -1092,13 +1092,13 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1092
1092
|
const [nodes, setNodes, onNC] = react.useNodesState(displayNodes);
|
|
1093
1093
|
const [edges, setEdges, onEC] = react.useEdgesState(displayEdges);
|
|
1094
1094
|
const rf = react.useReactFlow();
|
|
1095
|
-
|
|
1095
|
+
React41.useEffect(() => {
|
|
1096
1096
|
setNodes(displayNodes);
|
|
1097
1097
|
}, [displayNodes, setNodes]);
|
|
1098
|
-
|
|
1098
|
+
React41.useEffect(() => {
|
|
1099
1099
|
setEdges(displayEdges);
|
|
1100
1100
|
}, [displayEdges, setEdges]);
|
|
1101
|
-
|
|
1101
|
+
React41.useEffect(() => {
|
|
1102
1102
|
const id = requestAnimationFrame(() => {
|
|
1103
1103
|
try {
|
|
1104
1104
|
rf.fitView({ padding: 0.1 });
|
|
@@ -1107,14 +1107,14 @@ function Inner({ diagram, title, autoplay, nodeStates }) {
|
|
|
1107
1107
|
});
|
|
1108
1108
|
return () => cancelAnimationFrame(id);
|
|
1109
1109
|
}, [layout, rf]);
|
|
1110
|
-
const handleClickOutside =
|
|
1110
|
+
const handleClickOutside = React41.useCallback((e) => {
|
|
1111
1111
|
if (containerRef.current && !containerRef.current.contains(e.target)) setFocused(false);
|
|
1112
1112
|
}, []);
|
|
1113
|
-
|
|
1113
|
+
React41.useEffect(() => {
|
|
1114
1114
|
document.addEventListener("mousedown", handleClickOutside);
|
|
1115
1115
|
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
1116
1116
|
}, [handleClickOutside]);
|
|
1117
|
-
|
|
1117
|
+
React41.useEffect(() => {
|
|
1118
1118
|
const el = containerRef.current;
|
|
1119
1119
|
if (!el) return;
|
|
1120
1120
|
let raf = 0;
|
|
@@ -1273,15 +1273,15 @@ __export(PdfViewer_exports, {
|
|
|
1273
1273
|
PdfViewer: () => PdfViewer
|
|
1274
1274
|
});
|
|
1275
1275
|
function PdfViewer({ url, base64, onLoadSuccess }) {
|
|
1276
|
-
const [numPages, setNumPages] =
|
|
1277
|
-
const [currentPage, setCurrentPage] =
|
|
1278
|
-
const [loading, setLoading] =
|
|
1279
|
-
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 }) => {
|
|
1280
1280
|
setNumPages(n);
|
|
1281
1281
|
setLoading(false);
|
|
1282
1282
|
onLoadSuccess == null ? void 0 : onLoadSuccess(n);
|
|
1283
1283
|
}, [onLoadSuccess]);
|
|
1284
|
-
|
|
1284
|
+
React41.useEffect(() => {
|
|
1285
1285
|
if (numPages <= 1) return;
|
|
1286
1286
|
const handler = (e) => {
|
|
1287
1287
|
var _a;
|
|
@@ -1377,13 +1377,13 @@ __export(ExcelViewer_exports, {
|
|
|
1377
1377
|
ExcelViewer: () => ExcelViewer
|
|
1378
1378
|
});
|
|
1379
1379
|
function ExcelViewer({ url, base64, onLoadSuccess }) {
|
|
1380
|
-
const [sheetNames, setSheetNames] =
|
|
1381
|
-
const [activeSheet, setActiveSheet] =
|
|
1382
|
-
const [data, setData] =
|
|
1383
|
-
const [loading, setLoading] =
|
|
1384
|
-
const [error, setError] =
|
|
1385
|
-
const wbRef =
|
|
1386
|
-
|
|
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(() => {
|
|
1387
1387
|
let cancelled = false;
|
|
1388
1388
|
setLoading(true);
|
|
1389
1389
|
setError(null);
|
|
@@ -1441,7 +1441,7 @@ function ExcelViewer({ url, base64, onLoadSuccess }) {
|
|
|
1441
1441
|
const rows = XLSX__namespace.utils.sheet_to_json(wbRef.current.Sheets[wbRef.current.SheetNames[idx]], { header: 1 });
|
|
1442
1442
|
setData(rows);
|
|
1443
1443
|
};
|
|
1444
|
-
|
|
1444
|
+
React41.useEffect(() => {
|
|
1445
1445
|
if (sheetNames.length <= 1) return;
|
|
1446
1446
|
const handler = (e) => {
|
|
1447
1447
|
var _a;
|
|
@@ -1566,10 +1566,10 @@ __export(CsvViewer_exports, {
|
|
|
1566
1566
|
});
|
|
1567
1567
|
function CsvViewer({ url, base64, delimiter, maxRows }) {
|
|
1568
1568
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2 } = useTheme();
|
|
1569
|
-
const [rows, setRows] =
|
|
1570
|
-
const [loading, setLoading] =
|
|
1571
|
-
const [error, setError] =
|
|
1572
|
-
|
|
1569
|
+
const [rows, setRows] = React41.useState([]);
|
|
1570
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1571
|
+
const [error, setError] = React41.useState(null);
|
|
1572
|
+
React41.useEffect(() => {
|
|
1573
1573
|
let cancelled = false;
|
|
1574
1574
|
setLoading(true);
|
|
1575
1575
|
setError(null);
|
|
@@ -1688,10 +1688,10 @@ __export(TextViewer_exports, {
|
|
|
1688
1688
|
});
|
|
1689
1689
|
function TextViewer({ url, base64, markdown = false, maxLines }) {
|
|
1690
1690
|
const { MUTED: MUTED2 } = useTheme();
|
|
1691
|
-
const [text, setText] =
|
|
1692
|
-
const [loading, setLoading] =
|
|
1693
|
-
const [error, setError] =
|
|
1694
|
-
|
|
1691
|
+
const [text, setText] = React41.useState("");
|
|
1692
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1693
|
+
const [error, setError] = React41.useState(null);
|
|
1694
|
+
React41.useEffect(() => {
|
|
1695
1695
|
let cancelled = false;
|
|
1696
1696
|
setLoading(true);
|
|
1697
1697
|
setError(null);
|
|
@@ -1789,10 +1789,10 @@ function sanitize(html) {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
function DocxViewer({ url, base64 }) {
|
|
1791
1791
|
const { MUTED: MUTED2, BORDER: BORDER4 } = useTheme();
|
|
1792
|
-
const [html, setHtml] =
|
|
1793
|
-
const [loading, setLoading] =
|
|
1794
|
-
const [error, setError] =
|
|
1795
|
-
|
|
1792
|
+
const [html, setHtml] = React41.useState("");
|
|
1793
|
+
const [loading, setLoading] = React41.useState(true);
|
|
1794
|
+
const [error, setError] = React41.useState(null);
|
|
1795
|
+
React41.useEffect(() => {
|
|
1796
1796
|
let cancelled = false;
|
|
1797
1797
|
setLoading(true);
|
|
1798
1798
|
setError(null);
|
|
@@ -5232,6 +5232,79 @@ var pipelinePreviewTool = {
|
|
|
5232
5232
|
required: ["type", "name", "steps"]
|
|
5233
5233
|
}
|
|
5234
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
|
+
};
|
|
5235
5308
|
|
|
5236
5309
|
// src/schemas/index.ts
|
|
5237
5310
|
var schemaRegistry = {
|
|
@@ -5290,7 +5363,8 @@ var schemaRegistry = {
|
|
|
5290
5363
|
"scatter-chart": { schema: scatterChartSchema, tool: scatterChartTool },
|
|
5291
5364
|
"connect-integration": { schema: connectIntegrationSchema, tool: connectIntegrationTool },
|
|
5292
5365
|
"integrations-list": { schema: integrationsListSchema, tool: integrationsListTool },
|
|
5293
|
-
"pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool }
|
|
5366
|
+
"pipeline-preview": { schema: pipelinePreviewSchema, tool: pipelinePreviewTool },
|
|
5367
|
+
"workflow-stepper": { schema: workflowStepperSchema, tool: workflowStepperTool }
|
|
5294
5368
|
};
|
|
5295
5369
|
|
|
5296
5370
|
// src/schemas/coercePayload.ts
|
|
@@ -5372,16 +5446,16 @@ init_theme();
|
|
|
5372
5446
|
var DOT_COLOR = "#aaaaaa";
|
|
5373
5447
|
var DOT_HOVER = "#555555";
|
|
5374
5448
|
function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "component" }) {
|
|
5375
|
-
const [open, setOpen] =
|
|
5376
|
-
const [view, setView] =
|
|
5377
|
-
const contentRef =
|
|
5378
|
-
const menuRef =
|
|
5379
|
-
const btnRef =
|
|
5380
|
-
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(() => {
|
|
5381
5455
|
setOpen(false);
|
|
5382
5456
|
setView("main");
|
|
5383
5457
|
}, []);
|
|
5384
|
-
|
|
5458
|
+
React41.useEffect(() => {
|
|
5385
5459
|
if (!open) return;
|
|
5386
5460
|
const handler = (e) => {
|
|
5387
5461
|
var _a, _b;
|
|
@@ -5392,7 +5466,7 @@ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "c
|
|
|
5392
5466
|
document.addEventListener("mousedown", handler);
|
|
5393
5467
|
return () => document.removeEventListener("mousedown", handler);
|
|
5394
5468
|
}, [open, close]);
|
|
5395
|
-
const handleDownloadPNG =
|
|
5469
|
+
const handleDownloadPNG = React41.useCallback(async () => {
|
|
5396
5470
|
if (!contentRef.current) return;
|
|
5397
5471
|
try {
|
|
5398
5472
|
const url = await htmlToImage.toPng(contentRef.current, { backgroundColor: "white", pixelRatio: 2 });
|
|
@@ -5404,7 +5478,7 @@ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "c
|
|
|
5404
5478
|
}
|
|
5405
5479
|
close();
|
|
5406
5480
|
}, [filename, close]);
|
|
5407
|
-
const handleCSV =
|
|
5481
|
+
const handleCSV = React41.useCallback(() => {
|
|
5408
5482
|
onDownloadCSV == null ? void 0 : onDownloadCSV();
|
|
5409
5483
|
close();
|
|
5410
5484
|
}, [onDownloadCSV, close]);
|
|
@@ -5516,12 +5590,12 @@ function MenuButton({ label, onClick }) {
|
|
|
5516
5590
|
);
|
|
5517
5591
|
}
|
|
5518
5592
|
function useColumnVisibility(columns) {
|
|
5519
|
-
const [hidden, setHidden] =
|
|
5520
|
-
const visibleColumns =
|
|
5593
|
+
const [hidden, setHidden] = React41.useState(/* @__PURE__ */ new Set());
|
|
5594
|
+
const visibleColumns = React41.useMemo(
|
|
5521
5595
|
() => columns.filter((c) => !hidden.has(c.key)),
|
|
5522
5596
|
[columns, hidden]
|
|
5523
5597
|
);
|
|
5524
|
-
const toggle =
|
|
5598
|
+
const toggle = React41.useCallback((key) => {
|
|
5525
5599
|
setHidden((prev) => {
|
|
5526
5600
|
const next = new Set(prev);
|
|
5527
5601
|
if (next.has(key)) next.delete(key);
|
|
@@ -5529,8 +5603,8 @@ function useColumnVisibility(columns) {
|
|
|
5529
5603
|
return next;
|
|
5530
5604
|
});
|
|
5531
5605
|
}, []);
|
|
5532
|
-
const showAll =
|
|
5533
|
-
const hideAll =
|
|
5606
|
+
const showAll = React41.useCallback(() => setHidden(/* @__PURE__ */ new Set()), []);
|
|
5607
|
+
const hideAll = React41.useCallback(
|
|
5534
5608
|
() => setHidden(new Set(columns.map((c) => c.key))),
|
|
5535
5609
|
[columns]
|
|
5536
5610
|
);
|
|
@@ -5780,6 +5854,56 @@ function AlertResolver(p) {
|
|
|
5780
5854
|
|
|
5781
5855
|
// src/composites/stat-grid/resolver.tsx
|
|
5782
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
|
|
5783
5907
|
init_ThemeContext();
|
|
5784
5908
|
var changeColor = (type) => {
|
|
5785
5909
|
if (type === "positive") return "#15803d";
|
|
@@ -5790,15 +5914,28 @@ var cardStyle = {
|
|
|
5790
5914
|
border: "1px solid #dedede",
|
|
5791
5915
|
borderRadius: "0.75rem",
|
|
5792
5916
|
background: "white",
|
|
5793
|
-
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"
|
|
5794
5922
|
};
|
|
5795
5923
|
function StatGridResolver(p) {
|
|
5796
5924
|
var _a;
|
|
5797
5925
|
const { MUTED: MUTED2 } = useTheme();
|
|
5798
|
-
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: [
|
|
5799
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "11.5px", color: MUTED2, letterSpacing: "0.02em", textTransform: "uppercase", margin: 0 }, children: stat.label }),
|
|
5800
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5801
|
-
|
|
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 }),
|
|
5802
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 }) })
|
|
5803
5940
|
] }) }, i)) }) });
|
|
5804
5941
|
}
|
|
@@ -5807,7 +5944,7 @@ init_ThemeContext();
|
|
|
5807
5944
|
function TabsPanelResolver(p) {
|
|
5808
5945
|
var _a;
|
|
5809
5946
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
5810
|
-
const [activeIdx, setActiveIdx] =
|
|
5947
|
+
const [activeIdx, setActiveIdx] = React41.useState(0);
|
|
5811
5948
|
const activeTab = p.tabs[activeIdx];
|
|
5812
5949
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: "tabs-panel", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "0" }, children: [
|
|
5813
5950
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5965,17 +6102,17 @@ function SparklineTableResolver(p) {
|
|
|
5965
6102
|
// src/composites/heatmap-table/resolver.tsx
|
|
5966
6103
|
init_theme();
|
|
5967
6104
|
init_ThemeContext();
|
|
5968
|
-
function heatColor(
|
|
5969
|
-
const clamped = Math.max(-3, Math.min(3,
|
|
6105
|
+
function heatColor(z58) {
|
|
6106
|
+
const clamped = Math.max(-3, Math.min(3, z58));
|
|
5970
6107
|
const abs = Math.abs(clamped);
|
|
5971
6108
|
const lightness = 95 - abs * 8;
|
|
5972
6109
|
const hue = clamped >= 0 ? 142 : 0;
|
|
5973
6110
|
return `hsl(${hue} 60% ${lightness}%)`;
|
|
5974
6111
|
}
|
|
5975
|
-
function heatTextColor(
|
|
5976
|
-
const abs = Math.abs(
|
|
5977
|
-
if (abs > 2) return
|
|
5978
|
-
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";
|
|
5979
6116
|
return "var(--foreground)";
|
|
5980
6117
|
}
|
|
5981
6118
|
var th2 = {
|
|
@@ -6073,7 +6210,7 @@ var thStyle2 = {
|
|
|
6073
6210
|
function ScreenerTableResolver(p) {
|
|
6074
6211
|
var _a, _b, _c, _d, _e, _f;
|
|
6075
6212
|
const { ACCENT: ACCENT2, BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2 } = useTheme();
|
|
6076
|
-
const [activeFilters, setActiveFilters] =
|
|
6213
|
+
const [activeFilters, setActiveFilters] = React41.useState(new Set((_a = p.activeFilters) != null ? _a : []));
|
|
6077
6214
|
const { visibleColumns, hidden, toggle, showAll, hideAll, allColumns } = useColumnVisibility((_b = p.columns) != null ? _b : []);
|
|
6078
6215
|
const toggleFilter = (f) => setActiveFilters((prev) => {
|
|
6079
6216
|
const next = new Set(prev);
|
|
@@ -6143,7 +6280,7 @@ var th3 = {
|
|
|
6143
6280
|
};
|
|
6144
6281
|
function GroupRows({ group, columns, depth }) {
|
|
6145
6282
|
var _a, _b;
|
|
6146
|
-
const [open, setOpen] =
|
|
6283
|
+
const [open, setOpen] = React41.useState(true);
|
|
6147
6284
|
const indent = depth * 14;
|
|
6148
6285
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6149
6286
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6248,7 +6385,7 @@ var dotColor = {
|
|
|
6248
6385
|
function NewsFeedResolver(p) {
|
|
6249
6386
|
var _a, _b;
|
|
6250
6387
|
const { ACCENT: ACCENT2, MUTED: MUTED2 } = useTheme();
|
|
6251
|
-
const [filter, setFilter] =
|
|
6388
|
+
const [filter, setFilter] = React41.useState(null);
|
|
6252
6389
|
const sentiments = ["positive", "neutral", "negative"].filter(
|
|
6253
6390
|
(s) => {
|
|
6254
6391
|
var _a2;
|
|
@@ -6290,9 +6427,9 @@ function NewsFeedResolver(p) {
|
|
|
6290
6427
|
] }) });
|
|
6291
6428
|
}
|
|
6292
6429
|
function useSeriesToggle(seriesKeys) {
|
|
6293
|
-
const [hidden, setHidden] =
|
|
6294
|
-
const isVisible =
|
|
6295
|
-
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) => {
|
|
6296
6433
|
setHidden((prev) => {
|
|
6297
6434
|
const next = new Set(prev);
|
|
6298
6435
|
if (next.has(key)) next.delete(key);
|
|
@@ -6300,7 +6437,7 @@ function useSeriesToggle(seriesKeys) {
|
|
|
6300
6437
|
return next;
|
|
6301
6438
|
});
|
|
6302
6439
|
}, []);
|
|
6303
|
-
const showAll =
|
|
6440
|
+
const showAll = React41.useCallback(() => setHidden(/* @__PURE__ */ new Set()), []);
|
|
6304
6441
|
return { hidden, isVisible, toggle, showAll, allKeys: seriesKeys };
|
|
6305
6442
|
}
|
|
6306
6443
|
|
|
@@ -6595,7 +6732,7 @@ function WaterfallChartResolver(p) {
|
|
|
6595
6732
|
] }) });
|
|
6596
6733
|
}
|
|
6597
6734
|
init_ThemeContext();
|
|
6598
|
-
var FlowGraph2 =
|
|
6735
|
+
var FlowGraph2 = React41__default.default.lazy(
|
|
6599
6736
|
() => Promise.resolve().then(() => (init_FlowGraph(), FlowGraph_exports)).then((m) => ({ default: m.FlowGraph }))
|
|
6600
6737
|
);
|
|
6601
6738
|
function FlowCanvasRenderer({
|
|
@@ -6636,7 +6773,7 @@ function FlowCanvasRenderer({
|
|
|
6636
6773
|
overflow: "hidden",
|
|
6637
6774
|
background: "#ffffff",
|
|
6638
6775
|
position: "relative"
|
|
6639
|
-
}, 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: {
|
|
6640
6777
|
position: "absolute",
|
|
6641
6778
|
inset: 0,
|
|
6642
6779
|
display: "flex",
|
|
@@ -6848,7 +6985,7 @@ function TrialBalanceResolver(p) {
|
|
|
6848
6985
|
color: balanced ? "#15803d" : "#dc2626"
|
|
6849
6986
|
}, children: balanced ? "\u2713 Balanced" : "\u2717 Unbalanced" })
|
|
6850
6987
|
] }),
|
|
6851
|
-
/* @__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: [
|
|
6852
6989
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: ["Code", "Account", "Debit", "Credit"].map((h, i) => /* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
6853
6990
|
fontSize: "11px",
|
|
6854
6991
|
fontWeight: 500,
|
|
@@ -6869,7 +7006,7 @@ function TrialBalanceResolver(p) {
|
|
|
6869
7006
|
gDebit += a.debit;
|
|
6870
7007
|
gCredit += a.credit;
|
|
6871
7008
|
});
|
|
6872
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7009
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
6873
7010
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 4, style: {
|
|
6874
7011
|
padding: "8px 12px",
|
|
6875
7012
|
fontSize: "12px",
|
|
@@ -7026,7 +7163,7 @@ function AgingReportResolver(p) {
|
|
|
7026
7163
|
p.asOfDate
|
|
7027
7164
|
] })
|
|
7028
7165
|
] }),
|
|
7029
|
-
/* @__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: [
|
|
7030
7167
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
7031
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" }),
|
|
7032
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)),
|
|
@@ -7083,7 +7220,7 @@ function VarianceAnalysisResolver(p) {
|
|
|
7083
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 }),
|
|
7084
7221
|
p.period && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "11px", color: MUTED2 }, children: p.period })
|
|
7085
7222
|
] }),
|
|
7086
|
-
/* @__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: [
|
|
7087
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: {
|
|
7088
7225
|
fontSize: "11px",
|
|
7089
7226
|
fontWeight: 500,
|
|
@@ -7201,6 +7338,8 @@ function StackedBreakdownResolver(p) {
|
|
|
7201
7338
|
alignItems: "center",
|
|
7202
7339
|
gap: "6px",
|
|
7203
7340
|
fontSize: "12px",
|
|
7341
|
+
maxWidth: "100%",
|
|
7342
|
+
minWidth: 0,
|
|
7204
7343
|
color: isVisible(cat.name) ? MUTED2 : "#b3b3b3",
|
|
7205
7344
|
cursor: "pointer",
|
|
7206
7345
|
userSelect: "none",
|
|
@@ -7212,12 +7351,13 @@ function StackedBreakdownResolver(p) {
|
|
|
7212
7351
|
width: "10px",
|
|
7213
7352
|
height: "10px",
|
|
7214
7353
|
borderRadius: "2px",
|
|
7354
|
+
flexShrink: 0,
|
|
7215
7355
|
background: (_a2 = cat.color) != null ? _a2 : PALETTE2[ci % PALETTE2.length],
|
|
7216
7356
|
display: "inline-block",
|
|
7217
7357
|
opacity: isVisible(cat.name) ? 1 : 0.3,
|
|
7218
7358
|
transition: "opacity 0.15s"
|
|
7219
7359
|
} }),
|
|
7220
|
-
cat.name
|
|
7360
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: TRUNCATE, title: cat.name, children: cat.name })
|
|
7221
7361
|
]
|
|
7222
7362
|
},
|
|
7223
7363
|
cat.name
|
|
@@ -7239,7 +7379,7 @@ function StackedBreakdownResolver(p) {
|
|
|
7239
7379
|
((_b2 = p.periods) != null ? _b2 : []).map((_, pi) => {
|
|
7240
7380
|
var _a3, _b3;
|
|
7241
7381
|
const v = pi < ((_a3 = cat.values) != null ? _a3 : []).length ? ((_b3 = cat.values) != null ? _b3 : [])[pi] : 0;
|
|
7242
|
-
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);
|
|
7243
7383
|
})
|
|
7244
7384
|
] }, cat.name);
|
|
7245
7385
|
}),
|
|
@@ -7403,7 +7543,7 @@ function ItemRow({ item }) {
|
|
|
7403
7543
|
] });
|
|
7404
7544
|
}
|
|
7405
7545
|
function Section({ section }) {
|
|
7406
|
-
const [open, setOpen] =
|
|
7546
|
+
const [open, setOpen] = React41.useState(true);
|
|
7407
7547
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7408
7548
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7409
7549
|
"button",
|
|
@@ -7525,7 +7665,7 @@ function ReconciliationViewResolver(p) {
|
|
|
7525
7665
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
7526
7666
|
const sourceA = (_a = p.sourceA) != null ? _a : { label: "Source A" };
|
|
7527
7667
|
const sourceB = (_b = p.sourceB) != null ? _b : { label: "Source B" };
|
|
7528
|
-
const [activeTab, setActiveTab] =
|
|
7668
|
+
const [activeTab, setActiveTab] = React41.useState("matched");
|
|
7529
7669
|
const balanceA = (_d = (_c = p.summary) == null ? void 0 : _c.balanceA) != null ? _d : 0;
|
|
7530
7670
|
const balanceB = (_f = (_e = p.summary) == null ? void 0 : _e.balanceB) != null ? _f : 0;
|
|
7531
7671
|
const difference = (_h = (_g = p.summary) == null ? void 0 : _g.difference) != null ? _h : balanceA - balanceB;
|
|
@@ -7612,7 +7752,7 @@ function ReconciliationViewResolver(p) {
|
|
|
7612
7752
|
{
|
|
7613
7753
|
style: {
|
|
7614
7754
|
display: "grid",
|
|
7615
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(
|
|
7755
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(120px, 100%), 1fr))",
|
|
7616
7756
|
gap: "0",
|
|
7617
7757
|
marginBottom: "14px",
|
|
7618
7758
|
borderRadius: "10px",
|
|
@@ -7620,31 +7760,28 @@ function ReconciliationViewResolver(p) {
|
|
|
7620
7760
|
overflow: "hidden"
|
|
7621
7761
|
},
|
|
7622
7762
|
children: [
|
|
7623
|
-
/* @__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: [
|
|
7624
7764
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7625
7765
|
"div",
|
|
7626
7766
|
{
|
|
7627
|
-
style: {
|
|
7767
|
+
style: __spreadValues({
|
|
7628
7768
|
fontSize: "10px",
|
|
7629
7769
|
fontWeight: 500,
|
|
7630
7770
|
color: MUTED2,
|
|
7631
7771
|
textTransform: "uppercase",
|
|
7632
7772
|
letterSpacing: "0.04em",
|
|
7633
7773
|
marginBottom: "4px"
|
|
7634
|
-
},
|
|
7774
|
+
}, TRUNCATE),
|
|
7635
7775
|
children: sourceA.label
|
|
7636
7776
|
}
|
|
7637
7777
|
),
|
|
7638
7778
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7639
|
-
|
|
7779
|
+
FitText,
|
|
7640
7780
|
{
|
|
7641
|
-
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
fontVariantNumeric: "tabular-nums",
|
|
7646
|
-
letterSpacing: "-0.01em"
|
|
7647
|
-
},
|
|
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" },
|
|
7648
7785
|
children: fmt6(balanceA, p.currency)
|
|
7649
7786
|
}
|
|
7650
7787
|
)
|
|
@@ -7656,33 +7793,31 @@ function ReconciliationViewResolver(p) {
|
|
|
7656
7793
|
padding: "10px 12px",
|
|
7657
7794
|
background: PAPER2,
|
|
7658
7795
|
borderLeft: `1px solid ${BORDER4}`,
|
|
7659
|
-
borderRight: `1px solid ${BORDER4}
|
|
7796
|
+
borderRight: `1px solid ${BORDER4}`,
|
|
7797
|
+
minWidth: 0
|
|
7660
7798
|
},
|
|
7661
7799
|
children: [
|
|
7662
7800
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7663
7801
|
"div",
|
|
7664
7802
|
{
|
|
7665
|
-
style: {
|
|
7803
|
+
style: __spreadValues({
|
|
7666
7804
|
fontSize: "10px",
|
|
7667
7805
|
fontWeight: 500,
|
|
7668
7806
|
color: MUTED2,
|
|
7669
7807
|
textTransform: "uppercase",
|
|
7670
7808
|
letterSpacing: "0.04em",
|
|
7671
7809
|
marginBottom: "4px"
|
|
7672
|
-
},
|
|
7810
|
+
}, TRUNCATE),
|
|
7673
7811
|
children: sourceB.label
|
|
7674
7812
|
}
|
|
7675
7813
|
),
|
|
7676
7814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7677
|
-
|
|
7815
|
+
FitText,
|
|
7678
7816
|
{
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
fontVariantNumeric: "tabular-nums",
|
|
7684
|
-
letterSpacing: "-0.01em"
|
|
7685
|
-
},
|
|
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" },
|
|
7686
7821
|
children: fmt6(balanceB, p.currency)
|
|
7687
7822
|
}
|
|
7688
7823
|
)
|
|
@@ -7694,7 +7829,8 @@ function ReconciliationViewResolver(p) {
|
|
|
7694
7829
|
{
|
|
7695
7830
|
style: {
|
|
7696
7831
|
padding: "10px 12px",
|
|
7697
|
-
background: difference === 0 ? "#f0fdf4" : "#fef2f2"
|
|
7832
|
+
background: difference === 0 ? "#f0fdf4" : "#fef2f2",
|
|
7833
|
+
minWidth: 0
|
|
7698
7834
|
},
|
|
7699
7835
|
children: [
|
|
7700
7836
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -7734,15 +7870,12 @@ function ReconciliationViewResolver(p) {
|
|
|
7734
7870
|
}
|
|
7735
7871
|
),
|
|
7736
7872
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7737
|
-
|
|
7873
|
+
FitText,
|
|
7738
7874
|
{
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
fontVariantNumeric: "tabular-nums",
|
|
7744
|
-
letterSpacing: "-0.01em"
|
|
7745
|
-
},
|
|
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" },
|
|
7746
7879
|
children: fmt6(difference, p.currency)
|
|
7747
7880
|
}
|
|
7748
7881
|
)
|
|
@@ -8175,7 +8308,7 @@ function ChangesView({ changes }) {
|
|
|
8175
8308
|
}
|
|
8176
8309
|
function EventCard({ event }) {
|
|
8177
8310
|
var _a;
|
|
8178
|
-
const [showChanges, setShowChanges] =
|
|
8311
|
+
const [showChanges, setShowChanges] = React41.useState(false);
|
|
8179
8312
|
const ac = (_a = actionConfig[event.action]) != null ? _a : actionConfig.commented;
|
|
8180
8313
|
const hasChanges = event.changes && event.changes.length > 0;
|
|
8181
8314
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "12px", position: "relative" }, children: [
|
|
@@ -8233,23 +8366,23 @@ function AuditTrailResolver(p) {
|
|
|
8233
8366
|
}
|
|
8234
8367
|
init_Markdown();
|
|
8235
8368
|
function useFullscreen(ref) {
|
|
8236
|
-
const [isFullscreen, setIsFullscreen] =
|
|
8237
|
-
|
|
8369
|
+
const [isFullscreen, setIsFullscreen] = React41.useState(false);
|
|
8370
|
+
React41.useEffect(() => {
|
|
8238
8371
|
const handler = () => {
|
|
8239
8372
|
setIsFullscreen(!!document.fullscreenElement);
|
|
8240
8373
|
};
|
|
8241
8374
|
document.addEventListener("fullscreenchange", handler);
|
|
8242
8375
|
return () => document.removeEventListener("fullscreenchange", handler);
|
|
8243
8376
|
}, []);
|
|
8244
|
-
const enter =
|
|
8377
|
+
const enter = React41.useCallback(() => {
|
|
8245
8378
|
var _a, _b;
|
|
8246
8379
|
(_b = (_a = ref.current) == null ? void 0 : _a.requestFullscreen) == null ? void 0 : _b.call(_a);
|
|
8247
8380
|
}, [ref]);
|
|
8248
|
-
const exit =
|
|
8381
|
+
const exit = React41.useCallback(() => {
|
|
8249
8382
|
var _a;
|
|
8250
8383
|
if (document.fullscreenElement) (_a = document.exitFullscreen) == null ? void 0 : _a.call(document);
|
|
8251
8384
|
}, []);
|
|
8252
|
-
const toggle =
|
|
8385
|
+
const toggle = React41.useCallback(() => {
|
|
8253
8386
|
if (isFullscreen) exit();
|
|
8254
8387
|
else enter();
|
|
8255
8388
|
}, [isFullscreen, enter, exit]);
|
|
@@ -8259,10 +8392,10 @@ function useFullscreen(ref) {
|
|
|
8259
8392
|
// src/composites/document-preview/resolver.tsx
|
|
8260
8393
|
init_theme();
|
|
8261
8394
|
init_ThemeContext();
|
|
8262
|
-
var PdfViewer2 =
|
|
8395
|
+
var PdfViewer2 = React41__default.default.lazy(
|
|
8263
8396
|
() => Promise.resolve().then(() => (init_PdfViewer(), PdfViewer_exports)).then((m) => ({ default: m.PdfViewer }))
|
|
8264
8397
|
);
|
|
8265
|
-
var ExcelViewer2 =
|
|
8398
|
+
var ExcelViewer2 = React41__default.default.lazy(
|
|
8266
8399
|
() => Promise.resolve().then(() => (init_ExcelViewer(), ExcelViewer_exports)).then((m) => ({ default: m.ExcelViewer }))
|
|
8267
8400
|
);
|
|
8268
8401
|
var highlightColors = {
|
|
@@ -8312,8 +8445,8 @@ function DownloadIcon() {
|
|
|
8312
8445
|
function DocumentPreviewResolver(p) {
|
|
8313
8446
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
|
|
8314
8447
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2 } = useTheme();
|
|
8315
|
-
const [currentPage, setCurrentPage] =
|
|
8316
|
-
const containerRef =
|
|
8448
|
+
const [currentPage, setCurrentPage] = React41.useState(0);
|
|
8449
|
+
const containerRef = React41.useRef(null);
|
|
8317
8450
|
const { isFullscreen, toggle } = useFullscreen(containerRef);
|
|
8318
8451
|
const hasRealFile = !!(((_a = p.source) == null ? void 0 : _a.url) || ((_b = p.source) == null ? void 0 : _b.base64));
|
|
8319
8452
|
const isPdf = p.documentType === "pdf";
|
|
@@ -8321,9 +8454,9 @@ function DocumentPreviewResolver(p) {
|
|
|
8321
8454
|
const totalPages = ((_c = p.pages) != null ? _c : []).length;
|
|
8322
8455
|
const page = p.pages[currentPage];
|
|
8323
8456
|
const pageHighlights = ((_d = p.highlights) != null ? _d : []).filter((h) => h.pageIndex === currentPage);
|
|
8324
|
-
const handlePdfLoad =
|
|
8457
|
+
const handlePdfLoad = React41.useCallback(() => {
|
|
8325
8458
|
}, []);
|
|
8326
|
-
const handleExcelLoad =
|
|
8459
|
+
const handleExcelLoad = React41.useCallback(() => {
|
|
8327
8460
|
}, []);
|
|
8328
8461
|
return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_e = p.title) != null ? _e : "document-preview", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8329
8462
|
"div",
|
|
@@ -8436,7 +8569,7 @@ function DocumentPreviewResolver(p) {
|
|
|
8436
8569
|
display: "flex",
|
|
8437
8570
|
flexDirection: "column"
|
|
8438
8571
|
}, children: [
|
|
8439
|
-
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: [
|
|
8440
8573
|
"No content available for ",
|
|
8441
8574
|
(_u = page == null ? void 0 : page.label) != null ? _u : "this page"
|
|
8442
8575
|
] }),
|
|
@@ -8499,7 +8632,7 @@ function ConfidenceBar({ confidence, height = 6 }) {
|
|
|
8499
8632
|
}
|
|
8500
8633
|
function StepCard({ step, isLast }) {
|
|
8501
8634
|
var _a;
|
|
8502
|
-
const [expanded, setExpanded] =
|
|
8635
|
+
const [expanded, setExpanded] = React41.useState(false);
|
|
8503
8636
|
const cfg = stepTypeConfig[step.stepType];
|
|
8504
8637
|
const detail = (_a = step.detail) != null ? _a : "";
|
|
8505
8638
|
const isLong = detail.length > 100;
|
|
@@ -9004,7 +9137,7 @@ function ExampleRow({ example }) {
|
|
|
9004
9137
|
);
|
|
9005
9138
|
}
|
|
9006
9139
|
function PartSection({ part, defaultOpen }) {
|
|
9007
|
-
const [open, setOpen] =
|
|
9140
|
+
const [open, setOpen] = React41.useState(defaultOpen);
|
|
9008
9141
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9009
9142
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9010
9143
|
"button",
|
|
@@ -9134,7 +9267,7 @@ function EngagementPipelineResolver(p) {
|
|
|
9134
9267
|
const defaultActive = phases.findIndex(
|
|
9135
9268
|
(ph) => ph.status === "in-progress" || ph.status === "blocked"
|
|
9136
9269
|
);
|
|
9137
|
-
const [activeIdx, setActiveIdx] =
|
|
9270
|
+
const [activeIdx, setActiveIdx] = React41.useState(defaultActive >= 0 ? defaultActive : 0);
|
|
9138
9271
|
const activePhase = phases[activeIdx];
|
|
9139
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: [
|
|
9140
9273
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [
|
|
@@ -9218,7 +9351,7 @@ function EngagementPipelineResolver(p) {
|
|
|
9218
9351
|
const color = (_a2 = statusColor2[phase.status]) != null ? _a2 : "#d6d3d1";
|
|
9219
9352
|
const isCurrent = i === activeIdx;
|
|
9220
9353
|
const size = isCurrent ? 28 : 20;
|
|
9221
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9354
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
9222
9355
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9223
9356
|
"div",
|
|
9224
9357
|
{
|
|
@@ -9525,7 +9658,7 @@ function Avatar({ name, avatar, hovered }) {
|
|
|
9525
9658
|
function EntityCardGridResolver(p) {
|
|
9526
9659
|
var _a, _b;
|
|
9527
9660
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
9528
|
-
const [hoveredId, setHoveredId] =
|
|
9661
|
+
const [hoveredId, setHoveredId] = React41.useState(null);
|
|
9529
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: [
|
|
9530
9663
|
p.title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9531
9664
|
"p",
|
|
@@ -9546,7 +9679,7 @@ function EntityCardGridResolver(p) {
|
|
|
9546
9679
|
{
|
|
9547
9680
|
style: {
|
|
9548
9681
|
display: "grid",
|
|
9549
|
-
gridTemplateColumns: `repeat(auto-fit, minmax(220px, 1fr))`,
|
|
9682
|
+
gridTemplateColumns: `repeat(auto-fit, minmax(min(220px, 100%), 1fr))`,
|
|
9550
9683
|
gap: "12px",
|
|
9551
9684
|
width: "100%"
|
|
9552
9685
|
},
|
|
@@ -9637,7 +9770,7 @@ function EntityCardGridResolver(p) {
|
|
|
9637
9770
|
{
|
|
9638
9771
|
style: {
|
|
9639
9772
|
display: "grid",
|
|
9640
|
-
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",
|
|
9641
9774
|
gap: "6px 12px",
|
|
9642
9775
|
borderTop: `1px solid ${BORDER4}`,
|
|
9643
9776
|
paddingTop: "8px"
|
|
@@ -9781,7 +9914,7 @@ function StepRow({ step }) {
|
|
|
9781
9914
|
function JobTrackerResolver(p) {
|
|
9782
9915
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
9783
9916
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, PAPER: PAPER2 } = useTheme();
|
|
9784
|
-
const [stepsOpen, setStepsOpen] =
|
|
9917
|
+
const [stepsOpen, setStepsOpen] = React41.useState(true);
|
|
9785
9918
|
const barColor = (_a = statusColors2[p.status]) != null ? _a : MUTED2;
|
|
9786
9919
|
const badge = (_b = statusBadgeConfig[p.status]) != null ? _b : statusBadgeConfig.queued;
|
|
9787
9920
|
const progress = (_c = p.progress) != null ? _c : p.status === "completed" ? 100 : 0;
|
|
@@ -10221,7 +10354,7 @@ function CitationCard({
|
|
|
10221
10354
|
);
|
|
10222
10355
|
}
|
|
10223
10356
|
function FollowUpItem({ text }) {
|
|
10224
|
-
const [hovered, setHovered] =
|
|
10357
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10225
10358
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10226
10359
|
"span",
|
|
10227
10360
|
{
|
|
@@ -10246,7 +10379,7 @@ function CitationMarker({
|
|
|
10246
10379
|
index,
|
|
10247
10380
|
onClick
|
|
10248
10381
|
}) {
|
|
10249
|
-
const [hovered, setHovered] =
|
|
10382
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10250
10383
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10251
10384
|
"sup",
|
|
10252
10385
|
{
|
|
@@ -10275,7 +10408,7 @@ function CitationMarker({
|
|
|
10275
10408
|
function CitedAnswerResolver(p) {
|
|
10276
10409
|
var _a, _b, _c, _d, _e;
|
|
10277
10410
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, SECONDARY: SECONDARY2 } = useTheme();
|
|
10278
|
-
const [expandedIds, setExpandedIds] =
|
|
10411
|
+
const [expandedIds, setExpandedIds] = React41.useState(/* @__PURE__ */ new Set());
|
|
10279
10412
|
const toggleCitation = (id) => {
|
|
10280
10413
|
setExpandedIds((prev) => {
|
|
10281
10414
|
const next = new Set(prev);
|
|
@@ -10579,7 +10712,7 @@ function TransactionFeedResolver(p) {
|
|
|
10579
10712
|
var _a, _b, _c, _d, _e;
|
|
10580
10713
|
const { BORDER: BORDER4, MUTED: MUTED2 } = useTheme();
|
|
10581
10714
|
const currency = (_a = p.currency) != null ? _a : "USD";
|
|
10582
|
-
const [hoveredIndex, setHoveredIndex] =
|
|
10715
|
+
const [hoveredIndex, setHoveredIndex] = React41.useState(null);
|
|
10583
10716
|
const hasBalance = ((_b = p.transactions) != null ? _b : []).some((tx) => tx.balance != null);
|
|
10584
10717
|
const totalInflows = p.transactions.filter((tx) => tx.amount > 0 && tx.status !== "reversed").reduce((sum, tx) => sum + tx.amount, 0);
|
|
10585
10718
|
const totalOutflows = p.transactions.filter((tx) => tx.amount < 0 && tx.status !== "reversed").reduce((sum, tx) => sum + tx.amount, 0);
|
|
@@ -10736,7 +10869,7 @@ function formatDate2(dateStr) {
|
|
|
10736
10869
|
}
|
|
10737
10870
|
function FileRow({ item }) {
|
|
10738
10871
|
var _a;
|
|
10739
|
-
const [hovered, setHovered] =
|
|
10872
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
10740
10873
|
const cfg = getDocConfig(item.docType);
|
|
10741
10874
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10742
10875
|
"div",
|
|
@@ -10812,8 +10945,8 @@ function FileRow({ item }) {
|
|
|
10812
10945
|
);
|
|
10813
10946
|
}
|
|
10814
10947
|
function GroupSection({ groupName, items }) {
|
|
10815
|
-
const [open, setOpen] =
|
|
10816
|
-
const [headerHovered, setHeaderHovered] =
|
|
10948
|
+
const [open, setOpen] = React41.useState(true);
|
|
10949
|
+
const [headerHovered, setHeaderHovered] = React41.useState(false);
|
|
10817
10950
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10818
10951
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10819
10952
|
"button",
|
|
@@ -10999,15 +11132,15 @@ function isExpirySoon(expiresAt) {
|
|
|
10999
11132
|
|
|
11000
11133
|
// src/shared/viewers/PreviewHost.tsx
|
|
11001
11134
|
init_ThemeContext();
|
|
11002
|
-
var PdfViewer3 =
|
|
11135
|
+
var PdfViewer3 = React41.lazy(
|
|
11003
11136
|
() => Promise.resolve().then(() => (init_PdfViewer(), PdfViewer_exports)).then((m) => ({ default: m.PdfViewer }))
|
|
11004
11137
|
);
|
|
11005
|
-
var ExcelViewer3 =
|
|
11138
|
+
var ExcelViewer3 = React41.lazy(
|
|
11006
11139
|
() => Promise.resolve().then(() => (init_ExcelViewer(), ExcelViewer_exports)).then((m) => ({ default: m.ExcelViewer }))
|
|
11007
11140
|
);
|
|
11008
|
-
var CsvViewer2 =
|
|
11009
|
-
var TextViewer2 =
|
|
11010
|
-
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 })));
|
|
11011
11144
|
var PEEK_ROWS = 20;
|
|
11012
11145
|
var PEEK_LINES = 40;
|
|
11013
11146
|
function PreviewHost({ kind, source, mode = "full" }) {
|
|
@@ -11037,7 +11170,7 @@ function PreviewHost({ kind, source, mode = "full" }) {
|
|
|
11037
11170
|
default:
|
|
11038
11171
|
return null;
|
|
11039
11172
|
}
|
|
11040
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11173
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React41.Suspense, { fallback, children: viewer });
|
|
11041
11174
|
}
|
|
11042
11175
|
|
|
11043
11176
|
// src/shared/PreviewModal.tsx
|
|
@@ -11053,7 +11186,7 @@ function PreviewModal({
|
|
|
11053
11186
|
onDownload
|
|
11054
11187
|
}) {
|
|
11055
11188
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
11056
|
-
|
|
11189
|
+
React41.useEffect(() => {
|
|
11057
11190
|
if (!open) return;
|
|
11058
11191
|
const onKey = (e) => {
|
|
11059
11192
|
if (e.key === "Escape") onClose();
|
|
@@ -11226,17 +11359,17 @@ function FileCard({
|
|
|
11226
11359
|
previewDisabled = false
|
|
11227
11360
|
}) {
|
|
11228
11361
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2 } = useTheme();
|
|
11229
|
-
const [cardHover, setCardHover] =
|
|
11230
|
-
const [btnHover, setBtnHover] =
|
|
11231
|
-
const [pvHover, setPvHover] =
|
|
11362
|
+
const [cardHover, setCardHover] = React41.useState(false);
|
|
11363
|
+
const [btnHover, setBtnHover] = React41.useState(false);
|
|
11364
|
+
const [pvHover, setPvHover] = React41.useState(false);
|
|
11232
11365
|
const previewKind = previewKindFor(fileType, filename);
|
|
11233
11366
|
const canPreview = !previewDisabled && previewKind !== null && (!!previewUrl || !!fetchPreviewBlob);
|
|
11234
|
-
const [peekOpen, setPeekOpen] =
|
|
11235
|
-
const [modalOpen, setModalOpen] =
|
|
11236
|
-
const [source, setSource] =
|
|
11237
|
-
const [pvLoading, setPvLoading] =
|
|
11238
|
-
const [pvError, setPvError] =
|
|
11239
|
-
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 () => {
|
|
11240
11373
|
if (source) return source;
|
|
11241
11374
|
if (previewUrl) {
|
|
11242
11375
|
const s = { url: previewUrl };
|
|
@@ -11258,7 +11391,7 @@ function FileCard({
|
|
|
11258
11391
|
setPvLoading(false);
|
|
11259
11392
|
}
|
|
11260
11393
|
}, [source, previewUrl, fetchPreviewBlob]);
|
|
11261
|
-
const togglePeek =
|
|
11394
|
+
const togglePeek = React41.useCallback(async () => {
|
|
11262
11395
|
if (peekOpen) {
|
|
11263
11396
|
setPeekOpen(false);
|
|
11264
11397
|
return;
|
|
@@ -11266,7 +11399,7 @@ function FileCard({
|
|
|
11266
11399
|
setPeekOpen(true);
|
|
11267
11400
|
await ensureSource();
|
|
11268
11401
|
}, [peekOpen, ensureSource]);
|
|
11269
|
-
const openModal =
|
|
11402
|
+
const openModal = React41.useCallback(async () => {
|
|
11270
11403
|
const s = await ensureSource();
|
|
11271
11404
|
if (s) setModalOpen(true);
|
|
11272
11405
|
}, [ensureSource]);
|
|
@@ -11381,7 +11514,7 @@ function FileCard({
|
|
|
11381
11514
|
whiteSpace: "nowrap"
|
|
11382
11515
|
},
|
|
11383
11516
|
children: [
|
|
11384
|
-
metaTokens.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11517
|
+
metaTokens.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
11385
11518
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#c4c4c4" }, children: "\xB7" }),
|
|
11386
11519
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t })
|
|
11387
11520
|
] }, i)),
|
|
@@ -11725,7 +11858,7 @@ function ServiceCard({ item, isHovered, onHover, onLeave: onLeave2 }) {
|
|
|
11725
11858
|
function OpsDashboardResolver(p) {
|
|
11726
11859
|
var _a, _b, _c;
|
|
11727
11860
|
const { BORDER: BORDER4, MUTED: MUTED2 } = useTheme();
|
|
11728
|
-
const [hoveredId, setHoveredId] =
|
|
11861
|
+
const [hoveredId, setHoveredId] = React41.useState(null);
|
|
11729
11862
|
const hasRunning = ((_a = p.items) != null ? _a : []).some((item) => item.state === "running");
|
|
11730
11863
|
return /* @__PURE__ */ jsxRuntime.jsxs(ComponentActions, { filename: (_b = p.title) != null ? _b : "ops-dashboard", children: [
|
|
11731
11864
|
hasRunning && /* @__PURE__ */ jsxRuntime.jsx("style", { children: PULSE_KEYFRAMES }),
|
|
@@ -11778,8 +11911,8 @@ function formatDate3(value) {
|
|
|
11778
11911
|
}
|
|
11779
11912
|
}
|
|
11780
11913
|
function CopyButton({ value, rowHovered }) {
|
|
11781
|
-
const [copied, setCopied] =
|
|
11782
|
-
const [btnHovered, setBtnHovered] =
|
|
11914
|
+
const [copied, setCopied] = React41.useState(false);
|
|
11915
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
11783
11916
|
const handleCopy = () => {
|
|
11784
11917
|
navigator.clipboard.writeText(value).then(() => {
|
|
11785
11918
|
setCopied(true);
|
|
@@ -11865,13 +11998,13 @@ function ValueCell({ item }) {
|
|
|
11865
11998
|
)
|
|
11866
11999
|
] });
|
|
11867
12000
|
case "currency":
|
|
11868
|
-
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 });
|
|
11869
12002
|
default:
|
|
11870
|
-
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 }) });
|
|
11871
12004
|
}
|
|
11872
12005
|
}
|
|
11873
12006
|
function KVRow({ item, isLast, index }) {
|
|
11874
|
-
const [hovered, setHovered] =
|
|
12007
|
+
const [hovered, setHovered] = React41.useState(false);
|
|
11875
12008
|
const altBg = index % 2 === 1 ? "#fcfcfc" : "white";
|
|
11876
12009
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11877
12010
|
"div",
|
|
@@ -11900,7 +12033,7 @@ function KVRow({ item, isLast, index }) {
|
|
|
11900
12033
|
children: item.key
|
|
11901
12034
|
}
|
|
11902
12035
|
),
|
|
11903
|
-
/* @__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 }) }),
|
|
11904
12037
|
item.copyable && /* @__PURE__ */ jsxRuntime.jsx(CopyButton, { value: item.value, rowHovered: hovered })
|
|
11905
12038
|
]
|
|
11906
12039
|
}
|
|
@@ -11956,7 +12089,7 @@ function KeyValueListResolver(p) {
|
|
|
11956
12089
|
var _a3;
|
|
11957
12090
|
return sum + ((_a3 = g.items) != null ? _a3 : []).length;
|
|
11958
12091
|
}, 0);
|
|
11959
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12092
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
11960
12093
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11961
12094
|
"div",
|
|
11962
12095
|
{
|
|
@@ -12092,7 +12225,7 @@ function BalanceSheetResolver(p) {
|
|
|
12092
12225
|
color: balanced ? "#15803d" : "#dc2626"
|
|
12093
12226
|
}, children: balanced ? "\u2713 A = L + E" : "\u2717 Out of Balance" })
|
|
12094
12227
|
] }),
|
|
12095
|
-
/* @__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: [
|
|
12096
12229
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
12097
12230
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12098
12231
|
fontSize: "11px",
|
|
@@ -12134,7 +12267,7 @@ function BalanceSheetResolver(p) {
|
|
|
12134
12267
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
12135
12268
|
((_p = p.sections) != null ? _p : []).map((section) => {
|
|
12136
12269
|
var _a2;
|
|
12137
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12270
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12138
12271
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan, style: {
|
|
12139
12272
|
padding: "8px 12px",
|
|
12140
12273
|
fontSize: "12px",
|
|
@@ -12147,7 +12280,7 @@ function BalanceSheetResolver(p) {
|
|
|
12147
12280
|
}, children: (_a2 = categoryLabels2[section.category]) != null ? _a2 : section.category }) }),
|
|
12148
12281
|
section.subsections.map((sub, si) => {
|
|
12149
12282
|
var _a3;
|
|
12150
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12283
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12151
12284
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan, style: {
|
|
12152
12285
|
padding: "6px 10px 6px 24px",
|
|
12153
12286
|
fontSize: "12px",
|
|
@@ -12309,7 +12442,7 @@ function IncomeStatementResolver(p) {
|
|
|
12309
12442
|
].filter(Boolean).join(" \xB7 ") })
|
|
12310
12443
|
] }),
|
|
12311
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 }),
|
|
12312
|
-
/* @__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: [
|
|
12313
12446
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
12314
12447
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12315
12448
|
fontSize: "11px",
|
|
@@ -12323,7 +12456,7 @@ function IncomeStatementResolver(p) {
|
|
|
12323
12456
|
textAlign: "left",
|
|
12324
12457
|
whiteSpace: "nowrap"
|
|
12325
12458
|
}, children: "\xA0" }),
|
|
12326
|
-
periods.map((period) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12459
|
+
periods.map((period) => /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12327
12460
|
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
12328
12461
|
fontSize: "11px",
|
|
12329
12462
|
fontWeight: 500,
|
|
@@ -12354,7 +12487,7 @@ function IncomeStatementResolver(p) {
|
|
|
12354
12487
|
sections.map((section, si) => {
|
|
12355
12488
|
var _a2;
|
|
12356
12489
|
const isSubtotal = section.sectionType === "subtotal";
|
|
12357
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12358
12491
|
/* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: colCount, style: {
|
|
12359
12492
|
padding: "8px 12px",
|
|
12360
12493
|
fontSize: "12px",
|
|
@@ -12385,7 +12518,7 @@ function IncomeStatementResolver(p) {
|
|
|
12385
12518
|
var _a4;
|
|
12386
12519
|
const val = (_a4 = amounts[pi]) != null ? _a4 : 0;
|
|
12387
12520
|
const isNeg = val < 0;
|
|
12388
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12521
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12389
12522
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12390
12523
|
padding: "6px 10px",
|
|
12391
12524
|
fontSize: "13px",
|
|
@@ -12420,7 +12553,7 @@ function IncomeStatementResolver(p) {
|
|
|
12420
12553
|
var _a2;
|
|
12421
12554
|
const val = (_a2 = grossProfit[pi]) != null ? _a2 : 0;
|
|
12422
12555
|
const isNeg = val < 0;
|
|
12423
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12556
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12424
12557
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12425
12558
|
padding: "8px 10px",
|
|
12426
12559
|
fontSize: "12px",
|
|
@@ -12455,7 +12588,7 @@ function IncomeStatementResolver(p) {
|
|
|
12455
12588
|
var _a2;
|
|
12456
12589
|
const val = (_a2 = operatingIncome[pi]) != null ? _a2 : 0;
|
|
12457
12590
|
const isNeg = val < 0;
|
|
12458
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12591
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12459
12592
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12460
12593
|
padding: "8px 10px",
|
|
12461
12594
|
fontSize: "12px",
|
|
@@ -12489,7 +12622,7 @@ function IncomeStatementResolver(p) {
|
|
|
12489
12622
|
var _a2;
|
|
12490
12623
|
const val = (_a2 = netIncome[pi]) != null ? _a2 : 0;
|
|
12491
12624
|
const isNeg = val < 0;
|
|
12492
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12625
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12493
12626
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: {
|
|
12494
12627
|
padding: "10px 10px",
|
|
12495
12628
|
fontSize: "13px",
|
|
@@ -12709,7 +12842,7 @@ function CashFlowStatementResolver(p) {
|
|
|
12709
12842
|
/* @__PURE__ */ jsxRuntime.jsxs("tbody", { children: [
|
|
12710
12843
|
activities.map((activity, ai) => {
|
|
12711
12844
|
var _a2, _b2, _c2;
|
|
12712
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12845
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React41__default.default.Fragment, { children: [
|
|
12713
12846
|
ai > 0 && /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12714
12847
|
"td",
|
|
12715
12848
|
{
|
|
@@ -13092,6 +13225,7 @@ function GeneralLedgerResolver(p) {
|
|
|
13092
13225
|
{
|
|
13093
13226
|
style: {
|
|
13094
13227
|
overflowX: "auto",
|
|
13228
|
+
minWidth: 0,
|
|
13095
13229
|
borderRadius: "0.75rem",
|
|
13096
13230
|
border: `1px solid ${BORDER4}`,
|
|
13097
13231
|
boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04)"
|
|
@@ -15121,8 +15255,8 @@ var PRIORITY_STYLES = {
|
|
|
15121
15255
|
function EscalationCardResolver(p) {
|
|
15122
15256
|
var _a, _b, _c, _d;
|
|
15123
15257
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
15124
|
-
const [cardHovered, setCardHovered] =
|
|
15125
|
-
const [btnHovered, setBtnHovered] =
|
|
15258
|
+
const [cardHovered, setCardHovered] = React41.useState(false);
|
|
15259
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
15126
15260
|
const priorityStyle = p.priority ? PRIORITY_STYLES[p.priority] : null;
|
|
15127
15261
|
const railColor = (_a = priorityStyle == null ? void 0 : priorityStyle.color) != null ? _a : ACCENT2;
|
|
15128
15262
|
const iconBg = (_b = priorityStyle == null ? void 0 : priorityStyle.bg) != null ? _b : "#fff2ec";
|
|
@@ -15969,9 +16103,9 @@ var CONNECTED_GREEN = "#15803d";
|
|
|
15969
16103
|
function ConnectIntegrationResolver(p) {
|
|
15970
16104
|
var _a;
|
|
15971
16105
|
const { BORDER: BORDER4, MUTED: MUTED2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
15972
|
-
const [cardHovered, setCardHovered] =
|
|
15973
|
-
const [btnHovered, setBtnHovered] =
|
|
15974
|
-
const [imgFailed, setImgFailed] =
|
|
16106
|
+
const [cardHovered, setCardHovered] = React41.useState(false);
|
|
16107
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
16108
|
+
const [imgFailed, setImgFailed] = React41.useState(false);
|
|
15975
16109
|
const name = (p.integrationName || "Integration").trim();
|
|
15976
16110
|
const initial = name.charAt(0).toUpperCase();
|
|
15977
16111
|
const iconSrc = p.iconUrl || brandIconUrl(name);
|
|
@@ -16133,9 +16267,9 @@ function IntegrationsListResolver(p) {
|
|
|
16133
16267
|
var _a, _b;
|
|
16134
16268
|
const { BORDER: BORDER4, MUTED: MUTED2, PAPER: PAPER2, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
16135
16269
|
const integrations = Array.isArray(p.integrations) ? p.integrations : [];
|
|
16136
|
-
const [rowHover, setRowHover] =
|
|
16137
|
-
const [btnHover, setBtnHover] =
|
|
16138
|
-
const [failed, setFailed] =
|
|
16270
|
+
const [rowHover, setRowHover] = React41.useState(null);
|
|
16271
|
+
const [btnHover, setBtnHover] = React41.useState(null);
|
|
16272
|
+
const [failed, setFailed] = React41.useState({});
|
|
16139
16273
|
const connectedCount = integrations.filter((i) => i.status === "connected").length;
|
|
16140
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: [
|
|
16141
16275
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px" }, children: [
|
|
@@ -16618,13 +16752,13 @@ var ellipsis = {
|
|
|
16618
16752
|
function PipelinePreviewResolver(p) {
|
|
16619
16753
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
16620
16754
|
const { MUTED: MUTED2, PAPER: PAPER2, BORDER: BORDER4, ACCENT: ACCENT2, ACCENT_SOFT: ACCENT_SOFT2 } = useTheme();
|
|
16621
|
-
const [btnHovered, setBtnHovered] =
|
|
16755
|
+
const [btnHovered, setBtnHovered] = React41.useState(false);
|
|
16622
16756
|
const stateCfg = STATE_CONFIG[(_a = p.state) != null ? _a : "draft"];
|
|
16623
16757
|
const destinations = (_b = p.destinations) != null ? _b : [];
|
|
16624
16758
|
const steps = (_c = p.steps) != null ? _c : [];
|
|
16625
16759
|
const workstreams = (_d = p.workstreams) != null ? _d : [];
|
|
16626
16760
|
const scheduleLabel = p.schedule ? p.schedule.type === "manual" ? "Manual" : (_f = (_e = p.schedule.label) != null ? _e : p.schedule.cron) != null ? _f : "Scheduled" : null;
|
|
16627
|
-
const { nodes, edges, viewBox, vbW, vbH } =
|
|
16761
|
+
const { nodes, edges, viewBox, vbW, vbH } = React41.useMemo(() => {
|
|
16628
16762
|
const res = layoutGraph(steps);
|
|
16629
16763
|
const b = layoutBounds(res.nodes);
|
|
16630
16764
|
const pad = 24;
|
|
@@ -16638,7 +16772,7 @@ function PipelinePreviewResolver(p) {
|
|
|
16638
16772
|
vbH: h
|
|
16639
16773
|
};
|
|
16640
16774
|
}, [steps]);
|
|
16641
|
-
const nodeMap =
|
|
16775
|
+
const nodeMap = React41.useMemo(() => {
|
|
16642
16776
|
const m = {};
|
|
16643
16777
|
nodes.forEach((n) => m[n.id] = n);
|
|
16644
16778
|
return m;
|
|
@@ -17006,6 +17140,726 @@ function PipelinePreviewResolver(p) {
|
|
|
17006
17140
|
)
|
|
17007
17141
|
] }) });
|
|
17008
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
|
+
}
|
|
17009
17863
|
function resolveUI(rawPayload) {
|
|
17010
17864
|
const payload = coercePayload(rawPayload);
|
|
17011
17865
|
switch (payload.type) {
|
|
@@ -17121,6 +17975,8 @@ function resolveUI(rawPayload) {
|
|
|
17121
17975
|
return /* @__PURE__ */ jsxRuntime.jsx(IntegrationsListResolver, __spreadValues({}, payload));
|
|
17122
17976
|
case "pipeline-preview":
|
|
17123
17977
|
return /* @__PURE__ */ jsxRuntime.jsx(PipelinePreviewResolver, __spreadValues({}, payload));
|
|
17978
|
+
case "workflow-stepper":
|
|
17979
|
+
return /* @__PURE__ */ jsxRuntime.jsx(WorkflowStepperResolver, __spreadValues({}, payload));
|
|
17124
17980
|
default: {
|
|
17125
17981
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17126
17982
|
"div",
|