treege 3.0.0-beta.31 → 3.0.0-beta.33
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/{ThemeContext-Cw-S1U8B.js → ThemeContext-DBFles56.js} +48 -225
- package/dist/{editor-Bs1sHj4p.js → editor-5TMX4qqC.js} +1093 -1092
- package/dist/editor.js +3 -3
- package/dist/main.js +5 -5
- package/dist/renderer-JJGxelGQ.js +1199 -0
- package/dist/renderer-native.js +675 -674
- package/dist/renderer.js +3 -3
- package/dist/{separator-B9rc85M6.js → separator-Cdfv5nIR.js} +181 -181
- package/dist/{useRenderNode-IL6mmCOS.js → useRenderNode-BTzgPipn.js} +148 -147
- package/package.json +2 -2
- package/dist/renderer-CsU2Y0iu.js +0 -1204
package/dist/renderer-native.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { n as e, s as t, t as n } from "./ThemeContext-DBFles56.js";
|
|
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-BTzgPipn.js";
|
|
3
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
4
|
+
import { useCallback as ee, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
5
|
+
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";
|
|
5
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var
|
|
7
|
-
style:
|
|
7
|
+
var ne = ({ children: e }) => /* @__PURE__ */ T(V, {
|
|
8
|
+
style: re.container,
|
|
8
9
|
children: e
|
|
9
|
-
}),
|
|
10
|
-
let r =
|
|
11
|
-
return /* @__PURE__ */ (
|
|
12
|
-
style:
|
|
13
|
-
children: [a && /* @__PURE__ */ (
|
|
14
|
-
style: [
|
|
10
|
+
}), re = L.create({ container: { padding: 16 } }), ie = ({ children: t, node: n }) => {
|
|
11
|
+
let r = h(), { colors: i } = e(), a = r(n.data.label);
|
|
12
|
+
return /* @__PURE__ */ E(V, {
|
|
13
|
+
style: ae.container,
|
|
14
|
+
children: [a && /* @__PURE__ */ T(R, {
|
|
15
|
+
style: [ae.label, { color: i.text }],
|
|
15
16
|
children: a
|
|
16
|
-
}), /* @__PURE__ */ (
|
|
17
|
-
style:
|
|
18
|
-
children:
|
|
17
|
+
}), /* @__PURE__ */ T(V, {
|
|
18
|
+
style: ae.content,
|
|
19
|
+
children: t
|
|
19
20
|
})]
|
|
20
21
|
});
|
|
21
|
-
},
|
|
22
|
+
}, ae = L.create({
|
|
22
23
|
container: { marginBottom: 16 },
|
|
23
24
|
content: { gap: 8 },
|
|
24
25
|
label: {
|
|
@@ -26,7 +27,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
26
27
|
fontWeight: "600",
|
|
27
28
|
marginBottom: 12
|
|
28
29
|
}
|
|
29
|
-
}),
|
|
30
|
+
}), oe = async (e, t) => {
|
|
30
31
|
if (!e || e.trim().length < 3) return [];
|
|
31
32
|
try {
|
|
32
33
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -41,7 +42,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
41
42
|
} catch (e) {
|
|
42
43
|
return console.error("Nominatim fetch error:", e), [];
|
|
43
44
|
}
|
|
44
|
-
},
|
|
45
|
+
}, se = async (e, t) => {
|
|
45
46
|
if (!e || e.trim().length < 3) return [];
|
|
46
47
|
try {
|
|
47
48
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -54,10 +55,10 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
54
55
|
} catch (e) {
|
|
55
56
|
return console.error("Google Places fetch error:", e), [];
|
|
56
57
|
}
|
|
57
|
-
},
|
|
58
|
-
let [d, f] = A(""), [p, m] = A([]), [
|
|
58
|
+
}, H = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, id: l, name: u }) => {
|
|
59
|
+
let [d, f] = A(""), [p, m] = A([]), [g, _] = A(!1), [v, y] = A(!1), { language: b, googleApiKey: x } = c(), S = h(), { colors: C } = e(), w = ee((e) => {
|
|
59
60
|
r(e.value), f(""), _(!1), m([]);
|
|
60
|
-
}, [r]),
|
|
61
|
+
}, [r]), O = () => {
|
|
61
62
|
_(!1);
|
|
62
63
|
};
|
|
63
64
|
return D(() => {
|
|
@@ -67,7 +68,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
67
68
|
}
|
|
68
69
|
y(!0);
|
|
69
70
|
let e = setTimeout(async () => {
|
|
70
|
-
m(x ? await
|
|
71
|
+
m(x ? await se(d, x) : await oe(d, b)), y(!1);
|
|
71
72
|
}, 300);
|
|
72
73
|
return () => {
|
|
73
74
|
clearTimeout(e), y(!1);
|
|
@@ -76,19 +77,19 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
76
77
|
d,
|
|
77
78
|
b,
|
|
78
79
|
x
|
|
79
|
-
]), /* @__PURE__ */ (
|
|
80
|
-
style:
|
|
80
|
+
]), /* @__PURE__ */ E(V, {
|
|
81
|
+
style: U.container,
|
|
81
82
|
children: [
|
|
82
|
-
/* @__PURE__ */ (
|
|
83
|
-
style: [
|
|
84
|
-
children: [a ||
|
|
83
|
+
/* @__PURE__ */ E(R, {
|
|
84
|
+
style: [U.label, { color: C.textSecondary }],
|
|
85
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
85
86
|
style: { color: C.error },
|
|
86
87
|
children: "*"
|
|
87
88
|
})]
|
|
88
89
|
}),
|
|
89
|
-
/* @__PURE__ */ (
|
|
90
|
+
/* @__PURE__ */ E(B, {
|
|
90
91
|
style: [
|
|
91
|
-
|
|
92
|
+
U.trigger,
|
|
92
93
|
{
|
|
93
94
|
backgroundColor: C.input,
|
|
94
95
|
borderColor: C.border
|
|
@@ -97,50 +98,50 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
97
98
|
],
|
|
98
99
|
onPress: () => _(!0),
|
|
99
100
|
activeOpacity: .7,
|
|
100
|
-
children: [/* @__PURE__ */ (
|
|
101
|
+
children: [/* @__PURE__ */ T(R, {
|
|
101
102
|
style: [
|
|
102
|
-
|
|
103
|
+
U.triggerText,
|
|
103
104
|
{ color: C.text },
|
|
104
105
|
!n && { color: C.textMuted }
|
|
105
106
|
],
|
|
106
107
|
numberOfLines: 1,
|
|
107
108
|
children: n || o || S("renderer.defaultAddressInput.enterAddress")
|
|
108
|
-
}), /* @__PURE__ */ (
|
|
109
|
-
style:
|
|
109
|
+
}), /* @__PURE__ */ T(R, {
|
|
110
|
+
style: U.icon,
|
|
110
111
|
children: "📍"
|
|
111
112
|
})]
|
|
112
113
|
}),
|
|
113
|
-
/* @__PURE__ */ (
|
|
114
|
-
visible:
|
|
114
|
+
/* @__PURE__ */ T(F, {
|
|
115
|
+
visible: g,
|
|
115
116
|
transparent: !0,
|
|
116
117
|
animationType: "fade",
|
|
117
|
-
onRequestClose:
|
|
118
|
-
children: /* @__PURE__ */ (
|
|
119
|
-
style:
|
|
118
|
+
onRequestClose: O,
|
|
119
|
+
children: /* @__PURE__ */ T(B, {
|
|
120
|
+
style: U.modalOverlay,
|
|
120
121
|
activeOpacity: 1,
|
|
121
|
-
onPress:
|
|
122
|
-
children: /* @__PURE__ */ (
|
|
123
|
-
style: [
|
|
122
|
+
onPress: O,
|
|
123
|
+
children: /* @__PURE__ */ E(B, {
|
|
124
|
+
style: [U.modalContent, { backgroundColor: C.card }],
|
|
124
125
|
activeOpacity: 1,
|
|
125
126
|
onPress: () => {},
|
|
126
127
|
children: [
|
|
127
|
-
/* @__PURE__ */ (
|
|
128
|
-
style: [
|
|
129
|
-
children: [/* @__PURE__ */ (
|
|
130
|
-
style: [
|
|
131
|
-
children: a ||
|
|
132
|
-
}), /* @__PURE__ */ (
|
|
133
|
-
onPress:
|
|
134
|
-
children: /* @__PURE__ */ (
|
|
135
|
-
style: [
|
|
128
|
+
/* @__PURE__ */ E(V, {
|
|
129
|
+
style: [U.modalHeader, { borderBottomColor: C.separator }],
|
|
130
|
+
children: [/* @__PURE__ */ T(R, {
|
|
131
|
+
style: [U.modalTitle, { color: C.text }],
|
|
132
|
+
children: a || t.data.name
|
|
133
|
+
}), /* @__PURE__ */ T(B, {
|
|
134
|
+
onPress: O,
|
|
135
|
+
children: /* @__PURE__ */ T(R, {
|
|
136
|
+
style: [U.closeButton, { color: C.textMuted }],
|
|
136
137
|
children: "✕"
|
|
137
138
|
})
|
|
138
139
|
})]
|
|
139
140
|
}),
|
|
140
|
-
/* @__PURE__ */ (
|
|
141
|
-
style:
|
|
142
|
-
children: [/* @__PURE__ */ (
|
|
143
|
-
style: [
|
|
141
|
+
/* @__PURE__ */ E(V, {
|
|
142
|
+
style: U.searchContainer,
|
|
143
|
+
children: [/* @__PURE__ */ T(z, {
|
|
144
|
+
style: [U.searchInput, {
|
|
144
145
|
backgroundColor: C.muted,
|
|
145
146
|
borderColor: C.border,
|
|
146
147
|
color: C.text
|
|
@@ -152,49 +153,49 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
152
153
|
autoFocus: !0,
|
|
153
154
|
autoCapitalize: "none",
|
|
154
155
|
autoCorrect: !1
|
|
155
|
-
}), v && /* @__PURE__ */ (
|
|
156
|
+
}), v && /* @__PURE__ */ T(j, {
|
|
156
157
|
size: "small",
|
|
157
158
|
color: C.primary,
|
|
158
|
-
style:
|
|
159
|
+
style: U.searchLoader
|
|
159
160
|
})]
|
|
160
161
|
}),
|
|
161
|
-
v ? /* @__PURE__ */ (
|
|
162
|
-
style:
|
|
163
|
-
children: [/* @__PURE__ */ (
|
|
162
|
+
v ? /* @__PURE__ */ E(V, {
|
|
163
|
+
style: U.loadingContainer,
|
|
164
|
+
children: [/* @__PURE__ */ T(j, {
|
|
164
165
|
size: "small",
|
|
165
166
|
color: C.primary
|
|
166
|
-
}), /* @__PURE__ */ (
|
|
167
|
-
style: [
|
|
167
|
+
}), /* @__PURE__ */ T(R, {
|
|
168
|
+
style: [U.loadingText, { color: C.textMuted }],
|
|
168
169
|
children: S("renderer.defaultAddressInput.searching")
|
|
169
170
|
})]
|
|
170
|
-
}) : /* @__PURE__ */ (
|
|
171
|
+
}) : /* @__PURE__ */ T(N, {
|
|
171
172
|
data: p,
|
|
172
173
|
keyExtractor: (e, t) => t.toString(),
|
|
173
|
-
style:
|
|
174
|
-
contentContainerStyle:
|
|
174
|
+
style: U.suggestionsList,
|
|
175
|
+
contentContainerStyle: U.suggestionsListContent,
|
|
175
176
|
keyboardShouldPersistTaps: "handled",
|
|
176
|
-
ListEmptyComponent: d.length >= 3 ? /* @__PURE__ */ (
|
|
177
|
-
style:
|
|
178
|
-
children: /* @__PURE__ */ (
|
|
179
|
-
style: [
|
|
177
|
+
ListEmptyComponent: d.length >= 3 ? /* @__PURE__ */ T(V, {
|
|
178
|
+
style: U.emptyContainer,
|
|
179
|
+
children: /* @__PURE__ */ T(R, {
|
|
180
|
+
style: [U.emptyText, { color: C.textMuted }],
|
|
180
181
|
children: S("renderer.defaultAddressInput.noAddressesFound")
|
|
181
182
|
})
|
|
182
|
-
}) : /* @__PURE__ */ (
|
|
183
|
-
style:
|
|
184
|
-
children: /* @__PURE__ */ (
|
|
185
|
-
style: [
|
|
183
|
+
}) : /* @__PURE__ */ T(V, {
|
|
184
|
+
style: U.emptyContainer,
|
|
185
|
+
children: /* @__PURE__ */ T(R, {
|
|
186
|
+
style: [U.emptyText, { color: C.textMuted }],
|
|
186
187
|
children: S("renderer.defaultAddressInput.typeMinChars")
|
|
187
188
|
})
|
|
188
189
|
}),
|
|
189
|
-
renderItem: ({ item: e }) => /* @__PURE__ */ (
|
|
190
|
-
style:
|
|
190
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ E(B, {
|
|
191
|
+
style: U.suggestionItem,
|
|
191
192
|
onPress: () => w(e),
|
|
192
193
|
activeOpacity: .7,
|
|
193
|
-
children: [/* @__PURE__ */ (
|
|
194
|
-
style:
|
|
194
|
+
children: [/* @__PURE__ */ T(R, {
|
|
195
|
+
style: U.suggestionIcon,
|
|
195
196
|
children: "📍"
|
|
196
|
-
}), /* @__PURE__ */ (
|
|
197
|
-
style: [
|
|
197
|
+
}), /* @__PURE__ */ T(R, {
|
|
198
|
+
style: [U.suggestionText, { color: C.text }],
|
|
198
199
|
numberOfLines: 2,
|
|
199
200
|
children: e.label
|
|
200
201
|
})]
|
|
@@ -204,17 +205,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
204
205
|
})
|
|
205
206
|
})
|
|
206
207
|
}),
|
|
207
|
-
i && /* @__PURE__ */ (
|
|
208
|
-
style: [
|
|
208
|
+
i && /* @__PURE__ */ T(R, {
|
|
209
|
+
style: [U.error, { color: C.error }],
|
|
209
210
|
children: i
|
|
210
211
|
}),
|
|
211
|
-
s && !i && /* @__PURE__ */ (
|
|
212
|
-
style: [
|
|
212
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
213
|
+
style: [U.helperText, { color: C.textMuted }],
|
|
213
214
|
children: s
|
|
214
215
|
})
|
|
215
216
|
]
|
|
216
217
|
});
|
|
217
|
-
},
|
|
218
|
+
}, U = L.create({
|
|
218
219
|
closeButton: {
|
|
219
220
|
fontSize: 24,
|
|
220
221
|
fontWeight: "300"
|
|
@@ -324,8 +325,8 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
324
325
|
flex: 1,
|
|
325
326
|
fontSize: 14
|
|
326
327
|
}
|
|
327
|
-
}),
|
|
328
|
-
let [c, l] = A(!1), [u, d] = A(""), f =
|
|
328
|
+
}), ce = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s }) => {
|
|
329
|
+
let [c, l] = A(!1), [u, d] = A(""), f = h(), { colors: p } = e(), m = t.data.options || [], g = m.find((e) => e.value === n), _ = O(() => {
|
|
329
330
|
if (!u.trim()) return m;
|
|
330
331
|
let e = u.toLowerCase();
|
|
331
332
|
return m.filter((t) => f(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
@@ -338,19 +339,19 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
338
339
|
}, y = () => {
|
|
339
340
|
l(!1), d("");
|
|
340
341
|
};
|
|
341
|
-
return /* @__PURE__ */ (
|
|
342
|
-
style:
|
|
342
|
+
return /* @__PURE__ */ E(V, {
|
|
343
|
+
style: W.container,
|
|
343
344
|
children: [
|
|
344
|
-
/* @__PURE__ */ (
|
|
345
|
-
style: [
|
|
346
|
-
children: [a ||
|
|
345
|
+
/* @__PURE__ */ E(R, {
|
|
346
|
+
style: [W.label, { color: p.textSecondary }],
|
|
347
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
347
348
|
style: { color: p.error },
|
|
348
349
|
children: "*"
|
|
349
350
|
})]
|
|
350
351
|
}),
|
|
351
|
-
/* @__PURE__ */ (
|
|
352
|
+
/* @__PURE__ */ E(B, {
|
|
352
353
|
style: [
|
|
353
|
-
|
|
354
|
+
W.trigger,
|
|
354
355
|
{
|
|
355
356
|
backgroundColor: p.input,
|
|
356
357
|
borderColor: p.border
|
|
@@ -359,50 +360,50 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
359
360
|
],
|
|
360
361
|
onPress: () => l(!0),
|
|
361
362
|
activeOpacity: .7,
|
|
362
|
-
children: [/* @__PURE__ */ (
|
|
363
|
+
children: [/* @__PURE__ */ T(R, {
|
|
363
364
|
style: [
|
|
364
|
-
|
|
365
|
+
W.triggerText,
|
|
365
366
|
{ color: p.text },
|
|
366
367
|
!n && { color: p.textMuted }
|
|
367
368
|
],
|
|
368
369
|
numberOfLines: 1,
|
|
369
|
-
children: n &&
|
|
370
|
-
}), /* @__PURE__ */ (
|
|
371
|
-
style: [
|
|
370
|
+
children: n && g ? f(g.label) : o || f("renderer.defaultAutocompleteInput.selectOption")
|
|
371
|
+
}), /* @__PURE__ */ T(R, {
|
|
372
|
+
style: [W.arrow, { color: p.textMuted }],
|
|
372
373
|
children: "▼"
|
|
373
374
|
})]
|
|
374
375
|
}),
|
|
375
|
-
/* @__PURE__ */ (
|
|
376
|
+
/* @__PURE__ */ T(F, {
|
|
376
377
|
visible: c,
|
|
377
378
|
transparent: !0,
|
|
378
379
|
animationType: "fade",
|
|
379
380
|
onRequestClose: y,
|
|
380
|
-
children: /* @__PURE__ */ (
|
|
381
|
-
style:
|
|
381
|
+
children: /* @__PURE__ */ T(B, {
|
|
382
|
+
style: W.modalOverlay,
|
|
382
383
|
activeOpacity: 1,
|
|
383
384
|
onPress: y,
|
|
384
|
-
children: /* @__PURE__ */ (
|
|
385
|
-
style: [
|
|
385
|
+
children: /* @__PURE__ */ E(B, {
|
|
386
|
+
style: [W.modalContent, { backgroundColor: p.card }],
|
|
386
387
|
activeOpacity: 1,
|
|
387
388
|
onPress: () => {},
|
|
388
389
|
children: [
|
|
389
|
-
/* @__PURE__ */ (
|
|
390
|
-
style: [
|
|
391
|
-
children: [/* @__PURE__ */ (
|
|
392
|
-
style: [
|
|
393
|
-
children: a ||
|
|
394
|
-
}), /* @__PURE__ */ (
|
|
390
|
+
/* @__PURE__ */ E(V, {
|
|
391
|
+
style: [W.modalHeader, { borderBottomColor: p.separator }],
|
|
392
|
+
children: [/* @__PURE__ */ T(R, {
|
|
393
|
+
style: [W.modalTitle, { color: p.text }],
|
|
394
|
+
children: a || t.data.name
|
|
395
|
+
}), /* @__PURE__ */ T(B, {
|
|
395
396
|
onPress: y,
|
|
396
|
-
children: /* @__PURE__ */ (
|
|
397
|
-
style: [
|
|
397
|
+
children: /* @__PURE__ */ T(R, {
|
|
398
|
+
style: [W.closeButton, { color: p.textMuted }],
|
|
398
399
|
children: "✕"
|
|
399
400
|
})
|
|
400
401
|
})]
|
|
401
402
|
}),
|
|
402
|
-
/* @__PURE__ */ (
|
|
403
|
-
style:
|
|
404
|
-
children: /* @__PURE__ */ (
|
|
405
|
-
style: [
|
|
403
|
+
/* @__PURE__ */ T(V, {
|
|
404
|
+
style: W.searchContainer,
|
|
405
|
+
children: /* @__PURE__ */ T(z, {
|
|
406
|
+
style: [W.searchInput, {
|
|
406
407
|
backgroundColor: p.muted,
|
|
407
408
|
borderColor: p.border,
|
|
408
409
|
color: p.text
|
|
@@ -416,34 +417,34 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
416
417
|
autoCorrect: !1
|
|
417
418
|
})
|
|
418
419
|
}),
|
|
419
|
-
/* @__PURE__ */ (
|
|
420
|
+
/* @__PURE__ */ T(N, {
|
|
420
421
|
data: _,
|
|
421
422
|
keyExtractor: (e) => e.value,
|
|
422
|
-
style:
|
|
423
|
-
contentContainerStyle:
|
|
424
|
-
ListEmptyComponent: /* @__PURE__ */ (
|
|
425
|
-
style:
|
|
426
|
-
children: /* @__PURE__ */ (
|
|
427
|
-
style: [
|
|
423
|
+
style: W.optionsList,
|
|
424
|
+
contentContainerStyle: W.optionsListContent,
|
|
425
|
+
ListEmptyComponent: /* @__PURE__ */ T(V, {
|
|
426
|
+
style: W.emptyContainer,
|
|
427
|
+
children: /* @__PURE__ */ T(R, {
|
|
428
|
+
style: [W.emptyText, { color: p.textMuted }],
|
|
428
429
|
children: f("renderer.defaultAutocompleteInput.noResults")
|
|
429
430
|
})
|
|
430
431
|
}),
|
|
431
432
|
renderItem: ({ item: e }) => {
|
|
432
433
|
let t = e.value === n;
|
|
433
|
-
return /* @__PURE__ */ (
|
|
434
|
-
style: [
|
|
434
|
+
return /* @__PURE__ */ E(B, {
|
|
435
|
+
style: [W.option, t && { backgroundColor: p.primaryLight }],
|
|
435
436
|
onPress: () => v(e.value),
|
|
436
437
|
disabled: e.disabled,
|
|
437
438
|
activeOpacity: .7,
|
|
438
|
-
children: [/* @__PURE__ */ (
|
|
439
|
+
children: [/* @__PURE__ */ T(R, {
|
|
439
440
|
style: [
|
|
440
|
-
|
|
441
|
+
W.optionText,
|
|
441
442
|
{ color: p.text },
|
|
442
443
|
e.disabled && { color: p.textMuted }
|
|
443
444
|
],
|
|
444
445
|
children: f(e.label)
|
|
445
|
-
}), t && /* @__PURE__ */ (
|
|
446
|
-
style: [
|
|
446
|
+
}), t && /* @__PURE__ */ T(R, {
|
|
447
|
+
style: [W.checkmark, { color: p.primary }],
|
|
447
448
|
children: "✓"
|
|
448
449
|
})]
|
|
449
450
|
});
|
|
@@ -453,17 +454,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
453
454
|
})
|
|
454
455
|
})
|
|
455
456
|
}),
|
|
456
|
-
i && /* @__PURE__ */ (
|
|
457
|
-
style: [
|
|
457
|
+
i && /* @__PURE__ */ T(R, {
|
|
458
|
+
style: [W.error, { color: p.error }],
|
|
458
459
|
children: i
|
|
459
460
|
}),
|
|
460
|
-
s && !i && /* @__PURE__ */ (
|
|
461
|
-
style: [
|
|
461
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
462
|
+
style: [W.helperText, { color: p.textMuted }],
|
|
462
463
|
children: s
|
|
463
464
|
})
|
|
464
465
|
]
|
|
465
466
|
});
|
|
466
|
-
},
|
|
467
|
+
}, W = L.create({
|
|
467
468
|
arrow: { fontSize: 12 },
|
|
468
469
|
checkmark: {
|
|
469
470
|
fontSize: 18,
|
|
@@ -554,23 +555,23 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
554
555
|
flex: 1,
|
|
555
556
|
fontSize: 14
|
|
556
557
|
}
|
|
557
|
-
}),
|
|
558
|
-
let s =
|
|
558
|
+
}), le = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
559
|
+
let s = h(), { colors: c } = e(), l = t.data.options || [], u = l.length > 0, d = Array.isArray(n) ? n : [], f = typeof n == "boolean" ? n : !1, p = (e) => {
|
|
559
560
|
r(u ? d.includes(e) ? d.filter((t) => t !== e) : [...d, e] : !f);
|
|
560
561
|
}, m = (e) => u ? d.includes(e) : f;
|
|
561
|
-
return /* @__PURE__ */ (
|
|
562
|
+
return /* @__PURE__ */ E(V, {
|
|
562
563
|
style: G.container,
|
|
563
564
|
children: [
|
|
564
|
-
/* @__PURE__ */ (
|
|
565
|
+
/* @__PURE__ */ E(R, {
|
|
565
566
|
style: [G.label, { color: c.textSecondary }],
|
|
566
|
-
children: [a ||
|
|
567
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
567
568
|
style: { color: c.error },
|
|
568
569
|
children: "*"
|
|
569
570
|
})]
|
|
570
571
|
}),
|
|
571
572
|
l.length > 0 ? l.map((e) => {
|
|
572
573
|
let t = s(e.description);
|
|
573
|
-
return /* @__PURE__ */ (
|
|
574
|
+
return /* @__PURE__ */ E(B, {
|
|
574
575
|
style: G.option,
|
|
575
576
|
onPress: () => p(e.value),
|
|
576
577
|
disabled: e.disabled,
|
|
@@ -582,7 +583,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
582
583
|
disabled: e.disabled
|
|
583
584
|
},
|
|
584
585
|
accessibilityLabel: s(e.label) || e.value,
|
|
585
|
-
children: [/* @__PURE__ */ (
|
|
586
|
+
children: [/* @__PURE__ */ T(V, {
|
|
586
587
|
style: [
|
|
587
588
|
G.checkbox,
|
|
588
589
|
{
|
|
@@ -594,34 +595,34 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
594
595
|
borderColor: c.primary
|
|
595
596
|
}
|
|
596
597
|
],
|
|
597
|
-
children: m(e.value) && /* @__PURE__ */ (
|
|
598
|
+
children: m(e.value) && /* @__PURE__ */ T(R, {
|
|
598
599
|
style: G.checkmark,
|
|
599
600
|
children: "✓"
|
|
600
601
|
})
|
|
601
|
-
}), /* @__PURE__ */ (
|
|
602
|
+
}), /* @__PURE__ */ E(V, {
|
|
602
603
|
style: G.optionTextContainer,
|
|
603
|
-
children: [/* @__PURE__ */ (
|
|
604
|
+
children: [/* @__PURE__ */ T(R, {
|
|
604
605
|
style: [
|
|
605
606
|
G.optionLabel,
|
|
606
607
|
{ color: c.textSecondary },
|
|
607
608
|
e.disabled && { color: c.textMuted }
|
|
608
609
|
],
|
|
609
610
|
children: s(e.label) || e.value
|
|
610
|
-
}), t && /* @__PURE__ */ (
|
|
611
|
+
}), t && /* @__PURE__ */ T(R, {
|
|
611
612
|
style: [G.optionDescription, { color: c.textMuted }],
|
|
612
613
|
children: t
|
|
613
614
|
})]
|
|
614
615
|
})]
|
|
615
616
|
}, e.value);
|
|
616
|
-
}) : /* @__PURE__ */ (
|
|
617
|
+
}) : /* @__PURE__ */ E(B, {
|
|
617
618
|
style: G.option,
|
|
618
619
|
onPress: () => p(""),
|
|
619
620
|
activeOpacity: .7,
|
|
620
621
|
accessible: !0,
|
|
621
622
|
accessibilityRole: "checkbox",
|
|
622
623
|
accessibilityState: { checked: f },
|
|
623
|
-
accessibilityLabel: a ||
|
|
624
|
-
children: [/* @__PURE__ */ (
|
|
624
|
+
accessibilityLabel: a || t.data.name,
|
|
625
|
+
children: [/* @__PURE__ */ T(V, {
|
|
625
626
|
style: [
|
|
626
627
|
G.checkbox,
|
|
627
628
|
{
|
|
@@ -633,26 +634,26 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
633
634
|
borderColor: c.primary
|
|
634
635
|
}
|
|
635
636
|
],
|
|
636
|
-
children: f && /* @__PURE__ */ (
|
|
637
|
+
children: f && /* @__PURE__ */ T(R, {
|
|
637
638
|
style: G.checkmark,
|
|
638
639
|
children: "✓"
|
|
639
640
|
})
|
|
640
|
-
}), /* @__PURE__ */ (
|
|
641
|
+
}), /* @__PURE__ */ T(R, {
|
|
641
642
|
style: [G.optionLabel, { color: c.textSecondary }],
|
|
642
|
-
children: a ||
|
|
643
|
+
children: a || t.data.name
|
|
643
644
|
})]
|
|
644
645
|
}),
|
|
645
|
-
i && /* @__PURE__ */ (
|
|
646
|
+
i && /* @__PURE__ */ T(R, {
|
|
646
647
|
style: [G.error, { color: c.error }],
|
|
647
648
|
children: i
|
|
648
649
|
}),
|
|
649
|
-
o && !i && /* @__PURE__ */ (
|
|
650
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
650
651
|
style: [G.helperText, { color: c.textMuted }],
|
|
651
652
|
children: o
|
|
652
653
|
})
|
|
653
654
|
]
|
|
654
655
|
});
|
|
655
|
-
}, G =
|
|
656
|
+
}, G = L.create({
|
|
656
657
|
checkbox: {
|
|
657
658
|
alignItems: "center",
|
|
658
659
|
borderRadius: 4,
|
|
@@ -692,8 +693,8 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
692
693
|
},
|
|
693
694
|
optionLabel: { fontSize: 14 },
|
|
694
695
|
optionTextContainer: { flex: 1 }
|
|
695
|
-
}), ue = ({ node:
|
|
696
|
-
let [c, l] = A(!1), u =
|
|
696
|
+
}), ue = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s }) => {
|
|
697
|
+
let [c, l] = A(!1), u = h(), { colors: d } = e(), f = n ? new Date(n) : void 0, { year: p, month: m, today: g } = O(() => {
|
|
697
698
|
let e = f || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
698
699
|
return r.setHours(0, 0, 0, 0), {
|
|
699
700
|
month: n,
|
|
@@ -732,28 +733,28 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
732
733
|
isCurrentMonth: !1
|
|
733
734
|
});
|
|
734
735
|
return r;
|
|
735
|
-
}, [_, y]), C =
|
|
736
|
-
|
|
736
|
+
}, [_, y]), C = ee((e) => {
|
|
737
|
+
t.data.disablePast && e < g || (r(e.toISOString()), l(!1));
|
|
737
738
|
}, [
|
|
738
|
-
|
|
739
|
-
|
|
739
|
+
t.data.disablePast,
|
|
740
|
+
g,
|
|
740
741
|
r
|
|
741
742
|
]), w = () => {
|
|
742
743
|
y === 0 ? (b(11), v(_ - 1)) : b(y - 1);
|
|
743
|
-
},
|
|
744
|
+
}, D = () => {
|
|
744
745
|
y === 11 ? (b(0), v(_ + 1)) : b(y + 1);
|
|
745
|
-
},
|
|
746
|
-
return /* @__PURE__ */ (
|
|
746
|
+
}, k = () => f ? f.toLocaleDateString() : o || u("renderer.defaultInputs.selectDate"), j = (e) => t.data.disablePast ? e < g : !1, M = (e) => f ? e.getDate() === f.getDate() && e.getMonth() === f.getMonth() && e.getFullYear() === f.getFullYear() : !1;
|
|
747
|
+
return /* @__PURE__ */ E(V, {
|
|
747
748
|
style: K.container,
|
|
748
749
|
children: [
|
|
749
|
-
/* @__PURE__ */ (
|
|
750
|
+
/* @__PURE__ */ E(R, {
|
|
750
751
|
style: [K.label, { color: d.textSecondary }],
|
|
751
|
-
children: [a ||
|
|
752
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
752
753
|
style: { color: d.error },
|
|
753
754
|
children: "*"
|
|
754
755
|
})]
|
|
755
756
|
}),
|
|
756
|
-
/* @__PURE__ */ (
|
|
757
|
+
/* @__PURE__ */ E(B, {
|
|
757
758
|
style: [
|
|
758
759
|
K.trigger,
|
|
759
760
|
{
|
|
@@ -764,58 +765,58 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
764
765
|
],
|
|
765
766
|
onPress: () => l(!0),
|
|
766
767
|
activeOpacity: .7,
|
|
767
|
-
children: [/* @__PURE__ */ (
|
|
768
|
+
children: [/* @__PURE__ */ T(R, {
|
|
768
769
|
style: [
|
|
769
770
|
K.triggerText,
|
|
770
771
|
{ color: d.text },
|
|
771
772
|
!n && { color: d.textMuted }
|
|
772
773
|
],
|
|
773
774
|
numberOfLines: 1,
|
|
774
|
-
children:
|
|
775
|
-
}), /* @__PURE__ */ (
|
|
775
|
+
children: k()
|
|
776
|
+
}), /* @__PURE__ */ T(R, {
|
|
776
777
|
style: K.icon,
|
|
777
778
|
children: "📅"
|
|
778
779
|
})]
|
|
779
780
|
}),
|
|
780
|
-
/* @__PURE__ */ (
|
|
781
|
+
/* @__PURE__ */ T(F, {
|
|
781
782
|
visible: c,
|
|
782
783
|
transparent: !0,
|
|
783
784
|
animationType: "fade",
|
|
784
785
|
onRequestClose: () => l(!1),
|
|
785
|
-
children: /* @__PURE__ */ (
|
|
786
|
+
children: /* @__PURE__ */ T(B, {
|
|
786
787
|
style: K.modalOverlay,
|
|
787
788
|
activeOpacity: 1,
|
|
788
789
|
onPress: () => l(!1),
|
|
789
|
-
children: /* @__PURE__ */ (
|
|
790
|
+
children: /* @__PURE__ */ E(B, {
|
|
790
791
|
style: [K.modalContent, { backgroundColor: d.card }],
|
|
791
792
|
activeOpacity: 1,
|
|
792
793
|
onPress: () => {},
|
|
793
794
|
children: [
|
|
794
|
-
/* @__PURE__ */ (
|
|
795
|
+
/* @__PURE__ */ E(V, {
|
|
795
796
|
style: [K.modalHeader, { borderBottomColor: d.separator }],
|
|
796
|
-
children: [/* @__PURE__ */ (
|
|
797
|
+
children: [/* @__PURE__ */ T(R, {
|
|
797
798
|
style: [K.modalTitle, { color: d.text }],
|
|
798
|
-
children: a ||
|
|
799
|
-
}), /* @__PURE__ */ (
|
|
799
|
+
children: a || t.data.name
|
|
800
|
+
}), /* @__PURE__ */ T(B, {
|
|
800
801
|
onPress: () => l(!1),
|
|
801
|
-
children: /* @__PURE__ */ (
|
|
802
|
+
children: /* @__PURE__ */ T(R, {
|
|
802
803
|
style: [K.closeButton, { color: d.textMuted }],
|
|
803
804
|
children: "✕"
|
|
804
805
|
})
|
|
805
806
|
})]
|
|
806
807
|
}),
|
|
807
|
-
/* @__PURE__ */ (
|
|
808
|
+
/* @__PURE__ */ E(V, {
|
|
808
809
|
style: K.calendarHeader,
|
|
809
810
|
children: [
|
|
810
|
-
/* @__PURE__ */ (
|
|
811
|
+
/* @__PURE__ */ T(B, {
|
|
811
812
|
onPress: w,
|
|
812
813
|
style: K.navButton,
|
|
813
|
-
children: /* @__PURE__ */ (
|
|
814
|
+
children: /* @__PURE__ */ T(R, {
|
|
814
815
|
style: [K.navButtonText, { color: d.primary }],
|
|
815
816
|
children: "‹"
|
|
816
817
|
})
|
|
817
818
|
}),
|
|
818
|
-
/* @__PURE__ */ (
|
|
819
|
+
/* @__PURE__ */ E(R, {
|
|
819
820
|
style: [K.monthYear, { color: d.text }],
|
|
820
821
|
children: [
|
|
821
822
|
x[y],
|
|
@@ -823,17 +824,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
823
824
|
_
|
|
824
825
|
]
|
|
825
826
|
}),
|
|
826
|
-
/* @__PURE__ */ (
|
|
827
|
-
onPress:
|
|
827
|
+
/* @__PURE__ */ T(B, {
|
|
828
|
+
onPress: D,
|
|
828
829
|
style: K.navButton,
|
|
829
|
-
children: /* @__PURE__ */ (
|
|
830
|
+
children: /* @__PURE__ */ T(R, {
|
|
830
831
|
style: [K.navButtonText, { color: d.primary }],
|
|
831
832
|
children: "›"
|
|
832
833
|
})
|
|
833
834
|
})
|
|
834
835
|
]
|
|
835
836
|
}),
|
|
836
|
-
/* @__PURE__ */ (
|
|
837
|
+
/* @__PURE__ */ T(V, {
|
|
837
838
|
style: K.weekDays,
|
|
838
839
|
children: [
|
|
839
840
|
"Sun",
|
|
@@ -843,12 +844,12 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
843
844
|
"Thu",
|
|
844
845
|
"Fri",
|
|
845
846
|
"Sat"
|
|
846
|
-
].map((e) => /* @__PURE__ */ (
|
|
847
|
+
].map((e) => /* @__PURE__ */ T(R, {
|
|
847
848
|
style: [K.weekDay, { color: d.textMuted }],
|
|
848
849
|
children: e
|
|
849
850
|
}, e))
|
|
850
851
|
}),
|
|
851
|
-
/* @__PURE__ */ (
|
|
852
|
+
/* @__PURE__ */ T(N, {
|
|
852
853
|
data: S,
|
|
853
854
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
854
855
|
numColumns: 7,
|
|
@@ -856,8 +857,8 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
856
857
|
style: K.calendar,
|
|
857
858
|
contentContainerStyle: K.calendarContent,
|
|
858
859
|
renderItem: ({ item: e }) => {
|
|
859
|
-
let t =
|
|
860
|
-
return /* @__PURE__ */ (
|
|
860
|
+
let t = j(e.date), n = M(e.date);
|
|
861
|
+
return /* @__PURE__ */ T(B, {
|
|
861
862
|
style: [
|
|
862
863
|
K.dayCell,
|
|
863
864
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
@@ -870,7 +871,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
870
871
|
onPress: () => C(e.date),
|
|
871
872
|
disabled: t,
|
|
872
873
|
activeOpacity: .7,
|
|
873
|
-
children: /* @__PURE__ */ (
|
|
874
|
+
children: /* @__PURE__ */ T(R, {
|
|
874
875
|
style: [
|
|
875
876
|
K.dayText,
|
|
876
877
|
{ color: d.text },
|
|
@@ -890,17 +891,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
890
891
|
})
|
|
891
892
|
})
|
|
892
893
|
}),
|
|
893
|
-
i && /* @__PURE__ */ (
|
|
894
|
+
i && /* @__PURE__ */ T(R, {
|
|
894
895
|
style: [K.error, { color: d.error }],
|
|
895
896
|
children: i
|
|
896
897
|
}),
|
|
897
|
-
s && !i && /* @__PURE__ */ (
|
|
898
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
898
899
|
style: [K.helperText, { color: d.textMuted }],
|
|
899
900
|
children: s
|
|
900
901
|
})
|
|
901
902
|
]
|
|
902
903
|
});
|
|
903
|
-
}, K =
|
|
904
|
+
}, K = L.create({
|
|
904
905
|
calendar: {
|
|
905
906
|
flexGrow: 0,
|
|
906
907
|
flexShrink: 1
|
|
@@ -1000,8 +1001,8 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1000
1001
|
flexDirection: "row",
|
|
1001
1002
|
marginBottom: 8
|
|
1002
1003
|
}
|
|
1003
|
-
}), de = ({ node:
|
|
1004
|
-
let [s, c] = A(!1), [l, u] = A(!0), d =
|
|
1004
|
+
}), de = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
1005
|
+
let [s, c] = A(!1), [l, u] = A(!0), d = h(), { colors: f } = e(), p = Array.isArray(n) ? n : [], m = p[0] ? new Date(p[0]) : void 0, g = p[1] ? new Date(p[1]) : void 0, { year: _, month: v, today: y } = O(() => {
|
|
1005
1006
|
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1006
1007
|
return r.setHours(0, 0, 0, 0), {
|
|
1007
1008
|
month: n,
|
|
@@ -1021,7 +1022,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1021
1022
|
"October",
|
|
1022
1023
|
"November",
|
|
1023
1024
|
"December"
|
|
1024
|
-
],
|
|
1025
|
+
], D = O(() => {
|
|
1025
1026
|
let e = new Date(b, S, 1).getDay(), t = new Date(b, S + 1, 0).getDate(), n = new Date(b, S, 0).getDate(), r = [];
|
|
1026
1027
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1027
1028
|
date: new Date(b, S - 1, n - t),
|
|
@@ -1040,35 +1041,35 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1040
1041
|
isCurrentMonth: !1
|
|
1041
1042
|
});
|
|
1042
1043
|
return r;
|
|
1043
|
-
}, [b, S]),
|
|
1044
|
-
|
|
1044
|
+
}, [b, S]), k = ee((e) => {
|
|
1045
|
+
t.data.disablePast && e < y || (l ? (r([e.toISOString(), g?.toISOString()]), u(!1)) : (r(m && e < m ? [e.toISOString(), m.toISOString()] : [m?.toISOString(), e.toISOString()]), c(!1), u(!0)));
|
|
1045
1046
|
}, [
|
|
1046
|
-
|
|
1047
|
+
t.data.disablePast,
|
|
1047
1048
|
y,
|
|
1048
1049
|
l,
|
|
1049
1050
|
m,
|
|
1050
|
-
|
|
1051
|
+
g,
|
|
1051
1052
|
r
|
|
1052
|
-
]),
|
|
1053
|
+
]), j = () => {
|
|
1053
1054
|
S === 0 ? (C(11), x(b - 1)) : C(S - 1);
|
|
1054
|
-
},
|
|
1055
|
+
}, M = () => {
|
|
1055
1056
|
S === 11 ? (C(0), x(b + 1)) : C(S + 1);
|
|
1056
|
-
},
|
|
1057
|
-
if (!(m ||
|
|
1058
|
-
let t = m && e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear(), n =
|
|
1057
|
+
}, P = () => m && g ? `${m.toLocaleDateString()} - ${g.toLocaleDateString()}` : m ? m.toLocaleDateString() : d("renderer.defaultInputs.selectDateRange"), I = (e) => t.data.disablePast ? e < y : !1, L = (e) => m && g ? e >= m && e <= g : !1, te = (e) => {
|
|
1058
|
+
if (!(m || g)) return !1;
|
|
1059
|
+
let t = m && e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear(), n = g && e.getDate() === g.getDate() && e.getMonth() === g.getMonth() && e.getFullYear() === g.getFullYear();
|
|
1059
1060
|
return t || n;
|
|
1060
1061
|
};
|
|
1061
|
-
return /* @__PURE__ */ (
|
|
1062
|
+
return /* @__PURE__ */ E(V, {
|
|
1062
1063
|
style: q.container,
|
|
1063
1064
|
children: [
|
|
1064
|
-
/* @__PURE__ */ (
|
|
1065
|
+
/* @__PURE__ */ E(R, {
|
|
1065
1066
|
style: [q.label, { color: f.textSecondary }],
|
|
1066
|
-
children: [a ||
|
|
1067
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1067
1068
|
style: { color: f.error },
|
|
1068
1069
|
children: "*"
|
|
1069
1070
|
})]
|
|
1070
1071
|
}),
|
|
1071
|
-
/* @__PURE__ */ (
|
|
1072
|
+
/* @__PURE__ */ E(B, {
|
|
1072
1073
|
style: [
|
|
1073
1074
|
q.trigger,
|
|
1074
1075
|
{
|
|
@@ -1079,65 +1080,65 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1079
1080
|
],
|
|
1080
1081
|
onPress: () => c(!0),
|
|
1081
1082
|
activeOpacity: .7,
|
|
1082
|
-
children: [/* @__PURE__ */ (
|
|
1083
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1083
1084
|
style: [
|
|
1084
1085
|
q.triggerText,
|
|
1085
1086
|
{ color: f.text },
|
|
1086
1087
|
!m && { color: f.textMuted }
|
|
1087
1088
|
],
|
|
1088
1089
|
numberOfLines: 1,
|
|
1089
|
-
children:
|
|
1090
|
-
}), /* @__PURE__ */ (
|
|
1090
|
+
children: P()
|
|
1091
|
+
}), /* @__PURE__ */ T(R, {
|
|
1091
1092
|
style: q.icon,
|
|
1092
1093
|
children: "📅"
|
|
1093
1094
|
})]
|
|
1094
1095
|
}),
|
|
1095
|
-
/* @__PURE__ */ (
|
|
1096
|
+
/* @__PURE__ */ T(F, {
|
|
1096
1097
|
visible: s,
|
|
1097
1098
|
transparent: !0,
|
|
1098
1099
|
animationType: "fade",
|
|
1099
1100
|
onRequestClose: () => c(!1),
|
|
1100
|
-
children: /* @__PURE__ */ (
|
|
1101
|
+
children: /* @__PURE__ */ T(B, {
|
|
1101
1102
|
style: q.modalOverlay,
|
|
1102
1103
|
activeOpacity: 1,
|
|
1103
1104
|
onPress: () => c(!1),
|
|
1104
|
-
children: /* @__PURE__ */ (
|
|
1105
|
+
children: /* @__PURE__ */ E(B, {
|
|
1105
1106
|
style: [q.modalContent, { backgroundColor: f.card }],
|
|
1106
1107
|
activeOpacity: 1,
|
|
1107
1108
|
onPress: () => {},
|
|
1108
1109
|
children: [
|
|
1109
|
-
/* @__PURE__ */ (
|
|
1110
|
+
/* @__PURE__ */ E(V, {
|
|
1110
1111
|
style: [q.modalHeader, { borderBottomColor: f.separator }],
|
|
1111
|
-
children: [/* @__PURE__ */ (
|
|
1112
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1112
1113
|
style: [q.modalTitle, { color: f.text }],
|
|
1113
|
-
children: a ||
|
|
1114
|
-
}), /* @__PURE__ */ (
|
|
1114
|
+
children: a || t.data.name
|
|
1115
|
+
}), /* @__PURE__ */ T(B, {
|
|
1115
1116
|
onPress: () => c(!1),
|
|
1116
|
-
children: /* @__PURE__ */ (
|
|
1117
|
+
children: /* @__PURE__ */ T(R, {
|
|
1117
1118
|
style: [q.closeButton, { color: f.textMuted }],
|
|
1118
1119
|
children: "✕"
|
|
1119
1120
|
})
|
|
1120
1121
|
})]
|
|
1121
1122
|
}),
|
|
1122
|
-
/* @__PURE__ */ (
|
|
1123
|
+
/* @__PURE__ */ T(V, {
|
|
1123
1124
|
style: [q.rangeIndicator, { backgroundColor: f.primaryLight }],
|
|
1124
|
-
children: /* @__PURE__ */ (
|
|
1125
|
+
children: /* @__PURE__ */ T(R, {
|
|
1125
1126
|
style: [q.rangeIndicatorText, { color: f.primary }],
|
|
1126
1127
|
children: d(l ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1127
1128
|
})
|
|
1128
1129
|
}),
|
|
1129
|
-
/* @__PURE__ */ (
|
|
1130
|
+
/* @__PURE__ */ E(V, {
|
|
1130
1131
|
style: q.calendarHeader,
|
|
1131
1132
|
children: [
|
|
1132
|
-
/* @__PURE__ */ (
|
|
1133
|
-
onPress:
|
|
1133
|
+
/* @__PURE__ */ T(B, {
|
|
1134
|
+
onPress: j,
|
|
1134
1135
|
style: q.navButton,
|
|
1135
|
-
children: /* @__PURE__ */ (
|
|
1136
|
+
children: /* @__PURE__ */ T(R, {
|
|
1136
1137
|
style: [q.navButtonText, { color: f.primary }],
|
|
1137
1138
|
children: "‹"
|
|
1138
1139
|
})
|
|
1139
1140
|
}),
|
|
1140
|
-
/* @__PURE__ */ (
|
|
1141
|
+
/* @__PURE__ */ E(R, {
|
|
1141
1142
|
style: [q.monthYear, { color: f.text }],
|
|
1142
1143
|
children: [
|
|
1143
1144
|
w[S],
|
|
@@ -1145,17 +1146,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1145
1146
|
b
|
|
1146
1147
|
]
|
|
1147
1148
|
}),
|
|
1148
|
-
/* @__PURE__ */ (
|
|
1149
|
-
onPress:
|
|
1149
|
+
/* @__PURE__ */ T(B, {
|
|
1150
|
+
onPress: M,
|
|
1150
1151
|
style: q.navButton,
|
|
1151
|
-
children: /* @__PURE__ */ (
|
|
1152
|
+
children: /* @__PURE__ */ T(R, {
|
|
1152
1153
|
style: [q.navButtonText, { color: f.primary }],
|
|
1153
1154
|
children: "›"
|
|
1154
1155
|
})
|
|
1155
1156
|
})
|
|
1156
1157
|
]
|
|
1157
1158
|
}),
|
|
1158
|
-
/* @__PURE__ */ (
|
|
1159
|
+
/* @__PURE__ */ T(V, {
|
|
1159
1160
|
style: q.weekDays,
|
|
1160
1161
|
children: [
|
|
1161
1162
|
"Sun",
|
|
@@ -1165,21 +1166,21 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1165
1166
|
"Thu",
|
|
1166
1167
|
"Fri",
|
|
1167
1168
|
"Sat"
|
|
1168
|
-
].map((e) => /* @__PURE__ */ (
|
|
1169
|
+
].map((e) => /* @__PURE__ */ T(R, {
|
|
1169
1170
|
style: [q.weekDay, { color: f.textMuted }],
|
|
1170
1171
|
children: e
|
|
1171
1172
|
}, e))
|
|
1172
1173
|
}),
|
|
1173
|
-
/* @__PURE__ */ (
|
|
1174
|
-
data:
|
|
1174
|
+
/* @__PURE__ */ T(N, {
|
|
1175
|
+
data: D,
|
|
1175
1176
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1176
1177
|
numColumns: 7,
|
|
1177
1178
|
scrollEnabled: !1,
|
|
1178
1179
|
style: q.calendar,
|
|
1179
1180
|
contentContainerStyle: q.calendarContent,
|
|
1180
1181
|
renderItem: ({ item: e }) => {
|
|
1181
|
-
let t =
|
|
1182
|
-
return /* @__PURE__ */ (
|
|
1182
|
+
let t = I(e.date), n = L(e.date), r = te(e.date);
|
|
1183
|
+
return /* @__PURE__ */ T(B, {
|
|
1183
1184
|
style: [
|
|
1184
1185
|
q.dayCell,
|
|
1185
1186
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
@@ -1190,10 +1191,10 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1190
1191
|
},
|
|
1191
1192
|
t && q.dayCellDisabled
|
|
1192
1193
|
],
|
|
1193
|
-
onPress: () =>
|
|
1194
|
+
onPress: () => k(e.date),
|
|
1194
1195
|
disabled: t,
|
|
1195
1196
|
activeOpacity: .7,
|
|
1196
|
-
children: /* @__PURE__ */ (
|
|
1197
|
+
children: /* @__PURE__ */ T(R, {
|
|
1197
1198
|
style: [
|
|
1198
1199
|
q.dayText,
|
|
1199
1200
|
{ color: f.text },
|
|
@@ -1214,17 +1215,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1214
1215
|
})
|
|
1215
1216
|
})
|
|
1216
1217
|
}),
|
|
1217
|
-
i && /* @__PURE__ */ (
|
|
1218
|
+
i && /* @__PURE__ */ T(R, {
|
|
1218
1219
|
style: [q.error, { color: f.error }],
|
|
1219
1220
|
children: i
|
|
1220
1221
|
}),
|
|
1221
|
-
o && !i && /* @__PURE__ */ (
|
|
1222
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
1222
1223
|
style: [q.helperText, { color: f.textMuted }],
|
|
1223
1224
|
children: o
|
|
1224
1225
|
})
|
|
1225
1226
|
]
|
|
1226
1227
|
});
|
|
1227
|
-
}, q =
|
|
1228
|
+
}, q = L.create({
|
|
1228
1229
|
calendar: {
|
|
1229
1230
|
flexGrow: 0,
|
|
1230
1231
|
flexShrink: 1
|
|
@@ -1334,8 +1335,8 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1334
1335
|
flexDirection: "row",
|
|
1335
1336
|
marginBottom: 8
|
|
1336
1337
|
}
|
|
1337
|
-
}), fe = ({ node:
|
|
1338
|
-
let [s, c] = A(null), [l, u] = A(!0), d =
|
|
1338
|
+
}), fe = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
1339
|
+
let [s, c] = A(null), [l, u] = A(!0), d = h(), { colors: f } = e(), p = Array.isArray(n) ? n : n ? [n] : [], m = t.data.multiple, g = ee(async () => {
|
|
1339
1340
|
if (s) try {
|
|
1340
1341
|
let e = (await s({ allowMultiSelection: m })).map((e) => ({
|
|
1341
1342
|
data: e.uri,
|
|
@@ -1354,7 +1355,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1354
1355
|
m,
|
|
1355
1356
|
r,
|
|
1356
1357
|
d
|
|
1357
|
-
]), _ =
|
|
1358
|
+
]), _ = ee((e) => {
|
|
1358
1359
|
let t = p.filter((t, n) => n !== e);
|
|
1359
1360
|
r(t.length > 0 ? t : null);
|
|
1360
1361
|
}, [p, r]), v = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
@@ -1369,47 +1370,47 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1369
1370
|
u(!1);
|
|
1370
1371
|
}
|
|
1371
1372
|
})();
|
|
1372
|
-
}, []), l ? null : s ? /* @__PURE__ */ (
|
|
1373
|
+
}, []), l ? null : s ? /* @__PURE__ */ E(V, {
|
|
1373
1374
|
style: J.container,
|
|
1374
1375
|
children: [
|
|
1375
|
-
/* @__PURE__ */ (
|
|
1376
|
+
/* @__PURE__ */ E(R, {
|
|
1376
1377
|
style: [J.label, { color: f.textSecondary }],
|
|
1377
|
-
children: [a ||
|
|
1378
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1378
1379
|
style: { color: f.error },
|
|
1379
1380
|
children: "*"
|
|
1380
1381
|
})]
|
|
1381
1382
|
}),
|
|
1382
|
-
p.length > 0 && /* @__PURE__ */ (
|
|
1383
|
+
p.length > 0 && /* @__PURE__ */ T(V, {
|
|
1383
1384
|
style: J.filesList,
|
|
1384
|
-
children: p.map((e, t) => /* @__PURE__ */ (
|
|
1385
|
+
children: p.map((e, t) => /* @__PURE__ */ E(V, {
|
|
1385
1386
|
style: [J.fileItem, {
|
|
1386
1387
|
backgroundColor: f.card,
|
|
1387
1388
|
borderColor: f.separator
|
|
1388
1389
|
}],
|
|
1389
1390
|
children: [
|
|
1390
|
-
/* @__PURE__ */ (
|
|
1391
|
+
/* @__PURE__ */ T(V, {
|
|
1391
1392
|
style: [J.fileIcon, { backgroundColor: f.muted }],
|
|
1392
|
-
children: /* @__PURE__ */ (
|
|
1393
|
+
children: /* @__PURE__ */ T(R, {
|
|
1393
1394
|
style: J.fileIconText,
|
|
1394
1395
|
children: "📄"
|
|
1395
1396
|
})
|
|
1396
1397
|
}),
|
|
1397
|
-
/* @__PURE__ */ (
|
|
1398
|
+
/* @__PURE__ */ E(V, {
|
|
1398
1399
|
style: J.fileInfo,
|
|
1399
|
-
children: [/* @__PURE__ */ (
|
|
1400
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1400
1401
|
style: [J.fileName, { color: f.text }],
|
|
1401
1402
|
numberOfLines: 1,
|
|
1402
1403
|
children: e.name
|
|
1403
|
-
}), e.size > 0 && /* @__PURE__ */ (
|
|
1404
|
+
}), e.size > 0 && /* @__PURE__ */ T(R, {
|
|
1404
1405
|
style: [J.fileSize, { color: f.textMuted }],
|
|
1405
1406
|
children: v(e.size)
|
|
1406
1407
|
})]
|
|
1407
1408
|
}),
|
|
1408
|
-
/* @__PURE__ */ (
|
|
1409
|
+
/* @__PURE__ */ T(B, {
|
|
1409
1410
|
style: J.removeButton,
|
|
1410
1411
|
onPress: () => _(t),
|
|
1411
1412
|
activeOpacity: .7,
|
|
1412
|
-
children: /* @__PURE__ */ (
|
|
1413
|
+
children: /* @__PURE__ */ T(R, {
|
|
1413
1414
|
style: [J.removeButtonText, { color: f.textMuted }],
|
|
1414
1415
|
children: "✕"
|
|
1415
1416
|
})
|
|
@@ -1417,54 +1418,54 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1417
1418
|
]
|
|
1418
1419
|
}, `${e.name}-${t}`))
|
|
1419
1420
|
}),
|
|
1420
|
-
/* @__PURE__ */ (
|
|
1421
|
+
/* @__PURE__ */ T(B, {
|
|
1421
1422
|
style: [J.pickButton, {
|
|
1422
1423
|
backgroundColor: f.input,
|
|
1423
1424
|
borderColor: f.border
|
|
1424
1425
|
}],
|
|
1425
|
-
onPress:
|
|
1426
|
+
onPress: g,
|
|
1426
1427
|
activeOpacity: .7,
|
|
1427
|
-
children: /* @__PURE__ */ (
|
|
1428
|
+
children: /* @__PURE__ */ T(R, {
|
|
1428
1429
|
style: [J.pickButtonText, { color: f.textMuted }],
|
|
1429
1430
|
children: p.length === 0 ? d(m ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : d(m ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1430
1431
|
})
|
|
1431
1432
|
}),
|
|
1432
|
-
i && /* @__PURE__ */ (
|
|
1433
|
+
i && /* @__PURE__ */ T(R, {
|
|
1433
1434
|
style: [J.error, { color: f.error }],
|
|
1434
1435
|
children: i
|
|
1435
1436
|
}),
|
|
1436
|
-
o && !i && /* @__PURE__ */ (
|
|
1437
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
1437
1438
|
style: [J.helperText, { color: f.textMuted }],
|
|
1438
1439
|
children: o
|
|
1439
1440
|
})
|
|
1440
1441
|
]
|
|
1441
|
-
}) : /* @__PURE__ */ (
|
|
1442
|
+
}) : /* @__PURE__ */ E(V, {
|
|
1442
1443
|
style: J.container,
|
|
1443
1444
|
children: [
|
|
1444
|
-
/* @__PURE__ */ (
|
|
1445
|
+
/* @__PURE__ */ E(R, {
|
|
1445
1446
|
style: [J.label, { color: f.textSecondary }],
|
|
1446
|
-
children: [a ||
|
|
1447
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1447
1448
|
style: { color: f.error },
|
|
1448
1449
|
children: "*"
|
|
1449
1450
|
})]
|
|
1450
1451
|
}),
|
|
1451
|
-
/* @__PURE__ */ (
|
|
1452
|
+
/* @__PURE__ */ T(V, {
|
|
1452
1453
|
style: [J.unavailableContainer, {
|
|
1453
1454
|
backgroundColor: f.errorLight,
|
|
1454
1455
|
borderColor: f.error
|
|
1455
1456
|
}],
|
|
1456
|
-
children: /* @__PURE__ */ (
|
|
1457
|
+
children: /* @__PURE__ */ T(R, {
|
|
1457
1458
|
style: [J.unavailableText, { color: f.error }],
|
|
1458
1459
|
children: d("renderer.defaultInputs.filePickerUnavailable")
|
|
1459
1460
|
})
|
|
1460
1461
|
}),
|
|
1461
|
-
o && /* @__PURE__ */ (
|
|
1462
|
+
o && /* @__PURE__ */ T(R, {
|
|
1462
1463
|
style: [J.helperText, { color: f.textMuted }],
|
|
1463
1464
|
children: o
|
|
1464
1465
|
})
|
|
1465
1466
|
]
|
|
1466
1467
|
});
|
|
1467
|
-
}, J =
|
|
1468
|
+
}, J = L.create({
|
|
1468
1469
|
container: { marginBottom: 16 },
|
|
1469
1470
|
error: {
|
|
1470
1471
|
fontSize: 12,
|
|
@@ -1563,39 +1564,39 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1563
1564
|
}), Se = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1564
1565
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1565
1566
|
return n ? encodeURIComponent(a) : a;
|
|
1566
|
-
}), Ce = ({ node:
|
|
1567
|
-
let [p, m] = A(!1), [
|
|
1568
|
-
|
|
1569
|
-
|
|
1567
|
+
}), Ce = ({ node: t, value: n, setValue: r, error: a, label: o, placeholder: l, helperText: u, id: d, name: f }) => {
|
|
1568
|
+
let [p, m] = A(!1), [g, _] = A(null), [v, y] = A([]), [b, x] = A(""), [S, C] = A(!1), { formValues: w, inputNodes: M } = c(), P = h(), { colors: I } = e(), { httpConfig: L } = t.data, te = k(!1), ne = k(""), re = k(L), ie = k(w), ae = k(M), oe = k(r), 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
|
+
L?.url,
|
|
1570
|
+
ce,
|
|
1570
1571
|
w
|
|
1571
|
-
]),
|
|
1572
|
-
|
|
1572
|
+
]), G = ee(async (e) => {
|
|
1573
|
+
H.current && H.current.abort();
|
|
1573
1574
|
let t = new AbortController();
|
|
1574
|
-
|
|
1575
|
+
H.current = t;
|
|
1575
1576
|
let n = re.current, r = ie.current, i = oe.current;
|
|
1576
1577
|
if (!n?.url) {
|
|
1577
|
-
_(
|
|
1578
|
+
_(P("renderer.defaultHttpInput.noUrlConfigured")), H.current = null;
|
|
1578
1579
|
return;
|
|
1579
1580
|
}
|
|
1580
1581
|
if (n.url && !xe(n.url, r)) {
|
|
1581
|
-
|
|
1582
|
+
H.current = null;
|
|
1582
1583
|
return;
|
|
1583
1584
|
}
|
|
1584
1585
|
m(!0), _(null);
|
|
1585
1586
|
try {
|
|
1586
|
-
let a = Se(n.url, r, !0), o = n.searchParam && e ? `${a}${a.includes("?") ? "&" : "?"}${n.searchParam}=${encodeURIComponent(e)}` : a,
|
|
1587
|
+
let a = Se(n.url, r, !0), o = n.searchParam && e ? `${a}${a.includes("?") ? "&" : "?"}${n.searchParam}=${encodeURIComponent(e)}` : a, c = {};
|
|
1587
1588
|
n.headers?.forEach((e) => {
|
|
1588
|
-
|
|
1589
|
+
c[e.key] = Se(e.value, r);
|
|
1589
1590
|
});
|
|
1590
1591
|
let l = [
|
|
1591
1592
|
"POST",
|
|
1592
1593
|
"PUT",
|
|
1593
1594
|
"PATCH"
|
|
1594
|
-
].includes(n.method || "") ? n.sendAllFormValues ? JSON.stringify(
|
|
1595
|
+
].includes(n.method || "") ? n.sendAllFormValues ? JSON.stringify(s(r, ae.current)) : n.body ? Se(n.body, r) : void 0 : void 0, u = setTimeout(() => t.abort(), 3e4), d = await fetch(o, {
|
|
1595
1596
|
body: l || void 0,
|
|
1596
1597
|
headers: {
|
|
1597
1598
|
"Content-Type": "application/json",
|
|
1598
|
-
...
|
|
1599
|
+
...c
|
|
1599
1600
|
},
|
|
1600
1601
|
method: n.method || "GET",
|
|
1601
1602
|
signal: t.signal
|
|
@@ -1614,132 +1615,132 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1614
1615
|
} else i(typeof p == "string" ? p : JSON.stringify(p));
|
|
1615
1616
|
} catch (e) {
|
|
1616
1617
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1617
|
-
_(e instanceof Error ? e.message :
|
|
1618
|
+
_(e instanceof Error ? e.message : P("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1618
1619
|
} finally {
|
|
1619
|
-
m(!1),
|
|
1620
|
+
m(!1), H.current = null;
|
|
1620
1621
|
}
|
|
1621
|
-
}, [
|
|
1622
|
+
}, [P]);
|
|
1622
1623
|
if (D(() => {
|
|
1623
|
-
re.current =
|
|
1624
|
+
re.current = L, ie.current = w, ae.current = M, oe.current = r, se.current = G;
|
|
1624
1625
|
}, [
|
|
1625
|
-
|
|
1626
|
+
L,
|
|
1626
1627
|
w,
|
|
1627
|
-
|
|
1628
|
+
M,
|
|
1628
1629
|
r,
|
|
1629
|
-
|
|
1630
|
+
G
|
|
1630
1631
|
]), D(() => () => {
|
|
1631
|
-
|
|
1632
|
+
H.current && H.current.abort();
|
|
1632
1633
|
}, []), D(() => {
|
|
1633
|
-
if (
|
|
1634
|
-
|
|
1634
|
+
if (te.current) return;
|
|
1635
|
+
te.current = !0;
|
|
1635
1636
|
let e = re.current, t = ie.current, n = se.current, r = e?.url && xe(e.url, t);
|
|
1636
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1637
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ne.current = be(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1637
1638
|
}, []), D(() => {
|
|
1638
|
-
if (!
|
|
1639
|
+
if (!te.current || !ce || ne.current === W || !le) return;
|
|
1639
1640
|
let e = setTimeout(() => {
|
|
1640
|
-
|
|
1641
|
+
G(), ne.current = W;
|
|
1641
1642
|
}, 500);
|
|
1642
1643
|
return () => clearTimeout(e);
|
|
1643
1644
|
}, [
|
|
1645
|
+
W,
|
|
1646
|
+
ce,
|
|
1644
1647
|
le,
|
|
1645
|
-
|
|
1646
|
-
U,
|
|
1647
|
-
W
|
|
1648
|
+
G
|
|
1648
1649
|
]), D(() => {
|
|
1649
|
-
if (!(
|
|
1650
|
+
if (!(L?.searchParam && b)) return;
|
|
1650
1651
|
let e = setTimeout(() => {
|
|
1651
|
-
|
|
1652
|
+
G(b);
|
|
1652
1653
|
}, 300);
|
|
1653
1654
|
return () => clearTimeout(e);
|
|
1654
1655
|
}, [
|
|
1655
1656
|
b,
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
]),
|
|
1659
|
-
let
|
|
1660
|
-
if (
|
|
1661
|
-
let n = p &&
|
|
1662
|
-
return /* @__PURE__ */ (
|
|
1657
|
+
L?.searchParam,
|
|
1658
|
+
G
|
|
1659
|
+
]), L?.responseMapping) {
|
|
1660
|
+
let e = Array.isArray(n) ? n[0] : n, s = v.find((t) => t.value === e);
|
|
1661
|
+
if (L.searchParam) {
|
|
1662
|
+
let n = p && L?.showLoading;
|
|
1663
|
+
return /* @__PURE__ */ E(V, {
|
|
1663
1664
|
style: Y.container,
|
|
1664
1665
|
children: [
|
|
1665
|
-
/* @__PURE__ */ (
|
|
1666
|
-
style: [Y.label, { color:
|
|
1667
|
-
children: [o ||
|
|
1668
|
-
style: { color:
|
|
1666
|
+
/* @__PURE__ */ E(R, {
|
|
1667
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
1668
|
+
children: [o || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1669
|
+
style: { color: I.error },
|
|
1669
1670
|
children: "*"
|
|
1670
1671
|
})]
|
|
1671
1672
|
}),
|
|
1672
|
-
/* @__PURE__ */ (
|
|
1673
|
+
/* @__PURE__ */ E(B, {
|
|
1673
1674
|
style: [
|
|
1674
1675
|
Y.trigger,
|
|
1675
1676
|
{
|
|
1676
|
-
backgroundColor:
|
|
1677
|
-
borderColor:
|
|
1677
|
+
backgroundColor: I.input,
|
|
1678
|
+
borderColor: I.border
|
|
1678
1679
|
},
|
|
1679
|
-
|
|
1680
|
+
a && { borderColor: I.error }
|
|
1680
1681
|
],
|
|
1681
1682
|
onPress: () => C(!0),
|
|
1682
1683
|
activeOpacity: .7,
|
|
1683
|
-
children: [n ? /* @__PURE__ */ (
|
|
1684
|
+
children: [n ? /* @__PURE__ */ E(V, {
|
|
1684
1685
|
style: Y.loadingTrigger,
|
|
1685
|
-
children: [/* @__PURE__ */ (
|
|
1686
|
+
children: [/* @__PURE__ */ T(j, {
|
|
1686
1687
|
size: "small",
|
|
1687
|
-
color:
|
|
1688
|
-
}), /* @__PURE__ */ (
|
|
1689
|
-
style: [Y.triggerText, { color:
|
|
1688
|
+
color: I.primary
|
|
1689
|
+
}), /* @__PURE__ */ T(R, {
|
|
1690
|
+
style: [Y.triggerText, { color: I.textMuted }],
|
|
1690
1691
|
numberOfLines: 1,
|
|
1691
|
-
children:
|
|
1692
|
+
children: s?.label || l || P("renderer.defaultHttpInput.search")
|
|
1692
1693
|
})]
|
|
1693
|
-
}) : /* @__PURE__ */ (
|
|
1694
|
+
}) : /* @__PURE__ */ T(R, {
|
|
1694
1695
|
style: [
|
|
1695
1696
|
Y.triggerText,
|
|
1696
|
-
{ color:
|
|
1697
|
-
!
|
|
1697
|
+
{ color: I.text },
|
|
1698
|
+
!s && { color: I.textMuted }
|
|
1698
1699
|
],
|
|
1699
1700
|
numberOfLines: 1,
|
|
1700
|
-
children:
|
|
1701
|
-
}), /* @__PURE__ */ (
|
|
1702
|
-
style: [Y.arrow, { color:
|
|
1701
|
+
children: s?.label || l || P("renderer.defaultHttpInput.search")
|
|
1702
|
+
}), /* @__PURE__ */ T(R, {
|
|
1703
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1703
1704
|
children: "▼"
|
|
1704
1705
|
})]
|
|
1705
1706
|
}),
|
|
1706
|
-
/* @__PURE__ */ (
|
|
1707
|
+
/* @__PURE__ */ T(F, {
|
|
1707
1708
|
visible: S,
|
|
1708
1709
|
transparent: !0,
|
|
1709
1710
|
animationType: "fade",
|
|
1710
1711
|
onRequestClose: () => C(!1),
|
|
1711
|
-
children: /* @__PURE__ */ (
|
|
1712
|
+
children: /* @__PURE__ */ T(B, {
|
|
1712
1713
|
style: Y.modalOverlay,
|
|
1713
1714
|
activeOpacity: 1,
|
|
1714
1715
|
onPress: () => C(!1),
|
|
1715
|
-
children: /* @__PURE__ */ (
|
|
1716
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1716
|
+
children: /* @__PURE__ */ E(B, {
|
|
1717
|
+
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1717
1718
|
activeOpacity: 1,
|
|
1718
1719
|
onPress: () => {},
|
|
1719
1720
|
children: [
|
|
1720
|
-
/* @__PURE__ */ (
|
|
1721
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1722
|
-
children: [/* @__PURE__ */ (
|
|
1723
|
-
style: [Y.modalTitle, { color:
|
|
1724
|
-
children: o ||
|
|
1725
|
-
}), /* @__PURE__ */ (
|
|
1721
|
+
/* @__PURE__ */ E(V, {
|
|
1722
|
+
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1723
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1724
|
+
style: [Y.modalTitle, { color: I.text }],
|
|
1725
|
+
children: o || t.data.name
|
|
1726
|
+
}), /* @__PURE__ */ T(B, {
|
|
1726
1727
|
onPress: () => C(!1),
|
|
1727
|
-
children: /* @__PURE__ */ (
|
|
1728
|
-
style: [Y.closeButton, { color:
|
|
1728
|
+
children: /* @__PURE__ */ T(R, {
|
|
1729
|
+
style: [Y.closeButton, { color: I.textMuted }],
|
|
1729
1730
|
children: "✕"
|
|
1730
1731
|
})
|
|
1731
1732
|
})]
|
|
1732
1733
|
}),
|
|
1733
|
-
/* @__PURE__ */ (
|
|
1734
|
+
/* @__PURE__ */ T(V, {
|
|
1734
1735
|
style: Y.searchContainer,
|
|
1735
|
-
children: /* @__PURE__ */ (
|
|
1736
|
+
children: /* @__PURE__ */ T(z, {
|
|
1736
1737
|
style: [Y.searchInput, {
|
|
1737
|
-
backgroundColor:
|
|
1738
|
-
borderColor:
|
|
1739
|
-
color:
|
|
1738
|
+
backgroundColor: I.muted,
|
|
1739
|
+
borderColor: I.border,
|
|
1740
|
+
color: I.text
|
|
1740
1741
|
}],
|
|
1741
|
-
placeholder:
|
|
1742
|
-
placeholderTextColor:
|
|
1742
|
+
placeholder: P("renderer.defaultHttpInput.search"),
|
|
1743
|
+
placeholderTextColor: I.textMuted,
|
|
1743
1744
|
value: b,
|
|
1744
1745
|
onChangeText: (e) => {
|
|
1745
1746
|
x(e), _(null);
|
|
@@ -1749,50 +1750,50 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1749
1750
|
autoCorrect: !1
|
|
1750
1751
|
})
|
|
1751
1752
|
}),
|
|
1752
|
-
p ? /* @__PURE__ */ (
|
|
1753
|
+
p ? /* @__PURE__ */ T(V, {
|
|
1753
1754
|
style: Y.loadingContainer,
|
|
1754
|
-
children: /* @__PURE__ */ (
|
|
1755
|
+
children: /* @__PURE__ */ T(j, {
|
|
1755
1756
|
size: "small",
|
|
1756
|
-
color:
|
|
1757
|
+
color: I.primary
|
|
1757
1758
|
})
|
|
1758
|
-
}) :
|
|
1759
|
+
}) : g ? /* @__PURE__ */ E(V, {
|
|
1759
1760
|
style: Y.errorContainer,
|
|
1760
|
-
children: [/* @__PURE__ */ (
|
|
1761
|
-
style: [Y.errorText, { color:
|
|
1762
|
-
children:
|
|
1763
|
-
}), /* @__PURE__ */ (
|
|
1764
|
-
onPress: () =>
|
|
1761
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1762
|
+
style: [Y.errorText, { color: I.error }],
|
|
1763
|
+
children: g
|
|
1764
|
+
}), /* @__PURE__ */ T(B, {
|
|
1765
|
+
onPress: () => G(b),
|
|
1765
1766
|
style: Y.retryButton,
|
|
1766
|
-
children: /* @__PURE__ */ (
|
|
1767
|
-
style: [Y.retryButtonText, { color:
|
|
1768
|
-
children:
|
|
1767
|
+
children: /* @__PURE__ */ T(R, {
|
|
1768
|
+
style: [Y.retryButtonText, { color: I.primary }],
|
|
1769
|
+
children: P("renderer.defaultHttpInput.retry")
|
|
1769
1770
|
})
|
|
1770
1771
|
})]
|
|
1771
|
-
}) : /* @__PURE__ */ (
|
|
1772
|
+
}) : /* @__PURE__ */ T(N, {
|
|
1772
1773
|
data: v,
|
|
1773
1774
|
keyExtractor: (e) => e.value,
|
|
1774
1775
|
style: Y.optionsList,
|
|
1775
1776
|
contentContainerStyle: Y.optionsListContent,
|
|
1776
|
-
ListEmptyComponent: /* @__PURE__ */ (
|
|
1777
|
+
ListEmptyComponent: /* @__PURE__ */ T(V, {
|
|
1777
1778
|
style: Y.emptyContainer,
|
|
1778
|
-
children: /* @__PURE__ */ (
|
|
1779
|
-
style: [Y.emptyText, { color:
|
|
1780
|
-
children:
|
|
1779
|
+
children: /* @__PURE__ */ T(R, {
|
|
1780
|
+
style: [Y.emptyText, { color: I.textMuted }],
|
|
1781
|
+
children: P("renderer.defaultHttpInput.noResults")
|
|
1781
1782
|
})
|
|
1782
1783
|
}),
|
|
1783
|
-
renderItem: ({ item:
|
|
1784
|
-
let n =
|
|
1785
|
-
return /* @__PURE__ */ (
|
|
1786
|
-
style: [Y.option, n && { backgroundColor:
|
|
1784
|
+
renderItem: ({ item: t }) => {
|
|
1785
|
+
let n = t.value === e;
|
|
1786
|
+
return /* @__PURE__ */ E(B, {
|
|
1787
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1787
1788
|
onPress: () => {
|
|
1788
|
-
r(
|
|
1789
|
+
r(t.value), C(!1);
|
|
1789
1790
|
},
|
|
1790
1791
|
activeOpacity: .7,
|
|
1791
|
-
children: [/* @__PURE__ */ (
|
|
1792
|
-
style: [Y.optionText, { color:
|
|
1793
|
-
children:
|
|
1794
|
-
}), n && /* @__PURE__ */ (
|
|
1795
|
-
style: [Y.checkmark, { color:
|
|
1792
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1793
|
+
style: [Y.optionText, { color: I.text }],
|
|
1794
|
+
children: t.label
|
|
1795
|
+
}), n && /* @__PURE__ */ T(R, {
|
|
1796
|
+
style: [Y.checkmark, { color: I.primary }],
|
|
1796
1797
|
children: "✓"
|
|
1797
1798
|
})]
|
|
1798
1799
|
});
|
|
@@ -1802,112 +1803,112 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1802
1803
|
})
|
|
1803
1804
|
})
|
|
1804
1805
|
}),
|
|
1805
|
-
|
|
1806
|
-
style: [Y.error, { color:
|
|
1807
|
-
children:
|
|
1806
|
+
a && /* @__PURE__ */ T(R, {
|
|
1807
|
+
style: [Y.error, { color: I.error }],
|
|
1808
|
+
children: a
|
|
1808
1809
|
}),
|
|
1809
|
-
u && !
|
|
1810
|
-
style: [Y.helperText, { color:
|
|
1810
|
+
u && !a && /* @__PURE__ */ T(R, {
|
|
1811
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
1811
1812
|
children: u
|
|
1812
1813
|
})
|
|
1813
1814
|
]
|
|
1814
1815
|
});
|
|
1815
1816
|
}
|
|
1816
|
-
let
|
|
1817
|
+
let c = p && L?.showLoading, d = U.filter((e) => {
|
|
1817
1818
|
let t = w[e];
|
|
1818
1819
|
return t == null || t === "";
|
|
1819
|
-
}), f = d.map((e) =>
|
|
1820
|
-
return /* @__PURE__ */ (
|
|
1820
|
+
}), f = d.map((e) => i(e, M) || e), m = v.length === 0 && !c ? g || (d.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${f.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1821
|
+
return /* @__PURE__ */ E(V, {
|
|
1821
1822
|
style: Y.container,
|
|
1822
1823
|
children: [
|
|
1823
|
-
/* @__PURE__ */ (
|
|
1824
|
-
style: [Y.label, { color:
|
|
1825
|
-
children: [o ||
|
|
1826
|
-
style: { color:
|
|
1824
|
+
/* @__PURE__ */ E(R, {
|
|
1825
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
1826
|
+
children: [o || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1827
|
+
style: { color: I.error },
|
|
1827
1828
|
children: "*"
|
|
1828
1829
|
})]
|
|
1829
1830
|
}),
|
|
1830
|
-
/* @__PURE__ */ (
|
|
1831
|
+
/* @__PURE__ */ E(B, {
|
|
1831
1832
|
style: [
|
|
1832
1833
|
Y.trigger,
|
|
1833
1834
|
{
|
|
1834
|
-
backgroundColor:
|
|
1835
|
-
borderColor:
|
|
1835
|
+
backgroundColor: I.input,
|
|
1836
|
+
borderColor: I.border
|
|
1836
1837
|
},
|
|
1837
|
-
|
|
1838
|
-
(
|
|
1838
|
+
a && { borderColor: I.error },
|
|
1839
|
+
(c || v.length === 0) && { backgroundColor: I.muted }
|
|
1839
1840
|
],
|
|
1840
1841
|
onPress: () => C(!0),
|
|
1841
|
-
disabled:
|
|
1842
|
+
disabled: c || v.length === 0,
|
|
1842
1843
|
activeOpacity: .7,
|
|
1843
1844
|
children: [
|
|
1844
|
-
|
|
1845
|
+
c && /* @__PURE__ */ T(j, {
|
|
1845
1846
|
size: "small",
|
|
1846
|
-
color:
|
|
1847
|
+
color: I.primary,
|
|
1847
1848
|
style: Y.triggerLoader
|
|
1848
1849
|
}),
|
|
1849
|
-
/* @__PURE__ */ (
|
|
1850
|
+
/* @__PURE__ */ T(R, {
|
|
1850
1851
|
style: [
|
|
1851
1852
|
Y.triggerText,
|
|
1852
|
-
{ color:
|
|
1853
|
-
!
|
|
1853
|
+
{ color: I.text },
|
|
1854
|
+
!s && { color: I.textMuted }
|
|
1854
1855
|
],
|
|
1855
1856
|
numberOfLines: 1,
|
|
1856
|
-
children:
|
|
1857
|
+
children: s?.label || l || P("renderer.defaultHttpInput.selectOption")
|
|
1857
1858
|
}),
|
|
1858
|
-
/* @__PURE__ */ (
|
|
1859
|
-
style: [Y.arrow, { color:
|
|
1859
|
+
/* @__PURE__ */ T(R, {
|
|
1860
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1860
1861
|
children: "▼"
|
|
1861
1862
|
})
|
|
1862
1863
|
]
|
|
1863
1864
|
}),
|
|
1864
|
-
m && /* @__PURE__ */ (
|
|
1865
|
-
style: [Y.disabledMessage, { color:
|
|
1865
|
+
m && /* @__PURE__ */ T(R, {
|
|
1866
|
+
style: [Y.disabledMessage, { color: I.error }],
|
|
1866
1867
|
children: m
|
|
1867
1868
|
}),
|
|
1868
|
-
/* @__PURE__ */ (
|
|
1869
|
+
/* @__PURE__ */ T(F, {
|
|
1869
1870
|
visible: S,
|
|
1870
1871
|
transparent: !0,
|
|
1871
1872
|
animationType: "fade",
|
|
1872
1873
|
onRequestClose: () => C(!1),
|
|
1873
|
-
children: /* @__PURE__ */ (
|
|
1874
|
+
children: /* @__PURE__ */ T(B, {
|
|
1874
1875
|
style: Y.modalOverlay,
|
|
1875
1876
|
activeOpacity: 1,
|
|
1876
1877
|
onPress: () => C(!1),
|
|
1877
|
-
children: /* @__PURE__ */ (
|
|
1878
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1878
|
+
children: /* @__PURE__ */ E(B, {
|
|
1879
|
+
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1879
1880
|
activeOpacity: 1,
|
|
1880
1881
|
onPress: () => {},
|
|
1881
|
-
children: [/* @__PURE__ */ (
|
|
1882
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1883
|
-
children: [/* @__PURE__ */ (
|
|
1884
|
-
style: [Y.modalTitle, { color:
|
|
1885
|
-
children: o ||
|
|
1886
|
-
}), /* @__PURE__ */ (
|
|
1882
|
+
children: [/* @__PURE__ */ E(V, {
|
|
1883
|
+
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1884
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1885
|
+
style: [Y.modalTitle, { color: I.text }],
|
|
1886
|
+
children: o || t.data.name
|
|
1887
|
+
}), /* @__PURE__ */ T(B, {
|
|
1887
1888
|
onPress: () => C(!1),
|
|
1888
|
-
children: /* @__PURE__ */ (
|
|
1889
|
-
style: [Y.closeButton, { color:
|
|
1889
|
+
children: /* @__PURE__ */ T(R, {
|
|
1890
|
+
style: [Y.closeButton, { color: I.textMuted }],
|
|
1890
1891
|
children: "✕"
|
|
1891
1892
|
})
|
|
1892
1893
|
})]
|
|
1893
|
-
}), /* @__PURE__ */ (
|
|
1894
|
+
}), /* @__PURE__ */ T(N, {
|
|
1894
1895
|
data: v,
|
|
1895
1896
|
keyExtractor: (e) => e.value,
|
|
1896
1897
|
style: Y.optionsList,
|
|
1897
1898
|
contentContainerStyle: Y.optionsListContent,
|
|
1898
|
-
renderItem: ({ item:
|
|
1899
|
-
let n =
|
|
1900
|
-
return /* @__PURE__ */ (
|
|
1901
|
-
style: [Y.option, n && { backgroundColor:
|
|
1899
|
+
renderItem: ({ item: t }) => {
|
|
1900
|
+
let n = t.value === e;
|
|
1901
|
+
return /* @__PURE__ */ E(B, {
|
|
1902
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1902
1903
|
onPress: () => {
|
|
1903
|
-
r(
|
|
1904
|
+
r(t.value), C(!1);
|
|
1904
1905
|
},
|
|
1905
1906
|
activeOpacity: .7,
|
|
1906
|
-
children: [/* @__PURE__ */ (
|
|
1907
|
-
style: [Y.optionText, { color:
|
|
1908
|
-
children:
|
|
1909
|
-
}), n && /* @__PURE__ */ (
|
|
1910
|
-
style: [Y.checkmark, { color:
|
|
1907
|
+
children: [/* @__PURE__ */ T(R, {
|
|
1908
|
+
style: [Y.optionText, { color: I.text }],
|
|
1909
|
+
children: t.label
|
|
1910
|
+
}), n && /* @__PURE__ */ T(R, {
|
|
1911
|
+
style: [Y.checkmark, { color: I.primary }],
|
|
1911
1912
|
children: "✓"
|
|
1912
1913
|
})]
|
|
1913
1914
|
});
|
|
@@ -1916,47 +1917,47 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
1916
1917
|
})
|
|
1917
1918
|
})
|
|
1918
1919
|
}),
|
|
1919
|
-
|
|
1920
|
-
style: [Y.error, { color:
|
|
1921
|
-
children:
|
|
1920
|
+
a && /* @__PURE__ */ T(R, {
|
|
1921
|
+
style: [Y.error, { color: I.error }],
|
|
1922
|
+
children: a
|
|
1922
1923
|
}),
|
|
1923
|
-
u && !
|
|
1924
|
-
style: [Y.helperText, { color:
|
|
1924
|
+
u && !a && /* @__PURE__ */ T(R, {
|
|
1925
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
1925
1926
|
children: u
|
|
1926
1927
|
})
|
|
1927
1928
|
]
|
|
1928
1929
|
});
|
|
1929
1930
|
}
|
|
1930
|
-
return /* @__PURE__ */ (
|
|
1931
|
+
return /* @__PURE__ */ E(V, {
|
|
1931
1932
|
style: Y.container,
|
|
1932
1933
|
children: [
|
|
1933
|
-
/* @__PURE__ */ (
|
|
1934
|
-
style: [Y.label, { color:
|
|
1935
|
-
children: [o ||
|
|
1936
|
-
style: { color:
|
|
1934
|
+
/* @__PURE__ */ E(R, {
|
|
1935
|
+
style: [Y.label, { color: I.textSecondary }],
|
|
1936
|
+
children: [o || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
1937
|
+
style: { color: I.error },
|
|
1937
1938
|
children: "*"
|
|
1938
1939
|
})]
|
|
1939
1940
|
}),
|
|
1940
|
-
/* @__PURE__ */ (
|
|
1941
|
+
/* @__PURE__ */ T(z, {
|
|
1941
1942
|
style: [Y.input, {
|
|
1942
|
-
backgroundColor:
|
|
1943
|
-
borderColor:
|
|
1944
|
-
color:
|
|
1943
|
+
backgroundColor: I.muted,
|
|
1944
|
+
borderColor: I.border,
|
|
1945
|
+
color: I.textMuted
|
|
1945
1946
|
}],
|
|
1946
1947
|
value: typeof n == "string" ? n : JSON.stringify(n),
|
|
1947
1948
|
editable: !1
|
|
1948
1949
|
}),
|
|
1949
|
-
|
|
1950
|
-
style: [Y.error, { color:
|
|
1951
|
-
children:
|
|
1950
|
+
a && /* @__PURE__ */ T(R, {
|
|
1951
|
+
style: [Y.error, { color: I.error }],
|
|
1952
|
+
children: a
|
|
1952
1953
|
}),
|
|
1953
|
-
u && !
|
|
1954
|
-
style: [Y.helperText, { color:
|
|
1954
|
+
u && !a && /* @__PURE__ */ T(R, {
|
|
1955
|
+
style: [Y.helperText, { color: I.textMuted }],
|
|
1955
1956
|
children: u
|
|
1956
1957
|
})
|
|
1957
1958
|
]
|
|
1958
1959
|
});
|
|
1959
|
-
}, Y =
|
|
1960
|
+
}, Y = L.create({
|
|
1960
1961
|
arrow: { fontSize: 12 },
|
|
1961
1962
|
checkmark: {
|
|
1962
1963
|
fontSize: 18,
|
|
@@ -2082,21 +2083,21 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2082
2083
|
flex: 1,
|
|
2083
2084
|
fontSize: 14
|
|
2084
2085
|
}
|
|
2085
|
-
}), we = ({ node:
|
|
2086
|
-
let { colors: l } =
|
|
2086
|
+
}), we = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, name: c }) => {
|
|
2087
|
+
let { colors: l } = e(), [u, d] = A(n?.toString() ?? "");
|
|
2087
2088
|
return D(() => {
|
|
2088
2089
|
d(n?.toString() ?? "");
|
|
2089
|
-
}, [n]), /* @__PURE__ */ (
|
|
2090
|
+
}, [n]), /* @__PURE__ */ E(V, {
|
|
2090
2091
|
style: Te.container,
|
|
2091
2092
|
children: [
|
|
2092
|
-
/* @__PURE__ */ (
|
|
2093
|
+
/* @__PURE__ */ E(R, {
|
|
2093
2094
|
style: [Te.label, { color: l.textSecondary }],
|
|
2094
|
-
children: [a ||
|
|
2095
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2095
2096
|
style: { color: l.error },
|
|
2096
2097
|
children: "*"
|
|
2097
2098
|
})]
|
|
2098
2099
|
}),
|
|
2099
|
-
/* @__PURE__ */ (
|
|
2100
|
+
/* @__PURE__ */ T(z, {
|
|
2100
2101
|
style: [
|
|
2101
2102
|
Te.input,
|
|
2102
2103
|
{
|
|
@@ -2120,17 +2121,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2120
2121
|
keyboardType: "numeric",
|
|
2121
2122
|
accessibilityLabel: c
|
|
2122
2123
|
}),
|
|
2123
|
-
i && /* @__PURE__ */ (
|
|
2124
|
+
i && /* @__PURE__ */ T(R, {
|
|
2124
2125
|
style: [Te.error, { color: l.error }],
|
|
2125
2126
|
children: i
|
|
2126
2127
|
}),
|
|
2127
|
-
s && !i && /* @__PURE__ */ (
|
|
2128
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2128
2129
|
style: [Te.helperText, { color: l.textMuted }],
|
|
2129
2130
|
children: s
|
|
2130
2131
|
})
|
|
2131
2132
|
]
|
|
2132
2133
|
});
|
|
2133
|
-
}, Te =
|
|
2134
|
+
}, Te = L.create({
|
|
2134
2135
|
container: { marginBottom: 16 },
|
|
2135
2136
|
error: {
|
|
2136
2137
|
fontSize: 12,
|
|
@@ -2152,21 +2153,21 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2152
2153
|
fontWeight: "500",
|
|
2153
2154
|
marginBottom: 8
|
|
2154
2155
|
}
|
|
2155
|
-
}), Ee = ({ node:
|
|
2156
|
-
let { colors: l } =
|
|
2157
|
-
return /* @__PURE__ */ (
|
|
2156
|
+
}), Ee = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, name: c }) => {
|
|
2157
|
+
let { colors: l } = e(), [u, d] = A(!1);
|
|
2158
|
+
return /* @__PURE__ */ E(V, {
|
|
2158
2159
|
style: De.container,
|
|
2159
2160
|
children: [
|
|
2160
|
-
/* @__PURE__ */ (
|
|
2161
|
+
/* @__PURE__ */ E(R, {
|
|
2161
2162
|
style: [De.label, { color: l.textSecondary }],
|
|
2162
|
-
children: [a ||
|
|
2163
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2163
2164
|
style: { color: l.error },
|
|
2164
2165
|
children: "*"
|
|
2165
2166
|
})]
|
|
2166
2167
|
}),
|
|
2167
|
-
/* @__PURE__ */ (
|
|
2168
|
+
/* @__PURE__ */ E(V, {
|
|
2168
2169
|
style: De.inputWrapper,
|
|
2169
|
-
children: [/* @__PURE__ */ (
|
|
2170
|
+
children: [/* @__PURE__ */ T(z, {
|
|
2170
2171
|
style: [
|
|
2171
2172
|
De.input,
|
|
2172
2173
|
{
|
|
@@ -2182,27 +2183,27 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2182
2183
|
placeholderTextColor: l.textMuted,
|
|
2183
2184
|
secureTextEntry: !u,
|
|
2184
2185
|
accessibilityLabel: c
|
|
2185
|
-
}), /* @__PURE__ */ (
|
|
2186
|
+
}), /* @__PURE__ */ T(B, {
|
|
2186
2187
|
style: De.toggleButton,
|
|
2187
2188
|
onPress: () => d(!u),
|
|
2188
2189
|
activeOpacity: .7,
|
|
2189
|
-
children: /* @__PURE__ */ (
|
|
2190
|
+
children: /* @__PURE__ */ T(R, {
|
|
2190
2191
|
style: [De.toggleText, { color: l.primary }],
|
|
2191
2192
|
children: u ? "Hide" : "Show"
|
|
2192
2193
|
})
|
|
2193
2194
|
})]
|
|
2194
2195
|
}),
|
|
2195
|
-
i && /* @__PURE__ */ (
|
|
2196
|
+
i && /* @__PURE__ */ T(R, {
|
|
2196
2197
|
style: [De.error, { color: l.error }],
|
|
2197
2198
|
children: i
|
|
2198
2199
|
}),
|
|
2199
|
-
s && !i && /* @__PURE__ */ (
|
|
2200
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2200
2201
|
style: [De.helperText, { color: l.textMuted }],
|
|
2201
2202
|
children: s
|
|
2202
2203
|
})
|
|
2203
2204
|
]
|
|
2204
2205
|
});
|
|
2205
|
-
}, De =
|
|
2206
|
+
}, De = L.create({
|
|
2206
2207
|
container: { marginBottom: 16 },
|
|
2207
2208
|
error: {
|
|
2208
2209
|
fontSize: 12,
|
|
@@ -2240,23 +2241,23 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2240
2241
|
fontSize: 12,
|
|
2241
2242
|
fontWeight: "600"
|
|
2242
2243
|
}
|
|
2243
|
-
}), Oe = ({ node:
|
|
2244
|
-
let s =
|
|
2244
|
+
}), Oe = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
2245
|
+
let s = h(), { colors: c } = e(), l = t.data.options || [], u = n || "", d = t.data.variant === "card", f = (e) => {
|
|
2245
2246
|
r(e);
|
|
2246
2247
|
};
|
|
2247
|
-
return /* @__PURE__ */ (
|
|
2248
|
+
return /* @__PURE__ */ E(V, {
|
|
2248
2249
|
style: X.container,
|
|
2249
2250
|
children: [
|
|
2250
|
-
/* @__PURE__ */ (
|
|
2251
|
+
/* @__PURE__ */ E(R, {
|
|
2251
2252
|
style: [X.label, { color: c.textSecondary }],
|
|
2252
|
-
children: [a ||
|
|
2253
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2253
2254
|
style: { color: c.error },
|
|
2254
2255
|
children: "*"
|
|
2255
2256
|
})]
|
|
2256
2257
|
}),
|
|
2257
2258
|
l.map((e) => {
|
|
2258
2259
|
let t = u === e.value, n = s(e.label) || e.value, r = s(e.description);
|
|
2259
|
-
return d ? /* @__PURE__ */ (
|
|
2260
|
+
return d ? /* @__PURE__ */ E(B, {
|
|
2260
2261
|
style: [
|
|
2261
2262
|
X.card,
|
|
2262
2263
|
{
|
|
@@ -2273,7 +2274,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2273
2274
|
disabled: e.disabled,
|
|
2274
2275
|
activeOpacity: .7,
|
|
2275
2276
|
children: [
|
|
2276
|
-
/* @__PURE__ */ (
|
|
2277
|
+
/* @__PURE__ */ T(V, {
|
|
2277
2278
|
style: [
|
|
2278
2279
|
X.radio,
|
|
2279
2280
|
{
|
|
@@ -2282,30 +2283,30 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2282
2283
|
},
|
|
2283
2284
|
t && { borderColor: c.primary }
|
|
2284
2285
|
],
|
|
2285
|
-
children: t && /* @__PURE__ */ (
|
|
2286
|
+
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2286
2287
|
}),
|
|
2287
|
-
e.image && /* @__PURE__ */ (
|
|
2288
|
+
e.image && /* @__PURE__ */ T(P, {
|
|
2288
2289
|
source: { uri: e.image },
|
|
2289
2290
|
style: X.cardImage
|
|
2290
2291
|
}),
|
|
2291
|
-
/* @__PURE__ */ (
|
|
2292
|
+
/* @__PURE__ */ E(V, {
|
|
2292
2293
|
style: X.cardTextContainer,
|
|
2293
|
-
children: [/* @__PURE__ */ (
|
|
2294
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2294
2295
|
style: [X.cardLabel, { color: c.textSecondary }],
|
|
2295
2296
|
children: n
|
|
2296
|
-
}), r && /* @__PURE__ */ (
|
|
2297
|
+
}), r && /* @__PURE__ */ T(R, {
|
|
2297
2298
|
style: [X.cardDescription, { color: c.textMuted }],
|
|
2298
2299
|
children: r
|
|
2299
2300
|
})]
|
|
2300
2301
|
})
|
|
2301
2302
|
]
|
|
2302
|
-
}, e.value) : /* @__PURE__ */ (
|
|
2303
|
+
}, e.value) : /* @__PURE__ */ E(B, {
|
|
2303
2304
|
style: X.option,
|
|
2304
2305
|
onPress: () => f(e.value),
|
|
2305
2306
|
disabled: e.disabled,
|
|
2306
2307
|
activeOpacity: .7,
|
|
2307
2308
|
children: [
|
|
2308
|
-
/* @__PURE__ */ (
|
|
2309
|
+
/* @__PURE__ */ T(V, {
|
|
2309
2310
|
style: [
|
|
2310
2311
|
X.radio,
|
|
2311
2312
|
{
|
|
@@ -2314,22 +2315,22 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2314
2315
|
},
|
|
2315
2316
|
t && { borderColor: c.primary }
|
|
2316
2317
|
],
|
|
2317
|
-
children: t && /* @__PURE__ */ (
|
|
2318
|
+
children: t && /* @__PURE__ */ T(V, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2318
2319
|
}),
|
|
2319
|
-
e.image && /* @__PURE__ */ (
|
|
2320
|
+
e.image && /* @__PURE__ */ T(P, {
|
|
2320
2321
|
source: { uri: e.image },
|
|
2321
2322
|
style: X.image
|
|
2322
2323
|
}),
|
|
2323
|
-
/* @__PURE__ */ (
|
|
2324
|
+
/* @__PURE__ */ E(V, {
|
|
2324
2325
|
style: X.optionTextContainer,
|
|
2325
|
-
children: [/* @__PURE__ */ (
|
|
2326
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2326
2327
|
style: [
|
|
2327
2328
|
X.optionLabel,
|
|
2328
2329
|
{ color: c.textSecondary },
|
|
2329
2330
|
e.disabled && { color: c.textMuted }
|
|
2330
2331
|
],
|
|
2331
2332
|
children: n
|
|
2332
|
-
}), r && /* @__PURE__ */ (
|
|
2333
|
+
}), r && /* @__PURE__ */ T(R, {
|
|
2333
2334
|
style: [X.optionDescription, { color: c.textMuted }],
|
|
2334
2335
|
children: r
|
|
2335
2336
|
})]
|
|
@@ -2337,17 +2338,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2337
2338
|
]
|
|
2338
2339
|
}, e.value);
|
|
2339
2340
|
}),
|
|
2340
|
-
i && /* @__PURE__ */ (
|
|
2341
|
+
i && /* @__PURE__ */ T(R, {
|
|
2341
2342
|
style: [X.error, { color: c.error }],
|
|
2342
2343
|
children: i
|
|
2343
2344
|
}),
|
|
2344
|
-
o && !i && /* @__PURE__ */ (
|
|
2345
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
2345
2346
|
style: [X.helperText, { color: c.textMuted }],
|
|
2346
2347
|
children: o
|
|
2347
2348
|
})
|
|
2348
2349
|
]
|
|
2349
2350
|
});
|
|
2350
|
-
}, X =
|
|
2351
|
+
}, X = L.create({
|
|
2351
2352
|
card: {
|
|
2352
2353
|
alignItems: "flex-start",
|
|
2353
2354
|
borderRadius: 8,
|
|
@@ -2416,21 +2417,21 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2416
2417
|
height: 10,
|
|
2417
2418
|
width: 10
|
|
2418
2419
|
}
|
|
2419
|
-
}), ke = ({ node:
|
|
2420
|
-
let [c, l] = A(!1), u =
|
|
2420
|
+
}), ke = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s }) => {
|
|
2421
|
+
let [c, l] = A(!1), u = h(), { colors: d } = e(), f = t.data.options || [], p = t.data.multiple, m = Array.isArray(n) ? n : n ? [n] : [], g = (e) => {
|
|
2421
2422
|
p ? r(m.includes(e) ? m.filter((t) => t !== e) : [...m, e]) : (r(e), l(!1));
|
|
2422
2423
|
};
|
|
2423
|
-
return /* @__PURE__ */ (
|
|
2424
|
+
return /* @__PURE__ */ E(V, {
|
|
2424
2425
|
style: Z.container,
|
|
2425
2426
|
children: [
|
|
2426
|
-
/* @__PURE__ */ (
|
|
2427
|
+
/* @__PURE__ */ E(R, {
|
|
2427
2428
|
style: [Z.label, { color: d.textSecondary }],
|
|
2428
|
-
children: [a ||
|
|
2429
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2429
2430
|
style: { color: d.error },
|
|
2430
2431
|
children: "*"
|
|
2431
2432
|
})]
|
|
2432
2433
|
}),
|
|
2433
|
-
/* @__PURE__ */ (
|
|
2434
|
+
/* @__PURE__ */ E(B, {
|
|
2434
2435
|
style: [
|
|
2435
2436
|
Z.trigger,
|
|
2436
2437
|
{
|
|
@@ -2441,7 +2442,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2441
2442
|
],
|
|
2442
2443
|
onPress: () => l(!0),
|
|
2443
2444
|
activeOpacity: .7,
|
|
2444
|
-
children: [/* @__PURE__ */ (
|
|
2445
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2445
2446
|
style: [
|
|
2446
2447
|
Z.triggerText,
|
|
2447
2448
|
{ color: d.text },
|
|
@@ -2453,64 +2454,64 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2453
2454
|
let e = f.find((e) => e.value === m[0]);
|
|
2454
2455
|
return e ? u(e.label) || e.value : o || "Select...";
|
|
2455
2456
|
})()
|
|
2456
|
-
}), /* @__PURE__ */ (
|
|
2457
|
+
}), /* @__PURE__ */ T(R, {
|
|
2457
2458
|
style: [Z.arrow, { color: d.textMuted }],
|
|
2458
2459
|
children: "▼"
|
|
2459
2460
|
})]
|
|
2460
2461
|
}),
|
|
2461
|
-
/* @__PURE__ */ (
|
|
2462
|
+
/* @__PURE__ */ T(F, {
|
|
2462
2463
|
visible: c,
|
|
2463
2464
|
transparent: !0,
|
|
2464
2465
|
animationType: "fade",
|
|
2465
2466
|
onRequestClose: () => l(!1),
|
|
2466
|
-
children: /* @__PURE__ */ (
|
|
2467
|
+
children: /* @__PURE__ */ T(B, {
|
|
2467
2468
|
style: Z.modalOverlay,
|
|
2468
2469
|
activeOpacity: 1,
|
|
2469
2470
|
onPress: () => l(!1),
|
|
2470
|
-
children: /* @__PURE__ */ (
|
|
2471
|
+
children: /* @__PURE__ */ E(V, {
|
|
2471
2472
|
style: [Z.modalContent, { backgroundColor: d.card }],
|
|
2472
2473
|
onStartShouldSetResponder: () => !0,
|
|
2473
2474
|
children: [
|
|
2474
|
-
/* @__PURE__ */ (
|
|
2475
|
+
/* @__PURE__ */ E(V, {
|
|
2475
2476
|
style: [Z.modalHeader, { borderBottomColor: d.border }],
|
|
2476
|
-
children: [/* @__PURE__ */ (
|
|
2477
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2477
2478
|
style: [Z.modalTitle, { color: d.text }],
|
|
2478
|
-
children: a ||
|
|
2479
|
-
}), /* @__PURE__ */ (
|
|
2479
|
+
children: a || t.data.name
|
|
2480
|
+
}), /* @__PURE__ */ T(B, {
|
|
2480
2481
|
onPress: () => l(!1),
|
|
2481
|
-
children: /* @__PURE__ */ (
|
|
2482
|
+
children: /* @__PURE__ */ T(R, {
|
|
2482
2483
|
style: [Z.closeButton, { color: d.textMuted }],
|
|
2483
2484
|
children: "✕"
|
|
2484
2485
|
})
|
|
2485
2486
|
})]
|
|
2486
2487
|
}),
|
|
2487
|
-
/* @__PURE__ */ (
|
|
2488
|
+
/* @__PURE__ */ T(I, {
|
|
2488
2489
|
style: Z.optionsList,
|
|
2489
2490
|
children: f.map((e) => {
|
|
2490
2491
|
let t = m.includes(e.value);
|
|
2491
|
-
return /* @__PURE__ */ (
|
|
2492
|
+
return /* @__PURE__ */ E(B, {
|
|
2492
2493
|
style: [Z.option, t && { backgroundColor: `${d.primary}20` }],
|
|
2493
|
-
onPress: () =>
|
|
2494
|
+
onPress: () => g(e.value),
|
|
2494
2495
|
disabled: e.disabled,
|
|
2495
2496
|
activeOpacity: .7,
|
|
2496
|
-
children: [/* @__PURE__ */ (
|
|
2497
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2497
2498
|
style: [
|
|
2498
2499
|
Z.optionText,
|
|
2499
2500
|
{ color: d.textSecondary },
|
|
2500
2501
|
e.disabled && { color: d.textMuted }
|
|
2501
2502
|
],
|
|
2502
2503
|
children: u(e.label) || e.value
|
|
2503
|
-
}), t && /* @__PURE__ */ (
|
|
2504
|
+
}), t && /* @__PURE__ */ T(R, {
|
|
2504
2505
|
style: [Z.checkmark, { color: d.primary }],
|
|
2505
2506
|
children: "✓"
|
|
2506
2507
|
})]
|
|
2507
2508
|
}, e.value);
|
|
2508
2509
|
})
|
|
2509
2510
|
}),
|
|
2510
|
-
p && /* @__PURE__ */ (
|
|
2511
|
+
p && /* @__PURE__ */ T(B, {
|
|
2511
2512
|
style: [Z.doneButton, { backgroundColor: d.primary }],
|
|
2512
2513
|
onPress: () => l(!1),
|
|
2513
|
-
children: /* @__PURE__ */ (
|
|
2514
|
+
children: /* @__PURE__ */ T(R, {
|
|
2514
2515
|
style: Z.doneButtonText,
|
|
2515
2516
|
children: "Done"
|
|
2516
2517
|
})
|
|
@@ -2519,17 +2520,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2519
2520
|
})
|
|
2520
2521
|
})
|
|
2521
2522
|
}),
|
|
2522
|
-
i && /* @__PURE__ */ (
|
|
2523
|
+
i && /* @__PURE__ */ T(R, {
|
|
2523
2524
|
style: [Z.error, { color: d.error }],
|
|
2524
2525
|
children: i
|
|
2525
2526
|
}),
|
|
2526
|
-
s && !i && /* @__PURE__ */ (
|
|
2527
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2527
2528
|
style: [Z.helperText, { color: d.textMuted }],
|
|
2528
2529
|
children: s
|
|
2529
2530
|
})
|
|
2530
2531
|
]
|
|
2531
2532
|
});
|
|
2532
|
-
}, Z =
|
|
2533
|
+
}, Z = L.create({
|
|
2533
2534
|
arrow: { fontSize: 12 },
|
|
2534
2535
|
checkmark: {
|
|
2535
2536
|
fontSize: 18,
|
|
@@ -2611,23 +2612,23 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2611
2612
|
flex: 1,
|
|
2612
2613
|
fontSize: 14
|
|
2613
2614
|
}
|
|
2614
|
-
}), Ae = ({ node:
|
|
2615
|
-
let { colors: s } =
|
|
2616
|
-
return /* @__PURE__ */ (
|
|
2615
|
+
}), Ae = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
2616
|
+
let { colors: s } = e(), c = !!n;
|
|
2617
|
+
return /* @__PURE__ */ E(V, {
|
|
2617
2618
|
style: je.container,
|
|
2618
2619
|
children: [
|
|
2619
|
-
/* @__PURE__ */ (
|
|
2620
|
+
/* @__PURE__ */ E(V, {
|
|
2620
2621
|
style: je.row,
|
|
2621
|
-
children: [/* @__PURE__ */ (
|
|
2622
|
+
children: [/* @__PURE__ */ T(V, {
|
|
2622
2623
|
style: je.labelContainer,
|
|
2623
|
-
children: /* @__PURE__ */ (
|
|
2624
|
+
children: /* @__PURE__ */ E(R, {
|
|
2624
2625
|
style: [je.label, { color: s.textSecondary }],
|
|
2625
|
-
children: [a ||
|
|
2626
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2626
2627
|
style: { color: s.error },
|
|
2627
2628
|
children: "*"
|
|
2628
2629
|
})]
|
|
2629
2630
|
})
|
|
2630
|
-
}), /* @__PURE__ */ (
|
|
2631
|
+
}), /* @__PURE__ */ T(te, {
|
|
2631
2632
|
trackColor: {
|
|
2632
2633
|
false: s.border,
|
|
2633
2634
|
true: `${s.primary}80`
|
|
@@ -2638,17 +2639,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2638
2639
|
value: c
|
|
2639
2640
|
})]
|
|
2640
2641
|
}),
|
|
2641
|
-
i && /* @__PURE__ */ (
|
|
2642
|
+
i && /* @__PURE__ */ T(R, {
|
|
2642
2643
|
style: [je.error, { color: s.error }],
|
|
2643
2644
|
children: i
|
|
2644
2645
|
}),
|
|
2645
|
-
o && !i && /* @__PURE__ */ (
|
|
2646
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
2646
2647
|
style: [je.helperText, { color: s.textMuted }],
|
|
2647
2648
|
children: o
|
|
2648
2649
|
})
|
|
2649
2650
|
]
|
|
2650
2651
|
});
|
|
2651
|
-
}, je =
|
|
2652
|
+
}, je = L.create({
|
|
2652
2653
|
container: { marginBottom: 16 },
|
|
2653
2654
|
error: {
|
|
2654
2655
|
fontSize: 12,
|
|
@@ -2668,19 +2669,19 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2668
2669
|
flexDirection: "row",
|
|
2669
2670
|
justifyContent: "space-between"
|
|
2670
2671
|
}
|
|
2671
|
-
}), Me = ({ node:
|
|
2672
|
-
let { colors: l } =
|
|
2673
|
-
return /* @__PURE__ */ (
|
|
2672
|
+
}), Me = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, name: c }) => {
|
|
2673
|
+
let { colors: l } = e();
|
|
2674
|
+
return /* @__PURE__ */ E(V, {
|
|
2674
2675
|
style: Ne.container,
|
|
2675
2676
|
children: [
|
|
2676
|
-
/* @__PURE__ */ (
|
|
2677
|
+
/* @__PURE__ */ E(R, {
|
|
2677
2678
|
style: [Ne.label, { color: l.textSecondary }],
|
|
2678
|
-
children: [a ||
|
|
2679
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2679
2680
|
style: { color: l.error },
|
|
2680
2681
|
children: "*"
|
|
2681
2682
|
})]
|
|
2682
2683
|
}),
|
|
2683
|
-
/* @__PURE__ */ (
|
|
2684
|
+
/* @__PURE__ */ T(z, {
|
|
2684
2685
|
style: [
|
|
2685
2686
|
Ne.textarea,
|
|
2686
2687
|
{
|
|
@@ -2699,17 +2700,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2699
2700
|
textAlignVertical: "top",
|
|
2700
2701
|
accessibilityLabel: c
|
|
2701
2702
|
}),
|
|
2702
|
-
i && /* @__PURE__ */ (
|
|
2703
|
+
i && /* @__PURE__ */ T(R, {
|
|
2703
2704
|
style: [Ne.error, { color: l.error }],
|
|
2704
2705
|
children: i
|
|
2705
2706
|
}),
|
|
2706
|
-
s && !i && /* @__PURE__ */ (
|
|
2707
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2707
2708
|
style: [Ne.helperText, { color: l.textMuted }],
|
|
2708
2709
|
children: s
|
|
2709
2710
|
})
|
|
2710
2711
|
]
|
|
2711
2712
|
});
|
|
2712
|
-
}, Ne =
|
|
2713
|
+
}, Ne = L.create({
|
|
2713
2714
|
container: { marginBottom: 16 },
|
|
2714
2715
|
error: {
|
|
2715
2716
|
fontSize: 12,
|
|
@@ -2732,19 +2733,19 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2732
2733
|
paddingHorizontal: 12,
|
|
2733
2734
|
paddingVertical: 8
|
|
2734
2735
|
}
|
|
2735
|
-
}), Pe = ({ node:
|
|
2736
|
-
let { colors: l } =
|
|
2737
|
-
return /* @__PURE__ */ (
|
|
2736
|
+
}), Pe = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, name: c }) => {
|
|
2737
|
+
let { colors: l } = e();
|
|
2738
|
+
return /* @__PURE__ */ E(V, {
|
|
2738
2739
|
style: Fe.container,
|
|
2739
2740
|
children: [
|
|
2740
|
-
/* @__PURE__ */ (
|
|
2741
|
+
/* @__PURE__ */ E(R, {
|
|
2741
2742
|
style: [Fe.label, { color: l.textSecondary }],
|
|
2742
|
-
children: [a ||
|
|
2743
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2743
2744
|
style: { color: l.error },
|
|
2744
2745
|
children: "*"
|
|
2745
2746
|
})]
|
|
2746
2747
|
}),
|
|
2747
|
-
/* @__PURE__ */ (
|
|
2748
|
+
/* @__PURE__ */ T(z, {
|
|
2748
2749
|
style: [
|
|
2749
2750
|
Fe.input,
|
|
2750
2751
|
{
|
|
@@ -2760,17 +2761,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2760
2761
|
placeholderTextColor: l.textMuted,
|
|
2761
2762
|
accessibilityLabel: c
|
|
2762
2763
|
}),
|
|
2763
|
-
i && /* @__PURE__ */ (
|
|
2764
|
+
i && /* @__PURE__ */ T(R, {
|
|
2764
2765
|
style: [Fe.error, { color: l.error }],
|
|
2765
2766
|
children: i
|
|
2766
2767
|
}),
|
|
2767
|
-
s && !i && /* @__PURE__ */ (
|
|
2768
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2768
2769
|
style: [Fe.helperText, { color: l.textMuted }],
|
|
2769
2770
|
children: s
|
|
2770
2771
|
})
|
|
2771
2772
|
]
|
|
2772
2773
|
});
|
|
2773
|
-
}, Fe =
|
|
2774
|
+
}, Fe = L.create({
|
|
2774
2775
|
container: { marginBottom: 16 },
|
|
2775
2776
|
error: {
|
|
2776
2777
|
fontSize: 12,
|
|
@@ -2792,25 +2793,25 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2792
2793
|
fontWeight: "500",
|
|
2793
2794
|
marginBottom: 8
|
|
2794
2795
|
}
|
|
2795
|
-
}), Ie = ({ node:
|
|
2796
|
-
let [c, l] = A(!1), { colors: u } =
|
|
2796
|
+
}), Ie = ({ node: t, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s }) => {
|
|
2797
|
+
let [c, l] = A(!1), { colors: u } = e(), d = (n || "").split(":"), f = Number.parseInt(d[0], 10), p = Number.parseInt(d[1], 10), m = Number.isNaN(f) ? 0 : f, h = Number.isNaN(p) ? 0 : p, [g, _] = A(m || 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 = () => n || o || "Select time", D = ee(() => {
|
|
2797
2798
|
r(`${String(g).padStart(2, "0")}:${String(v).padStart(2, "0")}`), l(!1);
|
|
2798
2799
|
}, [
|
|
2799
2800
|
g,
|
|
2800
2801
|
v,
|
|
2801
2802
|
r
|
|
2802
2803
|
]);
|
|
2803
|
-
return /* @__PURE__ */ (
|
|
2804
|
+
return /* @__PURE__ */ E(V, {
|
|
2804
2805
|
style: Q.container,
|
|
2805
2806
|
children: [
|
|
2806
|
-
/* @__PURE__ */ (
|
|
2807
|
+
/* @__PURE__ */ E(R, {
|
|
2807
2808
|
style: [Q.label, { color: u.textSecondary }],
|
|
2808
|
-
children: [a ||
|
|
2809
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
2809
2810
|
style: { color: u.error },
|
|
2810
2811
|
children: "*"
|
|
2811
2812
|
})]
|
|
2812
2813
|
}),
|
|
2813
|
-
/* @__PURE__ */ (
|
|
2814
|
+
/* @__PURE__ */ E(B, {
|
|
2814
2815
|
style: [
|
|
2815
2816
|
Q.trigger,
|
|
2816
2817
|
{
|
|
@@ -2823,7 +2824,7 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2823
2824
|
_(m || 0), y(h || 0), l(!0);
|
|
2824
2825
|
},
|
|
2825
2826
|
activeOpacity: .7,
|
|
2826
|
-
children: [/* @__PURE__ */ (
|
|
2827
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2827
2828
|
style: [
|
|
2828
2829
|
Q.triggerText,
|
|
2829
2830
|
{ color: u.text },
|
|
@@ -2831,56 +2832,56 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2831
2832
|
],
|
|
2832
2833
|
numberOfLines: 1,
|
|
2833
2834
|
children: w()
|
|
2834
|
-
}), /* @__PURE__ */ (
|
|
2835
|
+
}), /* @__PURE__ */ T(R, {
|
|
2835
2836
|
style: Q.icon,
|
|
2836
2837
|
children: "🕐"
|
|
2837
2838
|
})]
|
|
2838
2839
|
}),
|
|
2839
|
-
/* @__PURE__ */ (
|
|
2840
|
+
/* @__PURE__ */ T(F, {
|
|
2840
2841
|
visible: c,
|
|
2841
2842
|
transparent: !0,
|
|
2842
2843
|
animationType: "fade",
|
|
2843
2844
|
onRequestClose: () => l(!1),
|
|
2844
|
-
children: /* @__PURE__ */ (
|
|
2845
|
+
children: /* @__PURE__ */ T(B, {
|
|
2845
2846
|
style: Q.modalOverlay,
|
|
2846
2847
|
activeOpacity: 1,
|
|
2847
2848
|
onPress: () => l(!1),
|
|
2848
|
-
children: /* @__PURE__ */ (
|
|
2849
|
+
children: /* @__PURE__ */ E(B, {
|
|
2849
2850
|
style: [Q.modalContent, { backgroundColor: u.card }],
|
|
2850
2851
|
activeOpacity: 1,
|
|
2851
2852
|
onPress: () => {},
|
|
2852
2853
|
children: [
|
|
2853
|
-
/* @__PURE__ */ (
|
|
2854
|
+
/* @__PURE__ */ E(V, {
|
|
2854
2855
|
style: [Q.modalHeader, { borderBottomColor: u.separator }],
|
|
2855
|
-
children: [/* @__PURE__ */ (
|
|
2856
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2856
2857
|
style: [Q.modalTitle, { color: u.text }],
|
|
2857
|
-
children: a ||
|
|
2858
|
-
}), /* @__PURE__ */ (
|
|
2858
|
+
children: a || t.data.name
|
|
2859
|
+
}), /* @__PURE__ */ T(B, {
|
|
2859
2860
|
onPress: () => l(!1),
|
|
2860
|
-
children: /* @__PURE__ */ (
|
|
2861
|
+
children: /* @__PURE__ */ T(R, {
|
|
2861
2862
|
style: [Q.closeButton, { color: u.textMuted }],
|
|
2862
2863
|
children: "✕"
|
|
2863
2864
|
})
|
|
2864
2865
|
})]
|
|
2865
2866
|
}),
|
|
2866
|
-
/* @__PURE__ */ (
|
|
2867
|
+
/* @__PURE__ */ E(V, {
|
|
2867
2868
|
style: Q.pickerContainer,
|
|
2868
2869
|
children: [
|
|
2869
|
-
/* @__PURE__ */ (
|
|
2870
|
+
/* @__PURE__ */ E(V, {
|
|
2870
2871
|
style: Q.pickerColumn,
|
|
2871
|
-
children: [/* @__PURE__ */ (
|
|
2872
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2872
2873
|
style: [Q.pickerLabel, { color: u.textMuted }],
|
|
2873
2874
|
children: "Hour"
|
|
2874
|
-
}), /* @__PURE__ */ (
|
|
2875
|
+
}), /* @__PURE__ */ T(I, {
|
|
2875
2876
|
ref: b,
|
|
2876
2877
|
style: Q.picker,
|
|
2877
2878
|
contentContainerStyle: Q.pickerContent,
|
|
2878
2879
|
showsVerticalScrollIndicator: !1,
|
|
2879
|
-
children: S.map((e) => /* @__PURE__ */ (
|
|
2880
|
+
children: S.map((e) => /* @__PURE__ */ T(B, {
|
|
2880
2881
|
style: [Q.pickerItem, g === e && { backgroundColor: u.primary }],
|
|
2881
2882
|
onPress: () => _(e),
|
|
2882
2883
|
activeOpacity: .7,
|
|
2883
|
-
children: /* @__PURE__ */ (
|
|
2884
|
+
children: /* @__PURE__ */ T(R, {
|
|
2884
2885
|
style: [
|
|
2885
2886
|
Q.pickerItemText,
|
|
2886
2887
|
{ color: u.text },
|
|
@@ -2894,25 +2895,25 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2894
2895
|
}, e))
|
|
2895
2896
|
})]
|
|
2896
2897
|
}),
|
|
2897
|
-
/* @__PURE__ */ (
|
|
2898
|
+
/* @__PURE__ */ T(R, {
|
|
2898
2899
|
style: [Q.pickerSeparator, { color: u.text }],
|
|
2899
2900
|
children: ":"
|
|
2900
2901
|
}),
|
|
2901
|
-
/* @__PURE__ */ (
|
|
2902
|
+
/* @__PURE__ */ E(V, {
|
|
2902
2903
|
style: Q.pickerColumn,
|
|
2903
|
-
children: [/* @__PURE__ */ (
|
|
2904
|
+
children: [/* @__PURE__ */ T(R, {
|
|
2904
2905
|
style: [Q.pickerLabel, { color: u.textMuted }],
|
|
2905
2906
|
children: "Minute"
|
|
2906
|
-
}), /* @__PURE__ */ (
|
|
2907
|
+
}), /* @__PURE__ */ T(I, {
|
|
2907
2908
|
ref: x,
|
|
2908
2909
|
style: Q.picker,
|
|
2909
2910
|
contentContainerStyle: Q.pickerContent,
|
|
2910
2911
|
showsVerticalScrollIndicator: !1,
|
|
2911
|
-
children: C.map((e) => /* @__PURE__ */ (
|
|
2912
|
+
children: C.map((e) => /* @__PURE__ */ T(B, {
|
|
2912
2913
|
style: [Q.pickerItem, v === e && { backgroundColor: u.primary }],
|
|
2913
2914
|
onPress: () => y(e),
|
|
2914
2915
|
activeOpacity: .7,
|
|
2915
|
-
children: /* @__PURE__ */ (
|
|
2916
|
+
children: /* @__PURE__ */ T(R, {
|
|
2916
2917
|
style: [
|
|
2917
2918
|
Q.pickerItemText,
|
|
2918
2919
|
{ color: u.text },
|
|
@@ -2928,11 +2929,11 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2928
2929
|
})
|
|
2929
2930
|
]
|
|
2930
2931
|
}),
|
|
2931
|
-
/* @__PURE__ */ (
|
|
2932
|
+
/* @__PURE__ */ T(B, {
|
|
2932
2933
|
style: [Q.confirmButton, { backgroundColor: u.primary }],
|
|
2933
|
-
onPress:
|
|
2934
|
+
onPress: D,
|
|
2934
2935
|
activeOpacity: .7,
|
|
2935
|
-
children: /* @__PURE__ */ (
|
|
2936
|
+
children: /* @__PURE__ */ T(R, {
|
|
2936
2937
|
style: [Q.confirmButtonText, { color: u.background }],
|
|
2937
2938
|
children: "Confirm"
|
|
2938
2939
|
})
|
|
@@ -2941,17 +2942,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
2941
2942
|
})
|
|
2942
2943
|
})
|
|
2943
2944
|
}),
|
|
2944
|
-
i && /* @__PURE__ */ (
|
|
2945
|
+
i && /* @__PURE__ */ T(R, {
|
|
2945
2946
|
style: [Q.error, { color: u.error }],
|
|
2946
2947
|
children: i
|
|
2947
2948
|
}),
|
|
2948
|
-
s && !i && /* @__PURE__ */ (
|
|
2949
|
+
s && !i && /* @__PURE__ */ T(R, {
|
|
2949
2950
|
style: [Q.helperText, { color: u.textMuted }],
|
|
2950
2951
|
children: s
|
|
2951
2952
|
})
|
|
2952
2953
|
]
|
|
2953
2954
|
});
|
|
2954
|
-
}, Q =
|
|
2955
|
+
}, Q = L.create({
|
|
2955
2956
|
closeButton: {
|
|
2956
2957
|
fontSize: 24,
|
|
2957
2958
|
fontWeight: "300"
|
|
@@ -3042,31 +3043,31 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3042
3043
|
flex: 1,
|
|
3043
3044
|
fontSize: 14
|
|
3044
3045
|
}
|
|
3045
|
-
}), Le = ({ node:
|
|
3046
|
-
let [s, c] = A(!1), [l, u] = A(!0), d =
|
|
3047
|
-
let e = `${String(
|
|
3048
|
-
l ? (r([e,
|
|
3046
|
+
}), Le = ({ node: t, value: n, setValue: r, error: i, label: a, helperText: o }) => {
|
|
3047
|
+
let [s, c] = A(!1), [l, u] = A(!0), d = h(), { colors: f } = e(), p = Array.isArray(n) ? n : [], m = p[0] || "", g = p[1] || "", _ = m.split(":"), v = Number.parseInt(_[0], 10), y = Number.parseInt(_[1], 10), b = Number.isNaN(v) ? 0 : v, x = Number.isNaN(y) ? 0 : y, S = g.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 = () => m && g ? `${m} - ${g}` : m || d("renderer.defaultInputs.selectDateRange"), z = ee(() => {
|
|
3048
|
+
let e = `${String(k).padStart(2, "0")}:${String(M).padStart(2, "0")}`;
|
|
3049
|
+
l ? (r([e, g]), u(!1), j(D || 0), N(O || 0)) : (r([m, e]), c(!1), u(!0));
|
|
3049
3050
|
}, [
|
|
3050
3051
|
l,
|
|
3051
|
-
|
|
3052
|
-
|
|
3052
|
+
k,
|
|
3053
|
+
M,
|
|
3053
3054
|
m,
|
|
3054
|
-
|
|
3055
|
-
T,
|
|
3055
|
+
g,
|
|
3056
3056
|
D,
|
|
3057
|
+
O,
|
|
3057
3058
|
r
|
|
3058
3059
|
]);
|
|
3059
|
-
return /* @__PURE__ */ (
|
|
3060
|
+
return /* @__PURE__ */ E(V, {
|
|
3060
3061
|
style: $.container,
|
|
3061
3062
|
children: [
|
|
3062
|
-
/* @__PURE__ */ (
|
|
3063
|
+
/* @__PURE__ */ E(R, {
|
|
3063
3064
|
style: [$.label, { color: f.textSecondary }],
|
|
3064
|
-
children: [a ||
|
|
3065
|
+
children: [a || t.data.name, t.data.required && /* @__PURE__ */ T(R, {
|
|
3065
3066
|
style: { color: f.error },
|
|
3066
3067
|
children: "*"
|
|
3067
3068
|
})]
|
|
3068
3069
|
}),
|
|
3069
|
-
/* @__PURE__ */ (
|
|
3070
|
+
/* @__PURE__ */ E(B, {
|
|
3070
3071
|
style: [
|
|
3071
3072
|
$.trigger,
|
|
3072
3073
|
{
|
|
@@ -3076,77 +3077,77 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3076
3077
|
i && { borderColor: f.error }
|
|
3077
3078
|
],
|
|
3078
3079
|
onPress: () => {
|
|
3079
|
-
|
|
3080
|
+
j(b || 0), N(x || 0), u(!0), c(!0);
|
|
3080
3081
|
},
|
|
3081
3082
|
activeOpacity: .7,
|
|
3082
|
-
children: [/* @__PURE__ */ (
|
|
3083
|
+
children: [/* @__PURE__ */ T(R, {
|
|
3083
3084
|
style: [
|
|
3084
3085
|
$.triggerText,
|
|
3085
3086
|
{ color: f.text },
|
|
3086
3087
|
!m && { color: f.textMuted }
|
|
3087
3088
|
],
|
|
3088
3089
|
numberOfLines: 1,
|
|
3089
|
-
children:
|
|
3090
|
-
}), /* @__PURE__ */ (
|
|
3090
|
+
children: te()
|
|
3091
|
+
}), /* @__PURE__ */ T(R, {
|
|
3091
3092
|
style: $.icon,
|
|
3092
3093
|
children: "🕐"
|
|
3093
3094
|
})]
|
|
3094
3095
|
}),
|
|
3095
|
-
/* @__PURE__ */ (
|
|
3096
|
+
/* @__PURE__ */ T(F, {
|
|
3096
3097
|
visible: s,
|
|
3097
3098
|
transparent: !0,
|
|
3098
3099
|
animationType: "fade",
|
|
3099
3100
|
onRequestClose: () => c(!1),
|
|
3100
|
-
children: /* @__PURE__ */ (
|
|
3101
|
+
children: /* @__PURE__ */ T(B, {
|
|
3101
3102
|
style: $.modalOverlay,
|
|
3102
3103
|
activeOpacity: 1,
|
|
3103
3104
|
onPress: () => c(!1),
|
|
3104
|
-
children: /* @__PURE__ */ (
|
|
3105
|
+
children: /* @__PURE__ */ E(B, {
|
|
3105
3106
|
style: [$.modalContent, { backgroundColor: f.card }],
|
|
3106
3107
|
activeOpacity: 1,
|
|
3107
3108
|
onPress: () => {},
|
|
3108
3109
|
children: [
|
|
3109
|
-
/* @__PURE__ */ (
|
|
3110
|
+
/* @__PURE__ */ E(V, {
|
|
3110
3111
|
style: [$.modalHeader, { borderBottomColor: f.separator }],
|
|
3111
|
-
children: [/* @__PURE__ */ (
|
|
3112
|
+
children: [/* @__PURE__ */ T(R, {
|
|
3112
3113
|
style: [$.modalTitle, { color: f.text }],
|
|
3113
|
-
children: a ||
|
|
3114
|
-
}), /* @__PURE__ */ (
|
|
3114
|
+
children: a || t.data.name
|
|
3115
|
+
}), /* @__PURE__ */ T(B, {
|
|
3115
3116
|
onPress: () => c(!1),
|
|
3116
|
-
children: /* @__PURE__ */ (
|
|
3117
|
+
children: /* @__PURE__ */ T(R, {
|
|
3117
3118
|
style: [$.closeButton, { color: f.textMuted }],
|
|
3118
3119
|
children: "✕"
|
|
3119
3120
|
})
|
|
3120
3121
|
})]
|
|
3121
3122
|
}),
|
|
3122
|
-
/* @__PURE__ */ (
|
|
3123
|
+
/* @__PURE__ */ T(V, {
|
|
3123
3124
|
style: [$.rangeIndicator, { backgroundColor: f.primaryLight }],
|
|
3124
|
-
children: /* @__PURE__ */ (
|
|
3125
|
+
children: /* @__PURE__ */ T(R, {
|
|
3125
3126
|
style: [$.rangeIndicatorText, { color: f.primary }],
|
|
3126
3127
|
children: d(l ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3127
3128
|
})
|
|
3128
3129
|
}),
|
|
3129
|
-
/* @__PURE__ */ (
|
|
3130
|
+
/* @__PURE__ */ E(V, {
|
|
3130
3131
|
style: $.pickerContainer,
|
|
3131
3132
|
children: [
|
|
3132
|
-
/* @__PURE__ */ (
|
|
3133
|
+
/* @__PURE__ */ E(V, {
|
|
3133
3134
|
style: $.pickerColumn,
|
|
3134
|
-
children: [/* @__PURE__ */ (
|
|
3135
|
+
children: [/* @__PURE__ */ T(R, {
|
|
3135
3136
|
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3136
3137
|
children: "Hour"
|
|
3137
|
-
}), /* @__PURE__ */ (
|
|
3138
|
+
}), /* @__PURE__ */ T(I, {
|
|
3138
3139
|
style: $.picker,
|
|
3139
3140
|
contentContainerStyle: $.pickerContent,
|
|
3140
3141
|
showsVerticalScrollIndicator: !1,
|
|
3141
|
-
children:
|
|
3142
|
-
style: [$.pickerItem,
|
|
3143
|
-
onPress: () =>
|
|
3142
|
+
children: P.map((e) => /* @__PURE__ */ T(B, {
|
|
3143
|
+
style: [$.pickerItem, k === e && { backgroundColor: f.primary }],
|
|
3144
|
+
onPress: () => j(e),
|
|
3144
3145
|
activeOpacity: .7,
|
|
3145
|
-
children: /* @__PURE__ */ (
|
|
3146
|
+
children: /* @__PURE__ */ T(R, {
|
|
3146
3147
|
style: [
|
|
3147
3148
|
$.pickerItemText,
|
|
3148
3149
|
{ color: f.text },
|
|
3149
|
-
|
|
3150
|
+
k === e && {
|
|
3150
3151
|
color: f.background,
|
|
3151
3152
|
fontWeight: "600"
|
|
3152
3153
|
}
|
|
@@ -3156,28 +3157,28 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3156
3157
|
}, e))
|
|
3157
3158
|
})]
|
|
3158
3159
|
}),
|
|
3159
|
-
/* @__PURE__ */ (
|
|
3160
|
+
/* @__PURE__ */ T(R, {
|
|
3160
3161
|
style: [$.pickerSeparator, { color: f.text }],
|
|
3161
3162
|
children: ":"
|
|
3162
3163
|
}),
|
|
3163
|
-
/* @__PURE__ */ (
|
|
3164
|
+
/* @__PURE__ */ E(V, {
|
|
3164
3165
|
style: $.pickerColumn,
|
|
3165
|
-
children: [/* @__PURE__ */ (
|
|
3166
|
+
children: [/* @__PURE__ */ T(R, {
|
|
3166
3167
|
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3167
3168
|
children: "Minute"
|
|
3168
|
-
}), /* @__PURE__ */ (
|
|
3169
|
+
}), /* @__PURE__ */ T(I, {
|
|
3169
3170
|
style: $.picker,
|
|
3170
3171
|
contentContainerStyle: $.pickerContent,
|
|
3171
3172
|
showsVerticalScrollIndicator: !1,
|
|
3172
|
-
children:
|
|
3173
|
-
style: [$.pickerItem,
|
|
3174
|
-
onPress: () =>
|
|
3173
|
+
children: L.map((e) => /* @__PURE__ */ T(B, {
|
|
3174
|
+
style: [$.pickerItem, M === e && { backgroundColor: f.primary }],
|
|
3175
|
+
onPress: () => N(e),
|
|
3175
3176
|
activeOpacity: .7,
|
|
3176
|
-
children: /* @__PURE__ */ (
|
|
3177
|
+
children: /* @__PURE__ */ T(R, {
|
|
3177
3178
|
style: [
|
|
3178
3179
|
$.pickerItemText,
|
|
3179
3180
|
{ color: f.text },
|
|
3180
|
-
|
|
3181
|
+
M === e && {
|
|
3181
3182
|
color: f.background,
|
|
3182
3183
|
fontWeight: "600"
|
|
3183
3184
|
}
|
|
@@ -3189,11 +3190,11 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3189
3190
|
})
|
|
3190
3191
|
]
|
|
3191
3192
|
}),
|
|
3192
|
-
/* @__PURE__ */ (
|
|
3193
|
+
/* @__PURE__ */ T(B, {
|
|
3193
3194
|
style: [$.confirmButton, { backgroundColor: f.primary }],
|
|
3194
|
-
onPress:
|
|
3195
|
+
onPress: z,
|
|
3195
3196
|
activeOpacity: .7,
|
|
3196
|
-
children: /* @__PURE__ */ (
|
|
3197
|
+
children: /* @__PURE__ */ T(R, {
|
|
3197
3198
|
style: [$.confirmButtonText, { color: f.background }],
|
|
3198
3199
|
children: l ? "Next" : "Confirm"
|
|
3199
3200
|
})
|
|
@@ -3202,17 +3203,17 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3202
3203
|
})
|
|
3203
3204
|
})
|
|
3204
3205
|
}),
|
|
3205
|
-
i && /* @__PURE__ */ (
|
|
3206
|
+
i && /* @__PURE__ */ T(R, {
|
|
3206
3207
|
style: [$.error, { color: f.error }],
|
|
3207
3208
|
children: i
|
|
3208
3209
|
}),
|
|
3209
|
-
o && !i && /* @__PURE__ */ (
|
|
3210
|
+
o && !i && /* @__PURE__ */ T(R, {
|
|
3210
3211
|
style: [$.helperText, { color: f.textMuted }],
|
|
3211
3212
|
children: o
|
|
3212
3213
|
})
|
|
3213
3214
|
]
|
|
3214
3215
|
});
|
|
3215
|
-
}, $ =
|
|
3216
|
+
}, $ = L.create({
|
|
3216
3217
|
closeButton: {
|
|
3217
3218
|
fontSize: 24,
|
|
3218
3219
|
fontWeight: "300"
|
|
@@ -3313,14 +3314,14 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3313
3314
|
flex: 1,
|
|
3314
3315
|
fontSize: 14
|
|
3315
3316
|
}
|
|
3316
|
-
}), Re = ({ node: e }) => /* @__PURE__ */ (
|
|
3317
|
+
}), Re = ({ node: e }) => /* @__PURE__ */ E(R, { children: [
|
|
3317
3318
|
"TODO: Implement ",
|
|
3318
3319
|
e.data.type,
|
|
3319
3320
|
" input for React Native"
|
|
3320
3321
|
] }), ze = {
|
|
3321
|
-
address:
|
|
3322
|
-
autocomplete:
|
|
3323
|
-
checkbox:
|
|
3322
|
+
address: H,
|
|
3323
|
+
autocomplete: ce,
|
|
3324
|
+
checkbox: le,
|
|
3324
3325
|
date: ue,
|
|
3325
3326
|
daterange: de,
|
|
3326
3327
|
file: fe,
|
|
@@ -3336,9 +3337,9 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3336
3337
|
textarea: Me,
|
|
3337
3338
|
time: Ie,
|
|
3338
3339
|
timerange: Le
|
|
3339
|
-
}, Be = ({ children:
|
|
3340
|
-
let { colors: a } =
|
|
3341
|
-
return /* @__PURE__ */ (
|
|
3340
|
+
}, Be = ({ children: t = "Submit", disabled: n, isSubmitting: r, onPress: i }) => {
|
|
3341
|
+
let { colors: a } = e();
|
|
3342
|
+
return /* @__PURE__ */ T(B, {
|
|
3342
3343
|
style: [
|
|
3343
3344
|
Ve.button,
|
|
3344
3345
|
{ backgroundColor: a.primary },
|
|
@@ -3350,12 +3351,12 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3350
3351
|
disabled: n || r,
|
|
3351
3352
|
onPress: i,
|
|
3352
3353
|
activeOpacity: .7,
|
|
3353
|
-
children: r ? /* @__PURE__ */ (
|
|
3354
|
+
children: r ? /* @__PURE__ */ T(j, { color: a.primaryForeground }) : /* @__PURE__ */ T(R, {
|
|
3354
3355
|
style: [Ve.buttonText, { color: a.primaryForeground }],
|
|
3355
|
-
children:
|
|
3356
|
+
children: t
|
|
3356
3357
|
})
|
|
3357
3358
|
});
|
|
3358
|
-
}, Ve =
|
|
3359
|
+
}, Ve = L.create({
|
|
3359
3360
|
button: {
|
|
3360
3361
|
alignItems: "center",
|
|
3361
3362
|
borderRadius: 6,
|
|
@@ -3368,16 +3369,16 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3368
3369
|
fontSize: 16,
|
|
3369
3370
|
fontWeight: "600"
|
|
3370
3371
|
}
|
|
3371
|
-
}), He = ({ children: e }) => e, Ue = ({ node:
|
|
3372
|
-
let n =
|
|
3373
|
-
return /* @__PURE__ */ (
|
|
3372
|
+
}), He = ({ children: e }) => e, Ue = ({ node: t }) => {
|
|
3373
|
+
let n = h(), { colors: r } = e(), i = n(t.data?.label);
|
|
3374
|
+
return /* @__PURE__ */ T(R, {
|
|
3374
3375
|
style: [Ge.title, { color: r.text }],
|
|
3375
3376
|
children: i
|
|
3376
3377
|
});
|
|
3377
3378
|
}, We = () => {
|
|
3378
|
-
let { colors:
|
|
3379
|
-
return /* @__PURE__ */ (
|
|
3380
|
-
}, Ge =
|
|
3379
|
+
let { colors: t } = e();
|
|
3380
|
+
return /* @__PURE__ */ T(V, { style: [Ge.divider, { backgroundColor: t.separator }] });
|
|
3381
|
+
}, Ge = L.create({
|
|
3381
3382
|
divider: {
|
|
3382
3383
|
height: 1,
|
|
3383
3384
|
marginBottom: 16,
|
|
@@ -3391,33 +3392,33 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3391
3392
|
}), Ke = {
|
|
3392
3393
|
divider: We,
|
|
3393
3394
|
title: Ue
|
|
3394
|
-
}, qe = ({ components:
|
|
3395
|
-
let { colors: m } =
|
|
3396
|
-
components:
|
|
3395
|
+
}, qe = ({ components: t, contentContainerStyle: n, flows: r, googleApiKey: i, initialValues: a, language: s, onChange: c, onSubmit: l, style: u, theme: d, validate: f, validationMode: p }) => {
|
|
3396
|
+
let { colors: m } = e(), { canSubmit: h, clearSubmitMessage: g, config: _, formErrors: b, formValues: x, handleSubmit: S, inputNodes: C, isSubmitting: w, mergedFlow: ee, missingRequiredFields: D, setFieldValue: O, submitMessage: k, t: A, visibleNodes: j, visibleRootNodes: M } = o({
|
|
3397
|
+
components: t,
|
|
3397
3398
|
flows: r,
|
|
3398
3399
|
googleApiKey: i,
|
|
3399
3400
|
initialValues: a,
|
|
3400
|
-
language:
|
|
3401
|
+
language: s,
|
|
3401
3402
|
onChange: c,
|
|
3402
3403
|
onSubmit: l,
|
|
3403
3404
|
theme: d,
|
|
3404
3405
|
validate: f,
|
|
3405
3406
|
validationMode: p
|
|
3406
|
-
}), { FormWrapper:
|
|
3407
|
+
}), { FormWrapper: N, SubmitButton: P, SubmitButtonWrapper: F, renderNode: L } = y({
|
|
3407
3408
|
config: _,
|
|
3408
|
-
DefaultFormWrapper:
|
|
3409
|
-
DefaultGroup:
|
|
3409
|
+
DefaultFormWrapper: ne,
|
|
3410
|
+
DefaultGroup: ie,
|
|
3410
3411
|
DefaultSubmitButton: Be,
|
|
3411
3412
|
DefaultSubmitButtonWrapper: He,
|
|
3412
3413
|
defaultInputRenderers: ze,
|
|
3413
3414
|
defaultUI: Ke,
|
|
3414
|
-
formErrors:
|
|
3415
|
+
formErrors: b,
|
|
3415
3416
|
formValues: x,
|
|
3416
|
-
missingRequiredFields:
|
|
3417
|
-
setFieldValue:
|
|
3418
|
-
visibleNodes:
|
|
3417
|
+
missingRequiredFields: D,
|
|
3418
|
+
setFieldValue: O,
|
|
3419
|
+
visibleNodes: j
|
|
3419
3420
|
});
|
|
3420
|
-
return /* @__PURE__ */ (
|
|
3421
|
+
return /* @__PURE__ */ T(I, {
|
|
3421
3422
|
nestedScrollEnabled: !0,
|
|
3422
3423
|
style: [
|
|
3423
3424
|
Ye.container,
|
|
@@ -3425,52 +3426,52 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3425
3426
|
u
|
|
3426
3427
|
],
|
|
3427
3428
|
contentContainerStyle: n,
|
|
3428
|
-
children: /* @__PURE__ */ (
|
|
3429
|
+
children: /* @__PURE__ */ E(v, {
|
|
3429
3430
|
value: {
|
|
3430
|
-
flows:
|
|
3431
|
-
formErrors:
|
|
3431
|
+
flows: ee,
|
|
3432
|
+
formErrors: b,
|
|
3432
3433
|
formValues: x,
|
|
3433
3434
|
googleApiKey: _.googleApiKey,
|
|
3434
3435
|
inputNodes: C,
|
|
3435
3436
|
language: _.language,
|
|
3436
|
-
setFieldValue:
|
|
3437
|
+
setFieldValue: O
|
|
3437
3438
|
},
|
|
3438
|
-
children: [/* @__PURE__ */ (
|
|
3439
|
+
children: [/* @__PURE__ */ E(N, {
|
|
3439
3440
|
onSubmit: S,
|
|
3440
3441
|
children: [
|
|
3441
|
-
|
|
3442
|
-
h && /* @__PURE__ */ (
|
|
3443
|
-
missingFields:
|
|
3444
|
-
children: /* @__PURE__ */ (
|
|
3442
|
+
M.map((e) => L(e)),
|
|
3443
|
+
h && /* @__PURE__ */ T(F, {
|
|
3444
|
+
missingFields: D,
|
|
3445
|
+
children: /* @__PURE__ */ T(P, {
|
|
3445
3446
|
onPress: S,
|
|
3446
3447
|
disabled: w,
|
|
3447
3448
|
isSubmitting: w,
|
|
3448
|
-
children:
|
|
3449
|
+
children: A("renderer.defaultSubmitButton.submit")
|
|
3449
3450
|
})
|
|
3450
3451
|
}),
|
|
3451
|
-
/* @__PURE__ */ (
|
|
3452
|
+
/* @__PURE__ */ T(R, {
|
|
3452
3453
|
style: [Ye.poweredBy, { color: m.textMuted }],
|
|
3453
3454
|
children: "Powered by Treege"
|
|
3454
3455
|
})
|
|
3455
3456
|
]
|
|
3456
|
-
}),
|
|
3457
|
-
style: [Ye.message, { backgroundColor:
|
|
3458
|
-
children: [/* @__PURE__ */ (
|
|
3459
|
-
style: [Ye.messageText, { color:
|
|
3460
|
-
children:
|
|
3461
|
-
}), /* @__PURE__ */ (
|
|
3462
|
-
style: [Ye.messageClose, { color:
|
|
3457
|
+
}), k && /* @__PURE__ */ E(V, {
|
|
3458
|
+
style: [Ye.message, { backgroundColor: k.type === "success" ? m.successBg : m.errorBg }],
|
|
3459
|
+
children: [/* @__PURE__ */ T(R, {
|
|
3460
|
+
style: [Ye.messageText, { color: k.type === "success" ? m.success : m.error }],
|
|
3461
|
+
children: k.message
|
|
3462
|
+
}), /* @__PURE__ */ T(R, {
|
|
3463
|
+
style: [Ye.messageClose, { color: k.type === "success" ? m.success : m.error }],
|
|
3463
3464
|
onPress: g,
|
|
3464
|
-
children:
|
|
3465
|
+
children: A("common.close")
|
|
3465
3466
|
})]
|
|
3466
3467
|
})]
|
|
3467
3468
|
})
|
|
3468
3469
|
});
|
|
3469
|
-
}, Je = (e) => /* @__PURE__ */ (
|
|
3470
|
+
}, Je = (e) => /* @__PURE__ */ T(n, {
|
|
3470
3471
|
theme: e.theme,
|
|
3471
3472
|
storageKey: "treege-renderer-theme",
|
|
3472
|
-
children: /* @__PURE__ */ (
|
|
3473
|
-
}), Ye =
|
|
3473
|
+
children: /* @__PURE__ */ T(qe, { ...e })
|
|
3474
|
+
}), Ye = L.create({
|
|
3474
3475
|
container: { flex: 1 },
|
|
3475
3476
|
message: {
|
|
3476
3477
|
borderRadius: 6,
|
|
@@ -3493,4 +3494,4 @@ var B = e(), re = ({ children: e }) => /* @__PURE__ */ (0, B.jsx)(z, {
|
|
|
3493
3494
|
}
|
|
3494
3495
|
});
|
|
3495
3496
|
//#endregion
|
|
3496
|
-
export {
|
|
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, r as TreegeConfigProvider, Je as TreegeRenderer, a as applyReferenceTransformation, x as calculateReferenceFieldUpdates, w as checkFormFieldHasValue, s as convertFormValuesToNamedFormat, ze as defaultInputRenderers, Ke as defaultUI, g as evaluateCondition, p as evaluateConditions, m as fileToSerializable, _ as filesToSerializable, f as findStartNode, b as getFlowRenderState, t as getTranslatedText, C as isFieldEmpty, l as isStartNode, u as mergeFlows, ge as sanitize, ve as sanitizeHttpResponse, d as serializableToFile, S as useTreegeConfig, o as useTreegeRenderer };
|