footprint-explainable-ui 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flowchart.cjs +34 -8
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.d.cts +72 -5
- package/dist/flowchart.d.ts +72 -5
- package/dist/flowchart.js +89 -63
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +75 -61
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/flowchart.cjs
CHANGED
|
@@ -1286,8 +1286,11 @@ function styleEdge(edge, colors) {
|
|
|
1286
1286
|
}
|
|
1287
1287
|
return styled;
|
|
1288
1288
|
}
|
|
1289
|
-
var
|
|
1289
|
+
var DEFAULT_NODE_TYPES = { stageNode: StageNode };
|
|
1290
1290
|
function toStageNode(node) {
|
|
1291
|
+
if (node.type !== void 0 && node.type !== "stage") {
|
|
1292
|
+
return node;
|
|
1293
|
+
}
|
|
1291
1294
|
const data = node.data;
|
|
1292
1295
|
const stageData = {
|
|
1293
1296
|
label: data.label,
|
|
@@ -1369,6 +1372,11 @@ function TraceFlow(props) {
|
|
|
1369
1372
|
},
|
|
1370
1373
|
[onNodeClickRef]
|
|
1371
1374
|
);
|
|
1375
|
+
const { nodeTypes: userNodeTypes, edgeTypes: userEdgeTypes } = props;
|
|
1376
|
+
const mergedNodeTypes = (0, import_react8.useMemo)(
|
|
1377
|
+
() => userNodeTypes ? { ...DEFAULT_NODE_TYPES, ...userNodeTypes } : DEFAULT_NODE_TYPES,
|
|
1378
|
+
[userNodeTypes]
|
|
1379
|
+
);
|
|
1372
1380
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1373
1381
|
"div",
|
|
1374
1382
|
{
|
|
@@ -1379,16 +1387,20 @@ function TraceFlow(props) {
|
|
|
1379
1387
|
minHeight: 300,
|
|
1380
1388
|
...props.style
|
|
1381
1389
|
},
|
|
1382
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.
|
|
1390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
1383
1391
|
import_react9.ReactFlow,
|
|
1384
1392
|
{
|
|
1385
1393
|
nodes: reactFlowNodes,
|
|
1386
1394
|
edges: reactFlowEdges,
|
|
1387
|
-
nodeTypes,
|
|
1395
|
+
nodeTypes: mergedNodeTypes,
|
|
1396
|
+
...userEdgeTypes && { edgeTypes: userEdgeTypes },
|
|
1388
1397
|
onNodeClick: handleNodeClick,
|
|
1389
1398
|
fitView: true,
|
|
1390
1399
|
proOptions: { hideAttribution: true },
|
|
1391
|
-
children:
|
|
1400
|
+
children: [
|
|
1401
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react9.Background, { variant: import_react9.BackgroundVariant.Dots, gap: 20, size: 1 }),
|
|
1402
|
+
props.children
|
|
1403
|
+
]
|
|
1392
1404
|
}
|
|
1393
1405
|
)
|
|
1394
1406
|
}
|
|
@@ -1728,6 +1740,9 @@ var DEFAULT_COLORS = {
|
|
|
1728
1740
|
loop: rawDefaults.colors.warning
|
|
1729
1741
|
};
|
|
1730
1742
|
function toStageNodeWithOverlay(node, doneStageIds, activeStageId, errorMessage, executedOrderIds) {
|
|
1743
|
+
if (node.type !== void 0 && node.type !== "stage") {
|
|
1744
|
+
return node;
|
|
1745
|
+
}
|
|
1731
1746
|
const isDone = doneStageIds.has(node.id);
|
|
1732
1747
|
const isActive = activeStageId === node.id;
|
|
1733
1748
|
const wasExecuted = isDone || isActive;
|
|
@@ -1792,7 +1807,7 @@ function styleEdgeWithOverlay(edge, doneStageIds, activeStageId, colors) {
|
|
|
1792
1807
|
}
|
|
1793
1808
|
return styled;
|
|
1794
1809
|
}
|
|
1795
|
-
var
|
|
1810
|
+
var DEFAULT_NODE_TYPES2 = { stageNode: StageNode };
|
|
1796
1811
|
function TracedFlow({
|
|
1797
1812
|
graph,
|
|
1798
1813
|
overlay,
|
|
@@ -1801,6 +1816,9 @@ function TracedFlow({
|
|
|
1801
1816
|
colors: colorOverrides,
|
|
1802
1817
|
onNodeClick,
|
|
1803
1818
|
onSubflowChange,
|
|
1819
|
+
nodeTypes: userNodeTypes,
|
|
1820
|
+
edgeTypes: userEdgeTypes,
|
|
1821
|
+
children,
|
|
1804
1822
|
className,
|
|
1805
1823
|
style
|
|
1806
1824
|
}) {
|
|
@@ -1809,6 +1827,10 @@ function TracedFlow({
|
|
|
1809
1827
|
() => ({ ...DEFAULT_COLORS, ...colorOverrides ?? {} }),
|
|
1810
1828
|
[colorOverrides]
|
|
1811
1829
|
);
|
|
1830
|
+
const mergedNodeTypes = (0, import_react12.useMemo)(
|
|
1831
|
+
() => userNodeTypes ? { ...DEFAULT_NODE_TYPES2, ...userNodeTypes } : DEFAULT_NODE_TYPES2,
|
|
1832
|
+
[userNodeTypes]
|
|
1833
|
+
);
|
|
1812
1834
|
const drill = useSubflowDrill(graph, onSubflowChange);
|
|
1813
1835
|
const filteredGraph = (0, import_react12.useMemo)(
|
|
1814
1836
|
() => filterGraphForDrill(graph, drill.currentSubflowId),
|
|
@@ -1887,17 +1909,21 @@ function TracedFlow({
|
|
|
1887
1909
|
onNavigate: drill.setCurrentSubflowId
|
|
1888
1910
|
}
|
|
1889
1911
|
),
|
|
1890
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.
|
|
1912
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1891
1913
|
import_react13.ReactFlow,
|
|
1892
1914
|
{
|
|
1893
1915
|
nodes: reactFlowNodes,
|
|
1894
1916
|
edges: reactFlowEdges,
|
|
1895
|
-
nodeTypes:
|
|
1917
|
+
nodeTypes: mergedNodeTypes,
|
|
1918
|
+
...userEdgeTypes && { edgeTypes: userEdgeTypes },
|
|
1896
1919
|
onNodeClick: handleNodeClick,
|
|
1897
1920
|
onInit: setRfInstance,
|
|
1898
1921
|
fitView: true,
|
|
1899
1922
|
proOptions: { hideAttribution: true },
|
|
1900
|
-
children:
|
|
1923
|
+
children: [
|
|
1924
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react13.Background, { variant: import_react13.BackgroundVariant.Dots, gap: 20, size: 1 }),
|
|
1925
|
+
children
|
|
1926
|
+
]
|
|
1901
1927
|
}
|
|
1902
1928
|
) })
|
|
1903
1929
|
]
|