UNPKG

@hitachivantara/uikit-react-lab

Version:

Contributed React components for the NEXT UI Kit.

34 lines (33 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const jsxRuntime = require("react/jsx-runtime"); const core = require("@dnd-kit/core"); const modifiers = require("@dnd-kit/modifiers"); const reactflow = require("reactflow"); const DroppableFlow = require("./DroppableFlow.cjs"); const FlowContext = require("./FlowContext/FlowContext.cjs"); const HvFlow = ({ nodeGroups, sidebar, defaultActions, dndContextProps, ...others }) => { const sensors = core.useSensors( core.useSensor(core.PointerSensor), core.useSensor(core.KeyboardSensor) ); return /* @__PURE__ */ jsxRuntime.jsx(reactflow.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FlowContext.HvFlowProvider, { nodeGroups, defaultActions, children: /* @__PURE__ */ jsxRuntime.jsxs( core.DndContext, { sensors, modifiers: [modifiers.restrictToWindowEdges], ...dndContextProps, children: [ /* @__PURE__ */ jsxRuntime.jsx(DroppableFlow.HvDroppableFlow, { ...others }), sidebar ] } ) }) }); }; exports.HvFlow = HvFlow;