@principal-ade/dynamic-file-tree 0.2.6 → 0.2.7
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
|
@@ -2231,13 +2231,15 @@ var buildTreeDataFromStoryboards = (storyboards, workflowCoverageMap, traceWorkf
|
|
|
2231
2231
|
return null;
|
|
2232
2232
|
}
|
|
2233
2233
|
const storyboardId = versionPrefix ? `storyboard:${versionPrefix}:${storyboard.id}` : `storyboard:${storyboard.id}`;
|
|
2234
|
+
const storyboardCanvasStatus = canvasNodeStatusMap?.[storyboard.canvas.path] ?? canvasNodeStatusMap?.[storyboard.id];
|
|
2234
2235
|
return {
|
|
2235
2236
|
id: storyboardId,
|
|
2236
2237
|
name: storyboard.name,
|
|
2237
2238
|
type: "storyboard",
|
|
2238
2239
|
storyboard,
|
|
2239
2240
|
children,
|
|
2240
|
-
hasTraces: storyboardHasTracedWorkflows
|
|
2241
|
+
hasTraces: storyboardHasTracedWorkflows,
|
|
2242
|
+
canvasNodeStatus: storyboardCanvasStatus
|
|
2241
2243
|
};
|
|
2242
2244
|
};
|
|
2243
2245
|
const hasMultiplePackages = packagesMap.size > 1;
|
|
@@ -2506,7 +2508,25 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2506
2508
|
}) : /* @__PURE__ */ React13.createElement(Workflow, {
|
|
2507
2509
|
size: 16
|
|
2508
2510
|
});
|
|
2509
|
-
const
|
|
2511
|
+
const getStoryboardColor = () => {
|
|
2512
|
+
const status = data.canvasNodeStatus;
|
|
2513
|
+
if (!status) {
|
|
2514
|
+
return data.hasTraces ? theme.colors.success : theme.colors.textSecondary;
|
|
2515
|
+
}
|
|
2516
|
+
const { implemented, approved, draft } = status;
|
|
2517
|
+
const total = implemented + approved + draft;
|
|
2518
|
+
if (total === 0) {
|
|
2519
|
+
return theme.colors.textSecondary;
|
|
2520
|
+
}
|
|
2521
|
+
if (draft === 0 && approved === 0 && implemented > 0) {
|
|
2522
|
+
return theme.colors.success || "#10b981";
|
|
2523
|
+
}
|
|
2524
|
+
if (draft === 0 && approved > 0) {
|
|
2525
|
+
return theme.colors.warning || "#f59e0b";
|
|
2526
|
+
}
|
|
2527
|
+
return theme.colors.textSecondary;
|
|
2528
|
+
};
|
|
2529
|
+
const nameColor = data.type === "version" ? data.hasTraces ? "#a855f7" : theme.colors.textMuted : data.type === "package" ? theme.colors.primary : data.type === "storyboard" ? getStoryboardColor() : data.type === "overview" ? theme.colors.info || "#3b82f6" : data.type === "canvas" ? theme.colors.warning || "#f59e0b" : data.type === "workflows" ? theme.colors.text : data.type === "workflow" ? data.hasTraces ? theme.colors.textSecondary : theme.colors.textMuted : data.type === "scenario" ? data.hasTraces ? theme.colors.textSecondary : theme.colors.textMuted : theme.colors.textSecondary;
|
|
2510
2530
|
const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" || data.type === "workflows" || data.type === "workflow" || data.type === "scenario" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2511
2531
|
const rightContent = (() => {
|
|
2512
2532
|
const indicators = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+C,MAAM,OAAO,CAAC;AASpE,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,KAA+C,MAAM,OAAO,CAAC;AASpE,OAAO,KAAK,EAEV,4BAA4B,EAQ7B,MAAM,SAAS,CAAC;AA6bjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAke9E,CAAC"}
|