treege 0.5.4 → 0.6.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 +3 -3
- package/dist/constants/colors.d.ts +1 -0
- package/dist/constants/fields.d.ts +21 -0
- package/dist/features/Treege/components/FieldsSelect/useFieldsSelect.d.ts +21 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/ExtraField.d.ts +14 -0
- package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts +8 -4
- package/dist/features/Treege/type/TreeNode.d.ts +4 -2
- package/dist/main.js +3945 -3823
- package/dist/main.umd.cjs +36 -36
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,76 +1,97 @@
|
|
|
1
1
|
declare const fields: readonly [{
|
|
2
2
|
readonly isBooleanField: false;
|
|
3
3
|
readonly isDecisionField: false;
|
|
4
|
+
readonly isRepeatableDisabled: false;
|
|
4
5
|
readonly isRequiredDisabled: false;
|
|
5
6
|
readonly type: "text";
|
|
6
7
|
}, {
|
|
7
8
|
readonly isBooleanField: false;
|
|
8
9
|
readonly isDecisionField: false;
|
|
10
|
+
readonly isRepeatableDisabled: false;
|
|
9
11
|
readonly isRequiredDisabled: false;
|
|
10
12
|
readonly type: "number";
|
|
11
13
|
}, {
|
|
12
14
|
readonly isBooleanField: false;
|
|
13
15
|
readonly isDecisionField: false;
|
|
16
|
+
readonly isRepeatableDisabled: false;
|
|
14
17
|
readonly isRequiredDisabled: false;
|
|
15
18
|
readonly type: "email";
|
|
16
19
|
}, {
|
|
17
20
|
readonly isBooleanField: false;
|
|
18
21
|
readonly isDecisionField: false;
|
|
22
|
+
readonly isRepeatableDisabled: false;
|
|
19
23
|
readonly isRequiredDisabled: false;
|
|
20
24
|
readonly type: "file";
|
|
21
25
|
}, {
|
|
22
26
|
readonly isBooleanField: false;
|
|
23
27
|
readonly isDecisionField: false;
|
|
28
|
+
readonly isRepeatableDisabled: false;
|
|
24
29
|
readonly isRequiredDisabled: false;
|
|
25
30
|
readonly type: "password";
|
|
26
31
|
}, {
|
|
27
32
|
readonly isBooleanField: false;
|
|
28
33
|
readonly isDecisionField: false;
|
|
34
|
+
readonly isRepeatableDisabled: false;
|
|
29
35
|
readonly isRequiredDisabled: false;
|
|
30
36
|
readonly type: "tel";
|
|
31
37
|
}, {
|
|
32
38
|
readonly isBooleanField: false;
|
|
33
39
|
readonly isDecisionField: false;
|
|
40
|
+
readonly isRepeatableDisabled: false;
|
|
34
41
|
readonly isRequiredDisabled: false;
|
|
35
42
|
readonly type: "address";
|
|
36
43
|
}, {
|
|
37
44
|
readonly isBooleanField: false;
|
|
38
45
|
readonly isDecisionField: false;
|
|
46
|
+
readonly isRepeatableDisabled: false;
|
|
39
47
|
readonly isRequiredDisabled: false;
|
|
40
48
|
readonly type: "url";
|
|
41
49
|
}, {
|
|
42
50
|
readonly isBooleanField: false;
|
|
43
51
|
readonly isDecisionField: false;
|
|
52
|
+
readonly isRepeatableDisabled: false;
|
|
44
53
|
readonly isRequiredDisabled: false;
|
|
45
54
|
readonly type: "date";
|
|
46
55
|
}, {
|
|
47
56
|
readonly isBooleanField: false;
|
|
48
57
|
readonly isDecisionField: false;
|
|
58
|
+
readonly isRepeatableDisabled: false;
|
|
49
59
|
readonly isRequiredDisabled: false;
|
|
50
60
|
readonly type: "time";
|
|
51
61
|
}, {
|
|
52
62
|
readonly isBooleanField: true;
|
|
53
63
|
readonly isDecisionField: false;
|
|
64
|
+
readonly isRepeatableDisabled: true;
|
|
54
65
|
readonly isRequiredDisabled: true;
|
|
55
66
|
readonly type: "switch";
|
|
56
67
|
}, {
|
|
57
68
|
readonly isBooleanField: true;
|
|
58
69
|
readonly isDecisionField: false;
|
|
70
|
+
readonly isRepeatableDisabled: true;
|
|
59
71
|
readonly isRequiredDisabled: true;
|
|
60
72
|
readonly type: "checkbox";
|
|
61
73
|
}, {
|
|
62
74
|
readonly isBooleanField: false;
|
|
63
75
|
readonly isDecisionField: true;
|
|
76
|
+
readonly isRepeatableDisabled: true;
|
|
64
77
|
readonly isRequiredDisabled: false;
|
|
65
78
|
readonly type: "radio";
|
|
66
79
|
}, {
|
|
67
80
|
readonly isBooleanField: false;
|
|
68
81
|
readonly isDecisionField: true;
|
|
82
|
+
readonly isRepeatableDisabled: true;
|
|
69
83
|
readonly isRequiredDisabled: false;
|
|
70
84
|
readonly type: "select";
|
|
71
85
|
}, {
|
|
72
86
|
readonly isBooleanField: false;
|
|
73
87
|
readonly isDecisionField: false;
|
|
88
|
+
readonly isRepeatableDisabled: true;
|
|
89
|
+
readonly isRequiredDisabled: true;
|
|
90
|
+
readonly type: "hidden";
|
|
91
|
+
}, {
|
|
92
|
+
readonly isBooleanField: false;
|
|
93
|
+
readonly isDecisionField: false;
|
|
94
|
+
readonly isRepeatableDisabled: true;
|
|
74
95
|
readonly isRequiredDisabled: true;
|
|
75
96
|
readonly type: "tree";
|
|
76
97
|
}];
|
|
@@ -2,76 +2,97 @@ declare const useFieldsSelect: () => {
|
|
|
2
2
|
fields: ({
|
|
3
3
|
readonly isBooleanField: false;
|
|
4
4
|
readonly isDecisionField: false;
|
|
5
|
+
readonly isRepeatableDisabled: false;
|
|
5
6
|
readonly isRequiredDisabled: false;
|
|
6
7
|
readonly type: "text";
|
|
7
8
|
} | {
|
|
8
9
|
readonly isBooleanField: false;
|
|
9
10
|
readonly isDecisionField: false;
|
|
11
|
+
readonly isRepeatableDisabled: false;
|
|
10
12
|
readonly isRequiredDisabled: false;
|
|
11
13
|
readonly type: "number";
|
|
12
14
|
} | {
|
|
13
15
|
readonly isBooleanField: false;
|
|
14
16
|
readonly isDecisionField: false;
|
|
17
|
+
readonly isRepeatableDisabled: false;
|
|
15
18
|
readonly isRequiredDisabled: false;
|
|
16
19
|
readonly type: "email";
|
|
17
20
|
} | {
|
|
18
21
|
readonly isBooleanField: false;
|
|
19
22
|
readonly isDecisionField: false;
|
|
23
|
+
readonly isRepeatableDisabled: false;
|
|
20
24
|
readonly isRequiredDisabled: false;
|
|
21
25
|
readonly type: "file";
|
|
22
26
|
} | {
|
|
23
27
|
readonly isBooleanField: false;
|
|
24
28
|
readonly isDecisionField: false;
|
|
29
|
+
readonly isRepeatableDisabled: false;
|
|
25
30
|
readonly isRequiredDisabled: false;
|
|
26
31
|
readonly type: "password";
|
|
27
32
|
} | {
|
|
28
33
|
readonly isBooleanField: false;
|
|
29
34
|
readonly isDecisionField: false;
|
|
35
|
+
readonly isRepeatableDisabled: false;
|
|
30
36
|
readonly isRequiredDisabled: false;
|
|
31
37
|
readonly type: "tel";
|
|
32
38
|
} | {
|
|
33
39
|
readonly isBooleanField: false;
|
|
34
40
|
readonly isDecisionField: false;
|
|
41
|
+
readonly isRepeatableDisabled: false;
|
|
35
42
|
readonly isRequiredDisabled: false;
|
|
36
43
|
readonly type: "address";
|
|
37
44
|
} | {
|
|
38
45
|
readonly isBooleanField: false;
|
|
39
46
|
readonly isDecisionField: false;
|
|
47
|
+
readonly isRepeatableDisabled: false;
|
|
40
48
|
readonly isRequiredDisabled: false;
|
|
41
49
|
readonly type: "url";
|
|
42
50
|
} | {
|
|
43
51
|
readonly isBooleanField: false;
|
|
44
52
|
readonly isDecisionField: false;
|
|
53
|
+
readonly isRepeatableDisabled: false;
|
|
45
54
|
readonly isRequiredDisabled: false;
|
|
46
55
|
readonly type: "date";
|
|
47
56
|
} | {
|
|
48
57
|
readonly isBooleanField: false;
|
|
49
58
|
readonly isDecisionField: false;
|
|
59
|
+
readonly isRepeatableDisabled: false;
|
|
50
60
|
readonly isRequiredDisabled: false;
|
|
51
61
|
readonly type: "time";
|
|
52
62
|
} | {
|
|
53
63
|
readonly isBooleanField: true;
|
|
54
64
|
readonly isDecisionField: false;
|
|
65
|
+
readonly isRepeatableDisabled: true;
|
|
55
66
|
readonly isRequiredDisabled: true;
|
|
56
67
|
readonly type: "switch";
|
|
57
68
|
} | {
|
|
58
69
|
readonly isBooleanField: true;
|
|
59
70
|
readonly isDecisionField: false;
|
|
71
|
+
readonly isRepeatableDisabled: true;
|
|
60
72
|
readonly isRequiredDisabled: true;
|
|
61
73
|
readonly type: "checkbox";
|
|
62
74
|
} | {
|
|
63
75
|
readonly isBooleanField: false;
|
|
64
76
|
readonly isDecisionField: true;
|
|
77
|
+
readonly isRepeatableDisabled: true;
|
|
65
78
|
readonly isRequiredDisabled: false;
|
|
66
79
|
readonly type: "radio";
|
|
67
80
|
} | {
|
|
68
81
|
readonly isBooleanField: false;
|
|
69
82
|
readonly isDecisionField: true;
|
|
83
|
+
readonly isRepeatableDisabled: true;
|
|
70
84
|
readonly isRequiredDisabled: false;
|
|
71
85
|
readonly type: "select";
|
|
72
86
|
} | {
|
|
73
87
|
readonly isBooleanField: false;
|
|
74
88
|
readonly isDecisionField: false;
|
|
89
|
+
readonly isRepeatableDisabled: true;
|
|
90
|
+
readonly isRequiredDisabled: true;
|
|
91
|
+
readonly type: "hidden";
|
|
92
|
+
} | {
|
|
93
|
+
readonly isBooleanField: false;
|
|
94
|
+
readonly isDecisionField: false;
|
|
95
|
+
readonly isRepeatableDisabled: true;
|
|
75
96
|
readonly isRequiredDisabled: true;
|
|
76
97
|
readonly type: "tree";
|
|
77
98
|
})[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SelectChangeEvent } from "design-system-tracktor";
|
|
2
|
+
import type { ChangeEvent } from "react";
|
|
3
|
+
interface ExtraFieldProps {
|
|
4
|
+
helperText: string;
|
|
5
|
+
hiddenValue: string;
|
|
6
|
+
isHiddenField: boolean;
|
|
7
|
+
isTreeField: boolean;
|
|
8
|
+
treeSelected: string;
|
|
9
|
+
handleChangeTreeSelect(event: SelectChangeEvent<string>): void;
|
|
10
|
+
handleChangeHelperText(event: ChangeEvent<HTMLInputElement>): void;
|
|
11
|
+
handleChangeHiddenValue(event: ChangeEvent<HTMLInputElement>): void;
|
|
12
|
+
}
|
|
13
|
+
declare const ExtraField: ({ helperText, hiddenValue, isHiddenField, isTreeField, treeSelected, handleChangeTreeSelect, handleChangeHelperText, handleChangeHiddenValue, }: ExtraFieldProps) => JSX.Element;
|
|
14
|
+
export default ExtraField;
|
package/dist/features/Treege/components/Forms/FormTreeCardMutation/useFormTreeCardMutation.d.ts
CHANGED
|
@@ -5,14 +5,15 @@ declare const useFormTreeCardMutation: () => {
|
|
|
5
5
|
getDisabledValueField: (index: number) => boolean;
|
|
6
6
|
handleAddValue: () => void;
|
|
7
7
|
handleChangeHelperText: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
handleChangeHiddenValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
8
9
|
handleChangeIsDecisionField: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
handleChangeIsRepeatable: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
handleChangeLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
handleChangeMessage: (nameMessage: "on" | "off") => (event: ChangeEvent<HTMLInputElement>) => void;
|
|
12
12
|
handleChangeName: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
handleChangeOptionLabel: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
14
14
|
handleChangeOptionMessage: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
15
15
|
handleChangeOptionValue: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
handleChangeRepeatable: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
16
17
|
handleChangeRequired: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
17
18
|
handleChangeStep: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
18
19
|
handleChangeTreeSelect: (event: SelectChangeEvent) => void;
|
|
@@ -20,12 +21,14 @@ declare const useFormTreeCardMutation: () => {
|
|
|
20
21
|
handleDeleteValue: (idToDelete: string) => void;
|
|
21
22
|
handleSubmit: (e: FormEvent) => Promise<void>;
|
|
22
23
|
helperText: string;
|
|
24
|
+
hiddenValue: string;
|
|
23
25
|
isBooleanField: boolean;
|
|
24
26
|
isDecision: boolean;
|
|
25
27
|
isDecisionField: boolean;
|
|
26
|
-
|
|
28
|
+
isHiddenField: boolean;
|
|
29
|
+
isRepeatableDisabled: boolean;
|
|
27
30
|
isRequiredDisabled: boolean;
|
|
28
|
-
|
|
31
|
+
isTreeField: boolean;
|
|
29
32
|
isWorkflowLoading: boolean;
|
|
30
33
|
label: string;
|
|
31
34
|
messages: {
|
|
@@ -33,10 +36,11 @@ declare const useFormTreeCardMutation: () => {
|
|
|
33
36
|
on: string;
|
|
34
37
|
};
|
|
35
38
|
name: string;
|
|
39
|
+
repeatable: boolean;
|
|
36
40
|
required: boolean;
|
|
37
41
|
step: string;
|
|
38
42
|
treeSelected: string;
|
|
39
|
-
type: "number" | "text" | "email" | "file" | "password" | "tel" | "address" | "url" | "date" | "time" | "switch" | "checkbox" | "radio" | "select" | "tree";
|
|
43
|
+
type: "number" | "text" | "email" | "file" | "password" | "tel" | "address" | "url" | "date" | "time" | "switch" | "checkbox" | "radio" | "select" | "hidden" | "tree";
|
|
40
44
|
uniqueNameErrorMessage: string;
|
|
41
45
|
values: {
|
|
42
46
|
id: string;
|
|
@@ -27,7 +27,8 @@ export interface TreeNodeField {
|
|
|
27
27
|
message?: never;
|
|
28
28
|
tree?: TreeNode;
|
|
29
29
|
treePath?: string;
|
|
30
|
-
|
|
30
|
+
repeatable?: boolean;
|
|
31
|
+
hiddenValue?: string;
|
|
31
32
|
}
|
|
32
33
|
export interface TreeNodeValues {
|
|
33
34
|
depth: number;
|
|
@@ -45,7 +46,8 @@ export interface TreeNodeValues {
|
|
|
45
46
|
message?: string;
|
|
46
47
|
tree?: never;
|
|
47
48
|
treePath?: never;
|
|
48
|
-
|
|
49
|
+
repeatable?: never;
|
|
50
|
+
hiddenValue?: never;
|
|
49
51
|
}
|
|
50
52
|
export declare type TreeNodeAttributes = TreeNodeField | TreeNodeValues;
|
|
51
53
|
export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children"> {
|