treege 3.0.0-beta.44 → 3.0.0-beta.45
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 +16 -9
- package/dist/DefaultInputs-DYKtphqY.js +1701 -0
- package/dist/ThemeContext-O482h1XZ.js +1397 -0
- package/dist/editor/context/OpenApiContext.d.ts +79 -0
- package/dist/editor/context/TreegeEditorContext.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +20 -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/forms/OptionsSourceForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +30 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +0 -1
- 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/NodeOptions.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeRequiredButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +5 -2
- package/dist/editor/types/editor.d.ts +39 -1
- package/dist/editor/types/openapi.d.ts +81 -0
- package/dist/editor/utils/openapi.d.ts +35 -0
- package/dist/editor-DBCMmZtt.js +5147 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeConfigContext.d.ts +3 -27
- package/dist/renderer/context/TreegeRendererContext.d.ts +99 -2
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +3 -2
- 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/hooks/useInputOptions.d.ts +28 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +7 -3
- package/dist/renderer/hooks/useSubmitHandler.d.ts +3 -2
- package/dist/renderer/types/renderer.d.ts +13 -25
- package/dist/renderer/utils/http.d.ts +29 -1
- package/dist/renderer/utils/submit.d.ts +3 -2
- package/dist/renderer-native.js +794 -782
- package/dist/renderer.js +3 -3
- package/dist/shared/components/ui/button.d.ts +1 -1
- package/dist/shared/components/ui/field.d.ts +24 -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/locales/ar.json.d.ts +80 -0
- package/dist/shared/locales/de.json.d.ts +80 -0
- package/dist/shared/locales/en.json.d.ts +80 -0
- package/dist/shared/locales/es.json.d.ts +80 -0
- package/dist/shared/locales/fr.json.d.ts +80 -0
- package/dist/shared/locales/it.json.d.ts +80 -0
- package/dist/shared/locales/pt.json.d.ts +80 -0
- package/dist/shared/types/node.d.ts +44 -0
- package/package.json +3 -1
- package/dist/DefaultInputs-D6a1ESW-.js +0 -1562
- package/dist/ThemeContext-CUHjGVUf.js +0 -1602
- package/dist/editor/features/TreegeEditor/nodes/components/OptionsEditor.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/components/RequiredBadge.d.ts +0 -6
- package/dist/editor-DjtjUgyb.js +0 -4041
|
@@ -15,6 +15,7 @@ declare const _default: {
|
|
|
15
15
|
"editor": {
|
|
16
16
|
"actionsPanel": {
|
|
17
17
|
"addNode": "Ajouter un élément",
|
|
18
|
+
"authorize": "Autoriser",
|
|
18
19
|
"clear": "Supprimer",
|
|
19
20
|
"clearSuccess": "Flux vidé !",
|
|
20
21
|
"clearSuccessDesc": "Tous les nœuds et arêtes ont été supprimés.",
|
|
@@ -22,12 +23,14 @@ declare const _default: {
|
|
|
22
23
|
"downloadSuccess": "Téléchargement réussi.",
|
|
23
24
|
"downloadSuccessDesc": "Le flux a été exporté avec succès.",
|
|
24
25
|
"exportJson": "Exporter JSON",
|
|
26
|
+
"globalHeaders": "Headers globaux",
|
|
25
27
|
"idCopied": "ID du flux copié !",
|
|
26
28
|
"importJson": "Importer JSON",
|
|
27
29
|
"importSuccess": "Importation réussie !",
|
|
28
30
|
"importSuccessDesc": "Le flux a été importé avec succès.",
|
|
29
31
|
"invalidJson": "Fichier JSON invalide.",
|
|
30
32
|
"invalidJsonDesc": "Le fichier doit contenir des tableaux de nœuds et d'arêtes.",
|
|
33
|
+
"openApi": "OpenAPI",
|
|
31
34
|
"parseError": "Erreur d'analyse du fichier JSON.",
|
|
32
35
|
"parseErrorDesc": "Essayez de corriger le fichier et de l'importer à nouveau."
|
|
33
36
|
},
|
|
@@ -51,6 +54,24 @@ declare const _default: {
|
|
|
51
54
|
"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.",
|
|
52
55
|
"unknownError": "Erreur inconnue"
|
|
53
56
|
},
|
|
57
|
+
"apiUrlCombobox": {
|
|
58
|
+
"browseRoutes": "Parcourir les routes OpenAPI",
|
|
59
|
+
"noRoutes": "Aucune route correspondante",
|
|
60
|
+
"searchRoutes": "Rechercher par méthode, chemin ou résumé"
|
|
61
|
+
},
|
|
62
|
+
"authorizeDialog": {
|
|
63
|
+
"apiKeyLabel": "Clé d'API",
|
|
64
|
+
"apply": "Appliquer",
|
|
65
|
+
"bearerLabel": "Jeton Bearer",
|
|
66
|
+
"clear": "Effacer",
|
|
67
|
+
"description": "Authentifiez-vous auprès de l'API pour transmettre les identifiants à chaque requête émise par le formulaire.",
|
|
68
|
+
"exchangeFailed": "Échec de l'obtention du token d'accès",
|
|
69
|
+
"noSchemes": "Aucun schéma de sécurité supporté n'est déclaré dans ce document OpenAPI.",
|
|
70
|
+
"oauth2PasswordLabel": "OAuth2 mot de passe",
|
|
71
|
+
"passwordPlaceholder": "Mot de passe",
|
|
72
|
+
"title": "Autoriser",
|
|
73
|
+
"usernamePlaceholder": "Nom d'utilisateur"
|
|
74
|
+
},
|
|
54
75
|
"changeNodeTypeDialog": {
|
|
55
76
|
"description": "Ce nœud possède plusieurs branches sortantes. Le nouveau type n'en supporte qu'une seule. Choisissez la branche à conserver ; les autres seront supprimées.",
|
|
56
77
|
"keepBranch": "Conserver cette branche",
|
|
@@ -101,6 +122,15 @@ declare const _default: {
|
|
|
101
122
|
"groupNodeForm": {
|
|
102
123
|
"label": "Libellé"
|
|
103
124
|
},
|
|
125
|
+
"headersDialog": {
|
|
126
|
+
"addHeader": "Ajouter un header",
|
|
127
|
+
"description": "Ces headers sont transmis à chaque requête HTTP émise par le formulaire (inputs HTTP, submit, sources d'options). Les headers field-level avec la même clé prennent le dessus.",
|
|
128
|
+
"empty": "Aucun header pour l'instant.",
|
|
129
|
+
"keyPlaceholder": "Authorization",
|
|
130
|
+
"removeHeader": "Supprimer le header",
|
|
131
|
+
"title": "Headers globaux",
|
|
132
|
+
"valuePlaceholder": "Bearer ..."
|
|
133
|
+
},
|
|
104
134
|
"httpConfigForm": {
|
|
105
135
|
"addHeader": "Ajouter un en-tête",
|
|
106
136
|
"apiUrl": "URL de l'API",
|
|
@@ -153,7 +183,9 @@ declare const _default: {
|
|
|
153
183
|
"defaultValueTypeNone": "Aucun",
|
|
154
184
|
"defaultValueTypeReference": "Champ de référence",
|
|
155
185
|
"defaultValueTypeStatic": "Valeur statique",
|
|
186
|
+
"deleteOption": "Supprimer l'option",
|
|
156
187
|
"disablePast": "Désactiver les dates passées",
|
|
188
|
+
"editOption": "Modifier l'option",
|
|
157
189
|
"errorMessage": "Message d'erreur",
|
|
158
190
|
"helperText": "Texte d'aide",
|
|
159
191
|
"httpConfiguration": "Configuration HTTP",
|
|
@@ -209,6 +241,48 @@ declare const _default: {
|
|
|
209
241
|
"deleteNodeSuccess": "Nœud supprimé avec succès",
|
|
210
242
|
"editNode": "Modifier le nœud"
|
|
211
243
|
},
|
|
244
|
+
"openApiDialog": {
|
|
245
|
+
"baseUrlHint": "Optionnel. Remplace l'URL du premier serveur du document — utile quand la spec pointe vers un autre environnement.",
|
|
246
|
+
"baseUrlLabel": "Override de l'URL de base",
|
|
247
|
+
"clear": "Effacer",
|
|
248
|
+
"cleared": "OpenAPI effacé.",
|
|
249
|
+
"description": "Fournissez un document OpenAPI 3.x pour activer les suggestions d'URL et l'autorisation.",
|
|
250
|
+
"emptyInput": "Veuillez fournir une URL ou coller un document JSON.",
|
|
251
|
+
"jsonLabel": "Collez votre OpenAPI JSON",
|
|
252
|
+
"load": "Charger",
|
|
253
|
+
"loadFailed": "Échec du chargement du document OpenAPI",
|
|
254
|
+
"loadSuccess": "OpenAPI chargé.",
|
|
255
|
+
"modeJson": "Coller JSON",
|
|
256
|
+
"modeUrl": "Depuis URL",
|
|
257
|
+
"title": "Source OpenAPI",
|
|
258
|
+
"urlLabel": "URL du document OpenAPI"
|
|
259
|
+
},
|
|
260
|
+
"optionsSourceForm": {
|
|
261
|
+
"descriptionField": "Description",
|
|
262
|
+
"descriptionFieldPlaceholder": "Chemin vers la description (optionnel)",
|
|
263
|
+
"detect": "Détecter les champs",
|
|
264
|
+
"detectFailed": "Échec de la requête.",
|
|
265
|
+
"detectSuccess": "Champs détectés.",
|
|
266
|
+
"disable": "Utiliser des options statiques",
|
|
267
|
+
"dynamicHint": "Les options sont récupérées depuis cette API au runtime.",
|
|
268
|
+
"enable": "Récupérer depuis une API",
|
|
269
|
+
"imageField": "Image",
|
|
270
|
+
"imageFieldPlaceholder": "Chemin vers l'URL de l'image (optionnel)",
|
|
271
|
+
"labelField": "Label",
|
|
272
|
+
"labelFieldPlaceholder": "Chemin vers le label (ex. name)",
|
|
273
|
+
"noFieldsDetected": "Aucun champ détecté — vérifiez l'URL ou le chemin de réponse.",
|
|
274
|
+
"none": "— Aucun —",
|
|
275
|
+
"previewCount": "{count} options détectées",
|
|
276
|
+
"responsePath": "Chemin de réponse",
|
|
277
|
+
"responsePathHint": "Optionnel. Utilisez un chemin comme \"data.users\" si le tableau est imbriqué.",
|
|
278
|
+
"responsePathPlaceholder": "ex. data.users",
|
|
279
|
+
"staticOptions": "Options statiques",
|
|
280
|
+
"staticOptionsHint": "Les options sont définies manuellement dans l'éditeur.",
|
|
281
|
+
"title": "Source des options",
|
|
282
|
+
"urlRequired": "L'URL est requise.",
|
|
283
|
+
"valueField": "Valeur",
|
|
284
|
+
"valueFieldPlaceholder": "Chemin vers la valeur (ex. id)"
|
|
285
|
+
},
|
|
212
286
|
"selectInputType": {
|
|
213
287
|
"type": "Type"
|
|
214
288
|
},
|
|
@@ -290,6 +364,9 @@ declare const _default: {
|
|
|
290
364
|
"search": "Recherche...",
|
|
291
365
|
"selectOption": "Sélectionner une option"
|
|
292
366
|
},
|
|
367
|
+
"defaultCheckboxInput": {
|
|
368
|
+
"loadingOptions": "Chargement des options..."
|
|
369
|
+
},
|
|
293
370
|
"defaultHttpInput": {
|
|
294
371
|
"fetchFailed": "Échec de la récupération des données. Veuillez vérifier votre connexion réseau.",
|
|
295
372
|
"httpError": "Erreur HTTP {status} : {statusText}",
|
|
@@ -318,6 +395,9 @@ declare const _default: {
|
|
|
318
395
|
"startDate": "Date de début",
|
|
319
396
|
"startTime": "Heure de début"
|
|
320
397
|
},
|
|
398
|
+
"defaultRadioInput": {
|
|
399
|
+
"loadingOptions": "Chargement des options..."
|
|
400
|
+
},
|
|
321
401
|
"defaultSelectInput": {
|
|
322
402
|
"selectOption": "Sélectionner une option"
|
|
323
403
|
},
|
|
@@ -15,6 +15,7 @@ declare const _default: {
|
|
|
15
15
|
"editor": {
|
|
16
16
|
"actionsPanel": {
|
|
17
17
|
"addNode": "Aggiungi elemento",
|
|
18
|
+
"authorize": "Authorize",
|
|
18
19
|
"clear": "Pulisci",
|
|
19
20
|
"clearSuccess": "Flusso pulito!",
|
|
20
21
|
"clearSuccessDesc": "Tutti i nodi e gli archi sono stati rimossi.",
|
|
@@ -22,12 +23,14 @@ declare const _default: {
|
|
|
22
23
|
"downloadSuccess": "Download riuscito.",
|
|
23
24
|
"downloadSuccessDesc": "Il flusso è stato esportato con successo.",
|
|
24
25
|
"exportJson": "Esporta JSON",
|
|
26
|
+
"globalHeaders": "Global headers",
|
|
25
27
|
"idCopied": "ID del flusso copiato!",
|
|
26
28
|
"importJson": "Importa JSON",
|
|
27
29
|
"importSuccess": "Importazione riuscita!",
|
|
28
30
|
"importSuccessDesc": "Il flusso è stato importato con successo.",
|
|
29
31
|
"invalidJson": "File JSON non valido.",
|
|
30
32
|
"invalidJsonDesc": "Il file deve contenere array di nodi e archi.",
|
|
33
|
+
"openApi": "OpenAPI",
|
|
31
34
|
"parseError": "Errore nell'analisi del file JSON.",
|
|
32
35
|
"parseErrorDesc": "Prova a correggere il file e importarlo di nuovo."
|
|
33
36
|
},
|
|
@@ -51,6 +54,24 @@ declare const _default: {
|
|
|
51
54
|
"titleDescription": "Descrivi il modulo o l'albero decisionale che vuoi creare, e l'IA lo genererà per te.",
|
|
52
55
|
"unknownError": "Errore sconosciuto"
|
|
53
56
|
},
|
|
57
|
+
"apiUrlCombobox": {
|
|
58
|
+
"browseRoutes": "Browse OpenAPI routes",
|
|
59
|
+
"noRoutes": "No matching route",
|
|
60
|
+
"searchRoutes": "Search by method, path, or summary"
|
|
61
|
+
},
|
|
62
|
+
"authorizeDialog": {
|
|
63
|
+
"apiKeyLabel": "API key",
|
|
64
|
+
"apply": "Apply",
|
|
65
|
+
"bearerLabel": "Bearer token",
|
|
66
|
+
"clear": "Clear",
|
|
67
|
+
"description": "Authenticate against the API to forward credentials to every request issued by the form.",
|
|
68
|
+
"exchangeFailed": "Failed to fetch access token",
|
|
69
|
+
"noSchemes": "No supported security schemes are declared in this OpenAPI document.",
|
|
70
|
+
"oauth2PasswordLabel": "OAuth2 password",
|
|
71
|
+
"passwordPlaceholder": "Password",
|
|
72
|
+
"title": "Authorize",
|
|
73
|
+
"usernamePlaceholder": "Username"
|
|
74
|
+
},
|
|
54
75
|
"changeNodeTypeDialog": {
|
|
55
76
|
"description": "Questo nodo ha più rami in uscita. Il nuovo tipo ne supporta solo uno. Scegli quale ramo mantenere; gli altri verranno rimossi.",
|
|
56
77
|
"keepBranch": "Mantieni questo ramo",
|
|
@@ -101,6 +122,15 @@ declare const _default: {
|
|
|
101
122
|
"groupNodeForm": {
|
|
102
123
|
"label": "Etichetta"
|
|
103
124
|
},
|
|
125
|
+
"headersDialog": {
|
|
126
|
+
"addHeader": "Add header",
|
|
127
|
+
"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.",
|
|
128
|
+
"empty": "No headers yet.",
|
|
129
|
+
"keyPlaceholder": "Authorization",
|
|
130
|
+
"removeHeader": "Remove header",
|
|
131
|
+
"title": "Global headers",
|
|
132
|
+
"valuePlaceholder": "Bearer ..."
|
|
133
|
+
},
|
|
104
134
|
"httpConfigForm": {
|
|
105
135
|
"addHeader": "Aggiungi intestazione",
|
|
106
136
|
"apiUrl": "URL API",
|
|
@@ -153,7 +183,9 @@ declare const _default: {
|
|
|
153
183
|
"defaultValueTypeNone": "Nessuno",
|
|
154
184
|
"defaultValueTypeReference": "Campo di riferimento",
|
|
155
185
|
"defaultValueTypeStatic": "Valore statico",
|
|
186
|
+
"deleteOption": "Elimina opzione",
|
|
156
187
|
"disablePast": "Disabilita date passate",
|
|
188
|
+
"editOption": "Modifica opzione",
|
|
157
189
|
"errorMessage": "Messaggio di errore",
|
|
158
190
|
"helperText": "Testo di aiuto",
|
|
159
191
|
"httpConfiguration": "Configurazione HTTP",
|
|
@@ -209,6 +241,48 @@ declare const _default: {
|
|
|
209
241
|
"deleteNodeSuccess": "Nodo eliminato con successo",
|
|
210
242
|
"editNode": "Modifica nodo"
|
|
211
243
|
},
|
|
244
|
+
"openApiDialog": {
|
|
245
|
+
"baseUrlHint": "Optional. Overrides the document's first server URL — useful when the spec points at a different environment.",
|
|
246
|
+
"baseUrlLabel": "Base URL override",
|
|
247
|
+
"clear": "Clear",
|
|
248
|
+
"cleared": "OpenAPI cleared.",
|
|
249
|
+
"description": "Provide an OpenAPI 3.x document to power URL suggestions and Authorize.",
|
|
250
|
+
"emptyInput": "Please provide a URL or paste a JSON document.",
|
|
251
|
+
"jsonLabel": "Paste your OpenAPI JSON",
|
|
252
|
+
"load": "Load",
|
|
253
|
+
"loadFailed": "Failed to load OpenAPI document",
|
|
254
|
+
"loadSuccess": "OpenAPI loaded.",
|
|
255
|
+
"modeJson": "Paste JSON",
|
|
256
|
+
"modeUrl": "From URL",
|
|
257
|
+
"title": "OpenAPI source",
|
|
258
|
+
"urlLabel": "OpenAPI document URL"
|
|
259
|
+
},
|
|
260
|
+
"optionsSourceForm": {
|
|
261
|
+
"descriptionField": "Description",
|
|
262
|
+
"descriptionFieldPlaceholder": "Path to description (optional)",
|
|
263
|
+
"detect": "Detect fields",
|
|
264
|
+
"detectFailed": "Failed to fetch the API.",
|
|
265
|
+
"detectSuccess": "Fields detected.",
|
|
266
|
+
"disable": "Use static options",
|
|
267
|
+
"dynamicHint": "Options are fetched from this API at runtime.",
|
|
268
|
+
"enable": "Fetch from API",
|
|
269
|
+
"imageField": "Image",
|
|
270
|
+
"imageFieldPlaceholder": "Path to image URL (optional)",
|
|
271
|
+
"labelField": "Label",
|
|
272
|
+
"labelFieldPlaceholder": "Path to label (e.g., name)",
|
|
273
|
+
"noFieldsDetected": "No fields detected — check the URL or response path.",
|
|
274
|
+
"none": "— None —",
|
|
275
|
+
"previewCount": "{count} options detected",
|
|
276
|
+
"responsePath": "Response path",
|
|
277
|
+
"responsePathHint": "Optional. Use a path like \"data.users\" if the array is nested.",
|
|
278
|
+
"responsePathPlaceholder": "e.g., data.users",
|
|
279
|
+
"staticOptions": "Static options",
|
|
280
|
+
"staticOptionsHint": "Options are defined manually in the editor.",
|
|
281
|
+
"title": "Options source",
|
|
282
|
+
"urlRequired": "URL is required.",
|
|
283
|
+
"valueField": "Value",
|
|
284
|
+
"valueFieldPlaceholder": "Path to value (e.g., id)"
|
|
285
|
+
},
|
|
212
286
|
"selectInputType": {
|
|
213
287
|
"type": "Tipo"
|
|
214
288
|
},
|
|
@@ -290,6 +364,9 @@ declare const _default: {
|
|
|
290
364
|
"search": "Cerca...",
|
|
291
365
|
"selectOption": "Seleziona un'opzione"
|
|
292
366
|
},
|
|
367
|
+
"defaultCheckboxInput": {
|
|
368
|
+
"loadingOptions": "Caricamento opzioni..."
|
|
369
|
+
},
|
|
293
370
|
"defaultHttpInput": {
|
|
294
371
|
"fetchFailed": "Impossibile recuperare i dati. Controlla la tua connessione di rete.",
|
|
295
372
|
"httpError": "Errore HTTP {status}: {statusText}",
|
|
@@ -318,6 +395,9 @@ declare const _default: {
|
|
|
318
395
|
"startDate": "Data di inizio",
|
|
319
396
|
"startTime": "Ora di inizio"
|
|
320
397
|
},
|
|
398
|
+
"defaultRadioInput": {
|
|
399
|
+
"loadingOptions": "Caricamento opzioni..."
|
|
400
|
+
},
|
|
321
401
|
"defaultSelectInput": {
|
|
322
402
|
"selectOption": "Seleziona un'opzione"
|
|
323
403
|
},
|
|
@@ -15,6 +15,7 @@ declare const _default: {
|
|
|
15
15
|
"editor": {
|
|
16
16
|
"actionsPanel": {
|
|
17
17
|
"addNode": "Adicionar elemento",
|
|
18
|
+
"authorize": "Authorize",
|
|
18
19
|
"clear": "Limpar",
|
|
19
20
|
"clearSuccess": "Fluxo limpo!",
|
|
20
21
|
"clearSuccessDesc": "Todos os nós e arestas foram removidos.",
|
|
@@ -22,12 +23,14 @@ declare const _default: {
|
|
|
22
23
|
"downloadSuccess": "Download bem-sucedido.",
|
|
23
24
|
"downloadSuccessDesc": "O fluxo foi exportado com sucesso.",
|
|
24
25
|
"exportJson": "Exportar JSON",
|
|
26
|
+
"globalHeaders": "Global headers",
|
|
25
27
|
"idCopied": "ID do fluxo copiado!",
|
|
26
28
|
"importJson": "Importar JSON",
|
|
27
29
|
"importSuccess": "Importação bem-sucedida!",
|
|
28
30
|
"importSuccessDesc": "O fluxo foi importado com sucesso.",
|
|
29
31
|
"invalidJson": "Arquivo JSON inválido.",
|
|
30
32
|
"invalidJsonDesc": "O arquivo deve conter arrays de nós e arestas.",
|
|
33
|
+
"openApi": "OpenAPI",
|
|
31
34
|
"parseError": "Erro ao analisar o arquivo JSON.",
|
|
32
35
|
"parseErrorDesc": "Tente corrigir o arquivo e importá-lo novamente."
|
|
33
36
|
},
|
|
@@ -51,6 +54,24 @@ declare const _default: {
|
|
|
51
54
|
"titleDescription": "Descreva o formulário ou árvore de decisão que deseja criar, e a IA irá gerá-lo para você.",
|
|
52
55
|
"unknownError": "Erro desconhecido"
|
|
53
56
|
},
|
|
57
|
+
"apiUrlCombobox": {
|
|
58
|
+
"browseRoutes": "Browse OpenAPI routes",
|
|
59
|
+
"noRoutes": "No matching route",
|
|
60
|
+
"searchRoutes": "Search by method, path, or summary"
|
|
61
|
+
},
|
|
62
|
+
"authorizeDialog": {
|
|
63
|
+
"apiKeyLabel": "API key",
|
|
64
|
+
"apply": "Apply",
|
|
65
|
+
"bearerLabel": "Bearer token",
|
|
66
|
+
"clear": "Clear",
|
|
67
|
+
"description": "Authenticate against the API to forward credentials to every request issued by the form.",
|
|
68
|
+
"exchangeFailed": "Failed to fetch access token",
|
|
69
|
+
"noSchemes": "No supported security schemes are declared in this OpenAPI document.",
|
|
70
|
+
"oauth2PasswordLabel": "OAuth2 password",
|
|
71
|
+
"passwordPlaceholder": "Password",
|
|
72
|
+
"title": "Authorize",
|
|
73
|
+
"usernamePlaceholder": "Username"
|
|
74
|
+
},
|
|
54
75
|
"changeNodeTypeDialog": {
|
|
55
76
|
"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.",
|
|
56
77
|
"keepBranch": "Manter esta ramificação",
|
|
@@ -101,6 +122,15 @@ declare const _default: {
|
|
|
101
122
|
"groupNodeForm": {
|
|
102
123
|
"label": "Rótulo"
|
|
103
124
|
},
|
|
125
|
+
"headersDialog": {
|
|
126
|
+
"addHeader": "Add header",
|
|
127
|
+
"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.",
|
|
128
|
+
"empty": "No headers yet.",
|
|
129
|
+
"keyPlaceholder": "Authorization",
|
|
130
|
+
"removeHeader": "Remove header",
|
|
131
|
+
"title": "Global headers",
|
|
132
|
+
"valuePlaceholder": "Bearer ..."
|
|
133
|
+
},
|
|
104
134
|
"httpConfigForm": {
|
|
105
135
|
"addHeader": "Adicionar cabeçalho",
|
|
106
136
|
"apiUrl": "URL da API",
|
|
@@ -153,7 +183,9 @@ declare const _default: {
|
|
|
153
183
|
"defaultValueTypeNone": "Nenhum",
|
|
154
184
|
"defaultValueTypeReference": "Campo de referência",
|
|
155
185
|
"defaultValueTypeStatic": "Valor estático",
|
|
186
|
+
"deleteOption": "Excluir opção",
|
|
156
187
|
"disablePast": "Desativar datas passadas",
|
|
188
|
+
"editOption": "Editar opção",
|
|
157
189
|
"errorMessage": "Mensagem de erro",
|
|
158
190
|
"helperText": "Texto de ajuda",
|
|
159
191
|
"httpConfiguration": "Configuração HTTP",
|
|
@@ -209,6 +241,48 @@ declare const _default: {
|
|
|
209
241
|
"deleteNodeSuccess": "Nó excluído com sucesso",
|
|
210
242
|
"editNode": "Editar nó"
|
|
211
243
|
},
|
|
244
|
+
"openApiDialog": {
|
|
245
|
+
"baseUrlHint": "Optional. Overrides the document's first server URL — useful when the spec points at a different environment.",
|
|
246
|
+
"baseUrlLabel": "Base URL override",
|
|
247
|
+
"clear": "Clear",
|
|
248
|
+
"cleared": "OpenAPI cleared.",
|
|
249
|
+
"description": "Provide an OpenAPI 3.x document to power URL suggestions and Authorize.",
|
|
250
|
+
"emptyInput": "Please provide a URL or paste a JSON document.",
|
|
251
|
+
"jsonLabel": "Paste your OpenAPI JSON",
|
|
252
|
+
"load": "Load",
|
|
253
|
+
"loadFailed": "Failed to load OpenAPI document",
|
|
254
|
+
"loadSuccess": "OpenAPI loaded.",
|
|
255
|
+
"modeJson": "Paste JSON",
|
|
256
|
+
"modeUrl": "From URL",
|
|
257
|
+
"title": "OpenAPI source",
|
|
258
|
+
"urlLabel": "OpenAPI document URL"
|
|
259
|
+
},
|
|
260
|
+
"optionsSourceForm": {
|
|
261
|
+
"descriptionField": "Description",
|
|
262
|
+
"descriptionFieldPlaceholder": "Path to description (optional)",
|
|
263
|
+
"detect": "Detect fields",
|
|
264
|
+
"detectFailed": "Failed to fetch the API.",
|
|
265
|
+
"detectSuccess": "Fields detected.",
|
|
266
|
+
"disable": "Use static options",
|
|
267
|
+
"dynamicHint": "Options are fetched from this API at runtime.",
|
|
268
|
+
"enable": "Fetch from API",
|
|
269
|
+
"imageField": "Image",
|
|
270
|
+
"imageFieldPlaceholder": "Path to image URL (optional)",
|
|
271
|
+
"labelField": "Label",
|
|
272
|
+
"labelFieldPlaceholder": "Path to label (e.g., name)",
|
|
273
|
+
"noFieldsDetected": "No fields detected — check the URL or response path.",
|
|
274
|
+
"none": "— None —",
|
|
275
|
+
"previewCount": "{count} options detected",
|
|
276
|
+
"responsePath": "Response path",
|
|
277
|
+
"responsePathHint": "Optional. Use a path like \"data.users\" if the array is nested.",
|
|
278
|
+
"responsePathPlaceholder": "e.g., data.users",
|
|
279
|
+
"staticOptions": "Static options",
|
|
280
|
+
"staticOptionsHint": "Options are defined manually in the editor.",
|
|
281
|
+
"title": "Options source",
|
|
282
|
+
"urlRequired": "URL is required.",
|
|
283
|
+
"valueField": "Value",
|
|
284
|
+
"valueFieldPlaceholder": "Path to value (e.g., id)"
|
|
285
|
+
},
|
|
212
286
|
"selectInputType": {
|
|
213
287
|
"type": "Tipo"
|
|
214
288
|
},
|
|
@@ -290,6 +364,9 @@ declare const _default: {
|
|
|
290
364
|
"search": "Pesquisar...",
|
|
291
365
|
"selectOption": "Selecione uma opção"
|
|
292
366
|
},
|
|
367
|
+
"defaultCheckboxInput": {
|
|
368
|
+
"loadingOptions": "Carregando opções..."
|
|
369
|
+
},
|
|
293
370
|
"defaultHttpInput": {
|
|
294
371
|
"fetchFailed": "Falha ao buscar dados. Por favor, verifique sua conexão de rede.",
|
|
295
372
|
"httpError": "Erro HTTP {status}: {statusText}",
|
|
@@ -318,6 +395,9 @@ declare const _default: {
|
|
|
318
395
|
"startDate": "Data de início",
|
|
319
396
|
"startTime": "Hora de início"
|
|
320
397
|
},
|
|
398
|
+
"defaultRadioInput": {
|
|
399
|
+
"loadingOptions": "Carregando opções..."
|
|
400
|
+
},
|
|
321
401
|
"defaultSelectInput": {
|
|
322
402
|
"selectOption": "Selecione uma opção"
|
|
323
403
|
},
|
|
@@ -113,6 +113,39 @@ export type HttpConfig = {
|
|
|
113
113
|
*/
|
|
114
114
|
showLoading?: boolean;
|
|
115
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* Maps response item fields to InputOption properties.
|
|
118
|
+
* Each value is a path expression (e.g., "id", "user.name", "items[0].title").
|
|
119
|
+
*/
|
|
120
|
+
export type OptionsSourceMapping = {
|
|
121
|
+
/** Path to the field used as InputOption.value */
|
|
122
|
+
valueField: string;
|
|
123
|
+
/** Path to the field used as InputOption.label */
|
|
124
|
+
labelField: string;
|
|
125
|
+
/** Path to the field used as InputOption.description (optional) */
|
|
126
|
+
descriptionField?: string;
|
|
127
|
+
/** Path to the field used as InputOption.image (optional) */
|
|
128
|
+
imageField?: string;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Dynamic options source — fetches the option list from an HTTP endpoint
|
|
132
|
+
* at runtime. Applies to inputs that use options (radio, checkbox, select,
|
|
133
|
+
* autocomplete). When set, overrides the static `options` array.
|
|
134
|
+
*/
|
|
135
|
+
export type OptionsSource = {
|
|
136
|
+
/** API URL (supports template variables like {{fieldId}}) */
|
|
137
|
+
url?: string;
|
|
138
|
+
/** HTTP method */
|
|
139
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
|
|
140
|
+
/** Custom headers (merged with global headers; field-level wins) */
|
|
141
|
+
headers?: HttpHeader[];
|
|
142
|
+
/** Request body (for POST/PUT/PATCH; supports template variables) */
|
|
143
|
+
body?: string;
|
|
144
|
+
/** JSONPath to extract the array from the response (e.g., "data.users") */
|
|
145
|
+
responsePath?: string;
|
|
146
|
+
/** Field-to-property mapping for each response item */
|
|
147
|
+
mapping?: OptionsSourceMapping;
|
|
148
|
+
};
|
|
116
149
|
export type SubmitConfig = {
|
|
117
150
|
/**
|
|
118
151
|
* The HTTP method to use for form submission
|
|
@@ -214,10 +247,21 @@ export type InputNodeData = BaseNodeData & {
|
|
|
214
247
|
* HTTP configuration for the input field (used with type="http")
|
|
215
248
|
*/
|
|
216
249
|
httpConfig?: HttpConfig;
|
|
250
|
+
/**
|
|
251
|
+
* Dynamic options source — fetches the option list from an HTTP endpoint
|
|
252
|
+
* at runtime. Used by option-based inputs (radio, checkbox, select, autocomplete).
|
|
253
|
+
* When set, overrides the static `options` array.
|
|
254
|
+
*/
|
|
255
|
+
optionsSource?: OptionsSource;
|
|
217
256
|
/**
|
|
218
257
|
* Submit configuration for the input field (used with type="submit")
|
|
219
258
|
*/
|
|
220
259
|
submitConfig?: SubmitConfig;
|
|
260
|
+
/**
|
|
261
|
+
* Optional illustrative image displayed above the input label.
|
|
262
|
+
* Stored as a base64 data URL (uploads are resized/compressed) or a remote URL.
|
|
263
|
+
*/
|
|
264
|
+
image?: string;
|
|
221
265
|
};
|
|
222
266
|
export type UINodeData = BaseNodeData & {
|
|
223
267
|
/**
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "treege",
|
|
3
3
|
"description": "Powerful form generator",
|
|
4
4
|
"license": "ISC",
|
|
5
|
-
"version": "3.0.0-beta.
|
|
5
|
+
"version": "3.0.0-beta.45",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./dist/main.d.ts",
|
|
8
8
|
"module": "./dist/main.js",
|
|
@@ -63,6 +63,8 @@
|
|
|
63
63
|
"@radix-ui/react-separator": "^1.1.7",
|
|
64
64
|
"@radix-ui/react-slot": "^1.2.4",
|
|
65
65
|
"@radix-ui/react-switch": "^1.2.6",
|
|
66
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
67
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
66
68
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
67
69
|
"@tanstack/react-form": "^1.23.5",
|
|
68
70
|
"@uiw/react-textarea-code-editor": "^3.1.1",
|