treege 3.0.0-beta.72 → 3.0.0-beta.74

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/dist/renderer.js CHANGED
@@ -1,5 +1,5 @@
1
- import { A as e, L as t, a as n, c as r, g as i, h as a, i as o, k as s, l as c, m as l, n as u, o as d, r as f, s as p, t as m } from "./ThemeContext-BGeTYtnw.js";
2
- import { C as h, S as g, _, a as v, b as y, c as b, d as x, g as S, h as C, i as w, m as T, n as E, o as D, r as O, u as k, v as A, x as j, y as M } from "./DefaultSubmitButton-C_141kVj.js";
3
- import { a as N, c as P, i as F, l as I, n as L, o as R, r as z, s as B } from "./useRenderNode-eqCek6JX.js";
4
- import { i as V, n as H, r as U, t as W } from "./renderer-D5xQw7hp.js";
5
- export { h as DefaultAddressInput, g as DefaultAutocompleteInput, j as DefaultCheckboxInput, y as DefaultDateInput, M as DefaultDateRangeInput, A as DefaultFileInput, _ as DefaultHiddenInput, S as DefaultHttpInput, C as DefaultNumberInput, T as DefaultPasswordInput, x as DefaultRadioInput, k as DefaultSelectInput, b as DefaultSwitchInput, D as DefaultTextAreaInput, v as DefaultTextInput, w as DefaultTimeInput, O as DefaultTimeRangeInput, H as Divider, m as ThemeProvider, U as Title, W as TreegeRenderer, P as TreegeRendererProvider, f as applyReferenceTransformation, o as buildInitialFormValues, n as calculateReferenceFieldUpdates, d as checkFormFieldHasValue, p as convertFormValuesToNamedFormat, E as defaultInputRenderers, V as defaultUI, R as evaluateCondition, B as evaluateConditions, l as fileToSerializable, a as filesToSerializable, z as findStartNode, F as getFlowRenderState, t as getTranslatedText, r as isFieldEmpty, N as isStartNode, c as resolveNodeDefaultValue, s as sanitize, e as sanitizeHttpResponse, i as serializableToFile, u as useTheme, L as useTreegeRenderer, I as useTreegeRendererConfig };
1
+ import { B as e, M as t, N as n, a as r, c as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, r as f, s as p, t as m } from "./ThemeContext-CSH4Fupd.js";
2
+ import { C as h, S as g, _, a as v, b as y, c as b, d as x, g as S, h as C, i as w, m as T, n as E, o as D, r as O, u as k, v as A, x as j, y as M } from "./DefaultSubmitButton-BT4AxAnR.js";
3
+ import { a as N, c as P, i as F, l as I, n as L, o as R, r as z, s as B } from "./useRenderNode-GobhZp-Y.js";
4
+ import { i as V, n as H, r as U, t as W } from "./renderer-D9Yaxr2H.js";
5
+ export { h as DefaultAddressInput, g as DefaultAutocompleteInput, j as DefaultCheckboxInput, y as DefaultDateInput, M as DefaultDateRangeInput, A as DefaultFileInput, _ as DefaultHiddenInput, S as DefaultHttpInput, C as DefaultNumberInput, T as DefaultPasswordInput, x as DefaultRadioInput, k as DefaultSelectInput, b as DefaultSwitchInput, D as DefaultTextAreaInput, v as DefaultTextInput, w as DefaultTimeInput, O as DefaultTimeRangeInput, H as Divider, m as ThemeProvider, U as Title, W as TreegeRenderer, P as TreegeRendererProvider, f as applyReferenceTransformation, s as buildInitialFormValues, r as calculateReferenceFieldUpdates, d as checkFormFieldHasValue, p as convertFormValuesToNamedFormat, E as defaultInputRenderers, V as defaultUI, R as evaluateCondition, B as evaluateConditions, l as fileToSerializable, o as filesToSerializable, z as findStartNode, F as getFlowRenderState, e as getTranslatedText, i as isFieldEmpty, N as isStartNode, c as resolveNodeDefaultValue, t as sanitize, n as sanitizeHttpResponse, a as serializableToFile, u as useTheme, L as useTreegeRenderer, I as useTreegeRendererConfig };
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "الاسم",
202
202
  "nameDescription": "اسم حقل مخصص اختياري لتصدير النموذج. إذا كان فارغاً، سيتم استخدام التسمية كمفتاح.",
203
203
  "noParentFieldsAvailable": "لا توجد حقول أصلية متاحة",
204
+ "normalizeLabels": "توحيد التسميات",
205
+ "normalizeLabelsHint": "تنسيق التسميات الواردة من واجهة برمجة التطبيقات (مثل الأحرف الكبيرة) إلى شكل موحّد وسهل القراءة. لا تتأثر الخيارات المُدخلة يدويًا.",
204
206
  "objectMapping": "تعيين الكائن",
205
207
  "objectMappingDesc": "تعيين خصائص الكائن المصدر إلى بنية جديدة",
206
208
  "optional": "اختياري",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "فشل في جلب البيانات. يرجى التحقق من اتصالك بالشبكة.",
412
414
  "httpError": "خطأ HTTP {status}: {statusText}",
415
+ "invalidJson": "استجابة الخادم ليست JSON صالحة. تحقق من عنوان URL وعنوان URL الأساسي والمصادقة.",
413
416
  "noDataAvailable": "لا توجد بيانات متاحة. قم بتكوين \"جلب عند التحميل\" أو أضف معامل بحث.",
414
417
  "noResults": "لم يتم العثور على نتائج.",
415
418
  "noUrlConfigured": "لم يتم تكوين رابط. يرجى إضافة عنوان URL في إعدادات HTTP.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Name",
202
202
  "nameDescription": "Optionaler benutzerdefinierter Feldname für den Formularexport. Falls leer, wird die Bezeichnung als Schlüssel verwendet.",
203
203
  "noParentFieldsAvailable": "Keine übergeordneten Felder verfügbar",
204
+ "normalizeLabels": "Beschriftungen normalisieren",
205
+ "normalizeLabelsHint": "Bereinigt von der API gelieferte Beschriftungen (z. B. GROSSBUCHSTABEN) zu einer einheitlichen, lesbaren Form. Manuell eingegebene Optionen sind nicht betroffen.",
204
206
  "objectMapping": "Objektzuordnung",
205
207
  "objectMappingDesc": "Eigenschaften des Quellobjekts auf eine neue Struktur abbilden",
206
208
  "optional": "Optional",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Fehler beim Abrufen der Daten. Bitte überprüfen Sie Ihre Netzwerkverbindung.",
412
414
  "httpError": "HTTP-Fehler {status}: {statusText}",
415
+ "invalidJson": "Die Serverantwort ist kein gültiges JSON. Überprüfen Sie die URL, die Basis-URL und die Authentifizierung.",
413
416
  "noDataAvailable": "Keine Daten verfügbar. Konfigurieren Sie \"Beim Laden abrufen\" oder fügen Sie einen Suchparameter hinzu.",
414
417
  "noResults": "Keine Ergebnisse gefunden.",
415
418
  "noUrlConfigured": "Keine URL konfiguriert. Bitte fügen Sie eine URL in der HTTP-Konfiguration hinzu.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Name",
202
202
  "nameDescription": "Optional custom field name for form export. If empty, the label will be used as the key.",
203
203
  "noParentFieldsAvailable": "No parent fields available",
204
+ "normalizeLabels": "Normalize labels",
205
+ "normalizeLabelsHint": "Clean up labels coming from the API (e.g. ALL CAPS) into a uniform, readable form. Manually-typed options are not affected.",
204
206
  "objectMapping": "Object Mapping",
205
207
  "objectMappingDesc": "Map properties from the source object to a new structure",
206
208
  "optional": "Optional",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Failed to fetch data. Please check your network connection.",
412
414
  "httpError": "HTTP Error {status}: {statusText}",
415
+ "invalidJson": "The server response is not valid JSON. Check the URL, base URL and authentication.",
413
416
  "noDataAvailable": "No data available. Configure \"Fetch on mount\" or add a search parameter.",
414
417
  "noResults": "No results found.",
415
418
  "noUrlConfigured": "No URL configured. Please add a URL in the HTTP configuration.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Nombre",
202
202
  "nameDescription": "Nombre de campo personalizado opcional para la exportación del formulario. Si está vacío, la etiqueta se usará como clave.",
203
203
  "noParentFieldsAvailable": "No hay campos principales disponibles",
204
+ "normalizeLabels": "Normalizar etiquetas",
205
+ "normalizeLabelsHint": "Limpia las etiquetas que vienen de la API (p. ej. EN MAYÚSCULAS) a una forma uniforme y legible. Las opciones escritas a mano no se ven afectadas.",
204
206
  "objectMapping": "Mapeo de objetos",
205
207
  "objectMappingDesc": "Mapear las propiedades del objeto de origen a una nueva estructura",
206
208
  "optional": "Opcional",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Error al obtener los datos. Por favor, verifique su conexión de red.",
412
414
  "httpError": "Error HTTP {status}: {statusText}",
415
+ "invalidJson": "La respuesta del servidor no es un JSON válido. Verifica la URL, la URL base y la autenticación.",
413
416
  "noDataAvailable": "No hay datos disponibles. Configure \"Cargar al montar\" o agregue un parámetro de búsqueda.",
414
417
  "noResults": "No se encontraron resultados.",
415
418
  "noUrlConfigured": "No hay URL configurada. Por favor, agregue una URL en la configuración HTTP.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Nom",
202
202
  "nameDescription": "Nom de champ personnalisé optionnel pour l'export du formulaire. Si vide, le libellé sera utilisé comme clé.",
203
203
  "noParentFieldsAvailable": "Aucun champ parent disponible",
204
+ "normalizeLabels": "Normaliser les libellés",
205
+ "normalizeLabelsHint": "Nettoie les libellés venant de l'API (ex : EN MAJUSCULES) pour un rendu uniforme et lisible. Les options saisies à la main ne sont pas affectées.",
204
206
  "objectMapping": "Mappage d'objet",
205
207
  "objectMappingDesc": "Mapper les propriétés de l'objet source vers une nouvelle structure",
206
208
  "optional": "Optionnel",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Échec de la récupération des données. Veuillez vérifier votre connexion réseau.",
412
414
  "httpError": "Erreur HTTP {status} : {statusText}",
415
+ "invalidJson": "La réponse du serveur n'est pas un JSON valide. Vérifiez l'URL, le baseUrl et l'authentification.",
413
416
  "noDataAvailable": "Aucune donnée disponible. Configurez \"Charger au montage\" ou ajoutez un paramètre de recherche.",
414
417
  "noResults": "Aucun résultat trouvé.",
415
418
  "noUrlConfigured": "Aucune URL configurée. Veuillez ajouter une URL dans la configuration HTTP.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Nome",
202
202
  "nameDescription": "Nome campo personalizzato opzionale per l'esportazione del modulo. Se vuoto, l'etichetta verrà utilizzata come chiave.",
203
203
  "noParentFieldsAvailable": "Nessun campo genitore disponibile",
204
+ "normalizeLabels": "Normalizza le etichette",
205
+ "normalizeLabelsHint": "Uniforma le etichette provenienti dall'API (es. TUTTO MAIUSCOLO) in una forma leggibile. Le opzioni inserite manualmente non vengono modificate.",
204
206
  "objectMapping": "Mappatura oggetto",
205
207
  "objectMappingDesc": "Mappa le proprietà dell'oggetto sorgente su una nuova struttura",
206
208
  "optional": "Opzionale",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Impossibile recuperare i dati. Controlla la tua connessione di rete.",
412
414
  "httpError": "Errore HTTP {status}: {statusText}",
415
+ "invalidJson": "La risposta del server non è un JSON valido. Verifica l'URL, l'URL di base e l'autenticazione.",
413
416
  "noDataAvailable": "Nessun dato disponibile. Configura \"Carica al montaggio\" o aggiungi un parametro di ricerca.",
414
417
  "noResults": "Nessun risultato trovato.",
415
418
  "noUrlConfigured": "Nessun URL configurato. Aggiungi un URL nella configurazione HTTP.",
@@ -201,6 +201,8 @@ declare const _default: {
201
201
  "name": "Nome",
202
202
  "nameDescription": "Nome de campo personalizado opcional para exportação de formulário. Se vazio, o rótulo será usado como chave.",
203
203
  "noParentFieldsAvailable": "Nenhum campo pai disponível",
204
+ "normalizeLabels": "Normalizar rótulos",
205
+ "normalizeLabelsHint": "Limpa os rótulos vindos da API (ex.: MAIÚSCULAS) para um formato uniforme e legível. As opções digitadas manualmente não são afetadas.",
204
206
  "objectMapping": "Mapeamento de objeto",
205
207
  "objectMappingDesc": "Mapear as propriedades do objeto de origem para uma nova estrutura",
206
208
  "optional": "Opcional",
@@ -410,6 +412,7 @@ declare const _default: {
410
412
  "defaultHttpInput": {
411
413
  "fetchFailed": "Falha ao buscar dados. Por favor, verifique sua conexão de rede.",
412
414
  "httpError": "Erro HTTP {status}: {statusText}",
415
+ "invalidJson": "A resposta do servidor não é um JSON válido. Verifique a URL, a URL base e a autenticação.",
413
416
  "noDataAvailable": "Nenhum dado disponível. Configure \"Buscar na montagem\" ou adicione um parâmetro de pesquisa.",
414
417
  "noResults": "Nenhum resultado encontrado.",
415
418
  "noUrlConfigured": "Nenhuma URL configurada. Por favor, adicione uma URL na configuração HTTP.",
@@ -273,6 +273,13 @@ export type InputNodeData = BaseNodeData & {
273
273
  * When set, overrides the static `options` array.
274
274
  */
275
275
  optionsSource?: OptionsSource;
276
+ /**
277
+ * Whether labels fetched from an API (dynamic `optionsSource` or an `http`
278
+ * input's `responseMapping`) are normalized to a uniform, readable Title Case
279
+ * form (e.g. "DUPONT JEAN" -> "Dupont Jean"). Manually-typed static option
280
+ * labels are never affected. Defaults to `true` when unset.
281
+ */
282
+ normalizeOptionLabels?: boolean;
276
283
  /**
277
284
  * Submit configuration for the input field (used with type="submit")
278
285
  */
@@ -0,0 +1,21 @@
1
+ import { Translatable } from '../types/translate';
2
+ /**
3
+ * Normalizes a raw label string into a uniform, readable Title Case form.
4
+ *
5
+ * Designed for labels coming from an API where casing is often inconsistent
6
+ * (ALL CAPS, snake_case, kebab-case, camelCase). Each word gets an uppercase
7
+ * first letter and a lowercase remainder, with separators collapsed to single
8
+ * spaces:
9
+ *
10
+ * "DUPONT JEAN" -> "Dupont Jean"
11
+ * "admin_user" -> "Admin User"
12
+ * "dateNaissance" -> "Date Naissance"
13
+ *
14
+ * Empty/whitespace-only input is returned unchanged.
15
+ */
16
+ export declare const normalizeLabel: (text: string) => string;
17
+ /**
18
+ * Applies {@link normalizeLabel} to every language entry of a `Translatable`
19
+ * label, preserving its shape.
20
+ */
21
+ export declare const normalizeTranslatableLabel: (label: Translatable) => Translatable;