treege 1.0.0 → 1.0.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.
@@ -2,6 +2,12 @@ import { Params, Route, TreeNodeField } from '../../../type/TreeNode';
2
2
  import { ChangeEvent, FormEvent, MouseEvent, SyntheticEvent } from 'react';
3
3
  import { SelectChangeEvent } from '@tracktor/design-system';
4
4
 
5
+ interface Values {
6
+ id: string;
7
+ label: string;
8
+ value: string;
9
+ message?: string;
10
+ }
5
11
  declare const useFormTreeCardMutation: () => {
6
12
  getDisabledValueField: (index: number) => boolean;
7
13
  handleAddParams: () => void;
@@ -67,11 +73,6 @@ declare const useFormTreeCardMutation: () => {
67
73
  treeSelected: string;
68
74
  type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "timeRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
69
75
  uuid: string;
70
- values: {
71
- id: string;
72
- label: string;
73
- value: string;
74
- message?: string | undefined;
75
- }[];
76
+ values: Values[];
76
77
  };
77
78
  export default useFormTreeCardMutation;
@@ -31,10 +31,6 @@ export interface TreeNode {
31
31
  depth: number;
32
32
  tag?: string;
33
33
  helperText?: string;
34
- messages?: {
35
- on?: string;
36
- off?: string;
37
- };
38
34
  isDecision?: boolean;
39
35
  isLeaf?: boolean;
40
36
  isRoot?: boolean;
@@ -53,6 +49,10 @@ export interface TreeNode {
53
49
  route?: Route;
54
50
  parentRef?: string;
55
51
  initialQuery?: boolean;
52
+ messages?: {
53
+ on?: string;
54
+ off?: string;
55
+ };
56
56
  } | {
57
57
  depth: number;
58
58
  tag?: string;
@@ -62,7 +62,7 @@ export interface TreeNode {
62
62
  isLeaf?: boolean;
63
63
  isRoot?: never;
64
64
  label?: string;
65
- name?: never;
65
+ name: string;
66
66
  required?: never;
67
67
  step?: never;
68
68
  type?: never;
@@ -7,6 +7,7 @@ declare const FORM_EN: {
7
7
  readonly helperText: "Helper text";
8
8
  readonly hiddenValue: "Hidden value";
9
9
  readonly label: "Label";
10
+ readonly message: "Message";
10
11
  readonly mustBeUnique: "Must be unique";
11
12
  readonly newTree: "Nouvel arbre";
12
13
  readonly noAncestorFound: "No parents found";
@@ -7,6 +7,7 @@ declare const FORM_FR: {
7
7
  readonly helperText: "Texte d'information";
8
8
  readonly hiddenValue: "Valeur caché";
9
9
  readonly label: "Label";
10
+ readonly message: "Message";
10
11
  readonly mustBeUnique: "Doit être unique";
11
12
  readonly newTree: "Nouvel arbre";
12
13
  readonly noAncestorFound: "Aucun parent trouvé";
@@ -20,10 +20,6 @@ declare const appendNode: ({ tree, path, uuid, child }: AppendChildParams) => Tr
20
20
  depth: number;
21
21
  tag?: string | undefined;
22
22
  helperText?: string | undefined;
23
- messages?: {
24
- on?: string | undefined;
25
- off?: string | undefined;
26
- } | undefined;
27
23
  isDecision?: boolean | undefined;
28
24
  label?: string | undefined;
29
25
  name: string;
@@ -40,6 +36,10 @@ declare const appendNode: ({ tree, path, uuid, child }: AppendChildParams) => Tr
40
36
  route?: import('../../../features/Treege/type/TreeNode').Route | undefined;
41
37
  parentRef?: string | undefined;
42
38
  initialQuery?: boolean | undefined;
39
+ messages?: {
40
+ on?: string | undefined;
41
+ off?: string | undefined;
42
+ } | undefined;
43
43
  } | {
44
44
  isLeaf: boolean;
45
45
  isRoot: boolean;
@@ -49,7 +49,7 @@ declare const appendNode: ({ tree, path, uuid, child }: AppendChildParams) => Tr
49
49
  messages?: undefined;
50
50
  isDecision?: undefined;
51
51
  label?: string | undefined;
52
- name?: undefined;
52
+ name: string;
53
53
  required?: undefined;
54
54
  step?: undefined;
55
55
  type?: undefined;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "treege",
3
3
  "description": "Form decision tree generator",
4
4
  "license": "ISC",
5
- "version": "1.0.0",
5
+ "version": "1.0.1",
6
6
  "type": "module",
7
7
  "types": "./dist/main.d.ts",
8
8
  "main": "./dist/main.umd.cjs",