treege 3.0.0-beta.95 → 3.0.0-beta.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DefaultSubmitButton-D4Hqyara.js → DefaultSubmitButton-CAOTg3w7.js} +196 -196
- package/dist/{ThemeContext-CDewydK5.js → ThemeContext-B9-cptw0.js} +21 -7
- package/dist/editor/types/ai.d.ts +1 -1
- package/dist/editor/utils/aiFlowGenerator.d.ts +16 -1
- package/dist/{editor-BzhBNy8O.js → editor-CSc1Ygb5.js} +745 -722
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/types/renderer.d.ts +3 -3
- package/dist/renderer/utils/form.d.ts +13 -1
- package/dist/renderer-DX3WeZtk.js +437 -0
- package/dist/renderer-native.js +899 -899
- package/dist/renderer.js +5 -5
- package/dist/useRenderNode-C9RSQFX3.js +600 -0
- package/package.json +1 -1
- package/dist/renderer-Cd2P21x9.js +0 -437
- package/dist/useRenderNode-BaBKq6Ed.js +0 -600
package/dist/renderer-native.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { ActivityIndicator as
|
|
1
|
+
import { $ as e, A as t, B as n, E as r, F as i, H as a, I as o, N as s, O as c, P as l, S as u, T as d, V as f, X as p, _ as m, a as h, b as g, c as _, g as v, h as y, i as b, l as x, n as S, o as C, r as w, s as T, t as E, u as ee, v as D, x as O, y as k, z as A } from "./ThemeContext-B9-cptw0.js";
|
|
2
|
+
import { a as j, c as te, i as ne, l as re, n as ie, o as ae, r as M, s as N, t as P } from "./useRenderNode-C9RSQFX3.js";
|
|
3
|
+
import { useCallback as oe, useEffect as se, useMemo as ce, useRef as F, useState as I } from "react";
|
|
4
|
+
import { Fragment as le, jsx as L, jsxs as R } from "react/jsx-runtime";
|
|
5
|
+
import { ActivityIndicator as ue, Alert as de, Animated as fe, FlatList as pe, Image as me, Modal as he, ScrollView as ge, StyleSheet as z, Switch as _e, Text as B, TextInput as ve, TouchableOpacity as V, View as H } from "react-native";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
7
|
-
var
|
|
8
|
-
style:
|
|
7
|
+
var ye = ({ children: e }) => /* @__PURE__ */ L(H, {
|
|
8
|
+
style: be.container,
|
|
9
9
|
children: e
|
|
10
|
-
}),
|
|
11
|
-
let { colors: r } =
|
|
12
|
-
return e ? /* @__PURE__ */
|
|
10
|
+
}), be = z.create({ container: { padding: 16 } }), xe = ({ label: e, required: t, style: n }) => {
|
|
11
|
+
let { colors: r } = S();
|
|
12
|
+
return e ? /* @__PURE__ */ R(B, {
|
|
13
13
|
style: [
|
|
14
|
-
|
|
14
|
+
Se.label,
|
|
15
15
|
{ color: r.textSecondary },
|
|
16
16
|
n
|
|
17
17
|
],
|
|
18
|
-
children: [e, t && /* @__PURE__ */
|
|
18
|
+
children: [e, t && /* @__PURE__ */ L(B, {
|
|
19
19
|
style: { color: r.error },
|
|
20
20
|
children: "*"
|
|
21
21
|
})]
|
|
22
22
|
}) : null;
|
|
23
|
-
},
|
|
23
|
+
}, Se = z.create({ label: {
|
|
24
24
|
fontSize: 14,
|
|
25
25
|
fontWeight: "500",
|
|
26
26
|
marginBottom: 8
|
|
27
|
-
} }),
|
|
27
|
+
} }), Ce = async (e, t) => {
|
|
28
28
|
if (!e || e.trim().length < 3) return [];
|
|
29
29
|
try {
|
|
30
30
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -39,7 +39,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
39
39
|
} catch (e) {
|
|
40
40
|
return console.error("Nominatim fetch error:", e), [];
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, we = async (e, t) => {
|
|
43
43
|
if (!e || e.trim().length < 3) return [];
|
|
44
44
|
try {
|
|
45
45
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -52,36 +52,36 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
52
52
|
} catch (e) {
|
|
53
53
|
return console.error("Google Places fetch error:", e), [];
|
|
54
54
|
}
|
|
55
|
-
},
|
|
56
|
-
let [
|
|
57
|
-
v(e.value),
|
|
58
|
-
}, [v]),
|
|
59
|
-
|
|
55
|
+
}, Te = ({ field: e, extra: t }) => {
|
|
56
|
+
let [n, r] = I(""), [i, s] = I([]), [c, l] = I(!1), [u, d] = I(!1), { value: f, placeholder: p, id: m, name: h } = e, { InputLabel: g, node: _, setValue: v, error: y, label: b, helperText: x } = t, { language: C, googleApiKey: w } = a(), T = o(), { colors: E } = S(), ee = oe((e) => {
|
|
57
|
+
v(e.value), r(""), l(!1), s([]);
|
|
58
|
+
}, [v]), D = () => {
|
|
59
|
+
l(!1);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
if (!
|
|
63
|
-
|
|
61
|
+
return se(() => {
|
|
62
|
+
if (!n || n.trim().length < 3) {
|
|
63
|
+
s([]), d(!1);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
d(!0);
|
|
67
67
|
let e = setTimeout(async () => {
|
|
68
|
-
|
|
68
|
+
s(w ? await we(n, w) : await Ce(n, C)), d(!1);
|
|
69
69
|
}, 300);
|
|
70
70
|
return () => {
|
|
71
71
|
clearTimeout(e), d(!1);
|
|
72
72
|
};
|
|
73
73
|
}, [
|
|
74
|
-
|
|
74
|
+
n,
|
|
75
75
|
C,
|
|
76
76
|
w
|
|
77
|
-
]), /* @__PURE__ */
|
|
77
|
+
]), /* @__PURE__ */ R(H, {
|
|
78
78
|
style: U.container,
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ L(g, {
|
|
81
81
|
label: b,
|
|
82
82
|
required: _.data.required
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ R(V, {
|
|
85
85
|
style: [
|
|
86
86
|
U.trigger,
|
|
87
87
|
{
|
|
@@ -90,9 +90,9 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
90
90
|
},
|
|
91
91
|
y && { borderColor: E.error }
|
|
92
92
|
],
|
|
93
|
-
onPress: () =>
|
|
93
|
+
onPress: () => l(!0),
|
|
94
94
|
activeOpacity: .7,
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ L(B, {
|
|
96
96
|
style: [
|
|
97
97
|
U.triggerText,
|
|
98
98
|
{ color: E.text },
|
|
@@ -100,41 +100,41 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
100
100
|
],
|
|
101
101
|
numberOfLines: 1,
|
|
102
102
|
children: f || p || T("renderer.defaultAddressInput.enterAddress")
|
|
103
|
-
}), /* @__PURE__ */
|
|
103
|
+
}), /* @__PURE__ */ L(B, {
|
|
104
104
|
style: U.icon,
|
|
105
105
|
children: "📍"
|
|
106
106
|
})]
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
visible:
|
|
108
|
+
/* @__PURE__ */ L(he, {
|
|
109
|
+
visible: c,
|
|
110
110
|
transparent: !0,
|
|
111
111
|
animationType: "fade",
|
|
112
|
-
onRequestClose:
|
|
113
|
-
children: /* @__PURE__ */
|
|
112
|
+
onRequestClose: D,
|
|
113
|
+
children: /* @__PURE__ */ L(V, {
|
|
114
114
|
style: U.modalOverlay,
|
|
115
115
|
activeOpacity: 1,
|
|
116
|
-
onPress:
|
|
117
|
-
children: /* @__PURE__ */
|
|
116
|
+
onPress: D,
|
|
117
|
+
children: /* @__PURE__ */ R(V, {
|
|
118
118
|
style: [U.modalContent, { backgroundColor: E.card }],
|
|
119
119
|
activeOpacity: 1,
|
|
120
120
|
onPress: () => {},
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ R(H, {
|
|
123
123
|
style: [U.modalHeader, { borderBottomColor: E.separator }],
|
|
124
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ L(B, {
|
|
125
125
|
style: [U.modalTitle, { color: E.text }],
|
|
126
126
|
children: b || p || T("renderer.defaultAddressInput.enterAddress")
|
|
127
|
-
}), /* @__PURE__ */
|
|
128
|
-
onPress:
|
|
129
|
-
children: /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ L(V, {
|
|
128
|
+
onPress: D,
|
|
129
|
+
children: /* @__PURE__ */ L(B, {
|
|
130
130
|
style: [U.closeButton, { color: E.textMuted }],
|
|
131
131
|
children: "✕"
|
|
132
132
|
})
|
|
133
133
|
})]
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ R(H, {
|
|
136
136
|
style: U.searchContainer,
|
|
137
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ L(ve, {
|
|
138
138
|
style: [U.searchInput, {
|
|
139
139
|
backgroundColor: E.muted,
|
|
140
140
|
borderColor: E.border,
|
|
@@ -142,53 +142,53 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
142
142
|
}],
|
|
143
143
|
placeholder: p || T("renderer.defaultAddressInput.enterAddress"),
|
|
144
144
|
placeholderTextColor: E.textMuted,
|
|
145
|
-
value:
|
|
146
|
-
onChangeText:
|
|
145
|
+
value: n,
|
|
146
|
+
onChangeText: r,
|
|
147
147
|
autoFocus: !0,
|
|
148
148
|
autoCapitalize: "none",
|
|
149
149
|
autoCorrect: !1
|
|
150
|
-
}), u && /* @__PURE__ */
|
|
150
|
+
}), u && /* @__PURE__ */ L(ue, {
|
|
151
151
|
size: "small",
|
|
152
152
|
color: E.primary,
|
|
153
153
|
style: U.searchLoader
|
|
154
154
|
})]
|
|
155
155
|
}),
|
|
156
|
-
u ? /* @__PURE__ */
|
|
156
|
+
u ? /* @__PURE__ */ R(H, {
|
|
157
157
|
style: U.loadingContainer,
|
|
158
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ L(ue, {
|
|
159
159
|
size: "small",
|
|
160
160
|
color: E.primary
|
|
161
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ L(B, {
|
|
162
162
|
style: [U.loadingText, { color: E.textMuted }],
|
|
163
163
|
children: T("renderer.defaultAddressInput.searching")
|
|
164
164
|
})]
|
|
165
|
-
}) : /* @__PURE__ */
|
|
166
|
-
data:
|
|
165
|
+
}) : /* @__PURE__ */ L(pe, {
|
|
166
|
+
data: i,
|
|
167
167
|
keyExtractor: (e, t) => t.toString(),
|
|
168
168
|
style: U.suggestionsList,
|
|
169
169
|
contentContainerStyle: U.suggestionsListContent,
|
|
170
170
|
keyboardShouldPersistTaps: "handled",
|
|
171
|
-
ListEmptyComponent:
|
|
171
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ L(H, {
|
|
172
172
|
style: U.emptyContainer,
|
|
173
|
-
children: /* @__PURE__ */
|
|
173
|
+
children: /* @__PURE__ */ L(B, {
|
|
174
174
|
style: [U.emptyText, { color: E.textMuted }],
|
|
175
175
|
children: T("renderer.defaultAddressInput.noAddressesFound")
|
|
176
176
|
})
|
|
177
|
-
}) : /* @__PURE__ */
|
|
177
|
+
}) : /* @__PURE__ */ L(H, {
|
|
178
178
|
style: U.emptyContainer,
|
|
179
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ L(B, {
|
|
180
180
|
style: [U.emptyText, { color: E.textMuted }],
|
|
181
181
|
children: T("renderer.defaultAddressInput.typeMinChars")
|
|
182
182
|
})
|
|
183
183
|
}),
|
|
184
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
184
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ R(V, {
|
|
185
185
|
style: U.suggestionItem,
|
|
186
186
|
onPress: () => ee(e),
|
|
187
187
|
activeOpacity: .7,
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ L(B, {
|
|
189
189
|
style: U.suggestionIcon,
|
|
190
190
|
children: "📍"
|
|
191
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ L(B, {
|
|
192
192
|
style: [U.suggestionText, { color: E.text }],
|
|
193
193
|
numberOfLines: 2,
|
|
194
194
|
children: e.label
|
|
@@ -199,13 +199,13 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
199
199
|
})
|
|
200
200
|
})
|
|
201
201
|
}),
|
|
202
|
-
y && /* @__PURE__ */
|
|
202
|
+
y && /* @__PURE__ */ L(B, {
|
|
203
203
|
style: [U.error, { color: E.error }],
|
|
204
204
|
children: y
|
|
205
205
|
}),
|
|
206
|
-
|
|
206
|
+
x && !y && /* @__PURE__ */ L(B, {
|
|
207
207
|
style: [U.helperText, { color: E.textMuted }],
|
|
208
|
-
children:
|
|
208
|
+
children: x
|
|
209
209
|
})
|
|
210
210
|
]
|
|
211
211
|
});
|
|
@@ -314,25 +314,25 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
314
314
|
flex: 1,
|
|
315
315
|
fontSize: 14
|
|
316
316
|
}
|
|
317
|
-
}),
|
|
318
|
-
let { colors: i } =
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
style:
|
|
321
|
-
children: [n ? /* @__PURE__ */
|
|
317
|
+
}), Ee = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
318
|
+
let { colors: i } = S();
|
|
319
|
+
return /* @__PURE__ */ R(H, {
|
|
320
|
+
style: De.content,
|
|
321
|
+
children: [n ? /* @__PURE__ */ L(me, {
|
|
322
322
|
source: { uri: n },
|
|
323
|
-
style:
|
|
324
|
-
}) : null, /* @__PURE__ */
|
|
325
|
-
style:
|
|
326
|
-
children: [/* @__PURE__ */
|
|
327
|
-
style: [
|
|
323
|
+
style: De.image
|
|
324
|
+
}) : null, /* @__PURE__ */ R(H, {
|
|
325
|
+
style: De.textWrapper,
|
|
326
|
+
children: [/* @__PURE__ */ L(B, {
|
|
327
|
+
style: [De.label, { color: r ? i.textMuted : i.text }],
|
|
328
328
|
children: e
|
|
329
|
-
}), t ? /* @__PURE__ */
|
|
330
|
-
style: [
|
|
329
|
+
}), t ? /* @__PURE__ */ L(B, {
|
|
330
|
+
style: [De.description, { color: i.textMuted }],
|
|
331
331
|
children: t
|
|
332
332
|
}) : null]
|
|
333
333
|
})]
|
|
334
334
|
});
|
|
335
|
-
},
|
|
335
|
+
}, De = z.create({
|
|
336
336
|
content: {
|
|
337
337
|
alignItems: "center",
|
|
338
338
|
flex: 1,
|
|
@@ -350,28 +350,28 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
350
350
|
},
|
|
351
351
|
label: { fontSize: 14 },
|
|
352
352
|
textWrapper: { flex: 1 }
|
|
353
|
-
}),
|
|
354
|
-
let [
|
|
355
|
-
if (!
|
|
356
|
-
let e =
|
|
353
|
+
}), Oe = ({ field: e, extra: t }) => {
|
|
354
|
+
let [n, r] = I(!1), [i, a] = I(""), { value: s, placeholder: c } = e, { InputLabel: l, node: u, setValue: d, error: f, label: p, helperText: m } = t, h = o(), { colors: g } = S(), _ = u.data.options || [], v = _.find((e) => e.value === s), y = ce(() => {
|
|
355
|
+
if (!i.trim()) return _;
|
|
356
|
+
let e = i.toLowerCase();
|
|
357
357
|
return _.filter((t) => h(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
358
358
|
}, [
|
|
359
359
|
_,
|
|
360
|
-
|
|
360
|
+
i,
|
|
361
361
|
h
|
|
362
362
|
]), b = (e) => {
|
|
363
|
-
d(e === s ? "" : e),
|
|
364
|
-
},
|
|
365
|
-
|
|
363
|
+
d(e === s ? "" : e), r(!1), a("");
|
|
364
|
+
}, x = () => {
|
|
365
|
+
r(!1), a("");
|
|
366
366
|
};
|
|
367
|
-
return /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ R(H, {
|
|
368
368
|
style: W.container,
|
|
369
369
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ L(l, {
|
|
371
371
|
label: p,
|
|
372
372
|
required: u.data.required
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ R(V, {
|
|
375
375
|
style: [
|
|
376
376
|
W.trigger,
|
|
377
377
|
{
|
|
@@ -380,10 +380,10 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
380
380
|
},
|
|
381
381
|
f && { borderColor: g.error }
|
|
382
382
|
],
|
|
383
|
-
onPress: () =>
|
|
383
|
+
onPress: () => r(!0),
|
|
384
384
|
activeOpacity: .7,
|
|
385
385
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ L(B, {
|
|
387
387
|
style: [
|
|
388
388
|
W.triggerText,
|
|
389
389
|
{ color: g.text },
|
|
@@ -392,7 +392,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
392
392
|
numberOfLines: 1,
|
|
393
393
|
children: s && v ? h(v.label) : c || h("renderer.defaultAutocompleteInput.selectOption")
|
|
394
394
|
}),
|
|
395
|
-
s ? /* @__PURE__ */
|
|
395
|
+
s ? /* @__PURE__ */ L(V, {
|
|
396
396
|
onPress: () => d(""),
|
|
397
397
|
hitSlop: {
|
|
398
398
|
bottom: 8,
|
|
@@ -401,47 +401,47 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
401
401
|
top: 8
|
|
402
402
|
},
|
|
403
403
|
style: W.clearButton,
|
|
404
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ L(B, {
|
|
405
405
|
style: [W.clearIcon, { color: g.textMuted }],
|
|
406
406
|
children: "✕"
|
|
407
407
|
})
|
|
408
408
|
}) : null,
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ L(B, {
|
|
410
410
|
style: [W.arrow, { color: g.textMuted }],
|
|
411
411
|
children: "▼"
|
|
412
412
|
})
|
|
413
413
|
]
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
visible:
|
|
415
|
+
/* @__PURE__ */ L(he, {
|
|
416
|
+
visible: n,
|
|
417
417
|
transparent: !0,
|
|
418
418
|
animationType: "fade",
|
|
419
|
-
onRequestClose:
|
|
420
|
-
children: /* @__PURE__ */
|
|
419
|
+
onRequestClose: x,
|
|
420
|
+
children: /* @__PURE__ */ L(V, {
|
|
421
421
|
style: W.modalOverlay,
|
|
422
422
|
activeOpacity: 1,
|
|
423
|
-
onPress:
|
|
424
|
-
children: /* @__PURE__ */
|
|
423
|
+
onPress: x,
|
|
424
|
+
children: /* @__PURE__ */ R(V, {
|
|
425
425
|
style: [W.modalContent, { backgroundColor: g.card }],
|
|
426
426
|
activeOpacity: 1,
|
|
427
427
|
onPress: () => {},
|
|
428
428
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ R(H, {
|
|
430
430
|
style: [W.modalHeader, { borderBottomColor: g.separator }],
|
|
431
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ L(B, {
|
|
432
432
|
style: [W.modalTitle, { color: g.text }],
|
|
433
433
|
children: p || c || h("renderer.defaultAutocompleteInput.selectOption")
|
|
434
|
-
}), /* @__PURE__ */
|
|
435
|
-
onPress:
|
|
436
|
-
children: /* @__PURE__ */
|
|
434
|
+
}), /* @__PURE__ */ L(V, {
|
|
435
|
+
onPress: x,
|
|
436
|
+
children: /* @__PURE__ */ L(B, {
|
|
437
437
|
style: [W.closeButton, { color: g.textMuted }],
|
|
438
438
|
children: "✕"
|
|
439
439
|
})
|
|
440
440
|
})]
|
|
441
441
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ L(H, {
|
|
443
443
|
style: W.searchContainer,
|
|
444
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ L(ve, {
|
|
445
445
|
style: [W.searchInput, {
|
|
446
446
|
backgroundColor: g.muted,
|
|
447
447
|
borderColor: g.border,
|
|
@@ -449,38 +449,38 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
449
449
|
}],
|
|
450
450
|
placeholder: c || h("renderer.defaultAutocompleteInput.search"),
|
|
451
451
|
placeholderTextColor: g.textMuted,
|
|
452
|
-
value:
|
|
453
|
-
onChangeText:
|
|
452
|
+
value: i,
|
|
453
|
+
onChangeText: a,
|
|
454
454
|
autoFocus: !0,
|
|
455
455
|
autoCapitalize: "none",
|
|
456
456
|
autoCorrect: !1
|
|
457
457
|
})
|
|
458
458
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ L(pe, {
|
|
460
460
|
data: y,
|
|
461
461
|
keyExtractor: (e) => e.value,
|
|
462
462
|
style: W.optionsList,
|
|
463
463
|
contentContainerStyle: W.optionsListContent,
|
|
464
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
464
|
+
ListEmptyComponent: /* @__PURE__ */ L(H, {
|
|
465
465
|
style: W.emptyContainer,
|
|
466
|
-
children: /* @__PURE__ */
|
|
466
|
+
children: /* @__PURE__ */ L(B, {
|
|
467
467
|
style: [W.emptyText, { color: g.textMuted }],
|
|
468
468
|
children: h("renderer.defaultAutocompleteInput.noResults")
|
|
469
469
|
})
|
|
470
470
|
}),
|
|
471
471
|
renderItem: ({ item: e }) => {
|
|
472
472
|
let t = e.value === s;
|
|
473
|
-
return /* @__PURE__ */
|
|
473
|
+
return /* @__PURE__ */ R(V, {
|
|
474
474
|
style: [W.option, t && { backgroundColor: g.primaryLight }],
|
|
475
475
|
onPress: () => b(e.value),
|
|
476
476
|
disabled: e.disabled,
|
|
477
477
|
activeOpacity: .7,
|
|
478
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ L(Ee, {
|
|
479
479
|
label: h(e.label) || e.value,
|
|
480
480
|
description: h(e.description),
|
|
481
481
|
image: e.image,
|
|
482
482
|
disabled: e.disabled
|
|
483
|
-
}), t && /* @__PURE__ */
|
|
483
|
+
}), t && /* @__PURE__ */ L(B, {
|
|
484
484
|
style: [W.checkmark, { color: g.primary }],
|
|
485
485
|
children: "✓"
|
|
486
486
|
})]
|
|
@@ -491,11 +491,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
491
491
|
})
|
|
492
492
|
})
|
|
493
493
|
}),
|
|
494
|
-
f && /* @__PURE__ */
|
|
494
|
+
f && /* @__PURE__ */ L(B, {
|
|
495
495
|
style: [W.error, { color: g.error }],
|
|
496
496
|
children: f
|
|
497
497
|
}),
|
|
498
|
-
m && !f && /* @__PURE__ */
|
|
498
|
+
m && !f && /* @__PURE__ */ L(B, {
|
|
499
499
|
style: [W.helperText, { color: g.textMuted }],
|
|
500
500
|
children: m
|
|
501
501
|
})
|
|
@@ -588,20 +588,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
588
588
|
flex: 1,
|
|
589
589
|
fontSize: 14
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
592
|
-
let
|
|
591
|
+
}), ke = ({ field: e, extra: t }) => {
|
|
592
|
+
let n = o(), { value: r } = e, { InputLabel: i, node: a, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = S(), f = a.data.options || [], p = f.length > 0, m = Array.isArray(r) ? r : [], h = typeof r == "boolean" ? r : !1, g = (e) => {
|
|
593
593
|
s(p ? m.includes(e) ? m.filter((t) => t !== e) : [...m, e] : !h);
|
|
594
594
|
}, _ = (e) => p ? m.includes(e) : h;
|
|
595
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ R(H, {
|
|
596
596
|
style: G.container,
|
|
597
597
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ L(i, {
|
|
599
599
|
label: l,
|
|
600
|
-
required:
|
|
600
|
+
required: a.data.required
|
|
601
601
|
}),
|
|
602
602
|
f.length > 0 ? f.map((e) => {
|
|
603
|
-
let t =
|
|
604
|
-
return /* @__PURE__ */
|
|
603
|
+
let t = n(e.description);
|
|
604
|
+
return /* @__PURE__ */ R(V, {
|
|
605
605
|
style: G.option,
|
|
606
606
|
onPress: () => g(e.value),
|
|
607
607
|
disabled: e.disabled,
|
|
@@ -612,9 +612,9 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
612
612
|
checked: _(e.value),
|
|
613
613
|
disabled: e.disabled
|
|
614
614
|
},
|
|
615
|
-
accessibilityLabel:
|
|
615
|
+
accessibilityLabel: n(e.label) || e.value,
|
|
616
616
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ L(H, {
|
|
618
618
|
style: [
|
|
619
619
|
G.checkbox,
|
|
620
620
|
{
|
|
@@ -626,40 +626,40 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
626
626
|
borderColor: d.primary
|
|
627
627
|
}
|
|
628
628
|
],
|
|
629
|
-
children: _(e.value) && /* @__PURE__ */
|
|
629
|
+
children: _(e.value) && /* @__PURE__ */ L(B, {
|
|
630
630
|
style: G.checkmark,
|
|
631
631
|
children: "✓"
|
|
632
632
|
})
|
|
633
633
|
}),
|
|
634
|
-
e.image ? /* @__PURE__ */
|
|
634
|
+
e.image ? /* @__PURE__ */ L(me, {
|
|
635
635
|
source: { uri: e.image },
|
|
636
636
|
style: G.image
|
|
637
637
|
}) : null,
|
|
638
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ R(H, {
|
|
639
639
|
style: G.optionTextContainer,
|
|
640
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ L(B, {
|
|
641
641
|
style: [
|
|
642
642
|
G.optionLabel,
|
|
643
643
|
{ color: d.textSecondary },
|
|
644
644
|
e.disabled && { color: d.textMuted }
|
|
645
645
|
],
|
|
646
|
-
children:
|
|
647
|
-
}), t && /* @__PURE__ */
|
|
646
|
+
children: n(e.label) || e.value
|
|
647
|
+
}), t && /* @__PURE__ */ L(B, {
|
|
648
648
|
style: [G.optionDescription, { color: d.textMuted }],
|
|
649
649
|
children: t
|
|
650
650
|
})]
|
|
651
651
|
})
|
|
652
652
|
]
|
|
653
653
|
}, e.value);
|
|
654
|
-
}) : /* @__PURE__ */
|
|
654
|
+
}) : /* @__PURE__ */ R(V, {
|
|
655
655
|
style: G.option,
|
|
656
656
|
onPress: () => g(""),
|
|
657
657
|
activeOpacity: .7,
|
|
658
658
|
accessible: !0,
|
|
659
659
|
accessibilityRole: "checkbox",
|
|
660
660
|
accessibilityState: { checked: h },
|
|
661
|
-
accessibilityLabel: l ||
|
|
662
|
-
children: [/* @__PURE__ */
|
|
661
|
+
accessibilityLabel: l || a.data.name,
|
|
662
|
+
children: [/* @__PURE__ */ L(H, {
|
|
663
663
|
style: [
|
|
664
664
|
G.checkbox,
|
|
665
665
|
{
|
|
@@ -671,20 +671,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
671
671
|
borderColor: d.primary
|
|
672
672
|
}
|
|
673
673
|
],
|
|
674
|
-
children: h && /* @__PURE__ */
|
|
674
|
+
children: h && /* @__PURE__ */ L(B, {
|
|
675
675
|
style: G.checkmark,
|
|
676
676
|
children: "✓"
|
|
677
677
|
})
|
|
678
|
-
}), l && /* @__PURE__ */
|
|
678
|
+
}), l && /* @__PURE__ */ L(B, {
|
|
679
679
|
style: [G.optionLabel, { color: d.textSecondary }],
|
|
680
680
|
children: l
|
|
681
681
|
})]
|
|
682
682
|
}),
|
|
683
|
-
c && /* @__PURE__ */
|
|
683
|
+
c && /* @__PURE__ */ L(B, {
|
|
684
684
|
style: [G.error, { color: d.error }],
|
|
685
685
|
children: c
|
|
686
686
|
}),
|
|
687
|
-
u && !c && /* @__PURE__ */
|
|
687
|
+
u && !c && /* @__PURE__ */ L(B, {
|
|
688
688
|
style: [G.helperText, { color: d.textMuted }],
|
|
689
689
|
children: u
|
|
690
690
|
})
|
|
@@ -731,15 +731,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
731
731
|
},
|
|
732
732
|
optionLabel: { fontSize: 14 },
|
|
733
733
|
optionTextContainer: { flex: 1 }
|
|
734
|
-
}),
|
|
735
|
-
let [
|
|
734
|
+
}), Ae = ({ field: e, extra: t }) => {
|
|
735
|
+
let [n, r] = I(!1), { value: i, placeholder: a } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = S(), m = o(), h = i ? new Date(i) : void 0, { year: g, month: _, today: v } = ce(() => {
|
|
736
736
|
let e = h || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
737
737
|
return r.setHours(0, 0, 0, 0), {
|
|
738
738
|
month: n,
|
|
739
739
|
today: r,
|
|
740
740
|
year: t
|
|
741
741
|
};
|
|
742
|
-
}, [h]), [y, b] =
|
|
742
|
+
}, [h]), [y, b] = I(g), [x, C] = I(_), w = [
|
|
743
743
|
"January",
|
|
744
744
|
"February",
|
|
745
745
|
"March",
|
|
@@ -752,44 +752,44 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
752
752
|
"October",
|
|
753
753
|
"November",
|
|
754
754
|
"December"
|
|
755
|
-
], T =
|
|
756
|
-
let e = new Date(y,
|
|
755
|
+
], T = ce(() => {
|
|
756
|
+
let e = new Date(y, x, 1).getDay(), t = new Date(y, x + 1, 0).getDate(), n = new Date(y, x, 0).getDate(), r = [];
|
|
757
757
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
758
|
-
date: new Date(y,
|
|
758
|
+
date: new Date(y, x - 1, n - t),
|
|
759
759
|
day: n - t,
|
|
760
760
|
isCurrentMonth: !1
|
|
761
761
|
});
|
|
762
762
|
for (let e = 1; e <= t; e++) r.push({
|
|
763
|
-
date: new Date(y,
|
|
763
|
+
date: new Date(y, x, e),
|
|
764
764
|
day: e,
|
|
765
765
|
isCurrentMonth: !0
|
|
766
766
|
});
|
|
767
767
|
let i = 42 - r.length;
|
|
768
768
|
for (let e = 1; e <= i; e++) r.push({
|
|
769
|
-
date: new Date(y,
|
|
769
|
+
date: new Date(y, x + 1, e),
|
|
770
770
|
day: e,
|
|
771
771
|
isCurrentMonth: !1
|
|
772
772
|
});
|
|
773
773
|
return r;
|
|
774
|
-
}, [y,
|
|
775
|
-
c.data.disablePast && e < v || (l(e.toISOString()),
|
|
774
|
+
}, [y, x]), E = oe((e) => {
|
|
775
|
+
c.data.disablePast && e < v || (l(e.toISOString()), r(!1));
|
|
776
776
|
}, [
|
|
777
777
|
c.data.disablePast,
|
|
778
778
|
v,
|
|
779
779
|
l
|
|
780
780
|
]), ee = () => {
|
|
781
|
-
|
|
782
|
-
},
|
|
783
|
-
|
|
784
|
-
},
|
|
785
|
-
return /* @__PURE__ */
|
|
781
|
+
x === 0 ? (C(11), b(y - 1)) : C(x - 1);
|
|
782
|
+
}, D = () => {
|
|
783
|
+
x === 11 ? (C(0), b(y + 1)) : C(x + 1);
|
|
784
|
+
}, O = () => h ? h.toLocaleDateString() : a || m("renderer.defaultInputs.selectDate"), k = (e) => c.data.disablePast ? e < v : !1, A = (e) => h ? e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear() : !1;
|
|
785
|
+
return /* @__PURE__ */ R(H, {
|
|
786
786
|
style: K.container,
|
|
787
787
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ L(s, {
|
|
789
789
|
label: d,
|
|
790
790
|
required: c.data.required
|
|
791
791
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ R(V, {
|
|
793
793
|
style: [
|
|
794
794
|
K.trigger,
|
|
795
795
|
{
|
|
@@ -798,78 +798,78 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
798
798
|
},
|
|
799
799
|
u && { borderColor: p.error }
|
|
800
800
|
],
|
|
801
|
-
onPress: () =>
|
|
801
|
+
onPress: () => r(!0),
|
|
802
802
|
activeOpacity: .7,
|
|
803
|
-
children: [/* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ L(B, {
|
|
804
804
|
style: [
|
|
805
805
|
K.triggerText,
|
|
806
806
|
{ color: p.text },
|
|
807
|
-
!
|
|
807
|
+
!i && { color: p.textMuted }
|
|
808
808
|
],
|
|
809
809
|
numberOfLines: 1,
|
|
810
|
-
children:
|
|
811
|
-
}), /* @__PURE__ */
|
|
810
|
+
children: O()
|
|
811
|
+
}), /* @__PURE__ */ L(B, {
|
|
812
812
|
style: K.icon,
|
|
813
813
|
children: "📅"
|
|
814
814
|
})]
|
|
815
815
|
}),
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
visible:
|
|
816
|
+
/* @__PURE__ */ L(he, {
|
|
817
|
+
visible: n,
|
|
818
818
|
transparent: !0,
|
|
819
819
|
animationType: "fade",
|
|
820
|
-
onRequestClose: () =>
|
|
821
|
-
children: /* @__PURE__ */
|
|
820
|
+
onRequestClose: () => r(!1),
|
|
821
|
+
children: /* @__PURE__ */ L(V, {
|
|
822
822
|
style: K.modalOverlay,
|
|
823
823
|
activeOpacity: 1,
|
|
824
|
-
onPress: () =>
|
|
825
|
-
children: /* @__PURE__ */
|
|
824
|
+
onPress: () => r(!1),
|
|
825
|
+
children: /* @__PURE__ */ R(V, {
|
|
826
826
|
style: [K.modalContent, { backgroundColor: p.card }],
|
|
827
827
|
activeOpacity: 1,
|
|
828
828
|
onPress: () => {},
|
|
829
829
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ R(H, {
|
|
831
831
|
style: [K.modalHeader, { borderBottomColor: p.separator }],
|
|
832
|
-
children: [/* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ L(B, {
|
|
833
833
|
style: [K.modalTitle, { color: p.text }],
|
|
834
|
-
children: d ||
|
|
835
|
-
}), /* @__PURE__ */
|
|
836
|
-
onPress: () =>
|
|
837
|
-
children: /* @__PURE__ */
|
|
834
|
+
children: d || a || m("renderer.defaultInputs.selectDate")
|
|
835
|
+
}), /* @__PURE__ */ L(V, {
|
|
836
|
+
onPress: () => r(!1),
|
|
837
|
+
children: /* @__PURE__ */ L(B, {
|
|
838
838
|
style: [K.closeButton, { color: p.textMuted }],
|
|
839
839
|
children: "✕"
|
|
840
840
|
})
|
|
841
841
|
})]
|
|
842
842
|
}),
|
|
843
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ R(H, {
|
|
844
844
|
style: K.calendarHeader,
|
|
845
845
|
children: [
|
|
846
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ L(V, {
|
|
847
847
|
onPress: ee,
|
|
848
848
|
style: K.navButton,
|
|
849
|
-
children: /* @__PURE__ */
|
|
849
|
+
children: /* @__PURE__ */ L(B, {
|
|
850
850
|
style: [K.navButtonText, { color: p.primary }],
|
|
851
851
|
children: "‹"
|
|
852
852
|
})
|
|
853
853
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ R(B, {
|
|
855
855
|
style: [K.monthYear, { color: p.text }],
|
|
856
856
|
children: [
|
|
857
|
-
w[
|
|
857
|
+
w[x],
|
|
858
858
|
" ",
|
|
859
859
|
y
|
|
860
860
|
]
|
|
861
861
|
}),
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
onPress:
|
|
862
|
+
/* @__PURE__ */ L(V, {
|
|
863
|
+
onPress: D,
|
|
864
864
|
style: K.navButton,
|
|
865
|
-
children: /* @__PURE__ */
|
|
865
|
+
children: /* @__PURE__ */ L(B, {
|
|
866
866
|
style: [K.navButtonText, { color: p.primary }],
|
|
867
867
|
children: "›"
|
|
868
868
|
})
|
|
869
869
|
})
|
|
870
870
|
]
|
|
871
871
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ L(H, {
|
|
873
873
|
style: K.weekDays,
|
|
874
874
|
children: [
|
|
875
875
|
"Sun",
|
|
@@ -879,12 +879,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
879
879
|
"Thu",
|
|
880
880
|
"Fri",
|
|
881
881
|
"Sat"
|
|
882
|
-
].map((e) => /* @__PURE__ */
|
|
882
|
+
].map((e) => /* @__PURE__ */ L(B, {
|
|
883
883
|
style: [K.weekDay, { color: p.textMuted }],
|
|
884
884
|
children: e
|
|
885
885
|
}, e))
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ L(pe, {
|
|
888
888
|
data: T,
|
|
889
889
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
890
890
|
numColumns: 7,
|
|
@@ -892,8 +892,8 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
892
892
|
style: K.calendar,
|
|
893
893
|
contentContainerStyle: K.calendarContent,
|
|
894
894
|
renderItem: ({ item: e }) => {
|
|
895
|
-
let t =
|
|
896
|
-
return /* @__PURE__ */
|
|
895
|
+
let t = k(e.date), n = A(e.date);
|
|
896
|
+
return /* @__PURE__ */ L(V, {
|
|
897
897
|
style: [
|
|
898
898
|
K.dayCell,
|
|
899
899
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
@@ -906,7 +906,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
906
906
|
onPress: () => E(e.date),
|
|
907
907
|
disabled: t,
|
|
908
908
|
activeOpacity: .7,
|
|
909
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ L(B, {
|
|
910
910
|
style: [
|
|
911
911
|
K.dayText,
|
|
912
912
|
{ color: p.text },
|
|
@@ -926,11 +926,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
926
926
|
})
|
|
927
927
|
})
|
|
928
928
|
}),
|
|
929
|
-
u && /* @__PURE__ */
|
|
929
|
+
u && /* @__PURE__ */ L(B, {
|
|
930
930
|
style: [K.error, { color: p.error }],
|
|
931
931
|
children: u
|
|
932
932
|
}),
|
|
933
|
-
f && !u && /* @__PURE__ */
|
|
933
|
+
f && !u && /* @__PURE__ */ L(B, {
|
|
934
934
|
style: [K.helperText, { color: p.textMuted }],
|
|
935
935
|
children: f
|
|
936
936
|
})
|
|
@@ -1031,15 +1031,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1031
1031
|
flexDirection: "row",
|
|
1032
1032
|
marginBottom: 8
|
|
1033
1033
|
}
|
|
1034
|
-
}),
|
|
1035
|
-
let [
|
|
1034
|
+
}), je = ({ field: e, extra: t }) => {
|
|
1035
|
+
let [n, r] = I(!1), [i, a] = I(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, m = o(), { colors: h } = S(), g = Array.isArray(s) ? s : [], _ = g[0] ? new Date(g[0]) : void 0, v = g[1] ? new Date(g[1]) : void 0, { year: y, month: b, today: x } = ce(() => {
|
|
1036
1036
|
let e = _ || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1037
1037
|
return r.setHours(0, 0, 0, 0), {
|
|
1038
1038
|
month: n,
|
|
1039
1039
|
today: r,
|
|
1040
1040
|
year: t
|
|
1041
1041
|
};
|
|
1042
|
-
}, [_]), [C, w] =
|
|
1042
|
+
}, [_]), [C, w] = I(y), [T, E] = I(b), ee = [
|
|
1043
1043
|
"January",
|
|
1044
1044
|
"February",
|
|
1045
1045
|
"March",
|
|
@@ -1052,7 +1052,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1052
1052
|
"October",
|
|
1053
1053
|
"November",
|
|
1054
1054
|
"December"
|
|
1055
|
-
],
|
|
1055
|
+
], D = ce(() => {
|
|
1056
1056
|
let e = new Date(C, T, 1).getDay(), t = new Date(C, T + 1, 0).getDate(), n = new Date(C, T, 0).getDate(), r = [];
|
|
1057
1057
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1058
1058
|
date: new Date(C, T - 1, n - t),
|
|
@@ -1071,32 +1071,32 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1071
1071
|
isCurrentMonth: !1
|
|
1072
1072
|
});
|
|
1073
1073
|
return r;
|
|
1074
|
-
}, [C, T]),
|
|
1075
|
-
l.data.disablePast && e <
|
|
1074
|
+
}, [C, T]), O = oe((e) => {
|
|
1075
|
+
l.data.disablePast && e < x || (i ? (u([e.toISOString(), v?.toISOString()]), a(!1)) : (u(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), r(!1), a(!0)));
|
|
1076
1076
|
}, [
|
|
1077
1077
|
l.data.disablePast,
|
|
1078
|
-
|
|
1079
|
-
|
|
1078
|
+
x,
|
|
1079
|
+
i,
|
|
1080
1080
|
_,
|
|
1081
1081
|
v,
|
|
1082
1082
|
u
|
|
1083
|
-
]),
|
|
1083
|
+
]), k = () => {
|
|
1084
1084
|
T === 0 ? (E(11), w(C - 1)) : E(T - 1);
|
|
1085
|
-
},
|
|
1085
|
+
}, A = () => {
|
|
1086
1086
|
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1087
|
-
},
|
|
1087
|
+
}, j = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : m("renderer.defaultInputs.selectDateRange"), te = (e) => l.data.disablePast ? e < x : !1, ne = (e) => _ && v ? e >= _ && e <= v : !1, re = (e) => {
|
|
1088
1088
|
if (!(_ || v)) return !1;
|
|
1089
1089
|
let t = _ && e.getDate() === _.getDate() && e.getMonth() === _.getMonth() && e.getFullYear() === _.getFullYear(), n = v && e.getDate() === v.getDate() && e.getMonth() === v.getMonth() && e.getFullYear() === v.getFullYear();
|
|
1090
1090
|
return t || n;
|
|
1091
1091
|
};
|
|
1092
|
-
return /* @__PURE__ */
|
|
1092
|
+
return /* @__PURE__ */ R(H, {
|
|
1093
1093
|
style: q.container,
|
|
1094
1094
|
children: [
|
|
1095
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ L(c, {
|
|
1096
1096
|
label: f,
|
|
1097
1097
|
required: l.data.required
|
|
1098
1098
|
}),
|
|
1099
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ R(V, {
|
|
1100
1100
|
style: [
|
|
1101
1101
|
q.trigger,
|
|
1102
1102
|
{
|
|
@@ -1105,67 +1105,67 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1105
1105
|
},
|
|
1106
1106
|
d && { borderColor: h.error }
|
|
1107
1107
|
],
|
|
1108
|
-
onPress: () =>
|
|
1108
|
+
onPress: () => r(!0),
|
|
1109
1109
|
activeOpacity: .7,
|
|
1110
|
-
children: [/* @__PURE__ */
|
|
1110
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1111
1111
|
style: [
|
|
1112
1112
|
q.triggerText,
|
|
1113
1113
|
{ color: h.text },
|
|
1114
1114
|
!_ && { color: h.textMuted }
|
|
1115
1115
|
],
|
|
1116
1116
|
numberOfLines: 1,
|
|
1117
|
-
children:
|
|
1118
|
-
}), /* @__PURE__ */
|
|
1117
|
+
children: j()
|
|
1118
|
+
}), /* @__PURE__ */ L(B, {
|
|
1119
1119
|
style: q.icon,
|
|
1120
1120
|
children: "📅"
|
|
1121
1121
|
})]
|
|
1122
1122
|
}),
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
visible:
|
|
1123
|
+
/* @__PURE__ */ L(he, {
|
|
1124
|
+
visible: n,
|
|
1125
1125
|
transparent: !0,
|
|
1126
1126
|
animationType: "fade",
|
|
1127
|
-
onRequestClose: () =>
|
|
1128
|
-
children: /* @__PURE__ */
|
|
1127
|
+
onRequestClose: () => r(!1),
|
|
1128
|
+
children: /* @__PURE__ */ L(V, {
|
|
1129
1129
|
style: q.modalOverlay,
|
|
1130
1130
|
activeOpacity: 1,
|
|
1131
|
-
onPress: () =>
|
|
1132
|
-
children: /* @__PURE__ */
|
|
1131
|
+
onPress: () => r(!1),
|
|
1132
|
+
children: /* @__PURE__ */ R(V, {
|
|
1133
1133
|
style: [q.modalContent, { backgroundColor: h.card }],
|
|
1134
1134
|
activeOpacity: 1,
|
|
1135
1135
|
onPress: () => {},
|
|
1136
1136
|
children: [
|
|
1137
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ R(H, {
|
|
1138
1138
|
style: [q.modalHeader, { borderBottomColor: h.separator }],
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1139
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1140
1140
|
style: [q.modalTitle, { color: h.text }],
|
|
1141
1141
|
children: f || m("renderer.defaultInputs.selectDateRange")
|
|
1142
|
-
}), /* @__PURE__ */
|
|
1143
|
-
onPress: () =>
|
|
1144
|
-
children: /* @__PURE__ */
|
|
1142
|
+
}), /* @__PURE__ */ L(V, {
|
|
1143
|
+
onPress: () => r(!1),
|
|
1144
|
+
children: /* @__PURE__ */ L(B, {
|
|
1145
1145
|
style: [q.closeButton, { color: h.textMuted }],
|
|
1146
1146
|
children: "✕"
|
|
1147
1147
|
})
|
|
1148
1148
|
})]
|
|
1149
1149
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ L(H, {
|
|
1151
1151
|
style: [q.rangeIndicator, { backgroundColor: h.primaryLight }],
|
|
1152
|
-
children: /* @__PURE__ */
|
|
1152
|
+
children: /* @__PURE__ */ L(B, {
|
|
1153
1153
|
style: [q.rangeIndicatorText, { color: h.primary }],
|
|
1154
|
-
children: m(
|
|
1154
|
+
children: m(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1155
1155
|
})
|
|
1156
1156
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ R(H, {
|
|
1158
1158
|
style: q.calendarHeader,
|
|
1159
1159
|
children: [
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
onPress:
|
|
1160
|
+
/* @__PURE__ */ L(V, {
|
|
1161
|
+
onPress: k,
|
|
1162
1162
|
style: q.navButton,
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1163
|
+
children: /* @__PURE__ */ L(B, {
|
|
1164
1164
|
style: [q.navButtonText, { color: h.primary }],
|
|
1165
1165
|
children: "‹"
|
|
1166
1166
|
})
|
|
1167
1167
|
}),
|
|
1168
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ R(B, {
|
|
1169
1169
|
style: [q.monthYear, { color: h.text }],
|
|
1170
1170
|
children: [
|
|
1171
1171
|
ee[T],
|
|
@@ -1173,17 +1173,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1173
1173
|
C
|
|
1174
1174
|
]
|
|
1175
1175
|
}),
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
onPress:
|
|
1176
|
+
/* @__PURE__ */ L(V, {
|
|
1177
|
+
onPress: A,
|
|
1178
1178
|
style: q.navButton,
|
|
1179
|
-
children: /* @__PURE__ */
|
|
1179
|
+
children: /* @__PURE__ */ L(B, {
|
|
1180
1180
|
style: [q.navButtonText, { color: h.primary }],
|
|
1181
1181
|
children: "›"
|
|
1182
1182
|
})
|
|
1183
1183
|
})
|
|
1184
1184
|
]
|
|
1185
1185
|
}),
|
|
1186
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ L(H, {
|
|
1187
1187
|
style: q.weekDays,
|
|
1188
1188
|
children: [
|
|
1189
1189
|
"Sun",
|
|
@@ -1193,21 +1193,21 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1193
1193
|
"Thu",
|
|
1194
1194
|
"Fri",
|
|
1195
1195
|
"Sat"
|
|
1196
|
-
].map((e) => /* @__PURE__ */
|
|
1196
|
+
].map((e) => /* @__PURE__ */ L(B, {
|
|
1197
1197
|
style: [q.weekDay, { color: h.textMuted }],
|
|
1198
1198
|
children: e
|
|
1199
1199
|
}, e))
|
|
1200
1200
|
}),
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
data:
|
|
1201
|
+
/* @__PURE__ */ L(pe, {
|
|
1202
|
+
data: D,
|
|
1203
1203
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1204
1204
|
numColumns: 7,
|
|
1205
1205
|
scrollEnabled: !1,
|
|
1206
1206
|
style: q.calendar,
|
|
1207
1207
|
contentContainerStyle: q.calendarContent,
|
|
1208
1208
|
renderItem: ({ item: e }) => {
|
|
1209
|
-
let t =
|
|
1210
|
-
return /* @__PURE__ */
|
|
1209
|
+
let t = te(e.date), n = ne(e.date), r = re(e.date);
|
|
1210
|
+
return /* @__PURE__ */ L(V, {
|
|
1211
1211
|
style: [
|
|
1212
1212
|
q.dayCell,
|
|
1213
1213
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
@@ -1218,10 +1218,10 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1218
1218
|
},
|
|
1219
1219
|
t && q.dayCellDisabled
|
|
1220
1220
|
],
|
|
1221
|
-
onPress: () =>
|
|
1221
|
+
onPress: () => O(e.date),
|
|
1222
1222
|
disabled: t,
|
|
1223
1223
|
activeOpacity: .7,
|
|
1224
|
-
children: /* @__PURE__ */
|
|
1224
|
+
children: /* @__PURE__ */ L(B, {
|
|
1225
1225
|
style: [
|
|
1226
1226
|
q.dayText,
|
|
1227
1227
|
{ color: h.text },
|
|
@@ -1242,11 +1242,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1242
1242
|
})
|
|
1243
1243
|
})
|
|
1244
1244
|
}),
|
|
1245
|
-
d && /* @__PURE__ */
|
|
1245
|
+
d && /* @__PURE__ */ L(B, {
|
|
1246
1246
|
style: [q.error, { color: h.error }],
|
|
1247
1247
|
children: d
|
|
1248
1248
|
}),
|
|
1249
|
-
p && !d && /* @__PURE__ */
|
|
1249
|
+
p && !d && /* @__PURE__ */ L(B, {
|
|
1250
1250
|
style: [q.helperText, { color: h.textMuted }],
|
|
1251
1251
|
children: p
|
|
1252
1252
|
})
|
|
@@ -1357,10 +1357,10 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1357
1357
|
flexDirection: "row",
|
|
1358
1358
|
marginBottom: 8
|
|
1359
1359
|
}
|
|
1360
|
-
}),
|
|
1361
|
-
let [
|
|
1362
|
-
if (
|
|
1363
|
-
let e = (await
|
|
1360
|
+
}), Me = ({ field: e, extra: t }) => {
|
|
1361
|
+
let [n, r] = I(null), [i, a] = I(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, { colors: m } = S(), h = o(), _ = g(s), v = l.data.multiple, y = oe(async () => {
|
|
1362
|
+
if (n) try {
|
|
1363
|
+
let e = (await n({ allowMultiSelection: v })).map((e) => ({
|
|
1364
1364
|
data: e.uri,
|
|
1365
1365
|
lastModified: Date.now(),
|
|
1366
1366
|
name: e.name,
|
|
@@ -1369,116 +1369,116 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1369
1369
|
}));
|
|
1370
1370
|
u(v ? [..._, ...e] : e[0] || null);
|
|
1371
1371
|
} catch (e) {
|
|
1372
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1372
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && de.alert("Error", h("renderer.defaultInputs.filePickerError"));
|
|
1373
1373
|
}
|
|
1374
1374
|
}, [
|
|
1375
|
-
|
|
1375
|
+
n,
|
|
1376
1376
|
_,
|
|
1377
1377
|
v,
|
|
1378
1378
|
u,
|
|
1379
|
-
|
|
1380
|
-
]), b =
|
|
1379
|
+
h
|
|
1380
|
+
]), b = oe((e) => {
|
|
1381
1381
|
let t = _.filter((t, n) => n !== e);
|
|
1382
1382
|
u(t.length > 0 ? t : null);
|
|
1383
1383
|
}, [_, u]);
|
|
1384
|
-
return
|
|
1384
|
+
return se(() => {
|
|
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__ */ R(H, {
|
|
1396
1396
|
style: J.container,
|
|
1397
1397
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
label:
|
|
1398
|
+
/* @__PURE__ */ L(c, {
|
|
1399
|
+
label: f,
|
|
1400
1400
|
required: l.data.required
|
|
1401
1401
|
}),
|
|
1402
|
-
_.length > 0 && /* @__PURE__ */
|
|
1402
|
+
_.length > 0 && /* @__PURE__ */ L(H, {
|
|
1403
1403
|
style: J.filesList,
|
|
1404
|
-
children: _.map((e, t) => /* @__PURE__ */
|
|
1404
|
+
children: _.map((e, t) => /* @__PURE__ */ R(H, {
|
|
1405
1405
|
style: [J.fileItem, {
|
|
1406
|
-
backgroundColor:
|
|
1407
|
-
borderColor:
|
|
1406
|
+
backgroundColor: m.card,
|
|
1407
|
+
borderColor: m.separator
|
|
1408
1408
|
}],
|
|
1409
1409
|
children: [
|
|
1410
|
-
/* @__PURE__ */
|
|
1411
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ L(H, {
|
|
1411
|
+
style: [J.fileIcon, { backgroundColor: m.muted }],
|
|
1412
|
+
children: /* @__PURE__ */ L(B, {
|
|
1413
1413
|
style: J.fileIconText,
|
|
1414
1414
|
children: "📄"
|
|
1415
1415
|
})
|
|
1416
1416
|
}),
|
|
1417
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ R(H, {
|
|
1418
1418
|
style: J.fileInfo,
|
|
1419
|
-
children: [/* @__PURE__ */
|
|
1420
|
-
style: [J.fileName, { color:
|
|
1419
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1420
|
+
style: [J.fileName, { color: m.text }],
|
|
1421
1421
|
numberOfLines: 1,
|
|
1422
1422
|
children: e.name
|
|
1423
|
-
}), e.size > 0 && /* @__PURE__ */
|
|
1424
|
-
style: [J.fileSize, { color:
|
|
1425
|
-
children:
|
|
1423
|
+
}), e.size > 0 && /* @__PURE__ */ L(B, {
|
|
1424
|
+
style: [J.fileSize, { color: m.textMuted }],
|
|
1425
|
+
children: D(e.size)
|
|
1426
1426
|
})]
|
|
1427
1427
|
}),
|
|
1428
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ L(V, {
|
|
1429
1429
|
style: J.removeButton,
|
|
1430
1430
|
onPress: () => b(t),
|
|
1431
1431
|
activeOpacity: .7,
|
|
1432
|
-
accessibilityLabel:
|
|
1433
|
-
children: /* @__PURE__ */
|
|
1434
|
-
style: [J.removeButtonText, { color:
|
|
1432
|
+
accessibilityLabel: h("renderer.defaultInputs.removeFile"),
|
|
1433
|
+
children: /* @__PURE__ */ L(B, {
|
|
1434
|
+
style: [J.removeButtonText, { color: m.textMuted }],
|
|
1435
1435
|
children: "✕"
|
|
1436
1436
|
})
|
|
1437
1437
|
})
|
|
1438
1438
|
]
|
|
1439
1439
|
}, `${e.name}-${t}`))
|
|
1440
1440
|
}),
|
|
1441
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ L(V, {
|
|
1442
1442
|
style: [J.pickButton, {
|
|
1443
|
-
backgroundColor:
|
|
1444
|
-
borderColor:
|
|
1443
|
+
backgroundColor: m.input,
|
|
1444
|
+
borderColor: m.border
|
|
1445
1445
|
}],
|
|
1446
1446
|
onPress: y,
|
|
1447
1447
|
activeOpacity: .7,
|
|
1448
|
-
children: /* @__PURE__ */
|
|
1449
|
-
style: [J.pickButtonText, { color:
|
|
1450
|
-
children: _.length === 0 ?
|
|
1448
|
+
children: /* @__PURE__ */ L(B, {
|
|
1449
|
+
style: [J.pickButtonText, { color: m.textMuted }],
|
|
1450
|
+
children: _.length === 0 ? h(v ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : h(v ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1451
1451
|
})
|
|
1452
1452
|
}),
|
|
1453
|
-
|
|
1454
|
-
style: [J.error, { color:
|
|
1455
|
-
children:
|
|
1453
|
+
d && /* @__PURE__ */ L(B, {
|
|
1454
|
+
style: [J.error, { color: m.error }],
|
|
1455
|
+
children: d
|
|
1456
1456
|
}),
|
|
1457
|
-
|
|
1458
|
-
style: [J.helperText, { color:
|
|
1459
|
-
children:
|
|
1457
|
+
p && !d && /* @__PURE__ */ L(B, {
|
|
1458
|
+
style: [J.helperText, { color: m.textMuted }],
|
|
1459
|
+
children: p
|
|
1460
1460
|
})
|
|
1461
1461
|
]
|
|
1462
|
-
}) : /* @__PURE__ */
|
|
1462
|
+
}) : /* @__PURE__ */ R(H, {
|
|
1463
1463
|
style: J.container,
|
|
1464
1464
|
children: [
|
|
1465
|
-
/* @__PURE__ */
|
|
1466
|
-
label:
|
|
1465
|
+
/* @__PURE__ */ L(c, {
|
|
1466
|
+
label: f,
|
|
1467
1467
|
required: l.data.required
|
|
1468
1468
|
}),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ L(H, {
|
|
1470
1470
|
style: [J.unavailableContainer, {
|
|
1471
|
-
backgroundColor:
|
|
1472
|
-
borderColor:
|
|
1471
|
+
backgroundColor: m.errorLight,
|
|
1472
|
+
borderColor: m.error
|
|
1473
1473
|
}],
|
|
1474
|
-
children: /* @__PURE__ */
|
|
1475
|
-
style: [J.unavailableText, { color:
|
|
1476
|
-
children:
|
|
1474
|
+
children: /* @__PURE__ */ L(B, {
|
|
1475
|
+
style: [J.unavailableText, { color: m.error }],
|
|
1476
|
+
children: h("renderer.defaultInputs.filePickerUnavailable")
|
|
1477
1477
|
})
|
|
1478
1478
|
}),
|
|
1479
|
-
|
|
1480
|
-
style: [J.helperText, { color:
|
|
1481
|
-
children:
|
|
1479
|
+
p && /* @__PURE__ */ L(B, {
|
|
1480
|
+
style: [J.helperText, { color: m.textMuted }],
|
|
1481
|
+
children: p
|
|
1482
1482
|
})
|
|
1483
1483
|
]
|
|
1484
1484
|
});
|
|
@@ -1546,15 +1546,15 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1546
1546
|
fontSize: 12,
|
|
1547
1547
|
textAlign: "center"
|
|
1548
1548
|
}
|
|
1549
|
-
}),
|
|
1550
|
-
let
|
|
1551
|
-
return /* @__PURE__ */
|
|
1552
|
-
style:
|
|
1553
|
-
children: [/* @__PURE__ */
|
|
1554
|
-
style: [
|
|
1555
|
-
children:
|
|
1556
|
-
}), e.map((e) => /* @__PURE__ */
|
|
1557
|
-
style: [
|
|
1549
|
+
}), Ne = (e) => null, Pe = ({ missing: e, children: t }) => {
|
|
1550
|
+
let n = o(), { colors: r } = S();
|
|
1551
|
+
return /* @__PURE__ */ R(le, { children: [t, e.length > 0 && /* @__PURE__ */ R(H, {
|
|
1552
|
+
style: Fe.container,
|
|
1553
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1554
|
+
style: [Fe.title, { color: r.textMuted }],
|
|
1555
|
+
children: n("renderer.dependencyHint.title")
|
|
1556
|
+
}), e.map((e) => /* @__PURE__ */ R(B, {
|
|
1557
|
+
style: [Fe.item, { color: r.textMuted }],
|
|
1558
1558
|
children: [
|
|
1559
1559
|
"•",
|
|
1560
1560
|
" ",
|
|
@@ -1562,7 +1562,7 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1562
1562
|
]
|
|
1563
1563
|
}, e.id))]
|
|
1564
1564
|
})] });
|
|
1565
|
-
},
|
|
1565
|
+
}, Fe = z.create({
|
|
1566
1566
|
container: {
|
|
1567
1567
|
gap: 2,
|
|
1568
1568
|
marginTop: 4
|
|
@@ -1572,174 +1572,174 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1572
1572
|
fontSize: 12,
|
|
1573
1573
|
fontWeight: "500"
|
|
1574
1574
|
}
|
|
1575
|
-
}),
|
|
1575
|
+
}), Ie = (e) => {
|
|
1576
1576
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1577
1577
|
return Array.from(t, (e) => e[1]);
|
|
1578
|
-
},
|
|
1578
|
+
}, Le = (e, t) => Ie(e).every((e) => {
|
|
1579
1579
|
let n = t[e];
|
|
1580
1580
|
return n != null && n !== "";
|
|
1581
|
-
}),
|
|
1581
|
+
}), Re = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1582
1582
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1583
1583
|
return n ? encodeURIComponent(a) : a;
|
|
1584
|
-
}),
|
|
1585
|
-
let [
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
]),
|
|
1584
|
+
}), ze = ({ field: e, extra: f }) => {
|
|
1585
|
+
let [p, m] = I(!1), [h, g] = I(null), [_, v] = I([]), [y, b] = I(""), [x, C] = I(!1), { value: w, placeholder: E } = e, { InputLabel: ee, node: D, setValue: O, error: k, label: A, helperText: j, missingDependencies: te } = f, { formValues: ne, inputNodes: re, headers: ie, baseUrl: ae } = a(), { colors: M } = S(), { httpConfig: N } = D.data, P = o(), le = F(!1), de = F(!1), fe = F(""), me = F(N), ge = F(ne), z = F(re), _e = F(ie), ye = F(ae), be = F(O), xe = F(null), Se = F(null), Ce = F(D.data.normalizeOptionLabels !== !1), we = ce(() => N?.url ? Ie(N.url) : [], [N?.url]), Te = we.length > 0, U = ce(() => we.map((e) => `${e}:${String(ne[e] ?? "")}`).join("|"), [we, ne]), De = ce(() => N?.url ? Te ? Le(N.url, ne) : !0 : !1, [
|
|
1586
|
+
N?.url,
|
|
1587
|
+
Te,
|
|
1588
|
+
ne
|
|
1589
|
+
]), Oe = oe(async (e) => {
|
|
1590
1590
|
Se.current && Se.current.abort();
|
|
1591
|
-
let
|
|
1592
|
-
Se.current =
|
|
1593
|
-
let o =
|
|
1591
|
+
let a = new AbortController();
|
|
1592
|
+
Se.current = a;
|
|
1593
|
+
let o = me.current, f = ge.current, p = be.current;
|
|
1594
1594
|
if (!o?.url) {
|
|
1595
|
-
|
|
1595
|
+
g(P("renderer.defaultHttpInput.noUrlConfigured")), Se.current = null;
|
|
1596
1596
|
return;
|
|
1597
1597
|
}
|
|
1598
|
-
if (o.url && !
|
|
1598
|
+
if (o.url && !Le(o.url, f)) {
|
|
1599
1599
|
Se.current = null;
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
|
-
|
|
1602
|
+
m(!0), g(null);
|
|
1603
1603
|
try {
|
|
1604
|
-
let
|
|
1604
|
+
let m = l(Re(o.url, f, !0), ye.current), h = r(o.searchParam && e ? `${m}${m.includes("?") ? "&" : "?"}${o.searchParam}=${encodeURIComponent(e)}` : m, s(o.queryParams, f)), _ = t({ "Content-Type": "application/json" }, s(_e.current, f), s(o.headers, f)), y = [
|
|
1605
1605
|
"POST",
|
|
1606
1606
|
"PUT",
|
|
1607
1607
|
"PATCH"
|
|
1608
|
-
].includes(o.method || "") ? o.sendAllFormValues ? JSON.stringify(
|
|
1609
|
-
body:
|
|
1610
|
-
headers: Object.fromEntries(Object.entries(
|
|
1608
|
+
].includes(o.method || "") ? o.sendAllFormValues ? JSON.stringify(T(f, z.current)) : d(o.body, f, z.current) : void 0, b = setTimeout(() => a.abort(), 3e4), x = await fetch(h, {
|
|
1609
|
+
body: y || void 0,
|
|
1610
|
+
headers: Object.fromEntries(Object.entries(_).filter(([, e]) => e)),
|
|
1611
1611
|
method: o.method || "GET",
|
|
1612
|
-
signal:
|
|
1612
|
+
signal: a.signal
|
|
1613
1613
|
});
|
|
1614
|
-
if (clearTimeout(
|
|
1615
|
-
|
|
1614
|
+
if (clearTimeout(b), !x.ok) {
|
|
1615
|
+
g(`HTTP Error ${x.status}: ${x.statusText}`);
|
|
1616
1616
|
return;
|
|
1617
1617
|
}
|
|
1618
|
-
let
|
|
1619
|
-
if (!
|
|
1620
|
-
|
|
1618
|
+
let S = i(await x.text());
|
|
1619
|
+
if (!S.ok) {
|
|
1620
|
+
g(P("renderer.defaultHttpInput.invalidJson"));
|
|
1621
1621
|
return;
|
|
1622
1622
|
}
|
|
1623
|
-
let
|
|
1624
|
-
if (o.responseMapping && Array.isArray(
|
|
1625
|
-
let { valueField: e = "value", labelField:
|
|
1626
|
-
|
|
1627
|
-
let
|
|
1623
|
+
let C = n(S.value), w = o.responsePath ? c(C, o.responsePath) : C;
|
|
1624
|
+
if (o.responseMapping && Array.isArray(w)) {
|
|
1625
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = o.responseMapping, i = Ce.current;
|
|
1626
|
+
v(w.map((a) => {
|
|
1627
|
+
let o = n ? c(a, n) : void 0, s = r ? c(a, r) : void 0, l = String(c(a, t) || "");
|
|
1628
1628
|
return {
|
|
1629
|
-
description:
|
|
1630
|
-
image: typeof
|
|
1631
|
-
label:
|
|
1632
|
-
value: String(
|
|
1629
|
+
description: o != null && o !== "" ? String(o) : void 0,
|
|
1630
|
+
image: typeof s == "string" && s !== "" ? s : void 0,
|
|
1631
|
+
label: i ? u(l) : l,
|
|
1632
|
+
value: String(c(a, e) || "")
|
|
1633
1633
|
};
|
|
1634
1634
|
}));
|
|
1635
|
-
} else
|
|
1635
|
+
} else p(typeof w == "string" ? w : JSON.stringify(w));
|
|
1636
1636
|
} catch (e) {
|
|
1637
1637
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1638
|
-
|
|
1638
|
+
g(e instanceof Error ? e.message : P("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1639
1639
|
} finally {
|
|
1640
|
-
Se.current ===
|
|
1640
|
+
Se.current === a && (m(!1), Se.current = null);
|
|
1641
1641
|
}
|
|
1642
|
-
}, [
|
|
1643
|
-
if (
|
|
1644
|
-
|
|
1642
|
+
}, [P]);
|
|
1643
|
+
if (se(() => {
|
|
1644
|
+
me.current = N, ge.current = ne, z.current = re, _e.current = ie, ye.current = ae, be.current = O, xe.current = Oe, Ce.current = D.data.normalizeOptionLabels !== !1;
|
|
1645
1645
|
}, [
|
|
1646
|
-
|
|
1646
|
+
N,
|
|
1647
|
+
ne,
|
|
1648
|
+
re,
|
|
1647
1649
|
ie,
|
|
1648
1650
|
ae,
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
]),
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
}, []), M(() => {
|
|
1662
|
-
if (!ue.current || !U || pe.current === Ee || !De) return;
|
|
1651
|
+
O,
|
|
1652
|
+
Oe,
|
|
1653
|
+
D.data.normalizeOptionLabels
|
|
1654
|
+
]), se(() => () => {
|
|
1655
|
+
Se.current && Se.current.abort(), le.current = !1, de.current = !1;
|
|
1656
|
+
}, []), se(() => {
|
|
1657
|
+
if (le.current) return;
|
|
1658
|
+
le.current = !0;
|
|
1659
|
+
let e = me.current, t = ge.current, n = xe.current, r = e?.url && Le(e.url, t);
|
|
1660
|
+
e?.fetchOnMount && r && n && (n(), e.url && (fe.current = Ie(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1661
|
+
}, []), se(() => {
|
|
1662
|
+
if (!le.current || !Te || fe.current === U || !De) return;
|
|
1663
1663
|
let e = setTimeout(() => {
|
|
1664
|
-
|
|
1664
|
+
Oe(), fe.current = U;
|
|
1665
1665
|
}, 500);
|
|
1666
1666
|
return () => clearTimeout(e);
|
|
1667
1667
|
}, [
|
|
1668
|
-
Ee,
|
|
1669
1668
|
U,
|
|
1669
|
+
Te,
|
|
1670
1670
|
De,
|
|
1671
|
-
|
|
1672
|
-
]),
|
|
1671
|
+
Oe
|
|
1672
|
+
]), se(() => {
|
|
1673
1673
|
if (!de.current) {
|
|
1674
1674
|
de.current = !0;
|
|
1675
1675
|
return;
|
|
1676
1676
|
}
|
|
1677
|
-
let e =
|
|
1678
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1679
|
-
}, [
|
|
1680
|
-
body:
|
|
1681
|
-
fetchOnMount:
|
|
1682
|
-
headers:
|
|
1683
|
-
method:
|
|
1684
|
-
queryParams:
|
|
1685
|
-
responseMapping:
|
|
1686
|
-
responsePath:
|
|
1687
|
-
searchParam:
|
|
1688
|
-
sendAllFormValues:
|
|
1689
|
-
url:
|
|
1690
|
-
}), [
|
|
1691
|
-
if (!(
|
|
1677
|
+
let e = me.current, t = ge.current, n = xe.current, r = e?.url && Le(e.url, t);
|
|
1678
|
+
e?.fetchOnMount && r && n && (n(), e.url && (fe.current = Ie(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1679
|
+
}, [ce(() => JSON.stringify({
|
|
1680
|
+
body: N?.body,
|
|
1681
|
+
fetchOnMount: N?.fetchOnMount,
|
|
1682
|
+
headers: N?.headers,
|
|
1683
|
+
method: N?.method,
|
|
1684
|
+
queryParams: N?.queryParams,
|
|
1685
|
+
responseMapping: N?.responseMapping,
|
|
1686
|
+
responsePath: N?.responsePath,
|
|
1687
|
+
searchParam: N?.searchParam,
|
|
1688
|
+
sendAllFormValues: N?.sendAllFormValues,
|
|
1689
|
+
url: N?.url
|
|
1690
|
+
}), [N])]), se(() => {
|
|
1691
|
+
if (!(N?.searchParam && y)) return;
|
|
1692
1692
|
let e = setTimeout(() => {
|
|
1693
|
-
|
|
1693
|
+
Oe(y);
|
|
1694
1694
|
}, 300);
|
|
1695
1695
|
return () => clearTimeout(e);
|
|
1696
1696
|
}, [
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
]),
|
|
1701
|
-
let e = Array.isArray(
|
|
1702
|
-
if (
|
|
1703
|
-
let n =
|
|
1704
|
-
return /* @__PURE__ */
|
|
1697
|
+
y,
|
|
1698
|
+
N?.searchParam,
|
|
1699
|
+
Oe
|
|
1700
|
+
]), N?.responseMapping) {
|
|
1701
|
+
let e = Array.isArray(w) ? w[0] : w, t = _.find((t) => t.value === e);
|
|
1702
|
+
if (N.searchParam) {
|
|
1703
|
+
let n = p && N?.showLoading;
|
|
1704
|
+
return /* @__PURE__ */ R(H, {
|
|
1705
1705
|
style: Y.container,
|
|
1706
1706
|
children: [
|
|
1707
|
-
/* @__PURE__ */
|
|
1708
|
-
label:
|
|
1709
|
-
required:
|
|
1707
|
+
/* @__PURE__ */ L(ee, {
|
|
1708
|
+
label: A,
|
|
1709
|
+
required: D.data.required
|
|
1710
1710
|
}),
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
missing:
|
|
1713
|
-
children: /* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ L(Pe, {
|
|
1712
|
+
missing: te,
|
|
1713
|
+
children: /* @__PURE__ */ R(V, {
|
|
1714
1714
|
style: [
|
|
1715
1715
|
Y.trigger,
|
|
1716
1716
|
{
|
|
1717
|
-
backgroundColor:
|
|
1718
|
-
borderColor:
|
|
1717
|
+
backgroundColor: M.input,
|
|
1718
|
+
borderColor: M.border
|
|
1719
1719
|
},
|
|
1720
|
-
|
|
1721
|
-
|
|
1720
|
+
k && { borderColor: M.error },
|
|
1721
|
+
te.length > 0 && { backgroundColor: M.muted }
|
|
1722
1722
|
],
|
|
1723
|
-
onPress: () =>
|
|
1724
|
-
disabled:
|
|
1723
|
+
onPress: () => C(!0),
|
|
1724
|
+
disabled: te.length > 0,
|
|
1725
1725
|
activeOpacity: .7,
|
|
1726
1726
|
children: [
|
|
1727
|
-
/* @__PURE__ */
|
|
1727
|
+
/* @__PURE__ */ L(B, {
|
|
1728
1728
|
style: [
|
|
1729
1729
|
Y.triggerText,
|
|
1730
|
-
{ color:
|
|
1731
|
-
!t && { color:
|
|
1730
|
+
{ color: M.text },
|
|
1731
|
+
!t && { color: M.textMuted }
|
|
1732
1732
|
],
|
|
1733
1733
|
numberOfLines: 1,
|
|
1734
|
-
children: t?.label ||
|
|
1734
|
+
children: t?.label || E || P("renderer.defaultHttpInput.search")
|
|
1735
1735
|
}),
|
|
1736
|
-
n && /* @__PURE__ */
|
|
1736
|
+
n && /* @__PURE__ */ L(ue, {
|
|
1737
1737
|
size: "small",
|
|
1738
|
-
color:
|
|
1738
|
+
color: M.primary,
|
|
1739
1739
|
style: Y.triggerLoader
|
|
1740
1740
|
}),
|
|
1741
|
-
e ? /* @__PURE__ */
|
|
1742
|
-
onPress: () =>
|
|
1741
|
+
e ? /* @__PURE__ */ L(V, {
|
|
1742
|
+
onPress: () => O(""),
|
|
1743
1743
|
hitSlop: {
|
|
1744
1744
|
bottom: 8,
|
|
1745
1745
|
left: 8,
|
|
@@ -1747,109 +1747,109 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1747
1747
|
top: 8
|
|
1748
1748
|
},
|
|
1749
1749
|
style: Y.clearButton,
|
|
1750
|
-
children: /* @__PURE__ */
|
|
1751
|
-
style: [Y.clearIcon, { color:
|
|
1750
|
+
children: /* @__PURE__ */ L(B, {
|
|
1751
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1752
1752
|
children: "✕"
|
|
1753
1753
|
})
|
|
1754
1754
|
}) : null,
|
|
1755
|
-
/* @__PURE__ */
|
|
1756
|
-
style: [Y.arrow, { color:
|
|
1755
|
+
/* @__PURE__ */ L(B, {
|
|
1756
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1757
1757
|
children: "▼"
|
|
1758
1758
|
})
|
|
1759
1759
|
]
|
|
1760
1760
|
})
|
|
1761
1761
|
}),
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
visible:
|
|
1762
|
+
/* @__PURE__ */ L(he, {
|
|
1763
|
+
visible: x,
|
|
1764
1764
|
transparent: !0,
|
|
1765
1765
|
animationType: "fade",
|
|
1766
|
-
onRequestClose: () =>
|
|
1767
|
-
children: /* @__PURE__ */
|
|
1766
|
+
onRequestClose: () => C(!1),
|
|
1767
|
+
children: /* @__PURE__ */ L(V, {
|
|
1768
1768
|
style: Y.modalOverlay,
|
|
1769
1769
|
activeOpacity: 1,
|
|
1770
|
-
onPress: () =>
|
|
1771
|
-
children: /* @__PURE__ */
|
|
1772
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1770
|
+
onPress: () => C(!1),
|
|
1771
|
+
children: /* @__PURE__ */ R(V, {
|
|
1772
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1773
1773
|
activeOpacity: 1,
|
|
1774
1774
|
onPress: () => {},
|
|
1775
1775
|
children: [
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1778
|
-
children: [/* @__PURE__ */
|
|
1779
|
-
style: [Y.modalTitle, { color:
|
|
1780
|
-
children:
|
|
1781
|
-
}), /* @__PURE__ */
|
|
1782
|
-
onPress: () =>
|
|
1783
|
-
children: /* @__PURE__ */
|
|
1784
|
-
style: [Y.closeButton, { color:
|
|
1776
|
+
/* @__PURE__ */ R(H, {
|
|
1777
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1778
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1779
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1780
|
+
children: A || E || P("renderer.defaultHttpInput.search")
|
|
1781
|
+
}), /* @__PURE__ */ L(V, {
|
|
1782
|
+
onPress: () => C(!1),
|
|
1783
|
+
children: /* @__PURE__ */ L(B, {
|
|
1784
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1785
1785
|
children: "✕"
|
|
1786
1786
|
})
|
|
1787
1787
|
})]
|
|
1788
1788
|
}),
|
|
1789
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ L(H, {
|
|
1790
1790
|
style: Y.searchContainer,
|
|
1791
|
-
children: /* @__PURE__ */
|
|
1791
|
+
children: /* @__PURE__ */ L(ve, {
|
|
1792
1792
|
style: [Y.searchInput, {
|
|
1793
|
-
backgroundColor:
|
|
1794
|
-
borderColor:
|
|
1795
|
-
color:
|
|
1793
|
+
backgroundColor: M.muted,
|
|
1794
|
+
borderColor: M.border,
|
|
1795
|
+
color: M.text
|
|
1796
1796
|
}],
|
|
1797
|
-
placeholder:
|
|
1798
|
-
placeholderTextColor:
|
|
1799
|
-
value:
|
|
1797
|
+
placeholder: P("renderer.defaultHttpInput.search"),
|
|
1798
|
+
placeholderTextColor: M.textMuted,
|
|
1799
|
+
value: y,
|
|
1800
1800
|
onChangeText: (e) => {
|
|
1801
|
-
|
|
1801
|
+
b(e), g(null);
|
|
1802
1802
|
},
|
|
1803
1803
|
autoFocus: !0,
|
|
1804
1804
|
autoCapitalize: "none",
|
|
1805
1805
|
autoCorrect: !1
|
|
1806
1806
|
})
|
|
1807
1807
|
}),
|
|
1808
|
-
|
|
1808
|
+
p ? /* @__PURE__ */ L(H, {
|
|
1809
1809
|
style: Y.loadingContainer,
|
|
1810
|
-
children: /* @__PURE__ */
|
|
1810
|
+
children: /* @__PURE__ */ L(ue, {
|
|
1811
1811
|
size: "small",
|
|
1812
|
-
color:
|
|
1812
|
+
color: M.primary
|
|
1813
1813
|
})
|
|
1814
|
-
}) :
|
|
1814
|
+
}) : h ? /* @__PURE__ */ R(H, {
|
|
1815
1815
|
style: Y.errorContainer,
|
|
1816
|
-
children: [/* @__PURE__ */
|
|
1817
|
-
style: [Y.errorText, { color:
|
|
1818
|
-
children:
|
|
1819
|
-
}), /* @__PURE__ */
|
|
1820
|
-
onPress: () =>
|
|
1816
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1817
|
+
style: [Y.errorText, { color: M.error }],
|
|
1818
|
+
children: h
|
|
1819
|
+
}), /* @__PURE__ */ L(V, {
|
|
1820
|
+
onPress: () => Oe(y),
|
|
1821
1821
|
style: Y.retryButton,
|
|
1822
|
-
children: /* @__PURE__ */
|
|
1823
|
-
style: [Y.retryButtonText, { color:
|
|
1824
|
-
children:
|
|
1822
|
+
children: /* @__PURE__ */ L(B, {
|
|
1823
|
+
style: [Y.retryButtonText, { color: M.primary }],
|
|
1824
|
+
children: P("renderer.defaultHttpInput.retry")
|
|
1825
1825
|
})
|
|
1826
1826
|
})]
|
|
1827
|
-
}) : /* @__PURE__ */
|
|
1828
|
-
data:
|
|
1827
|
+
}) : /* @__PURE__ */ L(pe, {
|
|
1828
|
+
data: _,
|
|
1829
1829
|
keyExtractor: (e) => e.value,
|
|
1830
1830
|
style: Y.optionsList,
|
|
1831
1831
|
contentContainerStyle: Y.optionsListContent,
|
|
1832
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1832
|
+
ListEmptyComponent: /* @__PURE__ */ L(H, {
|
|
1833
1833
|
style: Y.emptyContainer,
|
|
1834
|
-
children: /* @__PURE__ */
|
|
1835
|
-
style: [Y.emptyText, { color:
|
|
1836
|
-
children:
|
|
1834
|
+
children: /* @__PURE__ */ L(B, {
|
|
1835
|
+
style: [Y.emptyText, { color: M.textMuted }],
|
|
1836
|
+
children: P("renderer.defaultHttpInput.noResults")
|
|
1837
1837
|
})
|
|
1838
1838
|
}),
|
|
1839
1839
|
renderItem: ({ item: t }) => {
|
|
1840
1840
|
let n = t.value === e;
|
|
1841
|
-
return /* @__PURE__ */
|
|
1842
|
-
style: [Y.option, n && { backgroundColor:
|
|
1841
|
+
return /* @__PURE__ */ R(V, {
|
|
1842
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1843
1843
|
onPress: () => {
|
|
1844
|
-
|
|
1844
|
+
O(t.value), C(!1);
|
|
1845
1845
|
},
|
|
1846
1846
|
activeOpacity: .7,
|
|
1847
|
-
children: [/* @__PURE__ */
|
|
1847
|
+
children: [/* @__PURE__ */ L(Ee, {
|
|
1848
1848
|
label: t.label,
|
|
1849
1849
|
description: t.description,
|
|
1850
1850
|
image: t.image
|
|
1851
|
-
}), n && /* @__PURE__ */
|
|
1852
|
-
style: [Y.checkmark, { color:
|
|
1851
|
+
}), n && /* @__PURE__ */ L(B, {
|
|
1852
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1853
1853
|
children: "✓"
|
|
1854
1854
|
})]
|
|
1855
1855
|
});
|
|
@@ -1859,57 +1859,57 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1859
1859
|
})
|
|
1860
1860
|
})
|
|
1861
1861
|
}),
|
|
1862
|
-
|
|
1863
|
-
style: [Y.error, { color:
|
|
1864
|
-
children: D
|
|
1865
|
-
}),
|
|
1866
|
-
k && !D && /* @__PURE__ */ I(B, {
|
|
1867
|
-
style: [Y.helperText, { color: A.textMuted }],
|
|
1862
|
+
k && /* @__PURE__ */ L(B, {
|
|
1863
|
+
style: [Y.error, { color: M.error }],
|
|
1868
1864
|
children: k
|
|
1865
|
+
}),
|
|
1866
|
+
j && !k && /* @__PURE__ */ L(B, {
|
|
1867
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
1868
|
+
children: j
|
|
1869
1869
|
})
|
|
1870
1870
|
]
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
|
-
let n =
|
|
1874
|
-
return /* @__PURE__ */
|
|
1873
|
+
let n = p && N?.showLoading, r = te.length === 0 && _.length === 0 && !n ? h ?? P("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1874
|
+
return /* @__PURE__ */ R(H, {
|
|
1875
1875
|
style: Y.container,
|
|
1876
1876
|
children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
label:
|
|
1879
|
-
required:
|
|
1877
|
+
/* @__PURE__ */ L(ee, {
|
|
1878
|
+
label: A,
|
|
1879
|
+
required: D.data.required
|
|
1880
1880
|
}),
|
|
1881
|
-
/* @__PURE__ */
|
|
1882
|
-
missing:
|
|
1883
|
-
children: /* @__PURE__ */
|
|
1881
|
+
/* @__PURE__ */ L(Pe, {
|
|
1882
|
+
missing: te,
|
|
1883
|
+
children: /* @__PURE__ */ R(V, {
|
|
1884
1884
|
style: [
|
|
1885
1885
|
Y.trigger,
|
|
1886
1886
|
{
|
|
1887
|
-
backgroundColor:
|
|
1888
|
-
borderColor:
|
|
1887
|
+
backgroundColor: M.input,
|
|
1888
|
+
borderColor: M.border
|
|
1889
1889
|
},
|
|
1890
|
-
|
|
1891
|
-
(n ||
|
|
1890
|
+
k && { borderColor: M.error },
|
|
1891
|
+
(n || _.length === 0) && { backgroundColor: M.muted }
|
|
1892
1892
|
],
|
|
1893
|
-
onPress: () =>
|
|
1894
|
-
disabled: n ||
|
|
1893
|
+
onPress: () => C(!0),
|
|
1894
|
+
disabled: n || _.length === 0,
|
|
1895
1895
|
activeOpacity: .7,
|
|
1896
1896
|
children: [
|
|
1897
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ L(B, {
|
|
1898
1898
|
style: [
|
|
1899
1899
|
Y.triggerText,
|
|
1900
|
-
{ color:
|
|
1901
|
-
!t && { color:
|
|
1900
|
+
{ color: M.text },
|
|
1901
|
+
!t && { color: M.textMuted }
|
|
1902
1902
|
],
|
|
1903
1903
|
numberOfLines: 1,
|
|
1904
|
-
children: t?.label ||
|
|
1904
|
+
children: t?.label || E || P("renderer.defaultHttpInput.selectOption")
|
|
1905
1905
|
}),
|
|
1906
|
-
n && /* @__PURE__ */
|
|
1906
|
+
n && /* @__PURE__ */ L(ue, {
|
|
1907
1907
|
size: "small",
|
|
1908
|
-
color:
|
|
1908
|
+
color: M.primary,
|
|
1909
1909
|
style: Y.triggerLoader
|
|
1910
1910
|
}),
|
|
1911
|
-
e ? /* @__PURE__ */
|
|
1912
|
-
onPress: () =>
|
|
1911
|
+
e ? /* @__PURE__ */ L(V, {
|
|
1912
|
+
onPress: () => O(""),
|
|
1913
1913
|
hitSlop: {
|
|
1914
1914
|
bottom: 8,
|
|
1915
1915
|
left: 8,
|
|
@@ -1917,66 +1917,66 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1917
1917
|
top: 8
|
|
1918
1918
|
},
|
|
1919
1919
|
style: Y.clearButton,
|
|
1920
|
-
children: /* @__PURE__ */
|
|
1921
|
-
style: [Y.clearIcon, { color:
|
|
1920
|
+
children: /* @__PURE__ */ L(B, {
|
|
1921
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1922
1922
|
children: "✕"
|
|
1923
1923
|
})
|
|
1924
1924
|
}) : null,
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
style: [Y.arrow, { color:
|
|
1925
|
+
/* @__PURE__ */ L(B, {
|
|
1926
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1927
1927
|
children: "▼"
|
|
1928
1928
|
})
|
|
1929
1929
|
]
|
|
1930
1930
|
})
|
|
1931
1931
|
}),
|
|
1932
|
-
r && /* @__PURE__ */
|
|
1933
|
-
style: [Y.disabledMessage, { color:
|
|
1932
|
+
r && /* @__PURE__ */ L(B, {
|
|
1933
|
+
style: [Y.disabledMessage, { color: M.error }],
|
|
1934
1934
|
children: r
|
|
1935
1935
|
}),
|
|
1936
|
-
/* @__PURE__ */
|
|
1937
|
-
visible:
|
|
1936
|
+
/* @__PURE__ */ L(he, {
|
|
1937
|
+
visible: x,
|
|
1938
1938
|
transparent: !0,
|
|
1939
1939
|
animationType: "fade",
|
|
1940
|
-
onRequestClose: () =>
|
|
1941
|
-
children: /* @__PURE__ */
|
|
1940
|
+
onRequestClose: () => C(!1),
|
|
1941
|
+
children: /* @__PURE__ */ L(V, {
|
|
1942
1942
|
style: Y.modalOverlay,
|
|
1943
1943
|
activeOpacity: 1,
|
|
1944
|
-
onPress: () =>
|
|
1945
|
-
children: /* @__PURE__ */
|
|
1946
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1944
|
+
onPress: () => C(!1),
|
|
1945
|
+
children: /* @__PURE__ */ R(V, {
|
|
1946
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1947
1947
|
activeOpacity: 1,
|
|
1948
1948
|
onPress: () => {},
|
|
1949
|
-
children: [/* @__PURE__ */
|
|
1950
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1951
|
-
children: [/* @__PURE__ */
|
|
1952
|
-
style: [Y.modalTitle, { color:
|
|
1953
|
-
children:
|
|
1954
|
-
}), /* @__PURE__ */
|
|
1955
|
-
onPress: () =>
|
|
1956
|
-
children: /* @__PURE__ */
|
|
1957
|
-
style: [Y.closeButton, { color:
|
|
1949
|
+
children: [/* @__PURE__ */ R(H, {
|
|
1950
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1951
|
+
children: [/* @__PURE__ */ L(B, {
|
|
1952
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1953
|
+
children: A || E || P("renderer.defaultHttpInput.selectOption")
|
|
1954
|
+
}), /* @__PURE__ */ L(V, {
|
|
1955
|
+
onPress: () => C(!1),
|
|
1956
|
+
children: /* @__PURE__ */ L(B, {
|
|
1957
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1958
1958
|
children: "✕"
|
|
1959
1959
|
})
|
|
1960
1960
|
})]
|
|
1961
|
-
}), /* @__PURE__ */
|
|
1962
|
-
data:
|
|
1961
|
+
}), /* @__PURE__ */ L(pe, {
|
|
1962
|
+
data: _,
|
|
1963
1963
|
keyExtractor: (e) => e.value,
|
|
1964
1964
|
style: Y.optionsList,
|
|
1965
1965
|
contentContainerStyle: Y.optionsListContent,
|
|
1966
1966
|
renderItem: ({ item: t }) => {
|
|
1967
1967
|
let n = t.value === e;
|
|
1968
|
-
return /* @__PURE__ */
|
|
1969
|
-
style: [Y.option, n && { backgroundColor:
|
|
1968
|
+
return /* @__PURE__ */ R(V, {
|
|
1969
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1970
1970
|
onPress: () => {
|
|
1971
|
-
|
|
1971
|
+
O(t.value), C(!1);
|
|
1972
1972
|
},
|
|
1973
1973
|
activeOpacity: .7,
|
|
1974
|
-
children: [/* @__PURE__ */
|
|
1974
|
+
children: [/* @__PURE__ */ L(Ee, {
|
|
1975
1975
|
label: t.label,
|
|
1976
1976
|
description: t.description,
|
|
1977
1977
|
image: t.image
|
|
1978
|
-
}), n && /* @__PURE__ */
|
|
1979
|
-
style: [Y.checkmark, { color:
|
|
1978
|
+
}), n && /* @__PURE__ */ L(B, {
|
|
1979
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1980
1980
|
children: "✓"
|
|
1981
1981
|
})]
|
|
1982
1982
|
});
|
|
@@ -1985,40 +1985,40 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
1985
1985
|
})
|
|
1986
1986
|
})
|
|
1987
1987
|
}),
|
|
1988
|
-
|
|
1989
|
-
style: [Y.error, { color:
|
|
1990
|
-
children: D
|
|
1991
|
-
}),
|
|
1992
|
-
k && !D && /* @__PURE__ */ I(B, {
|
|
1993
|
-
style: [Y.helperText, { color: A.textMuted }],
|
|
1988
|
+
k && /* @__PURE__ */ L(B, {
|
|
1989
|
+
style: [Y.error, { color: M.error }],
|
|
1994
1990
|
children: k
|
|
1991
|
+
}),
|
|
1992
|
+
j && !k && /* @__PURE__ */ L(B, {
|
|
1993
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
1994
|
+
children: j
|
|
1995
1995
|
})
|
|
1996
1996
|
]
|
|
1997
1997
|
});
|
|
1998
1998
|
}
|
|
1999
|
-
return /* @__PURE__ */
|
|
1999
|
+
return /* @__PURE__ */ R(H, {
|
|
2000
2000
|
style: Y.container,
|
|
2001
2001
|
children: [
|
|
2002
|
-
/* @__PURE__ */
|
|
2003
|
-
label:
|
|
2004
|
-
required:
|
|
2002
|
+
/* @__PURE__ */ L(ee, {
|
|
2003
|
+
label: A,
|
|
2004
|
+
required: D.data.required
|
|
2005
2005
|
}),
|
|
2006
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ L(ve, {
|
|
2007
2007
|
style: [Y.input, {
|
|
2008
|
-
backgroundColor:
|
|
2009
|
-
borderColor:
|
|
2010
|
-
color:
|
|
2008
|
+
backgroundColor: M.muted,
|
|
2009
|
+
borderColor: M.border,
|
|
2010
|
+
color: M.textMuted
|
|
2011
2011
|
}],
|
|
2012
|
-
value: typeof
|
|
2012
|
+
value: typeof w == "string" ? w : JSON.stringify(w),
|
|
2013
2013
|
editable: !1
|
|
2014
2014
|
}),
|
|
2015
|
-
|
|
2016
|
-
style: [Y.error, { color:
|
|
2017
|
-
children: D
|
|
2018
|
-
}),
|
|
2019
|
-
k && !D && /* @__PURE__ */ I(B, {
|
|
2020
|
-
style: [Y.helperText, { color: A.textMuted }],
|
|
2015
|
+
k && /* @__PURE__ */ L(B, {
|
|
2016
|
+
style: [Y.error, { color: M.error }],
|
|
2021
2017
|
children: k
|
|
2018
|
+
}),
|
|
2019
|
+
j && !k && /* @__PURE__ */ L(B, {
|
|
2020
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
2021
|
+
children: j
|
|
2022
2022
|
})
|
|
2023
2023
|
]
|
|
2024
2024
|
});
|
|
@@ -2138,20 +2138,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2138
2138
|
flex: 1,
|
|
2139
2139
|
fontSize: 14
|
|
2140
2140
|
}
|
|
2141
|
-
}),
|
|
2142
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2143
|
-
return
|
|
2141
|
+
}), Be = ({ field: e, extra: t }) => {
|
|
2142
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = I(n?.toString() ?? ""), { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = S();
|
|
2143
|
+
return se(() => {
|
|
2144
2144
|
o(n?.toString() ?? "");
|
|
2145
|
-
}, [n]), /* @__PURE__ */
|
|
2146
|
-
style:
|
|
2145
|
+
}, [n]), /* @__PURE__ */ R(H, {
|
|
2146
|
+
style: Ve.container,
|
|
2147
2147
|
children: [
|
|
2148
|
-
/* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ L(s, {
|
|
2149
2149
|
label: d,
|
|
2150
2150
|
required: c.data.required
|
|
2151
2151
|
}),
|
|
2152
|
-
/* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ L(ve, {
|
|
2153
2153
|
style: [
|
|
2154
|
-
|
|
2154
|
+
Ve.input,
|
|
2155
2155
|
{
|
|
2156
2156
|
backgroundColor: p.input,
|
|
2157
2157
|
borderColor: p.border,
|
|
@@ -2173,17 +2173,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2173
2173
|
keyboardType: "numeric",
|
|
2174
2174
|
accessibilityLabel: i
|
|
2175
2175
|
}),
|
|
2176
|
-
u && /* @__PURE__ */
|
|
2177
|
-
style: [
|
|
2176
|
+
u && /* @__PURE__ */ L(B, {
|
|
2177
|
+
style: [Ve.error, { color: p.error }],
|
|
2178
2178
|
children: u
|
|
2179
2179
|
}),
|
|
2180
|
-
f && !u && /* @__PURE__ */
|
|
2181
|
-
style: [
|
|
2180
|
+
f && !u && /* @__PURE__ */ L(B, {
|
|
2181
|
+
style: [Ve.helperText, { color: p.textMuted }],
|
|
2182
2182
|
children: f
|
|
2183
2183
|
})
|
|
2184
2184
|
]
|
|
2185
2185
|
});
|
|
2186
|
-
},
|
|
2186
|
+
}, Ve = z.create({
|
|
2187
2187
|
container: { marginBottom: 16 },
|
|
2188
2188
|
error: {
|
|
2189
2189
|
fontSize: 12,
|
|
@@ -2200,20 +2200,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2200
2200
|
paddingHorizontal: 12,
|
|
2201
2201
|
paddingVertical: 8
|
|
2202
2202
|
}
|
|
2203
|
-
}),
|
|
2204
|
-
let [n, r] =
|
|
2205
|
-
return /* @__PURE__ */
|
|
2206
|
-
style:
|
|
2203
|
+
}), He = ({ field: e, extra: t }) => {
|
|
2204
|
+
let [n, r] = I(!1), { value: i, placeholder: a, name: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = S();
|
|
2205
|
+
return /* @__PURE__ */ R(H, {
|
|
2206
|
+
style: Ue.container,
|
|
2207
2207
|
children: [
|
|
2208
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ L(s, {
|
|
2209
2209
|
label: d,
|
|
2210
2210
|
required: c.data.required
|
|
2211
2211
|
}),
|
|
2212
|
-
/* @__PURE__ */
|
|
2213
|
-
style:
|
|
2214
|
-
children: [/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ R(H, {
|
|
2213
|
+
style: Ue.inputWrapper,
|
|
2214
|
+
children: [/* @__PURE__ */ L(ve, {
|
|
2215
2215
|
style: [
|
|
2216
|
-
|
|
2216
|
+
Ue.input,
|
|
2217
2217
|
{
|
|
2218
2218
|
backgroundColor: p.input,
|
|
2219
2219
|
borderColor: p.border,
|
|
@@ -2227,27 +2227,27 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2227
2227
|
placeholderTextColor: p.textMuted,
|
|
2228
2228
|
secureTextEntry: !n,
|
|
2229
2229
|
accessibilityLabel: o
|
|
2230
|
-
}), /* @__PURE__ */
|
|
2231
|
-
style:
|
|
2230
|
+
}), /* @__PURE__ */ L(V, {
|
|
2231
|
+
style: Ue.toggleButton,
|
|
2232
2232
|
onPress: () => r(!n),
|
|
2233
2233
|
activeOpacity: .7,
|
|
2234
|
-
children: /* @__PURE__ */
|
|
2235
|
-
style: [
|
|
2234
|
+
children: /* @__PURE__ */ L(B, {
|
|
2235
|
+
style: [Ue.toggleText, { color: p.primary }],
|
|
2236
2236
|
children: n ? "Hide" : "Show"
|
|
2237
2237
|
})
|
|
2238
2238
|
})]
|
|
2239
2239
|
}),
|
|
2240
|
-
u && /* @__PURE__ */
|
|
2241
|
-
style: [
|
|
2240
|
+
u && /* @__PURE__ */ L(B, {
|
|
2241
|
+
style: [Ue.error, { color: p.error }],
|
|
2242
2242
|
children: u
|
|
2243
2243
|
}),
|
|
2244
|
-
f && !u && /* @__PURE__ */
|
|
2245
|
-
style: [
|
|
2244
|
+
f && !u && /* @__PURE__ */ L(B, {
|
|
2245
|
+
style: [Ue.helperText, { color: p.textMuted }],
|
|
2246
2246
|
children: f
|
|
2247
2247
|
})
|
|
2248
2248
|
]
|
|
2249
2249
|
});
|
|
2250
|
-
},
|
|
2250
|
+
}, Ue = z.create({
|
|
2251
2251
|
container: { marginBottom: 16 },
|
|
2252
2252
|
error: {
|
|
2253
2253
|
fontSize: 12,
|
|
@@ -2280,20 +2280,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2280
2280
|
fontSize: 12,
|
|
2281
2281
|
fontWeight: "600"
|
|
2282
2282
|
}
|
|
2283
|
-
}),
|
|
2284
|
-
let { value:
|
|
2285
|
-
|
|
2283
|
+
}), We = ({ field: e, extra: t }) => {
|
|
2284
|
+
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: s, label: c, helperText: l } = t, { colors: u } = S(), d = o(), f = i.data.options || [], p = n || "", m = i.data.variant !== "default", h = (e) => {
|
|
2285
|
+
a(e);
|
|
2286
2286
|
};
|
|
2287
|
-
return /* @__PURE__ */
|
|
2287
|
+
return /* @__PURE__ */ R(H, {
|
|
2288
2288
|
style: X.container,
|
|
2289
2289
|
children: [
|
|
2290
|
-
/* @__PURE__ */
|
|
2290
|
+
/* @__PURE__ */ L(r, {
|
|
2291
2291
|
label: c,
|
|
2292
|
-
required:
|
|
2292
|
+
required: i.data.required
|
|
2293
2293
|
}),
|
|
2294
2294
|
f.map((e) => {
|
|
2295
2295
|
let t = p === e.value, n = d(e.label) || e.value, r = d(e.description);
|
|
2296
|
-
return m ? /* @__PURE__ */
|
|
2296
|
+
return m ? /* @__PURE__ */ R(V, {
|
|
2297
2297
|
style: [
|
|
2298
2298
|
X.card,
|
|
2299
2299
|
{
|
|
@@ -2310,21 +2310,21 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2310
2310
|
disabled: e.disabled,
|
|
2311
2311
|
activeOpacity: .7,
|
|
2312
2312
|
children: [
|
|
2313
|
-
e.image && /* @__PURE__ */
|
|
2313
|
+
e.image && /* @__PURE__ */ L(me, {
|
|
2314
2314
|
source: { uri: e.image },
|
|
2315
2315
|
style: X.cardImage
|
|
2316
2316
|
}),
|
|
2317
|
-
/* @__PURE__ */
|
|
2317
|
+
/* @__PURE__ */ R(H, {
|
|
2318
2318
|
style: X.cardTextContainer,
|
|
2319
|
-
children: [/* @__PURE__ */
|
|
2319
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2320
2320
|
style: [X.cardLabel, { color: u.textSecondary }],
|
|
2321
2321
|
children: n
|
|
2322
|
-
}), r && /* @__PURE__ */
|
|
2322
|
+
}), r && /* @__PURE__ */ L(B, {
|
|
2323
2323
|
style: [X.cardDescription, { color: u.textMuted }],
|
|
2324
2324
|
children: r
|
|
2325
2325
|
})]
|
|
2326
2326
|
}),
|
|
2327
|
-
/* @__PURE__ */
|
|
2327
|
+
/* @__PURE__ */ L(H, {
|
|
2328
2328
|
style: [
|
|
2329
2329
|
X.radio,
|
|
2330
2330
|
X.cardRadio,
|
|
@@ -2334,16 +2334,16 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2334
2334
|
},
|
|
2335
2335
|
t && { borderColor: u.primary }
|
|
2336
2336
|
],
|
|
2337
|
-
children: t && /* @__PURE__ */
|
|
2337
|
+
children: t && /* @__PURE__ */ L(H, { style: [X.radioInner, { backgroundColor: u.primary }] })
|
|
2338
2338
|
})
|
|
2339
2339
|
]
|
|
2340
|
-
}, e.value) : /* @__PURE__ */
|
|
2340
|
+
}, e.value) : /* @__PURE__ */ R(V, {
|
|
2341
2341
|
style: X.option,
|
|
2342
2342
|
onPress: () => h(e.value),
|
|
2343
2343
|
disabled: e.disabled,
|
|
2344
2344
|
activeOpacity: .7,
|
|
2345
2345
|
children: [
|
|
2346
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ L(H, {
|
|
2347
2347
|
style: [
|
|
2348
2348
|
X.radio,
|
|
2349
2349
|
{
|
|
@@ -2352,22 +2352,22 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2352
2352
|
},
|
|
2353
2353
|
t && { borderColor: u.primary }
|
|
2354
2354
|
],
|
|
2355
|
-
children: t && /* @__PURE__ */
|
|
2355
|
+
children: t && /* @__PURE__ */ L(H, { style: [X.radioInner, { backgroundColor: u.primary }] })
|
|
2356
2356
|
}),
|
|
2357
|
-
e.image && /* @__PURE__ */
|
|
2357
|
+
e.image && /* @__PURE__ */ L(me, {
|
|
2358
2358
|
source: { uri: e.image },
|
|
2359
2359
|
style: X.image
|
|
2360
2360
|
}),
|
|
2361
|
-
/* @__PURE__ */
|
|
2361
|
+
/* @__PURE__ */ R(H, {
|
|
2362
2362
|
style: X.optionTextContainer,
|
|
2363
|
-
children: [/* @__PURE__ */
|
|
2363
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2364
2364
|
style: [
|
|
2365
2365
|
X.optionLabel,
|
|
2366
2366
|
{ color: u.textSecondary },
|
|
2367
2367
|
e.disabled && { color: u.textMuted }
|
|
2368
2368
|
],
|
|
2369
2369
|
children: n
|
|
2370
|
-
}), r && /* @__PURE__ */
|
|
2370
|
+
}), r && /* @__PURE__ */ L(B, {
|
|
2371
2371
|
style: [X.optionDescription, { color: u.textMuted }],
|
|
2372
2372
|
children: r
|
|
2373
2373
|
})]
|
|
@@ -2375,11 +2375,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2375
2375
|
]
|
|
2376
2376
|
}, e.value);
|
|
2377
2377
|
}),
|
|
2378
|
-
s && /* @__PURE__ */
|
|
2378
|
+
s && /* @__PURE__ */ L(B, {
|
|
2379
2379
|
style: [X.error, { color: u.error }],
|
|
2380
2380
|
children: s
|
|
2381
2381
|
}),
|
|
2382
|
-
l && !s && /* @__PURE__ */
|
|
2382
|
+
l && !s && /* @__PURE__ */ L(B, {
|
|
2383
2383
|
style: [X.helperText, { color: u.textMuted }],
|
|
2384
2384
|
children: l
|
|
2385
2385
|
})
|
|
@@ -2453,18 +2453,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2453
2453
|
height: 10,
|
|
2454
2454
|
width: 10
|
|
2455
2455
|
}
|
|
2456
|
-
}),
|
|
2457
|
-
let [
|
|
2458
|
-
g ? l(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (l(e),
|
|
2456
|
+
}), Ge = ({ field: e, extra: t }) => {
|
|
2457
|
+
let [n, r] = I(!1), { value: i, placeholder: a } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = S(), m = o(), h = c.data.options || [], g = c.data.multiple, _ = Array.isArray(i) ? i : i ? [i] : [], v = (e) => {
|
|
2458
|
+
g ? l(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (l(e), r(!1));
|
|
2459
2459
|
};
|
|
2460
|
-
return /* @__PURE__ */
|
|
2460
|
+
return /* @__PURE__ */ R(H, {
|
|
2461
2461
|
style: Z.container,
|
|
2462
2462
|
children: [
|
|
2463
|
-
/* @__PURE__ */
|
|
2463
|
+
/* @__PURE__ */ L(s, {
|
|
2464
2464
|
label: d,
|
|
2465
2465
|
required: c.data.required
|
|
2466
2466
|
}),
|
|
2467
|
-
/* @__PURE__ */
|
|
2467
|
+
/* @__PURE__ */ R(V, {
|
|
2468
2468
|
style: [
|
|
2469
2469
|
Z.trigger,
|
|
2470
2470
|
{
|
|
@@ -2473,23 +2473,23 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2473
2473
|
},
|
|
2474
2474
|
u && { borderColor: p.error }
|
|
2475
2475
|
],
|
|
2476
|
-
onPress: () =>
|
|
2476
|
+
onPress: () => r(!0),
|
|
2477
2477
|
activeOpacity: .7,
|
|
2478
2478
|
children: [
|
|
2479
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ L(B, {
|
|
2480
2480
|
style: [
|
|
2481
2481
|
Z.triggerText,
|
|
2482
2482
|
{ color: p.text },
|
|
2483
2483
|
_.length === 0 && { color: p.textMuted }
|
|
2484
2484
|
],
|
|
2485
2485
|
children: (() => {
|
|
2486
|
-
if (_.length === 0) return
|
|
2486
|
+
if (_.length === 0) return a || "Select...";
|
|
2487
2487
|
if (g) return h.filter((e) => _.includes(e.value)).map((e) => m(e.label) || e.value).join(", ");
|
|
2488
2488
|
let e = h.find((e) => e.value === _[0]);
|
|
2489
|
-
return e ? m(e.label) || e.value :
|
|
2489
|
+
return e ? m(e.label) || e.value : a || "Select...";
|
|
2490
2490
|
})()
|
|
2491
2491
|
}),
|
|
2492
|
-
_.length > 0 && /* @__PURE__ */
|
|
2492
|
+
_.length > 0 && /* @__PURE__ */ L(V, {
|
|
2493
2493
|
onPress: () => l(g ? [] : ""),
|
|
2494
2494
|
hitSlop: {
|
|
2495
2495
|
bottom: 8,
|
|
@@ -2498,68 +2498,68 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2498
2498
|
top: 8
|
|
2499
2499
|
},
|
|
2500
2500
|
style: Z.clearButton,
|
|
2501
|
-
children: /* @__PURE__ */
|
|
2501
|
+
children: /* @__PURE__ */ L(B, {
|
|
2502
2502
|
style: [Z.clearIcon, { color: p.textMuted }],
|
|
2503
2503
|
children: "✕"
|
|
2504
2504
|
})
|
|
2505
2505
|
}),
|
|
2506
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ L(B, {
|
|
2507
2507
|
style: [Z.arrow, { color: p.textMuted }],
|
|
2508
2508
|
children: "▼"
|
|
2509
2509
|
})
|
|
2510
2510
|
]
|
|
2511
2511
|
}),
|
|
2512
|
-
/* @__PURE__ */
|
|
2513
|
-
visible:
|
|
2512
|
+
/* @__PURE__ */ L(he, {
|
|
2513
|
+
visible: n,
|
|
2514
2514
|
transparent: !0,
|
|
2515
2515
|
animationType: "fade",
|
|
2516
|
-
onRequestClose: () =>
|
|
2517
|
-
children: /* @__PURE__ */
|
|
2516
|
+
onRequestClose: () => r(!1),
|
|
2517
|
+
children: /* @__PURE__ */ L(V, {
|
|
2518
2518
|
style: Z.modalOverlay,
|
|
2519
2519
|
activeOpacity: 1,
|
|
2520
|
-
onPress: () =>
|
|
2521
|
-
children: /* @__PURE__ */
|
|
2520
|
+
onPress: () => r(!1),
|
|
2521
|
+
children: /* @__PURE__ */ R(H, {
|
|
2522
2522
|
style: [Z.modalContent, { backgroundColor: p.card }],
|
|
2523
2523
|
onStartShouldSetResponder: () => !0,
|
|
2524
2524
|
children: [
|
|
2525
|
-
/* @__PURE__ */
|
|
2525
|
+
/* @__PURE__ */ R(H, {
|
|
2526
2526
|
style: [Z.modalHeader, { borderBottomColor: p.border }],
|
|
2527
|
-
children: [/* @__PURE__ */
|
|
2527
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2528
2528
|
style: [Z.modalTitle, { color: p.text }],
|
|
2529
|
-
children: d ||
|
|
2530
|
-
}), /* @__PURE__ */
|
|
2531
|
-
onPress: () =>
|
|
2532
|
-
children: /* @__PURE__ */
|
|
2529
|
+
children: d || a || m("renderer.defaultSelectInput.selectOption")
|
|
2530
|
+
}), /* @__PURE__ */ L(V, {
|
|
2531
|
+
onPress: () => r(!1),
|
|
2532
|
+
children: /* @__PURE__ */ L(B, {
|
|
2533
2533
|
style: [Z.closeButton, { color: p.textMuted }],
|
|
2534
2534
|
children: "✕"
|
|
2535
2535
|
})
|
|
2536
2536
|
})]
|
|
2537
2537
|
}),
|
|
2538
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ L(ge, {
|
|
2539
2539
|
style: Z.optionsList,
|
|
2540
2540
|
children: h.map((e) => {
|
|
2541
2541
|
let t = _.includes(e.value);
|
|
2542
|
-
return /* @__PURE__ */
|
|
2542
|
+
return /* @__PURE__ */ R(V, {
|
|
2543
2543
|
style: [Z.option, t && { backgroundColor: `${p.primary}20` }],
|
|
2544
2544
|
onPress: () => v(e.value),
|
|
2545
2545
|
disabled: e.disabled,
|
|
2546
2546
|
activeOpacity: .7,
|
|
2547
|
-
children: [/* @__PURE__ */
|
|
2547
|
+
children: [/* @__PURE__ */ L(Ee, {
|
|
2548
2548
|
label: m(e.label) || e.value,
|
|
2549
2549
|
description: m(e.description),
|
|
2550
2550
|
image: e.image,
|
|
2551
2551
|
disabled: e.disabled
|
|
2552
|
-
}), t && /* @__PURE__ */
|
|
2552
|
+
}), t && /* @__PURE__ */ L(B, {
|
|
2553
2553
|
style: [Z.checkmark, { color: p.primary }],
|
|
2554
2554
|
children: "✓"
|
|
2555
2555
|
})]
|
|
2556
2556
|
}, e.value);
|
|
2557
2557
|
})
|
|
2558
2558
|
}),
|
|
2559
|
-
g && /* @__PURE__ */
|
|
2559
|
+
g && /* @__PURE__ */ L(V, {
|
|
2560
2560
|
style: [Z.doneButton, { backgroundColor: p.primary }],
|
|
2561
|
-
onPress: () =>
|
|
2562
|
-
children: /* @__PURE__ */
|
|
2561
|
+
onPress: () => r(!1),
|
|
2562
|
+
children: /* @__PURE__ */ L(B, {
|
|
2563
2563
|
style: Z.doneButtonText,
|
|
2564
2564
|
children: "Done"
|
|
2565
2565
|
})
|
|
@@ -2568,11 +2568,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2568
2568
|
})
|
|
2569
2569
|
})
|
|
2570
2570
|
}),
|
|
2571
|
-
u && /* @__PURE__ */
|
|
2571
|
+
u && /* @__PURE__ */ L(B, {
|
|
2572
2572
|
style: [Z.error, { color: p.error }],
|
|
2573
2573
|
children: u
|
|
2574
2574
|
}),
|
|
2575
|
-
f && !u && /* @__PURE__ */
|
|
2575
|
+
f && !u && /* @__PURE__ */ L(B, {
|
|
2576
2576
|
style: [Z.helperText, { color: p.textMuted }],
|
|
2577
2577
|
children: f
|
|
2578
2578
|
})
|
|
@@ -2659,20 +2659,20 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2659
2659
|
flex: 1,
|
|
2660
2660
|
fontSize: 14
|
|
2661
2661
|
}
|
|
2662
|
-
}),
|
|
2663
|
-
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } =
|
|
2664
|
-
return /* @__PURE__ */
|
|
2665
|
-
style:
|
|
2662
|
+
}), Ke = (e) => null, qe = ({ field: e, extra: t }) => {
|
|
2663
|
+
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = S(), u = !!n;
|
|
2664
|
+
return /* @__PURE__ */ R(H, {
|
|
2665
|
+
style: Je.container,
|
|
2666
2666
|
children: [
|
|
2667
|
-
/* @__PURE__ */
|
|
2668
|
-
style:
|
|
2669
|
-
children: [/* @__PURE__ */
|
|
2670
|
-
style:
|
|
2671
|
-
children: /* @__PURE__ */
|
|
2667
|
+
/* @__PURE__ */ R(H, {
|
|
2668
|
+
style: Je.row,
|
|
2669
|
+
children: [/* @__PURE__ */ L(H, {
|
|
2670
|
+
style: Je.labelContainer,
|
|
2671
|
+
children: /* @__PURE__ */ L(r, {
|
|
2672
2672
|
label: s,
|
|
2673
2673
|
required: i.data.required
|
|
2674
2674
|
})
|
|
2675
|
-
}), /* @__PURE__ */
|
|
2675
|
+
}), /* @__PURE__ */ L(_e, {
|
|
2676
2676
|
trackColor: {
|
|
2677
2677
|
false: l.border,
|
|
2678
2678
|
true: `${l.primary}80`
|
|
@@ -2683,17 +2683,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2683
2683
|
value: u
|
|
2684
2684
|
})]
|
|
2685
2685
|
}),
|
|
2686
|
-
o && /* @__PURE__ */
|
|
2687
|
-
style: [
|
|
2686
|
+
o && /* @__PURE__ */ L(B, {
|
|
2687
|
+
style: [Je.error, { color: l.error }],
|
|
2688
2688
|
children: o
|
|
2689
2689
|
}),
|
|
2690
|
-
c && !o && /* @__PURE__ */
|
|
2691
|
-
style: [
|
|
2690
|
+
c && !o && /* @__PURE__ */ L(B, {
|
|
2691
|
+
style: [Je.helperText, { color: l.textMuted }],
|
|
2692
2692
|
children: c
|
|
2693
2693
|
})
|
|
2694
2694
|
]
|
|
2695
2695
|
});
|
|
2696
|
-
},
|
|
2696
|
+
}, Je = z.create({
|
|
2697
2697
|
container: { marginBottom: 16 },
|
|
2698
2698
|
error: {
|
|
2699
2699
|
fontSize: 12,
|
|
@@ -2709,18 +2709,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2709
2709
|
flexDirection: "row",
|
|
2710
2710
|
justifyContent: "space-between"
|
|
2711
2711
|
}
|
|
2712
|
-
}),
|
|
2713
|
-
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } =
|
|
2714
|
-
return /* @__PURE__ */
|
|
2715
|
-
style:
|
|
2712
|
+
}), Ye = ({ field: e, extra: t }) => {
|
|
2713
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = S();
|
|
2714
|
+
return /* @__PURE__ */ R(H, {
|
|
2715
|
+
style: Xe.container,
|
|
2716
2716
|
children: [
|
|
2717
|
-
/* @__PURE__ */
|
|
2717
|
+
/* @__PURE__ */ L(a, {
|
|
2718
2718
|
label: l,
|
|
2719
2719
|
required: o.data.required
|
|
2720
2720
|
}),
|
|
2721
|
-
/* @__PURE__ */
|
|
2721
|
+
/* @__PURE__ */ L(ve, {
|
|
2722
2722
|
style: [
|
|
2723
|
-
|
|
2723
|
+
Xe.textarea,
|
|
2724
2724
|
{
|
|
2725
2725
|
backgroundColor: d.input,
|
|
2726
2726
|
borderColor: d.border,
|
|
@@ -2737,17 +2737,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2737
2737
|
textAlignVertical: "top",
|
|
2738
2738
|
accessibilityLabel: i
|
|
2739
2739
|
}),
|
|
2740
|
-
c && /* @__PURE__ */
|
|
2741
|
-
style: [
|
|
2740
|
+
c && /* @__PURE__ */ L(B, {
|
|
2741
|
+
style: [Xe.error, { color: d.error }],
|
|
2742
2742
|
children: c
|
|
2743
2743
|
}),
|
|
2744
|
-
u && !c && /* @__PURE__ */
|
|
2745
|
-
style: [
|
|
2744
|
+
u && !c && /* @__PURE__ */ L(B, {
|
|
2745
|
+
style: [Xe.helperText, { color: d.textMuted }],
|
|
2746
2746
|
children: u
|
|
2747
2747
|
})
|
|
2748
2748
|
]
|
|
2749
2749
|
});
|
|
2750
|
-
},
|
|
2750
|
+
}, Xe = z.create({
|
|
2751
2751
|
container: { marginBottom: 16 },
|
|
2752
2752
|
error: {
|
|
2753
2753
|
fontSize: 12,
|
|
@@ -2765,18 +2765,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2765
2765
|
paddingHorizontal: 12,
|
|
2766
2766
|
paddingVertical: 8
|
|
2767
2767
|
}
|
|
2768
|
-
}),
|
|
2769
|
-
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } =
|
|
2770
|
-
return /* @__PURE__ */
|
|
2771
|
-
style:
|
|
2768
|
+
}), Ze = ({ field: e, extra: t }) => {
|
|
2769
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = S();
|
|
2770
|
+
return /* @__PURE__ */ R(H, {
|
|
2771
|
+
style: Qe.container,
|
|
2772
2772
|
children: [
|
|
2773
|
-
/* @__PURE__ */
|
|
2773
|
+
/* @__PURE__ */ L(a, {
|
|
2774
2774
|
label: l,
|
|
2775
2775
|
required: o.data.required
|
|
2776
2776
|
}),
|
|
2777
|
-
/* @__PURE__ */
|
|
2777
|
+
/* @__PURE__ */ L(ve, {
|
|
2778
2778
|
style: [
|
|
2779
|
-
|
|
2779
|
+
Qe.input,
|
|
2780
2780
|
{
|
|
2781
2781
|
backgroundColor: d.input,
|
|
2782
2782
|
borderColor: d.border,
|
|
@@ -2790,17 +2790,17 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2790
2790
|
placeholderTextColor: d.textMuted,
|
|
2791
2791
|
accessibilityLabel: i
|
|
2792
2792
|
}),
|
|
2793
|
-
c && /* @__PURE__ */
|
|
2794
|
-
style: [
|
|
2793
|
+
c && /* @__PURE__ */ L(B, {
|
|
2794
|
+
style: [Qe.error, { color: d.error }],
|
|
2795
2795
|
children: c
|
|
2796
2796
|
}),
|
|
2797
|
-
u && !c && /* @__PURE__ */
|
|
2798
|
-
style: [
|
|
2797
|
+
u && !c && /* @__PURE__ */ L(B, {
|
|
2798
|
+
style: [Qe.helperText, { color: d.textMuted }],
|
|
2799
2799
|
children: u
|
|
2800
2800
|
})
|
|
2801
2801
|
]
|
|
2802
2802
|
});
|
|
2803
|
-
},
|
|
2803
|
+
}, Qe = z.create({
|
|
2804
2804
|
container: { marginBottom: 16 },
|
|
2805
2805
|
error: {
|
|
2806
2806
|
fontSize: 12,
|
|
@@ -2817,22 +2817,22 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2817
2817
|
paddingHorizontal: 12,
|
|
2818
2818
|
paddingVertical: 8
|
|
2819
2819
|
}
|
|
2820
|
-
}),
|
|
2821
|
-
let { value:
|
|
2820
|
+
}), $e = ({ field: e, extra: t }) => {
|
|
2821
|
+
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), s = Number.parseInt(i[1], 10), c = Number.isNaN(a) ? 0 : a, l = Number.isNaN(s) ? 0 : s, [u, d] = I(c || 0), [f, p] = I(l || 0), [m, h] = I(!1), { InputLabel: g, node: _, setValue: v, error: y, label: b, helperText: x } = t, { colors: C } = S(), w = o(), T = F(null), E = F(null), ee = Array.from({ length: 24 }, (e, t) => t), D = Array.from({ length: 60 }, (e, t) => t), O = () => n || r || w("renderer.defaultInputs.selectTime"), k = oe(() => {
|
|
2822
2822
|
v(`${String(u).padStart(2, "0")}:${String(f).padStart(2, "0")}`), h(!1);
|
|
2823
2823
|
}, [
|
|
2824
2824
|
u,
|
|
2825
2825
|
f,
|
|
2826
2826
|
v
|
|
2827
2827
|
]);
|
|
2828
|
-
return /* @__PURE__ */
|
|
2828
|
+
return /* @__PURE__ */ R(H, {
|
|
2829
2829
|
style: Q.container,
|
|
2830
2830
|
children: [
|
|
2831
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ L(g, {
|
|
2832
2832
|
label: b,
|
|
2833
2833
|
required: _.data.required
|
|
2834
2834
|
}),
|
|
2835
|
-
/* @__PURE__ */
|
|
2835
|
+
/* @__PURE__ */ R(V, {
|
|
2836
2836
|
style: [
|
|
2837
2837
|
Q.trigger,
|
|
2838
2838
|
{
|
|
@@ -2845,64 +2845,64 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2845
2845
|
d(c || 0), p(l || 0), h(!0);
|
|
2846
2846
|
},
|
|
2847
2847
|
activeOpacity: .7,
|
|
2848
|
-
children: [/* @__PURE__ */
|
|
2848
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2849
2849
|
style: [
|
|
2850
2850
|
Q.triggerText,
|
|
2851
2851
|
{ color: C.text },
|
|
2852
|
-
!
|
|
2852
|
+
!n && { color: C.textMuted }
|
|
2853
2853
|
],
|
|
2854
2854
|
numberOfLines: 1,
|
|
2855
|
-
children:
|
|
2856
|
-
}), /* @__PURE__ */
|
|
2855
|
+
children: O()
|
|
2856
|
+
}), /* @__PURE__ */ L(B, {
|
|
2857
2857
|
style: Q.icon,
|
|
2858
2858
|
children: "🕐"
|
|
2859
2859
|
})]
|
|
2860
2860
|
}),
|
|
2861
|
-
/* @__PURE__ */
|
|
2861
|
+
/* @__PURE__ */ L(he, {
|
|
2862
2862
|
visible: m,
|
|
2863
2863
|
transparent: !0,
|
|
2864
2864
|
animationType: "fade",
|
|
2865
2865
|
onRequestClose: () => h(!1),
|
|
2866
|
-
children: /* @__PURE__ */
|
|
2866
|
+
children: /* @__PURE__ */ L(V, {
|
|
2867
2867
|
style: Q.modalOverlay,
|
|
2868
2868
|
activeOpacity: 1,
|
|
2869
2869
|
onPress: () => h(!1),
|
|
2870
|
-
children: /* @__PURE__ */
|
|
2870
|
+
children: /* @__PURE__ */ R(V, {
|
|
2871
2871
|
style: [Q.modalContent, { backgroundColor: C.card }],
|
|
2872
2872
|
activeOpacity: 1,
|
|
2873
2873
|
onPress: () => {},
|
|
2874
2874
|
children: [
|
|
2875
|
-
/* @__PURE__ */
|
|
2875
|
+
/* @__PURE__ */ R(H, {
|
|
2876
2876
|
style: [Q.modalHeader, { borderBottomColor: C.separator }],
|
|
2877
|
-
children: [/* @__PURE__ */
|
|
2877
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2878
2878
|
style: [Q.modalTitle, { color: C.text }],
|
|
2879
|
-
children: b ||
|
|
2880
|
-
}), /* @__PURE__ */
|
|
2879
|
+
children: b || r || w("renderer.defaultInputs.selectTime")
|
|
2880
|
+
}), /* @__PURE__ */ L(V, {
|
|
2881
2881
|
onPress: () => h(!1),
|
|
2882
|
-
children: /* @__PURE__ */
|
|
2882
|
+
children: /* @__PURE__ */ L(B, {
|
|
2883
2883
|
style: [Q.closeButton, { color: C.textMuted }],
|
|
2884
2884
|
children: "✕"
|
|
2885
2885
|
})
|
|
2886
2886
|
})]
|
|
2887
2887
|
}),
|
|
2888
|
-
/* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ R(H, {
|
|
2889
2889
|
style: Q.pickerContainer,
|
|
2890
2890
|
children: [
|
|
2891
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ R(H, {
|
|
2892
2892
|
style: Q.pickerColumn,
|
|
2893
|
-
children: [/* @__PURE__ */
|
|
2893
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2894
2894
|
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
2895
2895
|
children: "Hour"
|
|
2896
|
-
}), /* @__PURE__ */
|
|
2896
|
+
}), /* @__PURE__ */ L(ge, {
|
|
2897
2897
|
ref: T,
|
|
2898
2898
|
style: Q.picker,
|
|
2899
2899
|
contentContainerStyle: Q.pickerContent,
|
|
2900
2900
|
showsVerticalScrollIndicator: !1,
|
|
2901
|
-
children: ee.map((e) => /* @__PURE__ */
|
|
2901
|
+
children: ee.map((e) => /* @__PURE__ */ L(V, {
|
|
2902
2902
|
style: [Q.pickerItem, u === e && { backgroundColor: C.primary }],
|
|
2903
2903
|
onPress: () => d(e),
|
|
2904
2904
|
activeOpacity: .7,
|
|
2905
|
-
children: /* @__PURE__ */
|
|
2905
|
+
children: /* @__PURE__ */ L(B, {
|
|
2906
2906
|
style: [
|
|
2907
2907
|
Q.pickerItemText,
|
|
2908
2908
|
{ color: C.text },
|
|
@@ -2916,25 +2916,25 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2916
2916
|
}, e))
|
|
2917
2917
|
})]
|
|
2918
2918
|
}),
|
|
2919
|
-
/* @__PURE__ */
|
|
2919
|
+
/* @__PURE__ */ L(B, {
|
|
2920
2920
|
style: [Q.pickerSeparator, { color: C.text }],
|
|
2921
2921
|
children: ":"
|
|
2922
2922
|
}),
|
|
2923
|
-
/* @__PURE__ */
|
|
2923
|
+
/* @__PURE__ */ R(H, {
|
|
2924
2924
|
style: Q.pickerColumn,
|
|
2925
|
-
children: [/* @__PURE__ */
|
|
2925
|
+
children: [/* @__PURE__ */ L(B, {
|
|
2926
2926
|
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
2927
2927
|
children: "Minute"
|
|
2928
|
-
}), /* @__PURE__ */
|
|
2928
|
+
}), /* @__PURE__ */ L(ge, {
|
|
2929
2929
|
ref: E,
|
|
2930
2930
|
style: Q.picker,
|
|
2931
2931
|
contentContainerStyle: Q.pickerContent,
|
|
2932
2932
|
showsVerticalScrollIndicator: !1,
|
|
2933
|
-
children:
|
|
2933
|
+
children: D.map((e) => /* @__PURE__ */ L(V, {
|
|
2934
2934
|
style: [Q.pickerItem, f === e && { backgroundColor: C.primary }],
|
|
2935
2935
|
onPress: () => p(e),
|
|
2936
2936
|
activeOpacity: .7,
|
|
2937
|
-
children: /* @__PURE__ */
|
|
2937
|
+
children: /* @__PURE__ */ L(B, {
|
|
2938
2938
|
style: [
|
|
2939
2939
|
Q.pickerItemText,
|
|
2940
2940
|
{ color: C.text },
|
|
@@ -2950,11 +2950,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2950
2950
|
})
|
|
2951
2951
|
]
|
|
2952
2952
|
}),
|
|
2953
|
-
/* @__PURE__ */
|
|
2953
|
+
/* @__PURE__ */ L(V, {
|
|
2954
2954
|
style: [Q.confirmButton, { backgroundColor: C.primary }],
|
|
2955
|
-
onPress:
|
|
2955
|
+
onPress: k,
|
|
2956
2956
|
activeOpacity: .7,
|
|
2957
|
-
children: /* @__PURE__ */
|
|
2957
|
+
children: /* @__PURE__ */ L(B, {
|
|
2958
2958
|
style: [Q.confirmButtonText, { color: C.background }],
|
|
2959
2959
|
children: "Confirm"
|
|
2960
2960
|
})
|
|
@@ -2963,13 +2963,13 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
2963
2963
|
})
|
|
2964
2964
|
})
|
|
2965
2965
|
}),
|
|
2966
|
-
y && /* @__PURE__ */
|
|
2966
|
+
y && /* @__PURE__ */ L(B, {
|
|
2967
2967
|
style: [Q.error, { color: C.error }],
|
|
2968
2968
|
children: y
|
|
2969
2969
|
}),
|
|
2970
|
-
|
|
2970
|
+
x && !y && /* @__PURE__ */ L(B, {
|
|
2971
2971
|
style: [Q.helperText, { color: C.textMuted }],
|
|
2972
|
-
children:
|
|
2972
|
+
children: x
|
|
2973
2973
|
})
|
|
2974
2974
|
]
|
|
2975
2975
|
});
|
|
@@ -3059,28 +3059,28 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3059
3059
|
flex: 1,
|
|
3060
3060
|
fontSize: 14
|
|
3061
3061
|
}
|
|
3062
|
-
}),
|
|
3063
|
-
let [
|
|
3064
|
-
let e = `${String(
|
|
3065
|
-
|
|
3062
|
+
}), et = ({ field: e, extra: t }) => {
|
|
3063
|
+
let [n, r] = I(!1), [i, a] = I(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, { colors: m } = S(), h = o(), g = Array.isArray(s) ? s : [], _ = g[0] || "", v = g[1] || "", y = _.split(":"), b = Number.parseInt(y[0], 10), x = Number.parseInt(y[1], 10), C = Number.isNaN(b) ? 0 : b, w = Number.isNaN(x) ? 0 : x, T = v.split(":"), E = Number.parseInt(T[0], 10), ee = Number.parseInt(T[1], 10), D = Number.isNaN(E) ? 0 : E, O = Number.isNaN(ee) ? 0 : ee, [k, A] = I(0), [j, te] = I(0), ne = Array.from({ length: 24 }, (e, t) => t), re = Array.from({ length: 60 }, (e, t) => t), ie = () => _ && v ? `${_} - ${v}` : _ || h("renderer.defaultInputs.selectTimeRange"), ae = oe(() => {
|
|
3064
|
+
let e = `${String(k).padStart(2, "0")}:${String(j).padStart(2, "0")}`;
|
|
3065
|
+
i ? (u([e, v]), a(!1), A(D || 0), te(O || 0)) : (u([_, e]), r(!1), a(!0));
|
|
3066
3066
|
}, [
|
|
3067
|
-
|
|
3068
|
-
ne,
|
|
3067
|
+
i,
|
|
3069
3068
|
k,
|
|
3069
|
+
j,
|
|
3070
3070
|
_,
|
|
3071
3071
|
v,
|
|
3072
|
-
te,
|
|
3073
3072
|
D,
|
|
3073
|
+
O,
|
|
3074
3074
|
u
|
|
3075
3075
|
]);
|
|
3076
|
-
return /* @__PURE__ */
|
|
3076
|
+
return /* @__PURE__ */ R(H, {
|
|
3077
3077
|
style: $.container,
|
|
3078
3078
|
children: [
|
|
3079
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ L(c, {
|
|
3080
3080
|
label: f,
|
|
3081
3081
|
required: l.data.required
|
|
3082
3082
|
}),
|
|
3083
|
-
/* @__PURE__ */
|
|
3083
|
+
/* @__PURE__ */ R(V, {
|
|
3084
3084
|
style: [
|
|
3085
3085
|
$.trigger,
|
|
3086
3086
|
{
|
|
@@ -3090,77 +3090,77 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3090
3090
|
d && { borderColor: m.error }
|
|
3091
3091
|
],
|
|
3092
3092
|
onPress: () => {
|
|
3093
|
-
|
|
3093
|
+
A(C || 0), te(w || 0), a(!0), r(!0);
|
|
3094
3094
|
},
|
|
3095
3095
|
activeOpacity: .7,
|
|
3096
|
-
children: [/* @__PURE__ */
|
|
3096
|
+
children: [/* @__PURE__ */ L(B, {
|
|
3097
3097
|
style: [
|
|
3098
3098
|
$.triggerText,
|
|
3099
3099
|
{ color: m.text },
|
|
3100
3100
|
!_ && { color: m.textMuted }
|
|
3101
3101
|
],
|
|
3102
3102
|
numberOfLines: 1,
|
|
3103
|
-
children:
|
|
3104
|
-
}), /* @__PURE__ */
|
|
3103
|
+
children: ie()
|
|
3104
|
+
}), /* @__PURE__ */ L(B, {
|
|
3105
3105
|
style: $.icon,
|
|
3106
3106
|
children: "🕐"
|
|
3107
3107
|
})]
|
|
3108
3108
|
}),
|
|
3109
|
-
/* @__PURE__ */
|
|
3110
|
-
visible:
|
|
3109
|
+
/* @__PURE__ */ L(he, {
|
|
3110
|
+
visible: n,
|
|
3111
3111
|
transparent: !0,
|
|
3112
3112
|
animationType: "fade",
|
|
3113
|
-
onRequestClose: () =>
|
|
3114
|
-
children: /* @__PURE__ */
|
|
3113
|
+
onRequestClose: () => r(!1),
|
|
3114
|
+
children: /* @__PURE__ */ L(V, {
|
|
3115
3115
|
style: $.modalOverlay,
|
|
3116
3116
|
activeOpacity: 1,
|
|
3117
|
-
onPress: () =>
|
|
3118
|
-
children: /* @__PURE__ */
|
|
3117
|
+
onPress: () => r(!1),
|
|
3118
|
+
children: /* @__PURE__ */ R(V, {
|
|
3119
3119
|
style: [$.modalContent, { backgroundColor: m.card }],
|
|
3120
3120
|
activeOpacity: 1,
|
|
3121
3121
|
onPress: () => {},
|
|
3122
3122
|
children: [
|
|
3123
|
-
/* @__PURE__ */
|
|
3123
|
+
/* @__PURE__ */ R(H, {
|
|
3124
3124
|
style: [$.modalHeader, { borderBottomColor: m.separator }],
|
|
3125
|
-
children: [/* @__PURE__ */
|
|
3125
|
+
children: [/* @__PURE__ */ L(B, {
|
|
3126
3126
|
style: [$.modalTitle, { color: m.text }],
|
|
3127
3127
|
children: f || h("renderer.defaultInputs.selectTimeRange")
|
|
3128
|
-
}), /* @__PURE__ */
|
|
3129
|
-
onPress: () =>
|
|
3130
|
-
children: /* @__PURE__ */
|
|
3128
|
+
}), /* @__PURE__ */ L(V, {
|
|
3129
|
+
onPress: () => r(!1),
|
|
3130
|
+
children: /* @__PURE__ */ L(B, {
|
|
3131
3131
|
style: [$.closeButton, { color: m.textMuted }],
|
|
3132
3132
|
children: "✕"
|
|
3133
3133
|
})
|
|
3134
3134
|
})]
|
|
3135
3135
|
}),
|
|
3136
|
-
/* @__PURE__ */
|
|
3136
|
+
/* @__PURE__ */ L(H, {
|
|
3137
3137
|
style: [$.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
3138
|
-
children: /* @__PURE__ */
|
|
3138
|
+
children: /* @__PURE__ */ L(B, {
|
|
3139
3139
|
style: [$.rangeIndicatorText, { color: m.primary }],
|
|
3140
|
-
children: h(
|
|
3140
|
+
children: h(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3141
3141
|
})
|
|
3142
3142
|
}),
|
|
3143
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ R(H, {
|
|
3144
3144
|
style: $.pickerContainer,
|
|
3145
3145
|
children: [
|
|
3146
|
-
/* @__PURE__ */
|
|
3146
|
+
/* @__PURE__ */ R(H, {
|
|
3147
3147
|
style: $.pickerColumn,
|
|
3148
|
-
children: [/* @__PURE__ */
|
|
3148
|
+
children: [/* @__PURE__ */ L(B, {
|
|
3149
3149
|
style: [$.pickerLabel, { color: m.textMuted }],
|
|
3150
3150
|
children: "Hour"
|
|
3151
|
-
}), /* @__PURE__ */
|
|
3151
|
+
}), /* @__PURE__ */ L(ge, {
|
|
3152
3152
|
style: $.picker,
|
|
3153
3153
|
contentContainerStyle: $.pickerContent,
|
|
3154
3154
|
showsVerticalScrollIndicator: !1,
|
|
3155
|
-
children:
|
|
3156
|
-
style: [$.pickerItem,
|
|
3157
|
-
onPress: () =>
|
|
3155
|
+
children: ne.map((e) => /* @__PURE__ */ L(V, {
|
|
3156
|
+
style: [$.pickerItem, k === e && { backgroundColor: m.primary }],
|
|
3157
|
+
onPress: () => A(e),
|
|
3158
3158
|
activeOpacity: .7,
|
|
3159
|
-
children: /* @__PURE__ */
|
|
3159
|
+
children: /* @__PURE__ */ L(B, {
|
|
3160
3160
|
style: [
|
|
3161
3161
|
$.pickerItemText,
|
|
3162
3162
|
{ color: m.text },
|
|
3163
|
-
|
|
3163
|
+
k === e && {
|
|
3164
3164
|
color: m.background,
|
|
3165
3165
|
fontWeight: "600"
|
|
3166
3166
|
}
|
|
@@ -3170,28 +3170,28 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3170
3170
|
}, e))
|
|
3171
3171
|
})]
|
|
3172
3172
|
}),
|
|
3173
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ L(B, {
|
|
3174
3174
|
style: [$.pickerSeparator, { color: m.text }],
|
|
3175
3175
|
children: ":"
|
|
3176
3176
|
}),
|
|
3177
|
-
/* @__PURE__ */
|
|
3177
|
+
/* @__PURE__ */ R(H, {
|
|
3178
3178
|
style: $.pickerColumn,
|
|
3179
|
-
children: [/* @__PURE__ */
|
|
3179
|
+
children: [/* @__PURE__ */ L(B, {
|
|
3180
3180
|
style: [$.pickerLabel, { color: m.textMuted }],
|
|
3181
3181
|
children: "Minute"
|
|
3182
|
-
}), /* @__PURE__ */
|
|
3182
|
+
}), /* @__PURE__ */ L(ge, {
|
|
3183
3183
|
style: $.picker,
|
|
3184
3184
|
contentContainerStyle: $.pickerContent,
|
|
3185
3185
|
showsVerticalScrollIndicator: !1,
|
|
3186
|
-
children:
|
|
3187
|
-
style: [$.pickerItem,
|
|
3188
|
-
onPress: () =>
|
|
3186
|
+
children: re.map((e) => /* @__PURE__ */ L(V, {
|
|
3187
|
+
style: [$.pickerItem, j === e && { backgroundColor: m.primary }],
|
|
3188
|
+
onPress: () => te(e),
|
|
3189
3189
|
activeOpacity: .7,
|
|
3190
|
-
children: /* @__PURE__ */
|
|
3190
|
+
children: /* @__PURE__ */ L(B, {
|
|
3191
3191
|
style: [
|
|
3192
3192
|
$.pickerItemText,
|
|
3193
3193
|
{ color: m.text },
|
|
3194
|
-
|
|
3194
|
+
j === e && {
|
|
3195
3195
|
color: m.background,
|
|
3196
3196
|
fontWeight: "600"
|
|
3197
3197
|
}
|
|
@@ -3203,24 +3203,24 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3203
3203
|
})
|
|
3204
3204
|
]
|
|
3205
3205
|
}),
|
|
3206
|
-
/* @__PURE__ */
|
|
3206
|
+
/* @__PURE__ */ L(V, {
|
|
3207
3207
|
style: [$.confirmButton, { backgroundColor: m.primary }],
|
|
3208
|
-
onPress:
|
|
3208
|
+
onPress: ae,
|
|
3209
3209
|
activeOpacity: .7,
|
|
3210
|
-
children: /* @__PURE__ */
|
|
3210
|
+
children: /* @__PURE__ */ L(B, {
|
|
3211
3211
|
style: [$.confirmButtonText, { color: m.background }],
|
|
3212
|
-
children:
|
|
3212
|
+
children: i ? "Next" : "Confirm"
|
|
3213
3213
|
})
|
|
3214
3214
|
})
|
|
3215
3215
|
]
|
|
3216
3216
|
})
|
|
3217
3217
|
})
|
|
3218
3218
|
}),
|
|
3219
|
-
d && /* @__PURE__ */
|
|
3219
|
+
d && /* @__PURE__ */ L(B, {
|
|
3220
3220
|
style: [$.error, { color: m.error }],
|
|
3221
3221
|
children: d
|
|
3222
3222
|
}),
|
|
3223
|
-
p && !d && /* @__PURE__ */
|
|
3223
|
+
p && !d && /* @__PURE__ */ L(B, {
|
|
3224
3224
|
style: [$.helperText, { color: m.textMuted }],
|
|
3225
3225
|
children: p
|
|
3226
3226
|
})
|
|
@@ -3322,54 +3322,54 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3322
3322
|
flex: 1,
|
|
3323
3323
|
fontSize: 14
|
|
3324
3324
|
}
|
|
3325
|
-
}),
|
|
3326
|
-
address:
|
|
3327
|
-
autocomplete:
|
|
3328
|
-
checkbox:
|
|
3329
|
-
date:
|
|
3330
|
-
daterange:
|
|
3331
|
-
file:
|
|
3332
|
-
hidden:
|
|
3333
|
-
http:
|
|
3334
|
-
number:
|
|
3335
|
-
password:
|
|
3336
|
-
radio:
|
|
3337
|
-
select:
|
|
3338
|
-
submit:
|
|
3339
|
-
switch:
|
|
3340
|
-
text:
|
|
3341
|
-
textarea:
|
|
3342
|
-
time:
|
|
3343
|
-
timerange:
|
|
3344
|
-
},
|
|
3345
|
-
let { colors: d } =
|
|
3346
|
-
return /* @__PURE__ */
|
|
3347
|
-
|
|
3348
|
-
style: [
|
|
3349
|
-
children:
|
|
3325
|
+
}), tt = {
|
|
3326
|
+
address: Te,
|
|
3327
|
+
autocomplete: Oe,
|
|
3328
|
+
checkbox: ke,
|
|
3329
|
+
date: Ae,
|
|
3330
|
+
daterange: je,
|
|
3331
|
+
file: Me,
|
|
3332
|
+
hidden: Ne,
|
|
3333
|
+
http: ze,
|
|
3334
|
+
number: Be,
|
|
3335
|
+
password: He,
|
|
3336
|
+
radio: We,
|
|
3337
|
+
select: Ge,
|
|
3338
|
+
submit: Ke,
|
|
3339
|
+
switch: qe,
|
|
3340
|
+
text: Ze,
|
|
3341
|
+
textarea: Ye,
|
|
3342
|
+
time: $e,
|
|
3343
|
+
timerange: et
|
|
3344
|
+
}, nt = ({ step: t, label: n, children: r, canGoBack: i, isLastStep: a, canContinue: s, isSubmitting: c, onBack: l, onContinue: u }) => {
|
|
3345
|
+
let { colors: d } = S(), f = o(), p = !s || c, m = t.nodes.find((t) => e(t) && t.data.type === "submit"), h = m && e(m) ? f(m.data.label) : void 0, g = a ? h || f("renderer.defaultSubmitButton.submit") : f("renderer.step.continue");
|
|
3346
|
+
return /* @__PURE__ */ R(H, { children: [
|
|
3347
|
+
n ? /* @__PURE__ */ L(B, {
|
|
3348
|
+
style: [rt.label, { color: d.text }],
|
|
3349
|
+
children: n
|
|
3350
3350
|
}) : null,
|
|
3351
|
-
/* @__PURE__ */
|
|
3352
|
-
style:
|
|
3351
|
+
/* @__PURE__ */ L(H, {
|
|
3352
|
+
style: rt.content,
|
|
3353
3353
|
children: r
|
|
3354
3354
|
}),
|
|
3355
|
-
/* @__PURE__ */
|
|
3356
|
-
style:
|
|
3357
|
-
children: [i ? /* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ R(H, {
|
|
3356
|
+
style: rt.actions,
|
|
3357
|
+
children: [i ? /* @__PURE__ */ L(V, {
|
|
3358
3358
|
style: [
|
|
3359
|
-
|
|
3359
|
+
rt.backButton,
|
|
3360
3360
|
{ borderColor: d.border },
|
|
3361
|
-
c &&
|
|
3361
|
+
c && rt.disabled
|
|
3362
3362
|
],
|
|
3363
3363
|
onPress: l,
|
|
3364
3364
|
disabled: c,
|
|
3365
3365
|
activeOpacity: .7,
|
|
3366
|
-
children: /* @__PURE__ */
|
|
3367
|
-
style: [
|
|
3366
|
+
children: /* @__PURE__ */ L(B, {
|
|
3367
|
+
style: [rt.backButtonText, { color: d.text }],
|
|
3368
3368
|
children: f("renderer.step.back")
|
|
3369
3369
|
})
|
|
3370
|
-
}) : /* @__PURE__ */
|
|
3370
|
+
}) : /* @__PURE__ */ L(H, {}), /* @__PURE__ */ L(V, {
|
|
3371
3371
|
style: [
|
|
3372
|
-
|
|
3372
|
+
rt.continueButton,
|
|
3373
3373
|
{ backgroundColor: d.primary },
|
|
3374
3374
|
p && {
|
|
3375
3375
|
backgroundColor: d.primaryDisabled,
|
|
@@ -3379,14 +3379,14 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3379
3379
|
onPress: u,
|
|
3380
3380
|
disabled: p,
|
|
3381
3381
|
activeOpacity: .7,
|
|
3382
|
-
children: c ? /* @__PURE__ */
|
|
3383
|
-
style: [
|
|
3382
|
+
children: c ? /* @__PURE__ */ L(ue, { color: d.primaryForeground }) : /* @__PURE__ */ L(B, {
|
|
3383
|
+
style: [rt.continueButtonText, { color: d.primaryForeground }],
|
|
3384
3384
|
children: g
|
|
3385
3385
|
})
|
|
3386
3386
|
})]
|
|
3387
3387
|
})
|
|
3388
3388
|
] });
|
|
3389
|
-
},
|
|
3389
|
+
}, rt = z.create({
|
|
3390
3390
|
actions: {
|
|
3391
3391
|
alignItems: "center",
|
|
3392
3392
|
flexDirection: "row",
|
|
@@ -3421,11 +3421,11 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3421
3421
|
fontWeight: "600",
|
|
3422
3422
|
marginBottom: 12
|
|
3423
3423
|
}
|
|
3424
|
-
}),
|
|
3425
|
-
let { colors: i } =
|
|
3426
|
-
return /* @__PURE__ */
|
|
3424
|
+
}), it = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3425
|
+
let { colors: i } = S();
|
|
3426
|
+
return /* @__PURE__ */ L(V, {
|
|
3427
3427
|
style: [
|
|
3428
|
-
|
|
3428
|
+
at.button,
|
|
3429
3429
|
{ backgroundColor: i.primary },
|
|
3430
3430
|
(t || n) && {
|
|
3431
3431
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3435,12 +3435,12 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3435
3435
|
disabled: t || n,
|
|
3436
3436
|
onPress: r,
|
|
3437
3437
|
activeOpacity: .7,
|
|
3438
|
-
children: n ? /* @__PURE__ */
|
|
3439
|
-
style: [
|
|
3438
|
+
children: n ? /* @__PURE__ */ L(ue, { color: i.primaryForeground }) : /* @__PURE__ */ L(B, {
|
|
3439
|
+
style: [at.buttonText, { color: i.primaryForeground }],
|
|
3440
3440
|
children: e
|
|
3441
3441
|
})
|
|
3442
3442
|
});
|
|
3443
|
-
},
|
|
3443
|
+
}, at = z.create({
|
|
3444
3444
|
button: {
|
|
3445
3445
|
alignItems: "center",
|
|
3446
3446
|
borderRadius: 6,
|
|
@@ -3453,16 +3453,16 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3453
3453
|
fontSize: 16,
|
|
3454
3454
|
fontWeight: "600"
|
|
3455
3455
|
}
|
|
3456
|
-
}),
|
|
3457
|
-
let t =
|
|
3458
|
-
return /* @__PURE__ */
|
|
3459
|
-
style: [
|
|
3460
|
-
children:
|
|
3456
|
+
}), ot = ({ children: e }) => e, st = ({ node: e }) => {
|
|
3457
|
+
let t = o(), { colors: n } = S(), r = t(e.data?.label);
|
|
3458
|
+
return /* @__PURE__ */ L(B, {
|
|
3459
|
+
style: [lt.title, { color: n.text }],
|
|
3460
|
+
children: r
|
|
3461
3461
|
});
|
|
3462
|
-
},
|
|
3463
|
-
let { colors: e } =
|
|
3464
|
-
return /* @__PURE__ */
|
|
3465
|
-
},
|
|
3462
|
+
}, ct = () => {
|
|
3463
|
+
let { colors: e } = S();
|
|
3464
|
+
return /* @__PURE__ */ L(H, { style: [lt.divider, { backgroundColor: e.separator }] });
|
|
3465
|
+
}, lt = z.create({
|
|
3466
3466
|
divider: {
|
|
3467
3467
|
height: 1,
|
|
3468
3468
|
marginBottom: 16,
|
|
@@ -3473,63 +3473,63 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3473
3473
|
fontWeight: "700",
|
|
3474
3474
|
marginBottom: 16
|
|
3475
3475
|
}
|
|
3476
|
-
}),
|
|
3477
|
-
divider:
|
|
3478
|
-
title:
|
|
3479
|
-
},
|
|
3476
|
+
}), ut = {
|
|
3477
|
+
divider: ct,
|
|
3478
|
+
title: st
|
|
3479
|
+
}, dt = ({ node: e, children: t }) => {
|
|
3480
3480
|
let { image: n } = e.data;
|
|
3481
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ R(H, { children: [n && /* @__PURE__ */ L(me, {
|
|
3482
3482
|
source: { uri: n },
|
|
3483
|
-
style:
|
|
3483
|
+
style: ft.image,
|
|
3484
3484
|
resizeMode: "cover"
|
|
3485
3485
|
}), t] });
|
|
3486
|
-
},
|
|
3486
|
+
}, ft = z.create({ image: {
|
|
3487
3487
|
borderRadius: 6,
|
|
3488
3488
|
height: 160,
|
|
3489
3489
|
marginBottom: 8,
|
|
3490
3490
|
width: "100%"
|
|
3491
|
-
} }),
|
|
3492
|
-
let { colors: t } =
|
|
3493
|
-
return
|
|
3494
|
-
let e =
|
|
3491
|
+
} }), pt = ({ style: e }) => {
|
|
3492
|
+
let { colors: t } = S(), n = F(new fe.Value(.5)).current;
|
|
3493
|
+
return se(() => {
|
|
3494
|
+
let e = fe.loop(fe.sequence([fe.timing(n, {
|
|
3495
3495
|
duration: 600,
|
|
3496
3496
|
toValue: 1,
|
|
3497
3497
|
useNativeDriver: !0
|
|
3498
|
-
}),
|
|
3498
|
+
}), fe.timing(n, {
|
|
3499
3499
|
duration: 600,
|
|
3500
3500
|
toValue: .5,
|
|
3501
3501
|
useNativeDriver: !0
|
|
3502
3502
|
})]));
|
|
3503
3503
|
return e.start(), () => e.stop();
|
|
3504
|
-
}, [n]), /* @__PURE__ */
|
|
3505
|
-
|
|
3504
|
+
}, [n]), /* @__PURE__ */ L(fe.View, { style: [
|
|
3505
|
+
ht.bar,
|
|
3506
3506
|
{
|
|
3507
3507
|
backgroundColor: t.muted,
|
|
3508
3508
|
opacity: n
|
|
3509
3509
|
},
|
|
3510
3510
|
e
|
|
3511
3511
|
] });
|
|
3512
|
-
},
|
|
3512
|
+
}, mt = () => /* @__PURE__ */ R(H, {
|
|
3513
3513
|
accessibilityState: { busy: !0 },
|
|
3514
3514
|
children: [
|
|
3515
|
-
/* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
style:
|
|
3515
|
+
/* @__PURE__ */ L(pt, { style: ht.title }),
|
|
3516
|
+
/* @__PURE__ */ L(H, {
|
|
3517
|
+
style: ht.fields,
|
|
3518
3518
|
children: [
|
|
3519
3519
|
0,
|
|
3520
3520
|
1,
|
|
3521
3521
|
2
|
|
3522
|
-
].map((e) => /* @__PURE__ */
|
|
3523
|
-
style:
|
|
3524
|
-
children: [/* @__PURE__ */
|
|
3522
|
+
].map((e) => /* @__PURE__ */ R(H, {
|
|
3523
|
+
style: ht.field,
|
|
3524
|
+
children: [/* @__PURE__ */ L(pt, { style: ht.fieldLabel }), /* @__PURE__ */ L(pt, { style: ht.fieldInput })]
|
|
3525
3525
|
}, e))
|
|
3526
3526
|
}),
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
style:
|
|
3529
|
-
children: /* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ L(H, {
|
|
3528
|
+
style: ht.actions,
|
|
3529
|
+
children: /* @__PURE__ */ L(pt, { style: ht.button })
|
|
3530
3530
|
})
|
|
3531
3531
|
]
|
|
3532
|
-
}),
|
|
3532
|
+
}), ht = z.create({
|
|
3533
3533
|
actions: {
|
|
3534
3534
|
alignItems: "flex-end",
|
|
3535
3535
|
marginTop: 24
|
|
@@ -3554,18 +3554,18 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3554
3554
|
marginBottom: 24,
|
|
3555
3555
|
width: "33%"
|
|
3556
3556
|
}
|
|
3557
|
-
}),
|
|
3558
|
-
let { colors:
|
|
3559
|
-
baseUrl:
|
|
3560
|
-
components:
|
|
3561
|
-
extraPayload:
|
|
3562
|
-
flow:
|
|
3563
|
-
googleApiKey:
|
|
3564
|
-
headers:
|
|
3565
|
-
initialValues:
|
|
3566
|
-
isSubmitting:
|
|
3567
|
-
language:
|
|
3568
|
-
onBack:
|
|
3557
|
+
}), gt = ({ baseUrl: e, components: t, contentContainerStyle: n, extraPayload: r, flow: i, googleApiKey: a, headers: o, initialValues: s, isLoading: c = !1, isSubmitting: l = !1, language: u, onBack: d, onChange: p, onSubmit: m, showPoweredBy: h, style: g, theme: _, title: v, validate: y, validationMode: b }) => {
|
|
3558
|
+
let { colors: x } = S(), { canContinue: C, canGoBack: w, clearSubmitMessage: T, config: E, currentStep: ee, currentStepGroupNode: D, currentStepIndex: O, formErrors: k, formTitle: A, formValues: j, handleBack: te, handleContinue: ne, handleSubmit: re, inputNodes: ae, isFinalStep: M, isFirstStep: N, isSubmitting: oe, missingRequiredFields: se, setFieldValue: ce, stepLabel: F, steps: I, submitMessage: le, t: ue } = ie({
|
|
3559
|
+
baseUrl: e,
|
|
3560
|
+
components: t,
|
|
3561
|
+
extraPayload: r,
|
|
3562
|
+
flow: i,
|
|
3563
|
+
googleApiKey: a,
|
|
3564
|
+
headers: o,
|
|
3565
|
+
initialValues: s,
|
|
3566
|
+
isSubmitting: l,
|
|
3567
|
+
language: u,
|
|
3568
|
+
onBack: d,
|
|
3569
3569
|
onChange: p,
|
|
3570
3570
|
onSubmit: m,
|
|
3571
3571
|
showPoweredBy: h,
|
|
@@ -3573,88 +3573,88 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3573
3573
|
title: v,
|
|
3574
3574
|
validate: y,
|
|
3575
3575
|
validationMode: b
|
|
3576
|
-
}), { FormWrapper: de, LoadingSkeleton: fe, StepComponent: pe, SubmitButtonWrapper: me, renderNode:
|
|
3576
|
+
}), { FormWrapper: de, LoadingSkeleton: fe, StepComponent: pe, SubmitButtonWrapper: me, renderNode: he } = P({
|
|
3577
3577
|
config: E,
|
|
3578
|
-
DefaultFormWrapper:
|
|
3579
|
-
DefaultInputLabel:
|
|
3580
|
-
DefaultInputWrapper:
|
|
3581
|
-
DefaultLoadingSkeleton:
|
|
3582
|
-
DefaultStep:
|
|
3583
|
-
DefaultSubmitButton:
|
|
3584
|
-
DefaultSubmitButtonWrapper:
|
|
3585
|
-
defaultInputRenderers:
|
|
3586
|
-
defaultUI:
|
|
3587
|
-
formErrors:
|
|
3588
|
-
formValues:
|
|
3589
|
-
inputNodes:
|
|
3590
|
-
isSubmitting:
|
|
3591
|
-
missingRequiredFields:
|
|
3592
|
-
setFieldValue:
|
|
3578
|
+
DefaultFormWrapper: ye,
|
|
3579
|
+
DefaultInputLabel: xe,
|
|
3580
|
+
DefaultInputWrapper: dt,
|
|
3581
|
+
DefaultLoadingSkeleton: mt,
|
|
3582
|
+
DefaultStep: nt,
|
|
3583
|
+
DefaultSubmitButton: it,
|
|
3584
|
+
DefaultSubmitButtonWrapper: ot,
|
|
3585
|
+
defaultInputRenderers: tt,
|
|
3586
|
+
defaultUI: ut,
|
|
3587
|
+
formErrors: k,
|
|
3588
|
+
formValues: j,
|
|
3589
|
+
inputNodes: ae,
|
|
3590
|
+
isSubmitting: oe,
|
|
3591
|
+
missingRequiredFields: se,
|
|
3592
|
+
setFieldValue: ce
|
|
3593
3593
|
});
|
|
3594
|
-
return /* @__PURE__ */
|
|
3594
|
+
return /* @__PURE__ */ R(ge, {
|
|
3595
3595
|
nestedScrollEnabled: !0,
|
|
3596
3596
|
style: [
|
|
3597
|
-
|
|
3598
|
-
{ backgroundColor:
|
|
3597
|
+
vt.container,
|
|
3598
|
+
{ backgroundColor: x.background },
|
|
3599
3599
|
g
|
|
3600
3600
|
],
|
|
3601
|
-
contentContainerStyle:
|
|
3602
|
-
children: [
|
|
3603
|
-
style: [
|
|
3604
|
-
children:
|
|
3605
|
-
}) : null,
|
|
3601
|
+
contentContainerStyle: n,
|
|
3602
|
+
children: [A ? /* @__PURE__ */ L(B, {
|
|
3603
|
+
style: [vt.title, { color: x.text }],
|
|
3604
|
+
children: A
|
|
3605
|
+
}) : null, c ? /* @__PURE__ */ L(fe, {}) : /* @__PURE__ */ R(f, {
|
|
3606
3606
|
value: {
|
|
3607
3607
|
baseUrl: E.baseUrl,
|
|
3608
|
-
flow:
|
|
3609
|
-
formErrors:
|
|
3610
|
-
formValues:
|
|
3608
|
+
flow: i,
|
|
3609
|
+
formErrors: k,
|
|
3610
|
+
formValues: j,
|
|
3611
3611
|
googleApiKey: E.googleApiKey,
|
|
3612
3612
|
headers: E.headers,
|
|
3613
|
-
inputNodes:
|
|
3613
|
+
inputNodes: ae,
|
|
3614
3614
|
language: E.language,
|
|
3615
|
-
setFieldValue:
|
|
3615
|
+
setFieldValue: ce
|
|
3616
3616
|
},
|
|
3617
|
-
children: [/* @__PURE__ */
|
|
3618
|
-
onSubmit:
|
|
3619
|
-
children: [ee && /* @__PURE__ */
|
|
3620
|
-
missingFields:
|
|
3621
|
-
children: /* @__PURE__ */
|
|
3617
|
+
children: [/* @__PURE__ */ R(de, {
|
|
3618
|
+
onSubmit: re,
|
|
3619
|
+
children: [ee && /* @__PURE__ */ L(me, {
|
|
3620
|
+
missingFields: se,
|
|
3621
|
+
children: /* @__PURE__ */ L(pe, {
|
|
3622
3622
|
step: ee,
|
|
3623
|
-
groupNode:
|
|
3624
|
-
stepIndex:
|
|
3625
|
-
totalSteps:
|
|
3626
|
-
isFirstStep:
|
|
3627
|
-
isLastStep:
|
|
3623
|
+
groupNode: D,
|
|
3624
|
+
stepIndex: O,
|
|
3625
|
+
totalSteps: I.length,
|
|
3626
|
+
isFirstStep: N,
|
|
3627
|
+
isLastStep: M,
|
|
3628
3628
|
canContinue: C,
|
|
3629
3629
|
canGoBack: w,
|
|
3630
|
-
isSubmitting:
|
|
3631
|
-
onBack:
|
|
3632
|
-
onContinue:
|
|
3633
|
-
label:
|
|
3634
|
-
children: ee.nodes.map((e) =>
|
|
3630
|
+
isSubmitting: oe,
|
|
3631
|
+
onBack: te,
|
|
3632
|
+
onContinue: ne,
|
|
3633
|
+
label: F,
|
|
3634
|
+
children: ee.nodes.map((e) => he(e))
|
|
3635
3635
|
})
|
|
3636
|
-
}), E.showPoweredBy && /* @__PURE__ */
|
|
3637
|
-
style: [
|
|
3636
|
+
}), E.showPoweredBy && /* @__PURE__ */ L(B, {
|
|
3637
|
+
style: [vt.poweredBy, { color: x.textMuted }],
|
|
3638
3638
|
children: "Powered by Treege"
|
|
3639
3639
|
})]
|
|
3640
|
-
}),
|
|
3641
|
-
style: [
|
|
3642
|
-
children: [/* @__PURE__ */
|
|
3643
|
-
style: [
|
|
3644
|
-
children:
|
|
3645
|
-
}), /* @__PURE__ */
|
|
3646
|
-
style: [
|
|
3640
|
+
}), le && /* @__PURE__ */ R(H, {
|
|
3641
|
+
style: [vt.message, { backgroundColor: le.type === "success" ? x.successBg : x.errorBg }],
|
|
3642
|
+
children: [/* @__PURE__ */ L(B, {
|
|
3643
|
+
style: [vt.messageText, { color: le.type === "success" ? x.success : x.error }],
|
|
3644
|
+
children: le.message
|
|
3645
|
+
}), /* @__PURE__ */ L(B, {
|
|
3646
|
+
style: [vt.messageClose, { color: le.type === "success" ? x.success : x.error }],
|
|
3647
3647
|
onPress: T,
|
|
3648
3648
|
children: ue("common.close")
|
|
3649
3649
|
})]
|
|
3650
3650
|
})]
|
|
3651
3651
|
})]
|
|
3652
3652
|
});
|
|
3653
|
-
},
|
|
3653
|
+
}, _t = (e) => /* @__PURE__ */ L(E, {
|
|
3654
3654
|
theme: e.theme,
|
|
3655
3655
|
storageKey: "treege-renderer-theme",
|
|
3656
|
-
children: /* @__PURE__ */
|
|
3657
|
-
}),
|
|
3656
|
+
children: /* @__PURE__ */ L(gt, { ...e })
|
|
3657
|
+
}), vt = z.create({
|
|
3658
3658
|
container: {
|
|
3659
3659
|
flexBasis: "auto",
|
|
3660
3660
|
flexGrow: 1,
|
|
@@ -3688,4 +3688,4 @@ var ve = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
|
3688
3688
|
}
|
|
3689
3689
|
});
|
|
3690
3690
|
//#endregion
|
|
3691
|
-
export {
|
|
3691
|
+
export { Te as DefaultAddressInput, Oe as DefaultAutocompleteInput, ke as DefaultCheckboxInput, Ae as DefaultDateInput, je as DefaultDateRangeInput, ct as DefaultDividerUI, Me as DefaultFileInput, Ne as DefaultHiddenInput, ze as DefaultHttpInput, xe as DefaultInputLabel, Be as DefaultNumberInput, He as DefaultPasswordInput, We as DefaultRadioInput, Ge as DefaultSelectInput, qe as DefaultSwitchInput, Ze as DefaultTextInput, Ye as DefaultTextareaInput, $e as DefaultTimeInput, et as DefaultTimeRangeInput, st as DefaultTitleUI, _t as TreegeRenderer, te as TreegeRendererProvider, w as applyReferenceTransformation, b as buildInitialFormValues, h as calculateReferenceFieldUpdates, C as checkFormFieldHasValue, T as convertFormValuesToNamedFormat, tt as defaultInputRenderers, ut as defaultUI, ae as evaluateCondition, N as evaluateConditions, y as fileNameFromUrl, v as fileToSerializable, m as filesToSerializable, M as findStartNode, D as formatFileSize, ne as getFlowRenderState, p as getTranslatedText, _ as isFieldEmpty, k as isRemoteFileData, j as isStartNode, g as normalizeSerializableFiles, x as resolveEmptyInputValue, ee as resolveNodeDefaultValue, A as sanitize, n as sanitizeHttpResponse, O as serializableToFile, ie as useTreegeRenderer, re as useTreegeRendererConfig };
|