treege 3.0.0-beta.71 → 3.0.0-beta.73
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/{DefaultSubmitButton-C_141kVj.js → DefaultSubmitButton-VU_Lwicd.js} +580 -575
- package/dist/{ThemeContext-BGeTYtnw.js → ThemeContext-CmyrtNyt.js} +64 -48
- package/dist/{editor-CkCA6_WX.js → editor-DLXwqtbI.js} +1884 -1882
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/utils/http.d.ts +16 -0
- package/dist/renderer-native.js +1091 -1086
- package/dist/{renderer-D5xQw7hp.js → renderer-pYP47xsl.js} +22 -22
- package/dist/renderer.js +5 -5
- package/dist/shared/locales/ar.json.d.ts +1 -0
- package/dist/shared/locales/de.json.d.ts +1 -0
- package/dist/shared/locales/en.json.d.ts +1 -0
- package/dist/shared/locales/es.json.d.ts +1 -0
- package/dist/shared/locales/fr.json.d.ts +1 -0
- package/dist/shared/locales/it.json.d.ts +1 -0
- package/dist/shared/locales/pt.json.d.ts +1 -0
- package/dist/{useRenderNode-eqCek6JX.js → useRenderNode-D1d8JGbe.js} +154 -154
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as a, B as o, L as s, R as c, V as l, n as u, st as d, t as f, z as p } from "./DefaultSubmitButton-
|
|
3
|
-
import { a as m, l as h, n as g, t as _ } from "./useRenderNode-
|
|
1
|
+
import { B as e, M as t, N as n, k as r, t as i } from "./ThemeContext-CmyrtNyt.js";
|
|
2
|
+
import { $ as a, B as o, L as s, R as c, V as l, n as u, st as d, t as f, z as p } from "./DefaultSubmitButton-VU_Lwicd.js";
|
|
3
|
+
import { a as m, l as h, n as g, t as _ } from "./useRenderNode-D1d8JGbe.js";
|
|
4
4
|
import { useCallback as v, useMemo as y, useState as b } from "react";
|
|
5
5
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.tsx
|
|
@@ -9,9 +9,9 @@ var w = ({ children: e, id: t, onSubmit: n }) => /* @__PURE__ */ S("form", {
|
|
|
9
9
|
onSubmit: n,
|
|
10
10
|
className: "tg:mx-auto tg:max-w-2xl tg:gap-y-3",
|
|
11
11
|
children: e
|
|
12
|
-
}), T = ({ children: e, missingFields:
|
|
13
|
-
let
|
|
14
|
-
return
|
|
12
|
+
}), T = ({ children: e, missingFields: t = [] }) => {
|
|
13
|
+
let n = t.length > 0, i = r();
|
|
14
|
+
return n ? /* @__PURE__ */ S(o, { children: /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(l, {
|
|
15
15
|
asChild: !0,
|
|
16
16
|
children: /* @__PURE__ */ S("span", {
|
|
17
17
|
className: "tg:inline-flex",
|
|
@@ -24,11 +24,11 @@ var w = ({ children: e, id: t, onSubmit: n }) => /* @__PURE__ */ S("form", {
|
|
|
24
24
|
children: [i("renderer.defaultSubmitButton.requiredFieldsMissing"), ":"]
|
|
25
25
|
}), /* @__PURE__ */ S("ul", {
|
|
26
26
|
className: "tg:list-inside tg:list-disc",
|
|
27
|
-
children:
|
|
27
|
+
children: t.map((e, t) => /* @__PURE__ */ S("li", { children: e }, t))
|
|
28
28
|
})]
|
|
29
29
|
}) })] }) }) : e;
|
|
30
|
-
}, ee = ({ step:
|
|
31
|
-
let p =
|
|
30
|
+
}, ee = ({ step: t, label: n, children: i, canGoBack: a, isLastStep: o, canContinue: s, isSubmitting: c, onBack: l, onContinue: u, missingFields: d }) => {
|
|
31
|
+
let p = r(), m = h(), g = m?.components?.submitButton || f, _ = m?.components?.submitButtonWrapper || T, v = !s || c, y = t.nodes.find((t) => e(t) && t.data.type === "submit"), b = y && e(y) ? p(y.data.label) : void 0, x = /* @__PURE__ */ S(g, {
|
|
32
32
|
type: "button",
|
|
33
33
|
onClick: u,
|
|
34
34
|
disabled: v,
|
|
@@ -42,7 +42,7 @@ var w = ({ children: e, id: t, onSubmit: n }) => /* @__PURE__ */ S("form", {
|
|
|
42
42
|
className: "tg:mb-4 tg:font-semibold tg:text-lg",
|
|
43
43
|
children: n
|
|
44
44
|
}),
|
|
45
|
-
|
|
45
|
+
i,
|
|
46
46
|
/* @__PURE__ */ C("div", {
|
|
47
47
|
className: "tg:mt-6 tg:flex tg:items-center tg:justify-between tg:gap-2",
|
|
48
48
|
children: [a ? /* @__PURE__ */ S("button", {
|
|
@@ -59,23 +59,23 @@ var w = ({ children: e, id: t, onSubmit: n }) => /* @__PURE__ */ S("form", {
|
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
}, E = ({ node: e }) => {
|
|
62
|
-
let
|
|
63
|
-
return
|
|
62
|
+
let t = r()(e.data?.label);
|
|
63
|
+
return t ? /* @__PURE__ */ C("div", {
|
|
64
64
|
className: "tg:flex tg:items-center tg:gap-x-3",
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ S(s, { className: "tg:my-8 tg:flex-1" }),
|
|
67
67
|
/* @__PURE__ */ S("h4", {
|
|
68
68
|
className: "tg:font-semibold tg:text-sm",
|
|
69
|
-
children:
|
|
69
|
+
children: t
|
|
70
70
|
}),
|
|
71
71
|
/* @__PURE__ */ S(s, { className: "tg:my-8 tg:flex-1" })
|
|
72
72
|
]
|
|
73
73
|
}) : /* @__PURE__ */ S(s, { className: "tg:my-8" });
|
|
74
|
-
}, D = ({ node:
|
|
75
|
-
let { edges:
|
|
74
|
+
}, D = ({ node: e }) => {
|
|
75
|
+
let { edges: t } = n(), i = r();
|
|
76
76
|
return /* @__PURE__ */ S("h2", {
|
|
77
|
-
className: d("tg:mb-5 tg:font-bold tg:text-2xl", !m(
|
|
78
|
-
children: i(
|
|
77
|
+
className: d("tg:mb-5 tg:font-bold tg:text-2xl", !m(e.id, t) && "tg:mt-10"),
|
|
78
|
+
children: i(e.data?.label)
|
|
79
79
|
});
|
|
80
80
|
}, O = {
|
|
81
81
|
divider: E,
|
|
@@ -125,10 +125,10 @@ var A = () => /* @__PURE__ */ C("section", {
|
|
|
125
125
|
href: "treege-renderer",
|
|
126
126
|
precedence: "default",
|
|
127
127
|
children: j
|
|
128
|
-
}), M = ({ baseUrl: e, components:
|
|
128
|
+
}), M = ({ baseUrl: e, components: n, className: r, flow: o, formId: s, googleApiKey: c, headers: l, language: p, onBack: m, onChange: h, onSubmit: x, showPoweredBy: E, theme: D, validate: k, validationMode: j, initialValues: M = {}, isLoading: re = !1, isSubmitting: ie = !1 }) => {
|
|
129
129
|
let { canContinueStep: N, canSubmit: ae, clearSubmitMessage: P, config: F, currentStep: I, currentStepGroupNode: L, currentStepIndex: oe, firstErrorFieldId: R, formErrors: z, formValues: B, goToNextStep: V, goToPreviousStep: H, handleSubmit: U, hasSubmitInput: W, inputNodes: G, isFirstStep: K, isLastStep: q, isSubmitting: se, missingRequiredFields: J, setFieldValue: Y, steps: ce, submitMessage: X, t: Z } = g({
|
|
130
130
|
baseUrl: e,
|
|
131
|
-
components:
|
|
131
|
+
components: n,
|
|
132
132
|
flow: o,
|
|
133
133
|
googleApiKey: c,
|
|
134
134
|
headers: l,
|
|
@@ -189,13 +189,13 @@ var A = () => /* @__PURE__ */ C("section", {
|
|
|
189
189
|
]), ve = !K || !!m;
|
|
190
190
|
return /* @__PURE__ */ S("div", {
|
|
191
191
|
ref: ue,
|
|
192
|
-
className: d("treege treege-renderer",
|
|
192
|
+
className: d("treege treege-renderer", r),
|
|
193
193
|
children: /* @__PURE__ */ C(a, {
|
|
194
194
|
container: le,
|
|
195
|
-
children: [/* @__PURE__ */ S(ne, {}), /* @__PURE__ */ S(
|
|
195
|
+
children: [/* @__PURE__ */ S(ne, {}), /* @__PURE__ */ S(i, {
|
|
196
196
|
theme: F.theme,
|
|
197
197
|
storageKey: "treege-renderer-theme",
|
|
198
|
-
children: re ? /* @__PURE__ */ S(me, {}) : /* @__PURE__ */ C(
|
|
198
|
+
children: re ? /* @__PURE__ */ S(me, {}) : /* @__PURE__ */ C(t, {
|
|
199
199
|
value: {
|
|
200
200
|
baseUrl: F.baseUrl,
|
|
201
201
|
flow: o,
|
package/dist/renderer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e,
|
|
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-
|
|
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-
|
|
4
|
-
import { i as V, n as H, r as U, t as W } from "./renderer-
|
|
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,
|
|
1
|
+
import { A as e, R as t, a as n, c as r, g as i, h as a, i as o, j 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-CmyrtNyt.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-VU_Lwicd.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-D1d8JGbe.js";
|
|
4
|
+
import { i as V, n as H, r as U, t as W } from "./renderer-pYP47xsl.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, e as sanitize, s as sanitizeHttpResponse, i as serializableToFile, u as useTheme, L as useTreegeRenderer, I as useTreegeRendererConfig };
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "فشل في جلب البيانات. يرجى التحقق من اتصالك بالشبكة.",
|
|
412
412
|
"httpError": "خطأ HTTP {status}: {statusText}",
|
|
413
|
+
"invalidJson": "استجابة الخادم ليست JSON صالحة. تحقق من عنوان URL وعنوان URL الأساسي والمصادقة.",
|
|
413
414
|
"noDataAvailable": "لا توجد بيانات متاحة. قم بتكوين \"جلب عند التحميل\" أو أضف معامل بحث.",
|
|
414
415
|
"noResults": "لم يتم العثور على نتائج.",
|
|
415
416
|
"noUrlConfigured": "لم يتم تكوين رابط. يرجى إضافة عنوان URL في إعدادات HTTP.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Fehler beim Abrufen der Daten. Bitte überprüfen Sie Ihre Netzwerkverbindung.",
|
|
412
412
|
"httpError": "HTTP-Fehler {status}: {statusText}",
|
|
413
|
+
"invalidJson": "Die Serverantwort ist kein gültiges JSON. Überprüfen Sie die URL, die Basis-URL und die Authentifizierung.",
|
|
413
414
|
"noDataAvailable": "Keine Daten verfügbar. Konfigurieren Sie \"Beim Laden abrufen\" oder fügen Sie einen Suchparameter hinzu.",
|
|
414
415
|
"noResults": "Keine Ergebnisse gefunden.",
|
|
415
416
|
"noUrlConfigured": "Keine URL konfiguriert. Bitte fügen Sie eine URL in der HTTP-Konfiguration hinzu.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Failed to fetch data. Please check your network connection.",
|
|
412
412
|
"httpError": "HTTP Error {status}: {statusText}",
|
|
413
|
+
"invalidJson": "The server response is not valid JSON. Check the URL, base URL and authentication.",
|
|
413
414
|
"noDataAvailable": "No data available. Configure \"Fetch on mount\" or add a search parameter.",
|
|
414
415
|
"noResults": "No results found.",
|
|
415
416
|
"noUrlConfigured": "No URL configured. Please add a URL in the HTTP configuration.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Error al obtener los datos. Por favor, verifique su conexión de red.",
|
|
412
412
|
"httpError": "Error HTTP {status}: {statusText}",
|
|
413
|
+
"invalidJson": "La respuesta del servidor no es un JSON válido. Verifica la URL, la URL base y la autenticación.",
|
|
413
414
|
"noDataAvailable": "No hay datos disponibles. Configure \"Cargar al montar\" o agregue un parámetro de búsqueda.",
|
|
414
415
|
"noResults": "No se encontraron resultados.",
|
|
415
416
|
"noUrlConfigured": "No hay URL configurada. Por favor, agregue una URL en la configuración HTTP.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Échec de la récupération des données. Veuillez vérifier votre connexion réseau.",
|
|
412
412
|
"httpError": "Erreur HTTP {status} : {statusText}",
|
|
413
|
+
"invalidJson": "La réponse du serveur n'est pas un JSON valide. Vérifiez l'URL, le baseUrl et l'authentification.",
|
|
413
414
|
"noDataAvailable": "Aucune donnée disponible. Configurez \"Charger au montage\" ou ajoutez un paramètre de recherche.",
|
|
414
415
|
"noResults": "Aucun résultat trouvé.",
|
|
415
416
|
"noUrlConfigured": "Aucune URL configurée. Veuillez ajouter une URL dans la configuration HTTP.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Impossibile recuperare i dati. Controlla la tua connessione di rete.",
|
|
412
412
|
"httpError": "Errore HTTP {status}: {statusText}",
|
|
413
|
+
"invalidJson": "La risposta del server non è un JSON valido. Verifica l'URL, l'URL di base e l'autenticazione.",
|
|
413
414
|
"noDataAvailable": "Nessun dato disponibile. Configura \"Carica al montaggio\" o aggiungi un parametro di ricerca.",
|
|
414
415
|
"noResults": "Nessun risultato trovato.",
|
|
415
416
|
"noUrlConfigured": "Nessun URL configurato. Aggiungi un URL nella configurazione HTTP.",
|
|
@@ -410,6 +410,7 @@ declare const _default: {
|
|
|
410
410
|
"defaultHttpInput": {
|
|
411
411
|
"fetchFailed": "Falha ao buscar dados. Por favor, verifique sua conexão de rede.",
|
|
412
412
|
"httpError": "Erro HTTP {status}: {statusText}",
|
|
413
|
+
"invalidJson": "A resposta do servidor não é um JSON válido. Verifique a URL, a URL base e a autenticação.",
|
|
413
414
|
"noDataAvailable": "Nenhum dado disponível. Configure \"Buscar na montagem\" ou adicione um parâmetro de pesquisa.",
|
|
414
415
|
"noResults": "Nenhum resultado encontrado.",
|
|
415
416
|
"noUrlConfigured": "Nenhuma URL configurada. Por favor, adicione uma URL na configuração HTTP.",
|