treege 3.0.0-beta.57 → 3.0.0-beta.58
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/{DefaultInputs-CoJrOYMe.js → DefaultInputs-Dr3R5r53.js} +783 -761
- package/dist/ThemeContext-DrI5HTYl.js +1402 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +0 -10
- package/dist/editor/types/editor.d.ts +16 -3
- package/dist/{editor-D3cbfAxI.js → editor-BhL3w_KP.js} +1176 -1157
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeRendererContext.d.ts +12 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +2 -1
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/hooks/useSubmitHandler.d.ts +2 -1
- package/dist/renderer/types/renderer.d.ts +15 -0
- package/dist/renderer/utils/http.d.ts +11 -0
- package/dist/renderer/utils/submit.d.ts +2 -1
- package/dist/renderer-native.js +701 -680
- package/dist/renderer.js +3 -3
- package/dist/shared/locales/ar.json.d.ts +3 -1
- package/dist/shared/locales/de.json.d.ts +3 -1
- package/dist/shared/locales/en.json.d.ts +3 -1
- package/dist/shared/locales/es.json.d.ts +3 -1
- package/dist/shared/locales/fr.json.d.ts +3 -1
- package/dist/shared/locales/it.json.d.ts +3 -1
- package/dist/shared/locales/pt.json.d.ts +3 -1
- package/package.json +1 -1
- package/dist/ThemeContext-BhIeqgqN.js +0 -1398
package/dist/renderer-native.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { E as e,
|
|
2
|
-
import { useCallback as ee, useEffect as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { ActivityIndicator as N, Alert as P, Animated as F, FlatList as
|
|
1
|
+
import { E as e, N as t, O as n, P as r, S as i, a, b as o, c as s, d as c, f as l, g as u, h as d, i as f, k as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, w as C, x as w, y as T, z as E } from "./ThemeContext-DrI5HTYl.js";
|
|
2
|
+
import { useCallback as ee, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
3
|
+
import { Fragment as te, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
4
|
+
import { ActivityIndicator as N, Alert as P, Animated as F, FlatList as I, Image as ne, Modal as re, ScrollView as ie, StyleSheet as L, Switch as R, Text as z, TextInput as B, TouchableOpacity as V, View as H } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var
|
|
7
|
-
style:
|
|
6
|
+
var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
7
|
+
style: oe.container,
|
|
8
8
|
children: e
|
|
9
|
-
}),
|
|
9
|
+
}), oe = L.create({ container: { padding: 16 } }), se = async (e, t) => {
|
|
10
10
|
if (!e || e.trim().length < 3) return [];
|
|
11
11
|
try {
|
|
12
12
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -21,7 +21,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
21
21
|
} catch (e) {
|
|
22
22
|
return console.error("Nominatim fetch error:", e), [];
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, ce = async (e, t) => {
|
|
25
25
|
if (!e || e.trim().length < 3) return [];
|
|
26
26
|
try {
|
|
27
27
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -34,26 +34,26 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
34
34
|
} catch (e) {
|
|
35
35
|
return console.error("Google Places fetch error:", e), [];
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
let [
|
|
39
|
-
v(e.value),
|
|
37
|
+
}, le = (e, t) => {
|
|
38
|
+
let [n, i] = A(""), [a, o] = A([]), [s, c] = A(!1), [l, u] = A(!1), { value: d, placeholder: f, id: m, name: h } = e, { node: _, setValue: v, error: y, label: b, helperText: x } = t, { language: S, googleApiKey: C } = r(), w = p(), { colors: T } = g(), E = ee((e) => {
|
|
39
|
+
v(e.value), i(""), c(!1), o([]);
|
|
40
40
|
}, [v]), O = () => {
|
|
41
|
-
|
|
41
|
+
c(!1);
|
|
42
42
|
};
|
|
43
|
-
return
|
|
44
|
-
if (!
|
|
45
|
-
|
|
43
|
+
return D(() => {
|
|
44
|
+
if (!n || n.trim().length < 3) {
|
|
45
|
+
o([]), u(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
u(!0);
|
|
49
49
|
let e = setTimeout(async () => {
|
|
50
|
-
|
|
50
|
+
o(C ? await ce(n, C) : await se(n, S)), u(!1);
|
|
51
51
|
}, 300);
|
|
52
52
|
return () => {
|
|
53
|
-
clearTimeout(e),
|
|
53
|
+
clearTimeout(e), u(!1);
|
|
54
54
|
};
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
n,
|
|
57
57
|
S,
|
|
58
58
|
C
|
|
59
59
|
]), /* @__PURE__ */ M(H, {
|
|
@@ -75,23 +75,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
75
75
|
},
|
|
76
76
|
y && { borderColor: T.error }
|
|
77
77
|
],
|
|
78
|
-
onPress: () =>
|
|
78
|
+
onPress: () => c(!0),
|
|
79
79
|
activeOpacity: .7,
|
|
80
80
|
children: [/* @__PURE__ */ j(z, {
|
|
81
81
|
style: [
|
|
82
82
|
U.triggerText,
|
|
83
83
|
{ color: T.text },
|
|
84
|
-
!
|
|
84
|
+
!d && { color: T.textMuted }
|
|
85
85
|
],
|
|
86
86
|
numberOfLines: 1,
|
|
87
|
-
children:
|
|
87
|
+
children: d || f || w("renderer.defaultAddressInput.enterAddress")
|
|
88
88
|
}), /* @__PURE__ */ j(z, {
|
|
89
89
|
style: U.icon,
|
|
90
90
|
children: "📍"
|
|
91
91
|
})]
|
|
92
92
|
}),
|
|
93
93
|
/* @__PURE__ */ j(re, {
|
|
94
|
-
visible:
|
|
94
|
+
visible: s,
|
|
95
95
|
transparent: !0,
|
|
96
96
|
animationType: "fade",
|
|
97
97
|
onRequestClose: O,
|
|
@@ -125,20 +125,20 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
125
125
|
borderColor: T.border,
|
|
126
126
|
color: T.text
|
|
127
127
|
}],
|
|
128
|
-
placeholder:
|
|
128
|
+
placeholder: f || w("renderer.defaultAddressInput.enterAddress"),
|
|
129
129
|
placeholderTextColor: T.textMuted,
|
|
130
|
-
value:
|
|
131
|
-
onChangeText:
|
|
130
|
+
value: n,
|
|
131
|
+
onChangeText: i,
|
|
132
132
|
autoFocus: !0,
|
|
133
133
|
autoCapitalize: "none",
|
|
134
134
|
autoCorrect: !1
|
|
135
|
-
}),
|
|
135
|
+
}), l && /* @__PURE__ */ j(N, {
|
|
136
136
|
size: "small",
|
|
137
137
|
color: T.primary,
|
|
138
138
|
style: U.searchLoader
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
141
|
+
l ? /* @__PURE__ */ M(H, {
|
|
142
142
|
style: U.loadingContainer,
|
|
143
143
|
children: [/* @__PURE__ */ j(N, {
|
|
144
144
|
size: "small",
|
|
@@ -147,13 +147,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
147
147
|
style: [U.loadingText, { color: T.textMuted }],
|
|
148
148
|
children: w("renderer.defaultAddressInput.searching")
|
|
149
149
|
})]
|
|
150
|
-
}) : /* @__PURE__ */ j(
|
|
151
|
-
data:
|
|
150
|
+
}) : /* @__PURE__ */ j(I, {
|
|
151
|
+
data: a,
|
|
152
152
|
keyExtractor: (e, t) => t.toString(),
|
|
153
153
|
style: U.suggestionsList,
|
|
154
154
|
contentContainerStyle: U.suggestionsListContent,
|
|
155
155
|
keyboardShouldPersistTaps: "handled",
|
|
156
|
-
ListEmptyComponent:
|
|
156
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ j(H, {
|
|
157
157
|
style: U.emptyContainer,
|
|
158
158
|
children: /* @__PURE__ */ j(z, {
|
|
159
159
|
style: [U.emptyText, { color: T.textMuted }],
|
|
@@ -168,7 +168,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
168
168
|
}),
|
|
169
169
|
renderItem: ({ item: e }) => /* @__PURE__ */ M(V, {
|
|
170
170
|
style: U.suggestionItem,
|
|
171
|
-
onPress: () =>
|
|
171
|
+
onPress: () => E(e),
|
|
172
172
|
activeOpacity: .7,
|
|
173
173
|
children: [/* @__PURE__ */ j(z, {
|
|
174
174
|
style: U.suggestionIcon,
|
|
@@ -304,26 +304,26 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
304
304
|
flex: 1,
|
|
305
305
|
fontSize: 14
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
308
|
-
let [n,
|
|
309
|
-
if (!
|
|
310
|
-
let e =
|
|
307
|
+
}), ue = (e, t) => {
|
|
308
|
+
let [n, r] = A(!1), [i, a] = A(""), { value: o, placeholder: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, m = p(), { colors: h } = g(), _ = c.data.options || [], v = _.find((e) => e.value === o), y = O(() => {
|
|
309
|
+
if (!i.trim()) return _;
|
|
310
|
+
let e = i.toLowerCase();
|
|
311
311
|
return _.filter((t) => m(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
312
312
|
}, [
|
|
313
313
|
_,
|
|
314
|
-
|
|
314
|
+
i,
|
|
315
315
|
m
|
|
316
316
|
]), b = (e) => {
|
|
317
|
-
|
|
317
|
+
l(e === o ? "" : e), r(!1), a("");
|
|
318
318
|
}, x = () => {
|
|
319
|
-
|
|
319
|
+
r(!1), a("");
|
|
320
320
|
};
|
|
321
321
|
return /* @__PURE__ */ M(H, {
|
|
322
322
|
style: W.container,
|
|
323
323
|
children: [
|
|
324
324
|
/* @__PURE__ */ M(z, {
|
|
325
325
|
style: [W.label, { color: h.textSecondary }],
|
|
326
|
-
children: [
|
|
326
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ j(z, {
|
|
327
327
|
style: { color: h.error },
|
|
328
328
|
children: "*"
|
|
329
329
|
})]
|
|
@@ -335,18 +335,18 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
335
335
|
backgroundColor: h.input,
|
|
336
336
|
borderColor: h.border
|
|
337
337
|
},
|
|
338
|
-
|
|
338
|
+
u && { borderColor: h.error }
|
|
339
339
|
],
|
|
340
|
-
onPress: () =>
|
|
340
|
+
onPress: () => r(!0),
|
|
341
341
|
activeOpacity: .7,
|
|
342
342
|
children: [/* @__PURE__ */ j(z, {
|
|
343
343
|
style: [
|
|
344
344
|
W.triggerText,
|
|
345
345
|
{ color: h.text },
|
|
346
|
-
!
|
|
346
|
+
!o && { color: h.textMuted }
|
|
347
347
|
],
|
|
348
348
|
numberOfLines: 1,
|
|
349
|
-
children:
|
|
349
|
+
children: o && v ? m(v.label) : s || m("renderer.defaultAutocompleteInput.selectOption")
|
|
350
350
|
}), /* @__PURE__ */ j(z, {
|
|
351
351
|
style: [W.arrow, { color: h.textMuted }],
|
|
352
352
|
children: "▼"
|
|
@@ -370,7 +370,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
370
370
|
style: [W.modalHeader, { borderBottomColor: h.separator }],
|
|
371
371
|
children: [/* @__PURE__ */ j(z, {
|
|
372
372
|
style: [W.modalTitle, { color: h.text }],
|
|
373
|
-
children:
|
|
373
|
+
children: d || c.data.name
|
|
374
374
|
}), /* @__PURE__ */ j(V, {
|
|
375
375
|
onPress: x,
|
|
376
376
|
children: /* @__PURE__ */ j(z, {
|
|
@@ -387,16 +387,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
387
387
|
borderColor: h.border,
|
|
388
388
|
color: h.text
|
|
389
389
|
}],
|
|
390
|
-
placeholder:
|
|
390
|
+
placeholder: s || m("renderer.defaultAutocompleteInput.search"),
|
|
391
391
|
placeholderTextColor: h.textMuted,
|
|
392
|
-
value:
|
|
393
|
-
onChangeText:
|
|
392
|
+
value: i,
|
|
393
|
+
onChangeText: a,
|
|
394
394
|
autoFocus: !0,
|
|
395
395
|
autoCapitalize: "none",
|
|
396
396
|
autoCorrect: !1
|
|
397
397
|
})
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */ j(
|
|
399
|
+
/* @__PURE__ */ j(I, {
|
|
400
400
|
data: y,
|
|
401
401
|
keyExtractor: (e) => e.value,
|
|
402
402
|
style: W.optionsList,
|
|
@@ -409,7 +409,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
409
409
|
})
|
|
410
410
|
}),
|
|
411
411
|
renderItem: ({ item: e }) => {
|
|
412
|
-
let t = e.value ===
|
|
412
|
+
let t = e.value === o;
|
|
413
413
|
return /* @__PURE__ */ M(V, {
|
|
414
414
|
style: [W.option, t && { backgroundColor: h.primaryLight }],
|
|
415
415
|
onPress: () => b(e.value),
|
|
@@ -433,13 +433,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
433
433
|
})
|
|
434
434
|
})
|
|
435
435
|
}),
|
|
436
|
-
|
|
436
|
+
u && /* @__PURE__ */ j(z, {
|
|
437
437
|
style: [W.error, { color: h.error }],
|
|
438
|
-
children:
|
|
438
|
+
children: u
|
|
439
439
|
}),
|
|
440
|
-
|
|
440
|
+
f && !u && /* @__PURE__ */ j(z, {
|
|
441
441
|
style: [W.helperText, { color: h.textMuted }],
|
|
442
|
-
children:
|
|
442
|
+
children: f
|
|
443
443
|
})
|
|
444
444
|
]
|
|
445
445
|
});
|
|
@@ -534,21 +534,21 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
534
534
|
flex: 1,
|
|
535
535
|
fontSize: 14
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
538
|
-
let n =
|
|
539
|
-
|
|
540
|
-
}, _ = (e) =>
|
|
537
|
+
}), de = (e, t) => {
|
|
538
|
+
let n = p(), { value: r } = e, { node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = g(), u = i.data.options || [], d = u.length > 0, f = Array.isArray(r) ? r : [], m = typeof r == "boolean" ? r : !1, h = (e) => {
|
|
539
|
+
a(d ? f.includes(e) ? f.filter((t) => t !== e) : [...f, e] : !m);
|
|
540
|
+
}, _ = (e) => d ? f.includes(e) : m;
|
|
541
541
|
return /* @__PURE__ */ M(H, {
|
|
542
542
|
style: G.container,
|
|
543
543
|
children: [
|
|
544
544
|
/* @__PURE__ */ M(z, {
|
|
545
|
-
style: [G.label, { color:
|
|
546
|
-
children: [
|
|
547
|
-
style: { color:
|
|
545
|
+
style: [G.label, { color: l.textSecondary }],
|
|
546
|
+
children: [s || i.data.name, i.data.required && /* @__PURE__ */ j(z, {
|
|
547
|
+
style: { color: l.error },
|
|
548
548
|
children: "*"
|
|
549
549
|
})]
|
|
550
550
|
}),
|
|
551
|
-
|
|
551
|
+
u.length > 0 ? u.map((e) => {
|
|
552
552
|
let t = n(e.description);
|
|
553
553
|
return /* @__PURE__ */ M(V, {
|
|
554
554
|
style: G.option,
|
|
@@ -566,12 +566,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
566
566
|
style: [
|
|
567
567
|
G.checkbox,
|
|
568
568
|
{
|
|
569
|
-
backgroundColor:
|
|
570
|
-
borderColor:
|
|
569
|
+
backgroundColor: l.input,
|
|
570
|
+
borderColor: l.border
|
|
571
571
|
},
|
|
572
572
|
_(e.value) && {
|
|
573
|
-
backgroundColor:
|
|
574
|
-
borderColor:
|
|
573
|
+
backgroundColor: l.primary,
|
|
574
|
+
borderColor: l.primary
|
|
575
575
|
}
|
|
576
576
|
],
|
|
577
577
|
children: _(e.value) && /* @__PURE__ */ j(z, {
|
|
@@ -583,12 +583,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
583
583
|
children: [/* @__PURE__ */ j(z, {
|
|
584
584
|
style: [
|
|
585
585
|
G.optionLabel,
|
|
586
|
-
{ color:
|
|
587
|
-
e.disabled && { color:
|
|
586
|
+
{ color: l.textSecondary },
|
|
587
|
+
e.disabled && { color: l.textMuted }
|
|
588
588
|
],
|
|
589
589
|
children: n(e.label) || e.value
|
|
590
590
|
}), t && /* @__PURE__ */ j(z, {
|
|
591
|
-
style: [G.optionDescription, { color:
|
|
591
|
+
style: [G.optionDescription, { color: l.textMuted }],
|
|
592
592
|
children: t
|
|
593
593
|
})]
|
|
594
594
|
})]
|
|
@@ -600,17 +600,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
600
600
|
accessible: !0,
|
|
601
601
|
accessibilityRole: "checkbox",
|
|
602
602
|
accessibilityState: { checked: m },
|
|
603
|
-
accessibilityLabel:
|
|
603
|
+
accessibilityLabel: s || i.data.name,
|
|
604
604
|
children: [/* @__PURE__ */ j(H, {
|
|
605
605
|
style: [
|
|
606
606
|
G.checkbox,
|
|
607
607
|
{
|
|
608
|
-
backgroundColor:
|
|
609
|
-
borderColor:
|
|
608
|
+
backgroundColor: l.input,
|
|
609
|
+
borderColor: l.border
|
|
610
610
|
},
|
|
611
611
|
m && {
|
|
612
|
-
backgroundColor:
|
|
613
|
-
borderColor:
|
|
612
|
+
backgroundColor: l.primary,
|
|
613
|
+
borderColor: l.primary
|
|
614
614
|
}
|
|
615
615
|
],
|
|
616
616
|
children: m && /* @__PURE__ */ j(z, {
|
|
@@ -618,17 +618,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
618
618
|
children: "✓"
|
|
619
619
|
})
|
|
620
620
|
}), /* @__PURE__ */ j(z, {
|
|
621
|
-
style: [G.optionLabel, { color:
|
|
622
|
-
children:
|
|
621
|
+
style: [G.optionLabel, { color: l.textSecondary }],
|
|
622
|
+
children: s || i.data.name
|
|
623
623
|
})]
|
|
624
624
|
}),
|
|
625
|
-
|
|
626
|
-
style: [G.error, { color:
|
|
627
|
-
children:
|
|
625
|
+
o && /* @__PURE__ */ j(z, {
|
|
626
|
+
style: [G.error, { color: l.error }],
|
|
627
|
+
children: o
|
|
628
628
|
}),
|
|
629
|
-
|
|
630
|
-
style: [G.helperText, { color:
|
|
631
|
-
children:
|
|
629
|
+
c && !o && /* @__PURE__ */ j(z, {
|
|
630
|
+
style: [G.helperText, { color: l.textMuted }],
|
|
631
|
+
children: c
|
|
632
632
|
})
|
|
633
633
|
]
|
|
634
634
|
});
|
|
@@ -672,15 +672,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
672
672
|
},
|
|
673
673
|
optionLabel: { fontSize: 14 },
|
|
674
674
|
optionTextContainer: { flex: 1 }
|
|
675
|
-
}),
|
|
676
|
-
let [n,
|
|
675
|
+
}), fe = (e, t) => {
|
|
676
|
+
let [n, r] = A(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = g(), f = p(), m = i ? new Date(i) : void 0, { year: h, month: _, today: v } = O(() => {
|
|
677
677
|
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
678
678
|
return r.setHours(0, 0, 0, 0), {
|
|
679
679
|
month: n,
|
|
680
680
|
today: r,
|
|
681
681
|
year: t
|
|
682
682
|
};
|
|
683
|
-
}, [m]), [y, b] =
|
|
683
|
+
}, [m]), [y, b] = A(h), [x, S] = A(_), C = [
|
|
684
684
|
"January",
|
|
685
685
|
"February",
|
|
686
686
|
"March",
|
|
@@ -693,7 +693,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
693
693
|
"October",
|
|
694
694
|
"November",
|
|
695
695
|
"December"
|
|
696
|
-
], w =
|
|
696
|
+
], w = O(() => {
|
|
697
697
|
let e = new Date(y, x, 1).getDay(), t = new Date(y, x + 1, 0).getDate(), n = new Date(y, x, 0).getDate(), r = [];
|
|
698
698
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
699
699
|
date: new Date(y, x - 1, n - t),
|
|
@@ -713,23 +713,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
713
713
|
});
|
|
714
714
|
return r;
|
|
715
715
|
}, [y, x]), T = ee((e) => {
|
|
716
|
-
|
|
716
|
+
o.data.disablePast && e < v || (s(e.toISOString()), r(!1));
|
|
717
717
|
}, [
|
|
718
|
-
|
|
718
|
+
o.data.disablePast,
|
|
719
719
|
v,
|
|
720
|
-
|
|
720
|
+
s
|
|
721
721
|
]), E = () => {
|
|
722
722
|
x === 0 ? (S(11), b(y - 1)) : S(x - 1);
|
|
723
|
-
},
|
|
723
|
+
}, D = () => {
|
|
724
724
|
x === 11 ? (S(0), b(y + 1)) : S(x + 1);
|
|
725
|
-
},
|
|
725
|
+
}, k = () => m ? m.toLocaleDateString() : a || f("renderer.defaultInputs.selectDate"), te = (e) => o.data.disablePast ? e < v : !1, N = (e) => m ? e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear() : !1;
|
|
726
726
|
return /* @__PURE__ */ M(H, {
|
|
727
727
|
style: K.container,
|
|
728
728
|
children: [
|
|
729
729
|
/* @__PURE__ */ M(z, {
|
|
730
|
-
style: [K.label, { color:
|
|
731
|
-
children: [
|
|
732
|
-
style: { color:
|
|
730
|
+
style: [K.label, { color: d.textSecondary }],
|
|
731
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ j(z, {
|
|
732
|
+
style: { color: d.error },
|
|
733
733
|
children: "*"
|
|
734
734
|
})]
|
|
735
735
|
}),
|
|
@@ -737,21 +737,21 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
737
737
|
style: [
|
|
738
738
|
K.trigger,
|
|
739
739
|
{
|
|
740
|
-
backgroundColor:
|
|
741
|
-
borderColor:
|
|
740
|
+
backgroundColor: d.input,
|
|
741
|
+
borderColor: d.border
|
|
742
742
|
},
|
|
743
|
-
|
|
743
|
+
c && { borderColor: d.error }
|
|
744
744
|
],
|
|
745
|
-
onPress: () =>
|
|
745
|
+
onPress: () => r(!0),
|
|
746
746
|
activeOpacity: .7,
|
|
747
747
|
children: [/* @__PURE__ */ j(z, {
|
|
748
748
|
style: [
|
|
749
749
|
K.triggerText,
|
|
750
|
-
{ color:
|
|
751
|
-
!
|
|
750
|
+
{ color: d.text },
|
|
751
|
+
!i && { color: d.textMuted }
|
|
752
752
|
],
|
|
753
753
|
numberOfLines: 1,
|
|
754
|
-
children:
|
|
754
|
+
children: k()
|
|
755
755
|
}), /* @__PURE__ */ j(z, {
|
|
756
756
|
style: K.icon,
|
|
757
757
|
children: "📅"
|
|
@@ -761,25 +761,25 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
761
761
|
visible: n,
|
|
762
762
|
transparent: !0,
|
|
763
763
|
animationType: "fade",
|
|
764
|
-
onRequestClose: () =>
|
|
764
|
+
onRequestClose: () => r(!1),
|
|
765
765
|
children: /* @__PURE__ */ j(V, {
|
|
766
766
|
style: K.modalOverlay,
|
|
767
767
|
activeOpacity: 1,
|
|
768
|
-
onPress: () =>
|
|
768
|
+
onPress: () => r(!1),
|
|
769
769
|
children: /* @__PURE__ */ M(V, {
|
|
770
|
-
style: [K.modalContent, { backgroundColor:
|
|
770
|
+
style: [K.modalContent, { backgroundColor: d.card }],
|
|
771
771
|
activeOpacity: 1,
|
|
772
772
|
onPress: () => {},
|
|
773
773
|
children: [
|
|
774
774
|
/* @__PURE__ */ M(H, {
|
|
775
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
775
|
+
style: [K.modalHeader, { borderBottomColor: d.separator }],
|
|
776
776
|
children: [/* @__PURE__ */ j(z, {
|
|
777
|
-
style: [K.modalTitle, { color:
|
|
778
|
-
children:
|
|
777
|
+
style: [K.modalTitle, { color: d.text }],
|
|
778
|
+
children: l || o.data.name
|
|
779
779
|
}), /* @__PURE__ */ j(V, {
|
|
780
|
-
onPress: () =>
|
|
780
|
+
onPress: () => r(!1),
|
|
781
781
|
children: /* @__PURE__ */ j(z, {
|
|
782
|
-
style: [K.closeButton, { color:
|
|
782
|
+
style: [K.closeButton, { color: d.textMuted }],
|
|
783
783
|
children: "✕"
|
|
784
784
|
})
|
|
785
785
|
})]
|
|
@@ -791,12 +791,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
791
791
|
onPress: E,
|
|
792
792
|
style: K.navButton,
|
|
793
793
|
children: /* @__PURE__ */ j(z, {
|
|
794
|
-
style: [K.navButtonText, { color:
|
|
794
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
795
795
|
children: "‹"
|
|
796
796
|
})
|
|
797
797
|
}),
|
|
798
798
|
/* @__PURE__ */ M(z, {
|
|
799
|
-
style: [K.monthYear, { color:
|
|
799
|
+
style: [K.monthYear, { color: d.text }],
|
|
800
800
|
children: [
|
|
801
801
|
C[x],
|
|
802
802
|
" ",
|
|
@@ -804,10 +804,10 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
804
804
|
]
|
|
805
805
|
}),
|
|
806
806
|
/* @__PURE__ */ j(V, {
|
|
807
|
-
onPress:
|
|
807
|
+
onPress: D,
|
|
808
808
|
style: K.navButton,
|
|
809
809
|
children: /* @__PURE__ */ j(z, {
|
|
810
|
-
style: [K.navButtonText, { color:
|
|
810
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
811
811
|
children: "›"
|
|
812
812
|
})
|
|
813
813
|
})
|
|
@@ -824,11 +824,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
824
824
|
"Fri",
|
|
825
825
|
"Sat"
|
|
826
826
|
].map((e) => /* @__PURE__ */ j(z, {
|
|
827
|
-
style: [K.weekDay, { color:
|
|
827
|
+
style: [K.weekDay, { color: d.textMuted }],
|
|
828
828
|
children: e
|
|
829
829
|
}, e))
|
|
830
830
|
}),
|
|
831
|
-
/* @__PURE__ */ j(
|
|
831
|
+
/* @__PURE__ */ j(I, {
|
|
832
832
|
data: w,
|
|
833
833
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
834
834
|
numColumns: 7,
|
|
@@ -836,13 +836,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
836
836
|
style: K.calendar,
|
|
837
837
|
contentContainerStyle: K.calendarContent,
|
|
838
838
|
renderItem: ({ item: e }) => {
|
|
839
|
-
let t =
|
|
839
|
+
let t = te(e.date), n = N(e.date);
|
|
840
840
|
return /* @__PURE__ */ j(V, {
|
|
841
841
|
style: [
|
|
842
842
|
K.dayCell,
|
|
843
843
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
844
844
|
n && {
|
|
845
|
-
backgroundColor:
|
|
845
|
+
backgroundColor: d.primary,
|
|
846
846
|
borderRadius: 20
|
|
847
847
|
},
|
|
848
848
|
t && K.dayCellDisabled
|
|
@@ -853,13 +853,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
853
853
|
children: /* @__PURE__ */ j(z, {
|
|
854
854
|
style: [
|
|
855
855
|
K.dayText,
|
|
856
|
-
{ color:
|
|
857
|
-
!e.isCurrentMonth && { color:
|
|
856
|
+
{ color: d.text },
|
|
857
|
+
!e.isCurrentMonth && { color: d.textMuted },
|
|
858
858
|
n && {
|
|
859
|
-
color:
|
|
859
|
+
color: d.background,
|
|
860
860
|
fontWeight: "600"
|
|
861
861
|
},
|
|
862
|
-
t && { color:
|
|
862
|
+
t && { color: d.textMuted }
|
|
863
863
|
],
|
|
864
864
|
children: e.day
|
|
865
865
|
})
|
|
@@ -870,13 +870,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
870
870
|
})
|
|
871
871
|
})
|
|
872
872
|
}),
|
|
873
|
-
|
|
874
|
-
style: [K.error, { color:
|
|
875
|
-
children:
|
|
873
|
+
c && /* @__PURE__ */ j(z, {
|
|
874
|
+
style: [K.error, { color: d.error }],
|
|
875
|
+
children: c
|
|
876
876
|
}),
|
|
877
|
-
|
|
878
|
-
style: [K.helperText, { color:
|
|
879
|
-
children:
|
|
877
|
+
u && !c && /* @__PURE__ */ j(z, {
|
|
878
|
+
style: [K.helperText, { color: d.textMuted }],
|
|
879
|
+
children: u
|
|
880
880
|
})
|
|
881
881
|
]
|
|
882
882
|
});
|
|
@@ -980,15 +980,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
980
980
|
flexDirection: "row",
|
|
981
981
|
marginBottom: 8
|
|
982
982
|
}
|
|
983
|
-
}),
|
|
984
|
-
let [n,
|
|
983
|
+
}), pe = (e, t) => {
|
|
984
|
+
let [n, r] = A(!1), [i, a] = A(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, f = p(), { colors: m } = g(), h = Array.isArray(o) ? o : [], _ = h[0] ? new Date(h[0]) : void 0, v = h[1] ? new Date(h[1]) : void 0, { year: y, month: b, today: x } = O(() => {
|
|
985
985
|
let e = _ || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
986
986
|
return r.setHours(0, 0, 0, 0), {
|
|
987
987
|
month: n,
|
|
988
988
|
today: r,
|
|
989
989
|
year: t
|
|
990
990
|
};
|
|
991
|
-
}, [_]), [S, C] =
|
|
991
|
+
}, [_]), [S, C] = A(y), [w, T] = A(b), E = [
|
|
992
992
|
"January",
|
|
993
993
|
"February",
|
|
994
994
|
"March",
|
|
@@ -1001,7 +1001,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1001
1001
|
"October",
|
|
1002
1002
|
"November",
|
|
1003
1003
|
"December"
|
|
1004
|
-
],
|
|
1004
|
+
], D = O(() => {
|
|
1005
1005
|
let e = new Date(S, w, 1).getDay(), t = new Date(S, w + 1, 0).getDate(), n = new Date(S, w, 0).getDate(), r = [];
|
|
1006
1006
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1007
1007
|
date: new Date(S, w - 1, n - t),
|
|
@@ -1020,20 +1020,20 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1020
1020
|
isCurrentMonth: !1
|
|
1021
1021
|
});
|
|
1022
1022
|
return r;
|
|
1023
|
-
}, [S, w]),
|
|
1024
|
-
|
|
1023
|
+
}, [S, w]), k = ee((e) => {
|
|
1024
|
+
s.data.disablePast && e < x || (i ? (c([e.toISOString(), v?.toISOString()]), a(!1)) : (c(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), r(!1), a(!0)));
|
|
1025
1025
|
}, [
|
|
1026
|
-
|
|
1026
|
+
s.data.disablePast,
|
|
1027
1027
|
x,
|
|
1028
|
-
|
|
1028
|
+
i,
|
|
1029
1029
|
_,
|
|
1030
1030
|
v,
|
|
1031
|
-
|
|
1032
|
-
]),
|
|
1031
|
+
c
|
|
1032
|
+
]), te = () => {
|
|
1033
1033
|
w === 0 ? (T(11), C(S - 1)) : T(w - 1);
|
|
1034
|
-
},
|
|
1034
|
+
}, N = () => {
|
|
1035
1035
|
w === 11 ? (T(0), C(S + 1)) : T(w + 1);
|
|
1036
|
-
},
|
|
1036
|
+
}, P = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : f("renderer.defaultInputs.selectDateRange"), F = (e) => s.data.disablePast ? e < x : !1, ne = (e) => _ && v ? e >= _ && e <= v : !1, ie = (e) => {
|
|
1037
1037
|
if (!(_ || v)) return !1;
|
|
1038
1038
|
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();
|
|
1039
1039
|
return t || n;
|
|
@@ -1043,7 +1043,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1043
1043
|
children: [
|
|
1044
1044
|
/* @__PURE__ */ M(z, {
|
|
1045
1045
|
style: [q.label, { color: m.textSecondary }],
|
|
1046
|
-
children: [
|
|
1046
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
1047
1047
|
style: { color: m.error },
|
|
1048
1048
|
children: "*"
|
|
1049
1049
|
})]
|
|
@@ -1055,9 +1055,9 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1055
1055
|
backgroundColor: m.input,
|
|
1056
1056
|
borderColor: m.border
|
|
1057
1057
|
},
|
|
1058
|
-
|
|
1058
|
+
l && { borderColor: m.error }
|
|
1059
1059
|
],
|
|
1060
|
-
onPress: () =>
|
|
1060
|
+
onPress: () => r(!0),
|
|
1061
1061
|
activeOpacity: .7,
|
|
1062
1062
|
children: [/* @__PURE__ */ j(z, {
|
|
1063
1063
|
style: [
|
|
@@ -1066,7 +1066,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1066
1066
|
!_ && { color: m.textMuted }
|
|
1067
1067
|
],
|
|
1068
1068
|
numberOfLines: 1,
|
|
1069
|
-
children:
|
|
1069
|
+
children: P()
|
|
1070
1070
|
}), /* @__PURE__ */ j(z, {
|
|
1071
1071
|
style: q.icon,
|
|
1072
1072
|
children: "📅"
|
|
@@ -1076,11 +1076,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1076
1076
|
visible: n,
|
|
1077
1077
|
transparent: !0,
|
|
1078
1078
|
animationType: "fade",
|
|
1079
|
-
onRequestClose: () =>
|
|
1079
|
+
onRequestClose: () => r(!1),
|
|
1080
1080
|
children: /* @__PURE__ */ j(V, {
|
|
1081
1081
|
style: q.modalOverlay,
|
|
1082
1082
|
activeOpacity: 1,
|
|
1083
|
-
onPress: () =>
|
|
1083
|
+
onPress: () => r(!1),
|
|
1084
1084
|
children: /* @__PURE__ */ M(V, {
|
|
1085
1085
|
style: [q.modalContent, { backgroundColor: m.card }],
|
|
1086
1086
|
activeOpacity: 1,
|
|
@@ -1090,9 +1090,9 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1090
1090
|
style: [q.modalHeader, { borderBottomColor: m.separator }],
|
|
1091
1091
|
children: [/* @__PURE__ */ j(z, {
|
|
1092
1092
|
style: [q.modalTitle, { color: m.text }],
|
|
1093
|
-
children:
|
|
1093
|
+
children: u || s.data.name
|
|
1094
1094
|
}), /* @__PURE__ */ j(V, {
|
|
1095
|
-
onPress: () =>
|
|
1095
|
+
onPress: () => r(!1),
|
|
1096
1096
|
children: /* @__PURE__ */ j(z, {
|
|
1097
1097
|
style: [q.closeButton, { color: m.textMuted }],
|
|
1098
1098
|
children: "✕"
|
|
@@ -1103,14 +1103,14 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1103
1103
|
style: [q.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
1104
1104
|
children: /* @__PURE__ */ j(z, {
|
|
1105
1105
|
style: [q.rangeIndicatorText, { color: m.primary }],
|
|
1106
|
-
children:
|
|
1106
|
+
children: f(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1107
1107
|
})
|
|
1108
1108
|
}),
|
|
1109
1109
|
/* @__PURE__ */ M(H, {
|
|
1110
1110
|
style: q.calendarHeader,
|
|
1111
1111
|
children: [
|
|
1112
1112
|
/* @__PURE__ */ j(V, {
|
|
1113
|
-
onPress:
|
|
1113
|
+
onPress: te,
|
|
1114
1114
|
style: q.navButton,
|
|
1115
1115
|
children: /* @__PURE__ */ j(z, {
|
|
1116
1116
|
style: [q.navButtonText, { color: m.primary }],
|
|
@@ -1126,7 +1126,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1126
1126
|
]
|
|
1127
1127
|
}),
|
|
1128
1128
|
/* @__PURE__ */ j(V, {
|
|
1129
|
-
onPress:
|
|
1129
|
+
onPress: N,
|
|
1130
1130
|
style: q.navButton,
|
|
1131
1131
|
children: /* @__PURE__ */ j(z, {
|
|
1132
1132
|
style: [q.navButtonText, { color: m.primary }],
|
|
@@ -1150,15 +1150,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1150
1150
|
children: e
|
|
1151
1151
|
}, e))
|
|
1152
1152
|
}),
|
|
1153
|
-
/* @__PURE__ */ j(
|
|
1154
|
-
data:
|
|
1153
|
+
/* @__PURE__ */ j(I, {
|
|
1154
|
+
data: D,
|
|
1155
1155
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1156
1156
|
numColumns: 7,
|
|
1157
1157
|
scrollEnabled: !1,
|
|
1158
1158
|
style: q.calendar,
|
|
1159
1159
|
contentContainerStyle: q.calendarContent,
|
|
1160
1160
|
renderItem: ({ item: e }) => {
|
|
1161
|
-
let t =
|
|
1161
|
+
let t = F(e.date), n = ne(e.date), r = ie(e.date);
|
|
1162
1162
|
return /* @__PURE__ */ j(V, {
|
|
1163
1163
|
style: [
|
|
1164
1164
|
q.dayCell,
|
|
@@ -1170,7 +1170,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1170
1170
|
},
|
|
1171
1171
|
t && q.dayCellDisabled
|
|
1172
1172
|
],
|
|
1173
|
-
onPress: () =>
|
|
1173
|
+
onPress: () => k(e.date),
|
|
1174
1174
|
disabled: t,
|
|
1175
1175
|
activeOpacity: .7,
|
|
1176
1176
|
children: /* @__PURE__ */ j(z, {
|
|
@@ -1194,13 +1194,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1194
1194
|
})
|
|
1195
1195
|
})
|
|
1196
1196
|
}),
|
|
1197
|
-
|
|
1197
|
+
l && /* @__PURE__ */ j(z, {
|
|
1198
1198
|
style: [q.error, { color: m.error }],
|
|
1199
|
-
children:
|
|
1199
|
+
children: l
|
|
1200
1200
|
}),
|
|
1201
|
-
|
|
1201
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
1202
1202
|
style: [q.helperText, { color: m.textMuted }],
|
|
1203
|
-
children:
|
|
1203
|
+
children: d
|
|
1204
1204
|
})
|
|
1205
1205
|
]
|
|
1206
1206
|
});
|
|
@@ -1314,8 +1314,8 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1314
1314
|
flexDirection: "row",
|
|
1315
1315
|
marginBottom: 8
|
|
1316
1316
|
}
|
|
1317
|
-
}),
|
|
1318
|
-
let [n,
|
|
1317
|
+
}), me = (e, t) => {
|
|
1318
|
+
let [n, r] = A(null), [i, a] = A(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), m = p(), h = Array.isArray(o) ? o : o ? [o] : [], _ = s.data.multiple, v = ee(async () => {
|
|
1319
1319
|
if (n) try {
|
|
1320
1320
|
let e = (await n({ allowMultiSelection: _ })).map((e) => ({
|
|
1321
1321
|
data: e.uri,
|
|
@@ -1324,7 +1324,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1324
1324
|
size: e.size,
|
|
1325
1325
|
type: e.type || "application/octet-stream"
|
|
1326
1326
|
}));
|
|
1327
|
-
|
|
1327
|
+
c(_ ? [...h, ...e] : e[0] || null);
|
|
1328
1328
|
} catch (e) {
|
|
1329
1329
|
e.code !== "DOCUMENT_PICKER_CANCELED" && P.alert("Error", m("renderer.defaultInputs.filePickerError"));
|
|
1330
1330
|
}
|
|
@@ -1332,30 +1332,30 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1332
1332
|
n,
|
|
1333
1333
|
h,
|
|
1334
1334
|
_,
|
|
1335
|
-
|
|
1335
|
+
c,
|
|
1336
1336
|
m
|
|
1337
1337
|
]), y = ee((e) => {
|
|
1338
1338
|
let t = h.filter((t, n) => n !== e);
|
|
1339
|
-
|
|
1340
|
-
}, [h,
|
|
1341
|
-
return
|
|
1339
|
+
c(t.length > 0 ? t : null);
|
|
1340
|
+
}, [h, c]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1341
|
+
return D(() => {
|
|
1342
1342
|
(async () => {
|
|
1343
1343
|
try {
|
|
1344
1344
|
let { pick: e } = await import("react-native-document-picker");
|
|
1345
|
-
|
|
1345
|
+
r(() => e);
|
|
1346
1346
|
} catch {
|
|
1347
|
-
|
|
1347
|
+
r(null);
|
|
1348
1348
|
} finally {
|
|
1349
|
-
|
|
1349
|
+
a(!1);
|
|
1350
1350
|
}
|
|
1351
1351
|
})();
|
|
1352
|
-
}, []),
|
|
1352
|
+
}, []), i ? null : n ? /* @__PURE__ */ M(H, {
|
|
1353
1353
|
style: J.container,
|
|
1354
1354
|
children: [
|
|
1355
1355
|
/* @__PURE__ */ M(z, {
|
|
1356
|
-
style: [J.label, { color:
|
|
1357
|
-
children: [
|
|
1358
|
-
style: { color:
|
|
1356
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1357
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
1358
|
+
style: { color: f.error },
|
|
1359
1359
|
children: "*"
|
|
1360
1360
|
})]
|
|
1361
1361
|
}),
|
|
@@ -1363,12 +1363,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1363
1363
|
style: J.filesList,
|
|
1364
1364
|
children: h.map((e, t) => /* @__PURE__ */ M(H, {
|
|
1365
1365
|
style: [J.fileItem, {
|
|
1366
|
-
backgroundColor:
|
|
1367
|
-
borderColor:
|
|
1366
|
+
backgroundColor: f.card,
|
|
1367
|
+
borderColor: f.separator
|
|
1368
1368
|
}],
|
|
1369
1369
|
children: [
|
|
1370
1370
|
/* @__PURE__ */ j(H, {
|
|
1371
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1371
|
+
style: [J.fileIcon, { backgroundColor: f.muted }],
|
|
1372
1372
|
children: /* @__PURE__ */ j(z, {
|
|
1373
1373
|
style: J.fileIconText,
|
|
1374
1374
|
children: "📄"
|
|
@@ -1377,11 +1377,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1377
1377
|
/* @__PURE__ */ M(H, {
|
|
1378
1378
|
style: J.fileInfo,
|
|
1379
1379
|
children: [/* @__PURE__ */ j(z, {
|
|
1380
|
-
style: [J.fileName, { color:
|
|
1380
|
+
style: [J.fileName, { color: f.text }],
|
|
1381
1381
|
numberOfLines: 1,
|
|
1382
1382
|
children: e.name
|
|
1383
1383
|
}), e.size > 0 && /* @__PURE__ */ j(z, {
|
|
1384
|
-
style: [J.fileSize, { color:
|
|
1384
|
+
style: [J.fileSize, { color: f.textMuted }],
|
|
1385
1385
|
children: b(e.size)
|
|
1386
1386
|
})]
|
|
1387
1387
|
}),
|
|
@@ -1390,7 +1390,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1390
1390
|
onPress: () => y(t),
|
|
1391
1391
|
activeOpacity: .7,
|
|
1392
1392
|
children: /* @__PURE__ */ j(z, {
|
|
1393
|
-
style: [J.removeButtonText, { color:
|
|
1393
|
+
style: [J.removeButtonText, { color: f.textMuted }],
|
|
1394
1394
|
children: "✕"
|
|
1395
1395
|
})
|
|
1396
1396
|
})
|
|
@@ -1399,48 +1399,48 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1399
1399
|
}),
|
|
1400
1400
|
/* @__PURE__ */ j(V, {
|
|
1401
1401
|
style: [J.pickButton, {
|
|
1402
|
-
backgroundColor:
|
|
1403
|
-
borderColor:
|
|
1402
|
+
backgroundColor: f.input,
|
|
1403
|
+
borderColor: f.border
|
|
1404
1404
|
}],
|
|
1405
1405
|
onPress: v,
|
|
1406
1406
|
activeOpacity: .7,
|
|
1407
1407
|
children: /* @__PURE__ */ j(z, {
|
|
1408
|
-
style: [J.pickButtonText, { color:
|
|
1408
|
+
style: [J.pickButtonText, { color: f.textMuted }],
|
|
1409
1409
|
children: h.length === 0 ? m(_ ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : m(_ ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1410
1410
|
})
|
|
1411
1411
|
}),
|
|
1412
|
-
|
|
1413
|
-
style: [J.error, { color:
|
|
1414
|
-
children:
|
|
1412
|
+
l && /* @__PURE__ */ j(z, {
|
|
1413
|
+
style: [J.error, { color: f.error }],
|
|
1414
|
+
children: l
|
|
1415
1415
|
}),
|
|
1416
|
-
|
|
1417
|
-
style: [J.helperText, { color:
|
|
1418
|
-
children:
|
|
1416
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
1417
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1418
|
+
children: d
|
|
1419
1419
|
})
|
|
1420
1420
|
]
|
|
1421
1421
|
}) : /* @__PURE__ */ M(H, {
|
|
1422
1422
|
style: J.container,
|
|
1423
1423
|
children: [
|
|
1424
1424
|
/* @__PURE__ */ M(z, {
|
|
1425
|
-
style: [J.label, { color:
|
|
1426
|
-
children: [
|
|
1427
|
-
style: { color:
|
|
1425
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1426
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
1427
|
+
style: { color: f.error },
|
|
1428
1428
|
children: "*"
|
|
1429
1429
|
})]
|
|
1430
1430
|
}),
|
|
1431
1431
|
/* @__PURE__ */ j(H, {
|
|
1432
1432
|
style: [J.unavailableContainer, {
|
|
1433
|
-
backgroundColor:
|
|
1434
|
-
borderColor:
|
|
1433
|
+
backgroundColor: f.errorLight,
|
|
1434
|
+
borderColor: f.error
|
|
1435
1435
|
}],
|
|
1436
1436
|
children: /* @__PURE__ */ j(z, {
|
|
1437
|
-
style: [J.unavailableText, { color:
|
|
1437
|
+
style: [J.unavailableText, { color: f.error }],
|
|
1438
1438
|
children: m("renderer.defaultInputs.filePickerUnavailable")
|
|
1439
1439
|
})
|
|
1440
1440
|
}),
|
|
1441
|
-
|
|
1442
|
-
style: [J.helperText, { color:
|
|
1443
|
-
children:
|
|
1441
|
+
d && /* @__PURE__ */ j(z, {
|
|
1442
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1443
|
+
children: d
|
|
1444
1444
|
})
|
|
1445
1445
|
]
|
|
1446
1446
|
});
|
|
@@ -1513,15 +1513,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1513
1513
|
fontSize: 12,
|
|
1514
1514
|
textAlign: "center"
|
|
1515
1515
|
}
|
|
1516
|
-
}),
|
|
1517
|
-
let n =
|
|
1518
|
-
return /* @__PURE__ */ M(
|
|
1519
|
-
style:
|
|
1516
|
+
}), he = (e, t) => null, ge = ({ missing: e, children: t }) => {
|
|
1517
|
+
let n = p(), { colors: r } = g();
|
|
1518
|
+
return /* @__PURE__ */ M(te, { children: [t, e.length > 0 && /* @__PURE__ */ M(H, {
|
|
1519
|
+
style: _e.container,
|
|
1520
1520
|
children: [/* @__PURE__ */ j(z, {
|
|
1521
|
-
style: [
|
|
1521
|
+
style: [_e.title, { color: r.textMuted }],
|
|
1522
1522
|
children: n("renderer.dependencyHint.title")
|
|
1523
1523
|
}), e.map((e) => /* @__PURE__ */ M(z, {
|
|
1524
|
-
style: [
|
|
1524
|
+
style: [_e.item, { color: r.textMuted }],
|
|
1525
1525
|
children: [
|
|
1526
1526
|
"•",
|
|
1527
1527
|
" ",
|
|
@@ -1529,7 +1529,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1529
1529
|
]
|
|
1530
1530
|
}, e.id))]
|
|
1531
1531
|
})] });
|
|
1532
|
-
},
|
|
1532
|
+
}, _e = L.create({
|
|
1533
1533
|
container: {
|
|
1534
1534
|
gap: 2,
|
|
1535
1535
|
marginTop: 4
|
|
@@ -1539,199 +1539,218 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1539
1539
|
fontSize: 12,
|
|
1540
1540
|
fontWeight: "500"
|
|
1541
1541
|
}
|
|
1542
|
-
}),
|
|
1543
|
-
if (n >
|
|
1542
|
+
}), ve = (e) => e.replace(/<[^>]*>/g, ""), ye = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), be = (e, t = {}) => e == null || e === "" ? "" : ye(ve(String(e))), xe = 100, Se = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1543
|
+
if (n > xe) return console.warn(`sanitizeHttpResponse: Maximum depth (${xe}) exceeded.`), typeof e == "string" ? be(e, t) : "[Max Depth Exceeded]";
|
|
1544
1544
|
if (e == null) return e;
|
|
1545
|
-
if (typeof e == "string") return
|
|
1546
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1545
|
+
if (typeof e == "string") return be(e, t);
|
|
1546
|
+
if (Array.isArray(e)) return e.map((e) => Se(e, t, n + 1, r));
|
|
1547
1547
|
if (typeof e == "object") {
|
|
1548
1548
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1549
1549
|
r.add(e);
|
|
1550
1550
|
let i = {};
|
|
1551
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1551
|
+
for (let [a, o] of Object.entries(e)) i[a] = Se(o, t, n + 1, r);
|
|
1552
1552
|
return r.delete(e), i;
|
|
1553
1553
|
}
|
|
1554
1554
|
return e;
|
|
1555
|
-
},
|
|
1555
|
+
}, Ce = (e) => {
|
|
1556
1556
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1557
1557
|
return Array.from(t, (e) => e[1]);
|
|
1558
|
-
},
|
|
1558
|
+
}, we = (e, t) => Ce(e).every((e) => {
|
|
1559
1559
|
let n = t[e];
|
|
1560
1560
|
return n != null && n !== "";
|
|
1561
|
-
}),
|
|
1561
|
+
}), Te = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1562
1562
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1563
1563
|
return n ? encodeURIComponent(a) : a;
|
|
1564
|
-
}),
|
|
1565
|
-
let [o, s] =
|
|
1566
|
-
|
|
1567
|
-
|
|
1564
|
+
}), Ee = (t, a) => {
|
|
1565
|
+
let [o, s] = A(!1), [c, l] = A(null), [u, f] = A([]), [m, h] = A(""), [_, v] = A(!1), { value: y, placeholder: b } = t, { node: x, setValue: S, error: w, label: T, helperText: E, missingDependencies: te } = a, { formValues: P, inputNodes: F, headers: ne, baseUrl: ie } = r(), { colors: L } = g(), { httpConfig: R } = x.data, ae = p(), oe = k(!1), se = k(!1), ce = k(""), le = k(R), U = k(P), ue = k(F), W = k(ne), de = k(ie), G = k(S), fe = k(null), K = k(null), pe = O(() => R?.url ? Ce(R.url) : [], [R?.url]), q = pe.length > 0, me = O(() => pe.map((e) => `${e}:${String(P[e] ?? "")}`).join("|"), [pe, P]), J = O(() => R?.url ? q ? we(R.url, P) : !0 : !1, [
|
|
1566
|
+
R?.url,
|
|
1567
|
+
q,
|
|
1568
1568
|
P
|
|
1569
|
-
]),
|
|
1570
|
-
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
let
|
|
1574
|
-
if (!
|
|
1575
|
-
l(
|
|
1569
|
+
]), he = ee(async (t) => {
|
|
1570
|
+
K.current && K.current.abort();
|
|
1571
|
+
let r = new AbortController();
|
|
1572
|
+
K.current = r;
|
|
1573
|
+
let a = le.current, o = U.current, c = G.current;
|
|
1574
|
+
if (!a?.url) {
|
|
1575
|
+
l(ae("renderer.defaultHttpInput.noUrlConfigured")), K.current = null;
|
|
1576
1576
|
return;
|
|
1577
1577
|
}
|
|
1578
|
-
if (
|
|
1579
|
-
|
|
1578
|
+
if (a.url && !we(a.url, o)) {
|
|
1579
|
+
K.current = null;
|
|
1580
1580
|
return;
|
|
1581
1581
|
}
|
|
1582
1582
|
s(!0), l(null);
|
|
1583
1583
|
try {
|
|
1584
|
-
let
|
|
1584
|
+
let u = n(Te(a.url, o, !0), de.current), p = i(a.searchParam && t ? `${u}${u.includes("?") ? "&" : "?"}${a.searchParam}=${encodeURIComponent(t)}` : u, a.queryParams?.map((e) => ({
|
|
1585
1585
|
key: e.key,
|
|
1586
|
-
value:
|
|
1587
|
-
}))),
|
|
1586
|
+
value: Te(e.value, o)
|
|
1587
|
+
}))), m = (e) => ({
|
|
1588
1588
|
key: e.key,
|
|
1589
|
-
value:
|
|
1590
|
-
}),
|
|
1589
|
+
value: Te(e.value, o)
|
|
1590
|
+
}), h = e([{
|
|
1591
1591
|
key: "Content-Type",
|
|
1592
1592
|
value: "application/json"
|
|
1593
|
-
}],
|
|
1593
|
+
}], W.current?.map(m), a.headers?.map(m)), g = [
|
|
1594
1594
|
"POST",
|
|
1595
1595
|
"PUT",
|
|
1596
1596
|
"PATCH"
|
|
1597
|
-
].includes(
|
|
1598
|
-
body:
|
|
1599
|
-
headers: Object.fromEntries(
|
|
1600
|
-
method:
|
|
1601
|
-
signal:
|
|
1597
|
+
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(d(o, ue.current)) : a.body ? Te(a.body, o) : void 0 : void 0, _ = setTimeout(() => r.abort(), 3e4), v = await fetch(p, {
|
|
1598
|
+
body: g || void 0,
|
|
1599
|
+
headers: Object.fromEntries(h.filter((e) => e.key && e.value).map((e) => [e.key, e.value])),
|
|
1600
|
+
method: a.method || "GET",
|
|
1601
|
+
signal: r.signal
|
|
1602
1602
|
});
|
|
1603
|
-
if (clearTimeout(
|
|
1604
|
-
l(`HTTP Error ${
|
|
1603
|
+
if (clearTimeout(_), !v.ok) {
|
|
1604
|
+
l(`HTTP Error ${v.status}: ${v.statusText}`), s(!1);
|
|
1605
1605
|
return;
|
|
1606
1606
|
}
|
|
1607
|
-
let
|
|
1608
|
-
if (
|
|
1609
|
-
let { valueField: e = "value", labelField: t = "label" } =
|
|
1610
|
-
|
|
1607
|
+
let y = Se(await v.json()), b = a.responsePath ? C(y, a.responsePath) : y;
|
|
1608
|
+
if (a.responseMapping && Array.isArray(b)) {
|
|
1609
|
+
let { valueField: e = "value", labelField: t = "label" } = a.responseMapping;
|
|
1610
|
+
f(b.map((n) => ({
|
|
1611
1611
|
label: String(C(n, t) || ""),
|
|
1612
1612
|
value: String(C(n, e) || "")
|
|
1613
1613
|
})));
|
|
1614
|
-
} else
|
|
1614
|
+
} else c(typeof b == "string" ? b : JSON.stringify(b));
|
|
1615
1615
|
} catch (e) {
|
|
1616
1616
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1617
|
-
l(e instanceof Error ? e.message :
|
|
1617
|
+
l(e instanceof Error ? e.message : ae("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1618
1618
|
} finally {
|
|
1619
|
-
s(!1),
|
|
1619
|
+
s(!1), K.current = null;
|
|
1620
1620
|
}
|
|
1621
|
-
}, [
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1621
|
+
}, [ae]);
|
|
1622
|
+
if (D(() => {
|
|
1623
|
+
le.current = R, U.current = P, ue.current = F, W.current = ne, de.current = ie, G.current = S, fe.current = he;
|
|
1624
1624
|
}, [
|
|
1625
|
-
|
|
1625
|
+
R,
|
|
1626
1626
|
P,
|
|
1627
1627
|
F,
|
|
1628
1628
|
ne,
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
e
|
|
1638
|
-
|
|
1639
|
-
|
|
1629
|
+
ie,
|
|
1630
|
+
S,
|
|
1631
|
+
he
|
|
1632
|
+
]), D(() => () => {
|
|
1633
|
+
K.current && K.current.abort(), oe.current = !1, se.current = !1;
|
|
1634
|
+
}, []), D(() => {
|
|
1635
|
+
if (oe.current) return;
|
|
1636
|
+
oe.current = !0;
|
|
1637
|
+
let e = le.current, t = U.current, n = fe.current, r = e?.url && we(e.url, t);
|
|
1638
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ce.current = Ce(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1639
|
+
}, []), D(() => {
|
|
1640
|
+
if (!oe.current || !q || ce.current === me || !J) return;
|
|
1640
1641
|
let e = setTimeout(() => {
|
|
1641
|
-
|
|
1642
|
+
he(), ce.current = me;
|
|
1642
1643
|
}, 500);
|
|
1643
1644
|
return () => clearTimeout(e);
|
|
1644
1645
|
}, [
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
]),
|
|
1650
|
-
if (!
|
|
1646
|
+
me,
|
|
1647
|
+
q,
|
|
1648
|
+
J,
|
|
1649
|
+
he
|
|
1650
|
+
]), D(() => {
|
|
1651
|
+
if (!se.current) {
|
|
1652
|
+
se.current = !0;
|
|
1653
|
+
return;
|
|
1654
|
+
}
|
|
1655
|
+
let e = le.current, t = U.current, n = fe.current, r = e?.url && we(e.url, t);
|
|
1656
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ce.current = Ce(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1657
|
+
}, [O(() => JSON.stringify({
|
|
1658
|
+
body: R?.body,
|
|
1659
|
+
fetchOnMount: R?.fetchOnMount,
|
|
1660
|
+
headers: R?.headers,
|
|
1661
|
+
method: R?.method,
|
|
1662
|
+
queryParams: R?.queryParams,
|
|
1663
|
+
responseMapping: R?.responseMapping,
|
|
1664
|
+
responsePath: R?.responsePath,
|
|
1665
|
+
searchParam: R?.searchParam,
|
|
1666
|
+
sendAllFormValues: R?.sendAllFormValues,
|
|
1667
|
+
url: R?.url
|
|
1668
|
+
}), [R])]), D(() => {
|
|
1669
|
+
if (!(R?.searchParam && m)) return;
|
|
1651
1670
|
let e = setTimeout(() => {
|
|
1652
|
-
|
|
1671
|
+
he(m);
|
|
1653
1672
|
}, 300);
|
|
1654
1673
|
return () => clearTimeout(e);
|
|
1655
1674
|
}, [
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
]),
|
|
1660
|
-
let e = Array.isArray(
|
|
1661
|
-
if (
|
|
1662
|
-
let n = o &&
|
|
1675
|
+
m,
|
|
1676
|
+
R?.searchParam,
|
|
1677
|
+
he
|
|
1678
|
+
]), R?.responseMapping) {
|
|
1679
|
+
let e = Array.isArray(y) ? y[0] : y, t = u.find((t) => t.value === e);
|
|
1680
|
+
if (R.searchParam) {
|
|
1681
|
+
let n = o && R?.showLoading;
|
|
1663
1682
|
return /* @__PURE__ */ M(H, {
|
|
1664
1683
|
style: Y.container,
|
|
1665
1684
|
children: [
|
|
1666
1685
|
/* @__PURE__ */ M(z, {
|
|
1667
|
-
style: [Y.label, { color:
|
|
1668
|
-
children: [
|
|
1669
|
-
style: { color:
|
|
1686
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
1687
|
+
children: [T || x.data.name, x.data.required && /* @__PURE__ */ j(z, {
|
|
1688
|
+
style: { color: L.error },
|
|
1670
1689
|
children: "*"
|
|
1671
1690
|
})]
|
|
1672
1691
|
}),
|
|
1673
|
-
/* @__PURE__ */ j(
|
|
1674
|
-
missing:
|
|
1692
|
+
/* @__PURE__ */ j(ge, {
|
|
1693
|
+
missing: te,
|
|
1675
1694
|
children: /* @__PURE__ */ M(V, {
|
|
1676
1695
|
style: [
|
|
1677
1696
|
Y.trigger,
|
|
1678
1697
|
{
|
|
1679
|
-
backgroundColor:
|
|
1680
|
-
borderColor:
|
|
1698
|
+
backgroundColor: L.input,
|
|
1699
|
+
borderColor: L.border
|
|
1681
1700
|
},
|
|
1682
|
-
|
|
1683
|
-
|
|
1701
|
+
w && { borderColor: L.error },
|
|
1702
|
+
te.length > 0 && { backgroundColor: L.muted }
|
|
1684
1703
|
],
|
|
1685
|
-
onPress: () =>
|
|
1686
|
-
disabled:
|
|
1704
|
+
onPress: () => v(!0),
|
|
1705
|
+
disabled: te.length > 0,
|
|
1687
1706
|
activeOpacity: .7,
|
|
1688
1707
|
children: [n ? /* @__PURE__ */ M(H, {
|
|
1689
1708
|
style: Y.loadingTrigger,
|
|
1690
1709
|
children: [/* @__PURE__ */ j(N, {
|
|
1691
1710
|
size: "small",
|
|
1692
|
-
color:
|
|
1711
|
+
color: L.primary
|
|
1693
1712
|
}), /* @__PURE__ */ j(z, {
|
|
1694
|
-
style: [Y.triggerText, { color:
|
|
1713
|
+
style: [Y.triggerText, { color: L.textMuted }],
|
|
1695
1714
|
numberOfLines: 1,
|
|
1696
|
-
children: t?.label ||
|
|
1715
|
+
children: t?.label || b || ae("renderer.defaultHttpInput.search")
|
|
1697
1716
|
})]
|
|
1698
1717
|
}) : /* @__PURE__ */ j(z, {
|
|
1699
1718
|
style: [
|
|
1700
1719
|
Y.triggerText,
|
|
1701
|
-
{ color:
|
|
1702
|
-
!t && { color:
|
|
1720
|
+
{ color: L.text },
|
|
1721
|
+
!t && { color: L.textMuted }
|
|
1703
1722
|
],
|
|
1704
1723
|
numberOfLines: 1,
|
|
1705
|
-
children: t?.label ||
|
|
1724
|
+
children: t?.label || b || ae("renderer.defaultHttpInput.search")
|
|
1706
1725
|
}), /* @__PURE__ */ j(z, {
|
|
1707
|
-
style: [Y.arrow, { color:
|
|
1726
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1708
1727
|
children: "▼"
|
|
1709
1728
|
})]
|
|
1710
1729
|
})
|
|
1711
1730
|
}),
|
|
1712
1731
|
/* @__PURE__ */ j(re, {
|
|
1713
|
-
visible:
|
|
1732
|
+
visible: _,
|
|
1714
1733
|
transparent: !0,
|
|
1715
1734
|
animationType: "fade",
|
|
1716
|
-
onRequestClose: () =>
|
|
1735
|
+
onRequestClose: () => v(!1),
|
|
1717
1736
|
children: /* @__PURE__ */ j(V, {
|
|
1718
1737
|
style: Y.modalOverlay,
|
|
1719
1738
|
activeOpacity: 1,
|
|
1720
|
-
onPress: () =>
|
|
1739
|
+
onPress: () => v(!1),
|
|
1721
1740
|
children: /* @__PURE__ */ M(V, {
|
|
1722
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1741
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1723
1742
|
activeOpacity: 1,
|
|
1724
1743
|
onPress: () => {},
|
|
1725
1744
|
children: [
|
|
1726
1745
|
/* @__PURE__ */ M(H, {
|
|
1727
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1746
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1728
1747
|
children: [/* @__PURE__ */ j(z, {
|
|
1729
|
-
style: [Y.modalTitle, { color:
|
|
1730
|
-
children:
|
|
1748
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1749
|
+
children: T || x.data.name
|
|
1731
1750
|
}), /* @__PURE__ */ j(V, {
|
|
1732
|
-
onPress: () =>
|
|
1751
|
+
onPress: () => v(!1),
|
|
1733
1752
|
children: /* @__PURE__ */ j(z, {
|
|
1734
|
-
style: [Y.closeButton, { color:
|
|
1753
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
1735
1754
|
children: "✕"
|
|
1736
1755
|
})
|
|
1737
1756
|
})]
|
|
@@ -1740,15 +1759,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1740
1759
|
style: Y.searchContainer,
|
|
1741
1760
|
children: /* @__PURE__ */ j(B, {
|
|
1742
1761
|
style: [Y.searchInput, {
|
|
1743
|
-
backgroundColor:
|
|
1744
|
-
borderColor:
|
|
1745
|
-
color:
|
|
1762
|
+
backgroundColor: L.muted,
|
|
1763
|
+
borderColor: L.border,
|
|
1764
|
+
color: L.text
|
|
1746
1765
|
}],
|
|
1747
|
-
placeholder:
|
|
1748
|
-
placeholderTextColor:
|
|
1749
|
-
value:
|
|
1766
|
+
placeholder: ae("renderer.defaultHttpInput.search"),
|
|
1767
|
+
placeholderTextColor: L.textMuted,
|
|
1768
|
+
value: m,
|
|
1750
1769
|
onChangeText: (e) => {
|
|
1751
|
-
|
|
1770
|
+
h(e), l(null);
|
|
1752
1771
|
},
|
|
1753
1772
|
autoFocus: !0,
|
|
1754
1773
|
autoCapitalize: "none",
|
|
@@ -1759,22 +1778,22 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1759
1778
|
style: Y.loadingContainer,
|
|
1760
1779
|
children: /* @__PURE__ */ j(N, {
|
|
1761
1780
|
size: "small",
|
|
1762
|
-
color:
|
|
1781
|
+
color: L.primary
|
|
1763
1782
|
})
|
|
1764
1783
|
}) : c ? /* @__PURE__ */ M(H, {
|
|
1765
1784
|
style: Y.errorContainer,
|
|
1766
1785
|
children: [/* @__PURE__ */ j(z, {
|
|
1767
|
-
style: [Y.errorText, { color:
|
|
1786
|
+
style: [Y.errorText, { color: L.error }],
|
|
1768
1787
|
children: c
|
|
1769
1788
|
}), /* @__PURE__ */ j(V, {
|
|
1770
|
-
onPress: () =>
|
|
1789
|
+
onPress: () => he(m),
|
|
1771
1790
|
style: Y.retryButton,
|
|
1772
1791
|
children: /* @__PURE__ */ j(z, {
|
|
1773
|
-
style: [Y.retryButtonText, { color:
|
|
1774
|
-
children:
|
|
1792
|
+
style: [Y.retryButtonText, { color: L.primary }],
|
|
1793
|
+
children: ae("renderer.defaultHttpInput.retry")
|
|
1775
1794
|
})
|
|
1776
1795
|
})]
|
|
1777
|
-
}) : /* @__PURE__ */ j(
|
|
1796
|
+
}) : /* @__PURE__ */ j(I, {
|
|
1778
1797
|
data: u,
|
|
1779
1798
|
keyExtractor: (e) => e.value,
|
|
1780
1799
|
style: Y.optionsList,
|
|
@@ -1782,23 +1801,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1782
1801
|
ListEmptyComponent: /* @__PURE__ */ j(H, {
|
|
1783
1802
|
style: Y.emptyContainer,
|
|
1784
1803
|
children: /* @__PURE__ */ j(z, {
|
|
1785
|
-
style: [Y.emptyText, { color:
|
|
1786
|
-
children:
|
|
1804
|
+
style: [Y.emptyText, { color: L.textMuted }],
|
|
1805
|
+
children: ae("renderer.defaultHttpInput.noResults")
|
|
1787
1806
|
})
|
|
1788
1807
|
}),
|
|
1789
1808
|
renderItem: ({ item: t }) => {
|
|
1790
1809
|
let n = t.value === e;
|
|
1791
1810
|
return /* @__PURE__ */ M(V, {
|
|
1792
|
-
style: [Y.option, n && { backgroundColor:
|
|
1811
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
1793
1812
|
onPress: () => {
|
|
1794
|
-
|
|
1813
|
+
S(t.value), v(!1);
|
|
1795
1814
|
},
|
|
1796
1815
|
activeOpacity: .7,
|
|
1797
1816
|
children: [/* @__PURE__ */ j(z, {
|
|
1798
|
-
style: [Y.optionText, { color:
|
|
1817
|
+
style: [Y.optionText, { color: L.text }],
|
|
1799
1818
|
children: t.label
|
|
1800
1819
|
}), n && /* @__PURE__ */ j(z, {
|
|
1801
|
-
style: [Y.checkmark, { color:
|
|
1820
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
1802
1821
|
children: "✓"
|
|
1803
1822
|
})]
|
|
1804
1823
|
});
|
|
@@ -1808,95 +1827,95 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1808
1827
|
})
|
|
1809
1828
|
})
|
|
1810
1829
|
}),
|
|
1811
|
-
|
|
1812
|
-
style: [Y.error, { color:
|
|
1813
|
-
children:
|
|
1830
|
+
w && /* @__PURE__ */ j(z, {
|
|
1831
|
+
style: [Y.error, { color: L.error }],
|
|
1832
|
+
children: w
|
|
1814
1833
|
}),
|
|
1815
|
-
|
|
1816
|
-
style: [Y.helperText, { color:
|
|
1817
|
-
children:
|
|
1834
|
+
E && !w && /* @__PURE__ */ j(z, {
|
|
1835
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1836
|
+
children: E
|
|
1818
1837
|
})
|
|
1819
1838
|
]
|
|
1820
1839
|
});
|
|
1821
1840
|
}
|
|
1822
|
-
let n = o &&
|
|
1841
|
+
let n = o && R?.showLoading, r = te.length === 0 && u.length === 0 && !n ? c ?? ae("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1823
1842
|
return /* @__PURE__ */ M(H, {
|
|
1824
1843
|
style: Y.container,
|
|
1825
1844
|
children: [
|
|
1826
1845
|
/* @__PURE__ */ M(z, {
|
|
1827
|
-
style: [Y.label, { color:
|
|
1828
|
-
children: [
|
|
1829
|
-
style: { color:
|
|
1846
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
1847
|
+
children: [T || x.data.name, x.data.required && /* @__PURE__ */ j(z, {
|
|
1848
|
+
style: { color: L.error },
|
|
1830
1849
|
children: "*"
|
|
1831
1850
|
})]
|
|
1832
1851
|
}),
|
|
1833
|
-
/* @__PURE__ */ j(
|
|
1834
|
-
missing:
|
|
1852
|
+
/* @__PURE__ */ j(ge, {
|
|
1853
|
+
missing: te,
|
|
1835
1854
|
children: /* @__PURE__ */ M(V, {
|
|
1836
1855
|
style: [
|
|
1837
1856
|
Y.trigger,
|
|
1838
1857
|
{
|
|
1839
|
-
backgroundColor:
|
|
1840
|
-
borderColor:
|
|
1858
|
+
backgroundColor: L.input,
|
|
1859
|
+
borderColor: L.border
|
|
1841
1860
|
},
|
|
1842
|
-
|
|
1843
|
-
(n || u.length === 0) && { backgroundColor:
|
|
1861
|
+
w && { borderColor: L.error },
|
|
1862
|
+
(n || u.length === 0) && { backgroundColor: L.muted }
|
|
1844
1863
|
],
|
|
1845
|
-
onPress: () =>
|
|
1864
|
+
onPress: () => v(!0),
|
|
1846
1865
|
disabled: n || u.length === 0,
|
|
1847
1866
|
activeOpacity: .7,
|
|
1848
1867
|
children: [
|
|
1849
1868
|
n && /* @__PURE__ */ j(N, {
|
|
1850
1869
|
size: "small",
|
|
1851
|
-
color:
|
|
1870
|
+
color: L.primary,
|
|
1852
1871
|
style: Y.triggerLoader
|
|
1853
1872
|
}),
|
|
1854
1873
|
/* @__PURE__ */ j(z, {
|
|
1855
1874
|
style: [
|
|
1856
1875
|
Y.triggerText,
|
|
1857
|
-
{ color:
|
|
1858
|
-
!t && { color:
|
|
1876
|
+
{ color: L.text },
|
|
1877
|
+
!t && { color: L.textMuted }
|
|
1859
1878
|
],
|
|
1860
1879
|
numberOfLines: 1,
|
|
1861
|
-
children: t?.label ||
|
|
1880
|
+
children: t?.label || b || ae("renderer.defaultHttpInput.selectOption")
|
|
1862
1881
|
}),
|
|
1863
1882
|
/* @__PURE__ */ j(z, {
|
|
1864
|
-
style: [Y.arrow, { color:
|
|
1883
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1865
1884
|
children: "▼"
|
|
1866
1885
|
})
|
|
1867
1886
|
]
|
|
1868
1887
|
})
|
|
1869
1888
|
}),
|
|
1870
1889
|
r && /* @__PURE__ */ j(z, {
|
|
1871
|
-
style: [Y.disabledMessage, { color:
|
|
1890
|
+
style: [Y.disabledMessage, { color: L.error }],
|
|
1872
1891
|
children: r
|
|
1873
1892
|
}),
|
|
1874
1893
|
/* @__PURE__ */ j(re, {
|
|
1875
|
-
visible:
|
|
1894
|
+
visible: _,
|
|
1876
1895
|
transparent: !0,
|
|
1877
1896
|
animationType: "fade",
|
|
1878
|
-
onRequestClose: () =>
|
|
1897
|
+
onRequestClose: () => v(!1),
|
|
1879
1898
|
children: /* @__PURE__ */ j(V, {
|
|
1880
1899
|
style: Y.modalOverlay,
|
|
1881
1900
|
activeOpacity: 1,
|
|
1882
|
-
onPress: () =>
|
|
1901
|
+
onPress: () => v(!1),
|
|
1883
1902
|
children: /* @__PURE__ */ M(V, {
|
|
1884
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1903
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1885
1904
|
activeOpacity: 1,
|
|
1886
1905
|
onPress: () => {},
|
|
1887
1906
|
children: [/* @__PURE__ */ M(H, {
|
|
1888
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1907
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1889
1908
|
children: [/* @__PURE__ */ j(z, {
|
|
1890
|
-
style: [Y.modalTitle, { color:
|
|
1891
|
-
children:
|
|
1909
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1910
|
+
children: T || x.data.name
|
|
1892
1911
|
}), /* @__PURE__ */ j(V, {
|
|
1893
|
-
onPress: () =>
|
|
1912
|
+
onPress: () => v(!1),
|
|
1894
1913
|
children: /* @__PURE__ */ j(z, {
|
|
1895
|
-
style: [Y.closeButton, { color:
|
|
1914
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
1896
1915
|
children: "✕"
|
|
1897
1916
|
})
|
|
1898
1917
|
})]
|
|
1899
|
-
}), /* @__PURE__ */ j(
|
|
1918
|
+
}), /* @__PURE__ */ j(I, {
|
|
1900
1919
|
data: u,
|
|
1901
1920
|
keyExtractor: (e) => e.value,
|
|
1902
1921
|
style: Y.optionsList,
|
|
@@ -1904,16 +1923,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1904
1923
|
renderItem: ({ item: t }) => {
|
|
1905
1924
|
let n = t.value === e;
|
|
1906
1925
|
return /* @__PURE__ */ M(V, {
|
|
1907
|
-
style: [Y.option, n && { backgroundColor:
|
|
1926
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
1908
1927
|
onPress: () => {
|
|
1909
|
-
|
|
1928
|
+
S(t.value), v(!1);
|
|
1910
1929
|
},
|
|
1911
1930
|
activeOpacity: .7,
|
|
1912
1931
|
children: [/* @__PURE__ */ j(z, {
|
|
1913
|
-
style: [Y.optionText, { color:
|
|
1932
|
+
style: [Y.optionText, { color: L.text }],
|
|
1914
1933
|
children: t.label
|
|
1915
1934
|
}), n && /* @__PURE__ */ j(z, {
|
|
1916
|
-
style: [Y.checkmark, { color:
|
|
1935
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
1917
1936
|
children: "✓"
|
|
1918
1937
|
})]
|
|
1919
1938
|
});
|
|
@@ -1922,13 +1941,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1922
1941
|
})
|
|
1923
1942
|
})
|
|
1924
1943
|
}),
|
|
1925
|
-
|
|
1926
|
-
style: [Y.error, { color:
|
|
1927
|
-
children:
|
|
1944
|
+
w && /* @__PURE__ */ j(z, {
|
|
1945
|
+
style: [Y.error, { color: L.error }],
|
|
1946
|
+
children: w
|
|
1928
1947
|
}),
|
|
1929
|
-
|
|
1930
|
-
style: [Y.helperText, { color:
|
|
1931
|
-
children:
|
|
1948
|
+
E && !w && /* @__PURE__ */ j(z, {
|
|
1949
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1950
|
+
children: E
|
|
1932
1951
|
})
|
|
1933
1952
|
]
|
|
1934
1953
|
});
|
|
@@ -1937,28 +1956,28 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1937
1956
|
style: Y.container,
|
|
1938
1957
|
children: [
|
|
1939
1958
|
/* @__PURE__ */ M(z, {
|
|
1940
|
-
style: [Y.label, { color:
|
|
1941
|
-
children: [
|
|
1942
|
-
style: { color:
|
|
1959
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
1960
|
+
children: [T || x.data.name, x.data.required && /* @__PURE__ */ j(z, {
|
|
1961
|
+
style: { color: L.error },
|
|
1943
1962
|
children: "*"
|
|
1944
1963
|
})]
|
|
1945
1964
|
}),
|
|
1946
1965
|
/* @__PURE__ */ j(B, {
|
|
1947
1966
|
style: [Y.input, {
|
|
1948
|
-
backgroundColor:
|
|
1949
|
-
borderColor:
|
|
1950
|
-
color:
|
|
1967
|
+
backgroundColor: L.muted,
|
|
1968
|
+
borderColor: L.border,
|
|
1969
|
+
color: L.textMuted
|
|
1951
1970
|
}],
|
|
1952
|
-
value: typeof
|
|
1971
|
+
value: typeof y == "string" ? y : JSON.stringify(y),
|
|
1953
1972
|
editable: !1
|
|
1954
1973
|
}),
|
|
1955
|
-
|
|
1956
|
-
style: [Y.error, { color:
|
|
1957
|
-
children:
|
|
1974
|
+
w && /* @__PURE__ */ j(z, {
|
|
1975
|
+
style: [Y.error, { color: L.error }],
|
|
1976
|
+
children: w
|
|
1958
1977
|
}),
|
|
1959
|
-
|
|
1960
|
-
style: [Y.helperText, { color:
|
|
1961
|
-
children:
|
|
1978
|
+
E && !w && /* @__PURE__ */ j(z, {
|
|
1979
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1980
|
+
children: E
|
|
1962
1981
|
})
|
|
1963
1982
|
]
|
|
1964
1983
|
});
|
|
@@ -2088,15 +2107,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2088
2107
|
flex: 1,
|
|
2089
2108
|
fontSize: 14
|
|
2090
2109
|
}
|
|
2091
|
-
}),
|
|
2092
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2093
|
-
return
|
|
2110
|
+
}), De = (e, t) => {
|
|
2111
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = A(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2112
|
+
return D(() => {
|
|
2094
2113
|
o(n?.toString() ?? "");
|
|
2095
2114
|
}, [n]), /* @__PURE__ */ M(H, {
|
|
2096
|
-
style:
|
|
2115
|
+
style: Oe.container,
|
|
2097
2116
|
children: [
|
|
2098
2117
|
/* @__PURE__ */ M(z, {
|
|
2099
|
-
style: [
|
|
2118
|
+
style: [Oe.label, { color: f.textSecondary }],
|
|
2100
2119
|
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
2101
2120
|
style: { color: f.error },
|
|
2102
2121
|
children: "*"
|
|
@@ -2104,7 +2123,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2104
2123
|
}),
|
|
2105
2124
|
/* @__PURE__ */ j(B, {
|
|
2106
2125
|
style: [
|
|
2107
|
-
|
|
2126
|
+
Oe.input,
|
|
2108
2127
|
{
|
|
2109
2128
|
backgroundColor: f.input,
|
|
2110
2129
|
borderColor: f.border,
|
|
@@ -2127,16 +2146,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2127
2146
|
accessibilityLabel: i
|
|
2128
2147
|
}),
|
|
2129
2148
|
l && /* @__PURE__ */ j(z, {
|
|
2130
|
-
style: [
|
|
2149
|
+
style: [Oe.error, { color: f.error }],
|
|
2131
2150
|
children: l
|
|
2132
2151
|
}),
|
|
2133
2152
|
d && !l && /* @__PURE__ */ j(z, {
|
|
2134
|
-
style: [
|
|
2153
|
+
style: [Oe.helperText, { color: f.textMuted }],
|
|
2135
2154
|
children: d
|
|
2136
2155
|
})
|
|
2137
2156
|
]
|
|
2138
2157
|
});
|
|
2139
|
-
},
|
|
2158
|
+
}, Oe = L.create({
|
|
2140
2159
|
container: { marginBottom: 16 },
|
|
2141
2160
|
error: {
|
|
2142
2161
|
fontSize: 12,
|
|
@@ -2158,23 +2177,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2158
2177
|
fontWeight: "500",
|
|
2159
2178
|
marginBottom: 8
|
|
2160
2179
|
}
|
|
2161
|
-
}),
|
|
2162
|
-
let [n, r] =
|
|
2180
|
+
}), ke = (e, t) => {
|
|
2181
|
+
let [n, r] = A(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2163
2182
|
return /* @__PURE__ */ M(H, {
|
|
2164
|
-
style:
|
|
2183
|
+
style: Ae.container,
|
|
2165
2184
|
children: [
|
|
2166
2185
|
/* @__PURE__ */ M(z, {
|
|
2167
|
-
style: [
|
|
2186
|
+
style: [Ae.label, { color: f.textSecondary }],
|
|
2168
2187
|
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
2169
2188
|
style: { color: f.error },
|
|
2170
2189
|
children: "*"
|
|
2171
2190
|
})]
|
|
2172
2191
|
}),
|
|
2173
2192
|
/* @__PURE__ */ M(H, {
|
|
2174
|
-
style:
|
|
2193
|
+
style: Ae.inputWrapper,
|
|
2175
2194
|
children: [/* @__PURE__ */ j(B, {
|
|
2176
2195
|
style: [
|
|
2177
|
-
|
|
2196
|
+
Ae.input,
|
|
2178
2197
|
{
|
|
2179
2198
|
backgroundColor: f.input,
|
|
2180
2199
|
borderColor: f.border,
|
|
@@ -2189,26 +2208,26 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2189
2208
|
secureTextEntry: !n,
|
|
2190
2209
|
accessibilityLabel: o
|
|
2191
2210
|
}), /* @__PURE__ */ j(V, {
|
|
2192
|
-
style:
|
|
2211
|
+
style: Ae.toggleButton,
|
|
2193
2212
|
onPress: () => r(!n),
|
|
2194
2213
|
activeOpacity: .7,
|
|
2195
2214
|
children: /* @__PURE__ */ j(z, {
|
|
2196
|
-
style: [
|
|
2215
|
+
style: [Ae.toggleText, { color: f.primary }],
|
|
2197
2216
|
children: n ? "Hide" : "Show"
|
|
2198
2217
|
})
|
|
2199
2218
|
})]
|
|
2200
2219
|
}),
|
|
2201
2220
|
l && /* @__PURE__ */ j(z, {
|
|
2202
|
-
style: [
|
|
2221
|
+
style: [Ae.error, { color: f.error }],
|
|
2203
2222
|
children: l
|
|
2204
2223
|
}),
|
|
2205
2224
|
d && !l && /* @__PURE__ */ j(z, {
|
|
2206
|
-
style: [
|
|
2225
|
+
style: [Ae.helperText, { color: f.textMuted }],
|
|
2207
2226
|
children: d
|
|
2208
2227
|
})
|
|
2209
2228
|
]
|
|
2210
2229
|
});
|
|
2211
|
-
},
|
|
2230
|
+
}, Ae = L.create({
|
|
2212
2231
|
container: { marginBottom: 16 },
|
|
2213
2232
|
error: {
|
|
2214
2233
|
fontSize: 12,
|
|
@@ -2246,32 +2265,32 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2246
2265
|
fontSize: 12,
|
|
2247
2266
|
fontWeight: "600"
|
|
2248
2267
|
}
|
|
2249
|
-
}),
|
|
2250
|
-
let { value: n } = e, { node:
|
|
2251
|
-
|
|
2268
|
+
}), je = (e, t) => {
|
|
2269
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = g(), l = p(), u = r.data.options || [], d = n || "", f = r.data.variant !== "default", m = (e) => {
|
|
2270
|
+
i(e);
|
|
2252
2271
|
};
|
|
2253
2272
|
return /* @__PURE__ */ M(H, {
|
|
2254
2273
|
style: X.container,
|
|
2255
2274
|
children: [
|
|
2256
2275
|
/* @__PURE__ */ M(z, {
|
|
2257
|
-
style: [X.label, { color:
|
|
2258
|
-
children: [
|
|
2259
|
-
style: { color:
|
|
2276
|
+
style: [X.label, { color: c.textSecondary }],
|
|
2277
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ j(z, {
|
|
2278
|
+
style: { color: c.error },
|
|
2260
2279
|
children: "*"
|
|
2261
2280
|
})]
|
|
2262
2281
|
}),
|
|
2263
|
-
|
|
2264
|
-
let t =
|
|
2265
|
-
return
|
|
2282
|
+
u.map((e) => {
|
|
2283
|
+
let t = d === e.value, n = l(e.label) || e.value, r = l(e.description);
|
|
2284
|
+
return f ? /* @__PURE__ */ M(V, {
|
|
2266
2285
|
style: [
|
|
2267
2286
|
X.card,
|
|
2268
2287
|
{
|
|
2269
|
-
backgroundColor:
|
|
2270
|
-
borderColor:
|
|
2288
|
+
backgroundColor: c.input,
|
|
2289
|
+
borderColor: c.border
|
|
2271
2290
|
},
|
|
2272
2291
|
t && {
|
|
2273
|
-
backgroundColor: `${
|
|
2274
|
-
borderColor:
|
|
2292
|
+
backgroundColor: `${c.primary}10`,
|
|
2293
|
+
borderColor: c.primary
|
|
2275
2294
|
},
|
|
2276
2295
|
e.disabled && { opacity: .5 }
|
|
2277
2296
|
],
|
|
@@ -2286,10 +2305,10 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2286
2305
|
/* @__PURE__ */ M(H, {
|
|
2287
2306
|
style: X.cardTextContainer,
|
|
2288
2307
|
children: [/* @__PURE__ */ j(z, {
|
|
2289
|
-
style: [X.cardLabel, { color:
|
|
2308
|
+
style: [X.cardLabel, { color: c.textSecondary }],
|
|
2290
2309
|
children: n
|
|
2291
2310
|
}), r && /* @__PURE__ */ j(z, {
|
|
2292
|
-
style: [X.cardDescription, { color:
|
|
2311
|
+
style: [X.cardDescription, { color: c.textMuted }],
|
|
2293
2312
|
children: r
|
|
2294
2313
|
})]
|
|
2295
2314
|
}),
|
|
@@ -2298,12 +2317,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2298
2317
|
X.radio,
|
|
2299
2318
|
X.cardRadio,
|
|
2300
2319
|
{
|
|
2301
|
-
backgroundColor:
|
|
2302
|
-
borderColor:
|
|
2320
|
+
backgroundColor: c.input,
|
|
2321
|
+
borderColor: c.border
|
|
2303
2322
|
},
|
|
2304
|
-
t && { borderColor:
|
|
2323
|
+
t && { borderColor: c.primary }
|
|
2305
2324
|
],
|
|
2306
|
-
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor:
|
|
2325
|
+
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2307
2326
|
})
|
|
2308
2327
|
]
|
|
2309
2328
|
}, e.value) : /* @__PURE__ */ M(V, {
|
|
@@ -2316,12 +2335,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2316
2335
|
style: [
|
|
2317
2336
|
X.radio,
|
|
2318
2337
|
{
|
|
2319
|
-
backgroundColor:
|
|
2320
|
-
borderColor:
|
|
2338
|
+
backgroundColor: c.input,
|
|
2339
|
+
borderColor: c.border
|
|
2321
2340
|
},
|
|
2322
|
-
t && { borderColor:
|
|
2341
|
+
t && { borderColor: c.primary }
|
|
2323
2342
|
],
|
|
2324
|
-
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor:
|
|
2343
|
+
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2325
2344
|
}),
|
|
2326
2345
|
e.image && /* @__PURE__ */ j(ne, {
|
|
2327
2346
|
source: { uri: e.image },
|
|
@@ -2332,25 +2351,25 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2332
2351
|
children: [/* @__PURE__ */ j(z, {
|
|
2333
2352
|
style: [
|
|
2334
2353
|
X.optionLabel,
|
|
2335
|
-
{ color:
|
|
2336
|
-
e.disabled && { color:
|
|
2354
|
+
{ color: c.textSecondary },
|
|
2355
|
+
e.disabled && { color: c.textMuted }
|
|
2337
2356
|
],
|
|
2338
2357
|
children: n
|
|
2339
2358
|
}), r && /* @__PURE__ */ j(z, {
|
|
2340
|
-
style: [X.optionDescription, { color:
|
|
2359
|
+
style: [X.optionDescription, { color: c.textMuted }],
|
|
2341
2360
|
children: r
|
|
2342
2361
|
})]
|
|
2343
2362
|
})
|
|
2344
2363
|
]
|
|
2345
2364
|
}, e.value);
|
|
2346
2365
|
}),
|
|
2347
|
-
|
|
2348
|
-
style: [X.error, { color:
|
|
2349
|
-
children:
|
|
2366
|
+
a && /* @__PURE__ */ j(z, {
|
|
2367
|
+
style: [X.error, { color: c.error }],
|
|
2368
|
+
children: a
|
|
2350
2369
|
}),
|
|
2351
|
-
|
|
2352
|
-
style: [X.helperText, { color:
|
|
2353
|
-
children:
|
|
2370
|
+
s && !a && /* @__PURE__ */ j(z, {
|
|
2371
|
+
style: [X.helperText, { color: c.textMuted }],
|
|
2372
|
+
children: s
|
|
2354
2373
|
})
|
|
2355
2374
|
]
|
|
2356
2375
|
});
|
|
@@ -2427,17 +2446,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2427
2446
|
height: 10,
|
|
2428
2447
|
width: 10
|
|
2429
2448
|
}
|
|
2430
|
-
}),
|
|
2431
|
-
let [n,
|
|
2432
|
-
h ?
|
|
2449
|
+
}), Me = (e, t) => {
|
|
2450
|
+
let [n, r] = A(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = g(), f = p(), m = o.data.options || [], h = o.data.multiple, _ = Array.isArray(i) ? i : i ? [i] : [], v = (e) => {
|
|
2451
|
+
h ? s(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (s(e), r(!1));
|
|
2433
2452
|
};
|
|
2434
2453
|
return /* @__PURE__ */ M(H, {
|
|
2435
2454
|
style: Z.container,
|
|
2436
2455
|
children: [
|
|
2437
2456
|
/* @__PURE__ */ M(z, {
|
|
2438
|
-
style: [Z.label, { color:
|
|
2439
|
-
children: [
|
|
2440
|
-
style: { color:
|
|
2457
|
+
style: [Z.label, { color: d.textSecondary }],
|
|
2458
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ j(z, {
|
|
2459
|
+
style: { color: d.error },
|
|
2441
2460
|
children: "*"
|
|
2442
2461
|
})]
|
|
2443
2462
|
}),
|
|
@@ -2445,27 +2464,27 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2445
2464
|
style: [
|
|
2446
2465
|
Z.trigger,
|
|
2447
2466
|
{
|
|
2448
|
-
backgroundColor:
|
|
2449
|
-
borderColor:
|
|
2467
|
+
backgroundColor: d.input,
|
|
2468
|
+
borderColor: d.border
|
|
2450
2469
|
},
|
|
2451
|
-
|
|
2470
|
+
c && { borderColor: d.error }
|
|
2452
2471
|
],
|
|
2453
|
-
onPress: () =>
|
|
2472
|
+
onPress: () => r(!0),
|
|
2454
2473
|
activeOpacity: .7,
|
|
2455
2474
|
children: [/* @__PURE__ */ j(z, {
|
|
2456
2475
|
style: [
|
|
2457
2476
|
Z.triggerText,
|
|
2458
|
-
{ color:
|
|
2459
|
-
_.length === 0 && { color:
|
|
2477
|
+
{ color: d.text },
|
|
2478
|
+
_.length === 0 && { color: d.textMuted }
|
|
2460
2479
|
],
|
|
2461
2480
|
children: (() => {
|
|
2462
|
-
if (_.length === 0) return
|
|
2463
|
-
if (h) return m.filter((e) => _.includes(e.value)).map((e) =>
|
|
2481
|
+
if (_.length === 0) return a || "Select...";
|
|
2482
|
+
if (h) return m.filter((e) => _.includes(e.value)).map((e) => f(e.label) || e.value).join(", ");
|
|
2464
2483
|
let e = m.find((e) => e.value === _[0]);
|
|
2465
|
-
return e ?
|
|
2484
|
+
return e ? f(e.label) || e.value : a || "Select...";
|
|
2466
2485
|
})()
|
|
2467
2486
|
}), /* @__PURE__ */ j(z, {
|
|
2468
|
-
style: [Z.arrow, { color:
|
|
2487
|
+
style: [Z.arrow, { color: d.textMuted }],
|
|
2469
2488
|
children: "▼"
|
|
2470
2489
|
})]
|
|
2471
2490
|
}),
|
|
@@ -2473,54 +2492,54 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2473
2492
|
visible: n,
|
|
2474
2493
|
transparent: !0,
|
|
2475
2494
|
animationType: "fade",
|
|
2476
|
-
onRequestClose: () =>
|
|
2495
|
+
onRequestClose: () => r(!1),
|
|
2477
2496
|
children: /* @__PURE__ */ j(V, {
|
|
2478
2497
|
style: Z.modalOverlay,
|
|
2479
2498
|
activeOpacity: 1,
|
|
2480
|
-
onPress: () =>
|
|
2499
|
+
onPress: () => r(!1),
|
|
2481
2500
|
children: /* @__PURE__ */ M(H, {
|
|
2482
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2501
|
+
style: [Z.modalContent, { backgroundColor: d.card }],
|
|
2483
2502
|
onStartShouldSetResponder: () => !0,
|
|
2484
2503
|
children: [
|
|
2485
2504
|
/* @__PURE__ */ M(H, {
|
|
2486
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2505
|
+
style: [Z.modalHeader, { borderBottomColor: d.border }],
|
|
2487
2506
|
children: [/* @__PURE__ */ j(z, {
|
|
2488
|
-
style: [Z.modalTitle, { color:
|
|
2489
|
-
children:
|
|
2507
|
+
style: [Z.modalTitle, { color: d.text }],
|
|
2508
|
+
children: l || o.data.name
|
|
2490
2509
|
}), /* @__PURE__ */ j(V, {
|
|
2491
|
-
onPress: () =>
|
|
2510
|
+
onPress: () => r(!1),
|
|
2492
2511
|
children: /* @__PURE__ */ j(z, {
|
|
2493
|
-
style: [Z.closeButton, { color:
|
|
2512
|
+
style: [Z.closeButton, { color: d.textMuted }],
|
|
2494
2513
|
children: "✕"
|
|
2495
2514
|
})
|
|
2496
2515
|
})]
|
|
2497
2516
|
}),
|
|
2498
|
-
/* @__PURE__ */ j(
|
|
2517
|
+
/* @__PURE__ */ j(ie, {
|
|
2499
2518
|
style: Z.optionsList,
|
|
2500
2519
|
children: m.map((e) => {
|
|
2501
2520
|
let t = _.includes(e.value);
|
|
2502
2521
|
return /* @__PURE__ */ M(V, {
|
|
2503
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2522
|
+
style: [Z.option, t && { backgroundColor: `${d.primary}20` }],
|
|
2504
2523
|
onPress: () => v(e.value),
|
|
2505
2524
|
disabled: e.disabled,
|
|
2506
2525
|
activeOpacity: .7,
|
|
2507
2526
|
children: [/* @__PURE__ */ j(z, {
|
|
2508
2527
|
style: [
|
|
2509
2528
|
Z.optionText,
|
|
2510
|
-
{ color:
|
|
2511
|
-
e.disabled && { color:
|
|
2529
|
+
{ color: d.textSecondary },
|
|
2530
|
+
e.disabled && { color: d.textMuted }
|
|
2512
2531
|
],
|
|
2513
|
-
children:
|
|
2532
|
+
children: f(e.label) || e.value
|
|
2514
2533
|
}), t && /* @__PURE__ */ j(z, {
|
|
2515
|
-
style: [Z.checkmark, { color:
|
|
2534
|
+
style: [Z.checkmark, { color: d.primary }],
|
|
2516
2535
|
children: "✓"
|
|
2517
2536
|
})]
|
|
2518
2537
|
}, e.value);
|
|
2519
2538
|
})
|
|
2520
2539
|
}),
|
|
2521
2540
|
h && /* @__PURE__ */ j(V, {
|
|
2522
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2523
|
-
onPress: () =>
|
|
2541
|
+
style: [Z.doneButton, { backgroundColor: d.primary }],
|
|
2542
|
+
onPress: () => r(!1),
|
|
2524
2543
|
children: /* @__PURE__ */ j(z, {
|
|
2525
2544
|
style: Z.doneButtonText,
|
|
2526
2545
|
children: "Done"
|
|
@@ -2530,13 +2549,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2530
2549
|
})
|
|
2531
2550
|
})
|
|
2532
2551
|
}),
|
|
2533
|
-
|
|
2534
|
-
style: [Z.error, { color:
|
|
2535
|
-
children:
|
|
2552
|
+
c && /* @__PURE__ */ j(z, {
|
|
2553
|
+
style: [Z.error, { color: d.error }],
|
|
2554
|
+
children: c
|
|
2536
2555
|
}),
|
|
2537
|
-
|
|
2538
|
-
style: [Z.helperText, { color:
|
|
2539
|
-
children:
|
|
2556
|
+
u && !c && /* @__PURE__ */ j(z, {
|
|
2557
|
+
style: [Z.helperText, { color: d.textMuted }],
|
|
2558
|
+
children: u
|
|
2540
2559
|
})
|
|
2541
2560
|
]
|
|
2542
2561
|
});
|
|
@@ -2622,17 +2641,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2622
2641
|
flex: 1,
|
|
2623
2642
|
fontSize: 14
|
|
2624
2643
|
}
|
|
2625
|
-
}),
|
|
2644
|
+
}), Ne = (e, t) => {
|
|
2626
2645
|
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = g(), l = !!n;
|
|
2627
2646
|
return /* @__PURE__ */ M(H, {
|
|
2628
|
-
style:
|
|
2647
|
+
style: Pe.container,
|
|
2629
2648
|
children: [
|
|
2630
2649
|
/* @__PURE__ */ M(H, {
|
|
2631
|
-
style:
|
|
2650
|
+
style: Pe.row,
|
|
2632
2651
|
children: [/* @__PURE__ */ j(H, {
|
|
2633
|
-
style:
|
|
2652
|
+
style: Pe.labelContainer,
|
|
2634
2653
|
children: /* @__PURE__ */ M(z, {
|
|
2635
|
-
style: [
|
|
2654
|
+
style: [Pe.label, { color: c.textSecondary }],
|
|
2636
2655
|
children: [o || r.data.name, r.data.required && /* @__PURE__ */ j(z, {
|
|
2637
2656
|
style: { color: c.error },
|
|
2638
2657
|
children: "*"
|
|
@@ -2650,16 +2669,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2650
2669
|
})]
|
|
2651
2670
|
}),
|
|
2652
2671
|
a && /* @__PURE__ */ j(z, {
|
|
2653
|
-
style: [
|
|
2672
|
+
style: [Pe.error, { color: c.error }],
|
|
2654
2673
|
children: a
|
|
2655
2674
|
}),
|
|
2656
2675
|
s && !a && /* @__PURE__ */ j(z, {
|
|
2657
|
-
style: [
|
|
2676
|
+
style: [Pe.helperText, { color: c.textMuted }],
|
|
2658
2677
|
children: s
|
|
2659
2678
|
})
|
|
2660
2679
|
]
|
|
2661
2680
|
});
|
|
2662
|
-
},
|
|
2681
|
+
}, Pe = L.create({
|
|
2663
2682
|
container: { marginBottom: 16 },
|
|
2664
2683
|
error: {
|
|
2665
2684
|
fontSize: 12,
|
|
@@ -2679,13 +2698,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2679
2698
|
flexDirection: "row",
|
|
2680
2699
|
justifyContent: "space-between"
|
|
2681
2700
|
}
|
|
2682
|
-
}),
|
|
2701
|
+
}), Fe = (e, t) => {
|
|
2683
2702
|
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2684
2703
|
return /* @__PURE__ */ M(H, {
|
|
2685
|
-
style:
|
|
2704
|
+
style: Ie.container,
|
|
2686
2705
|
children: [
|
|
2687
2706
|
/* @__PURE__ */ M(z, {
|
|
2688
|
-
style: [
|
|
2707
|
+
style: [Ie.label, { color: u.textSecondary }],
|
|
2689
2708
|
children: [c || a.data.name, a.data.required && /* @__PURE__ */ j(z, {
|
|
2690
2709
|
style: { color: u.error },
|
|
2691
2710
|
children: "*"
|
|
@@ -2693,7 +2712,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2693
2712
|
}),
|
|
2694
2713
|
/* @__PURE__ */ j(B, {
|
|
2695
2714
|
style: [
|
|
2696
|
-
|
|
2715
|
+
Ie.textarea,
|
|
2697
2716
|
{
|
|
2698
2717
|
backgroundColor: u.input,
|
|
2699
2718
|
borderColor: u.border,
|
|
@@ -2711,16 +2730,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2711
2730
|
accessibilityLabel: i
|
|
2712
2731
|
}),
|
|
2713
2732
|
s && /* @__PURE__ */ j(z, {
|
|
2714
|
-
style: [
|
|
2733
|
+
style: [Ie.error, { color: u.error }],
|
|
2715
2734
|
children: s
|
|
2716
2735
|
}),
|
|
2717
2736
|
l && !s && /* @__PURE__ */ j(z, {
|
|
2718
|
-
style: [
|
|
2737
|
+
style: [Ie.helperText, { color: u.textMuted }],
|
|
2719
2738
|
children: l
|
|
2720
2739
|
})
|
|
2721
2740
|
]
|
|
2722
2741
|
});
|
|
2723
|
-
},
|
|
2742
|
+
}, Ie = L.create({
|
|
2724
2743
|
container: { marginBottom: 16 },
|
|
2725
2744
|
error: {
|
|
2726
2745
|
fontSize: 12,
|
|
@@ -2743,13 +2762,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2743
2762
|
paddingHorizontal: 12,
|
|
2744
2763
|
paddingVertical: 8
|
|
2745
2764
|
}
|
|
2746
|
-
}),
|
|
2765
|
+
}), Le = (e, t) => {
|
|
2747
2766
|
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2748
2767
|
return /* @__PURE__ */ M(H, {
|
|
2749
|
-
style:
|
|
2768
|
+
style: Re.container,
|
|
2750
2769
|
children: [
|
|
2751
2770
|
/* @__PURE__ */ M(z, {
|
|
2752
|
-
style: [
|
|
2771
|
+
style: [Re.label, { color: u.textSecondary }],
|
|
2753
2772
|
children: [c || a.data.name, a.data.required && /* @__PURE__ */ j(z, {
|
|
2754
2773
|
style: { color: u.error },
|
|
2755
2774
|
children: "*"
|
|
@@ -2757,7 +2776,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2757
2776
|
}),
|
|
2758
2777
|
/* @__PURE__ */ j(B, {
|
|
2759
2778
|
style: [
|
|
2760
|
-
|
|
2779
|
+
Re.input,
|
|
2761
2780
|
{
|
|
2762
2781
|
backgroundColor: u.input,
|
|
2763
2782
|
borderColor: u.border,
|
|
@@ -2772,16 +2791,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2772
2791
|
accessibilityLabel: i
|
|
2773
2792
|
}),
|
|
2774
2793
|
s && /* @__PURE__ */ j(z, {
|
|
2775
|
-
style: [
|
|
2794
|
+
style: [Re.error, { color: u.error }],
|
|
2776
2795
|
children: s
|
|
2777
2796
|
}),
|
|
2778
2797
|
l && !s && /* @__PURE__ */ j(z, {
|
|
2779
|
-
style: [
|
|
2798
|
+
style: [Re.helperText, { color: u.textMuted }],
|
|
2780
2799
|
children: l
|
|
2781
2800
|
})
|
|
2782
2801
|
]
|
|
2783
2802
|
});
|
|
2784
|
-
},
|
|
2803
|
+
}, Re = L.create({
|
|
2785
2804
|
container: { marginBottom: 16 },
|
|
2786
2805
|
error: {
|
|
2787
2806
|
fontSize: 12,
|
|
@@ -2803,8 +2822,8 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2803
2822
|
fontWeight: "500",
|
|
2804
2823
|
marginBottom: 8
|
|
2805
2824
|
}
|
|
2806
|
-
}),
|
|
2807
|
-
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] =
|
|
2825
|
+
}), ze = (e, t) => {
|
|
2826
|
+
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] = A(s || 0), [d, f] = A(c || 0), [p, m] = A(!1), { node: h, setValue: _, error: v, label: y, helperText: b } = t, { colors: x } = g(), S = k(null), C = k(null), w = Array.from({ length: 24 }, (e, t) => t), T = Array.from({ length: 60 }, (e, t) => t), E = () => n || r || "Select time", D = ee(() => {
|
|
2808
2827
|
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2809
2828
|
}, [
|
|
2810
2829
|
l,
|
|
@@ -2882,7 +2901,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2882
2901
|
children: [/* @__PURE__ */ j(z, {
|
|
2883
2902
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2884
2903
|
children: "Hour"
|
|
2885
|
-
}), /* @__PURE__ */ j(
|
|
2904
|
+
}), /* @__PURE__ */ j(ie, {
|
|
2886
2905
|
ref: S,
|
|
2887
2906
|
style: Q.picker,
|
|
2888
2907
|
contentContainerStyle: Q.pickerContent,
|
|
@@ -2914,7 +2933,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2914
2933
|
children: [/* @__PURE__ */ j(z, {
|
|
2915
2934
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2916
2935
|
children: "Minute"
|
|
2917
|
-
}), /* @__PURE__ */ j(
|
|
2936
|
+
}), /* @__PURE__ */ j(ie, {
|
|
2918
2937
|
ref: C,
|
|
2919
2938
|
style: Q.picker,
|
|
2920
2939
|
contentContainerStyle: Q.pickerContent,
|
|
@@ -3053,27 +3072,27 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3053
3072
|
flex: 1,
|
|
3054
3073
|
fontSize: 14
|
|
3055
3074
|
}
|
|
3056
|
-
}),
|
|
3057
|
-
let [n,
|
|
3058
|
-
let e = `${String(
|
|
3059
|
-
|
|
3075
|
+
}), Be = (e, t) => {
|
|
3076
|
+
let [n, r] = A(!1), [i, a] = A(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), m = p(), h = Array.isArray(o) ? o : [], _ = h[0] || "", v = h[1] || "", y = _.split(":"), b = Number.parseInt(y[0], 10), x = Number.parseInt(y[1], 10), S = Number.isNaN(b) ? 0 : b, C = Number.isNaN(x) ? 0 : x, w = v.split(":"), T = Number.parseInt(w[0], 10), E = Number.parseInt(w[1], 10), D = Number.isNaN(T) ? 0 : T, O = Number.isNaN(E) ? 0 : E, [k, te] = A(0), [N, P] = A(0), F = Array.from({ length: 24 }, (e, t) => t), I = Array.from({ length: 60 }, (e, t) => t), ne = () => _ && v ? `${_} - ${v}` : _ || m("renderer.defaultInputs.selectDateRange"), L = ee(() => {
|
|
3077
|
+
let e = `${String(k).padStart(2, "0")}:${String(N).padStart(2, "0")}`;
|
|
3078
|
+
i ? (c([e, v]), a(!1), te(D || 0), P(O || 0)) : (c([_, e]), r(!1), a(!0));
|
|
3060
3079
|
}, [
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3080
|
+
i,
|
|
3081
|
+
k,
|
|
3082
|
+
N,
|
|
3064
3083
|
_,
|
|
3065
3084
|
v,
|
|
3066
3085
|
D,
|
|
3067
3086
|
O,
|
|
3068
|
-
|
|
3087
|
+
c
|
|
3069
3088
|
]);
|
|
3070
3089
|
return /* @__PURE__ */ M(H, {
|
|
3071
3090
|
style: $.container,
|
|
3072
3091
|
children: [
|
|
3073
3092
|
/* @__PURE__ */ M(z, {
|
|
3074
|
-
style: [$.label, { color:
|
|
3075
|
-
children: [
|
|
3076
|
-
style: { color:
|
|
3093
|
+
style: [$.label, { color: f.textSecondary }],
|
|
3094
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
3095
|
+
style: { color: f.error },
|
|
3077
3096
|
children: "*"
|
|
3078
3097
|
})]
|
|
3079
3098
|
}),
|
|
@@ -3081,23 +3100,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3081
3100
|
style: [
|
|
3082
3101
|
$.trigger,
|
|
3083
3102
|
{
|
|
3084
|
-
backgroundColor:
|
|
3085
|
-
borderColor:
|
|
3103
|
+
backgroundColor: f.input,
|
|
3104
|
+
borderColor: f.border
|
|
3086
3105
|
},
|
|
3087
|
-
|
|
3106
|
+
l && { borderColor: f.error }
|
|
3088
3107
|
],
|
|
3089
3108
|
onPress: () => {
|
|
3090
|
-
|
|
3109
|
+
te(S || 0), P(C || 0), a(!0), r(!0);
|
|
3091
3110
|
},
|
|
3092
3111
|
activeOpacity: .7,
|
|
3093
3112
|
children: [/* @__PURE__ */ j(z, {
|
|
3094
3113
|
style: [
|
|
3095
3114
|
$.triggerText,
|
|
3096
|
-
{ color:
|
|
3097
|
-
!_ && { color:
|
|
3115
|
+
{ color: f.text },
|
|
3116
|
+
!_ && { color: f.textMuted }
|
|
3098
3117
|
],
|
|
3099
3118
|
numberOfLines: 1,
|
|
3100
|
-
children:
|
|
3119
|
+
children: ne()
|
|
3101
3120
|
}), /* @__PURE__ */ j(z, {
|
|
3102
3121
|
style: $.icon,
|
|
3103
3122
|
children: "🕐"
|
|
@@ -3107,34 +3126,34 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3107
3126
|
visible: n,
|
|
3108
3127
|
transparent: !0,
|
|
3109
3128
|
animationType: "fade",
|
|
3110
|
-
onRequestClose: () =>
|
|
3129
|
+
onRequestClose: () => r(!1),
|
|
3111
3130
|
children: /* @__PURE__ */ j(V, {
|
|
3112
3131
|
style: $.modalOverlay,
|
|
3113
3132
|
activeOpacity: 1,
|
|
3114
|
-
onPress: () =>
|
|
3133
|
+
onPress: () => r(!1),
|
|
3115
3134
|
children: /* @__PURE__ */ M(V, {
|
|
3116
|
-
style: [$.modalContent, { backgroundColor:
|
|
3135
|
+
style: [$.modalContent, { backgroundColor: f.card }],
|
|
3117
3136
|
activeOpacity: 1,
|
|
3118
3137
|
onPress: () => {},
|
|
3119
3138
|
children: [
|
|
3120
3139
|
/* @__PURE__ */ M(H, {
|
|
3121
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3140
|
+
style: [$.modalHeader, { borderBottomColor: f.separator }],
|
|
3122
3141
|
children: [/* @__PURE__ */ j(z, {
|
|
3123
|
-
style: [$.modalTitle, { color:
|
|
3124
|
-
children:
|
|
3142
|
+
style: [$.modalTitle, { color: f.text }],
|
|
3143
|
+
children: u || s.data.name
|
|
3125
3144
|
}), /* @__PURE__ */ j(V, {
|
|
3126
|
-
onPress: () =>
|
|
3145
|
+
onPress: () => r(!1),
|
|
3127
3146
|
children: /* @__PURE__ */ j(z, {
|
|
3128
|
-
style: [$.closeButton, { color:
|
|
3147
|
+
style: [$.closeButton, { color: f.textMuted }],
|
|
3129
3148
|
children: "✕"
|
|
3130
3149
|
})
|
|
3131
3150
|
})]
|
|
3132
3151
|
}),
|
|
3133
3152
|
/* @__PURE__ */ j(H, {
|
|
3134
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3153
|
+
style: [$.rangeIndicator, { backgroundColor: f.primaryLight }],
|
|
3135
3154
|
children: /* @__PURE__ */ j(z, {
|
|
3136
|
-
style: [$.rangeIndicatorText, { color:
|
|
3137
|
-
children: m(
|
|
3155
|
+
style: [$.rangeIndicatorText, { color: f.primary }],
|
|
3156
|
+
children: m(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3138
3157
|
})
|
|
3139
3158
|
}),
|
|
3140
3159
|
/* @__PURE__ */ M(H, {
|
|
@@ -3143,22 +3162,22 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3143
3162
|
/* @__PURE__ */ M(H, {
|
|
3144
3163
|
style: $.pickerColumn,
|
|
3145
3164
|
children: [/* @__PURE__ */ j(z, {
|
|
3146
|
-
style: [$.pickerLabel, { color:
|
|
3165
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3147
3166
|
children: "Hour"
|
|
3148
|
-
}), /* @__PURE__ */ j(
|
|
3167
|
+
}), /* @__PURE__ */ j(ie, {
|
|
3149
3168
|
style: $.picker,
|
|
3150
3169
|
contentContainerStyle: $.pickerContent,
|
|
3151
3170
|
showsVerticalScrollIndicator: !1,
|
|
3152
|
-
children:
|
|
3153
|
-
style: [$.pickerItem,
|
|
3154
|
-
onPress: () =>
|
|
3171
|
+
children: F.map((e) => /* @__PURE__ */ j(V, {
|
|
3172
|
+
style: [$.pickerItem, k === e && { backgroundColor: f.primary }],
|
|
3173
|
+
onPress: () => te(e),
|
|
3155
3174
|
activeOpacity: .7,
|
|
3156
3175
|
children: /* @__PURE__ */ j(z, {
|
|
3157
3176
|
style: [
|
|
3158
3177
|
$.pickerItemText,
|
|
3159
|
-
{ color:
|
|
3160
|
-
|
|
3161
|
-
color:
|
|
3178
|
+
{ color: f.text },
|
|
3179
|
+
k === e && {
|
|
3180
|
+
color: f.background,
|
|
3162
3181
|
fontWeight: "600"
|
|
3163
3182
|
}
|
|
3164
3183
|
],
|
|
@@ -3168,28 +3187,28 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3168
3187
|
})]
|
|
3169
3188
|
}),
|
|
3170
3189
|
/* @__PURE__ */ j(z, {
|
|
3171
|
-
style: [$.pickerSeparator, { color:
|
|
3190
|
+
style: [$.pickerSeparator, { color: f.text }],
|
|
3172
3191
|
children: ":"
|
|
3173
3192
|
}),
|
|
3174
3193
|
/* @__PURE__ */ M(H, {
|
|
3175
3194
|
style: $.pickerColumn,
|
|
3176
3195
|
children: [/* @__PURE__ */ j(z, {
|
|
3177
|
-
style: [$.pickerLabel, { color:
|
|
3196
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3178
3197
|
children: "Minute"
|
|
3179
|
-
}), /* @__PURE__ */ j(
|
|
3198
|
+
}), /* @__PURE__ */ j(ie, {
|
|
3180
3199
|
style: $.picker,
|
|
3181
3200
|
contentContainerStyle: $.pickerContent,
|
|
3182
3201
|
showsVerticalScrollIndicator: !1,
|
|
3183
|
-
children:
|
|
3184
|
-
style: [$.pickerItem,
|
|
3185
|
-
onPress: () =>
|
|
3202
|
+
children: I.map((e) => /* @__PURE__ */ j(V, {
|
|
3203
|
+
style: [$.pickerItem, N === e && { backgroundColor: f.primary }],
|
|
3204
|
+
onPress: () => P(e),
|
|
3186
3205
|
activeOpacity: .7,
|
|
3187
3206
|
children: /* @__PURE__ */ j(z, {
|
|
3188
3207
|
style: [
|
|
3189
3208
|
$.pickerItemText,
|
|
3190
|
-
{ color:
|
|
3191
|
-
|
|
3192
|
-
color:
|
|
3209
|
+
{ color: f.text },
|
|
3210
|
+
N === e && {
|
|
3211
|
+
color: f.background,
|
|
3193
3212
|
fontWeight: "600"
|
|
3194
3213
|
}
|
|
3195
3214
|
],
|
|
@@ -3201,25 +3220,25 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3201
3220
|
]
|
|
3202
3221
|
}),
|
|
3203
3222
|
/* @__PURE__ */ j(V, {
|
|
3204
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3205
|
-
onPress:
|
|
3223
|
+
style: [$.confirmButton, { backgroundColor: f.primary }],
|
|
3224
|
+
onPress: L,
|
|
3206
3225
|
activeOpacity: .7,
|
|
3207
3226
|
children: /* @__PURE__ */ j(z, {
|
|
3208
|
-
style: [$.confirmButtonText, { color:
|
|
3209
|
-
children:
|
|
3227
|
+
style: [$.confirmButtonText, { color: f.background }],
|
|
3228
|
+
children: i ? "Next" : "Confirm"
|
|
3210
3229
|
})
|
|
3211
3230
|
})
|
|
3212
3231
|
]
|
|
3213
3232
|
})
|
|
3214
3233
|
})
|
|
3215
3234
|
}),
|
|
3216
|
-
|
|
3217
|
-
style: [$.error, { color:
|
|
3218
|
-
children:
|
|
3235
|
+
l && /* @__PURE__ */ j(z, {
|
|
3236
|
+
style: [$.error, { color: f.error }],
|
|
3237
|
+
children: l
|
|
3219
3238
|
}),
|
|
3220
|
-
|
|
3221
|
-
style: [$.helperText, { color:
|
|
3222
|
-
children:
|
|
3239
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
3240
|
+
style: [$.helperText, { color: f.textMuted }],
|
|
3241
|
+
children: d
|
|
3223
3242
|
})
|
|
3224
3243
|
]
|
|
3225
3244
|
});
|
|
@@ -3324,75 +3343,75 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3324
3343
|
flex: 1,
|
|
3325
3344
|
fontSize: 14
|
|
3326
3345
|
}
|
|
3327
|
-
}),
|
|
3346
|
+
}), Ve = (e, t) => /* @__PURE__ */ M(z, { children: [
|
|
3328
3347
|
"TODO: Implement ",
|
|
3329
3348
|
t.node.data.type,
|
|
3330
3349
|
" input for React Native"
|
|
3331
|
-
] }),
|
|
3332
|
-
address:
|
|
3333
|
-
autocomplete:
|
|
3334
|
-
checkbox:
|
|
3335
|
-
date:
|
|
3336
|
-
daterange:
|
|
3337
|
-
file:
|
|
3338
|
-
hidden:
|
|
3339
|
-
http:
|
|
3340
|
-
number:
|
|
3341
|
-
password:
|
|
3342
|
-
radio:
|
|
3343
|
-
select:
|
|
3344
|
-
submit:
|
|
3345
|
-
switch:
|
|
3346
|
-
text:
|
|
3347
|
-
textarea:
|
|
3348
|
-
time:
|
|
3349
|
-
timerange:
|
|
3350
|
-
},
|
|
3351
|
-
let { colors:
|
|
3350
|
+
] }), He = {
|
|
3351
|
+
address: le,
|
|
3352
|
+
autocomplete: ue,
|
|
3353
|
+
checkbox: de,
|
|
3354
|
+
date: fe,
|
|
3355
|
+
daterange: pe,
|
|
3356
|
+
file: me,
|
|
3357
|
+
hidden: he,
|
|
3358
|
+
http: Ee,
|
|
3359
|
+
number: De,
|
|
3360
|
+
password: ke,
|
|
3361
|
+
radio: je,
|
|
3362
|
+
select: Me,
|
|
3363
|
+
submit: Ve,
|
|
3364
|
+
switch: Ne,
|
|
3365
|
+
text: Le,
|
|
3366
|
+
textarea: Fe,
|
|
3367
|
+
time: ze,
|
|
3368
|
+
timerange: Be
|
|
3369
|
+
}, Ue = ({ label: e, children: t, isFirstStep: n, isLastStep: r, canContinue: i, isSubmitting: a, onBack: o, onContinue: s }) => {
|
|
3370
|
+
let { colors: c } = g(), l = p(), u = !i || a;
|
|
3352
3371
|
return /* @__PURE__ */ M(H, { children: [
|
|
3353
3372
|
e ? /* @__PURE__ */ j(z, {
|
|
3354
|
-
style: [
|
|
3373
|
+
style: [We.label, { color: c.text }],
|
|
3355
3374
|
children: e
|
|
3356
3375
|
}) : null,
|
|
3357
3376
|
/* @__PURE__ */ j(H, {
|
|
3358
|
-
style:
|
|
3377
|
+
style: We.content,
|
|
3359
3378
|
children: t
|
|
3360
3379
|
}),
|
|
3361
3380
|
/* @__PURE__ */ M(H, {
|
|
3362
|
-
style:
|
|
3381
|
+
style: We.actions,
|
|
3363
3382
|
children: [n ? /* @__PURE__ */ j(H, {}) : /* @__PURE__ */ j(V, {
|
|
3364
3383
|
style: [
|
|
3365
|
-
|
|
3366
|
-
{ borderColor:
|
|
3367
|
-
|
|
3384
|
+
We.backButton,
|
|
3385
|
+
{ borderColor: c.border },
|
|
3386
|
+
a && We.disabled
|
|
3368
3387
|
],
|
|
3369
|
-
onPress:
|
|
3370
|
-
disabled:
|
|
3388
|
+
onPress: o,
|
|
3389
|
+
disabled: a,
|
|
3371
3390
|
activeOpacity: .7,
|
|
3372
3391
|
children: /* @__PURE__ */ j(z, {
|
|
3373
|
-
style: [
|
|
3374
|
-
children:
|
|
3392
|
+
style: [We.backButtonText, { color: c.text }],
|
|
3393
|
+
children: l("renderer.step.back")
|
|
3375
3394
|
})
|
|
3376
3395
|
}), /* @__PURE__ */ j(V, {
|
|
3377
3396
|
style: [
|
|
3378
|
-
|
|
3379
|
-
{ backgroundColor:
|
|
3380
|
-
|
|
3381
|
-
backgroundColor:
|
|
3397
|
+
We.continueButton,
|
|
3398
|
+
{ backgroundColor: c.primary },
|
|
3399
|
+
u && {
|
|
3400
|
+
backgroundColor: c.primaryDisabled,
|
|
3382
3401
|
opacity: .6
|
|
3383
3402
|
}
|
|
3384
3403
|
],
|
|
3385
|
-
onPress:
|
|
3386
|
-
disabled:
|
|
3404
|
+
onPress: s,
|
|
3405
|
+
disabled: u,
|
|
3387
3406
|
activeOpacity: .7,
|
|
3388
|
-
children:
|
|
3389
|
-
style: [
|
|
3390
|
-
children:
|
|
3407
|
+
children: a ? /* @__PURE__ */ j(N, { color: c.primaryForeground }) : /* @__PURE__ */ j(z, {
|
|
3408
|
+
style: [We.continueButtonText, { color: c.primaryForeground }],
|
|
3409
|
+
children: l(r ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")
|
|
3391
3410
|
})
|
|
3392
3411
|
})]
|
|
3393
3412
|
})
|
|
3394
3413
|
] });
|
|
3395
|
-
},
|
|
3414
|
+
}, We = L.create({
|
|
3396
3415
|
actions: {
|
|
3397
3416
|
alignItems: "center",
|
|
3398
3417
|
flexDirection: "row",
|
|
@@ -3427,11 +3446,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3427
3446
|
fontWeight: "600",
|
|
3428
3447
|
marginBottom: 12
|
|
3429
3448
|
}
|
|
3430
|
-
}),
|
|
3449
|
+
}), Ge = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3431
3450
|
let { colors: i } = g();
|
|
3432
3451
|
return /* @__PURE__ */ j(V, {
|
|
3433
3452
|
style: [
|
|
3434
|
-
|
|
3453
|
+
Ke.button,
|
|
3435
3454
|
{ backgroundColor: i.primary },
|
|
3436
3455
|
(t || n) && {
|
|
3437
3456
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3442,11 +3461,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3442
3461
|
onPress: r,
|
|
3443
3462
|
activeOpacity: .7,
|
|
3444
3463
|
children: n ? /* @__PURE__ */ j(N, { color: i.primaryForeground }) : /* @__PURE__ */ j(z, {
|
|
3445
|
-
style: [
|
|
3464
|
+
style: [Ke.buttonText, { color: i.primaryForeground }],
|
|
3446
3465
|
children: e
|
|
3447
3466
|
})
|
|
3448
3467
|
});
|
|
3449
|
-
},
|
|
3468
|
+
}, Ke = L.create({
|
|
3450
3469
|
button: {
|
|
3451
3470
|
alignItems: "center",
|
|
3452
3471
|
borderRadius: 6,
|
|
@@ -3459,16 +3478,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3459
3478
|
fontSize: 16,
|
|
3460
3479
|
fontWeight: "600"
|
|
3461
3480
|
}
|
|
3462
|
-
}),
|
|
3463
|
-
let t =
|
|
3481
|
+
}), qe = ({ children: e }) => e, Je = ({ node: e }) => {
|
|
3482
|
+
let t = p(), { colors: n } = g(), r = t(e.data?.label);
|
|
3464
3483
|
return /* @__PURE__ */ j(z, {
|
|
3465
|
-
style: [
|
|
3466
|
-
children:
|
|
3484
|
+
style: [Xe.title, { color: n.text }],
|
|
3485
|
+
children: r
|
|
3467
3486
|
});
|
|
3468
|
-
},
|
|
3487
|
+
}, Ye = () => {
|
|
3469
3488
|
let { colors: e } = g();
|
|
3470
|
-
return /* @__PURE__ */ j(H, { style: [
|
|
3471
|
-
},
|
|
3489
|
+
return /* @__PURE__ */ j(H, { style: [Xe.divider, { backgroundColor: e.separator }] });
|
|
3490
|
+
}, Xe = L.create({
|
|
3472
3491
|
divider: {
|
|
3473
3492
|
height: 1,
|
|
3474
3493
|
marginBottom: 16,
|
|
@@ -3479,24 +3498,24 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3479
3498
|
fontWeight: "700",
|
|
3480
3499
|
marginBottom: 16
|
|
3481
3500
|
}
|
|
3482
|
-
}),
|
|
3483
|
-
divider:
|
|
3484
|
-
title:
|
|
3485
|
-
},
|
|
3501
|
+
}), Ze = {
|
|
3502
|
+
divider: Ye,
|
|
3503
|
+
title: Je
|
|
3504
|
+
}, Qe = ({ node: e, children: t }) => {
|
|
3486
3505
|
let { image: n } = e.data;
|
|
3487
3506
|
return /* @__PURE__ */ M(H, { children: [n && /* @__PURE__ */ j(ne, {
|
|
3488
3507
|
source: { uri: n },
|
|
3489
|
-
style:
|
|
3508
|
+
style: $e.image,
|
|
3490
3509
|
resizeMode: "cover"
|
|
3491
3510
|
}), t] });
|
|
3492
|
-
},
|
|
3511
|
+
}, $e = L.create({ image: {
|
|
3493
3512
|
borderRadius: 6,
|
|
3494
3513
|
height: 160,
|
|
3495
3514
|
marginBottom: 8,
|
|
3496
3515
|
width: "100%"
|
|
3497
|
-
} }),
|
|
3498
|
-
let { colors: t } = g(), n =
|
|
3499
|
-
return
|
|
3516
|
+
} }), et = ({ style: e }) => {
|
|
3517
|
+
let { colors: t } = g(), n = k(new F.Value(.5)).current;
|
|
3518
|
+
return D(() => {
|
|
3500
3519
|
let e = F.loop(F.sequence([F.timing(n, {
|
|
3501
3520
|
duration: 600,
|
|
3502
3521
|
toValue: 1,
|
|
@@ -3508,34 +3527,34 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3508
3527
|
})]));
|
|
3509
3528
|
return e.start(), () => e.stop();
|
|
3510
3529
|
}, [n]), /* @__PURE__ */ j(F.View, { style: [
|
|
3511
|
-
|
|
3530
|
+
nt.bar,
|
|
3512
3531
|
{
|
|
3513
3532
|
backgroundColor: t.muted,
|
|
3514
3533
|
opacity: n
|
|
3515
3534
|
},
|
|
3516
3535
|
e
|
|
3517
3536
|
] });
|
|
3518
|
-
},
|
|
3537
|
+
}, tt = () => /* @__PURE__ */ M(H, {
|
|
3519
3538
|
accessibilityState: { busy: !0 },
|
|
3520
3539
|
children: [
|
|
3521
|
-
/* @__PURE__ */ j(
|
|
3540
|
+
/* @__PURE__ */ j(et, { style: nt.title }),
|
|
3522
3541
|
/* @__PURE__ */ j(H, {
|
|
3523
|
-
style:
|
|
3542
|
+
style: nt.fields,
|
|
3524
3543
|
children: [
|
|
3525
3544
|
0,
|
|
3526
3545
|
1,
|
|
3527
3546
|
2
|
|
3528
3547
|
].map((e) => /* @__PURE__ */ M(H, {
|
|
3529
|
-
style:
|
|
3530
|
-
children: [/* @__PURE__ */ j(
|
|
3548
|
+
style: nt.field,
|
|
3549
|
+
children: [/* @__PURE__ */ j(et, { style: nt.fieldLabel }), /* @__PURE__ */ j(et, { style: nt.fieldInput })]
|
|
3531
3550
|
}, e))
|
|
3532
3551
|
}),
|
|
3533
3552
|
/* @__PURE__ */ j(H, {
|
|
3534
|
-
style:
|
|
3535
|
-
children: /* @__PURE__ */ j(
|
|
3553
|
+
style: nt.actions,
|
|
3554
|
+
children: /* @__PURE__ */ j(et, { style: nt.button })
|
|
3536
3555
|
})
|
|
3537
3556
|
]
|
|
3538
|
-
}),
|
|
3557
|
+
}), nt = L.create({
|
|
3539
3558
|
actions: {
|
|
3540
3559
|
alignItems: "flex-end",
|
|
3541
3560
|
marginTop: 24
|
|
@@ -3560,102 +3579,104 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3560
3579
|
marginBottom: 24,
|
|
3561
3580
|
width: "33%"
|
|
3562
3581
|
}
|
|
3563
|
-
}),
|
|
3564
|
-
let { colors:
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3582
|
+
}), rt = ({ baseUrl: e, components: n, contentContainerStyle: r, flows: i, googleApiKey: a, headers: o, initialValues: s, isLoading: c = !1, language: l, onChange: u, onSubmit: d, style: p, theme: m, validate: h, validationMode: _ }) => {
|
|
3583
|
+
let { colors: v } = g(), { canContinueStep: b, canSubmit: x, clearSubmitMessage: S, config: C, currentStep: w, currentStepGroupNode: T, currentStepIndex: E, formErrors: D, formValues: k, goToNextStep: A, goToPreviousStep: te, handleSubmit: N, inputNodes: P, isFirstStep: F, isLastStep: I, isSubmitting: ne, missingRequiredFields: re, setFieldValue: L, steps: R, submitMessage: B, t: V } = f({
|
|
3584
|
+
baseUrl: e,
|
|
3585
|
+
components: n,
|
|
3586
|
+
flows: i,
|
|
3587
|
+
googleApiKey: a,
|
|
3588
|
+
headers: o,
|
|
3589
|
+
initialValues: s,
|
|
3590
|
+
language: l,
|
|
3591
|
+
onChange: u,
|
|
3592
|
+
onSubmit: d,
|
|
3593
|
+
theme: m,
|
|
3594
|
+
validate: h,
|
|
3595
|
+
validationMode: _
|
|
3596
|
+
}), { FormWrapper: oe, SubmitButtonWrapper: se, renderNode: ce } = y({
|
|
3597
|
+
config: C,
|
|
3598
|
+
DefaultFormWrapper: ae,
|
|
3599
|
+
DefaultInputWrapper: Qe,
|
|
3600
|
+
DefaultSubmitButton: Ge,
|
|
3601
|
+
DefaultSubmitButtonWrapper: qe,
|
|
3602
|
+
defaultInputRenderers: He,
|
|
3603
|
+
defaultUI: Ze,
|
|
3604
|
+
formErrors: D,
|
|
3605
|
+
formValues: k,
|
|
3586
3606
|
inputNodes: P,
|
|
3587
3607
|
missingRequiredFields: re,
|
|
3588
3608
|
setFieldValue: L
|
|
3589
|
-
}),
|
|
3590
|
-
if (
|
|
3609
|
+
}), le = C.components.step ?? Ue, U = C.components.loadingSkeleton ?? tt, ue = O(() => V(T?.data?.label), [V, T]), W = ee(() => {
|
|
3610
|
+
if (I) {
|
|
3591
3611
|
N();
|
|
3592
3612
|
return;
|
|
3593
3613
|
}
|
|
3594
|
-
|
|
3614
|
+
A();
|
|
3595
3615
|
}, [
|
|
3596
|
-
|
|
3616
|
+
I,
|
|
3597
3617
|
N,
|
|
3598
|
-
|
|
3618
|
+
A
|
|
3599
3619
|
]);
|
|
3600
|
-
return /* @__PURE__ */ j(
|
|
3620
|
+
return /* @__PURE__ */ j(ie, {
|
|
3601
3621
|
nestedScrollEnabled: !0,
|
|
3602
3622
|
style: [
|
|
3603
|
-
|
|
3604
|
-
{ backgroundColor:
|
|
3605
|
-
|
|
3623
|
+
at.container,
|
|
3624
|
+
{ backgroundColor: v.background },
|
|
3625
|
+
p
|
|
3606
3626
|
],
|
|
3607
|
-
contentContainerStyle:
|
|
3608
|
-
children:
|
|
3627
|
+
contentContainerStyle: r,
|
|
3628
|
+
children: c ? /* @__PURE__ */ j(U, {}) : /* @__PURE__ */ M(t, {
|
|
3609
3629
|
value: {
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3630
|
+
baseUrl: C.baseUrl,
|
|
3631
|
+
flows: i,
|
|
3632
|
+
formErrors: D,
|
|
3633
|
+
formValues: k,
|
|
3634
|
+
googleApiKey: C.googleApiKey,
|
|
3635
|
+
headers: C.headers,
|
|
3615
3636
|
inputNodes: P,
|
|
3616
|
-
language:
|
|
3637
|
+
language: C.language,
|
|
3617
3638
|
setFieldValue: L
|
|
3618
3639
|
},
|
|
3619
|
-
children: [/* @__PURE__ */ M(
|
|
3640
|
+
children: [/* @__PURE__ */ M(oe, {
|
|
3620
3641
|
onSubmit: N,
|
|
3621
|
-
children: [
|
|
3622
|
-
missingFields:
|
|
3623
|
-
children: /* @__PURE__ */ j(
|
|
3624
|
-
step:
|
|
3625
|
-
groupNode:
|
|
3626
|
-
stepIndex:
|
|
3642
|
+
children: [w && /* @__PURE__ */ j(se, {
|
|
3643
|
+
missingFields: I ? re : void 0,
|
|
3644
|
+
children: /* @__PURE__ */ j(le, {
|
|
3645
|
+
step: w,
|
|
3646
|
+
groupNode: T,
|
|
3647
|
+
stepIndex: E,
|
|
3627
3648
|
totalSteps: R.length,
|
|
3628
3649
|
isFirstStep: F,
|
|
3629
|
-
isLastStep:
|
|
3630
|
-
canContinue:
|
|
3650
|
+
isLastStep: I,
|
|
3651
|
+
canContinue: b && (!I || x),
|
|
3631
3652
|
isSubmitting: ne,
|
|
3632
|
-
onBack:
|
|
3653
|
+
onBack: te,
|
|
3633
3654
|
onContinue: W,
|
|
3634
|
-
label:
|
|
3635
|
-
children:
|
|
3655
|
+
label: ue,
|
|
3656
|
+
children: w.nodes.map((e) => ce(e))
|
|
3636
3657
|
})
|
|
3637
3658
|
}), /* @__PURE__ */ j(z, {
|
|
3638
|
-
style: [
|
|
3659
|
+
style: [at.poweredBy, { color: v.textMuted }],
|
|
3639
3660
|
children: "Powered by Treege"
|
|
3640
3661
|
})]
|
|
3641
3662
|
}), B && /* @__PURE__ */ M(H, {
|
|
3642
|
-
style: [
|
|
3663
|
+
style: [at.message, { backgroundColor: B.type === "success" ? v.successBg : v.errorBg }],
|
|
3643
3664
|
children: [/* @__PURE__ */ j(z, {
|
|
3644
|
-
style: [
|
|
3665
|
+
style: [at.messageText, { color: B.type === "success" ? v.success : v.error }],
|
|
3645
3666
|
children: B.message
|
|
3646
3667
|
}), /* @__PURE__ */ j(z, {
|
|
3647
|
-
style: [
|
|
3648
|
-
onPress:
|
|
3668
|
+
style: [at.messageClose, { color: B.type === "success" ? v.success : v.error }],
|
|
3669
|
+
onPress: S,
|
|
3649
3670
|
children: V("common.close")
|
|
3650
3671
|
})]
|
|
3651
3672
|
})]
|
|
3652
3673
|
})
|
|
3653
3674
|
});
|
|
3654
|
-
},
|
|
3675
|
+
}, it = (e) => /* @__PURE__ */ j(x, {
|
|
3655
3676
|
theme: e.theme,
|
|
3656
3677
|
storageKey: "treege-renderer-theme",
|
|
3657
|
-
children: /* @__PURE__ */ j(
|
|
3658
|
-
}),
|
|
3678
|
+
children: /* @__PURE__ */ j(rt, { ...e })
|
|
3679
|
+
}), at = L.create({
|
|
3659
3680
|
container: { flex: 1 },
|
|
3660
3681
|
message: {
|
|
3661
3682
|
borderRadius: 6,
|
|
@@ -3678,4 +3699,4 @@ var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3678
3699
|
}
|
|
3679
3700
|
});
|
|
3680
3701
|
//#endregion
|
|
3681
|
-
export {
|
|
3702
|
+
export { le as DefaultAddressInput, ue as DefaultAutocompleteInput, de as DefaultCheckboxInput, fe as DefaultDateInput, pe as DefaultDateRangeInput, Ye as DefaultDividerUI, me as DefaultFileInput, he as DefaultHiddenInput, Ee as DefaultHttpInput, De as DefaultNumberInput, ke as DefaultPasswordInput, je as DefaultRadioInput, Me as DefaultSelectInput, Ve as DefaultSubmitInput, Ne as DefaultSwitchInput, Le as DefaultTextInput, Fe as DefaultTextareaInput, ze as DefaultTimeInput, Be as DefaultTimeRangeInput, Je as DefaultTitleUI, S as TreegeConfigProvider, it as TreegeRenderer, l as applyReferenceTransformation, v as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, d as convertFormValuesToNamedFormat, He as defaultInputRenderers, Ze as defaultUI, s as evaluateCondition, m as evaluateConditions, T as fileToSerializable, o as filesToSerializable, a as findStartNode, _ as getFlowRenderState, E as getTranslatedText, u as isFieldEmpty, b as isStartNode, be as sanitize, Se as sanitizeHttpResponse, w as serializableToFile, c as useTreegeConfig, f as useTreegeRenderer };
|