sample-ui-component-library 0.0.12-dev → 0.0.13-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.12-dev",
3
+ "version": "0.0.13-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",
@@ -34,7 +34,7 @@ export const Tabs = () => {
34
34
  const list = [];
35
35
  tabs.forEach((tab, index) => {
36
36
  list.push(<Gutter key={tab.uid + "-gutter"} id={tabGroupId + "-" + index} index={index} parentId={tabGroupId} />);
37
- list.push(<Tab key={tab.uid} id={tab.uid} parentId={tabGroupId} node={tab} />);
37
+ list.push(<Tab key={tab.uid} id={"tab-" + tabGroupId + "-" + tab.uid} parentId={tabGroupId} node={tab} />);
38
38
  });
39
39
  list.push(<Gutter key="last-gutter" id={tabGroupId + "-" + tabs.length} index={tabs.length} parentId={tabGroupId} />);
40
40
  setTabsList(list);
@@ -4,6 +4,9 @@ import {
4
4
  flattenTree,
5
5
  } from "./helper";
6
6
 
7
+ //TODO: I should set a unique id for each reducer state and use it
8
+ // for all the ids of the components to make them unique. I could
9
+ // also manually set the ID like I do in the editor reducer.
7
10
  export const initialState = {
8
11
  tree: {},
9
12
  flattenedTree: {},
@@ -1,20 +1,12 @@
1
1
  import {
2
2
  useEffect,
3
- useState,
4
- useRef
3
+ useState
5
4
  } from "react";
6
5
 
7
6
  import { TreeNode } from "../TreeNode/TreeNode";
8
7
 
9
8
  import { useFileBrowser } from "../FileBrowser";
10
9
 
11
- import {
12
- setDefaultCollapsed,
13
- collapseTree,
14
- selectNode,
15
- flattenTree,
16
- } from "../helper";
17
-
18
10
  import "./Tree.scss";
19
11
 
20
12
  /**
@@ -40,7 +32,7 @@ export const Tree = ({}) => {
40
32
  <TreeNode
41
33
  key={node.uid}
42
34
  node={node}
43
- id={node.uid}
35
+ id={"tree-node-" + node.uid}
44
36
  />,
45
37
  );
46
38
  });