treege 3.0.0-beta.91 → 3.0.0-beta.93
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 +1 -0
- package/dist/{DefaultSubmitButton-NeSDqyzv.js → DefaultSubmitButton-DNVIV9BO.js} +1 -1
- package/dist/{ThemeContext-CPsC8QIP.js → ThemeContext-CE3SE9DG.js} +8 -8
- package/dist/{editor-DJbNgLSF.js → editor-BCLrbh2J.js} +4 -4
- package/dist/editor.js +2 -2
- package/dist/main.js +5 -5
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/types/renderer.d.ts +12 -0
- package/dist/renderer-Bnoq_K2n.js +449 -0
- package/dist/renderer-native.js +222 -214
- package/dist/renderer.js +4 -4
- package/dist/{useRenderNode-CG466pNk.js → useRenderNode-BPgpYSyg.js} +1 -1
- package/package.json +1 -1
- package/dist/renderer-CNbSt_QW.js +0 -446
package/dist/renderer-native.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as e, D as t, F as n, M as r, N as i, P as a, R as o, T as s, V as c, X as l, _ as u, a as d, b as f, c as p, g as m, h, i as g, k as _, l as v, m as y, n as b, o as x, q as S, r as C, s as ee, t as w, v as T, w as te, x as
|
|
2
|
-
import { a as
|
|
3
|
-
import { useCallback as
|
|
1
|
+
import { B as e, D as t, F as n, M as r, N as i, P as a, R as o, T as s, V as c, X as l, _ as u, a as d, b as f, c as p, g as m, h, i as g, k as _, l as v, m as y, n as b, o as x, q as S, r as C, s as ee, t as w, v as T, w as te, x as E, y as D, z as ne } from "./ThemeContext-CE3SE9DG.js";
|
|
2
|
+
import { a as O, c as k, i as A, l as j, n as re, o as ie, r as ae, s as M, t as N } from "./useRenderNode-BPgpYSyg.js";
|
|
3
|
+
import { useCallback as oe, useEffect as se, useMemo as ce, useRef as P, useState as F } from "react";
|
|
4
4
|
import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
5
5
|
import { ActivityIndicator as le, Alert as ue, Animated as de, FlatList as fe, Image as pe, Modal as me, ScrollView as he, StyleSheet as z, Switch as ge, Text as B, TextInput as _e, TouchableOpacity as V, View as H } from "react-native";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
@@ -53,12 +53,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
53
53
|
return console.error("Google Places fetch error:", e), [];
|
|
54
54
|
}
|
|
55
55
|
}, we = ({ field: e, extra: t }) => {
|
|
56
|
-
let [r, i] = F(""), [a, o] = F([]), [s, l] = F(!1), [u, d] = F(!1), { value: f, placeholder: p, id: m, name: h } = e, { InputLabel: g, node: _, setValue: v, error: y, label: x, helperText: S } = t, { language: C, googleApiKey: ee } = c(), w = n(), { colors: T } = b(), te =
|
|
56
|
+
let [r, i] = F(""), [a, o] = F([]), [s, l] = F(!1), [u, d] = F(!1), { value: f, placeholder: p, id: m, name: h } = e, { InputLabel: g, node: _, setValue: v, error: y, label: x, helperText: S } = t, { language: C, googleApiKey: ee } = c(), w = n(), { colors: T } = b(), te = oe((e) => {
|
|
57
57
|
v(e.value), i(""), l(!1), o([]);
|
|
58
|
-
}, [v]),
|
|
58
|
+
}, [v]), E = () => {
|
|
59
59
|
l(!1);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return se(() => {
|
|
62
62
|
if (!r || r.trim().length < 3) {
|
|
63
63
|
o([]), d(!1);
|
|
64
64
|
return;
|
|
@@ -109,11 +109,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
109
109
|
visible: s,
|
|
110
110
|
transparent: !0,
|
|
111
111
|
animationType: "fade",
|
|
112
|
-
onRequestClose:
|
|
112
|
+
onRequestClose: E,
|
|
113
113
|
children: /* @__PURE__ */ L(V, {
|
|
114
114
|
style: U.modalOverlay,
|
|
115
115
|
activeOpacity: 1,
|
|
116
|
-
onPress:
|
|
116
|
+
onPress: E,
|
|
117
117
|
children: /* @__PURE__ */ R(V, {
|
|
118
118
|
style: [U.modalContent, { backgroundColor: T.card }],
|
|
119
119
|
activeOpacity: 1,
|
|
@@ -125,7 +125,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
125
125
|
style: [U.modalTitle, { color: T.text }],
|
|
126
126
|
children: x || p || w("renderer.defaultAddressInput.enterAddress")
|
|
127
127
|
}), /* @__PURE__ */ L(V, {
|
|
128
|
-
onPress:
|
|
128
|
+
onPress: E,
|
|
129
129
|
children: /* @__PURE__ */ L(B, {
|
|
130
130
|
style: [U.closeButton, { color: T.textMuted }],
|
|
131
131
|
children: "✕"
|
|
@@ -771,7 +771,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
771
771
|
isCurrentMonth: !1
|
|
772
772
|
});
|
|
773
773
|
return r;
|
|
774
|
-
}, [y, S]), T =
|
|
774
|
+
}, [y, S]), T = oe((e) => {
|
|
775
775
|
c.data.disablePast && e < v || (l(e.toISOString()), i(!1));
|
|
776
776
|
}, [
|
|
777
777
|
c.data.disablePast,
|
|
@@ -779,9 +779,9 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
779
779
|
l
|
|
780
780
|
]), te = () => {
|
|
781
781
|
S === 0 ? (C(11), x(y - 1)) : C(S - 1);
|
|
782
|
-
},
|
|
782
|
+
}, E = () => {
|
|
783
783
|
S === 11 ? (C(0), x(y + 1)) : C(S + 1);
|
|
784
|
-
},
|
|
784
|
+
}, D = () => h ? h.toLocaleDateString() : o || m("renderer.defaultInputs.selectDate"), ne = (e) => c.data.disablePast ? e < v : !1, O = (e) => h ? e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear() : !1;
|
|
785
785
|
return /* @__PURE__ */ R(H, {
|
|
786
786
|
style: K.container,
|
|
787
787
|
children: [
|
|
@@ -807,7 +807,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
807
807
|
!a && { color: p.textMuted }
|
|
808
808
|
],
|
|
809
809
|
numberOfLines: 1,
|
|
810
|
-
children:
|
|
810
|
+
children: D()
|
|
811
811
|
}), /* @__PURE__ */ L(B, {
|
|
812
812
|
style: K.icon,
|
|
813
813
|
children: "📅"
|
|
@@ -860,7 +860,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
860
860
|
]
|
|
861
861
|
}),
|
|
862
862
|
/* @__PURE__ */ L(V, {
|
|
863
|
-
onPress:
|
|
863
|
+
onPress: E,
|
|
864
864
|
style: K.navButton,
|
|
865
865
|
children: /* @__PURE__ */ L(B, {
|
|
866
866
|
style: [K.navButtonText, { color: p.primary }],
|
|
@@ -892,7 +892,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
892
892
|
style: K.calendar,
|
|
893
893
|
contentContainerStyle: K.calendarContent,
|
|
894
894
|
renderItem: ({ item: e }) => {
|
|
895
|
-
let t =
|
|
895
|
+
let t = ne(e.date), n = O(e.date);
|
|
896
896
|
return /* @__PURE__ */ L(V, {
|
|
897
897
|
style: [
|
|
898
898
|
K.dayCell,
|
|
@@ -1052,7 +1052,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1052
1052
|
"October",
|
|
1053
1053
|
"November",
|
|
1054
1054
|
"December"
|
|
1055
|
-
],
|
|
1055
|
+
], E = ce(() => {
|
|
1056
1056
|
let e = new Date(C, w, 1).getDay(), t = new Date(C, w + 1, 0).getDate(), n = new Date(C, w, 0).getDate(), r = [];
|
|
1057
1057
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1058
1058
|
date: new Date(C, w - 1, n - t),
|
|
@@ -1071,7 +1071,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1071
1071
|
isCurrentMonth: !1
|
|
1072
1072
|
});
|
|
1073
1073
|
return r;
|
|
1074
|
-
}, [C, w]),
|
|
1074
|
+
}, [C, w]), D = oe((e) => {
|
|
1075
1075
|
l.data.disablePast && e < S || (a ? (u([e.toISOString(), v?.toISOString()]), o(!1)) : (u(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), i(!1), o(!0)));
|
|
1076
1076
|
}, [
|
|
1077
1077
|
l.data.disablePast,
|
|
@@ -1080,11 +1080,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1080
1080
|
_,
|
|
1081
1081
|
v,
|
|
1082
1082
|
u
|
|
1083
|
-
]),
|
|
1083
|
+
]), ne = () => {
|
|
1084
1084
|
w === 0 ? (T(11), ee(C - 1)) : T(w - 1);
|
|
1085
|
-
},
|
|
1085
|
+
}, O = () => {
|
|
1086
1086
|
w === 11 ? (T(0), ee(C + 1)) : T(w + 1);
|
|
1087
|
-
},
|
|
1087
|
+
}, k = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : m("renderer.defaultInputs.selectDateRange"), A = (e) => l.data.disablePast ? e < S : !1, j = (e) => _ && v ? e >= _ && e <= v : !1, re = (e) => {
|
|
1088
1088
|
if (!(_ || v)) return !1;
|
|
1089
1089
|
let t = _ && e.getDate() === _.getDate() && e.getMonth() === _.getMonth() && e.getFullYear() === _.getFullYear(), n = v && e.getDate() === v.getDate() && e.getMonth() === v.getMonth() && e.getFullYear() === v.getFullYear();
|
|
1090
1090
|
return t || n;
|
|
@@ -1114,7 +1114,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1114
1114
|
!_ && { color: h.textMuted }
|
|
1115
1115
|
],
|
|
1116
1116
|
numberOfLines: 1,
|
|
1117
|
-
children:
|
|
1117
|
+
children: k()
|
|
1118
1118
|
}), /* @__PURE__ */ L(B, {
|
|
1119
1119
|
style: q.icon,
|
|
1120
1120
|
children: "📅"
|
|
@@ -1158,7 +1158,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1158
1158
|
style: q.calendarHeader,
|
|
1159
1159
|
children: [
|
|
1160
1160
|
/* @__PURE__ */ L(V, {
|
|
1161
|
-
onPress:
|
|
1161
|
+
onPress: ne,
|
|
1162
1162
|
style: q.navButton,
|
|
1163
1163
|
children: /* @__PURE__ */ L(B, {
|
|
1164
1164
|
style: [q.navButtonText, { color: h.primary }],
|
|
@@ -1174,7 +1174,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1174
1174
|
]
|
|
1175
1175
|
}),
|
|
1176
1176
|
/* @__PURE__ */ L(V, {
|
|
1177
|
-
onPress:
|
|
1177
|
+
onPress: O,
|
|
1178
1178
|
style: q.navButton,
|
|
1179
1179
|
children: /* @__PURE__ */ L(B, {
|
|
1180
1180
|
style: [q.navButtonText, { color: h.primary }],
|
|
@@ -1199,14 +1199,14 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1199
1199
|
}, e))
|
|
1200
1200
|
}),
|
|
1201
1201
|
/* @__PURE__ */ L(fe, {
|
|
1202
|
-
data:
|
|
1202
|
+
data: E,
|
|
1203
1203
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1204
1204
|
numColumns: 7,
|
|
1205
1205
|
scrollEnabled: !1,
|
|
1206
1206
|
style: q.calendar,
|
|
1207
1207
|
contentContainerStyle: q.calendarContent,
|
|
1208
1208
|
renderItem: ({ item: e }) => {
|
|
1209
|
-
let t =
|
|
1209
|
+
let t = A(e.date), n = j(e.date), r = re(e.date);
|
|
1210
1210
|
return /* @__PURE__ */ L(V, {
|
|
1211
1211
|
style: [
|
|
1212
1212
|
q.dayCell,
|
|
@@ -1218,7 +1218,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1218
1218
|
},
|
|
1219
1219
|
t && q.dayCellDisabled
|
|
1220
1220
|
],
|
|
1221
|
-
onPress: () =>
|
|
1221
|
+
onPress: () => D(e.date),
|
|
1222
1222
|
disabled: t,
|
|
1223
1223
|
activeOpacity: .7,
|
|
1224
1224
|
children: /* @__PURE__ */ L(B, {
|
|
@@ -1358,7 +1358,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1358
1358
|
marginBottom: 8
|
|
1359
1359
|
}
|
|
1360
1360
|
}), je = ({ field: e, extra: t }) => {
|
|
1361
|
-
let [r, i] = F(null), [a, o] = F(!0), { value: s } = e, { InputLabel: c, node: l, setValue: d, error: f, label: p, helperText: m } = t, { colors: h } = b(), g = n(), _ =
|
|
1361
|
+
let [r, i] = F(null), [a, o] = F(!0), { value: s } = e, { InputLabel: c, node: l, setValue: d, error: f, label: p, helperText: m } = t, { colors: h } = b(), g = n(), _ = D(s), v = l.data.multiple, y = oe(async () => {
|
|
1362
1362
|
if (r) try {
|
|
1363
1363
|
let e = (await r({ allowMultiSelection: v })).map((e) => ({
|
|
1364
1364
|
data: e.uri,
|
|
@@ -1377,11 +1377,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1377
1377
|
v,
|
|
1378
1378
|
d,
|
|
1379
1379
|
g
|
|
1380
|
-
]), x =
|
|
1380
|
+
]), x = oe((e) => {
|
|
1381
1381
|
let t = _.filter((t, n) => n !== e);
|
|
1382
1382
|
d(t.length > 0 ? t : null);
|
|
1383
1383
|
}, [_, d]);
|
|
1384
|
-
return
|
|
1384
|
+
return se(() => {
|
|
1385
1385
|
(async () => {
|
|
1386
1386
|
try {
|
|
1387
1387
|
let { pick: e } = await import("react-native-document-picker");
|
|
@@ -1582,11 +1582,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1582
1582
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1583
1583
|
return n ? encodeURIComponent(a) : a;
|
|
1584
1584
|
}), Re = ({ field: e, extra: o }) => {
|
|
1585
|
-
let [l, u] = F(!1), [d, f] = F(null), [p, m] = F([]), [h, g] = F(""), [v, y] = F(!1), { value: x, placeholder: S } = e, { InputLabel: C, node: w, setValue: T, error:
|
|
1586
|
-
|
|
1585
|
+
let [l, u] = F(!1), [d, f] = F(null), [p, m] = F([]), [h, g] = F(""), [v, y] = F(!1), { value: x, placeholder: S } = e, { InputLabel: C, node: w, setValue: T, error: D, label: O, helperText: k, missingDependencies: A } = o, { formValues: j, inputNodes: re, headers: ie, baseUrl: ae } = c(), { colors: M } = b(), { httpConfig: N } = w.data, I = n(), ue = P(!1), de = P(!1), pe = P(""), he = P(N), z = P(j), ge = P(re), ve = P(ie), ye = P(ae), be = P(T), xe = P(null), Se = P(null), Ce = P(w.data.normalizeOptionLabels !== !1), we = ce(() => N?.url ? Fe(N.url) : [], [N?.url]), U = we.length > 0, Ee = ce(() => we.map((e) => `${e}:${String(j[e] ?? "")}`).join("|"), [we, j]), De = ce(() => N?.url ? U ? Ie(N.url, j) : !0 : !1, [
|
|
1586
|
+
N?.url,
|
|
1587
1587
|
U,
|
|
1588
|
-
|
|
1589
|
-
]), W =
|
|
1588
|
+
j
|
|
1589
|
+
]), W = oe(async (e) => {
|
|
1590
1590
|
Se.current && Se.current.abort();
|
|
1591
1591
|
let n = new AbortController();
|
|
1592
1592
|
Se.current = n;
|
|
@@ -1620,7 +1620,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1620
1620
|
f(I("renderer.defaultHttpInput.invalidJson"));
|
|
1621
1621
|
return;
|
|
1622
1622
|
}
|
|
1623
|
-
let b =
|
|
1623
|
+
let b = ne(y.value), x = o.responsePath ? t(b, o.responsePath) : b;
|
|
1624
1624
|
if (o.responseMapping && Array.isArray(x)) {
|
|
1625
1625
|
let { valueField: e = "value", labelField: n = "label", descriptionField: r, imageField: i } = o.responseMapping, a = Ce.current;
|
|
1626
1626
|
m(x.map((o) => {
|
|
@@ -1628,7 +1628,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1628
1628
|
return {
|
|
1629
1629
|
description: s != null && s !== "" ? String(s) : void 0,
|
|
1630
1630
|
image: typeof c == "string" && c !== "" ? c : void 0,
|
|
1631
|
-
label: a ?
|
|
1631
|
+
label: a ? E(l) : l,
|
|
1632
1632
|
value: String(t(o, e) || "")
|
|
1633
1633
|
};
|
|
1634
1634
|
}));
|
|
@@ -1640,25 +1640,25 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1640
1640
|
Se.current === n && (u(!1), Se.current = null);
|
|
1641
1641
|
}
|
|
1642
1642
|
}, [I]);
|
|
1643
|
-
if (
|
|
1644
|
-
he.current =
|
|
1643
|
+
if (se(() => {
|
|
1644
|
+
he.current = N, z.current = j, ge.current = re, ve.current = ie, ye.current = ae, be.current = T, xe.current = W, Ce.current = w.data.normalizeOptionLabels !== !1;
|
|
1645
1645
|
}, [
|
|
1646
|
-
|
|
1647
|
-
|
|
1646
|
+
N,
|
|
1647
|
+
j,
|
|
1648
|
+
re,
|
|
1648
1649
|
ie,
|
|
1649
1650
|
ae,
|
|
1650
|
-
oe,
|
|
1651
1651
|
T,
|
|
1652
1652
|
W,
|
|
1653
1653
|
w.data.normalizeOptionLabels
|
|
1654
|
-
]),
|
|
1654
|
+
]), se(() => () => {
|
|
1655
1655
|
Se.current && Se.current.abort(), ue.current = !1, de.current = !1;
|
|
1656
|
-
}, []),
|
|
1656
|
+
}, []), se(() => {
|
|
1657
1657
|
if (ue.current) return;
|
|
1658
1658
|
ue.current = !0;
|
|
1659
1659
|
let e = he.current, t = z.current, n = xe.current, r = e?.url && Ie(e.url, t);
|
|
1660
1660
|
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Fe(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1661
|
-
}, []),
|
|
1661
|
+
}, []), se(() => {
|
|
1662
1662
|
if (!ue.current || !U || pe.current === Ee || !De) return;
|
|
1663
1663
|
let e = setTimeout(() => {
|
|
1664
1664
|
W(), pe.current = Ee;
|
|
@@ -1669,7 +1669,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1669
1669
|
U,
|
|
1670
1670
|
De,
|
|
1671
1671
|
W
|
|
1672
|
-
]),
|
|
1672
|
+
]), se(() => {
|
|
1673
1673
|
if (!de.current) {
|
|
1674
1674
|
de.current = !0;
|
|
1675
1675
|
return;
|
|
@@ -1677,65 +1677,65 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1677
1677
|
let e = he.current, t = z.current, n = xe.current, r = e?.url && Ie(e.url, t);
|
|
1678
1678
|
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Fe(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1679
1679
|
}, [ce(() => JSON.stringify({
|
|
1680
|
-
body:
|
|
1681
|
-
fetchOnMount:
|
|
1682
|
-
headers:
|
|
1683
|
-
method:
|
|
1684
|
-
queryParams:
|
|
1685
|
-
responseMapping:
|
|
1686
|
-
responsePath:
|
|
1687
|
-
searchParam:
|
|
1688
|
-
sendAllFormValues:
|
|
1689
|
-
url:
|
|
1690
|
-
}), [
|
|
1691
|
-
if (!(
|
|
1680
|
+
body: N?.body,
|
|
1681
|
+
fetchOnMount: N?.fetchOnMount,
|
|
1682
|
+
headers: N?.headers,
|
|
1683
|
+
method: N?.method,
|
|
1684
|
+
queryParams: N?.queryParams,
|
|
1685
|
+
responseMapping: N?.responseMapping,
|
|
1686
|
+
responsePath: N?.responsePath,
|
|
1687
|
+
searchParam: N?.searchParam,
|
|
1688
|
+
sendAllFormValues: N?.sendAllFormValues,
|
|
1689
|
+
url: N?.url
|
|
1690
|
+
}), [N])]), se(() => {
|
|
1691
|
+
if (!(N?.searchParam && h)) return;
|
|
1692
1692
|
let e = setTimeout(() => {
|
|
1693
1693
|
W(h);
|
|
1694
1694
|
}, 300);
|
|
1695
1695
|
return () => clearTimeout(e);
|
|
1696
1696
|
}, [
|
|
1697
1697
|
h,
|
|
1698
|
-
|
|
1698
|
+
N?.searchParam,
|
|
1699
1699
|
W
|
|
1700
|
-
]),
|
|
1700
|
+
]), N?.responseMapping) {
|
|
1701
1701
|
let e = Array.isArray(x) ? x[0] : x, t = p.find((t) => t.value === e);
|
|
1702
|
-
if (
|
|
1703
|
-
let n = l &&
|
|
1702
|
+
if (N.searchParam) {
|
|
1703
|
+
let n = l && N?.showLoading;
|
|
1704
1704
|
return /* @__PURE__ */ R(H, {
|
|
1705
1705
|
style: Y.container,
|
|
1706
1706
|
children: [
|
|
1707
1707
|
/* @__PURE__ */ L(C, {
|
|
1708
|
-
label:
|
|
1708
|
+
label: O,
|
|
1709
1709
|
required: w.data.required
|
|
1710
1710
|
}),
|
|
1711
1711
|
/* @__PURE__ */ L(Ne, {
|
|
1712
|
-
missing:
|
|
1712
|
+
missing: A,
|
|
1713
1713
|
children: /* @__PURE__ */ R(V, {
|
|
1714
1714
|
style: [
|
|
1715
1715
|
Y.trigger,
|
|
1716
1716
|
{
|
|
1717
|
-
backgroundColor:
|
|
1718
|
-
borderColor:
|
|
1717
|
+
backgroundColor: M.input,
|
|
1718
|
+
borderColor: M.border
|
|
1719
1719
|
},
|
|
1720
|
-
|
|
1721
|
-
|
|
1720
|
+
D && { borderColor: M.error },
|
|
1721
|
+
A.length > 0 && { backgroundColor: M.muted }
|
|
1722
1722
|
],
|
|
1723
1723
|
onPress: () => y(!0),
|
|
1724
|
-
disabled:
|
|
1724
|
+
disabled: A.length > 0,
|
|
1725
1725
|
activeOpacity: .7,
|
|
1726
1726
|
children: [
|
|
1727
1727
|
/* @__PURE__ */ L(B, {
|
|
1728
1728
|
style: [
|
|
1729
1729
|
Y.triggerText,
|
|
1730
|
-
{ color:
|
|
1731
|
-
!t && { color:
|
|
1730
|
+
{ color: M.text },
|
|
1731
|
+
!t && { color: M.textMuted }
|
|
1732
1732
|
],
|
|
1733
1733
|
numberOfLines: 1,
|
|
1734
1734
|
children: t?.label || S || I("renderer.defaultHttpInput.search")
|
|
1735
1735
|
}),
|
|
1736
1736
|
n && /* @__PURE__ */ L(le, {
|
|
1737
1737
|
size: "small",
|
|
1738
|
-
color:
|
|
1738
|
+
color: M.primary,
|
|
1739
1739
|
style: Y.triggerLoader
|
|
1740
1740
|
}),
|
|
1741
1741
|
e ? /* @__PURE__ */ L(V, {
|
|
@@ -1748,12 +1748,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1748
1748
|
},
|
|
1749
1749
|
style: Y.clearButton,
|
|
1750
1750
|
children: /* @__PURE__ */ L(B, {
|
|
1751
|
-
style: [Y.clearIcon, { color:
|
|
1751
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1752
1752
|
children: "✕"
|
|
1753
1753
|
})
|
|
1754
1754
|
}) : null,
|
|
1755
1755
|
/* @__PURE__ */ L(B, {
|
|
1756
|
-
style: [Y.arrow, { color:
|
|
1756
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1757
1757
|
children: "▼"
|
|
1758
1758
|
})
|
|
1759
1759
|
]
|
|
@@ -1769,19 +1769,19 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1769
1769
|
activeOpacity: 1,
|
|
1770
1770
|
onPress: () => y(!1),
|
|
1771
1771
|
children: /* @__PURE__ */ R(V, {
|
|
1772
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1772
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1773
1773
|
activeOpacity: 1,
|
|
1774
1774
|
onPress: () => {},
|
|
1775
1775
|
children: [
|
|
1776
1776
|
/* @__PURE__ */ R(H, {
|
|
1777
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1777
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1778
1778
|
children: [/* @__PURE__ */ L(B, {
|
|
1779
|
-
style: [Y.modalTitle, { color:
|
|
1780
|
-
children:
|
|
1779
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1780
|
+
children: O || S || I("renderer.defaultHttpInput.search")
|
|
1781
1781
|
}), /* @__PURE__ */ L(V, {
|
|
1782
1782
|
onPress: () => y(!1),
|
|
1783
1783
|
children: /* @__PURE__ */ L(B, {
|
|
1784
|
-
style: [Y.closeButton, { color:
|
|
1784
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1785
1785
|
children: "✕"
|
|
1786
1786
|
})
|
|
1787
1787
|
})]
|
|
@@ -1790,12 +1790,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1790
1790
|
style: Y.searchContainer,
|
|
1791
1791
|
children: /* @__PURE__ */ L(_e, {
|
|
1792
1792
|
style: [Y.searchInput, {
|
|
1793
|
-
backgroundColor:
|
|
1794
|
-
borderColor:
|
|
1795
|
-
color:
|
|
1793
|
+
backgroundColor: M.muted,
|
|
1794
|
+
borderColor: M.border,
|
|
1795
|
+
color: M.text
|
|
1796
1796
|
}],
|
|
1797
1797
|
placeholder: I("renderer.defaultHttpInput.search"),
|
|
1798
|
-
placeholderTextColor:
|
|
1798
|
+
placeholderTextColor: M.textMuted,
|
|
1799
1799
|
value: h,
|
|
1800
1800
|
onChangeText: (e) => {
|
|
1801
1801
|
g(e), f(null);
|
|
@@ -1809,18 +1809,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1809
1809
|
style: Y.loadingContainer,
|
|
1810
1810
|
children: /* @__PURE__ */ L(le, {
|
|
1811
1811
|
size: "small",
|
|
1812
|
-
color:
|
|
1812
|
+
color: M.primary
|
|
1813
1813
|
})
|
|
1814
1814
|
}) : d ? /* @__PURE__ */ R(H, {
|
|
1815
1815
|
style: Y.errorContainer,
|
|
1816
1816
|
children: [/* @__PURE__ */ L(B, {
|
|
1817
|
-
style: [Y.errorText, { color:
|
|
1817
|
+
style: [Y.errorText, { color: M.error }],
|
|
1818
1818
|
children: d
|
|
1819
1819
|
}), /* @__PURE__ */ L(V, {
|
|
1820
1820
|
onPress: () => W(h),
|
|
1821
1821
|
style: Y.retryButton,
|
|
1822
1822
|
children: /* @__PURE__ */ L(B, {
|
|
1823
|
-
style: [Y.retryButtonText, { color:
|
|
1823
|
+
style: [Y.retryButtonText, { color: M.primary }],
|
|
1824
1824
|
children: I("renderer.defaultHttpInput.retry")
|
|
1825
1825
|
})
|
|
1826
1826
|
})]
|
|
@@ -1832,14 +1832,14 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1832
1832
|
ListEmptyComponent: /* @__PURE__ */ L(H, {
|
|
1833
1833
|
style: Y.emptyContainer,
|
|
1834
1834
|
children: /* @__PURE__ */ L(B, {
|
|
1835
|
-
style: [Y.emptyText, { color:
|
|
1835
|
+
style: [Y.emptyText, { color: M.textMuted }],
|
|
1836
1836
|
children: I("renderer.defaultHttpInput.noResults")
|
|
1837
1837
|
})
|
|
1838
1838
|
}),
|
|
1839
1839
|
renderItem: ({ item: t }) => {
|
|
1840
1840
|
let n = t.value === e;
|
|
1841
1841
|
return /* @__PURE__ */ R(V, {
|
|
1842
|
-
style: [Y.option, n && { backgroundColor:
|
|
1842
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1843
1843
|
onPress: () => {
|
|
1844
1844
|
T(t.value), y(!1);
|
|
1845
1845
|
},
|
|
@@ -1849,7 +1849,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1849
1849
|
description: t.description,
|
|
1850
1850
|
image: t.image
|
|
1851
1851
|
}), n && /* @__PURE__ */ L(B, {
|
|
1852
|
-
style: [Y.checkmark, { color:
|
|
1852
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1853
1853
|
children: "✓"
|
|
1854
1854
|
})]
|
|
1855
1855
|
});
|
|
@@ -1859,36 +1859,36 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1859
1859
|
})
|
|
1860
1860
|
})
|
|
1861
1861
|
}),
|
|
1862
|
-
|
|
1863
|
-
style: [Y.error, { color:
|
|
1864
|
-
children:
|
|
1862
|
+
D && /* @__PURE__ */ L(B, {
|
|
1863
|
+
style: [Y.error, { color: M.error }],
|
|
1864
|
+
children: D
|
|
1865
1865
|
}),
|
|
1866
|
-
|
|
1867
|
-
style: [Y.helperText, { color:
|
|
1868
|
-
children:
|
|
1866
|
+
k && !D && /* @__PURE__ */ L(B, {
|
|
1867
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
1868
|
+
children: k
|
|
1869
1869
|
})
|
|
1870
1870
|
]
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
|
-
let n = l &&
|
|
1873
|
+
let n = l && N?.showLoading, r = A.length === 0 && p.length === 0 && !n ? d ?? I("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1874
1874
|
return /* @__PURE__ */ R(H, {
|
|
1875
1875
|
style: Y.container,
|
|
1876
1876
|
children: [
|
|
1877
1877
|
/* @__PURE__ */ L(C, {
|
|
1878
|
-
label:
|
|
1878
|
+
label: O,
|
|
1879
1879
|
required: w.data.required
|
|
1880
1880
|
}),
|
|
1881
1881
|
/* @__PURE__ */ L(Ne, {
|
|
1882
|
-
missing:
|
|
1882
|
+
missing: A,
|
|
1883
1883
|
children: /* @__PURE__ */ R(V, {
|
|
1884
1884
|
style: [
|
|
1885
1885
|
Y.trigger,
|
|
1886
1886
|
{
|
|
1887
|
-
backgroundColor:
|
|
1888
|
-
borderColor:
|
|
1887
|
+
backgroundColor: M.input,
|
|
1888
|
+
borderColor: M.border
|
|
1889
1889
|
},
|
|
1890
|
-
|
|
1891
|
-
(n || p.length === 0) && { backgroundColor:
|
|
1890
|
+
D && { borderColor: M.error },
|
|
1891
|
+
(n || p.length === 0) && { backgroundColor: M.muted }
|
|
1892
1892
|
],
|
|
1893
1893
|
onPress: () => y(!0),
|
|
1894
1894
|
disabled: n || p.length === 0,
|
|
@@ -1897,15 +1897,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1897
1897
|
/* @__PURE__ */ L(B, {
|
|
1898
1898
|
style: [
|
|
1899
1899
|
Y.triggerText,
|
|
1900
|
-
{ color:
|
|
1901
|
-
!t && { color:
|
|
1900
|
+
{ color: M.text },
|
|
1901
|
+
!t && { color: M.textMuted }
|
|
1902
1902
|
],
|
|
1903
1903
|
numberOfLines: 1,
|
|
1904
1904
|
children: t?.label || S || I("renderer.defaultHttpInput.selectOption")
|
|
1905
1905
|
}),
|
|
1906
1906
|
n && /* @__PURE__ */ L(le, {
|
|
1907
1907
|
size: "small",
|
|
1908
|
-
color:
|
|
1908
|
+
color: M.primary,
|
|
1909
1909
|
style: Y.triggerLoader
|
|
1910
1910
|
}),
|
|
1911
1911
|
e ? /* @__PURE__ */ L(V, {
|
|
@@ -1918,19 +1918,19 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1918
1918
|
},
|
|
1919
1919
|
style: Y.clearButton,
|
|
1920
1920
|
children: /* @__PURE__ */ L(B, {
|
|
1921
|
-
style: [Y.clearIcon, { color:
|
|
1921
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1922
1922
|
children: "✕"
|
|
1923
1923
|
})
|
|
1924
1924
|
}) : null,
|
|
1925
1925
|
/* @__PURE__ */ L(B, {
|
|
1926
|
-
style: [Y.arrow, { color:
|
|
1926
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1927
1927
|
children: "▼"
|
|
1928
1928
|
})
|
|
1929
1929
|
]
|
|
1930
1930
|
})
|
|
1931
1931
|
}),
|
|
1932
1932
|
r && /* @__PURE__ */ L(B, {
|
|
1933
|
-
style: [Y.disabledMessage, { color:
|
|
1933
|
+
style: [Y.disabledMessage, { color: M.error }],
|
|
1934
1934
|
children: r
|
|
1935
1935
|
}),
|
|
1936
1936
|
/* @__PURE__ */ L(me, {
|
|
@@ -1943,18 +1943,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1943
1943
|
activeOpacity: 1,
|
|
1944
1944
|
onPress: () => y(!1),
|
|
1945
1945
|
children: /* @__PURE__ */ R(V, {
|
|
1946
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1946
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1947
1947
|
activeOpacity: 1,
|
|
1948
1948
|
onPress: () => {},
|
|
1949
1949
|
children: [/* @__PURE__ */ R(H, {
|
|
1950
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1950
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1951
1951
|
children: [/* @__PURE__ */ L(B, {
|
|
1952
|
-
style: [Y.modalTitle, { color:
|
|
1953
|
-
children:
|
|
1952
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1953
|
+
children: O || S || I("renderer.defaultHttpInput.selectOption")
|
|
1954
1954
|
}), /* @__PURE__ */ L(V, {
|
|
1955
1955
|
onPress: () => y(!1),
|
|
1956
1956
|
children: /* @__PURE__ */ L(B, {
|
|
1957
|
-
style: [Y.closeButton, { color:
|
|
1957
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1958
1958
|
children: "✕"
|
|
1959
1959
|
})
|
|
1960
1960
|
})]
|
|
@@ -1966,7 +1966,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1966
1966
|
renderItem: ({ item: t }) => {
|
|
1967
1967
|
let n = t.value === e;
|
|
1968
1968
|
return /* @__PURE__ */ R(V, {
|
|
1969
|
-
style: [Y.option, n && { backgroundColor:
|
|
1969
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1970
1970
|
onPress: () => {
|
|
1971
1971
|
T(t.value), y(!1);
|
|
1972
1972
|
},
|
|
@@ -1976,7 +1976,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1976
1976
|
description: t.description,
|
|
1977
1977
|
image: t.image
|
|
1978
1978
|
}), n && /* @__PURE__ */ L(B, {
|
|
1979
|
-
style: [Y.checkmark, { color:
|
|
1979
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1980
1980
|
children: "✓"
|
|
1981
1981
|
})]
|
|
1982
1982
|
});
|
|
@@ -1985,13 +1985,13 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
1985
1985
|
})
|
|
1986
1986
|
})
|
|
1987
1987
|
}),
|
|
1988
|
-
|
|
1989
|
-
style: [Y.error, { color:
|
|
1990
|
-
children:
|
|
1988
|
+
D && /* @__PURE__ */ L(B, {
|
|
1989
|
+
style: [Y.error, { color: M.error }],
|
|
1990
|
+
children: D
|
|
1991
1991
|
}),
|
|
1992
|
-
|
|
1993
|
-
style: [Y.helperText, { color:
|
|
1994
|
-
children:
|
|
1992
|
+
k && !D && /* @__PURE__ */ L(B, {
|
|
1993
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
1994
|
+
children: k
|
|
1995
1995
|
})
|
|
1996
1996
|
]
|
|
1997
1997
|
});
|
|
@@ -2000,25 +2000,25 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2000
2000
|
style: Y.container,
|
|
2001
2001
|
children: [
|
|
2002
2002
|
/* @__PURE__ */ L(C, {
|
|
2003
|
-
label:
|
|
2003
|
+
label: O,
|
|
2004
2004
|
required: w.data.required
|
|
2005
2005
|
}),
|
|
2006
2006
|
/* @__PURE__ */ L(_e, {
|
|
2007
2007
|
style: [Y.input, {
|
|
2008
|
-
backgroundColor:
|
|
2009
|
-
borderColor:
|
|
2010
|
-
color:
|
|
2008
|
+
backgroundColor: M.muted,
|
|
2009
|
+
borderColor: M.border,
|
|
2010
|
+
color: M.textMuted
|
|
2011
2011
|
}],
|
|
2012
2012
|
value: typeof x == "string" ? x : JSON.stringify(x),
|
|
2013
2013
|
editable: !1
|
|
2014
2014
|
}),
|
|
2015
|
-
|
|
2016
|
-
style: [Y.error, { color:
|
|
2017
|
-
children:
|
|
2015
|
+
D && /* @__PURE__ */ L(B, {
|
|
2016
|
+
style: [Y.error, { color: M.error }],
|
|
2017
|
+
children: D
|
|
2018
2018
|
}),
|
|
2019
|
-
|
|
2020
|
-
style: [Y.helperText, { color:
|
|
2021
|
-
children:
|
|
2019
|
+
k && !D && /* @__PURE__ */ L(B, {
|
|
2020
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
2021
|
+
children: k
|
|
2022
2022
|
})
|
|
2023
2023
|
]
|
|
2024
2024
|
});
|
|
@@ -2140,7 +2140,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2140
2140
|
}
|
|
2141
2141
|
}), ze = ({ field: e, extra: t }) => {
|
|
2142
2142
|
let { value: n, placeholder: r, name: i } = e, [a, o] = F(n?.toString() ?? ""), { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = b();
|
|
2143
|
-
return
|
|
2143
|
+
return se(() => {
|
|
2144
2144
|
o(n?.toString() ?? "");
|
|
2145
2145
|
}, [n]), /* @__PURE__ */ R(H, {
|
|
2146
2146
|
style: Be.container,
|
|
@@ -2818,7 +2818,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2818
2818
|
paddingVertical: 8
|
|
2819
2819
|
}
|
|
2820
2820
|
}), Qe = ({ field: e, extra: t }) => {
|
|
2821
|
-
let { value: r, placeholder: i } = e, a = (r || "").split(":"), o = Number.parseInt(a[0], 10), s = Number.parseInt(a[1], 10), c = Number.isNaN(o) ? 0 : o, l = Number.isNaN(s) ? 0 : s, [u, d] = F(c || 0), [f, p] = F(l || 0), [m, h] = F(!1), { InputLabel: g, node: _, setValue: v, error: y, label: x, helperText: S } = t, { colors: C } = b(), ee = n(), w = P(null), T = P(null), te = Array.from({ length: 24 }, (e, t) => t),
|
|
2821
|
+
let { value: r, placeholder: i } = e, a = (r || "").split(":"), o = Number.parseInt(a[0], 10), s = Number.parseInt(a[1], 10), c = Number.isNaN(o) ? 0 : o, l = Number.isNaN(s) ? 0 : s, [u, d] = F(c || 0), [f, p] = F(l || 0), [m, h] = F(!1), { InputLabel: g, node: _, setValue: v, error: y, label: x, helperText: S } = t, { colors: C } = b(), ee = n(), w = P(null), T = P(null), te = Array.from({ length: 24 }, (e, t) => t), E = Array.from({ length: 60 }, (e, t) => t), D = () => r || i || ee("renderer.defaultInputs.selectTime"), ne = oe(() => {
|
|
2822
2822
|
v(`${String(u).padStart(2, "0")}:${String(f).padStart(2, "0")}`), h(!1);
|
|
2823
2823
|
}, [
|
|
2824
2824
|
u,
|
|
@@ -2852,7 +2852,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2852
2852
|
!r && { color: C.textMuted }
|
|
2853
2853
|
],
|
|
2854
2854
|
numberOfLines: 1,
|
|
2855
|
-
children:
|
|
2855
|
+
children: D()
|
|
2856
2856
|
}), /* @__PURE__ */ L(B, {
|
|
2857
2857
|
style: Q.icon,
|
|
2858
2858
|
children: "🕐"
|
|
@@ -2930,7 +2930,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2930
2930
|
style: Q.picker,
|
|
2931
2931
|
contentContainerStyle: Q.pickerContent,
|
|
2932
2932
|
showsVerticalScrollIndicator: !1,
|
|
2933
|
-
children:
|
|
2933
|
+
children: E.map((e) => /* @__PURE__ */ L(V, {
|
|
2934
2934
|
style: [Q.pickerItem, f === e && { backgroundColor: C.primary }],
|
|
2935
2935
|
onPress: () => p(e),
|
|
2936
2936
|
activeOpacity: .7,
|
|
@@ -2952,7 +2952,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
2952
2952
|
}),
|
|
2953
2953
|
/* @__PURE__ */ L(V, {
|
|
2954
2954
|
style: [Q.confirmButton, { backgroundColor: C.primary }],
|
|
2955
|
-
onPress:
|
|
2955
|
+
onPress: ne,
|
|
2956
2956
|
activeOpacity: .7,
|
|
2957
2957
|
children: /* @__PURE__ */ L(B, {
|
|
2958
2958
|
style: [Q.confirmButtonText, { color: C.background }],
|
|
@@ -3060,17 +3060,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3060
3060
|
fontSize: 14
|
|
3061
3061
|
}
|
|
3062
3062
|
}), $e = ({ field: e, extra: t }) => {
|
|
3063
|
-
let [r, i] = F(!1), [a, o] = F(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, { colors: m } = b(), h = n(), g = Array.isArray(s) ? s : [], _ = g[0] || "", v = g[1] || "", y = _.split(":"), x = Number.parseInt(y[0], 10), S = Number.parseInt(y[1], 10), C = Number.isNaN(x) ? 0 : x, ee = Number.isNaN(S) ? 0 : S, w = v.split(":"), T = Number.parseInt(w[0], 10), te = Number.parseInt(w[1], 10),
|
|
3064
|
-
let e = `${String(
|
|
3065
|
-
a ? (u([e, v]), o(!1),
|
|
3063
|
+
let [r, i] = F(!1), [a, o] = F(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, { colors: m } = b(), h = n(), g = Array.isArray(s) ? s : [], _ = g[0] || "", v = g[1] || "", y = _.split(":"), x = Number.parseInt(y[0], 10), S = Number.parseInt(y[1], 10), C = Number.isNaN(x) ? 0 : x, ee = Number.isNaN(S) ? 0 : S, w = v.split(":"), T = Number.parseInt(w[0], 10), te = Number.parseInt(w[1], 10), E = Number.isNaN(T) ? 0 : T, D = Number.isNaN(te) ? 0 : te, [ne, O] = F(0), [k, A] = F(0), j = Array.from({ length: 24 }, (e, t) => t), re = Array.from({ length: 60 }, (e, t) => t), ie = () => _ && v ? `${_} - ${v}` : _ || h("renderer.defaultInputs.selectTimeRange"), ae = oe(() => {
|
|
3064
|
+
let e = `${String(ne).padStart(2, "0")}:${String(k).padStart(2, "0")}`;
|
|
3065
|
+
a ? (u([e, v]), o(!1), O(E || 0), A(D || 0)) : (u([_, e]), i(!1), o(!0));
|
|
3066
3066
|
}, [
|
|
3067
3067
|
a,
|
|
3068
|
-
|
|
3069
|
-
|
|
3068
|
+
ne,
|
|
3069
|
+
k,
|
|
3070
3070
|
_,
|
|
3071
3071
|
v,
|
|
3072
|
-
ne,
|
|
3073
3072
|
E,
|
|
3073
|
+
D,
|
|
3074
3074
|
u
|
|
3075
3075
|
]);
|
|
3076
3076
|
return /* @__PURE__ */ R(H, {
|
|
@@ -3090,7 +3090,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3090
3090
|
d && { borderColor: m.error }
|
|
3091
3091
|
],
|
|
3092
3092
|
onPress: () => {
|
|
3093
|
-
|
|
3093
|
+
O(C || 0), A(ee || 0), o(!0), i(!0);
|
|
3094
3094
|
},
|
|
3095
3095
|
activeOpacity: .7,
|
|
3096
3096
|
children: [/* @__PURE__ */ L(B, {
|
|
@@ -3100,7 +3100,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3100
3100
|
!_ && { color: m.textMuted }
|
|
3101
3101
|
],
|
|
3102
3102
|
numberOfLines: 1,
|
|
3103
|
-
children:
|
|
3103
|
+
children: ie()
|
|
3104
3104
|
}), /* @__PURE__ */ L(B, {
|
|
3105
3105
|
style: $.icon,
|
|
3106
3106
|
children: "🕐"
|
|
@@ -3152,15 +3152,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3152
3152
|
style: $.picker,
|
|
3153
3153
|
contentContainerStyle: $.pickerContent,
|
|
3154
3154
|
showsVerticalScrollIndicator: !1,
|
|
3155
|
-
children:
|
|
3156
|
-
style: [$.pickerItem,
|
|
3157
|
-
onPress: () =>
|
|
3155
|
+
children: j.map((e) => /* @__PURE__ */ L(V, {
|
|
3156
|
+
style: [$.pickerItem, ne === e && { backgroundColor: m.primary }],
|
|
3157
|
+
onPress: () => O(e),
|
|
3158
3158
|
activeOpacity: .7,
|
|
3159
3159
|
children: /* @__PURE__ */ L(B, {
|
|
3160
3160
|
style: [
|
|
3161
3161
|
$.pickerItemText,
|
|
3162
3162
|
{ color: m.text },
|
|
3163
|
-
|
|
3163
|
+
ne === e && {
|
|
3164
3164
|
color: m.background,
|
|
3165
3165
|
fontWeight: "600"
|
|
3166
3166
|
}
|
|
@@ -3183,15 +3183,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3183
3183
|
style: $.picker,
|
|
3184
3184
|
contentContainerStyle: $.pickerContent,
|
|
3185
3185
|
showsVerticalScrollIndicator: !1,
|
|
3186
|
-
children:
|
|
3187
|
-
style: [$.pickerItem,
|
|
3188
|
-
onPress: () =>
|
|
3186
|
+
children: re.map((e) => /* @__PURE__ */ L(V, {
|
|
3187
|
+
style: [$.pickerItem, k === e && { backgroundColor: m.primary }],
|
|
3188
|
+
onPress: () => A(e),
|
|
3189
3189
|
activeOpacity: .7,
|
|
3190
3190
|
children: /* @__PURE__ */ L(B, {
|
|
3191
3191
|
style: [
|
|
3192
3192
|
$.pickerItemText,
|
|
3193
3193
|
{ color: m.text },
|
|
3194
|
-
|
|
3194
|
+
k === e && {
|
|
3195
3195
|
color: m.background,
|
|
3196
3196
|
fontWeight: "600"
|
|
3197
3197
|
}
|
|
@@ -3205,7 +3205,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3205
3205
|
}),
|
|
3206
3206
|
/* @__PURE__ */ L(V, {
|
|
3207
3207
|
style: [$.confirmButton, { backgroundColor: m.primary }],
|
|
3208
|
-
onPress:
|
|
3208
|
+
onPress: ae,
|
|
3209
3209
|
activeOpacity: .7,
|
|
3210
3210
|
children: /* @__PURE__ */ L(B, {
|
|
3211
3211
|
style: [$.confirmButtonText, { color: m.background }],
|
|
@@ -3490,7 +3490,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3490
3490
|
width: "100%"
|
|
3491
3491
|
} }), ft = ({ style: e }) => {
|
|
3492
3492
|
let { colors: t } = b(), n = P(new de.Value(.5)).current;
|
|
3493
|
-
return
|
|
3493
|
+
return se(() => {
|
|
3494
3494
|
let e = de.loop(de.sequence([de.timing(n, {
|
|
3495
3495
|
duration: 600,
|
|
3496
3496
|
toValue: 1,
|
|
@@ -3554,8 +3554,8 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3554
3554
|
marginBottom: 24,
|
|
3555
3555
|
width: "33%"
|
|
3556
3556
|
}
|
|
3557
|
-
}), ht = ({ baseUrl: t, components: n, contentContainerStyle: r, extraPayload: i, flow: a, googleApiKey: o, headers: s, initialValues: c, isLoading: l = !1, isSubmitting: u = !1, language: d, onBack: f, onChange: p, onSubmit: m, showPoweredBy: h, style: g, theme: _,
|
|
3558
|
-
let { colors:
|
|
3557
|
+
}), ht = ({ baseUrl: t, components: n, contentContainerStyle: r, extraPayload: i, flow: a, googleApiKey: o, headers: s, initialValues: c, isLoading: l = !1, isSubmitting: u = !1, language: d, onBack: f, onChange: p, onSubmit: m, showPoweredBy: h, style: g, theme: _, title: v, validate: y, validationMode: x }) => {
|
|
3558
|
+
let { colors: S } = b(), { canContinueStep: C, canSubmit: ee, clearSubmitMessage: w, config: T, currentStep: te, currentStepGroupNode: E, currentStepIndex: D, formErrors: ne, formValues: O, goToNextStep: k, goToPreviousStep: A, handleSubmit: j, inputNodes: ie, isFirstStep: ae, isLastStep: M, isSubmitting: se, missingRequiredFields: P, setFieldValue: F, steps: I, submitMessage: le, t: ue } = re({
|
|
3559
3559
|
baseUrl: t,
|
|
3560
3560
|
components: n,
|
|
3561
3561
|
extraPayload: i,
|
|
@@ -3568,10 +3568,10 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3568
3568
|
onSubmit: m,
|
|
3569
3569
|
showPoweredBy: h,
|
|
3570
3570
|
theme: _,
|
|
3571
|
-
validate:
|
|
3572
|
-
validationMode:
|
|
3573
|
-
}),
|
|
3574
|
-
config:
|
|
3571
|
+
validate: y,
|
|
3572
|
+
validationMode: x
|
|
3573
|
+
}), de = u || se, { FormWrapper: fe, SubmitButtonWrapper: pe, renderNode: me } = N({
|
|
3574
|
+
config: T,
|
|
3575
3575
|
DefaultFormWrapper: ve,
|
|
3576
3576
|
DefaultInputLabel: be,
|
|
3577
3577
|
DefaultInputWrapper: ut,
|
|
@@ -3579,88 +3579,91 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3579
3579
|
DefaultSubmitButtonWrapper: at,
|
|
3580
3580
|
defaultInputRenderers: et,
|
|
3581
3581
|
defaultUI: lt,
|
|
3582
|
-
formErrors:
|
|
3583
|
-
formValues:
|
|
3584
|
-
inputNodes:
|
|
3585
|
-
isSubmitting:
|
|
3586
|
-
missingRequiredFields:
|
|
3587
|
-
setFieldValue:
|
|
3588
|
-
}),
|
|
3589
|
-
if (
|
|
3590
|
-
|
|
3582
|
+
formErrors: ne,
|
|
3583
|
+
formValues: O,
|
|
3584
|
+
inputNodes: ie,
|
|
3585
|
+
isSubmitting: de,
|
|
3586
|
+
missingRequiredFields: P,
|
|
3587
|
+
setFieldValue: F
|
|
3588
|
+
}), z = T.components.step ?? tt, ge = T.components.loadingSkeleton ?? pt, _e = ce(() => ue(E?.data?.label), [ue, E]), V = ce(() => ue(v), [ue, v]), ye = oe(() => {
|
|
3589
|
+
if (M) {
|
|
3590
|
+
j();
|
|
3591
3591
|
return;
|
|
3592
3592
|
}
|
|
3593
|
-
|
|
3593
|
+
k();
|
|
3594
3594
|
}, [
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
]),
|
|
3595
|
+
M,
|
|
3596
|
+
j,
|
|
3597
|
+
k
|
|
3598
|
+
]), xe = oe(() => {
|
|
3599
3599
|
if (ae) {
|
|
3600
3600
|
f?.();
|
|
3601
3601
|
return;
|
|
3602
3602
|
}
|
|
3603
|
-
|
|
3603
|
+
A();
|
|
3604
3604
|
}, [
|
|
3605
3605
|
ae,
|
|
3606
3606
|
f,
|
|
3607
|
-
|
|
3608
|
-
]),
|
|
3609
|
-
return /* @__PURE__ */
|
|
3607
|
+
A
|
|
3608
|
+
]), Se = !ae || !!f;
|
|
3609
|
+
return /* @__PURE__ */ R(he, {
|
|
3610
3610
|
nestedScrollEnabled: !0,
|
|
3611
3611
|
style: [
|
|
3612
3612
|
_t.container,
|
|
3613
|
-
{ backgroundColor:
|
|
3613
|
+
{ backgroundColor: S.background },
|
|
3614
3614
|
g
|
|
3615
3615
|
],
|
|
3616
3616
|
contentContainerStyle: r,
|
|
3617
|
-
children:
|
|
3617
|
+
children: [V ? /* @__PURE__ */ L(B, {
|
|
3618
|
+
style: [_t.title, { color: S.text }],
|
|
3619
|
+
children: V
|
|
3620
|
+
}) : null, l ? /* @__PURE__ */ L(ge, {}) : /* @__PURE__ */ R(e, {
|
|
3618
3621
|
value: {
|
|
3619
|
-
baseUrl:
|
|
3622
|
+
baseUrl: T.baseUrl,
|
|
3620
3623
|
flow: a,
|
|
3621
|
-
formErrors:
|
|
3622
|
-
formValues:
|
|
3623
|
-
googleApiKey:
|
|
3624
|
-
headers:
|
|
3625
|
-
inputNodes:
|
|
3626
|
-
language:
|
|
3627
|
-
setFieldValue:
|
|
3624
|
+
formErrors: ne,
|
|
3625
|
+
formValues: O,
|
|
3626
|
+
googleApiKey: T.googleApiKey,
|
|
3627
|
+
headers: T.headers,
|
|
3628
|
+
inputNodes: ie,
|
|
3629
|
+
language: T.language,
|
|
3630
|
+
setFieldValue: F
|
|
3628
3631
|
},
|
|
3629
|
-
children: [/* @__PURE__ */ R(
|
|
3630
|
-
onSubmit:
|
|
3631
|
-
children: [
|
|
3632
|
-
missingFields:
|
|
3633
|
-
children: /* @__PURE__ */ L(
|
|
3634
|
-
step:
|
|
3635
|
-
groupNode:
|
|
3636
|
-
stepIndex:
|
|
3637
|
-
totalSteps:
|
|
3632
|
+
children: [/* @__PURE__ */ R(fe, {
|
|
3633
|
+
onSubmit: j,
|
|
3634
|
+
children: [te && /* @__PURE__ */ L(pe, {
|
|
3635
|
+
missingFields: P,
|
|
3636
|
+
children: /* @__PURE__ */ L(z, {
|
|
3637
|
+
step: te,
|
|
3638
|
+
groupNode: E,
|
|
3639
|
+
stepIndex: D,
|
|
3640
|
+
totalSteps: I.length,
|
|
3638
3641
|
isFirstStep: ae,
|
|
3639
|
-
isLastStep:
|
|
3640
|
-
canContinue:
|
|
3641
|
-
canGoBack:
|
|
3642
|
-
isSubmitting:
|
|
3643
|
-
onBack:
|
|
3644
|
-
onContinue:
|
|
3645
|
-
label:
|
|
3646
|
-
children:
|
|
3642
|
+
isLastStep: M,
|
|
3643
|
+
canContinue: C && (!M || ee),
|
|
3644
|
+
canGoBack: Se,
|
|
3645
|
+
isSubmitting: de,
|
|
3646
|
+
onBack: xe,
|
|
3647
|
+
onContinue: ye,
|
|
3648
|
+
label: _e,
|
|
3649
|
+
children: te.nodes.map((e) => me(e))
|
|
3647
3650
|
})
|
|
3648
|
-
}),
|
|
3649
|
-
style: [_t.poweredBy, { color:
|
|
3651
|
+
}), T.showPoweredBy && /* @__PURE__ */ L(B, {
|
|
3652
|
+
style: [_t.poweredBy, { color: S.textMuted }],
|
|
3650
3653
|
children: "Powered by Treege"
|
|
3651
3654
|
})]
|
|
3652
|
-
}),
|
|
3653
|
-
style: [_t.message, { backgroundColor:
|
|
3655
|
+
}), le && /* @__PURE__ */ R(H, {
|
|
3656
|
+
style: [_t.message, { backgroundColor: le.type === "success" ? S.successBg : S.errorBg }],
|
|
3654
3657
|
children: [/* @__PURE__ */ L(B, {
|
|
3655
|
-
style: [_t.messageText, { color:
|
|
3656
|
-
children:
|
|
3658
|
+
style: [_t.messageText, { color: le.type === "success" ? S.success : S.error }],
|
|
3659
|
+
children: le.message
|
|
3657
3660
|
}), /* @__PURE__ */ L(B, {
|
|
3658
|
-
style: [_t.messageClose, { color:
|
|
3659
|
-
onPress:
|
|
3660
|
-
children:
|
|
3661
|
+
style: [_t.messageClose, { color: le.type === "success" ? S.success : S.error }],
|
|
3662
|
+
onPress: w,
|
|
3663
|
+
children: ue("common.close")
|
|
3661
3664
|
})]
|
|
3662
3665
|
})]
|
|
3663
|
-
})
|
|
3666
|
+
})]
|
|
3664
3667
|
});
|
|
3665
3668
|
}, gt = (e) => /* @__PURE__ */ L(w, {
|
|
3666
3669
|
theme: e.theme,
|
|
@@ -3690,7 +3693,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
|
3690
3693
|
fontSize: 12,
|
|
3691
3694
|
paddingVertical: 8,
|
|
3692
3695
|
textAlign: "right"
|
|
3696
|
+
},
|
|
3697
|
+
title: {
|
|
3698
|
+
fontSize: 20,
|
|
3699
|
+
fontWeight: "700",
|
|
3700
|
+
marginBottom: 16
|
|
3693
3701
|
}
|
|
3694
3702
|
});
|
|
3695
3703
|
//#endregion
|
|
3696
|
-
export { we as DefaultAddressInput, De as DefaultAutocompleteInput, Oe as DefaultCheckboxInput, ke as DefaultDateInput, Ae as DefaultDateRangeInput, st as DefaultDividerUI, je as DefaultFileInput, Me as DefaultHiddenInput, Re as DefaultHttpInput, be as DefaultInputLabel, ze as DefaultNumberInput, Ve as DefaultPasswordInput, Ue as DefaultRadioInput, We as DefaultSelectInput, Ke as DefaultSwitchInput, Xe as DefaultTextInput, Je as DefaultTextareaInput, Qe as DefaultTimeInput, $e as DefaultTimeRangeInput, ot as DefaultTitleUI, gt as TreegeRenderer,
|
|
3704
|
+
export { we as DefaultAddressInput, De as DefaultAutocompleteInput, Oe as DefaultCheckboxInput, ke as DefaultDateInput, Ae as DefaultDateRangeInput, st as DefaultDividerUI, je as DefaultFileInput, Me as DefaultHiddenInput, Re as DefaultHttpInput, be as DefaultInputLabel, ze as DefaultNumberInput, Ve as DefaultPasswordInput, Ue as DefaultRadioInput, We as DefaultSelectInput, Ke as DefaultSwitchInput, Xe as DefaultTextInput, Je as DefaultTextareaInput, Qe as DefaultTimeInput, $e as DefaultTimeRangeInput, ot as DefaultTitleUI, gt as TreegeRenderer, k as TreegeRendererProvider, C as applyReferenceTransformation, g as buildInitialFormValues, d as calculateReferenceFieldUpdates, x as checkFormFieldHasValue, ee as convertFormValuesToNamedFormat, et as defaultInputRenderers, lt as defaultUI, ie as evaluateCondition, M as evaluateConditions, y as fileNameFromUrl, h as fileToSerializable, m as filesToSerializable, ae as findStartNode, u as formatFileSize, A as getFlowRenderState, S as getTranslatedText, p as isFieldEmpty, T as isRemoteFileData, O as isStartNode, D as normalizeSerializableFiles, v as resolveNodeDefaultValue, o as sanitize, ne as sanitizeHttpResponse, f as serializableToFile, re as useTreegeRenderer, j as useTreegeRendererConfig };
|