treege 3.0.0-beta.29 → 3.0.0-beta.30

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.
Files changed (36) hide show
  1. package/dist/ThemeContext-D49eu_oE.js +1472 -0
  2. package/dist/editor/constants/nodeTypes.d.ts +4 -4
  3. package/dist/editor/context/TreegeEditorContext.d.ts +9 -1
  4. package/dist/editor/features/TreegeEditor/inputs/OptionImageField.d.ts +6 -0
  5. package/dist/editor/features/TreegeEditor/nodes/GroupNode.d.ts +1 -1
  6. package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +6 -0
  7. package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +6 -0
  8. package/dist/editor/features/TreegeEditor/nodes/components/NodeLabelInput.d.ts +9 -0
  9. package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +8 -0
  10. package/dist/editor/features/TreegeEditor/nodes/components/OpenSheetButton.d.ts +6 -0
  11. package/dist/editor/features/TreegeEditor/nodes/components/SubTypeBadge.d.ts +8 -0
  12. package/dist/editor/hooks/useFlowActions.d.ts +1 -0
  13. package/dist/editor/hooks/useFlowConnections.d.ts +4 -1
  14. package/dist/editor/utils/image.d.ts +7 -0
  15. package/dist/{editor-iWcSAxOr.js → editor-DnrJgSrC.js} +1246 -1035
  16. package/dist/editor.js +2 -2
  17. package/dist/main.js +4 -4
  18. package/dist/{renderer-DZD267lH.js → renderer-MCPhNlp1.js} +20 -12
  19. package/dist/renderer-native.js +644 -631
  20. package/dist/renderer.js +3 -3
  21. package/dist/{separator-DzU4sadU.js → separator-gO82kpxa.js} +1 -1
  22. package/dist/shared/locales/ar.json.d.ts +12 -0
  23. package/dist/shared/locales/de.json.d.ts +12 -0
  24. package/dist/shared/locales/en.json.d.ts +12 -0
  25. package/dist/shared/locales/es.json.d.ts +12 -0
  26. package/dist/shared/locales/fr.json.d.ts +12 -0
  27. package/dist/shared/locales/it.json.d.ts +12 -0
  28. package/dist/shared/locales/pt.json.d.ts +12 -0
  29. package/dist/shared/types/node.d.ts +5 -0
  30. package/dist/{useRenderNode-Huckx5bu.js → useRenderNode-B_GPMTPf.js} +1 -1
  31. package/package.json +1 -1
  32. package/dist/ThemeContext-cNnjiSPY.js +0 -2152
  33. package/dist/editor/features/TreegeEditor/nodes/FlowNode.d.ts +0 -6
  34. package/dist/editor/features/TreegeEditor/nodes/InputNode.d.ts +0 -6
  35. package/dist/editor/features/TreegeEditor/nodes/UINode.d.ts +0 -6
  36. package/dist/editor/features/TreegeEditor/nodes/hooks/useBottomHandleClick.d.ts +0 -8
package/dist/renderer.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, s as t, t as n } from "./ThemeContext-cNnjiSPY.js";
2
- import { C as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, u as _, v, w as y, x as b, y as x } from "./useRenderNode-Huckx5bu.js";
3
- import { C as S, S as C, _ as w, a as T, b as E, c as D, d as O, f as k, g as A, h as j, i as M, l as N, m as P, n as F, o as I, p as L, r as R, s as z, t as B, u as V, v as H, x as U, y as W } from "./renderer-DZD267lH.js";
1
+ import { n as e, s as t, t as n } from "./ThemeContext-D49eu_oE.js";
2
+ import { C as r, _ as i, a, b as o, d as s, f as c, g as l, h as u, i as d, l as f, m as p, n as m, p as h, r as g, u as _, v, w as y, x as b, y as x } from "./useRenderNode-B_GPMTPf.js";
3
+ import { C as S, S as C, _ as w, a as T, b as E, c as D, d as O, f as k, g as A, h as j, i as M, l as N, m as P, n as F, o as I, p as L, r as R, s as z, t as B, u as V, v as H, x as U, y as W } from "./renderer-MCPhNlp1.js";
4
4
  export { C as DefaultAddressInput, U as DefaultAutocompleteInput, E as DefaultCheckboxInput, W as DefaultDateInput, H as DefaultDateRangeInput, w as DefaultFileInput, S as DefaultGroup, A as DefaultHiddenInput, j as DefaultHttpInput, P as DefaultNumberInput, L as DefaultPasswordInput, k as DefaultRadioInput, O as DefaultSelectInput, V as DefaultSwitchInput, N as DefaultTextAreaInput, D as DefaultTextInput, z as DefaultTimeInput, I as DefaultTimeRangeInput, F as Divider, n as ThemeProvider, R as Title, r as TreegeConfigProvider, B as TreegeRenderer, i as applyReferenceTransformation, v as calculateReferenceFieldUpdates, x as checkFormFieldHasValue, o as convertFormValuesToNamedFormat, T as defaultInputRenderers, M as defaultUI, h as evaluateCondition, p as evaluateConditions, m as fileToSerializable, g as filesToSerializable, f as findStartNode, _ as getFlowRenderState, t as getTranslatedText, b as isFieldEmpty, s as isStartNode, c as mergeFlows, u as sanitize, l as sanitizeHttpResponse, d as serializableToFile, e as useTheme, y as useTreegeConfig, a as useTreegeRenderer };
@@ -1,4 +1,4 @@
1
- import { f as e } from "./ThemeContext-cNnjiSPY.js";
1
+ import { f as e } from "./ThemeContext-D49eu_oE.js";
2
2
  import "react";
3
3
  import { CheckIcon as t, ChevronDownIcon as n, ChevronUpIcon as r, SearchIcon as i, XIcon as a } from "lucide-react";
4
4
  import { Slot as o } from "@radix-ui/react-slot";
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "إغلاق",
6
6
  "create": "إنشاء",
7
7
  "delete": "حذف",
8
+ "other": "أخرى",
8
9
  "retry": "إعادة المحاولة",
9
10
  "save": "حفظ",
10
11
  "submit": "إرسال",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "لا توجد حقول أصلية متاحة",
157
158
  "objectMapping": "تعيين الكائن",
158
159
  "objectMappingDesc": "تعيين خصائص الكائن المصدر إلى بنية جديدة",
160
+ "optionImageAdd": "إضافة صورة",
161
+ "optionImageError": "تعذر معالجة الصورة.",
162
+ "optionImageInvalid": "تنسيق صورة غير مدعوم.",
163
+ "optionImageRemove": "إزالة الصورة",
164
+ "optionImageReplace": "استبدال الصورة",
165
+ "optionImageTooLarge": "الصورة كبيرة جدًا (الحد الأقصى 5 ميجابايت).",
166
+ "optionImageUpload": "تحميل ملف",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "التسمية",
160
169
  "options": "خيارات",
161
170
  "optionValue": "القيمة",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "الرسالة المعروضة عند نجاح الإرسال",
247
256
  "successMessagePlaceholder": "تم إرسال النموذج بنجاح!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "تسمية..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "التسمية",
251
263
  "type": "النوع",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Schließen",
6
6
  "create": "Erstellen",
7
7
  "delete": "Löschen",
8
+ "other": "Sonstige",
8
9
  "retry": "Erneut versuchen",
9
10
  "save": "Speichern",
10
11
  "submit": "Senden",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "Keine übergeordneten Felder verfügbar",
157
158
  "objectMapping": "Objektzuordnung",
158
159
  "objectMappingDesc": "Eigenschaften des Quellobjekts auf eine neue Struktur abbilden",
160
+ "optionImageAdd": "Bild hinzufügen",
161
+ "optionImageError": "Bild konnte nicht verarbeitet werden.",
162
+ "optionImageInvalid": "Nicht unterstütztes Bildformat.",
163
+ "optionImageRemove": "Bild entfernen",
164
+ "optionImageReplace": "Bild ersetzen",
165
+ "optionImageTooLarge": "Bild zu groß (max. 5 MB).",
166
+ "optionImageUpload": "Datei hochladen",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Bezeichnung",
160
169
  "options": "Optionen",
161
170
  "optionValue": "Wert",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Nachricht, die bei erfolgreicher Übermittlung angezeigt wird",
247
256
  "successMessagePlaceholder": "Formular erfolgreich übermittelt!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Bezeichnung..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Bezeichnung",
251
263
  "type": "Typ",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Close",
6
6
  "create": "Create",
7
7
  "delete": "Delete",
8
+ "other": "Other",
8
9
  "retry": "Retry",
9
10
  "save": "Save",
10
11
  "submit": "Submit",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "No parent fields available",
157
158
  "objectMapping": "Object Mapping",
158
159
  "objectMappingDesc": "Map properties from the source object to a new structure",
160
+ "optionImageAdd": "Add image",
161
+ "optionImageError": "Unable to process image.",
162
+ "optionImageInvalid": "Unsupported image format.",
163
+ "optionImageRemove": "Remove image",
164
+ "optionImageReplace": "Replace image",
165
+ "optionImageTooLarge": "Image too large (max 5 MB).",
166
+ "optionImageUpload": "Upload file",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Label",
160
169
  "options": "Options",
161
170
  "optionValue": "Value",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Message displayed when submission succeeds",
247
256
  "successMessagePlaceholder": "Form submitted successfully!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Label..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Label",
251
263
  "type": "Type",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Cerrar",
6
6
  "create": "Crear",
7
7
  "delete": "Eliminar",
8
+ "other": "Otro",
8
9
  "retry": "Reintentar",
9
10
  "save": "Guardar",
10
11
  "submit": "Enviar",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "No hay campos principales disponibles",
157
158
  "objectMapping": "Mapeo de objetos",
158
159
  "objectMappingDesc": "Mapear las propiedades del objeto de origen a una nueva estructura",
160
+ "optionImageAdd": "Agregar imagen",
161
+ "optionImageError": "No se pudo procesar la imagen.",
162
+ "optionImageInvalid": "Formato de imagen no compatible.",
163
+ "optionImageRemove": "Quitar imagen",
164
+ "optionImageReplace": "Reemplazar imagen",
165
+ "optionImageTooLarge": "Imagen demasiado grande (máx. 5 MB).",
166
+ "optionImageUpload": "Subir archivo",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Etiqueta",
160
169
  "options": "Opciones",
161
170
  "optionValue": "Valor",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Mensaje mostrado cuando el envío es exitoso",
247
256
  "successMessagePlaceholder": "¡Formulario enviado exitosamente!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Etiqueta..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Etiqueta",
251
263
  "type": "Tipo",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Fermer",
6
6
  "create": "Créer",
7
7
  "delete": "Supprimer",
8
+ "other": "Autre",
8
9
  "retry": "Réessayer",
9
10
  "save": "Enregistrer",
10
11
  "submit": "Soumettre",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "Aucun champ parent disponible",
157
158
  "objectMapping": "Mappage d'objet",
158
159
  "objectMappingDesc": "Mapper les propriétés de l'objet source vers une nouvelle structure",
160
+ "optionImageAdd": "Ajouter une image",
161
+ "optionImageError": "Impossible de traiter l'image.",
162
+ "optionImageInvalid": "Format d'image non pris en charge.",
163
+ "optionImageRemove": "Retirer l'image",
164
+ "optionImageReplace": "Remplacer l'image",
165
+ "optionImageTooLarge": "Image trop volumineuse (max 5 Mo).",
166
+ "optionImageUpload": "Importer un fichier",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Libellé",
160
169
  "options": "Options",
161
170
  "optionValue": "Valeur",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Message affiché en cas de soumission réussie",
247
256
  "successMessagePlaceholder": "Formulaire soumis avec succès !"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Libellé..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Libellé",
251
263
  "type": "Type",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Chiudi",
6
6
  "create": "Crea",
7
7
  "delete": "Elimina",
8
+ "other": "Altro",
8
9
  "retry": "Riprova",
9
10
  "save": "Salva",
10
11
  "submit": "Invia",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "Nessun campo genitore disponibile",
157
158
  "objectMapping": "Mappatura oggetto",
158
159
  "objectMappingDesc": "Mappa le proprietà dell'oggetto sorgente su una nuova struttura",
160
+ "optionImageAdd": "Aggiungi immagine",
161
+ "optionImageError": "Impossibile elaborare l'immagine.",
162
+ "optionImageInvalid": "Formato immagine non supportato.",
163
+ "optionImageRemove": "Rimuovi immagine",
164
+ "optionImageReplace": "Sostituisci immagine",
165
+ "optionImageTooLarge": "Immagine troppo grande (max 5 MB).",
166
+ "optionImageUpload": "Carica file",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Etichetta",
160
169
  "options": "Opzioni",
161
170
  "optionValue": "Valore",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Messaggio visualizzato quando l'invio ha successo",
247
256
  "successMessagePlaceholder": "Modulo inviato con successo!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Etichetta..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Etichetta",
251
263
  "type": "Tipo",
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  "close": "Fechar",
6
6
  "create": "Criar",
7
7
  "delete": "Excluir",
8
+ "other": "Outro",
8
9
  "retry": "Tentar novamente",
9
10
  "save": "Salvar",
10
11
  "submit": "Enviar",
@@ -156,6 +157,14 @@ declare const _default: {
156
157
  "noParentFieldsAvailable": "Nenhum campo pai disponível",
157
158
  "objectMapping": "Mapeamento de objeto",
158
159
  "objectMappingDesc": "Mapear as propriedades do objeto de origem para uma nova estrutura",
160
+ "optionImageAdd": "Adicionar imagem",
161
+ "optionImageError": "Não foi possível processar a imagem.",
162
+ "optionImageInvalid": "Formato de imagem não suportado.",
163
+ "optionImageRemove": "Remover imagem",
164
+ "optionImageReplace": "Substituir imagem",
165
+ "optionImageTooLarge": "Imagem muito grande (máx. 5 MB).",
166
+ "optionImageUpload": "Enviar arquivo",
167
+ "optionImageUrlPlaceholder": "https://...",
159
168
  "optionLabel": "Rótulo",
160
169
  "options": "Opções",
161
170
  "optionValue": "Valor",
@@ -246,6 +255,9 @@ declare const _default: {
246
255
  "successMessageDesc": "Mensagem exibida quando o envio é bem-sucedido",
247
256
  "successMessagePlaceholder": "Formulário enviado com sucesso!"
248
257
  },
258
+ "treegeNode": {
259
+ "labelPlaceholder": "Rótulo..."
260
+ },
249
261
  "uiNodeForm": {
250
262
  "label": "Rótulo",
251
263
  "type": "Tipo",
@@ -22,6 +22,11 @@ export type InputOption = {
22
22
  * Whether the option is disabled and cannot be selected
23
23
  */
24
24
  disabled?: boolean;
25
+ /**
26
+ * Optional image for the option, stored as base64 data URL.
27
+ * Currently displayed by radio inputs; automatically resized and compressed on upload.
28
+ */
29
+ image?: string;
25
30
  };
26
31
  export type BaseNodeData = {
27
32
  /**
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, r as o, s, u as c } from "./ThemeContext-cNnjiSPY.js";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, r as o, s, u as c } from "./ThemeContext-D49eu_oE.js";
2
2
  import { Fragment as l, createContext as u, useCallback as d, useContext as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
3
3
  import _ from "dompurify";
4
4
  //#region src/renderer/context/TreegeConfigContext.tsx
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.29",
5
+ "version": "3.0.0-beta.30",
6
6
  "type": "module",
7
7
  "types": "./dist/main.d.ts",
8
8
  "module": "./dist/main.js",