@hitachivantara/uikit-react-lab 6.1.1 → 6.1.3
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useState, useMemo, createContext } from "react";
|
|
3
3
|
import { HvFlowNodeMetaProvider } from "./NodeMetaContext.js";
|
|
4
4
|
const HvFlowContext = createContext({});
|
|
5
5
|
const HvFlowProvider = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useMemo, useCallback } from "react";
|
|
2
|
+
import { useNodes, useEdges, useStore } from "reactflow";
|
|
3
3
|
import { shallow } from "zustand/shallow";
|
|
4
4
|
import { useFlowInstance } from "./useFlowInstance.js";
|
|
5
5
|
import { useNodeId } from "./useNodeId.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState, useRef, useCallback } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { cx, css } from "@emotion/css";
|
|
4
4
|
import Popover from "@mui/material/Popover";
|
|
5
5
|
import { useReactFlow, NodeResizer, NodeToolbar, Position } from "reactflow";
|
|
6
6
|
import { theme, HvDialogTitle, HvDialogContent, HvColorPicker, HvCheckBox, HvButton, HvSelectionList, HvListItem, HvMultiButton, HvIconButton } from "@hitachivantara/uikit-react-core";
|
|
@@ -49,7 +49,7 @@ const HvWizardContent = ({
|
|
|
49
49
|
const initialContext = arrayChildren.reduce(
|
|
50
50
|
(acc, child, index) => {
|
|
51
51
|
const invalid = "mustValidate" in child.props && child.props.mustValidate === true ? false : null;
|
|
52
|
-
const valid = invalid;
|
|
52
|
+
const valid = invalid ?? (index === 0 || null);
|
|
53
53
|
acc[index] = { ...child.props, form: {}, valid, touched: index === 0 };
|
|
54
54
|
return acc;
|
|
55
55
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,6 @@ import { HvColorAny as HvColorAny_2 } from '@hitachivantara/uikit-react-core';
|
|
|
30
30
|
import { HvDialogProps } from '@hitachivantara/uikit-react-core';
|
|
31
31
|
import { HvDrawerProps } from '@hitachivantara/uikit-react-core';
|
|
32
32
|
import { HvEmptyStateProps } from '@hitachivantara/uikit-react-core';
|
|
33
|
-
import { HvFlowContextValue } from '../FlowContext';
|
|
34
|
-
import { HvFlowNodeMeta as HvFlowNodeMeta_2 } from '..';
|
|
35
33
|
import { HvSize } from '@hitachivantara/uikit-react-core';
|
|
36
34
|
import { HvSliderProps } from '@hitachivantara/uikit-react-core';
|
|
37
35
|
import { HvTypographyVariants } from '@hitachivantara/uikit-react-core';
|
|
@@ -459,6 +457,17 @@ export declare type HvFlowBuiltInActions = Omit<HvFlowNodeAction, "id" | "callba
|
|
|
459
457
|
|
|
460
458
|
export declare type HvFlowClasses = ExtractNames<typeof useClasses_4>;
|
|
461
459
|
|
|
460
|
+
declare interface HvFlowContextValue<NodeGroups extends keyof any = string> {
|
|
461
|
+
/** Flow nodes groups. */
|
|
462
|
+
nodeGroups?: HvFlowNodeGroups<NodeGroups>;
|
|
463
|
+
/** Flow nodes groups expanded on sidebar. */
|
|
464
|
+
expandedNodeGroups?: string[];
|
|
465
|
+
/** Flow default actions. */
|
|
466
|
+
defaultActions?: HvFlowNodeAction[];
|
|
467
|
+
/** Function to set `expandedNodeGroups`. */
|
|
468
|
+
setExpandedNodeGroups?: Dispatch<SetStateAction<string[]>>;
|
|
469
|
+
}
|
|
470
|
+
|
|
462
471
|
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;
|
|
463
472
|
|
|
464
473
|
export declare type HvFlowControlsPosition = PanelPosition;
|
|
@@ -1141,7 +1150,7 @@ export declare function useFlowNodeInputEdges(id?: string): Edge[];
|
|
|
1141
1150
|
|
|
1142
1151
|
export declare function useFlowNodeIntersections<NodeData = any>(id?: string): Node_2<NodeData>[];
|
|
1143
1152
|
|
|
1144
|
-
export declare function useFlowNodeMeta(id?: string):
|
|
1153
|
+
export declare function useFlowNodeMeta(id?: string): HvFlowNodeMeta;
|
|
1145
1154
|
|
|
1146
1155
|
/** Gives the output edges connected from the node */
|
|
1147
1156
|
export declare function useFlowNodeOutputEdges(id?: string): Edge[];
|
package/dist/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { default as default2 } from "./Wizard/WizardContext/WizardContext.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DEFAULT_LABELS, HvFlowBaseNode } from "./Flow/Node/BaseNode.js";
|
|
3
3
|
import { HvBlade } from "./Blade/Blade.js";
|
|
4
|
-
import { staticClasses as staticClasses2 } from "./Blades/Blades.styles.js";
|
|
5
4
|
import { HvBlades } from "./Blades/Blades.js";
|
|
6
|
-
import { staticClasses as staticClasses3 } from "./Dashboard/Dashboard.styles.js";
|
|
7
5
|
import { HvDashboard } from "./Dashboard/Dashboard.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { HvDashboardNode } from "./Flow/nodes/DashboardNode.js";
|
|
7
|
+
import { HvFlow } from "./Flow/Flow.js";
|
|
10
8
|
import { HvFlowBackground } from "./Flow/Background/Background.js";
|
|
11
9
|
import { HvFlowControls } from "./Flow/Controls/Controls.js";
|
|
12
|
-
import { staticClasses as staticClasses5 } from "./Flow/Minimap/Minimap.styles.js";
|
|
13
|
-
import { HvFlowMinimap } from "./Flow/Minimap/Minimap.js";
|
|
14
|
-
import { staticClasses as staticClasses6 } from "./Flow/Sidebar/Sidebar.styles.js";
|
|
15
|
-
import { HvFlowSidebar } from "./Flow/Sidebar/Sidebar.js";
|
|
16
10
|
import { HvFlowEmpty } from "./Flow/Empty/Empty.js";
|
|
17
|
-
import {
|
|
18
|
-
import { staticClasses as staticClasses7 } from "./Flow/Node/BaseNode.styles.js";
|
|
19
|
-
import { DEFAULT_LABELS, HvFlowBaseNode } from "./Flow/Node/BaseNode.js";
|
|
20
|
-
import { staticClasses as staticClasses8 } from "./Flow/Node/Node.styles.js";
|
|
11
|
+
import { HvFlowMinimap } from "./Flow/Minimap/Minimap.js";
|
|
21
12
|
import { HvFlowNode } from "./Flow/Node/Node.js";
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
13
|
+
import { HvFlowSidebar } from "./Flow/Sidebar/Sidebar.js";
|
|
14
|
+
import { HvStepNavigation } from "./StepNavigation/StepNavigation.js";
|
|
15
|
+
import { HvWizard } from "./Wizard/Wizard.js";
|
|
16
|
+
import { HvWizardActions } from "./Wizard/WizardActions/WizardActions.js";
|
|
17
|
+
import { HvWizardContainer } from "./Wizard/WizardContainer/WizardContainer.js";
|
|
18
|
+
import { HvWizardContent } from "./Wizard/WizardContent/WizardContent.js";
|
|
19
|
+
import { HvWizardTitle } from "./Wizard/WizardTitle/WizardTitle.js";
|
|
24
20
|
import { StickyNode } from "./Flow/nodes/StickyNode.js";
|
|
25
|
-
import {
|
|
21
|
+
import { staticClasses } from "./Blade/Blade.styles.js";
|
|
22
|
+
import { staticClasses as staticClasses2 } from "./Blades/Blades.styles.js";
|
|
23
|
+
import { staticClasses as staticClasses3 } from "./Dashboard/Dashboard.styles.js";
|
|
24
|
+
import { staticClasses as staticClasses4 } from "./Flow/Node/BaseNode.styles.js";
|
|
25
|
+
import { staticClasses as staticClasses5 } from "./Flow/Flow.styles.js";
|
|
26
|
+
import { staticClasses as staticClasses6 } from "./Flow/Minimap/Minimap.styles.js";
|
|
27
|
+
import { staticClasses as staticClasses7 } from "./Flow/Node/Node.styles.js";
|
|
28
|
+
import { staticClasses as staticClasses8 } from "./Flow/Sidebar/Sidebar.styles.js";
|
|
29
|
+
import { staticClasses as staticClasses9 } from "./Flow/nodes/DashboardNode.styles.js";
|
|
30
|
+
import { staticClasses as staticClasses10 } from "./StepNavigation/StepNavigation.styles.js";
|
|
26
31
|
import { useFlowContext } from "./Flow/hooks/useFlowContext.js";
|
|
27
|
-
import {
|
|
32
|
+
import { useFlowInputNodes, useFlowNode, useFlowNodeEdges, useFlowNodeInputEdges, useFlowNodeIntersections, useFlowNodeOutputEdges, useFlowNodeParents, useFlowNodeUtils, useFlowOutputNodes } from "./Flow/hooks/useFlowNode.js";
|
|
28
33
|
import { useFlowInstance } from "./Flow/hooks/useFlowInstance.js";
|
|
34
|
+
import { useFlowNodeMeta } from "./Flow/hooks/useFlowNodeMeta.js";
|
|
29
35
|
import { useHvNode } from "./Flow/hooks/useNode.js";
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { staticClasses as
|
|
33
|
-
import { HvWizard } from "./Wizard/Wizard.js";
|
|
34
|
-
import { staticClasses as staticClasses12 } from "./Wizard/WizardActions/WizardActions.styles.js";
|
|
35
|
-
import { HvWizardActions } from "./Wizard/WizardActions/WizardActions.js";
|
|
36
|
+
import { useNodeMetaRegistry } from "./Flow/FlowContext/NodeMetaContext.js";
|
|
37
|
+
import { staticClasses as staticClasses11 } from "./Wizard/WizardActions/WizardActions.styles.js";
|
|
38
|
+
import { staticClasses as staticClasses12 } from "./Wizard/Wizard.styles.js";
|
|
36
39
|
import { staticClasses as staticClasses13 } from "./Wizard/WizardContainer/WizardContainer.styles.js";
|
|
37
|
-
import { HvWizardContainer } from "./Wizard/WizardContainer/WizardContainer.js";
|
|
38
40
|
import { staticClasses as staticClasses14 } from "./Wizard/WizardContent/WizardContent.styles.js";
|
|
39
|
-
import { HvWizardContent } from "./Wizard/WizardContent/WizardContent.js";
|
|
40
41
|
import { staticClasses as staticClasses15 } from "./Wizard/WizardTitle/WizardTitle.styles.js";
|
|
41
|
-
import { HvWizardTitle } from "./Wizard/WizardTitle/WizardTitle.js";
|
|
42
42
|
export {
|
|
43
43
|
DEFAULT_LABELS,
|
|
44
44
|
HvBlade,
|
|
@@ -64,11 +64,11 @@ export {
|
|
|
64
64
|
staticClasses as bladeClasses,
|
|
65
65
|
staticClasses2 as bladesClasses,
|
|
66
66
|
staticClasses3 as dashboardClasses,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
staticClasses4 as flowBaseNodeClasses,
|
|
68
|
+
staticClasses5 as flowClasses,
|
|
69
|
+
staticClasses6 as flowMinimapClasses,
|
|
70
|
+
staticClasses7 as flowNodeClasses,
|
|
71
|
+
staticClasses8 as flowSidebarClasses,
|
|
72
72
|
staticClasses9 as hvDashboardNodeClasses,
|
|
73
73
|
staticClasses10 as stepNavigationClasses,
|
|
74
74
|
useFlowContext,
|
|
@@ -85,8 +85,8 @@ export {
|
|
|
85
85
|
useFlowOutputNodes,
|
|
86
86
|
useHvNode,
|
|
87
87
|
useNodeMetaRegistry,
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
staticClasses11 as wizardActionsClasses,
|
|
89
|
+
staticClasses12 as wizardClasses,
|
|
90
90
|
staticClasses13 as wizardContainerClasses,
|
|
91
91
|
staticClasses14 as wizardContentClasses,
|
|
92
92
|
staticClasses15 as wizardTitleClasses
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-lab",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Hitachi Vantara UI Kit Team",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@dnd-kit/core": "^6.1.0",
|
|
35
35
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
36
36
|
"@emotion/css": "^11.11.0",
|
|
37
|
-
"@hitachivantara/uikit-react-core": "^6.4.
|
|
37
|
+
"@hitachivantara/uikit-react-core": "^6.4.3",
|
|
38
38
|
"@hitachivantara/uikit-react-icons": "^6.0.2",
|
|
39
39
|
"@hitachivantara/uikit-react-utils": "^6.2.0",
|
|
40
40
|
"@hitachivantara/uikit-styles": "^6.0.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"access": "public",
|
|
54
54
|
"directory": "package"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "fe1e806628c08552c969d2b99d3d2e977be12b21",
|
|
57
57
|
"exports": {
|
|
58
58
|
".": {
|
|
59
59
|
"types": "./dist/index.d.ts",
|