treege 3.0.0-beta.6 → 3.0.0-beta.60
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/LICENSE +18 -12
- package/README.md +425 -81
- package/dist/DefaultInputs-nRQc9BHG.js +1881 -0
- package/dist/ThemeContext-Ddk_Y-Dz.js +1402 -0
- package/dist/editor/components/input/ComboboxWithCreate.d.ts +2 -1
- package/dist/editor/components/styles/EditorStyles.d.ts +2 -0
- package/dist/editor/constants/defaultNode.d.ts +1 -1
- package/dist/editor/constants/edgeTypes.d.ts +3 -2
- package/dist/editor/constants/inputTypeIcons.d.ts +3 -0
- package/dist/editor/constants/nodeSpacing.d.ts +25 -0
- package/dist/editor/constants/nodeTypes.d.ts +4 -5
- package/dist/editor/context/OpenApiContext.d.ts +79 -0
- package/dist/editor/context/TreegeEditorRuntimeProvider.d.ts +78 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/controls/MiniMapControl.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +20 -0
- package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/dialogs/DeleteNodeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +19 -0
- package/dist/editor/features/TreegeEditor/dialogs/OpenApiDialog.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/edges/ConditionalEdge.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +3 -0
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +34 -0
- package/dist/editor/features/TreegeEditor/forms/OptionsSourceForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +13 -0
- package/dist/editor/features/TreegeEditor/forms/SubmitConfigForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +20 -0
- package/dist/editor/features/TreegeEditor/inputs/ComboboxPattern.d.ts +2 -1
- package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/inputs/SelectNodeGroup.d.ts +22 -1
- package/dist/editor/features/TreegeEditor/layout/AutoLayout.d.ts +15 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +25 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeGroupBadge.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImage.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImageButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +10 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeMoreMenu.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeRequiredButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeStackOrderButtons.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypePickerMenuContent.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/layout/NodeWrapper.d.ts +4 -2
- package/dist/editor/features/TreegeEditor/panel/AIGeneratorDialog.d.ts +16 -0
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +7 -2
- package/dist/editor/features/TreegeEditor/panel/MultiSelectionPanel.d.ts +7 -0
- package/dist/editor/hooks/useAvailableParentFields.d.ts +13 -0
- package/dist/editor/hooks/useFlowActions.d.ts +6 -2
- package/dist/editor/hooks/useFlowConnections.d.ts +14 -0
- package/dist/editor/hooks/useHistoryStore.d.ts +26 -0
- package/dist/editor/hooks/useIsStackedEdge.d.ts +8 -0
- package/dist/editor/hooks/useNodesSelection.d.ts +5 -5
- package/dist/editor/hooks/useStackPosition.d.ts +14 -0
- package/dist/editor/hooks/useTranslate.d.ts +1 -1
- package/dist/editor/hooks/useUndoRedo.d.ts +31 -0
- package/dist/editor/types/ai.d.ts +65 -0
- package/dist/editor/types/editor.d.ts +103 -10
- package/dist/editor/types/openapi.d.ts +81 -0
- package/dist/editor/utils/aiFlowGenerator.d.ts +5 -0
- package/dist/editor/utils/cleanNodeConfig.d.ts +5 -0
- package/dist/editor/utils/dagreLayout.d.ts +8 -0
- package/dist/editor/utils/edge.d.ts +50 -0
- package/dist/editor/utils/groupColor.d.ts +14 -0
- package/dist/editor/utils/image.d.ts +7 -0
- package/dist/editor/utils/inputTypeIcon.d.ts +6 -0
- package/dist/editor/utils/openapi.d.ts +35 -0
- package/dist/editor/utils/sensitiveHeaders.d.ts +15 -0
- package/dist/editor/utils/stackPositionIndex.d.ts +9 -0
- package/dist/editor-D2pBjE7E.js +6251 -0
- package/dist/editor.js +3 -7
- package/dist/main.js +4 -52
- package/dist/renderer/context/TreegeRenderRuntimeProvider.d.ts +135 -0
- package/dist/renderer/context/TreegeRendererProvider.d.ts +15 -0
- package/dist/renderer/features/TreegeRenderer/InputRendererHost.d.ts +15 -0
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +21 -15
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultLoadingSkeleton.d.ts +8 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DependencyHint.d.ts +15 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +94 -24
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultLoadingSkeleton.d.ts +7 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DependencyHint.d.ts +22 -0
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAddressInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultAutocompleteInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultCheckboxInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultDateRangeInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultFileInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHiddenInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultHttpInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultNumberInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultPasswordInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultRadioInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSelectInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSubmitInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultSwitchInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextAreaInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTextInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/inputs/DefaultTimeRangeInput.d.ts +2 -2
- package/dist/renderer/features/TreegeRenderer/web/components/styles/RendererStyles.d.ts +2 -0
- package/dist/renderer/hooks/useInputOptions.d.ts +28 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +58 -0
- package/dist/renderer/hooks/useSubmitHandler.d.ts +36 -0
- package/dist/renderer/hooks/useTranslate.d.ts +7 -5
- package/dist/renderer/index.d.ts +4 -2
- package/dist/renderer/index.native.d.ts +19 -0
- package/dist/renderer/types/renderer.d.ts +208 -41
- package/dist/renderer/utils/flow.d.ts +1 -18
- package/dist/renderer/utils/form.d.ts +22 -2
- package/dist/renderer/utils/http.d.ts +152 -0
- package/dist/renderer/utils/node.d.ts +29 -1
- package/dist/renderer/utils/sanitize.d.ts +85 -0
- package/dist/renderer/utils/sanitize.native.d.ts +69 -0
- package/dist/renderer/utils/step.d.ts +27 -0
- package/dist/renderer/utils/submit.d.ts +49 -0
- package/dist/renderer/utils/templateDependencies.d.ts +17 -0
- package/dist/renderer-native.d.ts +2 -0
- package/dist/renderer-native.js +3702 -0
- package/dist/renderer.js +3 -45
- package/dist/shared/components/ui/badge.d.ts +2 -2
- package/dist/shared/components/ui/button.d.ts +3 -3
- package/dist/shared/components/ui/collapsible.d.ts +1 -1
- package/dist/shared/components/ui/command.d.ts +1 -1
- package/dist/shared/components/ui/dropdown-menu.d.ts +1 -1
- package/dist/shared/components/ui/field.d.ts +24 -0
- package/dist/shared/components/ui/form.d.ts +1 -1
- package/dist/shared/components/ui/popover.d.ts +4 -2
- package/dist/shared/components/ui/select.d.ts +3 -1
- package/dist/shared/components/ui/sheet.d.ts +1 -1
- package/dist/shared/components/ui/skeleton.d.ts +3 -0
- package/dist/shared/components/ui/toggle-group.d.ts +7 -0
- package/dist/shared/components/ui/toggle.d.ts +9 -0
- package/dist/shared/components/ui/tooltip.d.ts +1 -1
- package/dist/shared/constants/colors.d.ts +45 -0
- package/dist/shared/constants/inputType.d.ts +6 -0
- package/dist/shared/constants/node.d.ts +0 -1
- package/dist/shared/context/ThemeContext.d.ts +2 -0
- package/dist/shared/context/ThemeContext.native.d.ts +22 -0
- package/dist/shared/hooks/useMediaQuery.d.ts +12 -0
- package/dist/shared/hooks/useThemeColors.d.ts +37 -0
- package/dist/shared/locales/ar.json.d.ts +243 -19
- package/dist/shared/locales/de.json.d.ts +244 -20
- package/dist/shared/locales/en.json.d.ts +245 -21
- package/dist/shared/locales/es.json.d.ts +244 -20
- package/dist/shared/locales/fr.json.d.ts +244 -20
- package/dist/shared/locales/it.json.d.ts +244 -20
- package/dist/shared/locales/pt.json.d.ts +244 -20
- package/dist/shared/types/edge.d.ts +6 -0
- package/dist/shared/types/node.d.ts +129 -7
- package/dist/shared/utils/inputTypeGuards.d.ts +7 -0
- package/dist/shared/utils/nodeTypeGuards.d.ts +1 -6
- package/package.json +48 -22
- package/dist/ThemeContext-BIvs8Kw-.js +0 -758
- package/dist/TreegeEditor-Lv5Tn9_F.js +0 -2152
- package/dist/TreegeRenderer-D3EvsEfJ.js +0 -1413
- package/dist/editor/context/TreegeEditorContext.d.ts +0 -12
- package/dist/editor/features/TreegeEditor/forms/FlowNodeForm.d.ts +0 -2
- package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
- package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
- package/dist/editor/hooks/useEdgesSelection.d.ts +0 -11
- package/dist/renderer/context/TreegeConfigContext.d.ts +0 -39
- package/dist/renderer/context/TreegeRendererContext.d.ts +0 -25
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +0 -7
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultGroup.d.ts +0 -6
- /package/dist/editor/components/{data-display/logo.d.ts → branding/Logo.d.ts} +0 -0
|
@@ -4,29 +4,82 @@ declare const _default: {
|
|
|
4
4
|
"clear": "Limpar",
|
|
5
5
|
"close": "Fechar",
|
|
6
6
|
"create": "Criar",
|
|
7
|
+
"delete": "Excluir",
|
|
8
|
+
"other": "Outro",
|
|
7
9
|
"retry": "Tentar novamente",
|
|
8
10
|
"save": "Salvar",
|
|
11
|
+
"settings": "Configurações",
|
|
9
12
|
"submit": "Enviar",
|
|
10
13
|
"toggle": "Alternar"
|
|
11
14
|
},
|
|
12
15
|
"editor": {
|
|
13
16
|
"actionsPanel": {
|
|
14
|
-
"addNode": "Adicionar
|
|
17
|
+
"addNode": "Adicionar elemento",
|
|
18
|
+
"authorize": "Authorize",
|
|
15
19
|
"clear": "Limpar",
|
|
16
20
|
"clearSuccess": "Fluxo limpo!",
|
|
17
21
|
"clearSuccessDesc": "Todos os nós e arestas foram removidos.",
|
|
18
|
-
"copyFailed": "Falha ao copiar o ID do fluxo",
|
|
19
22
|
"downloadSuccess": "Download bem-sucedido.",
|
|
20
23
|
"downloadSuccessDesc": "O fluxo foi exportado com sucesso.",
|
|
21
24
|
"exportJson": "Exportar JSON",
|
|
22
|
-
"
|
|
25
|
+
"globalHeaders": "Global headers",
|
|
23
26
|
"importJson": "Importar JSON",
|
|
24
27
|
"importSuccess": "Importação bem-sucedida!",
|
|
25
28
|
"importSuccessDesc": "O fluxo foi importado com sucesso.",
|
|
26
29
|
"invalidJson": "Arquivo JSON inválido.",
|
|
27
30
|
"invalidJsonDesc": "O arquivo deve conter arrays de nós e arestas.",
|
|
31
|
+
"language": "Idioma",
|
|
32
|
+
"openApi": "OpenAPI",
|
|
28
33
|
"parseError": "Erro ao analisar o arquivo JSON.",
|
|
29
|
-
"parseErrorDesc": "Tente corrigir o arquivo e importá-lo novamente."
|
|
34
|
+
"parseErrorDesc": "Tente corrigir o arquivo e importá-lo novamente.",
|
|
35
|
+
"sensitiveHeadersStripped": "Cabeçalhos sensíveis removidos",
|
|
36
|
+
"sensitiveHeadersStrippedDesc": "Os cabeçalhos de credenciais foram removidos para evitar o vazamento de segredos."
|
|
37
|
+
},
|
|
38
|
+
"aiGenerator": {
|
|
39
|
+
"aiNotConfigured": "IA não configurada",
|
|
40
|
+
"aiNotConfiguredDesc": "Adicione a prop {code} ao TreegeEditor",
|
|
41
|
+
"buttonLabel": "Gerar com IA",
|
|
42
|
+
"cancel": "Cancelar",
|
|
43
|
+
"description": "Descrição",
|
|
44
|
+
"descriptionPlaceholder": "Exemplo: Criar um formulário de contato com nome, email, telefone e mensagem",
|
|
45
|
+
"enterDescription": "Por favor insira uma descrição",
|
|
46
|
+
"failedToGenerate": "Falha ao gerar árvore",
|
|
47
|
+
"generate": "Gerar",
|
|
48
|
+
"generating": "Gerando...",
|
|
49
|
+
"keyboardShortcut": "Pressione {cmdEnter} ou {ctrlEnter} para gerar",
|
|
50
|
+
"missingApiKey": "Configuração de IA ausente",
|
|
51
|
+
"missingApiKeyDesc": "Por favor configure sua chave API de IA no TreegeEditor",
|
|
52
|
+
"successDescription": "{nodes} nós e {edges} arestas criados",
|
|
53
|
+
"successTitle": "Árvore gerada com sucesso!",
|
|
54
|
+
"title": "Gerar fluxo com IA",
|
|
55
|
+
"titleDescription": "Descreva o formulário ou árvore de decisão que deseja criar, e a IA irá gerá-lo para você.",
|
|
56
|
+
"unknownError": "Erro desconhecido"
|
|
57
|
+
},
|
|
58
|
+
"apiUrlCombobox": {
|
|
59
|
+
"applyBaseUrl": "Adicionar a URL base",
|
|
60
|
+
"browseRoutes": "Browse OpenAPI routes",
|
|
61
|
+
"noRoutes": "No matching route",
|
|
62
|
+
"searchRoutes": "Search by method, path, or summary",
|
|
63
|
+
"useRelativePath": "Usar um caminho relativo"
|
|
64
|
+
},
|
|
65
|
+
"authorizeDialog": {
|
|
66
|
+
"apiKeyLabel": "API key",
|
|
67
|
+
"apply": "Apply",
|
|
68
|
+
"bearerLabel": "Bearer token",
|
|
69
|
+
"clear": "Clear",
|
|
70
|
+
"description": "Authenticate against the API to forward credentials to every request issued by the form.",
|
|
71
|
+
"exchangeFailed": "Failed to fetch access token",
|
|
72
|
+
"noSchemes": "No supported security schemes are declared in this OpenAPI document.",
|
|
73
|
+
"oauth2PasswordLabel": "OAuth2 password",
|
|
74
|
+
"passwordPlaceholder": "Password",
|
|
75
|
+
"title": "Authorize",
|
|
76
|
+
"usernamePlaceholder": "Username"
|
|
77
|
+
},
|
|
78
|
+
"changeNodeTypeDialog": {
|
|
79
|
+
"description": "Este nó possui várias ramificações de saída. O novo tipo suporta apenas uma. Escolha qual ramificação manter; as outras serão removidas.",
|
|
80
|
+
"keepBranch": "Manter esta ramificação",
|
|
81
|
+
"noConditions": "Sem condições",
|
|
82
|
+
"title": "Alterar tipo de nó"
|
|
30
83
|
},
|
|
31
84
|
"comboboxPattern": {
|
|
32
85
|
"custom": "Personalizado: {value}",
|
|
@@ -40,12 +93,16 @@ declare const _default: {
|
|
|
40
93
|
},
|
|
41
94
|
"conditionalEdge": {
|
|
42
95
|
"addCondition": "Adicionar condição",
|
|
96
|
+
"advanced": "Avançado",
|
|
43
97
|
"and": "E",
|
|
98
|
+
"basic": "Básico",
|
|
99
|
+
"basicConditionLabel": "Se \"{name}\" for igual a",
|
|
44
100
|
"condition": "Condição",
|
|
45
101
|
"conditions": "Condições",
|
|
46
102
|
"conditionsAnd": "condições (E)",
|
|
47
103
|
"conditionsMixed": "condições (mistas)",
|
|
48
104
|
"conditionsOr": "condições (OU)",
|
|
105
|
+
"defineCondition": "Definir uma condição",
|
|
49
106
|
"displayConditions": "Exibir condições",
|
|
50
107
|
"displayConditionsDesc": "Este campo será exibido se as seguintes condições forem atendidas.",
|
|
51
108
|
"fallback": "Padrão",
|
|
@@ -60,19 +117,25 @@ declare const _default: {
|
|
|
60
117
|
"or": "OU",
|
|
61
118
|
"removeCondition": "Remover condição",
|
|
62
119
|
"selectField": "Selecione um campo",
|
|
120
|
+
"selectValue": "Selecione um valor",
|
|
63
121
|
"value": "Valor",
|
|
64
122
|
"valuePlaceholder": "Ex: 18"
|
|
65
123
|
},
|
|
66
|
-
"flowNodeForm": {
|
|
67
|
-
"label": "Rótulo",
|
|
68
|
-
"targetId": "ID de destino",
|
|
69
|
-
"targetIdDesc": "Identificador único do fluxo de destino."
|
|
70
|
-
},
|
|
71
124
|
"groupNodeForm": {
|
|
72
125
|
"label": "Rótulo"
|
|
73
126
|
},
|
|
127
|
+
"headersDialog": {
|
|
128
|
+
"addHeader": "Add header",
|
|
129
|
+
"description": "These headers are forwarded to every HTTP request issued by the form (HTTP inputs, submit, options sources). Field-level headers with the same key override these.",
|
|
130
|
+
"empty": "No headers yet.",
|
|
131
|
+
"keyPlaceholder": "Authorization",
|
|
132
|
+
"removeHeader": "Remove header",
|
|
133
|
+
"title": "Global headers",
|
|
134
|
+
"valuePlaceholder": "Bearer ..."
|
|
135
|
+
},
|
|
74
136
|
"httpConfigForm": {
|
|
75
137
|
"addHeader": "Adicionar cabeçalho",
|
|
138
|
+
"addQueryParam": "Adicionar parâmetro",
|
|
76
139
|
"apiUrl": "URL da API",
|
|
77
140
|
"apiUrlDesc": "Use variáveis de modelo como {{fieldId}} para referenciar outros campos",
|
|
78
141
|
"apiUrlPlaceholder": "https://api.exemplo.com/data",
|
|
@@ -93,9 +156,12 @@ declare const _default: {
|
|
|
93
156
|
"methodPost": "POST",
|
|
94
157
|
"methodPut": "PUT",
|
|
95
158
|
"noFieldsAvailable": "Nenhum campo disponível",
|
|
159
|
+
"queryParamName": "Nome do parâmetro",
|
|
160
|
+
"queryParams": "Parâmetros de consulta",
|
|
161
|
+
"queryParamValue": "Valor do parâmetro",
|
|
96
162
|
"requestBody": "Corpo da requisição (JSON)",
|
|
97
|
-
"requestBodyDesc": "Use
|
|
98
|
-
"requestBodyPlaceholder": "{\"
|
|
163
|
+
"requestBodyDesc": "Use {{fieldId}} para referenciar outros campos. Certifique-se de que a formatação JSON está correta, incluindo aspas ao redor de valores de string.",
|
|
164
|
+
"requestBodyPlaceholder": "{\"nome\": \"{{nomeUsuario}}\", \"idade\": {{idadeUsuario}}}",
|
|
99
165
|
"responseConfiguration": "Configuração da resposta",
|
|
100
166
|
"responsePath": "Caminho da resposta",
|
|
101
167
|
"responsePathDesc": "Extrair dados da resposta usando notação de ponto ou indexação de array",
|
|
@@ -104,6 +170,8 @@ declare const _default: {
|
|
|
104
170
|
"searchParameterDesc": "Se definido, habilita uma caixa de pesquisa que adiciona este parâmetro às chamadas de API (ex: ?q=Paris)",
|
|
105
171
|
"searchParameterPlaceholder": "q, pesquisa, consulta...",
|
|
106
172
|
"selectMethod": "Selecionar método",
|
|
173
|
+
"sendAllFormValues": "Enviar todos os dados do formulário",
|
|
174
|
+
"sendAllFormValuesDesc": "Enviar automaticamente todos os valores do formulário como corpo JSON",
|
|
107
175
|
"showLoadingState": "Mostrar estado de carregamento",
|
|
108
176
|
"valueField": "Campo de valor",
|
|
109
177
|
"valueFieldDesc": "Campo a ser usado como valor da opção (ex: id)",
|
|
@@ -112,7 +180,7 @@ declare const _default: {
|
|
|
112
180
|
"inputNodeForm": {
|
|
113
181
|
"addInputFieldsBeforeReference": "Adicione campos de entrada antes deste nó para referenciá-los",
|
|
114
182
|
"addMapping": "Adicionar mapeamento",
|
|
115
|
-
"addOption": "
|
|
183
|
+
"addOption": "Adicionar opção",
|
|
116
184
|
"advancedConfiguration": "Configuração avançada",
|
|
117
185
|
"defaultChecked": "Marcado por padrão",
|
|
118
186
|
"defaultValuesCommaSeparated": "Valores padrão (separados por vírgulas)",
|
|
@@ -121,6 +189,9 @@ declare const _default: {
|
|
|
121
189
|
"defaultValueTypeNone": "Nenhum",
|
|
122
190
|
"defaultValueTypeReference": "Campo de referência",
|
|
123
191
|
"defaultValueTypeStatic": "Valor estático",
|
|
192
|
+
"deleteOption": "Excluir opção",
|
|
193
|
+
"disablePast": "Desativar datas passadas",
|
|
194
|
+
"editOption": "Editar opção",
|
|
124
195
|
"errorMessage": "Mensagem de erro",
|
|
125
196
|
"helperText": "Texto de ajuda",
|
|
126
197
|
"httpConfiguration": "Configuração HTTP",
|
|
@@ -128,9 +199,20 @@ declare const _default: {
|
|
|
128
199
|
"multipleFiles": "Arquivos múltiplos",
|
|
129
200
|
"multipleSelection": "Seleção múltipla",
|
|
130
201
|
"name": "Nome",
|
|
202
|
+
"nameDescription": "Nome de campo personalizado opcional para exportação de formulário. Se vazio, o rótulo será usado como chave.",
|
|
131
203
|
"noParentFieldsAvailable": "Nenhum campo pai disponível",
|
|
132
204
|
"objectMapping": "Mapeamento de objeto",
|
|
133
205
|
"objectMappingDesc": "Mapear as propriedades do objeto de origem para uma nova estrutura",
|
|
206
|
+
"optional": "Opcional",
|
|
207
|
+
"optionDescription": "Descrição",
|
|
208
|
+
"optionImageAdd": "Adicionar imagem",
|
|
209
|
+
"optionImageError": "Não foi possível processar a imagem.",
|
|
210
|
+
"optionImageInvalid": "Formato de imagem não suportado.",
|
|
211
|
+
"optionImageRemove": "Remover imagem",
|
|
212
|
+
"optionImageReplace": "Substituir imagem",
|
|
213
|
+
"optionImageTooLarge": "Imagem muito grande (máx. 5 MB).",
|
|
214
|
+
"optionImageUpload": "Enviar arquivo",
|
|
215
|
+
"optionImageUrlPlaceholder": "https://...",
|
|
134
216
|
"optionLabel": "Rótulo",
|
|
135
217
|
"options": "Opções",
|
|
136
218
|
"optionValue": "Valor",
|
|
@@ -144,6 +226,7 @@ declare const _default: {
|
|
|
144
226
|
"sourceKey": "Chave de origem",
|
|
145
227
|
"staticValue": "Valor estático",
|
|
146
228
|
"staticValuePlaceholder": "Digite o valor padrão",
|
|
229
|
+
"submitConfiguration": "Configuração de envio",
|
|
147
230
|
"targetKey": "Chave de destino",
|
|
148
231
|
"transformArray": "Converter para array",
|
|
149
232
|
"transformBoolean": "Converter para booleano",
|
|
@@ -153,7 +236,65 @@ declare const _default: {
|
|
|
153
236
|
"transformNumber": "Converter para número",
|
|
154
237
|
"transformString": "Converter para string",
|
|
155
238
|
"transformType": "Tipo de transformação",
|
|
156
|
-
"validation": "Validação"
|
|
239
|
+
"validation": "Validação",
|
|
240
|
+
"variant": "Variante",
|
|
241
|
+
"variantCard": "Cartão",
|
|
242
|
+
"variantDefault": "Padrão"
|
|
243
|
+
},
|
|
244
|
+
"multiSelectionPanel": {
|
|
245
|
+
"clearSelection": "Limpar seleção",
|
|
246
|
+
"deleteSelected": "Excluir nós selecionados",
|
|
247
|
+
"nodesSelected": "nós selecionados"
|
|
248
|
+
},
|
|
249
|
+
"nodeActionsSheet": {
|
|
250
|
+
"deleteNode": "Excluir nó",
|
|
251
|
+
"deleteNodeConfirm": "Tem certeza de que deseja excluir este nó?",
|
|
252
|
+
"deleteNodeSuccess": "Nó excluído com sucesso",
|
|
253
|
+
"editNode": "Editar nó"
|
|
254
|
+
},
|
|
255
|
+
"openApiDialog": {
|
|
256
|
+
"baseUrlHint": "Optional. Overrides the document's first server URL — useful when the spec points at a different environment.",
|
|
257
|
+
"baseUrlLabel": "Base URL override",
|
|
258
|
+
"clear": "Clear",
|
|
259
|
+
"cleared": "OpenAPI cleared.",
|
|
260
|
+
"description": "Provide an OpenAPI 3.x document to power URL suggestions and Authorize.",
|
|
261
|
+
"emptyInput": "Please provide a URL or paste a JSON document.",
|
|
262
|
+
"jsonLabel": "Paste your OpenAPI JSON",
|
|
263
|
+
"load": "Load",
|
|
264
|
+
"loadFailed": "Failed to load OpenAPI document",
|
|
265
|
+
"loadSuccess": "OpenAPI loaded.",
|
|
266
|
+
"modeJson": "Paste JSON",
|
|
267
|
+
"modeUrl": "From URL",
|
|
268
|
+
"title": "OpenAPI source",
|
|
269
|
+
"urlLabel": "OpenAPI document URL"
|
|
270
|
+
},
|
|
271
|
+
"optionsSourceForm": {
|
|
272
|
+
"descriptionField": "Description",
|
|
273
|
+
"descriptionFieldPlaceholder": "Path to description (optional)",
|
|
274
|
+
"detect": "Detect fields",
|
|
275
|
+
"detectDynamicHint": "A requisição ainda contém variáveis não resolvidas. Substitua-as por um valor de exemplo estático para detectar e depois restaure-as.",
|
|
276
|
+
"detectFailed": "Failed to fetch the API.",
|
|
277
|
+
"detectSuccess": "Fields detected.",
|
|
278
|
+
"disable": "Use static options",
|
|
279
|
+
"dynamicHint": "Options are fetched from this API at runtime.",
|
|
280
|
+
"dynamicVarsWarning": "Esta requisição usa variáveis dinâmicas ({vars}) que não têm valor no editor. «Detectar campos» chama a API como está, portanto pode falhar. Substitua-as temporariamente por um valor de exemplo estático para detectar a resposta e depois restaure as variáveis.",
|
|
281
|
+
"enable": "Fetch from API",
|
|
282
|
+
"imageField": "Image",
|
|
283
|
+
"imageFieldPlaceholder": "Path to image URL (optional)",
|
|
284
|
+
"labelField": "Label",
|
|
285
|
+
"labelFieldPlaceholder": "Path to label (e.g., name)",
|
|
286
|
+
"noFieldsDetected": "No fields detected — check the URL or response path.",
|
|
287
|
+
"none": "— None —",
|
|
288
|
+
"previewCount": "{count} options detected",
|
|
289
|
+
"responsePath": "Response path",
|
|
290
|
+
"responsePathHint": "Optional. Use a path like \"data.users\" if the array is nested.",
|
|
291
|
+
"responsePathPlaceholder": "e.g., data.users",
|
|
292
|
+
"staticOptions": "Static options",
|
|
293
|
+
"staticOptionsHint": "Options are defined manually in the editor.",
|
|
294
|
+
"title": "Options source",
|
|
295
|
+
"urlRequired": "URL is required.",
|
|
296
|
+
"valueField": "Value",
|
|
297
|
+
"valueFieldPlaceholder": "Path to value (e.g., id)"
|
|
157
298
|
},
|
|
158
299
|
"selectInputType": {
|
|
159
300
|
"type": "Tipo"
|
|
@@ -167,12 +308,72 @@ declare const _default: {
|
|
|
167
308
|
"groupCreatedDesc": "O grupo \"{groupName}\" foi criado com sucesso.",
|
|
168
309
|
"groupName": "Nome do grupo",
|
|
169
310
|
"groupNamePlaceholder": "Ex: Passo 1 - Informações pessoais",
|
|
311
|
+
"mixed": "Grupos mistos",
|
|
170
312
|
"newGroup": "Novo grupo",
|
|
171
313
|
"newGroupDescription": "O grupo será criado em torno do nó selecionado.",
|
|
172
|
-
"noGroup": "Sem grupo"
|
|
314
|
+
"noGroup": "Sem grupo",
|
|
315
|
+
"renameGroup": "Renomear grupo"
|
|
173
316
|
},
|
|
174
317
|
"selectNodeType": {
|
|
175
|
-
"nodeType": "Tipo de nó"
|
|
318
|
+
"nodeType": "Tipo de nó",
|
|
319
|
+
"options": {
|
|
320
|
+
"group": "Grupo",
|
|
321
|
+
"input": "Pergunta",
|
|
322
|
+
"ui": "Elemento de design"
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"sensitiveHeaderWarning": {
|
|
326
|
+
"message": "Evite armazenar credenciais (Authorization, chaves de API) nos cabeçalhos do campo: elas são salvas na árvore exportada. Use cabeçalhos globais (Autorizar) para autenticação."
|
|
327
|
+
},
|
|
328
|
+
"stackedEdge": {
|
|
329
|
+
"addNode": "Adicionar um elemento",
|
|
330
|
+
"createBranch": "Criar uma ramificação",
|
|
331
|
+
"insertNode": "Inserir um elemento aqui"
|
|
332
|
+
},
|
|
333
|
+
"stackOrder": {
|
|
334
|
+
"moveDown": "Mover para baixo",
|
|
335
|
+
"moveUp": "Mover para cima"
|
|
336
|
+
},
|
|
337
|
+
"submitConfigForm": {
|
|
338
|
+
"addHeader": "Adicionar cabeçalho",
|
|
339
|
+
"addQueryParam": "Adicionar parâmetro",
|
|
340
|
+
"apiUrl": "URL da API",
|
|
341
|
+
"apiUrlDesc": "Use {{fieldId}} para referenciar outros campos",
|
|
342
|
+
"apiUrlPlaceholder": "https://api.exemplo.com/submit",
|
|
343
|
+
"behavior": "Comportamento",
|
|
344
|
+
"errorMessage": "Mensagem de erro",
|
|
345
|
+
"errorMessageDesc": "Mensagem exibida quando o envio falha",
|
|
346
|
+
"errorMessagePlaceholder": "Ocorreu um erro. Por favor, tente novamente.",
|
|
347
|
+
"headerName": "Nome do cabeçalho",
|
|
348
|
+
"headers": "Cabeçalhos",
|
|
349
|
+
"headerValue": "Valor do cabeçalho",
|
|
350
|
+
"httpMethod": "Método HTTP",
|
|
351
|
+
"insertVariable": "Inserir variável",
|
|
352
|
+
"methodDelete": "DELETE",
|
|
353
|
+
"methodPatch": "PATCH",
|
|
354
|
+
"methodPost": "POST",
|
|
355
|
+
"methodPut": "PUT",
|
|
356
|
+
"noFieldsAvailable": "Nenhum campo disponível",
|
|
357
|
+
"postSubmission": "Após o envio",
|
|
358
|
+
"queryParamName": "Nome do parâmetro",
|
|
359
|
+
"queryParams": "Parâmetros de consulta",
|
|
360
|
+
"queryParamValue": "Valor do parâmetro",
|
|
361
|
+
"redirectUrl": "URL de redirecionamento",
|
|
362
|
+
"redirectUrlDesc": "URL para redirecionar após envio bem-sucedido",
|
|
363
|
+
"redirectUrlPlaceholder": "/success ou https://exemplo.com/obrigado",
|
|
364
|
+
"requestBody": "Corpo da requisição (JSON)",
|
|
365
|
+
"requestBodyDesc": "Use {{fieldId}} para referenciar outros campos. Certifique-se de que a formatação JSON está correta, incluindo aspas ao redor de valores de string.",
|
|
366
|
+
"requestBodyPlaceholder": "{\"nome\": \"{{nomeUsuario}}\", \"email\": \"{{emailUsuario}}\"}",
|
|
367
|
+
"selectMethod": "Selecionar método",
|
|
368
|
+
"sendAllFormValues": "Enviar todos os dados do formulário",
|
|
369
|
+
"sendAllFormValuesDesc": "Enviar automaticamente todos os valores do formulário como corpo JSON",
|
|
370
|
+
"showLoadingState": "Mostrar estado de carregamento",
|
|
371
|
+
"successMessage": "Mensagem de sucesso",
|
|
372
|
+
"successMessageDesc": "Mensagem exibida quando o envio é bem-sucedido",
|
|
373
|
+
"successMessagePlaceholder": "Formulário enviado com sucesso!"
|
|
374
|
+
},
|
|
375
|
+
"treegeNode": {
|
|
376
|
+
"labelPlaceholder": "Rótulo..."
|
|
176
377
|
},
|
|
177
378
|
"uiNodeForm": {
|
|
178
379
|
"label": "Rótulo",
|
|
@@ -184,39 +385,62 @@ declare const _default: {
|
|
|
184
385
|
"renderer": {
|
|
185
386
|
"defaultAddressInput": {
|
|
186
387
|
"enterAddress": "Digite um endereço...",
|
|
187
|
-
"noAddressesFound": "Nenhum endereço encontrado."
|
|
388
|
+
"noAddressesFound": "Nenhum endereço encontrado.",
|
|
389
|
+
"searching": "Pesquisando...",
|
|
390
|
+
"typeMinChars": "Digite pelo menos 3 caracteres para pesquisar"
|
|
188
391
|
},
|
|
189
392
|
"defaultAutocompleteInput": {
|
|
190
393
|
"noResults": "Nenhum resultado encontrado.",
|
|
191
394
|
"search": "Pesquisar...",
|
|
192
395
|
"selectOption": "Selecione uma opção"
|
|
193
396
|
},
|
|
397
|
+
"defaultCheckboxInput": {
|
|
398
|
+
"loadingOptions": "Carregando opções..."
|
|
399
|
+
},
|
|
194
400
|
"defaultHttpInput": {
|
|
195
|
-
"fetchFailed": "Falha ao buscar dados",
|
|
196
|
-
"httpError": "HTTP {status}: {statusText}",
|
|
401
|
+
"fetchFailed": "Falha ao buscar dados. Por favor, verifique sua conexão de rede.",
|
|
402
|
+
"httpError": "Erro HTTP {status}: {statusText}",
|
|
197
403
|
"noDataAvailable": "Nenhum dado disponível. Configure \"Buscar na montagem\" ou adicione um parâmetro de pesquisa.",
|
|
198
404
|
"noResults": "Nenhum resultado encontrado.",
|
|
199
|
-
"noUrlConfigured": "Nenhuma URL configurada",
|
|
405
|
+
"noUrlConfigured": "Nenhuma URL configurada. Por favor, adicione uma URL na configuração HTTP.",
|
|
200
406
|
"retry": "Tentar novamente",
|
|
201
407
|
"search": "Pesquisar...",
|
|
202
408
|
"searching": "Pesquisando...",
|
|
203
|
-
"selectOption": "Selecione uma opção"
|
|
409
|
+
"selectOption": "Selecione uma opção",
|
|
410
|
+
"waitingForRequiredFields": "Aguardando campos obrigatórios"
|
|
204
411
|
},
|
|
205
412
|
"defaultInputs": {
|
|
413
|
+
"addMoreFiles": "Adicionar mais arquivos",
|
|
206
414
|
"endDate": "Data de fim",
|
|
207
415
|
"endTime": "Hora de fim",
|
|
416
|
+
"filePickerError": "Falha ao selecionar arquivo",
|
|
417
|
+
"filePickerUnavailable": "Seleção de arquivo indisponível. Instale react-native-document-picker.",
|
|
418
|
+
"newAnswer": "Nova resposta...",
|
|
419
|
+
"replaceFile": "Substituir arquivo",
|
|
208
420
|
"required": "*",
|
|
209
421
|
"selectDate": "Selecionar data",
|
|
210
422
|
"selectDateRange": "Selecionar intervalo de datas",
|
|
423
|
+
"selectFile": "Selecionar arquivo",
|
|
424
|
+
"selectFiles": "Selecionar arquivos",
|
|
211
425
|
"startDate": "Data de início",
|
|
212
426
|
"startTime": "Hora de início"
|
|
213
427
|
},
|
|
428
|
+
"defaultRadioInput": {
|
|
429
|
+
"loadingOptions": "Carregando opções..."
|
|
430
|
+
},
|
|
214
431
|
"defaultSelectInput": {
|
|
215
432
|
"selectOption": "Selecione uma opção"
|
|
216
433
|
},
|
|
217
434
|
"defaultSubmitButton": {
|
|
218
435
|
"requiredFieldsMissing": "Campos obrigatórios ausentes",
|
|
219
436
|
"submit": "Enviar"
|
|
437
|
+
},
|
|
438
|
+
"dependencyHint": {
|
|
439
|
+
"title": "Preencha primeiro os seguintes campos:"
|
|
440
|
+
},
|
|
441
|
+
"step": {
|
|
442
|
+
"back": "Voltar",
|
|
443
|
+
"continue": "Continuar"
|
|
220
444
|
}
|
|
221
445
|
},
|
|
222
446
|
"validation": {
|
|
@@ -31,4 +31,10 @@ export type ConditionalEdgeData = {
|
|
|
31
31
|
* Fallback edges are followed when no other conditional edges match
|
|
32
32
|
*/
|
|
33
33
|
isFallback?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Set to `true` the first time the user commits a change through the
|
|
36
|
+
* condition editor. Used only by the editor for visual state — the
|
|
37
|
+
* renderer ignores it.
|
|
38
|
+
*/
|
|
39
|
+
configured?: boolean;
|
|
34
40
|
};
|
|
@@ -18,10 +18,19 @@ export type InputOption = {
|
|
|
18
18
|
* The label of the option, which can be translated
|
|
19
19
|
*/
|
|
20
20
|
label: Translatable;
|
|
21
|
+
/**
|
|
22
|
+
* Optional secondary description, shown under the label (translatable)
|
|
23
|
+
*/
|
|
24
|
+
description?: Translatable;
|
|
21
25
|
/**
|
|
22
26
|
* Whether the option is disabled and cannot be selected
|
|
23
27
|
*/
|
|
24
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional image for the option, stored as base64 data URL or remote URL.
|
|
31
|
+
* Currently displayed by radio inputs; uploads are automatically resized and compressed.
|
|
32
|
+
*/
|
|
33
|
+
image?: string;
|
|
25
34
|
};
|
|
26
35
|
export type BaseNodeData = {
|
|
27
36
|
/**
|
|
@@ -29,12 +38,6 @@ export type BaseNodeData = {
|
|
|
29
38
|
*/
|
|
30
39
|
label?: Translatable;
|
|
31
40
|
};
|
|
32
|
-
export type FlowNodeData = BaseNodeData & {
|
|
33
|
-
/**
|
|
34
|
-
* The ID of the target node to connect to
|
|
35
|
-
*/
|
|
36
|
-
targetId?: string;
|
|
37
|
-
};
|
|
38
41
|
export type GroupNodeData = BaseNodeData & {
|
|
39
42
|
/**
|
|
40
43
|
* A label for the group node, which can be translated
|
|
@@ -51,6 +54,16 @@ export type HttpHeader = {
|
|
|
51
54
|
*/
|
|
52
55
|
value: string;
|
|
53
56
|
};
|
|
57
|
+
export type QueryParam = {
|
|
58
|
+
/**
|
|
59
|
+
* The query parameter key (e.g., "limit", "page", "sort")
|
|
60
|
+
*/
|
|
61
|
+
key: string;
|
|
62
|
+
/**
|
|
63
|
+
* The query parameter value (supports template variables like {{fieldId}})
|
|
64
|
+
*/
|
|
65
|
+
value: string;
|
|
66
|
+
};
|
|
54
67
|
export type HttpConfig = {
|
|
55
68
|
/**
|
|
56
69
|
* The HTTP method to use
|
|
@@ -64,10 +77,18 @@ export type HttpConfig = {
|
|
|
64
77
|
* Custom headers for the HTTP request
|
|
65
78
|
*/
|
|
66
79
|
headers?: HttpHeader[];
|
|
80
|
+
/**
|
|
81
|
+
* Query parameters appended to the URL (supports template variables like {{fieldId}})
|
|
82
|
+
*/
|
|
83
|
+
queryParams?: QueryParam[];
|
|
67
84
|
/**
|
|
68
85
|
* Request body (for POST/PUT/PATCH methods)
|
|
69
86
|
*/
|
|
70
87
|
body?: string;
|
|
88
|
+
/**
|
|
89
|
+
* If true, automatically sends all form data as JSON body (overrides custom body)
|
|
90
|
+
*/
|
|
91
|
+
sendAllFormValues?: boolean;
|
|
71
92
|
/**
|
|
72
93
|
* JSONPath or key to extract from the response
|
|
73
94
|
* Examples: "data.users", "results[0].name"
|
|
@@ -100,6 +121,84 @@ export type HttpConfig = {
|
|
|
100
121
|
*/
|
|
101
122
|
showLoading?: boolean;
|
|
102
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Maps response item fields to InputOption properties.
|
|
126
|
+
* Each value is a path expression (e.g., "id", "user.name", "items[0].title").
|
|
127
|
+
*/
|
|
128
|
+
export type OptionsSourceMapping = {
|
|
129
|
+
/** Path to the field used as InputOption.value */
|
|
130
|
+
valueField: string;
|
|
131
|
+
/** Path to the field used as InputOption.label */
|
|
132
|
+
labelField: string;
|
|
133
|
+
/** Path to the field used as InputOption.description (optional) */
|
|
134
|
+
descriptionField?: string;
|
|
135
|
+
/** Path to the field used as InputOption.image (optional) */
|
|
136
|
+
imageField?: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Dynamic options source — fetches the option list from an HTTP endpoint
|
|
140
|
+
* at runtime. Applies to inputs that use options (radio, checkbox, select,
|
|
141
|
+
* autocomplete). When set, overrides the static `options` array.
|
|
142
|
+
*/
|
|
143
|
+
export type OptionsSource = {
|
|
144
|
+
/** API URL (supports template variables like {{fieldId}}) */
|
|
145
|
+
url?: string;
|
|
146
|
+
/** HTTP method */
|
|
147
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
148
|
+
/** Custom headers (merged with global headers; field-level wins) */
|
|
149
|
+
headers?: HttpHeader[];
|
|
150
|
+
/** Query parameters appended to the URL (supports template variables like {{fieldId}}) */
|
|
151
|
+
queryParams?: QueryParam[];
|
|
152
|
+
/** Request body (for POST/PUT/PATCH; supports template variables) */
|
|
153
|
+
body?: string;
|
|
154
|
+
/** JSONPath to extract the array from the response (e.g., "data.users") */
|
|
155
|
+
responsePath?: string;
|
|
156
|
+
/** Field-to-property mapping for each response item */
|
|
157
|
+
mapping?: OptionsSourceMapping;
|
|
158
|
+
};
|
|
159
|
+
export type SubmitConfig = {
|
|
160
|
+
/**
|
|
161
|
+
* The HTTP method to use for form submission
|
|
162
|
+
*/
|
|
163
|
+
method?: "POST" | "PUT" | "PATCH" | "DELETE";
|
|
164
|
+
/**
|
|
165
|
+
* The API URL to call on submit (supports template variables like {{fieldId}})
|
|
166
|
+
*/
|
|
167
|
+
url?: string;
|
|
168
|
+
/**
|
|
169
|
+
* Custom headers for the HTTP request
|
|
170
|
+
*/
|
|
171
|
+
headers?: HttpHeader[];
|
|
172
|
+
/**
|
|
173
|
+
* Query parameters appended to the URL (supports template variables like {{fieldId}})
|
|
174
|
+
*/
|
|
175
|
+
queryParams?: QueryParam[];
|
|
176
|
+
/**
|
|
177
|
+
* Request body (for POST/PUT/PATCH methods, supports template variables like {{fieldId}})
|
|
178
|
+
* Strings are automatically quoted, use: {"name": {{userName}}}
|
|
179
|
+
*/
|
|
180
|
+
body?: string;
|
|
181
|
+
/**
|
|
182
|
+
* If true, automatically sends all form data as JSON body (overrides custom body)
|
|
183
|
+
*/
|
|
184
|
+
sendAllFormValues?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* URL to redirect to after successful submission (supports template variables from response)
|
|
187
|
+
*/
|
|
188
|
+
redirectUrl?: string;
|
|
189
|
+
/**
|
|
190
|
+
* Success message to display after successful submission (translatable)
|
|
191
|
+
*/
|
|
192
|
+
successMessage?: Translatable;
|
|
193
|
+
/**
|
|
194
|
+
* Error message to display if submission fails (translatable)
|
|
195
|
+
*/
|
|
196
|
+
errorMessage?: Translatable;
|
|
197
|
+
/**
|
|
198
|
+
* Whether to show a loading state while submitting
|
|
199
|
+
*/
|
|
200
|
+
showLoading?: boolean;
|
|
201
|
+
};
|
|
103
202
|
export type InputNodeData = BaseNodeData & {
|
|
104
203
|
/**
|
|
105
204
|
* The name of the input field, used for identification and form submission
|
|
@@ -137,6 +236,14 @@ export type InputNodeData = BaseNodeData & {
|
|
|
137
236
|
* Whether multiple selections are allowed (for select and checkbox types)
|
|
138
237
|
*/
|
|
139
238
|
multiple?: boolean;
|
|
239
|
+
/**
|
|
240
|
+
* Visual variant (currently used by radio inputs)
|
|
241
|
+
*/
|
|
242
|
+
variant?: "default" | "card";
|
|
243
|
+
/**
|
|
244
|
+
* Whether past dates should be disabled (for date and daterange types)
|
|
245
|
+
*/
|
|
246
|
+
disablePast?: boolean;
|
|
140
247
|
/**
|
|
141
248
|
* The default value config for the input field
|
|
142
249
|
*/
|
|
@@ -154,6 +261,21 @@ export type InputNodeData = BaseNodeData & {
|
|
|
154
261
|
* HTTP configuration for the input field (used with type="http")
|
|
155
262
|
*/
|
|
156
263
|
httpConfig?: HttpConfig;
|
|
264
|
+
/**
|
|
265
|
+
* Dynamic options source — fetches the option list from an HTTP endpoint
|
|
266
|
+
* at runtime. Used by option-based inputs (radio, checkbox, select, autocomplete).
|
|
267
|
+
* When set, overrides the static `options` array.
|
|
268
|
+
*/
|
|
269
|
+
optionsSource?: OptionsSource;
|
|
270
|
+
/**
|
|
271
|
+
* Submit configuration for the input field (used with type="submit")
|
|
272
|
+
*/
|
|
273
|
+
submitConfig?: SubmitConfig;
|
|
274
|
+
/**
|
|
275
|
+
* Optional illustrative image displayed above the input label.
|
|
276
|
+
* Stored as a base64 data URL (uploads are resized/compressed) or a remote URL.
|
|
277
|
+
*/
|
|
278
|
+
image?: string;
|
|
157
279
|
};
|
|
158
280
|
export type UINodeData = BaseNodeData & {
|
|
159
281
|
/**
|
|
@@ -164,7 +286,7 @@ export type UINodeData = BaseNodeData & {
|
|
|
164
286
|
/**
|
|
165
287
|
* Union type representing all possible node data types in the Treege system
|
|
166
288
|
*/
|
|
167
|
-
export type TreegeNodeData = InputNodeData | UINodeData |
|
|
289
|
+
export type TreegeNodeData = InputNodeData | UINodeData | GroupNodeData;
|
|
168
290
|
/**
|
|
169
291
|
* A TreegeNode represents a node in the flowchart with specific data and properties
|
|
170
292
|
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputNodeData, TreegeNodeData } from '../types/node';
|
|
2
|
+
/**
|
|
3
|
+
* Type guard: narrows the node `data` to an `InputNodeData` whose type
|
|
4
|
+
* supports an option list. After a truthy check, `data.options`,
|
|
5
|
+
* `data.optionsSource`, etc. are accessible without casts.
|
|
6
|
+
*/
|
|
7
|
+
export declare const isOptionsInputData: (data: TreegeNodeData | undefined) => data is InputNodeData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Node } from '@xyflow/react';
|
|
2
|
-
import {
|
|
2
|
+
import { GroupNodeData, InputNodeData, TreegeNode, UINodeData } from '../types/node';
|
|
3
3
|
/**
|
|
4
4
|
* Type guard to check if a node is an InputNode
|
|
5
5
|
* @param node
|
|
@@ -10,11 +10,6 @@ export declare const isInputNode: (node: TreegeNode | undefined) => node is Node
|
|
|
10
10
|
* @param node
|
|
11
11
|
*/
|
|
12
12
|
export declare const isUINode: (node: TreegeNode | undefined) => node is Node<UINodeData, "ui">;
|
|
13
|
-
/**
|
|
14
|
-
* Type guard to check if a node is a FlowNode
|
|
15
|
-
* @param node
|
|
16
|
-
*/
|
|
17
|
-
export declare const isFlowNode: (node: TreegeNode | undefined) => node is Node<FlowNodeData, "flow">;
|
|
18
13
|
/**
|
|
19
14
|
* Type guard to check if a node is a GroupNode
|
|
20
15
|
* @param node
|