treege 3.0.0-beta.70 → 3.0.0-beta.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DefaultSubmitButton-PXs4TMgX.js → DefaultSubmitButton-C_141kVj.js} +495 -459
- package/dist/{ThemeContext-CdHMLHiw.js → ThemeContext-BGeTYtnw.js} +38 -32
- package/dist/{editor-Bh4AR91O.js → editor-CkCA6_WX.js} +204 -204
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/utils/form.d.ts +16 -0
- package/dist/renderer-D5xQw7hp.js +255 -0
- package/dist/renderer-native.js +711 -631
- package/dist/renderer.js +5 -5
- package/dist/useRenderNode-eqCek6JX.js +536 -0
- package/package.json +1 -1
- package/dist/renderer-DFzpylQb.js +0 -255
- package/dist/useRenderNode-DJGmt663.js +0 -514
package/dist/renderer-native.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { useCallback as te, useEffect as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { ActivityIndicator as
|
|
1
|
+
import { C as e, D as t, E as n, L as r, M as i, O as a, a as o, c as s, g as c, h as l, i as u, j as d, l as f, m as p, n as m, o as h, r as g, s as _, t as v, v as y, x as b, y as x, z as S } from "./ThemeContext-BGeTYtnw.js";
|
|
2
|
+
import { a as C, c as w, i as T, l as E, n as D, o as O, r as k, s as A, t as ee } from "./useRenderNode-eqCek6JX.js";
|
|
3
|
+
import { useCallback as te, useEffect as j, useMemo as ne, useRef as M, useState as N } from "react";
|
|
4
|
+
import { Fragment as re, jsx as P, jsxs as F } from "react/jsx-runtime";
|
|
5
|
+
import { ActivityIndicator as ie, Alert as ae, Animated as I, FlatList as oe, Image as L, Modal as se, ScrollView as R, StyleSheet as z, Switch as ce, Text as B, TextInput as le, TouchableOpacity as V, View as H } from "react-native";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
7
|
-
var
|
|
8
|
-
style:
|
|
7
|
+
var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
8
|
+
style: de.container,
|
|
9
9
|
children: e
|
|
10
|
-
}),
|
|
10
|
+
}), de = z.create({ container: { padding: 16 } }), fe = async (e, t) => {
|
|
11
11
|
if (!e || e.trim().length < 3) return [];
|
|
12
12
|
try {
|
|
13
13
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -22,7 +22,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
22
22
|
} catch (e) {
|
|
23
23
|
return console.error("Nominatim fetch error:", e), [];
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, pe = async (e, t) => {
|
|
26
26
|
if (!e || e.trim().length < 3) return [];
|
|
27
27
|
try {
|
|
28
28
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -35,26 +35,26 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
35
35
|
} catch (e) {
|
|
36
36
|
return console.error("Google Places fetch error:", e), [];
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
let [
|
|
40
|
-
v(e.value),
|
|
38
|
+
}, me = ({ field: e, extra: t }) => {
|
|
39
|
+
let [n, r] = N(""), [o, s] = N([]), [c, l] = N(!1), [u, d] = N(!1), { value: f, placeholder: p, id: h, name: g } = e, { node: _, setValue: v, error: y, label: b, helperText: x } = t, { language: S, googleApiKey: C } = i(), w = a(), { colors: T } = m(), E = te((e) => {
|
|
40
|
+
v(e.value), r(""), l(!1), s([]);
|
|
41
41
|
}, [v]), D = () => {
|
|
42
|
-
|
|
42
|
+
l(!1);
|
|
43
43
|
};
|
|
44
|
-
return
|
|
45
|
-
if (!
|
|
46
|
-
|
|
44
|
+
return j(() => {
|
|
45
|
+
if (!n || n.trim().length < 3) {
|
|
46
|
+
s([]), d(!1);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
d(!0);
|
|
50
50
|
let e = setTimeout(async () => {
|
|
51
|
-
|
|
51
|
+
s(C ? await pe(n, C) : await fe(n, S)), d(!1);
|
|
52
52
|
}, 300);
|
|
53
53
|
return () => {
|
|
54
|
-
clearTimeout(e),
|
|
54
|
+
clearTimeout(e), d(!1);
|
|
55
55
|
};
|
|
56
56
|
}, [
|
|
57
|
-
|
|
57
|
+
n,
|
|
58
58
|
S,
|
|
59
59
|
C
|
|
60
60
|
]), /* @__PURE__ */ F(H, {
|
|
@@ -76,23 +76,23 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
76
76
|
},
|
|
77
77
|
y && { borderColor: T.error }
|
|
78
78
|
],
|
|
79
|
-
onPress: () =>
|
|
79
|
+
onPress: () => l(!0),
|
|
80
80
|
activeOpacity: .7,
|
|
81
81
|
children: [/* @__PURE__ */ P(B, {
|
|
82
82
|
style: [
|
|
83
83
|
U.triggerText,
|
|
84
84
|
{ color: T.text },
|
|
85
|
-
!
|
|
85
|
+
!f && { color: T.textMuted }
|
|
86
86
|
],
|
|
87
87
|
numberOfLines: 1,
|
|
88
|
-
children:
|
|
88
|
+
children: f || p || w("renderer.defaultAddressInput.enterAddress")
|
|
89
89
|
}), /* @__PURE__ */ P(B, {
|
|
90
90
|
style: U.icon,
|
|
91
91
|
children: "📍"
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */ P(
|
|
95
|
-
visible:
|
|
94
|
+
/* @__PURE__ */ P(se, {
|
|
95
|
+
visible: c,
|
|
96
96
|
transparent: !0,
|
|
97
97
|
animationType: "fade",
|
|
98
98
|
onRequestClose: D,
|
|
@@ -120,41 +120,41 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ F(H, {
|
|
122
122
|
style: U.searchContainer,
|
|
123
|
-
children: [/* @__PURE__ */ P(
|
|
123
|
+
children: [/* @__PURE__ */ P(le, {
|
|
124
124
|
style: [U.searchInput, {
|
|
125
125
|
backgroundColor: T.muted,
|
|
126
126
|
borderColor: T.border,
|
|
127
127
|
color: T.text
|
|
128
128
|
}],
|
|
129
|
-
placeholder:
|
|
129
|
+
placeholder: p || w("renderer.defaultAddressInput.enterAddress"),
|
|
130
130
|
placeholderTextColor: T.textMuted,
|
|
131
|
-
value:
|
|
132
|
-
onChangeText:
|
|
131
|
+
value: n,
|
|
132
|
+
onChangeText: r,
|
|
133
133
|
autoFocus: !0,
|
|
134
134
|
autoCapitalize: "none",
|
|
135
135
|
autoCorrect: !1
|
|
136
|
-
}),
|
|
136
|
+
}), u && /* @__PURE__ */ P(ie, {
|
|
137
137
|
size: "small",
|
|
138
138
|
color: T.primary,
|
|
139
139
|
style: U.searchLoader
|
|
140
140
|
})]
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
u ? /* @__PURE__ */ F(H, {
|
|
143
143
|
style: U.loadingContainer,
|
|
144
|
-
children: [/* @__PURE__ */ P(
|
|
144
|
+
children: [/* @__PURE__ */ P(ie, {
|
|
145
145
|
size: "small",
|
|
146
146
|
color: T.primary
|
|
147
147
|
}), /* @__PURE__ */ P(B, {
|
|
148
148
|
style: [U.loadingText, { color: T.textMuted }],
|
|
149
149
|
children: w("renderer.defaultAddressInput.searching")
|
|
150
150
|
})]
|
|
151
|
-
}) : /* @__PURE__ */ P(
|
|
152
|
-
data:
|
|
151
|
+
}) : /* @__PURE__ */ P(oe, {
|
|
152
|
+
data: o,
|
|
153
153
|
keyExtractor: (e, t) => t.toString(),
|
|
154
154
|
style: U.suggestionsList,
|
|
155
155
|
contentContainerStyle: U.suggestionsListContent,
|
|
156
156
|
keyboardShouldPersistTaps: "handled",
|
|
157
|
-
ListEmptyComponent:
|
|
157
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ P(H, {
|
|
158
158
|
style: U.emptyContainer,
|
|
159
159
|
children: /* @__PURE__ */ P(B, {
|
|
160
160
|
style: [U.emptyText, { color: T.textMuted }],
|
|
@@ -305,25 +305,25 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
305
305
|
flex: 1,
|
|
306
306
|
fontSize: 14
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
309
|
-
let { colors: i } =
|
|
308
|
+
}), he = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
309
|
+
let { colors: i } = m();
|
|
310
310
|
return /* @__PURE__ */ F(H, {
|
|
311
|
-
style:
|
|
311
|
+
style: ge.content,
|
|
312
312
|
children: [n ? /* @__PURE__ */ P(L, {
|
|
313
313
|
source: { uri: n },
|
|
314
|
-
style:
|
|
314
|
+
style: ge.image
|
|
315
315
|
}) : null, /* @__PURE__ */ F(H, {
|
|
316
|
-
style:
|
|
316
|
+
style: ge.textWrapper,
|
|
317
317
|
children: [/* @__PURE__ */ P(B, {
|
|
318
|
-
style: [
|
|
318
|
+
style: [ge.label, { color: r ? i.textMuted : i.text }],
|
|
319
319
|
children: e
|
|
320
320
|
}), t ? /* @__PURE__ */ P(B, {
|
|
321
|
-
style: [
|
|
321
|
+
style: [ge.description, { color: i.textMuted }],
|
|
322
322
|
children: t
|
|
323
323
|
}) : null]
|
|
324
324
|
})]
|
|
325
325
|
});
|
|
326
|
-
},
|
|
326
|
+
}, ge = z.create({
|
|
327
327
|
content: {
|
|
328
328
|
alignItems: "center",
|
|
329
329
|
flex: 1,
|
|
@@ -341,19 +341,19 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
341
341
|
},
|
|
342
342
|
label: { fontSize: 14 },
|
|
343
343
|
textWrapper: { flex: 1 }
|
|
344
|
-
}),
|
|
345
|
-
let [
|
|
346
|
-
if (!
|
|
347
|
-
let e =
|
|
348
|
-
return _.filter((t) =>
|
|
344
|
+
}), _e = ({ field: e, extra: t }) => {
|
|
345
|
+
let [n, r] = N(!1), [i, o] = N(""), { value: s, placeholder: c } = e, { node: l, setValue: u, error: d, label: f, helperText: p } = t, h = a(), { colors: g } = m(), _ = l.data.options || [], v = _.find((e) => e.value === s), y = ne(() => {
|
|
346
|
+
if (!i.trim()) return _;
|
|
347
|
+
let e = i.toLowerCase();
|
|
348
|
+
return _.filter((t) => h(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
349
349
|
}, [
|
|
350
350
|
_,
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
i,
|
|
352
|
+
h
|
|
353
353
|
]), b = (e) => {
|
|
354
|
-
u(e === s ? "" : e),
|
|
354
|
+
u(e === s ? "" : e), r(!1), o("");
|
|
355
355
|
}, x = () => {
|
|
356
|
-
|
|
356
|
+
r(!1), o("");
|
|
357
357
|
};
|
|
358
358
|
return /* @__PURE__ */ F(H, {
|
|
359
359
|
style: W.container,
|
|
@@ -374,23 +374,40 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
374
374
|
},
|
|
375
375
|
d && { borderColor: g.error }
|
|
376
376
|
],
|
|
377
|
-
onPress: () =>
|
|
377
|
+
onPress: () => r(!0),
|
|
378
378
|
activeOpacity: .7,
|
|
379
|
-
children: [
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ P(B, {
|
|
381
|
+
style: [
|
|
382
|
+
W.triggerText,
|
|
383
|
+
{ color: g.text },
|
|
384
|
+
!s && { color: g.textMuted }
|
|
385
|
+
],
|
|
386
|
+
numberOfLines: 1,
|
|
387
|
+
children: s && v ? h(v.label) : c || h("renderer.defaultAutocompleteInput.selectOption")
|
|
388
|
+
}),
|
|
389
|
+
s ? /* @__PURE__ */ P(V, {
|
|
390
|
+
onPress: () => u(""),
|
|
391
|
+
hitSlop: {
|
|
392
|
+
bottom: 8,
|
|
393
|
+
left: 8,
|
|
394
|
+
right: 8,
|
|
395
|
+
top: 8
|
|
396
|
+
},
|
|
397
|
+
style: W.clearButton,
|
|
398
|
+
children: /* @__PURE__ */ P(B, {
|
|
399
|
+
style: [W.clearIcon, { color: g.textMuted }],
|
|
400
|
+
children: "✕"
|
|
401
|
+
})
|
|
402
|
+
}) : null,
|
|
403
|
+
/* @__PURE__ */ P(B, {
|
|
404
|
+
style: [W.arrow, { color: g.textMuted }],
|
|
405
|
+
children: "▼"
|
|
406
|
+
})
|
|
407
|
+
]
|
|
391
408
|
}),
|
|
392
|
-
/* @__PURE__ */ P(
|
|
393
|
-
visible:
|
|
409
|
+
/* @__PURE__ */ P(se, {
|
|
410
|
+
visible: n,
|
|
394
411
|
transparent: !0,
|
|
395
412
|
animationType: "fade",
|
|
396
413
|
onRequestClose: x,
|
|
@@ -418,22 +435,22 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
418
435
|
}),
|
|
419
436
|
/* @__PURE__ */ P(H, {
|
|
420
437
|
style: W.searchContainer,
|
|
421
|
-
children: /* @__PURE__ */ P(
|
|
438
|
+
children: /* @__PURE__ */ P(le, {
|
|
422
439
|
style: [W.searchInput, {
|
|
423
440
|
backgroundColor: g.muted,
|
|
424
441
|
borderColor: g.border,
|
|
425
442
|
color: g.text
|
|
426
443
|
}],
|
|
427
|
-
placeholder: c ||
|
|
444
|
+
placeholder: c || h("renderer.defaultAutocompleteInput.search"),
|
|
428
445
|
placeholderTextColor: g.textMuted,
|
|
429
|
-
value:
|
|
446
|
+
value: i,
|
|
430
447
|
onChangeText: o,
|
|
431
448
|
autoFocus: !0,
|
|
432
449
|
autoCapitalize: "none",
|
|
433
450
|
autoCorrect: !1
|
|
434
451
|
})
|
|
435
452
|
}),
|
|
436
|
-
/* @__PURE__ */ P(
|
|
453
|
+
/* @__PURE__ */ P(oe, {
|
|
437
454
|
data: y,
|
|
438
455
|
keyExtractor: (e) => e.value,
|
|
439
456
|
style: W.optionsList,
|
|
@@ -442,7 +459,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
442
459
|
style: W.emptyContainer,
|
|
443
460
|
children: /* @__PURE__ */ P(B, {
|
|
444
461
|
style: [W.emptyText, { color: g.textMuted }],
|
|
445
|
-
children:
|
|
462
|
+
children: h("renderer.defaultAutocompleteInput.noResults")
|
|
446
463
|
})
|
|
447
464
|
}),
|
|
448
465
|
renderItem: ({ item: e }) => {
|
|
@@ -452,9 +469,9 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
452
469
|
onPress: () => b(e.value),
|
|
453
470
|
disabled: e.disabled,
|
|
454
471
|
activeOpacity: .7,
|
|
455
|
-
children: [/* @__PURE__ */ P(
|
|
456
|
-
label:
|
|
457
|
-
description:
|
|
472
|
+
children: [/* @__PURE__ */ P(he, {
|
|
473
|
+
label: h(e.label) || e.value,
|
|
474
|
+
description: h(e.description),
|
|
458
475
|
image: e.image,
|
|
459
476
|
disabled: e.disabled
|
|
460
477
|
}), t && /* @__PURE__ */ P(B, {
|
|
@@ -484,6 +501,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
484
501
|
fontSize: 18,
|
|
485
502
|
fontWeight: "700"
|
|
486
503
|
},
|
|
504
|
+
clearButton: {
|
|
505
|
+
marginRight: 8,
|
|
506
|
+
paddingHorizontal: 2
|
|
507
|
+
},
|
|
508
|
+
clearIcon: { fontSize: 14 },
|
|
487
509
|
closeButton: {
|
|
488
510
|
fontSize: 24,
|
|
489
511
|
fontWeight: "300"
|
|
@@ -565,22 +587,22 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
565
587
|
flex: 1,
|
|
566
588
|
fontSize: 14
|
|
567
589
|
}
|
|
568
|
-
}),
|
|
569
|
-
let
|
|
570
|
-
o(f ? p.includes(e) ? p.filter((t) => t !== e) : [...p, e] : !
|
|
571
|
-
}, _ = (e) => f ? p.includes(e) :
|
|
590
|
+
}), ve = ({ field: e, extra: t }) => {
|
|
591
|
+
let n = a(), { value: r } = e, { node: i, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = m(), d = i.data.options || [], f = d.length > 0, p = Array.isArray(r) ? r : [], h = typeof r == "boolean" ? r : !1, g = (e) => {
|
|
592
|
+
o(f ? p.includes(e) ? p.filter((t) => t !== e) : [...p, e] : !h);
|
|
593
|
+
}, _ = (e) => f ? p.includes(e) : h;
|
|
572
594
|
return /* @__PURE__ */ F(H, {
|
|
573
595
|
style: G.container,
|
|
574
596
|
children: [
|
|
575
597
|
/* @__PURE__ */ F(B, {
|
|
576
598
|
style: [G.label, { color: u.textSecondary }],
|
|
577
|
-
children: [c ||
|
|
599
|
+
children: [c || i.data.name, i.data.required && /* @__PURE__ */ P(B, {
|
|
578
600
|
style: { color: u.error },
|
|
579
601
|
children: "*"
|
|
580
602
|
})]
|
|
581
603
|
}),
|
|
582
604
|
d.length > 0 ? d.map((e) => {
|
|
583
|
-
let t =
|
|
605
|
+
let t = n(e.description);
|
|
584
606
|
return /* @__PURE__ */ F(V, {
|
|
585
607
|
style: G.option,
|
|
586
608
|
onPress: () => g(e.value),
|
|
@@ -592,7 +614,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
592
614
|
checked: _(e.value),
|
|
593
615
|
disabled: e.disabled
|
|
594
616
|
},
|
|
595
|
-
accessibilityLabel:
|
|
617
|
+
accessibilityLabel: n(e.label) || e.value,
|
|
596
618
|
children: [
|
|
597
619
|
/* @__PURE__ */ P(H, {
|
|
598
620
|
style: [
|
|
@@ -623,7 +645,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
623
645
|
{ color: u.textSecondary },
|
|
624
646
|
e.disabled && { color: u.textMuted }
|
|
625
647
|
],
|
|
626
|
-
children:
|
|
648
|
+
children: n(e.label) || e.value
|
|
627
649
|
}), t && /* @__PURE__ */ P(B, {
|
|
628
650
|
style: [G.optionDescription, { color: u.textMuted }],
|
|
629
651
|
children: t
|
|
@@ -637,8 +659,8 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
637
659
|
activeOpacity: .7,
|
|
638
660
|
accessible: !0,
|
|
639
661
|
accessibilityRole: "checkbox",
|
|
640
|
-
accessibilityState: { checked:
|
|
641
|
-
accessibilityLabel: c ||
|
|
662
|
+
accessibilityState: { checked: h },
|
|
663
|
+
accessibilityLabel: c || i.data.name,
|
|
642
664
|
children: [/* @__PURE__ */ P(H, {
|
|
643
665
|
style: [
|
|
644
666
|
G.checkbox,
|
|
@@ -646,18 +668,18 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
646
668
|
backgroundColor: u.input,
|
|
647
669
|
borderColor: u.border
|
|
648
670
|
},
|
|
649
|
-
|
|
671
|
+
h && {
|
|
650
672
|
backgroundColor: u.primary,
|
|
651
673
|
borderColor: u.primary
|
|
652
674
|
}
|
|
653
675
|
],
|
|
654
|
-
children:
|
|
676
|
+
children: h && /* @__PURE__ */ P(B, {
|
|
655
677
|
style: G.checkmark,
|
|
656
678
|
children: "✓"
|
|
657
679
|
})
|
|
658
680
|
}), /* @__PURE__ */ P(B, {
|
|
659
681
|
style: [G.optionLabel, { color: u.textSecondary }],
|
|
660
|
-
children: c ||
|
|
682
|
+
children: c || i.data.name
|
|
661
683
|
})]
|
|
662
684
|
}),
|
|
663
685
|
s && /* @__PURE__ */ P(B, {
|
|
@@ -716,15 +738,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
716
738
|
},
|
|
717
739
|
optionLabel: { fontSize: 14 },
|
|
718
740
|
optionTextContainer: { flex: 1 }
|
|
719
|
-
}),
|
|
720
|
-
let [
|
|
721
|
-
let e =
|
|
741
|
+
}), ye = ({ field: e, extra: t }) => {
|
|
742
|
+
let [n, r] = N(!1), { value: i, placeholder: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = m(), p = a(), h = i ? new Date(i) : void 0, { year: g, month: _, today: v } = ne(() => {
|
|
743
|
+
let e = h || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
722
744
|
return r.setHours(0, 0, 0, 0), {
|
|
723
745
|
month: n,
|
|
724
746
|
today: r,
|
|
725
747
|
year: t
|
|
726
748
|
};
|
|
727
|
-
}, [
|
|
749
|
+
}, [h]), [y, b] = N(g), [x, S] = N(_), C = [
|
|
728
750
|
"January",
|
|
729
751
|
"February",
|
|
730
752
|
"March",
|
|
@@ -737,7 +759,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
737
759
|
"October",
|
|
738
760
|
"November",
|
|
739
761
|
"December"
|
|
740
|
-
], w =
|
|
762
|
+
], w = ne(() => {
|
|
741
763
|
let e = new Date(y, x, 1).getDay(), t = new Date(y, x + 1, 0).getDate(), n = new Date(y, x, 0).getDate(), r = [];
|
|
742
764
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
743
765
|
date: new Date(y, x - 1, n - t),
|
|
@@ -757,7 +779,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
757
779
|
});
|
|
758
780
|
return r;
|
|
759
781
|
}, [y, x]), T = te((e) => {
|
|
760
|
-
s.data.disablePast && e < v || (c(e.toISOString()),
|
|
782
|
+
s.data.disablePast && e < v || (c(e.toISOString()), r(!1));
|
|
761
783
|
}, [
|
|
762
784
|
s.data.disablePast,
|
|
763
785
|
v,
|
|
@@ -766,7 +788,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
766
788
|
x === 0 ? (S(11), b(y - 1)) : S(x - 1);
|
|
767
789
|
}, D = () => {
|
|
768
790
|
x === 11 ? (S(0), b(y + 1)) : S(x + 1);
|
|
769
|
-
},
|
|
791
|
+
}, O = () => h ? h.toLocaleDateString() : o || p("renderer.defaultInputs.selectDate"), k = (e) => s.data.disablePast ? e < v : !1, A = (e) => h ? e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear() : !1;
|
|
770
792
|
return /* @__PURE__ */ F(H, {
|
|
771
793
|
style: K.container,
|
|
772
794
|
children: [
|
|
@@ -786,30 +808,30 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
786
808
|
},
|
|
787
809
|
l && { borderColor: f.error }
|
|
788
810
|
],
|
|
789
|
-
onPress: () =>
|
|
811
|
+
onPress: () => r(!0),
|
|
790
812
|
activeOpacity: .7,
|
|
791
813
|
children: [/* @__PURE__ */ P(B, {
|
|
792
814
|
style: [
|
|
793
815
|
K.triggerText,
|
|
794
816
|
{ color: f.text },
|
|
795
|
-
!
|
|
817
|
+
!i && { color: f.textMuted }
|
|
796
818
|
],
|
|
797
819
|
numberOfLines: 1,
|
|
798
|
-
children:
|
|
820
|
+
children: O()
|
|
799
821
|
}), /* @__PURE__ */ P(B, {
|
|
800
822
|
style: K.icon,
|
|
801
823
|
children: "📅"
|
|
802
824
|
})]
|
|
803
825
|
}),
|
|
804
|
-
/* @__PURE__ */ P(
|
|
805
|
-
visible:
|
|
826
|
+
/* @__PURE__ */ P(se, {
|
|
827
|
+
visible: n,
|
|
806
828
|
transparent: !0,
|
|
807
829
|
animationType: "fade",
|
|
808
|
-
onRequestClose: () =>
|
|
830
|
+
onRequestClose: () => r(!1),
|
|
809
831
|
children: /* @__PURE__ */ P(V, {
|
|
810
832
|
style: K.modalOverlay,
|
|
811
833
|
activeOpacity: 1,
|
|
812
|
-
onPress: () =>
|
|
834
|
+
onPress: () => r(!1),
|
|
813
835
|
children: /* @__PURE__ */ F(V, {
|
|
814
836
|
style: [K.modalContent, { backgroundColor: f.card }],
|
|
815
837
|
activeOpacity: 1,
|
|
@@ -821,7 +843,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
821
843
|
style: [K.modalTitle, { color: f.text }],
|
|
822
844
|
children: u || s.data.name
|
|
823
845
|
}), /* @__PURE__ */ P(V, {
|
|
824
|
-
onPress: () =>
|
|
846
|
+
onPress: () => r(!1),
|
|
825
847
|
children: /* @__PURE__ */ P(B, {
|
|
826
848
|
style: [K.closeButton, { color: f.textMuted }],
|
|
827
849
|
children: "✕"
|
|
@@ -872,7 +894,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
872
894
|
children: e
|
|
873
895
|
}, e))
|
|
874
896
|
}),
|
|
875
|
-
/* @__PURE__ */ P(
|
|
897
|
+
/* @__PURE__ */ P(oe, {
|
|
876
898
|
data: w,
|
|
877
899
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
878
900
|
numColumns: 7,
|
|
@@ -880,7 +902,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
880
902
|
style: K.calendar,
|
|
881
903
|
contentContainerStyle: K.calendarContent,
|
|
882
904
|
renderItem: ({ item: e }) => {
|
|
883
|
-
let t =
|
|
905
|
+
let t = k(e.date), n = A(e.date);
|
|
884
906
|
return /* @__PURE__ */ P(V, {
|
|
885
907
|
style: [
|
|
886
908
|
K.dayCell,
|
|
@@ -1024,8 +1046,8 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1024
1046
|
flexDirection: "row",
|
|
1025
1047
|
marginBottom: 8
|
|
1026
1048
|
}
|
|
1027
|
-
}),
|
|
1028
|
-
let [
|
|
1049
|
+
}), be = ({ field: e, extra: t }) => {
|
|
1050
|
+
let [n, r] = N(!1), [i, o] = N(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, p = a(), { colors: h } = m(), g = Array.isArray(s) ? s : [], _ = g[0] ? new Date(g[0]) : void 0, v = g[1] ? new Date(g[1]) : void 0, { year: y, month: b, today: x } = ne(() => {
|
|
1029
1051
|
let e = _ || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1030
1052
|
return r.setHours(0, 0, 0, 0), {
|
|
1031
1053
|
month: n,
|
|
@@ -1045,7 +1067,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1045
1067
|
"October",
|
|
1046
1068
|
"November",
|
|
1047
1069
|
"December"
|
|
1048
|
-
], D =
|
|
1070
|
+
], D = ne(() => {
|
|
1049
1071
|
let e = new Date(S, w, 1).getDay(), t = new Date(S, w + 1, 0).getDate(), n = new Date(S, w, 0).getDate(), r = [];
|
|
1050
1072
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1051
1073
|
date: new Date(S, w - 1, n - t),
|
|
@@ -1064,20 +1086,20 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1064
1086
|
isCurrentMonth: !1
|
|
1065
1087
|
});
|
|
1066
1088
|
return r;
|
|
1067
|
-
}, [S, w]),
|
|
1068
|
-
c.data.disablePast && e < x || (
|
|
1089
|
+
}, [S, w]), O = te((e) => {
|
|
1090
|
+
c.data.disablePast && e < x || (i ? (l([e.toISOString(), v?.toISOString()]), o(!1)) : (l(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), r(!1), o(!0)));
|
|
1069
1091
|
}, [
|
|
1070
1092
|
c.data.disablePast,
|
|
1071
1093
|
x,
|
|
1072
|
-
|
|
1094
|
+
i,
|
|
1073
1095
|
_,
|
|
1074
1096
|
v,
|
|
1075
1097
|
l
|
|
1076
|
-
]),
|
|
1098
|
+
]), k = () => {
|
|
1077
1099
|
w === 0 ? (T(11), C(S - 1)) : T(w - 1);
|
|
1078
|
-
},
|
|
1100
|
+
}, A = () => {
|
|
1079
1101
|
w === 11 ? (T(0), C(S + 1)) : T(w + 1);
|
|
1080
|
-
},
|
|
1102
|
+
}, ee = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), j = (e) => c.data.disablePast ? e < x : !1, M = (e) => _ && v ? e >= _ && e <= v : !1, re = (e) => {
|
|
1081
1103
|
if (!(_ || v)) return !1;
|
|
1082
1104
|
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();
|
|
1083
1105
|
return t || n;
|
|
@@ -1086,9 +1108,9 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1086
1108
|
style: q.container,
|
|
1087
1109
|
children: [
|
|
1088
1110
|
/* @__PURE__ */ F(B, {
|
|
1089
|
-
style: [q.label, { color:
|
|
1111
|
+
style: [q.label, { color: h.textSecondary }],
|
|
1090
1112
|
children: [d || c.data.name, c.data.required && /* @__PURE__ */ P(B, {
|
|
1091
|
-
style: { color:
|
|
1113
|
+
style: { color: h.error },
|
|
1092
1114
|
children: "*"
|
|
1093
1115
|
})]
|
|
1094
1116
|
}),
|
|
@@ -1096,73 +1118,73 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1096
1118
|
style: [
|
|
1097
1119
|
q.trigger,
|
|
1098
1120
|
{
|
|
1099
|
-
backgroundColor:
|
|
1100
|
-
borderColor:
|
|
1121
|
+
backgroundColor: h.input,
|
|
1122
|
+
borderColor: h.border
|
|
1101
1123
|
},
|
|
1102
|
-
u && { borderColor:
|
|
1124
|
+
u && { borderColor: h.error }
|
|
1103
1125
|
],
|
|
1104
|
-
onPress: () =>
|
|
1126
|
+
onPress: () => r(!0),
|
|
1105
1127
|
activeOpacity: .7,
|
|
1106
1128
|
children: [/* @__PURE__ */ P(B, {
|
|
1107
1129
|
style: [
|
|
1108
1130
|
q.triggerText,
|
|
1109
|
-
{ color:
|
|
1110
|
-
!_ && { color:
|
|
1131
|
+
{ color: h.text },
|
|
1132
|
+
!_ && { color: h.textMuted }
|
|
1111
1133
|
],
|
|
1112
1134
|
numberOfLines: 1,
|
|
1113
|
-
children:
|
|
1135
|
+
children: ee()
|
|
1114
1136
|
}), /* @__PURE__ */ P(B, {
|
|
1115
1137
|
style: q.icon,
|
|
1116
1138
|
children: "📅"
|
|
1117
1139
|
})]
|
|
1118
1140
|
}),
|
|
1119
|
-
/* @__PURE__ */ P(
|
|
1120
|
-
visible:
|
|
1141
|
+
/* @__PURE__ */ P(se, {
|
|
1142
|
+
visible: n,
|
|
1121
1143
|
transparent: !0,
|
|
1122
1144
|
animationType: "fade",
|
|
1123
|
-
onRequestClose: () =>
|
|
1145
|
+
onRequestClose: () => r(!1),
|
|
1124
1146
|
children: /* @__PURE__ */ P(V, {
|
|
1125
1147
|
style: q.modalOverlay,
|
|
1126
1148
|
activeOpacity: 1,
|
|
1127
|
-
onPress: () =>
|
|
1149
|
+
onPress: () => r(!1),
|
|
1128
1150
|
children: /* @__PURE__ */ F(V, {
|
|
1129
|
-
style: [q.modalContent, { backgroundColor:
|
|
1151
|
+
style: [q.modalContent, { backgroundColor: h.card }],
|
|
1130
1152
|
activeOpacity: 1,
|
|
1131
1153
|
onPress: () => {},
|
|
1132
1154
|
children: [
|
|
1133
1155
|
/* @__PURE__ */ F(H, {
|
|
1134
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1156
|
+
style: [q.modalHeader, { borderBottomColor: h.separator }],
|
|
1135
1157
|
children: [/* @__PURE__ */ P(B, {
|
|
1136
|
-
style: [q.modalTitle, { color:
|
|
1158
|
+
style: [q.modalTitle, { color: h.text }],
|
|
1137
1159
|
children: d || c.data.name
|
|
1138
1160
|
}), /* @__PURE__ */ P(V, {
|
|
1139
|
-
onPress: () =>
|
|
1161
|
+
onPress: () => r(!1),
|
|
1140
1162
|
children: /* @__PURE__ */ P(B, {
|
|
1141
|
-
style: [q.closeButton, { color:
|
|
1163
|
+
style: [q.closeButton, { color: h.textMuted }],
|
|
1142
1164
|
children: "✕"
|
|
1143
1165
|
})
|
|
1144
1166
|
})]
|
|
1145
1167
|
}),
|
|
1146
1168
|
/* @__PURE__ */ P(H, {
|
|
1147
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1169
|
+
style: [q.rangeIndicator, { backgroundColor: h.primaryLight }],
|
|
1148
1170
|
children: /* @__PURE__ */ P(B, {
|
|
1149
|
-
style: [q.rangeIndicatorText, { color:
|
|
1150
|
-
children: p(
|
|
1171
|
+
style: [q.rangeIndicatorText, { color: h.primary }],
|
|
1172
|
+
children: p(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1151
1173
|
})
|
|
1152
1174
|
}),
|
|
1153
1175
|
/* @__PURE__ */ F(H, {
|
|
1154
1176
|
style: q.calendarHeader,
|
|
1155
1177
|
children: [
|
|
1156
1178
|
/* @__PURE__ */ P(V, {
|
|
1157
|
-
onPress:
|
|
1179
|
+
onPress: k,
|
|
1158
1180
|
style: q.navButton,
|
|
1159
1181
|
children: /* @__PURE__ */ P(B, {
|
|
1160
|
-
style: [q.navButtonText, { color:
|
|
1182
|
+
style: [q.navButtonText, { color: h.primary }],
|
|
1161
1183
|
children: "‹"
|
|
1162
1184
|
})
|
|
1163
1185
|
}),
|
|
1164
1186
|
/* @__PURE__ */ F(B, {
|
|
1165
|
-
style: [q.monthYear, { color:
|
|
1187
|
+
style: [q.monthYear, { color: h.text }],
|
|
1166
1188
|
children: [
|
|
1167
1189
|
E[w],
|
|
1168
1190
|
" ",
|
|
@@ -1170,10 +1192,10 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1170
1192
|
]
|
|
1171
1193
|
}),
|
|
1172
1194
|
/* @__PURE__ */ P(V, {
|
|
1173
|
-
onPress:
|
|
1195
|
+
onPress: A,
|
|
1174
1196
|
style: q.navButton,
|
|
1175
1197
|
children: /* @__PURE__ */ P(B, {
|
|
1176
|
-
style: [q.navButtonText, { color:
|
|
1198
|
+
style: [q.navButtonText, { color: h.primary }],
|
|
1177
1199
|
children: "›"
|
|
1178
1200
|
})
|
|
1179
1201
|
})
|
|
@@ -1190,11 +1212,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1190
1212
|
"Fri",
|
|
1191
1213
|
"Sat"
|
|
1192
1214
|
].map((e) => /* @__PURE__ */ P(B, {
|
|
1193
|
-
style: [q.weekDay, { color:
|
|
1215
|
+
style: [q.weekDay, { color: h.textMuted }],
|
|
1194
1216
|
children: e
|
|
1195
1217
|
}, e))
|
|
1196
1218
|
}),
|
|
1197
|
-
/* @__PURE__ */ P(
|
|
1219
|
+
/* @__PURE__ */ P(oe, {
|
|
1198
1220
|
data: D,
|
|
1199
1221
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1200
1222
|
numColumns: 7,
|
|
@@ -1202,32 +1224,32 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1202
1224
|
style: q.calendar,
|
|
1203
1225
|
contentContainerStyle: q.calendarContent,
|
|
1204
1226
|
renderItem: ({ item: e }) => {
|
|
1205
|
-
let t =
|
|
1227
|
+
let t = j(e.date), n = M(e.date), r = re(e.date);
|
|
1206
1228
|
return /* @__PURE__ */ P(V, {
|
|
1207
1229
|
style: [
|
|
1208
1230
|
q.dayCell,
|
|
1209
1231
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1210
|
-
n && { backgroundColor:
|
|
1232
|
+
n && { backgroundColor: h.primaryLight },
|
|
1211
1233
|
r && {
|
|
1212
|
-
backgroundColor:
|
|
1234
|
+
backgroundColor: h.primary,
|
|
1213
1235
|
borderRadius: 20
|
|
1214
1236
|
},
|
|
1215
1237
|
t && q.dayCellDisabled
|
|
1216
1238
|
],
|
|
1217
|
-
onPress: () =>
|
|
1239
|
+
onPress: () => O(e.date),
|
|
1218
1240
|
disabled: t,
|
|
1219
1241
|
activeOpacity: .7,
|
|
1220
1242
|
children: /* @__PURE__ */ P(B, {
|
|
1221
1243
|
style: [
|
|
1222
1244
|
q.dayText,
|
|
1223
|
-
{ color:
|
|
1224
|
-
!e.isCurrentMonth && { color:
|
|
1225
|
-
n && { color:
|
|
1245
|
+
{ color: h.text },
|
|
1246
|
+
!e.isCurrentMonth && { color: h.textMuted },
|
|
1247
|
+
n && { color: h.primary },
|
|
1226
1248
|
r && {
|
|
1227
|
-
color:
|
|
1249
|
+
color: h.background,
|
|
1228
1250
|
fontWeight: "600"
|
|
1229
1251
|
},
|
|
1230
|
-
t && { color:
|
|
1252
|
+
t && { color: h.textMuted }
|
|
1231
1253
|
],
|
|
1232
1254
|
children: e.day
|
|
1233
1255
|
})
|
|
@@ -1239,11 +1261,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1239
1261
|
})
|
|
1240
1262
|
}),
|
|
1241
1263
|
u && /* @__PURE__ */ P(B, {
|
|
1242
|
-
style: [q.error, { color:
|
|
1264
|
+
style: [q.error, { color: h.error }],
|
|
1243
1265
|
children: u
|
|
1244
1266
|
}),
|
|
1245
1267
|
f && !u && /* @__PURE__ */ P(B, {
|
|
1246
|
-
style: [q.helperText, { color:
|
|
1268
|
+
style: [q.helperText, { color: h.textMuted }],
|
|
1247
1269
|
children: f
|
|
1248
1270
|
})
|
|
1249
1271
|
]
|
|
@@ -1358,10 +1380,10 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1358
1380
|
flexDirection: "row",
|
|
1359
1381
|
marginBottom: 8
|
|
1360
1382
|
}
|
|
1361
|
-
}),
|
|
1362
|
-
let [
|
|
1363
|
-
if (
|
|
1364
|
-
let e = (await
|
|
1383
|
+
}), xe = ({ field: e, extra: t }) => {
|
|
1384
|
+
let [n, r] = N(null), [i, o] = N(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = m(), h = a(), g = Array.isArray(s) ? s : s ? [s] : [], _ = c.data.multiple, v = te(async () => {
|
|
1385
|
+
if (n) try {
|
|
1386
|
+
let e = (await n({ allowMultiSelection: _ })).map((e) => ({
|
|
1365
1387
|
data: e.uri,
|
|
1366
1388
|
lastModified: Date.now(),
|
|
1367
1389
|
name: e.name,
|
|
@@ -1370,30 +1392,30 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1370
1392
|
}));
|
|
1371
1393
|
l(_ ? [...g, ...e] : e[0] || null);
|
|
1372
1394
|
} catch (e) {
|
|
1373
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1395
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && ae.alert("Error", h("renderer.defaultInputs.filePickerError"));
|
|
1374
1396
|
}
|
|
1375
1397
|
}, [
|
|
1376
|
-
|
|
1398
|
+
n,
|
|
1377
1399
|
g,
|
|
1378
1400
|
_,
|
|
1379
1401
|
l,
|
|
1380
|
-
|
|
1402
|
+
h
|
|
1381
1403
|
]), y = te((e) => {
|
|
1382
1404
|
let t = g.filter((t, n) => n !== e);
|
|
1383
1405
|
l(t.length > 0 ? t : null);
|
|
1384
1406
|
}, [g, l]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1385
|
-
return
|
|
1407
|
+
return j(() => {
|
|
1386
1408
|
(async () => {
|
|
1387
1409
|
try {
|
|
1388
1410
|
let { pick: e } = await import("react-native-document-picker");
|
|
1389
|
-
|
|
1411
|
+
r(() => e);
|
|
1390
1412
|
} catch {
|
|
1391
|
-
|
|
1413
|
+
r(null);
|
|
1392
1414
|
} finally {
|
|
1393
1415
|
o(!1);
|
|
1394
1416
|
}
|
|
1395
1417
|
})();
|
|
1396
|
-
}, []),
|
|
1418
|
+
}, []), i ? null : n ? /* @__PURE__ */ F(H, {
|
|
1397
1419
|
style: J.container,
|
|
1398
1420
|
children: [
|
|
1399
1421
|
/* @__PURE__ */ F(B, {
|
|
@@ -1450,7 +1472,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1450
1472
|
activeOpacity: .7,
|
|
1451
1473
|
children: /* @__PURE__ */ P(B, {
|
|
1452
1474
|
style: [J.pickButtonText, { color: p.textMuted }],
|
|
1453
|
-
children: g.length === 0 ?
|
|
1475
|
+
children: g.length === 0 ? h(_ ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : h(_ ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1454
1476
|
})
|
|
1455
1477
|
}),
|
|
1456
1478
|
u && /* @__PURE__ */ P(B, {
|
|
@@ -1479,7 +1501,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1479
1501
|
}],
|
|
1480
1502
|
children: /* @__PURE__ */ P(B, {
|
|
1481
1503
|
style: [J.unavailableText, { color: p.error }],
|
|
1482
|
-
children:
|
|
1504
|
+
children: h("renderer.defaultInputs.filePickerUnavailable")
|
|
1483
1505
|
})
|
|
1484
1506
|
}),
|
|
1485
1507
|
f && /* @__PURE__ */ P(B, {
|
|
@@ -1557,15 +1579,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1557
1579
|
fontSize: 12,
|
|
1558
1580
|
textAlign: "center"
|
|
1559
1581
|
}
|
|
1560
|
-
}),
|
|
1561
|
-
let
|
|
1562
|
-
return /* @__PURE__ */ F(
|
|
1563
|
-
style:
|
|
1582
|
+
}), Se = (e) => null, Ce = ({ missing: e, children: t }) => {
|
|
1583
|
+
let n = a(), { colors: r } = m();
|
|
1584
|
+
return /* @__PURE__ */ F(re, { children: [t, e.length > 0 && /* @__PURE__ */ F(H, {
|
|
1585
|
+
style: we.container,
|
|
1564
1586
|
children: [/* @__PURE__ */ P(B, {
|
|
1565
|
-
style: [
|
|
1566
|
-
children:
|
|
1587
|
+
style: [we.title, { color: r.textMuted }],
|
|
1588
|
+
children: n("renderer.dependencyHint.title")
|
|
1567
1589
|
}), e.map((e) => /* @__PURE__ */ F(B, {
|
|
1568
|
-
style: [
|
|
1590
|
+
style: [we.item, { color: r.textMuted }],
|
|
1569
1591
|
children: [
|
|
1570
1592
|
"•",
|
|
1571
1593
|
" ",
|
|
@@ -1573,7 +1595,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1573
1595
|
]
|
|
1574
1596
|
}, e.id))]
|
|
1575
1597
|
})] });
|
|
1576
|
-
},
|
|
1598
|
+
}, we = z.create({
|
|
1577
1599
|
container: {
|
|
1578
1600
|
gap: 2,
|
|
1579
1601
|
marginTop: 4
|
|
@@ -1583,282 +1605,299 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1583
1605
|
fontSize: 12,
|
|
1584
1606
|
fontWeight: "500"
|
|
1585
1607
|
}
|
|
1586
|
-
}),
|
|
1587
|
-
if (n >
|
|
1608
|
+
}), Te = (e) => e.replace(/<[^>]*>/g, ""), Ee = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), De = (e, t = {}) => e == null || e === "" ? "" : Ee(Te(String(e))), Oe = 100, ke = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1609
|
+
if (n > Oe) return console.warn(`sanitizeHttpResponse: Maximum depth (${Oe}) exceeded.`), typeof e == "string" ? De(e, t) : "[Max Depth Exceeded]";
|
|
1588
1610
|
if (e == null) return e;
|
|
1589
|
-
if (typeof e == "string") return
|
|
1590
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1611
|
+
if (typeof e == "string") return De(e, t);
|
|
1612
|
+
if (Array.isArray(e)) return e.map((e) => ke(e, t, n + 1, r));
|
|
1591
1613
|
if (typeof e == "object") {
|
|
1592
1614
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1593
1615
|
r.add(e);
|
|
1594
1616
|
let i = {};
|
|
1595
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1617
|
+
for (let [a, o] of Object.entries(e)) i[a] = ke(o, t, n + 1, r);
|
|
1596
1618
|
return r.delete(e), i;
|
|
1597
1619
|
}
|
|
1598
1620
|
return e;
|
|
1599
|
-
},
|
|
1621
|
+
}, Ae = (e) => {
|
|
1600
1622
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1601
1623
|
return Array.from(t, (e) => e[1]);
|
|
1602
|
-
},
|
|
1624
|
+
}, je = (e, t) => Ae(e).every((e) => {
|
|
1603
1625
|
let n = t[e];
|
|
1604
1626
|
return n != null && n !== "";
|
|
1605
|
-
}),
|
|
1627
|
+
}), Me = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1606
1628
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1607
1629
|
return n ? encodeURIComponent(a) : a;
|
|
1608
|
-
}),
|
|
1609
|
-
let [
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
]),
|
|
1614
|
-
|
|
1615
|
-
let
|
|
1616
|
-
|
|
1617
|
-
let
|
|
1618
|
-
if (!
|
|
1619
|
-
|
|
1630
|
+
}), Ne = ({ field: r, extra: o }) => {
|
|
1631
|
+
let [s, c] = N(!1), [l, u] = N(null), [d, f] = N([]), [p, h] = N(""), [g, v] = N(!1), { value: S, placeholder: C } = r, { node: w, setValue: T, error: E, label: D, helperText: O, missingDependencies: k } = o, { formValues: A, inputNodes: ee, headers: re, baseUrl: ae } = i(), { colors: I } = m(), { httpConfig: L } = w.data, R = a(), z = M(!1), ce = M(!1), ue = M(""), de = M(L), fe = M(A), pe = M(ee), me = M(re), U = M(ae), ge = M(T), _e = M(null), W = M(null), ve = ne(() => L?.url ? Ae(L.url) : [], [L?.url]), G = ve.length > 0, ye = ne(() => ve.map((e) => `${e}:${String(A[e] ?? "")}`).join("|"), [ve, A]), K = ne(() => L?.url ? G ? je(L.url, A) : !0 : !1, [
|
|
1632
|
+
L?.url,
|
|
1633
|
+
G,
|
|
1634
|
+
A
|
|
1635
|
+
]), be = te(async (r) => {
|
|
1636
|
+
W.current && W.current.abort();
|
|
1637
|
+
let i = new AbortController();
|
|
1638
|
+
W.current = i;
|
|
1639
|
+
let a = de.current, o = fe.current, s = ge.current;
|
|
1640
|
+
if (!a?.url) {
|
|
1641
|
+
u(R("renderer.defaultHttpInput.noUrlConfigured")), W.current = null;
|
|
1620
1642
|
return;
|
|
1621
1643
|
}
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1644
|
+
if (a.url && !je(a.url, o)) {
|
|
1645
|
+
W.current = null;
|
|
1624
1646
|
return;
|
|
1625
1647
|
}
|
|
1626
|
-
c(!0),
|
|
1648
|
+
c(!0), u(null);
|
|
1627
1649
|
try {
|
|
1628
|
-
let
|
|
1650
|
+
let l = t(Me(a.url, o, !0), U.current), d = x(a.searchParam && r ? `${l}${l.includes("?") ? "&" : "?"}${a.searchParam}=${encodeURIComponent(r)}` : l, n(a.queryParams, o)), p = e({ "Content-Type": "application/json" }, n(me.current, o), n(a.headers, o)), m = [
|
|
1629
1651
|
"POST",
|
|
1630
1652
|
"PUT",
|
|
1631
1653
|
"PATCH"
|
|
1632
|
-
].includes(
|
|
1633
|
-
body:
|
|
1634
|
-
headers: Object.fromEntries(Object.entries(
|
|
1635
|
-
method:
|
|
1636
|
-
signal:
|
|
1654
|
+
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(_(o, pe.current)) : y(a.body, o, pe.current) : void 0, h = setTimeout(() => i.abort(), 3e4), g = await fetch(d, {
|
|
1655
|
+
body: m || void 0,
|
|
1656
|
+
headers: Object.fromEntries(Object.entries(p).filter(([, e]) => e)),
|
|
1657
|
+
method: a.method || "GET",
|
|
1658
|
+
signal: i.signal
|
|
1637
1659
|
});
|
|
1638
|
-
if (clearTimeout(
|
|
1639
|
-
|
|
1660
|
+
if (clearTimeout(h), !g.ok) {
|
|
1661
|
+
u(`HTTP Error ${g.status}: ${g.statusText}`), c(!1);
|
|
1640
1662
|
return;
|
|
1641
1663
|
}
|
|
1642
|
-
let
|
|
1643
|
-
if (
|
|
1644
|
-
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField:
|
|
1645
|
-
|
|
1646
|
-
let a = n ?
|
|
1664
|
+
let v = ke(await g.json()), S = a.responsePath ? b(v, a.responsePath) : v;
|
|
1665
|
+
if (a.responseMapping && Array.isArray(S)) {
|
|
1666
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = a.responseMapping;
|
|
1667
|
+
f(S.map((i) => {
|
|
1668
|
+
let a = n ? b(i, n) : void 0, o = r ? b(i, r) : void 0;
|
|
1647
1669
|
return {
|
|
1648
1670
|
description: a != null && a !== "" ? String(a) : void 0,
|
|
1649
1671
|
image: typeof o == "string" && o !== "" ? o : void 0,
|
|
1650
|
-
label: String(
|
|
1651
|
-
value: String(
|
|
1672
|
+
label: String(b(i, t) || ""),
|
|
1673
|
+
value: String(b(i, e) || "")
|
|
1652
1674
|
};
|
|
1653
1675
|
}));
|
|
1654
|
-
} else
|
|
1676
|
+
} else s(typeof S == "string" ? S : JSON.stringify(S));
|
|
1655
1677
|
} catch (e) {
|
|
1656
1678
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1657
|
-
|
|
1679
|
+
u(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1658
1680
|
} finally {
|
|
1659
|
-
c(!1),
|
|
1681
|
+
c(!1), W.current = null;
|
|
1660
1682
|
}
|
|
1661
|
-
}, [
|
|
1662
|
-
if (
|
|
1663
|
-
de.current =
|
|
1683
|
+
}, [R]);
|
|
1684
|
+
if (j(() => {
|
|
1685
|
+
de.current = L, fe.current = A, pe.current = ee, me.current = re, U.current = ae, ge.current = T, _e.current = be;
|
|
1664
1686
|
}, [
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1687
|
+
L,
|
|
1688
|
+
A,
|
|
1689
|
+
ee,
|
|
1690
|
+
re,
|
|
1691
|
+
ae,
|
|
1670
1692
|
T,
|
|
1671
|
-
|
|
1672
|
-
]),
|
|
1673
|
-
|
|
1674
|
-
}, []),
|
|
1675
|
-
if (
|
|
1676
|
-
|
|
1677
|
-
let e = de.current, t = fe.current, n =
|
|
1678
|
-
e?.fetchOnMount && r && n && (n(), e.url && (ue.current =
|
|
1679
|
-
}, []),
|
|
1680
|
-
if (!
|
|
1693
|
+
be
|
|
1694
|
+
]), j(() => () => {
|
|
1695
|
+
W.current && W.current.abort(), z.current = !1, ce.current = !1;
|
|
1696
|
+
}, []), j(() => {
|
|
1697
|
+
if (z.current) return;
|
|
1698
|
+
z.current = !0;
|
|
1699
|
+
let e = de.current, t = fe.current, n = _e.current, r = e?.url && je(e.url, t);
|
|
1700
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ue.current = Ae(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1701
|
+
}, []), j(() => {
|
|
1702
|
+
if (!z.current || !G || ue.current === ye || !K) return;
|
|
1681
1703
|
let e = setTimeout(() => {
|
|
1682
|
-
|
|
1704
|
+
be(), ue.current = ye;
|
|
1683
1705
|
}, 500);
|
|
1684
1706
|
return () => clearTimeout(e);
|
|
1685
1707
|
}, [
|
|
1686
|
-
K,
|
|
1687
|
-
ve,
|
|
1688
1708
|
ye,
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1709
|
+
G,
|
|
1710
|
+
K,
|
|
1711
|
+
be
|
|
1712
|
+
]), j(() => {
|
|
1713
|
+
if (!ce.current) {
|
|
1714
|
+
ce.current = !0;
|
|
1693
1715
|
return;
|
|
1694
1716
|
}
|
|
1695
|
-
let e = de.current, t = fe.current, n =
|
|
1696
|
-
e?.fetchOnMount && r && n && (n(), e.url && (ue.current =
|
|
1697
|
-
}, [
|
|
1698
|
-
body:
|
|
1699
|
-
fetchOnMount:
|
|
1700
|
-
headers:
|
|
1701
|
-
method:
|
|
1702
|
-
queryParams:
|
|
1703
|
-
responseMapping:
|
|
1704
|
-
responsePath:
|
|
1705
|
-
searchParam:
|
|
1706
|
-
sendAllFormValues:
|
|
1707
|
-
url:
|
|
1708
|
-
}), [
|
|
1709
|
-
if (!(
|
|
1717
|
+
let e = de.current, t = fe.current, n = _e.current, r = e?.url && je(e.url, t);
|
|
1718
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ue.current = Ae(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1719
|
+
}, [ne(() => JSON.stringify({
|
|
1720
|
+
body: L?.body,
|
|
1721
|
+
fetchOnMount: L?.fetchOnMount,
|
|
1722
|
+
headers: L?.headers,
|
|
1723
|
+
method: L?.method,
|
|
1724
|
+
queryParams: L?.queryParams,
|
|
1725
|
+
responseMapping: L?.responseMapping,
|
|
1726
|
+
responsePath: L?.responsePath,
|
|
1727
|
+
searchParam: L?.searchParam,
|
|
1728
|
+
sendAllFormValues: L?.sendAllFormValues,
|
|
1729
|
+
url: L?.url
|
|
1730
|
+
}), [L])]), j(() => {
|
|
1731
|
+
if (!(L?.searchParam && p)) return;
|
|
1710
1732
|
let e = setTimeout(() => {
|
|
1711
|
-
|
|
1733
|
+
be(p);
|
|
1712
1734
|
}, 300);
|
|
1713
1735
|
return () => clearTimeout(e);
|
|
1714
1736
|
}, [
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
]),
|
|
1719
|
-
let e = Array.isArray(S) ? S[0] : S, t =
|
|
1720
|
-
if (
|
|
1721
|
-
let n =
|
|
1737
|
+
p,
|
|
1738
|
+
L?.searchParam,
|
|
1739
|
+
be
|
|
1740
|
+
]), L?.responseMapping) {
|
|
1741
|
+
let e = Array.isArray(S) ? S[0] : S, t = d.find((t) => t.value === e);
|
|
1742
|
+
if (L.searchParam) {
|
|
1743
|
+
let n = s && L?.showLoading;
|
|
1722
1744
|
return /* @__PURE__ */ F(H, {
|
|
1723
1745
|
style: Y.container,
|
|
1724
1746
|
children: [
|
|
1725
1747
|
/* @__PURE__ */ F(B, {
|
|
1726
|
-
style: [Y.label, { color:
|
|
1748
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
1727
1749
|
children: [D || w.data.name, w.data.required && /* @__PURE__ */ P(B, {
|
|
1728
|
-
style: { color:
|
|
1750
|
+
style: { color: I.error },
|
|
1729
1751
|
children: "*"
|
|
1730
1752
|
})]
|
|
1731
1753
|
}),
|
|
1732
|
-
/* @__PURE__ */ P(
|
|
1733
|
-
missing:
|
|
1754
|
+
/* @__PURE__ */ P(Ce, {
|
|
1755
|
+
missing: k,
|
|
1734
1756
|
children: /* @__PURE__ */ F(V, {
|
|
1735
1757
|
style: [
|
|
1736
1758
|
Y.trigger,
|
|
1737
1759
|
{
|
|
1738
|
-
backgroundColor:
|
|
1739
|
-
borderColor:
|
|
1760
|
+
backgroundColor: I.input,
|
|
1761
|
+
borderColor: I.border
|
|
1740
1762
|
},
|
|
1741
|
-
E && { borderColor:
|
|
1742
|
-
|
|
1763
|
+
E && { borderColor: I.error },
|
|
1764
|
+
k.length > 0 && { backgroundColor: I.muted }
|
|
1743
1765
|
],
|
|
1744
|
-
onPress: () =>
|
|
1745
|
-
disabled:
|
|
1766
|
+
onPress: () => v(!0),
|
|
1767
|
+
disabled: k.length > 0,
|
|
1746
1768
|
activeOpacity: .7,
|
|
1747
|
-
children: [
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1769
|
+
children: [
|
|
1770
|
+
n ? /* @__PURE__ */ F(H, {
|
|
1771
|
+
style: Y.loadingTrigger,
|
|
1772
|
+
children: [/* @__PURE__ */ P(ie, {
|
|
1773
|
+
size: "small",
|
|
1774
|
+
color: I.primary
|
|
1775
|
+
}), /* @__PURE__ */ P(B, {
|
|
1776
|
+
style: [Y.triggerText, { color: I.textMuted }],
|
|
1777
|
+
numberOfLines: 1,
|
|
1778
|
+
children: t?.label || C || R("renderer.defaultHttpInput.search")
|
|
1779
|
+
})]
|
|
1780
|
+
}) : /* @__PURE__ */ P(B, {
|
|
1781
|
+
style: [
|
|
1782
|
+
Y.triggerText,
|
|
1783
|
+
{ color: I.text },
|
|
1784
|
+
!t && { color: I.textMuted }
|
|
1785
|
+
],
|
|
1754
1786
|
numberOfLines: 1,
|
|
1755
|
-
children: t?.label || C ||
|
|
1756
|
-
})
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1787
|
+
children: t?.label || C || R("renderer.defaultHttpInput.search")
|
|
1788
|
+
}),
|
|
1789
|
+
e ? /* @__PURE__ */ P(V, {
|
|
1790
|
+
onPress: () => T(""),
|
|
1791
|
+
hitSlop: {
|
|
1792
|
+
bottom: 8,
|
|
1793
|
+
left: 8,
|
|
1794
|
+
right: 8,
|
|
1795
|
+
top: 8
|
|
1796
|
+
},
|
|
1797
|
+
style: Y.clearButton,
|
|
1798
|
+
children: /* @__PURE__ */ P(B, {
|
|
1799
|
+
style: [Y.clearIcon, { color: I.textMuted }],
|
|
1800
|
+
children: "✕"
|
|
1801
|
+
})
|
|
1802
|
+
}) : null,
|
|
1803
|
+
/* @__PURE__ */ P(B, {
|
|
1804
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1805
|
+
children: "▼"
|
|
1806
|
+
})
|
|
1807
|
+
]
|
|
1769
1808
|
})
|
|
1770
1809
|
}),
|
|
1771
|
-
/* @__PURE__ */ P(
|
|
1772
|
-
visible:
|
|
1810
|
+
/* @__PURE__ */ P(se, {
|
|
1811
|
+
visible: g,
|
|
1773
1812
|
transparent: !0,
|
|
1774
1813
|
animationType: "fade",
|
|
1775
|
-
onRequestClose: () =>
|
|
1814
|
+
onRequestClose: () => v(!1),
|
|
1776
1815
|
children: /* @__PURE__ */ P(V, {
|
|
1777
1816
|
style: Y.modalOverlay,
|
|
1778
1817
|
activeOpacity: 1,
|
|
1779
|
-
onPress: () =>
|
|
1818
|
+
onPress: () => v(!1),
|
|
1780
1819
|
children: /* @__PURE__ */ F(V, {
|
|
1781
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1820
|
+
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1782
1821
|
activeOpacity: 1,
|
|
1783
1822
|
onPress: () => {},
|
|
1784
1823
|
children: [
|
|
1785
1824
|
/* @__PURE__ */ F(H, {
|
|
1786
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1825
|
+
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1787
1826
|
children: [/* @__PURE__ */ P(B, {
|
|
1788
|
-
style: [Y.modalTitle, { color:
|
|
1827
|
+
style: [Y.modalTitle, { color: I.text }],
|
|
1789
1828
|
children: D || w.data.name
|
|
1790
1829
|
}), /* @__PURE__ */ P(V, {
|
|
1791
|
-
onPress: () =>
|
|
1830
|
+
onPress: () => v(!1),
|
|
1792
1831
|
children: /* @__PURE__ */ P(B, {
|
|
1793
|
-
style: [Y.closeButton, { color:
|
|
1832
|
+
style: [Y.closeButton, { color: I.textMuted }],
|
|
1794
1833
|
children: "✕"
|
|
1795
1834
|
})
|
|
1796
1835
|
})]
|
|
1797
1836
|
}),
|
|
1798
1837
|
/* @__PURE__ */ P(H, {
|
|
1799
1838
|
style: Y.searchContainer,
|
|
1800
|
-
children: /* @__PURE__ */ P(
|
|
1839
|
+
children: /* @__PURE__ */ P(le, {
|
|
1801
1840
|
style: [Y.searchInput, {
|
|
1802
|
-
backgroundColor:
|
|
1803
|
-
borderColor:
|
|
1804
|
-
color:
|
|
1841
|
+
backgroundColor: I.muted,
|
|
1842
|
+
borderColor: I.border,
|
|
1843
|
+
color: I.text
|
|
1805
1844
|
}],
|
|
1806
|
-
placeholder:
|
|
1807
|
-
placeholderTextColor:
|
|
1808
|
-
value:
|
|
1845
|
+
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1846
|
+
placeholderTextColor: I.textMuted,
|
|
1847
|
+
value: p,
|
|
1809
1848
|
onChangeText: (e) => {
|
|
1810
|
-
|
|
1849
|
+
h(e), u(null);
|
|
1811
1850
|
},
|
|
1812
1851
|
autoFocus: !0,
|
|
1813
1852
|
autoCapitalize: "none",
|
|
1814
1853
|
autoCorrect: !1
|
|
1815
1854
|
})
|
|
1816
1855
|
}),
|
|
1817
|
-
|
|
1856
|
+
s ? /* @__PURE__ */ P(H, {
|
|
1818
1857
|
style: Y.loadingContainer,
|
|
1819
|
-
children: /* @__PURE__ */ P(
|
|
1858
|
+
children: /* @__PURE__ */ P(ie, {
|
|
1820
1859
|
size: "small",
|
|
1821
|
-
color:
|
|
1860
|
+
color: I.primary
|
|
1822
1861
|
})
|
|
1823
|
-
}) :
|
|
1862
|
+
}) : l ? /* @__PURE__ */ F(H, {
|
|
1824
1863
|
style: Y.errorContainer,
|
|
1825
1864
|
children: [/* @__PURE__ */ P(B, {
|
|
1826
|
-
style: [Y.errorText, { color:
|
|
1827
|
-
children:
|
|
1865
|
+
style: [Y.errorText, { color: I.error }],
|
|
1866
|
+
children: l
|
|
1828
1867
|
}), /* @__PURE__ */ P(V, {
|
|
1829
|
-
onPress: () =>
|
|
1868
|
+
onPress: () => be(p),
|
|
1830
1869
|
style: Y.retryButton,
|
|
1831
1870
|
children: /* @__PURE__ */ P(B, {
|
|
1832
|
-
style: [Y.retryButtonText, { color:
|
|
1833
|
-
children:
|
|
1871
|
+
style: [Y.retryButtonText, { color: I.primary }],
|
|
1872
|
+
children: R("renderer.defaultHttpInput.retry")
|
|
1834
1873
|
})
|
|
1835
1874
|
})]
|
|
1836
|
-
}) : /* @__PURE__ */ P(
|
|
1837
|
-
data:
|
|
1875
|
+
}) : /* @__PURE__ */ P(oe, {
|
|
1876
|
+
data: d,
|
|
1838
1877
|
keyExtractor: (e) => e.value,
|
|
1839
1878
|
style: Y.optionsList,
|
|
1840
1879
|
contentContainerStyle: Y.optionsListContent,
|
|
1841
1880
|
ListEmptyComponent: /* @__PURE__ */ P(H, {
|
|
1842
1881
|
style: Y.emptyContainer,
|
|
1843
1882
|
children: /* @__PURE__ */ P(B, {
|
|
1844
|
-
style: [Y.emptyText, { color:
|
|
1845
|
-
children:
|
|
1883
|
+
style: [Y.emptyText, { color: I.textMuted }],
|
|
1884
|
+
children: R("renderer.defaultHttpInput.noResults")
|
|
1846
1885
|
})
|
|
1847
1886
|
}),
|
|
1848
1887
|
renderItem: ({ item: t }) => {
|
|
1849
1888
|
let n = t.value === e;
|
|
1850
1889
|
return /* @__PURE__ */ F(V, {
|
|
1851
|
-
style: [Y.option, n && { backgroundColor:
|
|
1890
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1852
1891
|
onPress: () => {
|
|
1853
|
-
T(t.value),
|
|
1892
|
+
T(t.value), v(!1);
|
|
1854
1893
|
},
|
|
1855
1894
|
activeOpacity: .7,
|
|
1856
|
-
children: [/* @__PURE__ */ P(
|
|
1895
|
+
children: [/* @__PURE__ */ P(he, {
|
|
1857
1896
|
label: t.label,
|
|
1858
1897
|
description: t.description,
|
|
1859
1898
|
image: t.image
|
|
1860
1899
|
}), n && /* @__PURE__ */ P(B, {
|
|
1861
|
-
style: [Y.checkmark, { color:
|
|
1900
|
+
style: [Y.checkmark, { color: I.primary }],
|
|
1862
1901
|
children: "✓"
|
|
1863
1902
|
})]
|
|
1864
1903
|
});
|
|
@@ -1869,112 +1908,126 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1869
1908
|
})
|
|
1870
1909
|
}),
|
|
1871
1910
|
E && /* @__PURE__ */ P(B, {
|
|
1872
|
-
style: [Y.error, { color:
|
|
1911
|
+
style: [Y.error, { color: I.error }],
|
|
1873
1912
|
children: E
|
|
1874
1913
|
}),
|
|
1875
|
-
|
|
1876
|
-
style: [Y.helperText, { color:
|
|
1877
|
-
children:
|
|
1914
|
+
O && !E && /* @__PURE__ */ P(B, {
|
|
1915
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
1916
|
+
children: O
|
|
1878
1917
|
})
|
|
1879
1918
|
]
|
|
1880
1919
|
});
|
|
1881
1920
|
}
|
|
1882
|
-
let n =
|
|
1921
|
+
let n = s && L?.showLoading, r = k.length === 0 && d.length === 0 && !n ? l ?? R("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1883
1922
|
return /* @__PURE__ */ F(H, {
|
|
1884
1923
|
style: Y.container,
|
|
1885
1924
|
children: [
|
|
1886
1925
|
/* @__PURE__ */ F(B, {
|
|
1887
|
-
style: [Y.label, { color:
|
|
1926
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
1888
1927
|
children: [D || w.data.name, w.data.required && /* @__PURE__ */ P(B, {
|
|
1889
|
-
style: { color:
|
|
1928
|
+
style: { color: I.error },
|
|
1890
1929
|
children: "*"
|
|
1891
1930
|
})]
|
|
1892
1931
|
}),
|
|
1893
|
-
/* @__PURE__ */ P(
|
|
1894
|
-
missing:
|
|
1932
|
+
/* @__PURE__ */ P(Ce, {
|
|
1933
|
+
missing: k,
|
|
1895
1934
|
children: /* @__PURE__ */ F(V, {
|
|
1896
1935
|
style: [
|
|
1897
1936
|
Y.trigger,
|
|
1898
1937
|
{
|
|
1899
|
-
backgroundColor:
|
|
1900
|
-
borderColor:
|
|
1938
|
+
backgroundColor: I.input,
|
|
1939
|
+
borderColor: I.border
|
|
1901
1940
|
},
|
|
1902
|
-
E && { borderColor:
|
|
1903
|
-
(n ||
|
|
1941
|
+
E && { borderColor: I.error },
|
|
1942
|
+
(n || d.length === 0) && { backgroundColor: I.muted }
|
|
1904
1943
|
],
|
|
1905
|
-
onPress: () =>
|
|
1906
|
-
disabled: n ||
|
|
1944
|
+
onPress: () => v(!0),
|
|
1945
|
+
disabled: n || d.length === 0,
|
|
1907
1946
|
activeOpacity: .7,
|
|
1908
1947
|
children: [
|
|
1909
|
-
n && /* @__PURE__ */ P(
|
|
1948
|
+
n && /* @__PURE__ */ P(ie, {
|
|
1910
1949
|
size: "small",
|
|
1911
|
-
color:
|
|
1950
|
+
color: I.primary,
|
|
1912
1951
|
style: Y.triggerLoader
|
|
1913
1952
|
}),
|
|
1914
1953
|
/* @__PURE__ */ P(B, {
|
|
1915
1954
|
style: [
|
|
1916
1955
|
Y.triggerText,
|
|
1917
|
-
{ color:
|
|
1918
|
-
!t && { color:
|
|
1956
|
+
{ color: I.text },
|
|
1957
|
+
!t && { color: I.textMuted }
|
|
1919
1958
|
],
|
|
1920
1959
|
numberOfLines: 1,
|
|
1921
|
-
children: t?.label || C ||
|
|
1960
|
+
children: t?.label || C || R("renderer.defaultHttpInput.selectOption")
|
|
1922
1961
|
}),
|
|
1962
|
+
e ? /* @__PURE__ */ P(V, {
|
|
1963
|
+
onPress: () => T(""),
|
|
1964
|
+
hitSlop: {
|
|
1965
|
+
bottom: 8,
|
|
1966
|
+
left: 8,
|
|
1967
|
+
right: 8,
|
|
1968
|
+
top: 8
|
|
1969
|
+
},
|
|
1970
|
+
style: Y.clearButton,
|
|
1971
|
+
children: /* @__PURE__ */ P(B, {
|
|
1972
|
+
style: [Y.clearIcon, { color: I.textMuted }],
|
|
1973
|
+
children: "✕"
|
|
1974
|
+
})
|
|
1975
|
+
}) : null,
|
|
1923
1976
|
/* @__PURE__ */ P(B, {
|
|
1924
|
-
style: [Y.arrow, { color:
|
|
1977
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1925
1978
|
children: "▼"
|
|
1926
1979
|
})
|
|
1927
1980
|
]
|
|
1928
1981
|
})
|
|
1929
1982
|
}),
|
|
1930
1983
|
r && /* @__PURE__ */ P(B, {
|
|
1931
|
-
style: [Y.disabledMessage, { color:
|
|
1984
|
+
style: [Y.disabledMessage, { color: I.error }],
|
|
1932
1985
|
children: r
|
|
1933
1986
|
}),
|
|
1934
|
-
/* @__PURE__ */ P(
|
|
1935
|
-
visible:
|
|
1987
|
+
/* @__PURE__ */ P(se, {
|
|
1988
|
+
visible: g,
|
|
1936
1989
|
transparent: !0,
|
|
1937
1990
|
animationType: "fade",
|
|
1938
|
-
onRequestClose: () =>
|
|
1991
|
+
onRequestClose: () => v(!1),
|
|
1939
1992
|
children: /* @__PURE__ */ P(V, {
|
|
1940
1993
|
style: Y.modalOverlay,
|
|
1941
1994
|
activeOpacity: 1,
|
|
1942
|
-
onPress: () =>
|
|
1995
|
+
onPress: () => v(!1),
|
|
1943
1996
|
children: /* @__PURE__ */ F(V, {
|
|
1944
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1997
|
+
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1945
1998
|
activeOpacity: 1,
|
|
1946
1999
|
onPress: () => {},
|
|
1947
2000
|
children: [/* @__PURE__ */ F(H, {
|
|
1948
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
2001
|
+
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1949
2002
|
children: [/* @__PURE__ */ P(B, {
|
|
1950
|
-
style: [Y.modalTitle, { color:
|
|
2003
|
+
style: [Y.modalTitle, { color: I.text }],
|
|
1951
2004
|
children: D || w.data.name
|
|
1952
2005
|
}), /* @__PURE__ */ P(V, {
|
|
1953
|
-
onPress: () =>
|
|
2006
|
+
onPress: () => v(!1),
|
|
1954
2007
|
children: /* @__PURE__ */ P(B, {
|
|
1955
|
-
style: [Y.closeButton, { color:
|
|
2008
|
+
style: [Y.closeButton, { color: I.textMuted }],
|
|
1956
2009
|
children: "✕"
|
|
1957
2010
|
})
|
|
1958
2011
|
})]
|
|
1959
|
-
}), /* @__PURE__ */ P(
|
|
1960
|
-
data:
|
|
2012
|
+
}), /* @__PURE__ */ P(oe, {
|
|
2013
|
+
data: d,
|
|
1961
2014
|
keyExtractor: (e) => e.value,
|
|
1962
2015
|
style: Y.optionsList,
|
|
1963
2016
|
contentContainerStyle: Y.optionsListContent,
|
|
1964
2017
|
renderItem: ({ item: t }) => {
|
|
1965
2018
|
let n = t.value === e;
|
|
1966
2019
|
return /* @__PURE__ */ F(V, {
|
|
1967
|
-
style: [Y.option, n && { backgroundColor:
|
|
2020
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1968
2021
|
onPress: () => {
|
|
1969
|
-
T(t.value),
|
|
2022
|
+
T(t.value), v(!1);
|
|
1970
2023
|
},
|
|
1971
2024
|
activeOpacity: .7,
|
|
1972
|
-
children: [/* @__PURE__ */ P(
|
|
2025
|
+
children: [/* @__PURE__ */ P(he, {
|
|
1973
2026
|
label: t.label,
|
|
1974
2027
|
description: t.description,
|
|
1975
2028
|
image: t.image
|
|
1976
2029
|
}), n && /* @__PURE__ */ P(B, {
|
|
1977
|
-
style: [Y.checkmark, { color:
|
|
2030
|
+
style: [Y.checkmark, { color: I.primary }],
|
|
1978
2031
|
children: "✓"
|
|
1979
2032
|
})]
|
|
1980
2033
|
});
|
|
@@ -1984,12 +2037,12 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1984
2037
|
})
|
|
1985
2038
|
}),
|
|
1986
2039
|
E && /* @__PURE__ */ P(B, {
|
|
1987
|
-
style: [Y.error, { color:
|
|
2040
|
+
style: [Y.error, { color: I.error }],
|
|
1988
2041
|
children: E
|
|
1989
2042
|
}),
|
|
1990
|
-
|
|
1991
|
-
style: [Y.helperText, { color:
|
|
1992
|
-
children:
|
|
2043
|
+
O && !E && /* @__PURE__ */ P(B, {
|
|
2044
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
2045
|
+
children: O
|
|
1993
2046
|
})
|
|
1994
2047
|
]
|
|
1995
2048
|
});
|
|
@@ -1998,28 +2051,28 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1998
2051
|
style: Y.container,
|
|
1999
2052
|
children: [
|
|
2000
2053
|
/* @__PURE__ */ F(B, {
|
|
2001
|
-
style: [Y.label, { color:
|
|
2054
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
2002
2055
|
children: [D || w.data.name, w.data.required && /* @__PURE__ */ P(B, {
|
|
2003
|
-
style: { color:
|
|
2056
|
+
style: { color: I.error },
|
|
2004
2057
|
children: "*"
|
|
2005
2058
|
})]
|
|
2006
2059
|
}),
|
|
2007
|
-
/* @__PURE__ */ P(
|
|
2060
|
+
/* @__PURE__ */ P(le, {
|
|
2008
2061
|
style: [Y.input, {
|
|
2009
|
-
backgroundColor:
|
|
2010
|
-
borderColor:
|
|
2011
|
-
color:
|
|
2062
|
+
backgroundColor: I.muted,
|
|
2063
|
+
borderColor: I.border,
|
|
2064
|
+
color: I.textMuted
|
|
2012
2065
|
}],
|
|
2013
2066
|
value: typeof S == "string" ? S : JSON.stringify(S),
|
|
2014
2067
|
editable: !1
|
|
2015
2068
|
}),
|
|
2016
2069
|
E && /* @__PURE__ */ P(B, {
|
|
2017
|
-
style: [Y.error, { color:
|
|
2070
|
+
style: [Y.error, { color: I.error }],
|
|
2018
2071
|
children: E
|
|
2019
2072
|
}),
|
|
2020
|
-
|
|
2021
|
-
style: [Y.helperText, { color:
|
|
2022
|
-
children:
|
|
2073
|
+
O && !E && /* @__PURE__ */ P(B, {
|
|
2074
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
2075
|
+
children: O
|
|
2023
2076
|
})
|
|
2024
2077
|
]
|
|
2025
2078
|
});
|
|
@@ -2029,6 +2082,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2029
2082
|
fontSize: 18,
|
|
2030
2083
|
fontWeight: "700"
|
|
2031
2084
|
},
|
|
2085
|
+
clearButton: {
|
|
2086
|
+
marginRight: 8,
|
|
2087
|
+
paddingHorizontal: 2
|
|
2088
|
+
},
|
|
2089
|
+
clearIcon: { fontSize: 14 },
|
|
2032
2090
|
closeButton: {
|
|
2033
2091
|
fontSize: 24,
|
|
2034
2092
|
fontWeight: "300"
|
|
@@ -2145,23 +2203,23 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2145
2203
|
flex: 1,
|
|
2146
2204
|
fontSize: 14
|
|
2147
2205
|
}
|
|
2148
|
-
}),
|
|
2149
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] = N(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } =
|
|
2150
|
-
return
|
|
2206
|
+
}), Pe = ({ field: e, extra: t }) => {
|
|
2207
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = N(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = m();
|
|
2208
|
+
return j(() => {
|
|
2151
2209
|
o(n?.toString() ?? "");
|
|
2152
2210
|
}, [n]), /* @__PURE__ */ F(H, {
|
|
2153
|
-
style:
|
|
2211
|
+
style: Fe.container,
|
|
2154
2212
|
children: [
|
|
2155
2213
|
/* @__PURE__ */ F(B, {
|
|
2156
|
-
style: [
|
|
2214
|
+
style: [Fe.label, { color: f.textSecondary }],
|
|
2157
2215
|
children: [u || s.data.name, s.data.required && /* @__PURE__ */ P(B, {
|
|
2158
2216
|
style: { color: f.error },
|
|
2159
2217
|
children: "*"
|
|
2160
2218
|
})]
|
|
2161
2219
|
}),
|
|
2162
|
-
/* @__PURE__ */ P(
|
|
2220
|
+
/* @__PURE__ */ P(le, {
|
|
2163
2221
|
style: [
|
|
2164
|
-
|
|
2222
|
+
Fe.input,
|
|
2165
2223
|
{
|
|
2166
2224
|
backgroundColor: f.input,
|
|
2167
2225
|
borderColor: f.border,
|
|
@@ -2184,16 +2242,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2184
2242
|
accessibilityLabel: i
|
|
2185
2243
|
}),
|
|
2186
2244
|
l && /* @__PURE__ */ P(B, {
|
|
2187
|
-
style: [
|
|
2245
|
+
style: [Fe.error, { color: f.error }],
|
|
2188
2246
|
children: l
|
|
2189
2247
|
}),
|
|
2190
2248
|
d && !l && /* @__PURE__ */ P(B, {
|
|
2191
|
-
style: [
|
|
2249
|
+
style: [Fe.helperText, { color: f.textMuted }],
|
|
2192
2250
|
children: d
|
|
2193
2251
|
})
|
|
2194
2252
|
]
|
|
2195
2253
|
});
|
|
2196
|
-
},
|
|
2254
|
+
}, Fe = z.create({
|
|
2197
2255
|
container: { marginBottom: 16 },
|
|
2198
2256
|
error: {
|
|
2199
2257
|
fontSize: 12,
|
|
@@ -2215,23 +2273,23 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2215
2273
|
fontWeight: "500",
|
|
2216
2274
|
marginBottom: 8
|
|
2217
2275
|
}
|
|
2218
|
-
}),
|
|
2219
|
-
let [n, r] = N(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } =
|
|
2276
|
+
}), Ie = ({ field: e, extra: t }) => {
|
|
2277
|
+
let [n, r] = N(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = m();
|
|
2220
2278
|
return /* @__PURE__ */ F(H, {
|
|
2221
|
-
style:
|
|
2279
|
+
style: Le.container,
|
|
2222
2280
|
children: [
|
|
2223
2281
|
/* @__PURE__ */ F(B, {
|
|
2224
|
-
style: [
|
|
2282
|
+
style: [Le.label, { color: f.textSecondary }],
|
|
2225
2283
|
children: [u || s.data.name, s.data.required && /* @__PURE__ */ P(B, {
|
|
2226
2284
|
style: { color: f.error },
|
|
2227
2285
|
children: "*"
|
|
2228
2286
|
})]
|
|
2229
2287
|
}),
|
|
2230
2288
|
/* @__PURE__ */ F(H, {
|
|
2231
|
-
style:
|
|
2232
|
-
children: [/* @__PURE__ */ P(
|
|
2289
|
+
style: Le.inputWrapper,
|
|
2290
|
+
children: [/* @__PURE__ */ P(le, {
|
|
2233
2291
|
style: [
|
|
2234
|
-
|
|
2292
|
+
Le.input,
|
|
2235
2293
|
{
|
|
2236
2294
|
backgroundColor: f.input,
|
|
2237
2295
|
borderColor: f.border,
|
|
@@ -2246,26 +2304,26 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2246
2304
|
secureTextEntry: !n,
|
|
2247
2305
|
accessibilityLabel: o
|
|
2248
2306
|
}), /* @__PURE__ */ P(V, {
|
|
2249
|
-
style:
|
|
2307
|
+
style: Le.toggleButton,
|
|
2250
2308
|
onPress: () => r(!n),
|
|
2251
2309
|
activeOpacity: .7,
|
|
2252
2310
|
children: /* @__PURE__ */ P(B, {
|
|
2253
|
-
style: [
|
|
2311
|
+
style: [Le.toggleText, { color: f.primary }],
|
|
2254
2312
|
children: n ? "Hide" : "Show"
|
|
2255
2313
|
})
|
|
2256
2314
|
})]
|
|
2257
2315
|
}),
|
|
2258
2316
|
l && /* @__PURE__ */ P(B, {
|
|
2259
|
-
style: [
|
|
2317
|
+
style: [Le.error, { color: f.error }],
|
|
2260
2318
|
children: l
|
|
2261
2319
|
}),
|
|
2262
2320
|
d && !l && /* @__PURE__ */ P(B, {
|
|
2263
|
-
style: [
|
|
2321
|
+
style: [Le.helperText, { color: f.textMuted }],
|
|
2264
2322
|
children: d
|
|
2265
2323
|
})
|
|
2266
2324
|
]
|
|
2267
2325
|
});
|
|
2268
|
-
},
|
|
2326
|
+
}, Le = z.create({
|
|
2269
2327
|
container: { marginBottom: 16 },
|
|
2270
2328
|
error: {
|
|
2271
2329
|
fontSize: 12,
|
|
@@ -2303,16 +2361,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2303
2361
|
fontSize: 12,
|
|
2304
2362
|
fontWeight: "600"
|
|
2305
2363
|
}
|
|
2306
|
-
}),
|
|
2307
|
-
let { value:
|
|
2308
|
-
|
|
2364
|
+
}), Re = ({ field: e, extra: t }) => {
|
|
2365
|
+
let { value: n } = e, { node: r, setValue: i, error: o, label: s, helperText: c } = t, { colors: l } = m(), u = a(), d = r.data.options || [], f = n || "", p = r.data.variant !== "default", h = (e) => {
|
|
2366
|
+
i(e);
|
|
2309
2367
|
};
|
|
2310
2368
|
return /* @__PURE__ */ F(H, {
|
|
2311
2369
|
style: X.container,
|
|
2312
2370
|
children: [
|
|
2313
2371
|
/* @__PURE__ */ F(B, {
|
|
2314
2372
|
style: [X.label, { color: l.textSecondary }],
|
|
2315
|
-
children: [s ||
|
|
2373
|
+
children: [s || r.data.name, r.data.required && /* @__PURE__ */ P(B, {
|
|
2316
2374
|
style: { color: l.error },
|
|
2317
2375
|
children: "*"
|
|
2318
2376
|
})]
|
|
@@ -2332,7 +2390,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2332
2390
|
},
|
|
2333
2391
|
e.disabled && { opacity: .5 }
|
|
2334
2392
|
],
|
|
2335
|
-
onPress: () =>
|
|
2393
|
+
onPress: () => h(e.value),
|
|
2336
2394
|
disabled: e.disabled,
|
|
2337
2395
|
activeOpacity: .7,
|
|
2338
2396
|
children: [
|
|
@@ -2365,7 +2423,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2365
2423
|
]
|
|
2366
2424
|
}, e.value) : /* @__PURE__ */ F(V, {
|
|
2367
2425
|
style: X.option,
|
|
2368
|
-
onPress: () =>
|
|
2426
|
+
onPress: () => h(e.value),
|
|
2369
2427
|
disabled: e.disabled,
|
|
2370
2428
|
activeOpacity: .7,
|
|
2371
2429
|
children: [
|
|
@@ -2484,9 +2542,9 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2484
2542
|
height: 10,
|
|
2485
2543
|
width: 10
|
|
2486
2544
|
}
|
|
2487
|
-
}),
|
|
2488
|
-
let [
|
|
2489
|
-
g ? c(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (c(e),
|
|
2545
|
+
}), ze = ({ field: e, extra: t }) => {
|
|
2546
|
+
let [n, r] = N(!1), { value: i, placeholder: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = m(), p = a(), h = s.data.options || [], g = s.data.multiple, _ = Array.isArray(i) ? i : i ? [i] : [], v = (e) => {
|
|
2547
|
+
g ? c(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (c(e), r(!1));
|
|
2490
2548
|
};
|
|
2491
2549
|
return /* @__PURE__ */ F(H, {
|
|
2492
2550
|
style: Z.container,
|
|
@@ -2507,34 +2565,51 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2507
2565
|
},
|
|
2508
2566
|
l && { borderColor: f.error }
|
|
2509
2567
|
],
|
|
2510
|
-
onPress: () =>
|
|
2568
|
+
onPress: () => r(!0),
|
|
2511
2569
|
activeOpacity: .7,
|
|
2512
|
-
children: [
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2570
|
+
children: [
|
|
2571
|
+
/* @__PURE__ */ P(B, {
|
|
2572
|
+
style: [
|
|
2573
|
+
Z.triggerText,
|
|
2574
|
+
{ color: f.text },
|
|
2575
|
+
_.length === 0 && { color: f.textMuted }
|
|
2576
|
+
],
|
|
2577
|
+
children: (() => {
|
|
2578
|
+
if (_.length === 0) return o || "Select...";
|
|
2579
|
+
if (g) return h.filter((e) => _.includes(e.value)).map((e) => p(e.label) || e.value).join(", ");
|
|
2580
|
+
let e = h.find((e) => e.value === _[0]);
|
|
2581
|
+
return e ? p(e.label) || e.value : o || "Select...";
|
|
2582
|
+
})()
|
|
2583
|
+
}),
|
|
2584
|
+
_.length > 0 && /* @__PURE__ */ P(V, {
|
|
2585
|
+
onPress: () => c(g ? [] : ""),
|
|
2586
|
+
hitSlop: {
|
|
2587
|
+
bottom: 8,
|
|
2588
|
+
left: 8,
|
|
2589
|
+
right: 8,
|
|
2590
|
+
top: 8
|
|
2591
|
+
},
|
|
2592
|
+
style: Z.clearButton,
|
|
2593
|
+
children: /* @__PURE__ */ P(B, {
|
|
2594
|
+
style: [Z.clearIcon, { color: f.textMuted }],
|
|
2595
|
+
children: "✕"
|
|
2596
|
+
})
|
|
2597
|
+
}),
|
|
2598
|
+
/* @__PURE__ */ P(B, {
|
|
2599
|
+
style: [Z.arrow, { color: f.textMuted }],
|
|
2600
|
+
children: "▼"
|
|
2601
|
+
})
|
|
2602
|
+
]
|
|
2528
2603
|
}),
|
|
2529
|
-
/* @__PURE__ */ P(
|
|
2530
|
-
visible:
|
|
2604
|
+
/* @__PURE__ */ P(se, {
|
|
2605
|
+
visible: n,
|
|
2531
2606
|
transparent: !0,
|
|
2532
2607
|
animationType: "fade",
|
|
2533
|
-
onRequestClose: () =>
|
|
2608
|
+
onRequestClose: () => r(!1),
|
|
2534
2609
|
children: /* @__PURE__ */ P(V, {
|
|
2535
2610
|
style: Z.modalOverlay,
|
|
2536
2611
|
activeOpacity: 1,
|
|
2537
|
-
onPress: () =>
|
|
2612
|
+
onPress: () => r(!1),
|
|
2538
2613
|
children: /* @__PURE__ */ F(H, {
|
|
2539
2614
|
style: [Z.modalContent, { backgroundColor: f.card }],
|
|
2540
2615
|
onStartShouldSetResponder: () => !0,
|
|
@@ -2545,7 +2620,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2545
2620
|
style: [Z.modalTitle, { color: f.text }],
|
|
2546
2621
|
children: u || s.data.name
|
|
2547
2622
|
}), /* @__PURE__ */ P(V, {
|
|
2548
|
-
onPress: () =>
|
|
2623
|
+
onPress: () => r(!1),
|
|
2549
2624
|
children: /* @__PURE__ */ P(B, {
|
|
2550
2625
|
style: [Z.closeButton, { color: f.textMuted }],
|
|
2551
2626
|
children: "✕"
|
|
@@ -2554,14 +2629,14 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2554
2629
|
}),
|
|
2555
2630
|
/* @__PURE__ */ P(R, {
|
|
2556
2631
|
style: Z.optionsList,
|
|
2557
|
-
children:
|
|
2632
|
+
children: h.map((e) => {
|
|
2558
2633
|
let t = _.includes(e.value);
|
|
2559
2634
|
return /* @__PURE__ */ F(V, {
|
|
2560
2635
|
style: [Z.option, t && { backgroundColor: `${f.primary}20` }],
|
|
2561
2636
|
onPress: () => v(e.value),
|
|
2562
2637
|
disabled: e.disabled,
|
|
2563
2638
|
activeOpacity: .7,
|
|
2564
|
-
children: [/* @__PURE__ */ P(
|
|
2639
|
+
children: [/* @__PURE__ */ P(he, {
|
|
2565
2640
|
label: p(e.label) || e.value,
|
|
2566
2641
|
description: p(e.description),
|
|
2567
2642
|
image: e.image,
|
|
@@ -2575,7 +2650,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2575
2650
|
}),
|
|
2576
2651
|
g && /* @__PURE__ */ P(V, {
|
|
2577
2652
|
style: [Z.doneButton, { backgroundColor: f.primary }],
|
|
2578
|
-
onPress: () =>
|
|
2653
|
+
onPress: () => r(!1),
|
|
2579
2654
|
children: /* @__PURE__ */ P(B, {
|
|
2580
2655
|
style: Z.doneButtonText,
|
|
2581
2656
|
children: "Done"
|
|
@@ -2601,6 +2676,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2601
2676
|
fontSize: 18,
|
|
2602
2677
|
fontWeight: "700"
|
|
2603
2678
|
},
|
|
2679
|
+
clearButton: {
|
|
2680
|
+
marginRight: 8,
|
|
2681
|
+
paddingHorizontal: 2
|
|
2682
|
+
},
|
|
2683
|
+
clearIcon: { fontSize: 14 },
|
|
2604
2684
|
closeButton: {
|
|
2605
2685
|
fontSize: 24,
|
|
2606
2686
|
fontWeight: "300"
|
|
@@ -2676,23 +2756,23 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2676
2756
|
flex: 1,
|
|
2677
2757
|
fontSize: 14
|
|
2678
2758
|
}
|
|
2679
|
-
}),
|
|
2680
|
-
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } =
|
|
2759
|
+
}), Be = (e) => null, Ve = ({ field: e, extra: t }) => {
|
|
2760
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = m(), l = !!n;
|
|
2681
2761
|
return /* @__PURE__ */ F(H, {
|
|
2682
|
-
style:
|
|
2762
|
+
style: He.container,
|
|
2683
2763
|
children: [
|
|
2684
2764
|
/* @__PURE__ */ F(H, {
|
|
2685
|
-
style:
|
|
2765
|
+
style: He.row,
|
|
2686
2766
|
children: [/* @__PURE__ */ P(H, {
|
|
2687
|
-
style:
|
|
2767
|
+
style: He.labelContainer,
|
|
2688
2768
|
children: /* @__PURE__ */ F(B, {
|
|
2689
|
-
style: [
|
|
2769
|
+
style: [He.label, { color: c.textSecondary }],
|
|
2690
2770
|
children: [o || r.data.name, r.data.required && /* @__PURE__ */ P(B, {
|
|
2691
2771
|
style: { color: c.error },
|
|
2692
2772
|
children: "*"
|
|
2693
2773
|
})]
|
|
2694
2774
|
})
|
|
2695
|
-
}), /* @__PURE__ */ P(
|
|
2775
|
+
}), /* @__PURE__ */ P(ce, {
|
|
2696
2776
|
trackColor: {
|
|
2697
2777
|
false: c.border,
|
|
2698
2778
|
true: `${c.primary}80`
|
|
@@ -2704,16 +2784,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2704
2784
|
})]
|
|
2705
2785
|
}),
|
|
2706
2786
|
a && /* @__PURE__ */ P(B, {
|
|
2707
|
-
style: [
|
|
2787
|
+
style: [He.error, { color: c.error }],
|
|
2708
2788
|
children: a
|
|
2709
2789
|
}),
|
|
2710
2790
|
s && !a && /* @__PURE__ */ P(B, {
|
|
2711
|
-
style: [
|
|
2791
|
+
style: [He.helperText, { color: c.textMuted }],
|
|
2712
2792
|
children: s
|
|
2713
2793
|
})
|
|
2714
2794
|
]
|
|
2715
2795
|
});
|
|
2716
|
-
},
|
|
2796
|
+
}, He = z.create({
|
|
2717
2797
|
container: { marginBottom: 16 },
|
|
2718
2798
|
error: {
|
|
2719
2799
|
fontSize: 12,
|
|
@@ -2733,21 +2813,21 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2733
2813
|
flexDirection: "row",
|
|
2734
2814
|
justifyContent: "space-between"
|
|
2735
2815
|
}
|
|
2736
|
-
}),
|
|
2737
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2816
|
+
}), Ue = ({ field: e, extra: t }) => {
|
|
2817
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = m();
|
|
2738
2818
|
return /* @__PURE__ */ F(H, {
|
|
2739
|
-
style:
|
|
2819
|
+
style: We.container,
|
|
2740
2820
|
children: [
|
|
2741
2821
|
/* @__PURE__ */ F(B, {
|
|
2742
|
-
style: [
|
|
2822
|
+
style: [We.label, { color: u.textSecondary }],
|
|
2743
2823
|
children: [c || a.data.name, a.data.required && /* @__PURE__ */ P(B, {
|
|
2744
2824
|
style: { color: u.error },
|
|
2745
2825
|
children: "*"
|
|
2746
2826
|
})]
|
|
2747
2827
|
}),
|
|
2748
|
-
/* @__PURE__ */ P(
|
|
2828
|
+
/* @__PURE__ */ P(le, {
|
|
2749
2829
|
style: [
|
|
2750
|
-
|
|
2830
|
+
We.textarea,
|
|
2751
2831
|
{
|
|
2752
2832
|
backgroundColor: u.input,
|
|
2753
2833
|
borderColor: u.border,
|
|
@@ -2765,16 +2845,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2765
2845
|
accessibilityLabel: i
|
|
2766
2846
|
}),
|
|
2767
2847
|
s && /* @__PURE__ */ P(B, {
|
|
2768
|
-
style: [
|
|
2848
|
+
style: [We.error, { color: u.error }],
|
|
2769
2849
|
children: s
|
|
2770
2850
|
}),
|
|
2771
2851
|
l && !s && /* @__PURE__ */ P(B, {
|
|
2772
|
-
style: [
|
|
2852
|
+
style: [We.helperText, { color: u.textMuted }],
|
|
2773
2853
|
children: l
|
|
2774
2854
|
})
|
|
2775
2855
|
]
|
|
2776
2856
|
});
|
|
2777
|
-
},
|
|
2857
|
+
}, We = z.create({
|
|
2778
2858
|
container: { marginBottom: 16 },
|
|
2779
2859
|
error: {
|
|
2780
2860
|
fontSize: 12,
|
|
@@ -2797,21 +2877,21 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2797
2877
|
paddingHorizontal: 12,
|
|
2798
2878
|
paddingVertical: 8
|
|
2799
2879
|
}
|
|
2800
|
-
}),
|
|
2801
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2880
|
+
}), Ge = ({ field: e, extra: t }) => {
|
|
2881
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = m();
|
|
2802
2882
|
return /* @__PURE__ */ F(H, {
|
|
2803
|
-
style:
|
|
2883
|
+
style: Ke.container,
|
|
2804
2884
|
children: [
|
|
2805
2885
|
/* @__PURE__ */ F(B, {
|
|
2806
|
-
style: [
|
|
2886
|
+
style: [Ke.label, { color: u.textSecondary }],
|
|
2807
2887
|
children: [c || a.data.name, a.data.required && /* @__PURE__ */ P(B, {
|
|
2808
2888
|
style: { color: u.error },
|
|
2809
2889
|
children: "*"
|
|
2810
2890
|
})]
|
|
2811
2891
|
}),
|
|
2812
|
-
/* @__PURE__ */ P(
|
|
2892
|
+
/* @__PURE__ */ P(le, {
|
|
2813
2893
|
style: [
|
|
2814
|
-
|
|
2894
|
+
Ke.input,
|
|
2815
2895
|
{
|
|
2816
2896
|
backgroundColor: u.input,
|
|
2817
2897
|
borderColor: u.border,
|
|
@@ -2826,16 +2906,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2826
2906
|
accessibilityLabel: i
|
|
2827
2907
|
}),
|
|
2828
2908
|
s && /* @__PURE__ */ P(B, {
|
|
2829
|
-
style: [
|
|
2909
|
+
style: [Ke.error, { color: u.error }],
|
|
2830
2910
|
children: s
|
|
2831
2911
|
}),
|
|
2832
2912
|
l && !s && /* @__PURE__ */ P(B, {
|
|
2833
|
-
style: [
|
|
2913
|
+
style: [Ke.helperText, { color: u.textMuted }],
|
|
2834
2914
|
children: l
|
|
2835
2915
|
})
|
|
2836
2916
|
]
|
|
2837
2917
|
});
|
|
2838
|
-
},
|
|
2918
|
+
}, Ke = z.create({
|
|
2839
2919
|
container: { marginBottom: 16 },
|
|
2840
2920
|
error: {
|
|
2841
2921
|
fontSize: 12,
|
|
@@ -2857,9 +2937,9 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2857
2937
|
fontWeight: "500",
|
|
2858
2938
|
marginBottom: 8
|
|
2859
2939
|
}
|
|
2860
|
-
}),
|
|
2861
|
-
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] = N(s || 0), [d, f] = N(c || 0), [p,
|
|
2862
|
-
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`),
|
|
2940
|
+
}), qe = ({ field: e, extra: t }) => {
|
|
2941
|
+
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] = N(s || 0), [d, f] = N(c || 0), [p, h] = N(!1), { node: g, setValue: _, error: v, label: y, helperText: b } = t, { colors: x } = m(), S = M(null), C = M(null), w = Array.from({ length: 24 }, (e, t) => t), T = Array.from({ length: 60 }, (e, t) => t), E = () => n || r || "Select time", D = te(() => {
|
|
2942
|
+
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), h(!1);
|
|
2863
2943
|
}, [
|
|
2864
2944
|
l,
|
|
2865
2945
|
d,
|
|
@@ -2885,7 +2965,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2885
2965
|
v && { borderColor: x.error }
|
|
2886
2966
|
],
|
|
2887
2967
|
onPress: () => {
|
|
2888
|
-
u(s || 0), f(c || 0),
|
|
2968
|
+
u(s || 0), f(c || 0), h(!0);
|
|
2889
2969
|
},
|
|
2890
2970
|
activeOpacity: .7,
|
|
2891
2971
|
children: [/* @__PURE__ */ P(B, {
|
|
@@ -2901,15 +2981,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2901
2981
|
children: "🕐"
|
|
2902
2982
|
})]
|
|
2903
2983
|
}),
|
|
2904
|
-
/* @__PURE__ */ P(
|
|
2984
|
+
/* @__PURE__ */ P(se, {
|
|
2905
2985
|
visible: p,
|
|
2906
2986
|
transparent: !0,
|
|
2907
2987
|
animationType: "fade",
|
|
2908
|
-
onRequestClose: () =>
|
|
2988
|
+
onRequestClose: () => h(!1),
|
|
2909
2989
|
children: /* @__PURE__ */ P(V, {
|
|
2910
2990
|
style: Q.modalOverlay,
|
|
2911
2991
|
activeOpacity: 1,
|
|
2912
|
-
onPress: () =>
|
|
2992
|
+
onPress: () => h(!1),
|
|
2913
2993
|
children: /* @__PURE__ */ F(V, {
|
|
2914
2994
|
style: [Q.modalContent, { backgroundColor: x.card }],
|
|
2915
2995
|
activeOpacity: 1,
|
|
@@ -2921,7 +3001,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2921
3001
|
style: [Q.modalTitle, { color: x.text }],
|
|
2922
3002
|
children: y || g.data.name
|
|
2923
3003
|
}), /* @__PURE__ */ P(V, {
|
|
2924
|
-
onPress: () =>
|
|
3004
|
+
onPress: () => h(!1),
|
|
2925
3005
|
children: /* @__PURE__ */ P(B, {
|
|
2926
3006
|
style: [Q.closeButton, { color: x.textMuted }],
|
|
2927
3007
|
children: "✕"
|
|
@@ -3107,18 +3187,18 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3107
3187
|
flex: 1,
|
|
3108
3188
|
fontSize: 14
|
|
3109
3189
|
}
|
|
3110
|
-
}),
|
|
3111
|
-
let [
|
|
3112
|
-
let e = `${String(
|
|
3113
|
-
|
|
3190
|
+
}), Je = ({ field: e, extra: t }) => {
|
|
3191
|
+
let [n, r] = N(!1), [i, o] = N(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = m(), h = a(), g = Array.isArray(s) ? s : [], _ = g[0] || "", v = g[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, A] = N(0), [ee, j] = N(0), ne = Array.from({ length: 24 }, (e, t) => t), M = Array.from({ length: 60 }, (e, t) => t), re = () => _ && v ? `${_} - ${v}` : _ || h("renderer.defaultInputs.selectDateRange"), ie = te(() => {
|
|
3192
|
+
let e = `${String(k).padStart(2, "0")}:${String(ee).padStart(2, "0")}`;
|
|
3193
|
+
i ? (l([e, v]), o(!1), A(D || 0), j(O || 0)) : (l([_, e]), r(!1), o(!0));
|
|
3114
3194
|
}, [
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3195
|
+
i,
|
|
3196
|
+
k,
|
|
3197
|
+
ee,
|
|
3118
3198
|
_,
|
|
3119
3199
|
v,
|
|
3120
3200
|
D,
|
|
3121
|
-
|
|
3201
|
+
O,
|
|
3122
3202
|
l
|
|
3123
3203
|
]);
|
|
3124
3204
|
return /* @__PURE__ */ F(H, {
|
|
@@ -3141,7 +3221,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3141
3221
|
u && { borderColor: p.error }
|
|
3142
3222
|
],
|
|
3143
3223
|
onPress: () => {
|
|
3144
|
-
|
|
3224
|
+
A(S || 0), j(C || 0), o(!0), r(!0);
|
|
3145
3225
|
},
|
|
3146
3226
|
activeOpacity: .7,
|
|
3147
3227
|
children: [/* @__PURE__ */ P(B, {
|
|
@@ -3157,15 +3237,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3157
3237
|
children: "🕐"
|
|
3158
3238
|
})]
|
|
3159
3239
|
}),
|
|
3160
|
-
/* @__PURE__ */ P(
|
|
3161
|
-
visible:
|
|
3240
|
+
/* @__PURE__ */ P(se, {
|
|
3241
|
+
visible: n,
|
|
3162
3242
|
transparent: !0,
|
|
3163
3243
|
animationType: "fade",
|
|
3164
|
-
onRequestClose: () =>
|
|
3244
|
+
onRequestClose: () => r(!1),
|
|
3165
3245
|
children: /* @__PURE__ */ P(V, {
|
|
3166
3246
|
style: $.modalOverlay,
|
|
3167
3247
|
activeOpacity: 1,
|
|
3168
|
-
onPress: () =>
|
|
3248
|
+
onPress: () => r(!1),
|
|
3169
3249
|
children: /* @__PURE__ */ F(V, {
|
|
3170
3250
|
style: [$.modalContent, { backgroundColor: p.card }],
|
|
3171
3251
|
activeOpacity: 1,
|
|
@@ -3177,7 +3257,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3177
3257
|
style: [$.modalTitle, { color: p.text }],
|
|
3178
3258
|
children: d || c.data.name
|
|
3179
3259
|
}), /* @__PURE__ */ P(V, {
|
|
3180
|
-
onPress: () =>
|
|
3260
|
+
onPress: () => r(!1),
|
|
3181
3261
|
children: /* @__PURE__ */ P(B, {
|
|
3182
3262
|
style: [$.closeButton, { color: p.textMuted }],
|
|
3183
3263
|
children: "✕"
|
|
@@ -3188,7 +3268,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3188
3268
|
style: [$.rangeIndicator, { backgroundColor: p.primaryLight }],
|
|
3189
3269
|
children: /* @__PURE__ */ P(B, {
|
|
3190
3270
|
style: [$.rangeIndicatorText, { color: p.primary }],
|
|
3191
|
-
children:
|
|
3271
|
+
children: h(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3192
3272
|
})
|
|
3193
3273
|
}),
|
|
3194
3274
|
/* @__PURE__ */ F(H, {
|
|
@@ -3203,15 +3283,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3203
3283
|
style: $.picker,
|
|
3204
3284
|
contentContainerStyle: $.pickerContent,
|
|
3205
3285
|
showsVerticalScrollIndicator: !1,
|
|
3206
|
-
children:
|
|
3207
|
-
style: [$.pickerItem,
|
|
3208
|
-
onPress: () =>
|
|
3286
|
+
children: ne.map((e) => /* @__PURE__ */ P(V, {
|
|
3287
|
+
style: [$.pickerItem, k === e && { backgroundColor: p.primary }],
|
|
3288
|
+
onPress: () => A(e),
|
|
3209
3289
|
activeOpacity: .7,
|
|
3210
3290
|
children: /* @__PURE__ */ P(B, {
|
|
3211
3291
|
style: [
|
|
3212
3292
|
$.pickerItemText,
|
|
3213
3293
|
{ color: p.text },
|
|
3214
|
-
|
|
3294
|
+
k === e && {
|
|
3215
3295
|
color: p.background,
|
|
3216
3296
|
fontWeight: "600"
|
|
3217
3297
|
}
|
|
@@ -3234,15 +3314,15 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3234
3314
|
style: $.picker,
|
|
3235
3315
|
contentContainerStyle: $.pickerContent,
|
|
3236
3316
|
showsVerticalScrollIndicator: !1,
|
|
3237
|
-
children:
|
|
3238
|
-
style: [$.pickerItem,
|
|
3317
|
+
children: M.map((e) => /* @__PURE__ */ P(V, {
|
|
3318
|
+
style: [$.pickerItem, ee === e && { backgroundColor: p.primary }],
|
|
3239
3319
|
onPress: () => j(e),
|
|
3240
3320
|
activeOpacity: .7,
|
|
3241
3321
|
children: /* @__PURE__ */ P(B, {
|
|
3242
3322
|
style: [
|
|
3243
3323
|
$.pickerItemText,
|
|
3244
3324
|
{ color: p.text },
|
|
3245
|
-
|
|
3325
|
+
ee === e && {
|
|
3246
3326
|
color: p.background,
|
|
3247
3327
|
fontWeight: "600"
|
|
3248
3328
|
}
|
|
@@ -3260,7 +3340,7 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3260
3340
|
activeOpacity: .7,
|
|
3261
3341
|
children: /* @__PURE__ */ P(B, {
|
|
3262
3342
|
style: [$.confirmButtonText, { color: p.background }],
|
|
3263
|
-
children:
|
|
3343
|
+
children: i ? "Next" : "Confirm"
|
|
3264
3344
|
})
|
|
3265
3345
|
})
|
|
3266
3346
|
]
|
|
@@ -3378,71 +3458,71 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3378
3458
|
flex: 1,
|
|
3379
3459
|
fontSize: 14
|
|
3380
3460
|
}
|
|
3381
|
-
}),
|
|
3382
|
-
address:
|
|
3383
|
-
autocomplete:
|
|
3384
|
-
checkbox:
|
|
3385
|
-
date:
|
|
3386
|
-
daterange:
|
|
3387
|
-
file:
|
|
3388
|
-
hidden:
|
|
3389
|
-
http:
|
|
3390
|
-
number:
|
|
3391
|
-
password:
|
|
3392
|
-
radio:
|
|
3393
|
-
select:
|
|
3394
|
-
submit:
|
|
3395
|
-
switch:
|
|
3396
|
-
text:
|
|
3397
|
-
textarea:
|
|
3398
|
-
time:
|
|
3399
|
-
timerange:
|
|
3400
|
-
},
|
|
3401
|
-
let { colors:
|
|
3461
|
+
}), Ye = {
|
|
3462
|
+
address: me,
|
|
3463
|
+
autocomplete: _e,
|
|
3464
|
+
checkbox: ve,
|
|
3465
|
+
date: ye,
|
|
3466
|
+
daterange: be,
|
|
3467
|
+
file: xe,
|
|
3468
|
+
hidden: Se,
|
|
3469
|
+
http: Ne,
|
|
3470
|
+
number: Pe,
|
|
3471
|
+
password: Ie,
|
|
3472
|
+
radio: Re,
|
|
3473
|
+
select: ze,
|
|
3474
|
+
submit: Be,
|
|
3475
|
+
switch: Ve,
|
|
3476
|
+
text: Ge,
|
|
3477
|
+
textarea: Ue,
|
|
3478
|
+
time: qe,
|
|
3479
|
+
timerange: Je
|
|
3480
|
+
}, Xe = ({ step: e, label: t, children: n, canGoBack: r, isLastStep: i, canContinue: o, isSubmitting: s, onBack: c, onContinue: l }) => {
|
|
3481
|
+
let { colors: u } = m(), d = a(), f = !o || s, p = e.nodes.find((e) => S(e) && e.data.type === "submit"), h = p && S(p) ? d(p.data.label) : void 0, g = i ? h || d("renderer.defaultSubmitButton.submit") : d("renderer.step.continue");
|
|
3402
3482
|
return /* @__PURE__ */ F(H, { children: [
|
|
3403
|
-
|
|
3404
|
-
style: [
|
|
3405
|
-
children:
|
|
3483
|
+
t ? /* @__PURE__ */ P(B, {
|
|
3484
|
+
style: [Ze.label, { color: u.text }],
|
|
3485
|
+
children: t
|
|
3406
3486
|
}) : null,
|
|
3407
3487
|
/* @__PURE__ */ P(H, {
|
|
3408
|
-
style:
|
|
3409
|
-
children:
|
|
3488
|
+
style: Ze.content,
|
|
3489
|
+
children: n
|
|
3410
3490
|
}),
|
|
3411
3491
|
/* @__PURE__ */ F(H, {
|
|
3412
|
-
style:
|
|
3413
|
-
children: [
|
|
3492
|
+
style: Ze.actions,
|
|
3493
|
+
children: [r ? /* @__PURE__ */ P(V, {
|
|
3414
3494
|
style: [
|
|
3415
|
-
|
|
3416
|
-
{ borderColor:
|
|
3417
|
-
|
|
3495
|
+
Ze.backButton,
|
|
3496
|
+
{ borderColor: u.border },
|
|
3497
|
+
s && Ze.disabled
|
|
3418
3498
|
],
|
|
3419
|
-
onPress:
|
|
3420
|
-
disabled:
|
|
3499
|
+
onPress: c,
|
|
3500
|
+
disabled: s,
|
|
3421
3501
|
activeOpacity: .7,
|
|
3422
3502
|
children: /* @__PURE__ */ P(B, {
|
|
3423
|
-
style: [
|
|
3424
|
-
children:
|
|
3503
|
+
style: [Ze.backButtonText, { color: u.text }],
|
|
3504
|
+
children: d("renderer.step.back")
|
|
3425
3505
|
})
|
|
3426
3506
|
}) : /* @__PURE__ */ P(H, {}), /* @__PURE__ */ P(V, {
|
|
3427
3507
|
style: [
|
|
3428
|
-
|
|
3429
|
-
{ backgroundColor:
|
|
3430
|
-
|
|
3431
|
-
backgroundColor:
|
|
3508
|
+
Ze.continueButton,
|
|
3509
|
+
{ backgroundColor: u.primary },
|
|
3510
|
+
f && {
|
|
3511
|
+
backgroundColor: u.primaryDisabled,
|
|
3432
3512
|
opacity: .6
|
|
3433
3513
|
}
|
|
3434
3514
|
],
|
|
3435
|
-
onPress:
|
|
3436
|
-
disabled:
|
|
3515
|
+
onPress: l,
|
|
3516
|
+
disabled: f,
|
|
3437
3517
|
activeOpacity: .7,
|
|
3438
|
-
children:
|
|
3439
|
-
style: [
|
|
3440
|
-
children:
|
|
3518
|
+
children: s ? /* @__PURE__ */ P(ie, { color: u.primaryForeground }) : /* @__PURE__ */ P(B, {
|
|
3519
|
+
style: [Ze.continueButtonText, { color: u.primaryForeground }],
|
|
3520
|
+
children: g
|
|
3441
3521
|
})
|
|
3442
3522
|
})]
|
|
3443
3523
|
})
|
|
3444
3524
|
] });
|
|
3445
|
-
},
|
|
3525
|
+
}, Ze = z.create({
|
|
3446
3526
|
actions: {
|
|
3447
3527
|
alignItems: "center",
|
|
3448
3528
|
flexDirection: "row",
|
|
@@ -3477,11 +3557,11 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3477
3557
|
fontWeight: "600",
|
|
3478
3558
|
marginBottom: 12
|
|
3479
3559
|
}
|
|
3480
|
-
}),
|
|
3481
|
-
let { colors: i } =
|
|
3560
|
+
}), Qe = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3561
|
+
let { colors: i } = m();
|
|
3482
3562
|
return /* @__PURE__ */ P(V, {
|
|
3483
3563
|
style: [
|
|
3484
|
-
|
|
3564
|
+
$e.button,
|
|
3485
3565
|
{ backgroundColor: i.primary },
|
|
3486
3566
|
(t || n) && {
|
|
3487
3567
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3491,12 +3571,12 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3491
3571
|
disabled: t || n,
|
|
3492
3572
|
onPress: r,
|
|
3493
3573
|
activeOpacity: .7,
|
|
3494
|
-
children: n ? /* @__PURE__ */ P(
|
|
3495
|
-
style: [
|
|
3574
|
+
children: n ? /* @__PURE__ */ P(ie, { color: i.primaryForeground }) : /* @__PURE__ */ P(B, {
|
|
3575
|
+
style: [$e.buttonText, { color: i.primaryForeground }],
|
|
3496
3576
|
children: e
|
|
3497
3577
|
})
|
|
3498
3578
|
});
|
|
3499
|
-
},
|
|
3579
|
+
}, $e = z.create({
|
|
3500
3580
|
button: {
|
|
3501
3581
|
alignItems: "center",
|
|
3502
3582
|
borderRadius: 6,
|
|
@@ -3509,16 +3589,16 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3509
3589
|
fontSize: 16,
|
|
3510
3590
|
fontWeight: "600"
|
|
3511
3591
|
}
|
|
3512
|
-
}),
|
|
3513
|
-
let
|
|
3592
|
+
}), et = ({ children: e }) => e, tt = ({ node: e }) => {
|
|
3593
|
+
let t = a(), { colors: n } = m(), r = t(e.data?.label);
|
|
3514
3594
|
return /* @__PURE__ */ P(B, {
|
|
3515
|
-
style: [
|
|
3516
|
-
children:
|
|
3595
|
+
style: [rt.title, { color: n.text }],
|
|
3596
|
+
children: r
|
|
3517
3597
|
});
|
|
3518
|
-
},
|
|
3519
|
-
let { colors: e } =
|
|
3520
|
-
return /* @__PURE__ */ P(H, { style: [
|
|
3521
|
-
},
|
|
3598
|
+
}, nt = () => {
|
|
3599
|
+
let { colors: e } = m();
|
|
3600
|
+
return /* @__PURE__ */ P(H, { style: [rt.divider, { backgroundColor: e.separator }] });
|
|
3601
|
+
}, rt = z.create({
|
|
3522
3602
|
divider: {
|
|
3523
3603
|
height: 1,
|
|
3524
3604
|
marginBottom: 16,
|
|
@@ -3529,24 +3609,24 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3529
3609
|
fontWeight: "700",
|
|
3530
3610
|
marginBottom: 16
|
|
3531
3611
|
}
|
|
3532
|
-
}),
|
|
3533
|
-
divider:
|
|
3534
|
-
title:
|
|
3535
|
-
},
|
|
3612
|
+
}), it = {
|
|
3613
|
+
divider: nt,
|
|
3614
|
+
title: tt
|
|
3615
|
+
}, at = ({ node: e, children: t }) => {
|
|
3536
3616
|
let { image: n } = e.data;
|
|
3537
3617
|
return /* @__PURE__ */ F(H, { children: [n && /* @__PURE__ */ P(L, {
|
|
3538
3618
|
source: { uri: n },
|
|
3539
|
-
style:
|
|
3619
|
+
style: ot.image,
|
|
3540
3620
|
resizeMode: "cover"
|
|
3541
3621
|
}), t] });
|
|
3542
|
-
},
|
|
3622
|
+
}, ot = z.create({ image: {
|
|
3543
3623
|
borderRadius: 6,
|
|
3544
3624
|
height: 160,
|
|
3545
3625
|
marginBottom: 8,
|
|
3546
3626
|
width: "100%"
|
|
3547
|
-
} }),
|
|
3548
|
-
let { colors: t } =
|
|
3549
|
-
return
|
|
3627
|
+
} }), st = ({ style: e }) => {
|
|
3628
|
+
let { colors: t } = m(), n = M(new I.Value(.5)).current;
|
|
3629
|
+
return j(() => {
|
|
3550
3630
|
let e = I.loop(I.sequence([I.timing(n, {
|
|
3551
3631
|
duration: 600,
|
|
3552
3632
|
toValue: 1,
|
|
@@ -3558,34 +3638,34 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3558
3638
|
})]));
|
|
3559
3639
|
return e.start(), () => e.stop();
|
|
3560
3640
|
}, [n]), /* @__PURE__ */ P(I.View, { style: [
|
|
3561
|
-
|
|
3641
|
+
lt.bar,
|
|
3562
3642
|
{
|
|
3563
3643
|
backgroundColor: t.muted,
|
|
3564
3644
|
opacity: n
|
|
3565
3645
|
},
|
|
3566
3646
|
e
|
|
3567
3647
|
] });
|
|
3568
|
-
},
|
|
3648
|
+
}, ct = () => /* @__PURE__ */ F(H, {
|
|
3569
3649
|
accessibilityState: { busy: !0 },
|
|
3570
3650
|
children: [
|
|
3571
|
-
/* @__PURE__ */ P(
|
|
3651
|
+
/* @__PURE__ */ P(st, { style: lt.title }),
|
|
3572
3652
|
/* @__PURE__ */ P(H, {
|
|
3573
|
-
style:
|
|
3653
|
+
style: lt.fields,
|
|
3574
3654
|
children: [
|
|
3575
3655
|
0,
|
|
3576
3656
|
1,
|
|
3577
3657
|
2
|
|
3578
3658
|
].map((e) => /* @__PURE__ */ F(H, {
|
|
3579
|
-
style:
|
|
3580
|
-
children: [/* @__PURE__ */ P(
|
|
3659
|
+
style: lt.field,
|
|
3660
|
+
children: [/* @__PURE__ */ P(st, { style: lt.fieldLabel }), /* @__PURE__ */ P(st, { style: lt.fieldInput })]
|
|
3581
3661
|
}, e))
|
|
3582
3662
|
}),
|
|
3583
3663
|
/* @__PURE__ */ P(H, {
|
|
3584
|
-
style:
|
|
3585
|
-
children: /* @__PURE__ */ P(
|
|
3664
|
+
style: lt.actions,
|
|
3665
|
+
children: /* @__PURE__ */ P(st, { style: lt.button })
|
|
3586
3666
|
})
|
|
3587
3667
|
]
|
|
3588
|
-
}),
|
|
3668
|
+
}), lt = z.create({
|
|
3589
3669
|
actions: {
|
|
3590
3670
|
alignItems: "flex-end",
|
|
3591
3671
|
marginTop: 24
|
|
@@ -3610,117 +3690,117 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3610
3690
|
marginBottom: 24,
|
|
3611
3691
|
width: "33%"
|
|
3612
3692
|
}
|
|
3613
|
-
}),
|
|
3614
|
-
let { colors: b } =
|
|
3615
|
-
baseUrl:
|
|
3616
|
-
components:
|
|
3617
|
-
flow:
|
|
3618
|
-
googleApiKey:
|
|
3619
|
-
headers:
|
|
3620
|
-
initialValues:
|
|
3621
|
-
language:
|
|
3693
|
+
}), ut = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: r, googleApiKey: i, headers: a, initialValues: o, isLoading: s = !1, isSubmitting: c = !1, language: l, onBack: u, onChange: f, onSubmit: p, showPoweredBy: h, style: g, theme: _, validate: v, validationMode: y }) => {
|
|
3694
|
+
let { colors: b } = m(), { canContinueStep: x, canSubmit: S, clearSubmitMessage: C, config: w, currentStep: T, currentStepGroupNode: E, currentStepIndex: O, formErrors: k, formValues: A, goToNextStep: j, goToPreviousStep: M, handleSubmit: N, inputNodes: re, isFirstStep: ie, isLastStep: ae, isSubmitting: I, missingRequiredFields: oe, setFieldValue: L, steps: se, submitMessage: z, t: ce } = D({
|
|
3695
|
+
baseUrl: e,
|
|
3696
|
+
components: t,
|
|
3697
|
+
flow: r,
|
|
3698
|
+
googleApiKey: i,
|
|
3699
|
+
headers: a,
|
|
3700
|
+
initialValues: o,
|
|
3701
|
+
language: l,
|
|
3622
3702
|
onChange: f,
|
|
3623
3703
|
onSubmit: p,
|
|
3624
|
-
showPoweredBy:
|
|
3704
|
+
showPoweredBy: h,
|
|
3625
3705
|
theme: _,
|
|
3626
3706
|
validate: v,
|
|
3627
3707
|
validationMode: y
|
|
3628
|
-
}),
|
|
3708
|
+
}), le = c || I, { FormWrapper: V, SubmitButtonWrapper: de, renderNode: fe } = ee({
|
|
3629
3709
|
config: w,
|
|
3630
|
-
DefaultFormWrapper:
|
|
3631
|
-
DefaultInputWrapper:
|
|
3632
|
-
DefaultSubmitButton:
|
|
3633
|
-
DefaultSubmitButtonWrapper:
|
|
3634
|
-
defaultInputRenderers:
|
|
3635
|
-
defaultUI:
|
|
3636
|
-
formErrors:
|
|
3710
|
+
DefaultFormWrapper: ue,
|
|
3711
|
+
DefaultInputWrapper: at,
|
|
3712
|
+
DefaultSubmitButton: Qe,
|
|
3713
|
+
DefaultSubmitButtonWrapper: et,
|
|
3714
|
+
defaultInputRenderers: Ye,
|
|
3715
|
+
defaultUI: it,
|
|
3716
|
+
formErrors: k,
|
|
3637
3717
|
formValues: A,
|
|
3638
3718
|
inputNodes: re,
|
|
3639
|
-
isSubmitting:
|
|
3640
|
-
missingRequiredFields:
|
|
3641
|
-
setFieldValue:
|
|
3642
|
-
}), pe = w.components.step ??
|
|
3643
|
-
if (
|
|
3644
|
-
|
|
3719
|
+
isSubmitting: le,
|
|
3720
|
+
missingRequiredFields: oe,
|
|
3721
|
+
setFieldValue: L
|
|
3722
|
+
}), pe = w.components.step ?? Xe, me = w.components.loadingSkeleton ?? ct, U = ne(() => ce(E?.data?.label), [ce, E]), he = te(() => {
|
|
3723
|
+
if (ae) {
|
|
3724
|
+
N();
|
|
3645
3725
|
return;
|
|
3646
3726
|
}
|
|
3647
|
-
|
|
3727
|
+
j();
|
|
3648
3728
|
}, [
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3729
|
+
ae,
|
|
3730
|
+
N,
|
|
3731
|
+
j
|
|
3652
3732
|
]), ge = te(() => {
|
|
3653
3733
|
if (ie) {
|
|
3654
|
-
|
|
3734
|
+
u?.();
|
|
3655
3735
|
return;
|
|
3656
3736
|
}
|
|
3657
|
-
|
|
3737
|
+
M();
|
|
3658
3738
|
}, [
|
|
3659
3739
|
ie,
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
]),
|
|
3740
|
+
u,
|
|
3741
|
+
M
|
|
3742
|
+
]), _e = !ie || !!u;
|
|
3663
3743
|
return /* @__PURE__ */ P(R, {
|
|
3664
3744
|
nestedScrollEnabled: !0,
|
|
3665
3745
|
style: [
|
|
3666
|
-
|
|
3746
|
+
ft.container,
|
|
3667
3747
|
{ backgroundColor: b.background },
|
|
3668
3748
|
g
|
|
3669
3749
|
],
|
|
3670
|
-
contentContainerStyle:
|
|
3671
|
-
children:
|
|
3750
|
+
contentContainerStyle: n,
|
|
3751
|
+
children: s ? /* @__PURE__ */ P(me, {}) : /* @__PURE__ */ F(d, {
|
|
3672
3752
|
value: {
|
|
3673
3753
|
baseUrl: w.baseUrl,
|
|
3674
|
-
flow:
|
|
3675
|
-
formErrors:
|
|
3754
|
+
flow: r,
|
|
3755
|
+
formErrors: k,
|
|
3676
3756
|
formValues: A,
|
|
3677
3757
|
googleApiKey: w.googleApiKey,
|
|
3678
3758
|
headers: w.headers,
|
|
3679
3759
|
inputNodes: re,
|
|
3680
3760
|
language: w.language,
|
|
3681
|
-
setFieldValue:
|
|
3761
|
+
setFieldValue: L
|
|
3682
3762
|
},
|
|
3683
|
-
children: [/* @__PURE__ */ F(
|
|
3684
|
-
onSubmit:
|
|
3763
|
+
children: [/* @__PURE__ */ F(V, {
|
|
3764
|
+
onSubmit: N,
|
|
3685
3765
|
children: [T && /* @__PURE__ */ P(de, {
|
|
3686
|
-
missingFields:
|
|
3766
|
+
missingFields: oe,
|
|
3687
3767
|
children: /* @__PURE__ */ P(pe, {
|
|
3688
3768
|
step: T,
|
|
3689
|
-
groupNode:
|
|
3690
|
-
stepIndex:
|
|
3691
|
-
totalSteps:
|
|
3769
|
+
groupNode: E,
|
|
3770
|
+
stepIndex: O,
|
|
3771
|
+
totalSteps: se.length,
|
|
3692
3772
|
isFirstStep: ie,
|
|
3693
|
-
isLastStep:
|
|
3694
|
-
canContinue: x && (!
|
|
3695
|
-
canGoBack:
|
|
3696
|
-
isSubmitting:
|
|
3773
|
+
isLastStep: ae,
|
|
3774
|
+
canContinue: x && (!ae || S),
|
|
3775
|
+
canGoBack: _e,
|
|
3776
|
+
isSubmitting: le,
|
|
3697
3777
|
onBack: ge,
|
|
3698
3778
|
onContinue: he,
|
|
3699
|
-
label:
|
|
3779
|
+
label: U,
|
|
3700
3780
|
children: T.nodes.map((e) => fe(e))
|
|
3701
3781
|
})
|
|
3702
3782
|
}), w.showPoweredBy && /* @__PURE__ */ P(B, {
|
|
3703
|
-
style: [
|
|
3783
|
+
style: [ft.poweredBy, { color: b.textMuted }],
|
|
3704
3784
|
children: "Powered by Treege"
|
|
3705
3785
|
})]
|
|
3706
|
-
}),
|
|
3707
|
-
style: [
|
|
3786
|
+
}), z && /* @__PURE__ */ F(H, {
|
|
3787
|
+
style: [ft.message, { backgroundColor: z.type === "success" ? b.successBg : b.errorBg }],
|
|
3708
3788
|
children: [/* @__PURE__ */ P(B, {
|
|
3709
|
-
style: [
|
|
3710
|
-
children:
|
|
3789
|
+
style: [ft.messageText, { color: z.type === "success" ? b.success : b.error }],
|
|
3790
|
+
children: z.message
|
|
3711
3791
|
}), /* @__PURE__ */ P(B, {
|
|
3712
|
-
style: [
|
|
3792
|
+
style: [ft.messageClose, { color: z.type === "success" ? b.success : b.error }],
|
|
3713
3793
|
onPress: C,
|
|
3714
3794
|
children: ce("common.close")
|
|
3715
3795
|
})]
|
|
3716
3796
|
})]
|
|
3717
3797
|
})
|
|
3718
3798
|
});
|
|
3719
|
-
},
|
|
3799
|
+
}, dt = (e) => /* @__PURE__ */ P(v, {
|
|
3720
3800
|
theme: e.theme,
|
|
3721
3801
|
storageKey: "treege-renderer-theme",
|
|
3722
|
-
children: /* @__PURE__ */ P(
|
|
3723
|
-
}),
|
|
3802
|
+
children: /* @__PURE__ */ P(ut, { ...e })
|
|
3803
|
+
}), ft = z.create({
|
|
3724
3804
|
container: { flex: 1 },
|
|
3725
3805
|
message: {
|
|
3726
3806
|
borderRadius: 6,
|
|
@@ -3743,4 +3823,4 @@ var le = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3743
3823
|
}
|
|
3744
3824
|
});
|
|
3745
3825
|
//#endregion
|
|
3746
|
-
export {
|
|
3826
|
+
export { me as DefaultAddressInput, _e as DefaultAutocompleteInput, ve as DefaultCheckboxInput, ye as DefaultDateInput, be as DefaultDateRangeInput, nt as DefaultDividerUI, xe as DefaultFileInput, Se as DefaultHiddenInput, Ne as DefaultHttpInput, Pe as DefaultNumberInput, Ie as DefaultPasswordInput, Re as DefaultRadioInput, ze as DefaultSelectInput, Ve as DefaultSwitchInput, Ge as DefaultTextInput, Ue as DefaultTextareaInput, qe as DefaultTimeInput, Je as DefaultTimeRangeInput, tt as DefaultTitleUI, dt as TreegeRenderer, w as TreegeRendererProvider, g as applyReferenceTransformation, u as buildInitialFormValues, o as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, _ as convertFormValuesToNamedFormat, Ye as defaultInputRenderers, it as defaultUI, O as evaluateCondition, A as evaluateConditions, p as fileToSerializable, l as filesToSerializable, k as findStartNode, T as getFlowRenderState, r as getTranslatedText, s as isFieldEmpty, C as isStartNode, f as resolveNodeDefaultValue, De as sanitize, ke as sanitizeHttpResponse, c as serializableToFile, D as useTreegeRenderer, E as useTreegeRendererConfig };
|