treege 1.2.0 → 1.3.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 +2 -2
- package/README.md +4 -25
- package/dist/{src/components → components}/DataDisplay/Tree/Tree.d.ts +4 -2
- package/dist/{src/components → components}/DataDisplay/TreeCard/TreeCard.d.ts +2 -3
- package/dist/{src/components → components}/FeedBack/MainModal/MainModal.d.ts +0 -1
- package/dist/{src/components → components}/FeedBack/TreeModal/TreeModal.d.ts +2 -3
- package/dist/{src/components → components}/Layouts/Action/Action.d.ts +0 -1
- package/dist/{src/components → components}/Layouts/Header/Header.d.ts +0 -1
- package/dist/{src/components → components}/Layouts/Main/Main.d.ts +0 -1
- package/dist/{src/components → components}/Layouts/MosaicLayout/MosaicLayout.d.ts +0 -1
- package/dist/{src/components → components}/Layouts/Sidebar/Sidebar.d.ts +0 -1
- package/dist/{src/components → components}/Theme/DarkTheme/DarkTheme.d.ts +0 -1
- package/dist/{src/config → config}/i18n.config.d.ts +0 -1
- package/dist/{src/config → config}/query.config.d.ts +0 -1
- package/dist/config/test.config.d.ts +0 -0
- package/dist/{src/config → config}/theme.config.d.ts +0 -1
- package/dist/{src/context → context}/Auth/AuthContext.d.ts +0 -1
- package/dist/{src/context → context}/Auth/AuthProvider.d.ts +0 -1
- package/dist/{src/context → context}/Snackbar/SnackbarContext.d.ts +0 -1
- package/dist/{src/context → context}/Snackbar/SnackbarProvider.d.ts +0 -1
- package/dist/{src/context → context}/Snackbar/snackbarReducer.d.ts +3 -4
- package/dist/{src/features → features}/Treege/Treege.d.ts +1 -2
- package/dist/{src/features → features}/Treege/components/Feedback/DynamicSelectWarning/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Feedback/EndPointWarning/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Forms/FormTreeCardDelete/useFormTreeCardDelete.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Forms/FormTreeCardMutation/ExtraField.d.ts +1 -2
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +112 -0
- package/dist/{src/features → features}/Treege/components/Inputs/AutocompleteSelectType/AutocompleteSelectType.d.ts +3 -4
- package/dist/{src/features → features}/Treege/components/Inputs/AutocompleteSelectType/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Inputs/DynamicSelectFieldFromTree/DynamicSelectFieldFromTree.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Inputs/DynamicSelectFieldFromTree/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Inputs/FieldSelectAutocompleteCreatable/FieldSelectAutocompleteCreatable.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/Inputs/FieldSelectAutocompleteCreatable/index.d.ts +0 -1
- package/dist/features/Treege/components/TreeCardContainer/TreeCardContainer.d.ts +8 -0
- package/dist/{src/features → features}/Treege/components/TreeCardContainer/useTreeCardContainer.d.ts +1 -2
- package/dist/{src/features → features}/Treege/components/TreeNameTextField/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/TreeNameTextField/useTreeNameTextField.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/TreeSelect/TreeSelect.d.ts +0 -1
- package/dist/{src/features → features}/Treege/components/TreeSelect/index.d.ts +0 -1
- package/dist/features/Treege/components/TreeSelect/useTreeSelect.d.ts +16 -0
- package/dist/{src/features → features}/Treege/context/TreegeContext.d.ts +3 -15
- package/dist/{src/features → features}/Treege/context/TreegeProvider.d.ts +2 -3
- package/dist/{src/features → features}/Treege/index.d.ts +0 -1
- package/dist/{src/features → features}/Treege/reducer/treeReducer.d.ts +1 -2
- package/dist/{src/hooks → hooks}/useSnackbar/index.d.ts +0 -1
- package/dist/{src/hooks → hooks}/useSnackbar/useSnackbar.d.ts +1 -2
- package/dist/{src/hooks → hooks}/useTreegeContext/index.d.ts +0 -1
- package/dist/hooks/useTreegeContext/useTreegeContext.d.ts +2 -0
- package/dist/{src/locales → locales}/en/form-en.d.ts +10 -0
- package/dist/{src/locales → locales}/fr/form-fr.d.ts +10 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.js +3564 -3931
- package/dist/main.umd.cjs +39 -50
- package/dist/services/workflows/mutation/usePatchWorkflowsMutation.d.ts +12 -0
- package/dist/services/workflows/mutation/usePostWorkflowMutation.d.ts +11 -0
- package/dist/services/workflows/query/useWorkflowQuery.d.ts +10 -0
- package/dist/services/workflows/query/useWorkflowsQuery.d.ts +10 -0
- package/dist/utils/tree/appendNode/appendNode.d.ts +83 -0
- package/dist/{src/utils → utils}/tree/appendNode/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/findNodeByUUIDInTree/findNodeByUUIDInTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/findNodeByUUIDInTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/findParentNodeByUUIDInTree/findParentNodeByUUIDInTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/findParentNodeByUUIDInTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getAllAncestorNamesFromTree/getAllAncestorNamesFromTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getAllAncestorNamesFromTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getAllNamesFromTree/getAllNamesFromTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getAllNamesFromTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getNode/getNode.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getNode/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getTree/getTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getUniqueTagsInTree/getUniqueTagsInTree.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/getUniqueTagsInTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/index.d.ts +8 -9
- package/dist/{src/utils → utils}/tree/removeNode/removeNode.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/removeNode/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/updateNodeInTree/test/mock.d.ts +1 -2
- package/dist/{src/utils → utils}/tree/updateNodeInTree/updateNodeInTree.d.ts +1 -2
- package/package.json +13 -12
- package/dist/src/config/test.config.d.ts +0 -1
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +0 -82
- package/dist/src/features/Treege/components/TreeCardContainer/TreeCardContainer.d.ts +0 -4
- package/dist/src/features/Treege/components/TreeSelect/useTreeSelect.d.ts +0 -21
- package/dist/src/features/Treege/type/TreeNode.d.ts +0 -111
- package/dist/src/hooks/useTreegeContext/useTreegeContext.d.ts +0 -2
- package/dist/src/main.d.ts +0 -5
- package/dist/src/services/workflows/mutation/usePatchWorkflowsMutation.d.ts +0 -14
- package/dist/src/services/workflows/mutation/usePostWorkflowMutation.d.ts +0 -13
- package/dist/src/services/workflows/query/useWorkflowQuery.d.ts +0 -11
- package/dist/src/services/workflows/query/useWorkflowsQuery.d.ts +0 -11
- package/dist/src/utils/tree/appendNode/appendNode.d.ts +0 -73
- /package/dist/{src/components → components}/DataDisplay/Icons/TreePlusIcon.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/Logo/Logo.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/Tree/useTree.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/ViewerJSON/ViewerJSON.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/ViewerJSON/useViewerJSON.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/ViewerJSONAction/ViewerJSONAction.d.ts +0 -0
- /package/dist/{src/components → components}/DataDisplay/ViewerJSONAction/useViewerJSONAction.d.ts +0 -0
- /package/dist/{src/constants → constants}/colors.d.ts +0 -0
- /package/dist/{src/constants → constants}/fields.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Feedback/DynamicSelectWarning/DynamicSelectWarning.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Feedback/EndPointWarning/EndPointWarning.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Forms/FormTreeCardDelete/FormTreeCardDelete.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Inputs/AutocompleteSelectType/useAutocompleteSelectType.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Inputs/ButtonCreateTree/ButtonCreateTree.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/Inputs/ButtonCreateTree/useButtonCreateTree.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/TreeGrid/TreeGrid.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/TreeGrid/useTreeGrid.d.ts +0 -0
- /package/dist/{src/features → features}/Treege/components/TreeNameTextField/TreeNameTextField.d.ts +0 -0
- /package/dist/{src/locales → locales}/en/button-en.d.ts +0 -0
- /package/dist/{src/locales → locales}/en/modal-en.d.ts +0 -0
- /package/dist/{src/locales → locales}/en/snackMessage-en.d.ts +0 -0
- /package/dist/{src/locales → locales}/en/translation-en.d.ts +0 -0
- /package/dist/{src/locales → locales}/fr/button-fr.d.ts +0 -0
- /package/dist/{src/locales → locales}/fr/modal-fr.d.ts +0 -0
- /package/dist/{src/locales → locales}/fr/snackMessage-fr.d.ts +0 -0
- /package/dist/{src/locales → locales}/fr/translation-fr.d.ts +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/tree/getUniqueTagsInTree/test/getUniqueTagsInTree.d.ts +0 -0
- /package/dist/{src/utils → utils}/uuid/getUUID.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
|
+
interface PatchWorkflowVariables {
|
|
3
|
+
workflow: TreeNode;
|
|
4
|
+
version: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
}
|
|
8
|
+
interface PatchWorkflowResponse {
|
|
9
|
+
status: string;
|
|
10
|
+
}
|
|
11
|
+
declare const usePatchWorkflowsMutation: () => import('@tanstack/react-query').UseMutationResult<PatchWorkflowResponse, Error, PatchWorkflowVariables, unknown>;
|
|
12
|
+
export default usePatchWorkflowsMutation;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
|
+
interface PostWorkflowVariables {
|
|
3
|
+
workflow: TreeNode;
|
|
4
|
+
version: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PostWorkflowResponse {
|
|
8
|
+
workflow_id: string;
|
|
9
|
+
}
|
|
10
|
+
declare const usePostWorkflowMutation: () => import('@tanstack/react-query').UseMutationResult<PostWorkflowResponse, Error, PostWorkflowVariables, unknown>;
|
|
11
|
+
export default usePostWorkflowMutation;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
2
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
3
|
+
interface WorkflowResponse {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
version: string;
|
|
7
|
+
workflow: TreeNode;
|
|
8
|
+
}
|
|
9
|
+
declare const useWorkflowQuery: (id?: string, options?: Omit<UseQueryOptions<WorkflowResponse>, "queryFn" | "queryKey">) => import('@tanstack/react-query').UseQueryResult<WorkflowResponse, Error>;
|
|
10
|
+
export default useWorkflowQuery;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
3
|
+
export interface WorkflowsResponse {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
version: string;
|
|
7
|
+
workflow: TreeNode;
|
|
8
|
+
}
|
|
9
|
+
declare const useWorkflowsQuery: (options?: Omit<UseQueryOptions<WorkflowsResponse[]>, "queryFn" | "queryKey">) => import('@tanstack/react-query').UseQueryResult<WorkflowsResponse[], Error>;
|
|
10
|
+
export default useWorkflowsQuery;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
|
+
interface AppendChildParams {
|
|
3
|
+
tree: TreeNode | null;
|
|
4
|
+
path: string | null;
|
|
5
|
+
uuid: string;
|
|
6
|
+
child: TreeNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Append child to tree
|
|
10
|
+
* @param tree
|
|
11
|
+
* @param path
|
|
12
|
+
* @param uuid
|
|
13
|
+
* @param child
|
|
14
|
+
*/
|
|
15
|
+
declare const appendNode: ({ tree, path, uuid, child }: AppendChildParams) => TreeNode | {
|
|
16
|
+
attributes: {
|
|
17
|
+
isLeaf: boolean;
|
|
18
|
+
isRoot: boolean;
|
|
19
|
+
depth: number;
|
|
20
|
+
tag?: string;
|
|
21
|
+
helperText?: string;
|
|
22
|
+
isDecision?: boolean;
|
|
23
|
+
label?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
step?: string;
|
|
27
|
+
type: import('@tracktor/types-treege').FieldType;
|
|
28
|
+
value?: never;
|
|
29
|
+
values?: import('@tracktor/types-treege').TreeValues[];
|
|
30
|
+
message?: never;
|
|
31
|
+
tree?: TreeNode;
|
|
32
|
+
treePath?: string;
|
|
33
|
+
repeatable?: boolean;
|
|
34
|
+
hiddenValue?: string;
|
|
35
|
+
isDisabledPast?: boolean;
|
|
36
|
+
route?: import('@tracktor/types-treege').Route;
|
|
37
|
+
parentRef?: string;
|
|
38
|
+
initialQuery?: boolean;
|
|
39
|
+
isMultiple?: boolean;
|
|
40
|
+
pattern?: string;
|
|
41
|
+
patternMessage?: string;
|
|
42
|
+
messages?: {
|
|
43
|
+
on?: string;
|
|
44
|
+
off?: string;
|
|
45
|
+
};
|
|
46
|
+
} | {
|
|
47
|
+
isLeaf: boolean;
|
|
48
|
+
isRoot: boolean;
|
|
49
|
+
depth: number;
|
|
50
|
+
tag?: string;
|
|
51
|
+
helperText?: string;
|
|
52
|
+
messages?: never;
|
|
53
|
+
isDecision?: never;
|
|
54
|
+
label?: string;
|
|
55
|
+
name: string;
|
|
56
|
+
required?: never;
|
|
57
|
+
step?: never;
|
|
58
|
+
type?: never;
|
|
59
|
+
value: string;
|
|
60
|
+
values?: never;
|
|
61
|
+
message?: string;
|
|
62
|
+
tree?: never;
|
|
63
|
+
treePath?: never;
|
|
64
|
+
repeatable?: never;
|
|
65
|
+
hiddenValue?: never;
|
|
66
|
+
isDisabledPast?: boolean;
|
|
67
|
+
route?: import('@tracktor/types-treege').Route;
|
|
68
|
+
parentRef?: string;
|
|
69
|
+
initialQuery?: boolean;
|
|
70
|
+
isMultiple?: boolean;
|
|
71
|
+
pattern?: string;
|
|
72
|
+
patternMessage?: string;
|
|
73
|
+
};
|
|
74
|
+
uuid: string;
|
|
75
|
+
children: TreeNode[];
|
|
76
|
+
treeId?: string;
|
|
77
|
+
treePath?: string;
|
|
78
|
+
childrenTreeRest?: {
|
|
79
|
+
currentTree: TreeNode;
|
|
80
|
+
treePath?: string;
|
|
81
|
+
}[];
|
|
82
|
+
};
|
|
83
|
+
export default appendNode;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { default as getAllNamesFromTree } from './getAllNamesFromTree/getAllNamesFromTree';
|
|
2
|
-
import { default as getAllAncestorNamesFromTree } from './getAllAncestorNamesFromTree/getAllAncestorNamesFromTree';
|
|
3
|
-
import { default as updateNodeInTree } from './updateNodeInTree/updateNodeInTree';
|
|
4
|
-
import { default as removeNode } from './removeNode/removeNode';
|
|
5
|
-
import { default as getTree } from './getTree/getTree';
|
|
6
|
-
import { default as getNode } from './getNode/getNode';
|
|
7
|
-
import { default as findParentNodeByUUIDInTree } from './findParentNodeByUUIDInTree/findParentNodeByUUIDInTree';
|
|
8
|
-
import { default as findNodeByUUIDInTree } from './findNodeByUUIDInTree/findNodeByUUIDInTree';
|
|
9
1
|
import { default as appendNode } from './appendNode/appendNode';
|
|
10
|
-
|
|
2
|
+
import { default as findNodeByUUIDInTree } from './findNodeByUUIDInTree/findNodeByUUIDInTree';
|
|
3
|
+
import { default as findParentNodeByUUIDInTree } from './findParentNodeByUUIDInTree/findParentNodeByUUIDInTree';
|
|
4
|
+
import { default as getNode } from './getNode/getNode';
|
|
5
|
+
import { default as getTree } from './getTree/getTree';
|
|
6
|
+
import { default as removeNode } from './removeNode/removeNode';
|
|
7
|
+
import { default as updateNodeInTree } from './updateNodeInTree/updateNodeInTree';
|
|
8
|
+
import { default as getAllAncestorNamesFromTree } from '../../src/utils/tree/getAllAncestorNamesFromTree/getAllAncestorNamesFromTree';
|
|
9
|
+
import { default as getAllNamesFromTree } from '../../src/utils/tree/getAllNamesFromTree/getAllNamesFromTree';
|
|
11
10
|
export { getTree, updateNodeInTree, appendNode, removeNode, findParentNodeByUUIDInTree, findNodeByUUIDInTree, getAllNamesFromTree, getAllAncestorNamesFromTree, getNode, };
|
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": "1.
|
|
5
|
+
"version": "1.3.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/main.d.ts",
|
|
8
8
|
"main": "./dist/main.umd.cjs",
|
|
@@ -34,35 +34,36 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@codemirror/lang-json": "^6.0.1",
|
|
37
|
-
"@mui/icons-material": "^5.16.
|
|
38
|
-
"@tanstack/react-query": "^
|
|
39
|
-
"@tracktor/design-system": "^2.
|
|
37
|
+
"@mui/icons-material": "^5.16.14",
|
|
38
|
+
"@tanstack/react-query": "^5.68.0",
|
|
39
|
+
"@tracktor/design-system": "^2.7.16",
|
|
40
40
|
"@uiw/codemirror-theme-dracula": "^4.21.19",
|
|
41
41
|
"@uiw/react-codemirror": "^4.21.19",
|
|
42
|
-
"axios": "^1.
|
|
42
|
+
"axios": "^1.8.3",
|
|
43
43
|
"i18next": "^23.5.1",
|
|
44
44
|
"i18next-browser-languagedetector": "^7.1.0",
|
|
45
|
-
"react-d3-tree": "^3.6.
|
|
45
|
+
"react-d3-tree": "^3.6.6",
|
|
46
46
|
"react-i18next": "^13.2.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@testing-library/jest-dom": "^5.17.0",
|
|
50
50
|
"@testing-library/react": "^14.0.0",
|
|
51
51
|
"@testing-library/user-event": "^14.5.1",
|
|
52
|
+
"@tracktor/types-treege": "^0.1.8",
|
|
52
53
|
"@types/node": "^18.18.4",
|
|
53
54
|
"@types/react": "^18.2.25",
|
|
54
55
|
"@types/react-dom": "^18.2.11",
|
|
55
|
-
"@vitejs/plugin-react": "^4.
|
|
56
|
-
"@vitest/ui": "
|
|
57
|
-
"eslint-config-react-tracktor": "^1.
|
|
56
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
57
|
+
"@vitest/ui": "1.6.1",
|
|
58
|
+
"eslint-config-react-tracktor": "^1.10.0",
|
|
58
59
|
"husky": "^8.0.3",
|
|
59
60
|
"jsdom": "22.1.0",
|
|
60
61
|
"react": "^18.2.0",
|
|
61
62
|
"react-dom": "^18.2.0",
|
|
62
63
|
"typescript": "^5.2.2",
|
|
63
|
-
"vite": "^5.
|
|
64
|
-
"vite-plugin-dts": "^
|
|
65
|
-
"vitest": "^1.
|
|
64
|
+
"vite": "^5.4.14",
|
|
65
|
+
"vite-plugin-dts": "^4.5.3",
|
|
66
|
+
"vitest": "^1.6.1"
|
|
66
67
|
},
|
|
67
68
|
"peerDependencies": {
|
|
68
69
|
"@mui/icons-material": ">=5",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Params, Route } from '../../../type/TreeNode';
|
|
2
|
-
import { default as fields } from '../../../../../constants/fields';
|
|
3
|
-
import { ChangeEvent, FormEvent, MouseEvent, SyntheticEvent } from 'react';
|
|
4
|
-
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
5
|
-
|
|
6
|
-
interface Values {
|
|
7
|
-
id: string;
|
|
8
|
-
label: string;
|
|
9
|
-
value: string;
|
|
10
|
-
message?: string;
|
|
11
|
-
}
|
|
12
|
-
declare const useFormTreeCardMutation: () => {
|
|
13
|
-
getDisabledValueField: (index: number) => boolean;
|
|
14
|
-
handleAddParams: () => void;
|
|
15
|
-
handleAddValue: () => void;
|
|
16
|
-
handleChangeHelperText: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
-
handleChangeHiddenValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
-
handleChangeInitialQuery: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
-
handleChangeIsDecisionField: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
-
handleChangeIsDisabledPast: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
-
handleChangeLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
-
handleChangeMessage: (nameMessage: "on" | "off") => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
-
handleChangeMultiple: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
-
handleChangeName: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
-
handleChangeOptionLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
26
|
-
handleChangeOptionMessage: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
27
|
-
handleChangeOptionValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
28
|
-
handleChangeParam: (index: number, property: keyof Params, event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
29
|
-
handleChangeParentRef: (_: SelectChangeEvent<string | undefined>, newValue: string | undefined) => void;
|
|
30
|
-
handleChangePath: <T extends HTMLInputElement | HTMLTextAreaElement>(property: string, event: ChangeEvent<T>) => void;
|
|
31
|
-
handleChangeRepeatable: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
handleChangeRequired: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
-
handleChangeSearchKey: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
-
handleChangeStep: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
-
handleChangeTag: (_: SyntheticEvent<Element, Event>, newValue: string | {
|
|
36
|
-
inputValue: string;
|
|
37
|
-
label: string;
|
|
38
|
-
} | null) => void;
|
|
39
|
-
handleChangeTreeSelect: (event: SelectChangeEvent) => void;
|
|
40
|
-
handleChangeType: (_: SyntheticEvent, value: (typeof fields)[number]) => void;
|
|
41
|
-
handleChangeUrl: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
42
|
-
handleChangeUrlSelect: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
43
|
-
handleDeleteParam: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
44
|
-
handleDeleteValue: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
45
|
-
handleSubmit: (e: FormEvent) => Promise<void>;
|
|
46
|
-
helperText: string;
|
|
47
|
-
hiddenValue: string;
|
|
48
|
-
initialQuery: boolean;
|
|
49
|
-
isAutocomplete: boolean;
|
|
50
|
-
isBooleanField: boolean;
|
|
51
|
-
isDateRangePicker: boolean;
|
|
52
|
-
isDecision: boolean;
|
|
53
|
-
isDecisionField: boolean;
|
|
54
|
-
isDisabledPast: boolean;
|
|
55
|
-
isDynamicSelect: boolean;
|
|
56
|
-
isEditModal: boolean;
|
|
57
|
-
isHiddenField: boolean;
|
|
58
|
-
isLeaf: boolean;
|
|
59
|
-
isMultiple: boolean;
|
|
60
|
-
isMultiplePossible: boolean;
|
|
61
|
-
isRepeatableDisabled: boolean;
|
|
62
|
-
isRequiredDisabled: boolean;
|
|
63
|
-
isTreeField: boolean;
|
|
64
|
-
isWorkflowLoading: boolean;
|
|
65
|
-
label: string;
|
|
66
|
-
messages: {
|
|
67
|
-
off: string;
|
|
68
|
-
on: string;
|
|
69
|
-
};
|
|
70
|
-
name: string;
|
|
71
|
-
parentRef: string | null;
|
|
72
|
-
repeatable: boolean;
|
|
73
|
-
required: boolean;
|
|
74
|
-
route: Route;
|
|
75
|
-
step: string;
|
|
76
|
-
tag: string | null;
|
|
77
|
-
treeSelected: string;
|
|
78
|
-
type: "number" | "text" | "address" | "select" | "time" | "title" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "timeRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
|
|
79
|
-
uuid: string;
|
|
80
|
-
values: Values[];
|
|
81
|
-
};
|
|
82
|
-
export default useFormTreeCardMutation;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { TreeCustomNodeElementProps } from '../../type/TreeNode';
|
|
2
|
-
|
|
3
|
-
declare const TreeCardContainer: ({ nodeDatum, hierarchyPointNode, toggleNode, onNodeClick, onNodeMouseOver, onNodeMouseOut, addChildren, }: TreeCustomNodeElementProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export default TreeCardContainer;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
2
|
-
|
|
3
|
-
interface useTreeSelectProps {
|
|
4
|
-
isControlled: boolean;
|
|
5
|
-
fetchWorkflowsOnOpen?: boolean;
|
|
6
|
-
}
|
|
7
|
-
declare const useTreeSelect: ({ isControlled, fetchWorkflowsOnOpen }: useTreeSelectProps) => {
|
|
8
|
-
currentTree: {
|
|
9
|
-
id?: string | undefined;
|
|
10
|
-
name?: string | undefined;
|
|
11
|
-
errorName?: string | undefined;
|
|
12
|
-
};
|
|
13
|
-
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>>;
|
|
14
|
-
handleChangeTree: ({ target }: SelectChangeEvent) => Promise<void>;
|
|
15
|
-
handleOnOpen: () => Promise<void>;
|
|
16
|
-
setTreeSelected: import('react').Dispatch<import("react").SetStateAction<string>>;
|
|
17
|
-
treeSelected: string;
|
|
18
|
-
workflowsSuggestions: import('../../../../services/workflows/query/useWorkflowsQuery').WorkflowsResponse[] | undefined;
|
|
19
|
-
workflowsSuggestionsLoading: boolean;
|
|
20
|
-
};
|
|
21
|
-
export default useTreeSelect;
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { default as fields } from '../../../constants/fields';
|
|
2
|
-
import { CustomNodeElementProps } from 'react-d3-tree/lib/types/types/common';
|
|
3
|
-
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
4
|
-
|
|
5
|
-
export interface TreeValues {
|
|
6
|
-
id: string;
|
|
7
|
-
label: string;
|
|
8
|
-
value: string;
|
|
9
|
-
message?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface Params {
|
|
12
|
-
id: string;
|
|
13
|
-
key: string;
|
|
14
|
-
value: string;
|
|
15
|
-
}
|
|
16
|
-
export interface PathKey {
|
|
17
|
-
object?: string;
|
|
18
|
-
value?: string;
|
|
19
|
-
label?: string;
|
|
20
|
-
image?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface Route {
|
|
23
|
-
url: string;
|
|
24
|
-
searchKey?: string;
|
|
25
|
-
pathKey?: PathKey;
|
|
26
|
-
params?: Params[];
|
|
27
|
-
}
|
|
28
|
-
export interface TreeNode {
|
|
29
|
-
uuid: string;
|
|
30
|
-
attributes: {
|
|
31
|
-
depth: number;
|
|
32
|
-
tag?: string;
|
|
33
|
-
helperText?: string;
|
|
34
|
-
isDecision?: boolean;
|
|
35
|
-
isLeaf?: boolean;
|
|
36
|
-
isRoot?: boolean;
|
|
37
|
-
label?: string;
|
|
38
|
-
name: string;
|
|
39
|
-
required?: boolean;
|
|
40
|
-
step?: string;
|
|
41
|
-
type: (typeof fields)[number]["type"];
|
|
42
|
-
value?: never;
|
|
43
|
-
values?: TreeValues[];
|
|
44
|
-
message?: never;
|
|
45
|
-
tree?: TreeNode;
|
|
46
|
-
treePath?: string;
|
|
47
|
-
repeatable?: boolean;
|
|
48
|
-
hiddenValue?: string;
|
|
49
|
-
isDisabledPast?: boolean;
|
|
50
|
-
route?: Route;
|
|
51
|
-
parentRef?: string;
|
|
52
|
-
initialQuery?: boolean;
|
|
53
|
-
messages?: {
|
|
54
|
-
on?: string;
|
|
55
|
-
off?: string;
|
|
56
|
-
};
|
|
57
|
-
} | {
|
|
58
|
-
depth: number;
|
|
59
|
-
tag?: string;
|
|
60
|
-
helperText?: string;
|
|
61
|
-
messages?: never;
|
|
62
|
-
isDecision?: never;
|
|
63
|
-
isLeaf?: boolean;
|
|
64
|
-
isRoot?: never;
|
|
65
|
-
label?: string;
|
|
66
|
-
name: string;
|
|
67
|
-
required?: never;
|
|
68
|
-
step?: never;
|
|
69
|
-
type?: never;
|
|
70
|
-
value: string;
|
|
71
|
-
values?: never;
|
|
72
|
-
message?: string;
|
|
73
|
-
tree?: never;
|
|
74
|
-
treePath?: never;
|
|
75
|
-
repeatable?: never;
|
|
76
|
-
hiddenValue?: never;
|
|
77
|
-
isDisabledPast?: boolean;
|
|
78
|
-
route?: Route;
|
|
79
|
-
parentRef?: string;
|
|
80
|
-
initialQuery?: boolean;
|
|
81
|
-
};
|
|
82
|
-
children: TreeNode[];
|
|
83
|
-
treeId?: string;
|
|
84
|
-
}
|
|
85
|
-
export interface TreeNodeField {
|
|
86
|
-
depth: number;
|
|
87
|
-
helperText?: string;
|
|
88
|
-
messages?: {
|
|
89
|
-
on?: string;
|
|
90
|
-
off?: string;
|
|
91
|
-
};
|
|
92
|
-
isDecision?: boolean;
|
|
93
|
-
isLeaf?: boolean;
|
|
94
|
-
isRoot?: boolean;
|
|
95
|
-
label?: string;
|
|
96
|
-
name?: string;
|
|
97
|
-
required?: boolean;
|
|
98
|
-
step?: string;
|
|
99
|
-
type: (typeof fields)[number]["type"];
|
|
100
|
-
value?: never;
|
|
101
|
-
values?: TreeValues[];
|
|
102
|
-
message?: never;
|
|
103
|
-
tree?: TreeNode;
|
|
104
|
-
treePath?: string;
|
|
105
|
-
repeatable?: boolean;
|
|
106
|
-
hiddenValue?: string;
|
|
107
|
-
}
|
|
108
|
-
export interface TreeCustomNodeElementProps extends Omit<CustomNodeElementProps, "hierarchyPointNode"> {
|
|
109
|
-
hierarchyPointNode: HierarchyPointNode<TreeNode>;
|
|
110
|
-
}
|
|
111
|
-
export type TreeRenderCustomNodeElementFn = (rd3tNodeProps: TreeCustomNodeElementProps) => JSX.Element;
|
package/dist/src/main.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as Treege } from './features/Treege';
|
|
2
|
-
export * from './features/Treege';
|
|
3
|
-
export { default as TreePlusIcon } from './components/DataDisplay/Icons/TreePlusIcon';
|
|
4
|
-
export * from './components/DataDisplay/Icons/TreePlusIcon';
|
|
5
|
-
export * from './features/Treege/type/TreeNode';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
-
import { MutateOptions } from '@tanstack/react-query';
|
|
3
|
-
|
|
4
|
-
interface PatchWorkflowVariables {
|
|
5
|
-
workflow: TreeNode;
|
|
6
|
-
version: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
id?: string;
|
|
9
|
-
}
|
|
10
|
-
interface PatchWorkflowResponse {
|
|
11
|
-
status: string;
|
|
12
|
-
}
|
|
13
|
-
declare const usePatchWorkflowsMutation: (options?: MutateOptions<PatchWorkflowResponse, any, PatchWorkflowVariables>) => import('@tanstack/react-query').UseMutationResult<PatchWorkflowResponse, any, PatchWorkflowVariables, unknown>;
|
|
14
|
-
export default usePatchWorkflowsMutation;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
-
import { MutateOptions } from '@tanstack/react-query';
|
|
3
|
-
|
|
4
|
-
interface PostWorkflowVariables {
|
|
5
|
-
workflow: TreeNode;
|
|
6
|
-
version: string;
|
|
7
|
-
label?: string;
|
|
8
|
-
}
|
|
9
|
-
interface PostWorkflowResponse {
|
|
10
|
-
workflow_id: string;
|
|
11
|
-
}
|
|
12
|
-
declare const usePostWorkflowMutation: (options?: MutateOptions<PostWorkflowResponse, any, PostWorkflowVariables>) => import('@tanstack/react-query').UseMutationResult<PostWorkflowResponse, any, PostWorkflowVariables, unknown>;
|
|
13
|
-
export default usePostWorkflowMutation;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
-
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
-
|
|
4
|
-
interface WorkflowResponse {
|
|
5
|
-
id: string;
|
|
6
|
-
label: string;
|
|
7
|
-
version: string;
|
|
8
|
-
workflow: TreeNode;
|
|
9
|
-
}
|
|
10
|
-
declare const useWorkflowQuery: (id?: string, options?: UseQueryOptions<WorkflowResponse>) => import('@tanstack/react-query').UseQueryResult<WorkflowResponse, unknown>;
|
|
11
|
-
export default useWorkflowQuery;
|