treege 0.10.2 → 0.10.4

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.
@@ -2,11 +2,11 @@
2
2
  import type { TreeRenderCustomNodeElementFn } from '../../../features/Treege/type/TreeNode';
3
3
  interface TreeProps {
4
4
  data: any;
5
+ renderCustomNodeElement?: TreeRenderCustomNodeElementFn;
5
6
  nodeSize?: {
6
7
  x: number;
7
8
  y: number;
8
9
  };
9
- renderCustomNodeElement?: TreeRenderCustomNodeElementFn;
10
10
  }
11
11
  declare const _default: import("react").MemoExoticComponent<({ data, renderCustomNodeElement, nodeSize, }: TreeProps) => import("react/jsx-runtime").JSX.Element>;
12
12
  export default _default;
@@ -11,7 +11,7 @@ declare const useTreeSelect: ({ isControlled, fetchWorkflowsOnOpen }: useTreeSel
11
11
  };
12
12
  fetchWorkflowSuggestions: <TPageData>(options?: (import("@tanstack/query-core").RefetchOptions & import("@tanstack/query-core").RefetchQueryFilters<TPageData>) | undefined) => Promise<import("@tanstack/query-core").QueryObserverResult<import('../../../../services/workflows/query/useWorkflowsQuery').WorkflowsResponse[], unknown>>;
13
13
  handleChangeTree: ({ target }: SelectChangeEvent) => Promise<void>;
14
- handleOnOpen: () => Promise<import("@tanstack/query-core").QueryObserverResult<import('../../../../services/workflows/query/useWorkflowsQuery').WorkflowsResponse[], unknown>>;
14
+ handleOnOpen: () => Promise<void>;
15
15
  setTreeSelected: import("react").Dispatch<import("react").SetStateAction<string>>;
16
16
  treeSelected: string;
17
17
  workflowsSuggestions: import('../../../../services/workflows/query/useWorkflowsQuery').WorkflowsResponse[] | undefined;
@@ -12,20 +12,74 @@ type CurrentTree = {
12
12
  errorName?: string;
13
13
  };
14
14
  export interface TreeDefaultValue {
15
- dispatchTree(state: ReducerAction<any>): void;
15
+ /**
16
+ * CurrentHierarchyPointNode is the current node selected
17
+ */
16
18
  currentHierarchyPointNode: null | HierarchyPointNode<TreeNode>;
19
+ /**
20
+ * This is the modal open state
21
+ */
17
22
  modalOpen: ModalType;
18
- setCurrentHierarchyPointNode(state: SetStateAction<null | HierarchyPointNode<TreeNode>>): void;
19
- setModalOpen(state: SetStateAction<ModalType>): void;
20
- setTreeModalOpen(state: SetStateAction<boolean>): void;
21
- setTreePath(state: SetStateAction<TreePath[] | []>): void;
22
- setCurrentTree(state: SetStateAction<CurrentTree>): void;
23
+ /**
24
+ * This is the function to set the current node selected
25
+ * @param state
26
+ */
27
+ /**
28
+ * This is the tree modal open state
29
+ */
23
30
  treeModalOpen: boolean;
31
+ /**
32
+ * This is the tree path
33
+ */
24
34
  treePath: TreePath[] | [];
35
+ /**
36
+ * This is the tree node object
37
+ */
25
38
  tree: null | TreeNode;
39
+ /**
40
+ * This is endpoint of the API
41
+ */
26
42
  endPoint?: string;
43
+ /**
44
+ * This is the version of Treege
45
+ */
27
46
  version: string;
47
+ /**
48
+ * This is the current tree information
49
+ * This is not the node to display tree
50
+ */
28
51
  currentTree: CurrentTree;
52
+ /**
53
+ * This is the tree node dispatch function
54
+ * @param state
55
+ */
56
+ dispatchTree(state: ReducerAction<any>): void;
57
+ /**
58
+ * This is the function to set the modal open state
59
+ * @param state
60
+ */
61
+ setCurrentHierarchyPointNode(state: SetStateAction<null | HierarchyPointNode<TreeNode>>): void;
62
+ /**
63
+ * This is the function to set the modal open state
64
+ * @param state
65
+ */
66
+ setModalOpen(state: SetStateAction<ModalType>): void;
67
+ /**
68
+ * This is the function to set the modal open state
69
+ * @param state
70
+ */
71
+ setTreeModalOpen(state: SetStateAction<boolean>): void;
72
+ /**
73
+ * This is the function to set the tree path
74
+ * @param state
75
+ */
76
+ setTreePath(state: SetStateAction<TreePath[] | []>): void;
77
+ /**
78
+ * This is the function to set the current tree information
79
+ * Not the node to display tree
80
+ * @param state
81
+ */
82
+ setCurrentTree(state: SetStateAction<CurrentTree>): void;
29
83
  }
30
84
  export declare const treeDefaultValue: TreeDefaultValue;
31
85
  export declare const TreegeContext: import("react").Context<TreeDefaultValue>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "treege",
3
3
  "description": "Form decision tree generator",
4
4
  "license": "ISC",
5
- "version": "0.10.2",
5
+ "version": "0.10.4",
6
6
  "type": "module",
7
7
  "types": "dist/main.d.ts",
8
8
  "main": "dist/main.umd.cjs",
package/dist/.readme.md DELETED
@@ -1 +0,0 @@
1
- **_Public folder_**
package/dist/favicon.svg DELETED
@@ -1,12 +0,0 @@
1
- <svg width="114" height="103" viewBox="0 0 114 103" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_2_59)">
3
- <path d="M102.797 28.1471L87.4678 1.50761C87.2052 1.0508 86.828 0.671162 86.3738 0.406614C85.9195 0.142066 85.4041 0.00186148 84.8791 0L29.1359 0C28.6108 0.00186148 28.0954 0.142066 27.6412 0.406614C27.1869 0.671162 26.8097 1.0508 26.5472 1.50761L11.2551 28.1471C10.9922 28.6047 10.8535 29.1237 10.853 29.6521C10.8526 30.1804 10.9903 30.6997 11.2525 31.1577C11.5147 31.6158 11.8921 31.9966 12.3469 32.262C12.8017 32.5274 13.3179 32.6681 13.8438 32.6699H100.194C100.721 32.6707 101.239 32.532 101.696 32.2676C102.153 32.0033 102.532 31.6228 102.796 31.1643C103.06 30.7058 103.199 30.1855 103.199 29.6558C103.2 29.1262 103.061 28.6058 102.797 28.1471Z" fill="#11D3B4"/>
4
- <path d="M69.3919 103H84.8641C85.3929 103.002 85.913 102.864 86.3715 102.599C86.8301 102.334 87.2108 101.953 87.4753 101.492L113.595 56.0379C113.858 55.5792 113.997 55.0589 113.997 54.5292C113.997 53.9995 113.858 53.4793 113.594 53.0208C113.33 52.5623 112.95 52.1817 112.493 51.9174C112.036 51.6531 111.518 51.5143 110.991 51.5151H69.3919C68.5959 51.5151 67.8325 51.8328 67.2696 52.3982C66.7068 52.9637 66.3906 53.7306 66.3906 54.5303V99.9848C66.3906 100.784 66.7068 101.551 67.2696 102.117C67.8325 102.682 68.5959 103 69.3919 103Z" fill="#007EF6"/>
5
- <path d="M44.6305 51.5H3.00136C2.47477 51.5005 1.95758 51.6403 1.50174 51.9051C1.04591 52.17 0.667454 52.5507 0.404391 53.009C0.141329 53.4672 0.00291666 53.987 0.00305186 54.516C0.00318705 55.045 0.141865 55.5647 0.405162 56.0228L26.5472 101.507C26.8097 101.964 27.187 102.344 27.6412 102.608C28.0955 102.873 28.6108 103.013 29.1359 103.015H44.6305C45.4265 103.015 46.19 102.697 46.7528 102.132C47.3157 101.566 47.6319 100.8 47.6319 99.9999V54.5077C47.6299 53.7093 47.3128 52.9443 46.7502 52.3805C46.1875 51.8166 45.4252 51.5 44.6305 51.5Z" fill="#0164A8"/>
6
- </g>
7
- <defs>
8
- <clipPath id="clip0_2_59">
9
- <rect width="114" height="103" fill="white"/>
10
- </clipPath>
11
- </defs>
12
- </svg>
package/dist/src/App.d.ts DELETED
@@ -1,2 +0,0 @@
1
- declare const App: () => import("react/jsx-runtime").JSX.Element;
2
- export default App;