tycho-components 0.2.2-r1 → 0.2.3-SNAPSHOT

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.
@@ -4,9 +4,10 @@ type Props = {
4
4
  struct: Struct;
5
5
  expression?: string;
6
6
  selector?: string;
7
- onExpand?: () => void;
8
7
  translations?: Record<string, string>;
9
8
  wheelSensitivity?: number;
9
+ onExpand?: () => void;
10
+ onReady?: () => void;
10
11
  };
11
- export default function TreeView({ struct, expression, onExpand, selector, translations, wheelSensitivity, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export default function TreeView({ struct, expression, selector, translations, wheelSensitivity, onExpand, onReady, }: Props): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -10,7 +10,7 @@ import SyntreesCytoscape from './cytoscape/SyntreesCytoscape';
10
10
  import './style.scss';
11
11
  import AppPlaceholder from '../AppPlaceholder';
12
12
  import DateUtils from '../functions/DateUtils';
13
- export default function TreeView({ struct, expression, onExpand, selector = 'canvas-tree', translations, wheelSensitivity, }) {
13
+ export default function TreeView({ struct, expression, selector = 'canvas-tree', translations, wheelSensitivity, onExpand, onReady, }) {
14
14
  const { t } = useTranslation('tree');
15
15
  const [cy, setCy] = useState(null);
16
16
  const [showInfo, setShowInfo] = useState(false);
@@ -40,6 +40,7 @@ export default function TreeView({ struct, expression, onExpand, selector = 'can
40
40
  wheelSensitivity,
41
41
  onReady: (thisCy) => {
42
42
  setCy(thisCy);
43
+ onReady && onReady();
43
44
  },
44
45
  });
45
46
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tycho-components",
3
3
  "private": false,
4
- "version": "0.2.2-r1",
4
+ "version": "0.2.3-SNAPSHOT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {