@principal-ade/dynamic-file-tree 0.1.53 → 0.1.55
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 +12 -5
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts +1 -0
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.d.ts.map +1 -1
- package/dist/src/components/StoryboardWorkflowsTree/types.d.ts +2 -0
- package/dist/src/components/StoryboardWorkflowsTree/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1871,10 +1871,10 @@ var MultiFileTree = ({
|
|
|
1871
1871
|
}, "Selected: ", selectedFile.source.name, " / ", selectedFile.path));
|
|
1872
1872
|
};
|
|
1873
1873
|
// src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx
|
|
1874
|
-
import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen } from "lucide-react";
|
|
1874
|
+
import { Package, FolderKanban, LayoutDashboard, Workflow, BookOpen, FolderOpen, CheckCircle2 } from "lucide-react";
|
|
1875
1875
|
import React11, { useMemo as useMemo9 } from "react";
|
|
1876
1876
|
import { Tree as Tree3 } from "react-arborist";
|
|
1877
|
-
var buildTreeData = (storyboards) => {
|
|
1877
|
+
var buildTreeData = (storyboards, workflowCoverageMap) => {
|
|
1878
1878
|
const packagesMap = new Map;
|
|
1879
1879
|
const rootStoryboards = [];
|
|
1880
1880
|
for (const storyboard of storyboards) {
|
|
@@ -1910,7 +1910,8 @@ var buildTreeData = (storyboards) => {
|
|
|
1910
1910
|
name: workflow.name,
|
|
1911
1911
|
type: "workflow",
|
|
1912
1912
|
workflow,
|
|
1913
|
-
storyboard
|
|
1913
|
+
storyboard,
|
|
1914
|
+
isFullyCovered: workflowCoverageMap?.[workflow.id] ?? false
|
|
1914
1915
|
})).sort((a, b) => a.name.localeCompare(b.name));
|
|
1915
1916
|
children.push({
|
|
1916
1917
|
id: `workflows:${storyboard.id}`,
|
|
@@ -1980,7 +1981,8 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
1980
1981
|
horizontalNodePadding = "16px",
|
|
1981
1982
|
verticalNodePadding = "6px",
|
|
1982
1983
|
verticalPadding = "20px",
|
|
1983
|
-
enableDragAndDrop = false
|
|
1984
|
+
enableDragAndDrop = false,
|
|
1985
|
+
workflowCoverageMap
|
|
1984
1986
|
}) => {
|
|
1985
1987
|
const dndProps = getDndProps(enableDragAndDrop);
|
|
1986
1988
|
const rowHeight = useMemo9(() => {
|
|
@@ -1989,7 +1991,7 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
1989
1991
|
const borderHeight = 2;
|
|
1990
1992
|
return contentLineHeight + paddingValue * 2 + borderHeight;
|
|
1991
1993
|
}, [verticalNodePadding]);
|
|
1992
|
-
const treeData = useMemo9(() => buildTreeData(storyboards), [storyboards]);
|
|
1994
|
+
const treeData = useMemo9(() => buildTreeData(storyboards, workflowCoverageMap), [storyboards, workflowCoverageMap]);
|
|
1993
1995
|
const NodeRenderer = (props) => {
|
|
1994
1996
|
const { node } = props;
|
|
1995
1997
|
const data = node.data;
|
|
@@ -2008,11 +2010,16 @@ var StoryboardWorkflowsTreeCore = ({
|
|
|
2008
2010
|
});
|
|
2009
2011
|
const nameColor = data.type === "package" ? theme.colors.primary : data.type === "storyboard" ? theme.colors.success : data.type === "overview" ? theme.colors.info || "#3b82f6" : data.type === "canvas" ? theme.colors.warning || "#f59e0b" : data.type === "workflows" ? theme.colors.text : theme.colors.textSecondary;
|
|
2010
2012
|
const nodeHorizontalPadding = data.type === "overview" || data.type === "canvas" || data.type === "workflows" || data.type === "workflow" ? `calc(${horizontalNodePadding} + 12px)` : horizontalNodePadding;
|
|
2013
|
+
const rightContent = data.type === "workflow" && data.isFullyCovered ? /* @__PURE__ */ React11.createElement(CheckCircle2, {
|
|
2014
|
+
size: 14,
|
|
2015
|
+
style: { color: "#10b981", marginLeft: "6px" }
|
|
2016
|
+
}) : undefined;
|
|
2011
2017
|
return /* @__PURE__ */ React11.createElement(TreeNode, {
|
|
2012
2018
|
...props,
|
|
2013
2019
|
theme,
|
|
2014
2020
|
nameColor,
|
|
2015
2021
|
leftIcon: icon,
|
|
2022
|
+
rightContent,
|
|
2016
2023
|
horizontalNodePadding: nodeHorizontalPadding,
|
|
2017
2024
|
verticalNodePadding
|
|
2018
2025
|
});
|
|
@@ -15,6 +15,7 @@ export declare const MatrixTheme: Story;
|
|
|
15
15
|
export declare const MatrixMinimalTheme: Story;
|
|
16
16
|
export declare const SlateTheme: Story;
|
|
17
17
|
export declare const InteractiveDemo: Story;
|
|
18
|
+
export declare const WithCoverageIndicators: Story;
|
|
18
19
|
export declare const ThemeComparison: Story;
|
|
19
20
|
export declare const CustomPadding: Story;
|
|
20
21
|
export declare const WithOverviewNodes: Story;
|
package/dist/src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTree.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTree.stories.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAyP5E,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,2BAA2B,CAOlD,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE1D,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,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;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAuE7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAkEpC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAgE7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAU3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAwB/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAiBlC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAEV,4BAA4B,EAG7B,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"StoryboardWorkflowsTreeCore.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/StoryboardWorkflowsTreeCore.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,KAAK,EAEV,4BAA4B,EAG7B,MAAM,SAAS,CAAC;AAyIjB,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,4BAA4B,CAsI9E,CAAC"}
|
|
@@ -13,6 +13,7 @@ export interface StoryboardWorkflowNodeData extends TreeNodeData {
|
|
|
13
13
|
packageName?: string;
|
|
14
14
|
scope?: 'package' | 'root';
|
|
15
15
|
markdownPath?: string;
|
|
16
|
+
isFullyCovered?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface StoryboardWorkflowsTreeProps {
|
|
18
19
|
storyboards: DiscoveredStoryboard[];
|
|
@@ -25,5 +26,6 @@ export interface StoryboardWorkflowsTreeProps {
|
|
|
25
26
|
verticalNodePadding?: string;
|
|
26
27
|
verticalPadding?: string;
|
|
27
28
|
enableDragAndDrop?: boolean;
|
|
29
|
+
workflowCoverageMap?: Record<string, boolean>;
|
|
28
30
|
}
|
|
29
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryboardWorkflowsTree/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAEtI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAC;AAE7F,MAAM,MAAM,0BAA0B,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAErH,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,CAAC,EAAE,0BAA0B,EAAE,CAAC;IAGxC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;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