@hitachivantara/uikit-react-lab 5.4.50 → 5.5.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/cjs/components/Flow/Background/Background.cjs +16 -0
- package/dist/cjs/components/Flow/Background/Background.cjs.map +1 -0
- package/dist/cjs/components/Flow/Controls/Controls.cjs +108 -0
- package/dist/cjs/components/Flow/Controls/Controls.cjs.map +1 -0
- package/dist/cjs/components/Flow/DroppableFlow.cjs +105 -0
- package/dist/cjs/components/Flow/DroppableFlow.cjs.map +1 -0
- package/dist/cjs/components/Flow/Flow.cjs +53 -0
- package/dist/cjs/components/Flow/Flow.cjs.map +1 -0
- package/dist/cjs/components/Flow/Flow.styles.cjs +14 -0
- package/dist/cjs/components/Flow/Flow.styles.cjs.map +1 -0
- package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs +27 -0
- package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs.map +1 -0
- package/dist/cjs/components/Flow/Minimap/Minimap.cjs +31 -0
- package/dist/cjs/components/Flow/Minimap/Minimap.cjs.map +1 -0
- package/dist/cjs/components/Flow/Minimap/Minimap.styles.cjs +16 -0
- package/dist/cjs/components/Flow/Minimap/Minimap.styles.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs +121 -0
- package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/Sidebar.styles.cjs +34 -0
- package/dist/cjs/components/Flow/Sidebar/Sidebar.styles.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +78 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.cjs +37 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +48 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +34 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.cjs +26 -0
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.cjs.map +1 -0
- package/dist/cjs/components/Flow/Sidebar/utils.cjs +27 -0
- package/dist/cjs/components/Flow/Sidebar/utils.cjs.map +1 -0
- package/dist/cjs/index.cjs +16 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/components/Flow/Background/Background.js +16 -0
- package/dist/esm/components/Flow/Background/Background.js.map +1 -0
- package/dist/esm/components/Flow/Controls/Controls.js +108 -0
- package/dist/esm/components/Flow/Controls/Controls.js.map +1 -0
- package/dist/esm/components/Flow/DroppableFlow.js +104 -0
- package/dist/esm/components/Flow/DroppableFlow.js.map +1 -0
- package/dist/esm/components/Flow/Flow.js +53 -0
- package/dist/esm/components/Flow/Flow.js.map +1 -0
- package/dist/esm/components/Flow/Flow.styles.js +14 -0
- package/dist/esm/components/Flow/Flow.styles.js.map +1 -0
- package/dist/esm/components/Flow/FlowContext/FlowContext.js +27 -0
- package/dist/esm/components/Flow/FlowContext/FlowContext.js.map +1 -0
- package/dist/esm/components/Flow/Minimap/Minimap.js +32 -0
- package/dist/esm/components/Flow/Minimap/Minimap.js.map +1 -0
- package/dist/esm/components/Flow/Minimap/Minimap.styles.js +16 -0
- package/dist/esm/components/Flow/Minimap/Minimap.styles.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/Sidebar.js +120 -0
- package/dist/esm/components/Flow/Sidebar/Sidebar.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/Sidebar.styles.js +34 -0
- package/dist/esm/components/Flow/Sidebar/Sidebar.styles.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js +79 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.js +37 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +48 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +35 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js +26 -0
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js.map +1 -0
- package/dist/esm/components/Flow/Sidebar/utils.js +27 -0
- package/dist/esm/components/Flow/Sidebar/utils.js.map +1 -0
- package/dist/esm/index.js +16 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +216 -0
- package/package.json +10 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SidebarGroupItem.styles.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.tsx"],"sourcesContent":["import {\n createClasses,\n outlineStyles,\n theme,\n} from \"@hitachivantara/uikit-react-core\";\n\nexport const { staticClasses, useClasses } = createClasses(\n \"HvFlowSidebarGroupItem\",\n {\n root: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n border: `1px solid ${theme.colors.atmo4}`,\n padding: theme.spacing(0, 0, 0, \"sm\"),\n cursor: \"pointer\",\n boxShadow: `0 1px 0 ${theme.colors.shad1}`,\n\n \"&:focus-visible\": {\n ...outlineStyles,\n },\n },\n dragging: { borderColor: theme.colors.primary_80 },\n }\n);\n"],"names":["staticClasses","useClasses","createClasses","root","display","alignItems","justifyContent","border","theme","colors","atmo4","padding","spacing","cursor","boxShadow","shad1","outlineStyles","dragging","borderColor","primary_80"],"mappings":";AAMa,MAAA;AAAA,EAAEA;AAAAA,EAAeC;AAAW,IAAIC,cAC3C,0BACA;AAAA,EACEC,MAAM;AAAA,IACJC,SAAS;AAAA,IACTC,YAAY;AAAA,IACZC,gBAAgB;AAAA,IAChBC,QAAS,aAAYC,MAAMC,OAAOC,KAAM;AAAA,IACxCC,SAASH,MAAMI,QAAQ,GAAG,GAAG,GAAG,IAAI;AAAA,IACpCC,QAAQ;AAAA,IACRC,WAAY,WAAUN,MAAMC,OAAOM,KAAM;AAAA,IAEzC,mBAAmB;AAAA,MACjB,GAAGC;AAAAA,IACL;AAAA,EACF;AAAA,EACAC,UAAU;AAAA,IAAEC,aAAaV,MAAMC,OAAOU;AAAAA,EAAW;AACnD,CACF;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const buildGroups = (nodeGroups, nodeTypes) => {
|
|
2
|
+
if (nodeGroups) {
|
|
3
|
+
const groups = Object.entries(nodeGroups).reduce((acc, curr) => {
|
|
4
|
+
const nodes = nodeTypes ? Object.entries(nodeTypes).reduce((accN, currN) => {
|
|
5
|
+
var _a, _b;
|
|
6
|
+
if (((_a = currN[1].meta) == null ? void 0 : _a.groupId) === curr[0]) {
|
|
7
|
+
accN.push({
|
|
8
|
+
id: currN[0],
|
|
9
|
+
label: (_b = currN[1].meta) == null ? void 0 : _b.label
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return accN;
|
|
13
|
+
}, []) : [];
|
|
14
|
+
acc[curr[0]] = {
|
|
15
|
+
...curr[1],
|
|
16
|
+
nodes
|
|
17
|
+
};
|
|
18
|
+
return acc;
|
|
19
|
+
}, {});
|
|
20
|
+
return groups;
|
|
21
|
+
}
|
|
22
|
+
return {};
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
buildGroups
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../src/components/Flow/Sidebar/utils.ts"],"sourcesContent":["import { HvFlowContextValue } from \"../FlowContext\";\nimport { HvFlowNodeGroup } from \"../types\";\nimport { HvFlowSidebarGroupNodes } from \"./SidebarGroup\";\n\nexport const buildGroups = (\n nodeGroups: HvFlowContextValue[\"nodeGroups\"],\n nodeTypes: HvFlowContextValue[\"nodeTypes\"]\n): {\n [key: string]: HvFlowNodeGroup & { nodes: HvFlowSidebarGroupNodes };\n} => {\n if (nodeGroups) {\n const groups = Object.entries(nodeGroups).reduce((acc, curr) => {\n const nodes = nodeTypes\n ? Object.entries(nodeTypes).reduce(\n (accN: HvFlowSidebarGroupNodes, currN) => {\n if (currN[1].meta?.groupId === curr[0]) {\n accN.push({\n id: currN[0],\n label: currN[1].meta?.label,\n });\n }\n return accN;\n },\n []\n )\n : [];\n\n acc[curr[0]] = {\n ...curr[1],\n nodes,\n };\n\n return acc;\n }, {});\n\n return groups;\n }\n\n return {};\n};\n"],"names":["buildGroups","nodeGroups","nodeTypes","groups","Object","entries","reduce","acc","curr","nodes","accN","currN","meta","groupId","push","id","label"],"mappings":"AAIaA,MAAAA,cAAcA,CACzBC,YACAC,cAGG;AACH,MAAID,YAAY;AACRE,UAAAA,SAASC,OAAOC,QAAQJ,UAAU,EAAEK,OAAO,CAACC,KAAKC,SAAS;AACxDC,YAAAA,QAAQP,YACVE,OAAOC,QAAQH,SAAS,EAAEI,OACxB,CAACI,MAA+BC,UAAU;AAVzCX;AAWC,cAAIW,WAAM,CAAC,EAAEC,SAATD,mBAAeE,aAAYL,KAAK,CAAC,GAAG;AACtCE,eAAKI,KAAK;AAAA,YACRC,IAAIJ,MAAM,CAAC;AAAA,YACXK,QAAOL,WAAM,CAAC,EAAEC,SAATD,mBAAeK;AAAAA,UAAAA,CACvB;AAAA,QACH;AACON,eAAAA;AAAAA,MAAAA,GAET,CAAA,CACF,IACA;AAEAF,UAAAA,KAAK,CAAC,CAAC,IAAI;AAAA,QACb,GAAGA,KAAK,CAAC;AAAA,QACTC;AAAAA,MAAAA;AAGKF,aAAAA;AAAAA,IACT,GAAG,CAAE,CAAA;AAEEJ,WAAAA;AAAAA,EACT;AAEA,SAAO;AACT;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,7 +11,20 @@ import { HvWizardContent } from "./components/Wizard/WizardContent/WizardContent
|
|
|
11
11
|
import { default as default2 } from "./components/Wizard/WizardContext/WizardContext.js";
|
|
12
12
|
import { staticClasses as staticClasses6 } from "./components/Wizard/WizardTitle/WizardTitle.styles.js";
|
|
13
13
|
import { HvWizardTitle } from "./components/Wizard/WizardTitle/WizardTitle.js";
|
|
14
|
+
import { staticClasses as staticClasses7 } from "./components/Flow/Flow.styles.js";
|
|
15
|
+
import { HvFlowBackground } from "./components/Flow/Background/Background.js";
|
|
16
|
+
import { HvFlowControls } from "./components/Flow/Controls/Controls.js";
|
|
17
|
+
import { staticClasses as staticClasses8 } from "./components/Flow/Minimap/Minimap.styles.js";
|
|
18
|
+
import { HvFlowMinimap } from "./components/Flow/Minimap/Minimap.js";
|
|
19
|
+
import { staticClasses as staticClasses9 } from "./components/Flow/Sidebar/Sidebar.styles.js";
|
|
20
|
+
import { HvFlowSidebar } from "./components/Flow/Sidebar/Sidebar.js";
|
|
21
|
+
import { HvFlow } from "./components/Flow/Flow.js";
|
|
14
22
|
export {
|
|
23
|
+
HvFlow,
|
|
24
|
+
HvFlowBackground,
|
|
25
|
+
HvFlowControls,
|
|
26
|
+
HvFlowMinimap,
|
|
27
|
+
HvFlowSidebar,
|
|
15
28
|
HvStepNavigation,
|
|
16
29
|
HvWizard,
|
|
17
30
|
HvWizardActions,
|
|
@@ -19,6 +32,9 @@ export {
|
|
|
19
32
|
HvWizardContent,
|
|
20
33
|
default2 as HvWizardContext,
|
|
21
34
|
HvWizardTitle,
|
|
35
|
+
staticClasses7 as flowClasses,
|
|
36
|
+
staticClasses8 as flowMinimapClasses,
|
|
37
|
+
staticClasses9 as flowSidebarClasses,
|
|
22
38
|
staticClasses as stepNavigationClasses,
|
|
23
39
|
staticClasses3 as wizardActionsClasses,
|
|
24
40
|
staticClasses2 as wizardClasses,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,16 +1,194 @@
|
|
|
1
|
+
import { BackgroundProps } from 'reactflow';
|
|
2
|
+
import { ComponentClass } from 'react';
|
|
3
|
+
import { ControlProps } from 'reactflow';
|
|
1
4
|
import type { CSSInterpolation } from '@emotion/serialize';
|
|
2
5
|
import { Dispatch } from 'react';
|
|
6
|
+
import { DndContextProps } from '@dnd-kit/core';
|
|
7
|
+
import { Edge } from 'reactflow';
|
|
3
8
|
import { ExtractNames } from '@hitachivantara/uikit-react-core';
|
|
9
|
+
import { FunctionComponent } from 'react';
|
|
10
|
+
import { GetMiniMapNodeAttribute } from 'reactflow';
|
|
4
11
|
import { HvAvatarSize } from '@hitachivantara/uikit-react-core';
|
|
5
12
|
import { HvBaseProps } from '@hitachivantara/uikit-react-core';
|
|
6
13
|
import { HvBreakpoints } from '@hitachivantara/uikit-react-core';
|
|
7
14
|
import { HvButtonProps } from '@hitachivantara/uikit-react-core';
|
|
15
|
+
import { HvColorAny } from '@hitachivantara/uikit-styles';
|
|
8
16
|
import { HvDialogProps } from '@hitachivantara/uikit-react-core';
|
|
17
|
+
import { HvDrawerProps } from '@hitachivantara/uikit-react-core';
|
|
9
18
|
import type { JSX as JSX_2 } from '@emotion/react/jsx-runtime';
|
|
19
|
+
import { MiniMapProps } from 'reactflow';
|
|
10
20
|
import { ModalProps } from '@mui/material';
|
|
21
|
+
import { Node as Node_2 } from 'reactflow';
|
|
22
|
+
import { NodeProps } from 'reactflow';
|
|
23
|
+
import { PanelPosition } from 'reactflow';
|
|
11
24
|
import { default as React_2 } from 'react';
|
|
25
|
+
import { ReactFlowProps } from 'reactflow';
|
|
12
26
|
import { SetStateAction } from 'react';
|
|
13
27
|
|
|
28
|
+
export declare const flowClasses: {
|
|
29
|
+
root: "HvFlow-root";
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export declare const flowMinimapClasses: {
|
|
33
|
+
root: "HvFlowMinimap-root";
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export declare const flowSidebarClasses: {
|
|
37
|
+
description: "HvFlowSidebar-description";
|
|
38
|
+
titleContainer: "HvFlowSidebar-titleContainer";
|
|
39
|
+
contentContainer: "HvFlowSidebar-contentContainer";
|
|
40
|
+
drawerPaper: "HvFlowSidebar-drawerPaper";
|
|
41
|
+
searchRoot: "HvFlowSidebar-searchRoot";
|
|
42
|
+
groupsContainer: "HvFlowSidebar-groupsContainer";
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
declare interface HvDroppableFlowProps<NodeData = any, NodeType extends string | undefined = string | undefined> extends Omit<ReactFlowProps, "nodes" | "edges" | "nodeTypes"> {
|
|
46
|
+
/** Flow content: background, controls, and minimap. */
|
|
47
|
+
children?: React.ReactNode;
|
|
48
|
+
/** Flow nodes. */
|
|
49
|
+
nodes?: HvFlowNode<NodeData, NodeType>[];
|
|
50
|
+
/** Flow edges. */
|
|
51
|
+
edges?: HvFlowEdge[];
|
|
52
|
+
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
53
|
+
classes?: HvFlowClasses;
|
|
54
|
+
/** Function called when the flow changes. Returns the updated nodes and edges. */
|
|
55
|
+
onFlowChange?: (nodes: HvFlowNode<NodeData, NodeType>[], edges: HvFlowEdge[]) => void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Flow component to build interactive node-based UIs.
|
|
60
|
+
*
|
|
61
|
+
* This implementation leverages [React Flow](https://reactflow.dev).
|
|
62
|
+
* The drag and drop functionality leverages [Dnd Kit](https://docs.dndkit.com)
|
|
63
|
+
*
|
|
64
|
+
* DISCLAIMER: This component is a work in progress and there might be breaking changes.
|
|
65
|
+
*/
|
|
66
|
+
export declare const HvFlow: ({ nodeTypes, nodeGroups, sidebar, dndContextProps, ...others }: HvFlowProps) => JSX_2.Element;
|
|
67
|
+
|
|
68
|
+
export declare const HvFlowBackground: ({ color, ...others }: HvFlowBackgroundProps) => JSX_2.Element;
|
|
69
|
+
|
|
70
|
+
export declare interface HvFlowBackgroundProps extends Omit<BackgroundProps, "color"> {
|
|
71
|
+
/** Color for the background dots. Defaults to `secondary`. */
|
|
72
|
+
color?: HvColorAny;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export declare type HvFlowClasses = ExtractNames<typeof useClasses_8>;
|
|
76
|
+
|
|
77
|
+
export declare const HvFlowControls: ({ onZoomIn: onZoomInProp, onZoomOut: onZoomOutProp, onFitView: onFitViewProp, labels: labelsProps, hideInteractive, hideFitView, hideZoom, position, orientation, onInteractiveChange, fitViewOptions, children, ...others }: HvFlowControlsProps) => JSX_2.Element;
|
|
78
|
+
|
|
79
|
+
export declare type HvFlowControlsPosition = PanelPosition;
|
|
80
|
+
|
|
81
|
+
export declare interface HvFlowControlsProps extends Omit<ControlProps, "position" | "showFitView" | "showInteractive" | "showZoom"> {
|
|
82
|
+
/** Controls position. Defaults to `bottom-center`. */
|
|
83
|
+
position?: HvFlowControlsPosition;
|
|
84
|
+
/** Controls orientation. Defaults to `horizontal`. */
|
|
85
|
+
orientation?: "vertical" | "horizontal";
|
|
86
|
+
/** Labels used on the controls buttons. */
|
|
87
|
+
labels?: {
|
|
88
|
+
zoomIn?: string;
|
|
89
|
+
zoomOut?: string;
|
|
90
|
+
fitView?: string;
|
|
91
|
+
interactive?: string;
|
|
92
|
+
};
|
|
93
|
+
/** Whether to hide the zoom controls. */
|
|
94
|
+
hideZoom?: boolean;
|
|
95
|
+
/** Whether to hide the fit view controls. */
|
|
96
|
+
hideFitView?: boolean;
|
|
97
|
+
/** Whether to hide the interactive controls. */
|
|
98
|
+
hideInteractive?: boolean;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Edge */
|
|
102
|
+
export declare type HvFlowEdge = Edge;
|
|
103
|
+
|
|
104
|
+
export declare const HvFlowMinimap: ({ nodeColor, maskColor, maskStrokeColor, nodeStrokeColor, classes: classesProp, className, ...others }: HvFlowMinimapProps) => JSX_2.Element;
|
|
105
|
+
|
|
106
|
+
export declare type HvFlowMinimapClasses = ExtractNames<typeof useClasses_9>;
|
|
107
|
+
|
|
108
|
+
export declare interface HvFlowMinimapProps<NodeData = any> extends Omit<MiniMapProps<NodeData>, "nodeColor" | "nodeStrokeColor" | "maskColor" | "maskStrokeColor"> {
|
|
109
|
+
/** Node color. Defaults to `atmo4`. */
|
|
110
|
+
nodeColor?: HvColorAny | GetMiniMapNodeAttribute<NodeData>;
|
|
111
|
+
/** Node stroke color. Defaults to `atmo4`. */
|
|
112
|
+
nodeStrokeColor?: HvColorAny | GetMiniMapNodeAttribute<NodeData>;
|
|
113
|
+
/** Mask color. Defaults to `atmo3`. */
|
|
114
|
+
maskColor?: HvColorAny;
|
|
115
|
+
/** Mask stroke color. Defaults to `atmo3`. */
|
|
116
|
+
maskStrokeColor?: HvColorAny;
|
|
117
|
+
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
118
|
+
classes?: HvFlowMinimapClasses;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Node */
|
|
122
|
+
export declare type HvFlowNode<NodeData = any, NodeType extends string | undefined = string | undefined> = Node_2<NodeData, NodeType>;
|
|
123
|
+
|
|
124
|
+
export declare interface HvFlowNodeComponentClass<GroupId extends keyof any = string> extends ComponentClass<NodeProps> {
|
|
125
|
+
/** Metadata used on the HvFlowSidebar component to group the node */
|
|
126
|
+
meta?: {
|
|
127
|
+
groupId: GroupId;
|
|
128
|
+
label: string;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare type HvFlowNodeComponentType<GroupId extends keyof any = string> = HvFlowNodeComponentClass<GroupId> | HvFlowNodeFunctionComponent<GroupId>;
|
|
133
|
+
|
|
134
|
+
/** Node types */
|
|
135
|
+
export declare interface HvFlowNodeFunctionComponent<GroupId extends keyof any = string> extends FunctionComponent<NodeProps> {
|
|
136
|
+
/** Metadata used on the HvFlowSidebar component to group the node */
|
|
137
|
+
meta?: {
|
|
138
|
+
groupId: GroupId;
|
|
139
|
+
label: string;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Node groups */
|
|
144
|
+
export declare interface HvFlowNodeGroup {
|
|
145
|
+
label: string;
|
|
146
|
+
description?: string;
|
|
147
|
+
color?: HvColorAny;
|
|
148
|
+
icon?: React.ReactNode;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export declare type HvFlowNodeGroups<GroupId extends keyof any = string> = Record<GroupId, HvFlowNodeGroup>;
|
|
152
|
+
|
|
153
|
+
export declare type HvFlowNodeTypes<GroupId extends keyof any = string> = {
|
|
154
|
+
[key: string]: HvFlowNodeComponentType<GroupId>;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export declare interface HvFlowProps<NodeData = any, NodeType extends string | undefined = string | undefined, NodeGroups extends keyof any = string> extends HvDroppableFlowProps<NodeData, NodeType> {
|
|
158
|
+
/** Flow nodes groups. */
|
|
159
|
+
nodeGroups?: HvFlowNodeGroups<NodeGroups>;
|
|
160
|
+
/** Flow nodes types. */
|
|
161
|
+
nodeTypes?: HvFlowNodeTypes<NodeGroups>;
|
|
162
|
+
/** Flow sidebar. */
|
|
163
|
+
sidebar?: React.ReactNode;
|
|
164
|
+
/**
|
|
165
|
+
* Dnd Kit context props. This should be used for accessibility purposes.
|
|
166
|
+
*
|
|
167
|
+
* More information can be found on the [Dnd Kit documentation](https://docs.dndkit.com/guides/accessibility)
|
|
168
|
+
*/
|
|
169
|
+
dndContextProps?: Pick<DndContextProps, "accessibility">;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export declare const HvFlowSidebar: ({ id, title, description, anchor, buttonTitle, classes: classesProp, labels: labelsProps, ...others }: HvFlowSidebarProps) => JSX_2.Element;
|
|
173
|
+
|
|
174
|
+
export declare type HvFlowSidebarClasses = ExtractNames<typeof useClasses_10>;
|
|
175
|
+
|
|
176
|
+
export declare interface HvFlowSidebarProps extends Omit<HvDrawerProps, "classes" | "title"> {
|
|
177
|
+
/** Sidebar title. */
|
|
178
|
+
title?: string;
|
|
179
|
+
/** Sidebar description. */
|
|
180
|
+
description?: string;
|
|
181
|
+
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
182
|
+
classes?: HvFlowSidebarClasses;
|
|
183
|
+
/** Labels used on the sidebar. */
|
|
184
|
+
labels?: {
|
|
185
|
+
itemAriaRoleDescription?: string;
|
|
186
|
+
expandGroupButtonAriaLabel?: string;
|
|
187
|
+
searchPlaceholder?: string;
|
|
188
|
+
searchAriaLabel?: string;
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
14
192
|
declare type HvStepClasses = ExtractNames<typeof useClasses_2>;
|
|
15
193
|
|
|
16
194
|
/**
|
|
@@ -235,6 +413,22 @@ declare const useClasses: (classesProp?: Partial<Record<"li" | "ol" | "root" | "
|
|
|
235
413
|
cx: (...args: any) => string;
|
|
236
414
|
};
|
|
237
415
|
|
|
416
|
+
declare const useClasses_10: (classesProp?: Partial<Record<"description" | "titleContainer" | "contentContainer" | "drawerPaper" | "searchRoot" | "groupsContainer", string>>, addStatic?: boolean) => {
|
|
417
|
+
classes: {
|
|
418
|
+
description: string;
|
|
419
|
+
titleContainer: string;
|
|
420
|
+
contentContainer: string;
|
|
421
|
+
drawerPaper: string;
|
|
422
|
+
searchRoot: string;
|
|
423
|
+
groupsContainer: string;
|
|
424
|
+
};
|
|
425
|
+
css: {
|
|
426
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
427
|
+
(...args: CSSInterpolation[]): string;
|
|
428
|
+
};
|
|
429
|
+
cx: (...args: any) => string;
|
|
430
|
+
};
|
|
431
|
+
|
|
238
432
|
declare const useClasses_2: (classesProp?: Partial<Record<"xl" | "lg" | "md" | "sm" | "xs" | "root" | "ghost" | "avatar" | "ghostDisabled" | "notCurrent", string>>, addStatic?: boolean) => {
|
|
239
433
|
classes: {
|
|
240
434
|
xl: string;
|
|
@@ -324,6 +518,28 @@ declare const useClasses_7: (classesProp?: Partial<Record<"fixedHeight" | "conte
|
|
|
324
518
|
cx: (...args: any) => string;
|
|
325
519
|
};
|
|
326
520
|
|
|
521
|
+
declare const useClasses_8: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
522
|
+
classes: {
|
|
523
|
+
root: string;
|
|
524
|
+
};
|
|
525
|
+
css: {
|
|
526
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
527
|
+
(...args: CSSInterpolation[]): string;
|
|
528
|
+
};
|
|
529
|
+
cx: (...args: any) => string;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
declare const useClasses_9: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
533
|
+
classes: {
|
|
534
|
+
root: string;
|
|
535
|
+
};
|
|
536
|
+
css: {
|
|
537
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
538
|
+
(...args: CSSInterpolation[]): string;
|
|
539
|
+
};
|
|
540
|
+
cx: (...args: any) => string;
|
|
541
|
+
};
|
|
542
|
+
|
|
327
543
|
export declare const wizardActionsClasses: {
|
|
328
544
|
buttonWidth: "HvWizardActions-buttonWidth";
|
|
329
545
|
actionsContainer: "HvWizardActions-actionsContainer";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Contributed React components for the NEXT UI Kit.",
|
|
@@ -29,11 +29,17 @@
|
|
|
29
29
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@dnd-kit/core": "^6.0.8",
|
|
33
|
+
"@dnd-kit/modifiers": "^6.0.1",
|
|
32
34
|
"@emotion/css": "^11.11.0",
|
|
33
|
-
"@hitachivantara/uikit-react-core": "^5.27.
|
|
35
|
+
"@hitachivantara/uikit-react-core": "^5.27.5",
|
|
34
36
|
"@hitachivantara/uikit-react-icons": "^5.6.6",
|
|
35
37
|
"@hitachivantara/uikit-styles": "^5.12.1",
|
|
36
|
-
"
|
|
38
|
+
"lodash": "^4.17.21",
|
|
39
|
+
"reactflow": "^11.8.3",
|
|
40
|
+
"uid": "^2.0.2",
|
|
41
|
+
"usehooks-ts": "^2.9.1",
|
|
42
|
+
"zustand": "^4.4.1"
|
|
37
43
|
},
|
|
38
44
|
"files": [
|
|
39
45
|
"dist"
|
|
@@ -42,7 +48,7 @@
|
|
|
42
48
|
"access": "public",
|
|
43
49
|
"directory": "package"
|
|
44
50
|
},
|
|
45
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "435a519a26417bd9b599a7b0b57ad441ae3a0436",
|
|
46
52
|
"main": "dist/cjs/index.cjs",
|
|
47
53
|
"exports": {
|
|
48
54
|
".": {
|