treege 3.0.0-beta.82 → 3.0.0-beta.83
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-gSMNLq_s.js → DefaultSubmitButton-DpeL3OxC.js} +752 -701
- package/dist/{ThemeContext-BgTIhoK6.js → ThemeContext-BnPOFQC7.js} +82 -74
- package/dist/editor/features/TreegeEditor/inputs/TranslatableInput.d.ts +20 -0
- package/dist/{editor-D8Fi-2Z1.js → editor-CbcW0OVV.js} +1340 -1430
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/features/TreegeViewer/utils/viewerFields.d.ts +78 -0
- package/dist/renderer/features/TreegeViewer/web/TreegeViewer.d.ts +70 -0
- package/dist/renderer/index.d.ts +3 -0
- package/dist/renderer/utils/file.d.ts +15 -2
- package/dist/renderer-KRzuU6OD.js +411 -0
- package/dist/renderer-native.js +946 -946
- package/dist/renderer.js +5 -5
- package/dist/shared/utils/normalizeLabel.d.ts +2 -1
- package/dist/shared/utils/translations.d.ts +21 -1
- package/dist/useRenderNode-DQ5lvXuj.js +527 -0
- package/package.json +1 -1
- package/dist/renderer-DuixN0K9.js +0 -256
- package/dist/useRenderNode-B1sfwbia.js +0 -527
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 ce, Alert as
|
|
1
|
+
import { D as e, F as t, G as n, J as r, M as i, N as a, P as o, R as s, T as c, _ as l, a as u, b as d, c as f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, r as x, s as S, t as C, v as w, w as T, x as E, y as D, z as ee } from "./ThemeContext-BnPOFQC7.js";
|
|
2
|
+
import { a as O, c as k, i as A, l as j, n as te, o as ne, r as re, s as ie, t as M } from "./useRenderNode-DQ5lvXuj.js";
|
|
3
|
+
import { useCallback as ae, useEffect as oe, useMemo as se, useRef as N, useState as P } from "react";
|
|
4
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
5
|
+
import { ActivityIndicator as ce, Alert as R, Animated as le, FlatList as ue, Image as de, Modal as fe, ScrollView as pe, StyleSheet as z, Switch as me, Text as B, TextInput as he, 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 ge = ({ children: e }) => /* @__PURE__ */ I(H, {
|
|
8
|
+
style: _e.container,
|
|
9
9
|
children: e
|
|
10
|
-
}),
|
|
11
|
-
let { colors: r } =
|
|
12
|
-
return e ? /* @__PURE__ */
|
|
10
|
+
}), _e = z.create({ container: { padding: 16 } }), ve = ({ label: e, required: t, style: n }) => {
|
|
11
|
+
let { colors: r } = y();
|
|
12
|
+
return e ? /* @__PURE__ */ L(B, {
|
|
13
13
|
style: [
|
|
14
|
-
|
|
14
|
+
ye.label,
|
|
15
15
|
{ color: r.textSecondary },
|
|
16
16
|
n
|
|
17
17
|
],
|
|
18
|
-
children: [e, t && /* @__PURE__ */
|
|
18
|
+
children: [e, t && /* @__PURE__ */ I(B, {
|
|
19
19
|
style: { color: r.error },
|
|
20
20
|
children: "*"
|
|
21
21
|
})]
|
|
22
22
|
}) : null;
|
|
23
|
-
},
|
|
23
|
+
}, ye = z.create({ label: {
|
|
24
24
|
fontSize: 14,
|
|
25
25
|
fontWeight: "500",
|
|
26
26
|
marginBottom: 8
|
|
27
|
-
} }),
|
|
27
|
+
} }), be = 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 me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
39
39
|
} catch (e) {
|
|
40
40
|
return console.error("Nominatim fetch error:", e), [];
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, xe = 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,144 +52,144 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
52
52
|
} catch (e) {
|
|
53
53
|
return console.error("Google Places fetch error:", e), [];
|
|
54
54
|
}
|
|
55
|
-
},
|
|
56
|
-
let [
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
|
|
55
|
+
}, Se = ({ field: e, extra: n }) => {
|
|
56
|
+
let [r, i] = P(""), [a, o] = P([]), [s, c] = P(!1), [l, u] = P(!1), { value: d, placeholder: f, id: p, name: m } = e, { InputLabel: h, node: g, setValue: _, error: v, label: b, helperText: x } = n, { language: S, googleApiKey: C } = ee(), w = t(), { colors: T } = y(), E = ae((e) => {
|
|
57
|
+
_(e.value), i(""), c(!1), o([]);
|
|
58
|
+
}, [_]), D = () => {
|
|
59
|
+
c(!1);
|
|
60
60
|
};
|
|
61
|
-
return
|
|
62
|
-
if (!
|
|
63
|
-
o([]),
|
|
61
|
+
return oe(() => {
|
|
62
|
+
if (!r || r.trim().length < 3) {
|
|
63
|
+
o([]), u(!1);
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
u(!0);
|
|
67
67
|
let e = setTimeout(async () => {
|
|
68
|
-
o(
|
|
68
|
+
o(C ? await xe(r, C) : await be(r, S)), u(!1);
|
|
69
69
|
}, 300);
|
|
70
70
|
return () => {
|
|
71
|
-
clearTimeout(e),
|
|
71
|
+
clearTimeout(e), u(!1);
|
|
72
72
|
};
|
|
73
73
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
]), /* @__PURE__ */
|
|
74
|
+
r,
|
|
75
|
+
S,
|
|
76
|
+
C
|
|
77
|
+
]), /* @__PURE__ */ L(H, {
|
|
78
78
|
style: U.container,
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
label:
|
|
82
|
-
required:
|
|
80
|
+
/* @__PURE__ */ I(h, {
|
|
81
|
+
label: b,
|
|
82
|
+
required: g.data.required
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ L(V, {
|
|
85
85
|
style: [
|
|
86
86
|
U.trigger,
|
|
87
87
|
{
|
|
88
|
-
backgroundColor:
|
|
89
|
-
borderColor:
|
|
88
|
+
backgroundColor: T.input,
|
|
89
|
+
borderColor: T.border
|
|
90
90
|
},
|
|
91
|
-
|
|
91
|
+
v && { borderColor: T.error }
|
|
92
92
|
],
|
|
93
|
-
onPress: () =>
|
|
93
|
+
onPress: () => c(!0),
|
|
94
94
|
activeOpacity: .7,
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ I(B, {
|
|
96
96
|
style: [
|
|
97
97
|
U.triggerText,
|
|
98
|
-
{ color:
|
|
99
|
-
!
|
|
98
|
+
{ color: T.text },
|
|
99
|
+
!d && { color: T.textMuted }
|
|
100
100
|
],
|
|
101
101
|
numberOfLines: 1,
|
|
102
|
-
children:
|
|
103
|
-
}), /* @__PURE__ */
|
|
102
|
+
children: d || f || w("renderer.defaultAddressInput.enterAddress")
|
|
103
|
+
}), /* @__PURE__ */ I(B, {
|
|
104
104
|
style: U.icon,
|
|
105
105
|
children: "📍"
|
|
106
106
|
})]
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
visible:
|
|
108
|
+
/* @__PURE__ */ I(fe, {
|
|
109
|
+
visible: s,
|
|
110
110
|
transparent: !0,
|
|
111
111
|
animationType: "fade",
|
|
112
|
-
onRequestClose:
|
|
113
|
-
children: /* @__PURE__ */
|
|
112
|
+
onRequestClose: D,
|
|
113
|
+
children: /* @__PURE__ */ I(V, {
|
|
114
114
|
style: U.modalOverlay,
|
|
115
115
|
activeOpacity: 1,
|
|
116
|
-
onPress:
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
style: [U.modalContent, { backgroundColor:
|
|
116
|
+
onPress: D,
|
|
117
|
+
children: /* @__PURE__ */ L(V, {
|
|
118
|
+
style: [U.modalContent, { backgroundColor: T.card }],
|
|
119
119
|
activeOpacity: 1,
|
|
120
120
|
onPress: () => {},
|
|
121
121
|
children: [
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
style: [U.modalHeader, { borderBottomColor:
|
|
124
|
-
children: [/* @__PURE__ */
|
|
125
|
-
style: [U.modalTitle, { color:
|
|
126
|
-
children:
|
|
127
|
-
}), /* @__PURE__ */
|
|
128
|
-
onPress:
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
style: [U.closeButton, { color:
|
|
122
|
+
/* @__PURE__ */ L(H, {
|
|
123
|
+
style: [U.modalHeader, { borderBottomColor: T.separator }],
|
|
124
|
+
children: [/* @__PURE__ */ I(B, {
|
|
125
|
+
style: [U.modalTitle, { color: T.text }],
|
|
126
|
+
children: b || f || w("renderer.defaultAddressInput.enterAddress")
|
|
127
|
+
}), /* @__PURE__ */ I(V, {
|
|
128
|
+
onPress: D,
|
|
129
|
+
children: /* @__PURE__ */ I(B, {
|
|
130
|
+
style: [U.closeButton, { color: T.textMuted }],
|
|
131
131
|
children: "✕"
|
|
132
132
|
})
|
|
133
133
|
})]
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ L(H, {
|
|
136
136
|
style: U.searchContainer,
|
|
137
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ I(he, {
|
|
138
138
|
style: [U.searchInput, {
|
|
139
|
-
backgroundColor:
|
|
140
|
-
borderColor:
|
|
141
|
-
color:
|
|
139
|
+
backgroundColor: T.muted,
|
|
140
|
+
borderColor: T.border,
|
|
141
|
+
color: T.text
|
|
142
142
|
}],
|
|
143
|
-
placeholder:
|
|
144
|
-
placeholderTextColor:
|
|
145
|
-
value:
|
|
146
|
-
onChangeText:
|
|
143
|
+
placeholder: f || w("renderer.defaultAddressInput.enterAddress"),
|
|
144
|
+
placeholderTextColor: T.textMuted,
|
|
145
|
+
value: r,
|
|
146
|
+
onChangeText: i,
|
|
147
147
|
autoFocus: !0,
|
|
148
148
|
autoCapitalize: "none",
|
|
149
149
|
autoCorrect: !1
|
|
150
|
-
}),
|
|
150
|
+
}), l && /* @__PURE__ */ I(ce, {
|
|
151
151
|
size: "small",
|
|
152
|
-
color:
|
|
152
|
+
color: T.primary,
|
|
153
153
|
style: U.searchLoader
|
|
154
154
|
})]
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
l ? /* @__PURE__ */ L(H, {
|
|
157
157
|
style: U.loadingContainer,
|
|
158
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ I(ce, {
|
|
159
159
|
size: "small",
|
|
160
|
-
color:
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
-
style: [U.loadingText, { color:
|
|
163
|
-
children:
|
|
160
|
+
color: T.primary
|
|
161
|
+
}), /* @__PURE__ */ I(B, {
|
|
162
|
+
style: [U.loadingText, { color: T.textMuted }],
|
|
163
|
+
children: w("renderer.defaultAddressInput.searching")
|
|
164
164
|
})]
|
|
165
|
-
}) : /* @__PURE__ */
|
|
166
|
-
data:
|
|
165
|
+
}) : /* @__PURE__ */ I(ue, {
|
|
166
|
+
data: a,
|
|
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: r.length >= 3 ? /* @__PURE__ */ I(H, {
|
|
172
172
|
style: U.emptyContainer,
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
style: [U.emptyText, { color:
|
|
175
|
-
children:
|
|
173
|
+
children: /* @__PURE__ */ I(B, {
|
|
174
|
+
style: [U.emptyText, { color: T.textMuted }],
|
|
175
|
+
children: w("renderer.defaultAddressInput.noAddressesFound")
|
|
176
176
|
})
|
|
177
|
-
}) : /* @__PURE__ */
|
|
177
|
+
}) : /* @__PURE__ */ I(H, {
|
|
178
178
|
style: U.emptyContainer,
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
style: [U.emptyText, { color:
|
|
181
|
-
children:
|
|
179
|
+
children: /* @__PURE__ */ I(B, {
|
|
180
|
+
style: [U.emptyText, { color: T.textMuted }],
|
|
181
|
+
children: w("renderer.defaultAddressInput.typeMinChars")
|
|
182
182
|
})
|
|
183
183
|
}),
|
|
184
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
184
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ L(V, {
|
|
185
185
|
style: U.suggestionItem,
|
|
186
|
-
onPress: () =>
|
|
186
|
+
onPress: () => E(e),
|
|
187
187
|
activeOpacity: .7,
|
|
188
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ I(B, {
|
|
189
189
|
style: U.suggestionIcon,
|
|
190
190
|
children: "📍"
|
|
191
|
-
}), /* @__PURE__ */
|
|
192
|
-
style: [U.suggestionText, { color:
|
|
191
|
+
}), /* @__PURE__ */ I(B, {
|
|
192
|
+
style: [U.suggestionText, { color: T.text }],
|
|
193
193
|
numberOfLines: 2,
|
|
194
194
|
children: e.label
|
|
195
195
|
})]
|
|
@@ -199,13 +199,13 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
199
199
|
})
|
|
200
200
|
})
|
|
201
201
|
}),
|
|
202
|
-
|
|
203
|
-
style: [U.error, { color:
|
|
204
|
-
children:
|
|
202
|
+
v && /* @__PURE__ */ I(B, {
|
|
203
|
+
style: [U.error, { color: T.error }],
|
|
204
|
+
children: v
|
|
205
205
|
}),
|
|
206
|
-
|
|
207
|
-
style: [U.helperText, { color:
|
|
208
|
-
children:
|
|
206
|
+
x && !v && /* @__PURE__ */ I(B, {
|
|
207
|
+
style: [U.helperText, { color: T.textMuted }],
|
|
208
|
+
children: x
|
|
209
209
|
})
|
|
210
210
|
]
|
|
211
211
|
});
|
|
@@ -314,25 +314,25 @@ var me = ({ children: e }) => /* @__PURE__ */ P(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
|
+
}), Ce = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
318
|
+
let { colors: i } = y();
|
|
319
|
+
return /* @__PURE__ */ L(H, {
|
|
320
|
+
style: we.content,
|
|
321
|
+
children: [n ? /* @__PURE__ */ I(de, {
|
|
322
322
|
source: { uri: n },
|
|
323
|
-
style:
|
|
324
|
-
}) : null, /* @__PURE__ */
|
|
325
|
-
style:
|
|
326
|
-
children: [/* @__PURE__ */
|
|
327
|
-
style: [
|
|
323
|
+
style: we.image
|
|
324
|
+
}) : null, /* @__PURE__ */ L(H, {
|
|
325
|
+
style: we.textWrapper,
|
|
326
|
+
children: [/* @__PURE__ */ I(B, {
|
|
327
|
+
style: [we.label, { color: r ? i.textMuted : i.text }],
|
|
328
328
|
children: e
|
|
329
|
-
}), t ? /* @__PURE__ */
|
|
330
|
-
style: [
|
|
329
|
+
}), t ? /* @__PURE__ */ I(B, {
|
|
330
|
+
style: [we.description, { color: i.textMuted }],
|
|
331
331
|
children: t
|
|
332
332
|
}) : null]
|
|
333
333
|
})]
|
|
334
334
|
});
|
|
335
|
-
},
|
|
335
|
+
}, we = z.create({
|
|
336
336
|
content: {
|
|
337
337
|
alignItems: "center",
|
|
338
338
|
flex: 1,
|
|
@@ -350,28 +350,28 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
350
350
|
},
|
|
351
351
|
label: { fontSize: 14 },
|
|
352
352
|
textWrapper: { flex: 1 }
|
|
353
|
-
}),
|
|
354
|
-
let [
|
|
355
|
-
if (!
|
|
356
|
-
let e =
|
|
353
|
+
}), Te = ({ field: e, extra: n }) => {
|
|
354
|
+
let [r, i] = P(!1), [a, o] = P(""), { value: s, placeholder: c } = e, { InputLabel: l, node: u, setValue: d, error: f, label: p, helperText: m } = n, h = t(), { colors: g } = y(), _ = u.data.options || [], v = _.find((e) => e.value === s), b = se(() => {
|
|
355
|
+
if (!a.trim()) return _;
|
|
356
|
+
let e = a.toLowerCase();
|
|
357
357
|
return _.filter((t) => h(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
358
358
|
}, [
|
|
359
359
|
_,
|
|
360
|
-
|
|
360
|
+
a,
|
|
361
361
|
h
|
|
362
362
|
]), x = (e) => {
|
|
363
|
-
d(e ===
|
|
363
|
+
d(e === s ? "" : e), i(!1), o("");
|
|
364
364
|
}, S = () => {
|
|
365
|
-
|
|
365
|
+
i(!1), o("");
|
|
366
366
|
};
|
|
367
|
-
return /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ L(H, {
|
|
368
368
|
style: W.container,
|
|
369
369
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ I(l, {
|
|
371
371
|
label: p,
|
|
372
372
|
required: u.data.required
|
|
373
373
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ L(V, {
|
|
375
375
|
style: [
|
|
376
376
|
W.trigger,
|
|
377
377
|
{
|
|
@@ -380,19 +380,19 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
380
380
|
},
|
|
381
381
|
f && { borderColor: g.error }
|
|
382
382
|
],
|
|
383
|
-
onPress: () =>
|
|
383
|
+
onPress: () => i(!0),
|
|
384
384
|
activeOpacity: .7,
|
|
385
385
|
children: [
|
|
386
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ I(B, {
|
|
387
387
|
style: [
|
|
388
388
|
W.triggerText,
|
|
389
389
|
{ color: g.text },
|
|
390
|
-
!
|
|
390
|
+
!s && { color: g.textMuted }
|
|
391
391
|
],
|
|
392
392
|
numberOfLines: 1,
|
|
393
|
-
children:
|
|
393
|
+
children: s && v ? h(v.label) : c || h("renderer.defaultAutocompleteInput.selectOption")
|
|
394
394
|
}),
|
|
395
|
-
|
|
395
|
+
s ? /* @__PURE__ */ I(V, {
|
|
396
396
|
onPress: () => d(""),
|
|
397
397
|
hitSlop: {
|
|
398
398
|
bottom: 8,
|
|
@@ -401,47 +401,47 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
401
401
|
top: 8
|
|
402
402
|
},
|
|
403
403
|
style: W.clearButton,
|
|
404
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ I(B, {
|
|
405
405
|
style: [W.clearIcon, { color: g.textMuted }],
|
|
406
406
|
children: "✕"
|
|
407
407
|
})
|
|
408
408
|
}) : null,
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ I(B, {
|
|
410
410
|
style: [W.arrow, { color: g.textMuted }],
|
|
411
411
|
children: "▼"
|
|
412
412
|
})
|
|
413
413
|
]
|
|
414
414
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
visible:
|
|
415
|
+
/* @__PURE__ */ I(fe, {
|
|
416
|
+
visible: r,
|
|
417
417
|
transparent: !0,
|
|
418
418
|
animationType: "fade",
|
|
419
419
|
onRequestClose: S,
|
|
420
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ I(V, {
|
|
421
421
|
style: W.modalOverlay,
|
|
422
422
|
activeOpacity: 1,
|
|
423
423
|
onPress: S,
|
|
424
|
-
children: /* @__PURE__ */
|
|
424
|
+
children: /* @__PURE__ */ L(V, {
|
|
425
425
|
style: [W.modalContent, { backgroundColor: g.card }],
|
|
426
426
|
activeOpacity: 1,
|
|
427
427
|
onPress: () => {},
|
|
428
428
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ L(H, {
|
|
430
430
|
style: [W.modalHeader, { borderBottomColor: g.separator }],
|
|
431
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ I(B, {
|
|
432
432
|
style: [W.modalTitle, { color: g.text }],
|
|
433
433
|
children: p || c || h("renderer.defaultAutocompleteInput.selectOption")
|
|
434
|
-
}), /* @__PURE__ */
|
|
434
|
+
}), /* @__PURE__ */ I(V, {
|
|
435
435
|
onPress: S,
|
|
436
|
-
children: /* @__PURE__ */
|
|
436
|
+
children: /* @__PURE__ */ I(B, {
|
|
437
437
|
style: [W.closeButton, { color: g.textMuted }],
|
|
438
438
|
children: "✕"
|
|
439
439
|
})
|
|
440
440
|
})]
|
|
441
441
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ I(H, {
|
|
443
443
|
style: W.searchContainer,
|
|
444
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ I(he, {
|
|
445
445
|
style: [W.searchInput, {
|
|
446
446
|
backgroundColor: g.muted,
|
|
447
447
|
borderColor: g.border,
|
|
@@ -449,38 +449,38 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
449
449
|
}],
|
|
450
450
|
placeholder: c || h("renderer.defaultAutocompleteInput.search"),
|
|
451
451
|
placeholderTextColor: g.textMuted,
|
|
452
|
-
value:
|
|
453
|
-
onChangeText:
|
|
452
|
+
value: a,
|
|
453
|
+
onChangeText: o,
|
|
454
454
|
autoFocus: !0,
|
|
455
455
|
autoCapitalize: "none",
|
|
456
456
|
autoCorrect: !1
|
|
457
457
|
})
|
|
458
458
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
data:
|
|
459
|
+
/* @__PURE__ */ I(ue, {
|
|
460
|
+
data: b,
|
|
461
461
|
keyExtractor: (e) => e.value,
|
|
462
462
|
style: W.optionsList,
|
|
463
463
|
contentContainerStyle: W.optionsListContent,
|
|
464
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
464
|
+
ListEmptyComponent: /* @__PURE__ */ I(H, {
|
|
465
465
|
style: W.emptyContainer,
|
|
466
|
-
children: /* @__PURE__ */
|
|
466
|
+
children: /* @__PURE__ */ I(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
|
-
let t = e.value ===
|
|
473
|
-
return /* @__PURE__ */
|
|
472
|
+
let t = e.value === s;
|
|
473
|
+
return /* @__PURE__ */ L(V, {
|
|
474
474
|
style: [W.option, t && { backgroundColor: g.primaryLight }],
|
|
475
475
|
onPress: () => x(e.value),
|
|
476
476
|
disabled: e.disabled,
|
|
477
477
|
activeOpacity: .7,
|
|
478
|
-
children: [/* @__PURE__ */
|
|
478
|
+
children: [/* @__PURE__ */ I(Ce, {
|
|
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__ */ I(B, {
|
|
484
484
|
style: [W.checkmark, { color: g.primary }],
|
|
485
485
|
children: "✓"
|
|
486
486
|
})]
|
|
@@ -491,11 +491,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
491
491
|
})
|
|
492
492
|
})
|
|
493
493
|
}),
|
|
494
|
-
f && /* @__PURE__ */
|
|
494
|
+
f && /* @__PURE__ */ I(B, {
|
|
495
495
|
style: [W.error, { color: g.error }],
|
|
496
496
|
children: f
|
|
497
497
|
}),
|
|
498
|
-
m && !f && /* @__PURE__ */
|
|
498
|
+
m && !f && /* @__PURE__ */ I(B, {
|
|
499
499
|
style: [W.helperText, { color: g.textMuted }],
|
|
500
500
|
children: m
|
|
501
501
|
})
|
|
@@ -588,20 +588,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
588
588
|
flex: 1,
|
|
589
589
|
fontSize: 14
|
|
590
590
|
}
|
|
591
|
-
}),
|
|
592
|
-
let
|
|
593
|
-
|
|
591
|
+
}), Ee = ({ field: e, extra: n }) => {
|
|
592
|
+
let r = t(), { value: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = n, { colors: d } = y(), f = o.data.options || [], p = f.length > 0, m = Array.isArray(i) ? i : [], h = typeof i == "boolean" ? i : !1, g = (e) => {
|
|
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__ */ L(H, {
|
|
596
596
|
style: G.container,
|
|
597
597
|
children: [
|
|
598
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ I(a, {
|
|
599
599
|
label: l,
|
|
600
|
-
required:
|
|
600
|
+
required: o.data.required
|
|
601
601
|
}),
|
|
602
602
|
f.length > 0 ? f.map((e) => {
|
|
603
|
-
let t =
|
|
604
|
-
return /* @__PURE__ */
|
|
603
|
+
let t = r(e.description);
|
|
604
|
+
return /* @__PURE__ */ L(V, {
|
|
605
605
|
style: G.option,
|
|
606
606
|
onPress: () => g(e.value),
|
|
607
607
|
disabled: e.disabled,
|
|
@@ -612,9 +612,9 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
612
612
|
checked: _(e.value),
|
|
613
613
|
disabled: e.disabled
|
|
614
614
|
},
|
|
615
|
-
accessibilityLabel:
|
|
615
|
+
accessibilityLabel: r(e.label) || e.value,
|
|
616
616
|
children: [
|
|
617
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ I(H, {
|
|
618
618
|
style: [
|
|
619
619
|
G.checkbox,
|
|
620
620
|
{
|
|
@@ -626,40 +626,40 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
626
626
|
borderColor: d.primary
|
|
627
627
|
}
|
|
628
628
|
],
|
|
629
|
-
children: _(e.value) && /* @__PURE__ */
|
|
629
|
+
children: _(e.value) && /* @__PURE__ */ I(B, {
|
|
630
630
|
style: G.checkmark,
|
|
631
631
|
children: "✓"
|
|
632
632
|
})
|
|
633
633
|
}),
|
|
634
|
-
e.image ? /* @__PURE__ */
|
|
634
|
+
e.image ? /* @__PURE__ */ I(de, {
|
|
635
635
|
source: { uri: e.image },
|
|
636
636
|
style: G.image
|
|
637
637
|
}) : null,
|
|
638
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ L(H, {
|
|
639
639
|
style: G.optionTextContainer,
|
|
640
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ I(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: r(e.label) || e.value
|
|
647
|
+
}), t && /* @__PURE__ */ I(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__ */ L(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 || o.data.name,
|
|
662
|
+
children: [/* @__PURE__ */ I(H, {
|
|
663
663
|
style: [
|
|
664
664
|
G.checkbox,
|
|
665
665
|
{
|
|
@@ -671,20 +671,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
671
671
|
borderColor: d.primary
|
|
672
672
|
}
|
|
673
673
|
],
|
|
674
|
-
children: h && /* @__PURE__ */
|
|
674
|
+
children: h && /* @__PURE__ */ I(B, {
|
|
675
675
|
style: G.checkmark,
|
|
676
676
|
children: "✓"
|
|
677
677
|
})
|
|
678
|
-
}), l && /* @__PURE__ */
|
|
678
|
+
}), l && /* @__PURE__ */ I(B, {
|
|
679
679
|
style: [G.optionLabel, { color: d.textSecondary }],
|
|
680
680
|
children: l
|
|
681
681
|
})]
|
|
682
682
|
}),
|
|
683
|
-
c && /* @__PURE__ */
|
|
683
|
+
c && /* @__PURE__ */ I(B, {
|
|
684
684
|
style: [G.error, { color: d.error }],
|
|
685
685
|
children: c
|
|
686
686
|
}),
|
|
687
|
-
u && !c && /* @__PURE__ */
|
|
687
|
+
u && !c && /* @__PURE__ */ I(B, {
|
|
688
688
|
style: [G.helperText, { color: d.textMuted }],
|
|
689
689
|
children: u
|
|
690
690
|
})
|
|
@@ -731,15 +731,15 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
731
731
|
},
|
|
732
732
|
optionLabel: { fontSize: 14 },
|
|
733
733
|
optionTextContainer: { flex: 1 }
|
|
734
|
-
}),
|
|
735
|
-
let [
|
|
734
|
+
}), De = ({ field: e, extra: n }) => {
|
|
735
|
+
let [r, i] = P(!1), { value: a, placeholder: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = n, { colors: p } = y(), m = t(), h = a ? new Date(a) : void 0, { year: g, month: _, today: v } = se(() => {
|
|
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]), [
|
|
742
|
+
}, [h]), [b, x] = P(g), [S, C] = P(_), w = [
|
|
743
743
|
"January",
|
|
744
744
|
"February",
|
|
745
745
|
"March",
|
|
@@ -752,44 +752,44 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
752
752
|
"October",
|
|
753
753
|
"November",
|
|
754
754
|
"December"
|
|
755
|
-
], T =
|
|
756
|
-
let e = new Date(
|
|
755
|
+
], T = se(() => {
|
|
756
|
+
let e = new Date(b, S, 1).getDay(), t = new Date(b, S + 1, 0).getDate(), n = new Date(b, S, 0).getDate(), r = [];
|
|
757
757
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
758
|
-
date: new Date(
|
|
758
|
+
date: new Date(b, S - 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(
|
|
763
|
+
date: new Date(b, S, 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(
|
|
769
|
+
date: new Date(b, S + 1, e),
|
|
770
770
|
day: e,
|
|
771
771
|
isCurrentMonth: !1
|
|
772
772
|
});
|
|
773
773
|
return r;
|
|
774
|
-
}, [
|
|
775
|
-
c.data.disablePast && e < v || (l(e.toISOString()),
|
|
774
|
+
}, [b, S]), E = ae((e) => {
|
|
775
|
+
c.data.disablePast && e < v || (l(e.toISOString()), i(!1));
|
|
776
776
|
}, [
|
|
777
777
|
c.data.disablePast,
|
|
778
778
|
v,
|
|
779
779
|
l
|
|
780
780
|
]), D = () => {
|
|
781
|
-
S === 0 ? (C(11), x(
|
|
782
|
-
},
|
|
783
|
-
S === 11 ? (C(0), x(
|
|
784
|
-
},
|
|
785
|
-
return /* @__PURE__ */
|
|
781
|
+
S === 0 ? (C(11), x(b - 1)) : C(S - 1);
|
|
782
|
+
}, ee = () => {
|
|
783
|
+
S === 11 ? (C(0), x(b + 1)) : C(S + 1);
|
|
784
|
+
}, O = () => h ? h.toLocaleDateString() : o || 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__ */ L(H, {
|
|
786
786
|
style: K.container,
|
|
787
787
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ I(s, {
|
|
789
789
|
label: d,
|
|
790
790
|
required: c.data.required
|
|
791
791
|
}),
|
|
792
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ L(V, {
|
|
793
793
|
style: [
|
|
794
794
|
K.trigger,
|
|
795
795
|
{
|
|
@@ -798,78 +798,78 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
798
798
|
},
|
|
799
799
|
u && { borderColor: p.error }
|
|
800
800
|
],
|
|
801
|
-
onPress: () =>
|
|
801
|
+
onPress: () => i(!0),
|
|
802
802
|
activeOpacity: .7,
|
|
803
|
-
children: [/* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ I(B, {
|
|
804
804
|
style: [
|
|
805
805
|
K.triggerText,
|
|
806
806
|
{ color: p.text },
|
|
807
|
-
!
|
|
807
|
+
!a && { color: p.textMuted }
|
|
808
808
|
],
|
|
809
809
|
numberOfLines: 1,
|
|
810
|
-
children:
|
|
811
|
-
}), /* @__PURE__ */
|
|
810
|
+
children: O()
|
|
811
|
+
}), /* @__PURE__ */ I(B, {
|
|
812
812
|
style: K.icon,
|
|
813
813
|
children: "📅"
|
|
814
814
|
})]
|
|
815
815
|
}),
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
visible:
|
|
816
|
+
/* @__PURE__ */ I(fe, {
|
|
817
|
+
visible: r,
|
|
818
818
|
transparent: !0,
|
|
819
819
|
animationType: "fade",
|
|
820
|
-
onRequestClose: () =>
|
|
821
|
-
children: /* @__PURE__ */
|
|
820
|
+
onRequestClose: () => i(!1),
|
|
821
|
+
children: /* @__PURE__ */ I(V, {
|
|
822
822
|
style: K.modalOverlay,
|
|
823
823
|
activeOpacity: 1,
|
|
824
|
-
onPress: () =>
|
|
825
|
-
children: /* @__PURE__ */
|
|
824
|
+
onPress: () => i(!1),
|
|
825
|
+
children: /* @__PURE__ */ L(V, {
|
|
826
826
|
style: [K.modalContent, { backgroundColor: p.card }],
|
|
827
827
|
activeOpacity: 1,
|
|
828
828
|
onPress: () => {},
|
|
829
829
|
children: [
|
|
830
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ L(H, {
|
|
831
831
|
style: [K.modalHeader, { borderBottomColor: p.separator }],
|
|
832
|
-
children: [/* @__PURE__ */
|
|
832
|
+
children: [/* @__PURE__ */ I(B, {
|
|
833
833
|
style: [K.modalTitle, { color: p.text }],
|
|
834
|
-
children: d ||
|
|
835
|
-
}), /* @__PURE__ */
|
|
836
|
-
onPress: () =>
|
|
837
|
-
children: /* @__PURE__ */
|
|
834
|
+
children: d || o || m("renderer.defaultInputs.selectDate")
|
|
835
|
+
}), /* @__PURE__ */ I(V, {
|
|
836
|
+
onPress: () => i(!1),
|
|
837
|
+
children: /* @__PURE__ */ I(B, {
|
|
838
838
|
style: [K.closeButton, { color: p.textMuted }],
|
|
839
839
|
children: "✕"
|
|
840
840
|
})
|
|
841
841
|
})]
|
|
842
842
|
}),
|
|
843
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ L(H, {
|
|
844
844
|
style: K.calendarHeader,
|
|
845
845
|
children: [
|
|
846
|
-
/* @__PURE__ */
|
|
846
|
+
/* @__PURE__ */ I(V, {
|
|
847
847
|
onPress: D,
|
|
848
848
|
style: K.navButton,
|
|
849
|
-
children: /* @__PURE__ */
|
|
849
|
+
children: /* @__PURE__ */ I(B, {
|
|
850
850
|
style: [K.navButtonText, { color: p.primary }],
|
|
851
851
|
children: "‹"
|
|
852
852
|
})
|
|
853
853
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ L(B, {
|
|
855
855
|
style: [K.monthYear, { color: p.text }],
|
|
856
856
|
children: [
|
|
857
857
|
w[S],
|
|
858
858
|
" ",
|
|
859
|
-
|
|
859
|
+
b
|
|
860
860
|
]
|
|
861
861
|
}),
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
onPress:
|
|
862
|
+
/* @__PURE__ */ I(V, {
|
|
863
|
+
onPress: ee,
|
|
864
864
|
style: K.navButton,
|
|
865
|
-
children: /* @__PURE__ */
|
|
865
|
+
children: /* @__PURE__ */ I(B, {
|
|
866
866
|
style: [K.navButtonText, { color: p.primary }],
|
|
867
867
|
children: "›"
|
|
868
868
|
})
|
|
869
869
|
})
|
|
870
870
|
]
|
|
871
871
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ I(H, {
|
|
873
873
|
style: K.weekDays,
|
|
874
874
|
children: [
|
|
875
875
|
"Sun",
|
|
@@ -879,12 +879,12 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
879
879
|
"Thu",
|
|
880
880
|
"Fri",
|
|
881
881
|
"Sat"
|
|
882
|
-
].map((e) => /* @__PURE__ */
|
|
882
|
+
].map((e) => /* @__PURE__ */ I(B, {
|
|
883
883
|
style: [K.weekDay, { color: p.textMuted }],
|
|
884
884
|
children: e
|
|
885
885
|
}, e))
|
|
886
886
|
}),
|
|
887
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ I(ue, {
|
|
888
888
|
data: T,
|
|
889
889
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
890
890
|
numColumns: 7,
|
|
@@ -892,8 +892,8 @@ var me = ({ children: e }) => /* @__PURE__ */ P(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__ */ I(V, {
|
|
897
897
|
style: [
|
|
898
898
|
K.dayCell,
|
|
899
899
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
@@ -906,7 +906,7 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
906
906
|
onPress: () => E(e.date),
|
|
907
907
|
disabled: t,
|
|
908
908
|
activeOpacity: .7,
|
|
909
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ I(B, {
|
|
910
910
|
style: [
|
|
911
911
|
K.dayText,
|
|
912
912
|
{ color: p.text },
|
|
@@ -926,11 +926,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
926
926
|
})
|
|
927
927
|
})
|
|
928
928
|
}),
|
|
929
|
-
u && /* @__PURE__ */
|
|
929
|
+
u && /* @__PURE__ */ I(B, {
|
|
930
930
|
style: [K.error, { color: p.error }],
|
|
931
931
|
children: u
|
|
932
932
|
}),
|
|
933
|
-
f && !u && /* @__PURE__ */
|
|
933
|
+
f && !u && /* @__PURE__ */ I(B, {
|
|
934
934
|
style: [K.helperText, { color: p.textMuted }],
|
|
935
935
|
children: f
|
|
936
936
|
})
|
|
@@ -1031,15 +1031,15 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1031
1031
|
flexDirection: "row",
|
|
1032
1032
|
marginBottom: 8
|
|
1033
1033
|
}
|
|
1034
|
-
}),
|
|
1035
|
-
let [
|
|
1034
|
+
}), Oe = ({ field: e, extra: n }) => {
|
|
1035
|
+
let [r, i] = P(!1), [a, o] = P(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = n, m = t(), { colors: h } = y(), g = Array.isArray(s) ? s : [], _ = g[0] ? new Date(g[0]) : void 0, v = g[1] ? new Date(g[1]) : void 0, { year: b, month: x, today: S } = se(() => {
|
|
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] = P(b), [T, E] = P(x), D = [
|
|
1043
1043
|
"January",
|
|
1044
1044
|
"February",
|
|
1045
1045
|
"March",
|
|
@@ -1052,7 +1052,7 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1052
1052
|
"October",
|
|
1053
1053
|
"November",
|
|
1054
1054
|
"December"
|
|
1055
|
-
],
|
|
1055
|
+
], ee = se(() => {
|
|
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 me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1071
1071
|
isCurrentMonth: !1
|
|
1072
1072
|
});
|
|
1073
1073
|
return r;
|
|
1074
|
-
}, [C, T]),
|
|
1075
|
-
l.data.disablePast && e < S || (
|
|
1074
|
+
}, [C, T]), O = ae((e) => {
|
|
1075
|
+
l.data.disablePast && e < S || (a ? (u([e.toISOString(), v?.toISOString()]), o(!1)) : (u(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), i(!1), o(!0)));
|
|
1076
1076
|
}, [
|
|
1077
1077
|
l.data.disablePast,
|
|
1078
1078
|
S,
|
|
1079
|
-
|
|
1079
|
+
a,
|
|
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 < S : !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__ */ L(H, {
|
|
1093
1093
|
style: q.container,
|
|
1094
1094
|
children: [
|
|
1095
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ I(c, {
|
|
1096
1096
|
label: f,
|
|
1097
1097
|
required: l.data.required
|
|
1098
1098
|
}),
|
|
1099
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ L(V, {
|
|
1100
1100
|
style: [
|
|
1101
1101
|
q.trigger,
|
|
1102
1102
|
{
|
|
@@ -1105,67 +1105,67 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1105
1105
|
},
|
|
1106
1106
|
d && { borderColor: h.error }
|
|
1107
1107
|
],
|
|
1108
|
-
onPress: () =>
|
|
1108
|
+
onPress: () => i(!0),
|
|
1109
1109
|
activeOpacity: .7,
|
|
1110
|
-
children: [/* @__PURE__ */
|
|
1110
|
+
children: [/* @__PURE__ */ I(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__ */ I(B, {
|
|
1119
1119
|
style: q.icon,
|
|
1120
1120
|
children: "📅"
|
|
1121
1121
|
})]
|
|
1122
1122
|
}),
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
visible:
|
|
1123
|
+
/* @__PURE__ */ I(fe, {
|
|
1124
|
+
visible: r,
|
|
1125
1125
|
transparent: !0,
|
|
1126
1126
|
animationType: "fade",
|
|
1127
|
-
onRequestClose: () =>
|
|
1128
|
-
children: /* @__PURE__ */
|
|
1127
|
+
onRequestClose: () => i(!1),
|
|
1128
|
+
children: /* @__PURE__ */ I(V, {
|
|
1129
1129
|
style: q.modalOverlay,
|
|
1130
1130
|
activeOpacity: 1,
|
|
1131
|
-
onPress: () =>
|
|
1132
|
-
children: /* @__PURE__ */
|
|
1131
|
+
onPress: () => i(!1),
|
|
1132
|
+
children: /* @__PURE__ */ L(V, {
|
|
1133
1133
|
style: [q.modalContent, { backgroundColor: h.card }],
|
|
1134
1134
|
activeOpacity: 1,
|
|
1135
1135
|
onPress: () => {},
|
|
1136
1136
|
children: [
|
|
1137
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ L(H, {
|
|
1138
1138
|
style: [q.modalHeader, { borderBottomColor: h.separator }],
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1139
|
+
children: [/* @__PURE__ */ I(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__ */ I(V, {
|
|
1143
|
+
onPress: () => i(!1),
|
|
1144
|
+
children: /* @__PURE__ */ I(B, {
|
|
1145
1145
|
style: [q.closeButton, { color: h.textMuted }],
|
|
1146
1146
|
children: "✕"
|
|
1147
1147
|
})
|
|
1148
1148
|
})]
|
|
1149
1149
|
}),
|
|
1150
|
-
/* @__PURE__ */
|
|
1150
|
+
/* @__PURE__ */ I(H, {
|
|
1151
1151
|
style: [q.rangeIndicator, { backgroundColor: h.primaryLight }],
|
|
1152
|
-
children: /* @__PURE__ */
|
|
1152
|
+
children: /* @__PURE__ */ I(B, {
|
|
1153
1153
|
style: [q.rangeIndicatorText, { color: h.primary }],
|
|
1154
|
-
children: m(
|
|
1154
|
+
children: m(a ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1155
1155
|
})
|
|
1156
1156
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ L(H, {
|
|
1158
1158
|
style: q.calendarHeader,
|
|
1159
1159
|
children: [
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
onPress:
|
|
1160
|
+
/* @__PURE__ */ I(V, {
|
|
1161
|
+
onPress: k,
|
|
1162
1162
|
style: q.navButton,
|
|
1163
|
-
children: /* @__PURE__ */
|
|
1163
|
+
children: /* @__PURE__ */ I(B, {
|
|
1164
1164
|
style: [q.navButtonText, { color: h.primary }],
|
|
1165
1165
|
children: "‹"
|
|
1166
1166
|
})
|
|
1167
1167
|
}),
|
|
1168
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ L(B, {
|
|
1169
1169
|
style: [q.monthYear, { color: h.text }],
|
|
1170
1170
|
children: [
|
|
1171
1171
|
D[T],
|
|
@@ -1173,17 +1173,17 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1173
1173
|
C
|
|
1174
1174
|
]
|
|
1175
1175
|
}),
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
onPress:
|
|
1176
|
+
/* @__PURE__ */ I(V, {
|
|
1177
|
+
onPress: A,
|
|
1178
1178
|
style: q.navButton,
|
|
1179
|
-
children: /* @__PURE__ */
|
|
1179
|
+
children: /* @__PURE__ */ I(B, {
|
|
1180
1180
|
style: [q.navButtonText, { color: h.primary }],
|
|
1181
1181
|
children: "›"
|
|
1182
1182
|
})
|
|
1183
1183
|
})
|
|
1184
1184
|
]
|
|
1185
1185
|
}),
|
|
1186
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ I(H, {
|
|
1187
1187
|
style: q.weekDays,
|
|
1188
1188
|
children: [
|
|
1189
1189
|
"Sun",
|
|
@@ -1193,21 +1193,21 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1193
1193
|
"Thu",
|
|
1194
1194
|
"Fri",
|
|
1195
1195
|
"Sat"
|
|
1196
|
-
].map((e) => /* @__PURE__ */
|
|
1196
|
+
].map((e) => /* @__PURE__ */ I(B, {
|
|
1197
1197
|
style: [q.weekDay, { color: h.textMuted }],
|
|
1198
1198
|
children: e
|
|
1199
1199
|
}, e))
|
|
1200
1200
|
}),
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
data:
|
|
1201
|
+
/* @__PURE__ */ I(ue, {
|
|
1202
|
+
data: ee,
|
|
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__ */ I(V, {
|
|
1211
1211
|
style: [
|
|
1212
1212
|
q.dayCell,
|
|
1213
1213
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
@@ -1218,10 +1218,10 @@ var me = ({ children: e }) => /* @__PURE__ */ P(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__ */ I(B, {
|
|
1225
1225
|
style: [
|
|
1226
1226
|
q.dayText,
|
|
1227
1227
|
{ color: h.text },
|
|
@@ -1242,11 +1242,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1242
1242
|
})
|
|
1243
1243
|
})
|
|
1244
1244
|
}),
|
|
1245
|
-
d && /* @__PURE__ */
|
|
1245
|
+
d && /* @__PURE__ */ I(B, {
|
|
1246
1246
|
style: [q.error, { color: h.error }],
|
|
1247
1247
|
children: d
|
|
1248
1248
|
}),
|
|
1249
|
-
p && !d && /* @__PURE__ */
|
|
1249
|
+
p && !d && /* @__PURE__ */ I(B, {
|
|
1250
1250
|
style: [q.helperText, { color: h.textMuted }],
|
|
1251
1251
|
children: p
|
|
1252
1252
|
})
|
|
@@ -1357,128 +1357,128 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1357
1357
|
flexDirection: "row",
|
|
1358
1358
|
marginBottom: 8
|
|
1359
1359
|
}
|
|
1360
|
-
}),
|
|
1361
|
-
let [
|
|
1362
|
-
if (
|
|
1363
|
-
let e = (await
|
|
1360
|
+
}), ke = ({ field: e, extra: n }) => {
|
|
1361
|
+
let [r, i] = P(null), [a, o] = P(!0), { value: s } = e, { InputLabel: c, node: u, setValue: d, error: f, label: p, helperText: m } = n, { colors: h } = y(), g = t(), _ = D(s), v = u.data.multiple, b = ae(async () => {
|
|
1362
|
+
if (r) try {
|
|
1363
|
+
let e = (await r({ allowMultiSelection: v })).map((e) => ({
|
|
1364
1364
|
data: e.uri,
|
|
1365
1365
|
lastModified: Date.now(),
|
|
1366
1366
|
name: e.name,
|
|
1367
1367
|
size: e.size,
|
|
1368
1368
|
type: e.type || "application/octet-stream"
|
|
1369
1369
|
}));
|
|
1370
|
-
|
|
1370
|
+
d(v ? [..._, ...e] : e[0] || null);
|
|
1371
1371
|
} catch (e) {
|
|
1372
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1372
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && R.alert("Error", g("renderer.defaultInputs.filePickerError"));
|
|
1373
1373
|
}
|
|
1374
1374
|
}, [
|
|
1375
|
-
|
|
1375
|
+
r,
|
|
1376
|
+
_,
|
|
1376
1377
|
v,
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
return ae(() => {
|
|
1378
|
+
d,
|
|
1379
|
+
g
|
|
1380
|
+
]), x = ae((e) => {
|
|
1381
|
+
let t = _.filter((t, n) => n !== e);
|
|
1382
|
+
d(t.length > 0 ? t : null);
|
|
1383
|
+
}, [_, d]);
|
|
1384
|
+
return oe(() => {
|
|
1385
1385
|
(async () => {
|
|
1386
1386
|
try {
|
|
1387
1387
|
let { pick: e } = await import("react-native-document-picker");
|
|
1388
|
-
|
|
1388
|
+
i(() => e);
|
|
1389
1389
|
} catch {
|
|
1390
|
-
|
|
1390
|
+
i(null);
|
|
1391
1391
|
} finally {
|
|
1392
|
-
|
|
1392
|
+
o(!1);
|
|
1393
1393
|
}
|
|
1394
1394
|
})();
|
|
1395
|
-
}, []),
|
|
1395
|
+
}, []), a ? null : r ? /* @__PURE__ */ L(H, {
|
|
1396
1396
|
style: J.container,
|
|
1397
1397
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1398
|
+
/* @__PURE__ */ I(c, {
|
|
1399
1399
|
label: p,
|
|
1400
|
-
required:
|
|
1400
|
+
required: u.data.required
|
|
1401
1401
|
}),
|
|
1402
|
-
|
|
1402
|
+
_.length > 0 && /* @__PURE__ */ I(H, {
|
|
1403
1403
|
style: J.filesList,
|
|
1404
|
-
children:
|
|
1404
|
+
children: _.map((e, t) => /* @__PURE__ */ L(H, {
|
|
1405
1405
|
style: [J.fileItem, {
|
|
1406
|
-
backgroundColor:
|
|
1407
|
-
borderColor:
|
|
1406
|
+
backgroundColor: h.card,
|
|
1407
|
+
borderColor: h.separator
|
|
1408
1408
|
}],
|
|
1409
1409
|
children: [
|
|
1410
|
-
/* @__PURE__ */
|
|
1411
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ I(H, {
|
|
1411
|
+
style: [J.fileIcon, { backgroundColor: h.muted }],
|
|
1412
|
+
children: /* @__PURE__ */ I(B, {
|
|
1413
1413
|
style: J.fileIconText,
|
|
1414
1414
|
children: "📄"
|
|
1415
1415
|
})
|
|
1416
1416
|
}),
|
|
1417
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ L(H, {
|
|
1418
1418
|
style: J.fileInfo,
|
|
1419
|
-
children: [/* @__PURE__ */
|
|
1420
|
-
style: [J.fileName, { color:
|
|
1419
|
+
children: [/* @__PURE__ */ I(B, {
|
|
1420
|
+
style: [J.fileName, { color: h.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__ */ I(B, {
|
|
1424
|
+
style: [J.fileSize, { color: h.textMuted }],
|
|
1425
|
+
children: l(e.size)
|
|
1426
1426
|
})]
|
|
1427
1427
|
}),
|
|
1428
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ I(V, {
|
|
1429
1429
|
style: J.removeButton,
|
|
1430
|
-
onPress: () =>
|
|
1430
|
+
onPress: () => x(t),
|
|
1431
1431
|
activeOpacity: .7,
|
|
1432
|
-
accessibilityLabel:
|
|
1433
|
-
children: /* @__PURE__ */
|
|
1434
|
-
style: [J.removeButtonText, { color:
|
|
1432
|
+
accessibilityLabel: g("renderer.defaultInputs.removeFile"),
|
|
1433
|
+
children: /* @__PURE__ */ I(B, {
|
|
1434
|
+
style: [J.removeButtonText, { color: h.textMuted }],
|
|
1435
1435
|
children: "✕"
|
|
1436
1436
|
})
|
|
1437
1437
|
})
|
|
1438
1438
|
]
|
|
1439
1439
|
}, `${e.name}-${t}`))
|
|
1440
1440
|
}),
|
|
1441
|
-
/* @__PURE__ */
|
|
1441
|
+
/* @__PURE__ */ I(V, {
|
|
1442
1442
|
style: [J.pickButton, {
|
|
1443
|
-
backgroundColor:
|
|
1444
|
-
borderColor:
|
|
1443
|
+
backgroundColor: h.input,
|
|
1444
|
+
borderColor: h.border
|
|
1445
1445
|
}],
|
|
1446
|
-
onPress:
|
|
1446
|
+
onPress: b,
|
|
1447
1447
|
activeOpacity: .7,
|
|
1448
|
-
children: /* @__PURE__ */
|
|
1449
|
-
style: [J.pickButtonText, { color:
|
|
1450
|
-
children:
|
|
1448
|
+
children: /* @__PURE__ */ I(B, {
|
|
1449
|
+
style: [J.pickButtonText, { color: h.textMuted }],
|
|
1450
|
+
children: _.length === 0 ? g(v ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : g(v ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1451
1451
|
})
|
|
1452
1452
|
}),
|
|
1453
|
-
f && /* @__PURE__ */
|
|
1454
|
-
style: [J.error, { color:
|
|
1453
|
+
f && /* @__PURE__ */ I(B, {
|
|
1454
|
+
style: [J.error, { color: h.error }],
|
|
1455
1455
|
children: f
|
|
1456
1456
|
}),
|
|
1457
|
-
|
|
1458
|
-
style: [J.helperText, { color:
|
|
1459
|
-
children:
|
|
1457
|
+
m && !f && /* @__PURE__ */ I(B, {
|
|
1458
|
+
style: [J.helperText, { color: h.textMuted }],
|
|
1459
|
+
children: m
|
|
1460
1460
|
})
|
|
1461
1461
|
]
|
|
1462
|
-
}) : /* @__PURE__ */
|
|
1462
|
+
}) : /* @__PURE__ */ L(H, {
|
|
1463
1463
|
style: J.container,
|
|
1464
1464
|
children: [
|
|
1465
|
-
/* @__PURE__ */
|
|
1465
|
+
/* @__PURE__ */ I(c, {
|
|
1466
1466
|
label: p,
|
|
1467
|
-
required:
|
|
1467
|
+
required: u.data.required
|
|
1468
1468
|
}),
|
|
1469
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ I(H, {
|
|
1470
1470
|
style: [J.unavailableContainer, {
|
|
1471
|
-
backgroundColor:
|
|
1472
|
-
borderColor:
|
|
1471
|
+
backgroundColor: h.errorLight,
|
|
1472
|
+
borderColor: h.error
|
|
1473
1473
|
}],
|
|
1474
|
-
children: /* @__PURE__ */
|
|
1475
|
-
style: [J.unavailableText, { color:
|
|
1476
|
-
children:
|
|
1474
|
+
children: /* @__PURE__ */ I(B, {
|
|
1475
|
+
style: [J.unavailableText, { color: h.error }],
|
|
1476
|
+
children: g("renderer.defaultInputs.filePickerUnavailable")
|
|
1477
1477
|
})
|
|
1478
1478
|
}),
|
|
1479
|
-
|
|
1480
|
-
style: [J.helperText, { color:
|
|
1481
|
-
children:
|
|
1479
|
+
m && /* @__PURE__ */ I(B, {
|
|
1480
|
+
style: [J.helperText, { color: h.textMuted }],
|
|
1481
|
+
children: m
|
|
1482
1482
|
})
|
|
1483
1483
|
]
|
|
1484
1484
|
});
|
|
@@ -1546,15 +1546,15 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1546
1546
|
fontSize: 12,
|
|
1547
1547
|
textAlign: "center"
|
|
1548
1548
|
}
|
|
1549
|
-
}),
|
|
1550
|
-
let
|
|
1551
|
-
return /* @__PURE__ */ F
|
|
1552
|
-
style:
|
|
1553
|
-
children: [/* @__PURE__ */
|
|
1554
|
-
style: [
|
|
1555
|
-
children:
|
|
1556
|
-
}), e.map((e) => /* @__PURE__ */
|
|
1557
|
-
style: [
|
|
1549
|
+
}), Ae = (e) => null, je = ({ missing: e, children: n }) => {
|
|
1550
|
+
let r = t(), { colors: i } = y();
|
|
1551
|
+
return /* @__PURE__ */ L(F, { children: [n, e.length > 0 && /* @__PURE__ */ L(H, {
|
|
1552
|
+
style: Me.container,
|
|
1553
|
+
children: [/* @__PURE__ */ I(B, {
|
|
1554
|
+
style: [Me.title, { color: i.textMuted }],
|
|
1555
|
+
children: r("renderer.dependencyHint.title")
|
|
1556
|
+
}), e.map((e) => /* @__PURE__ */ L(B, {
|
|
1557
|
+
style: [Me.item, { color: i.textMuted }],
|
|
1558
1558
|
children: [
|
|
1559
1559
|
"•",
|
|
1560
1560
|
" ",
|
|
@@ -1562,7 +1562,7 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1562
1562
|
]
|
|
1563
1563
|
}, e.id))]
|
|
1564
1564
|
})] });
|
|
1565
|
-
},
|
|
1565
|
+
}, Me = z.create({
|
|
1566
1566
|
container: {
|
|
1567
1567
|
gap: 2,
|
|
1568
1568
|
marginTop: 4
|
|
@@ -1572,187 +1572,187 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1572
1572
|
fontSize: 12,
|
|
1573
1573
|
fontWeight: "500"
|
|
1574
1574
|
}
|
|
1575
|
-
}),
|
|
1576
|
-
if (n >
|
|
1575
|
+
}), Ne = (e) => e.replace(/<[^>]*>/g, ""), Pe = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), Fe = (e, t = {}) => e == null || e === "" ? "" : Pe(Ne(String(e))), Ie = 100, Le = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1576
|
+
if (n > Ie) return console.warn(`sanitizeHttpResponse: Maximum depth (${Ie}) exceeded.`), typeof e == "string" ? Fe(e, t) : "[Max Depth Exceeded]";
|
|
1577
1577
|
if (e == null) return e;
|
|
1578
|
-
if (typeof e == "string") return
|
|
1579
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1578
|
+
if (typeof e == "string") return Fe(e, t);
|
|
1579
|
+
if (Array.isArray(e)) return e.map((e) => Le(e, t, n + 1, r));
|
|
1580
1580
|
if (typeof e == "object") {
|
|
1581
1581
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1582
1582
|
r.add(e);
|
|
1583
1583
|
let i = {};
|
|
1584
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1584
|
+
for (let [a, o] of Object.entries(e)) i[a] = Le(o, t, n + 1, r);
|
|
1585
1585
|
return r.delete(e), i;
|
|
1586
1586
|
}
|
|
1587
1587
|
return e;
|
|
1588
|
-
},
|
|
1588
|
+
}, Re = (e) => {
|
|
1589
1589
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1590
1590
|
return Array.from(t, (e) => e[1]);
|
|
1591
|
-
},
|
|
1591
|
+
}, ze = (e, t) => Re(e).every((e) => {
|
|
1592
1592
|
let n = t[e];
|
|
1593
1593
|
return n != null && n !== "";
|
|
1594
|
-
}),
|
|
1594
|
+
}), Be = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1595
1595
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1596
1596
|
return n ? encodeURIComponent(a) : a;
|
|
1597
|
-
}),
|
|
1598
|
-
let [
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
]),
|
|
1603
|
-
|
|
1604
|
-
let
|
|
1605
|
-
|
|
1606
|
-
let
|
|
1607
|
-
if (!
|
|
1608
|
-
|
|
1597
|
+
}), Ve = ({ field: n, extra: r }) => {
|
|
1598
|
+
let [s, l] = P(!1), [u, d] = P(null), [f, p] = P([]), [m, h] = P(""), [_, v] = P(!1), { value: b, placeholder: x } = n, { InputLabel: C, node: w, setValue: D, error: O, label: k, helperText: A, missingDependencies: j } = r, { formValues: te, inputNodes: ne, headers: re, baseUrl: ie } = ee(), { colors: M } = y(), { httpConfig: F } = w.data, R = t(), le = N(!1), de = N(!1), pe = N(""), z = N(F), me = N(te), ge = N(ne), _e = N(re), ve = N(ie), ye = N(D), be = N(null), xe = N(null), Se = N(w.data.normalizeOptionLabels !== !1), U = se(() => F?.url ? Re(F.url) : [], [F?.url]), we = U.length > 0, Te = se(() => U.map((e) => `${e}:${String(te[e] ?? "")}`).join("|"), [U, te]), W = se(() => F?.url ? we ? ze(F.url, te) : !0 : !1, [
|
|
1599
|
+
F?.url,
|
|
1600
|
+
we,
|
|
1601
|
+
te
|
|
1602
|
+
]), Ee = ae(async (t) => {
|
|
1603
|
+
xe.current && xe.current.abort();
|
|
1604
|
+
let n = new AbortController();
|
|
1605
|
+
xe.current = n;
|
|
1606
|
+
let r = z.current, s = me.current, u = ye.current;
|
|
1607
|
+
if (!r?.url) {
|
|
1608
|
+
d(R("renderer.defaultHttpInput.noUrlConfigured")), xe.current = null;
|
|
1609
1609
|
return;
|
|
1610
1610
|
}
|
|
1611
|
-
if (
|
|
1612
|
-
|
|
1611
|
+
if (r.url && !ze(r.url, s)) {
|
|
1612
|
+
xe.current = null;
|
|
1613
1613
|
return;
|
|
1614
1614
|
}
|
|
1615
|
-
|
|
1615
|
+
l(!0), d(null);
|
|
1616
1616
|
try {
|
|
1617
|
-
let
|
|
1617
|
+
let l = a(Be(r.url, s, !0), ve.current), f = c(r.searchParam && t ? `${l}${l.includes("?") ? "&" : "?"}${r.searchParam}=${encodeURIComponent(t)}` : l, i(r.queryParams, s)), m = g({ "Content-Type": "application/json" }, i(_e.current, s), i(r.headers, s)), h = [
|
|
1618
1618
|
"POST",
|
|
1619
1619
|
"PUT",
|
|
1620
1620
|
"PATCH"
|
|
1621
|
-
].includes(
|
|
1622
|
-
body:
|
|
1621
|
+
].includes(r.method || "") ? r.sendAllFormValues ? JSON.stringify(S(s, ge.current)) : T(r.body, s, ge.current) : void 0, _ = setTimeout(() => n.abort(), 3e4), v = await fetch(f, {
|
|
1622
|
+
body: h || void 0,
|
|
1623
1623
|
headers: Object.fromEntries(Object.entries(m).filter(([, e]) => e)),
|
|
1624
|
-
method:
|
|
1625
|
-
signal:
|
|
1624
|
+
method: r.method || "GET",
|
|
1625
|
+
signal: n.signal
|
|
1626
1626
|
});
|
|
1627
|
-
if (clearTimeout(
|
|
1628
|
-
|
|
1627
|
+
if (clearTimeout(_), !v.ok) {
|
|
1628
|
+
d(`HTTP Error ${v.status}: ${v.statusText}`);
|
|
1629
1629
|
return;
|
|
1630
1630
|
}
|
|
1631
|
-
let
|
|
1632
|
-
if (!
|
|
1633
|
-
|
|
1631
|
+
let y = o(await v.text());
|
|
1632
|
+
if (!y.ok) {
|
|
1633
|
+
d(R("renderer.defaultHttpInput.invalidJson"));
|
|
1634
1634
|
return;
|
|
1635
1635
|
}
|
|
1636
|
-
let
|
|
1637
|
-
if (
|
|
1638
|
-
let { valueField:
|
|
1639
|
-
|
|
1640
|
-
let
|
|
1636
|
+
let b = Le(y.value), x = r.responsePath ? e(b, r.responsePath) : b;
|
|
1637
|
+
if (r.responseMapping && Array.isArray(x)) {
|
|
1638
|
+
let { valueField: t = "value", labelField: n = "label", descriptionField: i, imageField: a } = r.responseMapping, o = Se.current;
|
|
1639
|
+
p(x.map((r) => {
|
|
1640
|
+
let s = i ? e(r, i) : void 0, c = a ? e(r, a) : void 0, l = String(e(r, n) || "");
|
|
1641
1641
|
return {
|
|
1642
|
-
description:
|
|
1643
|
-
image: typeof
|
|
1644
|
-
label:
|
|
1645
|
-
value: String(
|
|
1642
|
+
description: s != null && s !== "" ? String(s) : void 0,
|
|
1643
|
+
image: typeof c == "string" && c !== "" ? c : void 0,
|
|
1644
|
+
label: o ? E(l) : l,
|
|
1645
|
+
value: String(e(r, t) || "")
|
|
1646
1646
|
};
|
|
1647
1647
|
}));
|
|
1648
|
-
} else u(typeof
|
|
1648
|
+
} else u(typeof x == "string" ? x : JSON.stringify(x));
|
|
1649
1649
|
} catch (e) {
|
|
1650
1650
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1651
|
-
|
|
1651
|
+
d(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1652
1652
|
} finally {
|
|
1653
|
-
|
|
1653
|
+
xe.current === n && (l(!1), xe.current = null);
|
|
1654
1654
|
}
|
|
1655
1655
|
}, [R]);
|
|
1656
|
-
if (
|
|
1657
|
-
|
|
1656
|
+
if (oe(() => {
|
|
1657
|
+
z.current = F, me.current = te, ge.current = ne, _e.current = re, ve.current = ie, ye.current = D, be.current = Ee, Se.current = w.data.normalizeOptionLabels !== !1;
|
|
1658
1658
|
}, [
|
|
1659
|
-
|
|
1660
|
-
|
|
1659
|
+
F,
|
|
1660
|
+
te,
|
|
1661
1661
|
ne,
|
|
1662
1662
|
re,
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
]),
|
|
1668
|
-
|
|
1669
|
-
}, []),
|
|
1670
|
-
if (
|
|
1671
|
-
|
|
1672
|
-
let e =
|
|
1673
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1674
|
-
}, []),
|
|
1675
|
-
if (!
|
|
1663
|
+
ie,
|
|
1664
|
+
D,
|
|
1665
|
+
Ee,
|
|
1666
|
+
w.data.normalizeOptionLabels
|
|
1667
|
+
]), oe(() => () => {
|
|
1668
|
+
xe.current && xe.current.abort(), le.current = !1, de.current = !1;
|
|
1669
|
+
}, []), oe(() => {
|
|
1670
|
+
if (le.current) return;
|
|
1671
|
+
le.current = !0;
|
|
1672
|
+
let e = z.current, t = me.current, n = be.current, r = e?.url && ze(e.url, t);
|
|
1673
|
+
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Re(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1674
|
+
}, []), oe(() => {
|
|
1675
|
+
if (!le.current || !we || pe.current === Te || !W) return;
|
|
1676
1676
|
let e = setTimeout(() => {
|
|
1677
|
-
|
|
1677
|
+
Ee(), pe.current = Te;
|
|
1678
1678
|
}, 500);
|
|
1679
1679
|
return () => clearTimeout(e);
|
|
1680
1680
|
}, [
|
|
1681
|
+
Te,
|
|
1681
1682
|
we,
|
|
1682
1683
|
W,
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
z.current = !0;
|
|
1684
|
+
Ee
|
|
1685
|
+
]), oe(() => {
|
|
1686
|
+
if (!de.current) {
|
|
1687
|
+
de.current = !0;
|
|
1688
1688
|
return;
|
|
1689
1689
|
}
|
|
1690
|
-
let e =
|
|
1691
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1692
|
-
}, [
|
|
1693
|
-
body:
|
|
1694
|
-
fetchOnMount:
|
|
1695
|
-
headers:
|
|
1696
|
-
method:
|
|
1697
|
-
queryParams:
|
|
1698
|
-
responseMapping:
|
|
1699
|
-
responsePath:
|
|
1700
|
-
searchParam:
|
|
1701
|
-
sendAllFormValues:
|
|
1702
|
-
url:
|
|
1703
|
-
}), [
|
|
1704
|
-
if (!(
|
|
1690
|
+
let e = z.current, t = me.current, n = be.current, r = e?.url && ze(e.url, t);
|
|
1691
|
+
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Re(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1692
|
+
}, [se(() => JSON.stringify({
|
|
1693
|
+
body: F?.body,
|
|
1694
|
+
fetchOnMount: F?.fetchOnMount,
|
|
1695
|
+
headers: F?.headers,
|
|
1696
|
+
method: F?.method,
|
|
1697
|
+
queryParams: F?.queryParams,
|
|
1698
|
+
responseMapping: F?.responseMapping,
|
|
1699
|
+
responsePath: F?.responsePath,
|
|
1700
|
+
searchParam: F?.searchParam,
|
|
1701
|
+
sendAllFormValues: F?.sendAllFormValues,
|
|
1702
|
+
url: F?.url
|
|
1703
|
+
}), [F])]), oe(() => {
|
|
1704
|
+
if (!(F?.searchParam && m)) return;
|
|
1705
1705
|
let e = setTimeout(() => {
|
|
1706
|
-
|
|
1706
|
+
Ee(m);
|
|
1707
1707
|
}, 300);
|
|
1708
1708
|
return () => clearTimeout(e);
|
|
1709
1709
|
}, [
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
]),
|
|
1714
|
-
let e = Array.isArray(
|
|
1715
|
-
if (
|
|
1716
|
-
let n =
|
|
1717
|
-
return /* @__PURE__ */
|
|
1710
|
+
m,
|
|
1711
|
+
F?.searchParam,
|
|
1712
|
+
Ee
|
|
1713
|
+
]), F?.responseMapping) {
|
|
1714
|
+
let e = Array.isArray(b) ? b[0] : b, t = f.find((t) => t.value === e);
|
|
1715
|
+
if (F.searchParam) {
|
|
1716
|
+
let n = s && F?.showLoading;
|
|
1717
|
+
return /* @__PURE__ */ L(H, {
|
|
1718
1718
|
style: Y.container,
|
|
1719
1719
|
children: [
|
|
1720
|
-
/* @__PURE__ */
|
|
1721
|
-
label:
|
|
1722
|
-
required:
|
|
1720
|
+
/* @__PURE__ */ I(C, {
|
|
1721
|
+
label: k,
|
|
1722
|
+
required: w.data.required
|
|
1723
1723
|
}),
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
missing:
|
|
1726
|
-
children: /* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ I(je, {
|
|
1725
|
+
missing: j,
|
|
1726
|
+
children: /* @__PURE__ */ L(V, {
|
|
1727
1727
|
style: [
|
|
1728
1728
|
Y.trigger,
|
|
1729
1729
|
{
|
|
1730
|
-
backgroundColor:
|
|
1731
|
-
borderColor:
|
|
1730
|
+
backgroundColor: M.input,
|
|
1731
|
+
borderColor: M.border
|
|
1732
1732
|
},
|
|
1733
|
-
|
|
1734
|
-
|
|
1733
|
+
O && { borderColor: M.error },
|
|
1734
|
+
j.length > 0 && { backgroundColor: M.muted }
|
|
1735
1735
|
],
|
|
1736
|
-
onPress: () =>
|
|
1737
|
-
disabled:
|
|
1736
|
+
onPress: () => v(!0),
|
|
1737
|
+
disabled: j.length > 0,
|
|
1738
1738
|
activeOpacity: .7,
|
|
1739
1739
|
children: [
|
|
1740
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ I(B, {
|
|
1741
1741
|
style: [
|
|
1742
1742
|
Y.triggerText,
|
|
1743
|
-
{ color:
|
|
1744
|
-
!t && { color:
|
|
1743
|
+
{ color: M.text },
|
|
1744
|
+
!t && { color: M.textMuted }
|
|
1745
1745
|
],
|
|
1746
1746
|
numberOfLines: 1,
|
|
1747
|
-
children: t?.label ||
|
|
1747
|
+
children: t?.label || x || R("renderer.defaultHttpInput.search")
|
|
1748
1748
|
}),
|
|
1749
|
-
n && /* @__PURE__ */
|
|
1749
|
+
n && /* @__PURE__ */ I(ce, {
|
|
1750
1750
|
size: "small",
|
|
1751
|
-
color:
|
|
1751
|
+
color: M.primary,
|
|
1752
1752
|
style: Y.triggerLoader
|
|
1753
1753
|
}),
|
|
1754
|
-
e ? /* @__PURE__ */
|
|
1755
|
-
onPress: () =>
|
|
1754
|
+
e ? /* @__PURE__ */ I(V, {
|
|
1755
|
+
onPress: () => D(""),
|
|
1756
1756
|
hitSlop: {
|
|
1757
1757
|
bottom: 8,
|
|
1758
1758
|
left: 8,
|
|
@@ -1760,109 +1760,109 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1760
1760
|
top: 8
|
|
1761
1761
|
},
|
|
1762
1762
|
style: Y.clearButton,
|
|
1763
|
-
children: /* @__PURE__ */
|
|
1764
|
-
style: [Y.clearIcon, { color:
|
|
1763
|
+
children: /* @__PURE__ */ I(B, {
|
|
1764
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1765
1765
|
children: "✕"
|
|
1766
1766
|
})
|
|
1767
1767
|
}) : null,
|
|
1768
|
-
/* @__PURE__ */
|
|
1769
|
-
style: [Y.arrow, { color:
|
|
1768
|
+
/* @__PURE__ */ I(B, {
|
|
1769
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1770
1770
|
children: "▼"
|
|
1771
1771
|
})
|
|
1772
1772
|
]
|
|
1773
1773
|
})
|
|
1774
1774
|
}),
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
visible:
|
|
1775
|
+
/* @__PURE__ */ I(fe, {
|
|
1776
|
+
visible: _,
|
|
1777
1777
|
transparent: !0,
|
|
1778
1778
|
animationType: "fade",
|
|
1779
|
-
onRequestClose: () =>
|
|
1780
|
-
children: /* @__PURE__ */
|
|
1779
|
+
onRequestClose: () => v(!1),
|
|
1780
|
+
children: /* @__PURE__ */ I(V, {
|
|
1781
1781
|
style: Y.modalOverlay,
|
|
1782
1782
|
activeOpacity: 1,
|
|
1783
|
-
onPress: () =>
|
|
1784
|
-
children: /* @__PURE__ */
|
|
1785
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1783
|
+
onPress: () => v(!1),
|
|
1784
|
+
children: /* @__PURE__ */ L(V, {
|
|
1785
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1786
1786
|
activeOpacity: 1,
|
|
1787
1787
|
onPress: () => {},
|
|
1788
1788
|
children: [
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1791
|
-
children: [/* @__PURE__ */
|
|
1792
|
-
style: [Y.modalTitle, { color:
|
|
1793
|
-
children:
|
|
1794
|
-
}), /* @__PURE__ */
|
|
1795
|
-
onPress: () =>
|
|
1796
|
-
children: /* @__PURE__ */
|
|
1797
|
-
style: [Y.closeButton, { color:
|
|
1789
|
+
/* @__PURE__ */ L(H, {
|
|
1790
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1791
|
+
children: [/* @__PURE__ */ I(B, {
|
|
1792
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1793
|
+
children: k || x || R("renderer.defaultHttpInput.search")
|
|
1794
|
+
}), /* @__PURE__ */ I(V, {
|
|
1795
|
+
onPress: () => v(!1),
|
|
1796
|
+
children: /* @__PURE__ */ I(B, {
|
|
1797
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1798
1798
|
children: "✕"
|
|
1799
1799
|
})
|
|
1800
1800
|
})]
|
|
1801
1801
|
}),
|
|
1802
|
-
/* @__PURE__ */
|
|
1802
|
+
/* @__PURE__ */ I(H, {
|
|
1803
1803
|
style: Y.searchContainer,
|
|
1804
|
-
children: /* @__PURE__ */
|
|
1804
|
+
children: /* @__PURE__ */ I(he, {
|
|
1805
1805
|
style: [Y.searchInput, {
|
|
1806
|
-
backgroundColor:
|
|
1807
|
-
borderColor:
|
|
1808
|
-
color:
|
|
1806
|
+
backgroundColor: M.muted,
|
|
1807
|
+
borderColor: M.border,
|
|
1808
|
+
color: M.text
|
|
1809
1809
|
}],
|
|
1810
1810
|
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1811
|
-
placeholderTextColor:
|
|
1812
|
-
value:
|
|
1811
|
+
placeholderTextColor: M.textMuted,
|
|
1812
|
+
value: m,
|
|
1813
1813
|
onChangeText: (e) => {
|
|
1814
|
-
|
|
1814
|
+
h(e), d(null);
|
|
1815
1815
|
},
|
|
1816
1816
|
autoFocus: !0,
|
|
1817
1817
|
autoCapitalize: "none",
|
|
1818
1818
|
autoCorrect: !1
|
|
1819
1819
|
})
|
|
1820
1820
|
}),
|
|
1821
|
-
|
|
1821
|
+
s ? /* @__PURE__ */ I(H, {
|
|
1822
1822
|
style: Y.loadingContainer,
|
|
1823
|
-
children: /* @__PURE__ */
|
|
1823
|
+
children: /* @__PURE__ */ I(ce, {
|
|
1824
1824
|
size: "small",
|
|
1825
|
-
color:
|
|
1825
|
+
color: M.primary
|
|
1826
1826
|
})
|
|
1827
|
-
}) :
|
|
1827
|
+
}) : u ? /* @__PURE__ */ L(H, {
|
|
1828
1828
|
style: Y.errorContainer,
|
|
1829
|
-
children: [/* @__PURE__ */
|
|
1830
|
-
style: [Y.errorText, { color:
|
|
1831
|
-
children:
|
|
1832
|
-
}), /* @__PURE__ */
|
|
1833
|
-
onPress: () =>
|
|
1829
|
+
children: [/* @__PURE__ */ I(B, {
|
|
1830
|
+
style: [Y.errorText, { color: M.error }],
|
|
1831
|
+
children: u
|
|
1832
|
+
}), /* @__PURE__ */ I(V, {
|
|
1833
|
+
onPress: () => Ee(m),
|
|
1834
1834
|
style: Y.retryButton,
|
|
1835
|
-
children: /* @__PURE__ */
|
|
1836
|
-
style: [Y.retryButtonText, { color:
|
|
1835
|
+
children: /* @__PURE__ */ I(B, {
|
|
1836
|
+
style: [Y.retryButtonText, { color: M.primary }],
|
|
1837
1837
|
children: R("renderer.defaultHttpInput.retry")
|
|
1838
1838
|
})
|
|
1839
1839
|
})]
|
|
1840
|
-
}) : /* @__PURE__ */
|
|
1841
|
-
data:
|
|
1840
|
+
}) : /* @__PURE__ */ I(ue, {
|
|
1841
|
+
data: f,
|
|
1842
1842
|
keyExtractor: (e) => e.value,
|
|
1843
1843
|
style: Y.optionsList,
|
|
1844
1844
|
contentContainerStyle: Y.optionsListContent,
|
|
1845
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1845
|
+
ListEmptyComponent: /* @__PURE__ */ I(H, {
|
|
1846
1846
|
style: Y.emptyContainer,
|
|
1847
|
-
children: /* @__PURE__ */
|
|
1848
|
-
style: [Y.emptyText, { color:
|
|
1847
|
+
children: /* @__PURE__ */ I(B, {
|
|
1848
|
+
style: [Y.emptyText, { color: M.textMuted }],
|
|
1849
1849
|
children: R("renderer.defaultHttpInput.noResults")
|
|
1850
1850
|
})
|
|
1851
1851
|
}),
|
|
1852
1852
|
renderItem: ({ item: t }) => {
|
|
1853
1853
|
let n = t.value === e;
|
|
1854
|
-
return /* @__PURE__ */
|
|
1855
|
-
style: [Y.option, n && { backgroundColor:
|
|
1854
|
+
return /* @__PURE__ */ L(V, {
|
|
1855
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1856
1856
|
onPress: () => {
|
|
1857
|
-
|
|
1857
|
+
D(t.value), v(!1);
|
|
1858
1858
|
},
|
|
1859
1859
|
activeOpacity: .7,
|
|
1860
|
-
children: [/* @__PURE__ */
|
|
1860
|
+
children: [/* @__PURE__ */ I(Ce, {
|
|
1861
1861
|
label: t.label,
|
|
1862
1862
|
description: t.description,
|
|
1863
1863
|
image: t.image
|
|
1864
|
-
}), n && /* @__PURE__ */
|
|
1865
|
-
style: [Y.checkmark, { color:
|
|
1864
|
+
}), n && /* @__PURE__ */ I(B, {
|
|
1865
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1866
1866
|
children: "✓"
|
|
1867
1867
|
})]
|
|
1868
1868
|
});
|
|
@@ -1872,57 +1872,57 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1872
1872
|
})
|
|
1873
1873
|
})
|
|
1874
1874
|
}),
|
|
1875
|
-
|
|
1876
|
-
style: [Y.error, { color:
|
|
1877
|
-
children:
|
|
1875
|
+
O && /* @__PURE__ */ I(B, {
|
|
1876
|
+
style: [Y.error, { color: M.error }],
|
|
1877
|
+
children: O
|
|
1878
1878
|
}),
|
|
1879
|
-
|
|
1880
|
-
style: [Y.helperText, { color:
|
|
1881
|
-
children:
|
|
1879
|
+
A && !O && /* @__PURE__ */ I(B, {
|
|
1880
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
1881
|
+
children: A
|
|
1882
1882
|
})
|
|
1883
1883
|
]
|
|
1884
1884
|
});
|
|
1885
1885
|
}
|
|
1886
|
-
let n =
|
|
1887
|
-
return /* @__PURE__ */
|
|
1886
|
+
let n = s && F?.showLoading, r = j.length === 0 && f.length === 0 && !n ? u ?? R("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1887
|
+
return /* @__PURE__ */ L(H, {
|
|
1888
1888
|
style: Y.container,
|
|
1889
1889
|
children: [
|
|
1890
|
-
/* @__PURE__ */
|
|
1891
|
-
label:
|
|
1892
|
-
required:
|
|
1890
|
+
/* @__PURE__ */ I(C, {
|
|
1891
|
+
label: k,
|
|
1892
|
+
required: w.data.required
|
|
1893
1893
|
}),
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
missing:
|
|
1896
|
-
children: /* @__PURE__ */
|
|
1894
|
+
/* @__PURE__ */ I(je, {
|
|
1895
|
+
missing: j,
|
|
1896
|
+
children: /* @__PURE__ */ L(V, {
|
|
1897
1897
|
style: [
|
|
1898
1898
|
Y.trigger,
|
|
1899
1899
|
{
|
|
1900
|
-
backgroundColor:
|
|
1901
|
-
borderColor:
|
|
1900
|
+
backgroundColor: M.input,
|
|
1901
|
+
borderColor: M.border
|
|
1902
1902
|
},
|
|
1903
|
-
|
|
1904
|
-
(n ||
|
|
1903
|
+
O && { borderColor: M.error },
|
|
1904
|
+
(n || f.length === 0) && { backgroundColor: M.muted }
|
|
1905
1905
|
],
|
|
1906
|
-
onPress: () =>
|
|
1907
|
-
disabled: n ||
|
|
1906
|
+
onPress: () => v(!0),
|
|
1907
|
+
disabled: n || f.length === 0,
|
|
1908
1908
|
activeOpacity: .7,
|
|
1909
1909
|
children: [
|
|
1910
|
-
/* @__PURE__ */
|
|
1910
|
+
/* @__PURE__ */ I(B, {
|
|
1911
1911
|
style: [
|
|
1912
1912
|
Y.triggerText,
|
|
1913
|
-
{ color:
|
|
1914
|
-
!t && { color:
|
|
1913
|
+
{ color: M.text },
|
|
1914
|
+
!t && { color: M.textMuted }
|
|
1915
1915
|
],
|
|
1916
1916
|
numberOfLines: 1,
|
|
1917
|
-
children: t?.label ||
|
|
1917
|
+
children: t?.label || x || R("renderer.defaultHttpInput.selectOption")
|
|
1918
1918
|
}),
|
|
1919
|
-
n && /* @__PURE__ */
|
|
1919
|
+
n && /* @__PURE__ */ I(ce, {
|
|
1920
1920
|
size: "small",
|
|
1921
|
-
color:
|
|
1921
|
+
color: M.primary,
|
|
1922
1922
|
style: Y.triggerLoader
|
|
1923
1923
|
}),
|
|
1924
|
-
e ? /* @__PURE__ */
|
|
1925
|
-
onPress: () =>
|
|
1924
|
+
e ? /* @__PURE__ */ I(V, {
|
|
1925
|
+
onPress: () => D(""),
|
|
1926
1926
|
hitSlop: {
|
|
1927
1927
|
bottom: 8,
|
|
1928
1928
|
left: 8,
|
|
@@ -1930,66 +1930,66 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1930
1930
|
top: 8
|
|
1931
1931
|
},
|
|
1932
1932
|
style: Y.clearButton,
|
|
1933
|
-
children: /* @__PURE__ */
|
|
1934
|
-
style: [Y.clearIcon, { color:
|
|
1933
|
+
children: /* @__PURE__ */ I(B, {
|
|
1934
|
+
style: [Y.clearIcon, { color: M.textMuted }],
|
|
1935
1935
|
children: "✕"
|
|
1936
1936
|
})
|
|
1937
1937
|
}) : null,
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
style: [Y.arrow, { color:
|
|
1938
|
+
/* @__PURE__ */ I(B, {
|
|
1939
|
+
style: [Y.arrow, { color: M.textMuted }],
|
|
1940
1940
|
children: "▼"
|
|
1941
1941
|
})
|
|
1942
1942
|
]
|
|
1943
1943
|
})
|
|
1944
1944
|
}),
|
|
1945
|
-
r && /* @__PURE__ */
|
|
1946
|
-
style: [Y.disabledMessage, { color:
|
|
1945
|
+
r && /* @__PURE__ */ I(B, {
|
|
1946
|
+
style: [Y.disabledMessage, { color: M.error }],
|
|
1947
1947
|
children: r
|
|
1948
1948
|
}),
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
visible:
|
|
1949
|
+
/* @__PURE__ */ I(fe, {
|
|
1950
|
+
visible: _,
|
|
1951
1951
|
transparent: !0,
|
|
1952
1952
|
animationType: "fade",
|
|
1953
|
-
onRequestClose: () =>
|
|
1954
|
-
children: /* @__PURE__ */
|
|
1953
|
+
onRequestClose: () => v(!1),
|
|
1954
|
+
children: /* @__PURE__ */ I(V, {
|
|
1955
1955
|
style: Y.modalOverlay,
|
|
1956
1956
|
activeOpacity: 1,
|
|
1957
|
-
onPress: () =>
|
|
1958
|
-
children: /* @__PURE__ */
|
|
1959
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1957
|
+
onPress: () => v(!1),
|
|
1958
|
+
children: /* @__PURE__ */ L(V, {
|
|
1959
|
+
style: [Y.modalContent, { backgroundColor: M.card }],
|
|
1960
1960
|
activeOpacity: 1,
|
|
1961
1961
|
onPress: () => {},
|
|
1962
|
-
children: [/* @__PURE__ */
|
|
1963
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1964
|
-
children: [/* @__PURE__ */
|
|
1965
|
-
style: [Y.modalTitle, { color:
|
|
1966
|
-
children:
|
|
1967
|
-
}), /* @__PURE__ */
|
|
1968
|
-
onPress: () =>
|
|
1969
|
-
children: /* @__PURE__ */
|
|
1970
|
-
style: [Y.closeButton, { color:
|
|
1962
|
+
children: [/* @__PURE__ */ L(H, {
|
|
1963
|
+
style: [Y.modalHeader, { borderBottomColor: M.separator }],
|
|
1964
|
+
children: [/* @__PURE__ */ I(B, {
|
|
1965
|
+
style: [Y.modalTitle, { color: M.text }],
|
|
1966
|
+
children: k || x || R("renderer.defaultHttpInput.selectOption")
|
|
1967
|
+
}), /* @__PURE__ */ I(V, {
|
|
1968
|
+
onPress: () => v(!1),
|
|
1969
|
+
children: /* @__PURE__ */ I(B, {
|
|
1970
|
+
style: [Y.closeButton, { color: M.textMuted }],
|
|
1971
1971
|
children: "✕"
|
|
1972
1972
|
})
|
|
1973
1973
|
})]
|
|
1974
|
-
}), /* @__PURE__ */
|
|
1975
|
-
data:
|
|
1974
|
+
}), /* @__PURE__ */ I(ue, {
|
|
1975
|
+
data: f,
|
|
1976
1976
|
keyExtractor: (e) => e.value,
|
|
1977
1977
|
style: Y.optionsList,
|
|
1978
1978
|
contentContainerStyle: Y.optionsListContent,
|
|
1979
1979
|
renderItem: ({ item: t }) => {
|
|
1980
1980
|
let n = t.value === e;
|
|
1981
|
-
return /* @__PURE__ */
|
|
1982
|
-
style: [Y.option, n && { backgroundColor:
|
|
1981
|
+
return /* @__PURE__ */ L(V, {
|
|
1982
|
+
style: [Y.option, n && { backgroundColor: M.primaryLight }],
|
|
1983
1983
|
onPress: () => {
|
|
1984
|
-
|
|
1984
|
+
D(t.value), v(!1);
|
|
1985
1985
|
},
|
|
1986
1986
|
activeOpacity: .7,
|
|
1987
|
-
children: [/* @__PURE__ */
|
|
1987
|
+
children: [/* @__PURE__ */ I(Ce, {
|
|
1988
1988
|
label: t.label,
|
|
1989
1989
|
description: t.description,
|
|
1990
1990
|
image: t.image
|
|
1991
|
-
}), n && /* @__PURE__ */
|
|
1992
|
-
style: [Y.checkmark, { color:
|
|
1991
|
+
}), n && /* @__PURE__ */ I(B, {
|
|
1992
|
+
style: [Y.checkmark, { color: M.primary }],
|
|
1993
1993
|
children: "✓"
|
|
1994
1994
|
})]
|
|
1995
1995
|
});
|
|
@@ -1998,40 +1998,40 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1998
1998
|
})
|
|
1999
1999
|
})
|
|
2000
2000
|
}),
|
|
2001
|
-
|
|
2002
|
-
style: [Y.error, { color:
|
|
2003
|
-
children:
|
|
2001
|
+
O && /* @__PURE__ */ I(B, {
|
|
2002
|
+
style: [Y.error, { color: M.error }],
|
|
2003
|
+
children: O
|
|
2004
2004
|
}),
|
|
2005
|
-
|
|
2006
|
-
style: [Y.helperText, { color:
|
|
2007
|
-
children:
|
|
2005
|
+
A && !O && /* @__PURE__ */ I(B, {
|
|
2006
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
2007
|
+
children: A
|
|
2008
2008
|
})
|
|
2009
2009
|
]
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
|
-
return /* @__PURE__ */
|
|
2012
|
+
return /* @__PURE__ */ L(H, {
|
|
2013
2013
|
style: Y.container,
|
|
2014
2014
|
children: [
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
label:
|
|
2017
|
-
required:
|
|
2015
|
+
/* @__PURE__ */ I(C, {
|
|
2016
|
+
label: k,
|
|
2017
|
+
required: w.data.required
|
|
2018
2018
|
}),
|
|
2019
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ I(he, {
|
|
2020
2020
|
style: [Y.input, {
|
|
2021
|
-
backgroundColor:
|
|
2022
|
-
borderColor:
|
|
2023
|
-
color:
|
|
2021
|
+
backgroundColor: M.muted,
|
|
2022
|
+
borderColor: M.border,
|
|
2023
|
+
color: M.textMuted
|
|
2024
2024
|
}],
|
|
2025
|
-
value: typeof
|
|
2025
|
+
value: typeof b == "string" ? b : JSON.stringify(b),
|
|
2026
2026
|
editable: !1
|
|
2027
2027
|
}),
|
|
2028
|
-
|
|
2029
|
-
style: [Y.error, { color:
|
|
2030
|
-
children:
|
|
2028
|
+
O && /* @__PURE__ */ I(B, {
|
|
2029
|
+
style: [Y.error, { color: M.error }],
|
|
2030
|
+
children: O
|
|
2031
2031
|
}),
|
|
2032
|
-
|
|
2033
|
-
style: [Y.helperText, { color:
|
|
2034
|
-
children:
|
|
2032
|
+
A && !O && /* @__PURE__ */ I(B, {
|
|
2033
|
+
style: [Y.helperText, { color: M.textMuted }],
|
|
2034
|
+
children: A
|
|
2035
2035
|
})
|
|
2036
2036
|
]
|
|
2037
2037
|
});
|
|
@@ -2151,20 +2151,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2151
2151
|
flex: 1,
|
|
2152
2152
|
fontSize: 14
|
|
2153
2153
|
}
|
|
2154
|
-
}),
|
|
2155
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2156
|
-
return
|
|
2154
|
+
}), He = ({ field: e, extra: t }) => {
|
|
2155
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = P(n?.toString() ?? ""), { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = y();
|
|
2156
|
+
return oe(() => {
|
|
2157
2157
|
o(n?.toString() ?? "");
|
|
2158
|
-
}, [n]), /* @__PURE__ */
|
|
2159
|
-
style:
|
|
2158
|
+
}, [n]), /* @__PURE__ */ L(H, {
|
|
2159
|
+
style: Ue.container,
|
|
2160
2160
|
children: [
|
|
2161
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ I(s, {
|
|
2162
2162
|
label: d,
|
|
2163
2163
|
required: c.data.required
|
|
2164
2164
|
}),
|
|
2165
|
-
/* @__PURE__ */
|
|
2165
|
+
/* @__PURE__ */ I(he, {
|
|
2166
2166
|
style: [
|
|
2167
|
-
|
|
2167
|
+
Ue.input,
|
|
2168
2168
|
{
|
|
2169
2169
|
backgroundColor: p.input,
|
|
2170
2170
|
borderColor: p.border,
|
|
@@ -2186,17 +2186,17 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2186
2186
|
keyboardType: "numeric",
|
|
2187
2187
|
accessibilityLabel: i
|
|
2188
2188
|
}),
|
|
2189
|
-
u && /* @__PURE__ */
|
|
2190
|
-
style: [
|
|
2189
|
+
u && /* @__PURE__ */ I(B, {
|
|
2190
|
+
style: [Ue.error, { color: p.error }],
|
|
2191
2191
|
children: u
|
|
2192
2192
|
}),
|
|
2193
|
-
f && !u && /* @__PURE__ */
|
|
2194
|
-
style: [
|
|
2193
|
+
f && !u && /* @__PURE__ */ I(B, {
|
|
2194
|
+
style: [Ue.helperText, { color: p.textMuted }],
|
|
2195
2195
|
children: f
|
|
2196
2196
|
})
|
|
2197
2197
|
]
|
|
2198
2198
|
});
|
|
2199
|
-
},
|
|
2199
|
+
}, Ue = z.create({
|
|
2200
2200
|
container: { marginBottom: 16 },
|
|
2201
2201
|
error: {
|
|
2202
2202
|
fontSize: 12,
|
|
@@ -2213,20 +2213,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2213
2213
|
paddingHorizontal: 12,
|
|
2214
2214
|
paddingVertical: 8
|
|
2215
2215
|
}
|
|
2216
|
-
}),
|
|
2217
|
-
let [n, r] =
|
|
2218
|
-
return /* @__PURE__ */
|
|
2219
|
-
style:
|
|
2216
|
+
}), We = ({ field: e, extra: t }) => {
|
|
2217
|
+
let [n, r] = P(!1), { value: i, placeholder: a, name: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = y();
|
|
2218
|
+
return /* @__PURE__ */ L(H, {
|
|
2219
|
+
style: Ge.container,
|
|
2220
2220
|
children: [
|
|
2221
|
-
/* @__PURE__ */
|
|
2221
|
+
/* @__PURE__ */ I(s, {
|
|
2222
2222
|
label: d,
|
|
2223
2223
|
required: c.data.required
|
|
2224
2224
|
}),
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
style:
|
|
2227
|
-
children: [/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ L(H, {
|
|
2226
|
+
style: Ge.inputWrapper,
|
|
2227
|
+
children: [/* @__PURE__ */ I(he, {
|
|
2228
2228
|
style: [
|
|
2229
|
-
|
|
2229
|
+
Ge.input,
|
|
2230
2230
|
{
|
|
2231
2231
|
backgroundColor: p.input,
|
|
2232
2232
|
borderColor: p.border,
|
|
@@ -2240,27 +2240,27 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2240
2240
|
placeholderTextColor: p.textMuted,
|
|
2241
2241
|
secureTextEntry: !n,
|
|
2242
2242
|
accessibilityLabel: o
|
|
2243
|
-
}), /* @__PURE__ */
|
|
2244
|
-
style:
|
|
2243
|
+
}), /* @__PURE__ */ I(V, {
|
|
2244
|
+
style: Ge.toggleButton,
|
|
2245
2245
|
onPress: () => r(!n),
|
|
2246
2246
|
activeOpacity: .7,
|
|
2247
|
-
children: /* @__PURE__ */
|
|
2248
|
-
style: [
|
|
2247
|
+
children: /* @__PURE__ */ I(B, {
|
|
2248
|
+
style: [Ge.toggleText, { color: p.primary }],
|
|
2249
2249
|
children: n ? "Hide" : "Show"
|
|
2250
2250
|
})
|
|
2251
2251
|
})]
|
|
2252
2252
|
}),
|
|
2253
|
-
u && /* @__PURE__ */
|
|
2254
|
-
style: [
|
|
2253
|
+
u && /* @__PURE__ */ I(B, {
|
|
2254
|
+
style: [Ge.error, { color: p.error }],
|
|
2255
2255
|
children: u
|
|
2256
2256
|
}),
|
|
2257
|
-
f && !u && /* @__PURE__ */
|
|
2258
|
-
style: [
|
|
2257
|
+
f && !u && /* @__PURE__ */ I(B, {
|
|
2258
|
+
style: [Ge.helperText, { color: p.textMuted }],
|
|
2259
2259
|
children: f
|
|
2260
2260
|
})
|
|
2261
2261
|
]
|
|
2262
2262
|
});
|
|
2263
|
-
},
|
|
2263
|
+
}, Ge = z.create({
|
|
2264
2264
|
container: { marginBottom: 16 },
|
|
2265
2265
|
error: {
|
|
2266
2266
|
fontSize: 12,
|
|
@@ -2293,20 +2293,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2293
2293
|
fontSize: 12,
|
|
2294
2294
|
fontWeight: "600"
|
|
2295
2295
|
}
|
|
2296
|
-
}),
|
|
2297
|
-
let { value:
|
|
2298
|
-
|
|
2296
|
+
}), Ke = ({ field: e, extra: n }) => {
|
|
2297
|
+
let { value: r } = e, { InputLabel: i, node: a, setValue: o, error: s, label: c, helperText: l } = n, { colors: u } = y(), d = t(), f = a.data.options || [], p = r || "", m = a.data.variant !== "default", h = (e) => {
|
|
2298
|
+
o(e);
|
|
2299
2299
|
};
|
|
2300
|
-
return /* @__PURE__ */
|
|
2300
|
+
return /* @__PURE__ */ L(H, {
|
|
2301
2301
|
style: X.container,
|
|
2302
2302
|
children: [
|
|
2303
|
-
/* @__PURE__ */
|
|
2303
|
+
/* @__PURE__ */ I(i, {
|
|
2304
2304
|
label: c,
|
|
2305
|
-
required:
|
|
2305
|
+
required: a.data.required
|
|
2306
2306
|
}),
|
|
2307
2307
|
f.map((e) => {
|
|
2308
2308
|
let t = p === e.value, n = d(e.label) || e.value, r = d(e.description);
|
|
2309
|
-
return m ? /* @__PURE__ */
|
|
2309
|
+
return m ? /* @__PURE__ */ L(V, {
|
|
2310
2310
|
style: [
|
|
2311
2311
|
X.card,
|
|
2312
2312
|
{
|
|
@@ -2323,21 +2323,21 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2323
2323
|
disabled: e.disabled,
|
|
2324
2324
|
activeOpacity: .7,
|
|
2325
2325
|
children: [
|
|
2326
|
-
e.image && /* @__PURE__ */
|
|
2326
|
+
e.image && /* @__PURE__ */ I(de, {
|
|
2327
2327
|
source: { uri: e.image },
|
|
2328
2328
|
style: X.cardImage
|
|
2329
2329
|
}),
|
|
2330
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ L(H, {
|
|
2331
2331
|
style: X.cardTextContainer,
|
|
2332
|
-
children: [/* @__PURE__ */
|
|
2332
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2333
2333
|
style: [X.cardLabel, { color: u.textSecondary }],
|
|
2334
2334
|
children: n
|
|
2335
|
-
}), r && /* @__PURE__ */
|
|
2335
|
+
}), r && /* @__PURE__ */ I(B, {
|
|
2336
2336
|
style: [X.cardDescription, { color: u.textMuted }],
|
|
2337
2337
|
children: r
|
|
2338
2338
|
})]
|
|
2339
2339
|
}),
|
|
2340
|
-
/* @__PURE__ */
|
|
2340
|
+
/* @__PURE__ */ I(H, {
|
|
2341
2341
|
style: [
|
|
2342
2342
|
X.radio,
|
|
2343
2343
|
X.cardRadio,
|
|
@@ -2347,16 +2347,16 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2347
2347
|
},
|
|
2348
2348
|
t && { borderColor: u.primary }
|
|
2349
2349
|
],
|
|
2350
|
-
children: t && /* @__PURE__ */
|
|
2350
|
+
children: t && /* @__PURE__ */ I(H, { style: [X.radioInner, { backgroundColor: u.primary }] })
|
|
2351
2351
|
})
|
|
2352
2352
|
]
|
|
2353
|
-
}, e.value) : /* @__PURE__ */
|
|
2353
|
+
}, e.value) : /* @__PURE__ */ L(V, {
|
|
2354
2354
|
style: X.option,
|
|
2355
2355
|
onPress: () => h(e.value),
|
|
2356
2356
|
disabled: e.disabled,
|
|
2357
2357
|
activeOpacity: .7,
|
|
2358
2358
|
children: [
|
|
2359
|
-
/* @__PURE__ */
|
|
2359
|
+
/* @__PURE__ */ I(H, {
|
|
2360
2360
|
style: [
|
|
2361
2361
|
X.radio,
|
|
2362
2362
|
{
|
|
@@ -2365,22 +2365,22 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2365
2365
|
},
|
|
2366
2366
|
t && { borderColor: u.primary }
|
|
2367
2367
|
],
|
|
2368
|
-
children: t && /* @__PURE__ */
|
|
2368
|
+
children: t && /* @__PURE__ */ I(H, { style: [X.radioInner, { backgroundColor: u.primary }] })
|
|
2369
2369
|
}),
|
|
2370
|
-
e.image && /* @__PURE__ */
|
|
2370
|
+
e.image && /* @__PURE__ */ I(de, {
|
|
2371
2371
|
source: { uri: e.image },
|
|
2372
2372
|
style: X.image
|
|
2373
2373
|
}),
|
|
2374
|
-
/* @__PURE__ */
|
|
2374
|
+
/* @__PURE__ */ L(H, {
|
|
2375
2375
|
style: X.optionTextContainer,
|
|
2376
|
-
children: [/* @__PURE__ */
|
|
2376
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2377
2377
|
style: [
|
|
2378
2378
|
X.optionLabel,
|
|
2379
2379
|
{ color: u.textSecondary },
|
|
2380
2380
|
e.disabled && { color: u.textMuted }
|
|
2381
2381
|
],
|
|
2382
2382
|
children: n
|
|
2383
|
-
}), r && /* @__PURE__ */
|
|
2383
|
+
}), r && /* @__PURE__ */ I(B, {
|
|
2384
2384
|
style: [X.optionDescription, { color: u.textMuted }],
|
|
2385
2385
|
children: r
|
|
2386
2386
|
})]
|
|
@@ -2388,11 +2388,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2388
2388
|
]
|
|
2389
2389
|
}, e.value);
|
|
2390
2390
|
}),
|
|
2391
|
-
|
|
2391
|
+
s && /* @__PURE__ */ I(B, {
|
|
2392
2392
|
style: [X.error, { color: u.error }],
|
|
2393
|
-
children:
|
|
2393
|
+
children: s
|
|
2394
2394
|
}),
|
|
2395
|
-
l && !
|
|
2395
|
+
l && !s && /* @__PURE__ */ I(B, {
|
|
2396
2396
|
style: [X.helperText, { color: u.textMuted }],
|
|
2397
2397
|
children: l
|
|
2398
2398
|
})
|
|
@@ -2466,18 +2466,18 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2466
2466
|
height: 10,
|
|
2467
2467
|
width: 10
|
|
2468
2468
|
}
|
|
2469
|
-
}),
|
|
2470
|
-
let [
|
|
2471
|
-
g ? l(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (l(e),
|
|
2469
|
+
}), qe = ({ field: e, extra: n }) => {
|
|
2470
|
+
let [r, i] = P(!1), { value: a, placeholder: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = n, { colors: p } = y(), m = t(), h = c.data.options || [], g = c.data.multiple, _ = Array.isArray(a) ? a : a ? [a] : [], v = (e) => {
|
|
2471
|
+
g ? l(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (l(e), i(!1));
|
|
2472
2472
|
};
|
|
2473
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ L(H, {
|
|
2474
2474
|
style: Z.container,
|
|
2475
2475
|
children: [
|
|
2476
|
-
/* @__PURE__ */
|
|
2476
|
+
/* @__PURE__ */ I(s, {
|
|
2477
2477
|
label: d,
|
|
2478
2478
|
required: c.data.required
|
|
2479
2479
|
}),
|
|
2480
|
-
/* @__PURE__ */
|
|
2480
|
+
/* @__PURE__ */ L(V, {
|
|
2481
2481
|
style: [
|
|
2482
2482
|
Z.trigger,
|
|
2483
2483
|
{
|
|
@@ -2486,23 +2486,23 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2486
2486
|
},
|
|
2487
2487
|
u && { borderColor: p.error }
|
|
2488
2488
|
],
|
|
2489
|
-
onPress: () =>
|
|
2489
|
+
onPress: () => i(!0),
|
|
2490
2490
|
activeOpacity: .7,
|
|
2491
2491
|
children: [
|
|
2492
|
-
/* @__PURE__ */
|
|
2492
|
+
/* @__PURE__ */ I(B, {
|
|
2493
2493
|
style: [
|
|
2494
2494
|
Z.triggerText,
|
|
2495
2495
|
{ color: p.text },
|
|
2496
2496
|
_.length === 0 && { color: p.textMuted }
|
|
2497
2497
|
],
|
|
2498
2498
|
children: (() => {
|
|
2499
|
-
if (_.length === 0) return
|
|
2499
|
+
if (_.length === 0) return o || "Select...";
|
|
2500
2500
|
if (g) return h.filter((e) => _.includes(e.value)).map((e) => m(e.label) || e.value).join(", ");
|
|
2501
2501
|
let e = h.find((e) => e.value === _[0]);
|
|
2502
|
-
return e ? m(e.label) || e.value :
|
|
2502
|
+
return e ? m(e.label) || e.value : o || "Select...";
|
|
2503
2503
|
})()
|
|
2504
2504
|
}),
|
|
2505
|
-
_.length > 0 && /* @__PURE__ */
|
|
2505
|
+
_.length > 0 && /* @__PURE__ */ I(V, {
|
|
2506
2506
|
onPress: () => l(g ? [] : ""),
|
|
2507
2507
|
hitSlop: {
|
|
2508
2508
|
bottom: 8,
|
|
@@ -2511,68 +2511,68 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2511
2511
|
top: 8
|
|
2512
2512
|
},
|
|
2513
2513
|
style: Z.clearButton,
|
|
2514
|
-
children: /* @__PURE__ */
|
|
2514
|
+
children: /* @__PURE__ */ I(B, {
|
|
2515
2515
|
style: [Z.clearIcon, { color: p.textMuted }],
|
|
2516
2516
|
children: "✕"
|
|
2517
2517
|
})
|
|
2518
2518
|
}),
|
|
2519
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ I(B, {
|
|
2520
2520
|
style: [Z.arrow, { color: p.textMuted }],
|
|
2521
2521
|
children: "▼"
|
|
2522
2522
|
})
|
|
2523
2523
|
]
|
|
2524
2524
|
}),
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
visible:
|
|
2525
|
+
/* @__PURE__ */ I(fe, {
|
|
2526
|
+
visible: r,
|
|
2527
2527
|
transparent: !0,
|
|
2528
2528
|
animationType: "fade",
|
|
2529
|
-
onRequestClose: () =>
|
|
2530
|
-
children: /* @__PURE__ */
|
|
2529
|
+
onRequestClose: () => i(!1),
|
|
2530
|
+
children: /* @__PURE__ */ I(V, {
|
|
2531
2531
|
style: Z.modalOverlay,
|
|
2532
2532
|
activeOpacity: 1,
|
|
2533
|
-
onPress: () =>
|
|
2534
|
-
children: /* @__PURE__ */
|
|
2533
|
+
onPress: () => i(!1),
|
|
2534
|
+
children: /* @__PURE__ */ L(H, {
|
|
2535
2535
|
style: [Z.modalContent, { backgroundColor: p.card }],
|
|
2536
2536
|
onStartShouldSetResponder: () => !0,
|
|
2537
2537
|
children: [
|
|
2538
|
-
/* @__PURE__ */
|
|
2538
|
+
/* @__PURE__ */ L(H, {
|
|
2539
2539
|
style: [Z.modalHeader, { borderBottomColor: p.border }],
|
|
2540
|
-
children: [/* @__PURE__ */
|
|
2540
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2541
2541
|
style: [Z.modalTitle, { color: p.text }],
|
|
2542
|
-
children: d ||
|
|
2543
|
-
}), /* @__PURE__ */
|
|
2544
|
-
onPress: () =>
|
|
2545
|
-
children: /* @__PURE__ */
|
|
2542
|
+
children: d || o || m("renderer.defaultSelectInput.selectOption")
|
|
2543
|
+
}), /* @__PURE__ */ I(V, {
|
|
2544
|
+
onPress: () => i(!1),
|
|
2545
|
+
children: /* @__PURE__ */ I(B, {
|
|
2546
2546
|
style: [Z.closeButton, { color: p.textMuted }],
|
|
2547
2547
|
children: "✕"
|
|
2548
2548
|
})
|
|
2549
2549
|
})]
|
|
2550
2550
|
}),
|
|
2551
|
-
/* @__PURE__ */
|
|
2551
|
+
/* @__PURE__ */ I(pe, {
|
|
2552
2552
|
style: Z.optionsList,
|
|
2553
2553
|
children: h.map((e) => {
|
|
2554
2554
|
let t = _.includes(e.value);
|
|
2555
|
-
return /* @__PURE__ */
|
|
2555
|
+
return /* @__PURE__ */ L(V, {
|
|
2556
2556
|
style: [Z.option, t && { backgroundColor: `${p.primary}20` }],
|
|
2557
2557
|
onPress: () => v(e.value),
|
|
2558
2558
|
disabled: e.disabled,
|
|
2559
2559
|
activeOpacity: .7,
|
|
2560
|
-
children: [/* @__PURE__ */
|
|
2560
|
+
children: [/* @__PURE__ */ I(Ce, {
|
|
2561
2561
|
label: m(e.label) || e.value,
|
|
2562
2562
|
description: m(e.description),
|
|
2563
2563
|
image: e.image,
|
|
2564
2564
|
disabled: e.disabled
|
|
2565
|
-
}), t && /* @__PURE__ */
|
|
2565
|
+
}), t && /* @__PURE__ */ I(B, {
|
|
2566
2566
|
style: [Z.checkmark, { color: p.primary }],
|
|
2567
2567
|
children: "✓"
|
|
2568
2568
|
})]
|
|
2569
2569
|
}, e.value);
|
|
2570
2570
|
})
|
|
2571
2571
|
}),
|
|
2572
|
-
g && /* @__PURE__ */
|
|
2572
|
+
g && /* @__PURE__ */ I(V, {
|
|
2573
2573
|
style: [Z.doneButton, { backgroundColor: p.primary }],
|
|
2574
|
-
onPress: () =>
|
|
2575
|
-
children: /* @__PURE__ */
|
|
2574
|
+
onPress: () => i(!1),
|
|
2575
|
+
children: /* @__PURE__ */ I(B, {
|
|
2576
2576
|
style: Z.doneButtonText,
|
|
2577
2577
|
children: "Done"
|
|
2578
2578
|
})
|
|
@@ -2581,11 +2581,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2581
2581
|
})
|
|
2582
2582
|
})
|
|
2583
2583
|
}),
|
|
2584
|
-
u && /* @__PURE__ */
|
|
2584
|
+
u && /* @__PURE__ */ I(B, {
|
|
2585
2585
|
style: [Z.error, { color: p.error }],
|
|
2586
2586
|
children: u
|
|
2587
2587
|
}),
|
|
2588
|
-
f && !u && /* @__PURE__ */
|
|
2588
|
+
f && !u && /* @__PURE__ */ I(B, {
|
|
2589
2589
|
style: [Z.helperText, { color: p.textMuted }],
|
|
2590
2590
|
children: f
|
|
2591
2591
|
})
|
|
@@ -2672,20 +2672,20 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2672
2672
|
flex: 1,
|
|
2673
2673
|
fontSize: 14
|
|
2674
2674
|
}
|
|
2675
|
-
}),
|
|
2676
|
-
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } =
|
|
2677
|
-
return /* @__PURE__ */
|
|
2678
|
-
style:
|
|
2675
|
+
}), Je = (e) => null, Ye = ({ field: e, extra: t }) => {
|
|
2676
|
+
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = y(), u = !!n;
|
|
2677
|
+
return /* @__PURE__ */ L(H, {
|
|
2678
|
+
style: Xe.container,
|
|
2679
2679
|
children: [
|
|
2680
|
-
/* @__PURE__ */
|
|
2681
|
-
style:
|
|
2682
|
-
children: [/* @__PURE__ */
|
|
2683
|
-
style:
|
|
2684
|
-
children: /* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ L(H, {
|
|
2681
|
+
style: Xe.row,
|
|
2682
|
+
children: [/* @__PURE__ */ I(H, {
|
|
2683
|
+
style: Xe.labelContainer,
|
|
2684
|
+
children: /* @__PURE__ */ I(r, {
|
|
2685
2685
|
label: s,
|
|
2686
2686
|
required: i.data.required
|
|
2687
2687
|
})
|
|
2688
|
-
}), /* @__PURE__ */
|
|
2688
|
+
}), /* @__PURE__ */ I(me, {
|
|
2689
2689
|
trackColor: {
|
|
2690
2690
|
false: l.border,
|
|
2691
2691
|
true: `${l.primary}80`
|
|
@@ -2696,17 +2696,17 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2696
2696
|
value: u
|
|
2697
2697
|
})]
|
|
2698
2698
|
}),
|
|
2699
|
-
o && /* @__PURE__ */
|
|
2700
|
-
style: [
|
|
2699
|
+
o && /* @__PURE__ */ I(B, {
|
|
2700
|
+
style: [Xe.error, { color: l.error }],
|
|
2701
2701
|
children: o
|
|
2702
2702
|
}),
|
|
2703
|
-
c && !o && /* @__PURE__ */
|
|
2704
|
-
style: [
|
|
2703
|
+
c && !o && /* @__PURE__ */ I(B, {
|
|
2704
|
+
style: [Xe.helperText, { color: l.textMuted }],
|
|
2705
2705
|
children: c
|
|
2706
2706
|
})
|
|
2707
2707
|
]
|
|
2708
2708
|
});
|
|
2709
|
-
},
|
|
2709
|
+
}, Xe = z.create({
|
|
2710
2710
|
container: { marginBottom: 16 },
|
|
2711
2711
|
error: {
|
|
2712
2712
|
fontSize: 12,
|
|
@@ -2722,18 +2722,18 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2722
2722
|
flexDirection: "row",
|
|
2723
2723
|
justifyContent: "space-between"
|
|
2724
2724
|
}
|
|
2725
|
-
}),
|
|
2726
|
-
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } =
|
|
2727
|
-
return /* @__PURE__ */
|
|
2728
|
-
style:
|
|
2725
|
+
}), Ze = ({ field: e, extra: t }) => {
|
|
2726
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = y();
|
|
2727
|
+
return /* @__PURE__ */ L(H, {
|
|
2728
|
+
style: Qe.container,
|
|
2729
2729
|
children: [
|
|
2730
|
-
/* @__PURE__ */
|
|
2730
|
+
/* @__PURE__ */ I(a, {
|
|
2731
2731
|
label: l,
|
|
2732
2732
|
required: o.data.required
|
|
2733
2733
|
}),
|
|
2734
|
-
/* @__PURE__ */
|
|
2734
|
+
/* @__PURE__ */ I(he, {
|
|
2735
2735
|
style: [
|
|
2736
|
-
|
|
2736
|
+
Qe.textarea,
|
|
2737
2737
|
{
|
|
2738
2738
|
backgroundColor: d.input,
|
|
2739
2739
|
borderColor: d.border,
|
|
@@ -2750,17 +2750,17 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2750
2750
|
textAlignVertical: "top",
|
|
2751
2751
|
accessibilityLabel: i
|
|
2752
2752
|
}),
|
|
2753
|
-
c && /* @__PURE__ */
|
|
2754
|
-
style: [
|
|
2753
|
+
c && /* @__PURE__ */ I(B, {
|
|
2754
|
+
style: [Qe.error, { color: d.error }],
|
|
2755
2755
|
children: c
|
|
2756
2756
|
}),
|
|
2757
|
-
u && !c && /* @__PURE__ */
|
|
2758
|
-
style: [
|
|
2757
|
+
u && !c && /* @__PURE__ */ I(B, {
|
|
2758
|
+
style: [Qe.helperText, { color: d.textMuted }],
|
|
2759
2759
|
children: u
|
|
2760
2760
|
})
|
|
2761
2761
|
]
|
|
2762
2762
|
});
|
|
2763
|
-
},
|
|
2763
|
+
}, Qe = z.create({
|
|
2764
2764
|
container: { marginBottom: 16 },
|
|
2765
2765
|
error: {
|
|
2766
2766
|
fontSize: 12,
|
|
@@ -2778,18 +2778,18 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2778
2778
|
paddingHorizontal: 12,
|
|
2779
2779
|
paddingVertical: 8
|
|
2780
2780
|
}
|
|
2781
|
-
}),
|
|
2782
|
-
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } =
|
|
2783
|
-
return /* @__PURE__ */
|
|
2784
|
-
style:
|
|
2781
|
+
}), $e = ({ field: e, extra: t }) => {
|
|
2782
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = y();
|
|
2783
|
+
return /* @__PURE__ */ L(H, {
|
|
2784
|
+
style: et.container,
|
|
2785
2785
|
children: [
|
|
2786
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ I(a, {
|
|
2787
2787
|
label: l,
|
|
2788
2788
|
required: o.data.required
|
|
2789
2789
|
}),
|
|
2790
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ I(he, {
|
|
2791
2791
|
style: [
|
|
2792
|
-
|
|
2792
|
+
et.input,
|
|
2793
2793
|
{
|
|
2794
2794
|
backgroundColor: d.input,
|
|
2795
2795
|
borderColor: d.border,
|
|
@@ -2803,17 +2803,17 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2803
2803
|
placeholderTextColor: d.textMuted,
|
|
2804
2804
|
accessibilityLabel: i
|
|
2805
2805
|
}),
|
|
2806
|
-
c && /* @__PURE__ */
|
|
2807
|
-
style: [
|
|
2806
|
+
c && /* @__PURE__ */ I(B, {
|
|
2807
|
+
style: [et.error, { color: d.error }],
|
|
2808
2808
|
children: c
|
|
2809
2809
|
}),
|
|
2810
|
-
u && !c && /* @__PURE__ */
|
|
2811
|
-
style: [
|
|
2810
|
+
u && !c && /* @__PURE__ */ I(B, {
|
|
2811
|
+
style: [et.helperText, { color: d.textMuted }],
|
|
2812
2812
|
children: u
|
|
2813
2813
|
})
|
|
2814
2814
|
]
|
|
2815
2815
|
});
|
|
2816
|
-
},
|
|
2816
|
+
}, et = z.create({
|
|
2817
2817
|
container: { marginBottom: 16 },
|
|
2818
2818
|
error: {
|
|
2819
2819
|
fontSize: 12,
|
|
@@ -2830,92 +2830,92 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2830
2830
|
paddingHorizontal: 12,
|
|
2831
2831
|
paddingVertical: 8
|
|
2832
2832
|
}
|
|
2833
|
-
}),
|
|
2834
|
-
let { value:
|
|
2833
|
+
}), tt = ({ field: e, extra: n }) => {
|
|
2834
|
+
let { value: r, placeholder: i } = e, a = (r || "").split(":"), o = Number.parseInt(a[0], 10), s = Number.parseInt(a[1], 10), c = Number.isNaN(o) ? 0 : o, l = Number.isNaN(s) ? 0 : s, [u, d] = P(c || 0), [f, p] = P(l || 0), [m, h] = P(!1), { InputLabel: g, node: _, setValue: v, error: b, label: x, helperText: S } = n, { colors: C } = y(), w = t(), T = N(null), E = N(null), D = Array.from({ length: 24 }, (e, t) => t), ee = Array.from({ length: 60 }, (e, t) => t), O = () => r || i || w("renderer.defaultInputs.selectTime"), k = ae(() => {
|
|
2835
2835
|
v(`${String(u).padStart(2, "0")}:${String(f).padStart(2, "0")}`), h(!1);
|
|
2836
2836
|
}, [
|
|
2837
2837
|
u,
|
|
2838
2838
|
f,
|
|
2839
2839
|
v
|
|
2840
2840
|
]);
|
|
2841
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ L(H, {
|
|
2842
2842
|
style: Q.container,
|
|
2843
2843
|
children: [
|
|
2844
|
-
/* @__PURE__ */
|
|
2844
|
+
/* @__PURE__ */ I(g, {
|
|
2845
2845
|
label: x,
|
|
2846
2846
|
required: _.data.required
|
|
2847
2847
|
}),
|
|
2848
|
-
/* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ L(V, {
|
|
2849
2849
|
style: [
|
|
2850
2850
|
Q.trigger,
|
|
2851
2851
|
{
|
|
2852
2852
|
backgroundColor: C.input,
|
|
2853
2853
|
borderColor: C.border
|
|
2854
2854
|
},
|
|
2855
|
-
|
|
2855
|
+
b && { borderColor: C.error }
|
|
2856
2856
|
],
|
|
2857
2857
|
onPress: () => {
|
|
2858
2858
|
d(c || 0), p(l || 0), h(!0);
|
|
2859
2859
|
},
|
|
2860
2860
|
activeOpacity: .7,
|
|
2861
|
-
children: [/* @__PURE__ */
|
|
2861
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2862
2862
|
style: [
|
|
2863
2863
|
Q.triggerText,
|
|
2864
2864
|
{ color: C.text },
|
|
2865
|
-
!
|
|
2865
|
+
!r && { color: C.textMuted }
|
|
2866
2866
|
],
|
|
2867
2867
|
numberOfLines: 1,
|
|
2868
|
-
children:
|
|
2869
|
-
}), /* @__PURE__ */
|
|
2868
|
+
children: O()
|
|
2869
|
+
}), /* @__PURE__ */ I(B, {
|
|
2870
2870
|
style: Q.icon,
|
|
2871
2871
|
children: "🕐"
|
|
2872
2872
|
})]
|
|
2873
2873
|
}),
|
|
2874
|
-
/* @__PURE__ */
|
|
2874
|
+
/* @__PURE__ */ I(fe, {
|
|
2875
2875
|
visible: m,
|
|
2876
2876
|
transparent: !0,
|
|
2877
2877
|
animationType: "fade",
|
|
2878
2878
|
onRequestClose: () => h(!1),
|
|
2879
|
-
children: /* @__PURE__ */
|
|
2879
|
+
children: /* @__PURE__ */ I(V, {
|
|
2880
2880
|
style: Q.modalOverlay,
|
|
2881
2881
|
activeOpacity: 1,
|
|
2882
2882
|
onPress: () => h(!1),
|
|
2883
|
-
children: /* @__PURE__ */
|
|
2883
|
+
children: /* @__PURE__ */ L(V, {
|
|
2884
2884
|
style: [Q.modalContent, { backgroundColor: C.card }],
|
|
2885
2885
|
activeOpacity: 1,
|
|
2886
2886
|
onPress: () => {},
|
|
2887
2887
|
children: [
|
|
2888
|
-
/* @__PURE__ */
|
|
2888
|
+
/* @__PURE__ */ L(H, {
|
|
2889
2889
|
style: [Q.modalHeader, { borderBottomColor: C.separator }],
|
|
2890
|
-
children: [/* @__PURE__ */
|
|
2890
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2891
2891
|
style: [Q.modalTitle, { color: C.text }],
|
|
2892
|
-
children: x ||
|
|
2893
|
-
}), /* @__PURE__ */
|
|
2892
|
+
children: x || i || w("renderer.defaultInputs.selectTime")
|
|
2893
|
+
}), /* @__PURE__ */ I(V, {
|
|
2894
2894
|
onPress: () => h(!1),
|
|
2895
|
-
children: /* @__PURE__ */
|
|
2895
|
+
children: /* @__PURE__ */ I(B, {
|
|
2896
2896
|
style: [Q.closeButton, { color: C.textMuted }],
|
|
2897
2897
|
children: "✕"
|
|
2898
2898
|
})
|
|
2899
2899
|
})]
|
|
2900
2900
|
}),
|
|
2901
|
-
/* @__PURE__ */
|
|
2901
|
+
/* @__PURE__ */ L(H, {
|
|
2902
2902
|
style: Q.pickerContainer,
|
|
2903
2903
|
children: [
|
|
2904
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ L(H, {
|
|
2905
2905
|
style: Q.pickerColumn,
|
|
2906
|
-
children: [/* @__PURE__ */
|
|
2906
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2907
2907
|
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
2908
2908
|
children: "Hour"
|
|
2909
|
-
}), /* @__PURE__ */
|
|
2909
|
+
}), /* @__PURE__ */ I(pe, {
|
|
2910
2910
|
ref: T,
|
|
2911
2911
|
style: Q.picker,
|
|
2912
2912
|
contentContainerStyle: Q.pickerContent,
|
|
2913
2913
|
showsVerticalScrollIndicator: !1,
|
|
2914
|
-
children: D.map((e) => /* @__PURE__ */
|
|
2914
|
+
children: D.map((e) => /* @__PURE__ */ I(V, {
|
|
2915
2915
|
style: [Q.pickerItem, u === e && { backgroundColor: C.primary }],
|
|
2916
2916
|
onPress: () => d(e),
|
|
2917
2917
|
activeOpacity: .7,
|
|
2918
|
-
children: /* @__PURE__ */
|
|
2918
|
+
children: /* @__PURE__ */ I(B, {
|
|
2919
2919
|
style: [
|
|
2920
2920
|
Q.pickerItemText,
|
|
2921
2921
|
{ color: C.text },
|
|
@@ -2929,25 +2929,25 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2929
2929
|
}, e))
|
|
2930
2930
|
})]
|
|
2931
2931
|
}),
|
|
2932
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ I(B, {
|
|
2933
2933
|
style: [Q.pickerSeparator, { color: C.text }],
|
|
2934
2934
|
children: ":"
|
|
2935
2935
|
}),
|
|
2936
|
-
/* @__PURE__ */
|
|
2936
|
+
/* @__PURE__ */ L(H, {
|
|
2937
2937
|
style: Q.pickerColumn,
|
|
2938
|
-
children: [/* @__PURE__ */
|
|
2938
|
+
children: [/* @__PURE__ */ I(B, {
|
|
2939
2939
|
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
2940
2940
|
children: "Minute"
|
|
2941
|
-
}), /* @__PURE__ */
|
|
2941
|
+
}), /* @__PURE__ */ I(pe, {
|
|
2942
2942
|
ref: E,
|
|
2943
2943
|
style: Q.picker,
|
|
2944
2944
|
contentContainerStyle: Q.pickerContent,
|
|
2945
2945
|
showsVerticalScrollIndicator: !1,
|
|
2946
|
-
children:
|
|
2946
|
+
children: ee.map((e) => /* @__PURE__ */ I(V, {
|
|
2947
2947
|
style: [Q.pickerItem, f === e && { backgroundColor: C.primary }],
|
|
2948
2948
|
onPress: () => p(e),
|
|
2949
2949
|
activeOpacity: .7,
|
|
2950
|
-
children: /* @__PURE__ */
|
|
2950
|
+
children: /* @__PURE__ */ I(B, {
|
|
2951
2951
|
style: [
|
|
2952
2952
|
Q.pickerItemText,
|
|
2953
2953
|
{ color: C.text },
|
|
@@ -2963,11 +2963,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2963
2963
|
})
|
|
2964
2964
|
]
|
|
2965
2965
|
}),
|
|
2966
|
-
/* @__PURE__ */
|
|
2966
|
+
/* @__PURE__ */ I(V, {
|
|
2967
2967
|
style: [Q.confirmButton, { backgroundColor: C.primary }],
|
|
2968
|
-
onPress:
|
|
2968
|
+
onPress: k,
|
|
2969
2969
|
activeOpacity: .7,
|
|
2970
|
-
children: /* @__PURE__ */
|
|
2970
|
+
children: /* @__PURE__ */ I(B, {
|
|
2971
2971
|
style: [Q.confirmButtonText, { color: C.background }],
|
|
2972
2972
|
children: "Confirm"
|
|
2973
2973
|
})
|
|
@@ -2976,11 +2976,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2976
2976
|
})
|
|
2977
2977
|
})
|
|
2978
2978
|
}),
|
|
2979
|
-
|
|
2979
|
+
b && /* @__PURE__ */ I(B, {
|
|
2980
2980
|
style: [Q.error, { color: C.error }],
|
|
2981
|
-
children:
|
|
2981
|
+
children: b
|
|
2982
2982
|
}),
|
|
2983
|
-
S && !
|
|
2983
|
+
S && !b && /* @__PURE__ */ I(B, {
|
|
2984
2984
|
style: [Q.helperText, { color: C.textMuted }],
|
|
2985
2985
|
children: S
|
|
2986
2986
|
})
|
|
@@ -3072,28 +3072,28 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3072
3072
|
flex: 1,
|
|
3073
3073
|
fontSize: 14
|
|
3074
3074
|
}
|
|
3075
|
-
}),
|
|
3076
|
-
let [
|
|
3077
|
-
let e = `${String(
|
|
3078
|
-
|
|
3075
|
+
}), nt = ({ field: e, extra: n }) => {
|
|
3076
|
+
let [r, i] = P(!1), [a, o] = P(!0), { value: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = n, { colors: m } = y(), h = t(), g = Array.isArray(s) ? s : [], _ = g[0] || "", v = g[1] || "", b = _.split(":"), x = Number.parseInt(b[0], 10), S = Number.parseInt(b[1], 10), C = Number.isNaN(x) ? 0 : x, w = Number.isNaN(S) ? 0 : S, T = v.split(":"), E = Number.parseInt(T[0], 10), D = Number.parseInt(T[1], 10), ee = Number.isNaN(E) ? 0 : E, O = Number.isNaN(D) ? 0 : D, [k, A] = P(0), [j, te] = P(0), ne = Array.from({ length: 24 }, (e, t) => t), re = Array.from({ length: 60 }, (e, t) => t), ie = () => _ && v ? `${_} - ${v}` : _ || h("renderer.defaultInputs.selectTimeRange"), M = ae(() => {
|
|
3077
|
+
let e = `${String(k).padStart(2, "0")}:${String(j).padStart(2, "0")}`;
|
|
3078
|
+
a ? (u([e, v]), o(!1), A(ee || 0), te(O || 0)) : (u([_, e]), i(!1), o(!0));
|
|
3079
3079
|
}, [
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3080
|
+
a,
|
|
3081
|
+
k,
|
|
3082
|
+
j,
|
|
3083
3083
|
_,
|
|
3084
3084
|
v,
|
|
3085
|
+
ee,
|
|
3085
3086
|
O,
|
|
3086
|
-
k,
|
|
3087
3087
|
u
|
|
3088
3088
|
]);
|
|
3089
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ L(H, {
|
|
3090
3090
|
style: $.container,
|
|
3091
3091
|
children: [
|
|
3092
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ I(c, {
|
|
3093
3093
|
label: f,
|
|
3094
3094
|
required: l.data.required
|
|
3095
3095
|
}),
|
|
3096
|
-
/* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ L(V, {
|
|
3097
3097
|
style: [
|
|
3098
3098
|
$.trigger,
|
|
3099
3099
|
{
|
|
@@ -3103,77 +3103,77 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3103
3103
|
d && { borderColor: m.error }
|
|
3104
3104
|
],
|
|
3105
3105
|
onPress: () => {
|
|
3106
|
-
|
|
3106
|
+
A(C || 0), te(w || 0), o(!0), i(!0);
|
|
3107
3107
|
},
|
|
3108
3108
|
activeOpacity: .7,
|
|
3109
|
-
children: [/* @__PURE__ */
|
|
3109
|
+
children: [/* @__PURE__ */ I(B, {
|
|
3110
3110
|
style: [
|
|
3111
3111
|
$.triggerText,
|
|
3112
3112
|
{ color: m.text },
|
|
3113
3113
|
!_ && { color: m.textMuted }
|
|
3114
3114
|
],
|
|
3115
3115
|
numberOfLines: 1,
|
|
3116
|
-
children:
|
|
3117
|
-
}), /* @__PURE__ */
|
|
3116
|
+
children: ie()
|
|
3117
|
+
}), /* @__PURE__ */ I(B, {
|
|
3118
3118
|
style: $.icon,
|
|
3119
3119
|
children: "🕐"
|
|
3120
3120
|
})]
|
|
3121
3121
|
}),
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
visible:
|
|
3122
|
+
/* @__PURE__ */ I(fe, {
|
|
3123
|
+
visible: r,
|
|
3124
3124
|
transparent: !0,
|
|
3125
3125
|
animationType: "fade",
|
|
3126
|
-
onRequestClose: () =>
|
|
3127
|
-
children: /* @__PURE__ */
|
|
3126
|
+
onRequestClose: () => i(!1),
|
|
3127
|
+
children: /* @__PURE__ */ I(V, {
|
|
3128
3128
|
style: $.modalOverlay,
|
|
3129
3129
|
activeOpacity: 1,
|
|
3130
|
-
onPress: () =>
|
|
3131
|
-
children: /* @__PURE__ */
|
|
3130
|
+
onPress: () => i(!1),
|
|
3131
|
+
children: /* @__PURE__ */ L(V, {
|
|
3132
3132
|
style: [$.modalContent, { backgroundColor: m.card }],
|
|
3133
3133
|
activeOpacity: 1,
|
|
3134
3134
|
onPress: () => {},
|
|
3135
3135
|
children: [
|
|
3136
|
-
/* @__PURE__ */
|
|
3136
|
+
/* @__PURE__ */ L(H, {
|
|
3137
3137
|
style: [$.modalHeader, { borderBottomColor: m.separator }],
|
|
3138
|
-
children: [/* @__PURE__ */
|
|
3138
|
+
children: [/* @__PURE__ */ I(B, {
|
|
3139
3139
|
style: [$.modalTitle, { color: m.text }],
|
|
3140
3140
|
children: f || h("renderer.defaultInputs.selectTimeRange")
|
|
3141
|
-
}), /* @__PURE__ */
|
|
3142
|
-
onPress: () =>
|
|
3143
|
-
children: /* @__PURE__ */
|
|
3141
|
+
}), /* @__PURE__ */ I(V, {
|
|
3142
|
+
onPress: () => i(!1),
|
|
3143
|
+
children: /* @__PURE__ */ I(B, {
|
|
3144
3144
|
style: [$.closeButton, { color: m.textMuted }],
|
|
3145
3145
|
children: "✕"
|
|
3146
3146
|
})
|
|
3147
3147
|
})]
|
|
3148
3148
|
}),
|
|
3149
|
-
/* @__PURE__ */
|
|
3149
|
+
/* @__PURE__ */ I(H, {
|
|
3150
3150
|
style: [$.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
3151
|
-
children: /* @__PURE__ */
|
|
3151
|
+
children: /* @__PURE__ */ I(B, {
|
|
3152
3152
|
style: [$.rangeIndicatorText, { color: m.primary }],
|
|
3153
|
-
children: h(
|
|
3153
|
+
children: h(a ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3154
3154
|
})
|
|
3155
3155
|
}),
|
|
3156
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ L(H, {
|
|
3157
3157
|
style: $.pickerContainer,
|
|
3158
3158
|
children: [
|
|
3159
|
-
/* @__PURE__ */
|
|
3159
|
+
/* @__PURE__ */ L(H, {
|
|
3160
3160
|
style: $.pickerColumn,
|
|
3161
|
-
children: [/* @__PURE__ */
|
|
3161
|
+
children: [/* @__PURE__ */ I(B, {
|
|
3162
3162
|
style: [$.pickerLabel, { color: m.textMuted }],
|
|
3163
3163
|
children: "Hour"
|
|
3164
|
-
}), /* @__PURE__ */
|
|
3164
|
+
}), /* @__PURE__ */ I(pe, {
|
|
3165
3165
|
style: $.picker,
|
|
3166
3166
|
contentContainerStyle: $.pickerContent,
|
|
3167
3167
|
showsVerticalScrollIndicator: !1,
|
|
3168
|
-
children: ne.map((e) => /* @__PURE__ */
|
|
3169
|
-
style: [$.pickerItem,
|
|
3170
|
-
onPress: () =>
|
|
3168
|
+
children: ne.map((e) => /* @__PURE__ */ I(V, {
|
|
3169
|
+
style: [$.pickerItem, k === e && { backgroundColor: m.primary }],
|
|
3170
|
+
onPress: () => A(e),
|
|
3171
3171
|
activeOpacity: .7,
|
|
3172
|
-
children: /* @__PURE__ */
|
|
3172
|
+
children: /* @__PURE__ */ I(B, {
|
|
3173
3173
|
style: [
|
|
3174
3174
|
$.pickerItemText,
|
|
3175
3175
|
{ color: m.text },
|
|
3176
|
-
|
|
3176
|
+
k === e && {
|
|
3177
3177
|
color: m.background,
|
|
3178
3178
|
fontWeight: "600"
|
|
3179
3179
|
}
|
|
@@ -3183,28 +3183,28 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3183
3183
|
}, e))
|
|
3184
3184
|
})]
|
|
3185
3185
|
}),
|
|
3186
|
-
/* @__PURE__ */
|
|
3186
|
+
/* @__PURE__ */ I(B, {
|
|
3187
3187
|
style: [$.pickerSeparator, { color: m.text }],
|
|
3188
3188
|
children: ":"
|
|
3189
3189
|
}),
|
|
3190
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ L(H, {
|
|
3191
3191
|
style: $.pickerColumn,
|
|
3192
|
-
children: [/* @__PURE__ */
|
|
3192
|
+
children: [/* @__PURE__ */ I(B, {
|
|
3193
3193
|
style: [$.pickerLabel, { color: m.textMuted }],
|
|
3194
3194
|
children: "Minute"
|
|
3195
|
-
}), /* @__PURE__ */
|
|
3195
|
+
}), /* @__PURE__ */ I(pe, {
|
|
3196
3196
|
style: $.picker,
|
|
3197
3197
|
contentContainerStyle: $.pickerContent,
|
|
3198
3198
|
showsVerticalScrollIndicator: !1,
|
|
3199
|
-
children: re.map((e) => /* @__PURE__ */
|
|
3200
|
-
style: [$.pickerItem,
|
|
3201
|
-
onPress: () =>
|
|
3199
|
+
children: re.map((e) => /* @__PURE__ */ I(V, {
|
|
3200
|
+
style: [$.pickerItem, j === e && { backgroundColor: m.primary }],
|
|
3201
|
+
onPress: () => te(e),
|
|
3202
3202
|
activeOpacity: .7,
|
|
3203
|
-
children: /* @__PURE__ */
|
|
3203
|
+
children: /* @__PURE__ */ I(B, {
|
|
3204
3204
|
style: [
|
|
3205
3205
|
$.pickerItemText,
|
|
3206
3206
|
{ color: m.text },
|
|
3207
|
-
|
|
3207
|
+
j === e && {
|
|
3208
3208
|
color: m.background,
|
|
3209
3209
|
fontWeight: "600"
|
|
3210
3210
|
}
|
|
@@ -3216,24 +3216,24 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3216
3216
|
})
|
|
3217
3217
|
]
|
|
3218
3218
|
}),
|
|
3219
|
-
/* @__PURE__ */
|
|
3219
|
+
/* @__PURE__ */ I(V, {
|
|
3220
3220
|
style: [$.confirmButton, { backgroundColor: m.primary }],
|
|
3221
|
-
onPress:
|
|
3221
|
+
onPress: M,
|
|
3222
3222
|
activeOpacity: .7,
|
|
3223
|
-
children: /* @__PURE__ */
|
|
3223
|
+
children: /* @__PURE__ */ I(B, {
|
|
3224
3224
|
style: [$.confirmButtonText, { color: m.background }],
|
|
3225
|
-
children:
|
|
3225
|
+
children: a ? "Next" : "Confirm"
|
|
3226
3226
|
})
|
|
3227
3227
|
})
|
|
3228
3228
|
]
|
|
3229
3229
|
})
|
|
3230
3230
|
})
|
|
3231
3231
|
}),
|
|
3232
|
-
d && /* @__PURE__ */
|
|
3232
|
+
d && /* @__PURE__ */ I(B, {
|
|
3233
3233
|
style: [$.error, { color: m.error }],
|
|
3234
3234
|
children: d
|
|
3235
3235
|
}),
|
|
3236
|
-
p && !d && /* @__PURE__ */
|
|
3236
|
+
p && !d && /* @__PURE__ */ I(B, {
|
|
3237
3237
|
style: [$.helperText, { color: m.textMuted }],
|
|
3238
3238
|
children: p
|
|
3239
3239
|
})
|
|
@@ -3335,71 +3335,71 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3335
3335
|
flex: 1,
|
|
3336
3336
|
fontSize: 14
|
|
3337
3337
|
}
|
|
3338
|
-
}),
|
|
3339
|
-
address:
|
|
3340
|
-
autocomplete:
|
|
3341
|
-
checkbox:
|
|
3342
|
-
date:
|
|
3343
|
-
daterange:
|
|
3344
|
-
file:
|
|
3345
|
-
hidden:
|
|
3346
|
-
http:
|
|
3347
|
-
number:
|
|
3348
|
-
password:
|
|
3349
|
-
radio:
|
|
3350
|
-
select:
|
|
3351
|
-
submit:
|
|
3352
|
-
switch:
|
|
3353
|
-
text:
|
|
3354
|
-
textarea:
|
|
3355
|
-
time:
|
|
3356
|
-
timerange:
|
|
3357
|
-
},
|
|
3358
|
-
let { colors: d } =
|
|
3359
|
-
return /* @__PURE__ */
|
|
3360
|
-
|
|
3361
|
-
style: [
|
|
3362
|
-
children: t
|
|
3363
|
-
}) : null,
|
|
3364
|
-
/* @__PURE__ */ P(H, {
|
|
3365
|
-
style: rt.content,
|
|
3338
|
+
}), rt = {
|
|
3339
|
+
address: Se,
|
|
3340
|
+
autocomplete: Te,
|
|
3341
|
+
checkbox: Ee,
|
|
3342
|
+
date: De,
|
|
3343
|
+
daterange: Oe,
|
|
3344
|
+
file: ke,
|
|
3345
|
+
hidden: Ae,
|
|
3346
|
+
http: Ve,
|
|
3347
|
+
number: He,
|
|
3348
|
+
password: We,
|
|
3349
|
+
radio: Ke,
|
|
3350
|
+
select: qe,
|
|
3351
|
+
submit: Je,
|
|
3352
|
+
switch: Ye,
|
|
3353
|
+
text: $e,
|
|
3354
|
+
textarea: Ze,
|
|
3355
|
+
time: tt,
|
|
3356
|
+
timerange: nt
|
|
3357
|
+
}, it = ({ step: e, label: n, children: i, canGoBack: a, isLastStep: o, canContinue: s, isSubmitting: c, onBack: l, onContinue: u }) => {
|
|
3358
|
+
let { colors: d } = y(), f = t(), p = !s || c, m = e.nodes.find((e) => r(e) && e.data.type === "submit"), h = m && r(m) ? f(m.data.label) : void 0, g = o ? h || f("renderer.defaultSubmitButton.submit") : f("renderer.step.continue");
|
|
3359
|
+
return /* @__PURE__ */ L(H, { children: [
|
|
3360
|
+
n ? /* @__PURE__ */ I(B, {
|
|
3361
|
+
style: [at.label, { color: d.text }],
|
|
3366
3362
|
children: n
|
|
3363
|
+
}) : null,
|
|
3364
|
+
/* @__PURE__ */ I(H, {
|
|
3365
|
+
style: at.content,
|
|
3366
|
+
children: i
|
|
3367
3367
|
}),
|
|
3368
|
-
/* @__PURE__ */
|
|
3369
|
-
style:
|
|
3370
|
-
children: [
|
|
3368
|
+
/* @__PURE__ */ L(H, {
|
|
3369
|
+
style: at.actions,
|
|
3370
|
+
children: [a ? /* @__PURE__ */ I(V, {
|
|
3371
3371
|
style: [
|
|
3372
|
-
|
|
3372
|
+
at.backButton,
|
|
3373
3373
|
{ borderColor: d.border },
|
|
3374
|
-
|
|
3374
|
+
c && at.disabled
|
|
3375
3375
|
],
|
|
3376
|
-
onPress:
|
|
3377
|
-
disabled:
|
|
3376
|
+
onPress: l,
|
|
3377
|
+
disabled: c,
|
|
3378
3378
|
activeOpacity: .7,
|
|
3379
|
-
children: /* @__PURE__ */
|
|
3380
|
-
style: [
|
|
3379
|
+
children: /* @__PURE__ */ I(B, {
|
|
3380
|
+
style: [at.backButtonText, { color: d.text }],
|
|
3381
3381
|
children: f("renderer.step.back")
|
|
3382
3382
|
})
|
|
3383
|
-
}) : /* @__PURE__ */
|
|
3383
|
+
}) : /* @__PURE__ */ I(H, {}), /* @__PURE__ */ I(V, {
|
|
3384
3384
|
style: [
|
|
3385
|
-
|
|
3385
|
+
at.continueButton,
|
|
3386
3386
|
{ backgroundColor: d.primary },
|
|
3387
3387
|
p && {
|
|
3388
3388
|
backgroundColor: d.primaryDisabled,
|
|
3389
3389
|
opacity: .6
|
|
3390
3390
|
}
|
|
3391
3391
|
],
|
|
3392
|
-
onPress:
|
|
3392
|
+
onPress: u,
|
|
3393
3393
|
disabled: p,
|
|
3394
3394
|
activeOpacity: .7,
|
|
3395
|
-
children:
|
|
3396
|
-
style: [
|
|
3395
|
+
children: c ? /* @__PURE__ */ I(ce, { color: d.primaryForeground }) : /* @__PURE__ */ I(B, {
|
|
3396
|
+
style: [at.continueButtonText, { color: d.primaryForeground }],
|
|
3397
3397
|
children: g
|
|
3398
3398
|
})
|
|
3399
3399
|
})]
|
|
3400
3400
|
})
|
|
3401
3401
|
] });
|
|
3402
|
-
},
|
|
3402
|
+
}, at = z.create({
|
|
3403
3403
|
actions: {
|
|
3404
3404
|
alignItems: "center",
|
|
3405
3405
|
flexDirection: "row",
|
|
@@ -3434,11 +3434,11 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3434
3434
|
fontWeight: "600",
|
|
3435
3435
|
marginBottom: 12
|
|
3436
3436
|
}
|
|
3437
|
-
}),
|
|
3438
|
-
let { colors: i } =
|
|
3439
|
-
return /* @__PURE__ */
|
|
3437
|
+
}), ot = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3438
|
+
let { colors: i } = y();
|
|
3439
|
+
return /* @__PURE__ */ I(V, {
|
|
3440
3440
|
style: [
|
|
3441
|
-
|
|
3441
|
+
st.button,
|
|
3442
3442
|
{ backgroundColor: i.primary },
|
|
3443
3443
|
(t || n) && {
|
|
3444
3444
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3448,12 +3448,12 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3448
3448
|
disabled: t || n,
|
|
3449
3449
|
onPress: r,
|
|
3450
3450
|
activeOpacity: .7,
|
|
3451
|
-
children: n ? /* @__PURE__ */
|
|
3452
|
-
style: [
|
|
3451
|
+
children: n ? /* @__PURE__ */ I(ce, { color: i.primaryForeground }) : /* @__PURE__ */ I(B, {
|
|
3452
|
+
style: [st.buttonText, { color: i.primaryForeground }],
|
|
3453
3453
|
children: e
|
|
3454
3454
|
})
|
|
3455
3455
|
});
|
|
3456
|
-
},
|
|
3456
|
+
}, st = z.create({
|
|
3457
3457
|
button: {
|
|
3458
3458
|
alignItems: "center",
|
|
3459
3459
|
borderRadius: 6,
|
|
@@ -3466,16 +3466,16 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3466
3466
|
fontSize: 16,
|
|
3467
3467
|
fontWeight: "600"
|
|
3468
3468
|
}
|
|
3469
|
-
}),
|
|
3470
|
-
let
|
|
3471
|
-
return /* @__PURE__ */
|
|
3472
|
-
style: [
|
|
3473
|
-
children:
|
|
3469
|
+
}), ct = ({ children: e }) => e, lt = ({ node: e }) => {
|
|
3470
|
+
let n = t(), { colors: r } = y(), i = n(e.data?.label);
|
|
3471
|
+
return /* @__PURE__ */ I(B, {
|
|
3472
|
+
style: [dt.title, { color: r.text }],
|
|
3473
|
+
children: i
|
|
3474
3474
|
});
|
|
3475
|
-
},
|
|
3476
|
-
let { colors: e } =
|
|
3477
|
-
return /* @__PURE__ */
|
|
3478
|
-
},
|
|
3475
|
+
}, ut = () => {
|
|
3476
|
+
let { colors: e } = y();
|
|
3477
|
+
return /* @__PURE__ */ I(H, { style: [dt.divider, { backgroundColor: e.separator }] });
|
|
3478
|
+
}, dt = z.create({
|
|
3479
3479
|
divider: {
|
|
3480
3480
|
height: 1,
|
|
3481
3481
|
marginBottom: 16,
|
|
@@ -3486,63 +3486,63 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3486
3486
|
fontWeight: "700",
|
|
3487
3487
|
marginBottom: 16
|
|
3488
3488
|
}
|
|
3489
|
-
}),
|
|
3490
|
-
divider:
|
|
3491
|
-
title:
|
|
3492
|
-
},
|
|
3489
|
+
}), ft = {
|
|
3490
|
+
divider: ut,
|
|
3491
|
+
title: lt
|
|
3492
|
+
}, pt = ({ node: e, children: t }) => {
|
|
3493
3493
|
let { image: n } = e.data;
|
|
3494
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ L(H, { children: [n && /* @__PURE__ */ I(de, {
|
|
3495
3495
|
source: { uri: n },
|
|
3496
|
-
style:
|
|
3496
|
+
style: mt.image,
|
|
3497
3497
|
resizeMode: "cover"
|
|
3498
3498
|
}), t] });
|
|
3499
|
-
},
|
|
3499
|
+
}, mt = z.create({ image: {
|
|
3500
3500
|
borderRadius: 6,
|
|
3501
3501
|
height: 160,
|
|
3502
3502
|
marginBottom: 8,
|
|
3503
3503
|
width: "100%"
|
|
3504
|
-
} }),
|
|
3505
|
-
let { colors: t } =
|
|
3506
|
-
return
|
|
3507
|
-
let e =
|
|
3504
|
+
} }), ht = ({ style: e }) => {
|
|
3505
|
+
let { colors: t } = y(), n = N(new le.Value(.5)).current;
|
|
3506
|
+
return oe(() => {
|
|
3507
|
+
let e = le.loop(le.sequence([le.timing(n, {
|
|
3508
3508
|
duration: 600,
|
|
3509
3509
|
toValue: 1,
|
|
3510
3510
|
useNativeDriver: !0
|
|
3511
|
-
}),
|
|
3511
|
+
}), le.timing(n, {
|
|
3512
3512
|
duration: 600,
|
|
3513
3513
|
toValue: .5,
|
|
3514
3514
|
useNativeDriver: !0
|
|
3515
3515
|
})]));
|
|
3516
3516
|
return e.start(), () => e.stop();
|
|
3517
|
-
}, [n]), /* @__PURE__ */
|
|
3518
|
-
|
|
3517
|
+
}, [n]), /* @__PURE__ */ I(le.View, { style: [
|
|
3518
|
+
_t.bar,
|
|
3519
3519
|
{
|
|
3520
3520
|
backgroundColor: t.muted,
|
|
3521
3521
|
opacity: n
|
|
3522
3522
|
},
|
|
3523
3523
|
e
|
|
3524
3524
|
] });
|
|
3525
|
-
},
|
|
3525
|
+
}, gt = () => /* @__PURE__ */ L(H, {
|
|
3526
3526
|
accessibilityState: { busy: !0 },
|
|
3527
3527
|
children: [
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3530
|
-
style:
|
|
3528
|
+
/* @__PURE__ */ I(ht, { style: _t.title }),
|
|
3529
|
+
/* @__PURE__ */ I(H, {
|
|
3530
|
+
style: _t.fields,
|
|
3531
3531
|
children: [
|
|
3532
3532
|
0,
|
|
3533
3533
|
1,
|
|
3534
3534
|
2
|
|
3535
|
-
].map((e) => /* @__PURE__ */
|
|
3536
|
-
style:
|
|
3537
|
-
children: [/* @__PURE__ */
|
|
3535
|
+
].map((e) => /* @__PURE__ */ L(H, {
|
|
3536
|
+
style: _t.field,
|
|
3537
|
+
children: [/* @__PURE__ */ I(ht, { style: _t.fieldLabel }), /* @__PURE__ */ I(ht, { style: _t.fieldInput })]
|
|
3538
3538
|
}, e))
|
|
3539
3539
|
}),
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
style:
|
|
3542
|
-
children: /* @__PURE__ */
|
|
3540
|
+
/* @__PURE__ */ I(H, {
|
|
3541
|
+
style: _t.actions,
|
|
3542
|
+
children: /* @__PURE__ */ I(ht, { style: _t.button })
|
|
3543
3543
|
})
|
|
3544
3544
|
]
|
|
3545
|
-
}),
|
|
3545
|
+
}), _t = z.create({
|
|
3546
3546
|
actions: {
|
|
3547
3547
|
alignItems: "flex-end",
|
|
3548
3548
|
marginTop: 24
|
|
@@ -3567,14 +3567,14 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3567
3567
|
marginBottom: 24,
|
|
3568
3568
|
width: "33%"
|
|
3569
3569
|
}
|
|
3570
|
-
}),
|
|
3571
|
-
let { colors:
|
|
3570
|
+
}), vt = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: r, googleApiKey: i, headers: a, initialValues: o, isLoading: c = !1, isSubmitting: l = !1, language: u, onBack: d, onChange: f, onSubmit: p, showPoweredBy: m, style: h, theme: g, validate: _, validationMode: v }) => {
|
|
3571
|
+
let { colors: b } = y(), { canContinueStep: x, canSubmit: S, clearSubmitMessage: C, config: w, currentStep: T, currentStepGroupNode: E, currentStepIndex: D, formErrors: ee, formValues: O, goToNextStep: k, goToPreviousStep: A, handleSubmit: j, inputNodes: ne, isFirstStep: re, isLastStep: ie, isSubmitting: oe, missingRequiredFields: N, setFieldValue: P, steps: F, submitMessage: ce, t: R } = te({
|
|
3572
3572
|
baseUrl: e,
|
|
3573
3573
|
components: t,
|
|
3574
3574
|
flow: r,
|
|
3575
|
-
googleApiKey:
|
|
3576
|
-
headers:
|
|
3577
|
-
initialValues:
|
|
3575
|
+
googleApiKey: i,
|
|
3576
|
+
headers: a,
|
|
3577
|
+
initialValues: o,
|
|
3578
3578
|
language: u,
|
|
3579
3579
|
onChange: f,
|
|
3580
3580
|
onSubmit: p,
|
|
@@ -3582,103 +3582,103 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3582
3582
|
theme: g,
|
|
3583
3583
|
validate: _,
|
|
3584
3584
|
validationMode: v
|
|
3585
|
-
}),
|
|
3585
|
+
}), le = l || oe, { FormWrapper: ue, SubmitButtonWrapper: de, renderNode: fe } = M({
|
|
3586
3586
|
config: w,
|
|
3587
|
-
DefaultFormWrapper:
|
|
3588
|
-
DefaultInputLabel:
|
|
3589
|
-
DefaultInputWrapper:
|
|
3590
|
-
DefaultSubmitButton:
|
|
3591
|
-
DefaultSubmitButtonWrapper:
|
|
3592
|
-
defaultInputRenderers:
|
|
3593
|
-
defaultUI:
|
|
3594
|
-
formErrors:
|
|
3595
|
-
formValues:
|
|
3587
|
+
DefaultFormWrapper: ge,
|
|
3588
|
+
DefaultInputLabel: ve,
|
|
3589
|
+
DefaultInputWrapper: pt,
|
|
3590
|
+
DefaultSubmitButton: ot,
|
|
3591
|
+
DefaultSubmitButtonWrapper: ct,
|
|
3592
|
+
defaultInputRenderers: rt,
|
|
3593
|
+
defaultUI: ft,
|
|
3594
|
+
formErrors: ee,
|
|
3595
|
+
formValues: O,
|
|
3596
3596
|
inputNodes: ne,
|
|
3597
|
-
isSubmitting:
|
|
3598
|
-
missingRequiredFields:
|
|
3599
|
-
setFieldValue:
|
|
3600
|
-
}),
|
|
3601
|
-
if (
|
|
3597
|
+
isSubmitting: le,
|
|
3598
|
+
missingRequiredFields: N,
|
|
3599
|
+
setFieldValue: P
|
|
3600
|
+
}), z = w.components.step ?? it, me = w.components.loadingSkeleton ?? gt, he = se(() => R(E?.data?.label), [R, E]), V = ae(() => {
|
|
3601
|
+
if (ie) {
|
|
3602
3602
|
j();
|
|
3603
3603
|
return;
|
|
3604
3604
|
}
|
|
3605
|
-
|
|
3605
|
+
k();
|
|
3606
3606
|
}, [
|
|
3607
|
-
|
|
3607
|
+
ie,
|
|
3608
3608
|
j,
|
|
3609
|
-
|
|
3610
|
-
]),
|
|
3611
|
-
if (
|
|
3609
|
+
k
|
|
3610
|
+
]), _e = ae(() => {
|
|
3611
|
+
if (re) {
|
|
3612
3612
|
d?.();
|
|
3613
3613
|
return;
|
|
3614
3614
|
}
|
|
3615
|
-
|
|
3615
|
+
A();
|
|
3616
3616
|
}, [
|
|
3617
|
-
|
|
3617
|
+
re,
|
|
3618
3618
|
d,
|
|
3619
|
-
|
|
3620
|
-
]), ye = !
|
|
3621
|
-
return /* @__PURE__ */
|
|
3619
|
+
A
|
|
3620
|
+
]), ye = !re || !!d;
|
|
3621
|
+
return /* @__PURE__ */ I(pe, {
|
|
3622
3622
|
nestedScrollEnabled: !0,
|
|
3623
3623
|
style: [
|
|
3624
|
-
|
|
3625
|
-
{ backgroundColor:
|
|
3624
|
+
bt.container,
|
|
3625
|
+
{ backgroundColor: b.background },
|
|
3626
3626
|
h
|
|
3627
3627
|
],
|
|
3628
3628
|
contentContainerStyle: n,
|
|
3629
|
-
children: c ? /* @__PURE__ */
|
|
3629
|
+
children: c ? /* @__PURE__ */ I(me, {}) : /* @__PURE__ */ L(s, {
|
|
3630
3630
|
value: {
|
|
3631
3631
|
baseUrl: w.baseUrl,
|
|
3632
3632
|
flow: r,
|
|
3633
|
-
formErrors:
|
|
3634
|
-
formValues:
|
|
3633
|
+
formErrors: ee,
|
|
3634
|
+
formValues: O,
|
|
3635
3635
|
googleApiKey: w.googleApiKey,
|
|
3636
3636
|
headers: w.headers,
|
|
3637
3637
|
inputNodes: ne,
|
|
3638
3638
|
language: w.language,
|
|
3639
|
-
setFieldValue:
|
|
3639
|
+
setFieldValue: P
|
|
3640
3640
|
},
|
|
3641
|
-
children: [/* @__PURE__ */
|
|
3641
|
+
children: [/* @__PURE__ */ L(ue, {
|
|
3642
3642
|
onSubmit: j,
|
|
3643
|
-
children: [T && /* @__PURE__ */
|
|
3644
|
-
missingFields:
|
|
3645
|
-
children: /* @__PURE__ */
|
|
3643
|
+
children: [T && /* @__PURE__ */ I(de, {
|
|
3644
|
+
missingFields: N,
|
|
3645
|
+
children: /* @__PURE__ */ I(z, {
|
|
3646
3646
|
step: T,
|
|
3647
3647
|
groupNode: E,
|
|
3648
3648
|
stepIndex: D,
|
|
3649
|
-
totalSteps:
|
|
3650
|
-
isFirstStep:
|
|
3651
|
-
isLastStep:
|
|
3652
|
-
canContinue: x && (!
|
|
3649
|
+
totalSteps: F.length,
|
|
3650
|
+
isFirstStep: re,
|
|
3651
|
+
isLastStep: ie,
|
|
3652
|
+
canContinue: x && (!ie || S),
|
|
3653
3653
|
canGoBack: ye,
|
|
3654
|
-
isSubmitting:
|
|
3655
|
-
onBack:
|
|
3656
|
-
onContinue:
|
|
3654
|
+
isSubmitting: le,
|
|
3655
|
+
onBack: _e,
|
|
3656
|
+
onContinue: V,
|
|
3657
3657
|
label: he,
|
|
3658
3658
|
children: T.nodes.map((e) => fe(e))
|
|
3659
3659
|
})
|
|
3660
|
-
}), w.showPoweredBy && /* @__PURE__ */
|
|
3661
|
-
style: [
|
|
3660
|
+
}), w.showPoweredBy && /* @__PURE__ */ I(B, {
|
|
3661
|
+
style: [bt.poweredBy, { color: b.textMuted }],
|
|
3662
3662
|
children: "Powered by Treege"
|
|
3663
3663
|
})]
|
|
3664
|
-
}),
|
|
3665
|
-
style: [
|
|
3666
|
-
children: [/* @__PURE__ */
|
|
3667
|
-
style: [
|
|
3668
|
-
children:
|
|
3669
|
-
}), /* @__PURE__ */
|
|
3670
|
-
style: [
|
|
3664
|
+
}), ce && /* @__PURE__ */ L(H, {
|
|
3665
|
+
style: [bt.message, { backgroundColor: ce.type === "success" ? b.successBg : b.errorBg }],
|
|
3666
|
+
children: [/* @__PURE__ */ I(B, {
|
|
3667
|
+
style: [bt.messageText, { color: ce.type === "success" ? b.success : b.error }],
|
|
3668
|
+
children: ce.message
|
|
3669
|
+
}), /* @__PURE__ */ I(B, {
|
|
3670
|
+
style: [bt.messageClose, { color: ce.type === "success" ? b.success : b.error }],
|
|
3671
3671
|
onPress: C,
|
|
3672
|
-
children:
|
|
3672
|
+
children: R("common.close")
|
|
3673
3673
|
})]
|
|
3674
3674
|
})]
|
|
3675
3675
|
})
|
|
3676
3676
|
});
|
|
3677
|
-
},
|
|
3677
|
+
}, yt = (e) => /* @__PURE__ */ I(C, {
|
|
3678
3678
|
theme: e.theme,
|
|
3679
3679
|
storageKey: "treege-renderer-theme",
|
|
3680
|
-
children: /* @__PURE__ */
|
|
3681
|
-
}),
|
|
3680
|
+
children: /* @__PURE__ */ I(vt, { ...e })
|
|
3681
|
+
}), bt = z.create({
|
|
3682
3682
|
container: { flex: 1 },
|
|
3683
3683
|
message: {
|
|
3684
3684
|
borderRadius: 6,
|
|
@@ -3701,4 +3701,4 @@ var me = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3701
3701
|
}
|
|
3702
3702
|
});
|
|
3703
3703
|
//#endregion
|
|
3704
|
-
export {
|
|
3704
|
+
export { Se as DefaultAddressInput, Te as DefaultAutocompleteInput, Ee as DefaultCheckboxInput, De as DefaultDateInput, Oe as DefaultDateRangeInput, ut as DefaultDividerUI, ke as DefaultFileInput, Ae as DefaultHiddenInput, Ve as DefaultHttpInput, ve as DefaultInputLabel, He as DefaultNumberInput, We as DefaultPasswordInput, Ke as DefaultRadioInput, qe as DefaultSelectInput, Ye as DefaultSwitchInput, $e as DefaultTextInput, Ze as DefaultTextareaInput, tt as DefaultTimeInput, nt as DefaultTimeRangeInput, lt as DefaultTitleUI, yt as TreegeRenderer, k as TreegeRendererProvider, x as applyReferenceTransformation, h as buildInitialFormValues, u as calculateReferenceFieldUpdates, b as checkFormFieldHasValue, S as convertFormValuesToNamedFormat, rt as defaultInputRenderers, ft as defaultUI, ne as evaluateCondition, ie as evaluateConditions, v as fileNameFromUrl, m as fileToSerializable, p as filesToSerializable, re as findStartNode, l as formatFileSize, A as getFlowRenderState, n as getTranslatedText, f as isFieldEmpty, w as isRemoteFileData, O as isStartNode, D as normalizeSerializableFiles, _ as resolveNodeDefaultValue, Fe as sanitize, Le as sanitizeHttpResponse, d as serializableToFile, te as useTreegeRenderer, j as useTreegeRendererConfig };
|