treege 2.0.0 โ 2.0.1
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 +4 -25
- package/dist/components/DataDisplay/Tree/useTree.d.ts +1 -1
- package/dist/features/Treege/context/TreegeProvider.d.ts +5 -4
- package/dist/features/Treege/reducer/treeReducer.d.ts +20 -19
- package/dist/main.js +3607 -4516
- package/dist/main.umd.cjs +41 -52
- package/dist/utils/tree/removeNode/removeNode.d.ts +3 -3
- package/dist/utils/tree/updateNodeInTree/updateNodeInTree.d.ts +3 -3
- package/package.json +25 -24
- package/dist/context/Snackbar/SnackbarContext.d.ts +0 -19
- package/dist/context/Snackbar/SnackbarProvider.d.ts +0 -6
- package/dist/context/Snackbar/snackbarReducer.d.ts +0 -23
- package/dist/hooks/useSnackbar/index.d.ts +0 -3
- package/dist/hooks/useSnackbar/useSnackbar.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
# [Versions](https://github.com/Tracktor/treege/releases)
|
|
2
2
|
|
|
3
|
-
## v2.0.
|
|
3
|
+
## v2.0.1
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### ๐งน Chore
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
|
|
10
|
-
### โจ Enhancements
|
|
11
|
-
|
|
12
|
-
- Redesigned form layouts with a responsive two-column grid and enhanced large modal handling.
|
|
13
|
-
- Expanded English and French localization with detailed guidance on dynamic data, ancestor values, and API parameters.
|
|
14
|
-
- Upgraded multiple dependencies to latest versions for improved stability and features.
|
|
15
|
-
|
|
16
|
-
### ๐ Bug Fixes
|
|
17
|
-
|
|
18
|
-
- Improved modal and dialog behaviors for better accessibility and consistency.
|
|
19
|
-
|
|
20
|
-
### ๐จ Refactor
|
|
21
|
-
|
|
22
|
-
- Removed legacy components and utilities related to ancestor and tree name extraction.
|
|
23
|
-
- Consolidated and simplified ancestor retrieval utilities.
|
|
24
|
-
- Cleaned up ancestor references when removing nodes from the tree.
|
|
25
|
-
|
|
26
|
-
### ๐งน Chores
|
|
27
|
-
|
|
28
|
-
- Deleted unused files and tests tied to deprecated tree utilities.
|
|
29
|
-
- Added new tests validating updated ancestor retrieval and node removal functionality.
|
|
7
|
+
- Migration to React 19 and Vite v7.
|
|
8
|
+
- Updated dependencies and configuration for compatibility.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CurrentTree, ModalType, TreeNode, TreePath } from '@tracktor/types-treege';
|
|
2
2
|
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
3
|
-
import {
|
|
3
|
+
import { Dispatch, ReactNode, SetStateAction } from 'react';
|
|
4
|
+
import { TreeReducerAction } from '../../../src/features/Treege/reducer/treeReducer';
|
|
4
5
|
import { BackendConfig } from '../../../src/features/Treege/Treege';
|
|
5
6
|
interface TreegeProviderProps {
|
|
6
7
|
children: ReactNode;
|
|
@@ -55,15 +56,15 @@ export interface TreeDefaultValue {
|
|
|
55
56
|
* This is the tree node dispatch function
|
|
56
57
|
* @param state
|
|
57
58
|
*/
|
|
58
|
-
dispatchTree
|
|
59
|
+
dispatchTree: Dispatch<TreeReducerAction>;
|
|
59
60
|
/**
|
|
60
61
|
* This is the function to set the modal open state
|
|
61
62
|
* @param state
|
|
62
63
|
*/
|
|
63
64
|
setCurrentHierarchyPointNode(state: SetStateAction<null | HierarchyPointNode<TreeNode>>): void;
|
|
64
65
|
/**
|
|
65
|
-
* This is the function to set the current tree information
|
|
66
|
-
* Not the node to display tree
|
|
66
|
+
* This is the function to set the current tree information,
|
|
67
|
+
* Not the node to display a tree
|
|
67
68
|
* @param state
|
|
68
69
|
*/
|
|
69
70
|
setCurrentTree(state: SetStateAction<CurrentTree>): void;
|
|
@@ -6,29 +6,30 @@ export declare const treeReducerActionType: {
|
|
|
6
6
|
readonly resetTree: "resetTree";
|
|
7
7
|
readonly setTree: "setTree";
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export type TreeReducerAction = {
|
|
10
|
+
type: typeof treeReducerActionType.appendTreeCard;
|
|
11
11
|
path: string | null;
|
|
12
|
-
type: "appendTreeCard";
|
|
13
12
|
uuid: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const replaceTreeCard: (path: string | null, uuid: string, children: TreeNode) => {
|
|
16
13
|
children: TreeNode;
|
|
17
|
-
|
|
18
|
-
type:
|
|
14
|
+
} | {
|
|
15
|
+
type: typeof treeReducerActionType.deleteTreeCard;
|
|
16
|
+
path: string | "";
|
|
19
17
|
uuid: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
path: string;
|
|
23
|
-
type: "deleteTreeCard";
|
|
18
|
+
} | {
|
|
19
|
+
type: typeof treeReducerActionType.replaceTreeCard;
|
|
20
|
+
path: string | null;
|
|
24
21
|
uuid: string;
|
|
22
|
+
children: TreeNode;
|
|
23
|
+
} | {
|
|
24
|
+
type: typeof treeReducerActionType.resetTree;
|
|
25
|
+
} | {
|
|
26
|
+
type: typeof treeReducerActionType.setTree;
|
|
27
|
+
tree: TreeNode | null;
|
|
25
28
|
};
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export declare const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
declare const treeReducer: (tree: TreeNode, action: any) => any;
|
|
29
|
+
export declare const appendTreeCard: (path: string | null, uuid: string, children: TreeNode) => TreeReducerAction;
|
|
30
|
+
export declare const replaceTreeCard: (path: string | null, uuid: string, children: TreeNode) => TreeReducerAction;
|
|
31
|
+
export declare const deleteTreeCard: (path: string | "", uuid: string) => TreeReducerAction;
|
|
32
|
+
export declare const resetTree: () => TreeReducerAction;
|
|
33
|
+
export declare const setTree: (tree: TreeNode | null) => TreeReducerAction;
|
|
34
|
+
declare const treeReducer: (tree: TreeNode | null, action: any) => any;
|
|
34
35
|
export default treeReducer;
|