@hitachivantara/uikit-react-lab 5.46.19 → 6.0.0-next.10

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.
Files changed (134) hide show
  1. package/dist/{esm/Flow → Flow}/Empty/Empty.styles.js +1 -1
  2. package/dist/{esm/Flow → Flow}/Node/Node.js +0 -3
  3. package/dist/{esm/Flow → Flow}/Sidebar/Sidebar.js +1 -1
  4. package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/DefaultNavigation.js +1 -3
  5. package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/SimpleNavigation.js +1 -3
  6. package/dist/{esm/StepNavigation → StepNavigation}/StepNavigation.js +2 -7
  7. package/dist/{esm/Wizard → Wizard}/WizardTitle/WizardTitle.js +31 -47
  8. package/dist/{esm/Wizard → Wizard}/WizardTitle/WizardTitle.styles.js +0 -10
  9. package/dist/{types/index.d.ts → index.d.ts} +11 -27
  10. package/package.json +14 -14
  11. package/dist/cjs/Blade/Blade.cjs +0 -174
  12. package/dist/cjs/Blade/Blade.styles.cjs +0 -71
  13. package/dist/cjs/Blades/Blades.cjs +0 -104
  14. package/dist/cjs/Blades/Blades.styles.cjs +0 -11
  15. package/dist/cjs/Dashboard/Dashboard.cjs +0 -63
  16. package/dist/cjs/Dashboard/Dashboard.styles.cjs +0 -196
  17. package/dist/cjs/Flow/Background/Background.cjs +0 -19
  18. package/dist/cjs/Flow/Controls/Controls.cjs +0 -96
  19. package/dist/cjs/Flow/DroppableFlow.cjs +0 -204
  20. package/dist/cjs/Flow/Empty/Empty.cjs +0 -12
  21. package/dist/cjs/Flow/Empty/Empty.styles.cjs +0 -16
  22. package/dist/cjs/Flow/Flow.cjs +0 -33
  23. package/dist/cjs/Flow/Flow.styles.cjs +0 -19
  24. package/dist/cjs/Flow/FlowContext/FlowContext.cjs +0 -25
  25. package/dist/cjs/Flow/FlowContext/NodeMetaContext.cjs +0 -43
  26. package/dist/cjs/Flow/Minimap/Minimap.cjs +0 -30
  27. package/dist/cjs/Flow/Minimap/Minimap.styles.cjs +0 -10
  28. package/dist/cjs/Flow/Node/BaseNode.cjs +0 -192
  29. package/dist/cjs/Flow/Node/BaseNode.styles.cjs +0 -135
  30. package/dist/cjs/Flow/Node/Node.cjs +0 -115
  31. package/dist/cjs/Flow/Node/Node.styles.cjs +0 -42
  32. package/dist/cjs/Flow/Node/Parameters/ParamRenderer.cjs +0 -19
  33. package/dist/cjs/Flow/Node/Parameters/Select.cjs +0 -41
  34. package/dist/cjs/Flow/Node/Parameters/Slider.cjs +0 -33
  35. package/dist/cjs/Flow/Node/Parameters/Text.cjs +0 -19
  36. package/dist/cjs/Flow/Node/utils.cjs +0 -54
  37. package/dist/cjs/Flow/Sidebar/Sidebar.cjs +0 -141
  38. package/dist/cjs/Flow/Sidebar/Sidebar.styles.cjs +0 -24
  39. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +0 -62
  40. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.styles.cjs +0 -34
  41. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +0 -51
  42. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +0 -35
  43. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.cjs +0 -23
  44. package/dist/cjs/Flow/base.cjs +0 -411
  45. package/dist/cjs/Flow/hooks/useFlowContext.cjs +0 -6
  46. package/dist/cjs/Flow/hooks/useFlowInstance.cjs +0 -7
  47. package/dist/cjs/Flow/hooks/useFlowNode.cjs +0 -134
  48. package/dist/cjs/Flow/hooks/useFlowNodeMeta.cjs +0 -10
  49. package/dist/cjs/Flow/hooks/useNode.cjs +0 -159
  50. package/dist/cjs/Flow/hooks/useNodeId.cjs +0 -8
  51. package/dist/cjs/Flow/nodes/DashboardNode.cjs +0 -88
  52. package/dist/cjs/Flow/nodes/DashboardNode.styles.cjs +0 -16
  53. package/dist/cjs/Flow/nodes/StickyNode.cjs +0 -441
  54. package/dist/cjs/StepNavigation/DefaultNavigation/DefaultNavigation.cjs +0 -56
  55. package/dist/cjs/StepNavigation/DefaultNavigation/Step/Step.cjs +0 -78
  56. package/dist/cjs/StepNavigation/DefaultNavigation/Step/Step.styles.cjs +0 -35
  57. package/dist/cjs/StepNavigation/DefaultNavigation/utils.cjs +0 -34
  58. package/dist/cjs/StepNavigation/SimpleNavigation/Dot/Dot.cjs +0 -43
  59. package/dist/cjs/StepNavigation/SimpleNavigation/Dot/Dot.styles.cjs +0 -18
  60. package/dist/cjs/StepNavigation/SimpleNavigation/SimpleNavigation.cjs +0 -52
  61. package/dist/cjs/StepNavigation/SimpleNavigation/utils.cjs +0 -13
  62. package/dist/cjs/StepNavigation/StepNavigation.cjs +0 -188
  63. package/dist/cjs/StepNavigation/StepNavigation.styles.cjs +0 -34
  64. package/dist/cjs/StepNavigation/utils.cjs +0 -8
  65. package/dist/cjs/Wizard/Wizard.cjs +0 -108
  66. package/dist/cjs/Wizard/Wizard.styles.cjs +0 -8
  67. package/dist/cjs/Wizard/WizardActions/WizardActions.cjs +0 -132
  68. package/dist/cjs/Wizard/WizardActions/WizardActions.styles.cjs +0 -22
  69. package/dist/cjs/Wizard/WizardContainer/WizardContainer.cjs +0 -31
  70. package/dist/cjs/Wizard/WizardContainer/WizardContainer.styles.cjs +0 -15
  71. package/dist/cjs/Wizard/WizardContent/WizardContent.cjs +0 -121
  72. package/dist/cjs/Wizard/WizardContent/WizardContent.styles.cjs +0 -38
  73. package/dist/cjs/Wizard/WizardContext/WizardContext.cjs +0 -15
  74. package/dist/cjs/Wizard/WizardTitle/WizardTitle.cjs +0 -97
  75. package/dist/cjs/Wizard/WizardTitle/WizardTitle.styles.cjs +0 -27
  76. package/dist/cjs/index.cjs +0 -93
  77. /package/dist/{esm/Blade → Blade}/Blade.js +0 -0
  78. /package/dist/{esm/Blade → Blade}/Blade.styles.js +0 -0
  79. /package/dist/{esm/Blades → Blades}/Blades.js +0 -0
  80. /package/dist/{esm/Blades → Blades}/Blades.styles.js +0 -0
  81. /package/dist/{esm/Dashboard → Dashboard}/Dashboard.js +0 -0
  82. /package/dist/{esm/Dashboard → Dashboard}/Dashboard.styles.js +0 -0
  83. /package/dist/{esm/Flow → Flow}/Background/Background.js +0 -0
  84. /package/dist/{esm/Flow → Flow}/Controls/Controls.js +0 -0
  85. /package/dist/{esm/Flow → Flow}/DroppableFlow.js +0 -0
  86. /package/dist/{esm/Flow → Flow}/Empty/Empty.js +0 -0
  87. /package/dist/{esm/Flow → Flow}/Flow.js +0 -0
  88. /package/dist/{esm/Flow → Flow}/Flow.styles.js +0 -0
  89. /package/dist/{esm/Flow → Flow}/FlowContext/FlowContext.js +0 -0
  90. /package/dist/{esm/Flow → Flow}/FlowContext/NodeMetaContext.js +0 -0
  91. /package/dist/{esm/Flow → Flow}/Minimap/Minimap.js +0 -0
  92. /package/dist/{esm/Flow → Flow}/Minimap/Minimap.styles.js +0 -0
  93. /package/dist/{esm/Flow → Flow}/Node/BaseNode.js +0 -0
  94. /package/dist/{esm/Flow → Flow}/Node/BaseNode.styles.js +0 -0
  95. /package/dist/{esm/Flow → Flow}/Node/Node.styles.js +0 -0
  96. /package/dist/{esm/Flow → Flow}/Node/Parameters/ParamRenderer.js +0 -0
  97. /package/dist/{esm/Flow → Flow}/Node/Parameters/Select.js +0 -0
  98. /package/dist/{esm/Flow → Flow}/Node/Parameters/Slider.js +0 -0
  99. /package/dist/{esm/Flow → Flow}/Node/Parameters/Text.js +0 -0
  100. /package/dist/{esm/Flow → Flow}/Node/utils.js +0 -0
  101. /package/dist/{esm/Flow → Flow}/Sidebar/Sidebar.styles.js +0 -0
  102. /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroup.js +0 -0
  103. /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroup.styles.js +0 -0
  104. /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +0 -0
  105. /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +0 -0
  106. /package/dist/{esm/Flow → Flow}/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.styles.js +0 -0
  107. /package/dist/{esm/Flow → Flow}/base.js +0 -0
  108. /package/dist/{esm/Flow → Flow}/hooks/useFlowContext.js +0 -0
  109. /package/dist/{esm/Flow → Flow}/hooks/useFlowInstance.js +0 -0
  110. /package/dist/{esm/Flow → Flow}/hooks/useFlowNode.js +0 -0
  111. /package/dist/{esm/Flow → Flow}/hooks/useFlowNodeMeta.js +0 -0
  112. /package/dist/{esm/Flow → Flow}/hooks/useNode.js +0 -0
  113. /package/dist/{esm/Flow → Flow}/hooks/useNodeId.js +0 -0
  114. /package/dist/{esm/Flow → Flow}/nodes/DashboardNode.js +0 -0
  115. /package/dist/{esm/Flow → Flow}/nodes/DashboardNode.styles.js +0 -0
  116. /package/dist/{esm/Flow → Flow}/nodes/StickyNode.js +0 -0
  117. /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/Step/Step.js +0 -0
  118. /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/Step/Step.styles.js +0 -0
  119. /package/dist/{esm/StepNavigation → StepNavigation}/DefaultNavigation/utils.js +0 -0
  120. /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/Dot/Dot.js +0 -0
  121. /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/Dot/Dot.styles.js +0 -0
  122. /package/dist/{esm/StepNavigation → StepNavigation}/SimpleNavigation/utils.js +0 -0
  123. /package/dist/{esm/StepNavigation → StepNavigation}/StepNavigation.styles.js +0 -0
  124. /package/dist/{esm/StepNavigation → StepNavigation}/utils.js +0 -0
  125. /package/dist/{esm/Wizard → Wizard}/Wizard.js +0 -0
  126. /package/dist/{esm/Wizard → Wizard}/Wizard.styles.js +0 -0
  127. /package/dist/{esm/Wizard → Wizard}/WizardActions/WizardActions.js +0 -0
  128. /package/dist/{esm/Wizard → Wizard}/WizardActions/WizardActions.styles.js +0 -0
  129. /package/dist/{esm/Wizard → Wizard}/WizardContainer/WizardContainer.js +0 -0
  130. /package/dist/{esm/Wizard → Wizard}/WizardContainer/WizardContainer.styles.js +0 -0
  131. /package/dist/{esm/Wizard → Wizard}/WizardContent/WizardContent.js +0 -0
  132. /package/dist/{esm/Wizard → Wizard}/WizardContent/WizardContent.styles.js +0 -0
  133. /package/dist/{esm/Wizard → Wizard}/WizardContext/WizardContext.js +0 -0
  134. /package/dist/{esm/index.js → index.js} +0 -0
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const reactflow = require("reactflow");
5
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
6
- const Empty_styles = require("./Empty.styles.cjs");
7
- const HvFlowEmpty = ({ className, ...others }) => {
8
- const { classes, cx } = Empty_styles.useClasses();
9
- const nodes = reactflow.useNodes();
10
- return !nodes || (nodes.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvEmptyState, { className: cx(classes.root, className), ...others }) : null);
11
- };
12
- exports.HvFlowEmpty = HvFlowEmpty;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
- const { staticClasses, useClasses } = uikitReactCore.createClasses("HvFlowEmpty", {
5
- root: {
6
- width: "100%",
7
- height: "100%",
8
- alignItems: "center",
9
- justifyContent: "center",
10
- backgroundColor: uikitReactCore.theme.colors.backgroundColor,
11
- position: "absolute",
12
- zIndex: uikitReactCore.theme.zIndices.popover
13
- }
14
- });
15
- exports.staticClasses = staticClasses;
16
- exports.useClasses = useClasses;
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const core = require("@dnd-kit/core");
5
- const modifiers = require("@dnd-kit/modifiers");
6
- const reactflow = require("reactflow");
7
- const DroppableFlow = require("./DroppableFlow.cjs");
8
- const FlowContext = require("./FlowContext/FlowContext.cjs");
9
- const HvFlow = ({
10
- nodeGroups,
11
- sidebar,
12
- defaultActions,
13
- dndContextProps,
14
- ...others
15
- }) => {
16
- const sensors = core.useSensors(
17
- core.useSensor(core.PointerSensor),
18
- core.useSensor(core.KeyboardSensor)
19
- );
20
- return /* @__PURE__ */ jsxRuntime.jsx(reactflow.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FlowContext.HvFlowProvider, { nodeGroups, defaultActions, children: /* @__PURE__ */ jsxRuntime.jsxs(
21
- core.DndContext,
22
- {
23
- sensors,
24
- modifiers: [modifiers.restrictToWindowEdges],
25
- ...dndContextProps,
26
- children: [
27
- /* @__PURE__ */ jsxRuntime.jsx(DroppableFlow.HvDroppableFlow, { ...others }),
28
- sidebar
29
- ]
30
- }
31
- ) }) });
32
- };
33
- exports.HvFlow = HvFlow;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
- const BaseNode_styles = require("./Node/BaseNode.styles.cjs");
5
- require("react/jsx-runtime");
6
- require("reactflow");
7
- require("@hitachivantara/uikit-react-utils");
8
- const { staticClasses, useClasses } = uikitReactCore.createClasses("HvFlow", {
9
- root: {
10
- height: "100%",
11
- [`& .selected > .${BaseNode_styles.staticClasses.root}`]: {
12
- border: `1px solid ${uikitReactCore.theme.colors.textDisabled}`,
13
- borderRadius: uikitReactCore.theme.radii.round,
14
- boxSizing: "border-box"
15
- }
16
- }
17
- });
18
- exports.staticClasses = staticClasses;
19
- exports.useClasses = useClasses;
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const react = require("react");
5
- const NodeMetaContext = require("./NodeMetaContext.cjs");
6
- const HvFlowContext = react.createContext({});
7
- const HvFlowProvider = ({
8
- nodeGroups,
9
- defaultActions,
10
- children
11
- }) => {
12
- const [expandedNodeGroups, setExpandedNodeGroups] = react.useState([]);
13
- const value = react.useMemo(
14
- () => ({
15
- nodeGroups,
16
- defaultActions,
17
- expandedNodeGroups,
18
- setExpandedNodeGroups
19
- }),
20
- [nodeGroups, defaultActions, expandedNodeGroups]
21
- );
22
- return /* @__PURE__ */ jsxRuntime.jsx(NodeMetaContext.HvFlowNodeMetaProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(HvFlowContext.Provider, { value, children }) });
23
- };
24
- exports.HvFlowContext = HvFlowContext;
25
- exports.HvFlowProvider = HvFlowProvider;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const react = require("react");
5
- const HvFlowNodeMetaContext = react.createContext(void 0);
6
- const HvFlowNodeMetaProvider = ({
7
- children
8
- }) => {
9
- const registryRef = react.useRef({});
10
- const registerNode = react.useCallback((id, nodeInfo) => {
11
- registryRef.current[id] = nodeInfo;
12
- }, []);
13
- const unregisterNode = react.useCallback((id) => {
14
- delete registryRef.current[id];
15
- }, []);
16
- const getRegistry = react.useCallback(() => {
17
- return registryRef.current;
18
- }, []);
19
- const value = react.useMemo(
20
- () => ({
21
- registerNode,
22
- unregisterNode,
23
- getRegistry
24
- }),
25
- [registerNode, unregisterNode, getRegistry]
26
- );
27
- return /* @__PURE__ */ jsxRuntime.jsx(HvFlowNodeMetaContext.Provider, { value, children });
28
- };
29
- function useNodeMetaRegistry() {
30
- const context = react.useContext(HvFlowNodeMetaContext);
31
- if (context === void 0) {
32
- throw new Error(
33
- "useNodeRegistry must be used within a HvFlowNodeMetaProvider"
34
- );
35
- }
36
- return {
37
- registerNode: context.registerNode,
38
- unregisterNode: context.unregisterNode,
39
- registry: context.getRegistry()
40
- };
41
- }
42
- exports.HvFlowNodeMetaProvider = HvFlowNodeMetaProvider;
43
- exports.useNodeMetaRegistry = useNodeMetaRegistry;
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const reactflow = require("reactflow");
5
- const uikitStyles = require("@hitachivantara/uikit-styles");
6
- const Minimap_styles = require("./Minimap.styles.cjs");
7
- const HvFlowMinimap = ({
8
- nodeColor = "border",
9
- maskColor = "borderSubtle",
10
- maskStrokeColor = "borderSubtle",
11
- nodeStrokeColor = "border",
12
- classes: classesProp,
13
- className,
14
- ...others
15
- }) => {
16
- const { classes, cx } = Minimap_styles.useClasses(classesProp);
17
- return /* @__PURE__ */ jsxRuntime.jsx(
18
- reactflow.MiniMap,
19
- {
20
- className: cx(classes.root, className),
21
- nodeColor: typeof nodeColor === "string" ? uikitStyles.getColor(nodeColor, "border") : nodeColor,
22
- nodeStrokeColor: typeof nodeStrokeColor === "string" ? uikitStyles.getColor(nodeStrokeColor, "border") : nodeStrokeColor,
23
- maskColor: uikitStyles.getColor(maskColor, "borderSubtle"),
24
- maskStrokeColor: uikitStyles.getColor(maskStrokeColor, "borderSubtle"),
25
- ...others
26
- }
27
- );
28
- };
29
- exports.flowMinimapClasses = Minimap_styles.staticClasses;
30
- exports.HvFlowMinimap = HvFlowMinimap;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
- const { staticClasses, useClasses } = uikitReactCore.createClasses("HvFlowMinimap", {
5
- root: {
6
- "&.react-flow__minimap": { backgroundColor: uikitReactCore.theme.colors.bgPage }
7
- }
8
- });
9
- exports.staticClasses = staticClasses;
10
- exports.useClasses = useClasses;
@@ -1,192 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const reactflow = require("reactflow");
5
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
6
- const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
7
- const BaseNode_styles = require("./BaseNode.styles.cjs");
8
- const utils = require("./utils.cjs");
9
- const useNode = require("../hooks/useNode.cjs");
10
- const DEFAULT_LABELS = {
11
- outputsTitle: "Outputs",
12
- inputsTitle: "Inputs",
13
- deleteActionLabel: "Delete",
14
- duplicateActionLabel: "Duplicate"
15
- };
16
- const HvFlowBaseNode = ({
17
- id,
18
- title: titleProp,
19
- headerItems,
20
- icon: iconProp,
21
- color: colorProp,
22
- inputs: inputsProp,
23
- outputs: outputsProp,
24
- nodeActions: nodeActionsProp,
25
- footer,
26
- classes: classesProp,
27
- labels: labelsProp,
28
- className,
29
- children
30
- }) => {
31
- const {
32
- toggleShowActions,
33
- getNodeToolbarProps,
34
- handleDefaultAction,
35
- nodeActions,
36
- title,
37
- icon,
38
- color,
39
- iconColor,
40
- inputEdges,
41
- inputs,
42
- outputEdges,
43
- outputs,
44
- node
45
- } = useNode.useHvNode({
46
- id,
47
- title: titleProp,
48
- inputs: inputsProp,
49
- outputs: outputsProp,
50
- icon: iconProp,
51
- color: colorProp,
52
- labels: labelsProp,
53
- nodeActions: nodeActionsProp
54
- });
55
- const labels = uikitReactCore.useLabels(DEFAULT_LABELS, labelsProp);
56
- const { classes, cx } = BaseNode_styles.useClasses(classesProp);
57
- const renderOutput = (output) => {
58
- const edgeConnected = utils.isConnected(id, "source", output.id, outputEdges);
59
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.outputContainer, children: [
60
- /* @__PURE__ */ jsxRuntime.jsx(
61
- reactflow.Handle,
62
- {
63
- type: "source",
64
- isConnectableEnd: false,
65
- id: output.id,
66
- position: reactflow.Position.Right,
67
- className: cx(classes.handle, {
68
- [classes.handleConnected]: edgeConnected
69
- })
70
- }
71
- ),
72
- output.isMandatory && !edgeConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.mandatory }),
73
- /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { component: "div", children: output.label })
74
- ] }, output.id);
75
- };
76
- const renderInput = (input) => {
77
- const edgeConnected = utils.isConnected(id, "target", input.id, inputEdges);
78
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.inputContainer, children: [
79
- /* @__PURE__ */ jsxRuntime.jsx(
80
- reactflow.Handle,
81
- {
82
- type: "target",
83
- isConnectableStart: false,
84
- id: input.id,
85
- position: reactflow.Position.Left,
86
- className: cx(classes.handle, {
87
- [classes.handleConnected]: edgeConnected
88
- })
89
- }
90
- ),
91
- /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { component: "div", children: input.label }),
92
- input.isMandatory && !edgeConnected && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.mandatory })
93
- ] }, input.id);
94
- };
95
- if (!node) return null;
96
- return /* @__PURE__ */ jsxRuntime.jsxs(
97
- "div",
98
- {
99
- style: uikitReactUtils.mergeStyles(void 0, {
100
- "--node-color": color
101
- }),
102
- className: cx(
103
- "nowheel",
104
- // Disables the default canvas pan behaviour when scrolling inside the node
105
- classes.root,
106
- className
107
- ),
108
- onMouseEnter: toggleShowActions,
109
- onMouseLeave: toggleShowActions,
110
- children: [
111
- /* @__PURE__ */ jsxRuntime.jsx(reactflow.NodeToolbar, { ...getNodeToolbarProps(), children: nodeActions?.map((action) => /* @__PURE__ */ jsxRuntime.jsx(
112
- uikitReactCore.HvIconButton,
113
- {
114
- title: action.label,
115
- onClick: () => handleDefaultAction(action),
116
- children: utils.renderedIcon(action.icon)
117
- },
118
- action.id
119
- )) }),
120
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.headerContainer, children: [
121
- /* @__PURE__ */ jsxRuntime.jsxs(
122
- "div",
123
- {
124
- style: uikitReactUtils.mergeStyles(void 0, {
125
- "--icon-color": iconColor
126
- }),
127
- className: classes.titleContainer,
128
- children: [
129
- icon,
130
- /* @__PURE__ */ jsxRuntime.jsx(
131
- uikitReactCore.HvTypography,
132
- {
133
- component: "p",
134
- variant: "title4",
135
- className: classes.title,
136
- children: title
137
- }
138
- )
139
- ]
140
- }
141
- ),
142
- headerItems && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex" }, children: headerItems })
143
- ] }),
144
- children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.contentContainer, children }),
145
- inputs && inputs.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
146
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.inputsTitleContainer, children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { children: labels?.inputsTitle }) }),
147
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.inputsContainer, children: inputs?.map((input, idx) => {
148
- if (!utils.isInputGroup(input)) return renderInput(input);
149
- return /* @__PURE__ */ jsxRuntime.jsxs(
150
- "div",
151
- {
152
- className: classes.inputGroupContainer,
153
- children: [
154
- /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { component: "div", variant: "label", children: input.label }),
155
- input.inputs.map(
156
- (inp) => renderInput(inp)
157
- )
158
- ]
159
- },
160
- `group${idx}`
161
- );
162
- }) })
163
- ] }),
164
- outputs && outputs.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
165
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.outputsTitleContainer, children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { children: labels?.outputsTitle }) }),
166
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.outputsContainer, children: outputs?.map((output, idx) => {
167
- if (!utils.isOutputGroup(output)) {
168
- return renderOutput(output);
169
- }
170
- return /* @__PURE__ */ jsxRuntime.jsxs(
171
- "div",
172
- {
173
- className: classes.outputGroupContainer,
174
- children: [
175
- /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { component: "div", variant: "label", children: output.label }),
176
- output.outputs.map((out) => {
177
- return renderOutput(out);
178
- })
179
- ]
180
- },
181
- `group${idx}`
182
- );
183
- }) })
184
- ] }),
185
- footer && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.footerContainer, children: footer })
186
- ]
187
- }
188
- );
189
- };
190
- exports.flowBaseNodeClasses = BaseNode_styles.staticClasses;
191
- exports.DEFAULT_LABELS = DEFAULT_LABELS;
192
- exports.HvFlowBaseNode = HvFlowBaseNode;
@@ -1,135 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
- const { staticClasses, useClasses } = uikitReactCore.createClasses("HvFlowBaseNode", {
5
- root: {
6
- borderRadius: uikitReactCore.theme.radii.round,
7
- backgroundColor: uikitReactCore.theme.colors.bgContainer,
8
- boxShadow: uikitReactCore.theme.colors.shadow,
9
- minWidth: "250px",
10
- border: "1px solid var(--node-color)"
11
- },
12
- headerContainer: {
13
- padding: uikitReactCore.theme.spacing(0.5, 1),
14
- display: "flex",
15
- flexDirection: "row",
16
- justifyContent: "space-between",
17
- alignItems: "center",
18
- borderTopLeftRadius: "inherit",
19
- borderTopRightRadius: "inherit",
20
- backgroundColor: "var(--node-color)"
21
- },
22
- titleContainer: {
23
- display: "flex",
24
- flexDirection: "row",
25
- alignItems: "center",
26
- "& svg *.color0": { fill: "var(--icon-color)" }
27
- },
28
- title: {
29
- color: uikitReactCore.theme.colors.textDark
30
- },
31
- inputsTitleContainer: {
32
- display: "flex",
33
- justifyContent: "center",
34
- padding: uikitReactCore.theme.space.xs,
35
- backgroundColor: uikitReactCore.theme.colors.bgPage,
36
- borderTop: `1px solid ${uikitReactCore.theme.colors.borderSubtle}`,
37
- borderBottom: `1px solid ${uikitReactCore.theme.colors.borderSubtle}`
38
- },
39
- outputsTitleContainer: {
40
- display: "flex",
41
- justifyContent: "center",
42
- padding: uikitReactCore.theme.space.xs,
43
- backgroundColor: uikitReactCore.theme.colors.bgPage,
44
- borderTop: `1px solid ${uikitReactCore.theme.colors.borderSubtle}`,
45
- borderBottom: `1px solid ${uikitReactCore.theme.colors.borderSubtle}`
46
- },
47
- contentContainer: {},
48
- inputsContainer: {
49
- display: "flex",
50
- flexDirection: "column",
51
- padding: uikitReactCore.theme.space.sm,
52
- gap: uikitReactCore.theme.space.xs,
53
- alignItems: "flex-start"
54
- },
55
- outputsContainer: {
56
- display: "flex",
57
- flexDirection: "column",
58
- padding: uikitReactCore.theme.space.sm,
59
- gap: uikitReactCore.theme.space.xs,
60
- alignItems: "flex-end"
61
- },
62
- inputGroupContainer: {
63
- display: "flex",
64
- flexDirection: "column",
65
- gap: uikitReactCore.theme.space.xs,
66
- alignItems: "flex-start"
67
- },
68
- outputGroupContainer: {
69
- display: "flex",
70
- flexDirection: "column",
71
- gap: uikitReactCore.theme.space.xs,
72
- alignItems: "flex-end"
73
- },
74
- inputContainer: {
75
- display: "flex",
76
- flexDirection: "row",
77
- alignItems: "center",
78
- position: "relative"
79
- },
80
- outputContainer: {
81
- display: "flex",
82
- flexDirection: "row",
83
- alignItems: "center",
84
- position: "relative"
85
- },
86
- handle: {
87
- zIndex: uikitReactCore.theme.zIndices.overlay,
88
- marginLeft: 2,
89
- backgroundColor: uikitReactCore.theme.colors.bgContainer,
90
- height: 10,
91
- width: 10,
92
- border: `1px solid ${uikitReactCore.theme.colors.textDisabled}`,
93
- "&.react-flow__handle-left": {
94
- left: -23
95
- },
96
- "&.react-flow__handle-right": {
97
- right: -21
98
- },
99
- "&.react-flow__handle-connecting": {
100
- backgroundColor: uikitReactCore.theme.colors.negativeDimmed
101
- },
102
- "&.react-flow__handle-valid": {
103
- backgroundColor: uikitReactCore.theme.colors.positiveDimmed
104
- },
105
- "::before": {
106
- fontSize: 14,
107
- color: uikitReactCore.theme.colors.textDisabled,
108
- content: '"+"',
109
- marginTop: -7,
110
- position: "absolute"
111
- }
112
- },
113
- handleConnected: {
114
- backgroundColor: uikitReactCore.theme.colors.textDisabled,
115
- width: 8,
116
- height: 8,
117
- "::before": {
118
- fontSize: 11,
119
- marginTop: -8
120
- }
121
- },
122
- mandatory: {
123
- width: 10,
124
- height: 10,
125
- margin: uikitReactCore.theme.spacing(0, uikitReactCore.theme.space.xs),
126
- borderRadius: uikitReactCore.theme.radii.full,
127
- backgroundColor: uikitReactCore.theme.colors.negativeDimmed
128
- },
129
- footerContainer: {
130
- padding: uikitReactCore.theme.space.sm,
131
- borderTop: `1px solid ${uikitReactCore.theme.colors.borderSubtle}`
132
- }
133
- });
134
- exports.staticClasses = staticClasses;
135
- exports.useClasses = useClasses;
@@ -1,115 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const react = require("react");
5
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
6
- const uikitReactIcons = require("@hitachivantara/uikit-react-icons");
7
- const BaseNode = require("./BaseNode.cjs");
8
- const Node_styles = require("./Node.styles.cjs");
9
- const useFlowNode = require("../hooks/useFlowNode.cjs");
10
- const ParamRenderer = require("./Parameters/ParamRenderer.cjs");
11
- const useFlowContext = require("../hooks/useFlowContext.cjs");
12
- const DEFAULT_LABELS = {
13
- collapseLabel: "Collapse",
14
- expandLabel: "Expand"
15
- };
16
- const HvFlowNode = ({
17
- id,
18
- type,
19
- headerItems,
20
- actions,
21
- actionCallback,
22
- // TODO - remove in v6
23
- onAction,
24
- maxVisibleActions = 1,
25
- expanded = false,
26
- actionsIconOnly = true,
27
- params,
28
- classes: classesProp,
29
- labels: labelsProps,
30
- children,
31
- expandParamsButtonProps,
32
- disableInlineEdit,
33
- title: titleProp,
34
- subtitle: subtitleProp,
35
- description,
36
- groupId,
37
- color: colorProp,
38
- icon: iconProp,
39
- ...props
40
- }) => {
41
- const { classes } = Node_styles.useClasses(classesProp);
42
- const [showParams, setShowParams] = react.useState(expanded);
43
- const { nodeGroups, defaultActions } = useFlowContext.useFlowContext();
44
- const labels = uikitReactCore.useLabels(DEFAULT_LABELS, labelsProps);
45
- const node = useFlowNode.useFlowNode();
46
- const { setNodeData } = useFlowNode.useFlowNodeUtils();
47
- const inlineEditorWidth = actions === void 0 || Array.isArray(actions) && actions.length === 0 || maxVisibleActions === 0 ? "100%" : `calc(200px - calc(${maxVisibleActions} * 32px + ${uikitReactCore.theme.spacing(2)}))`;
48
- const nodeGroup = groupId && nodeGroups && nodeGroups[groupId] || void 0;
49
- const title = titleProp || nodeGroup?.label;
50
- const icon = iconProp || nodeGroup?.icon;
51
- const color = colorProp || nodeGroup?.color;
52
- const subtitle = subtitleProp || node?.data.nodeLabel;
53
- const hasParams = !!(params && params.length > 0);
54
- return /* @__PURE__ */ jsxRuntime.jsxs(
55
- BaseNode.HvFlowBaseNode,
56
- {
57
- id,
58
- type,
59
- title,
60
- icon,
61
- color,
62
- nodeActions: defaultActions,
63
- classes,
64
- headerItems: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
65
- headerItems,
66
- description && /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTooltip, { title: description, children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.Info, { color: "textDark" }) }),
67
- hasParams && /* @__PURE__ */ jsxRuntime.jsx(
68
- uikitReactCore.HvButton,
69
- {
70
- icon: true,
71
- onClick: () => setShowParams((p) => !p),
72
- "aria-label": showParams ? labels?.collapseLabel : labels?.expandLabel,
73
- ...expandParamsButtonProps,
74
- children: /* @__PURE__ */ jsxRuntime.jsx(uikitReactIcons.DropDownXS, { rotate: showParams, color: "textDark" })
75
- }
76
- )
77
- ] }),
78
- labels,
79
- ...props,
80
- children: [
81
- (subtitle || actions) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classes.subtitleContainer, children: [
82
- subtitle && (disableInlineEdit ? /* @__PURE__ */ jsxRuntime.jsx(uikitReactCore.HvTypography, { className: classes.subtitle, children: subtitle }) : /* @__PURE__ */ jsxRuntime.jsx(
83
- uikitReactCore.HvInlineEditor,
84
- {
85
- defaultValue: subtitle,
86
- showIcon: true,
87
- style: { width: inlineEditorWidth },
88
- classes: {
89
- root: classes.inlineEditRoot,
90
- button: classes.inlineEditButton
91
- },
92
- onBlur: (evt, value) => setNodeData((prev) => ({ ...prev, nodeLabel: value }))
93
- }
94
- )),
95
- actions && /* @__PURE__ */ jsxRuntime.jsx(
96
- uikitReactCore.HvActionsGeneric,
97
- {
98
- className: classes.actions,
99
- classes: { button: classes.actionsButton },
100
- actions,
101
- actionsCallback: actionCallback,
102
- onAction,
103
- maxVisibleActions,
104
- iconOnly: actionsIconOnly
105
- }
106
- )
107
- ] }),
108
- children,
109
- showParams && params && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classes.paramsContainer, children: /* @__PURE__ */ jsxRuntime.jsx(ParamRenderer.ParamRenderer, { params, data: node?.data }) })
110
- ]
111
- }
112
- );
113
- };
114
- exports.flowNodeClasses = Node_styles.staticClasses;
115
- exports.HvFlowNode = HvFlowNode;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const uikitReactCore = require("@hitachivantara/uikit-react-core");
4
- const BaseNode_styles = require("./BaseNode.styles.cjs");
5
- const baseClasses = Object.fromEntries(
6
- Object.keys(BaseNode_styles.staticClasses).map((key) => [key, {}])
7
- );
8
- const { staticClasses, useClasses } = uikitReactCore.createClasses("HvFlowNode", {
9
- subtitleContainer: {
10
- minHeight: 48,
11
- padding: uikitReactCore.theme.spacing("xs"),
12
- display: "flex",
13
- flexDirection: "row",
14
- justifyContent: "space-between",
15
- alignItems: "center"
16
- },
17
- subtitle: {
18
- paddingLeft: uikitReactCore.theme.spacing("xs")
19
- },
20
- inlineEditRoot: {
21
- display: "inline-flex",
22
- flexGrow: 1
23
- },
24
- inlineEditButton: {
25
- justifyContent: "space-between"
26
- },
27
- actions: {},
28
- actionsButton: {
29
- gap: 0
30
- },
31
- paramsContainer: {
32
- borderTop: `1px solid ${uikitReactCore.theme.colors.border}`,
33
- display: "flex",
34
- flexDirection: "column",
35
- gap: uikitReactCore.theme.space.xs,
36
- padding: uikitReactCore.theme.space.sm
37
- },
38
- // Spread here to know if we are overriding classes from parents
39
- ...baseClasses
40
- });
41
- exports.staticClasses = staticClasses;
42
- exports.useClasses = useClasses;