treege 3.0.0-beta.61 → 3.0.0-beta.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +88 -37
- package/dist/{DefaultInputs-DamDWb5R.js → DefaultInputs-nX-CVK2i.js} +415 -390
- package/dist/{ThemeContext-cGSTk24y.js → ThemeContext-nopV_oRU.js} +184 -168
- package/dist/{editor-DtAQNPJm.js → editor-Bag5U_S5.js} +238 -238
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultStep.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +2 -0
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +2 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultStep.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultSubmitButton.d.ts +4 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +4 -1
- package/dist/renderer/types/renderer.d.ts +50 -4
- package/dist/renderer/utils/form.d.ts +16 -0
- package/dist/renderer-native.js +1014 -1002
- package/dist/renderer.js +3 -3
- package/package.json +1 -1
package/dist/renderer-native.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { useCallback as
|
|
1
|
+
import { A as e, C as t, D as n, F as r, I as i, S as a, T as o, V as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, j as _, k as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as D, x as ee } from "./ThemeContext-nopV_oRU.js";
|
|
2
|
+
import { useCallback as te, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
|
|
3
3
|
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
4
|
-
import { ActivityIndicator as
|
|
4
|
+
import { ActivityIndicator as ne, Alert as re, Animated as F, FlatList as I, Image as ie, Modal as ae, ScrollView as L, StyleSheet as R, Switch as oe, Text as z, TextInput as B, TouchableOpacity as V, View as H } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var
|
|
7
|
-
style:
|
|
6
|
+
var se = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
7
|
+
style: ce.container,
|
|
8
8
|
children: e
|
|
9
|
-
}),
|
|
9
|
+
}), ce = R.create({ container: { padding: 16 } }), le = async (e, t) => {
|
|
10
10
|
if (!e || e.trim().length < 3) return [];
|
|
11
11
|
try {
|
|
12
12
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -21,7 +21,7 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
21
21
|
} catch (e) {
|
|
22
22
|
return console.error("Nominatim fetch error:", e), [];
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, ue = async (e, t) => {
|
|
25
25
|
if (!e || e.trim().length < 3) return [];
|
|
26
26
|
try {
|
|
27
27
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -34,34 +34,34 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
34
34
|
} catch (e) {
|
|
35
35
|
return console.error("Google Places fetch error:", e), [];
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
let [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
37
|
+
}, de = (e, t) => {
|
|
38
|
+
let [n, r] = j(""), [a, o] = j([]), [s, c] = j(!1), [l, u] = j(!1), { value: d, placeholder: f, id: p, name: m } = e, { node: h, setValue: g, error: v, label: y, helperText: b } = t, { language: S, googleApiKey: C } = i(), w = _(), { colors: T } = x(), E = te((e) => {
|
|
39
|
+
g(e.value), r(""), c(!1), o([]);
|
|
40
|
+
}, [g]), D = () => {
|
|
41
|
+
c(!1);
|
|
42
42
|
};
|
|
43
43
|
return O(() => {
|
|
44
|
-
if (!
|
|
45
|
-
|
|
44
|
+
if (!n || n.trim().length < 3) {
|
|
45
|
+
o([]), u(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
u(!0);
|
|
49
49
|
let e = setTimeout(async () => {
|
|
50
|
-
|
|
50
|
+
o(C ? await ue(n, C) : await le(n, S)), u(!1);
|
|
51
51
|
}, 300);
|
|
52
52
|
return () => {
|
|
53
|
-
clearTimeout(e),
|
|
53
|
+
clearTimeout(e), u(!1);
|
|
54
54
|
};
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
n,
|
|
57
57
|
S,
|
|
58
58
|
C
|
|
59
59
|
]), /* @__PURE__ */ P(H, {
|
|
60
60
|
style: U.container,
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */ P(
|
|
62
|
+
/* @__PURE__ */ P(z, {
|
|
63
63
|
style: [U.label, { color: T.textSecondary }],
|
|
64
|
-
children: [
|
|
64
|
+
children: [y || h.data.name, h.data.required && /* @__PURE__ */ N(z, {
|
|
65
65
|
style: { color: T.error },
|
|
66
66
|
children: "*"
|
|
67
67
|
})]
|
|
@@ -73,25 +73,25 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
73
73
|
backgroundColor: T.input,
|
|
74
74
|
borderColor: T.border
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
v && { borderColor: T.error }
|
|
77
77
|
],
|
|
78
|
-
onPress: () =>
|
|
78
|
+
onPress: () => c(!0),
|
|
79
79
|
activeOpacity: .7,
|
|
80
|
-
children: [/* @__PURE__ */ N(
|
|
80
|
+
children: [/* @__PURE__ */ N(z, {
|
|
81
81
|
style: [
|
|
82
82
|
U.triggerText,
|
|
83
83
|
{ color: T.text },
|
|
84
|
-
!
|
|
84
|
+
!d && { color: T.textMuted }
|
|
85
85
|
],
|
|
86
86
|
numberOfLines: 1,
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */ N(
|
|
87
|
+
children: d || f || w("renderer.defaultAddressInput.enterAddress")
|
|
88
|
+
}), /* @__PURE__ */ N(z, {
|
|
89
89
|
style: U.icon,
|
|
90
90
|
children: "📍"
|
|
91
91
|
})]
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */ N(
|
|
94
|
-
visible:
|
|
93
|
+
/* @__PURE__ */ N(ae, {
|
|
94
|
+
visible: s,
|
|
95
95
|
transparent: !0,
|
|
96
96
|
animationType: "fade",
|
|
97
97
|
onRequestClose: D,
|
|
@@ -106,12 +106,12 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
106
106
|
children: [
|
|
107
107
|
/* @__PURE__ */ P(H, {
|
|
108
108
|
style: [U.modalHeader, { borderBottomColor: T.separator }],
|
|
109
|
-
children: [/* @__PURE__ */ N(
|
|
109
|
+
children: [/* @__PURE__ */ N(z, {
|
|
110
110
|
style: [U.modalTitle, { color: T.text }],
|
|
111
|
-
children:
|
|
111
|
+
children: y || h.data.name
|
|
112
112
|
}), /* @__PURE__ */ N(V, {
|
|
113
113
|
onPress: D,
|
|
114
|
-
children: /* @__PURE__ */ N(
|
|
114
|
+
children: /* @__PURE__ */ N(z, {
|
|
115
115
|
style: [U.closeButton, { color: T.textMuted }],
|
|
116
116
|
children: "✕"
|
|
117
117
|
})
|
|
@@ -119,49 +119,49 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
119
119
|
}),
|
|
120
120
|
/* @__PURE__ */ P(H, {
|
|
121
121
|
style: U.searchContainer,
|
|
122
|
-
children: [/* @__PURE__ */ N(
|
|
122
|
+
children: [/* @__PURE__ */ N(B, {
|
|
123
123
|
style: [U.searchInput, {
|
|
124
124
|
backgroundColor: T.muted,
|
|
125
125
|
borderColor: T.border,
|
|
126
126
|
color: T.text
|
|
127
127
|
}],
|
|
128
|
-
placeholder:
|
|
128
|
+
placeholder: f || w("renderer.defaultAddressInput.enterAddress"),
|
|
129
129
|
placeholderTextColor: T.textMuted,
|
|
130
|
-
value:
|
|
131
|
-
onChangeText:
|
|
130
|
+
value: n,
|
|
131
|
+
onChangeText: r,
|
|
132
132
|
autoFocus: !0,
|
|
133
133
|
autoCapitalize: "none",
|
|
134
134
|
autoCorrect: !1
|
|
135
|
-
}),
|
|
135
|
+
}), l && /* @__PURE__ */ N(ne, {
|
|
136
136
|
size: "small",
|
|
137
137
|
color: T.primary,
|
|
138
138
|
style: U.searchLoader
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
141
|
+
l ? /* @__PURE__ */ P(H, {
|
|
142
142
|
style: U.loadingContainer,
|
|
143
|
-
children: [/* @__PURE__ */ N(
|
|
143
|
+
children: [/* @__PURE__ */ N(ne, {
|
|
144
144
|
size: "small",
|
|
145
145
|
color: T.primary
|
|
146
|
-
}), /* @__PURE__ */ N(
|
|
146
|
+
}), /* @__PURE__ */ N(z, {
|
|
147
147
|
style: [U.loadingText, { color: T.textMuted }],
|
|
148
148
|
children: w("renderer.defaultAddressInput.searching")
|
|
149
149
|
})]
|
|
150
|
-
}) : /* @__PURE__ */ N(
|
|
151
|
-
data:
|
|
150
|
+
}) : /* @__PURE__ */ N(I, {
|
|
151
|
+
data: a,
|
|
152
152
|
keyExtractor: (e, t) => t.toString(),
|
|
153
153
|
style: U.suggestionsList,
|
|
154
154
|
contentContainerStyle: U.suggestionsListContent,
|
|
155
155
|
keyboardShouldPersistTaps: "handled",
|
|
156
|
-
ListEmptyComponent:
|
|
156
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ N(H, {
|
|
157
157
|
style: U.emptyContainer,
|
|
158
|
-
children: /* @__PURE__ */ N(
|
|
158
|
+
children: /* @__PURE__ */ N(z, {
|
|
159
159
|
style: [U.emptyText, { color: T.textMuted }],
|
|
160
160
|
children: w("renderer.defaultAddressInput.noAddressesFound")
|
|
161
161
|
})
|
|
162
162
|
}) : /* @__PURE__ */ N(H, {
|
|
163
163
|
style: U.emptyContainer,
|
|
164
|
-
children: /* @__PURE__ */ N(
|
|
164
|
+
children: /* @__PURE__ */ N(z, {
|
|
165
165
|
style: [U.emptyText, { color: T.textMuted }],
|
|
166
166
|
children: w("renderer.defaultAddressInput.typeMinChars")
|
|
167
167
|
})
|
|
@@ -170,10 +170,10 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
170
170
|
style: U.suggestionItem,
|
|
171
171
|
onPress: () => E(e),
|
|
172
172
|
activeOpacity: .7,
|
|
173
|
-
children: [/* @__PURE__ */ N(
|
|
173
|
+
children: [/* @__PURE__ */ N(z, {
|
|
174
174
|
style: U.suggestionIcon,
|
|
175
175
|
children: "📍"
|
|
176
|
-
}), /* @__PURE__ */ N(
|
|
176
|
+
}), /* @__PURE__ */ N(z, {
|
|
177
177
|
style: [U.suggestionText, { color: T.text }],
|
|
178
178
|
numberOfLines: 2,
|
|
179
179
|
children: e.label
|
|
@@ -184,13 +184,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
184
184
|
})
|
|
185
185
|
})
|
|
186
186
|
}),
|
|
187
|
-
|
|
187
|
+
v && /* @__PURE__ */ N(z, {
|
|
188
188
|
style: [U.error, { color: T.error }],
|
|
189
|
-
children:
|
|
189
|
+
children: v
|
|
190
190
|
}),
|
|
191
|
-
|
|
191
|
+
b && !v && /* @__PURE__ */ N(z, {
|
|
192
192
|
style: [U.helperText, { color: T.textMuted }],
|
|
193
|
-
children:
|
|
193
|
+
children: b
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
});
|
|
@@ -304,25 +304,25 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
304
304
|
flex: 1,
|
|
305
305
|
fontSize: 14
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
308
|
-
let { colors: i } =
|
|
307
|
+
}), fe = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
308
|
+
let { colors: i } = x();
|
|
309
309
|
return /* @__PURE__ */ P(H, {
|
|
310
|
-
style:
|
|
311
|
-
children: [n ? /* @__PURE__ */ N(
|
|
310
|
+
style: pe.content,
|
|
311
|
+
children: [n ? /* @__PURE__ */ N(ie, {
|
|
312
312
|
source: { uri: n },
|
|
313
|
-
style:
|
|
313
|
+
style: pe.image
|
|
314
314
|
}) : null, /* @__PURE__ */ P(H, {
|
|
315
|
-
style:
|
|
316
|
-
children: [/* @__PURE__ */ N(
|
|
317
|
-
style: [
|
|
315
|
+
style: pe.textWrapper,
|
|
316
|
+
children: [/* @__PURE__ */ N(z, {
|
|
317
|
+
style: [pe.label, { color: r ? i.textMuted : i.text }],
|
|
318
318
|
children: e
|
|
319
|
-
}), t ? /* @__PURE__ */ N(
|
|
320
|
-
style: [
|
|
319
|
+
}), t ? /* @__PURE__ */ N(z, {
|
|
320
|
+
style: [pe.description, { color: i.textMuted }],
|
|
321
321
|
children: t
|
|
322
322
|
}) : null]
|
|
323
323
|
})]
|
|
324
324
|
});
|
|
325
|
-
},
|
|
325
|
+
}, pe = R.create({
|
|
326
326
|
content: {
|
|
327
327
|
alignItems: "center",
|
|
328
328
|
flex: 1,
|
|
@@ -340,27 +340,27 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
340
340
|
},
|
|
341
341
|
label: { fontSize: 14 },
|
|
342
342
|
textWrapper: { flex: 1 }
|
|
343
|
-
}),
|
|
344
|
-
let [
|
|
345
|
-
if (!
|
|
346
|
-
let e =
|
|
347
|
-
return
|
|
343
|
+
}), me = (e, t) => {
|
|
344
|
+
let [n, r] = j(!1), [i, a] = j(""), { value: o, placeholder: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, p = _(), { colors: m } = x(), h = c.data.options || [], g = h.find((e) => e.value === o), v = k(() => {
|
|
345
|
+
if (!i.trim()) return h;
|
|
346
|
+
let e = i.toLowerCase();
|
|
347
|
+
return h.filter((t) => p(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
348
348
|
}, [
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
]),
|
|
353
|
-
|
|
354
|
-
},
|
|
355
|
-
|
|
349
|
+
h,
|
|
350
|
+
i,
|
|
351
|
+
p
|
|
352
|
+
]), y = (e) => {
|
|
353
|
+
l(e === o ? "" : e), r(!1), a("");
|
|
354
|
+
}, b = () => {
|
|
355
|
+
r(!1), a("");
|
|
356
356
|
};
|
|
357
357
|
return /* @__PURE__ */ P(H, {
|
|
358
358
|
style: W.container,
|
|
359
359
|
children: [
|
|
360
|
-
/* @__PURE__ */ P(
|
|
361
|
-
style: [W.label, { color:
|
|
362
|
-
children: [
|
|
363
|
-
style: { color:
|
|
360
|
+
/* @__PURE__ */ P(z, {
|
|
361
|
+
style: [W.label, { color: m.textSecondary }],
|
|
362
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(z, {
|
|
363
|
+
style: { color: m.error },
|
|
364
364
|
children: "*"
|
|
365
365
|
})]
|
|
366
366
|
}),
|
|
@@ -368,96 +368,96 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
368
368
|
style: [
|
|
369
369
|
W.trigger,
|
|
370
370
|
{
|
|
371
|
-
backgroundColor:
|
|
372
|
-
borderColor:
|
|
371
|
+
backgroundColor: m.input,
|
|
372
|
+
borderColor: m.border
|
|
373
373
|
},
|
|
374
|
-
|
|
374
|
+
u && { borderColor: m.error }
|
|
375
375
|
],
|
|
376
|
-
onPress: () =>
|
|
376
|
+
onPress: () => r(!0),
|
|
377
377
|
activeOpacity: .7,
|
|
378
|
-
children: [/* @__PURE__ */ N(
|
|
378
|
+
children: [/* @__PURE__ */ N(z, {
|
|
379
379
|
style: [
|
|
380
380
|
W.triggerText,
|
|
381
|
-
{ color:
|
|
382
|
-
!
|
|
381
|
+
{ color: m.text },
|
|
382
|
+
!o && { color: m.textMuted }
|
|
383
383
|
],
|
|
384
384
|
numberOfLines: 1,
|
|
385
|
-
children:
|
|
386
|
-
}), /* @__PURE__ */ N(
|
|
387
|
-
style: [W.arrow, { color:
|
|
385
|
+
children: o && g ? p(g.label) : s || p("renderer.defaultAutocompleteInput.selectOption")
|
|
386
|
+
}), /* @__PURE__ */ N(z, {
|
|
387
|
+
style: [W.arrow, { color: m.textMuted }],
|
|
388
388
|
children: "▼"
|
|
389
389
|
})]
|
|
390
390
|
}),
|
|
391
|
-
/* @__PURE__ */ N(
|
|
392
|
-
visible:
|
|
391
|
+
/* @__PURE__ */ N(ae, {
|
|
392
|
+
visible: n,
|
|
393
393
|
transparent: !0,
|
|
394
394
|
animationType: "fade",
|
|
395
|
-
onRequestClose:
|
|
395
|
+
onRequestClose: b,
|
|
396
396
|
children: /* @__PURE__ */ N(V, {
|
|
397
397
|
style: W.modalOverlay,
|
|
398
398
|
activeOpacity: 1,
|
|
399
|
-
onPress:
|
|
399
|
+
onPress: b,
|
|
400
400
|
children: /* @__PURE__ */ P(V, {
|
|
401
|
-
style: [W.modalContent, { backgroundColor:
|
|
401
|
+
style: [W.modalContent, { backgroundColor: m.card }],
|
|
402
402
|
activeOpacity: 1,
|
|
403
403
|
onPress: () => {},
|
|
404
404
|
children: [
|
|
405
405
|
/* @__PURE__ */ P(H, {
|
|
406
|
-
style: [W.modalHeader, { borderBottomColor:
|
|
407
|
-
children: [/* @__PURE__ */ N(
|
|
408
|
-
style: [W.modalTitle, { color:
|
|
409
|
-
children:
|
|
406
|
+
style: [W.modalHeader, { borderBottomColor: m.separator }],
|
|
407
|
+
children: [/* @__PURE__ */ N(z, {
|
|
408
|
+
style: [W.modalTitle, { color: m.text }],
|
|
409
|
+
children: d || c.data.name
|
|
410
410
|
}), /* @__PURE__ */ N(V, {
|
|
411
|
-
onPress:
|
|
412
|
-
children: /* @__PURE__ */ N(
|
|
413
|
-
style: [W.closeButton, { color:
|
|
411
|
+
onPress: b,
|
|
412
|
+
children: /* @__PURE__ */ N(z, {
|
|
413
|
+
style: [W.closeButton, { color: m.textMuted }],
|
|
414
414
|
children: "✕"
|
|
415
415
|
})
|
|
416
416
|
})]
|
|
417
417
|
}),
|
|
418
418
|
/* @__PURE__ */ N(H, {
|
|
419
419
|
style: W.searchContainer,
|
|
420
|
-
children: /* @__PURE__ */ N(
|
|
420
|
+
children: /* @__PURE__ */ N(B, {
|
|
421
421
|
style: [W.searchInput, {
|
|
422
|
-
backgroundColor:
|
|
423
|
-
borderColor:
|
|
424
|
-
color:
|
|
422
|
+
backgroundColor: m.muted,
|
|
423
|
+
borderColor: m.border,
|
|
424
|
+
color: m.text
|
|
425
425
|
}],
|
|
426
|
-
placeholder:
|
|
427
|
-
placeholderTextColor:
|
|
428
|
-
value:
|
|
429
|
-
onChangeText:
|
|
426
|
+
placeholder: s || p("renderer.defaultAutocompleteInput.search"),
|
|
427
|
+
placeholderTextColor: m.textMuted,
|
|
428
|
+
value: i,
|
|
429
|
+
onChangeText: a,
|
|
430
430
|
autoFocus: !0,
|
|
431
431
|
autoCapitalize: "none",
|
|
432
432
|
autoCorrect: !1
|
|
433
433
|
})
|
|
434
434
|
}),
|
|
435
|
-
/* @__PURE__ */ N(
|
|
436
|
-
data:
|
|
435
|
+
/* @__PURE__ */ N(I, {
|
|
436
|
+
data: v,
|
|
437
437
|
keyExtractor: (e) => e.value,
|
|
438
438
|
style: W.optionsList,
|
|
439
439
|
contentContainerStyle: W.optionsListContent,
|
|
440
440
|
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
441
441
|
style: W.emptyContainer,
|
|
442
|
-
children: /* @__PURE__ */ N(
|
|
443
|
-
style: [W.emptyText, { color:
|
|
444
|
-
children:
|
|
442
|
+
children: /* @__PURE__ */ N(z, {
|
|
443
|
+
style: [W.emptyText, { color: m.textMuted }],
|
|
444
|
+
children: p("renderer.defaultAutocompleteInput.noResults")
|
|
445
445
|
})
|
|
446
446
|
}),
|
|
447
447
|
renderItem: ({ item: e }) => {
|
|
448
|
-
let t = e.value ===
|
|
448
|
+
let t = e.value === o;
|
|
449
449
|
return /* @__PURE__ */ P(V, {
|
|
450
|
-
style: [W.option, t && { backgroundColor:
|
|
451
|
-
onPress: () =>
|
|
450
|
+
style: [W.option, t && { backgroundColor: m.primaryLight }],
|
|
451
|
+
onPress: () => y(e.value),
|
|
452
452
|
disabled: e.disabled,
|
|
453
453
|
activeOpacity: .7,
|
|
454
|
-
children: [/* @__PURE__ */ N(
|
|
455
|
-
label:
|
|
456
|
-
description:
|
|
454
|
+
children: [/* @__PURE__ */ N(fe, {
|
|
455
|
+
label: p(e.label) || e.value,
|
|
456
|
+
description: p(e.description),
|
|
457
457
|
image: e.image,
|
|
458
458
|
disabled: e.disabled
|
|
459
|
-
}), t && /* @__PURE__ */ N(
|
|
460
|
-
style: [W.checkmark, { color:
|
|
459
|
+
}), t && /* @__PURE__ */ N(z, {
|
|
460
|
+
style: [W.checkmark, { color: m.primary }],
|
|
461
461
|
children: "✓"
|
|
462
462
|
})]
|
|
463
463
|
});
|
|
@@ -467,13 +467,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
467
467
|
})
|
|
468
468
|
})
|
|
469
469
|
}),
|
|
470
|
-
|
|
471
|
-
style: [W.error, { color:
|
|
472
|
-
children:
|
|
470
|
+
u && /* @__PURE__ */ N(z, {
|
|
471
|
+
style: [W.error, { color: m.error }],
|
|
472
|
+
children: u
|
|
473
473
|
}),
|
|
474
|
-
|
|
475
|
-
style: [W.helperText, { color:
|
|
476
|
-
children:
|
|
474
|
+
f && !u && /* @__PURE__ */ N(z, {
|
|
475
|
+
style: [W.helperText, { color: m.textMuted }],
|
|
476
|
+
children: f
|
|
477
477
|
})
|
|
478
478
|
]
|
|
479
479
|
});
|
|
@@ -564,67 +564,67 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
564
564
|
flex: 1,
|
|
565
565
|
fontSize: 14
|
|
566
566
|
}
|
|
567
|
-
}),
|
|
568
|
-
let
|
|
569
|
-
|
|
570
|
-
},
|
|
567
|
+
}), he = (e, t) => {
|
|
568
|
+
let n = _(), { value: r } = e, { node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = x(), u = i.data.options || [], d = u.length > 0, f = Array.isArray(r) ? r : [], p = typeof r == "boolean" ? r : !1, m = (e) => {
|
|
569
|
+
a(d ? f.includes(e) ? f.filter((t) => t !== e) : [...f, e] : !p);
|
|
570
|
+
}, h = (e) => d ? f.includes(e) : p;
|
|
571
571
|
return /* @__PURE__ */ P(H, {
|
|
572
572
|
style: G.container,
|
|
573
573
|
children: [
|
|
574
|
-
/* @__PURE__ */ P(
|
|
575
|
-
style: [G.label, { color:
|
|
576
|
-
children: [
|
|
577
|
-
style: { color:
|
|
574
|
+
/* @__PURE__ */ P(z, {
|
|
575
|
+
style: [G.label, { color: l.textSecondary }],
|
|
576
|
+
children: [s || i.data.name, i.data.required && /* @__PURE__ */ N(z, {
|
|
577
|
+
style: { color: l.error },
|
|
578
578
|
children: "*"
|
|
579
579
|
})]
|
|
580
580
|
}),
|
|
581
|
-
|
|
582
|
-
let t =
|
|
581
|
+
u.length > 0 ? u.map((e) => {
|
|
582
|
+
let t = n(e.description);
|
|
583
583
|
return /* @__PURE__ */ P(V, {
|
|
584
584
|
style: G.option,
|
|
585
|
-
onPress: () =>
|
|
585
|
+
onPress: () => m(e.value),
|
|
586
586
|
disabled: e.disabled,
|
|
587
587
|
activeOpacity: .7,
|
|
588
588
|
accessible: !0,
|
|
589
589
|
accessibilityRole: "checkbox",
|
|
590
590
|
accessibilityState: {
|
|
591
|
-
checked:
|
|
591
|
+
checked: h(e.value),
|
|
592
592
|
disabled: e.disabled
|
|
593
593
|
},
|
|
594
|
-
accessibilityLabel:
|
|
594
|
+
accessibilityLabel: n(e.label) || e.value,
|
|
595
595
|
children: [
|
|
596
596
|
/* @__PURE__ */ N(H, {
|
|
597
597
|
style: [
|
|
598
598
|
G.checkbox,
|
|
599
599
|
{
|
|
600
|
-
backgroundColor:
|
|
601
|
-
borderColor:
|
|
600
|
+
backgroundColor: l.input,
|
|
601
|
+
borderColor: l.border
|
|
602
602
|
},
|
|
603
|
-
|
|
604
|
-
backgroundColor:
|
|
605
|
-
borderColor:
|
|
603
|
+
h(e.value) && {
|
|
604
|
+
backgroundColor: l.primary,
|
|
605
|
+
borderColor: l.primary
|
|
606
606
|
}
|
|
607
607
|
],
|
|
608
|
-
children:
|
|
608
|
+
children: h(e.value) && /* @__PURE__ */ N(z, {
|
|
609
609
|
style: G.checkmark,
|
|
610
610
|
children: "✓"
|
|
611
611
|
})
|
|
612
612
|
}),
|
|
613
|
-
e.image ? /* @__PURE__ */ N(
|
|
613
|
+
e.image ? /* @__PURE__ */ N(ie, {
|
|
614
614
|
source: { uri: e.image },
|
|
615
615
|
style: G.image
|
|
616
616
|
}) : null,
|
|
617
617
|
/* @__PURE__ */ P(H, {
|
|
618
618
|
style: G.optionTextContainer,
|
|
619
|
-
children: [/* @__PURE__ */ N(
|
|
619
|
+
children: [/* @__PURE__ */ N(z, {
|
|
620
620
|
style: [
|
|
621
621
|
G.optionLabel,
|
|
622
|
-
{ color:
|
|
623
|
-
e.disabled && { color:
|
|
622
|
+
{ color: l.textSecondary },
|
|
623
|
+
e.disabled && { color: l.textMuted }
|
|
624
624
|
],
|
|
625
|
-
children:
|
|
626
|
-
}), t && /* @__PURE__ */ N(
|
|
627
|
-
style: [G.optionDescription, { color:
|
|
625
|
+
children: n(e.label) || e.value
|
|
626
|
+
}), t && /* @__PURE__ */ N(z, {
|
|
627
|
+
style: [G.optionDescription, { color: l.textMuted }],
|
|
628
628
|
children: t
|
|
629
629
|
})]
|
|
630
630
|
})
|
|
@@ -632,40 +632,40 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
632
632
|
}, e.value);
|
|
633
633
|
}) : /* @__PURE__ */ P(V, {
|
|
634
634
|
style: G.option,
|
|
635
|
-
onPress: () =>
|
|
635
|
+
onPress: () => m(""),
|
|
636
636
|
activeOpacity: .7,
|
|
637
637
|
accessible: !0,
|
|
638
638
|
accessibilityRole: "checkbox",
|
|
639
|
-
accessibilityState: { checked:
|
|
640
|
-
accessibilityLabel:
|
|
639
|
+
accessibilityState: { checked: p },
|
|
640
|
+
accessibilityLabel: s || i.data.name,
|
|
641
641
|
children: [/* @__PURE__ */ N(H, {
|
|
642
642
|
style: [
|
|
643
643
|
G.checkbox,
|
|
644
644
|
{
|
|
645
|
-
backgroundColor:
|
|
646
|
-
borderColor:
|
|
645
|
+
backgroundColor: l.input,
|
|
646
|
+
borderColor: l.border
|
|
647
647
|
},
|
|
648
|
-
|
|
649
|
-
backgroundColor:
|
|
650
|
-
borderColor:
|
|
648
|
+
p && {
|
|
649
|
+
backgroundColor: l.primary,
|
|
650
|
+
borderColor: l.primary
|
|
651
651
|
}
|
|
652
652
|
],
|
|
653
|
-
children:
|
|
653
|
+
children: p && /* @__PURE__ */ N(z, {
|
|
654
654
|
style: G.checkmark,
|
|
655
655
|
children: "✓"
|
|
656
656
|
})
|
|
657
|
-
}), /* @__PURE__ */ N(
|
|
658
|
-
style: [G.optionLabel, { color:
|
|
659
|
-
children:
|
|
657
|
+
}), /* @__PURE__ */ N(z, {
|
|
658
|
+
style: [G.optionLabel, { color: l.textSecondary }],
|
|
659
|
+
children: s || i.data.name
|
|
660
660
|
})]
|
|
661
661
|
}),
|
|
662
|
-
|
|
663
|
-
style: [G.error, { color:
|
|
664
|
-
children:
|
|
662
|
+
o && /* @__PURE__ */ N(z, {
|
|
663
|
+
style: [G.error, { color: l.error }],
|
|
664
|
+
children: o
|
|
665
665
|
}),
|
|
666
|
-
|
|
667
|
-
style: [G.helperText, { color:
|
|
668
|
-
children:
|
|
666
|
+
c && !o && /* @__PURE__ */ N(z, {
|
|
667
|
+
style: [G.helperText, { color: l.textMuted }],
|
|
668
|
+
children: c
|
|
669
669
|
})
|
|
670
670
|
]
|
|
671
671
|
});
|
|
@@ -715,15 +715,15 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
715
715
|
},
|
|
716
716
|
optionLabel: { fontSize: 14 },
|
|
717
717
|
optionTextContainer: { flex: 1 }
|
|
718
|
-
}),
|
|
719
|
-
let [
|
|
720
|
-
let e =
|
|
718
|
+
}), ge = (e, t) => {
|
|
719
|
+
let [n, r] = j(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = x(), f = _(), p = i ? new Date(i) : void 0, { year: m, month: h, today: g } = k(() => {
|
|
720
|
+
let e = p || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
721
721
|
return r.setHours(0, 0, 0, 0), {
|
|
722
722
|
month: n,
|
|
723
723
|
today: r,
|
|
724
724
|
year: t
|
|
725
725
|
};
|
|
726
|
-
}, [
|
|
726
|
+
}, [p]), [v, y] = j(m), [b, S] = j(h), C = [
|
|
727
727
|
"January",
|
|
728
728
|
"February",
|
|
729
729
|
"March",
|
|
@@ -737,42 +737,42 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
737
737
|
"November",
|
|
738
738
|
"December"
|
|
739
739
|
], w = k(() => {
|
|
740
|
-
let e = new Date(
|
|
740
|
+
let e = new Date(v, b, 1).getDay(), t = new Date(v, b + 1, 0).getDate(), n = new Date(v, b, 0).getDate(), r = [];
|
|
741
741
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
742
|
-
date: new Date(
|
|
742
|
+
date: new Date(v, b - 1, n - t),
|
|
743
743
|
day: n - t,
|
|
744
744
|
isCurrentMonth: !1
|
|
745
745
|
});
|
|
746
746
|
for (let e = 1; e <= t; e++) r.push({
|
|
747
|
-
date: new Date(
|
|
747
|
+
date: new Date(v, b, e),
|
|
748
748
|
day: e,
|
|
749
749
|
isCurrentMonth: !0
|
|
750
750
|
});
|
|
751
751
|
let i = 42 - r.length;
|
|
752
752
|
for (let e = 1; e <= i; e++) r.push({
|
|
753
|
-
date: new Date(
|
|
753
|
+
date: new Date(v, b + 1, e),
|
|
754
754
|
day: e,
|
|
755
755
|
isCurrentMonth: !1
|
|
756
756
|
});
|
|
757
757
|
return r;
|
|
758
|
-
}, [
|
|
759
|
-
|
|
758
|
+
}, [v, b]), T = te((e) => {
|
|
759
|
+
o.data.disablePast && e < g || (s(e.toISOString()), r(!1));
|
|
760
760
|
}, [
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
761
|
+
o.data.disablePast,
|
|
762
|
+
g,
|
|
763
|
+
s
|
|
764
764
|
]), E = () => {
|
|
765
|
-
|
|
765
|
+
b === 0 ? (S(11), y(v - 1)) : S(b - 1);
|
|
766
766
|
}, D = () => {
|
|
767
|
-
|
|
768
|
-
},
|
|
767
|
+
b === 11 ? (S(0), y(v + 1)) : S(b + 1);
|
|
768
|
+
}, ee = () => p ? p.toLocaleDateString() : a || f("renderer.defaultInputs.selectDate"), O = (e) => o.data.disablePast ? e < g : !1, A = (e) => p ? e.getDate() === p.getDate() && e.getMonth() === p.getMonth() && e.getFullYear() === p.getFullYear() : !1;
|
|
769
769
|
return /* @__PURE__ */ P(H, {
|
|
770
770
|
style: K.container,
|
|
771
771
|
children: [
|
|
772
|
-
/* @__PURE__ */ P(
|
|
773
|
-
style: [K.label, { color:
|
|
774
|
-
children: [
|
|
775
|
-
style: { color:
|
|
772
|
+
/* @__PURE__ */ P(z, {
|
|
773
|
+
style: [K.label, { color: d.textSecondary }],
|
|
774
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ N(z, {
|
|
775
|
+
style: { color: d.error },
|
|
776
776
|
children: "*"
|
|
777
777
|
})]
|
|
778
778
|
}),
|
|
@@ -780,49 +780,49 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
780
780
|
style: [
|
|
781
781
|
K.trigger,
|
|
782
782
|
{
|
|
783
|
-
backgroundColor:
|
|
784
|
-
borderColor:
|
|
783
|
+
backgroundColor: d.input,
|
|
784
|
+
borderColor: d.border
|
|
785
785
|
},
|
|
786
|
-
|
|
786
|
+
c && { borderColor: d.error }
|
|
787
787
|
],
|
|
788
|
-
onPress: () =>
|
|
788
|
+
onPress: () => r(!0),
|
|
789
789
|
activeOpacity: .7,
|
|
790
|
-
children: [/* @__PURE__ */ N(
|
|
790
|
+
children: [/* @__PURE__ */ N(z, {
|
|
791
791
|
style: [
|
|
792
792
|
K.triggerText,
|
|
793
|
-
{ color:
|
|
794
|
-
!
|
|
793
|
+
{ color: d.text },
|
|
794
|
+
!i && { color: d.textMuted }
|
|
795
795
|
],
|
|
796
796
|
numberOfLines: 1,
|
|
797
|
-
children:
|
|
798
|
-
}), /* @__PURE__ */ N(
|
|
797
|
+
children: ee()
|
|
798
|
+
}), /* @__PURE__ */ N(z, {
|
|
799
799
|
style: K.icon,
|
|
800
800
|
children: "📅"
|
|
801
801
|
})]
|
|
802
802
|
}),
|
|
803
|
-
/* @__PURE__ */ N(
|
|
804
|
-
visible:
|
|
803
|
+
/* @__PURE__ */ N(ae, {
|
|
804
|
+
visible: n,
|
|
805
805
|
transparent: !0,
|
|
806
806
|
animationType: "fade",
|
|
807
|
-
onRequestClose: () =>
|
|
807
|
+
onRequestClose: () => r(!1),
|
|
808
808
|
children: /* @__PURE__ */ N(V, {
|
|
809
809
|
style: K.modalOverlay,
|
|
810
810
|
activeOpacity: 1,
|
|
811
|
-
onPress: () =>
|
|
811
|
+
onPress: () => r(!1),
|
|
812
812
|
children: /* @__PURE__ */ P(V, {
|
|
813
|
-
style: [K.modalContent, { backgroundColor:
|
|
813
|
+
style: [K.modalContent, { backgroundColor: d.card }],
|
|
814
814
|
activeOpacity: 1,
|
|
815
815
|
onPress: () => {},
|
|
816
816
|
children: [
|
|
817
817
|
/* @__PURE__ */ P(H, {
|
|
818
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
819
|
-
children: [/* @__PURE__ */ N(
|
|
820
|
-
style: [K.modalTitle, { color:
|
|
821
|
-
children:
|
|
818
|
+
style: [K.modalHeader, { borderBottomColor: d.separator }],
|
|
819
|
+
children: [/* @__PURE__ */ N(z, {
|
|
820
|
+
style: [K.modalTitle, { color: d.text }],
|
|
821
|
+
children: l || o.data.name
|
|
822
822
|
}), /* @__PURE__ */ N(V, {
|
|
823
|
-
onPress: () =>
|
|
824
|
-
children: /* @__PURE__ */ N(
|
|
825
|
-
style: [K.closeButton, { color:
|
|
823
|
+
onPress: () => r(!1),
|
|
824
|
+
children: /* @__PURE__ */ N(z, {
|
|
825
|
+
style: [K.closeButton, { color: d.textMuted }],
|
|
826
826
|
children: "✕"
|
|
827
827
|
})
|
|
828
828
|
})]
|
|
@@ -833,24 +833,24 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
833
833
|
/* @__PURE__ */ N(V, {
|
|
834
834
|
onPress: E,
|
|
835
835
|
style: K.navButton,
|
|
836
|
-
children: /* @__PURE__ */ N(
|
|
837
|
-
style: [K.navButtonText, { color:
|
|
836
|
+
children: /* @__PURE__ */ N(z, {
|
|
837
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
838
838
|
children: "‹"
|
|
839
839
|
})
|
|
840
840
|
}),
|
|
841
|
-
/* @__PURE__ */ P(
|
|
842
|
-
style: [K.monthYear, { color:
|
|
841
|
+
/* @__PURE__ */ P(z, {
|
|
842
|
+
style: [K.monthYear, { color: d.text }],
|
|
843
843
|
children: [
|
|
844
|
-
C[
|
|
844
|
+
C[b],
|
|
845
845
|
" ",
|
|
846
|
-
|
|
846
|
+
v
|
|
847
847
|
]
|
|
848
848
|
}),
|
|
849
849
|
/* @__PURE__ */ N(V, {
|
|
850
850
|
onPress: D,
|
|
851
851
|
style: K.navButton,
|
|
852
|
-
children: /* @__PURE__ */ N(
|
|
853
|
-
style: [K.navButtonText, { color:
|
|
852
|
+
children: /* @__PURE__ */ N(z, {
|
|
853
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
854
854
|
children: "›"
|
|
855
855
|
})
|
|
856
856
|
})
|
|
@@ -866,12 +866,12 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
866
866
|
"Thu",
|
|
867
867
|
"Fri",
|
|
868
868
|
"Sat"
|
|
869
|
-
].map((e) => /* @__PURE__ */ N(
|
|
870
|
-
style: [K.weekDay, { color:
|
|
869
|
+
].map((e) => /* @__PURE__ */ N(z, {
|
|
870
|
+
style: [K.weekDay, { color: d.textMuted }],
|
|
871
871
|
children: e
|
|
872
872
|
}, e))
|
|
873
873
|
}),
|
|
874
|
-
/* @__PURE__ */ N(
|
|
874
|
+
/* @__PURE__ */ N(I, {
|
|
875
875
|
data: w,
|
|
876
876
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
877
877
|
numColumns: 7,
|
|
@@ -879,13 +879,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
879
879
|
style: K.calendar,
|
|
880
880
|
contentContainerStyle: K.calendarContent,
|
|
881
881
|
renderItem: ({ item: e }) => {
|
|
882
|
-
let t =
|
|
882
|
+
let t = O(e.date), n = A(e.date);
|
|
883
883
|
return /* @__PURE__ */ N(V, {
|
|
884
884
|
style: [
|
|
885
885
|
K.dayCell,
|
|
886
886
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
887
887
|
n && {
|
|
888
|
-
backgroundColor:
|
|
888
|
+
backgroundColor: d.primary,
|
|
889
889
|
borderRadius: 20
|
|
890
890
|
},
|
|
891
891
|
t && K.dayCellDisabled
|
|
@@ -893,16 +893,16 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
893
893
|
onPress: () => T(e.date),
|
|
894
894
|
disabled: t,
|
|
895
895
|
activeOpacity: .7,
|
|
896
|
-
children: /* @__PURE__ */ N(
|
|
896
|
+
children: /* @__PURE__ */ N(z, {
|
|
897
897
|
style: [
|
|
898
898
|
K.dayText,
|
|
899
|
-
{ color:
|
|
900
|
-
!e.isCurrentMonth && { color:
|
|
899
|
+
{ color: d.text },
|
|
900
|
+
!e.isCurrentMonth && { color: d.textMuted },
|
|
901
901
|
n && {
|
|
902
|
-
color:
|
|
902
|
+
color: d.background,
|
|
903
903
|
fontWeight: "600"
|
|
904
904
|
},
|
|
905
|
-
t && { color:
|
|
905
|
+
t && { color: d.textMuted }
|
|
906
906
|
],
|
|
907
907
|
children: e.day
|
|
908
908
|
})
|
|
@@ -913,13 +913,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
913
913
|
})
|
|
914
914
|
})
|
|
915
915
|
}),
|
|
916
|
-
|
|
917
|
-
style: [K.error, { color:
|
|
918
|
-
children:
|
|
916
|
+
c && /* @__PURE__ */ N(z, {
|
|
917
|
+
style: [K.error, { color: d.error }],
|
|
918
|
+
children: c
|
|
919
919
|
}),
|
|
920
|
-
|
|
921
|
-
style: [K.helperText, { color:
|
|
922
|
-
children:
|
|
920
|
+
u && !c && /* @__PURE__ */ N(z, {
|
|
921
|
+
style: [K.helperText, { color: d.textMuted }],
|
|
922
|
+
children: u
|
|
923
923
|
})
|
|
924
924
|
]
|
|
925
925
|
});
|
|
@@ -1023,15 +1023,15 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1023
1023
|
flexDirection: "row",
|
|
1024
1024
|
marginBottom: 8
|
|
1025
1025
|
}
|
|
1026
|
-
}),
|
|
1027
|
-
let [
|
|
1028
|
-
let e =
|
|
1026
|
+
}), _e = (e, t) => {
|
|
1027
|
+
let [n, r] = j(!1), [i, a] = j(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, f = _(), { colors: p } = x(), m = Array.isArray(o) ? o : [], h = m[0] ? new Date(m[0]) : void 0, g = m[1] ? new Date(m[1]) : void 0, { year: v, month: y, today: b } = k(() => {
|
|
1028
|
+
let e = h || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1029
1029
|
return r.setHours(0, 0, 0, 0), {
|
|
1030
1030
|
month: n,
|
|
1031
1031
|
today: r,
|
|
1032
1032
|
year: t
|
|
1033
1033
|
};
|
|
1034
|
-
}, [
|
|
1034
|
+
}, [h]), [S, C] = j(v), [w, T] = j(y), E = [
|
|
1035
1035
|
"January",
|
|
1036
1036
|
"February",
|
|
1037
1037
|
"March",
|
|
@@ -1063,31 +1063,31 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1063
1063
|
isCurrentMonth: !1
|
|
1064
1064
|
});
|
|
1065
1065
|
return r;
|
|
1066
|
-
}, [S, w]),
|
|
1067
|
-
|
|
1066
|
+
}, [S, w]), ee = te((e) => {
|
|
1067
|
+
s.data.disablePast && e < b || (i ? (c([e.toISOString(), g?.toISOString()]), a(!1)) : (c(h && e < h ? [e.toISOString(), h.toISOString()] : [h?.toISOString(), e.toISOString()]), r(!1), a(!0)));
|
|
1068
1068
|
}, [
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1069
|
+
s.data.disablePast,
|
|
1070
|
+
b,
|
|
1071
|
+
i,
|
|
1072
|
+
h,
|
|
1072
1073
|
g,
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
]), A = () => {
|
|
1074
|
+
c
|
|
1075
|
+
]), O = () => {
|
|
1076
1076
|
w === 0 ? (T(11), C(S - 1)) : T(w - 1);
|
|
1077
|
-
},
|
|
1077
|
+
}, A = () => {
|
|
1078
1078
|
w === 11 ? (T(0), C(S + 1)) : T(w + 1);
|
|
1079
|
-
},
|
|
1080
|
-
if (!(
|
|
1081
|
-
let t =
|
|
1079
|
+
}, M = () => h && g ? `${h.toLocaleDateString()} - ${g.toLocaleDateString()}` : h ? h.toLocaleDateString() : f("renderer.defaultInputs.selectDateRange"), ne = (e) => s.data.disablePast ? e < b : !1, re = (e) => h && g ? e >= h && e <= g : !1, F = (e) => {
|
|
1080
|
+
if (!(h || g)) return !1;
|
|
1081
|
+
let t = h && e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear(), n = g && e.getDate() === g.getDate() && e.getMonth() === g.getMonth() && e.getFullYear() === g.getFullYear();
|
|
1082
1082
|
return t || n;
|
|
1083
1083
|
};
|
|
1084
1084
|
return /* @__PURE__ */ P(H, {
|
|
1085
1085
|
style: q.container,
|
|
1086
1086
|
children: [
|
|
1087
|
-
/* @__PURE__ */ P(
|
|
1088
|
-
style: [q.label, { color:
|
|
1089
|
-
children: [
|
|
1090
|
-
style: { color:
|
|
1087
|
+
/* @__PURE__ */ P(z, {
|
|
1088
|
+
style: [q.label, { color: p.textSecondary }],
|
|
1089
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
1090
|
+
style: { color: p.error },
|
|
1091
1091
|
children: "*"
|
|
1092
1092
|
})]
|
|
1093
1093
|
}),
|
|
@@ -1095,73 +1095,73 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1095
1095
|
style: [
|
|
1096
1096
|
q.trigger,
|
|
1097
1097
|
{
|
|
1098
|
-
backgroundColor:
|
|
1099
|
-
borderColor:
|
|
1098
|
+
backgroundColor: p.input,
|
|
1099
|
+
borderColor: p.border
|
|
1100
1100
|
},
|
|
1101
|
-
|
|
1101
|
+
l && { borderColor: p.error }
|
|
1102
1102
|
],
|
|
1103
|
-
onPress: () =>
|
|
1103
|
+
onPress: () => r(!0),
|
|
1104
1104
|
activeOpacity: .7,
|
|
1105
|
-
children: [/* @__PURE__ */ N(
|
|
1105
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1106
1106
|
style: [
|
|
1107
1107
|
q.triggerText,
|
|
1108
|
-
{ color:
|
|
1109
|
-
!
|
|
1108
|
+
{ color: p.text },
|
|
1109
|
+
!h && { color: p.textMuted }
|
|
1110
1110
|
],
|
|
1111
1111
|
numberOfLines: 1,
|
|
1112
|
-
children:
|
|
1113
|
-
}), /* @__PURE__ */ N(
|
|
1112
|
+
children: M()
|
|
1113
|
+
}), /* @__PURE__ */ N(z, {
|
|
1114
1114
|
style: q.icon,
|
|
1115
1115
|
children: "📅"
|
|
1116
1116
|
})]
|
|
1117
1117
|
}),
|
|
1118
|
-
/* @__PURE__ */ N(
|
|
1119
|
-
visible:
|
|
1118
|
+
/* @__PURE__ */ N(ae, {
|
|
1119
|
+
visible: n,
|
|
1120
1120
|
transparent: !0,
|
|
1121
1121
|
animationType: "fade",
|
|
1122
|
-
onRequestClose: () =>
|
|
1122
|
+
onRequestClose: () => r(!1),
|
|
1123
1123
|
children: /* @__PURE__ */ N(V, {
|
|
1124
1124
|
style: q.modalOverlay,
|
|
1125
1125
|
activeOpacity: 1,
|
|
1126
|
-
onPress: () =>
|
|
1126
|
+
onPress: () => r(!1),
|
|
1127
1127
|
children: /* @__PURE__ */ P(V, {
|
|
1128
|
-
style: [q.modalContent, { backgroundColor:
|
|
1128
|
+
style: [q.modalContent, { backgroundColor: p.card }],
|
|
1129
1129
|
activeOpacity: 1,
|
|
1130
1130
|
onPress: () => {},
|
|
1131
1131
|
children: [
|
|
1132
1132
|
/* @__PURE__ */ P(H, {
|
|
1133
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1134
|
-
children: [/* @__PURE__ */ N(
|
|
1135
|
-
style: [q.modalTitle, { color:
|
|
1136
|
-
children:
|
|
1133
|
+
style: [q.modalHeader, { borderBottomColor: p.separator }],
|
|
1134
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1135
|
+
style: [q.modalTitle, { color: p.text }],
|
|
1136
|
+
children: u || s.data.name
|
|
1137
1137
|
}), /* @__PURE__ */ N(V, {
|
|
1138
|
-
onPress: () =>
|
|
1139
|
-
children: /* @__PURE__ */ N(
|
|
1140
|
-
style: [q.closeButton, { color:
|
|
1138
|
+
onPress: () => r(!1),
|
|
1139
|
+
children: /* @__PURE__ */ N(z, {
|
|
1140
|
+
style: [q.closeButton, { color: p.textMuted }],
|
|
1141
1141
|
children: "✕"
|
|
1142
1142
|
})
|
|
1143
1143
|
})]
|
|
1144
1144
|
}),
|
|
1145
1145
|
/* @__PURE__ */ N(H, {
|
|
1146
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1147
|
-
children: /* @__PURE__ */ N(
|
|
1148
|
-
style: [q.rangeIndicatorText, { color:
|
|
1149
|
-
children:
|
|
1146
|
+
style: [q.rangeIndicator, { backgroundColor: p.primaryLight }],
|
|
1147
|
+
children: /* @__PURE__ */ N(z, {
|
|
1148
|
+
style: [q.rangeIndicatorText, { color: p.primary }],
|
|
1149
|
+
children: f(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1150
1150
|
})
|
|
1151
1151
|
}),
|
|
1152
1152
|
/* @__PURE__ */ P(H, {
|
|
1153
1153
|
style: q.calendarHeader,
|
|
1154
1154
|
children: [
|
|
1155
1155
|
/* @__PURE__ */ N(V, {
|
|
1156
|
-
onPress:
|
|
1156
|
+
onPress: O,
|
|
1157
1157
|
style: q.navButton,
|
|
1158
|
-
children: /* @__PURE__ */ N(
|
|
1159
|
-
style: [q.navButtonText, { color:
|
|
1158
|
+
children: /* @__PURE__ */ N(z, {
|
|
1159
|
+
style: [q.navButtonText, { color: p.primary }],
|
|
1160
1160
|
children: "‹"
|
|
1161
1161
|
})
|
|
1162
1162
|
}),
|
|
1163
|
-
/* @__PURE__ */ P(
|
|
1164
|
-
style: [q.monthYear, { color:
|
|
1163
|
+
/* @__PURE__ */ P(z, {
|
|
1164
|
+
style: [q.monthYear, { color: p.text }],
|
|
1165
1165
|
children: [
|
|
1166
1166
|
E[w],
|
|
1167
1167
|
" ",
|
|
@@ -1169,10 +1169,10 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1169
1169
|
]
|
|
1170
1170
|
}),
|
|
1171
1171
|
/* @__PURE__ */ N(V, {
|
|
1172
|
-
onPress:
|
|
1172
|
+
onPress: A,
|
|
1173
1173
|
style: q.navButton,
|
|
1174
|
-
children: /* @__PURE__ */ N(
|
|
1175
|
-
style: [q.navButtonText, { color:
|
|
1174
|
+
children: /* @__PURE__ */ N(z, {
|
|
1175
|
+
style: [q.navButtonText, { color: p.primary }],
|
|
1176
1176
|
children: "›"
|
|
1177
1177
|
})
|
|
1178
1178
|
})
|
|
@@ -1188,12 +1188,12 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1188
1188
|
"Thu",
|
|
1189
1189
|
"Fri",
|
|
1190
1190
|
"Sat"
|
|
1191
|
-
].map((e) => /* @__PURE__ */ N(
|
|
1192
|
-
style: [q.weekDay, { color:
|
|
1191
|
+
].map((e) => /* @__PURE__ */ N(z, {
|
|
1192
|
+
style: [q.weekDay, { color: p.textMuted }],
|
|
1193
1193
|
children: e
|
|
1194
1194
|
}, e))
|
|
1195
1195
|
}),
|
|
1196
|
-
/* @__PURE__ */ N(
|
|
1196
|
+
/* @__PURE__ */ N(I, {
|
|
1197
1197
|
data: D,
|
|
1198
1198
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1199
1199
|
numColumns: 7,
|
|
@@ -1201,32 +1201,32 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1201
1201
|
style: q.calendar,
|
|
1202
1202
|
contentContainerStyle: q.calendarContent,
|
|
1203
1203
|
renderItem: ({ item: e }) => {
|
|
1204
|
-
let t =
|
|
1204
|
+
let t = ne(e.date), n = re(e.date), r = F(e.date);
|
|
1205
1205
|
return /* @__PURE__ */ N(V, {
|
|
1206
1206
|
style: [
|
|
1207
1207
|
q.dayCell,
|
|
1208
1208
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1209
|
-
n && { backgroundColor:
|
|
1209
|
+
n && { backgroundColor: p.primaryLight },
|
|
1210
1210
|
r && {
|
|
1211
|
-
backgroundColor:
|
|
1211
|
+
backgroundColor: p.primary,
|
|
1212
1212
|
borderRadius: 20
|
|
1213
1213
|
},
|
|
1214
1214
|
t && q.dayCellDisabled
|
|
1215
1215
|
],
|
|
1216
|
-
onPress: () =>
|
|
1216
|
+
onPress: () => ee(e.date),
|
|
1217
1217
|
disabled: t,
|
|
1218
1218
|
activeOpacity: .7,
|
|
1219
|
-
children: /* @__PURE__ */ N(
|
|
1219
|
+
children: /* @__PURE__ */ N(z, {
|
|
1220
1220
|
style: [
|
|
1221
1221
|
q.dayText,
|
|
1222
|
-
{ color:
|
|
1223
|
-
!e.isCurrentMonth && { color:
|
|
1224
|
-
n && { color:
|
|
1222
|
+
{ color: p.text },
|
|
1223
|
+
!e.isCurrentMonth && { color: p.textMuted },
|
|
1224
|
+
n && { color: p.primary },
|
|
1225
1225
|
r && {
|
|
1226
|
-
color:
|
|
1226
|
+
color: p.background,
|
|
1227
1227
|
fontWeight: "600"
|
|
1228
1228
|
},
|
|
1229
|
-
t && { color:
|
|
1229
|
+
t && { color: p.textMuted }
|
|
1230
1230
|
],
|
|
1231
1231
|
children: e.day
|
|
1232
1232
|
})
|
|
@@ -1237,13 +1237,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1237
1237
|
})
|
|
1238
1238
|
})
|
|
1239
1239
|
}),
|
|
1240
|
-
|
|
1241
|
-
style: [q.error, { color:
|
|
1242
|
-
children:
|
|
1240
|
+
l && /* @__PURE__ */ N(z, {
|
|
1241
|
+
style: [q.error, { color: p.error }],
|
|
1242
|
+
children: l
|
|
1243
1243
|
}),
|
|
1244
|
-
|
|
1245
|
-
style: [q.helperText, { color:
|
|
1246
|
-
children:
|
|
1244
|
+
d && !l && /* @__PURE__ */ N(z, {
|
|
1245
|
+
style: [q.helperText, { color: p.textMuted }],
|
|
1246
|
+
children: d
|
|
1247
1247
|
})
|
|
1248
1248
|
]
|
|
1249
1249
|
});
|
|
@@ -1357,83 +1357,83 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1357
1357
|
flexDirection: "row",
|
|
1358
1358
|
marginBottom: 8
|
|
1359
1359
|
}
|
|
1360
|
-
}),
|
|
1361
|
-
let [
|
|
1362
|
-
if (
|
|
1363
|
-
let e = (await
|
|
1360
|
+
}), ve = (e, t) => {
|
|
1361
|
+
let [n, r] = j(null), [i, a] = j(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = x(), p = _(), m = Array.isArray(o) ? o : o ? [o] : [], h = s.data.multiple, g = te(async () => {
|
|
1362
|
+
if (n) try {
|
|
1363
|
+
let e = (await n({ allowMultiSelection: h })).map((e) => ({
|
|
1364
1364
|
data: e.uri,
|
|
1365
1365
|
lastModified: Date.now(),
|
|
1366
1366
|
name: e.name,
|
|
1367
1367
|
size: e.size,
|
|
1368
1368
|
type: e.type || "application/octet-stream"
|
|
1369
1369
|
}));
|
|
1370
|
-
|
|
1370
|
+
c(h ? [...m, ...e] : e[0] || null);
|
|
1371
1371
|
} catch (e) {
|
|
1372
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1372
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && re.alert("Error", p("renderer.defaultInputs.filePickerError"));
|
|
1373
1373
|
}
|
|
1374
1374
|
}, [
|
|
1375
|
-
|
|
1375
|
+
n,
|
|
1376
|
+
m,
|
|
1376
1377
|
h,
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
}, [h, l]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1378
|
+
c,
|
|
1379
|
+
p
|
|
1380
|
+
]), v = te((e) => {
|
|
1381
|
+
let t = m.filter((t, n) => n !== e);
|
|
1382
|
+
c(t.length > 0 ? t : null);
|
|
1383
|
+
}, [m, c]), y = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1384
1384
|
return O(() => {
|
|
1385
1385
|
(async () => {
|
|
1386
1386
|
try {
|
|
1387
1387
|
let { pick: e } = await import("react-native-document-picker");
|
|
1388
|
-
|
|
1388
|
+
r(() => e);
|
|
1389
1389
|
} catch {
|
|
1390
|
-
|
|
1390
|
+
r(null);
|
|
1391
1391
|
} finally {
|
|
1392
|
-
|
|
1392
|
+
a(!1);
|
|
1393
1393
|
}
|
|
1394
1394
|
})();
|
|
1395
|
-
}, []),
|
|
1395
|
+
}, []), i ? null : n ? /* @__PURE__ */ P(H, {
|
|
1396
1396
|
style: J.container,
|
|
1397
1397
|
children: [
|
|
1398
|
-
/* @__PURE__ */ P(
|
|
1399
|
-
style: [J.label, { color:
|
|
1400
|
-
children: [
|
|
1401
|
-
style: { color:
|
|
1398
|
+
/* @__PURE__ */ P(z, {
|
|
1399
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1400
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
1401
|
+
style: { color: f.error },
|
|
1402
1402
|
children: "*"
|
|
1403
1403
|
})]
|
|
1404
1404
|
}),
|
|
1405
|
-
|
|
1405
|
+
m.length > 0 && /* @__PURE__ */ N(H, {
|
|
1406
1406
|
style: J.filesList,
|
|
1407
|
-
children:
|
|
1407
|
+
children: m.map((e, t) => /* @__PURE__ */ P(H, {
|
|
1408
1408
|
style: [J.fileItem, {
|
|
1409
|
-
backgroundColor:
|
|
1410
|
-
borderColor:
|
|
1409
|
+
backgroundColor: f.card,
|
|
1410
|
+
borderColor: f.separator
|
|
1411
1411
|
}],
|
|
1412
1412
|
children: [
|
|
1413
1413
|
/* @__PURE__ */ N(H, {
|
|
1414
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1415
|
-
children: /* @__PURE__ */ N(
|
|
1414
|
+
style: [J.fileIcon, { backgroundColor: f.muted }],
|
|
1415
|
+
children: /* @__PURE__ */ N(z, {
|
|
1416
1416
|
style: J.fileIconText,
|
|
1417
1417
|
children: "📄"
|
|
1418
1418
|
})
|
|
1419
1419
|
}),
|
|
1420
1420
|
/* @__PURE__ */ P(H, {
|
|
1421
1421
|
style: J.fileInfo,
|
|
1422
|
-
children: [/* @__PURE__ */ N(
|
|
1423
|
-
style: [J.fileName, { color:
|
|
1422
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1423
|
+
style: [J.fileName, { color: f.text }],
|
|
1424
1424
|
numberOfLines: 1,
|
|
1425
1425
|
children: e.name
|
|
1426
|
-
}), e.size > 0 && /* @__PURE__ */ N(
|
|
1427
|
-
style: [J.fileSize, { color:
|
|
1428
|
-
children:
|
|
1426
|
+
}), e.size > 0 && /* @__PURE__ */ N(z, {
|
|
1427
|
+
style: [J.fileSize, { color: f.textMuted }],
|
|
1428
|
+
children: y(e.size)
|
|
1429
1429
|
})]
|
|
1430
1430
|
}),
|
|
1431
1431
|
/* @__PURE__ */ N(V, {
|
|
1432
1432
|
style: J.removeButton,
|
|
1433
|
-
onPress: () =>
|
|
1433
|
+
onPress: () => v(t),
|
|
1434
1434
|
activeOpacity: .7,
|
|
1435
|
-
children: /* @__PURE__ */ N(
|
|
1436
|
-
style: [J.removeButtonText, { color:
|
|
1435
|
+
children: /* @__PURE__ */ N(z, {
|
|
1436
|
+
style: [J.removeButtonText, { color: f.textMuted }],
|
|
1437
1437
|
children: "✕"
|
|
1438
1438
|
})
|
|
1439
1439
|
})
|
|
@@ -1442,48 +1442,48 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1442
1442
|
}),
|
|
1443
1443
|
/* @__PURE__ */ N(V, {
|
|
1444
1444
|
style: [J.pickButton, {
|
|
1445
|
-
backgroundColor:
|
|
1446
|
-
borderColor:
|
|
1445
|
+
backgroundColor: f.input,
|
|
1446
|
+
borderColor: f.border
|
|
1447
1447
|
}],
|
|
1448
|
-
onPress:
|
|
1448
|
+
onPress: g,
|
|
1449
1449
|
activeOpacity: .7,
|
|
1450
|
-
children: /* @__PURE__ */ N(
|
|
1451
|
-
style: [J.pickButtonText, { color:
|
|
1452
|
-
children:
|
|
1450
|
+
children: /* @__PURE__ */ N(z, {
|
|
1451
|
+
style: [J.pickButtonText, { color: f.textMuted }],
|
|
1452
|
+
children: m.length === 0 ? p(h ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : p(h ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1453
1453
|
})
|
|
1454
1454
|
}),
|
|
1455
|
-
|
|
1456
|
-
style: [J.error, { color:
|
|
1457
|
-
children:
|
|
1455
|
+
l && /* @__PURE__ */ N(z, {
|
|
1456
|
+
style: [J.error, { color: f.error }],
|
|
1457
|
+
children: l
|
|
1458
1458
|
}),
|
|
1459
|
-
|
|
1460
|
-
style: [J.helperText, { color:
|
|
1461
|
-
children:
|
|
1459
|
+
d && !l && /* @__PURE__ */ N(z, {
|
|
1460
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1461
|
+
children: d
|
|
1462
1462
|
})
|
|
1463
1463
|
]
|
|
1464
1464
|
}) : /* @__PURE__ */ P(H, {
|
|
1465
1465
|
style: J.container,
|
|
1466
1466
|
children: [
|
|
1467
|
-
/* @__PURE__ */ P(
|
|
1468
|
-
style: [J.label, { color:
|
|
1469
|
-
children: [
|
|
1470
|
-
style: { color:
|
|
1467
|
+
/* @__PURE__ */ P(z, {
|
|
1468
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1469
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
1470
|
+
style: { color: f.error },
|
|
1471
1471
|
children: "*"
|
|
1472
1472
|
})]
|
|
1473
1473
|
}),
|
|
1474
1474
|
/* @__PURE__ */ N(H, {
|
|
1475
1475
|
style: [J.unavailableContainer, {
|
|
1476
|
-
backgroundColor:
|
|
1477
|
-
borderColor:
|
|
1476
|
+
backgroundColor: f.errorLight,
|
|
1477
|
+
borderColor: f.error
|
|
1478
1478
|
}],
|
|
1479
|
-
children: /* @__PURE__ */ N(
|
|
1480
|
-
style: [J.unavailableText, { color:
|
|
1481
|
-
children:
|
|
1479
|
+
children: /* @__PURE__ */ N(z, {
|
|
1480
|
+
style: [J.unavailableText, { color: f.error }],
|
|
1481
|
+
children: p("renderer.defaultInputs.filePickerUnavailable")
|
|
1482
1482
|
})
|
|
1483
1483
|
}),
|
|
1484
|
-
|
|
1485
|
-
style: [J.helperText, { color:
|
|
1486
|
-
children:
|
|
1484
|
+
d && /* @__PURE__ */ N(z, {
|
|
1485
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1486
|
+
children: d
|
|
1487
1487
|
})
|
|
1488
1488
|
]
|
|
1489
1489
|
});
|
|
@@ -1556,15 +1556,15 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1556
1556
|
fontSize: 12,
|
|
1557
1557
|
textAlign: "center"
|
|
1558
1558
|
}
|
|
1559
|
-
}),
|
|
1560
|
-
let
|
|
1561
|
-
return /* @__PURE__ */ P(M, { children: [
|
|
1562
|
-
style:
|
|
1563
|
-
children: [/* @__PURE__ */ N(
|
|
1564
|
-
style: [
|
|
1565
|
-
children:
|
|
1566
|
-
}),
|
|
1567
|
-
style: [
|
|
1559
|
+
}), ye = (e, t) => null, be = ({ missing: e, children: t }) => {
|
|
1560
|
+
let n = _(), { colors: r } = x();
|
|
1561
|
+
return /* @__PURE__ */ P(M, { children: [t, e.length > 0 && /* @__PURE__ */ P(H, {
|
|
1562
|
+
style: xe.container,
|
|
1563
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1564
|
+
style: [xe.title, { color: r.textMuted }],
|
|
1565
|
+
children: n("renderer.dependencyHint.title")
|
|
1566
|
+
}), e.map((e) => /* @__PURE__ */ P(z, {
|
|
1567
|
+
style: [xe.item, { color: r.textMuted }],
|
|
1568
1568
|
children: [
|
|
1569
1569
|
"•",
|
|
1570
1570
|
" ",
|
|
@@ -1572,7 +1572,7 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1572
1572
|
]
|
|
1573
1573
|
}, e.id))]
|
|
1574
1574
|
})] });
|
|
1575
|
-
},
|
|
1575
|
+
}, xe = R.create({
|
|
1576
1576
|
container: {
|
|
1577
1577
|
gap: 2,
|
|
1578
1578
|
marginTop: 4
|
|
@@ -1582,193 +1582,193 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1582
1582
|
fontSize: 12,
|
|
1583
1583
|
fontWeight: "500"
|
|
1584
1584
|
}
|
|
1585
|
-
}),
|
|
1586
|
-
if (n >
|
|
1585
|
+
}), Se = (e) => e.replace(/<[^>]*>/g, ""), Ce = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), we = (e, t = {}) => e == null || e === "" ? "" : Ce(Se(String(e))), Te = 100, Ee = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1586
|
+
if (n > Te) return console.warn(`sanitizeHttpResponse: Maximum depth (${Te}) exceeded.`), typeof e == "string" ? we(e, t) : "[Max Depth Exceeded]";
|
|
1587
1587
|
if (e == null) return e;
|
|
1588
|
-
if (typeof e == "string") return
|
|
1589
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1588
|
+
if (typeof e == "string") return we(e, t);
|
|
1589
|
+
if (Array.isArray(e)) return e.map((e) => Ee(e, t, n + 1, r));
|
|
1590
1590
|
if (typeof e == "object") {
|
|
1591
1591
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1592
1592
|
r.add(e);
|
|
1593
1593
|
let i = {};
|
|
1594
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1594
|
+
for (let [a, o] of Object.entries(e)) i[a] = Ee(o, t, n + 1, r);
|
|
1595
1595
|
return r.delete(e), i;
|
|
1596
1596
|
}
|
|
1597
1597
|
return e;
|
|
1598
|
-
},
|
|
1598
|
+
}, De = (e) => {
|
|
1599
1599
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1600
1600
|
return Array.from(t, (e) => e[1]);
|
|
1601
|
-
},
|
|
1601
|
+
}, Oe = (e, t) => De(e).every((e) => {
|
|
1602
1602
|
let n = t[e];
|
|
1603
1603
|
return n != null && n !== "";
|
|
1604
|
-
}),
|
|
1604
|
+
}), ke = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1605
1605
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1606
1606
|
return n ? encodeURIComponent(a) : a;
|
|
1607
|
-
}),
|
|
1608
|
-
let [s, c] = j(!1), [l, u] = j(null), [d, f] = j([]), [
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
]),
|
|
1613
|
-
|
|
1614
|
-
let
|
|
1615
|
-
|
|
1616
|
-
let
|
|
1617
|
-
if (!
|
|
1618
|
-
u(oe("renderer.defaultHttpInput.noUrlConfigured")),
|
|
1607
|
+
}), Ae = (r, a) => {
|
|
1608
|
+
let [s, c] = j(!1), [l, u] = j(null), [d, f] = j([]), [p, h] = j(""), [g, y] = j(!1), { value: b, placeholder: S } = r, { node: C, setValue: w, error: T, label: E, helperText: D, missingDependencies: ee } = a, { formValues: M, inputNodes: re, headers: F, baseUrl: ie } = i(), { colors: L } = x(), { httpConfig: R } = C.data, oe = _(), se = A(!1), ce = A(!1), le = A(""), ue = A(R), de = A(M), U = A(re), pe = A(F), me = A(ie), W = A(w), he = A(null), G = A(null), ge = k(() => R?.url ? De(R.url) : [], [R?.url]), K = ge.length > 0, _e = k(() => ge.map((e) => `${e}:${String(M[e] ?? "")}`).join("|"), [ge, M]), q = k(() => R?.url ? K ? Oe(R.url, M) : !0 : !1, [
|
|
1609
|
+
R?.url,
|
|
1610
|
+
K,
|
|
1611
|
+
M
|
|
1612
|
+
]), ve = te(async (r) => {
|
|
1613
|
+
G.current && G.current.abort();
|
|
1614
|
+
let i = new AbortController();
|
|
1615
|
+
G.current = i;
|
|
1616
|
+
let a = ue.current, s = de.current, l = W.current;
|
|
1617
|
+
if (!a?.url) {
|
|
1618
|
+
u(oe("renderer.defaultHttpInput.noUrlConfigured")), G.current = null;
|
|
1619
1619
|
return;
|
|
1620
1620
|
}
|
|
1621
|
-
if (
|
|
1622
|
-
|
|
1621
|
+
if (a.url && !Oe(a.url, s)) {
|
|
1622
|
+
G.current = null;
|
|
1623
1623
|
return;
|
|
1624
1624
|
}
|
|
1625
1625
|
c(!0), u(null);
|
|
1626
1626
|
try {
|
|
1627
|
-
let
|
|
1627
|
+
let d = e(ke(a.url, s, !0), me.current), p = t(a.searchParam && r ? `${d}${d.includes("?") ? "&" : "?"}${a.searchParam}=${encodeURIComponent(r)}` : d, v(a.queryParams, s)), h = n({ "Content-Type": "application/json" }, v(pe.current, s), v(a.headers, s)), g = [
|
|
1628
1628
|
"POST",
|
|
1629
1629
|
"PUT",
|
|
1630
1630
|
"PATCH"
|
|
1631
|
-
].includes(
|
|
1631
|
+
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(m(s, U.current)) : a.body ? ke(a.body, s) : void 0 : void 0, _ = setTimeout(() => i.abort(), 3e4), y = await fetch(p, {
|
|
1632
1632
|
body: g || void 0,
|
|
1633
|
-
headers: Object.fromEntries(Object.entries(
|
|
1634
|
-
method:
|
|
1635
|
-
signal:
|
|
1633
|
+
headers: Object.fromEntries(Object.entries(h).filter(([, e]) => e)),
|
|
1634
|
+
method: a.method || "GET",
|
|
1635
|
+
signal: i.signal
|
|
1636
1636
|
});
|
|
1637
|
-
if (clearTimeout(_), !
|
|
1638
|
-
u(`HTTP Error ${
|
|
1637
|
+
if (clearTimeout(_), !y.ok) {
|
|
1638
|
+
u(`HTTP Error ${y.status}: ${y.statusText}`), c(!1);
|
|
1639
1639
|
return;
|
|
1640
1640
|
}
|
|
1641
|
-
let
|
|
1642
|
-
if (
|
|
1643
|
-
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField:
|
|
1644
|
-
f(
|
|
1645
|
-
let a = n ?
|
|
1641
|
+
let b = Ee(await y.json()), x = a.responsePath ? o(b, a.responsePath) : b;
|
|
1642
|
+
if (a.responseMapping && Array.isArray(x)) {
|
|
1643
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = a.responseMapping;
|
|
1644
|
+
f(x.map((i) => {
|
|
1645
|
+
let a = n ? o(i, n) : void 0, s = r ? o(i, r) : void 0;
|
|
1646
1646
|
return {
|
|
1647
1647
|
description: a != null && a !== "" ? String(a) : void 0,
|
|
1648
|
-
image: typeof
|
|
1649
|
-
label: String(
|
|
1650
|
-
value: String(
|
|
1648
|
+
image: typeof s == "string" && s !== "" ? s : void 0,
|
|
1649
|
+
label: String(o(i, t) || ""),
|
|
1650
|
+
value: String(o(i, e) || "")
|
|
1651
1651
|
};
|
|
1652
1652
|
}));
|
|
1653
|
-
} else
|
|
1653
|
+
} else l(typeof x == "string" ? x : JSON.stringify(x));
|
|
1654
1654
|
} catch (e) {
|
|
1655
1655
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1656
1656
|
u(e instanceof Error ? e.message : oe("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1657
1657
|
} finally {
|
|
1658
|
-
c(!1),
|
|
1658
|
+
c(!1), G.current = null;
|
|
1659
1659
|
}
|
|
1660
1660
|
}, [oe]);
|
|
1661
1661
|
if (O(() => {
|
|
1662
|
-
ue.current =
|
|
1662
|
+
ue.current = R, de.current = M, U.current = re, pe.current = F, me.current = ie, W.current = w, he.current = ve;
|
|
1663
1663
|
}, [
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1664
|
+
R,
|
|
1665
|
+
M,
|
|
1666
|
+
re,
|
|
1667
|
+
F,
|
|
1668
1668
|
ie,
|
|
1669
|
-
|
|
1670
|
-
|
|
1669
|
+
w,
|
|
1670
|
+
ve
|
|
1671
1671
|
]), O(() => () => {
|
|
1672
|
-
|
|
1672
|
+
G.current && G.current.abort(), se.current = !1, ce.current = !1;
|
|
1673
1673
|
}, []), O(() => {
|
|
1674
1674
|
if (se.current) return;
|
|
1675
1675
|
se.current = !0;
|
|
1676
|
-
let e = ue.current, t =
|
|
1677
|
-
e?.fetchOnMount && r && n && (n(), e.url && (le.current =
|
|
1676
|
+
let e = ue.current, t = de.current, n = he.current, r = e?.url && Oe(e.url, t);
|
|
1677
|
+
e?.fetchOnMount && r && n && (n(), e.url && (le.current = De(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1678
1678
|
}, []), O(() => {
|
|
1679
|
-
if (!se.current || !
|
|
1679
|
+
if (!se.current || !K || le.current === _e || !q) return;
|
|
1680
1680
|
let e = setTimeout(() => {
|
|
1681
|
-
|
|
1681
|
+
ve(), le.current = _e;
|
|
1682
1682
|
}, 500);
|
|
1683
1683
|
return () => clearTimeout(e);
|
|
1684
1684
|
}, [
|
|
1685
|
-
q,
|
|
1686
|
-
ge,
|
|
1687
1685
|
_e,
|
|
1688
|
-
|
|
1686
|
+
K,
|
|
1687
|
+
q,
|
|
1688
|
+
ve
|
|
1689
1689
|
]), O(() => {
|
|
1690
1690
|
if (!ce.current) {
|
|
1691
1691
|
ce.current = !0;
|
|
1692
1692
|
return;
|
|
1693
1693
|
}
|
|
1694
|
-
let e = ue.current, t =
|
|
1695
|
-
e?.fetchOnMount && r && n && (n(), e.url && (le.current =
|
|
1694
|
+
let e = ue.current, t = de.current, n = he.current, r = e?.url && Oe(e.url, t);
|
|
1695
|
+
e?.fetchOnMount && r && n && (n(), e.url && (le.current = De(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1696
1696
|
}, [k(() => JSON.stringify({
|
|
1697
|
-
body:
|
|
1698
|
-
fetchOnMount:
|
|
1699
|
-
headers:
|
|
1700
|
-
method:
|
|
1701
|
-
queryParams:
|
|
1702
|
-
responseMapping:
|
|
1703
|
-
responsePath:
|
|
1704
|
-
searchParam:
|
|
1705
|
-
sendAllFormValues:
|
|
1706
|
-
url:
|
|
1707
|
-
}), [
|
|
1708
|
-
if (!(
|
|
1697
|
+
body: R?.body,
|
|
1698
|
+
fetchOnMount: R?.fetchOnMount,
|
|
1699
|
+
headers: R?.headers,
|
|
1700
|
+
method: R?.method,
|
|
1701
|
+
queryParams: R?.queryParams,
|
|
1702
|
+
responseMapping: R?.responseMapping,
|
|
1703
|
+
responsePath: R?.responsePath,
|
|
1704
|
+
searchParam: R?.searchParam,
|
|
1705
|
+
sendAllFormValues: R?.sendAllFormValues,
|
|
1706
|
+
url: R?.url
|
|
1707
|
+
}), [R])]), O(() => {
|
|
1708
|
+
if (!(R?.searchParam && p)) return;
|
|
1709
1709
|
let e = setTimeout(() => {
|
|
1710
|
-
|
|
1710
|
+
ve(p);
|
|
1711
1711
|
}, 300);
|
|
1712
1712
|
return () => clearTimeout(e);
|
|
1713
1713
|
}, [
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
]),
|
|
1714
|
+
p,
|
|
1715
|
+
R?.searchParam,
|
|
1716
|
+
ve
|
|
1717
|
+
]), R?.responseMapping) {
|
|
1718
1718
|
let e = Array.isArray(b) ? b[0] : b, t = d.find((t) => t.value === e);
|
|
1719
|
-
if (
|
|
1720
|
-
let n = s &&
|
|
1719
|
+
if (R.searchParam) {
|
|
1720
|
+
let n = s && R?.showLoading;
|
|
1721
1721
|
return /* @__PURE__ */ P(H, {
|
|
1722
1722
|
style: Y.container,
|
|
1723
1723
|
children: [
|
|
1724
|
-
/* @__PURE__ */ P(
|
|
1725
|
-
style: [Y.label, { color:
|
|
1726
|
-
children: [E ||
|
|
1727
|
-
style: { color:
|
|
1724
|
+
/* @__PURE__ */ P(z, {
|
|
1725
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
1726
|
+
children: [E || C.data.name, C.data.required && /* @__PURE__ */ N(z, {
|
|
1727
|
+
style: { color: L.error },
|
|
1728
1728
|
children: "*"
|
|
1729
1729
|
})]
|
|
1730
1730
|
}),
|
|
1731
|
-
/* @__PURE__ */ N(
|
|
1732
|
-
missing:
|
|
1731
|
+
/* @__PURE__ */ N(be, {
|
|
1732
|
+
missing: ee,
|
|
1733
1733
|
children: /* @__PURE__ */ P(V, {
|
|
1734
1734
|
style: [
|
|
1735
1735
|
Y.trigger,
|
|
1736
1736
|
{
|
|
1737
|
-
backgroundColor:
|
|
1738
|
-
borderColor:
|
|
1737
|
+
backgroundColor: L.input,
|
|
1738
|
+
borderColor: L.border
|
|
1739
1739
|
},
|
|
1740
|
-
|
|
1741
|
-
|
|
1740
|
+
T && { borderColor: L.error },
|
|
1741
|
+
ee.length > 0 && { backgroundColor: L.muted }
|
|
1742
1742
|
],
|
|
1743
1743
|
onPress: () => y(!0),
|
|
1744
|
-
disabled:
|
|
1744
|
+
disabled: ee.length > 0,
|
|
1745
1745
|
activeOpacity: .7,
|
|
1746
1746
|
children: [n ? /* @__PURE__ */ P(H, {
|
|
1747
1747
|
style: Y.loadingTrigger,
|
|
1748
|
-
children: [/* @__PURE__ */ N(
|
|
1748
|
+
children: [/* @__PURE__ */ N(ne, {
|
|
1749
1749
|
size: "small",
|
|
1750
|
-
color:
|
|
1751
|
-
}), /* @__PURE__ */ N(
|
|
1752
|
-
style: [Y.triggerText, { color:
|
|
1750
|
+
color: L.primary
|
|
1751
|
+
}), /* @__PURE__ */ N(z, {
|
|
1752
|
+
style: [Y.triggerText, { color: L.textMuted }],
|
|
1753
1753
|
numberOfLines: 1,
|
|
1754
|
-
children: t?.label ||
|
|
1754
|
+
children: t?.label || S || oe("renderer.defaultHttpInput.search")
|
|
1755
1755
|
})]
|
|
1756
|
-
}) : /* @__PURE__ */ N(
|
|
1756
|
+
}) : /* @__PURE__ */ N(z, {
|
|
1757
1757
|
style: [
|
|
1758
1758
|
Y.triggerText,
|
|
1759
|
-
{ color:
|
|
1760
|
-
!t && { color:
|
|
1759
|
+
{ color: L.text },
|
|
1760
|
+
!t && { color: L.textMuted }
|
|
1761
1761
|
],
|
|
1762
1762
|
numberOfLines: 1,
|
|
1763
|
-
children: t?.label ||
|
|
1764
|
-
}), /* @__PURE__ */ N(
|
|
1765
|
-
style: [Y.arrow, { color:
|
|
1763
|
+
children: t?.label || S || oe("renderer.defaultHttpInput.search")
|
|
1764
|
+
}), /* @__PURE__ */ N(z, {
|
|
1765
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1766
1766
|
children: "▼"
|
|
1767
1767
|
})]
|
|
1768
1768
|
})
|
|
1769
1769
|
}),
|
|
1770
|
-
/* @__PURE__ */ N(
|
|
1771
|
-
visible:
|
|
1770
|
+
/* @__PURE__ */ N(ae, {
|
|
1771
|
+
visible: g,
|
|
1772
1772
|
transparent: !0,
|
|
1773
1773
|
animationType: "fade",
|
|
1774
1774
|
onRequestClose: () => y(!1),
|
|
@@ -1777,36 +1777,36 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1777
1777
|
activeOpacity: 1,
|
|
1778
1778
|
onPress: () => y(!1),
|
|
1779
1779
|
children: /* @__PURE__ */ P(V, {
|
|
1780
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1780
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1781
1781
|
activeOpacity: 1,
|
|
1782
1782
|
onPress: () => {},
|
|
1783
1783
|
children: [
|
|
1784
1784
|
/* @__PURE__ */ P(H, {
|
|
1785
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1786
|
-
children: [/* @__PURE__ */ N(
|
|
1787
|
-
style: [Y.modalTitle, { color:
|
|
1788
|
-
children: E ||
|
|
1785
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1786
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1787
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1788
|
+
children: E || C.data.name
|
|
1789
1789
|
}), /* @__PURE__ */ N(V, {
|
|
1790
1790
|
onPress: () => y(!1),
|
|
1791
|
-
children: /* @__PURE__ */ N(
|
|
1792
|
-
style: [Y.closeButton, { color:
|
|
1791
|
+
children: /* @__PURE__ */ N(z, {
|
|
1792
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
1793
1793
|
children: "✕"
|
|
1794
1794
|
})
|
|
1795
1795
|
})]
|
|
1796
1796
|
}),
|
|
1797
1797
|
/* @__PURE__ */ N(H, {
|
|
1798
1798
|
style: Y.searchContainer,
|
|
1799
|
-
children: /* @__PURE__ */ N(
|
|
1799
|
+
children: /* @__PURE__ */ N(B, {
|
|
1800
1800
|
style: [Y.searchInput, {
|
|
1801
|
-
backgroundColor:
|
|
1802
|
-
borderColor:
|
|
1803
|
-
color:
|
|
1801
|
+
backgroundColor: L.muted,
|
|
1802
|
+
borderColor: L.border,
|
|
1803
|
+
color: L.text
|
|
1804
1804
|
}],
|
|
1805
1805
|
placeholder: oe("renderer.defaultHttpInput.search"),
|
|
1806
|
-
placeholderTextColor:
|
|
1807
|
-
value:
|
|
1806
|
+
placeholderTextColor: L.textMuted,
|
|
1807
|
+
value: p,
|
|
1808
1808
|
onChangeText: (e) => {
|
|
1809
|
-
|
|
1809
|
+
h(e), u(null);
|
|
1810
1810
|
},
|
|
1811
1811
|
autoFocus: !0,
|
|
1812
1812
|
autoCapitalize: "none",
|
|
@@ -1815,49 +1815,49 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1815
1815
|
}),
|
|
1816
1816
|
s ? /* @__PURE__ */ N(H, {
|
|
1817
1817
|
style: Y.loadingContainer,
|
|
1818
|
-
children: /* @__PURE__ */ N(
|
|
1818
|
+
children: /* @__PURE__ */ N(ne, {
|
|
1819
1819
|
size: "small",
|
|
1820
|
-
color:
|
|
1820
|
+
color: L.primary
|
|
1821
1821
|
})
|
|
1822
1822
|
}) : l ? /* @__PURE__ */ P(H, {
|
|
1823
1823
|
style: Y.errorContainer,
|
|
1824
|
-
children: [/* @__PURE__ */ N(
|
|
1825
|
-
style: [Y.errorText, { color:
|
|
1824
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1825
|
+
style: [Y.errorText, { color: L.error }],
|
|
1826
1826
|
children: l
|
|
1827
1827
|
}), /* @__PURE__ */ N(V, {
|
|
1828
|
-
onPress: () =>
|
|
1828
|
+
onPress: () => ve(p),
|
|
1829
1829
|
style: Y.retryButton,
|
|
1830
|
-
children: /* @__PURE__ */ N(
|
|
1831
|
-
style: [Y.retryButtonText, { color:
|
|
1830
|
+
children: /* @__PURE__ */ N(z, {
|
|
1831
|
+
style: [Y.retryButtonText, { color: L.primary }],
|
|
1832
1832
|
children: oe("renderer.defaultHttpInput.retry")
|
|
1833
1833
|
})
|
|
1834
1834
|
})]
|
|
1835
|
-
}) : /* @__PURE__ */ N(
|
|
1835
|
+
}) : /* @__PURE__ */ N(I, {
|
|
1836
1836
|
data: d,
|
|
1837
1837
|
keyExtractor: (e) => e.value,
|
|
1838
1838
|
style: Y.optionsList,
|
|
1839
1839
|
contentContainerStyle: Y.optionsListContent,
|
|
1840
1840
|
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
1841
1841
|
style: Y.emptyContainer,
|
|
1842
|
-
children: /* @__PURE__ */ N(
|
|
1843
|
-
style: [Y.emptyText, { color:
|
|
1842
|
+
children: /* @__PURE__ */ N(z, {
|
|
1843
|
+
style: [Y.emptyText, { color: L.textMuted }],
|
|
1844
1844
|
children: oe("renderer.defaultHttpInput.noResults")
|
|
1845
1845
|
})
|
|
1846
1846
|
}),
|
|
1847
1847
|
renderItem: ({ item: t }) => {
|
|
1848
1848
|
let n = t.value === e;
|
|
1849
1849
|
return /* @__PURE__ */ P(V, {
|
|
1850
|
-
style: [Y.option, n && { backgroundColor:
|
|
1850
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
1851
1851
|
onPress: () => {
|
|
1852
|
-
|
|
1852
|
+
w(t.value), y(!1);
|
|
1853
1853
|
},
|
|
1854
1854
|
activeOpacity: .7,
|
|
1855
|
-
children: [/* @__PURE__ */ N(
|
|
1855
|
+
children: [/* @__PURE__ */ N(fe, {
|
|
1856
1856
|
label: t.label,
|
|
1857
1857
|
description: t.description,
|
|
1858
1858
|
image: t.image
|
|
1859
|
-
}), n && /* @__PURE__ */ N(
|
|
1860
|
-
style: [Y.checkmark, { color:
|
|
1859
|
+
}), n && /* @__PURE__ */ N(z, {
|
|
1860
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
1861
1861
|
children: "✓"
|
|
1862
1862
|
})]
|
|
1863
1863
|
});
|
|
@@ -1867,71 +1867,71 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1867
1867
|
})
|
|
1868
1868
|
})
|
|
1869
1869
|
}),
|
|
1870
|
-
|
|
1871
|
-
style: [Y.error, { color:
|
|
1872
|
-
children:
|
|
1870
|
+
T && /* @__PURE__ */ N(z, {
|
|
1871
|
+
style: [Y.error, { color: L.error }],
|
|
1872
|
+
children: T
|
|
1873
1873
|
}),
|
|
1874
|
-
D && !
|
|
1875
|
-
style: [Y.helperText, { color:
|
|
1874
|
+
D && !T && /* @__PURE__ */ N(z, {
|
|
1875
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1876
1876
|
children: D
|
|
1877
1877
|
})
|
|
1878
1878
|
]
|
|
1879
1879
|
});
|
|
1880
1880
|
}
|
|
1881
|
-
let n = s &&
|
|
1881
|
+
let n = s && R?.showLoading, r = ee.length === 0 && d.length === 0 && !n ? l ?? oe("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1882
1882
|
return /* @__PURE__ */ P(H, {
|
|
1883
1883
|
style: Y.container,
|
|
1884
1884
|
children: [
|
|
1885
|
-
/* @__PURE__ */ P(
|
|
1886
|
-
style: [Y.label, { color:
|
|
1887
|
-
children: [E ||
|
|
1888
|
-
style: { color:
|
|
1885
|
+
/* @__PURE__ */ P(z, {
|
|
1886
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
1887
|
+
children: [E || C.data.name, C.data.required && /* @__PURE__ */ N(z, {
|
|
1888
|
+
style: { color: L.error },
|
|
1889
1889
|
children: "*"
|
|
1890
1890
|
})]
|
|
1891
1891
|
}),
|
|
1892
|
-
/* @__PURE__ */ N(
|
|
1893
|
-
missing:
|
|
1892
|
+
/* @__PURE__ */ N(be, {
|
|
1893
|
+
missing: ee,
|
|
1894
1894
|
children: /* @__PURE__ */ P(V, {
|
|
1895
1895
|
style: [
|
|
1896
1896
|
Y.trigger,
|
|
1897
1897
|
{
|
|
1898
|
-
backgroundColor:
|
|
1899
|
-
borderColor:
|
|
1898
|
+
backgroundColor: L.input,
|
|
1899
|
+
borderColor: L.border
|
|
1900
1900
|
},
|
|
1901
|
-
|
|
1902
|
-
(n || d.length === 0) && { backgroundColor:
|
|
1901
|
+
T && { borderColor: L.error },
|
|
1902
|
+
(n || d.length === 0) && { backgroundColor: L.muted }
|
|
1903
1903
|
],
|
|
1904
1904
|
onPress: () => y(!0),
|
|
1905
1905
|
disabled: n || d.length === 0,
|
|
1906
1906
|
activeOpacity: .7,
|
|
1907
1907
|
children: [
|
|
1908
|
-
n && /* @__PURE__ */ N(
|
|
1908
|
+
n && /* @__PURE__ */ N(ne, {
|
|
1909
1909
|
size: "small",
|
|
1910
|
-
color:
|
|
1910
|
+
color: L.primary,
|
|
1911
1911
|
style: Y.triggerLoader
|
|
1912
1912
|
}),
|
|
1913
|
-
/* @__PURE__ */ N(
|
|
1913
|
+
/* @__PURE__ */ N(z, {
|
|
1914
1914
|
style: [
|
|
1915
1915
|
Y.triggerText,
|
|
1916
|
-
{ color:
|
|
1917
|
-
!t && { color:
|
|
1916
|
+
{ color: L.text },
|
|
1917
|
+
!t && { color: L.textMuted }
|
|
1918
1918
|
],
|
|
1919
1919
|
numberOfLines: 1,
|
|
1920
|
-
children: t?.label ||
|
|
1920
|
+
children: t?.label || S || oe("renderer.defaultHttpInput.selectOption")
|
|
1921
1921
|
}),
|
|
1922
|
-
/* @__PURE__ */ N(
|
|
1923
|
-
style: [Y.arrow, { color:
|
|
1922
|
+
/* @__PURE__ */ N(z, {
|
|
1923
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1924
1924
|
children: "▼"
|
|
1925
1925
|
})
|
|
1926
1926
|
]
|
|
1927
1927
|
})
|
|
1928
1928
|
}),
|
|
1929
|
-
r && /* @__PURE__ */ N(
|
|
1930
|
-
style: [Y.disabledMessage, { color:
|
|
1929
|
+
r && /* @__PURE__ */ N(z, {
|
|
1930
|
+
style: [Y.disabledMessage, { color: L.error }],
|
|
1931
1931
|
children: r
|
|
1932
1932
|
}),
|
|
1933
|
-
/* @__PURE__ */ N(
|
|
1934
|
-
visible:
|
|
1933
|
+
/* @__PURE__ */ N(ae, {
|
|
1934
|
+
visible: g,
|
|
1935
1935
|
transparent: !0,
|
|
1936
1936
|
animationType: "fade",
|
|
1937
1937
|
onRequestClose: () => y(!1),
|
|
@@ -1940,22 +1940,22 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1940
1940
|
activeOpacity: 1,
|
|
1941
1941
|
onPress: () => y(!1),
|
|
1942
1942
|
children: /* @__PURE__ */ P(V, {
|
|
1943
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1943
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1944
1944
|
activeOpacity: 1,
|
|
1945
1945
|
onPress: () => {},
|
|
1946
1946
|
children: [/* @__PURE__ */ P(H, {
|
|
1947
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1948
|
-
children: [/* @__PURE__ */ N(
|
|
1949
|
-
style: [Y.modalTitle, { color:
|
|
1950
|
-
children: E ||
|
|
1947
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1948
|
+
children: [/* @__PURE__ */ N(z, {
|
|
1949
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1950
|
+
children: E || C.data.name
|
|
1951
1951
|
}), /* @__PURE__ */ N(V, {
|
|
1952
1952
|
onPress: () => y(!1),
|
|
1953
|
-
children: /* @__PURE__ */ N(
|
|
1954
|
-
style: [Y.closeButton, { color:
|
|
1953
|
+
children: /* @__PURE__ */ N(z, {
|
|
1954
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
1955
1955
|
children: "✕"
|
|
1956
1956
|
})
|
|
1957
1957
|
})]
|
|
1958
|
-
}), /* @__PURE__ */ N(
|
|
1958
|
+
}), /* @__PURE__ */ N(I, {
|
|
1959
1959
|
data: d,
|
|
1960
1960
|
keyExtractor: (e) => e.value,
|
|
1961
1961
|
style: Y.optionsList,
|
|
@@ -1963,17 +1963,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1963
1963
|
renderItem: ({ item: t }) => {
|
|
1964
1964
|
let n = t.value === e;
|
|
1965
1965
|
return /* @__PURE__ */ P(V, {
|
|
1966
|
-
style: [Y.option, n && { backgroundColor:
|
|
1966
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
1967
1967
|
onPress: () => {
|
|
1968
|
-
|
|
1968
|
+
w(t.value), y(!1);
|
|
1969
1969
|
},
|
|
1970
1970
|
activeOpacity: .7,
|
|
1971
|
-
children: [/* @__PURE__ */ N(
|
|
1971
|
+
children: [/* @__PURE__ */ N(fe, {
|
|
1972
1972
|
label: t.label,
|
|
1973
1973
|
description: t.description,
|
|
1974
1974
|
image: t.image
|
|
1975
|
-
}), n && /* @__PURE__ */ N(
|
|
1976
|
-
style: [Y.checkmark, { color:
|
|
1975
|
+
}), n && /* @__PURE__ */ N(z, {
|
|
1976
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
1977
1977
|
children: "✓"
|
|
1978
1978
|
})]
|
|
1979
1979
|
});
|
|
@@ -1982,12 +1982,12 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1982
1982
|
})
|
|
1983
1983
|
})
|
|
1984
1984
|
}),
|
|
1985
|
-
|
|
1986
|
-
style: [Y.error, { color:
|
|
1987
|
-
children:
|
|
1985
|
+
T && /* @__PURE__ */ N(z, {
|
|
1986
|
+
style: [Y.error, { color: L.error }],
|
|
1987
|
+
children: T
|
|
1988
1988
|
}),
|
|
1989
|
-
D && !
|
|
1990
|
-
style: [Y.helperText, { color:
|
|
1989
|
+
D && !T && /* @__PURE__ */ N(z, {
|
|
1990
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1991
1991
|
children: D
|
|
1992
1992
|
})
|
|
1993
1993
|
]
|
|
@@ -1996,28 +1996,28 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
1996
1996
|
return /* @__PURE__ */ P(H, {
|
|
1997
1997
|
style: Y.container,
|
|
1998
1998
|
children: [
|
|
1999
|
-
/* @__PURE__ */ P(
|
|
2000
|
-
style: [Y.label, { color:
|
|
2001
|
-
children: [E ||
|
|
2002
|
-
style: { color:
|
|
1999
|
+
/* @__PURE__ */ P(z, {
|
|
2000
|
+
style: [Y.label, { color: L.textSecondary }],
|
|
2001
|
+
children: [E || C.data.name, C.data.required && /* @__PURE__ */ N(z, {
|
|
2002
|
+
style: { color: L.error },
|
|
2003
2003
|
children: "*"
|
|
2004
2004
|
})]
|
|
2005
2005
|
}),
|
|
2006
|
-
/* @__PURE__ */ N(
|
|
2006
|
+
/* @__PURE__ */ N(B, {
|
|
2007
2007
|
style: [Y.input, {
|
|
2008
|
-
backgroundColor:
|
|
2009
|
-
borderColor:
|
|
2010
|
-
color:
|
|
2008
|
+
backgroundColor: L.muted,
|
|
2009
|
+
borderColor: L.border,
|
|
2010
|
+
color: L.textMuted
|
|
2011
2011
|
}],
|
|
2012
2012
|
value: typeof b == "string" ? b : JSON.stringify(b),
|
|
2013
2013
|
editable: !1
|
|
2014
2014
|
}),
|
|
2015
|
-
|
|
2016
|
-
style: [Y.error, { color:
|
|
2017
|
-
children:
|
|
2015
|
+
T && /* @__PURE__ */ N(z, {
|
|
2016
|
+
style: [Y.error, { color: L.error }],
|
|
2017
|
+
children: T
|
|
2018
2018
|
}),
|
|
2019
|
-
D && !
|
|
2020
|
-
style: [Y.helperText, { color:
|
|
2019
|
+
D && !T && /* @__PURE__ */ N(z, {
|
|
2020
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
2021
2021
|
children: D
|
|
2022
2022
|
})
|
|
2023
2023
|
]
|
|
@@ -2144,23 +2144,23 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2144
2144
|
flex: 1,
|
|
2145
2145
|
fontSize: 14
|
|
2146
2146
|
}
|
|
2147
|
-
}),
|
|
2148
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] = j(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } =
|
|
2147
|
+
}), je = (e, t) => {
|
|
2148
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = j(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = x();
|
|
2149
2149
|
return O(() => {
|
|
2150
2150
|
o(n?.toString() ?? "");
|
|
2151
2151
|
}, [n]), /* @__PURE__ */ P(H, {
|
|
2152
|
-
style:
|
|
2152
|
+
style: Me.container,
|
|
2153
2153
|
children: [
|
|
2154
|
-
/* @__PURE__ */ P(
|
|
2155
|
-
style: [
|
|
2156
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(
|
|
2154
|
+
/* @__PURE__ */ P(z, {
|
|
2155
|
+
style: [Me.label, { color: f.textSecondary }],
|
|
2156
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
2157
2157
|
style: { color: f.error },
|
|
2158
2158
|
children: "*"
|
|
2159
2159
|
})]
|
|
2160
2160
|
}),
|
|
2161
|
-
/* @__PURE__ */ N(
|
|
2161
|
+
/* @__PURE__ */ N(B, {
|
|
2162
2162
|
style: [
|
|
2163
|
-
|
|
2163
|
+
Me.input,
|
|
2164
2164
|
{
|
|
2165
2165
|
backgroundColor: f.input,
|
|
2166
2166
|
borderColor: f.border,
|
|
@@ -2182,17 +2182,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2182
2182
|
keyboardType: "numeric",
|
|
2183
2183
|
accessibilityLabel: i
|
|
2184
2184
|
}),
|
|
2185
|
-
l && /* @__PURE__ */ N(
|
|
2186
|
-
style: [
|
|
2185
|
+
l && /* @__PURE__ */ N(z, {
|
|
2186
|
+
style: [Me.error, { color: f.error }],
|
|
2187
2187
|
children: l
|
|
2188
2188
|
}),
|
|
2189
|
-
d && !l && /* @__PURE__ */ N(
|
|
2190
|
-
style: [
|
|
2189
|
+
d && !l && /* @__PURE__ */ N(z, {
|
|
2190
|
+
style: [Me.helperText, { color: f.textMuted }],
|
|
2191
2191
|
children: d
|
|
2192
2192
|
})
|
|
2193
2193
|
]
|
|
2194
2194
|
});
|
|
2195
|
-
},
|
|
2195
|
+
}, Me = R.create({
|
|
2196
2196
|
container: { marginBottom: 16 },
|
|
2197
2197
|
error: {
|
|
2198
2198
|
fontSize: 12,
|
|
@@ -2214,23 +2214,23 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2214
2214
|
fontWeight: "500",
|
|
2215
2215
|
marginBottom: 8
|
|
2216
2216
|
}
|
|
2217
|
-
}),
|
|
2218
|
-
let [n, r] = j(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } =
|
|
2217
|
+
}), Ne = (e, t) => {
|
|
2218
|
+
let [n, r] = j(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = x();
|
|
2219
2219
|
return /* @__PURE__ */ P(H, {
|
|
2220
|
-
style:
|
|
2220
|
+
style: Pe.container,
|
|
2221
2221
|
children: [
|
|
2222
|
-
/* @__PURE__ */ P(
|
|
2223
|
-
style: [
|
|
2224
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(
|
|
2222
|
+
/* @__PURE__ */ P(z, {
|
|
2223
|
+
style: [Pe.label, { color: f.textSecondary }],
|
|
2224
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
2225
2225
|
style: { color: f.error },
|
|
2226
2226
|
children: "*"
|
|
2227
2227
|
})]
|
|
2228
2228
|
}),
|
|
2229
2229
|
/* @__PURE__ */ P(H, {
|
|
2230
|
-
style:
|
|
2231
|
-
children: [/* @__PURE__ */ N(
|
|
2230
|
+
style: Pe.inputWrapper,
|
|
2231
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2232
2232
|
style: [
|
|
2233
|
-
|
|
2233
|
+
Pe.input,
|
|
2234
2234
|
{
|
|
2235
2235
|
backgroundColor: f.input,
|
|
2236
2236
|
borderColor: f.border,
|
|
@@ -2245,26 +2245,26 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2245
2245
|
secureTextEntry: !n,
|
|
2246
2246
|
accessibilityLabel: o
|
|
2247
2247
|
}), /* @__PURE__ */ N(V, {
|
|
2248
|
-
style:
|
|
2248
|
+
style: Pe.toggleButton,
|
|
2249
2249
|
onPress: () => r(!n),
|
|
2250
2250
|
activeOpacity: .7,
|
|
2251
|
-
children: /* @__PURE__ */ N(
|
|
2252
|
-
style: [
|
|
2251
|
+
children: /* @__PURE__ */ N(z, {
|
|
2252
|
+
style: [Pe.toggleText, { color: f.primary }],
|
|
2253
2253
|
children: n ? "Hide" : "Show"
|
|
2254
2254
|
})
|
|
2255
2255
|
})]
|
|
2256
2256
|
}),
|
|
2257
|
-
l && /* @__PURE__ */ N(
|
|
2258
|
-
style: [
|
|
2257
|
+
l && /* @__PURE__ */ N(z, {
|
|
2258
|
+
style: [Pe.error, { color: f.error }],
|
|
2259
2259
|
children: l
|
|
2260
2260
|
}),
|
|
2261
|
-
d && !l && /* @__PURE__ */ N(
|
|
2262
|
-
style: [
|
|
2261
|
+
d && !l && /* @__PURE__ */ N(z, {
|
|
2262
|
+
style: [Pe.helperText, { color: f.textMuted }],
|
|
2263
2263
|
children: d
|
|
2264
2264
|
})
|
|
2265
2265
|
]
|
|
2266
2266
|
});
|
|
2267
|
-
},
|
|
2267
|
+
}, Pe = R.create({
|
|
2268
2268
|
container: { marginBottom: 16 },
|
|
2269
2269
|
error: {
|
|
2270
2270
|
fontSize: 12,
|
|
@@ -2302,50 +2302,50 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2302
2302
|
fontSize: 12,
|
|
2303
2303
|
fontWeight: "600"
|
|
2304
2304
|
}
|
|
2305
|
-
}),
|
|
2306
|
-
let { value:
|
|
2307
|
-
|
|
2305
|
+
}), Fe = (e, t) => {
|
|
2306
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = x(), l = _(), u = r.data.options || [], d = n || "", f = r.data.variant !== "default", p = (e) => {
|
|
2307
|
+
i(e);
|
|
2308
2308
|
};
|
|
2309
2309
|
return /* @__PURE__ */ P(H, {
|
|
2310
2310
|
style: X.container,
|
|
2311
2311
|
children: [
|
|
2312
|
-
/* @__PURE__ */ P(
|
|
2313
|
-
style: [X.label, { color:
|
|
2314
|
-
children: [
|
|
2315
|
-
style: { color:
|
|
2312
|
+
/* @__PURE__ */ P(z, {
|
|
2313
|
+
style: [X.label, { color: c.textSecondary }],
|
|
2314
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(z, {
|
|
2315
|
+
style: { color: c.error },
|
|
2316
2316
|
children: "*"
|
|
2317
2317
|
})]
|
|
2318
2318
|
}),
|
|
2319
|
-
|
|
2320
|
-
let t =
|
|
2321
|
-
return
|
|
2319
|
+
u.map((e) => {
|
|
2320
|
+
let t = d === e.value, n = l(e.label) || e.value, r = l(e.description);
|
|
2321
|
+
return f ? /* @__PURE__ */ P(V, {
|
|
2322
2322
|
style: [
|
|
2323
2323
|
X.card,
|
|
2324
2324
|
{
|
|
2325
|
-
backgroundColor:
|
|
2326
|
-
borderColor:
|
|
2325
|
+
backgroundColor: c.input,
|
|
2326
|
+
borderColor: c.border
|
|
2327
2327
|
},
|
|
2328
2328
|
t && {
|
|
2329
|
-
backgroundColor: `${
|
|
2330
|
-
borderColor:
|
|
2329
|
+
backgroundColor: `${c.primary}10`,
|
|
2330
|
+
borderColor: c.primary
|
|
2331
2331
|
},
|
|
2332
2332
|
e.disabled && { opacity: .5 }
|
|
2333
2333
|
],
|
|
2334
|
-
onPress: () =>
|
|
2334
|
+
onPress: () => p(e.value),
|
|
2335
2335
|
disabled: e.disabled,
|
|
2336
2336
|
activeOpacity: .7,
|
|
2337
2337
|
children: [
|
|
2338
|
-
e.image && /* @__PURE__ */ N(
|
|
2338
|
+
e.image && /* @__PURE__ */ N(ie, {
|
|
2339
2339
|
source: { uri: e.image },
|
|
2340
2340
|
style: X.cardImage
|
|
2341
2341
|
}),
|
|
2342
2342
|
/* @__PURE__ */ P(H, {
|
|
2343
2343
|
style: X.cardTextContainer,
|
|
2344
|
-
children: [/* @__PURE__ */ N(
|
|
2345
|
-
style: [X.cardLabel, { color:
|
|
2344
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2345
|
+
style: [X.cardLabel, { color: c.textSecondary }],
|
|
2346
2346
|
children: n
|
|
2347
|
-
}), r && /* @__PURE__ */ N(
|
|
2348
|
-
style: [X.cardDescription, { color:
|
|
2347
|
+
}), r && /* @__PURE__ */ N(z, {
|
|
2348
|
+
style: [X.cardDescription, { color: c.textMuted }],
|
|
2349
2349
|
children: r
|
|
2350
2350
|
})]
|
|
2351
2351
|
}),
|
|
@@ -2354,17 +2354,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2354
2354
|
X.radio,
|
|
2355
2355
|
X.cardRadio,
|
|
2356
2356
|
{
|
|
2357
|
-
backgroundColor:
|
|
2358
|
-
borderColor:
|
|
2357
|
+
backgroundColor: c.input,
|
|
2358
|
+
borderColor: c.border
|
|
2359
2359
|
},
|
|
2360
|
-
t && { borderColor:
|
|
2360
|
+
t && { borderColor: c.primary }
|
|
2361
2361
|
],
|
|
2362
|
-
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor:
|
|
2362
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2363
2363
|
})
|
|
2364
2364
|
]
|
|
2365
2365
|
}, e.value) : /* @__PURE__ */ P(V, {
|
|
2366
2366
|
style: X.option,
|
|
2367
|
-
onPress: () =>
|
|
2367
|
+
onPress: () => p(e.value),
|
|
2368
2368
|
disabled: e.disabled,
|
|
2369
2369
|
activeOpacity: .7,
|
|
2370
2370
|
children: [
|
|
@@ -2372,41 +2372,41 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2372
2372
|
style: [
|
|
2373
2373
|
X.radio,
|
|
2374
2374
|
{
|
|
2375
|
-
backgroundColor:
|
|
2376
|
-
borderColor:
|
|
2375
|
+
backgroundColor: c.input,
|
|
2376
|
+
borderColor: c.border
|
|
2377
2377
|
},
|
|
2378
|
-
t && { borderColor:
|
|
2378
|
+
t && { borderColor: c.primary }
|
|
2379
2379
|
],
|
|
2380
|
-
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor:
|
|
2380
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2381
2381
|
}),
|
|
2382
|
-
e.image && /* @__PURE__ */ N(
|
|
2382
|
+
e.image && /* @__PURE__ */ N(ie, {
|
|
2383
2383
|
source: { uri: e.image },
|
|
2384
2384
|
style: X.image
|
|
2385
2385
|
}),
|
|
2386
2386
|
/* @__PURE__ */ P(H, {
|
|
2387
2387
|
style: X.optionTextContainer,
|
|
2388
|
-
children: [/* @__PURE__ */ N(
|
|
2388
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2389
2389
|
style: [
|
|
2390
2390
|
X.optionLabel,
|
|
2391
|
-
{ color:
|
|
2392
|
-
e.disabled && { color:
|
|
2391
|
+
{ color: c.textSecondary },
|
|
2392
|
+
e.disabled && { color: c.textMuted }
|
|
2393
2393
|
],
|
|
2394
2394
|
children: n
|
|
2395
|
-
}), r && /* @__PURE__ */ N(
|
|
2396
|
-
style: [X.optionDescription, { color:
|
|
2395
|
+
}), r && /* @__PURE__ */ N(z, {
|
|
2396
|
+
style: [X.optionDescription, { color: c.textMuted }],
|
|
2397
2397
|
children: r
|
|
2398
2398
|
})]
|
|
2399
2399
|
})
|
|
2400
2400
|
]
|
|
2401
2401
|
}, e.value);
|
|
2402
2402
|
}),
|
|
2403
|
-
|
|
2404
|
-
style: [X.error, { color:
|
|
2405
|
-
children:
|
|
2403
|
+
a && /* @__PURE__ */ N(z, {
|
|
2404
|
+
style: [X.error, { color: c.error }],
|
|
2405
|
+
children: a
|
|
2406
2406
|
}),
|
|
2407
|
-
|
|
2408
|
-
style: [X.helperText, { color:
|
|
2409
|
-
children:
|
|
2407
|
+
s && !a && /* @__PURE__ */ N(z, {
|
|
2408
|
+
style: [X.helperText, { color: c.textMuted }],
|
|
2409
|
+
children: s
|
|
2410
2410
|
})
|
|
2411
2411
|
]
|
|
2412
2412
|
});
|
|
@@ -2483,17 +2483,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2483
2483
|
height: 10,
|
|
2484
2484
|
width: 10
|
|
2485
2485
|
}
|
|
2486
|
-
}),
|
|
2487
|
-
let [
|
|
2488
|
-
|
|
2486
|
+
}), Ie = (e, t) => {
|
|
2487
|
+
let [n, r] = j(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = x(), f = _(), p = o.data.options || [], m = o.data.multiple, h = Array.isArray(i) ? i : i ? [i] : [], g = (e) => {
|
|
2488
|
+
m ? s(h.includes(e) ? h.filter((t) => t !== e) : [...h, e]) : (s(e), r(!1));
|
|
2489
2489
|
};
|
|
2490
2490
|
return /* @__PURE__ */ P(H, {
|
|
2491
2491
|
style: Z.container,
|
|
2492
2492
|
children: [
|
|
2493
|
-
/* @__PURE__ */ P(
|
|
2494
|
-
style: [Z.label, { color:
|
|
2495
|
-
children: [
|
|
2496
|
-
style: { color:
|
|
2493
|
+
/* @__PURE__ */ P(z, {
|
|
2494
|
+
style: [Z.label, { color: d.textSecondary }],
|
|
2495
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ N(z, {
|
|
2496
|
+
style: { color: d.error },
|
|
2497
2497
|
children: "*"
|
|
2498
2498
|
})]
|
|
2499
2499
|
}),
|
|
@@ -2501,81 +2501,81 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2501
2501
|
style: [
|
|
2502
2502
|
Z.trigger,
|
|
2503
2503
|
{
|
|
2504
|
-
backgroundColor:
|
|
2505
|
-
borderColor:
|
|
2504
|
+
backgroundColor: d.input,
|
|
2505
|
+
borderColor: d.border
|
|
2506
2506
|
},
|
|
2507
|
-
|
|
2507
|
+
c && { borderColor: d.error }
|
|
2508
2508
|
],
|
|
2509
|
-
onPress: () =>
|
|
2509
|
+
onPress: () => r(!0),
|
|
2510
2510
|
activeOpacity: .7,
|
|
2511
|
-
children: [/* @__PURE__ */ N(
|
|
2511
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2512
2512
|
style: [
|
|
2513
2513
|
Z.triggerText,
|
|
2514
|
-
{ color:
|
|
2515
|
-
|
|
2514
|
+
{ color: d.text },
|
|
2515
|
+
h.length === 0 && { color: d.textMuted }
|
|
2516
2516
|
],
|
|
2517
2517
|
children: (() => {
|
|
2518
|
-
if (
|
|
2519
|
-
if (
|
|
2520
|
-
let e =
|
|
2521
|
-
return e ?
|
|
2518
|
+
if (h.length === 0) return a || "Select...";
|
|
2519
|
+
if (m) return p.filter((e) => h.includes(e.value)).map((e) => f(e.label) || e.value).join(", ");
|
|
2520
|
+
let e = p.find((e) => e.value === h[0]);
|
|
2521
|
+
return e ? f(e.label) || e.value : a || "Select...";
|
|
2522
2522
|
})()
|
|
2523
|
-
}), /* @__PURE__ */ N(
|
|
2524
|
-
style: [Z.arrow, { color:
|
|
2523
|
+
}), /* @__PURE__ */ N(z, {
|
|
2524
|
+
style: [Z.arrow, { color: d.textMuted }],
|
|
2525
2525
|
children: "▼"
|
|
2526
2526
|
})]
|
|
2527
2527
|
}),
|
|
2528
|
-
/* @__PURE__ */ N(
|
|
2529
|
-
visible:
|
|
2528
|
+
/* @__PURE__ */ N(ae, {
|
|
2529
|
+
visible: n,
|
|
2530
2530
|
transparent: !0,
|
|
2531
2531
|
animationType: "fade",
|
|
2532
|
-
onRequestClose: () =>
|
|
2532
|
+
onRequestClose: () => r(!1),
|
|
2533
2533
|
children: /* @__PURE__ */ N(V, {
|
|
2534
2534
|
style: Z.modalOverlay,
|
|
2535
2535
|
activeOpacity: 1,
|
|
2536
|
-
onPress: () =>
|
|
2536
|
+
onPress: () => r(!1),
|
|
2537
2537
|
children: /* @__PURE__ */ P(H, {
|
|
2538
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2538
|
+
style: [Z.modalContent, { backgroundColor: d.card }],
|
|
2539
2539
|
onStartShouldSetResponder: () => !0,
|
|
2540
2540
|
children: [
|
|
2541
2541
|
/* @__PURE__ */ P(H, {
|
|
2542
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2543
|
-
children: [/* @__PURE__ */ N(
|
|
2544
|
-
style: [Z.modalTitle, { color:
|
|
2545
|
-
children:
|
|
2542
|
+
style: [Z.modalHeader, { borderBottomColor: d.border }],
|
|
2543
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2544
|
+
style: [Z.modalTitle, { color: d.text }],
|
|
2545
|
+
children: l || o.data.name
|
|
2546
2546
|
}), /* @__PURE__ */ N(V, {
|
|
2547
|
-
onPress: () =>
|
|
2548
|
-
children: /* @__PURE__ */ N(
|
|
2549
|
-
style: [Z.closeButton, { color:
|
|
2547
|
+
onPress: () => r(!1),
|
|
2548
|
+
children: /* @__PURE__ */ N(z, {
|
|
2549
|
+
style: [Z.closeButton, { color: d.textMuted }],
|
|
2550
2550
|
children: "✕"
|
|
2551
2551
|
})
|
|
2552
2552
|
})]
|
|
2553
2553
|
}),
|
|
2554
|
-
/* @__PURE__ */ N(
|
|
2554
|
+
/* @__PURE__ */ N(L, {
|
|
2555
2555
|
style: Z.optionsList,
|
|
2556
|
-
children:
|
|
2557
|
-
let t =
|
|
2556
|
+
children: p.map((e) => {
|
|
2557
|
+
let t = h.includes(e.value);
|
|
2558
2558
|
return /* @__PURE__ */ P(V, {
|
|
2559
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2560
|
-
onPress: () =>
|
|
2559
|
+
style: [Z.option, t && { backgroundColor: `${d.primary}20` }],
|
|
2560
|
+
onPress: () => g(e.value),
|
|
2561
2561
|
disabled: e.disabled,
|
|
2562
2562
|
activeOpacity: .7,
|
|
2563
|
-
children: [/* @__PURE__ */ N(
|
|
2564
|
-
label:
|
|
2565
|
-
description:
|
|
2563
|
+
children: [/* @__PURE__ */ N(fe, {
|
|
2564
|
+
label: f(e.label) || e.value,
|
|
2565
|
+
description: f(e.description),
|
|
2566
2566
|
image: e.image,
|
|
2567
2567
|
disabled: e.disabled
|
|
2568
|
-
}), t && /* @__PURE__ */ N(
|
|
2569
|
-
style: [Z.checkmark, { color:
|
|
2568
|
+
}), t && /* @__PURE__ */ N(z, {
|
|
2569
|
+
style: [Z.checkmark, { color: d.primary }],
|
|
2570
2570
|
children: "✓"
|
|
2571
2571
|
})]
|
|
2572
2572
|
}, e.value);
|
|
2573
2573
|
})
|
|
2574
2574
|
}),
|
|
2575
|
-
|
|
2576
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2577
|
-
onPress: () =>
|
|
2578
|
-
children: /* @__PURE__ */ N(
|
|
2575
|
+
m && /* @__PURE__ */ N(V, {
|
|
2576
|
+
style: [Z.doneButton, { backgroundColor: d.primary }],
|
|
2577
|
+
onPress: () => r(!1),
|
|
2578
|
+
children: /* @__PURE__ */ N(z, {
|
|
2579
2579
|
style: Z.doneButtonText,
|
|
2580
2580
|
children: "Done"
|
|
2581
2581
|
})
|
|
@@ -2584,13 +2584,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2584
2584
|
})
|
|
2585
2585
|
})
|
|
2586
2586
|
}),
|
|
2587
|
-
|
|
2588
|
-
style: [Z.error, { color:
|
|
2589
|
-
children:
|
|
2587
|
+
c && /* @__PURE__ */ N(z, {
|
|
2588
|
+
style: [Z.error, { color: d.error }],
|
|
2589
|
+
children: c
|
|
2590
2590
|
}),
|
|
2591
|
-
|
|
2592
|
-
style: [Z.helperText, { color:
|
|
2593
|
-
children:
|
|
2591
|
+
u && !c && /* @__PURE__ */ N(z, {
|
|
2592
|
+
style: [Z.helperText, { color: d.textMuted }],
|
|
2593
|
+
children: u
|
|
2594
2594
|
})
|
|
2595
2595
|
]
|
|
2596
2596
|
});
|
|
@@ -2675,23 +2675,23 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2675
2675
|
flex: 1,
|
|
2676
2676
|
fontSize: 14
|
|
2677
2677
|
}
|
|
2678
|
-
}),
|
|
2679
|
-
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } =
|
|
2678
|
+
}), Le = (e, t) => {
|
|
2679
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = x(), l = !!n;
|
|
2680
2680
|
return /* @__PURE__ */ P(H, {
|
|
2681
|
-
style:
|
|
2681
|
+
style: Re.container,
|
|
2682
2682
|
children: [
|
|
2683
2683
|
/* @__PURE__ */ P(H, {
|
|
2684
|
-
style:
|
|
2684
|
+
style: Re.row,
|
|
2685
2685
|
children: [/* @__PURE__ */ N(H, {
|
|
2686
|
-
style:
|
|
2687
|
-
children: /* @__PURE__ */ P(
|
|
2688
|
-
style: [
|
|
2689
|
-
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(
|
|
2686
|
+
style: Re.labelContainer,
|
|
2687
|
+
children: /* @__PURE__ */ P(z, {
|
|
2688
|
+
style: [Re.label, { color: c.textSecondary }],
|
|
2689
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(z, {
|
|
2690
2690
|
style: { color: c.error },
|
|
2691
2691
|
children: "*"
|
|
2692
2692
|
})]
|
|
2693
2693
|
})
|
|
2694
|
-
}), /* @__PURE__ */ N(
|
|
2694
|
+
}), /* @__PURE__ */ N(oe, {
|
|
2695
2695
|
trackColor: {
|
|
2696
2696
|
false: c.border,
|
|
2697
2697
|
true: `${c.primary}80`
|
|
@@ -2702,17 +2702,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2702
2702
|
value: l
|
|
2703
2703
|
})]
|
|
2704
2704
|
}),
|
|
2705
|
-
a && /* @__PURE__ */ N(
|
|
2706
|
-
style: [
|
|
2705
|
+
a && /* @__PURE__ */ N(z, {
|
|
2706
|
+
style: [Re.error, { color: c.error }],
|
|
2707
2707
|
children: a
|
|
2708
2708
|
}),
|
|
2709
|
-
s && !a && /* @__PURE__ */ N(
|
|
2710
|
-
style: [
|
|
2709
|
+
s && !a && /* @__PURE__ */ N(z, {
|
|
2710
|
+
style: [Re.helperText, { color: c.textMuted }],
|
|
2711
2711
|
children: s
|
|
2712
2712
|
})
|
|
2713
2713
|
]
|
|
2714
2714
|
});
|
|
2715
|
-
},
|
|
2715
|
+
}, Re = R.create({
|
|
2716
2716
|
container: { marginBottom: 16 },
|
|
2717
2717
|
error: {
|
|
2718
2718
|
fontSize: 12,
|
|
@@ -2732,21 +2732,21 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2732
2732
|
flexDirection: "row",
|
|
2733
2733
|
justifyContent: "space-between"
|
|
2734
2734
|
}
|
|
2735
|
-
}),
|
|
2736
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2735
|
+
}), ze = (e, t) => {
|
|
2736
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = x();
|
|
2737
2737
|
return /* @__PURE__ */ P(H, {
|
|
2738
|
-
style:
|
|
2738
|
+
style: Be.container,
|
|
2739
2739
|
children: [
|
|
2740
|
-
/* @__PURE__ */ P(
|
|
2741
|
-
style: [
|
|
2742
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(
|
|
2740
|
+
/* @__PURE__ */ P(z, {
|
|
2741
|
+
style: [Be.label, { color: u.textSecondary }],
|
|
2742
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(z, {
|
|
2743
2743
|
style: { color: u.error },
|
|
2744
2744
|
children: "*"
|
|
2745
2745
|
})]
|
|
2746
2746
|
}),
|
|
2747
|
-
/* @__PURE__ */ N(
|
|
2747
|
+
/* @__PURE__ */ N(B, {
|
|
2748
2748
|
style: [
|
|
2749
|
-
|
|
2749
|
+
Be.textarea,
|
|
2750
2750
|
{
|
|
2751
2751
|
backgroundColor: u.input,
|
|
2752
2752
|
borderColor: u.border,
|
|
@@ -2763,17 +2763,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2763
2763
|
textAlignVertical: "top",
|
|
2764
2764
|
accessibilityLabel: i
|
|
2765
2765
|
}),
|
|
2766
|
-
s && /* @__PURE__ */ N(
|
|
2767
|
-
style: [
|
|
2766
|
+
s && /* @__PURE__ */ N(z, {
|
|
2767
|
+
style: [Be.error, { color: u.error }],
|
|
2768
2768
|
children: s
|
|
2769
2769
|
}),
|
|
2770
|
-
l && !s && /* @__PURE__ */ N(
|
|
2771
|
-
style: [
|
|
2770
|
+
l && !s && /* @__PURE__ */ N(z, {
|
|
2771
|
+
style: [Be.helperText, { color: u.textMuted }],
|
|
2772
2772
|
children: l
|
|
2773
2773
|
})
|
|
2774
2774
|
]
|
|
2775
2775
|
});
|
|
2776
|
-
},
|
|
2776
|
+
}, Be = R.create({
|
|
2777
2777
|
container: { marginBottom: 16 },
|
|
2778
2778
|
error: {
|
|
2779
2779
|
fontSize: 12,
|
|
@@ -2796,21 +2796,21 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2796
2796
|
paddingHorizontal: 12,
|
|
2797
2797
|
paddingVertical: 8
|
|
2798
2798
|
}
|
|
2799
|
-
}),
|
|
2800
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2799
|
+
}), Ve = (e, t) => {
|
|
2800
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = x();
|
|
2801
2801
|
return /* @__PURE__ */ P(H, {
|
|
2802
|
-
style:
|
|
2802
|
+
style: He.container,
|
|
2803
2803
|
children: [
|
|
2804
|
-
/* @__PURE__ */ P(
|
|
2805
|
-
style: [
|
|
2806
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(
|
|
2804
|
+
/* @__PURE__ */ P(z, {
|
|
2805
|
+
style: [He.label, { color: u.textSecondary }],
|
|
2806
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(z, {
|
|
2807
2807
|
style: { color: u.error },
|
|
2808
2808
|
children: "*"
|
|
2809
2809
|
})]
|
|
2810
2810
|
}),
|
|
2811
|
-
/* @__PURE__ */ N(
|
|
2811
|
+
/* @__PURE__ */ N(B, {
|
|
2812
2812
|
style: [
|
|
2813
|
-
|
|
2813
|
+
He.input,
|
|
2814
2814
|
{
|
|
2815
2815
|
backgroundColor: u.input,
|
|
2816
2816
|
borderColor: u.border,
|
|
@@ -2824,17 +2824,17 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2824
2824
|
placeholderTextColor: u.textMuted,
|
|
2825
2825
|
accessibilityLabel: i
|
|
2826
2826
|
}),
|
|
2827
|
-
s && /* @__PURE__ */ N(
|
|
2828
|
-
style: [
|
|
2827
|
+
s && /* @__PURE__ */ N(z, {
|
|
2828
|
+
style: [He.error, { color: u.error }],
|
|
2829
2829
|
children: s
|
|
2830
2830
|
}),
|
|
2831
|
-
l && !s && /* @__PURE__ */ N(
|
|
2832
|
-
style: [
|
|
2831
|
+
l && !s && /* @__PURE__ */ N(z, {
|
|
2832
|
+
style: [He.helperText, { color: u.textMuted }],
|
|
2833
2833
|
children: l
|
|
2834
2834
|
})
|
|
2835
2835
|
]
|
|
2836
2836
|
});
|
|
2837
|
-
},
|
|
2837
|
+
}, He = R.create({
|
|
2838
2838
|
container: { marginBottom: 16 },
|
|
2839
2839
|
error: {
|
|
2840
2840
|
fontSize: 12,
|
|
@@ -2856,8 +2856,8 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2856
2856
|
fontWeight: "500",
|
|
2857
2857
|
marginBottom: 8
|
|
2858
2858
|
}
|
|
2859
|
-
}),
|
|
2860
|
-
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] = j(s || 0), [d, f] = j(c || 0), [p, m] = j(!1), { node: h, setValue: g, error: _, label:
|
|
2859
|
+
}), Ue = (e, t) => {
|
|
2860
|
+
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] = j(s || 0), [d, f] = j(c || 0), [p, m] = j(!1), { node: h, setValue: g, error: _, label: v, helperText: y } = t, { colors: b } = x(), S = A(null), C = A(null), w = Array.from({ length: 24 }, (e, t) => t), T = Array.from({ length: 60 }, (e, t) => t), E = () => n || r || "Select time", D = te(() => {
|
|
2861
2861
|
g(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2862
2862
|
}, [
|
|
2863
2863
|
l,
|
|
@@ -2867,10 +2867,10 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2867
2867
|
return /* @__PURE__ */ P(H, {
|
|
2868
2868
|
style: Q.container,
|
|
2869
2869
|
children: [
|
|
2870
|
-
/* @__PURE__ */ P(
|
|
2871
|
-
style: [Q.label, { color:
|
|
2872
|
-
children: [
|
|
2873
|
-
style: { color:
|
|
2870
|
+
/* @__PURE__ */ P(z, {
|
|
2871
|
+
style: [Q.label, { color: b.textSecondary }],
|
|
2872
|
+
children: [v || h.data.name, h.data.required && /* @__PURE__ */ N(z, {
|
|
2873
|
+
style: { color: b.error },
|
|
2874
2874
|
children: "*"
|
|
2875
2875
|
})]
|
|
2876
2876
|
}),
|
|
@@ -2878,29 +2878,29 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2878
2878
|
style: [
|
|
2879
2879
|
Q.trigger,
|
|
2880
2880
|
{
|
|
2881
|
-
backgroundColor:
|
|
2882
|
-
borderColor:
|
|
2881
|
+
backgroundColor: b.input,
|
|
2882
|
+
borderColor: b.border
|
|
2883
2883
|
},
|
|
2884
|
-
_ && { borderColor:
|
|
2884
|
+
_ && { borderColor: b.error }
|
|
2885
2885
|
],
|
|
2886
2886
|
onPress: () => {
|
|
2887
2887
|
u(s || 0), f(c || 0), m(!0);
|
|
2888
2888
|
},
|
|
2889
2889
|
activeOpacity: .7,
|
|
2890
|
-
children: [/* @__PURE__ */ N(
|
|
2890
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2891
2891
|
style: [
|
|
2892
2892
|
Q.triggerText,
|
|
2893
|
-
{ color:
|
|
2894
|
-
!n && { color:
|
|
2893
|
+
{ color: b.text },
|
|
2894
|
+
!n && { color: b.textMuted }
|
|
2895
2895
|
],
|
|
2896
2896
|
numberOfLines: 1,
|
|
2897
2897
|
children: E()
|
|
2898
|
-
}), /* @__PURE__ */ N(
|
|
2898
|
+
}), /* @__PURE__ */ N(z, {
|
|
2899
2899
|
style: Q.icon,
|
|
2900
2900
|
children: "🕐"
|
|
2901
2901
|
})]
|
|
2902
2902
|
}),
|
|
2903
|
-
/* @__PURE__ */ N(
|
|
2903
|
+
/* @__PURE__ */ N(ae, {
|
|
2904
2904
|
visible: p,
|
|
2905
2905
|
transparent: !0,
|
|
2906
2906
|
animationType: "fade",
|
|
@@ -2910,19 +2910,19 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2910
2910
|
activeOpacity: 1,
|
|
2911
2911
|
onPress: () => m(!1),
|
|
2912
2912
|
children: /* @__PURE__ */ P(V, {
|
|
2913
|
-
style: [Q.modalContent, { backgroundColor:
|
|
2913
|
+
style: [Q.modalContent, { backgroundColor: b.card }],
|
|
2914
2914
|
activeOpacity: 1,
|
|
2915
2915
|
onPress: () => {},
|
|
2916
2916
|
children: [
|
|
2917
2917
|
/* @__PURE__ */ P(H, {
|
|
2918
|
-
style: [Q.modalHeader, { borderBottomColor:
|
|
2919
|
-
children: [/* @__PURE__ */ N(
|
|
2920
|
-
style: [Q.modalTitle, { color:
|
|
2921
|
-
children:
|
|
2918
|
+
style: [Q.modalHeader, { borderBottomColor: b.separator }],
|
|
2919
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2920
|
+
style: [Q.modalTitle, { color: b.text }],
|
|
2921
|
+
children: v || h.data.name
|
|
2922
2922
|
}), /* @__PURE__ */ N(V, {
|
|
2923
2923
|
onPress: () => m(!1),
|
|
2924
|
-
children: /* @__PURE__ */ N(
|
|
2925
|
-
style: [Q.closeButton, { color:
|
|
2924
|
+
children: /* @__PURE__ */ N(z, {
|
|
2925
|
+
style: [Q.closeButton, { color: b.textMuted }],
|
|
2926
2926
|
children: "✕"
|
|
2927
2927
|
})
|
|
2928
2928
|
})]
|
|
@@ -2932,24 +2932,24 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2932
2932
|
children: [
|
|
2933
2933
|
/* @__PURE__ */ P(H, {
|
|
2934
2934
|
style: Q.pickerColumn,
|
|
2935
|
-
children: [/* @__PURE__ */ N(
|
|
2936
|
-
style: [Q.pickerLabel, { color:
|
|
2935
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2936
|
+
style: [Q.pickerLabel, { color: b.textMuted }],
|
|
2937
2937
|
children: "Hour"
|
|
2938
|
-
}), /* @__PURE__ */ N(
|
|
2938
|
+
}), /* @__PURE__ */ N(L, {
|
|
2939
2939
|
ref: S,
|
|
2940
2940
|
style: Q.picker,
|
|
2941
2941
|
contentContainerStyle: Q.pickerContent,
|
|
2942
2942
|
showsVerticalScrollIndicator: !1,
|
|
2943
2943
|
children: w.map((e) => /* @__PURE__ */ N(V, {
|
|
2944
|
-
style: [Q.pickerItem, l === e && { backgroundColor:
|
|
2944
|
+
style: [Q.pickerItem, l === e && { backgroundColor: b.primary }],
|
|
2945
2945
|
onPress: () => u(e),
|
|
2946
2946
|
activeOpacity: .7,
|
|
2947
|
-
children: /* @__PURE__ */ N(
|
|
2947
|
+
children: /* @__PURE__ */ N(z, {
|
|
2948
2948
|
style: [
|
|
2949
2949
|
Q.pickerItemText,
|
|
2950
|
-
{ color:
|
|
2950
|
+
{ color: b.text },
|
|
2951
2951
|
l === e && {
|
|
2952
|
-
color:
|
|
2952
|
+
color: b.background,
|
|
2953
2953
|
fontWeight: "600"
|
|
2954
2954
|
}
|
|
2955
2955
|
],
|
|
@@ -2958,30 +2958,30 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2958
2958
|
}, e))
|
|
2959
2959
|
})]
|
|
2960
2960
|
}),
|
|
2961
|
-
/* @__PURE__ */ N(
|
|
2962
|
-
style: [Q.pickerSeparator, { color:
|
|
2961
|
+
/* @__PURE__ */ N(z, {
|
|
2962
|
+
style: [Q.pickerSeparator, { color: b.text }],
|
|
2963
2963
|
children: ":"
|
|
2964
2964
|
}),
|
|
2965
2965
|
/* @__PURE__ */ P(H, {
|
|
2966
2966
|
style: Q.pickerColumn,
|
|
2967
|
-
children: [/* @__PURE__ */ N(
|
|
2968
|
-
style: [Q.pickerLabel, { color:
|
|
2967
|
+
children: [/* @__PURE__ */ N(z, {
|
|
2968
|
+
style: [Q.pickerLabel, { color: b.textMuted }],
|
|
2969
2969
|
children: "Minute"
|
|
2970
|
-
}), /* @__PURE__ */ N(
|
|
2970
|
+
}), /* @__PURE__ */ N(L, {
|
|
2971
2971
|
ref: C,
|
|
2972
2972
|
style: Q.picker,
|
|
2973
2973
|
contentContainerStyle: Q.pickerContent,
|
|
2974
2974
|
showsVerticalScrollIndicator: !1,
|
|
2975
2975
|
children: T.map((e) => /* @__PURE__ */ N(V, {
|
|
2976
|
-
style: [Q.pickerItem, d === e && { backgroundColor:
|
|
2976
|
+
style: [Q.pickerItem, d === e && { backgroundColor: b.primary }],
|
|
2977
2977
|
onPress: () => f(e),
|
|
2978
2978
|
activeOpacity: .7,
|
|
2979
|
-
children: /* @__PURE__ */ N(
|
|
2979
|
+
children: /* @__PURE__ */ N(z, {
|
|
2980
2980
|
style: [
|
|
2981
2981
|
Q.pickerItemText,
|
|
2982
|
-
{ color:
|
|
2982
|
+
{ color: b.text },
|
|
2983
2983
|
d === e && {
|
|
2984
|
-
color:
|
|
2984
|
+
color: b.background,
|
|
2985
2985
|
fontWeight: "600"
|
|
2986
2986
|
}
|
|
2987
2987
|
],
|
|
@@ -2993,11 +2993,11 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
2993
2993
|
]
|
|
2994
2994
|
}),
|
|
2995
2995
|
/* @__PURE__ */ N(V, {
|
|
2996
|
-
style: [Q.confirmButton, { backgroundColor:
|
|
2996
|
+
style: [Q.confirmButton, { backgroundColor: b.primary }],
|
|
2997
2997
|
onPress: D,
|
|
2998
2998
|
activeOpacity: .7,
|
|
2999
|
-
children: /* @__PURE__ */ N(
|
|
3000
|
-
style: [Q.confirmButtonText, { color:
|
|
2999
|
+
children: /* @__PURE__ */ N(z, {
|
|
3000
|
+
style: [Q.confirmButtonText, { color: b.background }],
|
|
3001
3001
|
children: "Confirm"
|
|
3002
3002
|
})
|
|
3003
3003
|
})
|
|
@@ -3005,13 +3005,13 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3005
3005
|
})
|
|
3006
3006
|
})
|
|
3007
3007
|
}),
|
|
3008
|
-
_ && /* @__PURE__ */ N(
|
|
3009
|
-
style: [Q.error, { color:
|
|
3008
|
+
_ && /* @__PURE__ */ N(z, {
|
|
3009
|
+
style: [Q.error, { color: b.error }],
|
|
3010
3010
|
children: _
|
|
3011
3011
|
}),
|
|
3012
|
-
|
|
3013
|
-
style: [Q.helperText, { color:
|
|
3014
|
-
children:
|
|
3012
|
+
y && !_ && /* @__PURE__ */ N(z, {
|
|
3013
|
+
style: [Q.helperText, { color: b.textMuted }],
|
|
3014
|
+
children: y
|
|
3015
3015
|
})
|
|
3016
3016
|
]
|
|
3017
3017
|
});
|
|
@@ -3106,27 +3106,27 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3106
3106
|
flex: 1,
|
|
3107
3107
|
fontSize: 14
|
|
3108
3108
|
}
|
|
3109
|
-
}),
|
|
3110
|
-
let [
|
|
3111
|
-
let e = `${String(
|
|
3112
|
-
|
|
3109
|
+
}), We = (e, t) => {
|
|
3110
|
+
let [n, r] = j(!1), [i, a] = j(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = x(), p = _(), m = Array.isArray(o) ? o : [], h = m[0] || "", g = m[1] || "", v = h.split(":"), y = Number.parseInt(v[0], 10), b = Number.parseInt(v[1], 10), S = Number.isNaN(y) ? 0 : y, C = Number.isNaN(b) ? 0 : b, w = g.split(":"), T = Number.parseInt(w[0], 10), E = Number.parseInt(w[1], 10), D = Number.isNaN(T) ? 0 : T, ee = Number.isNaN(E) ? 0 : E, [O, k] = j(0), [A, M] = j(0), ne = Array.from({ length: 24 }, (e, t) => t), re = Array.from({ length: 60 }, (e, t) => t), F = () => h && g ? `${h} - ${g}` : h || p("renderer.defaultInputs.selectDateRange"), I = te(() => {
|
|
3111
|
+
let e = `${String(O).padStart(2, "0")}:${String(A).padStart(2, "0")}`;
|
|
3112
|
+
i ? (c([e, g]), a(!1), k(D || 0), M(ee || 0)) : (c([h, e]), r(!1), a(!0));
|
|
3113
3113
|
}, [
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3114
|
+
i,
|
|
3115
|
+
O,
|
|
3116
|
+
A,
|
|
3117
|
+
h,
|
|
3117
3118
|
g,
|
|
3118
|
-
_,
|
|
3119
3119
|
D,
|
|
3120
|
-
|
|
3121
|
-
|
|
3120
|
+
ee,
|
|
3121
|
+
c
|
|
3122
3122
|
]);
|
|
3123
3123
|
return /* @__PURE__ */ P(H, {
|
|
3124
3124
|
style: $.container,
|
|
3125
3125
|
children: [
|
|
3126
|
-
/* @__PURE__ */ P(
|
|
3127
|
-
style: [$.label, { color:
|
|
3128
|
-
children: [
|
|
3129
|
-
style: { color:
|
|
3126
|
+
/* @__PURE__ */ P(z, {
|
|
3127
|
+
style: [$.label, { color: f.textSecondary }],
|
|
3128
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(z, {
|
|
3129
|
+
style: { color: f.error },
|
|
3130
3130
|
children: "*"
|
|
3131
3131
|
})]
|
|
3132
3132
|
}),
|
|
@@ -3134,60 +3134,60 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3134
3134
|
style: [
|
|
3135
3135
|
$.trigger,
|
|
3136
3136
|
{
|
|
3137
|
-
backgroundColor:
|
|
3138
|
-
borderColor:
|
|
3137
|
+
backgroundColor: f.input,
|
|
3138
|
+
borderColor: f.border
|
|
3139
3139
|
},
|
|
3140
|
-
|
|
3140
|
+
l && { borderColor: f.error }
|
|
3141
3141
|
],
|
|
3142
3142
|
onPress: () => {
|
|
3143
|
-
|
|
3143
|
+
k(S || 0), M(C || 0), a(!0), r(!0);
|
|
3144
3144
|
},
|
|
3145
3145
|
activeOpacity: .7,
|
|
3146
|
-
children: [/* @__PURE__ */ N(
|
|
3146
|
+
children: [/* @__PURE__ */ N(z, {
|
|
3147
3147
|
style: [
|
|
3148
3148
|
$.triggerText,
|
|
3149
|
-
{ color:
|
|
3150
|
-
!
|
|
3149
|
+
{ color: f.text },
|
|
3150
|
+
!h && { color: f.textMuted }
|
|
3151
3151
|
],
|
|
3152
3152
|
numberOfLines: 1,
|
|
3153
|
-
children:
|
|
3154
|
-
}), /* @__PURE__ */ N(
|
|
3153
|
+
children: F()
|
|
3154
|
+
}), /* @__PURE__ */ N(z, {
|
|
3155
3155
|
style: $.icon,
|
|
3156
3156
|
children: "🕐"
|
|
3157
3157
|
})]
|
|
3158
3158
|
}),
|
|
3159
|
-
/* @__PURE__ */ N(
|
|
3160
|
-
visible:
|
|
3159
|
+
/* @__PURE__ */ N(ae, {
|
|
3160
|
+
visible: n,
|
|
3161
3161
|
transparent: !0,
|
|
3162
3162
|
animationType: "fade",
|
|
3163
|
-
onRequestClose: () =>
|
|
3163
|
+
onRequestClose: () => r(!1),
|
|
3164
3164
|
children: /* @__PURE__ */ N(V, {
|
|
3165
3165
|
style: $.modalOverlay,
|
|
3166
3166
|
activeOpacity: 1,
|
|
3167
|
-
onPress: () =>
|
|
3167
|
+
onPress: () => r(!1),
|
|
3168
3168
|
children: /* @__PURE__ */ P(V, {
|
|
3169
|
-
style: [$.modalContent, { backgroundColor:
|
|
3169
|
+
style: [$.modalContent, { backgroundColor: f.card }],
|
|
3170
3170
|
activeOpacity: 1,
|
|
3171
3171
|
onPress: () => {},
|
|
3172
3172
|
children: [
|
|
3173
3173
|
/* @__PURE__ */ P(H, {
|
|
3174
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3175
|
-
children: [/* @__PURE__ */ N(
|
|
3176
|
-
style: [$.modalTitle, { color:
|
|
3177
|
-
children:
|
|
3174
|
+
style: [$.modalHeader, { borderBottomColor: f.separator }],
|
|
3175
|
+
children: [/* @__PURE__ */ N(z, {
|
|
3176
|
+
style: [$.modalTitle, { color: f.text }],
|
|
3177
|
+
children: u || s.data.name
|
|
3178
3178
|
}), /* @__PURE__ */ N(V, {
|
|
3179
|
-
onPress: () =>
|
|
3180
|
-
children: /* @__PURE__ */ N(
|
|
3181
|
-
style: [$.closeButton, { color:
|
|
3179
|
+
onPress: () => r(!1),
|
|
3180
|
+
children: /* @__PURE__ */ N(z, {
|
|
3181
|
+
style: [$.closeButton, { color: f.textMuted }],
|
|
3182
3182
|
children: "✕"
|
|
3183
3183
|
})
|
|
3184
3184
|
})]
|
|
3185
3185
|
}),
|
|
3186
3186
|
/* @__PURE__ */ N(H, {
|
|
3187
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3188
|
-
children: /* @__PURE__ */ N(
|
|
3189
|
-
style: [$.rangeIndicatorText, { color:
|
|
3190
|
-
children:
|
|
3187
|
+
style: [$.rangeIndicator, { backgroundColor: f.primaryLight }],
|
|
3188
|
+
children: /* @__PURE__ */ N(z, {
|
|
3189
|
+
style: [$.rangeIndicatorText, { color: f.primary }],
|
|
3190
|
+
children: p(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3191
3191
|
})
|
|
3192
3192
|
}),
|
|
3193
3193
|
/* @__PURE__ */ P(H, {
|
|
@@ -3195,23 +3195,23 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3195
3195
|
children: [
|
|
3196
3196
|
/* @__PURE__ */ P(H, {
|
|
3197
3197
|
style: $.pickerColumn,
|
|
3198
|
-
children: [/* @__PURE__ */ N(
|
|
3199
|
-
style: [$.pickerLabel, { color:
|
|
3198
|
+
children: [/* @__PURE__ */ N(z, {
|
|
3199
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3200
3200
|
children: "Hour"
|
|
3201
|
-
}), /* @__PURE__ */ N(
|
|
3201
|
+
}), /* @__PURE__ */ N(L, {
|
|
3202
3202
|
style: $.picker,
|
|
3203
3203
|
contentContainerStyle: $.pickerContent,
|
|
3204
3204
|
showsVerticalScrollIndicator: !1,
|
|
3205
|
-
children:
|
|
3206
|
-
style: [$.pickerItem,
|
|
3207
|
-
onPress: () =>
|
|
3205
|
+
children: ne.map((e) => /* @__PURE__ */ N(V, {
|
|
3206
|
+
style: [$.pickerItem, O === e && { backgroundColor: f.primary }],
|
|
3207
|
+
onPress: () => k(e),
|
|
3208
3208
|
activeOpacity: .7,
|
|
3209
|
-
children: /* @__PURE__ */ N(
|
|
3209
|
+
children: /* @__PURE__ */ N(z, {
|
|
3210
3210
|
style: [
|
|
3211
3211
|
$.pickerItemText,
|
|
3212
|
-
{ color:
|
|
3213
|
-
|
|
3214
|
-
color:
|
|
3212
|
+
{ color: f.text },
|
|
3213
|
+
O === e && {
|
|
3214
|
+
color: f.background,
|
|
3215
3215
|
fontWeight: "600"
|
|
3216
3216
|
}
|
|
3217
3217
|
],
|
|
@@ -3220,29 +3220,29 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3220
3220
|
}, e))
|
|
3221
3221
|
})]
|
|
3222
3222
|
}),
|
|
3223
|
-
/* @__PURE__ */ N(
|
|
3224
|
-
style: [$.pickerSeparator, { color:
|
|
3223
|
+
/* @__PURE__ */ N(z, {
|
|
3224
|
+
style: [$.pickerSeparator, { color: f.text }],
|
|
3225
3225
|
children: ":"
|
|
3226
3226
|
}),
|
|
3227
3227
|
/* @__PURE__ */ P(H, {
|
|
3228
3228
|
style: $.pickerColumn,
|
|
3229
|
-
children: [/* @__PURE__ */ N(
|
|
3230
|
-
style: [$.pickerLabel, { color:
|
|
3229
|
+
children: [/* @__PURE__ */ N(z, {
|
|
3230
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3231
3231
|
children: "Minute"
|
|
3232
|
-
}), /* @__PURE__ */ N(
|
|
3232
|
+
}), /* @__PURE__ */ N(L, {
|
|
3233
3233
|
style: $.picker,
|
|
3234
3234
|
contentContainerStyle: $.pickerContent,
|
|
3235
3235
|
showsVerticalScrollIndicator: !1,
|
|
3236
|
-
children:
|
|
3237
|
-
style: [$.pickerItem,
|
|
3238
|
-
onPress: () =>
|
|
3236
|
+
children: re.map((e) => /* @__PURE__ */ N(V, {
|
|
3237
|
+
style: [$.pickerItem, A === e && { backgroundColor: f.primary }],
|
|
3238
|
+
onPress: () => M(e),
|
|
3239
3239
|
activeOpacity: .7,
|
|
3240
|
-
children: /* @__PURE__ */ N(
|
|
3240
|
+
children: /* @__PURE__ */ N(z, {
|
|
3241
3241
|
style: [
|
|
3242
3242
|
$.pickerItemText,
|
|
3243
|
-
{ color:
|
|
3244
|
-
|
|
3245
|
-
color:
|
|
3243
|
+
{ color: f.text },
|
|
3244
|
+
A === e && {
|
|
3245
|
+
color: f.background,
|
|
3246
3246
|
fontWeight: "600"
|
|
3247
3247
|
}
|
|
3248
3248
|
],
|
|
@@ -3254,25 +3254,25 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3254
3254
|
]
|
|
3255
3255
|
}),
|
|
3256
3256
|
/* @__PURE__ */ N(V, {
|
|
3257
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3258
|
-
onPress:
|
|
3257
|
+
style: [$.confirmButton, { backgroundColor: f.primary }],
|
|
3258
|
+
onPress: I,
|
|
3259
3259
|
activeOpacity: .7,
|
|
3260
|
-
children: /* @__PURE__ */ N(
|
|
3261
|
-
style: [$.confirmButtonText, { color:
|
|
3262
|
-
children:
|
|
3260
|
+
children: /* @__PURE__ */ N(z, {
|
|
3261
|
+
style: [$.confirmButtonText, { color: f.background }],
|
|
3262
|
+
children: i ? "Next" : "Confirm"
|
|
3263
3263
|
})
|
|
3264
3264
|
})
|
|
3265
3265
|
]
|
|
3266
3266
|
})
|
|
3267
3267
|
})
|
|
3268
3268
|
}),
|
|
3269
|
-
|
|
3270
|
-
style: [$.error, { color:
|
|
3271
|
-
children:
|
|
3269
|
+
l && /* @__PURE__ */ N(z, {
|
|
3270
|
+
style: [$.error, { color: f.error }],
|
|
3271
|
+
children: l
|
|
3272
3272
|
}),
|
|
3273
|
-
|
|
3274
|
-
style: [$.helperText, { color:
|
|
3275
|
-
children:
|
|
3273
|
+
d && !l && /* @__PURE__ */ N(z, {
|
|
3274
|
+
style: [$.helperText, { color: f.textMuted }],
|
|
3275
|
+
children: d
|
|
3276
3276
|
})
|
|
3277
3277
|
]
|
|
3278
3278
|
});
|
|
@@ -3377,75 +3377,75 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3377
3377
|
flex: 1,
|
|
3378
3378
|
fontSize: 14
|
|
3379
3379
|
}
|
|
3380
|
-
}),
|
|
3380
|
+
}), Ge = (e, t) => /* @__PURE__ */ P(z, { children: [
|
|
3381
3381
|
"TODO: Implement ",
|
|
3382
3382
|
t.node.data.type,
|
|
3383
3383
|
" input for React Native"
|
|
3384
|
-
] }),
|
|
3385
|
-
address:
|
|
3386
|
-
autocomplete:
|
|
3387
|
-
checkbox:
|
|
3388
|
-
date:
|
|
3389
|
-
daterange:
|
|
3390
|
-
file:
|
|
3391
|
-
hidden:
|
|
3392
|
-
http:
|
|
3393
|
-
number:
|
|
3394
|
-
password:
|
|
3395
|
-
radio:
|
|
3396
|
-
select:
|
|
3397
|
-
submit:
|
|
3398
|
-
switch:
|
|
3399
|
-
text:
|
|
3400
|
-
textarea:
|
|
3401
|
-
time:
|
|
3402
|
-
timerange:
|
|
3403
|
-
},
|
|
3404
|
-
let { colors:
|
|
3384
|
+
] }), Ke = {
|
|
3385
|
+
address: de,
|
|
3386
|
+
autocomplete: me,
|
|
3387
|
+
checkbox: he,
|
|
3388
|
+
date: ge,
|
|
3389
|
+
daterange: _e,
|
|
3390
|
+
file: ve,
|
|
3391
|
+
hidden: ye,
|
|
3392
|
+
http: Ae,
|
|
3393
|
+
number: je,
|
|
3394
|
+
password: Ne,
|
|
3395
|
+
radio: Fe,
|
|
3396
|
+
select: Ie,
|
|
3397
|
+
submit: Ge,
|
|
3398
|
+
switch: Le,
|
|
3399
|
+
text: Ve,
|
|
3400
|
+
textarea: ze,
|
|
3401
|
+
time: Ue,
|
|
3402
|
+
timerange: We
|
|
3403
|
+
}, qe = ({ label: e, children: t, canGoBack: n, isLastStep: r, canContinue: i, isSubmitting: a, onBack: o, onContinue: s }) => {
|
|
3404
|
+
let { colors: c } = x(), l = _(), u = !i || a;
|
|
3405
3405
|
return /* @__PURE__ */ P(H, { children: [
|
|
3406
|
-
|
|
3407
|
-
style: [
|
|
3408
|
-
children:
|
|
3406
|
+
e ? /* @__PURE__ */ N(z, {
|
|
3407
|
+
style: [Je.label, { color: c.text }],
|
|
3408
|
+
children: e
|
|
3409
3409
|
}) : null,
|
|
3410
3410
|
/* @__PURE__ */ N(H, {
|
|
3411
|
-
style:
|
|
3412
|
-
children:
|
|
3411
|
+
style: Je.content,
|
|
3412
|
+
children: t
|
|
3413
3413
|
}),
|
|
3414
3414
|
/* @__PURE__ */ P(H, {
|
|
3415
|
-
style:
|
|
3416
|
-
children: [
|
|
3415
|
+
style: Je.actions,
|
|
3416
|
+
children: [n ? /* @__PURE__ */ N(V, {
|
|
3417
3417
|
style: [
|
|
3418
|
-
|
|
3419
|
-
{ borderColor:
|
|
3420
|
-
|
|
3418
|
+
Je.backButton,
|
|
3419
|
+
{ borderColor: c.border },
|
|
3420
|
+
a && Je.disabled
|
|
3421
3421
|
],
|
|
3422
|
-
onPress:
|
|
3423
|
-
disabled:
|
|
3422
|
+
onPress: o,
|
|
3423
|
+
disabled: a,
|
|
3424
3424
|
activeOpacity: .7,
|
|
3425
|
-
children: /* @__PURE__ */ N(
|
|
3426
|
-
style: [
|
|
3427
|
-
children:
|
|
3425
|
+
children: /* @__PURE__ */ N(z, {
|
|
3426
|
+
style: [Je.backButtonText, { color: c.text }],
|
|
3427
|
+
children: l("renderer.step.back")
|
|
3428
3428
|
})
|
|
3429
|
-
}), /* @__PURE__ */ N(V, {
|
|
3429
|
+
}) : /* @__PURE__ */ N(H, {}), /* @__PURE__ */ N(V, {
|
|
3430
3430
|
style: [
|
|
3431
|
-
|
|
3432
|
-
{ backgroundColor:
|
|
3433
|
-
|
|
3434
|
-
backgroundColor:
|
|
3431
|
+
Je.continueButton,
|
|
3432
|
+
{ backgroundColor: c.primary },
|
|
3433
|
+
u && {
|
|
3434
|
+
backgroundColor: c.primaryDisabled,
|
|
3435
3435
|
opacity: .6
|
|
3436
3436
|
}
|
|
3437
3437
|
],
|
|
3438
|
-
onPress:
|
|
3439
|
-
disabled:
|
|
3438
|
+
onPress: s,
|
|
3439
|
+
disabled: u,
|
|
3440
3440
|
activeOpacity: .7,
|
|
3441
|
-
children:
|
|
3442
|
-
style: [
|
|
3443
|
-
children:
|
|
3441
|
+
children: a ? /* @__PURE__ */ N(ne, { color: c.primaryForeground }) : /* @__PURE__ */ N(z, {
|
|
3442
|
+
style: [Je.continueButtonText, { color: c.primaryForeground }],
|
|
3443
|
+
children: l(r ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")
|
|
3444
3444
|
})
|
|
3445
3445
|
})]
|
|
3446
3446
|
})
|
|
3447
3447
|
] });
|
|
3448
|
-
},
|
|
3448
|
+
}, Je = R.create({
|
|
3449
3449
|
actions: {
|
|
3450
3450
|
alignItems: "center",
|
|
3451
3451
|
flexDirection: "row",
|
|
@@ -3480,11 +3480,11 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3480
3480
|
fontWeight: "600",
|
|
3481
3481
|
marginBottom: 12
|
|
3482
3482
|
}
|
|
3483
|
-
}),
|
|
3484
|
-
let { colors: i } =
|
|
3483
|
+
}), Ye = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3484
|
+
let { colors: i } = x();
|
|
3485
3485
|
return /* @__PURE__ */ N(V, {
|
|
3486
3486
|
style: [
|
|
3487
|
-
|
|
3487
|
+
Xe.button,
|
|
3488
3488
|
{ backgroundColor: i.primary },
|
|
3489
3489
|
(t || n) && {
|
|
3490
3490
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3494,12 +3494,12 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3494
3494
|
disabled: t || n,
|
|
3495
3495
|
onPress: r,
|
|
3496
3496
|
activeOpacity: .7,
|
|
3497
|
-
children: n ? /* @__PURE__ */ N(
|
|
3498
|
-
style: [
|
|
3497
|
+
children: n ? /* @__PURE__ */ N(ne, { color: i.primaryForeground }) : /* @__PURE__ */ N(z, {
|
|
3498
|
+
style: [Xe.buttonText, { color: i.primaryForeground }],
|
|
3499
3499
|
children: e
|
|
3500
3500
|
})
|
|
3501
3501
|
});
|
|
3502
|
-
},
|
|
3502
|
+
}, Xe = R.create({
|
|
3503
3503
|
button: {
|
|
3504
3504
|
alignItems: "center",
|
|
3505
3505
|
borderRadius: 6,
|
|
@@ -3512,16 +3512,16 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3512
3512
|
fontSize: 16,
|
|
3513
3513
|
fontWeight: "600"
|
|
3514
3514
|
}
|
|
3515
|
-
}),
|
|
3516
|
-
let
|
|
3517
|
-
return /* @__PURE__ */ N(
|
|
3518
|
-
style: [
|
|
3519
|
-
children:
|
|
3515
|
+
}), Ze = ({ children: e }) => e, Qe = ({ node: e }) => {
|
|
3516
|
+
let t = _(), { colors: n } = x(), r = t(e.data?.label);
|
|
3517
|
+
return /* @__PURE__ */ N(z, {
|
|
3518
|
+
style: [et.title, { color: n.text }],
|
|
3519
|
+
children: r
|
|
3520
3520
|
});
|
|
3521
|
-
},
|
|
3522
|
-
let { colors: e } =
|
|
3523
|
-
return /* @__PURE__ */ N(H, { style: [
|
|
3524
|
-
},
|
|
3521
|
+
}, $e = () => {
|
|
3522
|
+
let { colors: e } = x();
|
|
3523
|
+
return /* @__PURE__ */ N(H, { style: [et.divider, { backgroundColor: e.separator }] });
|
|
3524
|
+
}, et = R.create({
|
|
3525
3525
|
divider: {
|
|
3526
3526
|
height: 1,
|
|
3527
3527
|
marginBottom: 16,
|
|
@@ -3532,63 +3532,63 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3532
3532
|
fontWeight: "700",
|
|
3533
3533
|
marginBottom: 16
|
|
3534
3534
|
}
|
|
3535
|
-
}),
|
|
3536
|
-
divider:
|
|
3537
|
-
title:
|
|
3538
|
-
},
|
|
3535
|
+
}), tt = {
|
|
3536
|
+
divider: $e,
|
|
3537
|
+
title: Qe
|
|
3538
|
+
}, nt = ({ node: e, children: t }) => {
|
|
3539
3539
|
let { image: n } = e.data;
|
|
3540
|
-
return /* @__PURE__ */ P(H, { children: [n && /* @__PURE__ */ N(
|
|
3540
|
+
return /* @__PURE__ */ P(H, { children: [n && /* @__PURE__ */ N(ie, {
|
|
3541
3541
|
source: { uri: n },
|
|
3542
|
-
style:
|
|
3542
|
+
style: rt.image,
|
|
3543
3543
|
resizeMode: "cover"
|
|
3544
3544
|
}), t] });
|
|
3545
|
-
},
|
|
3545
|
+
}, rt = R.create({ image: {
|
|
3546
3546
|
borderRadius: 6,
|
|
3547
3547
|
height: 160,
|
|
3548
3548
|
marginBottom: 8,
|
|
3549
3549
|
width: "100%"
|
|
3550
|
-
} }),
|
|
3551
|
-
let { colors: t } =
|
|
3550
|
+
} }), it = ({ style: e }) => {
|
|
3551
|
+
let { colors: t } = x(), n = A(new F.Value(.5)).current;
|
|
3552
3552
|
return O(() => {
|
|
3553
|
-
let e =
|
|
3553
|
+
let e = F.loop(F.sequence([F.timing(n, {
|
|
3554
3554
|
duration: 600,
|
|
3555
3555
|
toValue: 1,
|
|
3556
3556
|
useNativeDriver: !0
|
|
3557
|
-
}),
|
|
3557
|
+
}), F.timing(n, {
|
|
3558
3558
|
duration: 600,
|
|
3559
3559
|
toValue: .5,
|
|
3560
3560
|
useNativeDriver: !0
|
|
3561
3561
|
})]));
|
|
3562
3562
|
return e.start(), () => e.stop();
|
|
3563
|
-
}, [n]), /* @__PURE__ */ N(
|
|
3564
|
-
|
|
3563
|
+
}, [n]), /* @__PURE__ */ N(F.View, { style: [
|
|
3564
|
+
ot.bar,
|
|
3565
3565
|
{
|
|
3566
3566
|
backgroundColor: t.muted,
|
|
3567
3567
|
opacity: n
|
|
3568
3568
|
},
|
|
3569
3569
|
e
|
|
3570
3570
|
] });
|
|
3571
|
-
},
|
|
3571
|
+
}, at = () => /* @__PURE__ */ P(H, {
|
|
3572
3572
|
accessibilityState: { busy: !0 },
|
|
3573
3573
|
children: [
|
|
3574
|
-
/* @__PURE__ */ N(
|
|
3574
|
+
/* @__PURE__ */ N(it, { style: ot.title }),
|
|
3575
3575
|
/* @__PURE__ */ N(H, {
|
|
3576
|
-
style:
|
|
3576
|
+
style: ot.fields,
|
|
3577
3577
|
children: [
|
|
3578
3578
|
0,
|
|
3579
3579
|
1,
|
|
3580
3580
|
2
|
|
3581
3581
|
].map((e) => /* @__PURE__ */ P(H, {
|
|
3582
|
-
style:
|
|
3583
|
-
children: [/* @__PURE__ */ N(
|
|
3582
|
+
style: ot.field,
|
|
3583
|
+
children: [/* @__PURE__ */ N(it, { style: ot.fieldLabel }), /* @__PURE__ */ N(it, { style: ot.fieldInput })]
|
|
3584
3584
|
}, e))
|
|
3585
3585
|
}),
|
|
3586
3586
|
/* @__PURE__ */ N(H, {
|
|
3587
|
-
style:
|
|
3588
|
-
children: /* @__PURE__ */ N(
|
|
3587
|
+
style: ot.actions,
|
|
3588
|
+
children: /* @__PURE__ */ N(it, { style: ot.button })
|
|
3589
3589
|
})
|
|
3590
3590
|
]
|
|
3591
|
-
}),
|
|
3591
|
+
}), ot = R.create({
|
|
3592
3592
|
actions: {
|
|
3593
3593
|
alignItems: "flex-end",
|
|
3594
3594
|
marginTop: 24
|
|
@@ -3613,104 +3613,116 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3613
3613
|
marginBottom: 24,
|
|
3614
3614
|
width: "33%"
|
|
3615
3615
|
}
|
|
3616
|
-
}),
|
|
3617
|
-
let { colors:
|
|
3616
|
+
}), st = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: i, googleApiKey: a, headers: o, initialValues: s, isLoading: c = !1, isSubmitting: l = !1, language: u, onBack: d, onChange: f, onSubmit: p, style: m, theme: h, validate: _, validationMode: v }) => {
|
|
3617
|
+
let { colors: y } = x(), { canContinueStep: b, canSubmit: S, clearSubmitMessage: C, config: T, currentStep: E, currentStepGroupNode: D, currentStepIndex: ee, formErrors: O, formValues: A, goToNextStep: j, goToPreviousStep: M, handleSubmit: ne, inputNodes: re, isFirstStep: F, isLastStep: I, isSubmitting: ie, missingRequiredFields: ae, setFieldValue: R, steps: oe, submitMessage: B, t: V } = g({
|
|
3618
3618
|
baseUrl: e,
|
|
3619
3619
|
components: t,
|
|
3620
|
-
flow:
|
|
3621
|
-
googleApiKey:
|
|
3620
|
+
flow: i,
|
|
3621
|
+
googleApiKey: a,
|
|
3622
3622
|
headers: o,
|
|
3623
3623
|
initialValues: s,
|
|
3624
|
-
language:
|
|
3625
|
-
onChange:
|
|
3626
|
-
onSubmit:
|
|
3627
|
-
theme:
|
|
3628
|
-
validate:
|
|
3629
|
-
validationMode:
|
|
3630
|
-
}), { FormWrapper:
|
|
3631
|
-
config:
|
|
3632
|
-
DefaultFormWrapper:
|
|
3633
|
-
DefaultInputWrapper:
|
|
3634
|
-
DefaultSubmitButton:
|
|
3635
|
-
DefaultSubmitButtonWrapper:
|
|
3636
|
-
defaultInputRenderers:
|
|
3637
|
-
defaultUI:
|
|
3638
|
-
formErrors:
|
|
3639
|
-
formValues:
|
|
3640
|
-
inputNodes:
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3624
|
+
language: u,
|
|
3625
|
+
onChange: f,
|
|
3626
|
+
onSubmit: p,
|
|
3627
|
+
theme: h,
|
|
3628
|
+
validate: _,
|
|
3629
|
+
validationMode: v
|
|
3630
|
+
}), ce = l || ie, { FormWrapper: le, SubmitButtonWrapper: ue, renderNode: de } = w({
|
|
3631
|
+
config: T,
|
|
3632
|
+
DefaultFormWrapper: se,
|
|
3633
|
+
DefaultInputWrapper: nt,
|
|
3634
|
+
DefaultSubmitButton: Ye,
|
|
3635
|
+
DefaultSubmitButtonWrapper: Ze,
|
|
3636
|
+
defaultInputRenderers: Ke,
|
|
3637
|
+
defaultUI: tt,
|
|
3638
|
+
formErrors: O,
|
|
3639
|
+
formValues: A,
|
|
3640
|
+
inputNodes: re,
|
|
3641
|
+
isSubmitting: ce,
|
|
3642
|
+
missingRequiredFields: ae,
|
|
3643
|
+
setFieldValue: R
|
|
3644
|
+
}), U = T.components.step ?? qe, fe = T.components.loadingSkeleton ?? at, pe = k(() => V(D?.data?.label), [V, D]), me = te(() => {
|
|
3644
3645
|
if (I) {
|
|
3645
|
-
|
|
3646
|
+
ne();
|
|
3646
3647
|
return;
|
|
3647
3648
|
}
|
|
3648
|
-
|
|
3649
|
+
j();
|
|
3649
3650
|
}, [
|
|
3650
3651
|
I,
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
])
|
|
3654
|
-
|
|
3652
|
+
ne,
|
|
3653
|
+
j
|
|
3654
|
+
]), W = te(() => {
|
|
3655
|
+
if (F) {
|
|
3656
|
+
d?.();
|
|
3657
|
+
return;
|
|
3658
|
+
}
|
|
3659
|
+
M();
|
|
3660
|
+
}, [
|
|
3661
|
+
F,
|
|
3662
|
+
d,
|
|
3663
|
+
M
|
|
3664
|
+
]), he = !F || !!d;
|
|
3665
|
+
return /* @__PURE__ */ N(L, {
|
|
3655
3666
|
nestedScrollEnabled: !0,
|
|
3656
3667
|
style: [
|
|
3657
|
-
|
|
3658
|
-
{ backgroundColor:
|
|
3659
|
-
|
|
3668
|
+
lt.container,
|
|
3669
|
+
{ backgroundColor: y.background },
|
|
3670
|
+
m
|
|
3660
3671
|
],
|
|
3661
3672
|
contentContainerStyle: n,
|
|
3662
|
-
children: c ? /* @__PURE__ */ N(
|
|
3673
|
+
children: c ? /* @__PURE__ */ N(fe, {}) : /* @__PURE__ */ P(r, {
|
|
3663
3674
|
value: {
|
|
3664
|
-
baseUrl:
|
|
3665
|
-
flow:
|
|
3666
|
-
formErrors:
|
|
3667
|
-
formValues:
|
|
3668
|
-
googleApiKey:
|
|
3669
|
-
headers:
|
|
3670
|
-
inputNodes:
|
|
3671
|
-
language:
|
|
3672
|
-
setFieldValue:
|
|
3675
|
+
baseUrl: T.baseUrl,
|
|
3676
|
+
flow: i,
|
|
3677
|
+
formErrors: O,
|
|
3678
|
+
formValues: A,
|
|
3679
|
+
googleApiKey: T.googleApiKey,
|
|
3680
|
+
headers: T.headers,
|
|
3681
|
+
inputNodes: re,
|
|
3682
|
+
language: T.language,
|
|
3683
|
+
setFieldValue: R
|
|
3673
3684
|
},
|
|
3674
|
-
children: [/* @__PURE__ */ P(
|
|
3675
|
-
onSubmit:
|
|
3676
|
-
children: [
|
|
3677
|
-
missingFields: I ?
|
|
3678
|
-
children: /* @__PURE__ */ N(
|
|
3679
|
-
step:
|
|
3680
|
-
groupNode:
|
|
3681
|
-
stepIndex:
|
|
3682
|
-
totalSteps:
|
|
3683
|
-
isFirstStep:
|
|
3685
|
+
children: [/* @__PURE__ */ P(le, {
|
|
3686
|
+
onSubmit: ne,
|
|
3687
|
+
children: [E && /* @__PURE__ */ N(ue, {
|
|
3688
|
+
missingFields: I ? ae : void 0,
|
|
3689
|
+
children: /* @__PURE__ */ N(U, {
|
|
3690
|
+
step: E,
|
|
3691
|
+
groupNode: D,
|
|
3692
|
+
stepIndex: ee,
|
|
3693
|
+
totalSteps: oe.length,
|
|
3694
|
+
isFirstStep: F,
|
|
3684
3695
|
isLastStep: I,
|
|
3685
|
-
canContinue:
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3696
|
+
canContinue: b && (!I || S),
|
|
3697
|
+
canGoBack: he,
|
|
3698
|
+
isSubmitting: ce,
|
|
3699
|
+
onBack: W,
|
|
3700
|
+
onContinue: me,
|
|
3701
|
+
label: pe,
|
|
3702
|
+
children: E.nodes.map((e) => de(e))
|
|
3691
3703
|
})
|
|
3692
|
-
}), /* @__PURE__ */ N(
|
|
3693
|
-
style: [
|
|
3704
|
+
}), /* @__PURE__ */ N(z, {
|
|
3705
|
+
style: [lt.poweredBy, { color: y.textMuted }],
|
|
3694
3706
|
children: "Powered by Treege"
|
|
3695
3707
|
})]
|
|
3696
|
-
}),
|
|
3697
|
-
style: [
|
|
3698
|
-
children: [/* @__PURE__ */ N(
|
|
3699
|
-
style: [
|
|
3700
|
-
children:
|
|
3701
|
-
}), /* @__PURE__ */ N(
|
|
3702
|
-
style: [
|
|
3703
|
-
onPress:
|
|
3704
|
-
children:
|
|
3708
|
+
}), B && /* @__PURE__ */ P(H, {
|
|
3709
|
+
style: [lt.message, { backgroundColor: B.type === "success" ? y.successBg : y.errorBg }],
|
|
3710
|
+
children: [/* @__PURE__ */ N(z, {
|
|
3711
|
+
style: [lt.messageText, { color: B.type === "success" ? y.success : y.error }],
|
|
3712
|
+
children: B.message
|
|
3713
|
+
}), /* @__PURE__ */ N(z, {
|
|
3714
|
+
style: [lt.messageClose, { color: B.type === "success" ? y.success : y.error }],
|
|
3715
|
+
onPress: C,
|
|
3716
|
+
children: V("common.close")
|
|
3705
3717
|
})]
|
|
3706
3718
|
})]
|
|
3707
3719
|
})
|
|
3708
3720
|
});
|
|
3709
|
-
},
|
|
3721
|
+
}, ct = (e) => /* @__PURE__ */ N(E, {
|
|
3710
3722
|
theme: e.theme,
|
|
3711
3723
|
storageKey: "treege-renderer-theme",
|
|
3712
|
-
children: /* @__PURE__ */ N(
|
|
3713
|
-
}),
|
|
3724
|
+
children: /* @__PURE__ */ N(st, { ...e })
|
|
3725
|
+
}), lt = R.create({
|
|
3714
3726
|
container: { flex: 1 },
|
|
3715
3727
|
message: {
|
|
3716
3728
|
borderRadius: 6,
|
|
@@ -3733,4 +3745,4 @@ var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
|
3733
3745
|
}
|
|
3734
3746
|
});
|
|
3735
3747
|
//#endregion
|
|
3736
|
-
export {
|
|
3748
|
+
export { de as DefaultAddressInput, me as DefaultAutocompleteInput, he as DefaultCheckboxInput, ge as DefaultDateInput, _e as DefaultDateRangeInput, $e as DefaultDividerUI, ve as DefaultFileInput, ye as DefaultHiddenInput, Ae as DefaultHttpInput, je as DefaultNumberInput, Ne as DefaultPasswordInput, Fe as DefaultRadioInput, Ie as DefaultSelectInput, Ge as DefaultSubmitInput, Le as DefaultSwitchInput, Ve as DefaultTextInput, ze as DefaultTextareaInput, Ue as DefaultTimeInput, We as DefaultTimeRangeInput, Qe as DefaultTitleUI, ct as TreegeRenderer, D as TreegeRendererProvider, p as applyReferenceTransformation, C as buildInitialFormValues, b as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, m as convertFormValuesToNamedFormat, Ke as defaultInputRenderers, tt as defaultUI, d as evaluateCondition, y as evaluateConditions, u as fileToSerializable, ee as filesToSerializable, l as findStartNode, S as getFlowRenderState, s as getTranslatedText, c as isFieldEmpty, T as isStartNode, we as sanitize, Ee as sanitizeHttpResponse, a as serializableToFile, g as useTreegeRenderer, f as useTreegeRendererConfig };
|