@hitachivantara/uikit-react-lab 5.34.2 → 5.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/cjs/Flow/DroppableFlow.cjs +7 -5
  2. package/dist/cjs/Flow/Flow.cjs +10 -19
  3. package/dist/cjs/Flow/FlowContext/FlowContext.cjs +1 -3
  4. package/dist/cjs/Flow/Node/Node.cjs +17 -17
  5. package/dist/cjs/Flow/Sidebar/Sidebar.cjs +41 -61
  6. package/dist/cjs/Flow/Sidebar/Sidebar.styles.cjs +0 -3
  7. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +8 -8
  8. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +5 -5
  9. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +21 -22
  10. package/dist/esm/Flow/DroppableFlow.js +7 -5
  11. package/dist/esm/Flow/DroppableFlow.js.map +1 -1
  12. package/dist/esm/Flow/Flow.js +10 -19
  13. package/dist/esm/Flow/Flow.js.map +1 -1
  14. package/dist/esm/Flow/FlowContext/FlowContext.js +1 -3
  15. package/dist/esm/Flow/FlowContext/FlowContext.js.map +1 -1
  16. package/dist/esm/Flow/Node/Node.js +17 -17
  17. package/dist/esm/Flow/Node/Node.js.map +1 -1
  18. package/dist/esm/Flow/Sidebar/Sidebar.js +42 -62
  19. package/dist/esm/Flow/Sidebar/Sidebar.js.map +1 -1
  20. package/dist/esm/Flow/Sidebar/Sidebar.styles.js +0 -3
  21. package/dist/esm/Flow/Sidebar/Sidebar.styles.js.map +1 -1
  22. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.js +8 -8
  23. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.js.map +1 -1
  24. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +5 -5
  25. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js.map +1 -1
  26. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +21 -22
  27. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js.map +1 -1
  28. package/dist/types/index.d.ts +33 -52
  29. package/package.json +3 -3
  30. package/dist/cjs/Flow/Sidebar/utils.cjs +0 -43
  31. package/dist/esm/Flow/Sidebar/utils.js +0 -43
  32. package/dist/esm/Flow/Sidebar/utils.js.map +0 -1
@@ -1,5 +1,4 @@
1
1
  import { BackgroundProps } from 'reactflow';
2
- import { ComponentClass } from 'react';
3
2
  import { ControlProps } from 'reactflow';
4
3
  import { CSSInterpolation } from '@emotion/serialize';
5
4
  import { default as default_2 } from 'react';
@@ -9,7 +8,6 @@ import { DragEndEvent } from '@dnd-kit/core';
9
8
  import { DragOverlayProps } from '@dnd-kit/core';
10
9
  import { Edge } from 'reactflow';
11
10
  import { ExtractNames } from '@hitachivantara/uikit-react-core';
12
- import { FC } from 'react';
13
11
  import { GetMiniMapNodeAttribute } from 'reactflow';
14
12
  import { HTMLAttributes } from 'react';
15
13
  import { HvActionGeneric } from '@hitachivantara/uikit-react-core';
@@ -98,10 +96,10 @@ export declare const flowBaseNodeClasses: {
98
96
  footerContainer: "HvFlowBaseNode-footerContainer";
99
97
  inputContainer: "HvFlowBaseNode-inputContainer";
100
98
  handle: "HvFlowBaseNode-handle";
101
- contentContainer: "HvFlowBaseNode-contentContainer";
102
99
  headerContainer: "HvFlowBaseNode-headerContainer";
103
100
  inputsTitleContainer: "HvFlowBaseNode-inputsTitleContainer";
104
101
  outputsTitleContainer: "HvFlowBaseNode-outputsTitleContainer";
102
+ contentContainer: "HvFlowBaseNode-contentContainer";
105
103
  inputsContainer: "HvFlowBaseNode-inputsContainer";
106
104
  outputsContainer: "HvFlowBaseNode-outputsContainer";
107
105
  inputGroupContainer: "HvFlowBaseNode-inputGroupContainer";
@@ -127,10 +125,10 @@ export declare const flowNodeClasses: {
127
125
  footerContainer: "HvFlowNode-footerContainer";
128
126
  inputContainer: "HvFlowNode-inputContainer";
129
127
  handle: "HvFlowNode-handle";
130
- contentContainer: "HvFlowNode-contentContainer";
131
128
  headerContainer: "HvFlowNode-headerContainer";
132
129
  inputsTitleContainer: "HvFlowNode-inputsTitleContainer";
133
130
  outputsTitleContainer: "HvFlowNode-outputsTitleContainer";
131
+ contentContainer: "HvFlowNode-contentContainer";
134
132
  inputsContainer: "HvFlowNode-inputsContainer";
135
133
  outputsContainer: "HvFlowNode-outputsContainer";
136
134
  inputGroupContainer: "HvFlowNode-inputGroupContainer";
@@ -148,11 +146,10 @@ export declare const flowNodeClasses: {
148
146
  export declare const flowSidebarClasses: {
149
147
  description: "HvFlowSidebar-description";
150
148
  titleContainer: "HvFlowSidebar-titleContainer";
151
- drawerPaper: "HvFlowSidebar-drawerPaper";
152
149
  contentContainer: "HvFlowSidebar-contentContainer";
150
+ drawerPaper: "HvFlowSidebar-drawerPaper";
153
151
  searchRoot: "HvFlowSidebar-searchRoot";
154
152
  groupsContainer: "HvFlowSidebar-groupsContainer";
155
- nodeType: "HvFlowSidebar-nodeType";
156
153
  };
157
154
 
158
155
  /**
@@ -319,10 +316,10 @@ export declare const hvDashboardNodeClasses: {
319
316
  footerContainer: "HvDashboardNode-footerContainer";
320
317
  inputContainer: "HvDashboardNode-inputContainer";
321
318
  handle: "HvDashboardNode-handle";
322
- contentContainer: "HvDashboardNode-contentContainer";
323
319
  headerContainer: "HvDashboardNode-headerContainer";
324
320
  inputsTitleContainer: "HvDashboardNode-inputsTitleContainer";
325
321
  outputsTitleContainer: "HvDashboardNode-outputsTitleContainer";
322
+ contentContainer: "HvDashboardNode-contentContainer";
326
323
  inputsContainer: "HvDashboardNode-inputsContainer";
327
324
  outputsContainer: "HvDashboardNode-outputsContainer";
328
325
  inputGroupContainer: "HvDashboardNode-inputGroupContainer";
@@ -367,6 +364,8 @@ export declare interface HvDashboardProps extends Omit<ResponsiveProps, "cols">
367
364
  declare interface HvDroppableFlowProps<NodeType extends string | undefined = string | undefined, NodeData = any> extends Omit<ReactFlowProps, "nodes" | "edges" | "nodeTypes"> {
368
365
  /** Flow content: background, controls, and minimap. */
369
366
  children?: React.ReactNode;
367
+ /** Flow nodes types. */
368
+ nodeTypes?: HvFlowNodeTypes<NodeData>;
370
369
  /** Flow nodes. */
371
370
  nodes?: Node_2<NodeData, NodeType>[];
372
371
  /** Flow edges. */
@@ -399,7 +398,7 @@ declare interface HvDroppableFlowProps<NodeType extends string | undefined = str
399
398
  *
400
399
  * DISCLAIMER: This component is a work in progress and there might be breaking changes.
401
400
  */
402
- export declare const HvFlow: ({ nodeTypes, nodeGroups, sidebar, defaultActions, dndContextProps, ...others }: HvFlowProps) => JSX_2.Element;
401
+ export declare const HvFlow: ({ nodeGroups, sidebar, defaultActions, dndContextProps, ...others }: HvFlowProps) => JSX_2.Element;
403
402
 
404
403
  export declare const HvFlowBackground: ({ color, ...others }: HvFlowBackgroundProps) => JSX_2.Element;
405
404
 
@@ -444,8 +443,6 @@ export declare type HvFlowBuiltInActions = Omit<HvFlowNodeAction, "id" | "callba
444
443
  export declare type HvFlowClasses = ExtractNames<typeof useClasses_4>;
445
444
 
446
445
  declare interface HvFlowContextValue<NodeGroups extends keyof any = string> {
447
- /** Flow nodes types. */
448
- nodeTypes?: HvFlowNodeTypes<NodeGroups>;
449
446
  /** Flow nodes groups. */
450
447
  nodeGroups?: HvFlowNodeGroups<NodeGroups>;
451
448
  /** Flow nodes groups expanded on sidebar. */
@@ -480,6 +477,13 @@ export declare const HvFlowEmpty: ({ className, ...others }: HvFlowEmptyProps) =
480
477
  export declare interface HvFlowEmptyProps extends HvEmptyStateProps {
481
478
  }
482
479
 
480
+ export declare interface HvFlowGroupItem<NodeData = any> extends Pick<HvFlowNodeProps, "params" | "subtitle"> {
481
+ /** The node identifier registered in `nodeTypes` */
482
+ nodeType: string;
483
+ label: string;
484
+ data?: NodeData;
485
+ }
486
+
483
487
  export declare type HvFlowInstance<NodeData = any, EdgeData = any> = ReactFlowInstance<NodeData, EdgeData>;
484
488
 
485
489
  export declare const HvFlowMinimap: ({ nodeColor, maskColor, maskStrokeColor, nodeStrokeColor, classes: classesProp, className, ...others }: HvFlowMinimapProps) => JSX_2.Element;
@@ -499,7 +503,7 @@ export declare interface HvFlowMinimapProps<NodeData = any> extends Omit<MiniMap
499
503
  classes?: HvFlowMinimapClasses;
500
504
  }
501
505
 
502
- export declare const HvFlowNode: ({ id, type, headerItems, description, actions, actionCallback, onAction, maxVisibleActions, expanded, actionsIconOnly, params, nodeDefaults, classes: classesProp, labels: labelsProps, children, expandParamsButtonProps, disableInlineEdit, ...props }: HvFlowNodeProps<unknown>) => JSX_2.Element;
506
+ export declare const HvFlowNode: ({ id, type, headerItems, actions, actionCallback, onAction, maxVisibleActions, expanded, actionsIconOnly, params, classes: classesProp, labels: labelsProps, children, expandParamsButtonProps, disableInlineEdit, title: titleProp, subtitle: subtitleProp, description, groupId, color: colorProp, icon: iconProp, ...props }: HvFlowNodeProps<unknown>) => JSX_2.Element;
503
507
 
504
508
  export declare interface HvFlowNodeAction extends HvActionGeneric {
505
509
  callback?: (node: Node_2) => void;
@@ -507,20 +511,8 @@ export declare interface HvFlowNodeAction extends HvActionGeneric {
507
511
 
508
512
  export declare type HvFlowNodeClasses = ExtractNames<typeof useClasses_8>;
509
513
 
510
- export declare interface HvFlowNodeComponentClass<GroupId extends keyof any = string, NodeData = any> extends ComponentClass<NodeProps>, NodeExtras<GroupId, NodeData> {
511
- }
512
-
513
- export declare type HvFlowNodeComponentType<GroupId extends keyof any = string, NodeData = any> = HvFlowNodeComponentClass<GroupId, NodeData> | HvFlowNodeFC<GroupId, NodeData>;
514
-
515
- export declare type HvFlowNodeDefaults = {
516
- title?: string;
517
- subTitle?: string;
518
- color?: string;
519
- icon?: default_2.ReactNode;
520
- };
521
-
522
514
  /** HvFlowNode component type. @extends React.FC */
523
- export declare interface HvFlowNodeFC<GroupId extends keyof any = string, NodeData = any> extends FC<NodeProps<NodeData>>, NodeExtras<GroupId, NodeData> {
515
+ export declare interface HvFlowNodeFC<NodeData = any> extends React.FC<NodeProps<NodeData>> {
524
516
  }
525
517
 
526
518
  /** Node groups */
@@ -529,6 +521,7 @@ export declare interface HvFlowNodeGroup {
529
521
  description?: string;
530
522
  color?: HvColorAny;
531
523
  icon?: React.ReactNode;
524
+ items?: HvFlowGroupItem[];
532
525
  }
533
526
 
534
527
  export declare type HvFlowNodeGroups<GroupId extends keyof any = string> = Record<GroupId, HvFlowNodeGroup>;
@@ -586,12 +579,14 @@ export declare interface HvFlowNodeProps<T = any> extends HvFlowBaseNodeProps<T>
586
579
  actionsIconOnly?: HvActionsGenericProps["iconOnly"];
587
580
  /** Node maximum number of actions visible. */
588
581
  maxVisibleActions?: HvActionsGenericProps["maxVisibleActions"];
582
+ /** Node subtitle - this is typically the node "name" */
583
+ subtitle?: string;
584
+ /** Node group ID */
585
+ groupId?: string;
589
586
  /** Node expanded */
590
587
  expanded?: boolean;
591
588
  /** Node parameters */
592
589
  params?: HvFlowNodeParam[];
593
- /** A set of node default values for when there are no groups to fetch this data from. */
594
- nodeDefaults?: HvFlowNodeDefaults;
595
590
  /** Props to be passed to the expand parameters button. */
596
591
  expandParamsButtonProps?: HvButtonProps;
597
592
  /** Labels used on the node. */
@@ -624,20 +619,11 @@ export declare interface HvFlowNodeTextParam extends HvFlowNodeSharedParam {
624
619
  type: "text";
625
620
  }
626
621
 
627
- /** Metadata used on the `HvFlowSidebar` component to group the node */
628
- export declare type HvFlowNodeTypeMeta<GroupId extends keyof any = string, NodeData = any> = {
629
- label: string;
630
- groupId?: GroupId;
631
- data?: NodeData;
632
- };
633
-
634
- export declare type HvFlowNodeTypes<GroupId extends keyof any = string, NodeData = any> = Record<string, HvFlowNodeComponentType<GroupId, NodeData>>;
622
+ export declare type HvFlowNodeTypes<NodeData = any> = Record<string, HvFlowNodeFC<NodeData>>;
635
623
 
636
624
  export declare interface HvFlowProps<NodeGroups extends keyof any = string, NodeType extends string | undefined = string | undefined, NodeData = any> extends HvDroppableFlowProps<NodeType, NodeData> {
637
625
  /** Flow nodes groups. */
638
626
  nodeGroups?: HvFlowNodeGroups<NodeGroups>;
639
- /** Flow nodes types. */
640
- nodeTypes?: HvFlowNodeTypes<NodeGroups, NodeData>;
641
627
  /** Flow sidebar. */
642
628
  sidebar?: React.ReactNode;
643
629
  /** Flow default actions. */
@@ -650,7 +636,7 @@ export declare interface HvFlowProps<NodeGroups extends keyof any = string, Node
650
636
  dndContextProps?: Pick<DndContextProps, "accessibility">;
651
637
  }
652
638
 
653
- export declare const HvFlowSidebar: ({ id, title, description, anchor, buttonTitle, classes: classesProp, labels: labelsProps, dragOverlayProps, defaultGroupProps, ...others }: HvFlowSidebarProps) => JSX_2.Element;
639
+ export declare const HvFlowSidebar: ({ id, title, description, anchor, buttonTitle, flatten, classes: classesProp, labels: labelsProps, dragOverlayProps, ...others }: HvFlowSidebarProps) => JSX_2.Element;
654
640
 
655
641
  export declare type HvFlowSidebarClasses = ExtractNames<typeof useClasses_6>;
656
642
 
@@ -659,6 +645,8 @@ export declare interface HvFlowSidebarProps extends Omit<HvDrawerProps, "classes
659
645
  title?: string;
660
646
  /** Sidebar description. */
661
647
  description?: string;
648
+ /** Flatten sidebar items */
649
+ flatten?: boolean;
662
650
  /** A Jss Object used to override or extend the styles applied to the component. */
663
651
  classes?: HvFlowSidebarClasses;
664
652
  /** Labels used on the sidebar. */
@@ -669,8 +657,6 @@ export declare interface HvFlowSidebarProps extends Omit<HvDrawerProps, "classes
669
657
  * More information can be found in the [Dnd Kit documentation](https://docs.dndkit.com/api-documentation/draggable/drag-overlay).
670
658
  */
671
659
  dragOverlayProps?: DragOverlayProps;
672
- /** Props to be applied to the default nodes group. */
673
- defaultGroupProps?: HvFlowNodeGroup;
674
660
  }
675
661
 
676
662
  declare type HvStepClasses = ExtractNames<typeof useClasses_11>;
@@ -880,10 +866,6 @@ export declare interface HvWizardTitleProps extends HvBaseProps {
880
866
  classes?: HvWizardTitleClasses;
881
867
  }
882
868
 
883
- declare type NodeExtras<GroupId extends keyof any = string, NodeData = any> = {
884
- meta?: HvFlowNodeTypeMeta<GroupId, NodeData>;
885
- };
886
-
887
869
  export declare const stepNavigationClasses: {
888
870
  root: "HvStepNavigation-root";
889
871
  separator: "HvStepNavigation-separator";
@@ -1058,15 +1040,14 @@ declare const useClasses_5: (classesProp?: Partial<Record<"root", string>>, addS
1058
1040
  cx: (...args: any) => string;
1059
1041
  };
1060
1042
 
1061
- declare const useClasses_6: (classesProp?: Partial<Record<"description" | "titleContainer" | "drawerPaper" | "contentContainer" | "searchRoot" | "groupsContainer" | "nodeType", string>>, addStatic?: boolean) => {
1043
+ declare const useClasses_6: (classesProp?: Partial<Record<"description" | "titleContainer" | "contentContainer" | "drawerPaper" | "searchRoot" | "groupsContainer", string>>, addStatic?: boolean) => {
1062
1044
  classes: {
1063
1045
  description: string;
1064
1046
  titleContainer: string;
1065
- drawerPaper: string;
1066
1047
  contentContainer: string;
1048
+ drawerPaper: string;
1067
1049
  searchRoot: string;
1068
1050
  groupsContainer: string;
1069
- nodeType: string;
1070
1051
  };
1071
1052
  css: {
1072
1053
  (template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
@@ -1075,7 +1056,7 @@ declare const useClasses_6: (classesProp?: Partial<Record<"description" | "title
1075
1056
  cx: (...args: any) => string;
1076
1057
  };
1077
1058
 
1078
- declare const useClasses_7: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "footerContainer" | "inputContainer" | "handle" | "contentContainer" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected", string>>, addStatic?: boolean) => {
1059
+ declare const useClasses_7: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "footerContainer" | "inputContainer" | "handle" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "contentContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected", string>>, addStatic?: boolean) => {
1079
1060
  classes: {
1080
1061
  root: string;
1081
1062
  title: string;
@@ -1084,10 +1065,10 @@ declare const useClasses_7: (classesProp?: Partial<Record<"root" | "title" | "ti
1084
1065
  footerContainer: string;
1085
1066
  inputContainer: string;
1086
1067
  handle: string;
1087
- contentContainer: string;
1088
1068
  headerContainer: string;
1089
1069
  inputsTitleContainer: string;
1090
1070
  outputsTitleContainer: string;
1071
+ contentContainer: string;
1091
1072
  inputsContainer: string;
1092
1073
  outputsContainer: string;
1093
1074
  inputGroupContainer: string;
@@ -1102,7 +1083,7 @@ declare const useClasses_7: (classesProp?: Partial<Record<"root" | "title" | "ti
1102
1083
  cx: (...args: any) => string;
1103
1084
  };
1104
1085
 
1105
- declare const useClasses_8: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "actions" | "footerContainer" | "inputContainer" | "handle" | "contentContainer" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected" | "subtitleContainer" | "subtitle" | "inlineEditRoot" | "inlineEditButton" | "actionsButton" | "paramsContainer", string>>, addStatic?: boolean) => {
1086
+ declare const useClasses_8: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "actions" | "footerContainer" | "inputContainer" | "handle" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "contentContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected" | "subtitleContainer" | "subtitle" | "inlineEditRoot" | "inlineEditButton" | "actionsButton" | "paramsContainer", string>>, addStatic?: boolean) => {
1106
1087
  classes: {
1107
1088
  root: string;
1108
1089
  title: string;
@@ -1112,10 +1093,10 @@ declare const useClasses_8: (classesProp?: Partial<Record<"root" | "title" | "ti
1112
1093
  footerContainer: string;
1113
1094
  inputContainer: string;
1114
1095
  handle: string;
1115
- contentContainer: string;
1116
1096
  headerContainer: string;
1117
1097
  inputsTitleContainer: string;
1118
1098
  outputsTitleContainer: string;
1099
+ contentContainer: string;
1119
1100
  inputsContainer: string;
1120
1101
  outputsContainer: string;
1121
1102
  inputGroupContainer: string;
@@ -1136,7 +1117,7 @@ declare const useClasses_8: (classesProp?: Partial<Record<"root" | "title" | "ti
1136
1117
  cx: (...args: any) => string;
1137
1118
  };
1138
1119
 
1139
- declare const useClasses_9: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "empty" | "actions" | "footerContainer" | "inputContainer" | "handle" | "contentContainer" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected" | "subtitleContainer" | "subtitle" | "inlineEditRoot" | "inlineEditButton" | "actionsButton" | "paramsContainer", string>>, addStatic?: boolean) => {
1120
+ declare const useClasses_9: (classesProp?: Partial<Record<"root" | "title" | "titleContainer" | "mandatory" | "empty" | "actions" | "footerContainer" | "inputContainer" | "handle" | "headerContainer" | "inputsTitleContainer" | "outputsTitleContainer" | "contentContainer" | "inputsContainer" | "outputsContainer" | "inputGroupContainer" | "outputGroupContainer" | "outputContainer" | "handleConnected" | "subtitleContainer" | "subtitle" | "inlineEditRoot" | "inlineEditButton" | "actionsButton" | "paramsContainer", string>>, addStatic?: boolean) => {
1140
1121
  classes: {
1141
1122
  root: string;
1142
1123
  title: string;
@@ -1147,10 +1128,10 @@ declare const useClasses_9: (classesProp?: Partial<Record<"root" | "title" | "ti
1147
1128
  footerContainer: string;
1148
1129
  inputContainer: string;
1149
1130
  handle: string;
1150
- contentContainer: string;
1151
1131
  headerContainer: string;
1152
1132
  inputsTitleContainer: string;
1153
1133
  outputsTitleContainer: string;
1134
+ contentContainer: string;
1154
1135
  inputsContainer: string;
1155
1136
  outputsContainer: string;
1156
1137
  inputGroupContainer: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-lab",
3
- "version": "5.34.2",
3
+ "version": "5.35.0",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "Contributed React components for the NEXT UI Kit.",
@@ -32,7 +32,7 @@
32
32
  "@dnd-kit/core": "^6.1.0",
33
33
  "@dnd-kit/modifiers": "^6.0.1",
34
34
  "@emotion/css": "^11.11.0",
35
- "@hitachivantara/uikit-react-core": "^5.64.5",
35
+ "@hitachivantara/uikit-react-core": "^5.64.6",
36
36
  "@hitachivantara/uikit-react-icons": "^5.9.10",
37
37
  "@hitachivantara/uikit-styles": "^5.29.0",
38
38
  "@types/react-grid-layout": "^1.3.5",
@@ -49,7 +49,7 @@
49
49
  "access": "public",
50
50
  "directory": "package"
51
51
  },
52
- "gitHead": "2d37cd09f6d809c3b09699ba280360b4fbfb4199",
52
+ "gitHead": "93be516ca73955946f89528b754be973056fea18",
53
53
  "exports": {
54
54
  ".": {
55
55
  "require": "./dist/cjs/index.cjs",
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const buildGroups = (nodeGroups, nodeTypes, defaultGroupProps) => {
4
- if (!nodeGroups)
5
- return {};
6
- return Object.entries(nodeGroups).reduce(
7
- (acc, curr) => {
8
- const nodesWithGroupId = [];
9
- const nodesWithoutGroupId = [];
10
- if (nodeTypes) {
11
- for (const [nodeType, node] of Object.entries(nodeTypes)) {
12
- if (node.meta?.groupId === curr[0]) {
13
- nodesWithGroupId.push({
14
- type: nodeType,
15
- label: node.meta?.label,
16
- data: node.meta?.data
17
- });
18
- } else if (!node.meta?.groupId) {
19
- nodesWithoutGroupId.push({
20
- type: nodeType,
21
- label: node.meta?.label || "",
22
- data: node.meta?.data
23
- });
24
- }
25
- }
26
- }
27
- acc[curr[0]] = {
28
- ...curr[1],
29
- nodes: nodesWithGroupId
30
- };
31
- if (nodesWithoutGroupId.length > 0) {
32
- acc.Default = {
33
- label: "Default",
34
- nodes: nodesWithoutGroupId,
35
- ...defaultGroupProps
36
- };
37
- }
38
- return acc;
39
- },
40
- {}
41
- );
42
- };
43
- exports.buildGroups = buildGroups;
@@ -1,43 +0,0 @@
1
- const buildGroups = (nodeGroups, nodeTypes, defaultGroupProps) => {
2
- if (!nodeGroups)
3
- return {};
4
- return Object.entries(nodeGroups).reduce(
5
- (acc, curr) => {
6
- const nodesWithGroupId = [];
7
- const nodesWithoutGroupId = [];
8
- if (nodeTypes) {
9
- for (const [nodeType, node] of Object.entries(nodeTypes)) {
10
- if (node.meta?.groupId === curr[0]) {
11
- nodesWithGroupId.push({
12
- type: nodeType,
13
- label: node.meta?.label,
14
- data: node.meta?.data
15
- });
16
- } else if (!node.meta?.groupId) {
17
- nodesWithoutGroupId.push({
18
- type: nodeType,
19
- label: node.meta?.label || "",
20
- data: node.meta?.data
21
- });
22
- }
23
- }
24
- }
25
- acc[curr[0]] = {
26
- ...curr[1],
27
- nodes: nodesWithGroupId
28
- };
29
- if (nodesWithoutGroupId.length > 0) {
30
- acc.Default = {
31
- label: "Default",
32
- nodes: nodesWithoutGroupId,
33
- ...defaultGroupProps
34
- };
35
- }
36
- return acc;
37
- },
38
- {}
39
- );
40
- };
41
- export {
42
- buildGroups
43
- };
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sources":["../../../../src/Flow/Sidebar/utils.ts"],"sourcesContent":["import { HvFlowContextValue } from \"../FlowContext\";\nimport { HvFlowNodeGroup } from \"../types\";\nimport {\n HvFlowSidebarGroupNode,\n HvFlowSidebarGroupNodes,\n} from \"./SidebarGroup\";\n\ntype NodeGroup = HvFlowNodeGroup & { nodes: HvFlowSidebarGroupNodes };\n\nexport const buildGroups = (\n nodeGroups: HvFlowContextValue[\"nodeGroups\"],\n nodeTypes: HvFlowContextValue[\"nodeTypes\"],\n defaultGroupProps?: HvFlowNodeGroup,\n) => {\n if (!nodeGroups) return {};\n\n return Object.entries(nodeGroups).reduce(\n (acc, curr) => {\n const nodesWithGroupId: HvFlowSidebarGroupNode[] = [];\n const nodesWithoutGroupId: HvFlowSidebarGroupNode[] = [];\n\n if (nodeTypes) {\n for (const [nodeType, node] of Object.entries(nodeTypes)) {\n if (node.meta?.groupId === curr[0]) {\n nodesWithGroupId.push({\n type: nodeType,\n label: node.meta?.label,\n data: node.meta?.data,\n });\n } else if (!node.meta?.groupId) {\n nodesWithoutGroupId.push({\n type: nodeType,\n label: node.meta?.label || \"\",\n data: node.meta?.data,\n });\n }\n }\n }\n\n acc[curr[0]] = {\n ...curr[1],\n nodes: nodesWithGroupId,\n };\n\n // Create a \"Default\" group for nodes without a groupId\n if (nodesWithoutGroupId.length > 0) {\n acc.Default = {\n label: \"Default\",\n nodes: nodesWithoutGroupId,\n ...defaultGroupProps,\n };\n }\n\n return acc;\n },\n {} as Record<string, NodeGroup>,\n );\n};\n"],"names":[],"mappings":"AASO,MAAM,cAAc,CACzB,YACA,WACA,sBACG;AACH,MAAI,CAAC;AAAY,WAAO;AAEjB,SAAA,OAAO,QAAQ,UAAU,EAAE;AAAA,IAChC,CAAC,KAAK,SAAS;AACb,YAAM,mBAA6C,CAAA;AACnD,YAAM,sBAAgD,CAAA;AAEtD,UAAI,WAAW;AACb,mBAAW,CAAC,UAAU,IAAI,KAAK,OAAO,QAAQ,SAAS,GAAG;AACxD,cAAI,KAAK,MAAM,YAAY,KAAK,CAAC,GAAG;AAClC,6BAAiB,KAAK;AAAA,cACpB,MAAM;AAAA,cACN,OAAO,KAAK,MAAM;AAAA,cAClB,MAAM,KAAK,MAAM;AAAA,YAAA,CAClB;AAAA,UACQ,WAAA,CAAC,KAAK,MAAM,SAAS;AAC9B,gCAAoB,KAAK;AAAA,cACvB,MAAM;AAAA,cACN,OAAO,KAAK,MAAM,SAAS;AAAA,cAC3B,MAAM,KAAK,MAAM;AAAA,YAAA,CAClB;AAAA,UACH;AAAA,QACF;AAAA,MACF;AAEI,UAAA,KAAK,CAAC,CAAC,IAAI;AAAA,QACb,GAAG,KAAK,CAAC;AAAA,QACT,OAAO;AAAA,MAAA;AAIL,UAAA,oBAAoB,SAAS,GAAG;AAClC,YAAI,UAAU;AAAA,UACZ,OAAO;AAAA,UACP,OAAO;AAAA,UACP,GAAG;AAAA,QAAA;AAAA,MAEP;AAEO,aAAA;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EAAA;AAEL;"}