@xyo-network/react-node-renderer 2.72.5 → 2.72.6

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.
package/package.json CHANGED
@@ -23,10 +23,10 @@
23
23
  "@xyo-network/module-events": "^2.94.40",
24
24
  "@xyo-network/module-model": "^2.94.40",
25
25
  "@xyo-network/node-model": "^2.94.40",
26
- "@xyo-network/react-archivist": "~2.72.5",
27
- "@xyo-network/react-module": "~2.72.5",
28
- "@xyo-network/react-node": "~2.72.5",
29
- "@xyo-network/react-shared": "~2.72.5",
26
+ "@xyo-network/react-archivist": "~2.72.6",
27
+ "@xyo-network/react-module": "~2.72.6",
28
+ "@xyo-network/react-node": "~2.72.6",
29
+ "@xyo-network/react-shared": "~2.72.6",
30
30
  "@xyo-network/sentinel-model": "^2.94.40",
31
31
  "@xyo-network/witness-model": "^2.94.40",
32
32
  "cytoscape": "^3.28.1",
@@ -55,8 +55,8 @@
55
55
  "@xyo-network/http-bridge": "^2.94.40",
56
56
  "@xyo-network/id-plugin": "^2.91.11",
57
57
  "@xyo-network/node-memory": "^2.94.40",
58
- "@xyo-network/react-storybook": "~2.72.5",
59
- "@xyo-network/react-wallet": "~2.72.5",
58
+ "@xyo-network/react-storybook": "~2.72.6",
59
+ "@xyo-network/react-wallet": "~2.72.6",
60
60
  "@xyo-network/sentinel": "^2.94.40",
61
61
  "typescript": "^5.4.5"
62
62
  },
@@ -111,6 +111,6 @@
111
111
  },
112
112
  "sideEffects": false,
113
113
  "types": "dist/browser/index.d.ts",
114
- "version": "2.72.5",
114
+ "version": "2.72.6",
115
115
  "type": "module"
116
116
  }
@@ -13,12 +13,13 @@ import { StyledModuleHoverPopper } from './Popper'
13
13
 
14
14
  export interface ModuleGraphFlexBoxProps extends FlexBoxProps {
15
15
  disableModuleDetails?: boolean
16
+ hideActions?: boolean
16
17
  layout?: 'dagre' | 'euler' | 'cose-bilkent' | 'cola'
17
18
  layoutOptions?: object
18
19
  rootModule?: ModuleInstance | null
19
20
  }
20
21
 
21
- export const ModuleGraphFlexBox: React.FC<ModuleGraphFlexBoxProps> = ({ rootModule, disableModuleDetails, ...props }) => {
22
+ export const ModuleGraphFlexBox: React.FC<ModuleGraphFlexBoxProps> = ({ hideActions, rootModule, disableModuleDetails, ...props }) => {
22
23
  const cytoscapeRef = useRef<HTMLDivElement>(null)
23
24
  const { handleToggleLabels, hideLabels, options } = useRelationalGraphOptions(rootModule ?? undefined)
24
25
  const { hoveredNode, setHoveredNode, toggleSelectedElement } = useElements(hideLabels)
@@ -29,11 +30,13 @@ export const ModuleGraphFlexBox: React.FC<ModuleGraphFlexBoxProps> = ({ rootModu
29
30
  <WithExtensions>
30
31
  <NodeRelationalGraphFlexBox
31
32
  actions={
32
- module ? null : (
33
- <Button size={'small'} onClick={handleToggleLabels} variant="contained">
33
+ module ? null
34
+ : hideActions ?
35
+ null
36
+ : <Button size={'small'} onClick={handleToggleLabels} variant="contained">
34
37
  Toggle Labels
35
38
  </Button>
36
- )
39
+
37
40
  }
38
41
  showDetails={!!module}
39
42
  detail={<DetailsFlexbox onClose={() => onModuleDetails(null)} />}