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
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -91,31 +91,6 @@ Clone the repository and install dependencies
|
|
|
91
91
|
```console
|
|
92
92
|
yarn install
|
|
93
93
|
```
|
|
94
|
-
|
|
95
|
-
## Available Scripts
|
|
96
|
-
|
|
97
|
-
In the project directory, you can run:
|
|
98
|
-
|
|
99
|
-
### `yarn dev`
|
|
100
|
-
|
|
101
|
-
Runs the app in the development mode.\
|
|
102
|
-
Open [http://localhost:5173](http://localhost:5173) to view it in the browser.
|
|
103
|
-
|
|
104
|
-
The page will reload if you make edits.\
|
|
105
|
-
You will also see any lint errors in the console.
|
|
106
|
-
|
|
107
|
-
### `yarn build`
|
|
108
|
-
|
|
109
|
-
Builds the app for production to the `dist` folder.\
|
|
110
|
-
It correctly bundles React in production mode and optimizes the build for the best performance.
|
|
111
|
-
|
|
112
|
-
The build is minified and the filenames include the hashes.\
|
|
113
|
-
Your app is ready to be deployed!
|
|
114
|
-
|
|
115
|
-
See the section about [deployment](https://vitejs.dev/guide/static-deploy.html) for more information.
|
|
116
|
-
|
|
117
|
-
### `yarn preview`
|
|
118
|
-
|
|
119
94
|
Locally preview production build
|
|
120
95
|
|
|
121
96
|
## Convention
|
|
@@ -123,3 +98,7 @@ Locally preview production build
|
|
|
123
98
|
- [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
|
|
124
99
|
- [Versioning](https://semver.org)
|
|
125
100
|
- [Conventional Commits](https://www.conventionalcommits.org)
|
|
101
|
+
|
|
102
|
+
## Type Definitions
|
|
103
|
+
|
|
104
|
+
This library uses type definitions from [@tracktor/types-treege](https://www.npmjs.com/package/@tracktor/types-treege)
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { TreeNode
|
|
2
|
-
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
import { TreeCustomNodeElementProps } from '../../../src/features/Treege/components/TreeCardContainer/TreeCardContainer';
|
|
4
|
+
export type TreeRenderCustomNodeElementFn = (rd3tNodeProps: TreeCustomNodeElementProps) => ReactElement;
|
|
3
5
|
interface TreeProps {
|
|
4
6
|
data: TreeNode | null;
|
|
5
7
|
renderCustomNodeElement?: TreeRenderCustomNodeElementFn;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TreeNode } from '
|
|
2
|
-
import { CustomNodeElementProps, TreeNodeDatum } from 'react-d3-tree/lib/types/types/common';
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
3
2
|
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
4
|
-
|
|
3
|
+
import { CustomNodeElementProps, TreeNodeDatum } from 'react-d3-tree/lib/types/types/common';
|
|
5
4
|
interface TreeCardProps extends Omit<CustomNodeElementProps, "nodeDatum" | "hierarchyPointNode"> {
|
|
6
5
|
nodeDatum: TreeNode | TreeNodeDatum;
|
|
7
6
|
size?: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
1
|
import { TransitionProps } from '@tracktor/design-system';
|
|
3
|
-
|
|
2
|
+
import { ReactElement, ReactNode } from 'react';
|
|
4
3
|
interface TreeModalProps {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
title?: string;
|
|
@@ -9,6 +8,6 @@ interface TreeModalProps {
|
|
|
9
8
|
}
|
|
10
9
|
export declare const Transition: import('react').ForwardRefExoticComponent<{
|
|
11
10
|
children: ReactElement;
|
|
12
|
-
} & TransitionProps & import(
|
|
11
|
+
} & TransitionProps & import('react').RefAttributes<unknown>>;
|
|
13
12
|
declare const TreeModal: ({ children, open, onClose, title }: TreeModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
export default TreeModal;
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SnackbarState } from '
|
|
2
|
-
|
|
1
|
+
import { SnackbarState } from '../../src/context/Snackbar/SnackbarContext';
|
|
3
2
|
export declare const snackbarReducerActionType: {
|
|
4
3
|
readonly closeSnackbar: "closeSnackbar";
|
|
5
4
|
readonly openSnackbar: "openSnackbar";
|
|
@@ -18,7 +17,7 @@ declare const snackbarReducer: (snackbar: SnackbarState, action: any) => {
|
|
|
18
17
|
severity: any;
|
|
19
18
|
} | {
|
|
20
19
|
open: boolean;
|
|
21
|
-
message?: string
|
|
22
|
-
severity?:
|
|
20
|
+
message?: string;
|
|
21
|
+
severity?: "success" | "error" | "info" | "warning";
|
|
23
22
|
};
|
|
24
23
|
export default snackbarReducer;
|
package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
2
|
+
import { Params, Route } from '@tracktor/types-treege';
|
|
3
|
+
import { ChangeEvent, FormEvent, MouseEvent, SyntheticEvent } from 'react';
|
|
4
|
+
import { default as fields } from '../../../../../src/constants/fields';
|
|
5
|
+
interface Values {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const useFormTreeCardMutation: () => {
|
|
12
|
+
getDisabledValueField: (index: number) => boolean;
|
|
13
|
+
handleAddParams: () => void;
|
|
14
|
+
handleAddValue: () => void;
|
|
15
|
+
handleChangeHelperText: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
handleChangeHiddenValue: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
handleChangeInitialQuery: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
handleChangeIsDecisionField: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
19
|
+
handleChangeIsDisabledPast: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
handleChangeLabel: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
handleChangeMessage: (nameMessage: "on" | "off") => ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
22
|
+
handleChangeMultiple: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
+
handleChangeName: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
handleChangeParam: (index: number, property: keyof Params, event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
25
|
+
handleChangeParentRef: (_: SelectChangeEvent<string | undefined>, newValue: string | undefined) => void;
|
|
26
|
+
handleChangePath: <T extends HTMLInputElement | HTMLTextAreaElement>(property: string, event: ChangeEvent<T>) => void;
|
|
27
|
+
handleChangePattern: (_: SyntheticEvent, value: null | string | {
|
|
28
|
+
label: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}) => void;
|
|
31
|
+
handleChangePatternMessage: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
+
handleChangeRepeatable: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
+
handleChangeRequired: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
+
handleChangeSearchKey: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
+
handleChangeTag: (_: SyntheticEvent<Element, Event>, newValue: string | {
|
|
36
|
+
inputValue: string;
|
|
37
|
+
label: string;
|
|
38
|
+
} | null) => void;
|
|
39
|
+
handleChangeTreeSelect: ({ target }: SelectChangeEvent) => void;
|
|
40
|
+
handleChangeType: (_: SyntheticEvent, value: (typeof fields)[number]) => void;
|
|
41
|
+
handleChangeUrl: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
42
|
+
handleChangeUrlSelect: ({ target }: ChangeEvent<HTMLInputElement>) => void;
|
|
43
|
+
handleDeleteParam: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
44
|
+
handleDeleteValue: ({ currentTarget }: MouseEvent<HTMLButtonElement>) => void;
|
|
45
|
+
handlePresetValues: (predicate: "value" | "label" | "message") => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
46
|
+
handleSubmit: (e: FormEvent) => Promise<void>;
|
|
47
|
+
helperText: string;
|
|
48
|
+
hiddenValue: string;
|
|
49
|
+
initialQuery: boolean;
|
|
50
|
+
isAutocomplete: boolean;
|
|
51
|
+
isBooleanField: boolean;
|
|
52
|
+
isDateRangePicker: boolean;
|
|
53
|
+
isDecision: boolean;
|
|
54
|
+
isDecisionField: boolean;
|
|
55
|
+
isDisabledPast: boolean;
|
|
56
|
+
isDynamicSelect: boolean;
|
|
57
|
+
isEditModal: boolean;
|
|
58
|
+
isHiddenField: boolean;
|
|
59
|
+
isLeaf: boolean;
|
|
60
|
+
isMultiple: boolean;
|
|
61
|
+
isMultiplePossible: boolean;
|
|
62
|
+
isRepeatableDisabled: boolean;
|
|
63
|
+
isRequiredDisabled: boolean;
|
|
64
|
+
isTreeField: boolean;
|
|
65
|
+
isWorkflowLoading: boolean;
|
|
66
|
+
label: string;
|
|
67
|
+
messages: {
|
|
68
|
+
off: string;
|
|
69
|
+
on: string;
|
|
70
|
+
};
|
|
71
|
+
name: string;
|
|
72
|
+
parentRef: string | null;
|
|
73
|
+
pattern: string | {
|
|
74
|
+
label: string;
|
|
75
|
+
value: string;
|
|
76
|
+
} | null;
|
|
77
|
+
patternMessage: string;
|
|
78
|
+
patternOptions: ({
|
|
79
|
+
label: "Email";
|
|
80
|
+
value: string;
|
|
81
|
+
} | {
|
|
82
|
+
label: "Phone number";
|
|
83
|
+
value: string;
|
|
84
|
+
} | {
|
|
85
|
+
label: "First name and last name";
|
|
86
|
+
value: string;
|
|
87
|
+
} | {
|
|
88
|
+
label: "Card number";
|
|
89
|
+
value: string;
|
|
90
|
+
} | {
|
|
91
|
+
label: "Nombre";
|
|
92
|
+
value: string;
|
|
93
|
+
} | {
|
|
94
|
+
label: "Letter";
|
|
95
|
+
value: string;
|
|
96
|
+
} | {
|
|
97
|
+
label: "Number and letter";
|
|
98
|
+
value: string;
|
|
99
|
+
} | {
|
|
100
|
+
label: "URL";
|
|
101
|
+
value: string;
|
|
102
|
+
})[];
|
|
103
|
+
repeatable: boolean;
|
|
104
|
+
required: boolean;
|
|
105
|
+
route: Route;
|
|
106
|
+
tag: string | null;
|
|
107
|
+
treeSelected: string;
|
|
108
|
+
type: import('@tracktor/types-treege').FieldType;
|
|
109
|
+
uuid: string;
|
|
110
|
+
values: Values[];
|
|
111
|
+
};
|
|
112
|
+
export default useFormTreeCardMutation;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { TreeNodeField } from '../../../type/TreeNode';
|
|
2
|
-
import { default as fields } from '../../../../../constants/fields';
|
|
3
|
-
import { SyntheticEvent } from 'react';
|
|
4
1
|
import { SxProps } from '@tracktor/design-system';
|
|
5
|
-
|
|
2
|
+
import { TreeNodeField } from '@tracktor/types-treege';
|
|
3
|
+
import { SyntheticEvent } from 'react';
|
|
4
|
+
import { default as fields } from '../../../../../src/constants/fields';
|
|
6
5
|
export interface FieldsSelectProps {
|
|
7
6
|
id: string;
|
|
8
7
|
value: TreeNodeField["type"];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
|
+
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
3
|
+
import { CustomNodeElementProps } from 'react-d3-tree/lib/types/types/common';
|
|
4
|
+
export interface TreeCustomNodeElementProps extends Omit<CustomNodeElementProps, "hierarchyPointNode"> {
|
|
5
|
+
hierarchyPointNode: HierarchyPointNode<TreeNode>;
|
|
6
|
+
}
|
|
7
|
+
declare const TreeCardContainer: ({ nodeDatum, hierarchyPointNode, toggleNode, onNodeClick, onNodeMouseOver, onNodeMouseOut, addChildren, }: TreeCustomNodeElementProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default TreeCardContainer;
|
package/dist/{src/features → features}/Treege/components/TreeCardContainer/useTreeCardContainer.d.ts
RENAMED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { TreeNode } from '
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
2
2
|
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
3
|
-
|
|
4
3
|
declare const useTreeCardContainer: () => {
|
|
5
4
|
handleAddChildren: (hierarchyPointNode: HierarchyPointNode<TreeNode>) => void;
|
|
6
5
|
handleCloseTreeModal: () => void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SelectChangeEvent } from '@tracktor/design-system';
|
|
2
|
+
interface useTreeSelectProps {
|
|
3
|
+
isControlled: boolean;
|
|
4
|
+
fetchWorkflowsOnOpen?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const useTreeSelect: ({ isControlled, fetchWorkflowsOnOpen }: useTreeSelectProps) => {
|
|
7
|
+
currentTree: import('@tracktor/types-treege').CurrentTree;
|
|
8
|
+
fetchWorkflowSuggestions: (options?: import('@tanstack/query-core').RefetchOptions) => Promise<import('@tanstack/query-core').QueryObserverResult<import('../../../../src/services/workflows/query/useWorkflowsQuery').WorkflowsResponse[], Error>>;
|
|
9
|
+
handleChangeTree: ({ target }: SelectChangeEvent) => Promise<void>;
|
|
10
|
+
handleOnOpen: () => Promise<void>;
|
|
11
|
+
setTreeSelected: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
12
|
+
treeSelected: string;
|
|
13
|
+
workflowsSuggestions: import('../../../../src/services/workflows/query/useWorkflowsQuery').WorkflowsResponse[] | undefined;
|
|
14
|
+
workflowsSuggestionsLoading: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default useTreeSelect;
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import { TreeNode } from '
|
|
2
|
-
import { BackendConfig } from '../Treege';
|
|
3
|
-
import { ReducerAction, SetStateAction } from 'react';
|
|
1
|
+
import { CurrentTree, ModalType, TreeNode, TreePath } from '@tracktor/types-treege';
|
|
4
2
|
import { HierarchyPointNode } from 'd3-hierarchy';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type TreePath = {
|
|
8
|
-
path: string;
|
|
9
|
-
label: string;
|
|
10
|
-
};
|
|
11
|
-
type CurrentTree = {
|
|
12
|
-
id?: string;
|
|
13
|
-
name?: string;
|
|
14
|
-
errorName?: string;
|
|
15
|
-
};
|
|
3
|
+
import { ReducerAction, SetStateAction } from 'react';
|
|
4
|
+
import { BackendConfig } from '../../../src/features/Treege/Treege';
|
|
16
5
|
export interface TreeDefaultValue {
|
|
17
6
|
/**
|
|
18
7
|
* This is the backend configuration
|
|
@@ -90,4 +79,3 @@ export interface TreeDefaultValue {
|
|
|
90
79
|
}
|
|
91
80
|
export declare const treeDefaultValue: TreeDefaultValue;
|
|
92
81
|
export declare const TreegeContext: import('react').Context<TreeDefaultValue>;
|
|
93
|
-
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TreeNode } from '
|
|
2
|
-
import { BackendConfig } from '../Treege';
|
|
1
|
+
import { TreeNode } from '@tracktor/types-treege';
|
|
3
2
|
import { ReactNode } from 'react';
|
|
4
|
-
|
|
3
|
+
import { BackendConfig } from '../../../src/features/Treege/Treege';
|
|
5
4
|
interface TreegeProviderProps {
|
|
6
5
|
children: ReactNode;
|
|
7
6
|
initialTree?: TreeNode;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { SnackbarState } from '../../context/Snackbar/SnackbarContext';
|
|
2
|
-
|
|
1
|
+
import { SnackbarState } from '../../src/context/Snackbar/SnackbarContext';
|
|
3
2
|
declare const useSnackbar: () => {
|
|
4
3
|
close: () => void;
|
|
5
4
|
open: (message: SnackbarState["message"], severity?: SnackbarState["severity"]) => void;
|
|
@@ -2,19 +2,28 @@ declare const FORM_EN: {
|
|
|
2
2
|
readonly additionalParams: "Additional parameters";
|
|
3
3
|
readonly ancestor: "Ancestor";
|
|
4
4
|
readonly apiRoute: "Api route";
|
|
5
|
+
readonly cardNumber: "Card number";
|
|
5
6
|
readonly dataMapping: "Data mapping";
|
|
6
7
|
readonly decisionField: "Decision field";
|
|
7
8
|
readonly disabledPast: "Disabled Past";
|
|
9
|
+
readonly email: "Email";
|
|
10
|
+
readonly firstNameAndLastName: "First name and last name";
|
|
8
11
|
readonly helperText: "Helper text";
|
|
9
12
|
readonly hiddenValue: "Hidden value";
|
|
10
13
|
readonly key: "Key";
|
|
11
14
|
readonly label: "Label";
|
|
15
|
+
readonly letter: "Letter";
|
|
12
16
|
readonly message: "Message";
|
|
13
17
|
readonly mustBeUnique: "Must be unique";
|
|
14
18
|
readonly newTree: "Nouvel arbre";
|
|
15
19
|
readonly noAncestorFound: "No parents found";
|
|
20
|
+
readonly number: "Nombre";
|
|
21
|
+
readonly numberAndLetter: "Number and letter";
|
|
16
22
|
readonly offMessage: "Message (disable)";
|
|
17
23
|
readonly onMessage: "Message (enable)";
|
|
24
|
+
readonly pattern: "Pattern";
|
|
25
|
+
readonly patternMessage: "Pattern message";
|
|
26
|
+
readonly phoneNumber: "Phone number";
|
|
18
27
|
readonly repeatable: "Repeatable";
|
|
19
28
|
readonly searchKeyPlaceholder: "text";
|
|
20
29
|
readonly staticFields: "Static fields";
|
|
@@ -44,6 +53,7 @@ declare const FORM_EN: {
|
|
|
44
53
|
readonly tree: "Tree";
|
|
45
54
|
readonly url: "URL";
|
|
46
55
|
};
|
|
56
|
+
readonly url: "URL";
|
|
47
57
|
readonly urlConstruction: "URL construction";
|
|
48
58
|
readonly value: "Value";
|
|
49
59
|
readonly values: "Values";
|
|
@@ -2,19 +2,28 @@ declare const FORM_FR: {
|
|
|
2
2
|
readonly additionalParams: "Paramètres additionnels";
|
|
3
3
|
readonly ancestor: "Ancêtre";
|
|
4
4
|
readonly apiRoute: "Api route";
|
|
5
|
+
readonly cardNumber: "Numéro de carte";
|
|
5
6
|
readonly dataMapping: "Mapping de données";
|
|
6
7
|
readonly decisionField: "Champs de décision";
|
|
7
8
|
readonly disabledPast: "Passé désactivé";
|
|
9
|
+
readonly email: "Email";
|
|
10
|
+
readonly firstNameAndLastName: "Prénom et nom";
|
|
8
11
|
readonly helperText: "Texte d'information";
|
|
9
12
|
readonly hiddenValue: "Valeur caché";
|
|
10
13
|
readonly key: "Clé";
|
|
11
14
|
readonly label: "Label";
|
|
15
|
+
readonly letter: "Lettre";
|
|
12
16
|
readonly message: "Message";
|
|
13
17
|
readonly mustBeUnique: "Doit être unique";
|
|
14
18
|
readonly newTree: "Nouvel arbre";
|
|
15
19
|
readonly noAncestorFound: "Aucun parent trouvé";
|
|
20
|
+
readonly number: "Chiffre";
|
|
21
|
+
readonly numberAndLetter: "Chiffre et lettre";
|
|
16
22
|
readonly offMessage: "Message (désactiver)";
|
|
17
23
|
readonly onMessage: "Message (activer)";
|
|
24
|
+
readonly pattern: "Expression régulière";
|
|
25
|
+
readonly patternMessage: "Message d'aide invalide";
|
|
26
|
+
readonly phoneNumber: "Numéro de téléphone";
|
|
18
27
|
readonly repeatable: "Répétable";
|
|
19
28
|
readonly searchKeyPlaceholder: "text";
|
|
20
29
|
readonly staticFields: "Champs statiques";
|
|
@@ -44,6 +53,7 @@ declare const FORM_FR: {
|
|
|
44
53
|
readonly tree: "Arbre";
|
|
45
54
|
readonly url: "URL";
|
|
46
55
|
};
|
|
56
|
+
readonly url: "URL";
|
|
47
57
|
readonly urlConstruction: "Construction de l'URL";
|
|
48
58
|
readonly value: "Valeur";
|
|
49
59
|
readonly values: "Valeurs";
|
package/dist/main.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { default as Treege } from './src/features/Treege';
|
|
2
|
+
export * from './src/features/Treege';
|
|
3
|
+
export { default as TreePlusIcon } from './src/components/DataDisplay/Icons/TreePlusIcon';
|
|
4
|
+
export * from './src/components/DataDisplay/Icons/TreePlusIcon';
|