treege 0.12.1 → 0.13.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/dist/main.js +2709 -2580
- package/dist/main.umd.cjs +39 -39
- package/dist/src/constants/fields.d.ts +12 -0
- package/dist/src/features/Treege/components/EndPointWarning/EndPointWarning.d.ts +8 -0
- package/dist/src/features/Treege/components/EndPointWarning/index.d.ts +3 -0
- package/dist/src/features/Treege/components/FieldSelect/useFieldSelect.d.ts +12 -0
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/FormTreeCardMutation.d.ts +1 -1
- package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +6 -1
- package/dist/src/features/Treege/type/TreeNode.d.ts +6 -0
- package/dist/src/locales/en/form-en.d.ts +7 -0
- package/dist/src/locales/fr/form-fr.d.ts +7 -0
- package/dist/src/utils/tree/appendNode/appendNode.d.ts +3 -1
- package/package.json +1 -1
|
@@ -52,6 +52,12 @@ declare const fields: readonly [{
|
|
|
52
52
|
readonly isRepeatableDisabled: false;
|
|
53
53
|
readonly isRequiredDisabled: false;
|
|
54
54
|
readonly type: "date";
|
|
55
|
+
}, {
|
|
56
|
+
readonly isBooleanField: false;
|
|
57
|
+
readonly isDecisionField: false;
|
|
58
|
+
readonly isRepeatableDisabled: false;
|
|
59
|
+
readonly isRequiredDisabled: false;
|
|
60
|
+
readonly type: "dateRange";
|
|
55
61
|
}, {
|
|
56
62
|
readonly isBooleanField: false;
|
|
57
63
|
readonly isDecisionField: false;
|
|
@@ -94,5 +100,11 @@ declare const fields: readonly [{
|
|
|
94
100
|
readonly isRepeatableDisabled: true;
|
|
95
101
|
readonly isRequiredDisabled: false;
|
|
96
102
|
readonly type: "select";
|
|
103
|
+
}, {
|
|
104
|
+
readonly isBooleanField: false;
|
|
105
|
+
readonly isDecisionField: false;
|
|
106
|
+
readonly isRepeatableDisabled: true;
|
|
107
|
+
readonly isRequiredDisabled: false;
|
|
108
|
+
readonly type: "autocomplete";
|
|
97
109
|
}];
|
|
98
110
|
export default fields;
|
|
@@ -53,6 +53,12 @@ declare const useFieldSelect: () => {
|
|
|
53
53
|
readonly isRepeatableDisabled: false;
|
|
54
54
|
readonly isRequiredDisabled: false;
|
|
55
55
|
readonly type: "date";
|
|
56
|
+
} | {
|
|
57
|
+
readonly isBooleanField: false;
|
|
58
|
+
readonly isDecisionField: false;
|
|
59
|
+
readonly isRepeatableDisabled: false;
|
|
60
|
+
readonly isRequiredDisabled: false;
|
|
61
|
+
readonly type: "dateRange";
|
|
56
62
|
} | {
|
|
57
63
|
readonly isBooleanField: false;
|
|
58
64
|
readonly isDecisionField: false;
|
|
@@ -95,6 +101,12 @@ declare const useFieldSelect: () => {
|
|
|
95
101
|
readonly isRepeatableDisabled: true;
|
|
96
102
|
readonly isRequiredDisabled: false;
|
|
97
103
|
readonly type: "select";
|
|
104
|
+
} | {
|
|
105
|
+
readonly isBooleanField: false;
|
|
106
|
+
readonly isDecisionField: false;
|
|
107
|
+
readonly isRepeatableDisabled: true;
|
|
108
|
+
readonly isRequiredDisabled: false;
|
|
109
|
+
readonly type: "autocomplete";
|
|
98
110
|
})[];
|
|
99
111
|
};
|
|
100
112
|
export default useFieldSelect;
|
package/dist/src/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ declare const useFormTreeCardMutation: () => {
|
|
|
15
15
|
handleChangeOptionValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
16
16
|
handleChangeRepeatable: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
17
|
handleChangeRequired: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
handleChangeSearchKey: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
18
19
|
handleChangeStep: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
19
20
|
handleChangeTag: (_: SyntheticEvent<Element, Event>, newValue: string | {
|
|
20
21
|
inputValue: string;
|
|
@@ -22,10 +23,12 @@ declare const useFormTreeCardMutation: () => {
|
|
|
22
23
|
} | null) => void;
|
|
23
24
|
handleChangeTreeSelect: (event: SelectChangeEvent) => void;
|
|
24
25
|
handleChangeType: (event: SelectChangeEvent<TreeNodeField["type"]>) => void;
|
|
26
|
+
handleChangeUrl: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
25
27
|
handleDeleteValue: (e: MouseEvent<HTMLButtonElement>) => void;
|
|
26
28
|
handleSubmit: (e: FormEvent) => Promise<void>;
|
|
27
29
|
helperText: string;
|
|
28
30
|
hiddenValue: string;
|
|
31
|
+
isAutocomplete: boolean;
|
|
29
32
|
isBooleanField: boolean;
|
|
30
33
|
isDecision: boolean;
|
|
31
34
|
isDecisionField: boolean;
|
|
@@ -44,11 +47,13 @@ declare const useFormTreeCardMutation: () => {
|
|
|
44
47
|
name: string;
|
|
45
48
|
repeatable: boolean;
|
|
46
49
|
required: boolean;
|
|
50
|
+
searchKey: string;
|
|
47
51
|
step: string;
|
|
48
52
|
tag: string | null;
|
|
49
53
|
treeSelected: string;
|
|
50
|
-
type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "checkbox" | "tree" | "radio";
|
|
54
|
+
type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "checkbox" | "tree" | "radio" | "autocomplete";
|
|
51
55
|
uniqueNameErrorMessage: string;
|
|
56
|
+
url: string;
|
|
52
57
|
values: {
|
|
53
58
|
id: string;
|
|
54
59
|
label: string;
|
|
@@ -8,6 +8,10 @@ export interface TreeValues {
|
|
|
8
8
|
value: string;
|
|
9
9
|
message?: string;
|
|
10
10
|
}
|
|
11
|
+
export interface Route {
|
|
12
|
+
url: string;
|
|
13
|
+
searchKey: string;
|
|
14
|
+
}
|
|
11
15
|
export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children"> {
|
|
12
16
|
name: string;
|
|
13
17
|
attributes: {
|
|
@@ -32,6 +36,7 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
|
|
|
32
36
|
treePath?: string;
|
|
33
37
|
repeatable?: boolean;
|
|
34
38
|
hiddenValue?: string;
|
|
39
|
+
route?: Route;
|
|
35
40
|
} | {
|
|
36
41
|
depth: number;
|
|
37
42
|
tag?: string;
|
|
@@ -51,6 +56,7 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
|
|
|
51
56
|
treePath?: never;
|
|
52
57
|
repeatable?: never;
|
|
53
58
|
hiddenValue?: never;
|
|
59
|
+
route?: Route;
|
|
54
60
|
};
|
|
55
61
|
children: TreeNode[];
|
|
56
62
|
treeId?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const FORM_EN: {
|
|
2
|
+
readonly apiRoute: "Api route";
|
|
2
3
|
readonly decisionField: "Decision field";
|
|
3
4
|
readonly helperText: "Helper text";
|
|
4
5
|
readonly hiddenValue: "Hidden value";
|
|
@@ -14,8 +15,10 @@ declare const FORM_EN: {
|
|
|
14
15
|
readonly treeName: "Tree name";
|
|
15
16
|
readonly type: {
|
|
16
17
|
readonly address: "Address";
|
|
18
|
+
readonly autocomplete: "Autocomplete";
|
|
17
19
|
readonly checkbox: "Checkbox";
|
|
18
20
|
readonly date: "Date";
|
|
21
|
+
readonly dateRange: "Date range";
|
|
19
22
|
readonly email: "Email";
|
|
20
23
|
readonly file: "File";
|
|
21
24
|
readonly hidden: "Hidden field";
|
|
@@ -32,5 +35,9 @@ declare const FORM_EN: {
|
|
|
32
35
|
};
|
|
33
36
|
readonly value: "Value";
|
|
34
37
|
readonly values: "Values";
|
|
38
|
+
readonly warningApiAutocomplete: {
|
|
39
|
+
readonly response: "should have as a response";
|
|
40
|
+
readonly url: "The API Route";
|
|
41
|
+
};
|
|
35
42
|
};
|
|
36
43
|
export default FORM_EN;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const FORM_FR: {
|
|
2
|
+
readonly apiRoute: "Api route";
|
|
2
3
|
readonly decisionField: "Champs de décision";
|
|
3
4
|
readonly helperText: "Texte d'information";
|
|
4
5
|
readonly hiddenValue: "Valeur caché";
|
|
@@ -14,8 +15,10 @@ declare const FORM_FR: {
|
|
|
14
15
|
readonly treeName: "Nom de l'arbre";
|
|
15
16
|
readonly type: {
|
|
16
17
|
readonly address: "Adresse";
|
|
18
|
+
readonly autocomplete: "Autocomplétion";
|
|
17
19
|
readonly checkbox: "Case à cocher";
|
|
18
20
|
readonly date: "Date";
|
|
21
|
+
readonly dateRange: "Plage de dates";
|
|
19
22
|
readonly email: "Email";
|
|
20
23
|
readonly file: "Fichier";
|
|
21
24
|
readonly hidden: "Champs caché";
|
|
@@ -32,5 +35,9 @@ declare const FORM_FR: {
|
|
|
32
35
|
};
|
|
33
36
|
readonly value: "Valeur";
|
|
34
37
|
readonly values: "Valeurs";
|
|
38
|
+
readonly warningApiAutocomplete: {
|
|
39
|
+
readonly response: "dois avoir comme réponse";
|
|
40
|
+
readonly url: "La route de l'API";
|
|
41
|
+
};
|
|
35
42
|
};
|
|
36
43
|
export default FORM_FR;
|
|
@@ -27,7 +27,7 @@ declare const appendNode: ({ tree, path, name, child }: AppendChildParams) => Tr
|
|
|
27
27
|
label: string;
|
|
28
28
|
required?: boolean | undefined;
|
|
29
29
|
step?: string | undefined;
|
|
30
|
-
type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "checkbox" | "tree" | "radio";
|
|
30
|
+
type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "checkbox" | "tree" | "radio" | "autocomplete";
|
|
31
31
|
value?: undefined;
|
|
32
32
|
values?: import('../../../features/Treege/type/TreeNode').TreeValues[] | undefined;
|
|
33
33
|
message?: undefined;
|
|
@@ -35,6 +35,7 @@ declare const appendNode: ({ tree, path, name, child }: AppendChildParams) => Tr
|
|
|
35
35
|
treePath?: string | undefined;
|
|
36
36
|
repeatable?: boolean | undefined;
|
|
37
37
|
hiddenValue?: string | undefined;
|
|
38
|
+
route?: import('../../../features/Treege/type/TreeNode').Route | undefined;
|
|
38
39
|
} | {
|
|
39
40
|
isLeaf: boolean;
|
|
40
41
|
isRoot: boolean;
|
|
@@ -54,6 +55,7 @@ declare const appendNode: ({ tree, path, name, child }: AppendChildParams) => Tr
|
|
|
54
55
|
treePath?: undefined;
|
|
55
56
|
repeatable?: undefined;
|
|
56
57
|
hiddenValue?: undefined;
|
|
58
|
+
route?: import('../../../features/Treege/type/TreeNode').Route | undefined;
|
|
57
59
|
};
|
|
58
60
|
name: string;
|
|
59
61
|
children: TreeNode[];
|