treege 0.20.0 → 1.0.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 +4 -3
- package/README.md +0 -1
- package/dist/main.js +5457 -4812
- package/dist/main.umd.cjs +55 -41
- package/dist/src/components/DataDisplay/Tree/Tree.d.ts +4 -4
- package/dist/src/components/DataDisplay/TreeCard/TreeCard.d.ts +5 -5
- package/dist/src/components/DataDisplay/ViewerJSON/ViewerJSON.d.ts +1 -1
- package/dist/src/components/FeedBack/MainModal/MainModal.d.ts +2 -1
- package/dist/src/components/FeedBack/TreeModal/TreeModal.d.ts +4 -3
- package/dist/src/components/Layouts/Action/Action.d.ts +2 -1
- package/dist/src/components/Layouts/Header/Header.d.ts +2 -1
- package/dist/src/components/Layouts/Main/Main.d.ts +2 -1
- package/dist/src/components/Layouts/MosaicLayout/MosaicLayout.d.ts +2 -1
- package/dist/src/components/Layouts/Sidebar/Sidebar.d.ts +2 -1
- package/dist/src/components/Theme/DarkTheme/DarkTheme.d.ts +2 -1
- package/dist/src/config/i18n.config.d.ts +2 -1
- package/dist/src/config/query.config.d.ts +2 -1
- package/dist/src/config/test.config.d.ts +1 -0
- package/dist/src/config/theme.config.d.ts +2 -1
- package/dist/src/constants/TreeData.d.ts +2 -1
- package/dist/src/context/Auth/AuthContext.d.ts +1 -1
- package/dist/src/context/Auth/AuthProvider.d.ts +2 -1
- package/dist/src/context/Snackbar/SnackbarContext.d.ts +3 -2
- package/dist/src/context/Snackbar/SnackbarProvider.d.ts +2 -1
- package/dist/src/context/Snackbar/snackbarReducer.d.ts +2 -1
- package/dist/src/features/Treege/Treege.d.ts +2 -1
- package/dist/src/features/Treege/components/Feedback/DynamicSelectWarning/index.d.ts +4 -0
- package/dist/src/features/Treege/components/Feedback/EndPointWarning/index.d.ts +4 -0
- package/dist/src/features/Treege/components/Forms/FormTreeCardDelete/useFormTreeCardDelete.d.ts +2 -1
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/ExtraField.d.ts +3 -2
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +5 -4
- package/dist/src/features/Treege/components/{DynamicSelectFieldFromTree → Inputs/DynamicSelectFieldFromTree}/DynamicSelectFieldFromTree.d.ts +4 -3
- package/dist/src/features/Treege/components/Inputs/DynamicSelectFieldFromTree/index.d.ts +4 -0
- package/dist/src/features/Treege/components/{FieldSelect → Inputs/FieldSelect}/FieldSelect.d.ts +3 -2
- package/dist/src/features/Treege/components/Inputs/FieldSelect/index.d.ts +4 -0
- package/dist/src/features/Treege/components/{FieldSelectAutocompleteCreatable → Inputs/FieldSelectAutocompleteCreatable}/FieldSelectAutocompleteCreatable.d.ts +2 -1
- package/dist/src/features/Treege/components/Inputs/FieldSelectAutocompleteCreatable/index.d.ts +4 -0
- package/dist/src/features/Treege/components/TreeCardContainer/TreeCardContainer.d.ts +2 -1
- package/dist/src/features/Treege/components/TreeCardContainer/useTreeCardContainer.d.ts +3 -2
- package/dist/src/features/Treege/components/TreeGrid/useTreeGrid.d.ts +1 -1
- package/dist/src/features/Treege/components/TreeNameTextField/index.d.ts +2 -1
- package/dist/src/features/Treege/components/TreeNameTextField/useTreeNameTextField.d.ts +2 -1
- package/dist/src/features/Treege/components/TreeSelect/TreeSelect.d.ts +2 -1
- package/dist/src/features/Treege/components/TreeSelect/index.d.ts +2 -1
- package/dist/src/features/Treege/components/TreeSelect/useTreeSelect.d.ts +4 -4
- package/dist/src/features/Treege/context/TreegeContext.d.ts +6 -5
- package/dist/src/features/Treege/context/TreegeProvider.d.ts +4 -3
- package/dist/src/features/Treege/index.d.ts +2 -1
- package/dist/src/features/Treege/reducer/treeReducer.d.ts +8 -7
- package/dist/src/features/Treege/type/TreeNode.d.ts +12 -9
- package/dist/src/hooks/useSnackbar/index.d.ts +3 -2
- package/dist/src/hooks/useSnackbar/useSnackbar.d.ts +1 -0
- package/dist/src/hooks/useTreegeContext/index.d.ts +3 -2
- package/dist/src/locales/en/translation-en.d.ts +1 -0
- package/dist/src/locales/fr/translation-fr.d.ts +1 -0
- package/dist/src/services/workflows/mutation/usePatchWorkflowsMutation.d.ts +3 -2
- package/dist/src/services/workflows/mutation/usePostWorkflowMutation.d.ts +3 -2
- package/dist/src/services/workflows/query/useWorkflowQuery.d.ts +3 -2
- package/dist/src/services/workflows/query/useWorkflowsQuery.d.ts +3 -2
- package/dist/src/utils/array/index.d.ts +3 -2
- package/dist/src/utils/object/index.d.ts +1 -1
- package/dist/src/utils/tree/appendNode/appendNode.d.ts +10 -7
- package/dist/src/utils/tree/appendNode/test/mock.d.ts +3 -2
- package/dist/src/utils/tree/findNodeByUUIDInTree/findNodeByUUIDInTree.d.ts +9 -0
- package/dist/src/utils/tree/{findNodeByNameInTree → findNodeByUUIDInTree}/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/findParentNodeByUUIDInTree/findParentNodeByUUIDInTree.d.ts +10 -0
- package/dist/src/utils/tree/{findParentNodeByNameInTree → findParentNodeByUUIDInTree}/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/getNamesFromTree/getNamesFromTree.d.ts +8 -0
- package/dist/src/utils/tree/{getNamesInTree → getNamesFromTree}/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/getNode/getNode.d.ts +4 -3
- package/dist/src/utils/tree/getNode/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/getTree/getTree.d.ts +2 -1
- package/dist/src/utils/tree/getTree/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/getUniqueTagsInTree/getUniqueTagsInTree.d.ts +2 -1
- package/dist/src/utils/tree/getUniqueTagsInTree/test/mock.d.ts +2 -1
- package/dist/src/utils/tree/index.d.ts +10 -9
- package/dist/src/utils/tree/removeNode/removeNode.d.ts +5 -4
- package/dist/src/utils/tree/removeNode/test/mock.d.ts +3 -2
- package/dist/src/utils/tree/updateNodeInTree/test/mock.d.ts +3 -2
- package/dist/src/utils/tree/updateNodeInTree/updateNodeInTree.d.ts +7 -6
- package/package.json +9 -10
- package/dist/src/features/Treege/components/DynamicSelectFieldFromTree/index.d.ts +0 -3
- package/dist/src/features/Treege/components/DynamicSelectWarning/index.d.ts +0 -3
- package/dist/src/features/Treege/components/EndPointWarning/index.d.ts +0 -3
- package/dist/src/features/Treege/components/FieldSelect/index.d.ts +0 -3
- package/dist/src/features/Treege/components/FieldSelectAutocompleteCreatable/index.d.ts +0 -3
- package/dist/src/utils/tree/findNodeByNameInTree/findNodeByNameInTree.d.ts +0 -8
- package/dist/src/utils/tree/findParentNodeByNameInTree/findParentNodeByNameInTree.d.ts +0 -9
- package/dist/src/utils/tree/getNamesInTree/getNamesInTree.d.ts +0 -7
- package/dist/src/utils/tree/getNamesInTree/test/getNamesInTree.d.ts +0 -1
- /package/dist/src/features/Treege/components/{DynamicSelectWarning → Feedback/DynamicSelectWarning}/DynamicSelectWarning.d.ts +0 -0
- /package/dist/src/features/Treege/components/{EndPointWarning → Feedback/EndPointWarning}/EndPointWarning.d.ts +0 -0
- /package/dist/src/features/Treege/components/{ButtonCreateTree → Inputs/ButtonCreateTree}/ButtonCreateTree.d.ts +0 -0
- /package/dist/src/features/Treege/components/{ButtonCreateTree → Inputs/ButtonCreateTree}/useButtonCreateTree.d.ts +0 -0
- /package/dist/src/features/Treege/components/{FieldSelect → Inputs/FieldSelect}/useFieldSelect.d.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { TreeNode, TreeRenderCustomNodeElementFn } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
|
|
3
3
|
interface TreeProps {
|
|
4
|
-
data:
|
|
4
|
+
data: TreeNode | null;
|
|
5
5
|
renderCustomNodeElement?: TreeRenderCustomNodeElementFn;
|
|
6
6
|
nodeSize?: {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
declare const _default: import(
|
|
11
|
+
declare const _default: import('react').MemoExoticComponent<({ data, renderCustomNodeElement, nodeSize, }: TreeProps) => import("react/jsx-runtime").JSX.Element>;
|
|
12
12
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
import { CustomNodeElementProps, TreeNodeDatum } from 'react-d3-tree/lib/types/types/common';
|
|
3
|
+
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
4
|
+
|
|
5
5
|
interface TreeCardProps extends Omit<CustomNodeElementProps, "nodeDatum" | "hierarchyPointNode"> {
|
|
6
6
|
nodeDatum: TreeNode | TreeNodeDatum;
|
|
7
7
|
size?: number;
|
|
@@ -11,5 +11,5 @@ interface TreeCardProps extends Omit<CustomNodeElementProps, "nodeDatum" | "hier
|
|
|
11
11
|
onOpenTreeModal?(hierarchyPointNode: HierarchyPointNode<TreeNode>): void;
|
|
12
12
|
hierarchyPointNode: HierarchyPointNode<TreeNode>;
|
|
13
13
|
}
|
|
14
|
-
declare const _default: import(
|
|
14
|
+
declare const _default: import('react').MemoExoticComponent<({ nodeDatum, onAddChildren, onEditChildren, onDeleteChildren, onOpenTreeModal, hierarchyPointNode, size, }: TreeCardProps) => import("react/jsx-runtime").JSX.Element>;
|
|
15
15
|
export default _default;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { TransitionProps } from '@tracktor/design-system';
|
|
3
|
+
|
|
3
4
|
interface TreeModalProps {
|
|
4
5
|
children?: ReactNode;
|
|
5
6
|
title?: string;
|
|
6
7
|
open: boolean;
|
|
7
8
|
onClose?(): void;
|
|
8
9
|
}
|
|
9
|
-
export declare const Transition: import(
|
|
10
|
+
export declare const Transition: import('react').ForwardRefExoticComponent<{
|
|
10
11
|
children: ReactElement;
|
|
11
12
|
} & TransitionProps & import("react").RefAttributes<unknown>>;
|
|
12
13
|
declare const TreeModal: ({ children, open, onClose, title }: TreeModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ReducerAction } from
|
|
1
|
+
import { ReducerAction } from 'react';
|
|
2
|
+
|
|
2
3
|
type Severity = "error" | "warning" | "info" | "success";
|
|
3
4
|
export interface SnackbarState {
|
|
4
5
|
open: boolean;
|
|
@@ -15,5 +16,5 @@ export declare const snackbarDefaultValue: {
|
|
|
15
16
|
open: boolean;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
18
|
-
export declare const SnackbarContext: import(
|
|
19
|
+
export declare const SnackbarContext: import('react').Context<SnackbarValue>;
|
|
19
20
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
3
|
+
|
|
3
4
|
interface ExtraFieldProps {
|
|
4
5
|
helperText: string;
|
|
5
6
|
hiddenValue: string;
|
package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ChangeEvent, FormEvent, MouseEvent, SyntheticEvent } from
|
|
3
|
-
import
|
|
1
|
+
import { Params, Route, TreeNodeField } from '../../../type/TreeNode';
|
|
2
|
+
import { ChangeEvent, FormEvent, MouseEvent, SyntheticEvent } from 'react';
|
|
3
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
4
|
+
|
|
4
5
|
declare const useFormTreeCardMutation: () => {
|
|
5
6
|
getDisabledValueField: (index: number) => boolean;
|
|
6
7
|
handleAddParams: () => void;
|
|
@@ -65,7 +66,7 @@ declare const useFormTreeCardMutation: () => {
|
|
|
65
66
|
tag: string | null;
|
|
66
67
|
treeSelected: string;
|
|
67
68
|
type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "timeRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
|
|
68
|
-
|
|
69
|
+
uuid: string;
|
|
69
70
|
values: {
|
|
70
71
|
id: string;
|
|
71
72
|
label: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { SelectChangeEvent } from
|
|
1
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
2
|
+
|
|
2
3
|
interface DynamicSelectFieldFromTreeProps {
|
|
3
4
|
value: string | null;
|
|
4
5
|
onChange?: (event: SelectChangeEvent<string | undefined>, newValue: string | undefined) => void;
|
|
5
|
-
|
|
6
|
+
currentUUID: string;
|
|
6
7
|
}
|
|
7
|
-
declare const DynamicSelectFieldFromTree: ({ value, onChange,
|
|
8
|
+
declare const DynamicSelectFieldFromTree: ({ value, onChange, currentUUID }: DynamicSelectFieldFromTreeProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export default DynamicSelectFieldFromTree;
|
package/dist/src/features/Treege/components/{FieldSelect → Inputs/FieldSelect}/FieldSelect.d.ts
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { TreeNodeField } from '../../../type/TreeNode';
|
|
2
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
3
|
+
|
|
3
4
|
interface FieldsSelectProps {
|
|
4
5
|
value: TreeNodeField["type"];
|
|
5
6
|
onChange?: (event: SelectChangeEvent<TreeNodeField["type"]>) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TreeCustomNodeElementProps } from '../../type/TreeNode';
|
|
2
|
+
|
|
2
3
|
declare const TreeCardContainer: ({ nodeDatum, hierarchyPointNode, toggleNode, onNodeClick, onNodeMouseOver, onNodeMouseOut, addChildren, }: TreeCustomNodeElementProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default TreeCardContainer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { TreeNode } from '../../type/TreeNode';
|
|
2
|
+
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
3
|
+
|
|
3
4
|
declare const useTreeCardContainer: () => {
|
|
4
5
|
handleAddChildren: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
5
6
|
handleCloseTreeModal: () => void;
|
|
@@ -2,7 +2,7 @@ declare const useTreeGrid: () => {
|
|
|
2
2
|
closeModal: () => void;
|
|
3
3
|
getTitleModalDelete: () => "Are you sure to delete « {{name}} »";
|
|
4
4
|
getTitleModalMutation: () => "Add a field" | "Add a field to « {{name}} »" | "Edit field « {{name}} »";
|
|
5
|
-
handleChangeTree: (tree:
|
|
5
|
+
handleChangeTree: (tree: string) => false | undefined;
|
|
6
6
|
isDeleteModal: boolean;
|
|
7
7
|
isModalMutationOpen: boolean;
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
2
|
+
|
|
3
3
|
interface useTreeSelectProps {
|
|
4
4
|
isControlled: boolean;
|
|
5
5
|
fetchWorkflowsOnOpen?: boolean;
|
|
@@ -10,10 +10,10 @@ declare const useTreeSelect: ({ isControlled, fetchWorkflowsOnOpen }: useTreeSel
|
|
|
10
10
|
name?: string | undefined;
|
|
11
11
|
errorName?: string | undefined;
|
|
12
12
|
};
|
|
13
|
-
fetchWorkflowSuggestions: <TPageData>(options?: (import(
|
|
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
14
|
handleChangeTree: ({ target }: SelectChangeEvent) => Promise<void>;
|
|
15
15
|
handleOnOpen: () => Promise<void>;
|
|
16
|
-
setTreeSelected: import(
|
|
16
|
+
setTreeSelected: import('react').Dispatch<import("react").SetStateAction<string>>;
|
|
17
17
|
treeSelected: string;
|
|
18
18
|
workflowsSuggestions: import('../../../../services/workflows/query/useWorkflowsQuery').WorkflowsResponse[] | undefined;
|
|
19
19
|
workflowsSuggestionsLoading: boolean;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { TreeNode } from '../type/TreeNode';
|
|
2
|
+
import { BackendConfig } from '../Treege';
|
|
3
|
+
import { ReducerAction, SetStateAction } from 'react';
|
|
4
|
+
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
5
|
+
|
|
5
6
|
type ModalType = "add" | "edit" | "delete" | "save" | null;
|
|
6
7
|
type TreePath = {
|
|
7
8
|
path: string;
|
|
@@ -83,5 +84,5 @@ export interface TreeDefaultValue {
|
|
|
83
84
|
version: string;
|
|
84
85
|
}
|
|
85
86
|
export declare const treeDefaultValue: TreeDefaultValue;
|
|
86
|
-
export declare const TreegeContext: import(
|
|
87
|
+
export declare const TreegeContext: import('react').Context<TreeDefaultValue>;
|
|
87
88
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BackendConfig } from '
|
|
3
|
-
import
|
|
1
|
+
import { TreeNode } from '../type/TreeNode';
|
|
2
|
+
import { BackendConfig } from '../Treege';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
4
5
|
interface TreegeProviderProps {
|
|
5
6
|
children: ReactNode;
|
|
6
7
|
initialTree?: TreeNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TreeNode } from '../type/TreeNode';
|
|
2
|
+
|
|
2
3
|
export declare const treeReducerActionType: {
|
|
3
4
|
readonly appendTreeCard: "appendTreeCard";
|
|
4
5
|
readonly deleteTreeCard: "deleteTreeCard";
|
|
@@ -6,22 +7,22 @@ export declare const treeReducerActionType: {
|
|
|
6
7
|
readonly resetTree: "resetTree";
|
|
7
8
|
readonly setTree: "setTree";
|
|
8
9
|
};
|
|
9
|
-
export declare const appendTreeCard: (path: string | null,
|
|
10
|
+
export declare const appendTreeCard: (path: string | null, uuid: string, children: TreeNode) => {
|
|
10
11
|
children: TreeNode;
|
|
11
|
-
name: string;
|
|
12
12
|
path: string | null;
|
|
13
13
|
type: "appendTreeCard";
|
|
14
|
+
uuid: string;
|
|
14
15
|
};
|
|
15
|
-
export declare const replaceTreeCard: (path: string | null,
|
|
16
|
+
export declare const replaceTreeCard: (path: string | null, uuid: string, children: TreeNode) => {
|
|
16
17
|
children: TreeNode;
|
|
17
|
-
name: string;
|
|
18
18
|
path: string | null;
|
|
19
19
|
type: "replaceTreeCard";
|
|
20
|
+
uuid: string;
|
|
20
21
|
};
|
|
21
|
-
export declare const deleteTreeCard: (path: string | "",
|
|
22
|
-
name: string;
|
|
22
|
+
export declare const deleteTreeCard: (path: string | "", uuid: string) => {
|
|
23
23
|
path: string;
|
|
24
24
|
type: "deleteTreeCard";
|
|
25
|
+
uuid: string;
|
|
25
26
|
};
|
|
26
27
|
export declare const resetTree: () => {
|
|
27
28
|
type: "resetTree";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
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
5
|
export interface TreeValues {
|
|
6
6
|
id: string;
|
|
7
7
|
label: string;
|
|
@@ -25,8 +25,8 @@ export interface Route {
|
|
|
25
25
|
pathKey?: PathKey;
|
|
26
26
|
params?: Params[];
|
|
27
27
|
}
|
|
28
|
-
export interface TreeNode
|
|
29
|
-
|
|
28
|
+
export interface TreeNode {
|
|
29
|
+
uuid: string;
|
|
30
30
|
attributes: {
|
|
31
31
|
depth: number;
|
|
32
32
|
tag?: string;
|
|
@@ -38,7 +38,8 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
|
|
|
38
38
|
isDecision?: boolean;
|
|
39
39
|
isLeaf?: boolean;
|
|
40
40
|
isRoot?: boolean;
|
|
41
|
-
label
|
|
41
|
+
label?: string;
|
|
42
|
+
name: string;
|
|
42
43
|
required?: boolean;
|
|
43
44
|
step?: string;
|
|
44
45
|
type: (typeof fields)[number]["type"];
|
|
@@ -60,7 +61,8 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
|
|
|
60
61
|
isDecision?: never;
|
|
61
62
|
isLeaf?: boolean;
|
|
62
63
|
isRoot?: never;
|
|
63
|
-
label
|
|
64
|
+
label?: string;
|
|
65
|
+
name?: never;
|
|
64
66
|
required?: never;
|
|
65
67
|
step?: never;
|
|
66
68
|
type?: never;
|
|
@@ -88,7 +90,8 @@ export interface TreeNodeField {
|
|
|
88
90
|
isDecision?: boolean;
|
|
89
91
|
isLeaf?: boolean;
|
|
90
92
|
isRoot?: boolean;
|
|
91
|
-
label
|
|
93
|
+
label?: string;
|
|
94
|
+
name?: string;
|
|
92
95
|
required?: boolean;
|
|
93
96
|
step?: string;
|
|
94
97
|
type: (typeof fields)[number]["type"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MutateOptions } from "@tanstack/react-query";
|
|
2
1
|
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
import { MutateOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
3
4
|
interface PatchWorkflowVariables {
|
|
4
5
|
workflow: TreeNode;
|
|
5
6
|
version: string;
|
|
@@ -9,5 +10,5 @@ interface PatchWorkflowVariables {
|
|
|
9
10
|
interface PatchWorkflowResponse {
|
|
10
11
|
status: string;
|
|
11
12
|
}
|
|
12
|
-
declare const usePatchWorkflowsMutation: (options?: MutateOptions<PatchWorkflowResponse, any, PatchWorkflowVariables>) => import(
|
|
13
|
+
declare const usePatchWorkflowsMutation: (options?: MutateOptions<PatchWorkflowResponse, any, PatchWorkflowVariables>) => import('@tanstack/react-query').UseMutationResult<PatchWorkflowResponse, any, PatchWorkflowVariables, unknown>;
|
|
13
14
|
export default usePatchWorkflowsMutation;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { MutateOptions } from "@tanstack/react-query";
|
|
2
1
|
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
import { MutateOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
3
4
|
interface PostWorkflowVariables {
|
|
4
5
|
workflow: TreeNode;
|
|
5
6
|
version: string;
|
|
@@ -8,5 +9,5 @@ interface PostWorkflowVariables {
|
|
|
8
9
|
interface PostWorkflowResponse {
|
|
9
10
|
workflow_id: string;
|
|
10
11
|
}
|
|
11
|
-
declare const usePostWorkflowMutation: (options?: MutateOptions<PostWorkflowResponse, any, PostWorkflowVariables>) => import(
|
|
12
|
+
declare const usePostWorkflowMutation: (options?: MutateOptions<PostWorkflowResponse, any, PostWorkflowVariables>) => import('@tanstack/react-query').UseMutationResult<PostWorkflowResponse, any, PostWorkflowVariables, unknown>;
|
|
12
13
|
export default usePostWorkflowMutation;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { UseQueryOptions } from "@tanstack/react-query";
|
|
2
1
|
import { TreeNode } from '../../../features/Treege/type/TreeNode';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
3
|
+
|
|
3
4
|
interface WorkflowResponse {
|
|
4
5
|
id: string;
|
|
5
6
|
label: string;
|
|
6
7
|
version: string;
|
|
7
8
|
workflow: TreeNode;
|
|
8
9
|
}
|
|
9
|
-
declare const useWorkflowQuery: (id?: string, options?: UseQueryOptions<WorkflowResponse>) => import(
|
|
10
|
+
declare const useWorkflowQuery: (id?: string, options?: UseQueryOptions<WorkflowResponse>) => import('@tanstack/react-query').UseQueryResult<WorkflowResponse, unknown>;
|
|
10
11
|
export default useWorkflowQuery;
|