@principal-ade/dynamic-file-tree 0.2.21 → 0.2.22
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/index.mjs
CHANGED
|
@@ -2192,6 +2192,14 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2192
2192
|
return aOrder - bOrder;
|
|
2193
2193
|
return (a._originalIndex ?? 0) - (b._originalIndex ?? 0);
|
|
2194
2194
|
}).map(({ _originalIndex, ...node }) => node);
|
|
2195
|
+
if (filterMode === "with-traces") {
|
|
2196
|
+
scenarioChildren = scenarioChildren.filter((node) => node.hasTraces);
|
|
2197
|
+
} else if (filterMode === "without-traces") {
|
|
2198
|
+
scenarioChildren = scenarioChildren.filter((node) => !node.hasTraces);
|
|
2199
|
+
}
|
|
2200
|
+
if (scenarioChildren.length === 0) {
|
|
2201
|
+
scenarioChildren = undefined;
|
|
2202
|
+
}
|
|
2195
2203
|
}
|
|
2196
2204
|
return {
|
|
2197
2205
|
id: workflowNodeId,
|
|
@@ -2206,14 +2214,10 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2206
2214
|
children: scenarioChildren
|
|
2207
2215
|
};
|
|
2208
2216
|
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
2209
|
-
const beforeCount = workflowNodes.length;
|
|
2210
2217
|
if (filterMode === "with-traces") {
|
|
2211
2218
|
workflowNodes = workflowNodes.filter((node) => node.hasTraces);
|
|
2212
|
-
console.warn(`[buildTreeDataFromStoryboards] Filtering with-traces: ${beforeCount} -> ${workflowNodes.length} workflows`);
|
|
2213
|
-
console.warn("[buildTreeDataFromStoryboards] Workflow hasTraces values:", storyboard.workflows.map((w) => ({ id: w.id, hasTraces: traceWorkflowsSet?.has(w.id) ?? false })));
|
|
2214
2219
|
} else if (filterMode === "without-traces") {
|
|
2215
2220
|
workflowNodes = workflowNodes.filter((node) => !node.hasTraces);
|
|
2216
|
-
console.warn(`[buildTreeDataFromStoryboards] Filtering without-traces: ${beforeCount} -> ${workflowNodes.length} workflows`);
|
|
2217
2221
|
}
|
|
2218
2222
|
if (workflowNodes.length > 0) {
|
|
2219
2223
|
const workflowsId = versionPrefix ? `workflows:${versionPrefix}:${storyboard.id}` : `workflows:${storyboard.id}`;
|
|
@@ -2522,26 +2526,11 @@ var StoryboardWorkflowsTreeCoreInner = ({
|
|
|
2522
2526
|
return contentLineHeight + paddingValue * 2 + borderHeight;
|
|
2523
2527
|
}, [verticalNodePadding]);
|
|
2524
2528
|
const treeData = useMemo9(() => {
|
|
2525
|
-
console.warn("[StoryboardWorkflowsTreeCore] Building tree data with filterMode:", workflowFilterMode);
|
|
2526
|
-
console.warn("[StoryboardWorkflowsTreeCore] traceWorkflowsSet:", traceWorkflowsSet ? Array.from(traceWorkflowsSet) : "undefined");
|
|
2527
|
-
let result;
|
|
2528
2529
|
if (versionSnapshots && versionSnapshots.length > 0) {
|
|
2529
|
-
|
|
2530
|
+
return buildTreeDataFromVersions(versionSnapshots, workflowCoverageMap, workflowFilterMode, traceWorkflowsSet, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts, showScenarios);
|
|
2530
2531
|
} else {
|
|
2531
|
-
|
|
2532
|
+
return buildTreeDataFromStoryboards(storyboards, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, undefined, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts, showScenarios);
|
|
2532
2533
|
}
|
|
2533
|
-
const countWorkflows = (nodes) => {
|
|
2534
|
-
let count = 0;
|
|
2535
|
-
for (const node of nodes) {
|
|
2536
|
-
if (node.type === "workflow")
|
|
2537
|
-
count++;
|
|
2538
|
-
if (node.children)
|
|
2539
|
-
count += countWorkflows(node.children);
|
|
2540
|
-
}
|
|
2541
|
-
return count;
|
|
2542
|
-
};
|
|
2543
|
-
console.warn("[StoryboardWorkflowsTreeCore] Result has", countWorkflows(result), "workflow nodes");
|
|
2544
|
-
return result;
|
|
2545
2534
|
}, [storyboards, versionSnapshots, workflowCoverageMap, traceWorkflowsSet, workflowFilterMode, gitStatusMap, scenarioStatusMap, canvasNodeStatusMap, scenarioTraceCounts, showScenarios]);
|
|
2546
2535
|
const NodeRenderer = (props) => {
|
|
2547
2536
|
const { node } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAS/C,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AA+7BjB,eAAO,MAAM,2BAA2B,0DAA+C,CAAC"}
|
package/package.json
CHANGED