@atlaskit/charlie-hierarchy 0.0.7 → 0.1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/dist/cjs/index.js +14 -1
- package/dist/es2019/index.js +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/types/hooks/use-hierarchy.d.ts +4 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types-ts4.5/hooks/use-hierarchy.d.ts +4 -4
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# CharlieHierarchy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
CharlieHierarchy is a component for building SVG-rendered trees. It is a wrapper around the visx/hierarchy Tree component that provides a more declarative API and handles common use cases, allowing for a quicker entry point to creating trees.
|
|
4
4
|
|
|
5
5
|
## Usage
|
|
6
6
|
|
|
7
|
-
`import CharlieHierarchy from '@atlaskit/charlie-hierarchy';`
|
|
7
|
+
`import { CharlieHierarchy, useHierarchyData, HierarchyContainer } from '@atlaskit/charlie-hierarchy';`
|
|
8
8
|
|
|
9
9
|
Detailed docs and example usage can be found [here](https://atlaskit.atlassian.com/packages/technology-innovation/charlie-hierarchy).
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,4 +9,17 @@ Object.defineProperty(exports, "CharlieHierarchy", {
|
|
|
9
9
|
return _charlieHierarchy.CharlieHierarchy;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
12
|
+
Object.defineProperty(exports, "HierarchyContainer", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _useHierarchy.HierarchyContainer;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "useHierarchyData", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _useHierarchy.useHierarchyData;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _charlieHierarchy = require("./charlie-hierarchy/charlie-hierarchy");
|
|
25
|
+
var _useHierarchy = require("./hooks/use-hierarchy");
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { CharlieHierarchy } from './charlie-hierarchy/charlie-hierarchy';
|
|
1
|
+
export { CharlieHierarchy } from './charlie-hierarchy/charlie-hierarchy';
|
|
2
|
+
export { HierarchyContainer, useHierarchyData } from './hooks/use-hierarchy';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { CharlieHierarchy } from './charlie-hierarchy/charlie-hierarchy';
|
|
1
|
+
export { CharlieHierarchy } from './charlie-hierarchy/charlie-hierarchy';
|
|
2
|
+
export { HierarchyContainer, useHierarchyData } from './hooks/use-hierarchy';
|
|
@@ -22,10 +22,10 @@ export declare const HierarchyContainer: import("react-sweet-state").GenericCont
|
|
|
22
22
|
* the `@visx/hierarchy` library (wrapper for d3).
|
|
23
23
|
*/
|
|
24
24
|
export declare const useHierarchyData: <NodeType extends object>({ childrenAccessor, updateChildren, identifierAccessor, parentIdentifierAccessor, }: {
|
|
25
|
-
childrenAccessor: State<NodeType>[
|
|
26
|
-
updateChildren: State<NodeType>[
|
|
27
|
-
identifierAccessor: State<NodeType>[
|
|
28
|
-
parentIdentifierAccessor: State<NodeType>[
|
|
25
|
+
childrenAccessor: State<NodeType>["childrenAccessor"];
|
|
26
|
+
updateChildren: State<NodeType>["updateChildren"];
|
|
27
|
+
identifierAccessor: State<NodeType>["identifierAccessor"];
|
|
28
|
+
parentIdentifierAccessor: State<NodeType>["parentIdentifierAccessor"];
|
|
29
29
|
}) => import("react-sweet-state").HookReturnValue<State<NodeType>, import("react-sweet-state").BoundActions<State<NodeType>, {
|
|
30
30
|
resetRootNode: (root: NodeType) => Action<State<NodeType>>;
|
|
31
31
|
/** for useHierarchyData, when you add a node it must either be:
|
package/dist/types/index.d.ts
CHANGED
|
@@ -22,10 +22,10 @@ export declare const HierarchyContainer: import("react-sweet-state").GenericCont
|
|
|
22
22
|
* the `@visx/hierarchy` library (wrapper for d3).
|
|
23
23
|
*/
|
|
24
24
|
export declare const useHierarchyData: <NodeType extends object>({ childrenAccessor, updateChildren, identifierAccessor, parentIdentifierAccessor, }: {
|
|
25
|
-
childrenAccessor: State<NodeType>[
|
|
26
|
-
updateChildren: State<NodeType>[
|
|
27
|
-
identifierAccessor: State<NodeType>[
|
|
28
|
-
parentIdentifierAccessor: State<NodeType>[
|
|
25
|
+
childrenAccessor: State<NodeType>["childrenAccessor"];
|
|
26
|
+
updateChildren: State<NodeType>["updateChildren"];
|
|
27
|
+
identifierAccessor: State<NodeType>["identifierAccessor"];
|
|
28
|
+
parentIdentifierAccessor: State<NodeType>["parentIdentifierAccessor"];
|
|
29
29
|
}) => import("react-sweet-state").HookReturnValue<State<NodeType>, import("react-sweet-state").BoundActions<State<NodeType>, {
|
|
30
30
|
resetRootNode: (root: NodeType) => Action<State<NodeType>>;
|
|
31
31
|
/** for useHierarchyData, when you add a node it must either be:
|
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
96
|
"name": "@atlaskit/charlie-hierarchy",
|
|
97
|
-
"version": "0.0
|
|
97
|
+
"version": "0.1.0",
|
|
98
98
|
"description": "A component for building SVG-rendered trees, with support for custom node rendering, zooming, and panning.",
|
|
99
99
|
"author": "Atlassian Pty Ltd",
|
|
100
100
|
"license": "Apache-2.0",
|