treege 1.1.0 → 1.3.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 +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/constants → constants}/fields.d.ts +6 -0
- 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/features/Treege/components/Inputs/AutocompleteSelectType/AutocompleteSelectType.d.ts +12 -0
- package/dist/features/Treege/components/Inputs/AutocompleteSelectType/index.d.ts +3 -0
- package/dist/features/Treege/components/Inputs/AutocompleteSelectType/useAutocompleteSelectType.d.ts +263 -0
- 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 +11 -0
- package/dist/{src/locales → locales}/fr/form-fr.d.ts +11 -0
- package/dist/main.d.ts +4 -1
- package/dist/main.js +3602 -3913
- package/dist/main.umd.cjs +40 -51
- 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 +76 -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 +16 -12
- package/dist/src/config/test.config.d.ts +0 -1
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +0 -81
- package/dist/src/features/Treege/components/Inputs/FieldSelect/FieldSelect.d.ts +0 -10
- package/dist/src/features/Treege/components/Inputs/FieldSelect/index.d.ts +0 -4
- package/dist/src/features/Treege/components/Inputs/FieldSelect/useFieldSelect.d.ts +0 -127
- 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/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/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
|
|
@@ -121,5 +121,11 @@ declare const fields: readonly [{
|
|
|
121
121
|
readonly isRepeatableDisabled: false;
|
|
122
122
|
readonly isRequiredDisabled: false;
|
|
123
123
|
readonly type: "dynamicSelect";
|
|
124
|
+
}, {
|
|
125
|
+
readonly isBooleanField: false;
|
|
126
|
+
readonly isDecisionField: false;
|
|
127
|
+
readonly isRepeatableDisabled: true;
|
|
128
|
+
readonly isRequiredDisabled: true;
|
|
129
|
+
readonly type: "title";
|
|
124
130
|
}];
|
|
125
131
|
export default fields;
|
|
@@ -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;
|
package/dist/features/Treege/components/Inputs/AutocompleteSelectType/AutocompleteSelectType.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SxProps } from '@tracktor/design-system';
|
|
2
|
+
import { TreeNodeField } from '@tracktor/types-treege';
|
|
3
|
+
import { SyntheticEvent } from 'react';
|
|
4
|
+
import { default as fields } from '../../../../../src/constants/fields';
|
|
5
|
+
export interface FieldsSelectProps {
|
|
6
|
+
id: string;
|
|
7
|
+
value: TreeNodeField["type"];
|
|
8
|
+
onChange?: (event: SyntheticEvent, value: (typeof fields)[number]) => void;
|
|
9
|
+
sx?: SxProps;
|
|
10
|
+
}
|
|
11
|
+
declare const AutocompleteSelectType: ({ id, onChange, value, sx }: FieldsSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default AutocompleteSelectType;
|
package/dist/features/Treege/components/Inputs/AutocompleteSelectType/useAutocompleteSelectType.d.ts
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
declare const useAutocompleteSelectType: (value: any) => {
|
|
2
|
+
currentValue: {
|
|
3
|
+
readonly isBooleanField: false;
|
|
4
|
+
readonly isDecisionField: false;
|
|
5
|
+
readonly isRepeatableDisabled: false;
|
|
6
|
+
readonly isRequiredDisabled: false;
|
|
7
|
+
readonly type: "text";
|
|
8
|
+
} | {
|
|
9
|
+
readonly isBooleanField: false;
|
|
10
|
+
readonly isDecisionField: false;
|
|
11
|
+
readonly isRepeatableDisabled: false;
|
|
12
|
+
readonly isRequiredDisabled: false;
|
|
13
|
+
readonly type: "number";
|
|
14
|
+
} | {
|
|
15
|
+
readonly isBooleanField: false;
|
|
16
|
+
readonly isDecisionField: false;
|
|
17
|
+
readonly isRepeatableDisabled: false;
|
|
18
|
+
readonly isRequiredDisabled: false;
|
|
19
|
+
readonly type: "email";
|
|
20
|
+
} | {
|
|
21
|
+
readonly isBooleanField: false;
|
|
22
|
+
readonly isDecisionField: false;
|
|
23
|
+
readonly isMultiple: false;
|
|
24
|
+
readonly isRepeatableDisabled: false;
|
|
25
|
+
readonly isRequiredDisabled: false;
|
|
26
|
+
readonly type: "file";
|
|
27
|
+
} | {
|
|
28
|
+
readonly isBooleanField: false;
|
|
29
|
+
readonly isDecisionField: false;
|
|
30
|
+
readonly isRepeatableDisabled: false;
|
|
31
|
+
readonly isRequiredDisabled: false;
|
|
32
|
+
readonly type: "password";
|
|
33
|
+
} | {
|
|
34
|
+
readonly isBooleanField: false;
|
|
35
|
+
readonly isDecisionField: false;
|
|
36
|
+
readonly isRepeatableDisabled: false;
|
|
37
|
+
readonly isRequiredDisabled: false;
|
|
38
|
+
readonly type: "tel";
|
|
39
|
+
} | {
|
|
40
|
+
readonly isBooleanField: false;
|
|
41
|
+
readonly isDecisionField: false;
|
|
42
|
+
readonly isRepeatableDisabled: false;
|
|
43
|
+
readonly isRequiredDisabled: false;
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
} | {
|
|
46
|
+
readonly isBooleanField: false;
|
|
47
|
+
readonly isDecisionField: false;
|
|
48
|
+
readonly isRepeatableDisabled: false;
|
|
49
|
+
readonly isRequiredDisabled: false;
|
|
50
|
+
readonly type: "url";
|
|
51
|
+
} | {
|
|
52
|
+
readonly isBooleanField: false;
|
|
53
|
+
readonly isDecisionField: false;
|
|
54
|
+
readonly isRepeatableDisabled: false;
|
|
55
|
+
readonly isRequiredDisabled: false;
|
|
56
|
+
readonly type: "date";
|
|
57
|
+
} | {
|
|
58
|
+
readonly isBooleanField: false;
|
|
59
|
+
readonly isDecisionField: false;
|
|
60
|
+
readonly isRepeatableDisabled: false;
|
|
61
|
+
readonly isRequiredDisabled: false;
|
|
62
|
+
readonly type: "dateRange";
|
|
63
|
+
} | {
|
|
64
|
+
readonly isBooleanField: false;
|
|
65
|
+
readonly isDecisionField: false;
|
|
66
|
+
readonly isRepeatableDisabled: false;
|
|
67
|
+
readonly isRequiredDisabled: false;
|
|
68
|
+
readonly type: "time";
|
|
69
|
+
} | {
|
|
70
|
+
readonly isBooleanField: false;
|
|
71
|
+
readonly isDecisionField: false;
|
|
72
|
+
readonly isRepeatableDisabled: false;
|
|
73
|
+
readonly isRequiredDisabled: false;
|
|
74
|
+
readonly type: "timeRange";
|
|
75
|
+
} | {
|
|
76
|
+
readonly isBooleanField: true;
|
|
77
|
+
readonly isDecisionField: false;
|
|
78
|
+
readonly isRepeatableDisabled: true;
|
|
79
|
+
readonly isRequiredDisabled: true;
|
|
80
|
+
readonly type: "switch";
|
|
81
|
+
} | {
|
|
82
|
+
readonly isBooleanField: true;
|
|
83
|
+
readonly isDecisionField: false;
|
|
84
|
+
readonly isRepeatableDisabled: true;
|
|
85
|
+
readonly isRequiredDisabled: true;
|
|
86
|
+
readonly type: "checkbox";
|
|
87
|
+
} | {
|
|
88
|
+
readonly isBooleanField: false;
|
|
89
|
+
readonly isDecisionField: false;
|
|
90
|
+
readonly isRepeatableDisabled: true;
|
|
91
|
+
readonly isRequiredDisabled: true;
|
|
92
|
+
readonly type: "hidden";
|
|
93
|
+
} | {
|
|
94
|
+
readonly isBooleanField: false;
|
|
95
|
+
readonly isDecisionField: false;
|
|
96
|
+
readonly isRepeatableDisabled: true;
|
|
97
|
+
readonly isRequiredDisabled: true;
|
|
98
|
+
readonly type: "tree";
|
|
99
|
+
} | {
|
|
100
|
+
readonly isBooleanField: false;
|
|
101
|
+
readonly isDecisionField: true;
|
|
102
|
+
readonly isRepeatableDisabled: true;
|
|
103
|
+
readonly isRequiredDisabled: false;
|
|
104
|
+
readonly type: "radio";
|
|
105
|
+
} | {
|
|
106
|
+
readonly isBooleanField: false;
|
|
107
|
+
readonly isDecisionField: true;
|
|
108
|
+
readonly isRepeatableDisabled: true;
|
|
109
|
+
readonly isRequiredDisabled: false;
|
|
110
|
+
readonly type: "select";
|
|
111
|
+
} | {
|
|
112
|
+
readonly initialQueryEnable: true;
|
|
113
|
+
readonly isBooleanField: false;
|
|
114
|
+
readonly isDecisionField: false;
|
|
115
|
+
readonly isRepeatableDisabled: true;
|
|
116
|
+
readonly isRequiredDisabled: false;
|
|
117
|
+
readonly type: "autocomplete";
|
|
118
|
+
} | {
|
|
119
|
+
readonly isBooleanField: false;
|
|
120
|
+
readonly isDecisionField: false;
|
|
121
|
+
readonly isMultiple: false;
|
|
122
|
+
readonly isRepeatableDisabled: false;
|
|
123
|
+
readonly isRequiredDisabled: false;
|
|
124
|
+
readonly type: "dynamicSelect";
|
|
125
|
+
} | {
|
|
126
|
+
readonly isBooleanField: false;
|
|
127
|
+
readonly isDecisionField: false;
|
|
128
|
+
readonly isRepeatableDisabled: true;
|
|
129
|
+
readonly isRequiredDisabled: true;
|
|
130
|
+
readonly type: "title";
|
|
131
|
+
};
|
|
132
|
+
options: ({
|
|
133
|
+
readonly isBooleanField: false;
|
|
134
|
+
readonly isDecisionField: false;
|
|
135
|
+
readonly isRepeatableDisabled: false;
|
|
136
|
+
readonly isRequiredDisabled: false;
|
|
137
|
+
readonly type: "text";
|
|
138
|
+
} | {
|
|
139
|
+
readonly isBooleanField: false;
|
|
140
|
+
readonly isDecisionField: false;
|
|
141
|
+
readonly isRepeatableDisabled: false;
|
|
142
|
+
readonly isRequiredDisabled: false;
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
} | {
|
|
145
|
+
readonly isBooleanField: false;
|
|
146
|
+
readonly isDecisionField: false;
|
|
147
|
+
readonly isRepeatableDisabled: false;
|
|
148
|
+
readonly isRequiredDisabled: false;
|
|
149
|
+
readonly type: "email";
|
|
150
|
+
} | {
|
|
151
|
+
readonly isBooleanField: false;
|
|
152
|
+
readonly isDecisionField: false;
|
|
153
|
+
readonly isMultiple: false;
|
|
154
|
+
readonly isRepeatableDisabled: false;
|
|
155
|
+
readonly isRequiredDisabled: false;
|
|
156
|
+
readonly type: "file";
|
|
157
|
+
} | {
|
|
158
|
+
readonly isBooleanField: false;
|
|
159
|
+
readonly isDecisionField: false;
|
|
160
|
+
readonly isRepeatableDisabled: false;
|
|
161
|
+
readonly isRequiredDisabled: false;
|
|
162
|
+
readonly type: "password";
|
|
163
|
+
} | {
|
|
164
|
+
readonly isBooleanField: false;
|
|
165
|
+
readonly isDecisionField: false;
|
|
166
|
+
readonly isRepeatableDisabled: false;
|
|
167
|
+
readonly isRequiredDisabled: false;
|
|
168
|
+
readonly type: "tel";
|
|
169
|
+
} | {
|
|
170
|
+
readonly isBooleanField: false;
|
|
171
|
+
readonly isDecisionField: false;
|
|
172
|
+
readonly isRepeatableDisabled: false;
|
|
173
|
+
readonly isRequiredDisabled: false;
|
|
174
|
+
readonly type: "address";
|
|
175
|
+
} | {
|
|
176
|
+
readonly isBooleanField: false;
|
|
177
|
+
readonly isDecisionField: false;
|
|
178
|
+
readonly isRepeatableDisabled: false;
|
|
179
|
+
readonly isRequiredDisabled: false;
|
|
180
|
+
readonly type: "url";
|
|
181
|
+
} | {
|
|
182
|
+
readonly isBooleanField: false;
|
|
183
|
+
readonly isDecisionField: false;
|
|
184
|
+
readonly isRepeatableDisabled: false;
|
|
185
|
+
readonly isRequiredDisabled: false;
|
|
186
|
+
readonly type: "date";
|
|
187
|
+
} | {
|
|
188
|
+
readonly isBooleanField: false;
|
|
189
|
+
readonly isDecisionField: false;
|
|
190
|
+
readonly isRepeatableDisabled: false;
|
|
191
|
+
readonly isRequiredDisabled: false;
|
|
192
|
+
readonly type: "dateRange";
|
|
193
|
+
} | {
|
|
194
|
+
readonly isBooleanField: false;
|
|
195
|
+
readonly isDecisionField: false;
|
|
196
|
+
readonly isRepeatableDisabled: false;
|
|
197
|
+
readonly isRequiredDisabled: false;
|
|
198
|
+
readonly type: "time";
|
|
199
|
+
} | {
|
|
200
|
+
readonly isBooleanField: false;
|
|
201
|
+
readonly isDecisionField: false;
|
|
202
|
+
readonly isRepeatableDisabled: false;
|
|
203
|
+
readonly isRequiredDisabled: false;
|
|
204
|
+
readonly type: "timeRange";
|
|
205
|
+
} | {
|
|
206
|
+
readonly isBooleanField: true;
|
|
207
|
+
readonly isDecisionField: false;
|
|
208
|
+
readonly isRepeatableDisabled: true;
|
|
209
|
+
readonly isRequiredDisabled: true;
|
|
210
|
+
readonly type: "switch";
|
|
211
|
+
} | {
|
|
212
|
+
readonly isBooleanField: true;
|
|
213
|
+
readonly isDecisionField: false;
|
|
214
|
+
readonly isRepeatableDisabled: true;
|
|
215
|
+
readonly isRequiredDisabled: true;
|
|
216
|
+
readonly type: "checkbox";
|
|
217
|
+
} | {
|
|
218
|
+
readonly isBooleanField: false;
|
|
219
|
+
readonly isDecisionField: false;
|
|
220
|
+
readonly isRepeatableDisabled: true;
|
|
221
|
+
readonly isRequiredDisabled: true;
|
|
222
|
+
readonly type: "hidden";
|
|
223
|
+
} | {
|
|
224
|
+
readonly isBooleanField: false;
|
|
225
|
+
readonly isDecisionField: false;
|
|
226
|
+
readonly isRepeatableDisabled: true;
|
|
227
|
+
readonly isRequiredDisabled: true;
|
|
228
|
+
readonly type: "tree";
|
|
229
|
+
} | {
|
|
230
|
+
readonly isBooleanField: false;
|
|
231
|
+
readonly isDecisionField: true;
|
|
232
|
+
readonly isRepeatableDisabled: true;
|
|
233
|
+
readonly isRequiredDisabled: false;
|
|
234
|
+
readonly type: "radio";
|
|
235
|
+
} | {
|
|
236
|
+
readonly isBooleanField: false;
|
|
237
|
+
readonly isDecisionField: true;
|
|
238
|
+
readonly isRepeatableDisabled: true;
|
|
239
|
+
readonly isRequiredDisabled: false;
|
|
240
|
+
readonly type: "select";
|
|
241
|
+
} | {
|
|
242
|
+
readonly initialQueryEnable: true;
|
|
243
|
+
readonly isBooleanField: false;
|
|
244
|
+
readonly isDecisionField: false;
|
|
245
|
+
readonly isRepeatableDisabled: true;
|
|
246
|
+
readonly isRequiredDisabled: false;
|
|
247
|
+
readonly type: "autocomplete";
|
|
248
|
+
} | {
|
|
249
|
+
readonly isBooleanField: false;
|
|
250
|
+
readonly isDecisionField: false;
|
|
251
|
+
readonly isMultiple: false;
|
|
252
|
+
readonly isRepeatableDisabled: false;
|
|
253
|
+
readonly isRequiredDisabled: false;
|
|
254
|
+
readonly type: "dynamicSelect";
|
|
255
|
+
} | {
|
|
256
|
+
readonly isBooleanField: false;
|
|
257
|
+
readonly isDecisionField: false;
|
|
258
|
+
readonly isRepeatableDisabled: true;
|
|
259
|
+
readonly isRequiredDisabled: true;
|
|
260
|
+
readonly type: "title";
|
|
261
|
+
})[];
|
|
262
|
+
};
|
|
263
|
+
export default useAutocompleteSelectType;
|