treege 3.0.0-beta.1 → 3.0.0-beta.11
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/README.md +94 -23
- package/dist/ThemeContext-BC-hvzzD.js +758 -0
- package/dist/TreegeEditor-BCdlhdkk.js +2744 -0
- package/dist/TreegeRenderer-BAvL4iDF.js +1405 -0
- package/dist/editor/constants/nodeTypes.d.ts +3 -3
- package/dist/editor/context/TreegeEditorContext.d.ts +15 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/nodes/useBottomHandleClick.d.ts +8 -0
- package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
- package/dist/editor/hooks/useAddConnectedNode.d.ts +7 -0
- package/dist/editor/types/ai.d.ts +65 -0
- package/dist/editor/types/editor.d.ts +5 -8
- package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +3 -3
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +1 -1
- package/dist/renderer/types/renderer.d.ts +15 -0
- package/dist/renderer.js +2 -2
- package/dist/shared/locales/ar.json.d.ts +21 -1
- package/dist/shared/locales/de.json.d.ts +21 -1
- package/dist/shared/locales/en.json.d.ts +21 -1
- package/dist/shared/locales/es.json.d.ts +21 -1
- package/dist/shared/locales/fr.json.d.ts +21 -1
- package/dist/shared/locales/it.json.d.ts +21 -1
- package/dist/shared/locales/pt.json.d.ts +21 -1
- package/package.json +6 -3
- package/dist/ThemeContext-BIvs8Kw-.js +0 -758
- package/dist/TreegeEditor-BSPfQQk3.js +0 -2151
- package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
- package/dist/_name_.css +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const nodeTypes: {
|
|
2
|
-
flow: ({ data, isConnectable, type, parentId }: import('../features/TreegeEditor/nodes/FlowNode').FlowNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
flow: ({ data, isConnectable, type, parentId, id }: import('../features/TreegeEditor/nodes/FlowNode').FlowNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
group: ({ data }: import('../features/TreegeEditor/nodes/GroupNode').GroupNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
input: ({ data, isConnectable, type, parentId }: import('../features/TreegeEditor/nodes/InputNode').InputNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
ui: ({ data, isConnectable, type, parentId }: import('../features/TreegeEditor/nodes/UINode').UINodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
input: ({ data, isConnectable, type, parentId, id }: import('../features/TreegeEditor/nodes/InputNode').InputNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
ui: ({ data, isConnectable, type, parentId, id }: import('../features/TreegeEditor/nodes/UINode').UINodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { AIConfig } from '../types/ai';
|
|
2
3
|
export interface TreegeEditorContextValue {
|
|
4
|
+
/**
|
|
5
|
+
* Current language
|
|
6
|
+
*/
|
|
3
7
|
language: string;
|
|
8
|
+
/**
|
|
9
|
+
* Current flow ID
|
|
10
|
+
*/
|
|
4
11
|
flowId?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Function to set the current flow ID
|
|
14
|
+
* @param flow
|
|
15
|
+
*/
|
|
5
16
|
setFlowId?: (flow?: string) => void;
|
|
17
|
+
/**
|
|
18
|
+
* AI configuration for tree generation
|
|
19
|
+
*/
|
|
20
|
+
aiConfig?: AIConfig;
|
|
6
21
|
}
|
|
7
22
|
export interface TreegeEditorProviderProps extends PropsWithChildren {
|
|
8
23
|
value: TreegeEditorContextValue;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TreegeEditorProps } from '../../types/editor';
|
|
2
|
-
declare const TreegeEditor: ({
|
|
2
|
+
declare const TreegeEditor: ({ flow, onExportJson, onSave, theme, language, aiConfig }: TreegeEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TreegeEditor;
|
|
@@ -2,5 +2,5 @@ import { Node, NodeProps } from '@xyflow/react';
|
|
|
2
2
|
import { FlowNodeData } from '../../../../shared/types/node';
|
|
3
3
|
export type FlowNodeType = Node<FlowNodeData, "flow">;
|
|
4
4
|
export type FlowNodeProps = NodeProps<FlowNodeType>;
|
|
5
|
-
declare const FlowNode: ({ data, isConnectable, type, parentId }: FlowNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const FlowNode: ({ data, isConnectable, type, parentId, id }: FlowNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default FlowNode;
|
|
@@ -2,5 +2,5 @@ import { Node, NodeProps } from '@xyflow/react';
|
|
|
2
2
|
import { InputNodeData } from '../../../../shared/types/node';
|
|
3
3
|
export type InputNodeType = Node<InputNodeData, "input">;
|
|
4
4
|
export type InputNodeProps = NodeProps<InputNodeType>;
|
|
5
|
-
declare const InputNode: ({ data, isConnectable, type, parentId }: InputNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const InputNode: ({ data, isConnectable, type, parentId, id }: InputNodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default InputNode;
|
|
@@ -2,5 +2,5 @@ import { Node, NodeProps } from '@xyflow/react';
|
|
|
2
2
|
import { UINodeData } from '../../../../shared/types/node';
|
|
3
3
|
export type UINodeType = Node<UINodeData, "ui">;
|
|
4
4
|
export type UINodeProps = NodeProps<UINodeType>;
|
|
5
|
-
declare const UINode: ({ data, isConnectable, type, parentId }: UINodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const UINode: ({ data, isConnectable, type, parentId, id }: UINodeProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default UINode;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook to handle clicks on bottom handles of nodes
|
|
4
|
+
* @param nodeId - The ID of the current node
|
|
5
|
+
* @returns Click handler for the bottom handle
|
|
6
|
+
*/
|
|
7
|
+
declare const useBottomHandleClick: (nodeId: string) => (event: MouseEvent) => void;
|
|
8
|
+
export default useBottomHandleClick;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { AIConfig } from '../../../types/ai';
|
|
3
|
+
export interface AIGeneratorDialogProps {
|
|
4
|
+
/**
|
|
5
|
+
* AI configuration from context
|
|
6
|
+
*/
|
|
7
|
+
aiConfig?: AIConfig;
|
|
8
|
+
/**
|
|
9
|
+
* Callback when tree is generated
|
|
10
|
+
*/
|
|
11
|
+
onGenerate: (data: {
|
|
12
|
+
edges: Edge[];
|
|
13
|
+
nodes: Node[];
|
|
14
|
+
}) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const AIGeneratorDialog: ({ aiConfig, onGenerate }: AIGeneratorDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
/**
|
|
3
|
+
* AI Provider types for tree generation
|
|
4
|
+
*/
|
|
5
|
+
export type AIProvider = "gemini" | "openai" | "deepseek" | "claude";
|
|
6
|
+
/**
|
|
7
|
+
* AI Configuration for tree generation
|
|
8
|
+
*/
|
|
9
|
+
export interface AIConfig {
|
|
10
|
+
/**
|
|
11
|
+
* The AI provider to use
|
|
12
|
+
* @default "gemini"
|
|
13
|
+
*/
|
|
14
|
+
provider?: AIProvider;
|
|
15
|
+
/**
|
|
16
|
+
* API key for the selected provider
|
|
17
|
+
*/
|
|
18
|
+
apiKey: string;
|
|
19
|
+
/**
|
|
20
|
+
* Optional model name override
|
|
21
|
+
* - Gemini: "gemini-2.5-flash" (default), "gemini-2.5-pro-preview-03-25"
|
|
22
|
+
* - OpenAI: "gpt-4o-mini" (default), "gpt-4o", "gpt-3.5-turbo"
|
|
23
|
+
* - DeepSeek: "deepseek-chat" (default)
|
|
24
|
+
* - Claude: "claude-3-5-haiku-20241022" (default), "claude-3-5-sonnet-20241022"
|
|
25
|
+
*/
|
|
26
|
+
model?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Temperature for generation (0-1, default: 0.7)
|
|
29
|
+
*/
|
|
30
|
+
temperature?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* AI Generation request
|
|
34
|
+
*/
|
|
35
|
+
export interface AIGenerationRequest {
|
|
36
|
+
/**
|
|
37
|
+
* User prompt describing the desired tree/form
|
|
38
|
+
*/
|
|
39
|
+
prompt: string;
|
|
40
|
+
/**
|
|
41
|
+
* AI configuration
|
|
42
|
+
*/
|
|
43
|
+
config: AIConfig;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* AI Generation response
|
|
47
|
+
*/
|
|
48
|
+
export interface AIGenerationResponse {
|
|
49
|
+
/**
|
|
50
|
+
* Generated nodes
|
|
51
|
+
*/
|
|
52
|
+
nodes: Node[];
|
|
53
|
+
/**
|
|
54
|
+
* Generated edges
|
|
55
|
+
*/
|
|
56
|
+
edges: Edge[];
|
|
57
|
+
/**
|
|
58
|
+
* Optional explanation or metadata
|
|
59
|
+
*/
|
|
60
|
+
metadata?: {
|
|
61
|
+
explanation?: string;
|
|
62
|
+
nodesCount?: number;
|
|
63
|
+
edgesCount?: number;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Edge, Node } from '@xyflow/react';
|
|
2
|
+
import { AIConfig } from './ai';
|
|
2
3
|
import { Flow } from '../../shared/types/node';
|
|
3
4
|
export interface TreegeEditorProps {
|
|
4
5
|
/**
|
|
@@ -6,14 +7,6 @@ export interface TreegeEditorProps {
|
|
|
6
7
|
* Note: Individual defaultNodes/defaultEdges props take precedence over this.
|
|
7
8
|
*/
|
|
8
9
|
flow?: Flow | null;
|
|
9
|
-
/**
|
|
10
|
-
* Default nodes to initialize the nodes in the flow.
|
|
11
|
-
*/
|
|
12
|
-
nodes?: Node[];
|
|
13
|
-
/**
|
|
14
|
-
* Default edges to initialize the edges in the flow.
|
|
15
|
-
*/
|
|
16
|
-
edges?: Edge[];
|
|
17
10
|
/**
|
|
18
11
|
* Callback function triggered when exporting JSON data.
|
|
19
12
|
*/
|
|
@@ -34,4 +27,8 @@ export interface TreegeEditorProps {
|
|
|
34
27
|
* Language for the editor interface.
|
|
35
28
|
*/
|
|
36
29
|
language?: string;
|
|
30
|
+
/**
|
|
31
|
+
* AI configuration for tree generation
|
|
32
|
+
*/
|
|
33
|
+
aiConfig?: AIConfig;
|
|
37
34
|
}
|
package/dist/editor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as o } from "./TreegeEditor-
|
|
2
|
-
import { T as m, u as s } from "./ThemeContext-
|
|
1
|
+
import { T as o } from "./TreegeEditor-BCdlhdkk.js";
|
|
2
|
+
import { T as m, u as s } from "./ThemeContext-BC-hvzzD.js";
|
|
3
3
|
export {
|
|
4
4
|
m as ThemeProvider,
|
|
5
5
|
o as TreegeEditor,
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { T as t } from "./TreegeEditor-
|
|
2
|
-
import { T as u, d as l, g as r, b as o, c as i, i as n, a as d, u as f } from "./ThemeContext-
|
|
3
|
-
import { c as D, d as I, e as T, f as m, g, h as F, D as c, i as x, j as N, k as S, l as b, m as v, n as R, o as h, p as w, q as C, r as z, s as A, v as H, w as k, T as E, b as G, J as P, K as y, t as U, x as V, y as j, z as q, A as B, C as J, F as K, G as L, I as M, E as O, H as Q, B as W, u as X, a as Y } from "./TreegeRenderer-
|
|
1
|
+
import { T as t } from "./TreegeEditor-BCdlhdkk.js";
|
|
2
|
+
import { T as u, d as l, g as r, b as o, c as i, i as n, a as d, u as f } from "./ThemeContext-BC-hvzzD.js";
|
|
3
|
+
import { c as D, d as I, e as T, f as m, g, h as F, D as c, i as x, j as N, k as S, l as b, m as v, n as R, o as h, p as w, q as C, r as z, s as A, v as H, w as k, T as E, b as G, J as P, K as y, t as U, x as V, y as j, z as q, A as B, C as J, F as K, G as L, I as M, E as O, H as Q, B as W, u as X, a as Y } from "./TreegeRenderer-BAvL4iDF.js";
|
|
4
4
|
export {
|
|
5
5
|
D as DefaultAddressInput,
|
|
6
6
|
I as DefaultAutocompleteInput,
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultAddressInput: ({ node, value, setValue, error }: InputRenderProps<"address">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultAddressInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"address">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultAddressInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultAutocompleteInput: ({ node, value, setValue, error }: InputRenderProps<"autocomplete">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultAutocompleteInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"autocomplete">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultAutocompleteInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultCheckboxInput: ({ node, value, setValue, error }: InputRenderProps<"checkbox">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultCheckboxInput: ({ node, value, setValue, error, label, helperText }: InputRenderProps<"checkbox">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultCheckboxInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultDateInput: ({ node, value, setValue, error }: InputRenderProps<"date">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultDateInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"date">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultDateInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultDateRangeInput: ({ node, value, setValue, error }: InputRenderProps<"daterange">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultDateRangeInput: ({ node, value, setValue, error, label, helperText }: InputRenderProps<"daterange">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultDateRangeInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultFileInput: ({ node, setValue, error }: InputRenderProps<"file">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultFileInput: ({ node, setValue, error, label, placeholder, helperText }: InputRenderProps<"file">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultFileInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultHttpInput: ({ node, value, setValue, error }: InputRenderProps<"http">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultHttpInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"http">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultHttpInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultNumberInput: ({ node, value, setValue, error }: InputRenderProps<"number">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultNumberInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"number">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultNumberInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultPasswordInput: ({ node, value, setValue, error }: InputRenderProps<"password">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultPasswordInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"password">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultPasswordInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultRadioInput: ({ node, value, setValue, error }: InputRenderProps<"radio">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultRadioInput: ({ node, value, setValue, error, label, helperText }: InputRenderProps<"radio">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultRadioInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultSelectInput: ({ node, value, setValue, error }: InputRenderProps<"select">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultSelectInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"select">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultSelectInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultSwitchInput: ({ node, value, setValue, error }: InputRenderProps<"switch">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultSwitchInput: ({ node, value, setValue, error, label, helperText }: InputRenderProps<"switch">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultSwitchInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultTextAreaInput: ({ node, value, setValue, error }: InputRenderProps<"textarea">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultTextAreaInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"textarea">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultTextAreaInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultTextInput: ({ node, value, setValue, error }: InputRenderProps<"text">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultTextInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"text">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultTextInput;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultTimeInput: ({ node, value, setValue, error }: InputRenderProps<"time">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultTimeInput: ({ node, value, setValue, error, label, placeholder, helperText }: InputRenderProps<"time">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultTimeInput;
|
package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputRenderProps } from '../../../../../types/renderer';
|
|
2
|
-
declare const DefaultTimeRangeInput: ({ node, value, setValue, error }: InputRenderProps<"timerange">) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const DefaultTimeRangeInput: ({ node, value, setValue, error, label, helperText }: InputRenderProps<"timerange">) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DefaultTimeRangeInput;
|
|
@@ -37,6 +37,9 @@ export type InputValue = string | number | boolean | string[] | SerializableFile
|
|
|
37
37
|
* All form state is provided via props for easier custom component implementation
|
|
38
38
|
*/
|
|
39
39
|
export type InputRenderProps<T extends InputType = InputType> = {
|
|
40
|
+
/**
|
|
41
|
+
* The node data for this input field
|
|
42
|
+
*/
|
|
40
43
|
node: Node<InputNodeData>;
|
|
41
44
|
/**
|
|
42
45
|
* Current value of the input field (typed based on input type when T is specified)
|
|
@@ -51,6 +54,18 @@ export type InputRenderProps<T extends InputType = InputType> = {
|
|
|
51
54
|
* Validation error message for this field (if any)
|
|
52
55
|
*/
|
|
53
56
|
error?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Translated label (already processed with current language)
|
|
59
|
+
*/
|
|
60
|
+
label?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Translated placeholder (already processed with current language)
|
|
63
|
+
*/
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Translated helper text (already processed with current language)
|
|
67
|
+
*/
|
|
68
|
+
helperText?: string;
|
|
54
69
|
};
|
|
55
70
|
export type UiRenderProps = {
|
|
56
71
|
node: Node<UINodeData>;
|
package/dist/renderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as t, d as s, e as u, f as l, g as r, h as n, D as i, i as o, j as f, k as d, l as p, m as D, n as I, o as T, p as m, q as g, r as F, s as c, v, w as x, T as R, b as S, J as b, K as h, t as C, x as w, y as z, z as A, A as H, C as N, F as k, G as P, I as y, E, H as G, B as V, u as j, a as q } from "./TreegeRenderer-
|
|
2
|
-
import { T as J, g as K, u as U } from "./ThemeContext-
|
|
1
|
+
import { c as t, d as s, e as u, f as l, g as r, h as n, D as i, i as o, j as f, k as d, l as p, m as D, n as I, o as T, p as m, q as g, r as F, s as c, v, w as x, T as R, b as S, J as b, K as h, t as C, x as w, y as z, z as A, A as H, C as N, F as k, G as P, I as y, E, H as G, B as V, u as j, a as q } from "./TreegeRenderer-BAvL4iDF.js";
|
|
2
|
+
import { T as J, g as K, u as U } from "./ThemeContext-BC-hvzzD.js";
|
|
3
3
|
export {
|
|
4
4
|
t as DefaultAddressInput,
|
|
5
5
|
s as DefaultAutocompleteInput,
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "إضافة
|
|
14
|
+
"addNode": "إضافة عنصر",
|
|
15
15
|
"clear": "مسح التدفق",
|
|
16
16
|
"clearSuccess": "تم مسح التدفق!",
|
|
17
17
|
"clearSuccessDesc": "تم إزالة جميع العقد والحواف.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "خطأ في تحليل ملف JSON.",
|
|
29
29
|
"parseErrorDesc": "حاول إصلاح الملف واستيراده مرة أخرى."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "الذكاء الاصطناعي غير مُهيأ",
|
|
33
|
+
"aiNotConfiguredDesc": "أضف خاصية {code} إلى TreegeEditorProvider",
|
|
34
|
+
"buttonLabel": "إنشاء باستخدام الذكاء الاصطناعي",
|
|
35
|
+
"cancel": "إلغاء",
|
|
36
|
+
"description": "الوصف",
|
|
37
|
+
"descriptionPlaceholder": "مثال: إنشاء نموذج اتصال مع الاسم والبريد الإلكتروني ورقم الهاتف والرسالة",
|
|
38
|
+
"enterDescription": "الرجاء إدخال وصف",
|
|
39
|
+
"failedToGenerate": "فشل في إنشاء الشجرة",
|
|
40
|
+
"generate": "إنشاء",
|
|
41
|
+
"generating": "جارٍ الإنشاء...",
|
|
42
|
+
"keyboardShortcut": "اضغط {cmdEnter} أو {ctrlEnter} للإنشاء",
|
|
43
|
+
"missingApiKey": "تكوين الذكاء الاصطناعي مفقود",
|
|
44
|
+
"missingApiKeyDesc": "الرجاء تكوين مفتاح API الخاص بالذكاء الاصطناعي في TreegeEditorProvider",
|
|
45
|
+
"successDescription": "تم إنشاء {nodes} عقدة و {edges} حافة",
|
|
46
|
+
"successTitle": "تم إنشاء الشجرة بنجاح!",
|
|
47
|
+
"title": "إنشاء تدفق باستخدام الذكاء الاصطناعي",
|
|
48
|
+
"titleDescription": "صف النموذج أو شجرة القرار التي تريد إنشاءها، وسيقوم الذكاء الاصطناعي بإنشائها لك.",
|
|
49
|
+
"unknownError": "حدث خطأ غير معروف"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "مخصص: {value}",
|
|
33
53
|
"search": "البحث عن أنماط...",
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "
|
|
14
|
+
"addNode": "Element hinzufügen",
|
|
15
15
|
"clear": "Löschen",
|
|
16
16
|
"clearSuccess": "Fluss geleert!",
|
|
17
17
|
"clearSuccessDesc": "Alle Knoten und Kanten wurden entfernt.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "Fehler beim Parsen der JSON-Datei.",
|
|
29
29
|
"parseErrorDesc": "Versuchen Sie, die Datei zu korrigieren und erneut zu importieren."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "KI nicht konfiguriert",
|
|
33
|
+
"aiNotConfiguredDesc": "Fügen Sie {code} Prop zu TreegeEditorProvider hinzu",
|
|
34
|
+
"buttonLabel": "Mit KI generieren",
|
|
35
|
+
"cancel": "Abbrechen",
|
|
36
|
+
"description": "Beschreibung",
|
|
37
|
+
"descriptionPlaceholder": "Beispiel: Erstellen Sie ein Kontaktformular mit Name, E-Mail, Telefonnummer und Nachricht",
|
|
38
|
+
"enterDescription": "Bitte geben Sie eine Beschreibung ein",
|
|
39
|
+
"failedToGenerate": "Fehler beim Generieren des Baums",
|
|
40
|
+
"generate": "Generieren",
|
|
41
|
+
"generating": "Wird generiert...",
|
|
42
|
+
"keyboardShortcut": "Drücken Sie {cmdEnter} oder {ctrlEnter} zum Generieren",
|
|
43
|
+
"missingApiKey": "KI-Konfiguration fehlt",
|
|
44
|
+
"missingApiKeyDesc": "Bitte konfigurieren Sie Ihren KI-API-Schlüssel in TreegeEditorProvider",
|
|
45
|
+
"successDescription": "{nodes} Knoten und {edges} Kanten erstellt",
|
|
46
|
+
"successTitle": "Baum erfolgreich generiert!",
|
|
47
|
+
"title": "Flow mit KI generieren",
|
|
48
|
+
"titleDescription": "Beschreiben Sie das Formular oder den Entscheidungsbaum, den Sie erstellen möchten, und die KI wird ihn für Sie generieren.",
|
|
49
|
+
"unknownError": "Unbekannter Fehler aufgetreten"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "Benutzerdefiniert: {value}",
|
|
33
53
|
"search": "Muster suchen...",
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "Add
|
|
14
|
+
"addNode": "Add Element",
|
|
15
15
|
"clear": "Clear",
|
|
16
16
|
"clearSuccess": "Flow cleared!",
|
|
17
17
|
"clearSuccessDesc": "All nodes and edges have been removed.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "Error parsing JSON file.",
|
|
29
29
|
"parseErrorDesc": "Try to fix the file and import it again."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "AI not configured",
|
|
33
|
+
"aiNotConfiguredDesc": "Add {code} prop to TreegeEditorProvider",
|
|
34
|
+
"buttonLabel": "Generate with AI",
|
|
35
|
+
"cancel": "Cancel",
|
|
36
|
+
"description": "Description",
|
|
37
|
+
"descriptionPlaceholder": "Example: Create a contact form with name, email, phone number, and message fields",
|
|
38
|
+
"enterDescription": "Please enter a description",
|
|
39
|
+
"failedToGenerate": "Failed to generate tree",
|
|
40
|
+
"generate": "Generate",
|
|
41
|
+
"generating": "Generating...",
|
|
42
|
+
"keyboardShortcut": "Press {cmdEnter} or {ctrlEnter} to generate",
|
|
43
|
+
"missingApiKey": "AI configuration missing",
|
|
44
|
+
"missingApiKeyDesc": "Please configure your AI API key in TreegeEditorProvider",
|
|
45
|
+
"successDescription": "Created {nodes} nodes and {edges} edges",
|
|
46
|
+
"successTitle": "Tree generated successfully!",
|
|
47
|
+
"title": "Generate Flow with AI",
|
|
48
|
+
"titleDescription": "Describe the form or decision tree you want to create, and AI will generate it for you.",
|
|
49
|
+
"unknownError": "Unknown error occurred"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "Custom: {value}",
|
|
33
53
|
"search": "Search patterns...",
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "Agregar
|
|
14
|
+
"addNode": "Agregar elemento",
|
|
15
15
|
"clear": "Limpiar",
|
|
16
16
|
"clearSuccess": "¡Flujo limpiado!",
|
|
17
17
|
"clearSuccessDesc": "Todos los nodos y aristas han sido eliminados.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "Error al analizar el archivo JSON.",
|
|
29
29
|
"parseErrorDesc": "Intenta corregir el archivo e importarlo nuevamente."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "IA no configurada",
|
|
33
|
+
"aiNotConfiguredDesc": "Agregue la prop {code} a TreegeEditorProvider",
|
|
34
|
+
"buttonLabel": "Generar con IA",
|
|
35
|
+
"cancel": "Cancelar",
|
|
36
|
+
"description": "Descripción",
|
|
37
|
+
"descriptionPlaceholder": "Ejemplo: Crear un formulario de contacto con nombre, correo electrónico, teléfono y mensaje",
|
|
38
|
+
"enterDescription": "Por favor ingrese una descripción",
|
|
39
|
+
"failedToGenerate": "Error al generar el árbol",
|
|
40
|
+
"generate": "Generar",
|
|
41
|
+
"generating": "Generando...",
|
|
42
|
+
"keyboardShortcut": "Presione {cmdEnter} o {ctrlEnter} para generar",
|
|
43
|
+
"missingApiKey": "Falta configuración de IA",
|
|
44
|
+
"missingApiKeyDesc": "Por favor configure su clave API de IA en TreegeEditorProvider",
|
|
45
|
+
"successDescription": "{nodes} nodos y {edges} aristas creados",
|
|
46
|
+
"successTitle": "¡Árbol generado exitosamente!",
|
|
47
|
+
"title": "Generar flujo con IA",
|
|
48
|
+
"titleDescription": "Describa el formulario o árbol de decisión que desea crear, y la IA lo generará por usted.",
|
|
49
|
+
"unknownError": "Error desconocido"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "Personalizado: {value}",
|
|
33
53
|
"search": "Buscar patrones...",
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "Ajouter un
|
|
14
|
+
"addNode": "Ajouter un élément",
|
|
15
15
|
"clear": "Supprimer",
|
|
16
16
|
"clearSuccess": "Flux vidé !",
|
|
17
17
|
"clearSuccessDesc": "Tous les nœuds et arêtes ont été supprimés.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "Erreur d'analyse du fichier JSON.",
|
|
29
29
|
"parseErrorDesc": "Essayez de corriger le fichier et de l'importer à nouveau."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "IA non configurée",
|
|
33
|
+
"aiNotConfiguredDesc": "Ajoutez la prop {code} à TreegeEditorProvider",
|
|
34
|
+
"buttonLabel": "Générer avec l'IA",
|
|
35
|
+
"cancel": "Annuler",
|
|
36
|
+
"description": "Description",
|
|
37
|
+
"descriptionPlaceholder": "Exemple : Créer un formulaire de contact avec nom, email, téléphone et message",
|
|
38
|
+
"enterDescription": "Veuillez entrer une description",
|
|
39
|
+
"failedToGenerate": "Échec de la génération de l'arbre",
|
|
40
|
+
"generate": "Générer",
|
|
41
|
+
"generating": "Génération...",
|
|
42
|
+
"keyboardShortcut": "Appuyez sur {cmdEnter} ou {ctrlEnter} pour générer",
|
|
43
|
+
"missingApiKey": "Configuration IA manquante",
|
|
44
|
+
"missingApiKeyDesc": "Veuillez configurer votre clé API IA dans TreegeEditorProvider",
|
|
45
|
+
"successDescription": "{nodes} nœuds et {edges} arêtes créés",
|
|
46
|
+
"successTitle": "Arbre généré avec succès !",
|
|
47
|
+
"title": "Générer un flux avec l'IA",
|
|
48
|
+
"titleDescription": "Décrivez le formulaire ou l'arbre de décision que vous souhaitez créer, et l'IA le générera pour vous.",
|
|
49
|
+
"unknownError": "Erreur inconnue"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "Personnalisé : {value}",
|
|
33
53
|
"search": "Rechercher des motifs...",
|
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
},
|
|
12
12
|
"editor": {
|
|
13
13
|
"actionsPanel": {
|
|
14
|
-
"addNode": "Aggiungi
|
|
14
|
+
"addNode": "Aggiungi elemento",
|
|
15
15
|
"clear": "Pulisci",
|
|
16
16
|
"clearSuccess": "Flusso pulito!",
|
|
17
17
|
"clearSuccessDesc": "Tutti i nodi e gli archi sono stati rimossi.",
|
|
@@ -28,6 +28,26 @@ declare const _default: {
|
|
|
28
28
|
"parseError": "Errore nell'analisi del file JSON.",
|
|
29
29
|
"parseErrorDesc": "Prova a correggere il file e importarlo di nuovo."
|
|
30
30
|
},
|
|
31
|
+
"aiGenerator": {
|
|
32
|
+
"aiNotConfigured": "IA non configurata",
|
|
33
|
+
"aiNotConfiguredDesc": "Aggiungi la prop {code} a TreegeEditorProvider",
|
|
34
|
+
"buttonLabel": "Genera con IA",
|
|
35
|
+
"cancel": "Annulla",
|
|
36
|
+
"description": "Descrizione",
|
|
37
|
+
"descriptionPlaceholder": "Esempio: Crea un modulo di contatto con nome, email, telefono e messaggio",
|
|
38
|
+
"enterDescription": "Inserisci una descrizione",
|
|
39
|
+
"failedToGenerate": "Errore nella generazione dell'albero",
|
|
40
|
+
"generate": "Genera",
|
|
41
|
+
"generating": "Generazione...",
|
|
42
|
+
"keyboardShortcut": "Premi {cmdEnter} o {ctrlEnter} per generare",
|
|
43
|
+
"missingApiKey": "Configurazione IA mancante",
|
|
44
|
+
"missingApiKeyDesc": "Configura la tua chiave API IA in TreegeEditorProvider",
|
|
45
|
+
"successDescription": "{nodes} nodi e {edges} archi creati",
|
|
46
|
+
"successTitle": "Albero generato con successo!",
|
|
47
|
+
"title": "Genera flusso con IA",
|
|
48
|
+
"titleDescription": "Descrivi il modulo o l'albero decisionale che vuoi creare, e l'IA lo genererà per te.",
|
|
49
|
+
"unknownError": "Errore sconosciuto"
|
|
50
|
+
},
|
|
31
51
|
"comboboxPattern": {
|
|
32
52
|
"custom": "Personalizzato: {value}",
|
|
33
53
|
"search": "Cerca schemi...",
|