treege 3.0.0-beta.75 → 3.0.0-beta.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -18
- package/dist/{DefaultSubmitButton-BT4AxAnR.js → DefaultSubmitButton-Bk5U_6Qm.js} +749 -758
- package/dist/{ThemeContext-CSH4Fupd.js → ThemeContext-DeWmeqHK.js} +14 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/listeners/FlowChangeEmitter.d.ts +19 -0
- package/dist/editor/types/editor.d.ts +9 -0
- package/dist/{editor-B0Yir2zE.js → editor-B1cEixH_.js} +1651 -1628
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputLabel.d.ts +10 -0
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultInputLabel.d.ts +9 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +2 -1
- package/dist/renderer/index.d.ts +1 -0
- package/dist/renderer/index.native.d.ts +1 -0
- package/dist/renderer/types/renderer.d.ts +37 -0
- package/dist/renderer-DIAtKfQ8.js +256 -0
- package/dist/renderer-native.js +1156 -1274
- package/dist/renderer.js +5 -5
- package/dist/shared/locales/ar.json.d.ts +2 -0
- package/dist/shared/locales/de.json.d.ts +2 -0
- package/dist/shared/locales/en.json.d.ts +2 -0
- package/dist/shared/locales/es.json.d.ts +2 -0
- package/dist/shared/locales/fr.json.d.ts +2 -0
- package/dist/shared/locales/it.json.d.ts +2 -0
- package/dist/shared/locales/pt.json.d.ts +2 -0
- package/dist/{useRenderNode-GobhZp-Y.js → useRenderNode-DJ0mFozt.js} +66 -65
- package/package.json +1 -1
- package/dist/renderer-D9Yaxr2H.js +0 -255
package/dist/renderer-native.js
CHANGED
|
@@ -1,13 +1,30 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, F as r, H as i, O as a, P as o, T as s, _ as c, a as l, b as u, c as d, g as f, h as p, i as m, j 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, x as w } from "./ThemeContext-
|
|
2
|
-
import { a as T, c as E, i as D, l as O, n as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { ActivityIndicator as
|
|
1
|
+
import { A as e, B as t, C as n, F as r, H as i, O as a, P as o, T as s, _ as c, a as l, b as u, c as d, g as f, h as p, i as m, j 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, x as w } from "./ThemeContext-DeWmeqHK.js";
|
|
2
|
+
import { a as T, c as E, i as D, l as O, n as k, o as A, r as j, s as ee, t as te } from "./useRenderNode-DJ0mFozt.js";
|
|
3
|
+
import { useCallback as ne, useEffect as M, useMemo as re, useRef as N, useState as P } from "react";
|
|
4
|
+
import { Fragment as ie, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
5
|
+
import { ActivityIndicator as ae, Alert as oe, Animated as se, FlatList as ce, Image as L, Modal as le, ScrollView as R, StyleSheet as z, Switch as ue, Text as B, TextInput as de, TouchableOpacity as V, View as H } from "react-native";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
7
|
-
var fe = ({ children: e }) => /* @__PURE__ */
|
|
7
|
+
var fe = ({ children: e }) => /* @__PURE__ */ F(H, {
|
|
8
8
|
style: pe.container,
|
|
9
9
|
children: e
|
|
10
|
-
}), pe = z.create({ container: { padding: 16 } }), me =
|
|
10
|
+
}), pe = z.create({ container: { padding: 16 } }), me = ({ label: e, required: t, style: n }) => {
|
|
11
|
+
let { colors: r } = y();
|
|
12
|
+
return e ? /* @__PURE__ */ I(B, {
|
|
13
|
+
style: [
|
|
14
|
+
he.label,
|
|
15
|
+
{ color: r.textSecondary },
|
|
16
|
+
n
|
|
17
|
+
],
|
|
18
|
+
children: [e, t && /* @__PURE__ */ F(B, {
|
|
19
|
+
style: { color: r.error },
|
|
20
|
+
children: "*"
|
|
21
|
+
})]
|
|
22
|
+
}) : null;
|
|
23
|
+
}, he = z.create({ label: {
|
|
24
|
+
fontSize: 14,
|
|
25
|
+
fontWeight: "500",
|
|
26
|
+
marginBottom: 8
|
|
27
|
+
} }), ge = async (e, t) => {
|
|
11
28
|
if (!e || e.trim().length < 3) return [];
|
|
12
29
|
try {
|
|
13
30
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -22,7 +39,7 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
22
39
|
} catch (e) {
|
|
23
40
|
return console.error("Nominatim fetch error:", e), [];
|
|
24
41
|
}
|
|
25
|
-
},
|
|
42
|
+
}, _e = async (e, t) => {
|
|
26
43
|
if (!e || e.trim().length < 3) return [];
|
|
27
44
|
try {
|
|
28
45
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -35,147 +52,144 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
35
52
|
} catch (e) {
|
|
36
53
|
return console.error("Google Places fetch error:", e), [];
|
|
37
54
|
}
|
|
38
|
-
},
|
|
39
|
-
let [n, i] =
|
|
40
|
-
|
|
41
|
-
}, [
|
|
55
|
+
}, ve = ({ field: e, extra: t }) => {
|
|
56
|
+
let [n, i] = P(""), [a, o] = P([]), [s, c] = P(!1), [l, u] = P(!1), { value: d, placeholder: f, id: p, name: m } = e, { InputLabel: g, node: _, setValue: v, error: b, label: x, helperText: S } = t, { language: C, googleApiKey: w } = r(), T = h(), { colors: E } = y(), D = ne((e) => {
|
|
57
|
+
v(e.value), i(""), c(!1), o([]);
|
|
58
|
+
}, [v]), O = () => {
|
|
42
59
|
c(!1);
|
|
43
60
|
};
|
|
44
|
-
return
|
|
61
|
+
return M(() => {
|
|
45
62
|
if (!n || n.trim().length < 3) {
|
|
46
63
|
o([]), u(!1);
|
|
47
64
|
return;
|
|
48
65
|
}
|
|
49
66
|
u(!0);
|
|
50
67
|
let e = setTimeout(async () => {
|
|
51
|
-
o(
|
|
68
|
+
o(w ? await _e(n, w) : await ge(n, C)), u(!1);
|
|
52
69
|
}, 300);
|
|
53
70
|
return () => {
|
|
54
71
|
clearTimeout(e), u(!1);
|
|
55
72
|
};
|
|
56
73
|
}, [
|
|
57
74
|
n,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
]), /* @__PURE__ */
|
|
75
|
+
C,
|
|
76
|
+
w
|
|
77
|
+
]), /* @__PURE__ */ I(H, {
|
|
61
78
|
style: U.container,
|
|
62
79
|
children: [
|
|
63
|
-
/* @__PURE__ */ F(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
style: { color: T.error },
|
|
67
|
-
children: "*"
|
|
68
|
-
})]
|
|
80
|
+
/* @__PURE__ */ F(g, {
|
|
81
|
+
label: x,
|
|
82
|
+
required: _.data.required
|
|
69
83
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ I(V, {
|
|
71
85
|
style: [
|
|
72
86
|
U.trigger,
|
|
73
87
|
{
|
|
74
|
-
backgroundColor:
|
|
75
|
-
borderColor:
|
|
88
|
+
backgroundColor: E.input,
|
|
89
|
+
borderColor: E.border
|
|
76
90
|
},
|
|
77
|
-
|
|
91
|
+
b && { borderColor: E.error }
|
|
78
92
|
],
|
|
79
93
|
onPress: () => c(!0),
|
|
80
94
|
activeOpacity: .7,
|
|
81
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ F(B, {
|
|
82
96
|
style: [
|
|
83
97
|
U.triggerText,
|
|
84
|
-
{ color:
|
|
85
|
-
!d && { color:
|
|
98
|
+
{ color: E.text },
|
|
99
|
+
!d && { color: E.textMuted }
|
|
86
100
|
],
|
|
87
101
|
numberOfLines: 1,
|
|
88
|
-
children: d || f ||
|
|
89
|
-
}), /* @__PURE__ */
|
|
102
|
+
children: d || f || T("renderer.defaultAddressInput.enterAddress")
|
|
103
|
+
}), /* @__PURE__ */ F(B, {
|
|
90
104
|
style: U.icon,
|
|
91
105
|
children: "📍"
|
|
92
106
|
})]
|
|
93
107
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ F(le, {
|
|
95
109
|
visible: s,
|
|
96
110
|
transparent: !0,
|
|
97
111
|
animationType: "fade",
|
|
98
|
-
onRequestClose:
|
|
99
|
-
children: /* @__PURE__ */
|
|
112
|
+
onRequestClose: O,
|
|
113
|
+
children: /* @__PURE__ */ F(V, {
|
|
100
114
|
style: U.modalOverlay,
|
|
101
115
|
activeOpacity: 1,
|
|
102
|
-
onPress:
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
-
style: [U.modalContent, { backgroundColor:
|
|
116
|
+
onPress: O,
|
|
117
|
+
children: /* @__PURE__ */ I(V, {
|
|
118
|
+
style: [U.modalContent, { backgroundColor: E.card }],
|
|
105
119
|
activeOpacity: 1,
|
|
106
120
|
onPress: () => {},
|
|
107
121
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
style: [U.modalHeader, { borderBottomColor:
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
-
style: [U.modalTitle, { color:
|
|
112
|
-
children:
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
onPress:
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
style: [U.closeButton, { color:
|
|
122
|
+
/* @__PURE__ */ I(H, {
|
|
123
|
+
style: [U.modalHeader, { borderBottomColor: E.separator }],
|
|
124
|
+
children: [/* @__PURE__ */ F(B, {
|
|
125
|
+
style: [U.modalTitle, { color: E.text }],
|
|
126
|
+
children: x || f || T("renderer.defaultAddressInput.enterAddress")
|
|
127
|
+
}), /* @__PURE__ */ F(V, {
|
|
128
|
+
onPress: O,
|
|
129
|
+
children: /* @__PURE__ */ F(B, {
|
|
130
|
+
style: [U.closeButton, { color: E.textMuted }],
|
|
117
131
|
children: "✕"
|
|
118
132
|
})
|
|
119
133
|
})]
|
|
120
134
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ I(H, {
|
|
122
136
|
style: U.searchContainer,
|
|
123
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ F(de, {
|
|
124
138
|
style: [U.searchInput, {
|
|
125
|
-
backgroundColor:
|
|
126
|
-
borderColor:
|
|
127
|
-
color:
|
|
139
|
+
backgroundColor: E.muted,
|
|
140
|
+
borderColor: E.border,
|
|
141
|
+
color: E.text
|
|
128
142
|
}],
|
|
129
|
-
placeholder: f ||
|
|
130
|
-
placeholderTextColor:
|
|
143
|
+
placeholder: f || T("renderer.defaultAddressInput.enterAddress"),
|
|
144
|
+
placeholderTextColor: E.textMuted,
|
|
131
145
|
value: n,
|
|
132
146
|
onChangeText: i,
|
|
133
147
|
autoFocus: !0,
|
|
134
148
|
autoCapitalize: "none",
|
|
135
149
|
autoCorrect: !1
|
|
136
|
-
}), l && /* @__PURE__ */
|
|
150
|
+
}), l && /* @__PURE__ */ F(ae, {
|
|
137
151
|
size: "small",
|
|
138
|
-
color:
|
|
152
|
+
color: E.primary,
|
|
139
153
|
style: U.searchLoader
|
|
140
154
|
})]
|
|
141
155
|
}),
|
|
142
|
-
l ? /* @__PURE__ */
|
|
156
|
+
l ? /* @__PURE__ */ I(H, {
|
|
143
157
|
style: U.loadingContainer,
|
|
144
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ F(ae, {
|
|
145
159
|
size: "small",
|
|
146
|
-
color:
|
|
147
|
-
}), /* @__PURE__ */
|
|
148
|
-
style: [U.loadingText, { color:
|
|
149
|
-
children:
|
|
160
|
+
color: E.primary
|
|
161
|
+
}), /* @__PURE__ */ F(B, {
|
|
162
|
+
style: [U.loadingText, { color: E.textMuted }],
|
|
163
|
+
children: T("renderer.defaultAddressInput.searching")
|
|
150
164
|
})]
|
|
151
|
-
}) : /* @__PURE__ */
|
|
165
|
+
}) : /* @__PURE__ */ F(ce, {
|
|
152
166
|
data: a,
|
|
153
167
|
keyExtractor: (e, t) => t.toString(),
|
|
154
168
|
style: U.suggestionsList,
|
|
155
169
|
contentContainerStyle: U.suggestionsListContent,
|
|
156
170
|
keyboardShouldPersistTaps: "handled",
|
|
157
|
-
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */
|
|
171
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ F(H, {
|
|
158
172
|
style: U.emptyContainer,
|
|
159
|
-
children: /* @__PURE__ */
|
|
160
|
-
style: [U.emptyText, { color:
|
|
161
|
-
children:
|
|
173
|
+
children: /* @__PURE__ */ F(B, {
|
|
174
|
+
style: [U.emptyText, { color: E.textMuted }],
|
|
175
|
+
children: T("renderer.defaultAddressInput.noAddressesFound")
|
|
162
176
|
})
|
|
163
|
-
}) : /* @__PURE__ */
|
|
177
|
+
}) : /* @__PURE__ */ F(H, {
|
|
164
178
|
style: U.emptyContainer,
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
style: [U.emptyText, { color:
|
|
167
|
-
children:
|
|
179
|
+
children: /* @__PURE__ */ F(B, {
|
|
180
|
+
style: [U.emptyText, { color: E.textMuted }],
|
|
181
|
+
children: T("renderer.defaultAddressInput.typeMinChars")
|
|
168
182
|
})
|
|
169
183
|
}),
|
|
170
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
184
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ I(V, {
|
|
171
185
|
style: U.suggestionItem,
|
|
172
|
-
onPress: () =>
|
|
186
|
+
onPress: () => D(e),
|
|
173
187
|
activeOpacity: .7,
|
|
174
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ F(B, {
|
|
175
189
|
style: U.suggestionIcon,
|
|
176
190
|
children: "📍"
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
style: [U.suggestionText, { color:
|
|
191
|
+
}), /* @__PURE__ */ F(B, {
|
|
192
|
+
style: [U.suggestionText, { color: E.text }],
|
|
179
193
|
numberOfLines: 2,
|
|
180
194
|
children: e.label
|
|
181
195
|
})]
|
|
@@ -185,13 +199,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
185
199
|
})
|
|
186
200
|
})
|
|
187
201
|
}),
|
|
188
|
-
|
|
189
|
-
style: [U.error, { color:
|
|
190
|
-
children:
|
|
202
|
+
b && /* @__PURE__ */ F(B, {
|
|
203
|
+
style: [U.error, { color: E.error }],
|
|
204
|
+
children: b
|
|
191
205
|
}),
|
|
192
|
-
|
|
193
|
-
style: [U.helperText, { color:
|
|
194
|
-
children:
|
|
206
|
+
S && !b && /* @__PURE__ */ F(B, {
|
|
207
|
+
style: [U.helperText, { color: E.textMuted }],
|
|
208
|
+
children: S
|
|
195
209
|
})
|
|
196
210
|
]
|
|
197
211
|
});
|
|
@@ -215,11 +229,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
215
229
|
marginTop: 4
|
|
216
230
|
},
|
|
217
231
|
icon: { fontSize: 16 },
|
|
218
|
-
label: {
|
|
219
|
-
fontSize: 14,
|
|
220
|
-
fontWeight: "500",
|
|
221
|
-
marginBottom: 8
|
|
222
|
-
},
|
|
223
232
|
loadingContainer: {
|
|
224
233
|
alignItems: "center",
|
|
225
234
|
flexDirection: "row",
|
|
@@ -305,25 +314,25 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
305
314
|
flex: 1,
|
|
306
315
|
fontSize: 14
|
|
307
316
|
}
|
|
308
|
-
}),
|
|
317
|
+
}), ye = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
309
318
|
let { colors: i } = y();
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
style:
|
|
312
|
-
children: [n ? /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ I(H, {
|
|
320
|
+
style: be.content,
|
|
321
|
+
children: [n ? /* @__PURE__ */ F(L, {
|
|
313
322
|
source: { uri: n },
|
|
314
|
-
style:
|
|
315
|
-
}) : null, /* @__PURE__ */
|
|
316
|
-
style:
|
|
317
|
-
children: [/* @__PURE__ */
|
|
318
|
-
style: [
|
|
323
|
+
style: be.image
|
|
324
|
+
}) : null, /* @__PURE__ */ I(H, {
|
|
325
|
+
style: be.textWrapper,
|
|
326
|
+
children: [/* @__PURE__ */ F(B, {
|
|
327
|
+
style: [be.label, { color: r ? i.textMuted : i.text }],
|
|
319
328
|
children: e
|
|
320
|
-
}), t ? /* @__PURE__ */
|
|
321
|
-
style: [
|
|
329
|
+
}), t ? /* @__PURE__ */ F(B, {
|
|
330
|
+
style: [be.description, { color: i.textMuted }],
|
|
322
331
|
children: t
|
|
323
332
|
}) : null]
|
|
324
333
|
})]
|
|
325
334
|
});
|
|
326
|
-
},
|
|
335
|
+
}, be = z.create({
|
|
327
336
|
content: {
|
|
328
337
|
alignItems: "center",
|
|
329
338
|
flex: 1,
|
|
@@ -341,53 +350,50 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
341
350
|
},
|
|
342
351
|
label: { fontSize: 14 },
|
|
343
352
|
textWrapper: { flex: 1 }
|
|
344
|
-
}),
|
|
345
|
-
let [n, r] =
|
|
346
|
-
if (!i.trim()) return
|
|
353
|
+
}), xe = ({ field: e, extra: t }) => {
|
|
354
|
+
let [n, r] = P(!1), [i, a] = P(""), { value: o, placeholder: s } = e, { InputLabel: c, node: l, setValue: u, error: d, label: f, helperText: p } = t, m = h(), { colors: g } = y(), _ = l.data.options || [], v = _.find((e) => e.value === o), b = re(() => {
|
|
355
|
+
if (!i.trim()) return _;
|
|
347
356
|
let e = i.toLowerCase();
|
|
348
|
-
return
|
|
357
|
+
return _.filter((t) => m(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
349
358
|
}, [
|
|
350
|
-
|
|
359
|
+
_,
|
|
351
360
|
i,
|
|
352
|
-
|
|
353
|
-
]),
|
|
354
|
-
|
|
355
|
-
},
|
|
361
|
+
m
|
|
362
|
+
]), x = (e) => {
|
|
363
|
+
u(e === o ? "" : e), r(!1), a("");
|
|
364
|
+
}, S = () => {
|
|
356
365
|
r(!1), a("");
|
|
357
366
|
};
|
|
358
|
-
return /* @__PURE__ */
|
|
367
|
+
return /* @__PURE__ */ I(H, {
|
|
359
368
|
style: W.container,
|
|
360
369
|
children: [
|
|
361
|
-
/* @__PURE__ */ F(
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
style: { color: m.error },
|
|
365
|
-
children: "*"
|
|
366
|
-
})]
|
|
370
|
+
/* @__PURE__ */ F(c, {
|
|
371
|
+
label: f,
|
|
372
|
+
required: l.data.required
|
|
367
373
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ I(V, {
|
|
369
375
|
style: [
|
|
370
376
|
W.trigger,
|
|
371
377
|
{
|
|
372
|
-
backgroundColor:
|
|
373
|
-
borderColor:
|
|
378
|
+
backgroundColor: g.input,
|
|
379
|
+
borderColor: g.border
|
|
374
380
|
},
|
|
375
|
-
|
|
381
|
+
d && { borderColor: g.error }
|
|
376
382
|
],
|
|
377
383
|
onPress: () => r(!0),
|
|
378
384
|
activeOpacity: .7,
|
|
379
385
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ F(B, {
|
|
381
387
|
style: [
|
|
382
388
|
W.triggerText,
|
|
383
|
-
{ color:
|
|
384
|
-
!o && { color:
|
|
389
|
+
{ color: g.text },
|
|
390
|
+
!o && { color: g.textMuted }
|
|
385
391
|
],
|
|
386
392
|
numberOfLines: 1,
|
|
387
|
-
children: o &&
|
|
393
|
+
children: o && v ? m(v.label) : s || m("renderer.defaultAutocompleteInput.selectOption")
|
|
388
394
|
}),
|
|
389
|
-
o ? /* @__PURE__ */
|
|
390
|
-
onPress: () =>
|
|
395
|
+
o ? /* @__PURE__ */ F(V, {
|
|
396
|
+
onPress: () => u(""),
|
|
391
397
|
hitSlop: {
|
|
392
398
|
bottom: 8,
|
|
393
399
|
left: 8,
|
|
@@ -395,54 +401,54 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
395
401
|
top: 8
|
|
396
402
|
},
|
|
397
403
|
style: W.clearButton,
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
style: [W.clearIcon, { color:
|
|
404
|
+
children: /* @__PURE__ */ F(B, {
|
|
405
|
+
style: [W.clearIcon, { color: g.textMuted }],
|
|
400
406
|
children: "✕"
|
|
401
407
|
})
|
|
402
408
|
}) : null,
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
style: [W.arrow, { color:
|
|
409
|
+
/* @__PURE__ */ F(B, {
|
|
410
|
+
style: [W.arrow, { color: g.textMuted }],
|
|
405
411
|
children: "▼"
|
|
406
412
|
})
|
|
407
413
|
]
|
|
408
414
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ F(le, {
|
|
410
416
|
visible: n,
|
|
411
417
|
transparent: !0,
|
|
412
418
|
animationType: "fade",
|
|
413
|
-
onRequestClose:
|
|
414
|
-
children: /* @__PURE__ */
|
|
419
|
+
onRequestClose: S,
|
|
420
|
+
children: /* @__PURE__ */ F(V, {
|
|
415
421
|
style: W.modalOverlay,
|
|
416
422
|
activeOpacity: 1,
|
|
417
|
-
onPress:
|
|
418
|
-
children: /* @__PURE__ */
|
|
419
|
-
style: [W.modalContent, { backgroundColor:
|
|
423
|
+
onPress: S,
|
|
424
|
+
children: /* @__PURE__ */ I(V, {
|
|
425
|
+
style: [W.modalContent, { backgroundColor: g.card }],
|
|
420
426
|
activeOpacity: 1,
|
|
421
427
|
onPress: () => {},
|
|
422
428
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
style: [W.modalHeader, { borderBottomColor:
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
style: [W.modalTitle, { color:
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
429
|
-
onPress:
|
|
430
|
-
children: /* @__PURE__ */
|
|
431
|
-
style: [W.closeButton, { color:
|
|
429
|
+
/* @__PURE__ */ I(H, {
|
|
430
|
+
style: [W.modalHeader, { borderBottomColor: g.separator }],
|
|
431
|
+
children: [/* @__PURE__ */ F(B, {
|
|
432
|
+
style: [W.modalTitle, { color: g.text }],
|
|
433
|
+
children: f || s || m("renderer.defaultAutocompleteInput.selectOption")
|
|
434
|
+
}), /* @__PURE__ */ F(V, {
|
|
435
|
+
onPress: S,
|
|
436
|
+
children: /* @__PURE__ */ F(B, {
|
|
437
|
+
style: [W.closeButton, { color: g.textMuted }],
|
|
432
438
|
children: "✕"
|
|
433
439
|
})
|
|
434
440
|
})]
|
|
435
441
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ F(H, {
|
|
437
443
|
style: W.searchContainer,
|
|
438
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ F(de, {
|
|
439
445
|
style: [W.searchInput, {
|
|
440
|
-
backgroundColor:
|
|
441
|
-
borderColor:
|
|
442
|
-
color:
|
|
446
|
+
backgroundColor: g.muted,
|
|
447
|
+
borderColor: g.border,
|
|
448
|
+
color: g.text
|
|
443
449
|
}],
|
|
444
|
-
placeholder: s ||
|
|
445
|
-
placeholderTextColor:
|
|
450
|
+
placeholder: s || m("renderer.defaultAutocompleteInput.search"),
|
|
451
|
+
placeholderTextColor: g.textMuted,
|
|
446
452
|
value: i,
|
|
447
453
|
onChangeText: a,
|
|
448
454
|
autoFocus: !0,
|
|
@@ -450,32 +456,32 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
450
456
|
autoCorrect: !1
|
|
451
457
|
})
|
|
452
458
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
data:
|
|
459
|
+
/* @__PURE__ */ F(ce, {
|
|
460
|
+
data: b,
|
|
455
461
|
keyExtractor: (e) => e.value,
|
|
456
462
|
style: W.optionsList,
|
|
457
463
|
contentContainerStyle: W.optionsListContent,
|
|
458
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
464
|
+
ListEmptyComponent: /* @__PURE__ */ F(H, {
|
|
459
465
|
style: W.emptyContainer,
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
-
style: [W.emptyText, { color:
|
|
462
|
-
children:
|
|
466
|
+
children: /* @__PURE__ */ F(B, {
|
|
467
|
+
style: [W.emptyText, { color: g.textMuted }],
|
|
468
|
+
children: m("renderer.defaultAutocompleteInput.noResults")
|
|
463
469
|
})
|
|
464
470
|
}),
|
|
465
471
|
renderItem: ({ item: e }) => {
|
|
466
472
|
let t = e.value === o;
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
style: [W.option, t && { backgroundColor:
|
|
469
|
-
onPress: () =>
|
|
473
|
+
return /* @__PURE__ */ I(V, {
|
|
474
|
+
style: [W.option, t && { backgroundColor: g.primaryLight }],
|
|
475
|
+
onPress: () => x(e.value),
|
|
470
476
|
disabled: e.disabled,
|
|
471
477
|
activeOpacity: .7,
|
|
472
|
-
children: [/* @__PURE__ */
|
|
473
|
-
label:
|
|
474
|
-
description:
|
|
478
|
+
children: [/* @__PURE__ */ F(ye, {
|
|
479
|
+
label: m(e.label) || e.value,
|
|
480
|
+
description: m(e.description),
|
|
475
481
|
image: e.image,
|
|
476
482
|
disabled: e.disabled
|
|
477
|
-
}), t && /* @__PURE__ */
|
|
478
|
-
style: [W.checkmark, { color:
|
|
483
|
+
}), t && /* @__PURE__ */ F(B, {
|
|
484
|
+
style: [W.checkmark, { color: g.primary }],
|
|
479
485
|
children: "✓"
|
|
480
486
|
})]
|
|
481
487
|
});
|
|
@@ -485,13 +491,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
485
491
|
})
|
|
486
492
|
})
|
|
487
493
|
}),
|
|
488
|
-
|
|
489
|
-
style: [W.error, { color:
|
|
490
|
-
children:
|
|
494
|
+
d && /* @__PURE__ */ F(B, {
|
|
495
|
+
style: [W.error, { color: g.error }],
|
|
496
|
+
children: d
|
|
491
497
|
}),
|
|
492
|
-
|
|
493
|
-
style: [W.helperText, { color:
|
|
494
|
-
children:
|
|
498
|
+
p && !d && /* @__PURE__ */ F(B, {
|
|
499
|
+
style: [W.helperText, { color: g.textMuted }],
|
|
500
|
+
children: p
|
|
495
501
|
})
|
|
496
502
|
]
|
|
497
503
|
});
|
|
@@ -524,11 +530,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
524
530
|
fontSize: 12,
|
|
525
531
|
marginTop: 4
|
|
526
532
|
},
|
|
527
|
-
label: {
|
|
528
|
-
fontSize: 14,
|
|
529
|
-
fontWeight: "500",
|
|
530
|
-
marginBottom: 8
|
|
531
|
-
},
|
|
532
533
|
modalContent: {
|
|
533
534
|
borderRadius: 12,
|
|
534
535
|
maxHeight: "80%",
|
|
@@ -587,108 +588,105 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
587
588
|
flex: 1,
|
|
588
589
|
fontSize: 14
|
|
589
590
|
}
|
|
590
|
-
}),
|
|
591
|
-
let n = h(), { value: r } = e, {
|
|
592
|
-
|
|
593
|
-
},
|
|
594
|
-
return /* @__PURE__ */
|
|
591
|
+
}), Se = ({ field: e, extra: t }) => {
|
|
592
|
+
let n = h(), { value: r } = e, { InputLabel: i, node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = y(), d = a.data.options || [], f = d.length > 0, p = Array.isArray(r) ? r : [], m = typeof r == "boolean" ? r : !1, g = (e) => {
|
|
593
|
+
o(f ? p.includes(e) ? p.filter((t) => t !== e) : [...p, e] : !m);
|
|
594
|
+
}, _ = (e) => f ? p.includes(e) : m;
|
|
595
|
+
return /* @__PURE__ */ I(H, {
|
|
595
596
|
style: G.container,
|
|
596
597
|
children: [
|
|
597
|
-
/* @__PURE__ */ F(
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
style: { color: l.error },
|
|
601
|
-
children: "*"
|
|
602
|
-
})]
|
|
598
|
+
/* @__PURE__ */ F(i, {
|
|
599
|
+
label: c,
|
|
600
|
+
required: a.data.required
|
|
603
601
|
}),
|
|
604
|
-
|
|
602
|
+
d.length > 0 ? d.map((e) => {
|
|
605
603
|
let t = n(e.description);
|
|
606
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ I(V, {
|
|
607
605
|
style: G.option,
|
|
608
|
-
onPress: () =>
|
|
606
|
+
onPress: () => g(e.value),
|
|
609
607
|
disabled: e.disabled,
|
|
610
608
|
activeOpacity: .7,
|
|
611
609
|
accessible: !0,
|
|
612
610
|
accessibilityRole: "checkbox",
|
|
613
611
|
accessibilityState: {
|
|
614
|
-
checked:
|
|
612
|
+
checked: _(e.value),
|
|
615
613
|
disabled: e.disabled
|
|
616
614
|
},
|
|
617
615
|
accessibilityLabel: n(e.label) || e.value,
|
|
618
616
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ F(H, {
|
|
620
618
|
style: [
|
|
621
619
|
G.checkbox,
|
|
622
620
|
{
|
|
623
|
-
backgroundColor:
|
|
624
|
-
borderColor:
|
|
621
|
+
backgroundColor: u.input,
|
|
622
|
+
borderColor: u.border
|
|
625
623
|
},
|
|
626
|
-
|
|
627
|
-
backgroundColor:
|
|
628
|
-
borderColor:
|
|
624
|
+
_(e.value) && {
|
|
625
|
+
backgroundColor: u.primary,
|
|
626
|
+
borderColor: u.primary
|
|
629
627
|
}
|
|
630
628
|
],
|
|
631
|
-
children:
|
|
629
|
+
children: _(e.value) && /* @__PURE__ */ F(B, {
|
|
632
630
|
style: G.checkmark,
|
|
633
631
|
children: "✓"
|
|
634
632
|
})
|
|
635
633
|
}),
|
|
636
|
-
e.image ? /* @__PURE__ */
|
|
634
|
+
e.image ? /* @__PURE__ */ F(L, {
|
|
637
635
|
source: { uri: e.image },
|
|
638
636
|
style: G.image
|
|
639
637
|
}) : null,
|
|
640
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ I(H, {
|
|
641
639
|
style: G.optionTextContainer,
|
|
642
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ F(B, {
|
|
643
641
|
style: [
|
|
644
642
|
G.optionLabel,
|
|
645
|
-
{ color:
|
|
646
|
-
e.disabled && { color:
|
|
643
|
+
{ color: u.textSecondary },
|
|
644
|
+
e.disabled && { color: u.textMuted }
|
|
647
645
|
],
|
|
648
646
|
children: n(e.label) || e.value
|
|
649
|
-
}), t && /* @__PURE__ */
|
|
650
|
-
style: [G.optionDescription, { color:
|
|
647
|
+
}), t && /* @__PURE__ */ F(B, {
|
|
648
|
+
style: [G.optionDescription, { color: u.textMuted }],
|
|
651
649
|
children: t
|
|
652
650
|
})]
|
|
653
651
|
})
|
|
654
652
|
]
|
|
655
653
|
}, e.value);
|
|
656
|
-
}) : /* @__PURE__ */
|
|
654
|
+
}) : /* @__PURE__ */ I(V, {
|
|
657
655
|
style: G.option,
|
|
658
|
-
onPress: () =>
|
|
656
|
+
onPress: () => g(""),
|
|
659
657
|
activeOpacity: .7,
|
|
660
658
|
accessible: !0,
|
|
661
659
|
accessibilityRole: "checkbox",
|
|
662
|
-
accessibilityState: { checked:
|
|
663
|
-
accessibilityLabel:
|
|
664
|
-
children: [/* @__PURE__ */
|
|
660
|
+
accessibilityState: { checked: m },
|
|
661
|
+
accessibilityLabel: c || a.data.name,
|
|
662
|
+
children: [/* @__PURE__ */ F(H, {
|
|
665
663
|
style: [
|
|
666
664
|
G.checkbox,
|
|
667
665
|
{
|
|
668
|
-
backgroundColor:
|
|
669
|
-
borderColor:
|
|
666
|
+
backgroundColor: u.input,
|
|
667
|
+
borderColor: u.border
|
|
670
668
|
},
|
|
671
|
-
|
|
672
|
-
backgroundColor:
|
|
673
|
-
borderColor:
|
|
669
|
+
m && {
|
|
670
|
+
backgroundColor: u.primary,
|
|
671
|
+
borderColor: u.primary
|
|
674
672
|
}
|
|
675
673
|
],
|
|
676
|
-
children:
|
|
674
|
+
children: m && /* @__PURE__ */ F(B, {
|
|
677
675
|
style: G.checkmark,
|
|
678
676
|
children: "✓"
|
|
679
677
|
})
|
|
680
|
-
}), /* @__PURE__ */
|
|
681
|
-
style: [G.optionLabel, { color:
|
|
682
|
-
children:
|
|
678
|
+
}), c && /* @__PURE__ */ F(B, {
|
|
679
|
+
style: [G.optionLabel, { color: u.textSecondary }],
|
|
680
|
+
children: c
|
|
683
681
|
})]
|
|
684
682
|
}),
|
|
685
|
-
|
|
686
|
-
style: [G.error, { color:
|
|
687
|
-
children:
|
|
683
|
+
s && /* @__PURE__ */ F(B, {
|
|
684
|
+
style: [G.error, { color: u.error }],
|
|
685
|
+
children: s
|
|
688
686
|
}),
|
|
689
|
-
|
|
690
|
-
style: [G.helperText, { color:
|
|
691
|
-
children:
|
|
687
|
+
l && !s && /* @__PURE__ */ F(B, {
|
|
688
|
+
style: [G.helperText, { color: u.textMuted }],
|
|
689
|
+
children: l
|
|
692
690
|
})
|
|
693
691
|
]
|
|
694
692
|
});
|
|
@@ -722,11 +720,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
722
720
|
marginRight: 8,
|
|
723
721
|
width: 32
|
|
724
722
|
},
|
|
725
|
-
label: {
|
|
726
|
-
fontSize: 14,
|
|
727
|
-
fontWeight: "500",
|
|
728
|
-
marginBottom: 8
|
|
729
|
-
},
|
|
730
723
|
option: {
|
|
731
724
|
alignItems: "flex-start",
|
|
732
725
|
flexDirection: "row",
|
|
@@ -738,15 +731,15 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
738
731
|
},
|
|
739
732
|
optionLabel: { fontSize: 14 },
|
|
740
733
|
optionTextContainer: { flex: 1 }
|
|
741
|
-
}),
|
|
742
|
-
let [n, r] =
|
|
743
|
-
let e =
|
|
734
|
+
}), Ce = ({ field: e, extra: t }) => {
|
|
735
|
+
let [n, r] = P(!1), { value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = y(), p = h(), m = i ? new Date(i) : void 0, { year: g, month: _, today: v } = re(() => {
|
|
736
|
+
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
744
737
|
return r.setHours(0, 0, 0, 0), {
|
|
745
738
|
month: n,
|
|
746
739
|
today: r,
|
|
747
740
|
year: t
|
|
748
741
|
};
|
|
749
|
-
}, [
|
|
742
|
+
}, [m]), [b, x] = P(g), [S, C] = P(_), w = [
|
|
750
743
|
"January",
|
|
751
744
|
"February",
|
|
752
745
|
"March",
|
|
@@ -759,127 +752,124 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
759
752
|
"October",
|
|
760
753
|
"November",
|
|
761
754
|
"December"
|
|
762
|
-
],
|
|
763
|
-
let e = new Date(
|
|
755
|
+
], T = re(() => {
|
|
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 = [];
|
|
764
757
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
765
|
-
date: new Date(
|
|
758
|
+
date: new Date(b, S - 1, n - t),
|
|
766
759
|
day: n - t,
|
|
767
760
|
isCurrentMonth: !1
|
|
768
761
|
});
|
|
769
762
|
for (let e = 1; e <= t; e++) r.push({
|
|
770
|
-
date: new Date(
|
|
763
|
+
date: new Date(b, S, e),
|
|
771
764
|
day: e,
|
|
772
765
|
isCurrentMonth: !0
|
|
773
766
|
});
|
|
774
767
|
let i = 42 - r.length;
|
|
775
768
|
for (let e = 1; e <= i; e++) r.push({
|
|
776
|
-
date: new Date(
|
|
769
|
+
date: new Date(b, S + 1, e),
|
|
777
770
|
day: e,
|
|
778
771
|
isCurrentMonth: !1
|
|
779
772
|
});
|
|
780
773
|
return r;
|
|
781
|
-
}, [
|
|
782
|
-
|
|
774
|
+
}, [b, S]), E = ne((e) => {
|
|
775
|
+
s.data.disablePast && e < v || (c(e.toISOString()), r(!1));
|
|
783
776
|
}, [
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
]),
|
|
788
|
-
|
|
789
|
-
},
|
|
790
|
-
|
|
791
|
-
},
|
|
792
|
-
return /* @__PURE__ */
|
|
777
|
+
s.data.disablePast,
|
|
778
|
+
v,
|
|
779
|
+
c
|
|
780
|
+
]), D = () => {
|
|
781
|
+
S === 0 ? (C(11), x(b - 1)) : C(S - 1);
|
|
782
|
+
}, O = () => {
|
|
783
|
+
S === 11 ? (C(0), x(b + 1)) : C(S + 1);
|
|
784
|
+
}, k = () => m ? m.toLocaleDateString() : a || p("renderer.defaultInputs.selectDate"), A = (e) => s.data.disablePast ? e < v : !1, j = (e) => m ? e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear() : !1;
|
|
785
|
+
return /* @__PURE__ */ I(H, {
|
|
793
786
|
style: K.container,
|
|
794
787
|
children: [
|
|
795
|
-
/* @__PURE__ */ F(
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
style: { color: d.error },
|
|
799
|
-
children: "*"
|
|
800
|
-
})]
|
|
788
|
+
/* @__PURE__ */ F(o, {
|
|
789
|
+
label: u,
|
|
790
|
+
required: s.data.required
|
|
801
791
|
}),
|
|
802
|
-
/* @__PURE__ */
|
|
792
|
+
/* @__PURE__ */ I(V, {
|
|
803
793
|
style: [
|
|
804
794
|
K.trigger,
|
|
805
795
|
{
|
|
806
|
-
backgroundColor:
|
|
807
|
-
borderColor:
|
|
796
|
+
backgroundColor: f.input,
|
|
797
|
+
borderColor: f.border
|
|
808
798
|
},
|
|
809
|
-
|
|
799
|
+
l && { borderColor: f.error }
|
|
810
800
|
],
|
|
811
801
|
onPress: () => r(!0),
|
|
812
802
|
activeOpacity: .7,
|
|
813
|
-
children: [/* @__PURE__ */
|
|
803
|
+
children: [/* @__PURE__ */ F(B, {
|
|
814
804
|
style: [
|
|
815
805
|
K.triggerText,
|
|
816
|
-
{ color:
|
|
817
|
-
!i && { color:
|
|
806
|
+
{ color: f.text },
|
|
807
|
+
!i && { color: f.textMuted }
|
|
818
808
|
],
|
|
819
809
|
numberOfLines: 1,
|
|
820
|
-
children:
|
|
821
|
-
}), /* @__PURE__ */
|
|
810
|
+
children: k()
|
|
811
|
+
}), /* @__PURE__ */ F(B, {
|
|
822
812
|
style: K.icon,
|
|
823
813
|
children: "📅"
|
|
824
814
|
})]
|
|
825
815
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ F(le, {
|
|
827
817
|
visible: n,
|
|
828
818
|
transparent: !0,
|
|
829
819
|
animationType: "fade",
|
|
830
820
|
onRequestClose: () => r(!1),
|
|
831
|
-
children: /* @__PURE__ */
|
|
821
|
+
children: /* @__PURE__ */ F(V, {
|
|
832
822
|
style: K.modalOverlay,
|
|
833
823
|
activeOpacity: 1,
|
|
834
824
|
onPress: () => r(!1),
|
|
835
|
-
children: /* @__PURE__ */
|
|
836
|
-
style: [K.modalContent, { backgroundColor:
|
|
825
|
+
children: /* @__PURE__ */ I(V, {
|
|
826
|
+
style: [K.modalContent, { backgroundColor: f.card }],
|
|
837
827
|
activeOpacity: 1,
|
|
838
828
|
onPress: () => {},
|
|
839
829
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
842
|
-
children: [/* @__PURE__ */
|
|
843
|
-
style: [K.modalTitle, { color:
|
|
844
|
-
children:
|
|
845
|
-
}), /* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ I(H, {
|
|
831
|
+
style: [K.modalHeader, { borderBottomColor: f.separator }],
|
|
832
|
+
children: [/* @__PURE__ */ F(B, {
|
|
833
|
+
style: [K.modalTitle, { color: f.text }],
|
|
834
|
+
children: u || a || p("renderer.defaultInputs.selectDate")
|
|
835
|
+
}), /* @__PURE__ */ F(V, {
|
|
846
836
|
onPress: () => r(!1),
|
|
847
|
-
children: /* @__PURE__ */
|
|
848
|
-
style: [K.closeButton, { color:
|
|
837
|
+
children: /* @__PURE__ */ F(B, {
|
|
838
|
+
style: [K.closeButton, { color: f.textMuted }],
|
|
849
839
|
children: "✕"
|
|
850
840
|
})
|
|
851
841
|
})]
|
|
852
842
|
}),
|
|
853
|
-
/* @__PURE__ */
|
|
843
|
+
/* @__PURE__ */ I(H, {
|
|
854
844
|
style: K.calendarHeader,
|
|
855
845
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
onPress:
|
|
846
|
+
/* @__PURE__ */ F(V, {
|
|
847
|
+
onPress: D,
|
|
858
848
|
style: K.navButton,
|
|
859
|
-
children: /* @__PURE__ */
|
|
860
|
-
style: [K.navButtonText, { color:
|
|
849
|
+
children: /* @__PURE__ */ F(B, {
|
|
850
|
+
style: [K.navButtonText, { color: f.primary }],
|
|
861
851
|
children: "‹"
|
|
862
852
|
})
|
|
863
853
|
}),
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
style: [K.monthYear, { color:
|
|
854
|
+
/* @__PURE__ */ I(B, {
|
|
855
|
+
style: [K.monthYear, { color: f.text }],
|
|
866
856
|
children: [
|
|
867
|
-
|
|
857
|
+
w[S],
|
|
868
858
|
" ",
|
|
869
|
-
|
|
859
|
+
b
|
|
870
860
|
]
|
|
871
861
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
onPress:
|
|
862
|
+
/* @__PURE__ */ F(V, {
|
|
863
|
+
onPress: O,
|
|
874
864
|
style: K.navButton,
|
|
875
|
-
children: /* @__PURE__ */
|
|
876
|
-
style: [K.navButtonText, { color:
|
|
865
|
+
children: /* @__PURE__ */ F(B, {
|
|
866
|
+
style: [K.navButtonText, { color: f.primary }],
|
|
877
867
|
children: "›"
|
|
878
868
|
})
|
|
879
869
|
})
|
|
880
870
|
]
|
|
881
871
|
}),
|
|
882
|
-
/* @__PURE__ */
|
|
872
|
+
/* @__PURE__ */ F(H, {
|
|
883
873
|
style: K.weekDays,
|
|
884
874
|
children: [
|
|
885
875
|
"Sun",
|
|
@@ -889,43 +879,43 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
889
879
|
"Thu",
|
|
890
880
|
"Fri",
|
|
891
881
|
"Sat"
|
|
892
|
-
].map((e) => /* @__PURE__ */
|
|
893
|
-
style: [K.weekDay, { color:
|
|
882
|
+
].map((e) => /* @__PURE__ */ F(B, {
|
|
883
|
+
style: [K.weekDay, { color: f.textMuted }],
|
|
894
884
|
children: e
|
|
895
885
|
}, e))
|
|
896
886
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
data:
|
|
887
|
+
/* @__PURE__ */ F(ce, {
|
|
888
|
+
data: T,
|
|
899
889
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
900
890
|
numColumns: 7,
|
|
901
891
|
scrollEnabled: !1,
|
|
902
892
|
style: K.calendar,
|
|
903
893
|
contentContainerStyle: K.calendarContent,
|
|
904
894
|
renderItem: ({ item: e }) => {
|
|
905
|
-
let t =
|
|
906
|
-
return /* @__PURE__ */
|
|
895
|
+
let t = A(e.date), n = j(e.date);
|
|
896
|
+
return /* @__PURE__ */ F(V, {
|
|
907
897
|
style: [
|
|
908
898
|
K.dayCell,
|
|
909
899
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
910
900
|
n && {
|
|
911
|
-
backgroundColor:
|
|
901
|
+
backgroundColor: f.primary,
|
|
912
902
|
borderRadius: 20
|
|
913
903
|
},
|
|
914
904
|
t && K.dayCellDisabled
|
|
915
905
|
],
|
|
916
|
-
onPress: () =>
|
|
906
|
+
onPress: () => E(e.date),
|
|
917
907
|
disabled: t,
|
|
918
908
|
activeOpacity: .7,
|
|
919
|
-
children: /* @__PURE__ */
|
|
909
|
+
children: /* @__PURE__ */ F(B, {
|
|
920
910
|
style: [
|
|
921
911
|
K.dayText,
|
|
922
|
-
{ color:
|
|
923
|
-
!e.isCurrentMonth && { color:
|
|
912
|
+
{ color: f.text },
|
|
913
|
+
!e.isCurrentMonth && { color: f.textMuted },
|
|
924
914
|
n && {
|
|
925
|
-
color:
|
|
915
|
+
color: f.background,
|
|
926
916
|
fontWeight: "600"
|
|
927
917
|
},
|
|
928
|
-
t && { color:
|
|
918
|
+
t && { color: f.textMuted }
|
|
929
919
|
],
|
|
930
920
|
children: e.day
|
|
931
921
|
})
|
|
@@ -936,13 +926,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
936
926
|
})
|
|
937
927
|
})
|
|
938
928
|
}),
|
|
939
|
-
|
|
940
|
-
style: [K.error, { color:
|
|
941
|
-
children:
|
|
929
|
+
l && /* @__PURE__ */ F(B, {
|
|
930
|
+
style: [K.error, { color: f.error }],
|
|
931
|
+
children: l
|
|
942
932
|
}),
|
|
943
|
-
|
|
944
|
-
style: [K.helperText, { color:
|
|
945
|
-
children:
|
|
933
|
+
d && !l && /* @__PURE__ */ F(B, {
|
|
934
|
+
style: [K.helperText, { color: f.textMuted }],
|
|
935
|
+
children: d
|
|
946
936
|
})
|
|
947
937
|
]
|
|
948
938
|
});
|
|
@@ -984,11 +974,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
984
974
|
marginTop: 4
|
|
985
975
|
},
|
|
986
976
|
icon: { fontSize: 16 },
|
|
987
|
-
label: {
|
|
988
|
-
fontSize: 14,
|
|
989
|
-
fontWeight: "500",
|
|
990
|
-
marginBottom: 8
|
|
991
|
-
},
|
|
992
977
|
modalContent: {
|
|
993
978
|
borderRadius: 12,
|
|
994
979
|
maxHeight: "80%",
|
|
@@ -1046,15 +1031,15 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1046
1031
|
flexDirection: "row",
|
|
1047
1032
|
marginBottom: 8
|
|
1048
1033
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
let [n, r] =
|
|
1051
|
-
let e =
|
|
1034
|
+
}), we = ({ field: e, extra: t }) => {
|
|
1035
|
+
let [n, r] = P(!1), [i, a] = P(!0), { value: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, p = h(), { colors: m } = y(), g = Array.isArray(o) ? o : [], _ = g[0] ? new Date(g[0]) : void 0, v = g[1] ? new Date(g[1]) : void 0, { year: b, month: x, today: S } = re(() => {
|
|
1036
|
+
let e = _ || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1052
1037
|
return r.setHours(0, 0, 0, 0), {
|
|
1053
1038
|
month: n,
|
|
1054
1039
|
today: r,
|
|
1055
1040
|
year: t
|
|
1056
1041
|
};
|
|
1057
|
-
}, [
|
|
1042
|
+
}, [_]), [C, w] = P(b), [T, E] = P(x), D = [
|
|
1058
1043
|
"January",
|
|
1059
1044
|
"February",
|
|
1060
1045
|
"March",
|
|
@@ -1067,141 +1052,138 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1067
1052
|
"October",
|
|
1068
1053
|
"November",
|
|
1069
1054
|
"December"
|
|
1070
|
-
],
|
|
1071
|
-
let e = new Date(
|
|
1055
|
+
], O = re(() => {
|
|
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 = [];
|
|
1072
1057
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1073
|
-
date: new Date(
|
|
1058
|
+
date: new Date(C, T - 1, n - t),
|
|
1074
1059
|
day: n - t,
|
|
1075
1060
|
isCurrentMonth: !1
|
|
1076
1061
|
});
|
|
1077
1062
|
for (let e = 1; e <= t; e++) r.push({
|
|
1078
|
-
date: new Date(
|
|
1063
|
+
date: new Date(C, T, e),
|
|
1079
1064
|
day: e,
|
|
1080
1065
|
isCurrentMonth: !0
|
|
1081
1066
|
});
|
|
1082
1067
|
let i = 42 - r.length;
|
|
1083
1068
|
for (let e = 1; e <= i; e++) r.push({
|
|
1084
|
-
date: new Date(
|
|
1069
|
+
date: new Date(C, T + 1, e),
|
|
1085
1070
|
day: e,
|
|
1086
1071
|
isCurrentMonth: !1
|
|
1087
1072
|
});
|
|
1088
1073
|
return r;
|
|
1089
|
-
}, [
|
|
1090
|
-
|
|
1074
|
+
}, [C, T]), k = ne((e) => {
|
|
1075
|
+
c.data.disablePast && e < S || (i ? (l([e.toISOString(), v?.toISOString()]), a(!1)) : (l(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), r(!1), a(!0)));
|
|
1091
1076
|
}, [
|
|
1092
|
-
|
|
1093
|
-
|
|
1077
|
+
c.data.disablePast,
|
|
1078
|
+
S,
|
|
1094
1079
|
i,
|
|
1095
|
-
g,
|
|
1096
1080
|
_,
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1081
|
+
v,
|
|
1082
|
+
l
|
|
1083
|
+
]), A = () => {
|
|
1084
|
+
T === 0 ? (E(11), w(C - 1)) : E(T - 1);
|
|
1085
|
+
}, j = () => {
|
|
1086
|
+
T === 11 ? (E(0), w(C + 1)) : E(T + 1);
|
|
1087
|
+
}, ee = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), te = (e) => c.data.disablePast ? e < S : !1, M = (e) => _ && v ? e >= _ && e <= v : !1, N = (e) => {
|
|
1088
|
+
if (!(_ || v)) return !1;
|
|
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();
|
|
1105
1090
|
return t || n;
|
|
1106
1091
|
};
|
|
1107
|
-
return /* @__PURE__ */
|
|
1092
|
+
return /* @__PURE__ */ I(H, {
|
|
1108
1093
|
style: q.container,
|
|
1109
1094
|
children: [
|
|
1110
|
-
/* @__PURE__ */ F(
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
style: { color: p.error },
|
|
1114
|
-
children: "*"
|
|
1115
|
-
})]
|
|
1095
|
+
/* @__PURE__ */ F(s, {
|
|
1096
|
+
label: d,
|
|
1097
|
+
required: c.data.required
|
|
1116
1098
|
}),
|
|
1117
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ I(V, {
|
|
1118
1100
|
style: [
|
|
1119
1101
|
q.trigger,
|
|
1120
1102
|
{
|
|
1121
|
-
backgroundColor:
|
|
1122
|
-
borderColor:
|
|
1103
|
+
backgroundColor: m.input,
|
|
1104
|
+
borderColor: m.border
|
|
1123
1105
|
},
|
|
1124
|
-
|
|
1106
|
+
u && { borderColor: m.error }
|
|
1125
1107
|
],
|
|
1126
1108
|
onPress: () => r(!0),
|
|
1127
1109
|
activeOpacity: .7,
|
|
1128
|
-
children: [/* @__PURE__ */
|
|
1110
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1129
1111
|
style: [
|
|
1130
1112
|
q.triggerText,
|
|
1131
|
-
{ color:
|
|
1132
|
-
!
|
|
1113
|
+
{ color: m.text },
|
|
1114
|
+
!_ && { color: m.textMuted }
|
|
1133
1115
|
],
|
|
1134
1116
|
numberOfLines: 1,
|
|
1135
|
-
children:
|
|
1136
|
-
}), /* @__PURE__ */
|
|
1117
|
+
children: ee()
|
|
1118
|
+
}), /* @__PURE__ */ F(B, {
|
|
1137
1119
|
style: q.icon,
|
|
1138
1120
|
children: "📅"
|
|
1139
1121
|
})]
|
|
1140
1122
|
}),
|
|
1141
|
-
/* @__PURE__ */
|
|
1123
|
+
/* @__PURE__ */ F(le, {
|
|
1142
1124
|
visible: n,
|
|
1143
1125
|
transparent: !0,
|
|
1144
1126
|
animationType: "fade",
|
|
1145
1127
|
onRequestClose: () => r(!1),
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1128
|
+
children: /* @__PURE__ */ F(V, {
|
|
1147
1129
|
style: q.modalOverlay,
|
|
1148
1130
|
activeOpacity: 1,
|
|
1149
1131
|
onPress: () => r(!1),
|
|
1150
|
-
children: /* @__PURE__ */
|
|
1151
|
-
style: [q.modalContent, { backgroundColor:
|
|
1132
|
+
children: /* @__PURE__ */ I(V, {
|
|
1133
|
+
style: [q.modalContent, { backgroundColor: m.card }],
|
|
1152
1134
|
activeOpacity: 1,
|
|
1153
1135
|
onPress: () => {},
|
|
1154
1136
|
children: [
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1157
|
-
children: [/* @__PURE__ */
|
|
1158
|
-
style: [q.modalTitle, { color:
|
|
1159
|
-
children:
|
|
1160
|
-
}), /* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ I(H, {
|
|
1138
|
+
style: [q.modalHeader, { borderBottomColor: m.separator }],
|
|
1139
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1140
|
+
style: [q.modalTitle, { color: m.text }],
|
|
1141
|
+
children: d || p("renderer.defaultInputs.selectDateRange")
|
|
1142
|
+
}), /* @__PURE__ */ F(V, {
|
|
1161
1143
|
onPress: () => r(!1),
|
|
1162
|
-
children: /* @__PURE__ */
|
|
1163
|
-
style: [q.closeButton, { color:
|
|
1144
|
+
children: /* @__PURE__ */ F(B, {
|
|
1145
|
+
style: [q.closeButton, { color: m.textMuted }],
|
|
1164
1146
|
children: "✕"
|
|
1165
1147
|
})
|
|
1166
1148
|
})]
|
|
1167
1149
|
}),
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1170
|
-
children: /* @__PURE__ */
|
|
1171
|
-
style: [q.rangeIndicatorText, { color:
|
|
1172
|
-
children:
|
|
1150
|
+
/* @__PURE__ */ F(H, {
|
|
1151
|
+
style: [q.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
1152
|
+
children: /* @__PURE__ */ F(B, {
|
|
1153
|
+
style: [q.rangeIndicatorText, { color: m.primary }],
|
|
1154
|
+
children: p(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1173
1155
|
})
|
|
1174
1156
|
}),
|
|
1175
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ I(H, {
|
|
1176
1158
|
style: q.calendarHeader,
|
|
1177
1159
|
children: [
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
onPress:
|
|
1160
|
+
/* @__PURE__ */ F(V, {
|
|
1161
|
+
onPress: A,
|
|
1180
1162
|
style: q.navButton,
|
|
1181
|
-
children: /* @__PURE__ */
|
|
1182
|
-
style: [q.navButtonText, { color:
|
|
1163
|
+
children: /* @__PURE__ */ F(B, {
|
|
1164
|
+
style: [q.navButtonText, { color: m.primary }],
|
|
1183
1165
|
children: "‹"
|
|
1184
1166
|
})
|
|
1185
1167
|
}),
|
|
1186
|
-
/* @__PURE__ */
|
|
1187
|
-
style: [q.monthYear, { color:
|
|
1168
|
+
/* @__PURE__ */ I(B, {
|
|
1169
|
+
style: [q.monthYear, { color: m.text }],
|
|
1188
1170
|
children: [
|
|
1189
|
-
|
|
1171
|
+
D[T],
|
|
1190
1172
|
" ",
|
|
1191
|
-
|
|
1173
|
+
C
|
|
1192
1174
|
]
|
|
1193
1175
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
onPress:
|
|
1176
|
+
/* @__PURE__ */ F(V, {
|
|
1177
|
+
onPress: j,
|
|
1196
1178
|
style: q.navButton,
|
|
1197
|
-
children: /* @__PURE__ */
|
|
1198
|
-
style: [q.navButtonText, { color:
|
|
1179
|
+
children: /* @__PURE__ */ F(B, {
|
|
1180
|
+
style: [q.navButtonText, { color: m.primary }],
|
|
1199
1181
|
children: "›"
|
|
1200
1182
|
})
|
|
1201
1183
|
})
|
|
1202
1184
|
]
|
|
1203
1185
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1186
|
+
/* @__PURE__ */ F(H, {
|
|
1205
1187
|
style: q.weekDays,
|
|
1206
1188
|
children: [
|
|
1207
1189
|
"Sun",
|
|
@@ -1211,45 +1193,45 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1211
1193
|
"Thu",
|
|
1212
1194
|
"Fri",
|
|
1213
1195
|
"Sat"
|
|
1214
|
-
].map((e) => /* @__PURE__ */
|
|
1215
|
-
style: [q.weekDay, { color:
|
|
1196
|
+
].map((e) => /* @__PURE__ */ F(B, {
|
|
1197
|
+
style: [q.weekDay, { color: m.textMuted }],
|
|
1216
1198
|
children: e
|
|
1217
1199
|
}, e))
|
|
1218
1200
|
}),
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
data:
|
|
1201
|
+
/* @__PURE__ */ F(ce, {
|
|
1202
|
+
data: O,
|
|
1221
1203
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1222
1204
|
numColumns: 7,
|
|
1223
1205
|
scrollEnabled: !1,
|
|
1224
1206
|
style: q.calendar,
|
|
1225
1207
|
contentContainerStyle: q.calendarContent,
|
|
1226
1208
|
renderItem: ({ item: e }) => {
|
|
1227
|
-
let t =
|
|
1228
|
-
return /* @__PURE__ */
|
|
1209
|
+
let t = te(e.date), n = M(e.date), r = N(e.date);
|
|
1210
|
+
return /* @__PURE__ */ F(V, {
|
|
1229
1211
|
style: [
|
|
1230
1212
|
q.dayCell,
|
|
1231
1213
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1232
|
-
n && { backgroundColor:
|
|
1214
|
+
n && { backgroundColor: m.primaryLight },
|
|
1233
1215
|
r && {
|
|
1234
|
-
backgroundColor:
|
|
1216
|
+
backgroundColor: m.primary,
|
|
1235
1217
|
borderRadius: 20
|
|
1236
1218
|
},
|
|
1237
1219
|
t && q.dayCellDisabled
|
|
1238
1220
|
],
|
|
1239
|
-
onPress: () =>
|
|
1221
|
+
onPress: () => k(e.date),
|
|
1240
1222
|
disabled: t,
|
|
1241
1223
|
activeOpacity: .7,
|
|
1242
|
-
children: /* @__PURE__ */
|
|
1224
|
+
children: /* @__PURE__ */ F(B, {
|
|
1243
1225
|
style: [
|
|
1244
1226
|
q.dayText,
|
|
1245
|
-
{ color:
|
|
1246
|
-
!e.isCurrentMonth && { color:
|
|
1247
|
-
n && { color:
|
|
1227
|
+
{ color: m.text },
|
|
1228
|
+
!e.isCurrentMonth && { color: m.textMuted },
|
|
1229
|
+
n && { color: m.primary },
|
|
1248
1230
|
r && {
|
|
1249
|
-
color:
|
|
1231
|
+
color: m.background,
|
|
1250
1232
|
fontWeight: "600"
|
|
1251
1233
|
},
|
|
1252
|
-
t && { color:
|
|
1234
|
+
t && { color: m.textMuted }
|
|
1253
1235
|
],
|
|
1254
1236
|
children: e.day
|
|
1255
1237
|
})
|
|
@@ -1260,13 +1242,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1260
1242
|
})
|
|
1261
1243
|
})
|
|
1262
1244
|
}),
|
|
1263
|
-
|
|
1264
|
-
style: [q.error, { color:
|
|
1265
|
-
children:
|
|
1245
|
+
u && /* @__PURE__ */ F(B, {
|
|
1246
|
+
style: [q.error, { color: m.error }],
|
|
1247
|
+
children: u
|
|
1266
1248
|
}),
|
|
1267
|
-
|
|
1268
|
-
style: [q.helperText, { color:
|
|
1269
|
-
children:
|
|
1249
|
+
f && !u && /* @__PURE__ */ F(B, {
|
|
1250
|
+
style: [q.helperText, { color: m.textMuted }],
|
|
1251
|
+
children: f
|
|
1270
1252
|
})
|
|
1271
1253
|
]
|
|
1272
1254
|
});
|
|
@@ -1308,11 +1290,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1308
1290
|
marginTop: 4
|
|
1309
1291
|
},
|
|
1310
1292
|
icon: { fontSize: 16 },
|
|
1311
|
-
label: {
|
|
1312
|
-
fontSize: 14,
|
|
1313
|
-
fontWeight: "500",
|
|
1314
|
-
marginBottom: 8
|
|
1315
|
-
},
|
|
1316
1293
|
modalContent: {
|
|
1317
1294
|
borderRadius: 12,
|
|
1318
1295
|
maxHeight: "80%",
|
|
@@ -1380,31 +1357,31 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1380
1357
|
flexDirection: "row",
|
|
1381
1358
|
marginBottom: 8
|
|
1382
1359
|
}
|
|
1383
|
-
}),
|
|
1384
|
-
let [n, r] =
|
|
1360
|
+
}), Te = ({ field: e, extra: t }) => {
|
|
1361
|
+
let [n, r] = P(null), [i, a] = P(!0), { value: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = y(), m = h(), g = Array.isArray(o) ? o : o ? [o] : [], _ = c.data.multiple, v = ne(async () => {
|
|
1385
1362
|
if (n) try {
|
|
1386
|
-
let e = (await n({ allowMultiSelection:
|
|
1363
|
+
let e = (await n({ allowMultiSelection: _ })).map((e) => ({
|
|
1387
1364
|
data: e.uri,
|
|
1388
1365
|
lastModified: Date.now(),
|
|
1389
1366
|
name: e.name,
|
|
1390
1367
|
size: e.size,
|
|
1391
1368
|
type: e.type || "application/octet-stream"
|
|
1392
1369
|
}));
|
|
1393
|
-
|
|
1370
|
+
l(_ ? [...g, ...e] : e[0] || null);
|
|
1394
1371
|
} catch (e) {
|
|
1395
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1372
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && oe.alert("Error", m("renderer.defaultInputs.filePickerError"));
|
|
1396
1373
|
}
|
|
1397
1374
|
}, [
|
|
1398
1375
|
n,
|
|
1399
|
-
m,
|
|
1400
1376
|
g,
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1377
|
+
_,
|
|
1378
|
+
l,
|
|
1379
|
+
m
|
|
1380
|
+
]), b = ne((e) => {
|
|
1381
|
+
let t = g.filter((t, n) => n !== e);
|
|
1382
|
+
l(t.length > 0 ? t : null);
|
|
1383
|
+
}, [g, l]), x = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1384
|
+
return M(() => {
|
|
1408
1385
|
(async () => {
|
|
1409
1386
|
try {
|
|
1410
1387
|
let { pick: e } = await import("react-native-document-picker");
|
|
@@ -1415,98 +1392,92 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1415
1392
|
a(!1);
|
|
1416
1393
|
}
|
|
1417
1394
|
})();
|
|
1418
|
-
}, []), i ? null : n ? /* @__PURE__ */
|
|
1395
|
+
}, []), i ? null : n ? /* @__PURE__ */ I(H, {
|
|
1419
1396
|
style: J.container,
|
|
1420
1397
|
children: [
|
|
1421
|
-
/* @__PURE__ */ F(
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
style: { color: f.error },
|
|
1425
|
-
children: "*"
|
|
1426
|
-
})]
|
|
1398
|
+
/* @__PURE__ */ F(s, {
|
|
1399
|
+
label: d,
|
|
1400
|
+
required: c.data.required
|
|
1427
1401
|
}),
|
|
1428
|
-
|
|
1402
|
+
g.length > 0 && /* @__PURE__ */ F(H, {
|
|
1429
1403
|
style: J.filesList,
|
|
1430
|
-
children:
|
|
1404
|
+
children: g.map((e, t) => /* @__PURE__ */ I(H, {
|
|
1431
1405
|
style: [J.fileItem, {
|
|
1432
|
-
backgroundColor:
|
|
1433
|
-
borderColor:
|
|
1406
|
+
backgroundColor: p.card,
|
|
1407
|
+
borderColor: p.separator
|
|
1434
1408
|
}],
|
|
1435
1409
|
children: [
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1438
|
-
children: /* @__PURE__ */
|
|
1410
|
+
/* @__PURE__ */ F(H, {
|
|
1411
|
+
style: [J.fileIcon, { backgroundColor: p.muted }],
|
|
1412
|
+
children: /* @__PURE__ */ F(B, {
|
|
1439
1413
|
style: J.fileIconText,
|
|
1440
1414
|
children: "📄"
|
|
1441
1415
|
})
|
|
1442
1416
|
}),
|
|
1443
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ I(H, {
|
|
1444
1418
|
style: J.fileInfo,
|
|
1445
|
-
children: [/* @__PURE__ */
|
|
1446
|
-
style: [J.fileName, { color:
|
|
1419
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1420
|
+
style: [J.fileName, { color: p.text }],
|
|
1447
1421
|
numberOfLines: 1,
|
|
1448
1422
|
children: e.name
|
|
1449
|
-
}), e.size > 0 && /* @__PURE__ */
|
|
1450
|
-
style: [J.fileSize, { color:
|
|
1451
|
-
children:
|
|
1423
|
+
}), e.size > 0 && /* @__PURE__ */ F(B, {
|
|
1424
|
+
style: [J.fileSize, { color: p.textMuted }],
|
|
1425
|
+
children: x(e.size)
|
|
1452
1426
|
})]
|
|
1453
1427
|
}),
|
|
1454
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ F(V, {
|
|
1455
1429
|
style: J.removeButton,
|
|
1456
|
-
onPress: () =>
|
|
1430
|
+
onPress: () => b(t),
|
|
1457
1431
|
activeOpacity: .7,
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1459
|
-
style: [J.removeButtonText, { color:
|
|
1432
|
+
children: /* @__PURE__ */ F(B, {
|
|
1433
|
+
style: [J.removeButtonText, { color: p.textMuted }],
|
|
1460
1434
|
children: "✕"
|
|
1461
1435
|
})
|
|
1462
1436
|
})
|
|
1463
1437
|
]
|
|
1464
1438
|
}, `${e.name}-${t}`))
|
|
1465
1439
|
}),
|
|
1466
|
-
/* @__PURE__ */
|
|
1440
|
+
/* @__PURE__ */ F(V, {
|
|
1467
1441
|
style: [J.pickButton, {
|
|
1468
|
-
backgroundColor:
|
|
1469
|
-
borderColor:
|
|
1442
|
+
backgroundColor: p.input,
|
|
1443
|
+
borderColor: p.border
|
|
1470
1444
|
}],
|
|
1471
|
-
onPress:
|
|
1445
|
+
onPress: v,
|
|
1472
1446
|
activeOpacity: .7,
|
|
1473
|
-
children: /* @__PURE__ */
|
|
1474
|
-
style: [J.pickButtonText, { color:
|
|
1475
|
-
children:
|
|
1447
|
+
children: /* @__PURE__ */ F(B, {
|
|
1448
|
+
style: [J.pickButtonText, { color: p.textMuted }],
|
|
1449
|
+
children: g.length === 0 ? m(_ ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : m(_ ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1476
1450
|
})
|
|
1477
1451
|
}),
|
|
1478
|
-
|
|
1479
|
-
style: [J.error, { color:
|
|
1480
|
-
children:
|
|
1452
|
+
u && /* @__PURE__ */ F(B, {
|
|
1453
|
+
style: [J.error, { color: p.error }],
|
|
1454
|
+
children: u
|
|
1481
1455
|
}),
|
|
1482
|
-
|
|
1483
|
-
style: [J.helperText, { color:
|
|
1484
|
-
children:
|
|
1456
|
+
f && !u && /* @__PURE__ */ F(B, {
|
|
1457
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1458
|
+
children: f
|
|
1485
1459
|
})
|
|
1486
1460
|
]
|
|
1487
|
-
}) : /* @__PURE__ */
|
|
1461
|
+
}) : /* @__PURE__ */ I(H, {
|
|
1488
1462
|
style: J.container,
|
|
1489
1463
|
children: [
|
|
1490
|
-
/* @__PURE__ */ F(
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
style: { color: f.error },
|
|
1494
|
-
children: "*"
|
|
1495
|
-
})]
|
|
1464
|
+
/* @__PURE__ */ F(s, {
|
|
1465
|
+
label: d,
|
|
1466
|
+
required: c.data.required
|
|
1496
1467
|
}),
|
|
1497
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ F(H, {
|
|
1498
1469
|
style: [J.unavailableContainer, {
|
|
1499
|
-
backgroundColor:
|
|
1500
|
-
borderColor:
|
|
1470
|
+
backgroundColor: p.errorLight,
|
|
1471
|
+
borderColor: p.error
|
|
1501
1472
|
}],
|
|
1502
|
-
children: /* @__PURE__ */
|
|
1503
|
-
style: [J.unavailableText, { color:
|
|
1504
|
-
children:
|
|
1473
|
+
children: /* @__PURE__ */ F(B, {
|
|
1474
|
+
style: [J.unavailableText, { color: p.error }],
|
|
1475
|
+
children: m("renderer.defaultInputs.filePickerUnavailable")
|
|
1505
1476
|
})
|
|
1506
1477
|
}),
|
|
1507
|
-
|
|
1508
|
-
style: [J.helperText, { color:
|
|
1509
|
-
children:
|
|
1478
|
+
f && /* @__PURE__ */ F(B, {
|
|
1479
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1480
|
+
children: f
|
|
1510
1481
|
})
|
|
1511
1482
|
]
|
|
1512
1483
|
});
|
|
@@ -1549,11 +1520,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1549
1520
|
fontSize: 12,
|
|
1550
1521
|
marginTop: 4
|
|
1551
1522
|
},
|
|
1552
|
-
label: {
|
|
1553
|
-
fontSize: 14,
|
|
1554
|
-
fontWeight: "500",
|
|
1555
|
-
marginBottom: 8
|
|
1556
|
-
},
|
|
1557
1523
|
pickButton: {
|
|
1558
1524
|
alignItems: "center",
|
|
1559
1525
|
borderRadius: 6,
|
|
@@ -1579,15 +1545,15 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1579
1545
|
fontSize: 12,
|
|
1580
1546
|
textAlign: "center"
|
|
1581
1547
|
}
|
|
1582
|
-
}),
|
|
1548
|
+
}), Ee = (e) => null, De = ({ missing: e, children: t }) => {
|
|
1583
1549
|
let n = h(), { colors: r } = y();
|
|
1584
|
-
return /* @__PURE__ */
|
|
1585
|
-
style:
|
|
1586
|
-
children: [/* @__PURE__ */
|
|
1587
|
-
style: [
|
|
1550
|
+
return /* @__PURE__ */ I(ie, { children: [t, e.length > 0 && /* @__PURE__ */ I(H, {
|
|
1551
|
+
style: Oe.container,
|
|
1552
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1553
|
+
style: [Oe.title, { color: r.textMuted }],
|
|
1588
1554
|
children: n("renderer.dependencyHint.title")
|
|
1589
|
-
}), e.map((e) => /* @__PURE__ */
|
|
1590
|
-
style: [
|
|
1555
|
+
}), e.map((e) => /* @__PURE__ */ I(B, {
|
|
1556
|
+
style: [Oe.item, { color: r.textMuted }],
|
|
1591
1557
|
children: [
|
|
1592
1558
|
"•",
|
|
1593
1559
|
" ",
|
|
@@ -1595,7 +1561,7 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1595
1561
|
]
|
|
1596
1562
|
}, e.id))]
|
|
1597
1563
|
})] });
|
|
1598
|
-
},
|
|
1564
|
+
}, Oe = z.create({
|
|
1599
1565
|
container: {
|
|
1600
1566
|
gap: 2,
|
|
1601
1567
|
marginTop: 4
|
|
@@ -1605,53 +1571,53 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1605
1571
|
fontSize: 12,
|
|
1606
1572
|
fontWeight: "500"
|
|
1607
1573
|
}
|
|
1608
|
-
}),
|
|
1609
|
-
if (n >
|
|
1574
|
+
}), ke = (e) => e.replace(/<[^>]*>/g, ""), Ae = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), je = (e, t = {}) => e == null || e === "" ? "" : Ae(ke(String(e))), Me = 100, Ne = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1575
|
+
if (n > Me) return console.warn(`sanitizeHttpResponse: Maximum depth (${Me}) exceeded.`), typeof e == "string" ? je(e, t) : "[Max Depth Exceeded]";
|
|
1610
1576
|
if (e == null) return e;
|
|
1611
|
-
if (typeof e == "string") return
|
|
1612
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1577
|
+
if (typeof e == "string") return je(e, t);
|
|
1578
|
+
if (Array.isArray(e)) return e.map((e) => Ne(e, t, n + 1, r));
|
|
1613
1579
|
if (typeof e == "object") {
|
|
1614
1580
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1615
1581
|
r.add(e);
|
|
1616
1582
|
let i = {};
|
|
1617
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1583
|
+
for (let [a, o] of Object.entries(e)) i[a] = Ne(o, t, n + 1, r);
|
|
1618
1584
|
return r.delete(e), i;
|
|
1619
1585
|
}
|
|
1620
1586
|
return e;
|
|
1621
|
-
},
|
|
1587
|
+
}, Pe = (e) => {
|
|
1622
1588
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1623
1589
|
return Array.from(t, (e) => e[1]);
|
|
1624
|
-
},
|
|
1590
|
+
}, Fe = (e, t) => Pe(e).every((e) => {
|
|
1625
1591
|
let n = t[e];
|
|
1626
1592
|
return n != null && n !== "";
|
|
1627
|
-
}),
|
|
1593
|
+
}), Ie = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1628
1594
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1629
1595
|
return n ? encodeURIComponent(a) : a;
|
|
1630
|
-
}),
|
|
1631
|
-
let [o, l] =
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
]),
|
|
1636
|
-
|
|
1596
|
+
}), Le = ({ field: t, extra: i }) => {
|
|
1597
|
+
let [o, l] = P(!1), [d, f] = P(null), [p, m] = P([]), [_, v] = P(""), [b, x] = P(!1), { value: C, placeholder: T } = t, { InputLabel: E, node: D, setValue: O, error: k, label: A, helperText: j, missingDependencies: ee } = i, { formValues: te, inputNodes: ie, headers: oe, baseUrl: se } = r(), { colors: L } = y(), { httpConfig: R } = D.data, z = h(), ue = N(!1), fe = N(!1), pe = N(""), me = N(R), he = N(te), ge = N(ie), _e = N(oe), ve = N(se), U = N(O), be = N(null), xe = N(null), W = N(D.data.normalizeOptionLabels !== !1), Se = re(() => R?.url ? Pe(R.url) : [], [R?.url]), G = Se.length > 0, Ce = re(() => Se.map((e) => `${e}:${String(te[e] ?? "")}`).join("|"), [Se, te]), K = re(() => R?.url ? G ? Fe(R.url, te) : !0 : !1, [
|
|
1598
|
+
R?.url,
|
|
1599
|
+
G,
|
|
1600
|
+
te
|
|
1601
|
+
]), we = ne(async (t) => {
|
|
1602
|
+
xe.current && xe.current.abort();
|
|
1637
1603
|
let r = new AbortController();
|
|
1638
|
-
|
|
1639
|
-
let i =
|
|
1604
|
+
xe.current = r;
|
|
1605
|
+
let i = me.current, o = he.current, d = U.current;
|
|
1640
1606
|
if (!i?.url) {
|
|
1641
|
-
f(
|
|
1607
|
+
f(z("renderer.defaultHttpInput.noUrlConfigured")), xe.current = null;
|
|
1642
1608
|
return;
|
|
1643
1609
|
}
|
|
1644
|
-
if (i.url && !
|
|
1645
|
-
|
|
1610
|
+
if (i.url && !Fe(i.url, o)) {
|
|
1611
|
+
xe.current = null;
|
|
1646
1612
|
return;
|
|
1647
1613
|
}
|
|
1648
1614
|
l(!0), f(null);
|
|
1649
1615
|
try {
|
|
1650
|
-
let l = g(
|
|
1616
|
+
let l = g(Ie(i.url, o, !0), ve.current), p = w(i.searchParam && t ? `${l}${l.includes("?") ? "&" : "?"}${i.searchParam}=${encodeURIComponent(t)}` : l, a(i.queryParams, o)), h = s({ "Content-Type": "application/json" }, a(_e.current, o), a(i.headers, o)), _ = [
|
|
1651
1617
|
"POST",
|
|
1652
1618
|
"PUT",
|
|
1653
1619
|
"PATCH"
|
|
1654
|
-
].includes(i.method || "") ? i.sendAllFormValues ? JSON.stringify(S(o,
|
|
1620
|
+
].includes(i.method || "") ? i.sendAllFormValues ? JSON.stringify(S(o, ge.current)) : u(i.body, o, ge.current) : void 0, v = setTimeout(() => r.abort(), 3e4), y = await fetch(p, {
|
|
1655
1621
|
body: _ || void 0,
|
|
1656
1622
|
headers: Object.fromEntries(Object.entries(h).filter(([, e]) => e)),
|
|
1657
1623
|
method: i.method || "GET",
|
|
@@ -1663,12 +1629,12 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1663
1629
|
}
|
|
1664
1630
|
let b = e(await y.text());
|
|
1665
1631
|
if (!b.ok) {
|
|
1666
|
-
f(
|
|
1632
|
+
f(z("renderer.defaultHttpInput.invalidJson"));
|
|
1667
1633
|
return;
|
|
1668
1634
|
}
|
|
1669
|
-
let x =
|
|
1635
|
+
let x = Ne(b.value), C = i.responsePath ? n(x, i.responsePath) : x;
|
|
1670
1636
|
if (i.responseMapping && Array.isArray(C)) {
|
|
1671
|
-
let { valueField: e = "value", labelField: t = "label", descriptionField: r, imageField: a } = i.responseMapping, o =
|
|
1637
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: r, imageField: a } = i.responseMapping, o = W.current;
|
|
1672
1638
|
m(C.map((i) => {
|
|
1673
1639
|
let s = r ? n(i, r) : void 0, l = a ? n(i, a) : void 0, u = String(n(i, t) || "");
|
|
1674
1640
|
return {
|
|
@@ -1681,114 +1647,111 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1681
1647
|
} else d(typeof C == "string" ? C : JSON.stringify(C));
|
|
1682
1648
|
} catch (e) {
|
|
1683
1649
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1684
|
-
f(e instanceof Error ? e.message :
|
|
1650
|
+
f(e instanceof Error ? e.message : z("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1685
1651
|
} finally {
|
|
1686
|
-
|
|
1652
|
+
xe.current === r && (l(!1), xe.current = null);
|
|
1687
1653
|
}
|
|
1688
|
-
}, [
|
|
1689
|
-
if (
|
|
1690
|
-
|
|
1654
|
+
}, [z]);
|
|
1655
|
+
if (M(() => {
|
|
1656
|
+
me.current = R, he.current = te, ge.current = ie, _e.current = oe, ve.current = se, U.current = O, be.current = we, W.current = D.data.normalizeOptionLabels !== !1;
|
|
1691
1657
|
}, [
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1658
|
+
R,
|
|
1659
|
+
te,
|
|
1660
|
+
ie,
|
|
1661
|
+
oe,
|
|
1696
1662
|
se,
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
]),
|
|
1701
|
-
|
|
1702
|
-
}, []),
|
|
1703
|
-
if (
|
|
1704
|
-
|
|
1705
|
-
let e =
|
|
1706
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1707
|
-
}, []),
|
|
1708
|
-
if (!
|
|
1663
|
+
O,
|
|
1664
|
+
we,
|
|
1665
|
+
D.data.normalizeOptionLabels
|
|
1666
|
+
]), M(() => () => {
|
|
1667
|
+
xe.current && xe.current.abort(), ue.current = !1, fe.current = !1;
|
|
1668
|
+
}, []), M(() => {
|
|
1669
|
+
if (ue.current) return;
|
|
1670
|
+
ue.current = !0;
|
|
1671
|
+
let e = me.current, t = he.current, n = be.current, r = e?.url && Fe(e.url, t);
|
|
1672
|
+
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Pe(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1673
|
+
}, []), M(() => {
|
|
1674
|
+
if (!ue.current || !G || pe.current === Ce || !K) return;
|
|
1709
1675
|
let e = setTimeout(() => {
|
|
1710
|
-
|
|
1676
|
+
we(), pe.current = Ce;
|
|
1711
1677
|
}, 500);
|
|
1712
1678
|
return () => clearTimeout(e);
|
|
1713
1679
|
}, [
|
|
1680
|
+
Ce,
|
|
1681
|
+
G,
|
|
1714
1682
|
K,
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
if (!ue.current) {
|
|
1720
|
-
ue.current = !0;
|
|
1683
|
+
we
|
|
1684
|
+
]), M(() => {
|
|
1685
|
+
if (!fe.current) {
|
|
1686
|
+
fe.current = !0;
|
|
1721
1687
|
return;
|
|
1722
1688
|
}
|
|
1723
|
-
let e =
|
|
1724
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1725
|
-
}, [
|
|
1726
|
-
body:
|
|
1727
|
-
fetchOnMount:
|
|
1728
|
-
headers:
|
|
1729
|
-
method:
|
|
1730
|
-
queryParams:
|
|
1731
|
-
responseMapping:
|
|
1732
|
-
responsePath:
|
|
1733
|
-
searchParam:
|
|
1734
|
-
sendAllFormValues:
|
|
1735
|
-
url:
|
|
1736
|
-
}), [
|
|
1737
|
-
if (!(
|
|
1689
|
+
let e = me.current, t = he.current, n = be.current, r = e?.url && Fe(e.url, t);
|
|
1690
|
+
e?.fetchOnMount && r && n && (n(), e.url && (pe.current = Pe(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1691
|
+
}, [re(() => JSON.stringify({
|
|
1692
|
+
body: R?.body,
|
|
1693
|
+
fetchOnMount: R?.fetchOnMount,
|
|
1694
|
+
headers: R?.headers,
|
|
1695
|
+
method: R?.method,
|
|
1696
|
+
queryParams: R?.queryParams,
|
|
1697
|
+
responseMapping: R?.responseMapping,
|
|
1698
|
+
responsePath: R?.responsePath,
|
|
1699
|
+
searchParam: R?.searchParam,
|
|
1700
|
+
sendAllFormValues: R?.sendAllFormValues,
|
|
1701
|
+
url: R?.url
|
|
1702
|
+
}), [R])]), M(() => {
|
|
1703
|
+
if (!(R?.searchParam && _)) return;
|
|
1738
1704
|
let e = setTimeout(() => {
|
|
1739
|
-
|
|
1705
|
+
we(_);
|
|
1740
1706
|
}, 300);
|
|
1741
1707
|
return () => clearTimeout(e);
|
|
1742
1708
|
}, [
|
|
1743
1709
|
_,
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
]),
|
|
1710
|
+
R?.searchParam,
|
|
1711
|
+
we
|
|
1712
|
+
]), R?.responseMapping) {
|
|
1747
1713
|
let e = Array.isArray(C) ? C[0] : C, t = p.find((t) => t.value === e);
|
|
1748
|
-
if (
|
|
1749
|
-
let n = o &&
|
|
1750
|
-
return /* @__PURE__ */
|
|
1714
|
+
if (R.searchParam) {
|
|
1715
|
+
let n = o && R?.showLoading;
|
|
1716
|
+
return /* @__PURE__ */ I(H, {
|
|
1751
1717
|
style: Y.container,
|
|
1752
1718
|
children: [
|
|
1753
|
-
/* @__PURE__ */ F(
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
style: { color: I.error },
|
|
1757
|
-
children: "*"
|
|
1758
|
-
})]
|
|
1719
|
+
/* @__PURE__ */ F(E, {
|
|
1720
|
+
label: A,
|
|
1721
|
+
required: D.data.required
|
|
1759
1722
|
}),
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
missing:
|
|
1762
|
-
children: /* @__PURE__ */
|
|
1723
|
+
/* @__PURE__ */ F(De, {
|
|
1724
|
+
missing: ee,
|
|
1725
|
+
children: /* @__PURE__ */ I(V, {
|
|
1763
1726
|
style: [
|
|
1764
1727
|
Y.trigger,
|
|
1765
1728
|
{
|
|
1766
|
-
backgroundColor:
|
|
1767
|
-
borderColor:
|
|
1729
|
+
backgroundColor: L.input,
|
|
1730
|
+
borderColor: L.border
|
|
1768
1731
|
},
|
|
1769
|
-
|
|
1770
|
-
|
|
1732
|
+
k && { borderColor: L.error },
|
|
1733
|
+
ee.length > 0 && { backgroundColor: L.muted }
|
|
1771
1734
|
],
|
|
1772
1735
|
onPress: () => x(!0),
|
|
1773
|
-
disabled:
|
|
1736
|
+
disabled: ee.length > 0,
|
|
1774
1737
|
activeOpacity: .7,
|
|
1775
1738
|
children: [
|
|
1776
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ F(B, {
|
|
1777
1740
|
style: [
|
|
1778
1741
|
Y.triggerText,
|
|
1779
|
-
{ color:
|
|
1780
|
-
!t && { color:
|
|
1742
|
+
{ color: L.text },
|
|
1743
|
+
!t && { color: L.textMuted }
|
|
1781
1744
|
],
|
|
1782
1745
|
numberOfLines: 1,
|
|
1783
|
-
children: t?.label || T ||
|
|
1746
|
+
children: t?.label || T || z("renderer.defaultHttpInput.search")
|
|
1784
1747
|
}),
|
|
1785
|
-
n && /* @__PURE__ */
|
|
1748
|
+
n && /* @__PURE__ */ F(ae, {
|
|
1786
1749
|
size: "small",
|
|
1787
|
-
color:
|
|
1750
|
+
color: L.primary,
|
|
1788
1751
|
style: Y.triggerLoader
|
|
1789
1752
|
}),
|
|
1790
|
-
e ? /* @__PURE__ */
|
|
1791
|
-
onPress: () =>
|
|
1753
|
+
e ? /* @__PURE__ */ F(V, {
|
|
1754
|
+
onPress: () => O(""),
|
|
1792
1755
|
hitSlop: {
|
|
1793
1756
|
bottom: 8,
|
|
1794
1757
|
left: 8,
|
|
@@ -1796,55 +1759,55 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1796
1759
|
top: 8
|
|
1797
1760
|
},
|
|
1798
1761
|
style: Y.clearButton,
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1800
|
-
style: [Y.clearIcon, { color:
|
|
1762
|
+
children: /* @__PURE__ */ F(B, {
|
|
1763
|
+
style: [Y.clearIcon, { color: L.textMuted }],
|
|
1801
1764
|
children: "✕"
|
|
1802
1765
|
})
|
|
1803
1766
|
}) : null,
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
style: [Y.arrow, { color:
|
|
1767
|
+
/* @__PURE__ */ F(B, {
|
|
1768
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1806
1769
|
children: "▼"
|
|
1807
1770
|
})
|
|
1808
1771
|
]
|
|
1809
1772
|
})
|
|
1810
1773
|
}),
|
|
1811
|
-
/* @__PURE__ */
|
|
1774
|
+
/* @__PURE__ */ F(le, {
|
|
1812
1775
|
visible: b,
|
|
1813
1776
|
transparent: !0,
|
|
1814
1777
|
animationType: "fade",
|
|
1815
1778
|
onRequestClose: () => x(!1),
|
|
1816
|
-
children: /* @__PURE__ */
|
|
1779
|
+
children: /* @__PURE__ */ F(V, {
|
|
1817
1780
|
style: Y.modalOverlay,
|
|
1818
1781
|
activeOpacity: 1,
|
|
1819
1782
|
onPress: () => x(!1),
|
|
1820
|
-
children: /* @__PURE__ */
|
|
1821
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1783
|
+
children: /* @__PURE__ */ I(V, {
|
|
1784
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1822
1785
|
activeOpacity: 1,
|
|
1823
1786
|
onPress: () => {},
|
|
1824
1787
|
children: [
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1827
|
-
children: [/* @__PURE__ */
|
|
1828
|
-
style: [Y.modalTitle, { color:
|
|
1829
|
-
children:
|
|
1830
|
-
}), /* @__PURE__ */
|
|
1788
|
+
/* @__PURE__ */ I(H, {
|
|
1789
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1790
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1791
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1792
|
+
children: A || T || z("renderer.defaultHttpInput.search")
|
|
1793
|
+
}), /* @__PURE__ */ F(V, {
|
|
1831
1794
|
onPress: () => x(!1),
|
|
1832
|
-
children: /* @__PURE__ */
|
|
1833
|
-
style: [Y.closeButton, { color:
|
|
1795
|
+
children: /* @__PURE__ */ F(B, {
|
|
1796
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
1834
1797
|
children: "✕"
|
|
1835
1798
|
})
|
|
1836
1799
|
})]
|
|
1837
1800
|
}),
|
|
1838
|
-
/* @__PURE__ */
|
|
1801
|
+
/* @__PURE__ */ F(H, {
|
|
1839
1802
|
style: Y.searchContainer,
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1803
|
+
children: /* @__PURE__ */ F(de, {
|
|
1841
1804
|
style: [Y.searchInput, {
|
|
1842
|
-
backgroundColor:
|
|
1843
|
-
borderColor:
|
|
1844
|
-
color:
|
|
1805
|
+
backgroundColor: L.muted,
|
|
1806
|
+
borderColor: L.border,
|
|
1807
|
+
color: L.text
|
|
1845
1808
|
}],
|
|
1846
|
-
placeholder:
|
|
1847
|
-
placeholderTextColor:
|
|
1809
|
+
placeholder: z("renderer.defaultHttpInput.search"),
|
|
1810
|
+
placeholderTextColor: L.textMuted,
|
|
1848
1811
|
value: _,
|
|
1849
1812
|
onChangeText: (e) => {
|
|
1850
1813
|
v(e), f(null);
|
|
@@ -1854,51 +1817,51 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1854
1817
|
autoCorrect: !1
|
|
1855
1818
|
})
|
|
1856
1819
|
}),
|
|
1857
|
-
o ? /* @__PURE__ */
|
|
1820
|
+
o ? /* @__PURE__ */ F(H, {
|
|
1858
1821
|
style: Y.loadingContainer,
|
|
1859
|
-
children: /* @__PURE__ */
|
|
1822
|
+
children: /* @__PURE__ */ F(ae, {
|
|
1860
1823
|
size: "small",
|
|
1861
|
-
color:
|
|
1824
|
+
color: L.primary
|
|
1862
1825
|
})
|
|
1863
|
-
}) : d ? /* @__PURE__ */
|
|
1826
|
+
}) : d ? /* @__PURE__ */ I(H, {
|
|
1864
1827
|
style: Y.errorContainer,
|
|
1865
|
-
children: [/* @__PURE__ */
|
|
1866
|
-
style: [Y.errorText, { color:
|
|
1828
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1829
|
+
style: [Y.errorText, { color: L.error }],
|
|
1867
1830
|
children: d
|
|
1868
|
-
}), /* @__PURE__ */
|
|
1869
|
-
onPress: () =>
|
|
1831
|
+
}), /* @__PURE__ */ F(V, {
|
|
1832
|
+
onPress: () => we(_),
|
|
1870
1833
|
style: Y.retryButton,
|
|
1871
|
-
children: /* @__PURE__ */
|
|
1872
|
-
style: [Y.retryButtonText, { color:
|
|
1873
|
-
children:
|
|
1834
|
+
children: /* @__PURE__ */ F(B, {
|
|
1835
|
+
style: [Y.retryButtonText, { color: L.primary }],
|
|
1836
|
+
children: z("renderer.defaultHttpInput.retry")
|
|
1874
1837
|
})
|
|
1875
1838
|
})]
|
|
1876
|
-
}) : /* @__PURE__ */
|
|
1839
|
+
}) : /* @__PURE__ */ F(ce, {
|
|
1877
1840
|
data: p,
|
|
1878
1841
|
keyExtractor: (e) => e.value,
|
|
1879
1842
|
style: Y.optionsList,
|
|
1880
1843
|
contentContainerStyle: Y.optionsListContent,
|
|
1881
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1844
|
+
ListEmptyComponent: /* @__PURE__ */ F(H, {
|
|
1882
1845
|
style: Y.emptyContainer,
|
|
1883
|
-
children: /* @__PURE__ */
|
|
1884
|
-
style: [Y.emptyText, { color:
|
|
1885
|
-
children:
|
|
1846
|
+
children: /* @__PURE__ */ F(B, {
|
|
1847
|
+
style: [Y.emptyText, { color: L.textMuted }],
|
|
1848
|
+
children: z("renderer.defaultHttpInput.noResults")
|
|
1886
1849
|
})
|
|
1887
1850
|
}),
|
|
1888
1851
|
renderItem: ({ item: t }) => {
|
|
1889
1852
|
let n = t.value === e;
|
|
1890
|
-
return /* @__PURE__ */
|
|
1891
|
-
style: [Y.option, n && { backgroundColor:
|
|
1853
|
+
return /* @__PURE__ */ I(V, {
|
|
1854
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
1892
1855
|
onPress: () => {
|
|
1893
|
-
|
|
1856
|
+
O(t.value), x(!1);
|
|
1894
1857
|
},
|
|
1895
1858
|
activeOpacity: .7,
|
|
1896
|
-
children: [/* @__PURE__ */
|
|
1859
|
+
children: [/* @__PURE__ */ F(ye, {
|
|
1897
1860
|
label: t.label,
|
|
1898
1861
|
description: t.description,
|
|
1899
1862
|
image: t.image
|
|
1900
|
-
}), n && /* @__PURE__ */
|
|
1901
|
-
style: [Y.checkmark, { color:
|
|
1863
|
+
}), n && /* @__PURE__ */ F(B, {
|
|
1864
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
1902
1865
|
children: "✓"
|
|
1903
1866
|
})]
|
|
1904
1867
|
});
|
|
@@ -1908,60 +1871,57 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1908
1871
|
})
|
|
1909
1872
|
})
|
|
1910
1873
|
}),
|
|
1911
|
-
|
|
1912
|
-
style: [Y.error, { color:
|
|
1913
|
-
children: O
|
|
1914
|
-
}),
|
|
1915
|
-
k && !O && /* @__PURE__ */ P(B, {
|
|
1916
|
-
style: [Y.helperText, { color: I.textMuted }],
|
|
1874
|
+
k && /* @__PURE__ */ F(B, {
|
|
1875
|
+
style: [Y.error, { color: L.error }],
|
|
1917
1876
|
children: k
|
|
1877
|
+
}),
|
|
1878
|
+
j && !k && /* @__PURE__ */ F(B, {
|
|
1879
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
1880
|
+
children: j
|
|
1918
1881
|
})
|
|
1919
1882
|
]
|
|
1920
1883
|
});
|
|
1921
1884
|
}
|
|
1922
|
-
let n = o &&
|
|
1923
|
-
return /* @__PURE__ */
|
|
1885
|
+
let n = o && R?.showLoading, r = ee.length === 0 && p.length === 0 && !n ? d ?? z("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1886
|
+
return /* @__PURE__ */ I(H, {
|
|
1924
1887
|
style: Y.container,
|
|
1925
1888
|
children: [
|
|
1926
|
-
/* @__PURE__ */ F(
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
style: { color: I.error },
|
|
1930
|
-
children: "*"
|
|
1931
|
-
})]
|
|
1889
|
+
/* @__PURE__ */ F(E, {
|
|
1890
|
+
label: A,
|
|
1891
|
+
required: D.data.required
|
|
1932
1892
|
}),
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
missing:
|
|
1935
|
-
children: /* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ F(De, {
|
|
1894
|
+
missing: ee,
|
|
1895
|
+
children: /* @__PURE__ */ I(V, {
|
|
1936
1896
|
style: [
|
|
1937
1897
|
Y.trigger,
|
|
1938
1898
|
{
|
|
1939
|
-
backgroundColor:
|
|
1940
|
-
borderColor:
|
|
1899
|
+
backgroundColor: L.input,
|
|
1900
|
+
borderColor: L.border
|
|
1941
1901
|
},
|
|
1942
|
-
|
|
1943
|
-
(n || p.length === 0) && { backgroundColor:
|
|
1902
|
+
k && { borderColor: L.error },
|
|
1903
|
+
(n || p.length === 0) && { backgroundColor: L.muted }
|
|
1944
1904
|
],
|
|
1945
1905
|
onPress: () => x(!0),
|
|
1946
1906
|
disabled: n || p.length === 0,
|
|
1947
1907
|
activeOpacity: .7,
|
|
1948
1908
|
children: [
|
|
1949
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ F(B, {
|
|
1950
1910
|
style: [
|
|
1951
1911
|
Y.triggerText,
|
|
1952
|
-
{ color:
|
|
1953
|
-
!t && { color:
|
|
1912
|
+
{ color: L.text },
|
|
1913
|
+
!t && { color: L.textMuted }
|
|
1954
1914
|
],
|
|
1955
1915
|
numberOfLines: 1,
|
|
1956
|
-
children: t?.label || T ||
|
|
1916
|
+
children: t?.label || T || z("renderer.defaultHttpInput.selectOption")
|
|
1957
1917
|
}),
|
|
1958
|
-
n && /* @__PURE__ */
|
|
1918
|
+
n && /* @__PURE__ */ F(ae, {
|
|
1959
1919
|
size: "small",
|
|
1960
|
-
color:
|
|
1920
|
+
color: L.primary,
|
|
1961
1921
|
style: Y.triggerLoader
|
|
1962
1922
|
}),
|
|
1963
|
-
e ? /* @__PURE__ */
|
|
1964
|
-
onPress: () =>
|
|
1923
|
+
e ? /* @__PURE__ */ F(V, {
|
|
1924
|
+
onPress: () => O(""),
|
|
1965
1925
|
hitSlop: {
|
|
1966
1926
|
bottom: 8,
|
|
1967
1927
|
left: 8,
|
|
@@ -1969,66 +1929,66 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1969
1929
|
top: 8
|
|
1970
1930
|
},
|
|
1971
1931
|
style: Y.clearButton,
|
|
1972
|
-
children: /* @__PURE__ */
|
|
1973
|
-
style: [Y.clearIcon, { color:
|
|
1932
|
+
children: /* @__PURE__ */ F(B, {
|
|
1933
|
+
style: [Y.clearIcon, { color: L.textMuted }],
|
|
1974
1934
|
children: "✕"
|
|
1975
1935
|
})
|
|
1976
1936
|
}) : null,
|
|
1977
|
-
/* @__PURE__ */
|
|
1978
|
-
style: [Y.arrow, { color:
|
|
1937
|
+
/* @__PURE__ */ F(B, {
|
|
1938
|
+
style: [Y.arrow, { color: L.textMuted }],
|
|
1979
1939
|
children: "▼"
|
|
1980
1940
|
})
|
|
1981
1941
|
]
|
|
1982
1942
|
})
|
|
1983
1943
|
}),
|
|
1984
|
-
r && /* @__PURE__ */
|
|
1985
|
-
style: [Y.disabledMessage, { color:
|
|
1944
|
+
r && /* @__PURE__ */ F(B, {
|
|
1945
|
+
style: [Y.disabledMessage, { color: L.error }],
|
|
1986
1946
|
children: r
|
|
1987
1947
|
}),
|
|
1988
|
-
/* @__PURE__ */
|
|
1948
|
+
/* @__PURE__ */ F(le, {
|
|
1989
1949
|
visible: b,
|
|
1990
1950
|
transparent: !0,
|
|
1991
1951
|
animationType: "fade",
|
|
1992
1952
|
onRequestClose: () => x(!1),
|
|
1993
|
-
children: /* @__PURE__ */
|
|
1953
|
+
children: /* @__PURE__ */ F(V, {
|
|
1994
1954
|
style: Y.modalOverlay,
|
|
1995
1955
|
activeOpacity: 1,
|
|
1996
1956
|
onPress: () => x(!1),
|
|
1997
|
-
children: /* @__PURE__ */
|
|
1998
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1957
|
+
children: /* @__PURE__ */ I(V, {
|
|
1958
|
+
style: [Y.modalContent, { backgroundColor: L.card }],
|
|
1999
1959
|
activeOpacity: 1,
|
|
2000
1960
|
onPress: () => {},
|
|
2001
|
-
children: [/* @__PURE__ */
|
|
2002
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
2003
|
-
children: [/* @__PURE__ */
|
|
2004
|
-
style: [Y.modalTitle, { color:
|
|
2005
|
-
children:
|
|
2006
|
-
}), /* @__PURE__ */
|
|
1961
|
+
children: [/* @__PURE__ */ I(H, {
|
|
1962
|
+
style: [Y.modalHeader, { borderBottomColor: L.separator }],
|
|
1963
|
+
children: [/* @__PURE__ */ F(B, {
|
|
1964
|
+
style: [Y.modalTitle, { color: L.text }],
|
|
1965
|
+
children: A || T || z("renderer.defaultHttpInput.selectOption")
|
|
1966
|
+
}), /* @__PURE__ */ F(V, {
|
|
2007
1967
|
onPress: () => x(!1),
|
|
2008
|
-
children: /* @__PURE__ */
|
|
2009
|
-
style: [Y.closeButton, { color:
|
|
1968
|
+
children: /* @__PURE__ */ F(B, {
|
|
1969
|
+
style: [Y.closeButton, { color: L.textMuted }],
|
|
2010
1970
|
children: "✕"
|
|
2011
1971
|
})
|
|
2012
1972
|
})]
|
|
2013
|
-
}), /* @__PURE__ */
|
|
1973
|
+
}), /* @__PURE__ */ F(ce, {
|
|
2014
1974
|
data: p,
|
|
2015
1975
|
keyExtractor: (e) => e.value,
|
|
2016
1976
|
style: Y.optionsList,
|
|
2017
1977
|
contentContainerStyle: Y.optionsListContent,
|
|
2018
1978
|
renderItem: ({ item: t }) => {
|
|
2019
1979
|
let n = t.value === e;
|
|
2020
|
-
return /* @__PURE__ */
|
|
2021
|
-
style: [Y.option, n && { backgroundColor:
|
|
1980
|
+
return /* @__PURE__ */ I(V, {
|
|
1981
|
+
style: [Y.option, n && { backgroundColor: L.primaryLight }],
|
|
2022
1982
|
onPress: () => {
|
|
2023
|
-
|
|
1983
|
+
O(t.value), x(!1);
|
|
2024
1984
|
},
|
|
2025
1985
|
activeOpacity: .7,
|
|
2026
|
-
children: [/* @__PURE__ */
|
|
1986
|
+
children: [/* @__PURE__ */ F(ye, {
|
|
2027
1987
|
label: t.label,
|
|
2028
1988
|
description: t.description,
|
|
2029
1989
|
image: t.image
|
|
2030
|
-
}), n && /* @__PURE__ */
|
|
2031
|
-
style: [Y.checkmark, { color:
|
|
1990
|
+
}), n && /* @__PURE__ */ F(B, {
|
|
1991
|
+
style: [Y.checkmark, { color: L.primary }],
|
|
2032
1992
|
children: "✓"
|
|
2033
1993
|
})]
|
|
2034
1994
|
});
|
|
@@ -2037,43 +1997,40 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2037
1997
|
})
|
|
2038
1998
|
})
|
|
2039
1999
|
}),
|
|
2040
|
-
|
|
2041
|
-
style: [Y.error, { color:
|
|
2042
|
-
children: O
|
|
2043
|
-
}),
|
|
2044
|
-
k && !O && /* @__PURE__ */ P(B, {
|
|
2045
|
-
style: [Y.helperText, { color: I.textMuted }],
|
|
2000
|
+
k && /* @__PURE__ */ F(B, {
|
|
2001
|
+
style: [Y.error, { color: L.error }],
|
|
2046
2002
|
children: k
|
|
2003
|
+
}),
|
|
2004
|
+
j && !k && /* @__PURE__ */ F(B, {
|
|
2005
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
2006
|
+
children: j
|
|
2047
2007
|
})
|
|
2048
2008
|
]
|
|
2049
2009
|
});
|
|
2050
2010
|
}
|
|
2051
|
-
return /* @__PURE__ */
|
|
2011
|
+
return /* @__PURE__ */ I(H, {
|
|
2052
2012
|
style: Y.container,
|
|
2053
2013
|
children: [
|
|
2054
|
-
/* @__PURE__ */ F(
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
style: { color: I.error },
|
|
2058
|
-
children: "*"
|
|
2059
|
-
})]
|
|
2014
|
+
/* @__PURE__ */ F(E, {
|
|
2015
|
+
label: A,
|
|
2016
|
+
required: D.data.required
|
|
2060
2017
|
}),
|
|
2061
|
-
/* @__PURE__ */
|
|
2018
|
+
/* @__PURE__ */ F(de, {
|
|
2062
2019
|
style: [Y.input, {
|
|
2063
|
-
backgroundColor:
|
|
2064
|
-
borderColor:
|
|
2065
|
-
color:
|
|
2020
|
+
backgroundColor: L.muted,
|
|
2021
|
+
borderColor: L.border,
|
|
2022
|
+
color: L.textMuted
|
|
2066
2023
|
}],
|
|
2067
2024
|
value: typeof C == "string" ? C : JSON.stringify(C),
|
|
2068
2025
|
editable: !1
|
|
2069
2026
|
}),
|
|
2070
|
-
|
|
2071
|
-
style: [Y.error, { color:
|
|
2072
|
-
children: O
|
|
2073
|
-
}),
|
|
2074
|
-
k && !O && /* @__PURE__ */ P(B, {
|
|
2075
|
-
style: [Y.helperText, { color: I.textMuted }],
|
|
2027
|
+
k && /* @__PURE__ */ F(B, {
|
|
2028
|
+
style: [Y.error, { color: L.error }],
|
|
2076
2029
|
children: k
|
|
2030
|
+
}),
|
|
2031
|
+
j && !k && /* @__PURE__ */ F(B, {
|
|
2032
|
+
style: [Y.helperText, { color: L.textMuted }],
|
|
2033
|
+
children: j
|
|
2077
2034
|
})
|
|
2078
2035
|
]
|
|
2079
2036
|
});
|
|
@@ -2125,11 +2082,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2125
2082
|
paddingHorizontal: 12,
|
|
2126
2083
|
paddingVertical: 10
|
|
2127
2084
|
},
|
|
2128
|
-
label: {
|
|
2129
|
-
fontSize: 14,
|
|
2130
|
-
fontWeight: "500",
|
|
2131
|
-
marginBottom: 8
|
|
2132
|
-
},
|
|
2133
2085
|
loadingContainer: {
|
|
2134
2086
|
alignItems: "center",
|
|
2135
2087
|
paddingVertical: 24
|
|
@@ -2198,55 +2150,52 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2198
2150
|
flex: 1,
|
|
2199
2151
|
fontSize: 14
|
|
2200
2152
|
}
|
|
2201
|
-
}),
|
|
2202
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2203
|
-
return
|
|
2153
|
+
}), Re = ({ field: e, extra: t }) => {
|
|
2154
|
+
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();
|
|
2155
|
+
return M(() => {
|
|
2204
2156
|
o(n?.toString() ?? "");
|
|
2205
|
-
}, [n]), /* @__PURE__ */
|
|
2206
|
-
style:
|
|
2157
|
+
}, [n]), /* @__PURE__ */ I(H, {
|
|
2158
|
+
style: ze.container,
|
|
2207
2159
|
children: [
|
|
2208
|
-
/* @__PURE__ */ F(
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
style: { color: f.error },
|
|
2212
|
-
children: "*"
|
|
2213
|
-
})]
|
|
2160
|
+
/* @__PURE__ */ F(s, {
|
|
2161
|
+
label: d,
|
|
2162
|
+
required: c.data.required
|
|
2214
2163
|
}),
|
|
2215
|
-
/* @__PURE__ */
|
|
2164
|
+
/* @__PURE__ */ F(de, {
|
|
2216
2165
|
style: [
|
|
2217
|
-
|
|
2166
|
+
ze.input,
|
|
2218
2167
|
{
|
|
2219
|
-
backgroundColor:
|
|
2220
|
-
borderColor:
|
|
2221
|
-
color:
|
|
2168
|
+
backgroundColor: p.input,
|
|
2169
|
+
borderColor: p.border,
|
|
2170
|
+
color: p.text
|
|
2222
2171
|
},
|
|
2223
|
-
|
|
2172
|
+
u && { borderColor: p.error }
|
|
2224
2173
|
],
|
|
2225
2174
|
value: a,
|
|
2226
2175
|
onChangeText: (e) => {
|
|
2227
2176
|
if (o(e), e.trim() === "") {
|
|
2228
|
-
|
|
2177
|
+
l(null);
|
|
2229
2178
|
return;
|
|
2230
2179
|
}
|
|
2231
2180
|
let t = Number(e);
|
|
2232
|
-
Number.isNaN(t) ||
|
|
2181
|
+
Number.isNaN(t) || l(t);
|
|
2233
2182
|
},
|
|
2234
2183
|
placeholder: r,
|
|
2235
|
-
placeholderTextColor:
|
|
2184
|
+
placeholderTextColor: p.textMuted,
|
|
2236
2185
|
keyboardType: "numeric",
|
|
2237
2186
|
accessibilityLabel: i
|
|
2238
2187
|
}),
|
|
2239
|
-
|
|
2240
|
-
style: [
|
|
2241
|
-
children:
|
|
2188
|
+
u && /* @__PURE__ */ F(B, {
|
|
2189
|
+
style: [ze.error, { color: p.error }],
|
|
2190
|
+
children: u
|
|
2242
2191
|
}),
|
|
2243
|
-
|
|
2244
|
-
style: [
|
|
2245
|
-
children:
|
|
2192
|
+
f && !u && /* @__PURE__ */ F(B, {
|
|
2193
|
+
style: [ze.helperText, { color: p.textMuted }],
|
|
2194
|
+
children: f
|
|
2246
2195
|
})
|
|
2247
2196
|
]
|
|
2248
2197
|
});
|
|
2249
|
-
},
|
|
2198
|
+
}, ze = z.create({
|
|
2250
2199
|
container: { marginBottom: 16 },
|
|
2251
2200
|
error: {
|
|
2252
2201
|
fontSize: 12,
|
|
@@ -2262,63 +2211,55 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2262
2211
|
fontSize: 14,
|
|
2263
2212
|
paddingHorizontal: 12,
|
|
2264
2213
|
paddingVertical: 8
|
|
2265
|
-
},
|
|
2266
|
-
label: {
|
|
2267
|
-
fontSize: 14,
|
|
2268
|
-
fontWeight: "500",
|
|
2269
|
-
marginBottom: 8
|
|
2270
2214
|
}
|
|
2271
|
-
}),
|
|
2272
|
-
let [n, r] =
|
|
2273
|
-
return /* @__PURE__ */
|
|
2274
|
-
style:
|
|
2215
|
+
}), Be = ({ field: e, extra: t }) => {
|
|
2216
|
+
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();
|
|
2217
|
+
return /* @__PURE__ */ I(H, {
|
|
2218
|
+
style: Ve.container,
|
|
2275
2219
|
children: [
|
|
2276
|
-
/* @__PURE__ */ F(
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
style: { color: f.error },
|
|
2280
|
-
children: "*"
|
|
2281
|
-
})]
|
|
2220
|
+
/* @__PURE__ */ F(s, {
|
|
2221
|
+
label: d,
|
|
2222
|
+
required: c.data.required
|
|
2282
2223
|
}),
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
style:
|
|
2285
|
-
children: [/* @__PURE__ */
|
|
2224
|
+
/* @__PURE__ */ I(H, {
|
|
2225
|
+
style: Ve.inputWrapper,
|
|
2226
|
+
children: [/* @__PURE__ */ F(de, {
|
|
2286
2227
|
style: [
|
|
2287
|
-
|
|
2228
|
+
Ve.input,
|
|
2288
2229
|
{
|
|
2289
|
-
backgroundColor:
|
|
2290
|
-
borderColor:
|
|
2291
|
-
color:
|
|
2230
|
+
backgroundColor: p.input,
|
|
2231
|
+
borderColor: p.border,
|
|
2232
|
+
color: p.text
|
|
2292
2233
|
},
|
|
2293
|
-
|
|
2234
|
+
u && { borderColor: p.error }
|
|
2294
2235
|
],
|
|
2295
2236
|
value: i ?? "",
|
|
2296
|
-
onChangeText:
|
|
2237
|
+
onChangeText: l,
|
|
2297
2238
|
placeholder: a,
|
|
2298
|
-
placeholderTextColor:
|
|
2239
|
+
placeholderTextColor: p.textMuted,
|
|
2299
2240
|
secureTextEntry: !n,
|
|
2300
2241
|
accessibilityLabel: o
|
|
2301
|
-
}), /* @__PURE__ */
|
|
2302
|
-
style:
|
|
2242
|
+
}), /* @__PURE__ */ F(V, {
|
|
2243
|
+
style: Ve.toggleButton,
|
|
2303
2244
|
onPress: () => r(!n),
|
|
2304
2245
|
activeOpacity: .7,
|
|
2305
|
-
children: /* @__PURE__ */
|
|
2306
|
-
style: [
|
|
2246
|
+
children: /* @__PURE__ */ F(B, {
|
|
2247
|
+
style: [Ve.toggleText, { color: p.primary }],
|
|
2307
2248
|
children: n ? "Hide" : "Show"
|
|
2308
2249
|
})
|
|
2309
2250
|
})]
|
|
2310
2251
|
}),
|
|
2311
|
-
|
|
2312
|
-
style: [
|
|
2313
|
-
children:
|
|
2252
|
+
u && /* @__PURE__ */ F(B, {
|
|
2253
|
+
style: [Ve.error, { color: p.error }],
|
|
2254
|
+
children: u
|
|
2314
2255
|
}),
|
|
2315
|
-
|
|
2316
|
-
style: [
|
|
2317
|
-
children:
|
|
2256
|
+
f && !u && /* @__PURE__ */ F(B, {
|
|
2257
|
+
style: [Ve.helperText, { color: p.textMuted }],
|
|
2258
|
+
children: f
|
|
2318
2259
|
})
|
|
2319
2260
|
]
|
|
2320
2261
|
});
|
|
2321
|
-
},
|
|
2262
|
+
}, Ve = z.create({
|
|
2322
2263
|
container: { marginBottom: 16 },
|
|
2323
2264
|
error: {
|
|
2324
2265
|
fontSize: 12,
|
|
@@ -2341,11 +2282,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2341
2282
|
flexDirection: "row",
|
|
2342
2283
|
position: "relative"
|
|
2343
2284
|
},
|
|
2344
|
-
label: {
|
|
2345
|
-
fontSize: 14,
|
|
2346
|
-
fontWeight: "500",
|
|
2347
|
-
marginBottom: 8
|
|
2348
|
-
},
|
|
2349
2285
|
toggleButton: {
|
|
2350
2286
|
paddingHorizontal: 12,
|
|
2351
2287
|
paddingVertical: 8,
|
|
@@ -2356,111 +2292,108 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2356
2292
|
fontSize: 12,
|
|
2357
2293
|
fontWeight: "600"
|
|
2358
2294
|
}
|
|
2359
|
-
}),
|
|
2360
|
-
let { value: n } = e, {
|
|
2361
|
-
|
|
2295
|
+
}), He = ({ field: e, extra: t }) => {
|
|
2296
|
+
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = y(), u = h(), d = i.data.options || [], f = n || "", p = i.data.variant !== "default", m = (e) => {
|
|
2297
|
+
a(e);
|
|
2362
2298
|
};
|
|
2363
|
-
return /* @__PURE__ */
|
|
2299
|
+
return /* @__PURE__ */ I(H, {
|
|
2364
2300
|
style: X.container,
|
|
2365
2301
|
children: [
|
|
2366
|
-
/* @__PURE__ */ F(
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
style: { color: c.error },
|
|
2370
|
-
children: "*"
|
|
2371
|
-
})]
|
|
2302
|
+
/* @__PURE__ */ F(r, {
|
|
2303
|
+
label: s,
|
|
2304
|
+
required: i.data.required
|
|
2372
2305
|
}),
|
|
2373
|
-
|
|
2374
|
-
let t =
|
|
2375
|
-
return
|
|
2306
|
+
d.map((e) => {
|
|
2307
|
+
let t = f === e.value, n = u(e.label) || e.value, r = u(e.description);
|
|
2308
|
+
return p ? /* @__PURE__ */ I(V, {
|
|
2376
2309
|
style: [
|
|
2377
2310
|
X.card,
|
|
2378
2311
|
{
|
|
2379
|
-
backgroundColor:
|
|
2380
|
-
borderColor:
|
|
2312
|
+
backgroundColor: l.input,
|
|
2313
|
+
borderColor: l.border
|
|
2381
2314
|
},
|
|
2382
2315
|
t && {
|
|
2383
|
-
backgroundColor: `${
|
|
2384
|
-
borderColor:
|
|
2316
|
+
backgroundColor: `${l.primary}10`,
|
|
2317
|
+
borderColor: l.primary
|
|
2385
2318
|
},
|
|
2386
2319
|
e.disabled && { opacity: .5 }
|
|
2387
2320
|
],
|
|
2388
|
-
onPress: () =>
|
|
2321
|
+
onPress: () => m(e.value),
|
|
2389
2322
|
disabled: e.disabled,
|
|
2390
2323
|
activeOpacity: .7,
|
|
2391
2324
|
children: [
|
|
2392
|
-
e.image && /* @__PURE__ */
|
|
2325
|
+
e.image && /* @__PURE__ */ F(L, {
|
|
2393
2326
|
source: { uri: e.image },
|
|
2394
2327
|
style: X.cardImage
|
|
2395
2328
|
}),
|
|
2396
|
-
/* @__PURE__ */
|
|
2329
|
+
/* @__PURE__ */ I(H, {
|
|
2397
2330
|
style: X.cardTextContainer,
|
|
2398
|
-
children: [/* @__PURE__ */
|
|
2399
|
-
style: [X.cardLabel, { color:
|
|
2331
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2332
|
+
style: [X.cardLabel, { color: l.textSecondary }],
|
|
2400
2333
|
children: n
|
|
2401
|
-
}), r && /* @__PURE__ */
|
|
2402
|
-
style: [X.cardDescription, { color:
|
|
2334
|
+
}), r && /* @__PURE__ */ F(B, {
|
|
2335
|
+
style: [X.cardDescription, { color: l.textMuted }],
|
|
2403
2336
|
children: r
|
|
2404
2337
|
})]
|
|
2405
2338
|
}),
|
|
2406
|
-
/* @__PURE__ */
|
|
2339
|
+
/* @__PURE__ */ F(H, {
|
|
2407
2340
|
style: [
|
|
2408
2341
|
X.radio,
|
|
2409
2342
|
X.cardRadio,
|
|
2410
2343
|
{
|
|
2411
|
-
backgroundColor:
|
|
2412
|
-
borderColor:
|
|
2344
|
+
backgroundColor: l.input,
|
|
2345
|
+
borderColor: l.border
|
|
2413
2346
|
},
|
|
2414
|
-
t && { borderColor:
|
|
2347
|
+
t && { borderColor: l.primary }
|
|
2415
2348
|
],
|
|
2416
|
-
children: t && /* @__PURE__ */
|
|
2349
|
+
children: t && /* @__PURE__ */ F(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2417
2350
|
})
|
|
2418
2351
|
]
|
|
2419
|
-
}, e.value) : /* @__PURE__ */
|
|
2352
|
+
}, e.value) : /* @__PURE__ */ I(V, {
|
|
2420
2353
|
style: X.option,
|
|
2421
|
-
onPress: () =>
|
|
2354
|
+
onPress: () => m(e.value),
|
|
2422
2355
|
disabled: e.disabled,
|
|
2423
2356
|
activeOpacity: .7,
|
|
2424
2357
|
children: [
|
|
2425
|
-
/* @__PURE__ */
|
|
2358
|
+
/* @__PURE__ */ F(H, {
|
|
2426
2359
|
style: [
|
|
2427
2360
|
X.radio,
|
|
2428
2361
|
{
|
|
2429
|
-
backgroundColor:
|
|
2430
|
-
borderColor:
|
|
2362
|
+
backgroundColor: l.input,
|
|
2363
|
+
borderColor: l.border
|
|
2431
2364
|
},
|
|
2432
|
-
t && { borderColor:
|
|
2365
|
+
t && { borderColor: l.primary }
|
|
2433
2366
|
],
|
|
2434
|
-
children: t && /* @__PURE__ */
|
|
2367
|
+
children: t && /* @__PURE__ */ F(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2435
2368
|
}),
|
|
2436
|
-
e.image && /* @__PURE__ */
|
|
2369
|
+
e.image && /* @__PURE__ */ F(L, {
|
|
2437
2370
|
source: { uri: e.image },
|
|
2438
2371
|
style: X.image
|
|
2439
2372
|
}),
|
|
2440
|
-
/* @__PURE__ */
|
|
2373
|
+
/* @__PURE__ */ I(H, {
|
|
2441
2374
|
style: X.optionTextContainer,
|
|
2442
|
-
children: [/* @__PURE__ */
|
|
2375
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2443
2376
|
style: [
|
|
2444
2377
|
X.optionLabel,
|
|
2445
|
-
{ color:
|
|
2446
|
-
e.disabled && { color:
|
|
2378
|
+
{ color: l.textSecondary },
|
|
2379
|
+
e.disabled && { color: l.textMuted }
|
|
2447
2380
|
],
|
|
2448
2381
|
children: n
|
|
2449
|
-
}), r && /* @__PURE__ */
|
|
2450
|
-
style: [X.optionDescription, { color:
|
|
2382
|
+
}), r && /* @__PURE__ */ F(B, {
|
|
2383
|
+
style: [X.optionDescription, { color: l.textMuted }],
|
|
2451
2384
|
children: r
|
|
2452
2385
|
})]
|
|
2453
2386
|
})
|
|
2454
2387
|
]
|
|
2455
2388
|
}, e.value);
|
|
2456
2389
|
}),
|
|
2457
|
-
|
|
2458
|
-
style: [X.error, { color:
|
|
2459
|
-
children:
|
|
2390
|
+
o && /* @__PURE__ */ F(B, {
|
|
2391
|
+
style: [X.error, { color: l.error }],
|
|
2392
|
+
children: o
|
|
2460
2393
|
}),
|
|
2461
|
-
|
|
2462
|
-
style: [X.helperText, { color:
|
|
2463
|
-
children:
|
|
2394
|
+
c && !o && /* @__PURE__ */ F(B, {
|
|
2395
|
+
style: [X.helperText, { color: l.textMuted }],
|
|
2396
|
+
children: c
|
|
2464
2397
|
})
|
|
2465
2398
|
]
|
|
2466
2399
|
});
|
|
@@ -2507,11 +2440,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2507
2440
|
marginRight: 8,
|
|
2508
2441
|
width: 32
|
|
2509
2442
|
},
|
|
2510
|
-
label: {
|
|
2511
|
-
fontSize: 14,
|
|
2512
|
-
fontWeight: "500",
|
|
2513
|
-
marginBottom: 8
|
|
2514
|
-
},
|
|
2515
2443
|
option: {
|
|
2516
2444
|
alignItems: "center",
|
|
2517
2445
|
flexDirection: "row",
|
|
@@ -2537,47 +2465,44 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2537
2465
|
height: 10,
|
|
2538
2466
|
width: 10
|
|
2539
2467
|
}
|
|
2540
|
-
}),
|
|
2541
|
-
let [n, r] =
|
|
2542
|
-
|
|
2468
|
+
}), Ue = ({ field: e, extra: t }) => {
|
|
2469
|
+
let [n, r] = P(!1), { value: i, placeholder: a } = e, { InputLabel: o, node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = y(), p = h(), m = s.data.options || [], g = s.data.multiple, _ = Array.isArray(i) ? i : i ? [i] : [], v = (e) => {
|
|
2470
|
+
g ? c(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (c(e), r(!1));
|
|
2543
2471
|
};
|
|
2544
|
-
return /* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ I(H, {
|
|
2545
2473
|
style: Z.container,
|
|
2546
2474
|
children: [
|
|
2547
|
-
/* @__PURE__ */ F(
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
style: { color: d.error },
|
|
2551
|
-
children: "*"
|
|
2552
|
-
})]
|
|
2475
|
+
/* @__PURE__ */ F(o, {
|
|
2476
|
+
label: u,
|
|
2477
|
+
required: s.data.required
|
|
2553
2478
|
}),
|
|
2554
|
-
/* @__PURE__ */
|
|
2479
|
+
/* @__PURE__ */ I(V, {
|
|
2555
2480
|
style: [
|
|
2556
2481
|
Z.trigger,
|
|
2557
2482
|
{
|
|
2558
|
-
backgroundColor:
|
|
2559
|
-
borderColor:
|
|
2483
|
+
backgroundColor: f.input,
|
|
2484
|
+
borderColor: f.border
|
|
2560
2485
|
},
|
|
2561
|
-
|
|
2486
|
+
l && { borderColor: f.error }
|
|
2562
2487
|
],
|
|
2563
2488
|
onPress: () => r(!0),
|
|
2564
2489
|
activeOpacity: .7,
|
|
2565
2490
|
children: [
|
|
2566
|
-
/* @__PURE__ */
|
|
2491
|
+
/* @__PURE__ */ F(B, {
|
|
2567
2492
|
style: [
|
|
2568
2493
|
Z.triggerText,
|
|
2569
|
-
{ color:
|
|
2570
|
-
|
|
2494
|
+
{ color: f.text },
|
|
2495
|
+
_.length === 0 && { color: f.textMuted }
|
|
2571
2496
|
],
|
|
2572
2497
|
children: (() => {
|
|
2573
|
-
if (
|
|
2574
|
-
if (
|
|
2575
|
-
let e =
|
|
2576
|
-
return e ?
|
|
2498
|
+
if (_.length === 0) return a || "Select...";
|
|
2499
|
+
if (g) return m.filter((e) => _.includes(e.value)).map((e) => p(e.label) || e.value).join(", ");
|
|
2500
|
+
let e = m.find((e) => e.value === _[0]);
|
|
2501
|
+
return e ? p(e.label) || e.value : a || "Select...";
|
|
2577
2502
|
})()
|
|
2578
2503
|
}),
|
|
2579
|
-
|
|
2580
|
-
onPress: () =>
|
|
2504
|
+
_.length > 0 && /* @__PURE__ */ F(V, {
|
|
2505
|
+
onPress: () => c(g ? [] : ""),
|
|
2581
2506
|
hitSlop: {
|
|
2582
2507
|
bottom: 8,
|
|
2583
2508
|
left: 8,
|
|
@@ -2585,68 +2510,68 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2585
2510
|
top: 8
|
|
2586
2511
|
},
|
|
2587
2512
|
style: Z.clearButton,
|
|
2588
|
-
children: /* @__PURE__ */
|
|
2589
|
-
style: [Z.clearIcon, { color:
|
|
2513
|
+
children: /* @__PURE__ */ F(B, {
|
|
2514
|
+
style: [Z.clearIcon, { color: f.textMuted }],
|
|
2590
2515
|
children: "✕"
|
|
2591
2516
|
})
|
|
2592
2517
|
}),
|
|
2593
|
-
/* @__PURE__ */
|
|
2594
|
-
style: [Z.arrow, { color:
|
|
2518
|
+
/* @__PURE__ */ F(B, {
|
|
2519
|
+
style: [Z.arrow, { color: f.textMuted }],
|
|
2595
2520
|
children: "▼"
|
|
2596
2521
|
})
|
|
2597
2522
|
]
|
|
2598
2523
|
}),
|
|
2599
|
-
/* @__PURE__ */
|
|
2524
|
+
/* @__PURE__ */ F(le, {
|
|
2600
2525
|
visible: n,
|
|
2601
2526
|
transparent: !0,
|
|
2602
2527
|
animationType: "fade",
|
|
2603
2528
|
onRequestClose: () => r(!1),
|
|
2604
|
-
children: /* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ F(V, {
|
|
2605
2530
|
style: Z.modalOverlay,
|
|
2606
2531
|
activeOpacity: 1,
|
|
2607
2532
|
onPress: () => r(!1),
|
|
2608
|
-
children: /* @__PURE__ */
|
|
2609
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2533
|
+
children: /* @__PURE__ */ I(H, {
|
|
2534
|
+
style: [Z.modalContent, { backgroundColor: f.card }],
|
|
2610
2535
|
onStartShouldSetResponder: () => !0,
|
|
2611
2536
|
children: [
|
|
2612
|
-
/* @__PURE__ */
|
|
2613
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2614
|
-
children: [/* @__PURE__ */
|
|
2615
|
-
style: [Z.modalTitle, { color:
|
|
2616
|
-
children:
|
|
2617
|
-
}), /* @__PURE__ */
|
|
2537
|
+
/* @__PURE__ */ I(H, {
|
|
2538
|
+
style: [Z.modalHeader, { borderBottomColor: f.border }],
|
|
2539
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2540
|
+
style: [Z.modalTitle, { color: f.text }],
|
|
2541
|
+
children: u || a || p("renderer.defaultSelectInput.selectOption")
|
|
2542
|
+
}), /* @__PURE__ */ F(V, {
|
|
2618
2543
|
onPress: () => r(!1),
|
|
2619
|
-
children: /* @__PURE__ */
|
|
2620
|
-
style: [Z.closeButton, { color:
|
|
2544
|
+
children: /* @__PURE__ */ F(B, {
|
|
2545
|
+
style: [Z.closeButton, { color: f.textMuted }],
|
|
2621
2546
|
children: "✕"
|
|
2622
2547
|
})
|
|
2623
2548
|
})]
|
|
2624
2549
|
}),
|
|
2625
|
-
/* @__PURE__ */
|
|
2550
|
+
/* @__PURE__ */ F(R, {
|
|
2626
2551
|
style: Z.optionsList,
|
|
2627
|
-
children:
|
|
2628
|
-
let t =
|
|
2629
|
-
return /* @__PURE__ */
|
|
2630
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2631
|
-
onPress: () =>
|
|
2552
|
+
children: m.map((e) => {
|
|
2553
|
+
let t = _.includes(e.value);
|
|
2554
|
+
return /* @__PURE__ */ I(V, {
|
|
2555
|
+
style: [Z.option, t && { backgroundColor: `${f.primary}20` }],
|
|
2556
|
+
onPress: () => v(e.value),
|
|
2632
2557
|
disabled: e.disabled,
|
|
2633
2558
|
activeOpacity: .7,
|
|
2634
|
-
children: [/* @__PURE__ */
|
|
2635
|
-
label:
|
|
2636
|
-
description:
|
|
2559
|
+
children: [/* @__PURE__ */ F(ye, {
|
|
2560
|
+
label: p(e.label) || e.value,
|
|
2561
|
+
description: p(e.description),
|
|
2637
2562
|
image: e.image,
|
|
2638
2563
|
disabled: e.disabled
|
|
2639
|
-
}), t && /* @__PURE__ */
|
|
2640
|
-
style: [Z.checkmark, { color:
|
|
2564
|
+
}), t && /* @__PURE__ */ F(B, {
|
|
2565
|
+
style: [Z.checkmark, { color: f.primary }],
|
|
2641
2566
|
children: "✓"
|
|
2642
2567
|
})]
|
|
2643
2568
|
}, e.value);
|
|
2644
2569
|
})
|
|
2645
2570
|
}),
|
|
2646
|
-
|
|
2647
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2571
|
+
g && /* @__PURE__ */ F(V, {
|
|
2572
|
+
style: [Z.doneButton, { backgroundColor: f.primary }],
|
|
2648
2573
|
onPress: () => r(!1),
|
|
2649
|
-
children: /* @__PURE__ */
|
|
2574
|
+
children: /* @__PURE__ */ F(B, {
|
|
2650
2575
|
style: Z.doneButtonText,
|
|
2651
2576
|
children: "Done"
|
|
2652
2577
|
})
|
|
@@ -2655,13 +2580,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2655
2580
|
})
|
|
2656
2581
|
})
|
|
2657
2582
|
}),
|
|
2658
|
-
|
|
2659
|
-
style: [Z.error, { color:
|
|
2660
|
-
children:
|
|
2583
|
+
l && /* @__PURE__ */ F(B, {
|
|
2584
|
+
style: [Z.error, { color: f.error }],
|
|
2585
|
+
children: l
|
|
2661
2586
|
}),
|
|
2662
|
-
|
|
2663
|
-
style: [Z.helperText, { color:
|
|
2664
|
-
children:
|
|
2587
|
+
d && !l && /* @__PURE__ */ F(B, {
|
|
2588
|
+
style: [Z.helperText, { color: f.textMuted }],
|
|
2589
|
+
children: d
|
|
2665
2590
|
})
|
|
2666
2591
|
]
|
|
2667
2592
|
});
|
|
@@ -2700,11 +2625,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2700
2625
|
fontSize: 12,
|
|
2701
2626
|
marginTop: 4
|
|
2702
2627
|
},
|
|
2703
|
-
label: {
|
|
2704
|
-
fontSize: 14,
|
|
2705
|
-
fontWeight: "500",
|
|
2706
|
-
marginBottom: 8
|
|
2707
|
-
},
|
|
2708
2628
|
modalContent: {
|
|
2709
2629
|
borderRadius: 12,
|
|
2710
2630
|
maxHeight: "80%",
|
|
@@ -2751,44 +2671,41 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2751
2671
|
flex: 1,
|
|
2752
2672
|
fontSize: 14
|
|
2753
2673
|
}
|
|
2754
|
-
}),
|
|
2755
|
-
let { value: n } = e, {
|
|
2756
|
-
return /* @__PURE__ */
|
|
2757
|
-
style:
|
|
2674
|
+
}), We = (e) => null, Ge = ({ field: e, extra: t }) => {
|
|
2675
|
+
let { value: n } = e, { InputLabel: r, node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = y(), u = !!n;
|
|
2676
|
+
return /* @__PURE__ */ I(H, {
|
|
2677
|
+
style: Ke.container,
|
|
2758
2678
|
children: [
|
|
2759
|
-
/* @__PURE__ */
|
|
2760
|
-
style:
|
|
2761
|
-
children: [/* @__PURE__ */
|
|
2762
|
-
style:
|
|
2763
|
-
children: /* @__PURE__ */ F(
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
style: { color: c.error },
|
|
2767
|
-
children: "*"
|
|
2768
|
-
})]
|
|
2679
|
+
/* @__PURE__ */ I(H, {
|
|
2680
|
+
style: Ke.row,
|
|
2681
|
+
children: [/* @__PURE__ */ F(H, {
|
|
2682
|
+
style: Ke.labelContainer,
|
|
2683
|
+
children: /* @__PURE__ */ F(r, {
|
|
2684
|
+
label: s,
|
|
2685
|
+
required: i.data.required
|
|
2769
2686
|
})
|
|
2770
|
-
}), /* @__PURE__ */
|
|
2687
|
+
}), /* @__PURE__ */ F(ue, {
|
|
2771
2688
|
trackColor: {
|
|
2772
|
-
false:
|
|
2773
|
-
true: `${
|
|
2689
|
+
false: l.border,
|
|
2690
|
+
true: `${l.primary}80`
|
|
2774
2691
|
},
|
|
2775
|
-
thumbColor:
|
|
2776
|
-
ios_backgroundColor:
|
|
2777
|
-
onValueChange:
|
|
2778
|
-
value:
|
|
2692
|
+
thumbColor: u ? l.primary : l.card,
|
|
2693
|
+
ios_backgroundColor: l.border,
|
|
2694
|
+
onValueChange: a,
|
|
2695
|
+
value: u
|
|
2779
2696
|
})]
|
|
2780
2697
|
}),
|
|
2781
|
-
|
|
2782
|
-
style: [
|
|
2783
|
-
children:
|
|
2698
|
+
o && /* @__PURE__ */ F(B, {
|
|
2699
|
+
style: [Ke.error, { color: l.error }],
|
|
2700
|
+
children: o
|
|
2784
2701
|
}),
|
|
2785
|
-
|
|
2786
|
-
style: [
|
|
2787
|
-
children:
|
|
2702
|
+
c && !o && /* @__PURE__ */ F(B, {
|
|
2703
|
+
style: [Ke.helperText, { color: l.textMuted }],
|
|
2704
|
+
children: c
|
|
2788
2705
|
})
|
|
2789
2706
|
]
|
|
2790
2707
|
});
|
|
2791
|
-
},
|
|
2708
|
+
}, Ke = z.create({
|
|
2792
2709
|
container: { marginBottom: 16 },
|
|
2793
2710
|
error: {
|
|
2794
2711
|
fontSize: 12,
|
|
@@ -2798,58 +2715,51 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2798
2715
|
fontSize: 12,
|
|
2799
2716
|
marginTop: 4
|
|
2800
2717
|
},
|
|
2801
|
-
label: {
|
|
2802
|
-
fontSize: 14,
|
|
2803
|
-
fontWeight: "500"
|
|
2804
|
-
},
|
|
2805
2718
|
labelContainer: { flex: 1 },
|
|
2806
2719
|
row: {
|
|
2807
2720
|
alignItems: "center",
|
|
2808
2721
|
flexDirection: "row",
|
|
2809
2722
|
justifyContent: "space-between"
|
|
2810
2723
|
}
|
|
2811
|
-
}),
|
|
2812
|
-
let { value: n, placeholder: r, name: i } = e, {
|
|
2813
|
-
return /* @__PURE__ */
|
|
2814
|
-
style:
|
|
2724
|
+
}), qe = ({ field: e, extra: t }) => {
|
|
2725
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = y();
|
|
2726
|
+
return /* @__PURE__ */ I(H, {
|
|
2727
|
+
style: Je.container,
|
|
2815
2728
|
children: [
|
|
2816
|
-
/* @__PURE__ */ F(
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
style: { color: u.error },
|
|
2820
|
-
children: "*"
|
|
2821
|
-
})]
|
|
2729
|
+
/* @__PURE__ */ F(a, {
|
|
2730
|
+
label: l,
|
|
2731
|
+
required: o.data.required
|
|
2822
2732
|
}),
|
|
2823
|
-
/* @__PURE__ */
|
|
2733
|
+
/* @__PURE__ */ F(de, {
|
|
2824
2734
|
style: [
|
|
2825
|
-
|
|
2735
|
+
Je.textarea,
|
|
2826
2736
|
{
|
|
2827
|
-
backgroundColor:
|
|
2828
|
-
borderColor:
|
|
2829
|
-
color:
|
|
2737
|
+
backgroundColor: d.input,
|
|
2738
|
+
borderColor: d.border,
|
|
2739
|
+
color: d.text
|
|
2830
2740
|
},
|
|
2831
|
-
|
|
2741
|
+
c && { borderColor: d.error }
|
|
2832
2742
|
],
|
|
2833
2743
|
value: n ?? "",
|
|
2834
|
-
onChangeText:
|
|
2744
|
+
onChangeText: s,
|
|
2835
2745
|
placeholder: r,
|
|
2836
|
-
placeholderTextColor:
|
|
2746
|
+
placeholderTextColor: d.textMuted,
|
|
2837
2747
|
multiline: !0,
|
|
2838
2748
|
numberOfLines: 4,
|
|
2839
2749
|
textAlignVertical: "top",
|
|
2840
2750
|
accessibilityLabel: i
|
|
2841
2751
|
}),
|
|
2842
|
-
|
|
2843
|
-
style: [
|
|
2844
|
-
children:
|
|
2752
|
+
c && /* @__PURE__ */ F(B, {
|
|
2753
|
+
style: [Je.error, { color: d.error }],
|
|
2754
|
+
children: c
|
|
2845
2755
|
}),
|
|
2846
|
-
|
|
2847
|
-
style: [
|
|
2848
|
-
children:
|
|
2756
|
+
u && !c && /* @__PURE__ */ F(B, {
|
|
2757
|
+
style: [Je.helperText, { color: d.textMuted }],
|
|
2758
|
+
children: u
|
|
2849
2759
|
})
|
|
2850
2760
|
]
|
|
2851
2761
|
});
|
|
2852
|
-
},
|
|
2762
|
+
}, Je = z.create({
|
|
2853
2763
|
container: { marginBottom: 16 },
|
|
2854
2764
|
error: {
|
|
2855
2765
|
fontSize: 12,
|
|
@@ -2859,11 +2769,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2859
2769
|
fontSize: 12,
|
|
2860
2770
|
marginTop: 4
|
|
2861
2771
|
},
|
|
2862
|
-
label: {
|
|
2863
|
-
fontSize: 14,
|
|
2864
|
-
fontWeight: "500",
|
|
2865
|
-
marginBottom: 8
|
|
2866
|
-
},
|
|
2867
2772
|
textarea: {
|
|
2868
2773
|
borderRadius: 6,
|
|
2869
2774
|
borderWidth: 1,
|
|
@@ -2872,45 +2777,42 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2872
2777
|
paddingHorizontal: 12,
|
|
2873
2778
|
paddingVertical: 8
|
|
2874
2779
|
}
|
|
2875
|
-
}),
|
|
2876
|
-
let { value: n, placeholder: r, name: i } = e, {
|
|
2877
|
-
return /* @__PURE__ */
|
|
2878
|
-
style:
|
|
2780
|
+
}), Ye = ({ field: e, extra: t }) => {
|
|
2781
|
+
let { value: n, placeholder: r, name: i } = e, { InputLabel: a, node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = y();
|
|
2782
|
+
return /* @__PURE__ */ I(H, {
|
|
2783
|
+
style: Xe.container,
|
|
2879
2784
|
children: [
|
|
2880
|
-
/* @__PURE__ */ F(
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
style: { color: u.error },
|
|
2884
|
-
children: "*"
|
|
2885
|
-
})]
|
|
2785
|
+
/* @__PURE__ */ F(a, {
|
|
2786
|
+
label: l,
|
|
2787
|
+
required: o.data.required
|
|
2886
2788
|
}),
|
|
2887
|
-
/* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ F(de, {
|
|
2888
2790
|
style: [
|
|
2889
|
-
|
|
2791
|
+
Xe.input,
|
|
2890
2792
|
{
|
|
2891
|
-
backgroundColor:
|
|
2892
|
-
borderColor:
|
|
2893
|
-
color:
|
|
2793
|
+
backgroundColor: d.input,
|
|
2794
|
+
borderColor: d.border,
|
|
2795
|
+
color: d.text
|
|
2894
2796
|
},
|
|
2895
|
-
|
|
2797
|
+
c && { borderColor: d.error }
|
|
2896
2798
|
],
|
|
2897
2799
|
value: n ?? "",
|
|
2898
|
-
onChangeText:
|
|
2800
|
+
onChangeText: s,
|
|
2899
2801
|
placeholder: r,
|
|
2900
|
-
placeholderTextColor:
|
|
2802
|
+
placeholderTextColor: d.textMuted,
|
|
2901
2803
|
accessibilityLabel: i
|
|
2902
2804
|
}),
|
|
2903
|
-
|
|
2904
|
-
style: [
|
|
2905
|
-
children:
|
|
2805
|
+
c && /* @__PURE__ */ F(B, {
|
|
2806
|
+
style: [Xe.error, { color: d.error }],
|
|
2807
|
+
children: c
|
|
2906
2808
|
}),
|
|
2907
|
-
|
|
2908
|
-
style: [
|
|
2909
|
-
children:
|
|
2809
|
+
u && !c && /* @__PURE__ */ F(B, {
|
|
2810
|
+
style: [Xe.helperText, { color: d.textMuted }],
|
|
2811
|
+
children: u
|
|
2910
2812
|
})
|
|
2911
2813
|
]
|
|
2912
2814
|
});
|
|
2913
|
-
},
|
|
2815
|
+
}, Xe = z.create({
|
|
2914
2816
|
container: { marginBottom: 16 },
|
|
2915
2817
|
error: {
|
|
2916
2818
|
fontSize: 12,
|
|
@@ -2926,106 +2828,98 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2926
2828
|
fontSize: 14,
|
|
2927
2829
|
paddingHorizontal: 12,
|
|
2928
2830
|
paddingVertical: 8
|
|
2929
|
-
},
|
|
2930
|
-
label: {
|
|
2931
|
-
fontSize: 14,
|
|
2932
|
-
fontWeight: "500",
|
|
2933
|
-
marginBottom: 8
|
|
2934
2831
|
}
|
|
2935
|
-
}),
|
|
2936
|
-
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] =
|
|
2937
|
-
|
|
2832
|
+
}), Ze = ({ field: e, extra: t }) => {
|
|
2833
|
+
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] = P(s || 0), [d, f] = P(c || 0), [p, m] = P(!1), { InputLabel: g, node: _, setValue: v, error: b, label: x, helperText: S } = t, { colors: C } = y(), w = h(), T = N(null), E = N(null), D = Array.from({ length: 24 }, (e, t) => t), O = Array.from({ length: 60 }, (e, t) => t), k = () => n || r || w("renderer.defaultInputs.selectTime"), A = ne(() => {
|
|
2834
|
+
v(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2938
2835
|
}, [
|
|
2939
2836
|
l,
|
|
2940
2837
|
d,
|
|
2941
|
-
|
|
2838
|
+
v
|
|
2942
2839
|
]);
|
|
2943
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ I(H, {
|
|
2944
2841
|
style: Q.container,
|
|
2945
2842
|
children: [
|
|
2946
|
-
/* @__PURE__ */ F(
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
style: { color: x.error },
|
|
2950
|
-
children: "*"
|
|
2951
|
-
})]
|
|
2843
|
+
/* @__PURE__ */ F(g, {
|
|
2844
|
+
label: x,
|
|
2845
|
+
required: _.data.required
|
|
2952
2846
|
}),
|
|
2953
|
-
/* @__PURE__ */
|
|
2847
|
+
/* @__PURE__ */ I(V, {
|
|
2954
2848
|
style: [
|
|
2955
2849
|
Q.trigger,
|
|
2956
2850
|
{
|
|
2957
|
-
backgroundColor:
|
|
2958
|
-
borderColor:
|
|
2851
|
+
backgroundColor: C.input,
|
|
2852
|
+
borderColor: C.border
|
|
2959
2853
|
},
|
|
2960
|
-
|
|
2854
|
+
b && { borderColor: C.error }
|
|
2961
2855
|
],
|
|
2962
2856
|
onPress: () => {
|
|
2963
2857
|
u(s || 0), f(c || 0), m(!0);
|
|
2964
2858
|
},
|
|
2965
2859
|
activeOpacity: .7,
|
|
2966
|
-
children: [/* @__PURE__ */
|
|
2860
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2967
2861
|
style: [
|
|
2968
2862
|
Q.triggerText,
|
|
2969
|
-
{ color:
|
|
2970
|
-
!n && { color:
|
|
2863
|
+
{ color: C.text },
|
|
2864
|
+
!n && { color: C.textMuted }
|
|
2971
2865
|
],
|
|
2972
2866
|
numberOfLines: 1,
|
|
2973
|
-
children:
|
|
2974
|
-
}), /* @__PURE__ */
|
|
2867
|
+
children: k()
|
|
2868
|
+
}), /* @__PURE__ */ F(B, {
|
|
2975
2869
|
style: Q.icon,
|
|
2976
2870
|
children: "🕐"
|
|
2977
2871
|
})]
|
|
2978
2872
|
}),
|
|
2979
|
-
/* @__PURE__ */
|
|
2873
|
+
/* @__PURE__ */ F(le, {
|
|
2980
2874
|
visible: p,
|
|
2981
2875
|
transparent: !0,
|
|
2982
2876
|
animationType: "fade",
|
|
2983
2877
|
onRequestClose: () => m(!1),
|
|
2984
|
-
children: /* @__PURE__ */
|
|
2878
|
+
children: /* @__PURE__ */ F(V, {
|
|
2985
2879
|
style: Q.modalOverlay,
|
|
2986
2880
|
activeOpacity: 1,
|
|
2987
2881
|
onPress: () => m(!1),
|
|
2988
|
-
children: /* @__PURE__ */
|
|
2989
|
-
style: [Q.modalContent, { backgroundColor:
|
|
2882
|
+
children: /* @__PURE__ */ I(V, {
|
|
2883
|
+
style: [Q.modalContent, { backgroundColor: C.card }],
|
|
2990
2884
|
activeOpacity: 1,
|
|
2991
2885
|
onPress: () => {},
|
|
2992
2886
|
children: [
|
|
2993
|
-
/* @__PURE__ */
|
|
2994
|
-
style: [Q.modalHeader, { borderBottomColor:
|
|
2995
|
-
children: [/* @__PURE__ */
|
|
2996
|
-
style: [Q.modalTitle, { color:
|
|
2997
|
-
children:
|
|
2998
|
-
}), /* @__PURE__ */
|
|
2887
|
+
/* @__PURE__ */ I(H, {
|
|
2888
|
+
style: [Q.modalHeader, { borderBottomColor: C.separator }],
|
|
2889
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2890
|
+
style: [Q.modalTitle, { color: C.text }],
|
|
2891
|
+
children: x || r || w("renderer.defaultInputs.selectTime")
|
|
2892
|
+
}), /* @__PURE__ */ F(V, {
|
|
2999
2893
|
onPress: () => m(!1),
|
|
3000
|
-
children: /* @__PURE__ */
|
|
3001
|
-
style: [Q.closeButton, { color:
|
|
2894
|
+
children: /* @__PURE__ */ F(B, {
|
|
2895
|
+
style: [Q.closeButton, { color: C.textMuted }],
|
|
3002
2896
|
children: "✕"
|
|
3003
2897
|
})
|
|
3004
2898
|
})]
|
|
3005
2899
|
}),
|
|
3006
|
-
/* @__PURE__ */
|
|
2900
|
+
/* @__PURE__ */ I(H, {
|
|
3007
2901
|
style: Q.pickerContainer,
|
|
3008
2902
|
children: [
|
|
3009
|
-
/* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ I(H, {
|
|
3010
2904
|
style: Q.pickerColumn,
|
|
3011
|
-
children: [/* @__PURE__ */
|
|
3012
|
-
style: [Q.pickerLabel, { color:
|
|
2905
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2906
|
+
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
3013
2907
|
children: "Hour"
|
|
3014
|
-
}), /* @__PURE__ */
|
|
3015
|
-
ref:
|
|
2908
|
+
}), /* @__PURE__ */ F(R, {
|
|
2909
|
+
ref: T,
|
|
3016
2910
|
style: Q.picker,
|
|
3017
2911
|
contentContainerStyle: Q.pickerContent,
|
|
3018
2912
|
showsVerticalScrollIndicator: !1,
|
|
3019
|
-
children:
|
|
3020
|
-
style: [Q.pickerItem, l === e && { backgroundColor:
|
|
2913
|
+
children: D.map((e) => /* @__PURE__ */ F(V, {
|
|
2914
|
+
style: [Q.pickerItem, l === e && { backgroundColor: C.primary }],
|
|
3021
2915
|
onPress: () => u(e),
|
|
3022
2916
|
activeOpacity: .7,
|
|
3023
|
-
children: /* @__PURE__ */
|
|
2917
|
+
children: /* @__PURE__ */ F(B, {
|
|
3024
2918
|
style: [
|
|
3025
2919
|
Q.pickerItemText,
|
|
3026
|
-
{ color:
|
|
2920
|
+
{ color: C.text },
|
|
3027
2921
|
l === e && {
|
|
3028
|
-
color:
|
|
2922
|
+
color: C.background,
|
|
3029
2923
|
fontWeight: "600"
|
|
3030
2924
|
}
|
|
3031
2925
|
],
|
|
@@ -3034,30 +2928,30 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3034
2928
|
}, e))
|
|
3035
2929
|
})]
|
|
3036
2930
|
}),
|
|
3037
|
-
/* @__PURE__ */
|
|
3038
|
-
style: [Q.pickerSeparator, { color:
|
|
2931
|
+
/* @__PURE__ */ F(B, {
|
|
2932
|
+
style: [Q.pickerSeparator, { color: C.text }],
|
|
3039
2933
|
children: ":"
|
|
3040
2934
|
}),
|
|
3041
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ I(H, {
|
|
3042
2936
|
style: Q.pickerColumn,
|
|
3043
|
-
children: [/* @__PURE__ */
|
|
3044
|
-
style: [Q.pickerLabel, { color:
|
|
2937
|
+
children: [/* @__PURE__ */ F(B, {
|
|
2938
|
+
style: [Q.pickerLabel, { color: C.textMuted }],
|
|
3045
2939
|
children: "Minute"
|
|
3046
|
-
}), /* @__PURE__ */
|
|
3047
|
-
ref:
|
|
2940
|
+
}), /* @__PURE__ */ F(R, {
|
|
2941
|
+
ref: E,
|
|
3048
2942
|
style: Q.picker,
|
|
3049
2943
|
contentContainerStyle: Q.pickerContent,
|
|
3050
2944
|
showsVerticalScrollIndicator: !1,
|
|
3051
|
-
children:
|
|
3052
|
-
style: [Q.pickerItem, d === e && { backgroundColor:
|
|
2945
|
+
children: O.map((e) => /* @__PURE__ */ F(V, {
|
|
2946
|
+
style: [Q.pickerItem, d === e && { backgroundColor: C.primary }],
|
|
3053
2947
|
onPress: () => f(e),
|
|
3054
2948
|
activeOpacity: .7,
|
|
3055
|
-
children: /* @__PURE__ */
|
|
2949
|
+
children: /* @__PURE__ */ F(B, {
|
|
3056
2950
|
style: [
|
|
3057
2951
|
Q.pickerItemText,
|
|
3058
|
-
{ color:
|
|
2952
|
+
{ color: C.text },
|
|
3059
2953
|
d === e && {
|
|
3060
|
-
color:
|
|
2954
|
+
color: C.background,
|
|
3061
2955
|
fontWeight: "600"
|
|
3062
2956
|
}
|
|
3063
2957
|
],
|
|
@@ -3068,12 +2962,12 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3068
2962
|
})
|
|
3069
2963
|
]
|
|
3070
2964
|
}),
|
|
3071
|
-
/* @__PURE__ */
|
|
3072
|
-
style: [Q.confirmButton, { backgroundColor:
|
|
3073
|
-
onPress:
|
|
2965
|
+
/* @__PURE__ */ F(V, {
|
|
2966
|
+
style: [Q.confirmButton, { backgroundColor: C.primary }],
|
|
2967
|
+
onPress: A,
|
|
3074
2968
|
activeOpacity: .7,
|
|
3075
|
-
children: /* @__PURE__ */
|
|
3076
|
-
style: [Q.confirmButtonText, { color:
|
|
2969
|
+
children: /* @__PURE__ */ F(B, {
|
|
2970
|
+
style: [Q.confirmButtonText, { color: C.background }],
|
|
3077
2971
|
children: "Confirm"
|
|
3078
2972
|
})
|
|
3079
2973
|
})
|
|
@@ -3081,13 +2975,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3081
2975
|
})
|
|
3082
2976
|
})
|
|
3083
2977
|
}),
|
|
3084
|
-
|
|
3085
|
-
style: [Q.error, { color:
|
|
3086
|
-
children: _
|
|
3087
|
-
}),
|
|
3088
|
-
b && !_ && /* @__PURE__ */ P(B, {
|
|
3089
|
-
style: [Q.helperText, { color: x.textMuted }],
|
|
2978
|
+
b && /* @__PURE__ */ F(B, {
|
|
2979
|
+
style: [Q.error, { color: C.error }],
|
|
3090
2980
|
children: b
|
|
2981
|
+
}),
|
|
2982
|
+
S && !b && /* @__PURE__ */ F(B, {
|
|
2983
|
+
style: [Q.helperText, { color: C.textMuted }],
|
|
2984
|
+
children: S
|
|
3091
2985
|
})
|
|
3092
2986
|
]
|
|
3093
2987
|
});
|
|
@@ -3116,11 +3010,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3116
3010
|
marginTop: 4
|
|
3117
3011
|
},
|
|
3118
3012
|
icon: { fontSize: 16 },
|
|
3119
|
-
label: {
|
|
3120
|
-
fontSize: 14,
|
|
3121
|
-
fontWeight: "500",
|
|
3122
|
-
marginBottom: 8
|
|
3123
|
-
},
|
|
3124
3013
|
modalContent: {
|
|
3125
3014
|
borderRadius: 12,
|
|
3126
3015
|
padding: 16,
|
|
@@ -3182,112 +3071,109 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3182
3071
|
flex: 1,
|
|
3183
3072
|
fontSize: 14
|
|
3184
3073
|
}
|
|
3185
|
-
}),
|
|
3186
|
-
let [n, r] =
|
|
3187
|
-
let e = `${String(
|
|
3188
|
-
i ? (
|
|
3074
|
+
}), Qe = ({ field: e, extra: t }) => {
|
|
3075
|
+
let [n, r] = P(!1), [i, a] = P(!0), { value: o } = e, { InputLabel: s, node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = y(), m = h(), g = Array.isArray(o) ? o : [], _ = 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), O = Number.isNaN(E) ? 0 : E, k = Number.isNaN(D) ? 0 : D, [A, j] = P(0), [ee, te] = P(0), M = Array.from({ length: 24 }, (e, t) => t), re = Array.from({ length: 60 }, (e, t) => t), N = () => _ && v ? `${_} - ${v}` : _ || m("renderer.defaultInputs.selectTimeRange"), ie = ne(() => {
|
|
3076
|
+
let e = `${String(A).padStart(2, "0")}:${String(ee).padStart(2, "0")}`;
|
|
3077
|
+
i ? (l([e, v]), a(!1), j(O || 0), te(k || 0)) : (l([_, e]), r(!1), a(!0));
|
|
3189
3078
|
}, [
|
|
3190
3079
|
i,
|
|
3080
|
+
A,
|
|
3191
3081
|
ee,
|
|
3192
|
-
te,
|
|
3193
|
-
g,
|
|
3194
3082
|
_,
|
|
3195
|
-
|
|
3083
|
+
v,
|
|
3196
3084
|
O,
|
|
3197
|
-
|
|
3085
|
+
k,
|
|
3086
|
+
l
|
|
3198
3087
|
]);
|
|
3199
|
-
return /* @__PURE__ */
|
|
3088
|
+
return /* @__PURE__ */ I(H, {
|
|
3200
3089
|
style: $.container,
|
|
3201
3090
|
children: [
|
|
3202
|
-
/* @__PURE__ */ F(
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
style: { color: f.error },
|
|
3206
|
-
children: "*"
|
|
3207
|
-
})]
|
|
3091
|
+
/* @__PURE__ */ F(s, {
|
|
3092
|
+
label: d,
|
|
3093
|
+
required: c.data.required
|
|
3208
3094
|
}),
|
|
3209
|
-
/* @__PURE__ */
|
|
3095
|
+
/* @__PURE__ */ I(V, {
|
|
3210
3096
|
style: [
|
|
3211
3097
|
$.trigger,
|
|
3212
3098
|
{
|
|
3213
|
-
backgroundColor:
|
|
3214
|
-
borderColor:
|
|
3099
|
+
backgroundColor: p.input,
|
|
3100
|
+
borderColor: p.border
|
|
3215
3101
|
},
|
|
3216
|
-
|
|
3102
|
+
u && { borderColor: p.error }
|
|
3217
3103
|
],
|
|
3218
3104
|
onPress: () => {
|
|
3219
|
-
|
|
3105
|
+
j(C || 0), te(w || 0), a(!0), r(!0);
|
|
3220
3106
|
},
|
|
3221
3107
|
activeOpacity: .7,
|
|
3222
|
-
children: [/* @__PURE__ */
|
|
3108
|
+
children: [/* @__PURE__ */ F(B, {
|
|
3223
3109
|
style: [
|
|
3224
3110
|
$.triggerText,
|
|
3225
|
-
{ color:
|
|
3226
|
-
!
|
|
3111
|
+
{ color: p.text },
|
|
3112
|
+
!_ && { color: p.textMuted }
|
|
3227
3113
|
],
|
|
3228
3114
|
numberOfLines: 1,
|
|
3229
|
-
children:
|
|
3230
|
-
}), /* @__PURE__ */
|
|
3115
|
+
children: N()
|
|
3116
|
+
}), /* @__PURE__ */ F(B, {
|
|
3231
3117
|
style: $.icon,
|
|
3232
3118
|
children: "🕐"
|
|
3233
3119
|
})]
|
|
3234
3120
|
}),
|
|
3235
|
-
/* @__PURE__ */
|
|
3121
|
+
/* @__PURE__ */ F(le, {
|
|
3236
3122
|
visible: n,
|
|
3237
3123
|
transparent: !0,
|
|
3238
3124
|
animationType: "fade",
|
|
3239
3125
|
onRequestClose: () => r(!1),
|
|
3240
|
-
children: /* @__PURE__ */
|
|
3126
|
+
children: /* @__PURE__ */ F(V, {
|
|
3241
3127
|
style: $.modalOverlay,
|
|
3242
3128
|
activeOpacity: 1,
|
|
3243
3129
|
onPress: () => r(!1),
|
|
3244
|
-
children: /* @__PURE__ */
|
|
3245
|
-
style: [$.modalContent, { backgroundColor:
|
|
3130
|
+
children: /* @__PURE__ */ I(V, {
|
|
3131
|
+
style: [$.modalContent, { backgroundColor: p.card }],
|
|
3246
3132
|
activeOpacity: 1,
|
|
3247
3133
|
onPress: () => {},
|
|
3248
3134
|
children: [
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3251
|
-
children: [/* @__PURE__ */
|
|
3252
|
-
style: [$.modalTitle, { color:
|
|
3253
|
-
children:
|
|
3254
|
-
}), /* @__PURE__ */
|
|
3135
|
+
/* @__PURE__ */ I(H, {
|
|
3136
|
+
style: [$.modalHeader, { borderBottomColor: p.separator }],
|
|
3137
|
+
children: [/* @__PURE__ */ F(B, {
|
|
3138
|
+
style: [$.modalTitle, { color: p.text }],
|
|
3139
|
+
children: d || m("renderer.defaultInputs.selectTimeRange")
|
|
3140
|
+
}), /* @__PURE__ */ F(V, {
|
|
3255
3141
|
onPress: () => r(!1),
|
|
3256
|
-
children: /* @__PURE__ */
|
|
3257
|
-
style: [$.closeButton, { color:
|
|
3142
|
+
children: /* @__PURE__ */ F(B, {
|
|
3143
|
+
style: [$.closeButton, { color: p.textMuted }],
|
|
3258
3144
|
children: "✕"
|
|
3259
3145
|
})
|
|
3260
3146
|
})]
|
|
3261
3147
|
}),
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3264
|
-
children: /* @__PURE__ */
|
|
3265
|
-
style: [$.rangeIndicatorText, { color:
|
|
3266
|
-
children:
|
|
3148
|
+
/* @__PURE__ */ F(H, {
|
|
3149
|
+
style: [$.rangeIndicator, { backgroundColor: p.primaryLight }],
|
|
3150
|
+
children: /* @__PURE__ */ F(B, {
|
|
3151
|
+
style: [$.rangeIndicatorText, { color: p.primary }],
|
|
3152
|
+
children: m(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3267
3153
|
})
|
|
3268
3154
|
}),
|
|
3269
|
-
/* @__PURE__ */
|
|
3155
|
+
/* @__PURE__ */ I(H, {
|
|
3270
3156
|
style: $.pickerContainer,
|
|
3271
3157
|
children: [
|
|
3272
|
-
/* @__PURE__ */
|
|
3158
|
+
/* @__PURE__ */ I(H, {
|
|
3273
3159
|
style: $.pickerColumn,
|
|
3274
|
-
children: [/* @__PURE__ */
|
|
3275
|
-
style: [$.pickerLabel, { color:
|
|
3160
|
+
children: [/* @__PURE__ */ F(B, {
|
|
3161
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3276
3162
|
children: "Hour"
|
|
3277
|
-
}), /* @__PURE__ */
|
|
3163
|
+
}), /* @__PURE__ */ F(R, {
|
|
3278
3164
|
style: $.picker,
|
|
3279
3165
|
contentContainerStyle: $.pickerContent,
|
|
3280
3166
|
showsVerticalScrollIndicator: !1,
|
|
3281
|
-
children:
|
|
3282
|
-
style: [$.pickerItem,
|
|
3283
|
-
onPress: () =>
|
|
3167
|
+
children: M.map((e) => /* @__PURE__ */ F(V, {
|
|
3168
|
+
style: [$.pickerItem, A === e && { backgroundColor: p.primary }],
|
|
3169
|
+
onPress: () => j(e),
|
|
3284
3170
|
activeOpacity: .7,
|
|
3285
|
-
children: /* @__PURE__ */
|
|
3171
|
+
children: /* @__PURE__ */ F(B, {
|
|
3286
3172
|
style: [
|
|
3287
3173
|
$.pickerItemText,
|
|
3288
|
-
{ color:
|
|
3289
|
-
|
|
3290
|
-
color:
|
|
3174
|
+
{ color: p.text },
|
|
3175
|
+
A === e && {
|
|
3176
|
+
color: p.background,
|
|
3291
3177
|
fontWeight: "600"
|
|
3292
3178
|
}
|
|
3293
3179
|
],
|
|
@@ -3296,29 +3182,29 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3296
3182
|
}, e))
|
|
3297
3183
|
})]
|
|
3298
3184
|
}),
|
|
3299
|
-
/* @__PURE__ */
|
|
3300
|
-
style: [$.pickerSeparator, { color:
|
|
3185
|
+
/* @__PURE__ */ F(B, {
|
|
3186
|
+
style: [$.pickerSeparator, { color: p.text }],
|
|
3301
3187
|
children: ":"
|
|
3302
3188
|
}),
|
|
3303
|
-
/* @__PURE__ */
|
|
3189
|
+
/* @__PURE__ */ I(H, {
|
|
3304
3190
|
style: $.pickerColumn,
|
|
3305
|
-
children: [/* @__PURE__ */
|
|
3306
|
-
style: [$.pickerLabel, { color:
|
|
3191
|
+
children: [/* @__PURE__ */ F(B, {
|
|
3192
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3307
3193
|
children: "Minute"
|
|
3308
|
-
}), /* @__PURE__ */
|
|
3194
|
+
}), /* @__PURE__ */ F(R, {
|
|
3309
3195
|
style: $.picker,
|
|
3310
3196
|
contentContainerStyle: $.pickerContent,
|
|
3311
3197
|
showsVerticalScrollIndicator: !1,
|
|
3312
|
-
children:
|
|
3313
|
-
style: [$.pickerItem,
|
|
3314
|
-
onPress: () =>
|
|
3198
|
+
children: re.map((e) => /* @__PURE__ */ F(V, {
|
|
3199
|
+
style: [$.pickerItem, ee === e && { backgroundColor: p.primary }],
|
|
3200
|
+
onPress: () => te(e),
|
|
3315
3201
|
activeOpacity: .7,
|
|
3316
|
-
children: /* @__PURE__ */
|
|
3202
|
+
children: /* @__PURE__ */ F(B, {
|
|
3317
3203
|
style: [
|
|
3318
3204
|
$.pickerItemText,
|
|
3319
|
-
{ color:
|
|
3320
|
-
|
|
3321
|
-
color:
|
|
3205
|
+
{ color: p.text },
|
|
3206
|
+
ee === e && {
|
|
3207
|
+
color: p.background,
|
|
3322
3208
|
fontWeight: "600"
|
|
3323
3209
|
}
|
|
3324
3210
|
],
|
|
@@ -3329,12 +3215,12 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3329
3215
|
})
|
|
3330
3216
|
]
|
|
3331
3217
|
}),
|
|
3332
|
-
/* @__PURE__ */
|
|
3333
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3334
|
-
onPress:
|
|
3218
|
+
/* @__PURE__ */ F(V, {
|
|
3219
|
+
style: [$.confirmButton, { backgroundColor: p.primary }],
|
|
3220
|
+
onPress: ie,
|
|
3335
3221
|
activeOpacity: .7,
|
|
3336
|
-
children: /* @__PURE__ */
|
|
3337
|
-
style: [$.confirmButtonText, { color:
|
|
3222
|
+
children: /* @__PURE__ */ F(B, {
|
|
3223
|
+
style: [$.confirmButtonText, { color: p.background }],
|
|
3338
3224
|
children: i ? "Next" : "Confirm"
|
|
3339
3225
|
})
|
|
3340
3226
|
})
|
|
@@ -3342,13 +3228,13 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3342
3228
|
})
|
|
3343
3229
|
})
|
|
3344
3230
|
}),
|
|
3345
|
-
|
|
3346
|
-
style: [$.error, { color:
|
|
3347
|
-
children:
|
|
3231
|
+
u && /* @__PURE__ */ F(B, {
|
|
3232
|
+
style: [$.error, { color: p.error }],
|
|
3233
|
+
children: u
|
|
3348
3234
|
}),
|
|
3349
|
-
|
|
3350
|
-
style: [$.helperText, { color:
|
|
3351
|
-
children:
|
|
3235
|
+
f && !u && /* @__PURE__ */ F(B, {
|
|
3236
|
+
style: [$.helperText, { color: p.textMuted }],
|
|
3237
|
+
children: f
|
|
3352
3238
|
})
|
|
3353
3239
|
]
|
|
3354
3240
|
});
|
|
@@ -3377,11 +3263,6 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3377
3263
|
marginTop: 4
|
|
3378
3264
|
},
|
|
3379
3265
|
icon: { fontSize: 16 },
|
|
3380
|
-
label: {
|
|
3381
|
-
fontSize: 14,
|
|
3382
|
-
fontWeight: "500",
|
|
3383
|
-
marginBottom: 8
|
|
3384
|
-
},
|
|
3385
3266
|
modalContent: {
|
|
3386
3267
|
borderRadius: 12,
|
|
3387
3268
|
padding: 16,
|
|
@@ -3453,54 +3334,54 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3453
3334
|
flex: 1,
|
|
3454
3335
|
fontSize: 14
|
|
3455
3336
|
}
|
|
3456
|
-
}),
|
|
3457
|
-
address:
|
|
3458
|
-
autocomplete:
|
|
3459
|
-
checkbox:
|
|
3460
|
-
date:
|
|
3461
|
-
daterange:
|
|
3462
|
-
file:
|
|
3463
|
-
hidden:
|
|
3464
|
-
http:
|
|
3465
|
-
number:
|
|
3466
|
-
password:
|
|
3467
|
-
radio:
|
|
3468
|
-
select:
|
|
3469
|
-
submit:
|
|
3470
|
-
switch:
|
|
3471
|
-
text:
|
|
3472
|
-
textarea:
|
|
3473
|
-
time:
|
|
3474
|
-
timerange:
|
|
3475
|
-
},
|
|
3337
|
+
}), $e = {
|
|
3338
|
+
address: ve,
|
|
3339
|
+
autocomplete: xe,
|
|
3340
|
+
checkbox: Se,
|
|
3341
|
+
date: Ce,
|
|
3342
|
+
daterange: we,
|
|
3343
|
+
file: Te,
|
|
3344
|
+
hidden: Ee,
|
|
3345
|
+
http: Le,
|
|
3346
|
+
number: Re,
|
|
3347
|
+
password: Be,
|
|
3348
|
+
radio: He,
|
|
3349
|
+
select: Ue,
|
|
3350
|
+
submit: We,
|
|
3351
|
+
switch: Ge,
|
|
3352
|
+
text: Ye,
|
|
3353
|
+
textarea: qe,
|
|
3354
|
+
time: Ze,
|
|
3355
|
+
timerange: Qe
|
|
3356
|
+
}, et = ({ step: e, label: t, children: n, canGoBack: r, isLastStep: a, canContinue: o, isSubmitting: s, onBack: c, onContinue: l }) => {
|
|
3476
3357
|
let { colors: u } = y(), d = h(), f = !o || s, p = e.nodes.find((e) => i(e) && e.data.type === "submit"), m = p && i(p) ? d(p.data.label) : void 0, g = a ? m || d("renderer.defaultSubmitButton.submit") : d("renderer.step.continue");
|
|
3477
|
-
return /* @__PURE__ */
|
|
3478
|
-
t ? /* @__PURE__ */
|
|
3479
|
-
style: [
|
|
3358
|
+
return /* @__PURE__ */ I(H, { children: [
|
|
3359
|
+
t ? /* @__PURE__ */ F(B, {
|
|
3360
|
+
style: [tt.label, { color: u.text }],
|
|
3480
3361
|
children: t
|
|
3481
3362
|
}) : null,
|
|
3482
|
-
/* @__PURE__ */
|
|
3483
|
-
style:
|
|
3363
|
+
/* @__PURE__ */ F(H, {
|
|
3364
|
+
style: tt.content,
|
|
3484
3365
|
children: n
|
|
3485
3366
|
}),
|
|
3486
|
-
/* @__PURE__ */
|
|
3487
|
-
style:
|
|
3488
|
-
children: [r ? /* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ I(H, {
|
|
3368
|
+
style: tt.actions,
|
|
3369
|
+
children: [r ? /* @__PURE__ */ F(V, {
|
|
3489
3370
|
style: [
|
|
3490
|
-
|
|
3371
|
+
tt.backButton,
|
|
3491
3372
|
{ borderColor: u.border },
|
|
3492
|
-
s &&
|
|
3373
|
+
s && tt.disabled
|
|
3493
3374
|
],
|
|
3494
3375
|
onPress: c,
|
|
3495
3376
|
disabled: s,
|
|
3496
3377
|
activeOpacity: .7,
|
|
3497
|
-
children: /* @__PURE__ */
|
|
3498
|
-
style: [
|
|
3378
|
+
children: /* @__PURE__ */ F(B, {
|
|
3379
|
+
style: [tt.backButtonText, { color: u.text }],
|
|
3499
3380
|
children: d("renderer.step.back")
|
|
3500
3381
|
})
|
|
3501
|
-
}) : /* @__PURE__ */
|
|
3382
|
+
}) : /* @__PURE__ */ F(H, {}), /* @__PURE__ */ F(V, {
|
|
3502
3383
|
style: [
|
|
3503
|
-
|
|
3384
|
+
tt.continueButton,
|
|
3504
3385
|
{ backgroundColor: u.primary },
|
|
3505
3386
|
f && {
|
|
3506
3387
|
backgroundColor: u.primaryDisabled,
|
|
@@ -3510,14 +3391,14 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3510
3391
|
onPress: l,
|
|
3511
3392
|
disabled: f,
|
|
3512
3393
|
activeOpacity: .7,
|
|
3513
|
-
children: s ? /* @__PURE__ */
|
|
3514
|
-
style: [
|
|
3394
|
+
children: s ? /* @__PURE__ */ F(ae, { color: u.primaryForeground }) : /* @__PURE__ */ F(B, {
|
|
3395
|
+
style: [tt.continueButtonText, { color: u.primaryForeground }],
|
|
3515
3396
|
children: g
|
|
3516
3397
|
})
|
|
3517
3398
|
})]
|
|
3518
3399
|
})
|
|
3519
3400
|
] });
|
|
3520
|
-
},
|
|
3401
|
+
}, tt = z.create({
|
|
3521
3402
|
actions: {
|
|
3522
3403
|
alignItems: "center",
|
|
3523
3404
|
flexDirection: "row",
|
|
@@ -3552,11 +3433,11 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3552
3433
|
fontWeight: "600",
|
|
3553
3434
|
marginBottom: 12
|
|
3554
3435
|
}
|
|
3555
|
-
}),
|
|
3436
|
+
}), nt = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3556
3437
|
let { colors: i } = y();
|
|
3557
|
-
return /* @__PURE__ */
|
|
3438
|
+
return /* @__PURE__ */ F(V, {
|
|
3558
3439
|
style: [
|
|
3559
|
-
|
|
3440
|
+
rt.button,
|
|
3560
3441
|
{ backgroundColor: i.primary },
|
|
3561
3442
|
(t || n) && {
|
|
3562
3443
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3566,12 +3447,12 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3566
3447
|
disabled: t || n,
|
|
3567
3448
|
onPress: r,
|
|
3568
3449
|
activeOpacity: .7,
|
|
3569
|
-
children: n ? /* @__PURE__ */
|
|
3570
|
-
style: [
|
|
3450
|
+
children: n ? /* @__PURE__ */ F(ae, { color: i.primaryForeground }) : /* @__PURE__ */ F(B, {
|
|
3451
|
+
style: [rt.buttonText, { color: i.primaryForeground }],
|
|
3571
3452
|
children: e
|
|
3572
3453
|
})
|
|
3573
3454
|
});
|
|
3574
|
-
},
|
|
3455
|
+
}, rt = z.create({
|
|
3575
3456
|
button: {
|
|
3576
3457
|
alignItems: "center",
|
|
3577
3458
|
borderRadius: 6,
|
|
@@ -3584,16 +3465,16 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3584
3465
|
fontSize: 16,
|
|
3585
3466
|
fontWeight: "600"
|
|
3586
3467
|
}
|
|
3587
|
-
}),
|
|
3468
|
+
}), it = ({ children: e }) => e, at = ({ node: e }) => {
|
|
3588
3469
|
let t = h(), { colors: n } = y(), r = t(e.data?.label);
|
|
3589
|
-
return /* @__PURE__ */
|
|
3590
|
-
style: [
|
|
3470
|
+
return /* @__PURE__ */ F(B, {
|
|
3471
|
+
style: [st.title, { color: n.text }],
|
|
3591
3472
|
children: r
|
|
3592
3473
|
});
|
|
3593
|
-
},
|
|
3474
|
+
}, ot = () => {
|
|
3594
3475
|
let { colors: e } = y();
|
|
3595
|
-
return /* @__PURE__ */
|
|
3596
|
-
},
|
|
3476
|
+
return /* @__PURE__ */ F(H, { style: [st.divider, { backgroundColor: e.separator }] });
|
|
3477
|
+
}, st = z.create({
|
|
3597
3478
|
divider: {
|
|
3598
3479
|
height: 1,
|
|
3599
3480
|
marginBottom: 16,
|
|
@@ -3604,63 +3485,63 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3604
3485
|
fontWeight: "700",
|
|
3605
3486
|
marginBottom: 16
|
|
3606
3487
|
}
|
|
3607
|
-
}),
|
|
3608
|
-
divider:
|
|
3609
|
-
title:
|
|
3610
|
-
},
|
|
3488
|
+
}), ct = {
|
|
3489
|
+
divider: ot,
|
|
3490
|
+
title: at
|
|
3491
|
+
}, lt = ({ node: e, children: t }) => {
|
|
3611
3492
|
let { image: n } = e.data;
|
|
3612
|
-
return /* @__PURE__ */
|
|
3493
|
+
return /* @__PURE__ */ I(H, { children: [n && /* @__PURE__ */ F(L, {
|
|
3613
3494
|
source: { uri: n },
|
|
3614
|
-
style:
|
|
3495
|
+
style: ut.image,
|
|
3615
3496
|
resizeMode: "cover"
|
|
3616
3497
|
}), t] });
|
|
3617
|
-
},
|
|
3498
|
+
}, ut = z.create({ image: {
|
|
3618
3499
|
borderRadius: 6,
|
|
3619
3500
|
height: 160,
|
|
3620
3501
|
marginBottom: 8,
|
|
3621
3502
|
width: "100%"
|
|
3622
|
-
} }),
|
|
3623
|
-
let { colors: t } = y(), n =
|
|
3624
|
-
return
|
|
3625
|
-
let e =
|
|
3503
|
+
} }), dt = ({ style: e }) => {
|
|
3504
|
+
let { colors: t } = y(), n = N(new se.Value(.5)).current;
|
|
3505
|
+
return M(() => {
|
|
3506
|
+
let e = se.loop(se.sequence([se.timing(n, {
|
|
3626
3507
|
duration: 600,
|
|
3627
3508
|
toValue: 1,
|
|
3628
3509
|
useNativeDriver: !0
|
|
3629
|
-
}),
|
|
3510
|
+
}), se.timing(n, {
|
|
3630
3511
|
duration: 600,
|
|
3631
3512
|
toValue: .5,
|
|
3632
3513
|
useNativeDriver: !0
|
|
3633
3514
|
})]));
|
|
3634
3515
|
return e.start(), () => e.stop();
|
|
3635
|
-
}, [n]), /* @__PURE__ */
|
|
3636
|
-
|
|
3516
|
+
}, [n]), /* @__PURE__ */ F(se.View, { style: [
|
|
3517
|
+
pt.bar,
|
|
3637
3518
|
{
|
|
3638
3519
|
backgroundColor: t.muted,
|
|
3639
3520
|
opacity: n
|
|
3640
3521
|
},
|
|
3641
3522
|
e
|
|
3642
3523
|
] });
|
|
3643
|
-
},
|
|
3524
|
+
}, ft = () => /* @__PURE__ */ I(H, {
|
|
3644
3525
|
accessibilityState: { busy: !0 },
|
|
3645
3526
|
children: [
|
|
3646
|
-
/* @__PURE__ */
|
|
3647
|
-
/* @__PURE__ */
|
|
3648
|
-
style:
|
|
3527
|
+
/* @__PURE__ */ F(dt, { style: pt.title }),
|
|
3528
|
+
/* @__PURE__ */ F(H, {
|
|
3529
|
+
style: pt.fields,
|
|
3649
3530
|
children: [
|
|
3650
3531
|
0,
|
|
3651
3532
|
1,
|
|
3652
3533
|
2
|
|
3653
|
-
].map((e) => /* @__PURE__ */
|
|
3654
|
-
style:
|
|
3655
|
-
children: [/* @__PURE__ */
|
|
3534
|
+
].map((e) => /* @__PURE__ */ I(H, {
|
|
3535
|
+
style: pt.field,
|
|
3536
|
+
children: [/* @__PURE__ */ F(dt, { style: pt.fieldLabel }), /* @__PURE__ */ F(dt, { style: pt.fieldInput })]
|
|
3656
3537
|
}, e))
|
|
3657
3538
|
}),
|
|
3658
|
-
/* @__PURE__ */
|
|
3659
|
-
style:
|
|
3660
|
-
children: /* @__PURE__ */
|
|
3539
|
+
/* @__PURE__ */ F(H, {
|
|
3540
|
+
style: pt.actions,
|
|
3541
|
+
children: /* @__PURE__ */ F(dt, { style: pt.button })
|
|
3661
3542
|
})
|
|
3662
3543
|
]
|
|
3663
|
-
}),
|
|
3544
|
+
}), pt = z.create({
|
|
3664
3545
|
actions: {
|
|
3665
3546
|
alignItems: "flex-end",
|
|
3666
3547
|
marginTop: 24
|
|
@@ -3685,8 +3566,8 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3685
3566
|
marginBottom: 24,
|
|
3686
3567
|
width: "33%"
|
|
3687
3568
|
}
|
|
3688
|
-
}),
|
|
3689
|
-
let { colors: b } = y(), { canContinueStep: x, canSubmit: S, clearSubmitMessage: C, config: w, currentStep: T, currentStepGroupNode: E, currentStepIndex: D, formErrors: O, formValues:
|
|
3569
|
+
}), mt = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: r, googleApiKey: i, headers: a, initialValues: s, isLoading: c = !1, isSubmitting: l = !1, language: u, onBack: d, onChange: f, onSubmit: p, showPoweredBy: m, style: h, theme: g, validate: _, validationMode: v }) => {
|
|
3570
|
+
let { colors: b } = y(), { canContinueStep: x, canSubmit: S, clearSubmitMessage: C, config: w, currentStep: T, currentStepGroupNode: E, currentStepIndex: D, formErrors: O, formValues: A, goToNextStep: j, goToPreviousStep: ee, handleSubmit: M, inputNodes: N, isFirstStep: P, isLastStep: ie, isSubmitting: ae, missingRequiredFields: oe, setFieldValue: se, steps: ce, submitMessage: L, t: le } = k({
|
|
3690
3571
|
baseUrl: e,
|
|
3691
3572
|
components: t,
|
|
3692
3573
|
flow: r,
|
|
@@ -3700,102 +3581,103 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3700
3581
|
theme: g,
|
|
3701
3582
|
validate: _,
|
|
3702
3583
|
validationMode: v
|
|
3703
|
-
}), z = l ||
|
|
3584
|
+
}), z = l || ae, { FormWrapper: ue, SubmitButtonWrapper: de, renderNode: V } = te({
|
|
3704
3585
|
config: w,
|
|
3705
3586
|
DefaultFormWrapper: fe,
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3587
|
+
DefaultInputLabel: me,
|
|
3588
|
+
DefaultInputWrapper: lt,
|
|
3589
|
+
DefaultSubmitButton: nt,
|
|
3590
|
+
DefaultSubmitButtonWrapper: it,
|
|
3591
|
+
defaultInputRenderers: $e,
|
|
3592
|
+
defaultUI: ct,
|
|
3711
3593
|
formErrors: O,
|
|
3712
|
-
formValues:
|
|
3713
|
-
inputNodes:
|
|
3594
|
+
formValues: A,
|
|
3595
|
+
inputNodes: N,
|
|
3714
3596
|
isSubmitting: z,
|
|
3715
|
-
missingRequiredFields:
|
|
3716
|
-
setFieldValue:
|
|
3717
|
-
}), pe = w.components.step ??
|
|
3718
|
-
if (
|
|
3719
|
-
|
|
3597
|
+
missingRequiredFields: oe,
|
|
3598
|
+
setFieldValue: se
|
|
3599
|
+
}), pe = w.components.step ?? et, he = w.components.loadingSkeleton ?? ft, ge = re(() => le(E?.data?.label), [le, E]), _e = ne(() => {
|
|
3600
|
+
if (ie) {
|
|
3601
|
+
M();
|
|
3720
3602
|
return;
|
|
3721
3603
|
}
|
|
3722
|
-
|
|
3604
|
+
j();
|
|
3723
3605
|
}, [
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
]),
|
|
3728
|
-
if (
|
|
3606
|
+
ie,
|
|
3607
|
+
M,
|
|
3608
|
+
j
|
|
3609
|
+
]), ve = ne(() => {
|
|
3610
|
+
if (P) {
|
|
3729
3611
|
d?.();
|
|
3730
3612
|
return;
|
|
3731
3613
|
}
|
|
3732
|
-
|
|
3614
|
+
ee();
|
|
3733
3615
|
}, [
|
|
3734
|
-
|
|
3616
|
+
P,
|
|
3735
3617
|
d,
|
|
3736
|
-
|
|
3737
|
-
]),
|
|
3738
|
-
return /* @__PURE__ */
|
|
3618
|
+
ee
|
|
3619
|
+
]), U = !P || !!d;
|
|
3620
|
+
return /* @__PURE__ */ F(R, {
|
|
3739
3621
|
nestedScrollEnabled: !0,
|
|
3740
3622
|
style: [
|
|
3741
|
-
|
|
3623
|
+
gt.container,
|
|
3742
3624
|
{ backgroundColor: b.background },
|
|
3743
3625
|
h
|
|
3744
3626
|
],
|
|
3745
3627
|
contentContainerStyle: n,
|
|
3746
|
-
children: c ? /* @__PURE__ */
|
|
3628
|
+
children: c ? /* @__PURE__ */ F(he, {}) : /* @__PURE__ */ I(o, {
|
|
3747
3629
|
value: {
|
|
3748
3630
|
baseUrl: w.baseUrl,
|
|
3749
3631
|
flow: r,
|
|
3750
3632
|
formErrors: O,
|
|
3751
|
-
formValues:
|
|
3633
|
+
formValues: A,
|
|
3752
3634
|
googleApiKey: w.googleApiKey,
|
|
3753
3635
|
headers: w.headers,
|
|
3754
|
-
inputNodes:
|
|
3636
|
+
inputNodes: N,
|
|
3755
3637
|
language: w.language,
|
|
3756
|
-
setFieldValue:
|
|
3638
|
+
setFieldValue: se
|
|
3757
3639
|
},
|
|
3758
|
-
children: [/* @__PURE__ */
|
|
3759
|
-
onSubmit:
|
|
3760
|
-
children: [T && /* @__PURE__ */
|
|
3761
|
-
missingFields:
|
|
3762
|
-
children: /* @__PURE__ */
|
|
3640
|
+
children: [/* @__PURE__ */ I(ue, {
|
|
3641
|
+
onSubmit: M,
|
|
3642
|
+
children: [T && /* @__PURE__ */ F(de, {
|
|
3643
|
+
missingFields: oe,
|
|
3644
|
+
children: /* @__PURE__ */ F(pe, {
|
|
3763
3645
|
step: T,
|
|
3764
3646
|
groupNode: E,
|
|
3765
3647
|
stepIndex: D,
|
|
3766
3648
|
totalSteps: ce.length,
|
|
3767
|
-
isFirstStep:
|
|
3768
|
-
isLastStep:
|
|
3769
|
-
canContinue: x && (!
|
|
3770
|
-
canGoBack:
|
|
3649
|
+
isFirstStep: P,
|
|
3650
|
+
isLastStep: ie,
|
|
3651
|
+
canContinue: x && (!ie || S),
|
|
3652
|
+
canGoBack: U,
|
|
3771
3653
|
isSubmitting: z,
|
|
3772
|
-
onBack:
|
|
3773
|
-
onContinue:
|
|
3774
|
-
label:
|
|
3654
|
+
onBack: ve,
|
|
3655
|
+
onContinue: _e,
|
|
3656
|
+
label: ge,
|
|
3775
3657
|
children: T.nodes.map((e) => V(e))
|
|
3776
3658
|
})
|
|
3777
|
-
}), w.showPoweredBy && /* @__PURE__ */
|
|
3778
|
-
style: [
|
|
3659
|
+
}), w.showPoweredBy && /* @__PURE__ */ F(B, {
|
|
3660
|
+
style: [gt.poweredBy, { color: b.textMuted }],
|
|
3779
3661
|
children: "Powered by Treege"
|
|
3780
3662
|
})]
|
|
3781
|
-
}), L && /* @__PURE__ */
|
|
3782
|
-
style: [
|
|
3783
|
-
children: [/* @__PURE__ */
|
|
3784
|
-
style: [
|
|
3663
|
+
}), L && /* @__PURE__ */ I(H, {
|
|
3664
|
+
style: [gt.message, { backgroundColor: L.type === "success" ? b.successBg : b.errorBg }],
|
|
3665
|
+
children: [/* @__PURE__ */ F(B, {
|
|
3666
|
+
style: [gt.messageText, { color: L.type === "success" ? b.success : b.error }],
|
|
3785
3667
|
children: L.message
|
|
3786
|
-
}), /* @__PURE__ */
|
|
3787
|
-
style: [
|
|
3668
|
+
}), /* @__PURE__ */ F(B, {
|
|
3669
|
+
style: [gt.messageClose, { color: L.type === "success" ? b.success : b.error }],
|
|
3788
3670
|
onPress: C,
|
|
3789
3671
|
children: le("common.close")
|
|
3790
3672
|
})]
|
|
3791
3673
|
})]
|
|
3792
3674
|
})
|
|
3793
3675
|
});
|
|
3794
|
-
},
|
|
3676
|
+
}, ht = (e) => /* @__PURE__ */ F(C, {
|
|
3795
3677
|
theme: e.theme,
|
|
3796
3678
|
storageKey: "treege-renderer-theme",
|
|
3797
|
-
children: /* @__PURE__ */
|
|
3798
|
-
}),
|
|
3679
|
+
children: /* @__PURE__ */ F(mt, { ...e })
|
|
3680
|
+
}), gt = z.create({
|
|
3799
3681
|
container: { flex: 1 },
|
|
3800
3682
|
message: {
|
|
3801
3683
|
borderRadius: 6,
|
|
@@ -3818,4 +3700,4 @@ var fe = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3818
3700
|
}
|
|
3819
3701
|
});
|
|
3820
3702
|
//#endregion
|
|
3821
|
-
export {
|
|
3703
|
+
export { ve as DefaultAddressInput, xe as DefaultAutocompleteInput, Se as DefaultCheckboxInput, Ce as DefaultDateInput, we as DefaultDateRangeInput, ot as DefaultDividerUI, Te as DefaultFileInput, Ee as DefaultHiddenInput, Le as DefaultHttpInput, me as DefaultInputLabel, Re as DefaultNumberInput, Be as DefaultPasswordInput, He as DefaultRadioInput, Ue as DefaultSelectInput, Ge as DefaultSwitchInput, Ye as DefaultTextInput, qe as DefaultTextareaInput, Ze as DefaultTimeInput, Qe as DefaultTimeRangeInput, at as DefaultTitleUI, ht as TreegeRenderer, E as TreegeRendererProvider, x as applyReferenceTransformation, m as buildInitialFormValues, l as calculateReferenceFieldUpdates, b as checkFormFieldHasValue, S as convertFormValuesToNamedFormat, $e as defaultInputRenderers, ct as defaultUI, A as evaluateCondition, ee as evaluateConditions, v as fileToSerializable, p as filesToSerializable, j as findStartNode, D as getFlowRenderState, t as getTranslatedText, d as isFieldEmpty, T as isStartNode, _ as resolveNodeDefaultValue, je as sanitize, Ne as sanitizeHttpResponse, f as serializableToFile, k as useTreegeRenderer, O as useTreegeRendererConfig };
|