treege 3.0.0-beta.39 → 3.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DefaultInputs-8yJMEyMh.js +1557 -0
- package/dist/ThemeContext-Ejgu9Mwr.js +1603 -0
- package/dist/editor/constants/nodeTypes.d.ts +3 -3
- package/dist/editor/context/TreegeEditorContext.d.ts +18 -1
- package/dist/editor/features/TreegeEditor/dialogs/ChangeNodeTypeDialog.d.ts +2 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/nodes/components/NodeInputPreview.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypeBadge.d.ts +7 -0
- package/dist/editor/hooks/useFlowActions.d.ts +2 -2
- package/dist/editor/utils/edge.d.ts +14 -0
- package/dist/{editor-CAj1BX2r.js → editor-DWJ95r4g.js} +1340 -1114
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -5
- package/dist/renderer/utils/node.d.ts +9 -0
- package/dist/renderer-native.js +680 -681
- package/dist/renderer.js +3 -4
- package/dist/shared/locales/ar.json.d.ts +7 -0
- package/dist/shared/locales/de.json.d.ts +7 -0
- package/dist/shared/locales/en.json.d.ts +7 -0
- package/dist/shared/locales/es.json.d.ts +7 -0
- package/dist/shared/locales/fr.json.d.ts +7 -0
- package/dist/shared/locales/it.json.d.ts +7 -0
- package/dist/shared/locales/pt.json.d.ts +7 -0
- package/package.json +1 -1
- package/dist/ThemeContext-PGG6Ht__.js +0 -813
- package/dist/editor/features/TreegeEditor/inputs/SelectInputType.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/components/InputTypeBadge.d.ts +0 -7
- package/dist/renderer-BOjgk8F8.js +0 -1199
- package/dist/separator-Cdfv5nIR.js +0 -351
- package/dist/useRenderNode-OgRe_mb5.js +0 -775
package/dist/renderer-native.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as r, S as i, _ as a, a as o, b as s, c, d as l, f as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./useRenderNode-OgRe_mb5.js";
|
|
1
|
+
import { C as e, D as t, N as n, O as r, S as i, _ as a, a as o, b as s, c, g as l, h as u, i as d, l as f, m as p, n as m, o as h, p as g, r as _, s as v, t as y, u as b, v as x, w as S, x as C, y as w } from "./ThemeContext-Ejgu9Mwr.js";
|
|
3
2
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
4
3
|
import { useCallback as ee, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
5
4
|
import { ActivityIndicator as j, Alert as M, FlatList as N, Image as P, Modal as F, ScrollView as I, StyleSheet as L, Switch as te, Text as R, TextInput as z, TouchableOpacity as B, View as V } from "react-native";
|
|
@@ -7,16 +6,16 @@ import { ActivityIndicator as j, Alert as M, FlatList as N, Image as P, Modal as
|
|
|
7
6
|
var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
8
7
|
style: re.container,
|
|
9
8
|
children: e
|
|
10
|
-
}), re = L.create({ container: { padding: 16 } }), ie = ({ children:
|
|
11
|
-
let
|
|
9
|
+
}), re = L.create({ container: { padding: 16 } }), ie = ({ children: e, node: t }) => {
|
|
10
|
+
let n = b(), { colors: r } = m(), i = n(t.data.label);
|
|
12
11
|
return /* @__PURE__ */ E(V, {
|
|
13
12
|
style: ae.container,
|
|
14
|
-
children: [
|
|
15
|
-
style: [ae.label, { color:
|
|
16
|
-
children:
|
|
13
|
+
children: [i && /* @__PURE__ */ T(R, {
|
|
14
|
+
style: [ae.label, { color: r.text }],
|
|
15
|
+
children: i
|
|
17
16
|
}), /* @__PURE__ */ T(V, {
|
|
18
17
|
style: ae.content,
|
|
19
|
-
children:
|
|
18
|
+
children: e
|
|
20
19
|
})]
|
|
21
20
|
});
|
|
22
21
|
}, ae = L.create({
|
|
@@ -55,34 +54,34 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
55
54
|
} catch (e) {
|
|
56
55
|
return console.error("Google Places fetch error:", e), [];
|
|
57
56
|
}
|
|
58
|
-
}, H = ({ node:
|
|
59
|
-
let [
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
|
|
57
|
+
}, H = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, id: s, name: c }) => {
|
|
58
|
+
let [l, u] = A(""), [d, f] = A([]), [h, g] = A(!1), [_, v] = A(!1), { language: y, googleApiKey: x } = p(), S = b(), { colors: C } = m(), w = ee((e) => {
|
|
59
|
+
n(e.value), u(""), g(!1), f([]);
|
|
60
|
+
}, [n]), O = () => {
|
|
61
|
+
g(!1);
|
|
63
62
|
};
|
|
64
63
|
return D(() => {
|
|
65
|
-
if (!
|
|
66
|
-
|
|
64
|
+
if (!l || l.trim().length < 3) {
|
|
65
|
+
f([]), v(!1);
|
|
67
66
|
return;
|
|
68
67
|
}
|
|
69
|
-
|
|
68
|
+
v(!0);
|
|
70
69
|
let e = setTimeout(async () => {
|
|
71
|
-
|
|
70
|
+
f(x ? await se(l, x) : await oe(l, y)), v(!1);
|
|
72
71
|
}, 300);
|
|
73
72
|
return () => {
|
|
74
|
-
clearTimeout(e),
|
|
73
|
+
clearTimeout(e), v(!1);
|
|
75
74
|
};
|
|
76
75
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
l,
|
|
77
|
+
y,
|
|
79
78
|
x
|
|
80
79
|
]), /* @__PURE__ */ E(V, {
|
|
81
80
|
style: U.container,
|
|
82
81
|
children: [
|
|
83
82
|
/* @__PURE__ */ E(R, {
|
|
84
83
|
style: [U.label, { color: C.textSecondary }],
|
|
85
|
-
children: [
|
|
84
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
86
85
|
style: { color: C.error },
|
|
87
86
|
children: "*"
|
|
88
87
|
})]
|
|
@@ -94,25 +93,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
94
93
|
backgroundColor: C.input,
|
|
95
94
|
borderColor: C.border
|
|
96
95
|
},
|
|
97
|
-
|
|
96
|
+
r && { borderColor: C.error }
|
|
98
97
|
],
|
|
99
|
-
onPress: () =>
|
|
98
|
+
onPress: () => g(!0),
|
|
100
99
|
activeOpacity: .7,
|
|
101
100
|
children: [/* @__PURE__ */ T(R, {
|
|
102
101
|
style: [
|
|
103
102
|
U.triggerText,
|
|
104
103
|
{ color: C.text },
|
|
105
|
-
!
|
|
104
|
+
!t && { color: C.textMuted }
|
|
106
105
|
],
|
|
107
106
|
numberOfLines: 1,
|
|
108
|
-
children:
|
|
107
|
+
children: t || a || S("renderer.defaultAddressInput.enterAddress")
|
|
109
108
|
}), /* @__PURE__ */ T(R, {
|
|
110
109
|
style: U.icon,
|
|
111
110
|
children: "📍"
|
|
112
111
|
})]
|
|
113
112
|
}),
|
|
114
113
|
/* @__PURE__ */ T(F, {
|
|
115
|
-
visible:
|
|
114
|
+
visible: h,
|
|
116
115
|
transparent: !0,
|
|
117
116
|
animationType: "fade",
|
|
118
117
|
onRequestClose: O,
|
|
@@ -129,7 +128,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
129
128
|
style: [U.modalHeader, { borderBottomColor: C.separator }],
|
|
130
129
|
children: [/* @__PURE__ */ T(R, {
|
|
131
130
|
style: [U.modalTitle, { color: C.text }],
|
|
132
|
-
children:
|
|
131
|
+
children: i || e.data.name
|
|
133
132
|
}), /* @__PURE__ */ T(B, {
|
|
134
133
|
onPress: O,
|
|
135
134
|
children: /* @__PURE__ */ T(R, {
|
|
@@ -146,20 +145,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
146
145
|
borderColor: C.border,
|
|
147
146
|
color: C.text
|
|
148
147
|
}],
|
|
149
|
-
placeholder:
|
|
148
|
+
placeholder: a || S("renderer.defaultAddressInput.enterAddress"),
|
|
150
149
|
placeholderTextColor: C.textMuted,
|
|
151
|
-
value:
|
|
152
|
-
onChangeText:
|
|
150
|
+
value: l,
|
|
151
|
+
onChangeText: u,
|
|
153
152
|
autoFocus: !0,
|
|
154
153
|
autoCapitalize: "none",
|
|
155
154
|
autoCorrect: !1
|
|
156
|
-
}),
|
|
155
|
+
}), _ && /* @__PURE__ */ T(j, {
|
|
157
156
|
size: "small",
|
|
158
157
|
color: C.primary,
|
|
159
158
|
style: U.searchLoader
|
|
160
159
|
})]
|
|
161
160
|
}),
|
|
162
|
-
|
|
161
|
+
_ ? /* @__PURE__ */ E(V, {
|
|
163
162
|
style: U.loadingContainer,
|
|
164
163
|
children: [/* @__PURE__ */ T(j, {
|
|
165
164
|
size: "small",
|
|
@@ -169,12 +168,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
169
168
|
children: S("renderer.defaultAddressInput.searching")
|
|
170
169
|
})]
|
|
171
170
|
}) : /* @__PURE__ */ T(N, {
|
|
172
|
-
data:
|
|
171
|
+
data: d,
|
|
173
172
|
keyExtractor: (e, t) => t.toString(),
|
|
174
173
|
style: U.suggestionsList,
|
|
175
174
|
contentContainerStyle: U.suggestionsListContent,
|
|
176
175
|
keyboardShouldPersistTaps: "handled",
|
|
177
|
-
ListEmptyComponent:
|
|
176
|
+
ListEmptyComponent: l.length >= 3 ? /* @__PURE__ */ T(V, {
|
|
178
177
|
style: U.emptyContainer,
|
|
179
178
|
children: /* @__PURE__ */ T(R, {
|
|
180
179
|
style: [U.emptyText, { color: C.textMuted }],
|
|
@@ -205,13 +204,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
205
204
|
})
|
|
206
205
|
})
|
|
207
206
|
}),
|
|
208
|
-
|
|
207
|
+
r && /* @__PURE__ */ T(R, {
|
|
209
208
|
style: [U.error, { color: C.error }],
|
|
210
|
-
children:
|
|
209
|
+
children: r
|
|
211
210
|
}),
|
|
212
|
-
|
|
211
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
213
212
|
style: [U.helperText, { color: C.textMuted }],
|
|
214
|
-
children:
|
|
213
|
+
children: o
|
|
215
214
|
})
|
|
216
215
|
]
|
|
217
216
|
});
|
|
@@ -325,27 +324,27 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
325
324
|
flex: 1,
|
|
326
325
|
fontSize: 14
|
|
327
326
|
}
|
|
328
|
-
}), ce = ({ node:
|
|
329
|
-
let [
|
|
330
|
-
if (!
|
|
331
|
-
let e =
|
|
332
|
-
return
|
|
327
|
+
}), ce = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
328
|
+
let [s, c] = A(!1), [l, u] = A(""), d = b(), { colors: f } = m(), p = e.data.options || [], h = p.find((e) => e.value === t), g = O(() => {
|
|
329
|
+
if (!l.trim()) return p;
|
|
330
|
+
let e = l.toLowerCase();
|
|
331
|
+
return p.filter((t) => d(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
333
332
|
}, [
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
]),
|
|
338
|
-
|
|
339
|
-
},
|
|
340
|
-
|
|
333
|
+
p,
|
|
334
|
+
l,
|
|
335
|
+
d
|
|
336
|
+
]), _ = (e) => {
|
|
337
|
+
n(e === t ? "" : e), c(!1), u("");
|
|
338
|
+
}, v = () => {
|
|
339
|
+
c(!1), u("");
|
|
341
340
|
};
|
|
342
341
|
return /* @__PURE__ */ E(V, {
|
|
343
342
|
style: W.container,
|
|
344
343
|
children: [
|
|
345
344
|
/* @__PURE__ */ E(R, {
|
|
346
|
-
style: [W.label, { color:
|
|
347
|
-
children: [
|
|
348
|
-
style: { color:
|
|
345
|
+
style: [W.label, { color: f.textSecondary }],
|
|
346
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
347
|
+
style: { color: f.error },
|
|
349
348
|
children: "*"
|
|
350
349
|
})]
|
|
351
350
|
}),
|
|
@@ -353,49 +352,49 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
353
352
|
style: [
|
|
354
353
|
W.trigger,
|
|
355
354
|
{
|
|
356
|
-
backgroundColor:
|
|
357
|
-
borderColor:
|
|
355
|
+
backgroundColor: f.input,
|
|
356
|
+
borderColor: f.border
|
|
358
357
|
},
|
|
359
|
-
|
|
358
|
+
r && { borderColor: f.error }
|
|
360
359
|
],
|
|
361
|
-
onPress: () =>
|
|
360
|
+
onPress: () => c(!0),
|
|
362
361
|
activeOpacity: .7,
|
|
363
362
|
children: [/* @__PURE__ */ T(R, {
|
|
364
363
|
style: [
|
|
365
364
|
W.triggerText,
|
|
366
|
-
{ color:
|
|
367
|
-
!
|
|
365
|
+
{ color: f.text },
|
|
366
|
+
!t && { color: f.textMuted }
|
|
368
367
|
],
|
|
369
368
|
numberOfLines: 1,
|
|
370
|
-
children:
|
|
369
|
+
children: t && h ? d(h.label) : a || d("renderer.defaultAutocompleteInput.selectOption")
|
|
371
370
|
}), /* @__PURE__ */ T(R, {
|
|
372
|
-
style: [W.arrow, { color:
|
|
371
|
+
style: [W.arrow, { color: f.textMuted }],
|
|
373
372
|
children: "▼"
|
|
374
373
|
})]
|
|
375
374
|
}),
|
|
376
375
|
/* @__PURE__ */ T(F, {
|
|
377
|
-
visible:
|
|
376
|
+
visible: s,
|
|
378
377
|
transparent: !0,
|
|
379
378
|
animationType: "fade",
|
|
380
|
-
onRequestClose:
|
|
379
|
+
onRequestClose: v,
|
|
381
380
|
children: /* @__PURE__ */ T(B, {
|
|
382
381
|
style: W.modalOverlay,
|
|
383
382
|
activeOpacity: 1,
|
|
384
|
-
onPress:
|
|
383
|
+
onPress: v,
|
|
385
384
|
children: /* @__PURE__ */ E(B, {
|
|
386
|
-
style: [W.modalContent, { backgroundColor:
|
|
385
|
+
style: [W.modalContent, { backgroundColor: f.card }],
|
|
387
386
|
activeOpacity: 1,
|
|
388
387
|
onPress: () => {},
|
|
389
388
|
children: [
|
|
390
389
|
/* @__PURE__ */ E(V, {
|
|
391
|
-
style: [W.modalHeader, { borderBottomColor:
|
|
390
|
+
style: [W.modalHeader, { borderBottomColor: f.separator }],
|
|
392
391
|
children: [/* @__PURE__ */ T(R, {
|
|
393
|
-
style: [W.modalTitle, { color:
|
|
394
|
-
children:
|
|
392
|
+
style: [W.modalTitle, { color: f.text }],
|
|
393
|
+
children: i || e.data.name
|
|
395
394
|
}), /* @__PURE__ */ T(B, {
|
|
396
|
-
onPress:
|
|
395
|
+
onPress: v,
|
|
397
396
|
children: /* @__PURE__ */ T(R, {
|
|
398
|
-
style: [W.closeButton, { color:
|
|
397
|
+
style: [W.closeButton, { color: f.textMuted }],
|
|
399
398
|
children: "✕"
|
|
400
399
|
})
|
|
401
400
|
})]
|
|
@@ -404,47 +403,47 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
404
403
|
style: W.searchContainer,
|
|
405
404
|
children: /* @__PURE__ */ T(z, {
|
|
406
405
|
style: [W.searchInput, {
|
|
407
|
-
backgroundColor:
|
|
408
|
-
borderColor:
|
|
409
|
-
color:
|
|
406
|
+
backgroundColor: f.muted,
|
|
407
|
+
borderColor: f.border,
|
|
408
|
+
color: f.text
|
|
410
409
|
}],
|
|
411
|
-
placeholder:
|
|
412
|
-
placeholderTextColor:
|
|
413
|
-
value:
|
|
414
|
-
onChangeText:
|
|
410
|
+
placeholder: a || d("renderer.defaultAutocompleteInput.search"),
|
|
411
|
+
placeholderTextColor: f.textMuted,
|
|
412
|
+
value: l,
|
|
413
|
+
onChangeText: u,
|
|
415
414
|
autoFocus: !0,
|
|
416
415
|
autoCapitalize: "none",
|
|
417
416
|
autoCorrect: !1
|
|
418
417
|
})
|
|
419
418
|
}),
|
|
420
419
|
/* @__PURE__ */ T(N, {
|
|
421
|
-
data:
|
|
420
|
+
data: g,
|
|
422
421
|
keyExtractor: (e) => e.value,
|
|
423
422
|
style: W.optionsList,
|
|
424
423
|
contentContainerStyle: W.optionsListContent,
|
|
425
424
|
ListEmptyComponent: /* @__PURE__ */ T(V, {
|
|
426
425
|
style: W.emptyContainer,
|
|
427
426
|
children: /* @__PURE__ */ T(R, {
|
|
428
|
-
style: [W.emptyText, { color:
|
|
429
|
-
children:
|
|
427
|
+
style: [W.emptyText, { color: f.textMuted }],
|
|
428
|
+
children: d("renderer.defaultAutocompleteInput.noResults")
|
|
430
429
|
})
|
|
431
430
|
}),
|
|
432
431
|
renderItem: ({ item: e }) => {
|
|
433
|
-
let
|
|
432
|
+
let n = e.value === t;
|
|
434
433
|
return /* @__PURE__ */ E(B, {
|
|
435
|
-
style: [W.option,
|
|
436
|
-
onPress: () =>
|
|
434
|
+
style: [W.option, n && { backgroundColor: f.primaryLight }],
|
|
435
|
+
onPress: () => _(e.value),
|
|
437
436
|
disabled: e.disabled,
|
|
438
437
|
activeOpacity: .7,
|
|
439
438
|
children: [/* @__PURE__ */ T(R, {
|
|
440
439
|
style: [
|
|
441
440
|
W.optionText,
|
|
442
|
-
{ color:
|
|
443
|
-
e.disabled && { color:
|
|
441
|
+
{ color: f.text },
|
|
442
|
+
e.disabled && { color: f.textMuted }
|
|
444
443
|
],
|
|
445
|
-
children:
|
|
446
|
-
}),
|
|
447
|
-
style: [W.checkmark, { color:
|
|
444
|
+
children: d(e.label)
|
|
445
|
+
}), n && /* @__PURE__ */ T(R, {
|
|
446
|
+
style: [W.checkmark, { color: f.primary }],
|
|
448
447
|
children: "✓"
|
|
449
448
|
})]
|
|
450
449
|
});
|
|
@@ -454,13 +453,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
454
453
|
})
|
|
455
454
|
})
|
|
456
455
|
}),
|
|
457
|
-
|
|
458
|
-
style: [W.error, { color:
|
|
459
|
-
children:
|
|
456
|
+
r && /* @__PURE__ */ T(R, {
|
|
457
|
+
style: [W.error, { color: f.error }],
|
|
458
|
+
children: r
|
|
460
459
|
}),
|
|
461
|
-
|
|
462
|
-
style: [W.helperText, { color:
|
|
463
|
-
children:
|
|
460
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
461
|
+
style: [W.helperText, { color: f.textMuted }],
|
|
462
|
+
children: o
|
|
464
463
|
})
|
|
465
464
|
]
|
|
466
465
|
});
|
|
@@ -555,47 +554,47 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
555
554
|
flex: 1,
|
|
556
555
|
fontSize: 14
|
|
557
556
|
}
|
|
558
|
-
}), le = ({ node:
|
|
559
|
-
let
|
|
560
|
-
|
|
561
|
-
},
|
|
557
|
+
}), le = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
558
|
+
let o = b(), { colors: s } = m(), c = e.data.options || [], l = c.length > 0, u = Array.isArray(t) ? t : [], d = typeof t == "boolean" ? t : !1, f = (e) => {
|
|
559
|
+
n(l ? u.includes(e) ? u.filter((t) => t !== e) : [...u, e] : !d);
|
|
560
|
+
}, p = (e) => l ? u.includes(e) : d;
|
|
562
561
|
return /* @__PURE__ */ E(V, {
|
|
563
562
|
style: G.container,
|
|
564
563
|
children: [
|
|
565
564
|
/* @__PURE__ */ E(R, {
|
|
566
|
-
style: [G.label, { color:
|
|
567
|
-
children: [
|
|
568
|
-
style: { color:
|
|
565
|
+
style: [G.label, { color: s.textSecondary }],
|
|
566
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
567
|
+
style: { color: s.error },
|
|
569
568
|
children: "*"
|
|
570
569
|
})]
|
|
571
570
|
}),
|
|
572
|
-
|
|
573
|
-
let t =
|
|
571
|
+
c.length > 0 ? c.map((e) => {
|
|
572
|
+
let t = o(e.description);
|
|
574
573
|
return /* @__PURE__ */ E(B, {
|
|
575
574
|
style: G.option,
|
|
576
|
-
onPress: () =>
|
|
575
|
+
onPress: () => f(e.value),
|
|
577
576
|
disabled: e.disabled,
|
|
578
577
|
activeOpacity: .7,
|
|
579
578
|
accessible: !0,
|
|
580
579
|
accessibilityRole: "checkbox",
|
|
581
580
|
accessibilityState: {
|
|
582
|
-
checked:
|
|
581
|
+
checked: p(e.value),
|
|
583
582
|
disabled: e.disabled
|
|
584
583
|
},
|
|
585
|
-
accessibilityLabel:
|
|
584
|
+
accessibilityLabel: o(e.label) || e.value,
|
|
586
585
|
children: [/* @__PURE__ */ T(V, {
|
|
587
586
|
style: [
|
|
588
587
|
G.checkbox,
|
|
589
588
|
{
|
|
590
|
-
backgroundColor:
|
|
591
|
-
borderColor:
|
|
589
|
+
backgroundColor: s.input,
|
|
590
|
+
borderColor: s.border
|
|
592
591
|
},
|
|
593
|
-
|
|
594
|
-
backgroundColor:
|
|
595
|
-
borderColor:
|
|
592
|
+
p(e.value) && {
|
|
593
|
+
backgroundColor: s.primary,
|
|
594
|
+
borderColor: s.primary
|
|
596
595
|
}
|
|
597
596
|
],
|
|
598
|
-
children:
|
|
597
|
+
children: p(e.value) && /* @__PURE__ */ T(R, {
|
|
599
598
|
style: G.checkmark,
|
|
600
599
|
children: "✓"
|
|
601
600
|
})
|
|
@@ -604,52 +603,52 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
604
603
|
children: [/* @__PURE__ */ T(R, {
|
|
605
604
|
style: [
|
|
606
605
|
G.optionLabel,
|
|
607
|
-
{ color:
|
|
608
|
-
e.disabled && { color:
|
|
606
|
+
{ color: s.textSecondary },
|
|
607
|
+
e.disabled && { color: s.textMuted }
|
|
609
608
|
],
|
|
610
|
-
children:
|
|
609
|
+
children: o(e.label) || e.value
|
|
611
610
|
}), t && /* @__PURE__ */ T(R, {
|
|
612
|
-
style: [G.optionDescription, { color:
|
|
611
|
+
style: [G.optionDescription, { color: s.textMuted }],
|
|
613
612
|
children: t
|
|
614
613
|
})]
|
|
615
614
|
})]
|
|
616
615
|
}, e.value);
|
|
617
616
|
}) : /* @__PURE__ */ E(B, {
|
|
618
617
|
style: G.option,
|
|
619
|
-
onPress: () =>
|
|
618
|
+
onPress: () => f(""),
|
|
620
619
|
activeOpacity: .7,
|
|
621
620
|
accessible: !0,
|
|
622
621
|
accessibilityRole: "checkbox",
|
|
623
|
-
accessibilityState: { checked:
|
|
624
|
-
accessibilityLabel:
|
|
622
|
+
accessibilityState: { checked: d },
|
|
623
|
+
accessibilityLabel: i || e.data.name,
|
|
625
624
|
children: [/* @__PURE__ */ T(V, {
|
|
626
625
|
style: [
|
|
627
626
|
G.checkbox,
|
|
628
627
|
{
|
|
629
|
-
backgroundColor:
|
|
630
|
-
borderColor:
|
|
628
|
+
backgroundColor: s.input,
|
|
629
|
+
borderColor: s.border
|
|
631
630
|
},
|
|
632
|
-
|
|
633
|
-
backgroundColor:
|
|
634
|
-
borderColor:
|
|
631
|
+
d && {
|
|
632
|
+
backgroundColor: s.primary,
|
|
633
|
+
borderColor: s.primary
|
|
635
634
|
}
|
|
636
635
|
],
|
|
637
|
-
children:
|
|
636
|
+
children: d && /* @__PURE__ */ T(R, {
|
|
638
637
|
style: G.checkmark,
|
|
639
638
|
children: "✓"
|
|
640
639
|
})
|
|
641
640
|
}), /* @__PURE__ */ T(R, {
|
|
642
|
-
style: [G.optionLabel, { color:
|
|
643
|
-
children:
|
|
641
|
+
style: [G.optionLabel, { color: s.textSecondary }],
|
|
642
|
+
children: i || e.data.name
|
|
644
643
|
})]
|
|
645
644
|
}),
|
|
646
|
-
|
|
647
|
-
style: [G.error, { color:
|
|
648
|
-
children:
|
|
645
|
+
r && /* @__PURE__ */ T(R, {
|
|
646
|
+
style: [G.error, { color: s.error }],
|
|
647
|
+
children: r
|
|
649
648
|
}),
|
|
650
|
-
|
|
651
|
-
style: [G.helperText, { color:
|
|
652
|
-
children:
|
|
649
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
650
|
+
style: [G.helperText, { color: s.textMuted }],
|
|
651
|
+
children: a
|
|
653
652
|
})
|
|
654
653
|
]
|
|
655
654
|
});
|
|
@@ -693,15 +692,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
693
692
|
},
|
|
694
693
|
optionLabel: { fontSize: 14 },
|
|
695
694
|
optionTextContainer: { flex: 1 }
|
|
696
|
-
}), ue = ({ node:
|
|
697
|
-
let [
|
|
698
|
-
let e =
|
|
695
|
+
}), ue = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
696
|
+
let [s, c] = A(!1), l = b(), { colors: u } = m(), d = t ? new Date(t) : void 0, { year: f, month: p, today: h } = O(() => {
|
|
697
|
+
let e = d || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
699
698
|
return r.setHours(0, 0, 0, 0), {
|
|
700
699
|
month: n,
|
|
701
700
|
today: r,
|
|
702
701
|
year: t
|
|
703
702
|
};
|
|
704
|
-
}, [
|
|
703
|
+
}, [d]), [g, _] = A(f), [v, y] = A(p), x = [
|
|
705
704
|
"January",
|
|
706
705
|
"February",
|
|
707
706
|
"March",
|
|
@@ -715,42 +714,42 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
715
714
|
"November",
|
|
716
715
|
"December"
|
|
717
716
|
], S = O(() => {
|
|
718
|
-
let e = new Date(
|
|
717
|
+
let e = new Date(g, v, 1).getDay(), t = new Date(g, v + 1, 0).getDate(), n = new Date(g, v, 0).getDate(), r = [];
|
|
719
718
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
720
|
-
date: new Date(
|
|
719
|
+
date: new Date(g, v - 1, n - t),
|
|
721
720
|
day: n - t,
|
|
722
721
|
isCurrentMonth: !1
|
|
723
722
|
});
|
|
724
723
|
for (let e = 1; e <= t; e++) r.push({
|
|
725
|
-
date: new Date(
|
|
724
|
+
date: new Date(g, v, e),
|
|
726
725
|
day: e,
|
|
727
726
|
isCurrentMonth: !0
|
|
728
727
|
});
|
|
729
728
|
let i = 42 - r.length;
|
|
730
729
|
for (let e = 1; e <= i; e++) r.push({
|
|
731
|
-
date: new Date(
|
|
730
|
+
date: new Date(g, v + 1, e),
|
|
732
731
|
day: e,
|
|
733
732
|
isCurrentMonth: !1
|
|
734
733
|
});
|
|
735
734
|
return r;
|
|
736
|
-
}, [
|
|
737
|
-
|
|
735
|
+
}, [g, v]), C = ee((t) => {
|
|
736
|
+
e.data.disablePast && t < h || (n(t.toISOString()), c(!1));
|
|
738
737
|
}, [
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
738
|
+
e.data.disablePast,
|
|
739
|
+
h,
|
|
740
|
+
n
|
|
742
741
|
]), w = () => {
|
|
743
|
-
|
|
742
|
+
v === 0 ? (y(11), _(g - 1)) : y(v - 1);
|
|
744
743
|
}, D = () => {
|
|
745
|
-
|
|
746
|
-
}, k = () =>
|
|
744
|
+
v === 11 ? (y(0), _(g + 1)) : y(v + 1);
|
|
745
|
+
}, k = () => d ? d.toLocaleDateString() : a || l("renderer.defaultInputs.selectDate"), j = (t) => e.data.disablePast ? t < h : !1, M = (e) => d ? e.getDate() === d.getDate() && e.getMonth() === d.getMonth() && e.getFullYear() === d.getFullYear() : !1;
|
|
747
746
|
return /* @__PURE__ */ E(V, {
|
|
748
747
|
style: K.container,
|
|
749
748
|
children: [
|
|
750
749
|
/* @__PURE__ */ E(R, {
|
|
751
|
-
style: [K.label, { color:
|
|
752
|
-
children: [
|
|
753
|
-
style: { color:
|
|
750
|
+
style: [K.label, { color: u.textSecondary }],
|
|
751
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
752
|
+
style: { color: u.error },
|
|
754
753
|
children: "*"
|
|
755
754
|
})]
|
|
756
755
|
}),
|
|
@@ -758,18 +757,18 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
758
757
|
style: [
|
|
759
758
|
K.trigger,
|
|
760
759
|
{
|
|
761
|
-
backgroundColor:
|
|
762
|
-
borderColor:
|
|
760
|
+
backgroundColor: u.input,
|
|
761
|
+
borderColor: u.border
|
|
763
762
|
},
|
|
764
|
-
|
|
763
|
+
r && { borderColor: u.error }
|
|
765
764
|
],
|
|
766
|
-
onPress: () =>
|
|
765
|
+
onPress: () => c(!0),
|
|
767
766
|
activeOpacity: .7,
|
|
768
767
|
children: [/* @__PURE__ */ T(R, {
|
|
769
768
|
style: [
|
|
770
769
|
K.triggerText,
|
|
771
|
-
{ color:
|
|
772
|
-
!
|
|
770
|
+
{ color: u.text },
|
|
771
|
+
!t && { color: u.textMuted }
|
|
773
772
|
],
|
|
774
773
|
numberOfLines: 1,
|
|
775
774
|
children: k()
|
|
@@ -779,28 +778,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
779
778
|
})]
|
|
780
779
|
}),
|
|
781
780
|
/* @__PURE__ */ T(F, {
|
|
782
|
-
visible:
|
|
781
|
+
visible: s,
|
|
783
782
|
transparent: !0,
|
|
784
783
|
animationType: "fade",
|
|
785
|
-
onRequestClose: () =>
|
|
784
|
+
onRequestClose: () => c(!1),
|
|
786
785
|
children: /* @__PURE__ */ T(B, {
|
|
787
786
|
style: K.modalOverlay,
|
|
788
787
|
activeOpacity: 1,
|
|
789
|
-
onPress: () =>
|
|
788
|
+
onPress: () => c(!1),
|
|
790
789
|
children: /* @__PURE__ */ E(B, {
|
|
791
|
-
style: [K.modalContent, { backgroundColor:
|
|
790
|
+
style: [K.modalContent, { backgroundColor: u.card }],
|
|
792
791
|
activeOpacity: 1,
|
|
793
792
|
onPress: () => {},
|
|
794
793
|
children: [
|
|
795
794
|
/* @__PURE__ */ E(V, {
|
|
796
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
795
|
+
style: [K.modalHeader, { borderBottomColor: u.separator }],
|
|
797
796
|
children: [/* @__PURE__ */ T(R, {
|
|
798
|
-
style: [K.modalTitle, { color:
|
|
799
|
-
children:
|
|
797
|
+
style: [K.modalTitle, { color: u.text }],
|
|
798
|
+
children: i || e.data.name
|
|
800
799
|
}), /* @__PURE__ */ T(B, {
|
|
801
|
-
onPress: () =>
|
|
800
|
+
onPress: () => c(!1),
|
|
802
801
|
children: /* @__PURE__ */ T(R, {
|
|
803
|
-
style: [K.closeButton, { color:
|
|
802
|
+
style: [K.closeButton, { color: u.textMuted }],
|
|
804
803
|
children: "✕"
|
|
805
804
|
})
|
|
806
805
|
})]
|
|
@@ -812,23 +811,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
812
811
|
onPress: w,
|
|
813
812
|
style: K.navButton,
|
|
814
813
|
children: /* @__PURE__ */ T(R, {
|
|
815
|
-
style: [K.navButtonText, { color:
|
|
814
|
+
style: [K.navButtonText, { color: u.primary }],
|
|
816
815
|
children: "‹"
|
|
817
816
|
})
|
|
818
817
|
}),
|
|
819
818
|
/* @__PURE__ */ E(R, {
|
|
820
|
-
style: [K.monthYear, { color:
|
|
819
|
+
style: [K.monthYear, { color: u.text }],
|
|
821
820
|
children: [
|
|
822
|
-
x[
|
|
821
|
+
x[v],
|
|
823
822
|
" ",
|
|
824
|
-
|
|
823
|
+
g
|
|
825
824
|
]
|
|
826
825
|
}),
|
|
827
826
|
/* @__PURE__ */ T(B, {
|
|
828
827
|
onPress: D,
|
|
829
828
|
style: K.navButton,
|
|
830
829
|
children: /* @__PURE__ */ T(R, {
|
|
831
|
-
style: [K.navButtonText, { color:
|
|
830
|
+
style: [K.navButtonText, { color: u.primary }],
|
|
832
831
|
children: "›"
|
|
833
832
|
})
|
|
834
833
|
})
|
|
@@ -845,7 +844,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
845
844
|
"Fri",
|
|
846
845
|
"Sat"
|
|
847
846
|
].map((e) => /* @__PURE__ */ T(R, {
|
|
848
|
-
style: [K.weekDay, { color:
|
|
847
|
+
style: [K.weekDay, { color: u.textMuted }],
|
|
849
848
|
children: e
|
|
850
849
|
}, e))
|
|
851
850
|
}),
|
|
@@ -863,7 +862,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
863
862
|
K.dayCell,
|
|
864
863
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
865
864
|
n && {
|
|
866
|
-
backgroundColor:
|
|
865
|
+
backgroundColor: u.primary,
|
|
867
866
|
borderRadius: 20
|
|
868
867
|
},
|
|
869
868
|
t && K.dayCellDisabled
|
|
@@ -874,13 +873,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
874
873
|
children: /* @__PURE__ */ T(R, {
|
|
875
874
|
style: [
|
|
876
875
|
K.dayText,
|
|
877
|
-
{ color:
|
|
878
|
-
!e.isCurrentMonth && { color:
|
|
876
|
+
{ color: u.text },
|
|
877
|
+
!e.isCurrentMonth && { color: u.textMuted },
|
|
879
878
|
n && {
|
|
880
|
-
color:
|
|
879
|
+
color: u.background,
|
|
881
880
|
fontWeight: "600"
|
|
882
881
|
},
|
|
883
|
-
t && { color:
|
|
882
|
+
t && { color: u.textMuted }
|
|
884
883
|
],
|
|
885
884
|
children: e.day
|
|
886
885
|
})
|
|
@@ -891,13 +890,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
891
890
|
})
|
|
892
891
|
})
|
|
893
892
|
}),
|
|
894
|
-
|
|
895
|
-
style: [K.error, { color:
|
|
896
|
-
children:
|
|
893
|
+
r && /* @__PURE__ */ T(R, {
|
|
894
|
+
style: [K.error, { color: u.error }],
|
|
895
|
+
children: r
|
|
897
896
|
}),
|
|
898
|
-
|
|
899
|
-
style: [K.helperText, { color:
|
|
900
|
-
children:
|
|
897
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
898
|
+
style: [K.helperText, { color: u.textMuted }],
|
|
899
|
+
children: o
|
|
901
900
|
})
|
|
902
901
|
]
|
|
903
902
|
});
|
|
@@ -1001,15 +1000,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1001
1000
|
flexDirection: "row",
|
|
1002
1001
|
marginBottom: 8
|
|
1003
1002
|
}
|
|
1004
|
-
}), de = ({ node:
|
|
1005
|
-
let [
|
|
1006
|
-
let e =
|
|
1003
|
+
}), de = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
1004
|
+
let [o, s] = A(!1), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : [], p = f[0] ? new Date(f[0]) : void 0, h = f[1] ? new Date(f[1]) : void 0, { year: g, month: _, today: v } = O(() => {
|
|
1005
|
+
let e = p || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1007
1006
|
return r.setHours(0, 0, 0, 0), {
|
|
1008
1007
|
month: n,
|
|
1009
1008
|
today: r,
|
|
1010
1009
|
year: t
|
|
1011
1010
|
};
|
|
1012
|
-
}, [
|
|
1011
|
+
}, [p]), [y, x] = A(g), [S, C] = A(_), w = [
|
|
1013
1012
|
"January",
|
|
1014
1013
|
"February",
|
|
1015
1014
|
"March",
|
|
@@ -1023,49 +1022,49 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1023
1022
|
"November",
|
|
1024
1023
|
"December"
|
|
1025
1024
|
], D = O(() => {
|
|
1026
|
-
let e = new Date(
|
|
1025
|
+
let e = new Date(y, S, 1).getDay(), t = new Date(y, S + 1, 0).getDate(), n = new Date(y, S, 0).getDate(), r = [];
|
|
1027
1026
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1028
|
-
date: new Date(
|
|
1027
|
+
date: new Date(y, S - 1, n - t),
|
|
1029
1028
|
day: n - t,
|
|
1030
1029
|
isCurrentMonth: !1
|
|
1031
1030
|
});
|
|
1032
1031
|
for (let e = 1; e <= t; e++) r.push({
|
|
1033
|
-
date: new Date(
|
|
1032
|
+
date: new Date(y, S, e),
|
|
1034
1033
|
day: e,
|
|
1035
1034
|
isCurrentMonth: !0
|
|
1036
1035
|
});
|
|
1037
1036
|
let i = 42 - r.length;
|
|
1038
1037
|
for (let e = 1; e <= i; e++) r.push({
|
|
1039
|
-
date: new Date(
|
|
1038
|
+
date: new Date(y, S + 1, e),
|
|
1040
1039
|
day: e,
|
|
1041
1040
|
isCurrentMonth: !1
|
|
1042
1041
|
});
|
|
1043
1042
|
return r;
|
|
1044
|
-
}, [
|
|
1045
|
-
|
|
1043
|
+
}, [y, S]), k = ee((t) => {
|
|
1044
|
+
e.data.disablePast && t < v || (c ? (n([t.toISOString(), h?.toISOString()]), l(!1)) : (n(p && t < p ? [t.toISOString(), p.toISOString()] : [p?.toISOString(), t.toISOString()]), s(!1), l(!0)));
|
|
1046
1045
|
}, [
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1046
|
+
e.data.disablePast,
|
|
1047
|
+
v,
|
|
1048
|
+
c,
|
|
1049
|
+
p,
|
|
1050
|
+
h,
|
|
1051
|
+
n
|
|
1053
1052
|
]), j = () => {
|
|
1054
|
-
S === 0 ? (C(11), x(
|
|
1053
|
+
S === 0 ? (C(11), x(y - 1)) : C(S - 1);
|
|
1055
1054
|
}, M = () => {
|
|
1056
|
-
S === 11 ? (C(0), x(
|
|
1057
|
-
}, P = () =>
|
|
1058
|
-
if (!(
|
|
1059
|
-
let t =
|
|
1055
|
+
S === 11 ? (C(0), x(y + 1)) : C(S + 1);
|
|
1056
|
+
}, P = () => p && h ? `${p.toLocaleDateString()} - ${h.toLocaleDateString()}` : p ? p.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), I = (t) => e.data.disablePast ? t < v : !1, L = (e) => p && h ? e >= p && e <= h : !1, te = (e) => {
|
|
1057
|
+
if (!(p || h)) return !1;
|
|
1058
|
+
let t = p && e.getDate() === p.getDate() && e.getMonth() === p.getMonth() && e.getFullYear() === p.getFullYear(), n = h && e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear();
|
|
1060
1059
|
return t || n;
|
|
1061
1060
|
};
|
|
1062
1061
|
return /* @__PURE__ */ E(V, {
|
|
1063
1062
|
style: q.container,
|
|
1064
1063
|
children: [
|
|
1065
1064
|
/* @__PURE__ */ E(R, {
|
|
1066
|
-
style: [q.label, { color:
|
|
1067
|
-
children: [
|
|
1068
|
-
style: { color:
|
|
1065
|
+
style: [q.label, { color: d.textSecondary }],
|
|
1066
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1067
|
+
style: { color: d.error },
|
|
1069
1068
|
children: "*"
|
|
1070
1069
|
})]
|
|
1071
1070
|
}),
|
|
@@ -1073,18 +1072,18 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1073
1072
|
style: [
|
|
1074
1073
|
q.trigger,
|
|
1075
1074
|
{
|
|
1076
|
-
backgroundColor:
|
|
1077
|
-
borderColor:
|
|
1075
|
+
backgroundColor: d.input,
|
|
1076
|
+
borderColor: d.border
|
|
1078
1077
|
},
|
|
1079
|
-
|
|
1078
|
+
r && { borderColor: d.error }
|
|
1080
1079
|
],
|
|
1081
|
-
onPress: () =>
|
|
1080
|
+
onPress: () => s(!0),
|
|
1082
1081
|
activeOpacity: .7,
|
|
1083
1082
|
children: [/* @__PURE__ */ T(R, {
|
|
1084
1083
|
style: [
|
|
1085
1084
|
q.triggerText,
|
|
1086
|
-
{ color:
|
|
1087
|
-
!
|
|
1085
|
+
{ color: d.text },
|
|
1086
|
+
!p && { color: d.textMuted }
|
|
1088
1087
|
],
|
|
1089
1088
|
numberOfLines: 1,
|
|
1090
1089
|
children: P()
|
|
@@ -1094,37 +1093,37 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1094
1093
|
})]
|
|
1095
1094
|
}),
|
|
1096
1095
|
/* @__PURE__ */ T(F, {
|
|
1097
|
-
visible:
|
|
1096
|
+
visible: o,
|
|
1098
1097
|
transparent: !0,
|
|
1099
1098
|
animationType: "fade",
|
|
1100
|
-
onRequestClose: () =>
|
|
1099
|
+
onRequestClose: () => s(!1),
|
|
1101
1100
|
children: /* @__PURE__ */ T(B, {
|
|
1102
1101
|
style: q.modalOverlay,
|
|
1103
1102
|
activeOpacity: 1,
|
|
1104
|
-
onPress: () =>
|
|
1103
|
+
onPress: () => s(!1),
|
|
1105
1104
|
children: /* @__PURE__ */ E(B, {
|
|
1106
|
-
style: [q.modalContent, { backgroundColor:
|
|
1105
|
+
style: [q.modalContent, { backgroundColor: d.card }],
|
|
1107
1106
|
activeOpacity: 1,
|
|
1108
1107
|
onPress: () => {},
|
|
1109
1108
|
children: [
|
|
1110
1109
|
/* @__PURE__ */ E(V, {
|
|
1111
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1110
|
+
style: [q.modalHeader, { borderBottomColor: d.separator }],
|
|
1112
1111
|
children: [/* @__PURE__ */ T(R, {
|
|
1113
|
-
style: [q.modalTitle, { color:
|
|
1114
|
-
children:
|
|
1112
|
+
style: [q.modalTitle, { color: d.text }],
|
|
1113
|
+
children: i || e.data.name
|
|
1115
1114
|
}), /* @__PURE__ */ T(B, {
|
|
1116
|
-
onPress: () =>
|
|
1115
|
+
onPress: () => s(!1),
|
|
1117
1116
|
children: /* @__PURE__ */ T(R, {
|
|
1118
|
-
style: [q.closeButton, { color:
|
|
1117
|
+
style: [q.closeButton, { color: d.textMuted }],
|
|
1119
1118
|
children: "✕"
|
|
1120
1119
|
})
|
|
1121
1120
|
})]
|
|
1122
1121
|
}),
|
|
1123
1122
|
/* @__PURE__ */ T(V, {
|
|
1124
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1123
|
+
style: [q.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
1125
1124
|
children: /* @__PURE__ */ T(R, {
|
|
1126
|
-
style: [q.rangeIndicatorText, { color:
|
|
1127
|
-
children:
|
|
1125
|
+
style: [q.rangeIndicatorText, { color: d.primary }],
|
|
1126
|
+
children: u(c ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1128
1127
|
})
|
|
1129
1128
|
}),
|
|
1130
1129
|
/* @__PURE__ */ E(V, {
|
|
@@ -1134,23 +1133,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1134
1133
|
onPress: j,
|
|
1135
1134
|
style: q.navButton,
|
|
1136
1135
|
children: /* @__PURE__ */ T(R, {
|
|
1137
|
-
style: [q.navButtonText, { color:
|
|
1136
|
+
style: [q.navButtonText, { color: d.primary }],
|
|
1138
1137
|
children: "‹"
|
|
1139
1138
|
})
|
|
1140
1139
|
}),
|
|
1141
1140
|
/* @__PURE__ */ E(R, {
|
|
1142
|
-
style: [q.monthYear, { color:
|
|
1141
|
+
style: [q.monthYear, { color: d.text }],
|
|
1143
1142
|
children: [
|
|
1144
1143
|
w[S],
|
|
1145
1144
|
" ",
|
|
1146
|
-
|
|
1145
|
+
y
|
|
1147
1146
|
]
|
|
1148
1147
|
}),
|
|
1149
1148
|
/* @__PURE__ */ T(B, {
|
|
1150
1149
|
onPress: M,
|
|
1151
1150
|
style: q.navButton,
|
|
1152
1151
|
children: /* @__PURE__ */ T(R, {
|
|
1153
|
-
style: [q.navButtonText, { color:
|
|
1152
|
+
style: [q.navButtonText, { color: d.primary }],
|
|
1154
1153
|
children: "›"
|
|
1155
1154
|
})
|
|
1156
1155
|
})
|
|
@@ -1167,7 +1166,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1167
1166
|
"Fri",
|
|
1168
1167
|
"Sat"
|
|
1169
1168
|
].map((e) => /* @__PURE__ */ T(R, {
|
|
1170
|
-
style: [q.weekDay, { color:
|
|
1169
|
+
style: [q.weekDay, { color: d.textMuted }],
|
|
1171
1170
|
children: e
|
|
1172
1171
|
}, e))
|
|
1173
1172
|
}),
|
|
@@ -1184,9 +1183,9 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1184
1183
|
style: [
|
|
1185
1184
|
q.dayCell,
|
|
1186
1185
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1187
|
-
n && { backgroundColor:
|
|
1186
|
+
n && { backgroundColor: d.primaryLight },
|
|
1188
1187
|
r && {
|
|
1189
|
-
backgroundColor:
|
|
1188
|
+
backgroundColor: d.primary,
|
|
1190
1189
|
borderRadius: 20
|
|
1191
1190
|
},
|
|
1192
1191
|
t && q.dayCellDisabled
|
|
@@ -1197,14 +1196,14 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1197
1196
|
children: /* @__PURE__ */ T(R, {
|
|
1198
1197
|
style: [
|
|
1199
1198
|
q.dayText,
|
|
1200
|
-
{ color:
|
|
1201
|
-
!e.isCurrentMonth && { color:
|
|
1202
|
-
n && { color:
|
|
1199
|
+
{ color: d.text },
|
|
1200
|
+
!e.isCurrentMonth && { color: d.textMuted },
|
|
1201
|
+
n && { color: d.primary },
|
|
1203
1202
|
r && {
|
|
1204
|
-
color:
|
|
1203
|
+
color: d.background,
|
|
1205
1204
|
fontWeight: "600"
|
|
1206
1205
|
},
|
|
1207
|
-
t && { color:
|
|
1206
|
+
t && { color: d.textMuted }
|
|
1208
1207
|
],
|
|
1209
1208
|
children: e.day
|
|
1210
1209
|
})
|
|
@@ -1215,13 +1214,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1215
1214
|
})
|
|
1216
1215
|
})
|
|
1217
1216
|
}),
|
|
1218
|
-
|
|
1219
|
-
style: [q.error, { color:
|
|
1220
|
-
children:
|
|
1217
|
+
r && /* @__PURE__ */ T(R, {
|
|
1218
|
+
style: [q.error, { color: d.error }],
|
|
1219
|
+
children: r
|
|
1221
1220
|
}),
|
|
1222
|
-
|
|
1223
|
-
style: [q.helperText, { color:
|
|
1224
|
-
children:
|
|
1221
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
1222
|
+
style: [q.helperText, { color: d.textMuted }],
|
|
1223
|
+
children: a
|
|
1225
1224
|
})
|
|
1226
1225
|
]
|
|
1227
1226
|
});
|
|
@@ -1335,61 +1334,61 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1335
1334
|
flexDirection: "row",
|
|
1336
1335
|
marginBottom: 8
|
|
1337
1336
|
}
|
|
1338
|
-
}), fe = ({ node:
|
|
1339
|
-
let [
|
|
1340
|
-
if (
|
|
1341
|
-
let e = (await
|
|
1337
|
+
}), fe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
1338
|
+
let [o, s] = A(null), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : t ? [t] : [], p = e.data.multiple, h = ee(async () => {
|
|
1339
|
+
if (o) try {
|
|
1340
|
+
let e = (await o({ allowMultiSelection: p })).map((e) => ({
|
|
1342
1341
|
data: e.uri,
|
|
1343
1342
|
lastModified: Date.now(),
|
|
1344
1343
|
name: e.name,
|
|
1345
1344
|
size: e.size,
|
|
1346
1345
|
type: e.type || "application/octet-stream"
|
|
1347
1346
|
}));
|
|
1348
|
-
|
|
1347
|
+
n(p ? [...f, ...e] : e[0] || null);
|
|
1349
1348
|
} catch (e) {
|
|
1350
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" && M.alert("Error",
|
|
1349
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && M.alert("Error", u("renderer.defaultInputs.filePickerError"));
|
|
1351
1350
|
}
|
|
1352
1351
|
}, [
|
|
1353
|
-
|
|
1352
|
+
o,
|
|
1353
|
+
f,
|
|
1354
1354
|
p,
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
}, [p, r]), v = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1355
|
+
n,
|
|
1356
|
+
u
|
|
1357
|
+
]), g = ee((e) => {
|
|
1358
|
+
let t = f.filter((t, n) => n !== e);
|
|
1359
|
+
n(t.length > 0 ? t : null);
|
|
1360
|
+
}, [f, n]), _ = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1362
1361
|
return D(() => {
|
|
1363
1362
|
(async () => {
|
|
1364
1363
|
try {
|
|
1365
1364
|
let { pick: e } = await import("react-native-document-picker");
|
|
1366
|
-
|
|
1365
|
+
s(() => e);
|
|
1367
1366
|
} catch {
|
|
1368
|
-
|
|
1367
|
+
s(null);
|
|
1369
1368
|
} finally {
|
|
1370
|
-
|
|
1369
|
+
l(!1);
|
|
1371
1370
|
}
|
|
1372
1371
|
})();
|
|
1373
|
-
}, []),
|
|
1372
|
+
}, []), c ? null : o ? /* @__PURE__ */ E(V, {
|
|
1374
1373
|
style: J.container,
|
|
1375
1374
|
children: [
|
|
1376
1375
|
/* @__PURE__ */ E(R, {
|
|
1377
|
-
style: [J.label, { color:
|
|
1378
|
-
children: [
|
|
1379
|
-
style: { color:
|
|
1376
|
+
style: [J.label, { color: d.textSecondary }],
|
|
1377
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1378
|
+
style: { color: d.error },
|
|
1380
1379
|
children: "*"
|
|
1381
1380
|
})]
|
|
1382
1381
|
}),
|
|
1383
|
-
|
|
1382
|
+
f.length > 0 && /* @__PURE__ */ T(V, {
|
|
1384
1383
|
style: J.filesList,
|
|
1385
|
-
children:
|
|
1384
|
+
children: f.map((e, t) => /* @__PURE__ */ E(V, {
|
|
1386
1385
|
style: [J.fileItem, {
|
|
1387
|
-
backgroundColor:
|
|
1388
|
-
borderColor:
|
|
1386
|
+
backgroundColor: d.card,
|
|
1387
|
+
borderColor: d.separator
|
|
1389
1388
|
}],
|
|
1390
1389
|
children: [
|
|
1391
1390
|
/* @__PURE__ */ T(V, {
|
|
1392
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1391
|
+
style: [J.fileIcon, { backgroundColor: d.muted }],
|
|
1393
1392
|
children: /* @__PURE__ */ T(R, {
|
|
1394
1393
|
style: J.fileIconText,
|
|
1395
1394
|
children: "📄"
|
|
@@ -1398,20 +1397,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1398
1397
|
/* @__PURE__ */ E(V, {
|
|
1399
1398
|
style: J.fileInfo,
|
|
1400
1399
|
children: [/* @__PURE__ */ T(R, {
|
|
1401
|
-
style: [J.fileName, { color:
|
|
1400
|
+
style: [J.fileName, { color: d.text }],
|
|
1402
1401
|
numberOfLines: 1,
|
|
1403
1402
|
children: e.name
|
|
1404
1403
|
}), e.size > 0 && /* @__PURE__ */ T(R, {
|
|
1405
|
-
style: [J.fileSize, { color:
|
|
1406
|
-
children:
|
|
1404
|
+
style: [J.fileSize, { color: d.textMuted }],
|
|
1405
|
+
children: _(e.size)
|
|
1407
1406
|
})]
|
|
1408
1407
|
}),
|
|
1409
1408
|
/* @__PURE__ */ T(B, {
|
|
1410
1409
|
style: J.removeButton,
|
|
1411
|
-
onPress: () =>
|
|
1410
|
+
onPress: () => g(t),
|
|
1412
1411
|
activeOpacity: .7,
|
|
1413
1412
|
children: /* @__PURE__ */ T(R, {
|
|
1414
|
-
style: [J.removeButtonText, { color:
|
|
1413
|
+
style: [J.removeButtonText, { color: d.textMuted }],
|
|
1415
1414
|
children: "✕"
|
|
1416
1415
|
})
|
|
1417
1416
|
})
|
|
@@ -1420,48 +1419,48 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1420
1419
|
}),
|
|
1421
1420
|
/* @__PURE__ */ T(B, {
|
|
1422
1421
|
style: [J.pickButton, {
|
|
1423
|
-
backgroundColor:
|
|
1424
|
-
borderColor:
|
|
1422
|
+
backgroundColor: d.input,
|
|
1423
|
+
borderColor: d.border
|
|
1425
1424
|
}],
|
|
1426
|
-
onPress:
|
|
1425
|
+
onPress: h,
|
|
1427
1426
|
activeOpacity: .7,
|
|
1428
1427
|
children: /* @__PURE__ */ T(R, {
|
|
1429
|
-
style: [J.pickButtonText, { color:
|
|
1430
|
-
children:
|
|
1428
|
+
style: [J.pickButtonText, { color: d.textMuted }],
|
|
1429
|
+
children: f.length === 0 ? u(p ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(p ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1431
1430
|
})
|
|
1432
1431
|
}),
|
|
1433
|
-
|
|
1434
|
-
style: [J.error, { color:
|
|
1435
|
-
children:
|
|
1432
|
+
r && /* @__PURE__ */ T(R, {
|
|
1433
|
+
style: [J.error, { color: d.error }],
|
|
1434
|
+
children: r
|
|
1436
1435
|
}),
|
|
1437
|
-
|
|
1438
|
-
style: [J.helperText, { color:
|
|
1439
|
-
children:
|
|
1436
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
1437
|
+
style: [J.helperText, { color: d.textMuted }],
|
|
1438
|
+
children: a
|
|
1440
1439
|
})
|
|
1441
1440
|
]
|
|
1442
1441
|
}) : /* @__PURE__ */ E(V, {
|
|
1443
1442
|
style: J.container,
|
|
1444
1443
|
children: [
|
|
1445
1444
|
/* @__PURE__ */ E(R, {
|
|
1446
|
-
style: [J.label, { color:
|
|
1447
|
-
children: [
|
|
1448
|
-
style: { color:
|
|
1445
|
+
style: [J.label, { color: d.textSecondary }],
|
|
1446
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1447
|
+
style: { color: d.error },
|
|
1449
1448
|
children: "*"
|
|
1450
1449
|
})]
|
|
1451
1450
|
}),
|
|
1452
1451
|
/* @__PURE__ */ T(V, {
|
|
1453
1452
|
style: [J.unavailableContainer, {
|
|
1454
|
-
backgroundColor:
|
|
1455
|
-
borderColor:
|
|
1453
|
+
backgroundColor: d.errorLight,
|
|
1454
|
+
borderColor: d.error
|
|
1456
1455
|
}],
|
|
1457
1456
|
children: /* @__PURE__ */ T(R, {
|
|
1458
|
-
style: [J.unavailableText, { color:
|
|
1459
|
-
children:
|
|
1457
|
+
style: [J.unavailableText, { color: d.error }],
|
|
1458
|
+
children: u("renderer.defaultInputs.filePickerUnavailable")
|
|
1460
1459
|
})
|
|
1461
1460
|
}),
|
|
1462
|
-
|
|
1463
|
-
style: [J.helperText, { color:
|
|
1464
|
-
children:
|
|
1461
|
+
a && /* @__PURE__ */ T(R, {
|
|
1462
|
+
style: [J.helperText, { color: d.textMuted }],
|
|
1463
|
+
children: a
|
|
1465
1464
|
})
|
|
1466
1465
|
]
|
|
1467
1466
|
});
|
|
@@ -1564,8 +1563,8 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1564
1563
|
}), Se = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1565
1564
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1566
1565
|
return n ? encodeURIComponent(a) : a;
|
|
1567
|
-
}), Ce = ({ node:
|
|
1568
|
-
let [
|
|
1566
|
+
}), Ce = ({ node: e, value: t, setValue: n, error: r, label: a, placeholder: o, helperText: s, id: c, name: l }) => {
|
|
1567
|
+
let [u, d] = A(!1), [f, h] = A(null), [g, _] = A([]), [v, y] = A(""), [x, C] = A(!1), { formValues: w, inputNodes: M } = p(), P = b(), { colors: I } = m(), { httpConfig: L } = e.data, te = k(!1), ne = k(""), re = k(L), ie = k(w), ae = k(M), oe = k(n), se = k(null), H = k(null), U = O(() => L?.url ? be(L.url) : [], [L?.url]), ce = U.length > 0, W = O(() => U.map((e) => `${e}:${String(w[e] ?? "")}`).join("|"), [U, w]), le = O(() => L?.url ? ce ? xe(L.url, w) : !0 : !1, [
|
|
1569
1568
|
L?.url,
|
|
1570
1569
|
ce,
|
|
1571
1570
|
w
|
|
@@ -1573,18 +1572,18 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1573
1572
|
H.current && H.current.abort();
|
|
1574
1573
|
let t = new AbortController();
|
|
1575
1574
|
H.current = t;
|
|
1576
|
-
let n = re.current, r = ie.current,
|
|
1575
|
+
let n = re.current, r = ie.current, a = oe.current;
|
|
1577
1576
|
if (!n?.url) {
|
|
1578
|
-
|
|
1577
|
+
h(P("renderer.defaultHttpInput.noUrlConfigured")), H.current = null;
|
|
1579
1578
|
return;
|
|
1580
1579
|
}
|
|
1581
1580
|
if (n.url && !xe(n.url, r)) {
|
|
1582
1581
|
H.current = null;
|
|
1583
1582
|
return;
|
|
1584
1583
|
}
|
|
1585
|
-
|
|
1584
|
+
d(!0), h(null);
|
|
1586
1585
|
try {
|
|
1587
|
-
let
|
|
1586
|
+
let o = Se(n.url, r, !0), s = n.searchParam && e ? `${o}${o.includes("?") ? "&" : "?"}${n.searchParam}=${encodeURIComponent(e)}` : o, c = {};
|
|
1588
1587
|
n.headers?.forEach((e) => {
|
|
1589
1588
|
c[e.key] = Se(e.value, r);
|
|
1590
1589
|
});
|
|
@@ -1592,7 +1591,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1592
1591
|
"POST",
|
|
1593
1592
|
"PUT",
|
|
1594
1593
|
"PATCH"
|
|
1595
|
-
].includes(n.method || "") ? n.sendAllFormValues ? JSON.stringify(
|
|
1594
|
+
].includes(n.method || "") ? n.sendAllFormValues ? JSON.stringify(i(r, ae.current)) : n.body ? Se(n.body, r) : void 0 : void 0, u = setTimeout(() => t.abort(), 3e4), f = await fetch(s, {
|
|
1596
1595
|
body: l || void 0,
|
|
1597
1596
|
headers: {
|
|
1598
1597
|
"Content-Type": "application/json",
|
|
@@ -1601,32 +1600,32 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1601
1600
|
method: n.method || "GET",
|
|
1602
1601
|
signal: t.signal
|
|
1603
1602
|
});
|
|
1604
|
-
if (clearTimeout(u), !
|
|
1605
|
-
|
|
1603
|
+
if (clearTimeout(u), !f.ok) {
|
|
1604
|
+
h(`HTTP Error ${f.status}: ${f.statusText}`), d(!1);
|
|
1606
1605
|
return;
|
|
1607
1606
|
}
|
|
1608
|
-
let
|
|
1609
|
-
if (n.responseMapping && Array.isArray(
|
|
1607
|
+
let p = ve(await f.json()), m = n.responsePath ? ye(p, n.responsePath) : p;
|
|
1608
|
+
if (n.responseMapping && Array.isArray(m)) {
|
|
1610
1609
|
let { valueField: e = "value", labelField: t = "label" } = n.responseMapping;
|
|
1611
|
-
|
|
1610
|
+
_(m.map((n) => ({
|
|
1612
1611
|
label: String(ye(n, t) || ""),
|
|
1613
1612
|
value: String(ye(n, e) || "")
|
|
1614
1613
|
})));
|
|
1615
|
-
} else
|
|
1614
|
+
} else a(typeof m == "string" ? m : JSON.stringify(m));
|
|
1616
1615
|
} catch (e) {
|
|
1617
1616
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1618
|
-
|
|
1617
|
+
h(e instanceof Error ? e.message : P("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1619
1618
|
} finally {
|
|
1620
|
-
|
|
1619
|
+
d(!1), H.current = null;
|
|
1621
1620
|
}
|
|
1622
1621
|
}, [P]);
|
|
1623
1622
|
if (D(() => {
|
|
1624
|
-
re.current = L, ie.current = w, ae.current = M, oe.current =
|
|
1623
|
+
re.current = L, ie.current = w, ae.current = M, oe.current = n, se.current = G;
|
|
1625
1624
|
}, [
|
|
1626
1625
|
L,
|
|
1627
1626
|
w,
|
|
1628
1627
|
M,
|
|
1629
|
-
|
|
1628
|
+
n,
|
|
1630
1629
|
G
|
|
1631
1630
|
]), D(() => () => {
|
|
1632
1631
|
H.current && H.current.abort();
|
|
@@ -1647,25 +1646,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1647
1646
|
le,
|
|
1648
1647
|
G
|
|
1649
1648
|
]), D(() => {
|
|
1650
|
-
if (!(L?.searchParam &&
|
|
1649
|
+
if (!(L?.searchParam && v)) return;
|
|
1651
1650
|
let e = setTimeout(() => {
|
|
1652
|
-
G(
|
|
1651
|
+
G(v);
|
|
1653
1652
|
}, 300);
|
|
1654
1653
|
return () => clearTimeout(e);
|
|
1655
1654
|
}, [
|
|
1656
|
-
|
|
1655
|
+
v,
|
|
1657
1656
|
L?.searchParam,
|
|
1658
1657
|
G
|
|
1659
1658
|
]), L?.responseMapping) {
|
|
1660
|
-
let
|
|
1659
|
+
let i = Array.isArray(t) ? t[0] : t, c = g.find((e) => e.value === i);
|
|
1661
1660
|
if (L.searchParam) {
|
|
1662
|
-
let
|
|
1661
|
+
let t = u && L?.showLoading;
|
|
1663
1662
|
return /* @__PURE__ */ E(V, {
|
|
1664
1663
|
style: Y.container,
|
|
1665
1664
|
children: [
|
|
1666
1665
|
/* @__PURE__ */ E(R, {
|
|
1667
1666
|
style: [Y.label, { color: I.textSecondary }],
|
|
1668
|
-
children: [
|
|
1667
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1669
1668
|
style: { color: I.error },
|
|
1670
1669
|
children: "*"
|
|
1671
1670
|
})]
|
|
@@ -1677,11 +1676,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1677
1676
|
backgroundColor: I.input,
|
|
1678
1677
|
borderColor: I.border
|
|
1679
1678
|
},
|
|
1680
|
-
|
|
1679
|
+
r && { borderColor: I.error }
|
|
1681
1680
|
],
|
|
1682
1681
|
onPress: () => C(!0),
|
|
1683
1682
|
activeOpacity: .7,
|
|
1684
|
-
children: [
|
|
1683
|
+
children: [t ? /* @__PURE__ */ E(V, {
|
|
1685
1684
|
style: Y.loadingTrigger,
|
|
1686
1685
|
children: [/* @__PURE__ */ T(j, {
|
|
1687
1686
|
size: "small",
|
|
@@ -1689,23 +1688,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1689
1688
|
}), /* @__PURE__ */ T(R, {
|
|
1690
1689
|
style: [Y.triggerText, { color: I.textMuted }],
|
|
1691
1690
|
numberOfLines: 1,
|
|
1692
|
-
children:
|
|
1691
|
+
children: c?.label || o || P("renderer.defaultHttpInput.search")
|
|
1693
1692
|
})]
|
|
1694
1693
|
}) : /* @__PURE__ */ T(R, {
|
|
1695
1694
|
style: [
|
|
1696
1695
|
Y.triggerText,
|
|
1697
1696
|
{ color: I.text },
|
|
1698
|
-
!
|
|
1697
|
+
!c && { color: I.textMuted }
|
|
1699
1698
|
],
|
|
1700
1699
|
numberOfLines: 1,
|
|
1701
|
-
children:
|
|
1700
|
+
children: c?.label || o || P("renderer.defaultHttpInput.search")
|
|
1702
1701
|
}), /* @__PURE__ */ T(R, {
|
|
1703
1702
|
style: [Y.arrow, { color: I.textMuted }],
|
|
1704
1703
|
children: "▼"
|
|
1705
1704
|
})]
|
|
1706
1705
|
}),
|
|
1707
1706
|
/* @__PURE__ */ T(F, {
|
|
1708
|
-
visible:
|
|
1707
|
+
visible: x,
|
|
1709
1708
|
transparent: !0,
|
|
1710
1709
|
animationType: "fade",
|
|
1711
1710
|
onRequestClose: () => C(!1),
|
|
@@ -1722,7 +1721,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1722
1721
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1723
1722
|
children: [/* @__PURE__ */ T(R, {
|
|
1724
1723
|
style: [Y.modalTitle, { color: I.text }],
|
|
1725
|
-
children:
|
|
1724
|
+
children: a || e.data.name
|
|
1726
1725
|
}), /* @__PURE__ */ T(B, {
|
|
1727
1726
|
onPress: () => C(!1),
|
|
1728
1727
|
children: /* @__PURE__ */ T(R, {
|
|
@@ -1741,28 +1740,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1741
1740
|
}],
|
|
1742
1741
|
placeholder: P("renderer.defaultHttpInput.search"),
|
|
1743
1742
|
placeholderTextColor: I.textMuted,
|
|
1744
|
-
value:
|
|
1743
|
+
value: v,
|
|
1745
1744
|
onChangeText: (e) => {
|
|
1746
|
-
|
|
1745
|
+
y(e), h(null);
|
|
1747
1746
|
},
|
|
1748
1747
|
autoFocus: !0,
|
|
1749
1748
|
autoCapitalize: "none",
|
|
1750
1749
|
autoCorrect: !1
|
|
1751
1750
|
})
|
|
1752
1751
|
}),
|
|
1753
|
-
|
|
1752
|
+
u ? /* @__PURE__ */ T(V, {
|
|
1754
1753
|
style: Y.loadingContainer,
|
|
1755
1754
|
children: /* @__PURE__ */ T(j, {
|
|
1756
1755
|
size: "small",
|
|
1757
1756
|
color: I.primary
|
|
1758
1757
|
})
|
|
1759
|
-
}) :
|
|
1758
|
+
}) : f ? /* @__PURE__ */ E(V, {
|
|
1760
1759
|
style: Y.errorContainer,
|
|
1761
1760
|
children: [/* @__PURE__ */ T(R, {
|
|
1762
1761
|
style: [Y.errorText, { color: I.error }],
|
|
1763
|
-
children:
|
|
1762
|
+
children: f
|
|
1764
1763
|
}), /* @__PURE__ */ T(B, {
|
|
1765
|
-
onPress: () => G(
|
|
1764
|
+
onPress: () => G(v),
|
|
1766
1765
|
style: Y.retryButton,
|
|
1767
1766
|
children: /* @__PURE__ */ T(R, {
|
|
1768
1767
|
style: [Y.retryButtonText, { color: I.primary }],
|
|
@@ -1770,7 +1769,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1770
1769
|
})
|
|
1771
1770
|
})]
|
|
1772
1771
|
}) : /* @__PURE__ */ T(N, {
|
|
1773
|
-
data:
|
|
1772
|
+
data: g,
|
|
1774
1773
|
keyExtractor: (e) => e.value,
|
|
1775
1774
|
style: Y.optionsList,
|
|
1776
1775
|
contentContainerStyle: Y.optionsListContent,
|
|
@@ -1781,18 +1780,18 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1781
1780
|
children: P("renderer.defaultHttpInput.noResults")
|
|
1782
1781
|
})
|
|
1783
1782
|
}),
|
|
1784
|
-
renderItem: ({ item:
|
|
1785
|
-
let
|
|
1783
|
+
renderItem: ({ item: e }) => {
|
|
1784
|
+
let t = e.value === i;
|
|
1786
1785
|
return /* @__PURE__ */ E(B, {
|
|
1787
|
-
style: [Y.option,
|
|
1786
|
+
style: [Y.option, t && { backgroundColor: I.primaryLight }],
|
|
1788
1787
|
onPress: () => {
|
|
1789
|
-
|
|
1788
|
+
n(e.value), C(!1);
|
|
1790
1789
|
},
|
|
1791
1790
|
activeOpacity: .7,
|
|
1792
1791
|
children: [/* @__PURE__ */ T(R, {
|
|
1793
1792
|
style: [Y.optionText, { color: I.text }],
|
|
1794
|
-
children:
|
|
1795
|
-
}),
|
|
1793
|
+
children: e.label
|
|
1794
|
+
}), t && /* @__PURE__ */ T(R, {
|
|
1796
1795
|
style: [Y.checkmark, { color: I.primary }],
|
|
1797
1796
|
children: "✓"
|
|
1798
1797
|
})]
|
|
@@ -1803,27 +1802,27 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1803
1802
|
})
|
|
1804
1803
|
})
|
|
1805
1804
|
}),
|
|
1806
|
-
|
|
1805
|
+
r && /* @__PURE__ */ T(R, {
|
|
1807
1806
|
style: [Y.error, { color: I.error }],
|
|
1808
|
-
children:
|
|
1807
|
+
children: r
|
|
1809
1808
|
}),
|
|
1810
|
-
|
|
1809
|
+
s && !r && /* @__PURE__ */ T(R, {
|
|
1811
1810
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1812
|
-
children:
|
|
1811
|
+
children: s
|
|
1813
1812
|
})
|
|
1814
1813
|
]
|
|
1815
1814
|
});
|
|
1816
1815
|
}
|
|
1817
|
-
let
|
|
1816
|
+
let l = u && L?.showLoading, d = U.filter((e) => {
|
|
1818
1817
|
let t = w[e];
|
|
1819
1818
|
return t == null || t === "";
|
|
1820
|
-
}),
|
|
1819
|
+
}), p = d.map((e) => S(e, M) || e), m = g.length === 0 && !l ? f || (d.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${p.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1821
1820
|
return /* @__PURE__ */ E(V, {
|
|
1822
1821
|
style: Y.container,
|
|
1823
1822
|
children: [
|
|
1824
1823
|
/* @__PURE__ */ E(R, {
|
|
1825
1824
|
style: [Y.label, { color: I.textSecondary }],
|
|
1826
|
-
children: [
|
|
1825
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1827
1826
|
style: { color: I.error },
|
|
1828
1827
|
children: "*"
|
|
1829
1828
|
})]
|
|
@@ -1835,14 +1834,14 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1835
1834
|
backgroundColor: I.input,
|
|
1836
1835
|
borderColor: I.border
|
|
1837
1836
|
},
|
|
1838
|
-
|
|
1839
|
-
(
|
|
1837
|
+
r && { borderColor: I.error },
|
|
1838
|
+
(l || g.length === 0) && { backgroundColor: I.muted }
|
|
1840
1839
|
],
|
|
1841
1840
|
onPress: () => C(!0),
|
|
1842
|
-
disabled:
|
|
1841
|
+
disabled: l || g.length === 0,
|
|
1843
1842
|
activeOpacity: .7,
|
|
1844
1843
|
children: [
|
|
1845
|
-
|
|
1844
|
+
l && /* @__PURE__ */ T(j, {
|
|
1846
1845
|
size: "small",
|
|
1847
1846
|
color: I.primary,
|
|
1848
1847
|
style: Y.triggerLoader
|
|
@@ -1851,10 +1850,10 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1851
1850
|
style: [
|
|
1852
1851
|
Y.triggerText,
|
|
1853
1852
|
{ color: I.text },
|
|
1854
|
-
!
|
|
1853
|
+
!c && { color: I.textMuted }
|
|
1855
1854
|
],
|
|
1856
1855
|
numberOfLines: 1,
|
|
1857
|
-
children:
|
|
1856
|
+
children: c?.label || o || P("renderer.defaultHttpInput.selectOption")
|
|
1858
1857
|
}),
|
|
1859
1858
|
/* @__PURE__ */ T(R, {
|
|
1860
1859
|
style: [Y.arrow, { color: I.textMuted }],
|
|
@@ -1867,7 +1866,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1867
1866
|
children: m
|
|
1868
1867
|
}),
|
|
1869
1868
|
/* @__PURE__ */ T(F, {
|
|
1870
|
-
visible:
|
|
1869
|
+
visible: x,
|
|
1871
1870
|
transparent: !0,
|
|
1872
1871
|
animationType: "fade",
|
|
1873
1872
|
onRequestClose: () => C(!1),
|
|
@@ -1883,7 +1882,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1883
1882
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1884
1883
|
children: [/* @__PURE__ */ T(R, {
|
|
1885
1884
|
style: [Y.modalTitle, { color: I.text }],
|
|
1886
|
-
children:
|
|
1885
|
+
children: a || e.data.name
|
|
1887
1886
|
}), /* @__PURE__ */ T(B, {
|
|
1888
1887
|
onPress: () => C(!1),
|
|
1889
1888
|
children: /* @__PURE__ */ T(R, {
|
|
@@ -1892,22 +1891,22 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1892
1891
|
})
|
|
1893
1892
|
})]
|
|
1894
1893
|
}), /* @__PURE__ */ T(N, {
|
|
1895
|
-
data:
|
|
1894
|
+
data: g,
|
|
1896
1895
|
keyExtractor: (e) => e.value,
|
|
1897
1896
|
style: Y.optionsList,
|
|
1898
1897
|
contentContainerStyle: Y.optionsListContent,
|
|
1899
|
-
renderItem: ({ item:
|
|
1900
|
-
let
|
|
1898
|
+
renderItem: ({ item: e }) => {
|
|
1899
|
+
let t = e.value === i;
|
|
1901
1900
|
return /* @__PURE__ */ E(B, {
|
|
1902
|
-
style: [Y.option,
|
|
1901
|
+
style: [Y.option, t && { backgroundColor: I.primaryLight }],
|
|
1903
1902
|
onPress: () => {
|
|
1904
|
-
|
|
1903
|
+
n(e.value), C(!1);
|
|
1905
1904
|
},
|
|
1906
1905
|
activeOpacity: .7,
|
|
1907
1906
|
children: [/* @__PURE__ */ T(R, {
|
|
1908
1907
|
style: [Y.optionText, { color: I.text }],
|
|
1909
|
-
children:
|
|
1910
|
-
}),
|
|
1908
|
+
children: e.label
|
|
1909
|
+
}), t && /* @__PURE__ */ T(R, {
|
|
1911
1910
|
style: [Y.checkmark, { color: I.primary }],
|
|
1912
1911
|
children: "✓"
|
|
1913
1912
|
})]
|
|
@@ -1917,13 +1916,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1917
1916
|
})
|
|
1918
1917
|
})
|
|
1919
1918
|
}),
|
|
1920
|
-
|
|
1919
|
+
r && /* @__PURE__ */ T(R, {
|
|
1921
1920
|
style: [Y.error, { color: I.error }],
|
|
1922
|
-
children:
|
|
1921
|
+
children: r
|
|
1923
1922
|
}),
|
|
1924
|
-
|
|
1923
|
+
s && !r && /* @__PURE__ */ T(R, {
|
|
1925
1924
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1926
|
-
children:
|
|
1925
|
+
children: s
|
|
1927
1926
|
})
|
|
1928
1927
|
]
|
|
1929
1928
|
});
|
|
@@ -1933,7 +1932,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1933
1932
|
children: [
|
|
1934
1933
|
/* @__PURE__ */ E(R, {
|
|
1935
1934
|
style: [Y.label, { color: I.textSecondary }],
|
|
1936
|
-
children: [
|
|
1935
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
1937
1936
|
style: { color: I.error },
|
|
1938
1937
|
children: "*"
|
|
1939
1938
|
})]
|
|
@@ -1944,16 +1943,16 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
1944
1943
|
borderColor: I.border,
|
|
1945
1944
|
color: I.textMuted
|
|
1946
1945
|
}],
|
|
1947
|
-
value: typeof
|
|
1946
|
+
value: typeof t == "string" ? t : JSON.stringify(t),
|
|
1948
1947
|
editable: !1
|
|
1949
1948
|
}),
|
|
1950
|
-
|
|
1949
|
+
r && /* @__PURE__ */ T(R, {
|
|
1951
1950
|
style: [Y.error, { color: I.error }],
|
|
1952
|
-
children:
|
|
1951
|
+
children: r
|
|
1953
1952
|
}),
|
|
1954
|
-
|
|
1953
|
+
s && !r && /* @__PURE__ */ T(R, {
|
|
1955
1954
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1956
|
-
children:
|
|
1955
|
+
children: s
|
|
1957
1956
|
})
|
|
1958
1957
|
]
|
|
1959
1958
|
});
|
|
@@ -2083,17 +2082,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2083
2082
|
flex: 1,
|
|
2084
2083
|
fontSize: 14
|
|
2085
2084
|
}
|
|
2086
|
-
}), we = ({ node:
|
|
2087
|
-
let { colors:
|
|
2085
|
+
}), we = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2086
|
+
let { colors: c } = m(), [l, u] = A(t?.toString() ?? "");
|
|
2088
2087
|
return D(() => {
|
|
2089
|
-
|
|
2090
|
-
}, [
|
|
2088
|
+
u(t?.toString() ?? "");
|
|
2089
|
+
}, [t]), /* @__PURE__ */ E(V, {
|
|
2091
2090
|
style: Te.container,
|
|
2092
2091
|
children: [
|
|
2093
2092
|
/* @__PURE__ */ E(R, {
|
|
2094
|
-
style: [Te.label, { color:
|
|
2095
|
-
children: [
|
|
2096
|
-
style: { color:
|
|
2093
|
+
style: [Te.label, { color: c.textSecondary }],
|
|
2094
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2095
|
+
style: { color: c.error },
|
|
2097
2096
|
children: "*"
|
|
2098
2097
|
})]
|
|
2099
2098
|
}),
|
|
@@ -2101,33 +2100,33 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2101
2100
|
style: [
|
|
2102
2101
|
Te.input,
|
|
2103
2102
|
{
|
|
2104
|
-
backgroundColor:
|
|
2105
|
-
borderColor:
|
|
2106
|
-
color:
|
|
2103
|
+
backgroundColor: c.input,
|
|
2104
|
+
borderColor: c.border,
|
|
2105
|
+
color: c.text
|
|
2107
2106
|
},
|
|
2108
|
-
|
|
2107
|
+
r && { borderColor: c.error }
|
|
2109
2108
|
],
|
|
2110
|
-
value:
|
|
2109
|
+
value: l,
|
|
2111
2110
|
onChangeText: (e) => {
|
|
2112
|
-
if (
|
|
2113
|
-
|
|
2111
|
+
if (u(e), e.trim() === "") {
|
|
2112
|
+
n(null);
|
|
2114
2113
|
return;
|
|
2115
2114
|
}
|
|
2116
2115
|
let t = Number(e);
|
|
2117
|
-
Number.isNaN(t) ||
|
|
2116
|
+
Number.isNaN(t) || n(t);
|
|
2118
2117
|
},
|
|
2119
|
-
placeholder:
|
|
2120
|
-
placeholderTextColor:
|
|
2118
|
+
placeholder: a,
|
|
2119
|
+
placeholderTextColor: c.textMuted,
|
|
2121
2120
|
keyboardType: "numeric",
|
|
2122
|
-
accessibilityLabel:
|
|
2121
|
+
accessibilityLabel: s
|
|
2123
2122
|
}),
|
|
2124
|
-
|
|
2125
|
-
style: [Te.error, { color:
|
|
2126
|
-
children:
|
|
2123
|
+
r && /* @__PURE__ */ T(R, {
|
|
2124
|
+
style: [Te.error, { color: c.error }],
|
|
2125
|
+
children: r
|
|
2127
2126
|
}),
|
|
2128
|
-
|
|
2129
|
-
style: [Te.helperText, { color:
|
|
2130
|
-
children:
|
|
2127
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2128
|
+
style: [Te.helperText, { color: c.textMuted }],
|
|
2129
|
+
children: o
|
|
2131
2130
|
})
|
|
2132
2131
|
]
|
|
2133
2132
|
});
|
|
@@ -2153,15 +2152,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2153
2152
|
fontWeight: "500",
|
|
2154
2153
|
marginBottom: 8
|
|
2155
2154
|
}
|
|
2156
|
-
}), Ee = ({ node:
|
|
2157
|
-
let { colors:
|
|
2155
|
+
}), Ee = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2156
|
+
let { colors: c } = m(), [l, u] = A(!1);
|
|
2158
2157
|
return /* @__PURE__ */ E(V, {
|
|
2159
2158
|
style: De.container,
|
|
2160
2159
|
children: [
|
|
2161
2160
|
/* @__PURE__ */ E(R, {
|
|
2162
|
-
style: [De.label, { color:
|
|
2163
|
-
children: [
|
|
2164
|
-
style: { color:
|
|
2161
|
+
style: [De.label, { color: c.textSecondary }],
|
|
2162
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2163
|
+
style: { color: c.error },
|
|
2165
2164
|
children: "*"
|
|
2166
2165
|
})]
|
|
2167
2166
|
}),
|
|
@@ -2171,35 +2170,35 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2171
2170
|
style: [
|
|
2172
2171
|
De.input,
|
|
2173
2172
|
{
|
|
2174
|
-
backgroundColor:
|
|
2175
|
-
borderColor:
|
|
2176
|
-
color:
|
|
2173
|
+
backgroundColor: c.input,
|
|
2174
|
+
borderColor: c.border,
|
|
2175
|
+
color: c.text
|
|
2177
2176
|
},
|
|
2178
|
-
|
|
2177
|
+
r && { borderColor: c.error }
|
|
2179
2178
|
],
|
|
2180
|
-
value:
|
|
2181
|
-
onChangeText:
|
|
2182
|
-
placeholder:
|
|
2183
|
-
placeholderTextColor:
|
|
2184
|
-
secureTextEntry: !
|
|
2185
|
-
accessibilityLabel:
|
|
2179
|
+
value: t ?? "",
|
|
2180
|
+
onChangeText: n,
|
|
2181
|
+
placeholder: a,
|
|
2182
|
+
placeholderTextColor: c.textMuted,
|
|
2183
|
+
secureTextEntry: !l,
|
|
2184
|
+
accessibilityLabel: s
|
|
2186
2185
|
}), /* @__PURE__ */ T(B, {
|
|
2187
2186
|
style: De.toggleButton,
|
|
2188
|
-
onPress: () =>
|
|
2187
|
+
onPress: () => u(!l),
|
|
2189
2188
|
activeOpacity: .7,
|
|
2190
2189
|
children: /* @__PURE__ */ T(R, {
|
|
2191
|
-
style: [De.toggleText, { color:
|
|
2192
|
-
children:
|
|
2190
|
+
style: [De.toggleText, { color: c.primary }],
|
|
2191
|
+
children: l ? "Hide" : "Show"
|
|
2193
2192
|
})
|
|
2194
2193
|
})]
|
|
2195
2194
|
}),
|
|
2196
|
-
|
|
2197
|
-
style: [De.error, { color:
|
|
2198
|
-
children:
|
|
2195
|
+
r && /* @__PURE__ */ T(R, {
|
|
2196
|
+
style: [De.error, { color: c.error }],
|
|
2197
|
+
children: r
|
|
2199
2198
|
}),
|
|
2200
|
-
|
|
2201
|
-
style: [De.helperText, { color:
|
|
2202
|
-
children:
|
|
2199
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2200
|
+
style: [De.helperText, { color: c.textMuted }],
|
|
2201
|
+
children: o
|
|
2203
2202
|
})
|
|
2204
2203
|
]
|
|
2205
2204
|
});
|
|
@@ -2241,36 +2240,36 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2241
2240
|
fontSize: 12,
|
|
2242
2241
|
fontWeight: "600"
|
|
2243
2242
|
}
|
|
2244
|
-
}), Oe = ({ node:
|
|
2245
|
-
let
|
|
2246
|
-
|
|
2243
|
+
}), Oe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2244
|
+
let o = b(), { colors: s } = m(), c = e.data.options || [], l = t || "", u = e.data.variant === "card", d = (e) => {
|
|
2245
|
+
n(e);
|
|
2247
2246
|
};
|
|
2248
2247
|
return /* @__PURE__ */ E(V, {
|
|
2249
2248
|
style: X.container,
|
|
2250
2249
|
children: [
|
|
2251
2250
|
/* @__PURE__ */ E(R, {
|
|
2252
|
-
style: [X.label, { color:
|
|
2253
|
-
children: [
|
|
2254
|
-
style: { color:
|
|
2251
|
+
style: [X.label, { color: s.textSecondary }],
|
|
2252
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2253
|
+
style: { color: s.error },
|
|
2255
2254
|
children: "*"
|
|
2256
2255
|
})]
|
|
2257
2256
|
}),
|
|
2258
|
-
|
|
2259
|
-
let t =
|
|
2260
|
-
return
|
|
2257
|
+
c.map((e) => {
|
|
2258
|
+
let t = l === e.value, n = o(e.label) || e.value, r = o(e.description);
|
|
2259
|
+
return u ? /* @__PURE__ */ E(B, {
|
|
2261
2260
|
style: [
|
|
2262
2261
|
X.card,
|
|
2263
2262
|
{
|
|
2264
|
-
backgroundColor:
|
|
2265
|
-
borderColor:
|
|
2263
|
+
backgroundColor: s.input,
|
|
2264
|
+
borderColor: s.border
|
|
2266
2265
|
},
|
|
2267
2266
|
t && {
|
|
2268
|
-
backgroundColor: `${
|
|
2269
|
-
borderColor:
|
|
2267
|
+
backgroundColor: `${s.primary}10`,
|
|
2268
|
+
borderColor: s.primary
|
|
2270
2269
|
},
|
|
2271
2270
|
e.disabled && { opacity: .5 }
|
|
2272
2271
|
],
|
|
2273
|
-
onPress: () =>
|
|
2272
|
+
onPress: () => d(e.value),
|
|
2274
2273
|
disabled: e.disabled,
|
|
2275
2274
|
activeOpacity: .7,
|
|
2276
2275
|
children: [
|
|
@@ -2278,12 +2277,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2278
2277
|
style: [
|
|
2279
2278
|
X.radio,
|
|
2280
2279
|
{
|
|
2281
|
-
backgroundColor:
|
|
2282
|
-
borderColor:
|
|
2280
|
+
backgroundColor: s.input,
|
|
2281
|
+
borderColor: s.border
|
|
2283
2282
|
},
|
|
2284
|
-
t && { borderColor:
|
|
2283
|
+
t && { borderColor: s.primary }
|
|
2285
2284
|
],
|
|
2286
|
-
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor:
|
|
2285
|
+
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2287
2286
|
}),
|
|
2288
2287
|
e.image && /* @__PURE__ */ T(P, {
|
|
2289
2288
|
source: { uri: e.image },
|
|
@@ -2292,17 +2291,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2292
2291
|
/* @__PURE__ */ E(V, {
|
|
2293
2292
|
style: X.cardTextContainer,
|
|
2294
2293
|
children: [/* @__PURE__ */ T(R, {
|
|
2295
|
-
style: [X.cardLabel, { color:
|
|
2294
|
+
style: [X.cardLabel, { color: s.textSecondary }],
|
|
2296
2295
|
children: n
|
|
2297
2296
|
}), r && /* @__PURE__ */ T(R, {
|
|
2298
|
-
style: [X.cardDescription, { color:
|
|
2297
|
+
style: [X.cardDescription, { color: s.textMuted }],
|
|
2299
2298
|
children: r
|
|
2300
2299
|
})]
|
|
2301
2300
|
})
|
|
2302
2301
|
]
|
|
2303
2302
|
}, e.value) : /* @__PURE__ */ E(B, {
|
|
2304
2303
|
style: X.option,
|
|
2305
|
-
onPress: () =>
|
|
2304
|
+
onPress: () => d(e.value),
|
|
2306
2305
|
disabled: e.disabled,
|
|
2307
2306
|
activeOpacity: .7,
|
|
2308
2307
|
children: [
|
|
@@ -2310,12 +2309,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2310
2309
|
style: [
|
|
2311
2310
|
X.radio,
|
|
2312
2311
|
{
|
|
2313
|
-
backgroundColor:
|
|
2314
|
-
borderColor:
|
|
2312
|
+
backgroundColor: s.input,
|
|
2313
|
+
borderColor: s.border
|
|
2315
2314
|
},
|
|
2316
|
-
t && { borderColor:
|
|
2315
|
+
t && { borderColor: s.primary }
|
|
2317
2316
|
],
|
|
2318
|
-
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor:
|
|
2317
|
+
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2319
2318
|
}),
|
|
2320
2319
|
e.image && /* @__PURE__ */ T(P, {
|
|
2321
2320
|
source: { uri: e.image },
|
|
@@ -2326,25 +2325,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2326
2325
|
children: [/* @__PURE__ */ T(R, {
|
|
2327
2326
|
style: [
|
|
2328
2327
|
X.optionLabel,
|
|
2329
|
-
{ color:
|
|
2330
|
-
e.disabled && { color:
|
|
2328
|
+
{ color: s.textSecondary },
|
|
2329
|
+
e.disabled && { color: s.textMuted }
|
|
2331
2330
|
],
|
|
2332
2331
|
children: n
|
|
2333
2332
|
}), r && /* @__PURE__ */ T(R, {
|
|
2334
|
-
style: [X.optionDescription, { color:
|
|
2333
|
+
style: [X.optionDescription, { color: s.textMuted }],
|
|
2335
2334
|
children: r
|
|
2336
2335
|
})]
|
|
2337
2336
|
})
|
|
2338
2337
|
]
|
|
2339
2338
|
}, e.value);
|
|
2340
2339
|
}),
|
|
2341
|
-
|
|
2342
|
-
style: [X.error, { color:
|
|
2343
|
-
children:
|
|
2340
|
+
r && /* @__PURE__ */ T(R, {
|
|
2341
|
+
style: [X.error, { color: s.error }],
|
|
2342
|
+
children: r
|
|
2344
2343
|
}),
|
|
2345
|
-
|
|
2346
|
-
style: [X.helperText, { color:
|
|
2347
|
-
children:
|
|
2344
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
2345
|
+
style: [X.helperText, { color: s.textMuted }],
|
|
2346
|
+
children: a
|
|
2348
2347
|
})
|
|
2349
2348
|
]
|
|
2350
2349
|
});
|
|
@@ -2417,17 +2416,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2417
2416
|
height: 10,
|
|
2418
2417
|
width: 10
|
|
2419
2418
|
}
|
|
2420
|
-
}), ke = ({ node:
|
|
2421
|
-
let [
|
|
2422
|
-
|
|
2419
|
+
}), ke = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2420
|
+
let [s, c] = A(!1), l = b(), { colors: u } = m(), d = e.data.options || [], f = e.data.multiple, p = Array.isArray(t) ? t : t ? [t] : [], h = (e) => {
|
|
2421
|
+
f ? n(p.includes(e) ? p.filter((t) => t !== e) : [...p, e]) : (n(e), c(!1));
|
|
2423
2422
|
};
|
|
2424
2423
|
return /* @__PURE__ */ E(V, {
|
|
2425
2424
|
style: Z.container,
|
|
2426
2425
|
children: [
|
|
2427
2426
|
/* @__PURE__ */ E(R, {
|
|
2428
|
-
style: [Z.label, { color:
|
|
2429
|
-
children: [
|
|
2430
|
-
style: { color:
|
|
2427
|
+
style: [Z.label, { color: u.textSecondary }],
|
|
2428
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2429
|
+
style: { color: u.error },
|
|
2431
2430
|
children: "*"
|
|
2432
2431
|
})]
|
|
2433
2432
|
}),
|
|
@@ -2435,82 +2434,82 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2435
2434
|
style: [
|
|
2436
2435
|
Z.trigger,
|
|
2437
2436
|
{
|
|
2438
|
-
backgroundColor:
|
|
2439
|
-
borderColor:
|
|
2437
|
+
backgroundColor: u.input,
|
|
2438
|
+
borderColor: u.border
|
|
2440
2439
|
},
|
|
2441
|
-
|
|
2440
|
+
r && { borderColor: u.error }
|
|
2442
2441
|
],
|
|
2443
|
-
onPress: () =>
|
|
2442
|
+
onPress: () => c(!0),
|
|
2444
2443
|
activeOpacity: .7,
|
|
2445
2444
|
children: [/* @__PURE__ */ T(R, {
|
|
2446
2445
|
style: [
|
|
2447
2446
|
Z.triggerText,
|
|
2448
|
-
{ color:
|
|
2449
|
-
|
|
2447
|
+
{ color: u.text },
|
|
2448
|
+
p.length === 0 && { color: u.textMuted }
|
|
2450
2449
|
],
|
|
2451
2450
|
children: (() => {
|
|
2452
|
-
if (
|
|
2453
|
-
if (
|
|
2454
|
-
let e =
|
|
2455
|
-
return e ?
|
|
2451
|
+
if (p.length === 0) return a || "Select...";
|
|
2452
|
+
if (f) return d.filter((e) => p.includes(e.value)).map((e) => l(e.label) || e.value).join(", ");
|
|
2453
|
+
let e = d.find((e) => e.value === p[0]);
|
|
2454
|
+
return e ? l(e.label) || e.value : a || "Select...";
|
|
2456
2455
|
})()
|
|
2457
2456
|
}), /* @__PURE__ */ T(R, {
|
|
2458
|
-
style: [Z.arrow, { color:
|
|
2457
|
+
style: [Z.arrow, { color: u.textMuted }],
|
|
2459
2458
|
children: "▼"
|
|
2460
2459
|
})]
|
|
2461
2460
|
}),
|
|
2462
2461
|
/* @__PURE__ */ T(F, {
|
|
2463
|
-
visible:
|
|
2462
|
+
visible: s,
|
|
2464
2463
|
transparent: !0,
|
|
2465
2464
|
animationType: "fade",
|
|
2466
|
-
onRequestClose: () =>
|
|
2465
|
+
onRequestClose: () => c(!1),
|
|
2467
2466
|
children: /* @__PURE__ */ T(B, {
|
|
2468
2467
|
style: Z.modalOverlay,
|
|
2469
2468
|
activeOpacity: 1,
|
|
2470
|
-
onPress: () =>
|
|
2469
|
+
onPress: () => c(!1),
|
|
2471
2470
|
children: /* @__PURE__ */ E(V, {
|
|
2472
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2471
|
+
style: [Z.modalContent, { backgroundColor: u.card }],
|
|
2473
2472
|
onStartShouldSetResponder: () => !0,
|
|
2474
2473
|
children: [
|
|
2475
2474
|
/* @__PURE__ */ E(V, {
|
|
2476
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2475
|
+
style: [Z.modalHeader, { borderBottomColor: u.border }],
|
|
2477
2476
|
children: [/* @__PURE__ */ T(R, {
|
|
2478
|
-
style: [Z.modalTitle, { color:
|
|
2479
|
-
children:
|
|
2477
|
+
style: [Z.modalTitle, { color: u.text }],
|
|
2478
|
+
children: i || e.data.name
|
|
2480
2479
|
}), /* @__PURE__ */ T(B, {
|
|
2481
|
-
onPress: () =>
|
|
2480
|
+
onPress: () => c(!1),
|
|
2482
2481
|
children: /* @__PURE__ */ T(R, {
|
|
2483
|
-
style: [Z.closeButton, { color:
|
|
2482
|
+
style: [Z.closeButton, { color: u.textMuted }],
|
|
2484
2483
|
children: "✕"
|
|
2485
2484
|
})
|
|
2486
2485
|
})]
|
|
2487
2486
|
}),
|
|
2488
2487
|
/* @__PURE__ */ T(I, {
|
|
2489
2488
|
style: Z.optionsList,
|
|
2490
|
-
children:
|
|
2491
|
-
let t =
|
|
2489
|
+
children: d.map((e) => {
|
|
2490
|
+
let t = p.includes(e.value);
|
|
2492
2491
|
return /* @__PURE__ */ E(B, {
|
|
2493
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2494
|
-
onPress: () =>
|
|
2492
|
+
style: [Z.option, t && { backgroundColor: `${u.primary}20` }],
|
|
2493
|
+
onPress: () => h(e.value),
|
|
2495
2494
|
disabled: e.disabled,
|
|
2496
2495
|
activeOpacity: .7,
|
|
2497
2496
|
children: [/* @__PURE__ */ T(R, {
|
|
2498
2497
|
style: [
|
|
2499
2498
|
Z.optionText,
|
|
2500
|
-
{ color:
|
|
2501
|
-
e.disabled && { color:
|
|
2499
|
+
{ color: u.textSecondary },
|
|
2500
|
+
e.disabled && { color: u.textMuted }
|
|
2502
2501
|
],
|
|
2503
|
-
children:
|
|
2502
|
+
children: l(e.label) || e.value
|
|
2504
2503
|
}), t && /* @__PURE__ */ T(R, {
|
|
2505
|
-
style: [Z.checkmark, { color:
|
|
2504
|
+
style: [Z.checkmark, { color: u.primary }],
|
|
2506
2505
|
children: "✓"
|
|
2507
2506
|
})]
|
|
2508
2507
|
}, e.value);
|
|
2509
2508
|
})
|
|
2510
2509
|
}),
|
|
2511
|
-
|
|
2512
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2513
|
-
onPress: () =>
|
|
2510
|
+
f && /* @__PURE__ */ T(B, {
|
|
2511
|
+
style: [Z.doneButton, { backgroundColor: u.primary }],
|
|
2512
|
+
onPress: () => c(!1),
|
|
2514
2513
|
children: /* @__PURE__ */ T(R, {
|
|
2515
2514
|
style: Z.doneButtonText,
|
|
2516
2515
|
children: "Done"
|
|
@@ -2520,13 +2519,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2520
2519
|
})
|
|
2521
2520
|
})
|
|
2522
2521
|
}),
|
|
2523
|
-
|
|
2524
|
-
style: [Z.error, { color:
|
|
2525
|
-
children:
|
|
2522
|
+
r && /* @__PURE__ */ T(R, {
|
|
2523
|
+
style: [Z.error, { color: u.error }],
|
|
2524
|
+
children: r
|
|
2526
2525
|
}),
|
|
2527
|
-
|
|
2528
|
-
style: [Z.helperText, { color:
|
|
2529
|
-
children:
|
|
2526
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2527
|
+
style: [Z.helperText, { color: u.textMuted }],
|
|
2528
|
+
children: o
|
|
2530
2529
|
})
|
|
2531
2530
|
]
|
|
2532
2531
|
});
|
|
@@ -2612,8 +2611,8 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2612
2611
|
flex: 1,
|
|
2613
2612
|
fontSize: 14
|
|
2614
2613
|
}
|
|
2615
|
-
}), Ae = ({ node:
|
|
2616
|
-
let { colors:
|
|
2614
|
+
}), Ae = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2615
|
+
let { colors: o } = m(), s = !!t;
|
|
2617
2616
|
return /* @__PURE__ */ E(V, {
|
|
2618
2617
|
style: je.container,
|
|
2619
2618
|
children: [
|
|
@@ -2622,30 +2621,30 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2622
2621
|
children: [/* @__PURE__ */ T(V, {
|
|
2623
2622
|
style: je.labelContainer,
|
|
2624
2623
|
children: /* @__PURE__ */ E(R, {
|
|
2625
|
-
style: [je.label, { color:
|
|
2626
|
-
children: [
|
|
2627
|
-
style: { color:
|
|
2624
|
+
style: [je.label, { color: o.textSecondary }],
|
|
2625
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2626
|
+
style: { color: o.error },
|
|
2628
2627
|
children: "*"
|
|
2629
2628
|
})]
|
|
2630
2629
|
})
|
|
2631
2630
|
}), /* @__PURE__ */ T(te, {
|
|
2632
2631
|
trackColor: {
|
|
2633
|
-
false:
|
|
2634
|
-
true: `${
|
|
2632
|
+
false: o.border,
|
|
2633
|
+
true: `${o.primary}80`
|
|
2635
2634
|
},
|
|
2636
|
-
thumbColor:
|
|
2637
|
-
ios_backgroundColor:
|
|
2638
|
-
onValueChange:
|
|
2639
|
-
value:
|
|
2635
|
+
thumbColor: s ? o.primary : o.card,
|
|
2636
|
+
ios_backgroundColor: o.border,
|
|
2637
|
+
onValueChange: n,
|
|
2638
|
+
value: s
|
|
2640
2639
|
})]
|
|
2641
2640
|
}),
|
|
2642
|
-
|
|
2643
|
-
style: [je.error, { color:
|
|
2644
|
-
children:
|
|
2641
|
+
r && /* @__PURE__ */ T(R, {
|
|
2642
|
+
style: [je.error, { color: o.error }],
|
|
2643
|
+
children: r
|
|
2645
2644
|
}),
|
|
2646
|
-
|
|
2647
|
-
style: [je.helperText, { color:
|
|
2648
|
-
children:
|
|
2645
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
2646
|
+
style: [je.helperText, { color: o.textMuted }],
|
|
2647
|
+
children: a
|
|
2649
2648
|
})
|
|
2650
2649
|
]
|
|
2651
2650
|
});
|
|
@@ -2669,15 +2668,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2669
2668
|
flexDirection: "row",
|
|
2670
2669
|
justifyContent: "space-between"
|
|
2671
2670
|
}
|
|
2672
|
-
}), Me = ({ node:
|
|
2673
|
-
let { colors:
|
|
2671
|
+
}), Me = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2672
|
+
let { colors: c } = m();
|
|
2674
2673
|
return /* @__PURE__ */ E(V, {
|
|
2675
2674
|
style: Ne.container,
|
|
2676
2675
|
children: [
|
|
2677
2676
|
/* @__PURE__ */ E(R, {
|
|
2678
|
-
style: [Ne.label, { color:
|
|
2679
|
-
children: [
|
|
2680
|
-
style: { color:
|
|
2677
|
+
style: [Ne.label, { color: c.textSecondary }],
|
|
2678
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2679
|
+
style: { color: c.error },
|
|
2681
2680
|
children: "*"
|
|
2682
2681
|
})]
|
|
2683
2682
|
}),
|
|
@@ -2685,28 +2684,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2685
2684
|
style: [
|
|
2686
2685
|
Ne.textarea,
|
|
2687
2686
|
{
|
|
2688
|
-
backgroundColor:
|
|
2689
|
-
borderColor:
|
|
2690
|
-
color:
|
|
2687
|
+
backgroundColor: c.input,
|
|
2688
|
+
borderColor: c.border,
|
|
2689
|
+
color: c.text
|
|
2691
2690
|
},
|
|
2692
|
-
|
|
2691
|
+
r && { borderColor: c.error }
|
|
2693
2692
|
],
|
|
2694
|
-
value:
|
|
2695
|
-
onChangeText:
|
|
2696
|
-
placeholder:
|
|
2697
|
-
placeholderTextColor:
|
|
2693
|
+
value: t ?? "",
|
|
2694
|
+
onChangeText: n,
|
|
2695
|
+
placeholder: a,
|
|
2696
|
+
placeholderTextColor: c.textMuted,
|
|
2698
2697
|
multiline: !0,
|
|
2699
2698
|
numberOfLines: 4,
|
|
2700
2699
|
textAlignVertical: "top",
|
|
2701
|
-
accessibilityLabel:
|
|
2700
|
+
accessibilityLabel: s
|
|
2702
2701
|
}),
|
|
2703
|
-
|
|
2704
|
-
style: [Ne.error, { color:
|
|
2705
|
-
children:
|
|
2702
|
+
r && /* @__PURE__ */ T(R, {
|
|
2703
|
+
style: [Ne.error, { color: c.error }],
|
|
2704
|
+
children: r
|
|
2706
2705
|
}),
|
|
2707
|
-
|
|
2708
|
-
style: [Ne.helperText, { color:
|
|
2709
|
-
children:
|
|
2706
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2707
|
+
style: [Ne.helperText, { color: c.textMuted }],
|
|
2708
|
+
children: o
|
|
2710
2709
|
})
|
|
2711
2710
|
]
|
|
2712
2711
|
});
|
|
@@ -2733,15 +2732,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2733
2732
|
paddingHorizontal: 12,
|
|
2734
2733
|
paddingVertical: 8
|
|
2735
2734
|
}
|
|
2736
|
-
}), Pe = ({ node:
|
|
2737
|
-
let { colors:
|
|
2735
|
+
}), Pe = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2736
|
+
let { colors: c } = m();
|
|
2738
2737
|
return /* @__PURE__ */ E(V, {
|
|
2739
2738
|
style: Fe.container,
|
|
2740
2739
|
children: [
|
|
2741
2740
|
/* @__PURE__ */ E(R, {
|
|
2742
|
-
style: [Fe.label, { color:
|
|
2743
|
-
children: [
|
|
2744
|
-
style: { color:
|
|
2741
|
+
style: [Fe.label, { color: c.textSecondary }],
|
|
2742
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2743
|
+
style: { color: c.error },
|
|
2745
2744
|
children: "*"
|
|
2746
2745
|
})]
|
|
2747
2746
|
}),
|
|
@@ -2749,25 +2748,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2749
2748
|
style: [
|
|
2750
2749
|
Fe.input,
|
|
2751
2750
|
{
|
|
2752
|
-
backgroundColor:
|
|
2753
|
-
borderColor:
|
|
2754
|
-
color:
|
|
2751
|
+
backgroundColor: c.input,
|
|
2752
|
+
borderColor: c.border,
|
|
2753
|
+
color: c.text
|
|
2755
2754
|
},
|
|
2756
|
-
|
|
2755
|
+
r && { borderColor: c.error }
|
|
2757
2756
|
],
|
|
2758
|
-
value:
|
|
2759
|
-
onChangeText:
|
|
2760
|
-
placeholder:
|
|
2761
|
-
placeholderTextColor:
|
|
2762
|
-
accessibilityLabel:
|
|
2757
|
+
value: t ?? "",
|
|
2758
|
+
onChangeText: n,
|
|
2759
|
+
placeholder: a,
|
|
2760
|
+
placeholderTextColor: c.textMuted,
|
|
2761
|
+
accessibilityLabel: s
|
|
2763
2762
|
}),
|
|
2764
|
-
|
|
2765
|
-
style: [Fe.error, { color:
|
|
2766
|
-
children:
|
|
2763
|
+
r && /* @__PURE__ */ T(R, {
|
|
2764
|
+
style: [Fe.error, { color: c.error }],
|
|
2765
|
+
children: r
|
|
2767
2766
|
}),
|
|
2768
|
-
|
|
2769
|
-
style: [Fe.helperText, { color:
|
|
2770
|
-
children:
|
|
2767
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2768
|
+
style: [Fe.helperText, { color: c.textMuted }],
|
|
2769
|
+
children: o
|
|
2771
2770
|
})
|
|
2772
2771
|
]
|
|
2773
2772
|
});
|
|
@@ -2793,21 +2792,21 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2793
2792
|
fontWeight: "500",
|
|
2794
2793
|
marginBottom: 8
|
|
2795
2794
|
}
|
|
2796
|
-
}), Ie = ({ node:
|
|
2797
|
-
let [
|
|
2798
|
-
|
|
2795
|
+
}), Ie = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2796
|
+
let [s, c] = A(!1), { colors: l } = m(), u = (t || "").split(":"), d = Number.parseInt(u[0], 10), f = Number.parseInt(u[1], 10), p = Number.isNaN(d) ? 0 : d, h = Number.isNaN(f) ? 0 : f, [g, _] = A(p || 0), [v, y] = A(h || 0), b = k(null), x = k(null), S = Array.from({ length: 24 }, (e, t) => t), C = Array.from({ length: 60 }, (e, t) => t), w = () => t || a || "Select time", D = ee(() => {
|
|
2797
|
+
n(`${String(g).padStart(2, "0")}:${String(v).padStart(2, "0")}`), c(!1);
|
|
2799
2798
|
}, [
|
|
2800
2799
|
g,
|
|
2801
2800
|
v,
|
|
2802
|
-
|
|
2801
|
+
n
|
|
2803
2802
|
]);
|
|
2804
2803
|
return /* @__PURE__ */ E(V, {
|
|
2805
2804
|
style: Q.container,
|
|
2806
2805
|
children: [
|
|
2807
2806
|
/* @__PURE__ */ E(R, {
|
|
2808
|
-
style: [Q.label, { color:
|
|
2809
|
-
children: [
|
|
2810
|
-
style: { color:
|
|
2807
|
+
style: [Q.label, { color: l.textSecondary }],
|
|
2808
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
2809
|
+
style: { color: l.error },
|
|
2811
2810
|
children: "*"
|
|
2812
2811
|
})]
|
|
2813
2812
|
}),
|
|
@@ -2815,20 +2814,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2815
2814
|
style: [
|
|
2816
2815
|
Q.trigger,
|
|
2817
2816
|
{
|
|
2818
|
-
backgroundColor:
|
|
2819
|
-
borderColor:
|
|
2817
|
+
backgroundColor: l.input,
|
|
2818
|
+
borderColor: l.border
|
|
2820
2819
|
},
|
|
2821
|
-
|
|
2820
|
+
r && { borderColor: l.error }
|
|
2822
2821
|
],
|
|
2823
2822
|
onPress: () => {
|
|
2824
|
-
_(
|
|
2823
|
+
_(p || 0), y(h || 0), c(!0);
|
|
2825
2824
|
},
|
|
2826
2825
|
activeOpacity: .7,
|
|
2827
2826
|
children: [/* @__PURE__ */ T(R, {
|
|
2828
2827
|
style: [
|
|
2829
2828
|
Q.triggerText,
|
|
2830
|
-
{ color:
|
|
2831
|
-
!
|
|
2829
|
+
{ color: l.text },
|
|
2830
|
+
!t && { color: l.textMuted }
|
|
2832
2831
|
],
|
|
2833
2832
|
numberOfLines: 1,
|
|
2834
2833
|
children: w()
|
|
@@ -2838,28 +2837,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2838
2837
|
})]
|
|
2839
2838
|
}),
|
|
2840
2839
|
/* @__PURE__ */ T(F, {
|
|
2841
|
-
visible:
|
|
2840
|
+
visible: s,
|
|
2842
2841
|
transparent: !0,
|
|
2843
2842
|
animationType: "fade",
|
|
2844
|
-
onRequestClose: () =>
|
|
2843
|
+
onRequestClose: () => c(!1),
|
|
2845
2844
|
children: /* @__PURE__ */ T(B, {
|
|
2846
2845
|
style: Q.modalOverlay,
|
|
2847
2846
|
activeOpacity: 1,
|
|
2848
|
-
onPress: () =>
|
|
2847
|
+
onPress: () => c(!1),
|
|
2849
2848
|
children: /* @__PURE__ */ E(B, {
|
|
2850
|
-
style: [Q.modalContent, { backgroundColor:
|
|
2849
|
+
style: [Q.modalContent, { backgroundColor: l.card }],
|
|
2851
2850
|
activeOpacity: 1,
|
|
2852
2851
|
onPress: () => {},
|
|
2853
2852
|
children: [
|
|
2854
2853
|
/* @__PURE__ */ E(V, {
|
|
2855
|
-
style: [Q.modalHeader, { borderBottomColor:
|
|
2854
|
+
style: [Q.modalHeader, { borderBottomColor: l.separator }],
|
|
2856
2855
|
children: [/* @__PURE__ */ T(R, {
|
|
2857
|
-
style: [Q.modalTitle, { color:
|
|
2858
|
-
children:
|
|
2856
|
+
style: [Q.modalTitle, { color: l.text }],
|
|
2857
|
+
children: i || e.data.name
|
|
2859
2858
|
}), /* @__PURE__ */ T(B, {
|
|
2860
|
-
onPress: () =>
|
|
2859
|
+
onPress: () => c(!1),
|
|
2861
2860
|
children: /* @__PURE__ */ T(R, {
|
|
2862
|
-
style: [Q.closeButton, { color:
|
|
2861
|
+
style: [Q.closeButton, { color: l.textMuted }],
|
|
2863
2862
|
children: "✕"
|
|
2864
2863
|
})
|
|
2865
2864
|
})]
|
|
@@ -2870,7 +2869,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2870
2869
|
/* @__PURE__ */ E(V, {
|
|
2871
2870
|
style: Q.pickerColumn,
|
|
2872
2871
|
children: [/* @__PURE__ */ T(R, {
|
|
2873
|
-
style: [Q.pickerLabel, { color:
|
|
2872
|
+
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
2874
2873
|
children: "Hour"
|
|
2875
2874
|
}), /* @__PURE__ */ T(I, {
|
|
2876
2875
|
ref: b,
|
|
@@ -2878,15 +2877,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2878
2877
|
contentContainerStyle: Q.pickerContent,
|
|
2879
2878
|
showsVerticalScrollIndicator: !1,
|
|
2880
2879
|
children: S.map((e) => /* @__PURE__ */ T(B, {
|
|
2881
|
-
style: [Q.pickerItem, g === e && { backgroundColor:
|
|
2880
|
+
style: [Q.pickerItem, g === e && { backgroundColor: l.primary }],
|
|
2882
2881
|
onPress: () => _(e),
|
|
2883
2882
|
activeOpacity: .7,
|
|
2884
2883
|
children: /* @__PURE__ */ T(R, {
|
|
2885
2884
|
style: [
|
|
2886
2885
|
Q.pickerItemText,
|
|
2887
|
-
{ color:
|
|
2886
|
+
{ color: l.text },
|
|
2888
2887
|
g === e && {
|
|
2889
|
-
color:
|
|
2888
|
+
color: l.background,
|
|
2890
2889
|
fontWeight: "600"
|
|
2891
2890
|
}
|
|
2892
2891
|
],
|
|
@@ -2896,13 +2895,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2896
2895
|
})]
|
|
2897
2896
|
}),
|
|
2898
2897
|
/* @__PURE__ */ T(R, {
|
|
2899
|
-
style: [Q.pickerSeparator, { color:
|
|
2898
|
+
style: [Q.pickerSeparator, { color: l.text }],
|
|
2900
2899
|
children: ":"
|
|
2901
2900
|
}),
|
|
2902
2901
|
/* @__PURE__ */ E(V, {
|
|
2903
2902
|
style: Q.pickerColumn,
|
|
2904
2903
|
children: [/* @__PURE__ */ T(R, {
|
|
2905
|
-
style: [Q.pickerLabel, { color:
|
|
2904
|
+
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
2906
2905
|
children: "Minute"
|
|
2907
2906
|
}), /* @__PURE__ */ T(I, {
|
|
2908
2907
|
ref: x,
|
|
@@ -2910,15 +2909,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2910
2909
|
contentContainerStyle: Q.pickerContent,
|
|
2911
2910
|
showsVerticalScrollIndicator: !1,
|
|
2912
2911
|
children: C.map((e) => /* @__PURE__ */ T(B, {
|
|
2913
|
-
style: [Q.pickerItem, v === e && { backgroundColor:
|
|
2912
|
+
style: [Q.pickerItem, v === e && { backgroundColor: l.primary }],
|
|
2914
2913
|
onPress: () => y(e),
|
|
2915
2914
|
activeOpacity: .7,
|
|
2916
2915
|
children: /* @__PURE__ */ T(R, {
|
|
2917
2916
|
style: [
|
|
2918
2917
|
Q.pickerItemText,
|
|
2919
|
-
{ color:
|
|
2918
|
+
{ color: l.text },
|
|
2920
2919
|
v === e && {
|
|
2921
|
-
color:
|
|
2920
|
+
color: l.background,
|
|
2922
2921
|
fontWeight: "600"
|
|
2923
2922
|
}
|
|
2924
2923
|
],
|
|
@@ -2930,11 +2929,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2930
2929
|
]
|
|
2931
2930
|
}),
|
|
2932
2931
|
/* @__PURE__ */ T(B, {
|
|
2933
|
-
style: [Q.confirmButton, { backgroundColor:
|
|
2932
|
+
style: [Q.confirmButton, { backgroundColor: l.primary }],
|
|
2934
2933
|
onPress: D,
|
|
2935
2934
|
activeOpacity: .7,
|
|
2936
2935
|
children: /* @__PURE__ */ T(R, {
|
|
2937
|
-
style: [Q.confirmButtonText, { color:
|
|
2936
|
+
style: [Q.confirmButtonText, { color: l.background }],
|
|
2938
2937
|
children: "Confirm"
|
|
2939
2938
|
})
|
|
2940
2939
|
})
|
|
@@ -2942,13 +2941,13 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
2942
2941
|
})
|
|
2943
2942
|
})
|
|
2944
2943
|
}),
|
|
2945
|
-
|
|
2946
|
-
style: [Q.error, { color:
|
|
2947
|
-
children:
|
|
2944
|
+
r && /* @__PURE__ */ T(R, {
|
|
2945
|
+
style: [Q.error, { color: l.error }],
|
|
2946
|
+
children: r
|
|
2948
2947
|
}),
|
|
2949
|
-
|
|
2950
|
-
style: [Q.helperText, { color:
|
|
2951
|
-
children:
|
|
2948
|
+
o && !r && /* @__PURE__ */ T(R, {
|
|
2949
|
+
style: [Q.helperText, { color: l.textMuted }],
|
|
2950
|
+
children: o
|
|
2952
2951
|
})
|
|
2953
2952
|
]
|
|
2954
2953
|
});
|
|
@@ -3043,27 +3042,27 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3043
3042
|
flex: 1,
|
|
3044
3043
|
fontSize: 14
|
|
3045
3044
|
}
|
|
3046
|
-
}), Le = ({ node:
|
|
3047
|
-
let [
|
|
3045
|
+
}), Le = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
3046
|
+
let [o, s] = A(!1), [c, l] = A(!0), u = b(), { colors: d } = m(), f = Array.isArray(t) ? t : [], p = f[0] || "", h = f[1] || "", g = p.split(":"), _ = Number.parseInt(g[0], 10), v = Number.parseInt(g[1], 10), y = Number.isNaN(_) ? 0 : _, x = Number.isNaN(v) ? 0 : v, S = h.split(":"), C = Number.parseInt(S[0], 10), w = Number.parseInt(S[1], 10), D = Number.isNaN(C) ? 0 : C, O = Number.isNaN(w) ? 0 : w, [k, j] = A(0), [M, N] = A(0), P = Array.from({ length: 24 }, (e, t) => t), L = Array.from({ length: 60 }, (e, t) => t), te = () => p && h ? `${p} - ${h}` : p || u("renderer.defaultInputs.selectDateRange"), z = ee(() => {
|
|
3048
3047
|
let e = `${String(k).padStart(2, "0")}:${String(M).padStart(2, "0")}`;
|
|
3049
|
-
|
|
3048
|
+
c ? (n([e, h]), l(!1), j(D || 0), N(O || 0)) : (n([p, e]), s(!1), l(!0));
|
|
3050
3049
|
}, [
|
|
3051
|
-
|
|
3050
|
+
c,
|
|
3052
3051
|
k,
|
|
3053
3052
|
M,
|
|
3054
|
-
|
|
3055
|
-
|
|
3053
|
+
p,
|
|
3054
|
+
h,
|
|
3056
3055
|
D,
|
|
3057
3056
|
O,
|
|
3058
|
-
|
|
3057
|
+
n
|
|
3059
3058
|
]);
|
|
3060
3059
|
return /* @__PURE__ */ E(V, {
|
|
3061
3060
|
style: $.container,
|
|
3062
3061
|
children: [
|
|
3063
3062
|
/* @__PURE__ */ E(R, {
|
|
3064
|
-
style: [$.label, { color:
|
|
3065
|
-
children: [
|
|
3066
|
-
style: { color:
|
|
3063
|
+
style: [$.label, { color: d.textSecondary }],
|
|
3064
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ T(R, {
|
|
3065
|
+
style: { color: d.error },
|
|
3067
3066
|
children: "*"
|
|
3068
3067
|
})]
|
|
3069
3068
|
}),
|
|
@@ -3071,20 +3070,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3071
3070
|
style: [
|
|
3072
3071
|
$.trigger,
|
|
3073
3072
|
{
|
|
3074
|
-
backgroundColor:
|
|
3075
|
-
borderColor:
|
|
3073
|
+
backgroundColor: d.input,
|
|
3074
|
+
borderColor: d.border
|
|
3076
3075
|
},
|
|
3077
|
-
|
|
3076
|
+
r && { borderColor: d.error }
|
|
3078
3077
|
],
|
|
3079
3078
|
onPress: () => {
|
|
3080
|
-
j(
|
|
3079
|
+
j(y || 0), N(x || 0), l(!0), s(!0);
|
|
3081
3080
|
},
|
|
3082
3081
|
activeOpacity: .7,
|
|
3083
3082
|
children: [/* @__PURE__ */ T(R, {
|
|
3084
3083
|
style: [
|
|
3085
3084
|
$.triggerText,
|
|
3086
|
-
{ color:
|
|
3087
|
-
!
|
|
3085
|
+
{ color: d.text },
|
|
3086
|
+
!p && { color: d.textMuted }
|
|
3088
3087
|
],
|
|
3089
3088
|
numberOfLines: 1,
|
|
3090
3089
|
children: te()
|
|
@@ -3094,37 +3093,37 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3094
3093
|
})]
|
|
3095
3094
|
}),
|
|
3096
3095
|
/* @__PURE__ */ T(F, {
|
|
3097
|
-
visible:
|
|
3096
|
+
visible: o,
|
|
3098
3097
|
transparent: !0,
|
|
3099
3098
|
animationType: "fade",
|
|
3100
|
-
onRequestClose: () =>
|
|
3099
|
+
onRequestClose: () => s(!1),
|
|
3101
3100
|
children: /* @__PURE__ */ T(B, {
|
|
3102
3101
|
style: $.modalOverlay,
|
|
3103
3102
|
activeOpacity: 1,
|
|
3104
|
-
onPress: () =>
|
|
3103
|
+
onPress: () => s(!1),
|
|
3105
3104
|
children: /* @__PURE__ */ E(B, {
|
|
3106
|
-
style: [$.modalContent, { backgroundColor:
|
|
3105
|
+
style: [$.modalContent, { backgroundColor: d.card }],
|
|
3107
3106
|
activeOpacity: 1,
|
|
3108
3107
|
onPress: () => {},
|
|
3109
3108
|
children: [
|
|
3110
3109
|
/* @__PURE__ */ E(V, {
|
|
3111
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3110
|
+
style: [$.modalHeader, { borderBottomColor: d.separator }],
|
|
3112
3111
|
children: [/* @__PURE__ */ T(R, {
|
|
3113
|
-
style: [$.modalTitle, { color:
|
|
3114
|
-
children:
|
|
3112
|
+
style: [$.modalTitle, { color: d.text }],
|
|
3113
|
+
children: i || e.data.name
|
|
3115
3114
|
}), /* @__PURE__ */ T(B, {
|
|
3116
|
-
onPress: () =>
|
|
3115
|
+
onPress: () => s(!1),
|
|
3117
3116
|
children: /* @__PURE__ */ T(R, {
|
|
3118
|
-
style: [$.closeButton, { color:
|
|
3117
|
+
style: [$.closeButton, { color: d.textMuted }],
|
|
3119
3118
|
children: "✕"
|
|
3120
3119
|
})
|
|
3121
3120
|
})]
|
|
3122
3121
|
}),
|
|
3123
3122
|
/* @__PURE__ */ T(V, {
|
|
3124
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3123
|
+
style: [$.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
3125
3124
|
children: /* @__PURE__ */ T(R, {
|
|
3126
|
-
style: [$.rangeIndicatorText, { color:
|
|
3127
|
-
children:
|
|
3125
|
+
style: [$.rangeIndicatorText, { color: d.primary }],
|
|
3126
|
+
children: u(c ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3128
3127
|
})
|
|
3129
3128
|
}),
|
|
3130
3129
|
/* @__PURE__ */ E(V, {
|
|
@@ -3133,22 +3132,22 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3133
3132
|
/* @__PURE__ */ E(V, {
|
|
3134
3133
|
style: $.pickerColumn,
|
|
3135
3134
|
children: [/* @__PURE__ */ T(R, {
|
|
3136
|
-
style: [$.pickerLabel, { color:
|
|
3135
|
+
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3137
3136
|
children: "Hour"
|
|
3138
3137
|
}), /* @__PURE__ */ T(I, {
|
|
3139
3138
|
style: $.picker,
|
|
3140
3139
|
contentContainerStyle: $.pickerContent,
|
|
3141
3140
|
showsVerticalScrollIndicator: !1,
|
|
3142
3141
|
children: P.map((e) => /* @__PURE__ */ T(B, {
|
|
3143
|
-
style: [$.pickerItem, k === e && { backgroundColor:
|
|
3142
|
+
style: [$.pickerItem, k === e && { backgroundColor: d.primary }],
|
|
3144
3143
|
onPress: () => j(e),
|
|
3145
3144
|
activeOpacity: .7,
|
|
3146
3145
|
children: /* @__PURE__ */ T(R, {
|
|
3147
3146
|
style: [
|
|
3148
3147
|
$.pickerItemText,
|
|
3149
|
-
{ color:
|
|
3148
|
+
{ color: d.text },
|
|
3150
3149
|
k === e && {
|
|
3151
|
-
color:
|
|
3150
|
+
color: d.background,
|
|
3152
3151
|
fontWeight: "600"
|
|
3153
3152
|
}
|
|
3154
3153
|
],
|
|
@@ -3158,28 +3157,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3158
3157
|
})]
|
|
3159
3158
|
}),
|
|
3160
3159
|
/* @__PURE__ */ T(R, {
|
|
3161
|
-
style: [$.pickerSeparator, { color:
|
|
3160
|
+
style: [$.pickerSeparator, { color: d.text }],
|
|
3162
3161
|
children: ":"
|
|
3163
3162
|
}),
|
|
3164
3163
|
/* @__PURE__ */ E(V, {
|
|
3165
3164
|
style: $.pickerColumn,
|
|
3166
3165
|
children: [/* @__PURE__ */ T(R, {
|
|
3167
|
-
style: [$.pickerLabel, { color:
|
|
3166
|
+
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3168
3167
|
children: "Minute"
|
|
3169
3168
|
}), /* @__PURE__ */ T(I, {
|
|
3170
3169
|
style: $.picker,
|
|
3171
3170
|
contentContainerStyle: $.pickerContent,
|
|
3172
3171
|
showsVerticalScrollIndicator: !1,
|
|
3173
3172
|
children: L.map((e) => /* @__PURE__ */ T(B, {
|
|
3174
|
-
style: [$.pickerItem, M === e && { backgroundColor:
|
|
3173
|
+
style: [$.pickerItem, M === e && { backgroundColor: d.primary }],
|
|
3175
3174
|
onPress: () => N(e),
|
|
3176
3175
|
activeOpacity: .7,
|
|
3177
3176
|
children: /* @__PURE__ */ T(R, {
|
|
3178
3177
|
style: [
|
|
3179
3178
|
$.pickerItemText,
|
|
3180
|
-
{ color:
|
|
3179
|
+
{ color: d.text },
|
|
3181
3180
|
M === e && {
|
|
3182
|
-
color:
|
|
3181
|
+
color: d.background,
|
|
3183
3182
|
fontWeight: "600"
|
|
3184
3183
|
}
|
|
3185
3184
|
],
|
|
@@ -3191,25 +3190,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3191
3190
|
]
|
|
3192
3191
|
}),
|
|
3193
3192
|
/* @__PURE__ */ T(B, {
|
|
3194
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3193
|
+
style: [$.confirmButton, { backgroundColor: d.primary }],
|
|
3195
3194
|
onPress: z,
|
|
3196
3195
|
activeOpacity: .7,
|
|
3197
3196
|
children: /* @__PURE__ */ T(R, {
|
|
3198
|
-
style: [$.confirmButtonText, { color:
|
|
3199
|
-
children:
|
|
3197
|
+
style: [$.confirmButtonText, { color: d.background }],
|
|
3198
|
+
children: c ? "Next" : "Confirm"
|
|
3200
3199
|
})
|
|
3201
3200
|
})
|
|
3202
3201
|
]
|
|
3203
3202
|
})
|
|
3204
3203
|
})
|
|
3205
3204
|
}),
|
|
3206
|
-
|
|
3207
|
-
style: [$.error, { color:
|
|
3208
|
-
children:
|
|
3205
|
+
r && /* @__PURE__ */ T(R, {
|
|
3206
|
+
style: [$.error, { color: d.error }],
|
|
3207
|
+
children: r
|
|
3209
3208
|
}),
|
|
3210
|
-
|
|
3211
|
-
style: [$.helperText, { color:
|
|
3212
|
-
children:
|
|
3209
|
+
a && !r && /* @__PURE__ */ T(R, {
|
|
3210
|
+
style: [$.helperText, { color: d.textMuted }],
|
|
3211
|
+
children: a
|
|
3213
3212
|
})
|
|
3214
3213
|
]
|
|
3215
3214
|
});
|
|
@@ -3337,23 +3336,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3337
3336
|
textarea: Me,
|
|
3338
3337
|
time: Ie,
|
|
3339
3338
|
timerange: Le
|
|
3340
|
-
}, Be = ({ children:
|
|
3341
|
-
let { colors:
|
|
3339
|
+
}, Be = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3340
|
+
let { colors: i } = m();
|
|
3342
3341
|
return /* @__PURE__ */ T(B, {
|
|
3343
3342
|
style: [
|
|
3344
3343
|
Ve.button,
|
|
3345
|
-
{ backgroundColor:
|
|
3346
|
-
(
|
|
3347
|
-
backgroundColor:
|
|
3344
|
+
{ backgroundColor: i.primary },
|
|
3345
|
+
(t || n) && {
|
|
3346
|
+
backgroundColor: i.primaryDisabled,
|
|
3348
3347
|
opacity: .6
|
|
3349
3348
|
}
|
|
3350
3349
|
],
|
|
3351
|
-
disabled:
|
|
3352
|
-
onPress:
|
|
3350
|
+
disabled: t || n,
|
|
3351
|
+
onPress: r,
|
|
3353
3352
|
activeOpacity: .7,
|
|
3354
|
-
children:
|
|
3355
|
-
style: [Ve.buttonText, { color:
|
|
3356
|
-
children:
|
|
3353
|
+
children: n ? /* @__PURE__ */ T(j, { color: i.primaryForeground }) : /* @__PURE__ */ T(R, {
|
|
3354
|
+
style: [Ve.buttonText, { color: i.primaryForeground }],
|
|
3355
|
+
children: e
|
|
3357
3356
|
})
|
|
3358
3357
|
});
|
|
3359
3358
|
}, Ve = L.create({
|
|
@@ -3369,15 +3368,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3369
3368
|
fontSize: 16,
|
|
3370
3369
|
fontWeight: "600"
|
|
3371
3370
|
}
|
|
3372
|
-
}), He = ({ children: e }) => e, Ue = ({ node:
|
|
3373
|
-
let
|
|
3371
|
+
}), He = ({ children: e }) => e, Ue = ({ node: e }) => {
|
|
3372
|
+
let t = b(), { colors: n } = m(), r = t(e.data?.label);
|
|
3374
3373
|
return /* @__PURE__ */ T(R, {
|
|
3375
|
-
style: [Ge.title, { color:
|
|
3376
|
-
children:
|
|
3374
|
+
style: [Ge.title, { color: n.text }],
|
|
3375
|
+
children: r
|
|
3377
3376
|
});
|
|
3378
3377
|
}, We = () => {
|
|
3379
|
-
let { colors:
|
|
3380
|
-
return /* @__PURE__ */ T(V, { style: [Ge.divider, { backgroundColor:
|
|
3378
|
+
let { colors: e } = m();
|
|
3379
|
+
return /* @__PURE__ */ T(V, { style: [Ge.divider, { backgroundColor: e.separator }] });
|
|
3381
3380
|
}, Ge = L.create({
|
|
3382
3381
|
divider: {
|
|
3383
3382
|
height: 1,
|
|
@@ -3392,20 +3391,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3392
3391
|
}), Ke = {
|
|
3393
3392
|
divider: We,
|
|
3394
3393
|
title: Ue
|
|
3395
|
-
}, qe = ({ components:
|
|
3396
|
-
let { colors:
|
|
3397
|
-
components:
|
|
3398
|
-
flows:
|
|
3399
|
-
googleApiKey:
|
|
3400
|
-
initialValues:
|
|
3401
|
-
language:
|
|
3402
|
-
onChange:
|
|
3403
|
-
onSubmit:
|
|
3404
|
-
theme:
|
|
3405
|
-
validate:
|
|
3406
|
-
validationMode:
|
|
3407
|
-
}), { FormWrapper: N, SubmitButton: P, SubmitButtonWrapper: F, renderNode: L } =
|
|
3408
|
-
config:
|
|
3394
|
+
}, qe = ({ components: e, contentContainerStyle: t, flows: n, googleApiKey: r, initialValues: i, language: a, onChange: o, onSubmit: s, style: c, theme: l, validate: u, validationMode: f }) => {
|
|
3395
|
+
let { colors: p } = m(), { canSubmit: h, clearSubmitMessage: v, config: y, formErrors: b, formValues: x, handleSubmit: S, inputNodes: C, isSubmitting: w, mergedFlow: ee, missingRequiredFields: D, setFieldValue: O, submitMessage: k, t: A, visibleNodes: j, visibleRootNodes: M } = d({
|
|
3396
|
+
components: e,
|
|
3397
|
+
flows: n,
|
|
3398
|
+
googleApiKey: r,
|
|
3399
|
+
initialValues: i,
|
|
3400
|
+
language: a,
|
|
3401
|
+
onChange: o,
|
|
3402
|
+
onSubmit: s,
|
|
3403
|
+
theme: l,
|
|
3404
|
+
validate: u,
|
|
3405
|
+
validationMode: f
|
|
3406
|
+
}), { FormWrapper: N, SubmitButton: P, SubmitButtonWrapper: F, renderNode: L } = _({
|
|
3407
|
+
config: y,
|
|
3409
3408
|
DefaultFormWrapper: ne,
|
|
3410
3409
|
DefaultGroup: ie,
|
|
3411
3410
|
DefaultSubmitButton: Be,
|
|
@@ -3422,18 +3421,18 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3422
3421
|
nestedScrollEnabled: !0,
|
|
3423
3422
|
style: [
|
|
3424
3423
|
Ye.container,
|
|
3425
|
-
{ backgroundColor:
|
|
3426
|
-
|
|
3424
|
+
{ backgroundColor: p.background },
|
|
3425
|
+
c
|
|
3427
3426
|
],
|
|
3428
|
-
contentContainerStyle:
|
|
3429
|
-
children: /* @__PURE__ */ E(
|
|
3427
|
+
contentContainerStyle: t,
|
|
3428
|
+
children: /* @__PURE__ */ E(g, {
|
|
3430
3429
|
value: {
|
|
3431
3430
|
flows: ee,
|
|
3432
3431
|
formErrors: b,
|
|
3433
3432
|
formValues: x,
|
|
3434
|
-
googleApiKey:
|
|
3433
|
+
googleApiKey: y.googleApiKey,
|
|
3435
3434
|
inputNodes: C,
|
|
3436
|
-
language:
|
|
3435
|
+
language: y.language,
|
|
3437
3436
|
setFieldValue: O
|
|
3438
3437
|
},
|
|
3439
3438
|
children: [/* @__PURE__ */ E(N, {
|
|
@@ -3450,24 +3449,24 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3450
3449
|
})
|
|
3451
3450
|
}),
|
|
3452
3451
|
/* @__PURE__ */ T(R, {
|
|
3453
|
-
style: [Ye.poweredBy, { color:
|
|
3452
|
+
style: [Ye.poweredBy, { color: p.textMuted }],
|
|
3454
3453
|
children: "Powered by Treege"
|
|
3455
3454
|
})
|
|
3456
3455
|
]
|
|
3457
3456
|
}), k && /* @__PURE__ */ E(V, {
|
|
3458
|
-
style: [Ye.message, { backgroundColor: k.type === "success" ?
|
|
3457
|
+
style: [Ye.message, { backgroundColor: k.type === "success" ? p.successBg : p.errorBg }],
|
|
3459
3458
|
children: [/* @__PURE__ */ T(R, {
|
|
3460
|
-
style: [Ye.messageText, { color: k.type === "success" ?
|
|
3459
|
+
style: [Ye.messageText, { color: k.type === "success" ? p.success : p.error }],
|
|
3461
3460
|
children: k.message
|
|
3462
3461
|
}), /* @__PURE__ */ T(R, {
|
|
3463
|
-
style: [Ye.messageClose, { color: k.type === "success" ?
|
|
3464
|
-
onPress:
|
|
3462
|
+
style: [Ye.messageClose, { color: k.type === "success" ? p.success : p.error }],
|
|
3463
|
+
onPress: v,
|
|
3465
3464
|
children: A("common.close")
|
|
3466
3465
|
})]
|
|
3467
3466
|
})]
|
|
3468
3467
|
})
|
|
3469
3468
|
});
|
|
3470
|
-
}, Je = (e) => /* @__PURE__ */ T(
|
|
3469
|
+
}, Je = (e) => /* @__PURE__ */ T(y, {
|
|
3471
3470
|
theme: e.theme,
|
|
3472
3471
|
storageKey: "treege-renderer-theme",
|
|
3473
3472
|
children: /* @__PURE__ */ T(qe, { ...e })
|
|
@@ -3494,4 +3493,4 @@ var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
|
3494
3493
|
}
|
|
3495
3494
|
});
|
|
3496
3495
|
//#endregion
|
|
3497
|
-
export { H as DefaultAddressInput, ce as DefaultAutocompleteInput, le as DefaultCheckboxInput, ue as DefaultDateInput, de as DefaultDateRangeInput, We as DefaultDividerUI, fe as DefaultFileInput, pe as DefaultHiddenInput, Ce as DefaultHttpInput, we as DefaultNumberInput, Ee as DefaultPasswordInput, Oe as DefaultRadioInput, ke as DefaultSelectInput, Re as DefaultSubmitInput, Ae as DefaultSwitchInput, Pe as DefaultTextInput, Me as DefaultTextareaInput, Ie as DefaultTimeInput, Le as DefaultTimeRangeInput, Ue as DefaultTitleUI,
|
|
3496
|
+
export { H as DefaultAddressInput, ce as DefaultAutocompleteInput, le as DefaultCheckboxInput, ue as DefaultDateInput, de as DefaultDateRangeInput, We as DefaultDividerUI, fe as DefaultFileInput, pe as DefaultHiddenInput, Ce as DefaultHttpInput, we as DefaultNumberInput, Ee as DefaultPasswordInput, Oe as DefaultRadioInput, ke as DefaultSelectInput, Re as DefaultSubmitInput, Ae as DefaultSwitchInput, Pe as DefaultTextInput, Me as DefaultTextareaInput, Ie as DefaultTimeInput, Le as DefaultTimeRangeInput, Ue as DefaultTitleUI, o as TreegeConfigProvider, Je as TreegeRenderer, w as applyReferenceTransformation, s as calculateReferenceFieldUpdates, C as checkFormFieldHasValue, i as convertFormValuesToNamedFormat, ze as defaultInputRenderers, Ke as defaultUI, t as evaluateCondition, r as evaluateConditions, v as fileToSerializable, c as filesToSerializable, u as findStartNode, l as getFlowRenderState, n as getTranslatedText, e as isFieldEmpty, a as isStartNode, x as mergeFlows, ge as sanitize, ve as sanitizeHttpResponse, f as serializableToFile, h as useTreegeConfig, d as useTreegeRenderer };
|