sample-ui-component-library 0.0.34-dev → 0.0.35-dev

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sample-ui-component-library",
3
- "version": "0.0.34-dev",
3
+ "version": "0.0.35-dev",
4
4
  "description": "A library which contains sample UI elements that can be used for populating layouts.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -41,21 +41,20 @@ export const Editor = forwardRef(({ }, ref) => {
41
41
  dispatch({ type: "ADD_TAB", payload: { tab, index } });
42
42
  }, []);
43
43
 
44
- const setTabGroupId = useCallback((id) => {
45
- dispatch({ type: "RESET_STATE"});
46
- dispatch({ type: "SET_PARENT_TAB_GROUP_ID", payload: id });
47
- }, []);
44
+ const getGroupUid = useCallback((id) => {
45
+ return state.uid;
46
+ }, [state]);
48
47
 
49
48
  const api = useMemo(() => {
50
49
  return {
51
50
  state,
52
51
  addTab,
53
- setTabGroupId,
54
52
  selectTab,
55
53
  closeTab,
56
- moveTab
54
+ moveTab,
55
+ getGroupUid
57
56
  };
58
- }, [state, addTab, selectTab, closeTab, moveTab, setTabGroupId]);
57
+ }, [state, addTab, selectTab, closeTab, moveTab, getGroupUid]);
59
58
 
60
59
  useImperativeHandle(ref, () => api, [api]);
61
60
 
@@ -37,14 +37,19 @@ export const FileBrowser = forwardRef(({onSelectFile}, ref) => {
37
37
  const selectNode = useCallback((node) => {
38
38
  dispatch({ type: "SELECT_NODE", payload: node });
39
39
  }, []);
40
+
41
+ const getGroupUid = useCallback((id) => {
42
+ return state.uid;
43
+ }, [state]);
40
44
 
41
45
  const api = useMemo(() => {
42
46
  return {
43
47
  state,
44
48
  addFileTree,
45
- selectNode
49
+ selectNode,
50
+ getGroupUid
46
51
  };
47
- }, [state, addFileTree, selectNode]);
52
+ }, [state, addFileTree, selectNode, getGroupUid]);
48
53
 
49
54
  useImperativeHandle(ref, () => api, [api]);
50
55