treege 0.17.0 → 0.19.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.
@@ -65,6 +65,12 @@ declare const fields: readonly [{
65
65
  readonly isRepeatableDisabled: false;
66
66
  readonly isRequiredDisabled: false;
67
67
  readonly type: "time";
68
+ }, {
69
+ readonly isBooleanField: false;
70
+ readonly isDecisionField: false;
71
+ readonly isRepeatableDisabled: false;
72
+ readonly isRequiredDisabled: false;
73
+ readonly type: "timeRange";
68
74
  }, {
69
75
  readonly isBooleanField: true;
70
76
  readonly isDecisionField: false;
@@ -102,6 +108,7 @@ declare const fields: readonly [{
102
108
  readonly isRequiredDisabled: false;
103
109
  readonly type: "select";
104
110
  }, {
111
+ readonly initialQueryEnable: true;
105
112
  readonly isBooleanField: false;
106
113
  readonly isDecisionField: false;
107
114
  readonly isRepeatableDisabled: true;
@@ -66,6 +66,12 @@ declare const useFieldSelect: () => {
66
66
  readonly isRepeatableDisabled: false;
67
67
  readonly isRequiredDisabled: false;
68
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";
69
75
  } | {
70
76
  readonly isBooleanField: true;
71
77
  readonly isDecisionField: false;
@@ -103,6 +109,7 @@ declare const useFieldSelect: () => {
103
109
  readonly isRequiredDisabled: false;
104
110
  readonly type: "select";
105
111
  } | {
112
+ readonly initialQueryEnable: true;
106
113
  readonly isBooleanField: false;
107
114
  readonly isDecisionField: false;
108
115
  readonly isRepeatableDisabled: true;
@@ -7,6 +7,7 @@ declare const useFormTreeCardMutation: () => {
7
7
  handleAddValue: () => void;
8
8
  handleChangeHelperText: (event: ChangeEvent<HTMLInputElement>) => void;
9
9
  handleChangeHiddenValue: (event: ChangeEvent<HTMLInputElement>) => void;
10
+ handleChangeInitialQuery: (event: ChangeEvent<HTMLInputElement>) => void;
10
11
  handleChangeIsDecisionField: (event: ChangeEvent<HTMLInputElement>) => void;
11
12
  handleChangeLabel: (event: ChangeEvent<HTMLInputElement>) => void;
12
13
  handleChangeMessage: (nameMessage: "on" | "off") => (event: ChangeEvent<HTMLInputElement>) => void;
@@ -35,6 +36,7 @@ declare const useFormTreeCardMutation: () => {
35
36
  handleSubmit: (e: FormEvent) => Promise<void>;
36
37
  helperText: string;
37
38
  hiddenValue: string;
39
+ initialQuery: boolean;
38
40
  isAutocomplete: boolean;
39
41
  isBooleanField: boolean;
40
42
  isDecision: boolean;
@@ -62,7 +64,7 @@ declare const useFormTreeCardMutation: () => {
62
64
  step: string;
63
65
  tag: string | null;
64
66
  treeSelected: string;
65
- type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
67
+ type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "timeRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
66
68
  uniqueNameErrorMessage: string;
67
69
  values: {
68
70
  id: string;
@@ -51,6 +51,7 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
51
51
  hiddenValue?: string;
52
52
  route?: Route;
53
53
  parentRef?: string;
54
+ initialQuery?: boolean;
54
55
  } | {
55
56
  depth: number;
56
57
  tag?: string;
@@ -72,6 +73,7 @@ export interface TreeNode extends Omit<RawNodeDatum, "attributes" | "children">
72
73
  hiddenValue?: never;
73
74
  route?: Route;
74
75
  parentRef?: string;
76
+ initialQuery?: boolean;
75
77
  };
76
78
  children: TreeNode[];
77
79
  treeId?: string;
@@ -35,6 +35,7 @@ declare const FORM_EN: {
35
35
  readonly tel: "Tel";
36
36
  readonly text: "Text";
37
37
  readonly time: "Time";
38
+ readonly timeRange: "Time range";
38
39
  readonly tree: "Tree";
39
40
  readonly url: "URL";
40
41
  };
@@ -3,6 +3,7 @@ declare const TRANSLATION_EN: {
3
3
  readonly cancel: "Cancel";
4
4
  readonly disabled: "Disabled";
5
5
  readonly edit: "Edit";
6
+ readonly initialQueryEnable: "Enable initial API call";
6
7
  readonly isABranch: "Is a branch";
7
8
  readonly isAHidden: "Is a hidden field";
8
9
  readonly isALeaf: "Is a leaf";
@@ -35,6 +35,7 @@ declare const FORM_FR: {
35
35
  readonly tel: "Téléphone";
36
36
  readonly text: "Texte";
37
37
  readonly time: "Temps";
38
+ readonly timeRange: "Plage de temps";
38
39
  readonly tree: "Arbre";
39
40
  readonly url: "URL";
40
41
  };
@@ -3,6 +3,7 @@ declare const TRANSLATION_FR: {
3
3
  readonly cancel: "Annuler";
4
4
  readonly disabled: "Désactivé";
5
5
  readonly edit: "Éditer";
6
+ readonly initialQueryEnable: "Activer un appel API intiale";
6
7
  readonly isABranch: "Est une branche";
7
8
  readonly isAHidden: "Est un champs caché";
8
9
  readonly isALeaf: "Est une feuille";
@@ -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" | "dateRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
30
+ type: "number" | "text" | "address" | "select" | "time" | "switch" | "hidden" | "email" | "file" | "password" | "tel" | "url" | "date" | "dateRange" | "timeRange" | "checkbox" | "tree" | "radio" | "autocomplete" | "dynamicSelect";
31
31
  value?: undefined;
32
32
  values?: import('../../../features/Treege/type/TreeNode').TreeValues[] | undefined;
33
33
  message?: undefined;
@@ -37,6 +37,7 @@ declare const appendNode: ({ tree, path, name, child }: AppendChildParams) => Tr
37
37
  hiddenValue?: string | undefined;
38
38
  route?: import('../../../features/Treege/type/TreeNode').Route | undefined;
39
39
  parentRef?: string | undefined;
40
+ initialQuery?: boolean | undefined;
40
41
  } | {
41
42
  isLeaf: boolean;
42
43
  isRoot: boolean;
@@ -58,6 +59,7 @@ declare const appendNode: ({ tree, path, name, child }: AppendChildParams) => Tr
58
59
  hiddenValue?: undefined;
59
60
  route?: import('../../../features/Treege/type/TreeNode').Route | undefined;
60
61
  parentRef?: string | undefined;
62
+ initialQuery?: boolean | undefined;
61
63
  };
62
64
  name: string;
63
65
  children: TreeNode[];
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": "0.17.0",
5
+ "version": "0.19.0",
6
6
  "type": "module",
7
7
  "types": "./dist/main.d.ts",
8
8
  "main": "./dist/main.umd.cjs",