@hitachivantara/uikit-react-lab 5.10.0 → 5.11.1

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 (60) hide show
  1. package/dist/cjs/components/Flow/DroppableFlow.cjs +49 -65
  2. package/dist/cjs/components/Flow/DroppableFlow.cjs.map +1 -1
  3. package/dist/cjs/components/Flow/Empty/Empty.cjs +19 -0
  4. package/dist/cjs/components/Flow/Empty/Empty.cjs.map +1 -0
  5. package/dist/cjs/components/Flow/Empty/Empty.styles.cjs +20 -0
  6. package/dist/cjs/components/Flow/Empty/Empty.styles.cjs.map +1 -0
  7. package/dist/cjs/components/Flow/Flow.cjs +2 -15
  8. package/dist/cjs/components/Flow/Flow.cjs.map +1 -1
  9. package/dist/cjs/components/Flow/Flow.styles.cjs +2 -2
  10. package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs +0 -2
  11. package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs.map +1 -1
  12. package/dist/cjs/components/Flow/Node/Node.cjs +6 -6
  13. package/dist/cjs/components/Flow/Node/Node.cjs.map +1 -1
  14. package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs +40 -21
  15. package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs.map +1 -1
  16. package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +3 -3
  17. package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs.map +1 -1
  18. package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +12 -4
  19. package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs.map +1 -1
  20. package/dist/cjs/components/Flow/Sidebar/utils.cjs +4 -3
  21. package/dist/cjs/components/Flow/Sidebar/utils.cjs.map +1 -1
  22. package/dist/cjs/components/Flow/base.cjs +16 -0
  23. package/dist/cjs/components/Flow/base.cjs.map +1 -0
  24. package/dist/cjs/components/Flow/hooks/useFlowContext.cjs +7 -0
  25. package/dist/cjs/components/Flow/hooks/useFlowContext.cjs.map +1 -0
  26. package/dist/cjs/components/Flow/hooks/useFlowNode.cjs +25 -0
  27. package/dist/cjs/components/Flow/hooks/useFlowNode.cjs.map +1 -0
  28. package/dist/cjs/index.cjs +6 -0
  29. package/dist/cjs/index.cjs.map +1 -1
  30. package/dist/esm/components/Flow/DroppableFlow.js +49 -65
  31. package/dist/esm/components/Flow/DroppableFlow.js.map +1 -1
  32. package/dist/esm/components/Flow/Empty/Empty.js +19 -0
  33. package/dist/esm/components/Flow/Empty/Empty.js.map +1 -0
  34. package/dist/esm/components/Flow/Empty/Empty.styles.js +20 -0
  35. package/dist/esm/components/Flow/Empty/Empty.styles.js.map +1 -0
  36. package/dist/esm/components/Flow/Flow.js +3 -16
  37. package/dist/esm/components/Flow/Flow.js.map +1 -1
  38. package/dist/esm/components/Flow/Flow.styles.js +2 -2
  39. package/dist/esm/components/Flow/FlowContext/FlowContext.js +2 -4
  40. package/dist/esm/components/Flow/FlowContext/FlowContext.js.map +1 -1
  41. package/dist/esm/components/Flow/Node/Node.js +5 -5
  42. package/dist/esm/components/Flow/Node/Node.js.map +1 -1
  43. package/dist/esm/components/Flow/Sidebar/Sidebar.js +41 -22
  44. package/dist/esm/components/Flow/Sidebar/Sidebar.js.map +1 -1
  45. package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js +2 -2
  46. package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js.map +1 -1
  47. package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +12 -4
  48. package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js.map +1 -1
  49. package/dist/esm/components/Flow/Sidebar/utils.js +4 -3
  50. package/dist/esm/components/Flow/Sidebar/utils.js.map +1 -1
  51. package/dist/esm/components/Flow/base.js +16 -0
  52. package/dist/esm/components/Flow/base.js.map +1 -0
  53. package/dist/esm/components/Flow/hooks/useFlowContext.js +7 -0
  54. package/dist/esm/components/Flow/hooks/useFlowContext.js.map +1 -0
  55. package/dist/esm/components/Flow/hooks/useFlowNode.js +25 -0
  56. package/dist/esm/components/Flow/hooks/useFlowNode.js.map +1 -0
  57. package/dist/esm/index.js +6 -0
  58. package/dist/esm/index.js.map +1 -1
  59. package/dist/types/index.d.ts +39 -16
  60. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.js","sources":["../../../../../src/components/Flow/Sidebar/Sidebar.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nimport debounce from \"lodash/debounce\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport {\n ExtractNames,\n HvDrawer,\n HvDrawerProps,\n HvInput,\n HvInputProps,\n HvTypography,\n useLabels,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Add } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./Sidebar.styles\";\nimport { HvFlowSidebarGroup } from \"./SidebarGroup\";\nimport { useFlowContext } from \"../FlowContext\";\nimport { buildGroups } from \"./utils\";\n\nexport { staticClasses as flowSidebarClasses };\n\nexport type HvFlowSidebarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarProps\n extends Omit<HvDrawerProps, \"classes\" | \"title\"> {\n /** Sidebar title. */\n title?: string;\n /** Sidebar description. */\n description?: string;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarClasses;\n /** Labels used on the sidebar. */\n labels?: {\n itemAriaRoleDescription?: string;\n expandGroupButtonAriaLabel?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n };\n}\n\nconst DEFAULT_LABELS: HvFlowSidebarProps[\"labels\"] = {\n itemAriaRoleDescription: \"Draggable\",\n expandGroupButtonAriaLabel: \"Expand group\",\n searchPlaceholder: \"Search node...\",\n searchAriaLabel: \"Search node...\",\n};\n\nexport const HvFlowSidebar = ({\n id,\n title,\n description,\n anchor = \"right\",\n buttonTitle = \"Close\",\n classes: classesProp,\n labels: labelsProps,\n ...others\n}: HvFlowSidebarProps) => {\n const { classes } = useClasses(classesProp);\n\n const { nodeGroups, nodeTypes, setExpandedNodeGroups } = useFlowContext();\n\n const unfilteredGroups = useMemo(\n () => buildGroups(nodeGroups, nodeTypes),\n [nodeGroups, nodeTypes]\n );\n\n const [groups, setGroups] = useState(unfilteredGroups);\n\n const labels = useLabels(DEFAULT_LABELS, labelsProps);\n\n const drawerElementId = useUniqueId(id, \"hvFlowSidebarDrawer\");\n const groupsElementId = useUniqueId(id, \"hvFlowSidebarGroups\");\n\n // The sidebar is droppable to distinguish between the canvas and the sidebar\n // Otherwise items dropped inside the sidebar will be added to the canvas\n const { setNodeRef } = useDroppable({\n id: drawerElementId,\n });\n\n const handleSearch: HvInputProps[\"onChange\"] = (event, value) => {\n const gps = value\n ? Object.entries(unfilteredGroups).reduce((acc, curr) => {\n // Filter nodes by search\n const filteredNodes = curr[1].nodes.filter((obj) =>\n obj.label.toLocaleLowerCase().includes(value.toLocaleLowerCase())\n );\n const nodesCount = filteredNodes.length;\n\n // Only show groups with nodes\n if (nodesCount > 0) {\n acc[curr[0]] = {\n ...curr[1],\n nodes: filteredNodes,\n };\n }\n\n return acc;\n }, {})\n : unfilteredGroups;\n\n setGroups(gps);\n setExpandedNodeGroups?.(value ? Object.keys(gps) : []);\n };\n\n const handleDebouncedSearch = debounce(handleSearch, 500);\n\n return (\n <HvDrawer\n BackdropComponent={undefined}\n variant=\"persistent\"\n classes={{\n paper: classes.drawerPaper,\n }}\n anchor={anchor}\n buttonTitle={buttonTitle}\n {...others}\n >\n <div id={drawerElementId} ref={setNodeRef}>\n <div className={classes.titleContainer}>\n <Add role=\"none\" />\n <HvTypography variant=\"title3\">{title}</HvTypography>\n </div>\n <div className={classes.contentContainer}>\n <HvTypography className={classes.description}>\n {description}\n </HvTypography>\n <HvInput\n className={classes.searchRoot}\n type=\"search\"\n placeholder={labels?.searchPlaceholder}\n aria-label={labels?.searchAriaLabel}\n aria-controls={groupsElementId}\n aria-owns={groupsElementId}\n onChange={handleDebouncedSearch}\n inputProps={{ autoComplete: \"off\" }}\n />\n <ul id={groupsElementId} className={classes.groupsContainer}>\n {Object.entries(groups).map((obj) => (\n <HvFlowSidebarGroup\n key={obj[0]}\n id={obj[0]}\n expandButtonProps={{\n \"aria-label\": labels?.expandGroupButtonAriaLabel,\n }}\n itemProps={{\n \"aria-roledescription\": labels?.itemAriaRoleDescription,\n }}\n {...obj[1]}\n />\n ))}\n </ul>\n </div>\n </div>\n </HvDrawer>\n );\n};\n"],"names":["DEFAULT_LABELS","itemAriaRoleDescription","expandGroupButtonAriaLabel","searchPlaceholder","searchAriaLabel","HvFlowSidebar","id","title","description","anchor","buttonTitle","classes","classesProp","labels","labelsProps","others","useClasses","nodeGroups","nodeTypes","setExpandedNodeGroups","useFlowContext","unfilteredGroups","useMemo","buildGroups","groups","setGroups","useState","useLabels","drawerElementId","useUniqueId","groupsElementId","setNodeRef","useDroppable","handleSearch","event","value","gps","Object","entries","reduce","acc","curr","filteredNodes","nodes","filter","obj","label","toLocaleLowerCase","includes","nodesCount","length","keys","handleDebouncedSearch","debounce","undefined","paper","drawerPaper","titleContainer","contentContainer","searchRoot","autoComplete","groupsContainer","map"],"mappings":";;;;;;;;;;;AA4CA,MAAMA,iBAA+C;AAAA,EACnDC,yBAAyB;AAAA,EACzBC,4BAA4B;AAAA,EAC5BC,mBAAmB;AAAA,EACnBC,iBAAiB;AACnB;AAEO,MAAMC,gBAAgBA,CAAC;AAAA,EAC5BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAAS;AAAA,EACTC,cAAc;AAAA,EACdC,SAASC;AAAAA,EACTC,QAAQC;AAAAA,EACR,GAAGC;AACe,MAAM;AAClB,QAAA;AAAA,IAAEJ;AAAAA,EAAAA,IAAYK,WAAWJ,WAAW;AAEpC,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AC7B,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAWpB,QAAQ8C,gBACtB,UAAA;AAAA,MAAC,oBAAA,KAAA,EAAI,MAAK,OAAM,CAAA;AAAA,MACf,oBAAA,cAAA,EAAa,SAAQ,UAAUlD,UAAM,OAAA;AAAA,IAAA,GACxC;AAAA,IACC,qBAAA,OAAA,EAAI,WAAWI,QAAQ+C,kBACtB,UAAA;AAAA,MAAA,oBAAC,cAAa,EAAA,WAAW/C,QAAQH,aAC9BA,UACH,aAAA;AAAA,0BACC,SACC,EAAA,WAAWG,QAAQgD,YACnB,MAAK,UACL,aAAa9C,iCAAQV,mBACrB,cAAYU,iCAAQT,iBACpB,iBAAe0B,iBACf,aAAWA,iBACX,UAAUsB,uBACV,YAAY;AAAA,QAAEQ,cAAc;AAAA,MAAA,GAAQ;AAAA,0BAErC,MAAG,EAAA,IAAI9B,iBAAiB,WAAWnB,QAAQkD,iBACzCxB,UAAOC,OAAAA,QAAQd,MAAM,EAAEsC,IAAKjB,SAC1B,oBAAA,oBAAA,EAEC,IAAIA,IAAI,CAAC,GACT,mBAAmB;AAAA,QACjB,cAAchC,iCAAQX;AAAAA,SAExB,WAAW;AAAA,QACT,wBAAwBW,iCAAQZ;AAAAA,MAAAA,GAE9B4C,GAAAA,IAAI,CAAC,KARJA,IAAI,CAAC,CAQC,CAEd,GACH;AAAA,IAAA,GACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../../../src/components/Flow/Sidebar/Sidebar.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nimport debounce from \"lodash/debounce\";\n\nimport {\n DndContextProps,\n DragOverlay,\n useDndMonitor,\n useDroppable,\n} from \"@dnd-kit/core\";\nimport { restrictToWindowEdges } from \"@dnd-kit/modifiers\";\n\nimport {\n ExtractNames,\n HvDrawer,\n HvDrawerProps,\n HvInput,\n HvInputProps,\n HvTypography,\n useLabels,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Add } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./Sidebar.styles\";\nimport { HvFlowSidebarGroup } from \"./SidebarGroup\";\nimport { useFlowContext } from \"../hooks\";\nimport { buildGroups } from \"./utils\";\nimport { HvFlowSidebarGroupItem } from \"./SidebarGroup/SidebarGroupItem\";\n\nexport { staticClasses as flowSidebarClasses };\n\nexport type HvFlowSidebarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarProps\n extends Omit<HvDrawerProps, \"classes\" | \"title\"> {\n /** Sidebar title. */\n title?: string;\n /** Sidebar description. */\n description?: string;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarClasses;\n /** Labels used on the sidebar. */\n labels?: {\n itemAriaRoleDescription?: string;\n expandGroupButtonAriaLabel?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n };\n}\n\nconst DEFAULT_LABELS: HvFlowSidebarProps[\"labels\"] = {\n itemAriaRoleDescription: \"Draggable\",\n expandGroupButtonAriaLabel: \"Expand group\",\n searchPlaceholder: \"Search node...\",\n searchAriaLabel: \"Search node...\",\n};\n\nexport const HvFlowSidebar = ({\n id,\n title,\n description,\n anchor = \"right\",\n buttonTitle = \"Close\",\n classes: classesProp,\n labels: labelsProps,\n ...others\n}: HvFlowSidebarProps) => {\n const { classes } = useClasses(classesProp);\n\n const { nodeGroups, nodeTypes, setExpandedNodeGroups } = useFlowContext();\n\n const unfilteredGroups = useMemo(\n () => buildGroups(nodeGroups, nodeTypes),\n [nodeGroups, nodeTypes]\n );\n\n const [groups, setGroups] = useState(unfilteredGroups);\n const [draggingLabel, setDraggingLabel] = useState(undefined);\n\n const labels = useLabels(DEFAULT_LABELS, labelsProps);\n\n const drawerElementId = useUniqueId(id, \"hvFlowSidebarDrawer\");\n const groupsElementId = useUniqueId(id, \"hvFlowSidebarGroups\");\n\n // The sidebar is droppable to distinguish between the canvas and the sidebar\n // Otherwise items dropped inside the sidebar will be added to the canvas\n const { setNodeRef } = useDroppable({\n id: drawerElementId,\n });\n\n const handleDragStart: DndContextProps[\"onDragStart\"] = (event) => {\n if (event.active.data.current?.hvFlow) {\n setDraggingLabel(event.active.data.current.hvFlow?.label);\n }\n };\n\n const handleDragEnd: DndContextProps[\"onDragEnd\"] = () => {\n setDraggingLabel(undefined);\n };\n\n useDndMonitor({\n onDragEnd: handleDragEnd,\n onDragStart: handleDragStart,\n });\n\n const handleSearch: HvInputProps[\"onChange\"] = (event, value) => {\n const gps = value\n ? Object.entries(unfilteredGroups).reduce((acc, curr) => {\n // Filter nodes by search\n const filteredNodes = curr[1].nodes.filter((obj) =>\n obj.label.toLocaleLowerCase().includes(value.toLocaleLowerCase())\n );\n const nodesCount = filteredNodes.length;\n\n // Only show groups with nodes\n if (nodesCount > 0) {\n acc[curr[0]] = {\n ...curr[1],\n nodes: filteredNodes,\n };\n }\n\n return acc;\n }, {})\n : unfilteredGroups;\n\n setGroups(gps);\n setExpandedNodeGroups?.(value ? Object.keys(gps) : []);\n };\n\n const handleDebouncedSearch = debounce(handleSearch, 500);\n\n return (\n <>\n <HvDrawer\n BackdropComponent={undefined}\n variant=\"persistent\"\n classes={{\n paper: classes.drawerPaper,\n }}\n anchor={anchor}\n buttonTitle={buttonTitle}\n {...others}\n >\n <div id={drawerElementId} ref={setNodeRef}>\n <div className={classes.titleContainer}>\n <Add role=\"none\" />\n <HvTypography variant=\"title3\">{title}</HvTypography>\n </div>\n <div className={classes.contentContainer}>\n <HvTypography className={classes.description}>\n {description}\n </HvTypography>\n <HvInput\n className={classes.searchRoot}\n type=\"search\"\n placeholder={labels?.searchPlaceholder}\n aria-label={labels?.searchAriaLabel}\n aria-controls={groupsElementId}\n aria-owns={groupsElementId}\n onChange={handleDebouncedSearch}\n inputProps={{ autoComplete: \"off\" }}\n />\n <ul id={groupsElementId} className={classes.groupsContainer}>\n {Object.entries(groups).map((obj) => (\n <HvFlowSidebarGroup\n key={obj[0]}\n id={obj[0]}\n expandButtonProps={{\n \"aria-label\": labels?.expandGroupButtonAriaLabel,\n }}\n itemProps={{\n \"aria-roledescription\": labels?.itemAriaRoleDescription,\n }}\n {...obj[1]}\n />\n ))}\n </ul>\n </div>\n </div>\n </HvDrawer>\n <DragOverlay modifiers={[restrictToWindowEdges]}>\n {draggingLabel ? (\n <HvFlowSidebarGroupItem label={draggingLabel} isDragging />\n ) : null}\n </DragOverlay>\n </>\n );\n};\n"],"names":["DEFAULT_LABELS","itemAriaRoleDescription","expandGroupButtonAriaLabel","searchPlaceholder","searchAriaLabel","HvFlowSidebar","id","title","description","anchor","buttonTitle","classes","classesProp","labels","labelsProps","others","useClasses","nodeGroups","nodeTypes","setExpandedNodeGroups","useFlowContext","unfilteredGroups","useMemo","buildGroups","groups","setGroups","useState","draggingLabel","setDraggingLabel","undefined","useLabels","drawerElementId","useUniqueId","groupsElementId","setNodeRef","useDroppable","handleDragStart","event","active","data","current","hvFlow","label","handleDragEnd","onDragEnd","onDragStart","handleSearch","value","gps","Object","entries","reduce","acc","curr","filteredNodes","nodes","filter","obj","toLocaleLowerCase","includes","nodesCount","length","keys","handleDebouncedSearch","debounce","paper","drawerPaper","titleContainer","contentContainer","searchRoot","autoComplete","groupsContainer","map","restrictToWindowEdges"],"mappings":";;;;;;;;;;;;;AAmDA,MAAMA,iBAA+C;AAAA,EACnDC,yBAAyB;AAAA,EACzBC,4BAA4B;AAAA,EAC5BC,mBAAmB;AAAA,EACnBC,iBAAiB;AACnB;AAEO,MAAMC,gBAAgBA,CAAC;AAAA,EAC5BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAAS;AAAA,EACTC,cAAc;AAAA,EACdC,SAASC;AAAAA,EACTC,QAAQC;AAAAA,EACR,GAAGC;AACe,MAAM;AAClB,QAAA;AAAA,IAAEJ;AAAAA,EAAAA,IAAYK,WAAWJ,WAAW;AAEpC,QAAA;AAAA,IAAEK;AAAAA,IAAYC;AAAAA,IAAWC;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A,MAAA,GACF;AAAA,IAAA,EAAA,CACF,EACF,CAAA;AAAA,IACC,oBAAA,aAAA,EAAY,WAAW,CAACgB,qBAAqB,GAC3C9C,UAAAA,gBACE,oBAAA,wBAAA,EAAuB,OAAOA,eAAe,YAAU,KAAA,CAAA,IACtD,MACN;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -5,7 +5,7 @@ import { HvTypography, HvButton } from "@hitachivantara/uikit-react-core";
5
5
  import { getColor } from "@hitachivantara/uikit-styles";
6
6
  import { useClasses } from "./SidebarGroup.styles.js";
7
7
  import { staticClasses } from "./SidebarGroup.styles.js";
8
- import { useFlowContext } from "../../FlowContext/FlowContext.js";
8
+ import { useFlowContext } from "../../hooks/useFlowContext.js";
9
9
  import { HvFlowDraggableSidebarGroupItem } from "./SidebarGroupItem/DraggableSidebarGroupItem.js";
10
10
  const HvFlowSidebarGroup = ({
11
11
  id,
@@ -42,7 +42,7 @@ const HvFlowSidebarGroup = ({
42
42
  /* @__PURE__ */ jsx(HvButton, { icon: true, onClick: handleClick, "aria-expanded": opened, ...expandButtonProps, children: opened ? /* @__PURE__ */ jsx(Up, { role: "none" }) : /* @__PURE__ */ jsx(Down, { role: "none" }) })
43
43
  ] }),
44
44
  description && /* @__PURE__ */ jsx("div", { className: classes.descriptionContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: description }) }),
45
- opened && /* @__PURE__ */ jsx("div", { className: classes.itemsContainer, children: nodes.map((obj) => /* @__PURE__ */ jsx(HvFlowDraggableSidebarGroupItem, { ...itemProps, ...obj }, obj.id)) })
45
+ opened && /* @__PURE__ */ jsx("div", { className: classes.itemsContainer, children: nodes.map((obj) => /* @__PURE__ */ jsx(HvFlowDraggableSidebarGroupItem, { ...itemProps, ...obj }, obj.type)) })
46
46
  ] });
47
47
  };
48
48
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarGroup.js","sources":["../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroup.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\n\nimport { Down, Up } from \"@hitachivantara/uikit-react-icons\";\nimport {\n ExtractNames,\n HvButton,\n HvButtonProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { getColor } from \"@hitachivantara/uikit-styles\";\n\nimport { HvFlowNodeGroup } from \"../../types\";\nimport { staticClasses, useClasses } from \"./SidebarGroup.styles\";\nimport {\n HvFlowDraggableSidebarGroupItem,\n HvFlowDraggableSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\nimport { useFlowContext } from \"../../FlowContext\";\n\nexport { staticClasses as flowSidebarGroupClasses };\n\nexport type HvFlowSidebarGroupClasses = ExtractNames<typeof useClasses>;\n\nexport type HvFlowSidebarGroupNodes = {\n id: string;\n label: string;\n}[];\n\nexport interface HvFlowSidebarGroupProps extends HvFlowNodeGroup {\n /** Group id. */\n id: string;\n /** Group nodes. */\n nodes: HvFlowSidebarGroupNodes;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupClasses;\n /** Expand button props. */\n expandButtonProps?: HvButtonProps;\n /** Item group props. */\n itemProps?: Partial<HvFlowDraggableSidebarGroupItemProps>;\n}\n\nexport const HvFlowSidebarGroup = ({\n id,\n label,\n nodes,\n color,\n description,\n icon,\n expandButtonProps,\n classes: classesProp,\n itemProps,\n}: HvFlowSidebarGroupProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const { expandedNodeGroups, setExpandedNodeGroups } = useFlowContext();\n\n const opened = useMemo(\n () => !!expandedNodeGroups?.find((groupId) => groupId === id),\n [expandedNodeGroups, id]\n );\n\n const handleClick = useCallback(() => {\n setExpandedNodeGroups?.((prev) =>\n opened ? prev.filter((groupId) => id !== groupId) : [...prev, id]\n );\n }, [id, opened, setExpandedNodeGroups]);\n\n return (\n <li className={cx(css({ borderColor: getColor(color) }), classes.root)}>\n <div className={classes.titleContainer}>\n <div className={classes.labelContainer}>\n <div className={classes.icon} role=\"none\">\n {icon}\n </div>\n <HvTypography variant=\"title4\">\n {nodes.length > 1 ? `${label} (${nodes.length})` : label}\n </HvTypography>\n </div>\n <HvButton\n icon\n onClick={handleClick}\n aria-expanded={opened}\n {...expandButtonProps}\n >\n {opened ? <Up role=\"none\" /> : <Down role=\"none\" />}\n </HvButton>\n </div>\n {description && (\n <div className={classes.descriptionContainer}>\n <HvTypography>{description}</HvTypography>\n </div>\n )}\n {opened && (\n <div className={classes.itemsContainer}>\n {nodes.map((obj) => (\n <HvFlowDraggableSidebarGroupItem\n key={obj.id}\n {...itemProps}\n {...obj}\n />\n ))}\n </div>\n )}\n </li>\n );\n};\n"],"names":["HvFlowSidebarGroup","id","label","nodes","color","description","icon","expandButtonProps","classes","classesProp","itemProps","cx","css","useClasses","expandedNodeGroups","setExpandedNodeGroups","useFlowContext","opened","useMemo","find","groupId","handleClick","useCallback","prev","filter","borderColor","getColor","root","titleContainer","labelContainer","length","descriptionContainer","itemsContainer","map","obj"],"mappings":";;;;;;;;;AAyCO,MAAMA,qBAAqBA,CAAC;AAAA,EACjCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAASC;AAAAA,EACTC;AACuB,MAAM;AACvB,QAAA;AAAA,IAAEF;AAAAA,IAASG;AAAAA,IAAIC;AAAAA,EAAAA,IAAQC,WAAWJ,WAAW;AAE7C,QAAA;AAAA,IAAEK;AAAAA,IAAoBC;AAAAA,MAA0BC,eAAe;AAErE,QAAMC,SAASC,QACb,MAAM,CAAC,EAACJ,yDAAoBK,KAAMC,CAAYA,YAAAA,YAAYnB,MAC1D,CAACa,oBAAoBb,EAAE,CACzB;AAEMoB,QAAAA,cAAcC,YAAY,MAAM;AACpCP,mEAAyBQ,CACvBN,SAAAA,SAASM,KAAKC,OAAQJ,CAAYnB,YAAAA,OAAOmB,OAAO,IAAI,CAAC,GAAGG,MAAMtB,EAAE;AAAA,EAEjE,GAAA,CAACA,IAAIgB,QAAQF,qBAAqB,CAAC;AAEtC,SACG,qBAAA,MAAA,EAAG,WAAWJ,GAAGC,IAAI;AAAA,IAAEa,aAAaC,SAAStB,KAAK;AAAA,EAAG,CAAA,GAAGI,QAAQmB,IAAI,GACnE,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAWnB,QAAQoB,gBACtB,UAAA;AAAA,MAAC,qBAAA,OAAA,EAAI,WAAWpB,QAAQqB,gBACtB,UAAA;AAAA,QAAA,oBAAC,SAAI,WAAWrB,QAAQF,MAAM,MAAK,QAChCA,UACH,MAAA;AAAA,QACC,oBAAA,cAAA,EAAa,SAAQ,UACnBH,UAAM2B,MAAAA,SAAS,IAAK,GAAE5B,KAAM,KAAIC,MAAM2B,MAAO,MAAK5B,OACrD;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,YACC,MAAI,MACJ,SAASmB,aACT,iBAAeJ,QACf,GAAIV,mBAEHU,mBAAU,oBAAA,IAAA,EAAG,MAAK,QAAM,wBAAO,MAAK,EAAA,MAAK,QAAS,EACrD,CAAA;AAAA,IAAA,GACF;AAAA,IACCZ,mCACE,OAAI,EAAA,WAAWG,QAAQuB,sBACtB,UAAA,oBAAC,cAAc1B,EAAAA,UAAAA,YAAAA,CAAY,EAC7B,CAAA;AAAA,IAEDY,UACE,oBAAA,OAAA,EAAI,WAAWT,QAAQwB,gBACrB7B,gBAAM8B,IAAKC,CAAAA,QACT,oBAAA,iCAAA,EAEKxB,GAAAA,WACAwB,GAAAA,OAFCA,IAAIjC,EAED,CAEX,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"SidebarGroup.js","sources":["../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroup.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\n\nimport { Down, Up } from \"@hitachivantara/uikit-react-icons\";\nimport {\n ExtractNames,\n HvButton,\n HvButtonProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { getColor } from \"@hitachivantara/uikit-styles\";\n\nimport { HvFlowNodeGroup } from \"../../types\";\nimport { staticClasses, useClasses } from \"./SidebarGroup.styles\";\nimport {\n HvFlowDraggableSidebarGroupItem,\n HvFlowDraggableSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\nimport { useFlowContext } from \"../../hooks\";\n\nexport { staticClasses as flowSidebarGroupClasses };\n\nexport type HvFlowSidebarGroupClasses = ExtractNames<typeof useClasses>;\n\nexport type HvFlowSidebarGroupNodes = {\n type: string;\n label: string;\n data?: unknown;\n}[];\n\nexport interface HvFlowSidebarGroupProps extends HvFlowNodeGroup {\n /** Group id. */\n id: string;\n /** Group nodes. */\n nodes: HvFlowSidebarGroupNodes;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupClasses;\n /** Expand button props. */\n expandButtonProps?: HvButtonProps;\n /** Item group props. */\n itemProps?: Partial<HvFlowDraggableSidebarGroupItemProps>;\n}\n\nexport const HvFlowSidebarGroup = ({\n id,\n label,\n nodes,\n color,\n description,\n icon,\n expandButtonProps,\n classes: classesProp,\n itemProps,\n}: HvFlowSidebarGroupProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const { expandedNodeGroups, setExpandedNodeGroups } = useFlowContext();\n\n const opened = useMemo(\n () => !!expandedNodeGroups?.find((groupId) => groupId === id),\n [expandedNodeGroups, id]\n );\n\n const handleClick = useCallback(() => {\n setExpandedNodeGroups?.((prev) =>\n opened ? prev.filter((groupId) => id !== groupId) : [...prev, id]\n );\n }, [id, opened, setExpandedNodeGroups]);\n\n return (\n <li className={cx(css({ borderColor: getColor(color) }), classes.root)}>\n <div className={classes.titleContainer}>\n <div className={classes.labelContainer}>\n <div className={classes.icon} role=\"none\">\n {icon}\n </div>\n <HvTypography variant=\"title4\">\n {nodes.length > 1 ? `${label} (${nodes.length})` : label}\n </HvTypography>\n </div>\n <HvButton\n icon\n onClick={handleClick}\n aria-expanded={opened}\n {...expandButtonProps}\n >\n {opened ? <Up role=\"none\" /> : <Down role=\"none\" />}\n </HvButton>\n </div>\n {description && (\n <div className={classes.descriptionContainer}>\n <HvTypography>{description}</HvTypography>\n </div>\n )}\n {opened && (\n <div className={classes.itemsContainer}>\n {nodes.map((obj) => (\n <HvFlowDraggableSidebarGroupItem\n key={obj.type}\n {...itemProps}\n {...obj}\n />\n ))}\n </div>\n )}\n </li>\n );\n};\n"],"names":["HvFlowSidebarGroup","id","label","nodes","color","description","icon","expandButtonProps","classes","classesProp","itemProps","cx","css","useClasses","expandedNodeGroups","setExpandedNodeGroups","useFlowContext","opened","useMemo","find","groupId","handleClick","useCallback","prev","filter","borderColor","getColor","root","titleContainer","labelContainer","length","descriptionContainer","itemsContainer","map","obj","type"],"mappings":";;;;;;;;;AA0CO,MAAMA,qBAAqBA,CAAC;AAAA,EACjCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAASC;AAAAA,EACTC;AACuB,MAAM;AACvB,QAAA;AAAA,IAAEF;AAAAA,IAASG;AAAAA,IAAIC;AAAAA,EAAAA,IAAQC,WAAWJ,WAAW;AAE7C,QAAA;AAAA,IAAEK;AAAAA,IAAoBC;AAAAA,MAA0BC,eAAe;AAErE,QAAMC,SAASC,QACb,MAAM,CAAC,EAACJ,yDAAoBK,KAAMC,CAAYA,YAAAA,YAAYnB,MAC1D,CAACa,oBAAoBb,EAAE,CACzB;AAEMoB,QAAAA,cAAcC,YAAY,MAAM;AACpCP,mEAAyBQ,CACvBN,SAAAA,SAASM,KAAKC,OAAQJ,CAAYnB,YAAAA,OAAOmB,OAAO,IAAI,CAAC,GAAGG,MAAMtB,EAAE;AAAA,EAEjE,GAAA,CAACA,IAAIgB,QAAQF,qBAAqB,CAAC;AAEtC,SACG,qBAAA,MAAA,EAAG,WAAWJ,GAAGC,IAAI;AAAA,IAAEa,aAAaC,SAAStB,KAAK;AAAA,EAAG,CAAA,GAAGI,QAAQmB,IAAI,GACnE,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAWnB,QAAQoB,gBACtB,UAAA;AAAA,MAAC,qBAAA,OAAA,EAAI,WAAWpB,QAAQqB,gBACtB,UAAA;AAAA,QAAA,oBAAC,SAAI,WAAWrB,QAAQF,MAAM,MAAK,QAChCA,UACH,MAAA;AAAA,QACC,oBAAA,cAAA,EAAa,SAAQ,UACnBH,UAAM2B,MAAAA,SAAS,IAAK,GAAE5B,KAAM,KAAIC,MAAM2B,MAAO,MAAK5B,OACrD;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,YACC,MAAI,MACJ,SAASmB,aACT,iBAAeJ,QACf,GAAIV,mBAEHU,mBAAU,oBAAA,IAAA,EAAG,MAAK,QAAM,wBAAO,MAAK,EAAA,MAAK,QAAS,EACrD,CAAA;AAAA,IAAA,GACF;AAAA,IACCZ,mCACE,OAAI,EAAA,WAAWG,QAAQuB,sBACtB,UAAA,oBAAC,cAAc1B,EAAAA,UAAAA,YAAAA,CAAY,EAC7B,CAAA;AAAA,IAEDY,UACE,oBAAA,OAAA,EAAI,WAAWT,QAAQwB,gBACrB7B,gBAAM8B,IAAKC,CAAAA,QACT,oBAAA,iCAAA,EAEKxB,GAAAA,WACAwB,GAAAA,OAFCA,IAAIC,IAED,CAEX,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1,15 +1,19 @@
1
1
  import { jsx } from "@emotion/react/jsx-runtime";
2
- import { useForkRef } from "@mui/material";
3
2
  import { useRef } from "react";
3
+ import { useForkRef } from "@mui/material";
4
4
  import { useDraggable } from "@dnd-kit/core";
5
+ import { useUniqueId } from "@hitachivantara/uikit-react-core";
5
6
  import { HvFlowSidebarGroupItem } from "./SidebarGroupItem.js";
6
7
  const HvFlowDraggableSidebarGroupItem = ({
7
- label,
8
8
  id,
9
+ label,
10
+ type,
11
+ data,
9
12
  ...others
10
13
  }) => {
11
14
  var _a, _b;
12
15
  const itemRef = useRef(null);
16
+ const elementId = useUniqueId(id, `hvFlowDraggableItem-${type}`);
13
17
  const {
14
18
  attributes,
15
19
  listeners,
@@ -17,14 +21,18 @@ const HvFlowDraggableSidebarGroupItem = ({
17
21
  isDragging,
18
22
  transform
19
23
  } = useDraggable({
20
- id,
24
+ id: elementId,
21
25
  data: {
22
26
  hvFlow: {
27
+ // Needed to know which item is being dragged and dropped
28
+ type,
23
29
  // Needed for the drag overlay: otherwise the item is cut by the drawer because of overflow
24
30
  label,
25
31
  // Item position: used to position the item when dropped
26
32
  x: (_a = itemRef.current) == null ? void 0 : _a.getBoundingClientRect().x,
27
- y: (_b = itemRef.current) == null ? void 0 : _b.getBoundingClientRect().y
33
+ y: (_b = itemRef.current) == null ? void 0 : _b.getBoundingClientRect().y,
34
+ // Data
35
+ data
28
36
  }
29
37
  }
30
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DraggableSidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.tsx"],"sourcesContent":["import { useForkRef } from \"@mui/material\";\n\nimport { useRef } from \"react\";\n\nimport { useDraggable } from \"@dnd-kit/core\";\n\nimport {\n HvFlowSidebarGroupItem,\n HvFlowSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\n\nexport interface HvFlowDraggableSidebarGroupItemProps\n extends HvFlowSidebarGroupItemProps {\n /** Item id: the item type. */\n id: string;\n}\n\nexport const HvFlowDraggableSidebarGroupItem = ({\n label,\n id,\n ...others\n}: HvFlowDraggableSidebarGroupItemProps) => {\n const itemRef = useRef<HTMLElement>(null);\n\n const { attributes, listeners, setNodeRef, isDragging, transform } =\n useDraggable({\n id,\n data: {\n hvFlow: {\n // Needed for the drag overlay: otherwise the item is cut by the drawer because of overflow\n label,\n // Item position: used to position the item when dropped\n x: itemRef.current?.getBoundingClientRect().x,\n y: itemRef.current?.getBoundingClientRect().y,\n },\n },\n });\n\n const forkedRef = useForkRef(itemRef, setNodeRef);\n\n const style = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n }\n : undefined;\n\n return (\n <HvFlowSidebarGroupItem\n ref={forkedRef}\n style={style}\n label={label}\n isDragging={isDragging}\n {...listeners}\n {...attributes}\n {...others}\n />\n );\n};\n"],"names":["HvFlowDraggableSidebarGroupItem","label","id","others","itemRef","useRef","attributes","listeners","setNodeRef","isDragging","transform","useDraggable","data","hvFlow","x","current","getBoundingClientRect","y","forkedRef","useForkRef","style","undefined"],"mappings":";;;;;AAiBO,MAAMA,kCAAkCA,CAAC;AAAA,EAC9CC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACiC,MAAM;;AACpCC,QAAAA,UAAUC,OAAoB,IAAI;AAElC,QAAA;AAAA,IAAEC;AAAAA,IAAYC;AAAAA,IAAWC;AAAAA,IAAYC;AAAAA,IAAYC;AAAAA,MACrDC,aAAa;AAAA,IACXT;AAAAA,IACAU,MAAM;AAAA,MACJC,QAAQ;AAAA;AAAA,QAENZ;AAAAA;AAAAA,QAEAa,IAAGV,aAAQW,YAARX,mBAAiBY,wBAAwBF;AAAAA,QAC5CG,IAAGb,aAAQW,YAARX,mBAAiBY,wBAAwBC;AAAAA,MAC9C;AAAA,IACF;AAAA,EAAA,CACD;AAEGC,QAAAA,YAAYC,WAAWf,SAASI,UAAU;AAEhD,QAAMY,QAAQV,YACV;AAAA,IACEA,WAAY,eAAcA,UAAUI,CAAE,OAAMJ,UAAUO,CAAE;AAAA,EAE1DI,IAAAA;AAEJ,SACG,oBAAA,wBAAA,EACC,KAAKH,WACL,OACA,OACA,YACIX,GAAAA,cACAD,YACAH,GAAAA,OACJ,CAAA;AAEN;"}
1
+ {"version":3,"file":"DraggableSidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.tsx"],"sourcesContent":["import { useRef } from \"react\";\n\nimport { useForkRef } from \"@mui/material\";\n\nimport { useDraggable } from \"@dnd-kit/core\";\n\nimport { useUniqueId } from \"@hitachivantara/uikit-react-core\";\n\nimport {\n HvFlowSidebarGroupItem,\n HvFlowSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\n\nexport interface HvFlowDraggableSidebarGroupItemProps\n extends HvFlowSidebarGroupItemProps {\n /** Item type. */\n type: string;\n /** Item data. */\n data?: unknown;\n}\n\nexport const HvFlowDraggableSidebarGroupItem = ({\n id,\n label,\n type,\n data,\n ...others\n}: HvFlowDraggableSidebarGroupItemProps) => {\n const itemRef = useRef<HTMLElement>(null);\n\n const elementId = useUniqueId(id, `hvFlowDraggableItem-${type}`);\n\n const { attributes, listeners, setNodeRef, isDragging, transform } =\n useDraggable({\n id: elementId,\n data: {\n hvFlow: {\n // Needed to know which item is being dragged and dropped\n type,\n // Needed for the drag overlay: otherwise the item is cut by the drawer because of overflow\n label,\n // Item position: used to position the item when dropped\n x: itemRef.current?.getBoundingClientRect().x,\n y: itemRef.current?.getBoundingClientRect().y,\n // Data\n data,\n },\n },\n });\n\n const forkedRef = useForkRef(itemRef, setNodeRef);\n\n const style = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n }\n : undefined;\n\n return (\n <HvFlowSidebarGroupItem\n ref={forkedRef}\n style={style}\n label={label}\n isDragging={isDragging}\n {...listeners}\n {...attributes}\n {...others}\n />\n );\n};\n"],"names":["HvFlowDraggableSidebarGroupItem","id","label","type","data","others","itemRef","useRef","elementId","useUniqueId","attributes","listeners","setNodeRef","isDragging","transform","useDraggable","hvFlow","x","current","getBoundingClientRect","y","forkedRef","useForkRef","style","undefined"],"mappings":";;;;;;AAqBO,MAAMA,kCAAkCA,CAAC;AAAA,EAC9CC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACiC,MAAM;;AACpCC,QAAAA,UAAUC,OAAoB,IAAI;AAExC,QAAMC,YAAYC,YAAYR,IAAK,uBAAsBE,IAAK,EAAC;AAEzD,QAAA;AAAA,IAAEO;AAAAA,IAAYC;AAAAA,IAAWC;AAAAA,IAAYC;AAAAA,IAAYC;AAAAA,MACrDC,aAAa;AAAA,IACXd,IAAIO;AAAAA,IACJJ,MAAM;AAAA,MACJY,QAAQ;AAAA;AAAA,QAENb;AAAAA;AAAAA,QAEAD;AAAAA;AAAAA,QAEAe,IAAGX,aAAQY,YAARZ,mBAAiBa,wBAAwBF;AAAAA,QAC5CG,IAAGd,aAAQY,YAARZ,mBAAiBa,wBAAwBC;AAAAA;AAAAA,QAE5ChB;AAAAA,MACF;AAAA,IACF;AAAA,EAAA,CACD;AAEGiB,QAAAA,YAAYC,WAAWhB,SAASM,UAAU;AAEhD,QAAMW,QAAQT,YACV;AAAA,IACEA,WAAY,eAAcA,UAAUG,CAAE,OAAMH,UAAUM,CAAE;AAAA,EAE1DI,IAAAA;AAEJ,SACG,oBAAA,wBAAA,EACC,KAAKH,WACL,OACA,OACA,YACIV,GAAAA,cACAD,YACAL,GAAAA,OACJ,CAAA;AAEN;"}
@@ -2,11 +2,12 @@ const buildGroups = (nodeGroups, nodeTypes) => {
2
2
  if (nodeGroups) {
3
3
  const groups = Object.entries(nodeGroups).reduce((acc, curr) => {
4
4
  const nodes = nodeTypes ? Object.entries(nodeTypes).reduce((accN, currN) => {
5
- var _a, _b;
5
+ var _a, _b, _c;
6
6
  if (((_a = currN[1].meta) == null ? void 0 : _a.groupId) === curr[0]) {
7
7
  accN.push({
8
- id: currN[0],
9
- label: (_b = currN[1].meta) == null ? void 0 : _b.label
8
+ type: currN[0],
9
+ label: (_b = currN[1].meta) == null ? void 0 : _b.label,
10
+ data: (_c = currN[1].meta) == null ? void 0 : _c.data
10
11
  });
11
12
  }
12
13
  return accN;
@@ -1 +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;"}
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 type: currN[0],\n label: currN[1].meta?.label,\n data: currN[1].meta?.data,\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","type","label","data"],"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,MAAMJ,MAAM,CAAC;AAAA,YACbK,QAAOL,WAAM,CAAC,EAAEC,SAATD,mBAAeK;AAAAA,YACtBC,OAAMN,WAAM,CAAC,EAAEC,SAATD,mBAAeM;AAAAA,UAAAA,CACtB;AAAA,QACH;AACOP,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;"}
@@ -0,0 +1,16 @@
1
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() {
2
+ return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
3
+ }
4
+ const flowStyles = process.env.NODE_ENV === "production" ? {
5
+ name: "136w4yv",
6
+ styles: ".react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0;}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab;}.react-flow__pane.selection{cursor:pointer;}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing;}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none;}.react-flow__renderer{z-index:4;}.react-flow__selection{z-index:6;}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none;}.react-flow .react-flow__edges{pointer-events:none;overflow:visible;}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none;}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer;}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw 0.5s linear infinite;animation:dashdraw 0.5s linear infinite;}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none;}.react-flow__edge.inactive{pointer-events:none;}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none;}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555;}.react-flow__edge-textwrapper{pointer-events:all;}.react-flow__edge-textbg{fill:white;}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.react-flow__connection{pointer-events:none;}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw 0.5s linear infinite;animation:dashdraw 0.5s linear infinite;}.react-flow__connectionline{z-index:1001;}.react-flow__nodes{pointer-events:none;transform-origin:0 0;}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab;}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing;}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none;}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab;}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%;}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair;}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%, 0);}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%, 0);}.react-flow__handle-left{top:50%;left:-4px;transform:translate(0, -50%);}.react-flow__handle-right{right:-4px;top:50%;transform:translate(0, -50%);}.react-flow__edgeupdater{cursor:move;pointer-events:all;}.react-flow__panel{position:absolute;z-index:5;margin:15px;}.react-flow__panel.top{top:0;}.react-flow__panel.bottom{bottom:0;}.react-flow__panel.left{left:0;}.react-flow__panel.right{right:0;}.react-flow__panel.center{left:50%;transform:translateX(-50%);}.react-flow__attribution{font-size:10px;background:rgba(255, 255, 255, 0.5);padding:2px 3px;margin:0;}.react-flow__attribution a{text-decoration:none;color:#999;}@-webkit-keyframes dashdraw{from{stroke-dashoffset:10;}}@keyframes dashdraw{from{stroke-dashoffset:10;}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.react-flow__edge.updating .react-flow__edge-path{stroke:#777;}.react-flow__edge-text{font-size:10px;}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none;}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:white;}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px rgba(0, 0, 0, 0.08);}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 0.5px #1a192b;}.react-flow__node-group{background-color:rgba(240, 240, 240, 0.25);}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0, 89, 220, 0.08);border:1px dotted rgba(0, 89, 220, 0.8);}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none;}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0, 0, 0, 0.08);}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px;}.react-flow__controls-button:hover{background:#f4f4f4;}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;}.react-flow__controls-button:disabled{pointer-events:none;}.react-flow__controls-button:disabled svg{fill-opacity:0.4;}.react-flow__minimap{background-color:#fff;}.react-flow__resize-control{position:absolute;}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize;}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize;}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize;}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize;}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%, -50%);}.react-flow__resize-control.handle.left{left:0;top:50%;}.react-flow__resize-control.handle.right{left:100%;top:50%;}.react-flow__resize-control.handle.top{left:50%;top:0;}.react-flow__resize-control.handle.bottom{left:50%;top:100%;}.react-flow__resize-control.handle.top.left{left:0;}.react-flow__resize-control.handle.bottom.left{left:0;}.react-flow__resize-control.handle.top.right{left:100%;}.react-flow__resize-control.handle.bottom.right{left:100%;}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid;}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%, 0);top:0;height:100%;}.react-flow__resize-control.line.left{left:0;border-left-width:1px;}.react-flow__resize-control.line.right{left:100%;border-right-width:1px;}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translate(0, -50%);left:0;width:100%;}.react-flow__resize-control.line.top{top:0;border-top-width:1px;}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%;}"
7
+ } : {
8
+ name: "hv0xjo-flowStyles",
9
+ styles: ".react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0;}.react-flow__pane{z-index:1;cursor:-webkit-grab;cursor:grab;}.react-flow__pane.selection{cursor:pointer;}.react-flow__pane.dragging{cursor:-webkit-grabbing;cursor:grabbing;}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none;}.react-flow__renderer{z-index:4;}.react-flow__selection{z-index:6;}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none;}.react-flow .react-flow__edges{pointer-events:none;overflow:visible;}.react-flow__edge-path,.react-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none;}.react-flow__edge{pointer-events:visibleStroke;cursor:pointer;}.react-flow__edge.animated path{stroke-dasharray:5;-webkit-animation:dashdraw 0.5s linear infinite;animation:dashdraw 0.5s linear infinite;}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;-webkit-animation:none;animation:none;}.react-flow__edge.inactive{pointer-events:none;}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none;}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555;}.react-flow__edge-textwrapper{pointer-events:all;}.react-flow__edge-textbg{fill:white;}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.react-flow__connection{pointer-events:none;}.react-flow__connection .animated{stroke-dasharray:5;-webkit-animation:dashdraw 0.5s linear infinite;animation:dashdraw 0.5s linear infinite;}.react-flow__connectionline{z-index:1001;}.react-flow__nodes{pointer-events:none;transform-origin:0 0;}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:-webkit-grab;cursor:grab;}.react-flow__node.dragging{cursor:-webkit-grabbing;cursor:grabbing;}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none;}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:-webkit-grab;cursor:grab;}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background:#1a192b;border:1px solid white;border-radius:100%;}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair;}.react-flow__handle-bottom{top:auto;left:50%;bottom:-4px;transform:translate(-50%, 0);}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%, 0);}.react-flow__handle-left{top:50%;left:-4px;transform:translate(0, -50%);}.react-flow__handle-right{right:-4px;top:50%;transform:translate(0, -50%);}.react-flow__edgeupdater{cursor:move;pointer-events:all;}.react-flow__panel{position:absolute;z-index:5;margin:15px;}.react-flow__panel.top{top:0;}.react-flow__panel.bottom{bottom:0;}.react-flow__panel.left{left:0;}.react-flow__panel.right{right:0;}.react-flow__panel.center{left:50%;transform:translateX(-50%);}.react-flow__attribution{font-size:10px;background:rgba(255, 255, 255, 0.5);padding:2px 3px;margin:0;}.react-flow__attribution a{text-decoration:none;color:#999;}@-webkit-keyframes dashdraw{from{stroke-dashoffset:10;}}@keyframes dashdraw{from{stroke-dashoffset:10;}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;}.react-flow__edge.updating .react-flow__edge-path{stroke:#777;}.react-flow__edge-text{font-size:10px;}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none;}.react-flow__node-default,.react-flow__node-input,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:3px;width:150px;font-size:12px;color:#222;text-align:center;border-width:1px;border-style:solid;border-color:#1a192b;background-color:white;}.react-flow__node-default.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:0 1px 4px 1px rgba(0, 0, 0, 0.08);}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:0 0 0 0.5px #1a192b;}.react-flow__node-group{background-color:rgba(240, 240, 240, 0.25);}.react-flow__nodesselection-rect,.react-flow__selection{background:rgba(0, 89, 220, 0.08);border:1px dotted rgba(0, 89, 220, 0.8);}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none;}.react-flow__controls{box-shadow:0 0 2px 1px rgba(0, 0, 0, 0.08);}.react-flow__controls-button{border:none;background:#fefefe;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:5px;}.react-flow__controls-button:hover{background:#f4f4f4;}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;}.react-flow__controls-button:disabled{pointer-events:none;}.react-flow__controls-button:disabled svg{fill-opacity:0.4;}.react-flow__minimap{background-color:#fff;}.react-flow__resize-control{position:absolute;}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize;}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize;}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize;}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize;}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:#3367d9;transform:translate(-50%, -50%);}.react-flow__resize-control.handle.left{left:0;top:50%;}.react-flow__resize-control.handle.right{left:100%;top:50%;}.react-flow__resize-control.handle.top{left:50%;top:0;}.react-flow__resize-control.handle.bottom{left:50%;top:100%;}.react-flow__resize-control.handle.top.left{left:0;}.react-flow__resize-control.handle.bottom.left{left:0;}.react-flow__resize-control.handle.top.right{left:100%;}.react-flow__resize-control.handle.bottom.right{left:100%;}.react-flow__resize-control.line{border-color:#3367d9;border-width:0;border-style:solid;}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%, 0);top:0;height:100%;}.react-flow__resize-control.line.left{left:0;border-left-width:1px;}.react-flow__resize-control.line.right{left:100%;border-right-width:1px;}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translate(0, -50%);left:0;width:100%;}.react-flow__resize-control.line.top{top:0;border-top-width:1px;}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%;};label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cbiAgLnJlYWN0LWZsb3dfX3Jlc2l6ZS1jb250cm9sLmxpbmUubGVmdCB7XG4gICAgbGVmdDogMDtcbiAgICBib3JkZXItbGVmdC13aWR0aDogMXB4O1xuICB9XG4gIC5yZWFjdC1mbG93X19yZXNpemUtY29udHJvbC5saW5lLnJpZ2h0IHtcbiAgICBsZWZ0OiAxMDAlO1xuICAgIGJvcmRlci1yaWdodC13aWR0aDogMXB4O1xuICB9XG4gIC5yZWFjdC1mbG93X19yZXNpemUtY29udHJvbC5saW5lLnRvcCxcbiAgLnJlYWN0LWZsb3dfX3Jlc2l6ZS1jb250cm9sLmxpbmUuYm90dG9tIHtcbiAgICBoZWlnaHQ6IDFweDtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZSgwLCAtNTAlKTtcbiAgICBsZWZ0OiAwO1xuICAgIHdpZHRoOiAxMDAlO1xuICB9XG4gIC5yZWFjdC1mbG93X19yZXNpemUtY29udHJvbC5saW5lLnRvcCB7XG4gICAgdG9wOiAwO1xuICAgIGJvcmRlci10b3Atd2lkdGg6IDFweDtcbiAgfVxuICAucmVhY3QtZmxvd19fcmVzaXplLWNvbnRyb2wubGluZS5ib3R0b20ge1xuICAgIGJvcmRlci1ib3R0b20td2lkdGg6IDFweDtcbiAgICB0b3A6IDEwMCU7XG4gIH1cbmA7XG4iXX0= */",
11
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
12
+ };
13
+ export {
14
+ flowStyles
15
+ };
16
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sources":["../../../../src/components/Flow/base.ts"],"sourcesContent":["import { css } from \"@emotion/react\";\n\nexport const flowStyles = css`\n /* this gets exported as style.css and can be used for the default theming */\n /* these are the necessary styles for React Flow, they get used by base.css and style.css */\n .react-flow__container {\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n }\n .react-flow__pane {\n z-index: 1;\n cursor: -webkit-grab;\n cursor: grab;\n }\n .react-flow__pane.selection {\n cursor: pointer;\n }\n .react-flow__pane.dragging {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n }\n .react-flow__viewport {\n transform-origin: 0 0;\n z-index: 2;\n pointer-events: none;\n }\n .react-flow__renderer {\n z-index: 4;\n }\n .react-flow__selection {\n z-index: 6;\n }\n .react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible {\n outline: none;\n }\n .react-flow .react-flow__edges {\n pointer-events: none;\n overflow: visible;\n }\n .react-flow__edge-path,\n .react-flow__connection-path {\n stroke: #b1b1b7;\n stroke-width: 1;\n fill: none;\n }\n .react-flow__edge {\n pointer-events: visibleStroke;\n cursor: pointer;\n }\n .react-flow__edge.animated path {\n stroke-dasharray: 5;\n -webkit-animation: dashdraw 0.5s linear infinite;\n animation: dashdraw 0.5s linear infinite;\n }\n .react-flow__edge.animated path.react-flow__edge-interaction {\n stroke-dasharray: none;\n -webkit-animation: none;\n animation: none;\n }\n .react-flow__edge.inactive {\n pointer-events: none;\n }\n .react-flow__edge.selected,\n .react-flow__edge:focus,\n .react-flow__edge:focus-visible {\n outline: none;\n }\n .react-flow__edge.selected .react-flow__edge-path,\n .react-flow__edge:focus .react-flow__edge-path,\n .react-flow__edge:focus-visible .react-flow__edge-path {\n stroke: #555;\n }\n .react-flow__edge-textwrapper {\n pointer-events: all;\n }\n .react-flow__edge-textbg {\n fill: white;\n }\n .react-flow__edge .react-flow__edge-text {\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n .react-flow__connection {\n pointer-events: none;\n }\n .react-flow__connection .animated {\n stroke-dasharray: 5;\n -webkit-animation: dashdraw 0.5s linear infinite;\n animation: dashdraw 0.5s linear infinite;\n }\n .react-flow__connectionline {\n z-index: 1001;\n }\n .react-flow__nodes {\n pointer-events: none;\n transform-origin: 0 0;\n }\n .react-flow__node {\n position: absolute;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n pointer-events: all;\n transform-origin: 0 0;\n box-sizing: border-box;\n cursor: -webkit-grab;\n cursor: grab;\n }\n .react-flow__node.dragging {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n }\n .react-flow__nodesselection {\n z-index: 3;\n transform-origin: left top;\n pointer-events: none;\n }\n .react-flow__nodesselection-rect {\n position: absolute;\n pointer-events: all;\n cursor: -webkit-grab;\n cursor: grab;\n }\n .react-flow__handle {\n position: absolute;\n pointer-events: none;\n min-width: 5px;\n min-height: 5px;\n width: 6px;\n height: 6px;\n background: #1a192b;\n border: 1px solid white;\n border-radius: 100%;\n }\n .react-flow__handle.connectionindicator {\n pointer-events: all;\n cursor: crosshair;\n }\n .react-flow__handle-bottom {\n top: auto;\n left: 50%;\n bottom: -4px;\n transform: translate(-50%, 0);\n }\n .react-flow__handle-top {\n left: 50%;\n top: -4px;\n transform: translate(-50%, 0);\n }\n .react-flow__handle-left {\n top: 50%;\n left: -4px;\n transform: translate(0, -50%);\n }\n .react-flow__handle-right {\n right: -4px;\n top: 50%;\n transform: translate(0, -50%);\n }\n .react-flow__edgeupdater {\n cursor: move;\n pointer-events: all;\n }\n .react-flow__panel {\n position: absolute;\n z-index: 5;\n margin: 15px;\n }\n .react-flow__panel.top {\n top: 0;\n }\n .react-flow__panel.bottom {\n bottom: 0;\n }\n .react-flow__panel.left {\n left: 0;\n }\n .react-flow__panel.right {\n right: 0;\n }\n .react-flow__panel.center {\n left: 50%;\n transform: translateX(-50%);\n }\n .react-flow__attribution {\n font-size: 10px;\n background: rgba(255, 255, 255, 0.5);\n padding: 2px 3px;\n margin: 0;\n }\n .react-flow__attribution a {\n text-decoration: none;\n color: #999;\n }\n @-webkit-keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n }\n @keyframes dashdraw {\n from {\n stroke-dashoffset: 10;\n }\n }\n .react-flow__edgelabel-renderer {\n position: absolute;\n width: 100%;\n height: 100%;\n pointer-events: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n .react-flow__edge.updating .react-flow__edge-path {\n stroke: #777;\n }\n .react-flow__edge-text {\n font-size: 10px;\n }\n .react-flow__node.selectable:focus,\n .react-flow__node.selectable:focus-visible {\n outline: none;\n }\n .react-flow__node-default,\n .react-flow__node-input,\n .react-flow__node-output,\n .react-flow__node-group {\n padding: 10px;\n border-radius: 3px;\n width: 150px;\n font-size: 12px;\n color: #222;\n text-align: center;\n border-width: 1px;\n border-style: solid;\n border-color: #1a192b;\n background-color: white;\n }\n .react-flow__node-default.selectable:hover,\n .react-flow__node-input.selectable:hover,\n .react-flow__node-output.selectable:hover,\n .react-flow__node-group.selectable:hover {\n box-shadow: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n }\n .react-flow__node-default.selectable.selected,\n .react-flow__node-default.selectable:focus,\n .react-flow__node-default.selectable:focus-visible,\n .react-flow__node-input.selectable.selected,\n .react-flow__node-input.selectable:focus,\n .react-flow__node-input.selectable:focus-visible,\n .react-flow__node-output.selectable.selected,\n .react-flow__node-output.selectable:focus,\n .react-flow__node-output.selectable:focus-visible,\n .react-flow__node-group.selectable.selected,\n .react-flow__node-group.selectable:focus,\n .react-flow__node-group.selectable:focus-visible {\n box-shadow: 0 0 0 0.5px #1a192b;\n }\n .react-flow__node-group {\n background-color: rgba(240, 240, 240, 0.25);\n }\n .react-flow__nodesselection-rect,\n .react-flow__selection {\n background: rgba(0, 89, 220, 0.08);\n border: 1px dotted rgba(0, 89, 220, 0.8);\n }\n .react-flow__nodesselection-rect:focus,\n .react-flow__nodesselection-rect:focus-visible,\n .react-flow__selection:focus,\n .react-flow__selection:focus-visible {\n outline: none;\n }\n .react-flow__controls {\n box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n }\n .react-flow__controls-button {\n border: none;\n background: #fefefe;\n border-bottom: 1px solid #eee;\n box-sizing: content-box;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 16px;\n height: 16px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n padding: 5px;\n }\n .react-flow__controls-button:hover {\n background: #f4f4f4;\n }\n .react-flow__controls-button svg {\n width: 100%;\n max-width: 12px;\n max-height: 12px;\n }\n .react-flow__controls-button:disabled {\n pointer-events: none;\n }\n .react-flow__controls-button:disabled svg {\n fill-opacity: 0.4;\n }\n .react-flow__minimap {\n background-color: #fff;\n }\n .react-flow__resize-control {\n position: absolute;\n }\n .react-flow__resize-control.left,\n .react-flow__resize-control.right {\n cursor: ew-resize;\n }\n .react-flow__resize-control.top,\n .react-flow__resize-control.bottom {\n cursor: ns-resize;\n }\n .react-flow__resize-control.top.left,\n .react-flow__resize-control.bottom.right {\n cursor: nwse-resize;\n }\n .react-flow__resize-control.bottom.left,\n .react-flow__resize-control.top.right {\n cursor: nesw-resize;\n }\n /* handle styles */\n .react-flow__resize-control.handle {\n width: 4px;\n height: 4px;\n border: 1px solid #fff;\n border-radius: 1px;\n background-color: #3367d9;\n transform: translate(-50%, -50%);\n }\n .react-flow__resize-control.handle.left {\n left: 0;\n top: 50%;\n }\n .react-flow__resize-control.handle.right {\n left: 100%;\n top: 50%;\n }\n .react-flow__resize-control.handle.top {\n left: 50%;\n top: 0;\n }\n .react-flow__resize-control.handle.bottom {\n left: 50%;\n top: 100%;\n }\n .react-flow__resize-control.handle.top.left {\n left: 0;\n }\n .react-flow__resize-control.handle.bottom.left {\n left: 0;\n }\n .react-flow__resize-control.handle.top.right {\n left: 100%;\n }\n .react-flow__resize-control.handle.bottom.right {\n left: 100%;\n }\n /* line styles */\n .react-flow__resize-control.line {\n border-color: #3367d9;\n border-width: 0;\n border-style: solid;\n }\n .react-flow__resize-control.line.left,\n .react-flow__resize-control.line.right {\n width: 1px;\n transform: translate(-50%, 0);\n top: 0;\n height: 100%;\n }\n .react-flow__resize-control.line.left {\n left: 0;\n border-left-width: 1px;\n }\n .react-flow__resize-control.line.right {\n left: 100%;\n border-right-width: 1px;\n }\n .react-flow__resize-control.line.top,\n .react-flow__resize-control.line.bottom {\n height: 1px;\n transform: translate(0, -50%);\n left: 0;\n width: 100%;\n }\n .react-flow__resize-control.line.top {\n top: 0;\n border-top-width: 1px;\n }\n .react-flow__resize-control.line.bottom {\n border-bottom-width: 1px;\n top: 100%;\n }\n`;\n"],"names":["flowStyles","process","env","NODE_ENV","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"mappings":";;;AAEO,MAAMA,aAAUC,QAAAC,IAAAC,aAAA,eAAA;AAAA,EAAAC,MAAA;AAAA,EAAAC,QAAA;AAAA,IAAA;AAAA,EAAAD,MAAA;AAAA,EAAAC,QAAA;AAAA,EAAAC,KAAA;AAAA,EAAAC,UAAAC;AAAA;"}
@@ -0,0 +1,7 @@
1
+ import { useContext } from "react";
2
+ import { HvFlowContext } from "../FlowContext/FlowContext.js";
3
+ const useFlowContext = () => useContext(HvFlowContext);
4
+ export {
5
+ useFlowContext
6
+ };
7
+ //# sourceMappingURL=useFlowContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFlowContext.js","sources":["../../../../../src/components/Flow/hooks/useFlowContext.ts"],"sourcesContent":["import { useContext } from \"react\";\n\nimport { HvFlowContext } from \"../FlowContext\";\n\nexport const useFlowContext = () => useContext(HvFlowContext);\n"],"names":["useFlowContext","useContext","HvFlowContext"],"mappings":";;AAIaA,MAAAA,iBAAiBA,MAAMC,WAAWC,aAAa;"}
@@ -0,0 +1,25 @@
1
+ import { useStore } from "reactflow";
2
+ const useFlowNode = (id) => {
3
+ const nodes = useStore((state) => state.getNodes());
4
+ const edges = useStore((state) => state.edges);
5
+ return {
6
+ // self node
7
+ get node() {
8
+ const self = nodes.find((n) => n.id === id);
9
+ return self;
10
+ },
11
+ // parent nodes
12
+ get parentNodes() {
13
+ const connectedEdges = edges.filter((e) => e.target === id);
14
+ const parentNodeArray = connectedEdges.map((e) => {
15
+ const parentNode = nodes.find((n) => n.id === e.source);
16
+ return parentNode;
17
+ });
18
+ return parentNodeArray;
19
+ }
20
+ };
21
+ };
22
+ export {
23
+ useFlowNode
24
+ };
25
+ //# sourceMappingURL=useFlowNode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFlowNode.js","sources":["../../../../../src/components/Flow/hooks/useFlowNode.ts"],"sourcesContent":["import { Edge, Node, useStore } from \"reactflow\";\n\nexport const useFlowNode = (id: string) => {\n const nodes = useStore((state) => state.getNodes());\n const edges = useStore((state) => state.edges);\n\n return {\n // self node\n get node() {\n const self = nodes.find((n: Node) => n.id === id);\n return self;\n },\n\n // parent nodes\n get parentNodes() {\n const connectedEdges = edges.filter((e: Edge) => e.target === id);\n const parentNodeArray = connectedEdges.map((e) => {\n const parentNode = nodes.find((n: Node) => n.id === e.source) as Node;\n return parentNode;\n });\n return parentNodeArray;\n },\n };\n};\n"],"names":["useFlowNode","id","nodes","useStore","state","getNodes","edges","node","self","find","n","parentNodes","connectedEdges","filter","e","target","parentNodeArray","map","parentNode","source"],"mappings":";AAEaA,MAAAA,cAAcA,CAACC,OAAe;AACzC,QAAMC,QAAQC,SAAUC,CAAUA,UAAAA,MAAMC,UAAU;AAClD,QAAMC,QAAQH,SAAUC,CAAUA,UAAAA,MAAME,KAAK;AAEtC,SAAA;AAAA;AAAA,IAEL,IAAIC,OAAO;AACT,YAAMC,OAAON,MAAMO,KAAK,CAACC,MAAYA,EAAET,OAAOA,EAAE;AACzCO,aAAAA;AAAAA,IACT;AAAA;AAAA,IAGA,IAAIG,cAAc;AAChB,YAAMC,iBAAiBN,MAAMO,OAAO,CAACC,MAAYA,EAAEC,WAAWd,EAAE;AAC1De,YAAAA,kBAAkBJ,eAAeK,IAAKH,CAAM,MAAA;AAC1CI,cAAAA,aAAahB,MAAMO,KAAK,CAACC,MAAYA,EAAET,OAAOa,EAAEK,MAAM;AACrDD,eAAAA;AAAAA,MAAAA,CACR;AACMF,aAAAA;AAAAA,IACT;AAAA,EAAA;AAEJ;"}
package/dist/esm/index.js CHANGED
@@ -18,13 +18,17 @@ import { staticClasses as staticClasses8 } from "./components/Flow/Minimap/Minim
18
18
  import { HvFlowMinimap } from "./components/Flow/Minimap/Minimap.js";
19
19
  import { staticClasses as staticClasses9 } from "./components/Flow/Sidebar/Sidebar.styles.js";
20
20
  import { HvFlowSidebar } from "./components/Flow/Sidebar/Sidebar.js";
21
+ import { HvFlowEmpty } from "./components/Flow/Empty/Empty.js";
21
22
  import { HvFlow } from "./components/Flow/Flow.js";
22
23
  import { staticClasses as staticClasses10 } from "./components/Flow/Node/Node.styles.js";
23
24
  import { HvFlowNode } from "./components/Flow/Node/Node.js";
25
+ import { useFlowNode } from "./components/Flow/hooks/useFlowNode.js";
26
+ import { useFlowContext } from "./components/Flow/hooks/useFlowContext.js";
24
27
  export {
25
28
  HvFlow,
26
29
  HvFlowBackground,
27
30
  HvFlowControls,
31
+ HvFlowEmpty,
28
32
  HvFlowMinimap,
29
33
  HvFlowNode,
30
34
  HvFlowSidebar,
@@ -40,6 +44,8 @@ export {
40
44
  staticClasses10 as flowNodeClasses,
41
45
  staticClasses9 as flowSidebarClasses,
42
46
  staticClasses as stepNavigationClasses,
47
+ useFlowContext,
48
+ useFlowNode,
43
49
  staticClasses3 as wizardActionsClasses,
44
50
  staticClasses2 as wizardClasses,
45
51
  staticClasses4 as wizardContainerClasses,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -17,6 +17,7 @@ import { HvButtonProps } from '@hitachivantara/uikit-react-core';
17
17
  import { HvColorAny } from '@hitachivantara/uikit-styles';
18
18
  import { HvDialogProps } from '@hitachivantara/uikit-react-core';
19
19
  import { HvDrawerProps } from '@hitachivantara/uikit-react-core';
20
+ import { HvEmptyStateProps } from '@hitachivantara/uikit-react-core';
20
21
  import type { JSX as JSX_2 } from '@emotion/react/jsx-runtime';
21
22
  import { MiniMapProps } from 'reactflow';
22
23
  import { ModalProps } from '@mui/material';
@@ -62,7 +63,7 @@ export declare const flowSidebarClasses: {
62
63
  groupsContainer: "HvFlowSidebar-groupsContainer";
63
64
  };
64
65
 
65
- declare interface HvDroppableFlowProps<NodeData = any, NodeType extends string | undefined = string | undefined> extends Omit<ReactFlowProps, "nodes" | "edges" | "nodeTypes"> {
66
+ declare interface HvDroppableFlowProps<NodeType extends string | undefined = string | undefined, NodeData = any> extends Omit<ReactFlowProps, "nodes" | "edges" | "nodeTypes"> {
66
67
  /** Flow content: background, controls, and minimap. */
67
68
  children?: React.ReactNode;
68
69
  /** Flow nodes. */
@@ -94,6 +95,19 @@ export declare interface HvFlowBackgroundProps extends Omit<BackgroundProps, "co
94
95
 
95
96
  export declare type HvFlowClasses = ExtractNames<typeof useClasses_8>;
96
97
 
98
+ declare interface HvFlowContextValue<NodeGroups extends keyof any = string> {
99
+ /** Flow nodes types. */
100
+ nodeTypes?: HvFlowNodeTypes<NodeGroups>;
101
+ /** Flow nodes groups. */
102
+ nodeGroups?: HvFlowNodeGroups<NodeGroups>;
103
+ /** Flow nodes groups expanded on sidebar. */
104
+ expandedNodeGroups?: string[];
105
+ /** Flow default actions. */
106
+ defaultActions?: HvFlowDefaultActions[];
107
+ /** Function to set `expandedNodeGroups`. */
108
+ setExpandedNodeGroups?: Dispatch<SetStateAction<string[]>>;
109
+ }
110
+
97
111
  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;
98
112
 
99
113
  export declare type HvFlowControlsPosition = PanelPosition;
@@ -124,6 +138,11 @@ export declare type HvFlowDefaultActions = Omit<HvActionGeneric, "id"> & {
124
138
  id: HvFlowDefaultAction;
125
139
  };
126
140
 
141
+ export declare const HvFlowEmpty: ({ className, ...others }: HvFlowEmptyProps) => JSX_2.Element | null;
142
+
143
+ export declare interface HvFlowEmptyProps extends HvEmptyStateProps {
144
+ }
145
+
127
146
  export declare const HvFlowMinimap: ({ nodeColor, maskColor, maskStrokeColor, nodeStrokeColor, classes: classesProp, className, ...others }: HvFlowMinimapProps) => JSX_2.Element;
128
147
 
129
148
  export declare type HvFlowMinimapClasses = ExtractNames<typeof useClasses_9>;
@@ -145,17 +164,17 @@ export declare const HvFlowNode: ({ id, type, description, expanded, params, act
145
164
 
146
165
  export declare type HvFlowNodeClasses = ExtractNames<typeof useClasses_11>;
147
166
 
148
- export declare interface HvFlowNodeComponentClass<GroupId extends keyof any = string> extends ComponentClass<NodeProps> {
167
+ export declare interface HvFlowNodeComponentClass<GroupId extends keyof any = string, NodeData = any> extends ComponentClass<NodeProps> {
149
168
  /** Metadata used on the HvFlowSidebar component to group the node */
150
- meta?: HvFlowNodeMeta<GroupId>;
169
+ meta?: HvFlowNodeMeta<GroupId, NodeData>;
151
170
  }
152
171
 
153
- export declare type HvFlowNodeComponentType<GroupId extends keyof any = string> = HvFlowNodeComponentClass<GroupId> | HvFlowNodeFunctionComponent<GroupId>;
172
+ export declare type HvFlowNodeComponentType<GroupId extends keyof any = string, NodeData = any> = HvFlowNodeComponentClass<GroupId, NodeData> | HvFlowNodeFunctionComponent<GroupId, NodeData>;
154
173
 
155
174
  /** Node types */
156
- export declare interface HvFlowNodeFunctionComponent<GroupId extends keyof any = string> extends FunctionComponent<NodeProps> {
175
+ export declare interface HvFlowNodeFunctionComponent<GroupId extends keyof any = string, NodeData = any> extends FunctionComponent<NodeProps> {
157
176
  /** Metadata used on the HvFlowSidebar component to group the node */
158
- meta?: HvFlowNodeMeta<GroupId>;
177
+ meta?: HvFlowNodeMeta<GroupId, NodeData>;
159
178
  }
160
179
 
161
180
  /** Node groups */
@@ -174,17 +193,18 @@ export declare type HvFlowNodeInput = {
174
193
  accepts?: string[];
175
194
  };
176
195
 
177
- export declare type HvFlowNodeMeta<GroupId extends keyof any = string> = {
196
+ export declare type HvFlowNodeMeta<GroupId extends keyof any = string, NodeData = any> = {
178
197
  label: string;
179
198
  groupId: GroupId;
180
199
  inputs?: HvFlowNodeInput[];
181
200
  outputs?: HvFlowNodeOutput[];
201
+ data?: NodeData;
182
202
  };
183
203
 
184
204
  export declare type HvFlowNodeOutput = {
185
205
  label: string;
186
206
  isMandatory?: boolean;
187
- provides?: string[];
207
+ provides?: string;
188
208
  };
189
209
 
190
210
  export declare type HvFlowNodeParam = {
@@ -200,10 +220,6 @@ export declare interface HvFlowNodeProps extends Omit<HvBaseProps, "id">, NodePr
200
220
  description: string;
201
221
  /** Node expanded */
202
222
  expanded?: boolean;
203
- /** Node inputs */
204
- inputs?: HvFlowNodeInput[];
205
- /** Node outputs */
206
- outputs?: HvFlowNodeOutput[];
207
223
  /** Node parameters */
208
224
  params?: HvFlowNodeParam[];
209
225
  /** Node actions */
@@ -216,15 +232,15 @@ export declare interface HvFlowNodeProps extends Omit<HvBaseProps, "id">, NodePr
216
232
  classes?: HvFlowNodeClasses;
217
233
  }
218
234
 
219
- export declare type HvFlowNodeTypes<GroupId extends keyof any = string> = {
220
- [key: string]: HvFlowNodeComponentType<GroupId>;
235
+ export declare type HvFlowNodeTypes<GroupId extends keyof any = string, NodeData = any> = {
236
+ [key: string]: HvFlowNodeComponentType<GroupId, NodeData>;
221
237
  };
222
238
 
223
- export declare interface HvFlowProps<NodeData = any, NodeType extends string | undefined = string | undefined, NodeGroups extends keyof any = string> extends HvDroppableFlowProps<NodeData, NodeType> {
239
+ export declare interface HvFlowProps<NodeGroups extends keyof any = string, NodeType extends string | undefined = string | undefined, NodeData = any> extends HvDroppableFlowProps<NodeType, NodeData> {
224
240
  /** Flow nodes groups. */
225
241
  nodeGroups?: HvFlowNodeGroups<NodeGroups>;
226
242
  /** Flow nodes types. */
227
- nodeTypes?: HvFlowNodeTypes<NodeGroups>;
243
+ nodeTypes?: HvFlowNodeTypes<NodeGroups, NodeData>;
228
244
  /** Flow sidebar. */
229
245
  sidebar?: React.ReactNode;
230
246
  /** Flow default actions. */
@@ -633,6 +649,13 @@ declare const useClasses_9: (classesProp?: Partial<Record<"root", string>>, addS
633
649
  cx: (...args: any) => string;
634
650
  };
635
651
 
652
+ export declare const useFlowContext: () => HvFlowContextValue<string>;
653
+
654
+ export declare const useFlowNode: (id: string) => {
655
+ readonly node: Node_2 | undefined;
656
+ readonly parentNodes: Node_2[];
657
+ };
658
+
636
659
  export declare const wizardActionsClasses: {
637
660
  buttonWidth: "HvWizardActions-buttonWidth";
638
661
  actionsContainer: "HvWizardActions-actionsContainer";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-lab",
3
- "version": "5.10.0",
3
+ "version": "5.11.1",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "Contributed React components for the NEXT UI Kit.",
@@ -32,11 +32,11 @@
32
32
  "@dnd-kit/core": "^6.0.8",
33
33
  "@dnd-kit/modifiers": "^6.0.1",
34
34
  "@emotion/css": "^11.11.0",
35
- "@hitachivantara/uikit-react-core": "^5.30.0",
36
- "@hitachivantara/uikit-react-icons": "^5.6.8",
37
- "@hitachivantara/uikit-styles": "^5.13.0",
35
+ "@hitachivantara/uikit-react-core": "^5.31.0",
36
+ "@hitachivantara/uikit-react-icons": "^5.6.9",
37
+ "@hitachivantara/uikit-styles": "^5.13.1",
38
38
  "lodash": "^4.17.21",
39
- "reactflow": "^11.8.3",
39
+ "reactflow": "^11.9.4",
40
40
  "uid": "^2.0.2",
41
41
  "usehooks-ts": "^2.9.1",
42
42
  "zustand": "^4.4.1"
@@ -48,7 +48,7 @@
48
48
  "access": "public",
49
49
  "directory": "package"
50
50
  },
51
- "gitHead": "5aea431bfac59583ef2aa50bb946ba9d7be6a6ba",
51
+ "gitHead": "a9944a858c166b604a1320c48bbec48c90bac568",
52
52
  "main": "dist/cjs/index.cjs",
53
53
  "exports": {
54
54
  ".": {