treege 3.0.0-beta.27 → 3.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{node-gfy3ym4p.js → ThemeContext-BBEqRK_Q.js} +267 -178
- package/dist/{TreegeEditor-PuRxHufZ.js → TreegeEditor-Bi7GcSKl.js} +35 -35
- package/dist/{TreegeRenderer-COBf5Nh3.js → TreegeRenderer-DbE0m_4e.js} +69 -69
- package/dist/editor.js +2 -2
- package/dist/main.js +53 -54
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +2 -3
- package/dist/renderer-native.js +1152 -1298
- package/dist/renderer.js +33 -34
- package/dist/separator-oCo7kxCK.js +364 -0
- package/dist/shared/constants/colors.d.ts +45 -0
- package/dist/shared/context/ThemeContext.d.ts +2 -0
- package/dist/shared/context/ThemeContext.native.d.ts +22 -0
- package/dist/shared/hooks/useThemeColors.d.ts +37 -0
- package/dist/{useRenderNode-B9cpomOv.js → useRenderNode-BACcrUML.js} +1 -1
- package/package.json +1 -1
- package/dist/ThemeContext-Cc71SvqK.js +0 -410
package/dist/renderer-native.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { q as
|
|
2
|
-
import { T as
|
|
3
|
-
import { j as e } from "./
|
|
4
|
-
import { g as
|
|
5
|
-
import { StyleSheet as
|
|
6
|
-
import { useState as
|
|
7
|
-
const
|
|
1
|
+
import { q as se, r as Ve, k as Ye, t as Ge, a as Ue, v as Je, w as Ke } from "./useRenderNode-BACcrUML.js";
|
|
2
|
+
import { T as Vt, l as Nt, n as $t, j as Et, e as qt, b as _t, f as Yt, c as Gt, d as Ut, g as Jt, h as Kt, i as Qt, m as Xt, s as Zt, u as er } from "./useRenderNode-BACcrUML.js";
|
|
3
|
+
import { j as e, u as q, T as Qe } from "./ThemeContext-BBEqRK_Q.js";
|
|
4
|
+
import { g as rr } from "./ThemeContext-BBEqRK_Q.js";
|
|
5
|
+
import { StyleSheet as _, View as x, Text as t, TouchableOpacity as h, Modal as ae, TextInput as me, ActivityIndicator as he, FlatList as fe, Alert as Xe, ScrollView as be, Switch as Ze } from "react-native";
|
|
6
|
+
import { useState as R, useCallback as ye, useEffect as ge, useMemo as xe, useRef as ie } from "react";
|
|
7
|
+
const et = ({ children: r }) => /* @__PURE__ */ e.jsx(x, { style: tt.container, children: r }), tt = _.create({
|
|
8
8
|
container: {
|
|
9
9
|
padding: 16
|
|
10
10
|
}
|
|
11
|
-
}),
|
|
12
|
-
const n =
|
|
13
|
-
return /* @__PURE__ */ e.jsxs(
|
|
14
|
-
|
|
15
|
-
/* @__PURE__ */ e.jsx(
|
|
11
|
+
}), rt = ({ children: r, node: s }) => {
|
|
12
|
+
const i = se(), { colors: n } = q(), c = i(s.data.label);
|
|
13
|
+
return /* @__PURE__ */ e.jsxs(x, { style: De.container, children: [
|
|
14
|
+
c && /* @__PURE__ */ e.jsx(t, { style: [De.label, { color: n.text }], children: c }),
|
|
15
|
+
/* @__PURE__ */ e.jsx(x, { style: De.content, children: r })
|
|
16
16
|
] });
|
|
17
|
-
},
|
|
17
|
+
}, De = _.create({
|
|
18
18
|
container: {
|
|
19
19
|
marginBottom: 16
|
|
20
20
|
},
|
|
@@ -22,137 +22,143 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
22
22
|
gap: 8
|
|
23
23
|
},
|
|
24
24
|
label: {
|
|
25
|
-
color: "#111827",
|
|
26
25
|
fontSize: 16,
|
|
27
26
|
fontWeight: "600",
|
|
28
27
|
marginBottom: 12
|
|
29
28
|
}
|
|
30
|
-
}),
|
|
29
|
+
}), ot = async (r, s) => {
|
|
31
30
|
if (!r || r.trim().length < 3)
|
|
32
31
|
return [];
|
|
33
32
|
try {
|
|
34
|
-
const
|
|
33
|
+
const i = await fetch(
|
|
35
34
|
`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(r)}&format=jsonv2&addressdetails=1&limit=5`,
|
|
36
35
|
{
|
|
37
36
|
headers: {
|
|
38
37
|
Accept: "application/json",
|
|
39
38
|
"User-Agent": "Treege Renderer",
|
|
40
|
-
...
|
|
39
|
+
...s && { "Accept-Language": s }
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
|
-
return
|
|
45
|
-
label:
|
|
46
|
-
value:
|
|
43
|
+
return i.ok ? (await i.json()).map((c) => ({
|
|
44
|
+
label: c.display_name,
|
|
45
|
+
value: c.display_name
|
|
47
46
|
})) : [];
|
|
48
|
-
} catch (
|
|
49
|
-
return console.error("Nominatim fetch error:",
|
|
47
|
+
} catch (i) {
|
|
48
|
+
return console.error("Nominatim fetch error:", i), [];
|
|
50
49
|
}
|
|
51
|
-
},
|
|
50
|
+
}, nt = async (r, s) => {
|
|
52
51
|
if (!r || r.trim().length < 3)
|
|
53
52
|
return [];
|
|
54
53
|
try {
|
|
55
|
-
const
|
|
56
|
-
`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${
|
|
54
|
+
const i = await fetch(
|
|
55
|
+
`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${s}`
|
|
57
56
|
);
|
|
58
|
-
if (!
|
|
59
|
-
return console.warn("Google Places API request failed:",
|
|
60
|
-
const n = await
|
|
61
|
-
return n.status !== "OK" && n.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", n.status), []) : (n.predictions || []).map((
|
|
62
|
-
label:
|
|
63
|
-
value:
|
|
57
|
+
if (!i.ok)
|
|
58
|
+
return console.warn("Google Places API request failed:", i.status), [];
|
|
59
|
+
const n = await i.json();
|
|
60
|
+
return n.status !== "OK" && n.status !== "ZERO_RESULTS" ? (console.warn("Google Places API status:", n.status), []) : (n.predictions || []).map((c) => ({
|
|
61
|
+
label: c.description,
|
|
62
|
+
value: c.description
|
|
64
63
|
}));
|
|
65
|
-
} catch (
|
|
66
|
-
return console.error("Google Places fetch error:",
|
|
64
|
+
} catch (i) {
|
|
65
|
+
return console.error("Google Places fetch error:", i), [];
|
|
67
66
|
}
|
|
68
|
-
},
|
|
67
|
+
}, st = ({
|
|
69
68
|
node: r,
|
|
70
|
-
value:
|
|
71
|
-
setValue:
|
|
69
|
+
value: s,
|
|
70
|
+
setValue: i,
|
|
72
71
|
error: n,
|
|
73
|
-
label:
|
|
74
|
-
placeholder:
|
|
75
|
-
helperText:
|
|
76
|
-
id:
|
|
77
|
-
name:
|
|
72
|
+
label: c,
|
|
73
|
+
placeholder: S,
|
|
74
|
+
helperText: y,
|
|
75
|
+
id: p,
|
|
76
|
+
name: l
|
|
78
77
|
}) => {
|
|
79
|
-
const [
|
|
80
|
-
(
|
|
81
|
-
|
|
78
|
+
const [g, a] = R(""), [o, d] = R([]), [m, C] = R(!1), [v, w] = R(!1), { language: f, googleApiKey: b } = Ve(), z = se(), { colors: j } = q(), P = ye(
|
|
79
|
+
(D) => {
|
|
80
|
+
i(D.value), a(""), C(!1), d([]);
|
|
82
81
|
},
|
|
83
|
-
[
|
|
84
|
-
),
|
|
85
|
-
|
|
82
|
+
[i]
|
|
83
|
+
), u = () => {
|
|
84
|
+
C(!1);
|
|
86
85
|
};
|
|
87
|
-
return
|
|
88
|
-
if (!
|
|
89
|
-
|
|
86
|
+
return ge(() => {
|
|
87
|
+
if (!g || g.trim().length < 3) {
|
|
88
|
+
d([]), w(!1);
|
|
90
89
|
return;
|
|
91
90
|
}
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
const
|
|
95
|
-
|
|
91
|
+
w(!0);
|
|
92
|
+
const D = setTimeout(async () => {
|
|
93
|
+
const N = b ? await nt(g, b) : await ot(g, f);
|
|
94
|
+
d(N), w(!1);
|
|
96
95
|
}, 300);
|
|
97
96
|
return () => {
|
|
98
|
-
clearTimeout(
|
|
97
|
+
clearTimeout(D), w(!1);
|
|
99
98
|
};
|
|
100
|
-
}, [
|
|
101
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
102
|
-
|
|
103
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
99
|
+
}, [g, f, b]), /* @__PURE__ */ e.jsxs(x, { style: L.container, children: [
|
|
100
|
+
/* @__PURE__ */ e.jsxs(t, { style: [L.label, { color: j.textSecondary }], children: [
|
|
101
|
+
c || r.data.name,
|
|
102
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: j.error }, children: "*" })
|
|
104
103
|
] }),
|
|
105
|
-
/* @__PURE__ */ e.jsxs(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
/* @__PURE__ */ e.jsxs(
|
|
105
|
+
h,
|
|
106
|
+
{
|
|
107
|
+
style: [L.trigger, { backgroundColor: j.input, borderColor: j.border }, n && { borderColor: j.error }],
|
|
108
|
+
onPress: () => C(!0),
|
|
109
|
+
activeOpacity: 0.7,
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ e.jsx(t, { style: [L.triggerText, { color: j.text }, !s && { color: j.textMuted }], numberOfLines: 1, children: s || S || z("renderer.defaultAddressInput.enterAddress") }),
|
|
112
|
+
/* @__PURE__ */ e.jsx(t, { style: L.icon, children: "📍" })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ e.jsx(ae, { visible: m, transparent: !0, animationType: "fade", onRequestClose: u, children: /* @__PURE__ */ e.jsx(h, { style: L.modalOverlay, activeOpacity: 1, onPress: u, children: /* @__PURE__ */ e.jsxs(h, { style: [L.modalContent, { backgroundColor: j.card }], activeOpacity: 1, onPress: () => {
|
|
110
117
|
}, children: [
|
|
111
|
-
/* @__PURE__ */ e.jsxs(
|
|
112
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
113
|
-
/* @__PURE__ */ e.jsx(h, { onPress:
|
|
118
|
+
/* @__PURE__ */ e.jsxs(x, { style: [L.modalHeader, { borderBottomColor: j.separator }], children: [
|
|
119
|
+
/* @__PURE__ */ e.jsx(t, { style: [L.modalTitle, { color: j.text }], children: c || r.data.name }),
|
|
120
|
+
/* @__PURE__ */ e.jsx(h, { onPress: u, children: /* @__PURE__ */ e.jsx(t, { style: [L.closeButton, { color: j.textMuted }], children: "✕" }) })
|
|
114
121
|
] }),
|
|
115
|
-
/* @__PURE__ */ e.jsxs(
|
|
122
|
+
/* @__PURE__ */ e.jsxs(x, { style: L.searchContainer, children: [
|
|
116
123
|
/* @__PURE__ */ e.jsx(
|
|
117
|
-
|
|
124
|
+
me,
|
|
118
125
|
{
|
|
119
|
-
style:
|
|
120
|
-
placeholder:
|
|
121
|
-
placeholderTextColor:
|
|
122
|
-
value:
|
|
123
|
-
onChangeText:
|
|
126
|
+
style: [L.searchInput, { backgroundColor: j.muted, borderColor: j.border, color: j.text }],
|
|
127
|
+
placeholder: S || z("renderer.defaultAddressInput.enterAddress"),
|
|
128
|
+
placeholderTextColor: j.textMuted,
|
|
129
|
+
value: g,
|
|
130
|
+
onChangeText: a,
|
|
124
131
|
autoFocus: !0,
|
|
125
132
|
autoCapitalize: "none",
|
|
126
133
|
autoCorrect: !1
|
|
127
134
|
}
|
|
128
135
|
),
|
|
129
|
-
|
|
136
|
+
v && /* @__PURE__ */ e.jsx(he, { size: "small", color: j.primary, style: L.searchLoader })
|
|
130
137
|
] }),
|
|
131
|
-
|
|
132
|
-
/* @__PURE__ */ e.jsx(
|
|
133
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
138
|
+
v ? /* @__PURE__ */ e.jsxs(x, { style: L.loadingContainer, children: [
|
|
139
|
+
/* @__PURE__ */ e.jsx(he, { size: "small", color: j.primary }),
|
|
140
|
+
/* @__PURE__ */ e.jsx(t, { style: [L.loadingText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.searching") })
|
|
134
141
|
] }) : /* @__PURE__ */ e.jsx(
|
|
135
|
-
|
|
142
|
+
fe,
|
|
136
143
|
{
|
|
137
|
-
data:
|
|
138
|
-
keyExtractor: (
|
|
139
|
-
style:
|
|
140
|
-
contentContainerStyle:
|
|
144
|
+
data: o,
|
|
145
|
+
keyExtractor: (D, N) => N.toString(),
|
|
146
|
+
style: L.suggestionsList,
|
|
147
|
+
contentContainerStyle: L.suggestionsListContent,
|
|
141
148
|
keyboardShouldPersistTaps: "handled",
|
|
142
|
-
ListEmptyComponent:
|
|
143
|
-
renderItem: ({ item:
|
|
144
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
145
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
149
|
+
ListEmptyComponent: g.length >= 3 ? /* @__PURE__ */ e.jsx(x, { style: L.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [L.emptyText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.noAddressesFound") }) }) : /* @__PURE__ */ e.jsx(x, { style: L.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [L.emptyText, { color: j.textMuted }], children: z("renderer.defaultAddressInput.typeMinChars") }) }),
|
|
150
|
+
renderItem: ({ item: D }) => /* @__PURE__ */ e.jsxs(h, { style: L.suggestionItem, onPress: () => P(D), activeOpacity: 0.7, children: [
|
|
151
|
+
/* @__PURE__ */ e.jsx(t, { style: L.suggestionIcon, children: "📍" }),
|
|
152
|
+
/* @__PURE__ */ e.jsx(t, { style: [L.suggestionText, { color: j.text }], numberOfLines: 2, children: D.label })
|
|
146
153
|
] })
|
|
147
154
|
}
|
|
148
155
|
)
|
|
149
156
|
] }) }) }),
|
|
150
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
151
|
-
|
|
157
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [L.error, { color: j.error }], children: n }),
|
|
158
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [L.helperText, { color: j.textMuted }], children: y })
|
|
152
159
|
] });
|
|
153
|
-
},
|
|
160
|
+
}, L = _.create({
|
|
154
161
|
closeButton: {
|
|
155
|
-
color: "#6B7280",
|
|
156
162
|
fontSize: 24,
|
|
157
163
|
fontWeight: "300"
|
|
158
164
|
},
|
|
@@ -164,16 +170,13 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
164
170
|
paddingVertical: 24
|
|
165
171
|
},
|
|
166
172
|
emptyText: {
|
|
167
|
-
color: "#9CA3AF",
|
|
168
173
|
fontSize: 14
|
|
169
174
|
},
|
|
170
175
|
error: {
|
|
171
|
-
color: "#EF4444",
|
|
172
176
|
fontSize: 12,
|
|
173
177
|
marginTop: 4
|
|
174
178
|
},
|
|
175
179
|
helperText: {
|
|
176
|
-
color: "#6B7280",
|
|
177
180
|
fontSize: 12,
|
|
178
181
|
marginTop: 4
|
|
179
182
|
},
|
|
@@ -181,7 +184,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
181
184
|
fontSize: 16
|
|
182
185
|
},
|
|
183
186
|
label: {
|
|
184
|
-
color: "#374151",
|
|
185
187
|
fontSize: 14,
|
|
186
188
|
fontWeight: "500",
|
|
187
189
|
marginBottom: 8
|
|
@@ -193,12 +195,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
193
195
|
paddingVertical: 24
|
|
194
196
|
},
|
|
195
197
|
loadingText: {
|
|
196
|
-
color: "#6B7280",
|
|
197
198
|
fontSize: 14,
|
|
198
199
|
marginLeft: 8
|
|
199
200
|
},
|
|
200
201
|
modalContent: {
|
|
201
|
-
backgroundColor: "#FFFFFF",
|
|
202
202
|
borderRadius: 12,
|
|
203
203
|
maxHeight: "80%",
|
|
204
204
|
padding: 16,
|
|
@@ -206,7 +206,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
206
206
|
},
|
|
207
207
|
modalHeader: {
|
|
208
208
|
alignItems: "center",
|
|
209
|
-
borderBottomColor: "#E5E7EB",
|
|
210
209
|
borderBottomWidth: 1,
|
|
211
210
|
flexDirection: "row",
|
|
212
211
|
justifyContent: "space-between",
|
|
@@ -220,23 +219,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
220
219
|
justifyContent: "center"
|
|
221
220
|
},
|
|
222
221
|
modalTitle: {
|
|
223
|
-
color: "#111827",
|
|
224
222
|
fontSize: 18,
|
|
225
223
|
fontWeight: "600"
|
|
226
224
|
},
|
|
227
|
-
required: {
|
|
228
|
-
color: "#EF4444"
|
|
229
|
-
},
|
|
230
225
|
searchContainer: {
|
|
231
226
|
marginBottom: 12,
|
|
232
227
|
position: "relative"
|
|
233
228
|
},
|
|
234
229
|
searchInput: {
|
|
235
|
-
backgroundColor: "#F9FAFB",
|
|
236
|
-
borderColor: "#D1D5DB",
|
|
237
230
|
borderRadius: 6,
|
|
238
231
|
borderWidth: 1,
|
|
239
|
-
color: "#374151",
|
|
240
232
|
fontSize: 14,
|
|
241
233
|
paddingHorizontal: 12,
|
|
242
234
|
paddingRight: 40,
|
|
@@ -267,14 +259,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
267
259
|
flexGrow: 0
|
|
268
260
|
},
|
|
269
261
|
suggestionText: {
|
|
270
|
-
color: "#374151",
|
|
271
262
|
flex: 1,
|
|
272
263
|
fontSize: 14
|
|
273
264
|
},
|
|
274
265
|
trigger: {
|
|
275
266
|
alignItems: "center",
|
|
276
|
-
backgroundColor: "#FFFFFF",
|
|
277
|
-
borderColor: "#D1D5DB",
|
|
278
267
|
borderRadius: 6,
|
|
279
268
|
borderWidth: 1,
|
|
280
269
|
flexDirection: "row",
|
|
@@ -282,76 +271,77 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
282
271
|
paddingHorizontal: 12,
|
|
283
272
|
paddingVertical: 10
|
|
284
273
|
},
|
|
285
|
-
triggerError: {
|
|
286
|
-
borderColor: "#EF4444"
|
|
287
|
-
},
|
|
288
|
-
triggerPlaceholder: {
|
|
289
|
-
color: "#9CA3AF"
|
|
290
|
-
},
|
|
291
274
|
triggerText: {
|
|
292
|
-
color: "#374151",
|
|
293
275
|
flex: 1,
|
|
294
276
|
fontSize: 14
|
|
295
277
|
}
|
|
296
|
-
}),
|
|
297
|
-
const [
|
|
298
|
-
if (!
|
|
299
|
-
return
|
|
300
|
-
const
|
|
301
|
-
return
|
|
302
|
-
}, [
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
}, b = () =>
|
|
307
|
-
return /* @__PURE__ */ e.jsxs(
|
|
308
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
309
|
-
|
|
310
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
278
|
+
}), lt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
|
|
279
|
+
const [p, l] = R(!1), [g, a] = R(""), o = se(), { colors: d } = q(), m = r.data.options || [], C = m.find((z) => z.value === s), v = xe(() => {
|
|
280
|
+
if (!g.trim())
|
|
281
|
+
return m;
|
|
282
|
+
const z = g.toLowerCase();
|
|
283
|
+
return m.filter((j) => o(j.label).toLowerCase().includes(z) || j.value.toLowerCase().includes(z));
|
|
284
|
+
}, [m, g, o]), w = (z) => {
|
|
285
|
+
i(z === s ? "" : z), l(!1), a("");
|
|
286
|
+
}, f = () => {
|
|
287
|
+
l(!1), a("");
|
|
288
|
+
}, b = () => s && C ? o(C.label) : S || o("renderer.defaultAutocompleteInput.selectOption");
|
|
289
|
+
return /* @__PURE__ */ e.jsxs(x, { style: E.container, children: [
|
|
290
|
+
/* @__PURE__ */ e.jsxs(t, { style: [E.label, { color: d.textSecondary }], children: [
|
|
291
|
+
c || r.data.name,
|
|
292
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: d.error }, children: "*" })
|
|
311
293
|
] }),
|
|
312
|
-
/* @__PURE__ */ e.jsxs(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
294
|
+
/* @__PURE__ */ e.jsxs(
|
|
295
|
+
h,
|
|
296
|
+
{
|
|
297
|
+
style: [E.trigger, { backgroundColor: d.input, borderColor: d.border }, n && { borderColor: d.error }],
|
|
298
|
+
onPress: () => l(!0),
|
|
299
|
+
activeOpacity: 0.7,
|
|
300
|
+
children: [
|
|
301
|
+
/* @__PURE__ */ e.jsx(t, { style: [E.triggerText, { color: d.text }, !s && { color: d.textMuted }], numberOfLines: 1, children: b() }),
|
|
302
|
+
/* @__PURE__ */ e.jsx(t, { style: [E.arrow, { color: d.textMuted }], children: "▼" })
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
/* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: f, children: /* @__PURE__ */ e.jsx(h, { style: E.modalOverlay, activeOpacity: 1, onPress: f, children: /* @__PURE__ */ e.jsxs(h, { style: [E.modalContent, { backgroundColor: d.card }], activeOpacity: 1, onPress: () => {
|
|
317
307
|
}, children: [
|
|
318
|
-
/* @__PURE__ */ e.jsxs(
|
|
319
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
320
|
-
/* @__PURE__ */ e.jsx(h, { onPress:
|
|
308
|
+
/* @__PURE__ */ e.jsxs(x, { style: [E.modalHeader, { borderBottomColor: d.separator }], children: [
|
|
309
|
+
/* @__PURE__ */ e.jsx(t, { style: [E.modalTitle, { color: d.text }], children: c || r.data.name }),
|
|
310
|
+
/* @__PURE__ */ e.jsx(h, { onPress: f, children: /* @__PURE__ */ e.jsx(t, { style: [E.closeButton, { color: d.textMuted }], children: "✕" }) })
|
|
321
311
|
] }),
|
|
322
|
-
/* @__PURE__ */ e.jsx(
|
|
323
|
-
|
|
312
|
+
/* @__PURE__ */ e.jsx(x, { style: E.searchContainer, children: /* @__PURE__ */ e.jsx(
|
|
313
|
+
me,
|
|
324
314
|
{
|
|
325
|
-
style:
|
|
326
|
-
placeholder:
|
|
327
|
-
placeholderTextColor:
|
|
328
|
-
value:
|
|
329
|
-
onChangeText:
|
|
315
|
+
style: [E.searchInput, { backgroundColor: d.muted, borderColor: d.border, color: d.text }],
|
|
316
|
+
placeholder: S || o("renderer.defaultAutocompleteInput.search"),
|
|
317
|
+
placeholderTextColor: d.textMuted,
|
|
318
|
+
value: g,
|
|
319
|
+
onChangeText: a,
|
|
330
320
|
autoFocus: !0,
|
|
331
321
|
autoCapitalize: "none",
|
|
332
322
|
autoCorrect: !1
|
|
333
323
|
}
|
|
334
324
|
) }),
|
|
335
325
|
/* @__PURE__ */ e.jsx(
|
|
336
|
-
|
|
326
|
+
fe,
|
|
337
327
|
{
|
|
338
|
-
data:
|
|
339
|
-
keyExtractor: (
|
|
340
|
-
style:
|
|
341
|
-
contentContainerStyle:
|
|
342
|
-
ListEmptyComponent: /* @__PURE__ */ e.jsx(
|
|
343
|
-
renderItem: ({ item:
|
|
344
|
-
const
|
|
328
|
+
data: v,
|
|
329
|
+
keyExtractor: (z) => z.value,
|
|
330
|
+
style: E.optionsList,
|
|
331
|
+
contentContainerStyle: E.optionsListContent,
|
|
332
|
+
ListEmptyComponent: /* @__PURE__ */ e.jsx(x, { style: E.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [E.emptyText, { color: d.textMuted }], children: o("renderer.defaultAutocompleteInput.noResults") }) }),
|
|
333
|
+
renderItem: ({ item: z }) => {
|
|
334
|
+
const j = z.value === s;
|
|
345
335
|
return /* @__PURE__ */ e.jsxs(
|
|
346
336
|
h,
|
|
347
337
|
{
|
|
348
|
-
style: [
|
|
349
|
-
onPress: () =>
|
|
350
|
-
disabled:
|
|
338
|
+
style: [E.option, j && { backgroundColor: d.primaryLight }],
|
|
339
|
+
onPress: () => w(z.value),
|
|
340
|
+
disabled: z.disabled,
|
|
351
341
|
activeOpacity: 0.7,
|
|
352
342
|
children: [
|
|
353
|
-
/* @__PURE__ */ e.jsx(t, { style: [
|
|
354
|
-
|
|
343
|
+
/* @__PURE__ */ e.jsx(t, { style: [E.optionText, { color: d.text }, z.disabled && { color: d.textMuted }], children: o(z.label) }),
|
|
344
|
+
j && /* @__PURE__ */ e.jsx(t, { style: [E.checkmark, { color: d.primary }], children: "✓" })
|
|
355
345
|
]
|
|
356
346
|
}
|
|
357
347
|
);
|
|
@@ -359,21 +349,18 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
359
349
|
}
|
|
360
350
|
)
|
|
361
351
|
] }) }) }),
|
|
362
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
363
|
-
|
|
352
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [E.error, { color: d.error }], children: n }),
|
|
353
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [E.helperText, { color: d.textMuted }], children: y })
|
|
364
354
|
] });
|
|
365
|
-
},
|
|
355
|
+
}, E = _.create({
|
|
366
356
|
arrow: {
|
|
367
|
-
color: "#6B7280",
|
|
368
357
|
fontSize: 12
|
|
369
358
|
},
|
|
370
359
|
checkmark: {
|
|
371
|
-
color: "#3B82F6",
|
|
372
360
|
fontSize: 18,
|
|
373
361
|
fontWeight: "700"
|
|
374
362
|
},
|
|
375
363
|
closeButton: {
|
|
376
|
-
color: "#6B7280",
|
|
377
364
|
fontSize: 24,
|
|
378
365
|
fontWeight: "300"
|
|
379
366
|
},
|
|
@@ -385,27 +372,22 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
385
372
|
paddingVertical: 24
|
|
386
373
|
},
|
|
387
374
|
emptyText: {
|
|
388
|
-
color: "#9CA3AF",
|
|
389
375
|
fontSize: 14
|
|
390
376
|
},
|
|
391
377
|
error: {
|
|
392
|
-
color: "#EF4444",
|
|
393
378
|
fontSize: 12,
|
|
394
379
|
marginTop: 4
|
|
395
380
|
},
|
|
396
381
|
helperText: {
|
|
397
|
-
color: "#6B7280",
|
|
398
382
|
fontSize: 12,
|
|
399
383
|
marginTop: 4
|
|
400
384
|
},
|
|
401
385
|
label: {
|
|
402
|
-
color: "#374151",
|
|
403
386
|
fontSize: 14,
|
|
404
387
|
fontWeight: "500",
|
|
405
388
|
marginBottom: 8
|
|
406
389
|
},
|
|
407
390
|
modalContent: {
|
|
408
|
-
backgroundColor: "#FFFFFF",
|
|
409
391
|
borderRadius: 12,
|
|
410
392
|
maxHeight: "80%",
|
|
411
393
|
padding: 16,
|
|
@@ -413,7 +395,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
413
395
|
},
|
|
414
396
|
modalHeader: {
|
|
415
397
|
alignItems: "center",
|
|
416
|
-
borderBottomColor: "#E5E7EB",
|
|
417
398
|
borderBottomWidth: 1,
|
|
418
399
|
flexDirection: "row",
|
|
419
400
|
justifyContent: "space-between",
|
|
@@ -427,7 +408,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
427
408
|
justifyContent: "center"
|
|
428
409
|
},
|
|
429
410
|
modalTitle: {
|
|
430
|
-
color: "#111827",
|
|
431
411
|
fontSize: 18,
|
|
432
412
|
fontWeight: "600"
|
|
433
413
|
},
|
|
@@ -439,9 +419,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
439
419
|
paddingHorizontal: 12,
|
|
440
420
|
paddingVertical: 12
|
|
441
421
|
},
|
|
442
|
-
optionSelected: {
|
|
443
|
-
backgroundColor: "#EFF6FF"
|
|
444
|
-
},
|
|
445
422
|
optionsList: {
|
|
446
423
|
flexGrow: 0,
|
|
447
424
|
flexShrink: 1
|
|
@@ -450,33 +427,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
450
427
|
flexGrow: 0
|
|
451
428
|
},
|
|
452
429
|
optionText: {
|
|
453
|
-
color: "#374151",
|
|
454
430
|
flex: 1,
|
|
455
431
|
fontSize: 14
|
|
456
432
|
},
|
|
457
|
-
optionTextDisabled: {
|
|
458
|
-
color: "#9CA3AF"
|
|
459
|
-
},
|
|
460
|
-
required: {
|
|
461
|
-
color: "#EF4444"
|
|
462
|
-
},
|
|
463
433
|
searchContainer: {
|
|
464
434
|
marginBottom: 12
|
|
465
435
|
},
|
|
466
436
|
searchInput: {
|
|
467
|
-
backgroundColor: "#F9FAFB",
|
|
468
|
-
borderColor: "#D1D5DB",
|
|
469
437
|
borderRadius: 6,
|
|
470
438
|
borderWidth: 1,
|
|
471
|
-
color: "#374151",
|
|
472
439
|
fontSize: 14,
|
|
473
440
|
paddingHorizontal: 12,
|
|
474
441
|
paddingVertical: 10
|
|
475
442
|
},
|
|
476
443
|
trigger: {
|
|
477
444
|
alignItems: "center",
|
|
478
|
-
backgroundColor: "#FFFFFF",
|
|
479
|
-
borderColor: "#D1D5DB",
|
|
480
445
|
borderRadius: 6,
|
|
481
446
|
borderWidth: 1,
|
|
482
447
|
flexDirection: "row",
|
|
@@ -484,74 +449,85 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
484
449
|
paddingHorizontal: 12,
|
|
485
450
|
paddingVertical: 10
|
|
486
451
|
},
|
|
487
|
-
triggerError: {
|
|
488
|
-
borderColor: "#EF4444"
|
|
489
|
-
},
|
|
490
|
-
triggerPlaceholder: {
|
|
491
|
-
color: "#9CA3AF"
|
|
492
|
-
},
|
|
493
452
|
triggerText: {
|
|
494
|
-
color: "#374151",
|
|
495
453
|
flex: 1,
|
|
496
454
|
fontSize: 14
|
|
497
455
|
}
|
|
498
|
-
}),
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
501
|
-
const
|
|
502
|
-
|
|
456
|
+
}), it = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
457
|
+
const y = se(), { colors: p } = q(), l = r.data.options || [], g = l.length > 0, a = Array.isArray(s) ? s : [], o = typeof s == "boolean" ? s : !1, d = (C) => {
|
|
458
|
+
if (g) {
|
|
459
|
+
const v = a.includes(C) ? a.filter((w) => w !== C) : [...a, C];
|
|
460
|
+
i(v);
|
|
503
461
|
} else
|
|
504
|
-
|
|
505
|
-
},
|
|
506
|
-
return /* @__PURE__ */ e.jsxs(
|
|
507
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
508
|
-
|
|
509
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
462
|
+
i(!o);
|
|
463
|
+
}, m = (C) => g ? a.includes(C) : o;
|
|
464
|
+
return /* @__PURE__ */ e.jsxs(x, { style: ne.container, children: [
|
|
465
|
+
/* @__PURE__ */ e.jsxs(t, { style: [ne.label, { color: p.textSecondary }], children: [
|
|
466
|
+
c || r.data.name,
|
|
467
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: p.error }, children: "*" })
|
|
510
468
|
] }),
|
|
511
|
-
|
|
469
|
+
l.length > 0 ? l.map((C) => /* @__PURE__ */ e.jsxs(
|
|
512
470
|
h,
|
|
513
471
|
{
|
|
514
|
-
style:
|
|
515
|
-
onPress: () =>
|
|
516
|
-
disabled:
|
|
472
|
+
style: ne.option,
|
|
473
|
+
onPress: () => d(C.value),
|
|
474
|
+
disabled: C.disabled,
|
|
517
475
|
activeOpacity: 0.7,
|
|
518
476
|
accessible: !0,
|
|
519
477
|
accessibilityRole: "checkbox",
|
|
520
|
-
accessibilityState: { checked:
|
|
521
|
-
accessibilityLabel:
|
|
478
|
+
accessibilityState: { checked: m(C.value), disabled: C.disabled },
|
|
479
|
+
accessibilityLabel: y(C.label) || C.value,
|
|
522
480
|
children: [
|
|
523
|
-
/* @__PURE__ */ e.jsx(
|
|
524
|
-
|
|
481
|
+
/* @__PURE__ */ e.jsx(
|
|
482
|
+
x,
|
|
483
|
+
{
|
|
484
|
+
style: [
|
|
485
|
+
ne.checkbox,
|
|
486
|
+
{ backgroundColor: p.input, borderColor: p.border },
|
|
487
|
+
m(C.value) && { backgroundColor: p.primary, borderColor: p.primary }
|
|
488
|
+
],
|
|
489
|
+
children: m(C.value) && /* @__PURE__ */ e.jsx(t, { style: ne.checkmark, children: "✓" })
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
/* @__PURE__ */ e.jsx(t, { style: [ne.optionLabel, { color: p.textSecondary }, C.disabled && { color: p.textMuted }], children: y(C.label) || C.value })
|
|
525
493
|
]
|
|
526
494
|
},
|
|
527
|
-
|
|
495
|
+
C.value
|
|
528
496
|
)) : (
|
|
529
497
|
// Single checkbox without options
|
|
530
498
|
/* @__PURE__ */ e.jsxs(
|
|
531
499
|
h,
|
|
532
500
|
{
|
|
533
|
-
style:
|
|
534
|
-
onPress: () =>
|
|
501
|
+
style: ne.option,
|
|
502
|
+
onPress: () => d(""),
|
|
535
503
|
activeOpacity: 0.7,
|
|
536
504
|
accessible: !0,
|
|
537
505
|
accessibilityRole: "checkbox",
|
|
538
|
-
accessibilityState: { checked:
|
|
539
|
-
accessibilityLabel:
|
|
506
|
+
accessibilityState: { checked: o },
|
|
507
|
+
accessibilityLabel: c || r.data.name,
|
|
540
508
|
children: [
|
|
541
|
-
/* @__PURE__ */ e.jsx(
|
|
542
|
-
|
|
509
|
+
/* @__PURE__ */ e.jsx(
|
|
510
|
+
x,
|
|
511
|
+
{
|
|
512
|
+
style: [
|
|
513
|
+
ne.checkbox,
|
|
514
|
+
{ backgroundColor: p.input, borderColor: p.border },
|
|
515
|
+
o && { backgroundColor: p.primary, borderColor: p.primary }
|
|
516
|
+
],
|
|
517
|
+
children: o && /* @__PURE__ */ e.jsx(t, { style: ne.checkmark, children: "✓" })
|
|
518
|
+
}
|
|
519
|
+
),
|
|
520
|
+
/* @__PURE__ */ e.jsx(t, { style: [ne.optionLabel, { color: p.textSecondary }], children: c || r.data.name })
|
|
543
521
|
]
|
|
544
522
|
}
|
|
545
523
|
)
|
|
546
524
|
),
|
|
547
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
548
|
-
|
|
525
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [ne.error, { color: p.error }], children: n }),
|
|
526
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [ne.helperText, { color: p.textMuted }], children: S })
|
|
549
527
|
] });
|
|
550
|
-
},
|
|
528
|
+
}, ne = _.create({
|
|
551
529
|
checkbox: {
|
|
552
530
|
alignItems: "center",
|
|
553
|
-
backgroundColor: "#FFFFFF",
|
|
554
|
-
borderColor: "#D1D5DB",
|
|
555
531
|
borderRadius: 4,
|
|
556
532
|
borderWidth: 2,
|
|
557
533
|
height: 20,
|
|
@@ -559,10 +535,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
559
535
|
marginRight: 12,
|
|
560
536
|
width: 20
|
|
561
537
|
},
|
|
562
|
-
checkboxChecked: {
|
|
563
|
-
backgroundColor: "#3B82F6",
|
|
564
|
-
borderColor: "#3B82F6"
|
|
565
|
-
},
|
|
566
538
|
checkmark: {
|
|
567
539
|
color: "#FFFFFF",
|
|
568
540
|
fontSize: 14,
|
|
@@ -572,17 +544,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
572
544
|
marginBottom: 16
|
|
573
545
|
},
|
|
574
546
|
error: {
|
|
575
|
-
color: "#EF4444",
|
|
576
547
|
fontSize: 12,
|
|
577
548
|
marginTop: 4
|
|
578
549
|
},
|
|
579
550
|
helperText: {
|
|
580
|
-
color: "#6B7280",
|
|
581
551
|
fontSize: 12,
|
|
582
552
|
marginTop: 4
|
|
583
553
|
},
|
|
584
554
|
label: {
|
|
585
|
-
color: "#374151",
|
|
586
555
|
fontSize: 14,
|
|
587
556
|
fontWeight: "500",
|
|
588
557
|
marginBottom: 8
|
|
@@ -593,21 +562,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
593
562
|
marginBottom: 8
|
|
594
563
|
},
|
|
595
564
|
optionLabel: {
|
|
596
|
-
color: "#374151",
|
|
597
565
|
flex: 1,
|
|
598
566
|
fontSize: 14
|
|
599
|
-
},
|
|
600
|
-
optionLabelDisabled: {
|
|
601
|
-
color: "#9CA3AF"
|
|
602
|
-
},
|
|
603
|
-
required: {
|
|
604
|
-
color: "#EF4444"
|
|
605
567
|
}
|
|
606
|
-
}),
|
|
607
|
-
const [
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
}, [
|
|
568
|
+
}), at = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
|
|
569
|
+
const [p, l] = R(!1), g = se(), { colors: a } = q(), o = s ? new Date(s) : void 0, { year: d, month: m, today: C } = xe(() => {
|
|
570
|
+
const T = o || /* @__PURE__ */ new Date(), A = T.getFullYear(), Z = T.getMonth(), Q = /* @__PURE__ */ new Date();
|
|
571
|
+
return Q.setHours(0, 0, 0, 0), { month: Z, today: Q, year: A };
|
|
572
|
+
}, [o]), [v, w] = R(d), [f, b] = R(m), z = [
|
|
611
573
|
"January",
|
|
612
574
|
"February",
|
|
613
575
|
"March",
|
|
@@ -620,96 +582,105 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
620
582
|
"October",
|
|
621
583
|
"November",
|
|
622
584
|
"December"
|
|
623
|
-
],
|
|
624
|
-
const
|
|
625
|
-
for (let
|
|
626
|
-
|
|
627
|
-
date: new Date(
|
|
628
|
-
day:
|
|
585
|
+
], j = xe(() => {
|
|
586
|
+
const T = new Date(v, f, 1).getDay(), A = new Date(v, f + 1, 0).getDate(), Z = new Date(v, f, 0).getDate(), Q = [];
|
|
587
|
+
for (let B = T - 1; B >= 0; B--)
|
|
588
|
+
Q.push({
|
|
589
|
+
date: new Date(v, f - 1, Z - B),
|
|
590
|
+
day: Z - B,
|
|
629
591
|
isCurrentMonth: !1
|
|
630
592
|
});
|
|
631
|
-
for (let
|
|
632
|
-
|
|
633
|
-
date: new Date(
|
|
634
|
-
day:
|
|
593
|
+
for (let B = 1; B <= A; B++)
|
|
594
|
+
Q.push({
|
|
595
|
+
date: new Date(v, f, B),
|
|
596
|
+
day: B,
|
|
635
597
|
isCurrentMonth: !0
|
|
636
598
|
});
|
|
637
|
-
const
|
|
638
|
-
for (let
|
|
639
|
-
|
|
640
|
-
date: new Date(
|
|
641
|
-
day:
|
|
599
|
+
const I = 42 - Q.length;
|
|
600
|
+
for (let B = 1; B <= I; B++)
|
|
601
|
+
Q.push({
|
|
602
|
+
date: new Date(v, f + 1, B),
|
|
603
|
+
day: B,
|
|
642
604
|
isCurrentMonth: !1
|
|
643
605
|
});
|
|
644
|
-
return
|
|
645
|
-
}, [
|
|
646
|
-
(
|
|
647
|
-
r.data.disablePast &&
|
|
606
|
+
return Q;
|
|
607
|
+
}, [v, f]), P = ye(
|
|
608
|
+
(T) => {
|
|
609
|
+
r.data.disablePast && T < C || (i(T.toISOString()), l(!1));
|
|
648
610
|
},
|
|
649
|
-
[r.data.disablePast,
|
|
650
|
-
),
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
|
|
654
|
-
},
|
|
655
|
-
return /* @__PURE__ */ e.jsxs(
|
|
656
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
657
|
-
|
|
658
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
611
|
+
[r.data.disablePast, C, i]
|
|
612
|
+
), u = () => {
|
|
613
|
+
f === 0 ? (b(11), w(v - 1)) : b(f - 1);
|
|
614
|
+
}, D = () => {
|
|
615
|
+
f === 11 ? (b(0), w(v + 1)) : b(f + 1);
|
|
616
|
+
}, N = () => o ? o.toLocaleDateString() : S || g("renderer.defaultInputs.selectDate"), K = (T) => r.data.disablePast ? T < C : !1, te = (T) => o ? T.getDate() === o.getDate() && T.getMonth() === o.getMonth() && T.getFullYear() === o.getFullYear() : !1;
|
|
617
|
+
return /* @__PURE__ */ e.jsxs(x, { style: F.container, children: [
|
|
618
|
+
/* @__PURE__ */ e.jsxs(t, { style: [F.label, { color: a.textSecondary }], children: [
|
|
619
|
+
c || r.data.name,
|
|
620
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: a.error }, children: "*" })
|
|
659
621
|
] }),
|
|
660
|
-
/* @__PURE__ */ e.jsxs(
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
622
|
+
/* @__PURE__ */ e.jsxs(
|
|
623
|
+
h,
|
|
624
|
+
{
|
|
625
|
+
style: [F.trigger, { backgroundColor: a.input, borderColor: a.border }, n && { borderColor: a.error }],
|
|
626
|
+
onPress: () => l(!0),
|
|
627
|
+
activeOpacity: 0.7,
|
|
628
|
+
children: [
|
|
629
|
+
/* @__PURE__ */ e.jsx(t, { style: [F.triggerText, { color: a.text }, !s && { color: a.textMuted }], numberOfLines: 1, children: N() }),
|
|
630
|
+
/* @__PURE__ */ e.jsx(t, { style: F.icon, children: "📅" })
|
|
631
|
+
]
|
|
632
|
+
}
|
|
633
|
+
),
|
|
634
|
+
/* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: F.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [F.modalContent, { backgroundColor: a.card }], activeOpacity: 1, onPress: () => {
|
|
665
635
|
}, children: [
|
|
666
|
-
/* @__PURE__ */ e.jsxs(
|
|
667
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
668
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
636
|
+
/* @__PURE__ */ e.jsxs(x, { style: [F.modalHeader, { borderBottomColor: a.separator }], children: [
|
|
637
|
+
/* @__PURE__ */ e.jsx(t, { style: [F.modalTitle, { color: a.text }], children: c || r.data.name }),
|
|
638
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [F.closeButton, { color: a.textMuted }], children: "✕" }) })
|
|
669
639
|
] }),
|
|
670
|
-
/* @__PURE__ */ e.jsxs(
|
|
671
|
-
/* @__PURE__ */ e.jsx(h, { onPress:
|
|
672
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
673
|
-
|
|
640
|
+
/* @__PURE__ */ e.jsxs(x, { style: F.calendarHeader, children: [
|
|
641
|
+
/* @__PURE__ */ e.jsx(h, { onPress: u, style: F.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [F.navButtonText, { color: a.primary }], children: "‹" }) }),
|
|
642
|
+
/* @__PURE__ */ e.jsxs(t, { style: [F.monthYear, { color: a.text }], children: [
|
|
643
|
+
z[f],
|
|
674
644
|
" ",
|
|
675
|
-
|
|
645
|
+
v
|
|
676
646
|
] }),
|
|
677
|
-
/* @__PURE__ */ e.jsx(h, { onPress:
|
|
647
|
+
/* @__PURE__ */ e.jsx(h, { onPress: D, style: F.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [F.navButtonText, { color: a.primary }], children: "›" }) })
|
|
678
648
|
] }),
|
|
679
|
-
/* @__PURE__ */ e.jsx(
|
|
649
|
+
/* @__PURE__ */ e.jsx(x, { style: F.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((T) => /* @__PURE__ */ e.jsx(t, { style: [F.weekDay, { color: a.textMuted }], children: T }, T)) }),
|
|
680
650
|
/* @__PURE__ */ e.jsx(
|
|
681
|
-
|
|
651
|
+
fe,
|
|
682
652
|
{
|
|
683
|
-
data:
|
|
684
|
-
keyExtractor: (
|
|
653
|
+
data: j,
|
|
654
|
+
keyExtractor: (T, A) => `${T.date.getTime()}-${A}`,
|
|
685
655
|
numColumns: 7,
|
|
686
656
|
scrollEnabled: !1,
|
|
687
|
-
style:
|
|
688
|
-
contentContainerStyle:
|
|
689
|
-
renderItem: ({ item:
|
|
690
|
-
const
|
|
657
|
+
style: F.calendar,
|
|
658
|
+
contentContainerStyle: F.calendarContent,
|
|
659
|
+
renderItem: ({ item: T }) => {
|
|
660
|
+
const A = K(T.date), Z = te(T.date);
|
|
691
661
|
return /* @__PURE__ */ e.jsx(
|
|
692
662
|
h,
|
|
693
663
|
{
|
|
694
664
|
style: [
|
|
695
|
-
|
|
696
|
-
!
|
|
697
|
-
|
|
698
|
-
|
|
665
|
+
F.dayCell,
|
|
666
|
+
!T.isCurrentMonth && F.dayCellOtherMonth,
|
|
667
|
+
Z && { backgroundColor: a.primary, borderRadius: 20 },
|
|
668
|
+
A && F.dayCellDisabled
|
|
699
669
|
],
|
|
700
|
-
onPress: () =>
|
|
701
|
-
disabled:
|
|
670
|
+
onPress: () => P(T.date),
|
|
671
|
+
disabled: A,
|
|
702
672
|
activeOpacity: 0.7,
|
|
703
673
|
children: /* @__PURE__ */ e.jsx(
|
|
704
674
|
t,
|
|
705
675
|
{
|
|
706
676
|
style: [
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
677
|
+
F.dayText,
|
|
678
|
+
{ color: a.text },
|
|
679
|
+
!T.isCurrentMonth && { color: a.textMuted },
|
|
680
|
+
Z && { color: a.background, fontWeight: "600" },
|
|
681
|
+
A && { color: a.textMuted }
|
|
711
682
|
],
|
|
712
|
-
children:
|
|
683
|
+
children: T.day
|
|
713
684
|
}
|
|
714
685
|
)
|
|
715
686
|
}
|
|
@@ -718,10 +689,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
718
689
|
}
|
|
719
690
|
)
|
|
720
691
|
] }) }) }),
|
|
721
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
722
|
-
|
|
692
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [F.error, { color: a.error }], children: n }),
|
|
693
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [F.helperText, { color: a.textMuted }], children: y })
|
|
723
694
|
] });
|
|
724
|
-
},
|
|
695
|
+
}, F = _.create({
|
|
725
696
|
calendar: {
|
|
726
697
|
flexGrow: 0,
|
|
727
698
|
flexShrink: 1
|
|
@@ -737,7 +708,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
737
708
|
paddingHorizontal: 8
|
|
738
709
|
},
|
|
739
710
|
closeButton: {
|
|
740
|
-
color: "#6B7280",
|
|
741
711
|
fontSize: 24,
|
|
742
712
|
fontWeight: "300"
|
|
743
713
|
},
|
|
@@ -758,31 +728,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
758
728
|
dayCellOtherMonth: {
|
|
759
729
|
opacity: 0.3
|
|
760
730
|
},
|
|
761
|
-
dayCellSelected: {
|
|
762
|
-
backgroundColor: "#3B82F6",
|
|
763
|
-
borderRadius: 20
|
|
764
|
-
},
|
|
765
731
|
dayText: {
|
|
766
|
-
color: "#374151",
|
|
767
732
|
fontSize: 14
|
|
768
733
|
},
|
|
769
|
-
dayTextDisabled: {
|
|
770
|
-
color: "#9CA3AF"
|
|
771
|
-
},
|
|
772
|
-
dayTextOtherMonth: {
|
|
773
|
-
color: "#9CA3AF"
|
|
774
|
-
},
|
|
775
|
-
dayTextSelected: {
|
|
776
|
-
color: "#FFFFFF",
|
|
777
|
-
fontWeight: "600"
|
|
778
|
-
},
|
|
779
734
|
error: {
|
|
780
|
-
color: "#EF4444",
|
|
781
735
|
fontSize: 12,
|
|
782
736
|
marginTop: 4
|
|
783
737
|
},
|
|
784
738
|
helperText: {
|
|
785
|
-
color: "#6B7280",
|
|
786
739
|
fontSize: 12,
|
|
787
740
|
marginTop: 4
|
|
788
741
|
},
|
|
@@ -790,13 +743,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
790
743
|
fontSize: 16
|
|
791
744
|
},
|
|
792
745
|
label: {
|
|
793
|
-
color: "#374151",
|
|
794
746
|
fontSize: 14,
|
|
795
747
|
fontWeight: "500",
|
|
796
748
|
marginBottom: 8
|
|
797
749
|
},
|
|
798
750
|
modalContent: {
|
|
799
|
-
backgroundColor: "#FFFFFF",
|
|
800
751
|
borderRadius: 12,
|
|
801
752
|
maxHeight: "80%",
|
|
802
753
|
padding: 16,
|
|
@@ -804,7 +755,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
804
755
|
},
|
|
805
756
|
modalHeader: {
|
|
806
757
|
alignItems: "center",
|
|
807
|
-
borderBottomColor: "#E5E7EB",
|
|
808
758
|
borderBottomWidth: 1,
|
|
809
759
|
flexDirection: "row",
|
|
810
760
|
justifyContent: "space-between",
|
|
@@ -818,12 +768,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
818
768
|
justifyContent: "center"
|
|
819
769
|
},
|
|
820
770
|
modalTitle: {
|
|
821
|
-
color: "#111827",
|
|
822
771
|
fontSize: 18,
|
|
823
772
|
fontWeight: "600"
|
|
824
773
|
},
|
|
825
774
|
monthYear: {
|
|
826
|
-
color: "#111827",
|
|
827
775
|
fontSize: 16,
|
|
828
776
|
fontWeight: "600"
|
|
829
777
|
},
|
|
@@ -831,17 +779,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
831
779
|
padding: 8
|
|
832
780
|
},
|
|
833
781
|
navButtonText: {
|
|
834
|
-
color: "#3B82F6",
|
|
835
782
|
fontSize: 24,
|
|
836
783
|
fontWeight: "600"
|
|
837
784
|
},
|
|
838
|
-
required: {
|
|
839
|
-
color: "#EF4444"
|
|
840
|
-
},
|
|
841
785
|
trigger: {
|
|
842
786
|
alignItems: "center",
|
|
843
|
-
backgroundColor: "#FFFFFF",
|
|
844
|
-
borderColor: "#D1D5DB",
|
|
845
787
|
borderRadius: 6,
|
|
846
788
|
borderWidth: 1,
|
|
847
789
|
flexDirection: "row",
|
|
@@ -849,19 +791,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
849
791
|
paddingHorizontal: 12,
|
|
850
792
|
paddingVertical: 10
|
|
851
793
|
},
|
|
852
|
-
triggerError: {
|
|
853
|
-
borderColor: "#EF4444"
|
|
854
|
-
},
|
|
855
|
-
triggerPlaceholder: {
|
|
856
|
-
color: "#9CA3AF"
|
|
857
|
-
},
|
|
858
794
|
triggerText: {
|
|
859
|
-
color: "#374151",
|
|
860
795
|
flex: 1,
|
|
861
796
|
fontSize: 14
|
|
862
797
|
},
|
|
863
798
|
weekDay: {
|
|
864
|
-
color: "#6B7280",
|
|
865
799
|
flex: 1,
|
|
866
800
|
fontSize: 12,
|
|
867
801
|
fontWeight: "600",
|
|
@@ -872,11 +806,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
872
806
|
flexDirection: "row",
|
|
873
807
|
marginBottom: 8
|
|
874
808
|
}
|
|
875
|
-
}),
|
|
876
|
-
const [
|
|
877
|
-
const
|
|
878
|
-
return
|
|
879
|
-
}, [
|
|
809
|
+
}), ct = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
810
|
+
const [y, p] = R(!1), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : [], m = d[0] ? new Date(d[0]) : void 0, C = d[1] ? new Date(d[1]) : void 0, { year: v, month: w, today: f } = xe(() => {
|
|
811
|
+
const I = m || /* @__PURE__ */ new Date(), B = I.getFullYear(), ee = I.getMonth(), M = /* @__PURE__ */ new Date();
|
|
812
|
+
return M.setHours(0, 0, 0, 0), { month: ee, today: M, year: B };
|
|
813
|
+
}, [m]), [b, z] = R(v), [j, P] = R(w), u = [
|
|
880
814
|
"January",
|
|
881
815
|
"February",
|
|
882
816
|
"March",
|
|
@@ -889,104 +823,113 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
889
823
|
"October",
|
|
890
824
|
"November",
|
|
891
825
|
"December"
|
|
892
|
-
],
|
|
893
|
-
const
|
|
894
|
-
for (let
|
|
895
|
-
|
|
896
|
-
date: new Date(b,
|
|
897
|
-
day:
|
|
826
|
+
], D = xe(() => {
|
|
827
|
+
const I = new Date(b, j, 1).getDay(), B = new Date(b, j + 1, 0).getDate(), ee = new Date(b, j, 0).getDate(), M = [];
|
|
828
|
+
for (let $ = I - 1; $ >= 0; $--)
|
|
829
|
+
M.push({
|
|
830
|
+
date: new Date(b, j - 1, ee - $),
|
|
831
|
+
day: ee - $,
|
|
898
832
|
isCurrentMonth: !1
|
|
899
833
|
});
|
|
900
|
-
for (let
|
|
901
|
-
|
|
902
|
-
date: new Date(b,
|
|
903
|
-
day:
|
|
834
|
+
for (let $ = 1; $ <= B; $++)
|
|
835
|
+
M.push({
|
|
836
|
+
date: new Date(b, j, $),
|
|
837
|
+
day: $,
|
|
904
838
|
isCurrentMonth: !0
|
|
905
839
|
});
|
|
906
|
-
const ce = 42 -
|
|
907
|
-
for (let
|
|
908
|
-
|
|
909
|
-
date: new Date(b,
|
|
910
|
-
day:
|
|
840
|
+
const ce = 42 - M.length;
|
|
841
|
+
for (let $ = 1; $ <= ce; $++)
|
|
842
|
+
M.push({
|
|
843
|
+
date: new Date(b, j + 1, $),
|
|
844
|
+
day: $,
|
|
911
845
|
isCurrentMonth: !1
|
|
912
846
|
});
|
|
913
|
-
return
|
|
914
|
-
}, [b,
|
|
915
|
-
(
|
|
916
|
-
r.data.disablePast &&
|
|
847
|
+
return M;
|
|
848
|
+
}, [b, j]), N = ye(
|
|
849
|
+
(I) => {
|
|
850
|
+
r.data.disablePast && I < f || (l ? (i([I.toISOString(), C?.toISOString()]), g(!1)) : (m && I < m ? i([I.toISOString(), m.toISOString()]) : i([m?.toISOString(), I.toISOString()]), p(!1), g(!0)));
|
|
917
851
|
},
|
|
918
|
-
[r.data.disablePast,
|
|
852
|
+
[r.data.disablePast, f, l, m, C, i]
|
|
919
853
|
), K = () => {
|
|
920
|
-
|
|
921
|
-
},
|
|
922
|
-
|
|
923
|
-
},
|
|
924
|
-
if (!(
|
|
854
|
+
j === 0 ? (P(11), z(b - 1)) : P(j - 1);
|
|
855
|
+
}, te = () => {
|
|
856
|
+
j === 11 ? (P(0), z(b + 1)) : P(j + 1);
|
|
857
|
+
}, T = () => m && C ? `${m.toLocaleDateString()} - ${C.toLocaleDateString()}` : m ? m.toLocaleDateString() : a("renderer.defaultInputs.selectDateRange"), A = (I) => r.data.disablePast ? I < f : !1, Z = (I) => m && C ? I >= m && I <= C : !1, Q = (I) => {
|
|
858
|
+
if (!(m || C))
|
|
925
859
|
return !1;
|
|
926
|
-
const
|
|
927
|
-
return
|
|
860
|
+
const B = m && I.getDate() === m.getDate() && I.getMonth() === m.getMonth() && I.getFullYear() === m.getFullYear(), ee = C && I.getDate() === C.getDate() && I.getMonth() === C.getMonth() && I.getFullYear() === C.getFullYear();
|
|
861
|
+
return B || ee;
|
|
928
862
|
};
|
|
929
|
-
return /* @__PURE__ */ e.jsxs(
|
|
930
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
931
|
-
|
|
932
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
933
|
-
] }),
|
|
934
|
-
/* @__PURE__ */ e.jsxs(h, { style: [D.trigger, n && D.triggerError], onPress: () => B(!0), activeOpacity: 0.7, children: [
|
|
935
|
-
/* @__PURE__ */ e.jsx(t, { style: [D.triggerText, !i && D.triggerPlaceholder], numberOfLines: 1, children: p() }),
|
|
936
|
-
/* @__PURE__ */ e.jsx(t, { style: D.icon, children: "📅" })
|
|
863
|
+
return /* @__PURE__ */ e.jsxs(x, { style: W.container, children: [
|
|
864
|
+
/* @__PURE__ */ e.jsxs(t, { style: [W.label, { color: o.textSecondary }], children: [
|
|
865
|
+
c || r.data.name,
|
|
866
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
|
|
937
867
|
] }),
|
|
938
|
-
/* @__PURE__ */ e.
|
|
868
|
+
/* @__PURE__ */ e.jsxs(
|
|
869
|
+
h,
|
|
870
|
+
{
|
|
871
|
+
style: [W.trigger, { backgroundColor: o.input, borderColor: o.border }, n && { borderColor: o.error }],
|
|
872
|
+
onPress: () => p(!0),
|
|
873
|
+
activeOpacity: 0.7,
|
|
874
|
+
children: [
|
|
875
|
+
/* @__PURE__ */ e.jsx(t, { style: [W.triggerText, { color: o.text }, !m && { color: o.textMuted }], numberOfLines: 1, children: T() }),
|
|
876
|
+
/* @__PURE__ */ e.jsx(t, { style: W.icon, children: "📅" })
|
|
877
|
+
]
|
|
878
|
+
}
|
|
879
|
+
),
|
|
880
|
+
/* @__PURE__ */ e.jsx(ae, { visible: y, transparent: !0, animationType: "fade", onRequestClose: () => p(!1), children: /* @__PURE__ */ e.jsx(h, { style: W.modalOverlay, activeOpacity: 1, onPress: () => p(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [W.modalContent, { backgroundColor: o.card }], activeOpacity: 1, onPress: () => {
|
|
939
881
|
}, children: [
|
|
940
|
-
/* @__PURE__ */ e.jsxs(
|
|
941
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
942
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
882
|
+
/* @__PURE__ */ e.jsxs(x, { style: [W.modalHeader, { borderBottomColor: o.separator }], children: [
|
|
883
|
+
/* @__PURE__ */ e.jsx(t, { style: [W.modalTitle, { color: o.text }], children: c || r.data.name }),
|
|
884
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => p(!1), children: /* @__PURE__ */ e.jsx(t, { style: [W.closeButton, { color: o.textMuted }], children: "✕" }) })
|
|
943
885
|
] }),
|
|
944
|
-
/* @__PURE__ */ e.jsx(
|
|
945
|
-
/* @__PURE__ */ e.jsxs(
|
|
946
|
-
/* @__PURE__ */ e.jsx(h, { onPress: K, style:
|
|
947
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
948
|
-
|
|
886
|
+
/* @__PURE__ */ e.jsx(x, { style: [W.rangeIndicator, { backgroundColor: o.primaryLight }], children: /* @__PURE__ */ e.jsx(t, { style: [W.rangeIndicatorText, { color: o.primary }], children: a(l ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate") }) }),
|
|
887
|
+
/* @__PURE__ */ e.jsxs(x, { style: W.calendarHeader, children: [
|
|
888
|
+
/* @__PURE__ */ e.jsx(h, { onPress: K, style: W.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [W.navButtonText, { color: o.primary }], children: "‹" }) }),
|
|
889
|
+
/* @__PURE__ */ e.jsxs(t, { style: [W.monthYear, { color: o.text }], children: [
|
|
890
|
+
u[j],
|
|
949
891
|
" ",
|
|
950
892
|
b
|
|
951
893
|
] }),
|
|
952
|
-
/* @__PURE__ */ e.jsx(h, { onPress:
|
|
894
|
+
/* @__PURE__ */ e.jsx(h, { onPress: te, style: W.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [W.navButtonText, { color: o.primary }], children: "›" }) })
|
|
953
895
|
] }),
|
|
954
|
-
/* @__PURE__ */ e.jsx(
|
|
896
|
+
/* @__PURE__ */ e.jsx(x, { style: W.weekDays, children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((I) => /* @__PURE__ */ e.jsx(t, { style: [W.weekDay, { color: o.textMuted }], children: I }, I)) }),
|
|
955
897
|
/* @__PURE__ */ e.jsx(
|
|
956
|
-
|
|
898
|
+
fe,
|
|
957
899
|
{
|
|
958
|
-
data:
|
|
959
|
-
keyExtractor: (
|
|
900
|
+
data: D,
|
|
901
|
+
keyExtractor: (I, B) => `${I.date.getTime()}-${B}`,
|
|
960
902
|
numColumns: 7,
|
|
961
903
|
scrollEnabled: !1,
|
|
962
|
-
style:
|
|
963
|
-
contentContainerStyle:
|
|
964
|
-
renderItem: ({ item:
|
|
965
|
-
const
|
|
904
|
+
style: W.calendar,
|
|
905
|
+
contentContainerStyle: W.calendarContent,
|
|
906
|
+
renderItem: ({ item: I }) => {
|
|
907
|
+
const B = A(I.date), ee = Z(I.date), M = Q(I.date);
|
|
966
908
|
return /* @__PURE__ */ e.jsx(
|
|
967
909
|
h,
|
|
968
910
|
{
|
|
969
911
|
style: [
|
|
970
|
-
|
|
971
|
-
!
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
912
|
+
W.dayCell,
|
|
913
|
+
!I.isCurrentMonth && W.dayCellOtherMonth,
|
|
914
|
+
ee && { backgroundColor: o.primaryLight },
|
|
915
|
+
M && { backgroundColor: o.primary, borderRadius: 20 },
|
|
916
|
+
B && W.dayCellDisabled
|
|
975
917
|
],
|
|
976
|
-
onPress: () =>
|
|
977
|
-
disabled:
|
|
918
|
+
onPress: () => N(I.date),
|
|
919
|
+
disabled: B,
|
|
978
920
|
activeOpacity: 0.7,
|
|
979
921
|
children: /* @__PURE__ */ e.jsx(
|
|
980
922
|
t,
|
|
981
923
|
{
|
|
982
924
|
style: [
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
925
|
+
W.dayText,
|
|
926
|
+
{ color: o.text },
|
|
927
|
+
!I.isCurrentMonth && { color: o.textMuted },
|
|
928
|
+
ee && { color: o.primary },
|
|
929
|
+
M && { color: o.background, fontWeight: "600" },
|
|
930
|
+
B && { color: o.textMuted }
|
|
988
931
|
],
|
|
989
|
-
children:
|
|
932
|
+
children: I.day
|
|
990
933
|
}
|
|
991
934
|
)
|
|
992
935
|
}
|
|
@@ -995,10 +938,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
995
938
|
}
|
|
996
939
|
)
|
|
997
940
|
] }) }) }),
|
|
998
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
999
|
-
|
|
941
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [W.error, { color: o.error }], children: n }),
|
|
942
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [W.helperText, { color: o.textMuted }], children: S })
|
|
1000
943
|
] });
|
|
1001
|
-
},
|
|
944
|
+
}, W = _.create({
|
|
1002
945
|
calendar: {
|
|
1003
946
|
flexGrow: 0,
|
|
1004
947
|
flexShrink: 1
|
|
@@ -1014,7 +957,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1014
957
|
paddingHorizontal: 8
|
|
1015
958
|
},
|
|
1016
959
|
closeButton: {
|
|
1017
|
-
color: "#6B7280",
|
|
1018
960
|
fontSize: 24,
|
|
1019
961
|
fontWeight: "300"
|
|
1020
962
|
},
|
|
@@ -1032,40 +974,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1032
974
|
dayCellDisabled: {
|
|
1033
975
|
opacity: 0.3
|
|
1034
976
|
},
|
|
1035
|
-
dayCellInRange: {
|
|
1036
|
-
backgroundColor: "#DBEAFE"
|
|
1037
|
-
},
|
|
1038
977
|
dayCellOtherMonth: {
|
|
1039
978
|
opacity: 0.3
|
|
1040
979
|
},
|
|
1041
|
-
dayCellSelected: {
|
|
1042
|
-
backgroundColor: "#3B82F6",
|
|
1043
|
-
borderRadius: 20
|
|
1044
|
-
},
|
|
1045
980
|
dayText: {
|
|
1046
|
-
color: "#374151",
|
|
1047
981
|
fontSize: 14
|
|
1048
982
|
},
|
|
1049
|
-
dayTextDisabled: {
|
|
1050
|
-
color: "#9CA3AF"
|
|
1051
|
-
},
|
|
1052
|
-
dayTextInRange: {
|
|
1053
|
-
color: "#1E40AF"
|
|
1054
|
-
},
|
|
1055
|
-
dayTextOtherMonth: {
|
|
1056
|
-
color: "#9CA3AF"
|
|
1057
|
-
},
|
|
1058
|
-
dayTextSelected: {
|
|
1059
|
-
color: "#FFFFFF",
|
|
1060
|
-
fontWeight: "600"
|
|
1061
|
-
},
|
|
1062
983
|
error: {
|
|
1063
|
-
color: "#EF4444",
|
|
1064
984
|
fontSize: 12,
|
|
1065
985
|
marginTop: 4
|
|
1066
986
|
},
|
|
1067
987
|
helperText: {
|
|
1068
|
-
color: "#6B7280",
|
|
1069
988
|
fontSize: 12,
|
|
1070
989
|
marginTop: 4
|
|
1071
990
|
},
|
|
@@ -1073,13 +992,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1073
992
|
fontSize: 16
|
|
1074
993
|
},
|
|
1075
994
|
label: {
|
|
1076
|
-
color: "#374151",
|
|
1077
995
|
fontSize: 14,
|
|
1078
996
|
fontWeight: "500",
|
|
1079
997
|
marginBottom: 8
|
|
1080
998
|
},
|
|
1081
999
|
modalContent: {
|
|
1082
|
-
backgroundColor: "#FFFFFF",
|
|
1083
1000
|
borderRadius: 12,
|
|
1084
1001
|
maxHeight: "80%",
|
|
1085
1002
|
padding: 16,
|
|
@@ -1087,7 +1004,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1087
1004
|
},
|
|
1088
1005
|
modalHeader: {
|
|
1089
1006
|
alignItems: "center",
|
|
1090
|
-
borderBottomColor: "#E5E7EB",
|
|
1091
1007
|
borderBottomWidth: 1,
|
|
1092
1008
|
flexDirection: "row",
|
|
1093
1009
|
justifyContent: "space-between",
|
|
@@ -1101,12 +1017,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1101
1017
|
justifyContent: "center"
|
|
1102
1018
|
},
|
|
1103
1019
|
modalTitle: {
|
|
1104
|
-
color: "#111827",
|
|
1105
1020
|
fontSize: 18,
|
|
1106
1021
|
fontWeight: "600"
|
|
1107
1022
|
},
|
|
1108
1023
|
monthYear: {
|
|
1109
|
-
color: "#111827",
|
|
1110
1024
|
fontSize: 16,
|
|
1111
1025
|
fontWeight: "600"
|
|
1112
1026
|
},
|
|
@@ -1114,29 +1028,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1114
1028
|
padding: 8
|
|
1115
1029
|
},
|
|
1116
1030
|
navButtonText: {
|
|
1117
|
-
color: "#3B82F6",
|
|
1118
1031
|
fontSize: 24,
|
|
1119
1032
|
fontWeight: "600"
|
|
1120
1033
|
},
|
|
1121
1034
|
rangeIndicator: {
|
|
1122
1035
|
alignItems: "center",
|
|
1123
|
-
backgroundColor: "#EFF6FF",
|
|
1124
1036
|
borderRadius: 6,
|
|
1125
1037
|
marginBottom: 12,
|
|
1126
1038
|
paddingVertical: 8
|
|
1127
1039
|
},
|
|
1128
1040
|
rangeIndicatorText: {
|
|
1129
|
-
color: "#3B82F6",
|
|
1130
1041
|
fontSize: 14,
|
|
1131
1042
|
fontWeight: "600"
|
|
1132
1043
|
},
|
|
1133
|
-
required: {
|
|
1134
|
-
color: "#EF4444"
|
|
1135
|
-
},
|
|
1136
1044
|
trigger: {
|
|
1137
1045
|
alignItems: "center",
|
|
1138
|
-
backgroundColor: "#FFFFFF",
|
|
1139
|
-
borderColor: "#D1D5DB",
|
|
1140
1046
|
borderRadius: 6,
|
|
1141
1047
|
borderWidth: 1,
|
|
1142
1048
|
flexDirection: "row",
|
|
@@ -1144,19 +1050,11 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1144
1050
|
paddingHorizontal: 12,
|
|
1145
1051
|
paddingVertical: 10
|
|
1146
1052
|
},
|
|
1147
|
-
triggerError: {
|
|
1148
|
-
borderColor: "#EF4444"
|
|
1149
|
-
},
|
|
1150
|
-
triggerPlaceholder: {
|
|
1151
|
-
color: "#9CA3AF"
|
|
1152
|
-
},
|
|
1153
1053
|
triggerText: {
|
|
1154
|
-
color: "#374151",
|
|
1155
1054
|
flex: 1,
|
|
1156
1055
|
fontSize: 14
|
|
1157
1056
|
},
|
|
1158
1057
|
weekDay: {
|
|
1159
|
-
color: "#6B7280",
|
|
1160
1058
|
flex: 1,
|
|
1161
1059
|
fontSize: 12,
|
|
1162
1060
|
fontWeight: "600",
|
|
@@ -1167,77 +1065,83 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1167
1065
|
flexDirection: "row",
|
|
1168
1066
|
marginBottom: 8
|
|
1169
1067
|
}
|
|
1170
|
-
}),
|
|
1171
|
-
const [
|
|
1172
|
-
if (
|
|
1068
|
+
}), dt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
1069
|
+
const [y, p] = R(null), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : s ? [s] : [], m = r.data.multiple, C = ye(async () => {
|
|
1070
|
+
if (y)
|
|
1173
1071
|
try {
|
|
1174
|
-
const b = (await
|
|
1175
|
-
allowMultiSelection:
|
|
1176
|
-
})).map((
|
|
1177
|
-
data:
|
|
1072
|
+
const b = (await y({
|
|
1073
|
+
allowMultiSelection: m
|
|
1074
|
+
})).map((z) => ({
|
|
1075
|
+
data: z.uri,
|
|
1178
1076
|
lastModified: Date.now(),
|
|
1179
|
-
name:
|
|
1180
|
-
size:
|
|
1181
|
-
type:
|
|
1077
|
+
name: z.name,
|
|
1078
|
+
size: z.size,
|
|
1079
|
+
type: z.type || "application/octet-stream"
|
|
1182
1080
|
}));
|
|
1183
|
-
|
|
1184
|
-
} catch (
|
|
1185
|
-
|
|
1081
|
+
i(m ? [...d, ...b] : b[0] || null);
|
|
1082
|
+
} catch (f) {
|
|
1083
|
+
f.code !== "DOCUMENT_PICKER_CANCELED" && Xe.alert("Error", a("renderer.defaultInputs.filePickerError"));
|
|
1186
1084
|
}
|
|
1187
|
-
}, [
|
|
1188
|
-
(
|
|
1189
|
-
const b =
|
|
1190
|
-
|
|
1085
|
+
}, [y, d, m, i, a]), v = ye(
|
|
1086
|
+
(f) => {
|
|
1087
|
+
const b = d.filter((z, j) => j !== f);
|
|
1088
|
+
i(b.length > 0 ? b : null);
|
|
1191
1089
|
},
|
|
1192
|
-
[
|
|
1193
|
-
),
|
|
1194
|
-
return
|
|
1090
|
+
[d, i]
|
|
1091
|
+
), w = (f) => f < 1024 ? `${f} B` : f < 1024 * 1024 ? `${(f / 1024).toFixed(1)} KB` : `${(f / (1024 * 1024)).toFixed(1)} MB`;
|
|
1092
|
+
return ge(() => {
|
|
1195
1093
|
(async () => {
|
|
1196
1094
|
try {
|
|
1197
1095
|
const { pick: b } = await import("react-native-document-picker");
|
|
1198
|
-
|
|
1096
|
+
p(() => b);
|
|
1199
1097
|
} catch {
|
|
1200
|
-
|
|
1098
|
+
p(null);
|
|
1201
1099
|
} finally {
|
|
1202
|
-
|
|
1100
|
+
g(!1);
|
|
1203
1101
|
}
|
|
1204
1102
|
})();
|
|
1205
|
-
}, []),
|
|
1206
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1207
|
-
|
|
1208
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1103
|
+
}, []), l ? null : y ? /* @__PURE__ */ e.jsxs(x, { style: Y.container, children: [
|
|
1104
|
+
/* @__PURE__ */ e.jsxs(t, { style: [Y.label, { color: o.textSecondary }], children: [
|
|
1105
|
+
c || r.data.name,
|
|
1106
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
|
|
1209
1107
|
] }),
|
|
1210
|
-
|
|
1211
|
-
/* @__PURE__ */ e.jsx(
|
|
1212
|
-
/* @__PURE__ */ e.jsxs(
|
|
1213
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1214
|
-
|
|
1108
|
+
d.length > 0 && /* @__PURE__ */ e.jsx(x, { style: Y.filesList, children: d.map((f, b) => /* @__PURE__ */ e.jsxs(x, { style: [Y.fileItem, { backgroundColor: o.card, borderColor: o.separator }], children: [
|
|
1109
|
+
/* @__PURE__ */ e.jsx(x, { style: [Y.fileIcon, { backgroundColor: o.muted }], children: /* @__PURE__ */ e.jsx(t, { style: Y.fileIconText, children: "📄" }) }),
|
|
1110
|
+
/* @__PURE__ */ e.jsxs(x, { style: Y.fileInfo, children: [
|
|
1111
|
+
/* @__PURE__ */ e.jsx(t, { style: [Y.fileName, { color: o.text }], numberOfLines: 1, children: f.name }),
|
|
1112
|
+
f.size > 0 && /* @__PURE__ */ e.jsx(t, { style: [Y.fileSize, { color: o.textMuted }], children: w(f.size) })
|
|
1215
1113
|
] }),
|
|
1216
|
-
/* @__PURE__ */ e.jsx(h, { style:
|
|
1217
|
-
] }, `${
|
|
1218
|
-
/* @__PURE__ */ e.jsx(
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1114
|
+
/* @__PURE__ */ e.jsx(h, { style: Y.removeButton, onPress: () => v(b), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: [Y.removeButtonText, { color: o.textMuted }], children: "✕" }) })
|
|
1115
|
+
] }, `${f.name}-${b}`)) }),
|
|
1116
|
+
/* @__PURE__ */ e.jsx(
|
|
1117
|
+
h,
|
|
1118
|
+
{
|
|
1119
|
+
style: [Y.pickButton, { backgroundColor: o.input, borderColor: o.border }],
|
|
1120
|
+
onPress: C,
|
|
1121
|
+
activeOpacity: 0.7,
|
|
1122
|
+
children: /* @__PURE__ */ e.jsx(t, { style: [Y.pickButtonText, { color: o.textMuted }], children: d.length === 0 ? a(m ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : a(m ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile") })
|
|
1123
|
+
}
|
|
1124
|
+
),
|
|
1125
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [Y.error, { color: o.error }], children: n }),
|
|
1126
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [Y.helperText, { color: o.textMuted }], children: S })
|
|
1127
|
+
] }) : /* @__PURE__ */ e.jsxs(x, { style: Y.container, children: [
|
|
1128
|
+
/* @__PURE__ */ e.jsxs(t, { style: [Y.label, { color: o.textSecondary }], children: [
|
|
1129
|
+
c || r.data.name,
|
|
1130
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
|
|
1225
1131
|
] }),
|
|
1226
|
-
/* @__PURE__ */ e.jsx(
|
|
1227
|
-
|
|
1132
|
+
/* @__PURE__ */ e.jsx(x, { style: [Y.unavailableContainer, { backgroundColor: o.errorLight, borderColor: o.error }], children: /* @__PURE__ */ e.jsx(t, { style: [Y.unavailableText, { color: o.error }], children: a("renderer.defaultInputs.filePickerUnavailable") }) }),
|
|
1133
|
+
S && /* @__PURE__ */ e.jsx(t, { style: [Y.helperText, { color: o.textMuted }], children: S })
|
|
1228
1134
|
] });
|
|
1229
|
-
},
|
|
1135
|
+
}, Y = _.create({
|
|
1230
1136
|
container: {
|
|
1231
1137
|
marginBottom: 16
|
|
1232
1138
|
},
|
|
1233
1139
|
error: {
|
|
1234
|
-
color: "#EF4444",
|
|
1235
1140
|
fontSize: 12,
|
|
1236
1141
|
marginTop: 4
|
|
1237
1142
|
},
|
|
1238
1143
|
fileIcon: {
|
|
1239
1144
|
alignItems: "center",
|
|
1240
|
-
backgroundColor: "#F3F4F6",
|
|
1241
1145
|
borderRadius: 6,
|
|
1242
1146
|
height: 40,
|
|
1243
1147
|
justifyContent: "center",
|
|
@@ -1252,8 +1156,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1252
1156
|
},
|
|
1253
1157
|
fileItem: {
|
|
1254
1158
|
alignItems: "center",
|
|
1255
|
-
backgroundColor: "#F9FAFB",
|
|
1256
|
-
borderColor: "#E5E7EB",
|
|
1257
1159
|
borderRadius: 6,
|
|
1258
1160
|
borderWidth: 1,
|
|
1259
1161
|
flexDirection: "row",
|
|
@@ -1261,12 +1163,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1261
1163
|
padding: 12
|
|
1262
1164
|
},
|
|
1263
1165
|
fileName: {
|
|
1264
|
-
color: "#111827",
|
|
1265
1166
|
fontSize: 14,
|
|
1266
1167
|
fontWeight: "500"
|
|
1267
1168
|
},
|
|
1268
1169
|
fileSize: {
|
|
1269
|
-
color: "#6B7280",
|
|
1270
1170
|
fontSize: 12,
|
|
1271
1171
|
marginTop: 2
|
|
1272
1172
|
},
|
|
@@ -1274,20 +1174,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1274
1174
|
marginBottom: 12
|
|
1275
1175
|
},
|
|
1276
1176
|
helperText: {
|
|
1277
|
-
color: "#6B7280",
|
|
1278
1177
|
fontSize: 12,
|
|
1279
1178
|
marginTop: 4
|
|
1280
1179
|
},
|
|
1281
1180
|
label: {
|
|
1282
|
-
color: "#374151",
|
|
1283
1181
|
fontSize: 14,
|
|
1284
1182
|
fontWeight: "500",
|
|
1285
1183
|
marginBottom: 8
|
|
1286
1184
|
},
|
|
1287
1185
|
pickButton: {
|
|
1288
1186
|
alignItems: "center",
|
|
1289
|
-
backgroundColor: "#FFFFFF",
|
|
1290
|
-
borderColor: "#D1D5DB",
|
|
1291
1187
|
borderRadius: 6,
|
|
1292
1188
|
borderStyle: "dashed",
|
|
1293
1189
|
borderWidth: 2,
|
|
@@ -1295,7 +1191,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1295
1191
|
paddingVertical: 16
|
|
1296
1192
|
},
|
|
1297
1193
|
pickButtonText: {
|
|
1298
|
-
color: "#6B7280",
|
|
1299
1194
|
fontSize: 14,
|
|
1300
1195
|
fontWeight: "500"
|
|
1301
1196
|
},
|
|
@@ -1303,220 +1198,221 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1303
1198
|
padding: 4
|
|
1304
1199
|
},
|
|
1305
1200
|
removeButtonText: {
|
|
1306
|
-
color: "#6B7280",
|
|
1307
1201
|
fontSize: 18
|
|
1308
1202
|
},
|
|
1309
|
-
required: {
|
|
1310
|
-
color: "#EF4444"
|
|
1311
|
-
},
|
|
1312
1203
|
unavailableContainer: {
|
|
1313
1204
|
alignItems: "center",
|
|
1314
|
-
backgroundColor: "#FEF2F2",
|
|
1315
|
-
borderColor: "#FCA5A5",
|
|
1316
1205
|
borderRadius: 6,
|
|
1317
1206
|
borderWidth: 1,
|
|
1318
1207
|
justifyContent: "center",
|
|
1319
1208
|
paddingVertical: 16
|
|
1320
1209
|
},
|
|
1321
1210
|
unavailableText: {
|
|
1322
|
-
color: "#991B1B",
|
|
1323
1211
|
fontSize: 12,
|
|
1324
1212
|
textAlign: "center"
|
|
1325
1213
|
}
|
|
1326
|
-
}),
|
|
1214
|
+
}), ut = (r) => null, gt = (r) => r.replace(/<[^>]*>/g, ""), xt = (r) => r.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(///g, "/"), Le = (r, s = {}) => {
|
|
1327
1215
|
if (r == null || r === "")
|
|
1328
1216
|
return "";
|
|
1329
|
-
const
|
|
1330
|
-
return
|
|
1331
|
-
},
|
|
1332
|
-
if (
|
|
1333
|
-
return console.warn(`sanitizeHttpResponse: Maximum depth (${
|
|
1217
|
+
const i = String(r), n = gt(i);
|
|
1218
|
+
return xt(n);
|
|
1219
|
+
}, Fe = 100, Re = (r, s = {}, i = 0, n = /* @__PURE__ */ new WeakSet()) => {
|
|
1220
|
+
if (i > Fe)
|
|
1221
|
+
return console.warn(`sanitizeHttpResponse: Maximum depth (${Fe}) exceeded.`), typeof r == "string" ? Le(r, s) : "[Max Depth Exceeded]";
|
|
1334
1222
|
if (r == null)
|
|
1335
1223
|
return r;
|
|
1336
1224
|
if (typeof r == "string")
|
|
1337
|
-
return
|
|
1225
|
+
return Le(r, s);
|
|
1338
1226
|
if (Array.isArray(r))
|
|
1339
|
-
return r.map((
|
|
1227
|
+
return r.map((c) => Re(c, s, i + 1, n));
|
|
1340
1228
|
if (typeof r == "object") {
|
|
1341
1229
|
if (n.has(r))
|
|
1342
1230
|
return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1343
1231
|
n.add(r);
|
|
1344
|
-
const
|
|
1345
|
-
for (const [
|
|
1346
|
-
|
|
1347
|
-
return n.delete(r),
|
|
1232
|
+
const c = {};
|
|
1233
|
+
for (const [S, y] of Object.entries(r))
|
|
1234
|
+
c[S] = Re(y, s, i + 1, n);
|
|
1235
|
+
return n.delete(r), c;
|
|
1348
1236
|
}
|
|
1349
1237
|
return r;
|
|
1350
|
-
},
|
|
1238
|
+
}, Be = (r, s) => s ? s.split(".").reduce((n, c) => {
|
|
1351
1239
|
if (n == null)
|
|
1352
1240
|
return;
|
|
1353
|
-
const
|
|
1354
|
-
if (
|
|
1355
|
-
const [,
|
|
1356
|
-
return Array.isArray(
|
|
1241
|
+
const S = c.match(/^(\w+)\[(\d+)]$/);
|
|
1242
|
+
if (S) {
|
|
1243
|
+
const [, y, p] = S, l = n[y];
|
|
1244
|
+
return Array.isArray(l) ? l[Number.parseInt(p, 10)] : l;
|
|
1357
1245
|
}
|
|
1358
|
-
return n[
|
|
1359
|
-
}, r) : r,
|
|
1360
|
-
const
|
|
1361
|
-
return Array.from(
|
|
1362
|
-
},
|
|
1363
|
-
const
|
|
1364
|
-
return
|
|
1365
|
-
}),
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1368
|
-
}),
|
|
1246
|
+
return n[c];
|
|
1247
|
+
}, r) : r, Pe = (r) => {
|
|
1248
|
+
const s = r.matchAll(/{{([\w-]+)}}/g);
|
|
1249
|
+
return Array.from(s, (i) => i[1]);
|
|
1250
|
+
}, Me = (r, s) => Pe(r).every((n) => {
|
|
1251
|
+
const c = s[n];
|
|
1252
|
+
return c != null && c !== "";
|
|
1253
|
+
}), Oe = (r, s, i = !1) => r.replace(/{{([\w-]+)}}/g, (n, c) => {
|
|
1254
|
+
const S = s[c], y = S == null ? "" : String(S);
|
|
1255
|
+
return i ? encodeURIComponent(y) : y;
|
|
1256
|
+
}), mt = ({
|
|
1369
1257
|
node: r,
|
|
1370
|
-
value:
|
|
1371
|
-
setValue:
|
|
1258
|
+
value: s,
|
|
1259
|
+
setValue: i,
|
|
1372
1260
|
error: n,
|
|
1373
|
-
label:
|
|
1374
|
-
placeholder:
|
|
1375
|
-
helperText:
|
|
1376
|
-
id:
|
|
1377
|
-
name:
|
|
1261
|
+
label: c,
|
|
1262
|
+
placeholder: S,
|
|
1263
|
+
helperText: y,
|
|
1264
|
+
id: p,
|
|
1265
|
+
name: l
|
|
1378
1266
|
}) => {
|
|
1379
|
-
const [
|
|
1380
|
-
async (
|
|
1381
|
-
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
if (!
|
|
1386
|
-
|
|
1267
|
+
const [g, a] = R(!1), [o, d] = R(null), [m, C] = R([]), [v, w] = R(""), [f, b] = R(!1), { formValues: z, inputNodes: j } = Ve(), P = se(), { colors: u } = q(), { httpConfig: D } = r.data, N = ie(!1), K = ie(""), te = ie(D), T = ie(z), A = ie(j), Z = ie(i), Q = ie(null), I = ie(null), B = xe(() => D?.url ? Pe(D.url) : [], [D?.url]), ee = B.length > 0, M = xe(() => B.map((G) => `${G}:${String(z[G] ?? "")}`).join("|"), [B, z]), ce = xe(() => D?.url ? ee ? Me(D.url, z) : !0 : !1, [D?.url, ee, z]), $ = ye(
|
|
1268
|
+
async (G) => {
|
|
1269
|
+
I.current && I.current.abort();
|
|
1270
|
+
const oe = new AbortController();
|
|
1271
|
+
I.current = oe;
|
|
1272
|
+
const V = te.current, le = T.current, je = Z.current;
|
|
1273
|
+
if (!V?.url) {
|
|
1274
|
+
d(P("renderer.defaultHttpInput.noUrlConfigured")), I.current = null;
|
|
1387
1275
|
return;
|
|
1388
1276
|
}
|
|
1389
|
-
if (
|
|
1390
|
-
|
|
1277
|
+
if (V.url && !Me(V.url, le)) {
|
|
1278
|
+
I.current = null;
|
|
1391
1279
|
return;
|
|
1392
1280
|
}
|
|
1393
|
-
|
|
1281
|
+
a(!0), d(null);
|
|
1394
1282
|
try {
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
-
|
|
1283
|
+
const re = Oe(V.url, le, !0), U = V.searchParam && G ? `${re}${re.includes("?") ? "&" : "?"}${V.searchParam}=${encodeURIComponent(G)}` : re, X = {};
|
|
1284
|
+
V.headers?.forEach((ve) => {
|
|
1285
|
+
X[ve.key] = Oe(ve.value, le);
|
|
1398
1286
|
});
|
|
1399
|
-
const
|
|
1400
|
-
body:
|
|
1287
|
+
const ze = ["POST", "PUT", "PATCH"].includes(V.method || "") ? V.sendAllFormValues ? JSON.stringify(Ye(le, A.current)) : V.body ? Oe(V.body, le) : void 0 : void 0, $e = setTimeout(() => oe.abort(), 3e4), we = await fetch(U, {
|
|
1288
|
+
body: ze || void 0,
|
|
1401
1289
|
headers: {
|
|
1402
1290
|
"Content-Type": "application/json",
|
|
1403
|
-
...
|
|
1291
|
+
...X
|
|
1404
1292
|
},
|
|
1405
|
-
method:
|
|
1406
|
-
signal:
|
|
1293
|
+
method: V.method || "GET",
|
|
1294
|
+
signal: oe.signal
|
|
1407
1295
|
});
|
|
1408
|
-
if (clearTimeout(
|
|
1409
|
-
|
|
1296
|
+
if (clearTimeout($e), !we.ok) {
|
|
1297
|
+
d(`HTTP Error ${we.status}: ${we.statusText}`), a(!1);
|
|
1410
1298
|
return;
|
|
1411
1299
|
}
|
|
1412
|
-
const
|
|
1413
|
-
if (
|
|
1414
|
-
const { valueField:
|
|
1415
|
-
label: String(
|
|
1416
|
-
value: String(
|
|
1300
|
+
const Ee = await we.json(), We = Re(Ee), Ce = V.responsePath ? Be(We, V.responsePath) : We;
|
|
1301
|
+
if (V.responseMapping && Array.isArray(Ce)) {
|
|
1302
|
+
const { valueField: ve = "value", labelField: qe = "label" } = V.responseMapping, _e = Ce.map((He) => ({
|
|
1303
|
+
label: String(Be(He, qe) || ""),
|
|
1304
|
+
value: String(Be(He, ve) || "")
|
|
1417
1305
|
}));
|
|
1418
|
-
|
|
1306
|
+
C(_e);
|
|
1419
1307
|
} else
|
|
1420
|
-
|
|
1421
|
-
} catch (
|
|
1422
|
-
if (
|
|
1308
|
+
je(typeof Ce == "string" ? Ce : JSON.stringify(Ce));
|
|
1309
|
+
} catch (re) {
|
|
1310
|
+
if (re instanceof Error && re.name === "AbortError")
|
|
1423
1311
|
return;
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1312
|
+
const U = re instanceof Error ? re.message : P("renderer.defaultHttpInput.fetchFailed");
|
|
1313
|
+
d(U), console.error("HTTP Input fetch error:", re);
|
|
1426
1314
|
} finally {
|
|
1427
|
-
|
|
1315
|
+
a(!1), I.current = null;
|
|
1428
1316
|
}
|
|
1429
1317
|
},
|
|
1430
|
-
[
|
|
1318
|
+
[P]
|
|
1431
1319
|
);
|
|
1432
|
-
if (
|
|
1433
|
-
|
|
1434
|
-
}, [
|
|
1435
|
-
|
|
1436
|
-
}, []),
|
|
1437
|
-
if (
|
|
1320
|
+
if (ge(() => {
|
|
1321
|
+
te.current = D, T.current = z, A.current = j, Z.current = i, Q.current = $;
|
|
1322
|
+
}, [D, z, j, i, $]), ge(() => () => {
|
|
1323
|
+
I.current && I.current.abort();
|
|
1324
|
+
}, []), ge(() => {
|
|
1325
|
+
if (N.current)
|
|
1438
1326
|
return;
|
|
1439
|
-
|
|
1440
|
-
const
|
|
1441
|
-
if (
|
|
1442
|
-
const
|
|
1443
|
-
K.current =
|
|
1327
|
+
N.current = !0;
|
|
1328
|
+
const G = te.current, oe = T.current, V = Q.current, le = G?.url && Me(G.url, oe);
|
|
1329
|
+
if (G?.fetchOnMount && le && V && (V(), G.url)) {
|
|
1330
|
+
const je = Pe(G.url);
|
|
1331
|
+
K.current = je.map((re) => `${re}:${String(oe[re] ?? "")}`).join("|");
|
|
1444
1332
|
}
|
|
1445
|
-
}, []),
|
|
1446
|
-
if (!
|
|
1333
|
+
}, []), ge(() => {
|
|
1334
|
+
if (!N.current || !ee || K.current === M || !ce)
|
|
1447
1335
|
return;
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1336
|
+
const G = setTimeout(() => {
|
|
1337
|
+
$(), K.current = M;
|
|
1450
1338
|
}, 500);
|
|
1451
|
-
return () => clearTimeout(
|
|
1452
|
-
}, [
|
|
1453
|
-
if (!(
|
|
1339
|
+
return () => clearTimeout(G);
|
|
1340
|
+
}, [M, ee, ce, $]), ge(() => {
|
|
1341
|
+
if (!(D?.searchParam && v))
|
|
1454
1342
|
return;
|
|
1455
|
-
const
|
|
1456
|
-
|
|
1343
|
+
const G = setTimeout(() => {
|
|
1344
|
+
$(v);
|
|
1457
1345
|
}, 300);
|
|
1458
|
-
return () => clearTimeout(
|
|
1459
|
-
}, [
|
|
1460
|
-
const
|
|
1461
|
-
if (
|
|
1462
|
-
const
|
|
1463
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1464
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1465
|
-
|
|
1466
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1346
|
+
return () => clearTimeout(G);
|
|
1347
|
+
}, [v, D?.searchParam, $]), D?.responseMapping) {
|
|
1348
|
+
const G = Array.isArray(s) ? s[0] : s, oe = m.find((U) => U.value === G);
|
|
1349
|
+
if (D.searchParam) {
|
|
1350
|
+
const U = g && D?.showLoading;
|
|
1351
|
+
return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
|
|
1352
|
+
/* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
|
|
1353
|
+
c || r.data.name,
|
|
1354
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
|
|
1467
1355
|
] }),
|
|
1468
|
-
/* @__PURE__ */ e.jsxs(
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1356
|
+
/* @__PURE__ */ e.jsxs(
|
|
1357
|
+
h,
|
|
1358
|
+
{
|
|
1359
|
+
style: [k.trigger, { backgroundColor: u.input, borderColor: u.border }, n && { borderColor: u.error }],
|
|
1360
|
+
onPress: () => b(!0),
|
|
1361
|
+
activeOpacity: 0.7,
|
|
1362
|
+
children: [
|
|
1363
|
+
U ? /* @__PURE__ */ e.jsxs(x, { style: k.loadingTrigger, children: [
|
|
1364
|
+
/* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary }),
|
|
1365
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.search") })
|
|
1366
|
+
] }) : /* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.text }, !oe && { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.search") }),
|
|
1367
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.arrow, { color: u.textMuted }], children: "▼" })
|
|
1368
|
+
]
|
|
1369
|
+
}
|
|
1370
|
+
),
|
|
1371
|
+
/* @__PURE__ */ e.jsx(ae, { visible: f, transparent: !0, animationType: "fade", onRequestClose: () => b(!1), children: /* @__PURE__ */ e.jsx(h, { style: k.modalOverlay, activeOpacity: 1, onPress: () => b(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [k.modalContent, { backgroundColor: u.card }], activeOpacity: 1, onPress: () => {
|
|
1476
1372
|
}, children: [
|
|
1477
|
-
/* @__PURE__ */ e.jsxs(
|
|
1478
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1479
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
1373
|
+
/* @__PURE__ */ e.jsxs(x, { style: [k.modalHeader, { borderBottomColor: u.separator }], children: [
|
|
1374
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.modalTitle, { color: u.text }], children: c || r.data.name }),
|
|
1375
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => b(!1), children: /* @__PURE__ */ e.jsx(t, { style: [k.closeButton, { color: u.textMuted }], children: "✕" }) })
|
|
1480
1376
|
] }),
|
|
1481
|
-
/* @__PURE__ */ e.jsx(
|
|
1482
|
-
|
|
1377
|
+
/* @__PURE__ */ e.jsx(x, { style: k.searchContainer, children: /* @__PURE__ */ e.jsx(
|
|
1378
|
+
me,
|
|
1483
1379
|
{
|
|
1484
|
-
style:
|
|
1485
|
-
placeholder:
|
|
1486
|
-
placeholderTextColor:
|
|
1487
|
-
value:
|
|
1488
|
-
onChangeText: (
|
|
1489
|
-
|
|
1380
|
+
style: [k.searchInput, { backgroundColor: u.muted, borderColor: u.border, color: u.text }],
|
|
1381
|
+
placeholder: P("renderer.defaultHttpInput.search"),
|
|
1382
|
+
placeholderTextColor: u.textMuted,
|
|
1383
|
+
value: v,
|
|
1384
|
+
onChangeText: (X) => {
|
|
1385
|
+
w(X), d(null);
|
|
1490
1386
|
},
|
|
1491
1387
|
autoFocus: !0,
|
|
1492
1388
|
autoCapitalize: "none",
|
|
1493
1389
|
autoCorrect: !1
|
|
1494
1390
|
}
|
|
1495
1391
|
) }),
|
|
1496
|
-
|
|
1497
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1498
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
1392
|
+
g ? /* @__PURE__ */ e.jsx(x, { style: k.loadingContainer, children: /* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary }) }) : o ? /* @__PURE__ */ e.jsxs(x, { style: k.errorContainer, children: [
|
|
1393
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.errorText, { color: u.error }], children: o }),
|
|
1394
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => $(v), style: k.retryButton, children: /* @__PURE__ */ e.jsx(t, { style: [k.retryButtonText, { color: u.primary }], children: P("renderer.defaultHttpInput.retry") }) })
|
|
1499
1395
|
] }) : /* @__PURE__ */ e.jsx(
|
|
1500
|
-
|
|
1396
|
+
fe,
|
|
1501
1397
|
{
|
|
1502
|
-
data:
|
|
1503
|
-
keyExtractor: (
|
|
1504
|
-
style:
|
|
1505
|
-
contentContainerStyle:
|
|
1506
|
-
ListEmptyComponent: /* @__PURE__ */ e.jsx(
|
|
1507
|
-
renderItem: ({ item:
|
|
1508
|
-
const
|
|
1398
|
+
data: m,
|
|
1399
|
+
keyExtractor: (X) => X.value,
|
|
1400
|
+
style: k.optionsList,
|
|
1401
|
+
contentContainerStyle: k.optionsListContent,
|
|
1402
|
+
ListEmptyComponent: /* @__PURE__ */ e.jsx(x, { style: k.emptyContainer, children: /* @__PURE__ */ e.jsx(t, { style: [k.emptyText, { color: u.textMuted }], children: P("renderer.defaultHttpInput.noResults") }) }),
|
|
1403
|
+
renderItem: ({ item: X }) => {
|
|
1404
|
+
const ze = X.value === G;
|
|
1509
1405
|
return /* @__PURE__ */ e.jsxs(
|
|
1510
1406
|
h,
|
|
1511
1407
|
{
|
|
1512
|
-
style: [
|
|
1408
|
+
style: [k.option, ze && { backgroundColor: u.primaryLight }],
|
|
1513
1409
|
onPress: () => {
|
|
1514
|
-
|
|
1410
|
+
i(X.value), b(!1);
|
|
1515
1411
|
},
|
|
1516
1412
|
activeOpacity: 0.7,
|
|
1517
1413
|
children: [
|
|
1518
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1519
|
-
|
|
1414
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.optionText, { color: u.text }], children: X.label }),
|
|
1415
|
+
ze && /* @__PURE__ */ e.jsx(t, { style: [k.checkmark, { color: u.primary }], children: "✓" })
|
|
1520
1416
|
]
|
|
1521
1417
|
}
|
|
1522
1418
|
);
|
|
@@ -1524,60 +1420,65 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1524
1420
|
}
|
|
1525
1421
|
)
|
|
1526
1422
|
] }) }) }),
|
|
1527
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1528
|
-
|
|
1423
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
|
|
1424
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
|
|
1529
1425
|
] });
|
|
1530
1426
|
}
|
|
1531
|
-
const
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1534
|
-
}),
|
|
1535
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1536
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1537
|
-
|
|
1538
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1427
|
+
const V = g && D?.showLoading, le = B.filter((U) => {
|
|
1428
|
+
const X = z[U];
|
|
1429
|
+
return X == null || X === "";
|
|
1430
|
+
}), je = le.map((U) => Ge(U, j) || U), re = m.length === 0 && !V ? o || (le.length > 0 ? `${P("renderer.defaultHttpInput.waitingForRequiredFields")}: ${je.join(", ")}` : P("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1431
|
+
return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
|
|
1432
|
+
/* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
|
|
1433
|
+
c || r.data.name,
|
|
1434
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
|
|
1539
1435
|
] }),
|
|
1540
1436
|
/* @__PURE__ */ e.jsxs(
|
|
1541
1437
|
h,
|
|
1542
1438
|
{
|
|
1543
|
-
style: [
|
|
1544
|
-
|
|
1545
|
-
|
|
1439
|
+
style: [
|
|
1440
|
+
k.trigger,
|
|
1441
|
+
{ backgroundColor: u.input, borderColor: u.border },
|
|
1442
|
+
n && { borderColor: u.error },
|
|
1443
|
+
(V || m.length === 0) && { backgroundColor: u.muted }
|
|
1444
|
+
],
|
|
1445
|
+
onPress: () => b(!0),
|
|
1446
|
+
disabled: V || m.length === 0,
|
|
1546
1447
|
activeOpacity: 0.7,
|
|
1547
1448
|
children: [
|
|
1548
|
-
|
|
1549
|
-
/* @__PURE__ */ e.jsx(t, { style: [
|
|
1550
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1449
|
+
V && /* @__PURE__ */ e.jsx(he, { size: "small", color: u.primary, style: k.triggerLoader }),
|
|
1450
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.triggerText, { color: u.text }, !oe && { color: u.textMuted }], numberOfLines: 1, children: oe?.label || S || P("renderer.defaultHttpInput.selectOption") }),
|
|
1451
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.arrow, { color: u.textMuted }], children: "▼" })
|
|
1551
1452
|
]
|
|
1552
1453
|
}
|
|
1553
1454
|
),
|
|
1554
|
-
|
|
1555
|
-
/* @__PURE__ */ e.jsx(ae, { visible:
|
|
1455
|
+
re && /* @__PURE__ */ e.jsx(t, { style: [k.disabledMessage, { color: u.error }], children: re }),
|
|
1456
|
+
/* @__PURE__ */ e.jsx(ae, { visible: f, transparent: !0, animationType: "fade", onRequestClose: () => b(!1), children: /* @__PURE__ */ e.jsx(h, { style: k.modalOverlay, activeOpacity: 1, onPress: () => b(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [k.modalContent, { backgroundColor: u.card }], activeOpacity: 1, onPress: () => {
|
|
1556
1457
|
}, children: [
|
|
1557
|
-
/* @__PURE__ */ e.jsxs(
|
|
1558
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1559
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
1458
|
+
/* @__PURE__ */ e.jsxs(x, { style: [k.modalHeader, { borderBottomColor: u.separator }], children: [
|
|
1459
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.modalTitle, { color: u.text }], children: c || r.data.name }),
|
|
1460
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => b(!1), children: /* @__PURE__ */ e.jsx(t, { style: [k.closeButton, { color: u.textMuted }], children: "✕" }) })
|
|
1560
1461
|
] }),
|
|
1561
1462
|
/* @__PURE__ */ e.jsx(
|
|
1562
|
-
|
|
1463
|
+
fe,
|
|
1563
1464
|
{
|
|
1564
|
-
data:
|
|
1565
|
-
keyExtractor: (
|
|
1566
|
-
style:
|
|
1567
|
-
contentContainerStyle:
|
|
1568
|
-
renderItem: ({ item:
|
|
1569
|
-
const
|
|
1465
|
+
data: m,
|
|
1466
|
+
keyExtractor: (U) => U.value,
|
|
1467
|
+
style: k.optionsList,
|
|
1468
|
+
contentContainerStyle: k.optionsListContent,
|
|
1469
|
+
renderItem: ({ item: U }) => {
|
|
1470
|
+
const X = U.value === G;
|
|
1570
1471
|
return /* @__PURE__ */ e.jsxs(
|
|
1571
1472
|
h,
|
|
1572
1473
|
{
|
|
1573
|
-
style: [
|
|
1474
|
+
style: [k.option, X && { backgroundColor: u.primaryLight }],
|
|
1574
1475
|
onPress: () => {
|
|
1575
|
-
|
|
1476
|
+
i(U.value), b(!1);
|
|
1576
1477
|
},
|
|
1577
1478
|
activeOpacity: 0.7,
|
|
1578
1479
|
children: [
|
|
1579
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
1580
|
-
|
|
1480
|
+
/* @__PURE__ */ e.jsx(t, { style: [k.optionText, { color: u.text }], children: U.label }),
|
|
1481
|
+
X && /* @__PURE__ */ e.jsx(t, { style: [k.checkmark, { color: u.primary }], children: "✓" })
|
|
1581
1482
|
]
|
|
1582
1483
|
}
|
|
1583
1484
|
);
|
|
@@ -1585,38 +1486,35 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1585
1486
|
}
|
|
1586
1487
|
)
|
|
1587
1488
|
] }) }) }),
|
|
1588
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1589
|
-
|
|
1489
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
|
|
1490
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
|
|
1590
1491
|
] });
|
|
1591
1492
|
}
|
|
1592
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1593
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1594
|
-
|
|
1595
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1493
|
+
return /* @__PURE__ */ e.jsxs(x, { style: k.container, children: [
|
|
1494
|
+
/* @__PURE__ */ e.jsxs(t, { style: [k.label, { color: u.textSecondary }], children: [
|
|
1495
|
+
c || r.data.name,
|
|
1496
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: u.error }, children: "*" })
|
|
1596
1497
|
] }),
|
|
1597
1498
|
/* @__PURE__ */ e.jsx(
|
|
1598
|
-
|
|
1499
|
+
me,
|
|
1599
1500
|
{
|
|
1600
|
-
style: [
|
|
1601
|
-
value: typeof
|
|
1501
|
+
style: [k.input, { backgroundColor: u.muted, borderColor: u.border, color: u.textMuted }],
|
|
1502
|
+
value: typeof s == "string" ? s : JSON.stringify(s),
|
|
1602
1503
|
editable: !1
|
|
1603
1504
|
}
|
|
1604
1505
|
),
|
|
1605
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1606
|
-
|
|
1506
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [k.error, { color: u.error }], children: n }),
|
|
1507
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [k.helperText, { color: u.textMuted }], children: y })
|
|
1607
1508
|
] });
|
|
1608
|
-
},
|
|
1509
|
+
}, k = _.create({
|
|
1609
1510
|
arrow: {
|
|
1610
|
-
color: "#6B7280",
|
|
1611
1511
|
fontSize: 12
|
|
1612
1512
|
},
|
|
1613
1513
|
checkmark: {
|
|
1614
|
-
color: "#3B82F6",
|
|
1615
1514
|
fontSize: 18,
|
|
1616
1515
|
fontWeight: "700"
|
|
1617
1516
|
},
|
|
1618
1517
|
closeButton: {
|
|
1619
|
-
color: "#6B7280",
|
|
1620
1518
|
fontSize: 24,
|
|
1621
1519
|
fontWeight: "300"
|
|
1622
1520
|
},
|
|
@@ -1624,7 +1522,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1624
1522
|
marginBottom: 16
|
|
1625
1523
|
},
|
|
1626
1524
|
disabledMessage: {
|
|
1627
|
-
color: "#EF4444",
|
|
1628
1525
|
fontSize: 12,
|
|
1629
1526
|
marginTop: 4
|
|
1630
1527
|
},
|
|
@@ -1633,11 +1530,9 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1633
1530
|
paddingVertical: 24
|
|
1634
1531
|
},
|
|
1635
1532
|
emptyText: {
|
|
1636
|
-
color: "#9CA3AF",
|
|
1637
1533
|
fontSize: 14
|
|
1638
1534
|
},
|
|
1639
1535
|
error: {
|
|
1640
|
-
color: "#EF4444",
|
|
1641
1536
|
fontSize: 12,
|
|
1642
1537
|
marginTop: 4
|
|
1643
1538
|
},
|
|
@@ -1646,31 +1541,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1646
1541
|
paddingVertical: 16
|
|
1647
1542
|
},
|
|
1648
1543
|
errorText: {
|
|
1649
|
-
color: "#EF4444",
|
|
1650
1544
|
fontSize: 14,
|
|
1651
1545
|
textAlign: "center"
|
|
1652
1546
|
},
|
|
1653
1547
|
helperText: {
|
|
1654
|
-
color: "#6B7280",
|
|
1655
1548
|
fontSize: 12,
|
|
1656
1549
|
marginTop: 4
|
|
1657
1550
|
},
|
|
1658
1551
|
input: {
|
|
1659
|
-
backgroundColor: "#FFFFFF",
|
|
1660
|
-
borderColor: "#D1D5DB",
|
|
1661
1552
|
borderRadius: 6,
|
|
1662
1553
|
borderWidth: 1,
|
|
1663
|
-
color: "#374151",
|
|
1664
1554
|
fontSize: 14,
|
|
1665
1555
|
paddingHorizontal: 12,
|
|
1666
1556
|
paddingVertical: 10
|
|
1667
1557
|
},
|
|
1668
|
-
inputDisabled: {
|
|
1669
|
-
backgroundColor: "#F9FAFB",
|
|
1670
|
-
color: "#9CA3AF"
|
|
1671
|
-
},
|
|
1672
1558
|
label: {
|
|
1673
|
-
color: "#374151",
|
|
1674
1559
|
fontSize: 14,
|
|
1675
1560
|
fontWeight: "500",
|
|
1676
1561
|
marginBottom: 8
|
|
@@ -1686,7 +1571,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1686
1571
|
gap: 8
|
|
1687
1572
|
},
|
|
1688
1573
|
modalContent: {
|
|
1689
|
-
backgroundColor: "#FFFFFF",
|
|
1690
1574
|
borderRadius: 12,
|
|
1691
1575
|
maxHeight: "80%",
|
|
1692
1576
|
padding: 16,
|
|
@@ -1694,7 +1578,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1694
1578
|
},
|
|
1695
1579
|
modalHeader: {
|
|
1696
1580
|
alignItems: "center",
|
|
1697
|
-
borderBottomColor: "#E5E7EB",
|
|
1698
1581
|
borderBottomWidth: 1,
|
|
1699
1582
|
flexDirection: "row",
|
|
1700
1583
|
justifyContent: "space-between",
|
|
@@ -1708,7 +1591,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1708
1591
|
justifyContent: "center"
|
|
1709
1592
|
},
|
|
1710
1593
|
modalTitle: {
|
|
1711
|
-
color: "#111827",
|
|
1712
1594
|
fontSize: 18,
|
|
1713
1595
|
fontWeight: "600"
|
|
1714
1596
|
},
|
|
@@ -1720,9 +1602,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1720
1602
|
paddingHorizontal: 12,
|
|
1721
1603
|
paddingVertical: 12
|
|
1722
1604
|
},
|
|
1723
|
-
optionSelected: {
|
|
1724
|
-
backgroundColor: "#EFF6FF"
|
|
1725
|
-
},
|
|
1726
1605
|
optionsList: {
|
|
1727
1606
|
flexGrow: 0,
|
|
1728
1607
|
flexShrink: 1
|
|
@@ -1731,18 +1610,13 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1731
1610
|
flexGrow: 0
|
|
1732
1611
|
},
|
|
1733
1612
|
optionText: {
|
|
1734
|
-
color: "#374151",
|
|
1735
1613
|
flex: 1,
|
|
1736
1614
|
fontSize: 14
|
|
1737
1615
|
},
|
|
1738
|
-
required: {
|
|
1739
|
-
color: "#EF4444"
|
|
1740
|
-
},
|
|
1741
1616
|
retryButton: {
|
|
1742
1617
|
marginTop: 12
|
|
1743
1618
|
},
|
|
1744
1619
|
retryButtonText: {
|
|
1745
|
-
color: "#3B82F6",
|
|
1746
1620
|
fontSize: 14,
|
|
1747
1621
|
textDecorationLine: "underline"
|
|
1748
1622
|
},
|
|
@@ -1750,19 +1624,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1750
1624
|
marginBottom: 12
|
|
1751
1625
|
},
|
|
1752
1626
|
searchInput: {
|
|
1753
|
-
backgroundColor: "#F9FAFB",
|
|
1754
|
-
borderColor: "#D1D5DB",
|
|
1755
1627
|
borderRadius: 6,
|
|
1756
1628
|
borderWidth: 1,
|
|
1757
|
-
color: "#374151",
|
|
1758
1629
|
fontSize: 14,
|
|
1759
1630
|
paddingHorizontal: 12,
|
|
1760
1631
|
paddingVertical: 10
|
|
1761
1632
|
},
|
|
1762
1633
|
trigger: {
|
|
1763
1634
|
alignItems: "center",
|
|
1764
|
-
backgroundColor: "#FFFFFF",
|
|
1765
|
-
borderColor: "#D1D5DB",
|
|
1766
1635
|
borderRadius: 6,
|
|
1767
1636
|
borderWidth: 1,
|
|
1768
1637
|
flexDirection: "row",
|
|
@@ -1770,129 +1639,114 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1770
1639
|
paddingHorizontal: 12,
|
|
1771
1640
|
paddingVertical: 10
|
|
1772
1641
|
},
|
|
1773
|
-
triggerDisabled: {
|
|
1774
|
-
backgroundColor: "#F9FAFB"
|
|
1775
|
-
},
|
|
1776
|
-
triggerError: {
|
|
1777
|
-
borderColor: "#EF4444"
|
|
1778
|
-
},
|
|
1779
1642
|
triggerLoader: {
|
|
1780
1643
|
marginRight: 8
|
|
1781
1644
|
},
|
|
1782
|
-
triggerPlaceholder: {
|
|
1783
|
-
color: "#9CA3AF"
|
|
1784
|
-
},
|
|
1785
1645
|
triggerText: {
|
|
1786
|
-
color: "#374151",
|
|
1787
1646
|
flex: 1,
|
|
1788
1647
|
fontSize: 14
|
|
1789
1648
|
}
|
|
1790
|
-
}),
|
|
1791
|
-
const [
|
|
1792
|
-
return
|
|
1793
|
-
|
|
1794
|
-
}, [
|
|
1795
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1796
|
-
|
|
1797
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1649
|
+
}), yt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
|
|
1650
|
+
const { colors: l } = q(), [g, a] = R(s?.toString() ?? "");
|
|
1651
|
+
return ge(() => {
|
|
1652
|
+
a(s?.toString() ?? "");
|
|
1653
|
+
}, [s]), /* @__PURE__ */ e.jsxs(x, { style: Se.container, children: [
|
|
1654
|
+
/* @__PURE__ */ e.jsxs(t, { style: [Se.label, { color: l.textSecondary }], children: [
|
|
1655
|
+
c || r.data.name,
|
|
1656
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
|
|
1798
1657
|
] }),
|
|
1799
1658
|
/* @__PURE__ */ e.jsx(
|
|
1800
|
-
|
|
1659
|
+
me,
|
|
1801
1660
|
{
|
|
1802
|
-
style: [
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1661
|
+
style: [
|
|
1662
|
+
Se.input,
|
|
1663
|
+
{ backgroundColor: l.input, borderColor: l.border, color: l.text },
|
|
1664
|
+
n && { borderColor: l.error }
|
|
1665
|
+
],
|
|
1666
|
+
value: g,
|
|
1667
|
+
onChangeText: (o) => {
|
|
1668
|
+
if (a(o), o.trim() === "") {
|
|
1669
|
+
i(null);
|
|
1807
1670
|
return;
|
|
1808
1671
|
}
|
|
1809
|
-
const
|
|
1810
|
-
Number.isNaN(
|
|
1672
|
+
const d = Number(o);
|
|
1673
|
+
Number.isNaN(d) || i(d);
|
|
1811
1674
|
},
|
|
1812
|
-
placeholder:
|
|
1675
|
+
placeholder: S,
|
|
1676
|
+
placeholderTextColor: l.textMuted,
|
|
1813
1677
|
keyboardType: "numeric",
|
|
1814
|
-
accessibilityLabel:
|
|
1678
|
+
accessibilityLabel: p
|
|
1815
1679
|
}
|
|
1816
1680
|
),
|
|
1817
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1818
|
-
|
|
1681
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [Se.error, { color: l.error }], children: n }),
|
|
1682
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [Se.helperText, { color: l.textMuted }], children: y })
|
|
1819
1683
|
] });
|
|
1820
|
-
},
|
|
1684
|
+
}, Se = _.create({
|
|
1821
1685
|
container: {
|
|
1822
1686
|
marginBottom: 16
|
|
1823
1687
|
},
|
|
1824
1688
|
error: {
|
|
1825
|
-
color: "#EF4444",
|
|
1826
1689
|
fontSize: 12,
|
|
1827
1690
|
marginTop: 4
|
|
1828
1691
|
},
|
|
1829
1692
|
helperText: {
|
|
1830
|
-
color: "#6B7280",
|
|
1831
1693
|
fontSize: 12,
|
|
1832
1694
|
marginTop: 4
|
|
1833
1695
|
},
|
|
1834
1696
|
input: {
|
|
1835
|
-
backgroundColor: "#FFFFFF",
|
|
1836
|
-
borderColor: "#D1D5DB",
|
|
1837
1697
|
borderRadius: 6,
|
|
1838
1698
|
borderWidth: 1,
|
|
1839
1699
|
fontSize: 14,
|
|
1840
1700
|
paddingHorizontal: 12,
|
|
1841
1701
|
paddingVertical: 8
|
|
1842
1702
|
},
|
|
1843
|
-
inputError: {
|
|
1844
|
-
borderColor: "#EF4444"
|
|
1845
|
-
},
|
|
1846
1703
|
label: {
|
|
1847
|
-
color: "#374151",
|
|
1848
1704
|
fontSize: 14,
|
|
1849
1705
|
fontWeight: "500",
|
|
1850
1706
|
marginBottom: 8
|
|
1851
|
-
},
|
|
1852
|
-
required: {
|
|
1853
|
-
color: "#EF4444"
|
|
1854
1707
|
}
|
|
1855
|
-
}),
|
|
1856
|
-
const [
|
|
1857
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1858
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1859
|
-
|
|
1860
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1708
|
+
}), pt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
|
|
1709
|
+
const { colors: l } = q(), [g, a] = R(!1);
|
|
1710
|
+
return /* @__PURE__ */ e.jsxs(x, { style: de.container, children: [
|
|
1711
|
+
/* @__PURE__ */ e.jsxs(t, { style: [de.label, { color: l.textSecondary }], children: [
|
|
1712
|
+
c || r.data.name,
|
|
1713
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
|
|
1861
1714
|
] }),
|
|
1862
|
-
/* @__PURE__ */ e.jsxs(
|
|
1715
|
+
/* @__PURE__ */ e.jsxs(x, { style: de.inputWrapper, children: [
|
|
1863
1716
|
/* @__PURE__ */ e.jsx(
|
|
1864
|
-
|
|
1717
|
+
me,
|
|
1865
1718
|
{
|
|
1866
|
-
style: [
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1719
|
+
style: [
|
|
1720
|
+
de.input,
|
|
1721
|
+
{ backgroundColor: l.input, borderColor: l.border, color: l.text },
|
|
1722
|
+
n && { borderColor: l.error }
|
|
1723
|
+
],
|
|
1724
|
+
value: s ?? "",
|
|
1725
|
+
onChangeText: i,
|
|
1726
|
+
placeholder: S,
|
|
1727
|
+
placeholderTextColor: l.textMuted,
|
|
1728
|
+
secureTextEntry: !g,
|
|
1729
|
+
accessibilityLabel: p
|
|
1872
1730
|
}
|
|
1873
1731
|
),
|
|
1874
|
-
/* @__PURE__ */ e.jsx(h, { style:
|
|
1732
|
+
/* @__PURE__ */ e.jsx(h, { style: de.toggleButton, onPress: () => a(!g), activeOpacity: 0.7, children: /* @__PURE__ */ e.jsx(t, { style: [de.toggleText, { color: l.primary }], children: g ? "Hide" : "Show" }) })
|
|
1875
1733
|
] }),
|
|
1876
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1877
|
-
|
|
1734
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [de.error, { color: l.error }], children: n }),
|
|
1735
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [de.helperText, { color: l.textMuted }], children: y })
|
|
1878
1736
|
] });
|
|
1879
|
-
},
|
|
1737
|
+
}, de = _.create({
|
|
1880
1738
|
container: {
|
|
1881
1739
|
marginBottom: 16
|
|
1882
1740
|
},
|
|
1883
1741
|
error: {
|
|
1884
|
-
color: "#EF4444",
|
|
1885
1742
|
fontSize: 12,
|
|
1886
1743
|
marginTop: 4
|
|
1887
1744
|
},
|
|
1888
1745
|
helperText: {
|
|
1889
|
-
color: "#6B7280",
|
|
1890
1746
|
fontSize: 12,
|
|
1891
1747
|
marginTop: 4
|
|
1892
1748
|
},
|
|
1893
1749
|
input: {
|
|
1894
|
-
backgroundColor: "#FFFFFF",
|
|
1895
|
-
borderColor: "#D1D5DB",
|
|
1896
1750
|
borderRadius: 6,
|
|
1897
1751
|
borderWidth: 1,
|
|
1898
1752
|
flex: 1,
|
|
@@ -1900,23 +1754,16 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1900
1754
|
paddingHorizontal: 12,
|
|
1901
1755
|
paddingVertical: 8
|
|
1902
1756
|
},
|
|
1903
|
-
inputError: {
|
|
1904
|
-
borderColor: "#EF4444"
|
|
1905
|
-
},
|
|
1906
1757
|
inputWrapper: {
|
|
1907
1758
|
alignItems: "center",
|
|
1908
1759
|
flexDirection: "row",
|
|
1909
1760
|
position: "relative"
|
|
1910
1761
|
},
|
|
1911
1762
|
label: {
|
|
1912
|
-
color: "#374151",
|
|
1913
1763
|
fontSize: 14,
|
|
1914
1764
|
fontWeight: "500",
|
|
1915
1765
|
marginBottom: 8
|
|
1916
1766
|
},
|
|
1917
|
-
required: {
|
|
1918
|
-
color: "#EF4444"
|
|
1919
|
-
},
|
|
1920
1767
|
toggleButton: {
|
|
1921
1768
|
paddingHorizontal: 12,
|
|
1922
1769
|
paddingVertical: 8,
|
|
@@ -1924,55 +1771,61 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1924
1771
|
right: 0
|
|
1925
1772
|
},
|
|
1926
1773
|
toggleText: {
|
|
1927
|
-
color: "#3B82F6",
|
|
1928
1774
|
fontSize: 12,
|
|
1929
1775
|
fontWeight: "600"
|
|
1930
1776
|
}
|
|
1931
|
-
}),
|
|
1932
|
-
const
|
|
1933
|
-
|
|
1777
|
+
}), ht = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
1778
|
+
const y = se(), { colors: p } = q(), l = r.data.options || [], g = s || "", a = (o) => {
|
|
1779
|
+
i(o);
|
|
1934
1780
|
};
|
|
1935
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1936
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
1937
|
-
|
|
1938
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
1781
|
+
return /* @__PURE__ */ e.jsxs(x, { style: ue.container, children: [
|
|
1782
|
+
/* @__PURE__ */ e.jsxs(t, { style: [ue.label, { color: p.textSecondary }], children: [
|
|
1783
|
+
c || r.data.name,
|
|
1784
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: p.error }, children: "*" })
|
|
1939
1785
|
] }),
|
|
1940
|
-
|
|
1941
|
-
const
|
|
1786
|
+
l.map((o) => {
|
|
1787
|
+
const d = g === o.value;
|
|
1942
1788
|
return /* @__PURE__ */ e.jsxs(
|
|
1943
1789
|
h,
|
|
1944
1790
|
{
|
|
1945
|
-
style:
|
|
1946
|
-
onPress: () =>
|
|
1947
|
-
disabled:
|
|
1791
|
+
style: ue.option,
|
|
1792
|
+
onPress: () => a(o.value),
|
|
1793
|
+
disabled: o.disabled,
|
|
1948
1794
|
activeOpacity: 0.7,
|
|
1949
1795
|
children: [
|
|
1950
|
-
/* @__PURE__ */ e.jsx(
|
|
1951
|
-
|
|
1796
|
+
/* @__PURE__ */ e.jsx(
|
|
1797
|
+
x,
|
|
1798
|
+
{
|
|
1799
|
+
style: [
|
|
1800
|
+
ue.radio,
|
|
1801
|
+
{ backgroundColor: p.input, borderColor: p.border },
|
|
1802
|
+
d && { borderColor: p.primary }
|
|
1803
|
+
],
|
|
1804
|
+
children: d && /* @__PURE__ */ e.jsx(x, { style: [ue.radioInner, { backgroundColor: p.primary }] })
|
|
1805
|
+
}
|
|
1806
|
+
),
|
|
1807
|
+
/* @__PURE__ */ e.jsx(t, { style: [ue.optionLabel, { color: p.textSecondary }, o.disabled && { color: p.textMuted }], children: y(o.label) || o.value })
|
|
1952
1808
|
]
|
|
1953
1809
|
},
|
|
1954
|
-
|
|
1810
|
+
o.value
|
|
1955
1811
|
);
|
|
1956
1812
|
}),
|
|
1957
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
1958
|
-
|
|
1813
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [ue.error, { color: p.error }], children: n }),
|
|
1814
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [ue.helperText, { color: p.textMuted }], children: S })
|
|
1959
1815
|
] });
|
|
1960
|
-
},
|
|
1816
|
+
}, ue = _.create({
|
|
1961
1817
|
container: {
|
|
1962
1818
|
marginBottom: 16
|
|
1963
1819
|
},
|
|
1964
1820
|
error: {
|
|
1965
|
-
color: "#EF4444",
|
|
1966
1821
|
fontSize: 12,
|
|
1967
1822
|
marginTop: 4
|
|
1968
1823
|
},
|
|
1969
1824
|
helperText: {
|
|
1970
|
-
color: "#6B7280",
|
|
1971
1825
|
fontSize: 12,
|
|
1972
1826
|
marginTop: 4
|
|
1973
1827
|
},
|
|
1974
1828
|
label: {
|
|
1975
|
-
color: "#374151",
|
|
1976
1829
|
fontSize: 14,
|
|
1977
1830
|
fontWeight: "500",
|
|
1978
1831
|
marginBottom: 8
|
|
@@ -1983,16 +1836,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
1983
1836
|
marginBottom: 8
|
|
1984
1837
|
},
|
|
1985
1838
|
optionLabel: {
|
|
1986
|
-
color: "#374151",
|
|
1987
1839
|
fontSize: 14
|
|
1988
1840
|
},
|
|
1989
|
-
optionLabelDisabled: {
|
|
1990
|
-
color: "#9CA3AF"
|
|
1991
|
-
},
|
|
1992
1841
|
radio: {
|
|
1993
1842
|
alignItems: "center",
|
|
1994
|
-
backgroundColor: "#FFFFFF",
|
|
1995
|
-
borderColor: "#D1D5DB",
|
|
1996
1843
|
borderRadius: 10,
|
|
1997
1844
|
borderWidth: 2,
|
|
1998
1845
|
height: 20,
|
|
@@ -2001,80 +1848,78 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2001
1848
|
width: 20
|
|
2002
1849
|
},
|
|
2003
1850
|
radioInner: {
|
|
2004
|
-
backgroundColor: "#3B82F6",
|
|
2005
1851
|
borderRadius: 5,
|
|
2006
1852
|
height: 10,
|
|
2007
1853
|
width: 10
|
|
2008
|
-
},
|
|
2009
|
-
radioSelected: {
|
|
2010
|
-
borderColor: "#3B82F6"
|
|
2011
|
-
},
|
|
2012
|
-
required: {
|
|
2013
|
-
color: "#EF4444"
|
|
2014
1854
|
}
|
|
2015
|
-
}), ft = ({ node: r, value:
|
|
2016
|
-
const [
|
|
2017
|
-
if (
|
|
2018
|
-
const
|
|
2019
|
-
|
|
1855
|
+
}), ft = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
|
|
1856
|
+
const [p, l] = R(!1), g = se(), { colors: a } = q(), o = r.data.options || [], d = r.data.multiple, m = Array.isArray(s) ? s : s ? [s] : [], C = (w) => {
|
|
1857
|
+
if (d) {
|
|
1858
|
+
const f = m.includes(w) ? m.filter((b) => b !== w) : [...m, w];
|
|
1859
|
+
i(f);
|
|
2020
1860
|
} else
|
|
2021
|
-
|
|
2022
|
-
},
|
|
2023
|
-
if (
|
|
2024
|
-
return
|
|
2025
|
-
if (
|
|
2026
|
-
return
|
|
2027
|
-
const
|
|
2028
|
-
return
|
|
1861
|
+
i(w), l(!1);
|
|
1862
|
+
}, v = () => {
|
|
1863
|
+
if (m.length === 0)
|
|
1864
|
+
return S || "Select...";
|
|
1865
|
+
if (d)
|
|
1866
|
+
return o.filter((b) => m.includes(b.value)).map((b) => g(b.label) || b.value).join(", ");
|
|
1867
|
+
const w = o.find((f) => f.value === m[0]);
|
|
1868
|
+
return w ? g(w.label) || w.value : S || "Select...";
|
|
2029
1869
|
};
|
|
2030
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2031
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
2032
|
-
|
|
2033
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
2034
|
-
] }),
|
|
2035
|
-
/* @__PURE__ */ e.jsxs(h, { style: [M.trigger, n && M.triggerError], onPress: () => y(!0), activeOpacity: 0.7, children: [
|
|
2036
|
-
/* @__PURE__ */ e.jsx(t, { style: [M.triggerText, i.length === 0 && M.triggerPlaceholder], children: z() }),
|
|
2037
|
-
/* @__PURE__ */ e.jsx(t, { style: M.arrow, children: "▼" })
|
|
1870
|
+
return /* @__PURE__ */ e.jsxs(x, { style: J.container, children: [
|
|
1871
|
+
/* @__PURE__ */ e.jsxs(t, { style: [J.label, { color: a.textSecondary }], children: [
|
|
1872
|
+
c || r.data.name,
|
|
1873
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: a.error }, children: "*" })
|
|
2038
1874
|
] }),
|
|
2039
|
-
/* @__PURE__ */ e.
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
1875
|
+
/* @__PURE__ */ e.jsxs(
|
|
1876
|
+
h,
|
|
1877
|
+
{
|
|
1878
|
+
style: [J.trigger, { backgroundColor: a.input, borderColor: a.border }, n && { borderColor: a.error }],
|
|
1879
|
+
onPress: () => l(!0),
|
|
1880
|
+
activeOpacity: 0.7,
|
|
1881
|
+
children: [
|
|
1882
|
+
/* @__PURE__ */ e.jsx(t, { style: [J.triggerText, { color: a.text }, m.length === 0 && { color: a.textMuted }], children: v() }),
|
|
1883
|
+
/* @__PURE__ */ e.jsx(t, { style: [J.arrow, { color: a.textMuted }], children: "▼" })
|
|
1884
|
+
]
|
|
1885
|
+
}
|
|
1886
|
+
),
|
|
1887
|
+
/* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: J.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(x, { style: [J.modalContent, { backgroundColor: a.card }], onStartShouldSetResponder: () => !0, children: [
|
|
1888
|
+
/* @__PURE__ */ e.jsxs(x, { style: [J.modalHeader, { borderBottomColor: a.border }], children: [
|
|
1889
|
+
/* @__PURE__ */ e.jsx(t, { style: [J.modalTitle, { color: a.text }], children: c || r.data.name }),
|
|
1890
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [J.closeButton, { color: a.textMuted }], children: "✕" }) })
|
|
2043
1891
|
] }),
|
|
2044
|
-
/* @__PURE__ */ e.jsx(
|
|
2045
|
-
const
|
|
1892
|
+
/* @__PURE__ */ e.jsx(be, { style: J.optionsList, children: o.map((w) => {
|
|
1893
|
+
const f = m.includes(w.value);
|
|
2046
1894
|
return /* @__PURE__ */ e.jsxs(
|
|
2047
1895
|
h,
|
|
2048
1896
|
{
|
|
2049
|
-
style: [
|
|
2050
|
-
onPress: () =>
|
|
2051
|
-
disabled:
|
|
1897
|
+
style: [J.option, f && { backgroundColor: `${a.primary}20` }],
|
|
1898
|
+
onPress: () => C(w.value),
|
|
1899
|
+
disabled: w.disabled,
|
|
2052
1900
|
activeOpacity: 0.7,
|
|
2053
1901
|
children: [
|
|
2054
|
-
/* @__PURE__ */ e.jsx(t, { style: [
|
|
2055
|
-
|
|
1902
|
+
/* @__PURE__ */ e.jsx(t, { style: [J.optionText, { color: a.textSecondary }, w.disabled && { color: a.textMuted }], children: g(w.label) || w.value }),
|
|
1903
|
+
f && /* @__PURE__ */ e.jsx(t, { style: [J.checkmark, { color: a.primary }], children: "✓" })
|
|
2056
1904
|
]
|
|
2057
1905
|
},
|
|
2058
|
-
|
|
1906
|
+
w.value
|
|
2059
1907
|
);
|
|
2060
1908
|
}) }),
|
|
2061
|
-
|
|
1909
|
+
d && /* @__PURE__ */ e.jsx(h, { style: [J.doneButton, { backgroundColor: a.primary }], onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: J.doneButtonText, children: "Done" }) })
|
|
2062
1910
|
] }) }) }),
|
|
2063
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
2064
|
-
|
|
1911
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [J.error, { color: a.error }], children: n }),
|
|
1912
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [J.helperText, { color: a.textMuted }], children: y })
|
|
2065
1913
|
] });
|
|
2066
|
-
},
|
|
1914
|
+
}, J = _.create({
|
|
2067
1915
|
arrow: {
|
|
2068
|
-
color: "#6B7280",
|
|
2069
1916
|
fontSize: 12
|
|
2070
1917
|
},
|
|
2071
1918
|
checkmark: {
|
|
2072
|
-
color: "#3B82F6",
|
|
2073
1919
|
fontSize: 18,
|
|
2074
1920
|
fontWeight: "700"
|
|
2075
1921
|
},
|
|
2076
1922
|
closeButton: {
|
|
2077
|
-
color: "#6B7280",
|
|
2078
1923
|
fontSize: 24,
|
|
2079
1924
|
fontWeight: "300"
|
|
2080
1925
|
},
|
|
@@ -2083,7 +1928,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2083
1928
|
},
|
|
2084
1929
|
doneButton: {
|
|
2085
1930
|
alignItems: "center",
|
|
2086
|
-
backgroundColor: "#3B82F6",
|
|
2087
1931
|
borderRadius: 6,
|
|
2088
1932
|
marginTop: 12,
|
|
2089
1933
|
paddingVertical: 12
|
|
@@ -2094,23 +1938,19 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2094
1938
|
fontWeight: "600"
|
|
2095
1939
|
},
|
|
2096
1940
|
error: {
|
|
2097
|
-
color: "#EF4444",
|
|
2098
1941
|
fontSize: 12,
|
|
2099
1942
|
marginTop: 4
|
|
2100
1943
|
},
|
|
2101
1944
|
helperText: {
|
|
2102
|
-
color: "#6B7280",
|
|
2103
1945
|
fontSize: 12,
|
|
2104
1946
|
marginTop: 4
|
|
2105
1947
|
},
|
|
2106
1948
|
label: {
|
|
2107
|
-
color: "#374151",
|
|
2108
1949
|
fontSize: 14,
|
|
2109
1950
|
fontWeight: "500",
|
|
2110
1951
|
marginBottom: 8
|
|
2111
1952
|
},
|
|
2112
1953
|
modalContent: {
|
|
2113
|
-
backgroundColor: "#FFFFFF",
|
|
2114
1954
|
borderRadius: 12,
|
|
2115
1955
|
maxHeight: "80%",
|
|
2116
1956
|
padding: 16,
|
|
@@ -2118,7 +1958,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2118
1958
|
},
|
|
2119
1959
|
modalHeader: {
|
|
2120
1960
|
alignItems: "center",
|
|
2121
|
-
borderBottomColor: "#E5E7EB",
|
|
2122
1961
|
borderBottomWidth: 1,
|
|
2123
1962
|
flexDirection: "row",
|
|
2124
1963
|
justifyContent: "space-between",
|
|
@@ -2132,7 +1971,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2132
1971
|
justifyContent: "center"
|
|
2133
1972
|
},
|
|
2134
1973
|
modalTitle: {
|
|
2135
|
-
color: "#111827",
|
|
2136
1974
|
fontSize: 18,
|
|
2137
1975
|
fontWeight: "600"
|
|
2138
1976
|
},
|
|
@@ -2144,26 +1982,14 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2144
1982
|
paddingHorizontal: 12,
|
|
2145
1983
|
paddingVertical: 12
|
|
2146
1984
|
},
|
|
2147
|
-
optionSelected: {
|
|
2148
|
-
backgroundColor: "#EFF6FF"
|
|
2149
|
-
},
|
|
2150
1985
|
optionsList: {
|
|
2151
1986
|
maxHeight: 300
|
|
2152
1987
|
},
|
|
2153
1988
|
optionText: {
|
|
2154
|
-
color: "#374151",
|
|
2155
1989
|
fontSize: 14
|
|
2156
1990
|
},
|
|
2157
|
-
optionTextDisabled: {
|
|
2158
|
-
color: "#9CA3AF"
|
|
2159
|
-
},
|
|
2160
|
-
required: {
|
|
2161
|
-
color: "#EF4444"
|
|
2162
|
-
},
|
|
2163
1991
|
trigger: {
|
|
2164
1992
|
alignItems: "center",
|
|
2165
|
-
backgroundColor: "#FFFFFF",
|
|
2166
|
-
borderColor: "#D1D5DB",
|
|
2167
1993
|
borderRadius: 6,
|
|
2168
1994
|
borderWidth: 1,
|
|
2169
1995
|
flexDirection: "row",
|
|
@@ -2171,266 +1997,280 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2171
1997
|
paddingHorizontal: 12,
|
|
2172
1998
|
paddingVertical: 10
|
|
2173
1999
|
},
|
|
2174
|
-
triggerError: {
|
|
2175
|
-
borderColor: "#EF4444"
|
|
2176
|
-
},
|
|
2177
|
-
triggerPlaceholder: {
|
|
2178
|
-
color: "#9CA3AF"
|
|
2179
|
-
},
|
|
2180
2000
|
triggerText: {
|
|
2181
|
-
color: "#374151",
|
|
2182
2001
|
flex: 1,
|
|
2183
2002
|
fontSize: 14
|
|
2184
2003
|
}
|
|
2185
|
-
}),
|
|
2186
|
-
const
|
|
2187
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2188
|
-
/* @__PURE__ */ e.jsxs(
|
|
2189
|
-
/* @__PURE__ */ e.jsx(
|
|
2190
|
-
|
|
2191
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
2004
|
+
}), bt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
2005
|
+
const { colors: y } = q(), p = !!s;
|
|
2006
|
+
return /* @__PURE__ */ e.jsxs(x, { style: pe.container, children: [
|
|
2007
|
+
/* @__PURE__ */ e.jsxs(x, { style: pe.row, children: [
|
|
2008
|
+
/* @__PURE__ */ e.jsx(x, { style: pe.labelContainer, children: /* @__PURE__ */ e.jsxs(t, { style: [pe.label, { color: y.textSecondary }], children: [
|
|
2009
|
+
c || r.data.name,
|
|
2010
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: y.error }, children: "*" })
|
|
2192
2011
|
] }) }),
|
|
2193
2012
|
/* @__PURE__ */ e.jsx(
|
|
2194
|
-
|
|
2013
|
+
Ze,
|
|
2195
2014
|
{
|
|
2196
|
-
trackColor: { false:
|
|
2197
|
-
thumbColor:
|
|
2198
|
-
ios_backgroundColor:
|
|
2199
|
-
onValueChange:
|
|
2200
|
-
value:
|
|
2015
|
+
trackColor: { false: y.border, true: `${y.primary}80` },
|
|
2016
|
+
thumbColor: p ? y.primary : y.card,
|
|
2017
|
+
ios_backgroundColor: y.border,
|
|
2018
|
+
onValueChange: i,
|
|
2019
|
+
value: p
|
|
2201
2020
|
}
|
|
2202
2021
|
)
|
|
2203
2022
|
] }),
|
|
2204
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
2205
|
-
|
|
2023
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [pe.error, { color: y.error }], children: n }),
|
|
2024
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [pe.helperText, { color: y.textMuted }], children: S })
|
|
2206
2025
|
] });
|
|
2207
|
-
},
|
|
2026
|
+
}, pe = _.create({
|
|
2208
2027
|
container: {
|
|
2209
2028
|
marginBottom: 16
|
|
2210
2029
|
},
|
|
2211
2030
|
error: {
|
|
2212
|
-
color: "#EF4444",
|
|
2213
2031
|
fontSize: 12,
|
|
2214
2032
|
marginTop: 4
|
|
2215
2033
|
},
|
|
2216
2034
|
helperText: {
|
|
2217
|
-
color: "#6B7280",
|
|
2218
2035
|
fontSize: 12,
|
|
2219
2036
|
marginTop: 4
|
|
2220
2037
|
},
|
|
2221
2038
|
label: {
|
|
2222
|
-
color: "#374151",
|
|
2223
2039
|
fontSize: 14,
|
|
2224
2040
|
fontWeight: "500"
|
|
2225
2041
|
},
|
|
2226
2042
|
labelContainer: {
|
|
2227
2043
|
flex: 1
|
|
2228
2044
|
},
|
|
2229
|
-
required: {
|
|
2230
|
-
color: "#EF4444"
|
|
2231
|
-
},
|
|
2232
2045
|
row: {
|
|
2233
2046
|
alignItems: "center",
|
|
2234
2047
|
flexDirection: "row",
|
|
2235
2048
|
justifyContent: "space-between"
|
|
2236
2049
|
}
|
|
2237
|
-
}),
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2050
|
+
}), jt = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
|
|
2051
|
+
const { colors: l } = q();
|
|
2052
|
+
return /* @__PURE__ */ e.jsxs(x, { style: Te.container, children: [
|
|
2053
|
+
/* @__PURE__ */ e.jsxs(t, { style: [Te.label, { color: l.textSecondary }], children: [
|
|
2054
|
+
c || r.data.name,
|
|
2055
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
|
|
2056
|
+
] }),
|
|
2057
|
+
/* @__PURE__ */ e.jsx(
|
|
2058
|
+
me,
|
|
2059
|
+
{
|
|
2060
|
+
style: [
|
|
2061
|
+
Te.textarea,
|
|
2062
|
+
{ backgroundColor: l.input, borderColor: l.border, color: l.text },
|
|
2063
|
+
n && { borderColor: l.error }
|
|
2064
|
+
],
|
|
2065
|
+
value: s ?? "",
|
|
2066
|
+
onChangeText: i,
|
|
2067
|
+
placeholder: S,
|
|
2068
|
+
placeholderTextColor: l.textMuted,
|
|
2069
|
+
multiline: !0,
|
|
2070
|
+
numberOfLines: 4,
|
|
2071
|
+
textAlignVertical: "top",
|
|
2072
|
+
accessibilityLabel: p
|
|
2073
|
+
}
|
|
2074
|
+
),
|
|
2075
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [Te.error, { color: l.error }], children: n }),
|
|
2076
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [Te.helperText, { color: l.textMuted }], children: y })
|
|
2077
|
+
] });
|
|
2078
|
+
}, Te = _.create({
|
|
2258
2079
|
container: {
|
|
2259
2080
|
marginBottom: 16
|
|
2260
2081
|
},
|
|
2261
2082
|
error: {
|
|
2262
|
-
color: "#EF4444",
|
|
2263
2083
|
fontSize: 12,
|
|
2264
2084
|
marginTop: 4
|
|
2265
2085
|
},
|
|
2266
2086
|
helperText: {
|
|
2267
|
-
color: "#6B7280",
|
|
2268
2087
|
fontSize: 12,
|
|
2269
2088
|
marginTop: 4
|
|
2270
2089
|
},
|
|
2271
2090
|
label: {
|
|
2272
|
-
color: "#374151",
|
|
2273
2091
|
fontSize: 14,
|
|
2274
2092
|
fontWeight: "500",
|
|
2275
2093
|
marginBottom: 8
|
|
2276
2094
|
},
|
|
2277
|
-
required: {
|
|
2278
|
-
color: "#EF4444"
|
|
2279
|
-
},
|
|
2280
2095
|
textarea: {
|
|
2281
|
-
backgroundColor: "#FFFFFF",
|
|
2282
|
-
borderColor: "#D1D5DB",
|
|
2283
2096
|
borderRadius: 6,
|
|
2284
2097
|
borderWidth: 1,
|
|
2285
2098
|
fontSize: 14,
|
|
2286
2099
|
minHeight: 100,
|
|
2287
2100
|
paddingHorizontal: 12,
|
|
2288
2101
|
paddingVertical: 8
|
|
2289
|
-
},
|
|
2290
|
-
textareaError: {
|
|
2291
|
-
borderColor: "#EF4444"
|
|
2292
2102
|
}
|
|
2293
|
-
}),
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2103
|
+
}), Ct = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y, name: p }) => {
|
|
2104
|
+
const { colors: l } = q();
|
|
2105
|
+
return /* @__PURE__ */ e.jsxs(x, { style: ke.container, children: [
|
|
2106
|
+
/* @__PURE__ */ e.jsxs(t, { style: [ke.label, { color: l.textSecondary }], children: [
|
|
2107
|
+
c || r.data.name,
|
|
2108
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: l.error }, children: "*" })
|
|
2109
|
+
] }),
|
|
2110
|
+
/* @__PURE__ */ e.jsx(
|
|
2111
|
+
me,
|
|
2112
|
+
{
|
|
2113
|
+
style: [
|
|
2114
|
+
ke.input,
|
|
2115
|
+
{ backgroundColor: l.input, borderColor: l.border, color: l.text },
|
|
2116
|
+
n && { borderColor: l.error }
|
|
2117
|
+
],
|
|
2118
|
+
value: s ?? "",
|
|
2119
|
+
onChangeText: i,
|
|
2120
|
+
placeholder: S,
|
|
2121
|
+
placeholderTextColor: l.textMuted,
|
|
2122
|
+
accessibilityLabel: p
|
|
2123
|
+
}
|
|
2124
|
+
),
|
|
2125
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [ke.error, { color: l.error }], children: n }),
|
|
2126
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [ke.helperText, { color: l.textMuted }], children: y })
|
|
2127
|
+
] });
|
|
2128
|
+
}, ke = _.create({
|
|
2311
2129
|
container: {
|
|
2312
2130
|
marginBottom: 16
|
|
2313
2131
|
},
|
|
2314
2132
|
error: {
|
|
2315
|
-
color: "#EF4444",
|
|
2316
2133
|
fontSize: 12,
|
|
2317
2134
|
marginTop: 4
|
|
2318
2135
|
},
|
|
2319
2136
|
helperText: {
|
|
2320
|
-
color: "#6B7280",
|
|
2321
2137
|
fontSize: 12,
|
|
2322
2138
|
marginTop: 4
|
|
2323
2139
|
},
|
|
2324
2140
|
input: {
|
|
2325
|
-
backgroundColor: "#FFFFFF",
|
|
2326
|
-
borderColor: "#D1D5DB",
|
|
2327
2141
|
borderRadius: 6,
|
|
2328
2142
|
borderWidth: 1,
|
|
2329
2143
|
fontSize: 14,
|
|
2330
2144
|
paddingHorizontal: 12,
|
|
2331
2145
|
paddingVertical: 8
|
|
2332
2146
|
},
|
|
2333
|
-
inputError: {
|
|
2334
|
-
borderColor: "#EF4444"
|
|
2335
|
-
},
|
|
2336
2147
|
label: {
|
|
2337
|
-
color: "#374151",
|
|
2338
2148
|
fontSize: 14,
|
|
2339
2149
|
fontWeight: "500",
|
|
2340
2150
|
marginBottom: 8
|
|
2341
|
-
},
|
|
2342
|
-
required: {
|
|
2343
|
-
color: "#EF4444"
|
|
2344
2151
|
}
|
|
2345
|
-
}),
|
|
2346
|
-
const [
|
|
2347
|
-
const
|
|
2348
|
-
|
|
2349
|
-
}, [
|
|
2350
|
-
|
|
2152
|
+
}), St = ({ node: r, value: s, setValue: i, error: n, label: c, placeholder: S, helperText: y }) => {
|
|
2153
|
+
const [p, l] = R(!1), { colors: g } = q(), o = (s || "").split(":"), d = Number.parseInt(o[0], 10), m = Number.parseInt(o[1], 10), C = Number.isNaN(d) ? 0 : d, v = Number.isNaN(m) ? 0 : m, [w, f] = R(C || 0), [b, z] = R(v || 0), j = ie(null), P = ie(null), u = Array.from({ length: 24 }, (T, A) => A), D = Array.from({ length: 60 }, (T, A) => A), N = () => s || S || "Select time", K = ye(() => {
|
|
2154
|
+
const T = `${String(w).padStart(2, "0")}:${String(b).padStart(2, "0")}`;
|
|
2155
|
+
i(T), l(!1);
|
|
2156
|
+
}, [w, b, i]), te = () => {
|
|
2157
|
+
f(C || 0), z(v || 0), l(!0);
|
|
2351
2158
|
};
|
|
2352
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2353
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
2354
|
-
|
|
2355
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
2159
|
+
return /* @__PURE__ */ e.jsxs(x, { style: H.container, children: [
|
|
2160
|
+
/* @__PURE__ */ e.jsxs(t, { style: [H.label, { color: g.textSecondary }], children: [
|
|
2161
|
+
c || r.data.name,
|
|
2162
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: g.error }, children: "*" })
|
|
2356
2163
|
] }),
|
|
2357
|
-
/* @__PURE__ */ e.jsxs(
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2164
|
+
/* @__PURE__ */ e.jsxs(
|
|
2165
|
+
h,
|
|
2166
|
+
{
|
|
2167
|
+
style: [H.trigger, { backgroundColor: g.input, borderColor: g.border }, n && { borderColor: g.error }],
|
|
2168
|
+
onPress: te,
|
|
2169
|
+
activeOpacity: 0.7,
|
|
2170
|
+
children: [
|
|
2171
|
+
/* @__PURE__ */ e.jsx(t, { style: [H.triggerText, { color: g.text }, !s && { color: g.textMuted }], numberOfLines: 1, children: N() }),
|
|
2172
|
+
/* @__PURE__ */ e.jsx(t, { style: H.icon, children: "🕐" })
|
|
2173
|
+
]
|
|
2174
|
+
}
|
|
2175
|
+
),
|
|
2176
|
+
/* @__PURE__ */ e.jsx(ae, { visible: p, transparent: !0, animationType: "fade", onRequestClose: () => l(!1), children: /* @__PURE__ */ e.jsx(h, { style: H.modalOverlay, activeOpacity: 1, onPress: () => l(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [H.modalContent, { backgroundColor: g.card }], activeOpacity: 1, onPress: () => {
|
|
2362
2177
|
}, children: [
|
|
2363
|
-
/* @__PURE__ */ e.jsxs(
|
|
2364
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2365
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
2178
|
+
/* @__PURE__ */ e.jsxs(x, { style: [H.modalHeader, { borderBottomColor: g.separator }], children: [
|
|
2179
|
+
/* @__PURE__ */ e.jsx(t, { style: [H.modalTitle, { color: g.text }], children: c || r.data.name }),
|
|
2180
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => l(!1), children: /* @__PURE__ */ e.jsx(t, { style: [H.closeButton, { color: g.textMuted }], children: "✕" }) })
|
|
2366
2181
|
] }),
|
|
2367
|
-
/* @__PURE__ */ e.jsxs(
|
|
2368
|
-
/* @__PURE__ */ e.jsxs(
|
|
2369
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2182
|
+
/* @__PURE__ */ e.jsxs(x, { style: H.pickerContainer, children: [
|
|
2183
|
+
/* @__PURE__ */ e.jsxs(x, { style: H.pickerColumn, children: [
|
|
2184
|
+
/* @__PURE__ */ e.jsx(t, { style: [H.pickerLabel, { color: g.textMuted }], children: "Hour" }),
|
|
2370
2185
|
/* @__PURE__ */ e.jsx(
|
|
2371
|
-
|
|
2186
|
+
be,
|
|
2372
2187
|
{
|
|
2373
|
-
ref:
|
|
2374
|
-
style:
|
|
2375
|
-
contentContainerStyle:
|
|
2188
|
+
ref: j,
|
|
2189
|
+
style: H.picker,
|
|
2190
|
+
contentContainerStyle: H.pickerContent,
|
|
2376
2191
|
showsVerticalScrollIndicator: !1,
|
|
2377
|
-
children:
|
|
2192
|
+
children: u.map((T) => /* @__PURE__ */ e.jsx(
|
|
2378
2193
|
h,
|
|
2379
2194
|
{
|
|
2380
|
-
style: [
|
|
2381
|
-
onPress: () =>
|
|
2195
|
+
style: [H.pickerItem, w === T && { backgroundColor: g.primary }],
|
|
2196
|
+
onPress: () => f(T),
|
|
2382
2197
|
activeOpacity: 0.7,
|
|
2383
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2198
|
+
children: /* @__PURE__ */ e.jsx(
|
|
2199
|
+
t,
|
|
2200
|
+
{
|
|
2201
|
+
style: [
|
|
2202
|
+
H.pickerItemText,
|
|
2203
|
+
{ color: g.text },
|
|
2204
|
+
w === T && { color: g.background, fontWeight: "600" }
|
|
2205
|
+
],
|
|
2206
|
+
children: String(T).padStart(2, "0")
|
|
2207
|
+
}
|
|
2208
|
+
)
|
|
2384
2209
|
},
|
|
2385
|
-
|
|
2210
|
+
T
|
|
2386
2211
|
))
|
|
2387
2212
|
}
|
|
2388
2213
|
)
|
|
2389
2214
|
] }),
|
|
2390
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2391
|
-
/* @__PURE__ */ e.jsxs(
|
|
2392
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2215
|
+
/* @__PURE__ */ e.jsx(t, { style: [H.pickerSeparator, { color: g.text }], children: ":" }),
|
|
2216
|
+
/* @__PURE__ */ e.jsxs(x, { style: H.pickerColumn, children: [
|
|
2217
|
+
/* @__PURE__ */ e.jsx(t, { style: [H.pickerLabel, { color: g.textMuted }], children: "Minute" }),
|
|
2393
2218
|
/* @__PURE__ */ e.jsx(
|
|
2394
|
-
|
|
2219
|
+
be,
|
|
2395
2220
|
{
|
|
2396
|
-
ref:
|
|
2397
|
-
style:
|
|
2398
|
-
contentContainerStyle:
|
|
2221
|
+
ref: P,
|
|
2222
|
+
style: H.picker,
|
|
2223
|
+
contentContainerStyle: H.pickerContent,
|
|
2399
2224
|
showsVerticalScrollIndicator: !1,
|
|
2400
|
-
children:
|
|
2225
|
+
children: D.map((T) => /* @__PURE__ */ e.jsx(
|
|
2401
2226
|
h,
|
|
2402
2227
|
{
|
|
2403
|
-
style: [
|
|
2404
|
-
onPress: () =>
|
|
2228
|
+
style: [H.pickerItem, b === T && { backgroundColor: g.primary }],
|
|
2229
|
+
onPress: () => z(T),
|
|
2405
2230
|
activeOpacity: 0.7,
|
|
2406
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2231
|
+
children: /* @__PURE__ */ e.jsx(
|
|
2232
|
+
t,
|
|
2233
|
+
{
|
|
2234
|
+
style: [
|
|
2235
|
+
H.pickerItemText,
|
|
2236
|
+
{ color: g.text },
|
|
2237
|
+
b === T && { color: g.background, fontWeight: "600" }
|
|
2238
|
+
],
|
|
2239
|
+
children: String(T).padStart(2, "0")
|
|
2240
|
+
}
|
|
2241
|
+
)
|
|
2407
2242
|
},
|
|
2408
|
-
|
|
2243
|
+
T
|
|
2409
2244
|
))
|
|
2410
2245
|
}
|
|
2411
2246
|
)
|
|
2412
2247
|
] })
|
|
2413
2248
|
] }),
|
|
2414
|
-
/* @__PURE__ */ e.jsx(
|
|
2249
|
+
/* @__PURE__ */ e.jsx(
|
|
2250
|
+
h,
|
|
2251
|
+
{
|
|
2252
|
+
style: [H.confirmButton, { backgroundColor: g.primary }],
|
|
2253
|
+
onPress: K,
|
|
2254
|
+
activeOpacity: 0.7,
|
|
2255
|
+
children: /* @__PURE__ */ e.jsx(t, { style: [H.confirmButtonText, { color: g.background }], children: "Confirm" })
|
|
2256
|
+
}
|
|
2257
|
+
)
|
|
2415
2258
|
] }) }) }),
|
|
2416
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
2417
|
-
|
|
2259
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [H.error, { color: g.error }], children: n }),
|
|
2260
|
+
y && !n && /* @__PURE__ */ e.jsx(t, { style: [H.helperText, { color: g.textMuted }], children: y })
|
|
2418
2261
|
] });
|
|
2419
|
-
},
|
|
2262
|
+
}, H = _.create({
|
|
2420
2263
|
closeButton: {
|
|
2421
|
-
color: "#6B7280",
|
|
2422
2264
|
fontSize: 24,
|
|
2423
2265
|
fontWeight: "300"
|
|
2424
2266
|
},
|
|
2425
2267
|
confirmButton: {
|
|
2426
2268
|
alignItems: "center",
|
|
2427
|
-
backgroundColor: "#3B82F6",
|
|
2428
2269
|
borderRadius: 6,
|
|
2429
2270
|
marginTop: 16,
|
|
2430
2271
|
paddingVertical: 12
|
|
2431
2272
|
},
|
|
2432
2273
|
confirmButtonText: {
|
|
2433
|
-
color: "#FFFFFF",
|
|
2434
2274
|
fontSize: 16,
|
|
2435
2275
|
fontWeight: "600"
|
|
2436
2276
|
},
|
|
@@ -2438,12 +2278,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2438
2278
|
marginBottom: 16
|
|
2439
2279
|
},
|
|
2440
2280
|
error: {
|
|
2441
|
-
color: "#EF4444",
|
|
2442
2281
|
fontSize: 12,
|
|
2443
2282
|
marginTop: 4
|
|
2444
2283
|
},
|
|
2445
2284
|
helperText: {
|
|
2446
|
-
color: "#6B7280",
|
|
2447
2285
|
fontSize: 12,
|
|
2448
2286
|
marginTop: 4
|
|
2449
2287
|
},
|
|
@@ -2451,20 +2289,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2451
2289
|
fontSize: 16
|
|
2452
2290
|
},
|
|
2453
2291
|
label: {
|
|
2454
|
-
color: "#374151",
|
|
2455
2292
|
fontSize: 14,
|
|
2456
2293
|
fontWeight: "500",
|
|
2457
2294
|
marginBottom: 8
|
|
2458
2295
|
},
|
|
2459
2296
|
modalContent: {
|
|
2460
|
-
backgroundColor: "#FFFFFF",
|
|
2461
2297
|
borderRadius: 12,
|
|
2462
2298
|
padding: 16,
|
|
2463
2299
|
width: "80%"
|
|
2464
2300
|
},
|
|
2465
2301
|
modalHeader: {
|
|
2466
2302
|
alignItems: "center",
|
|
2467
|
-
borderBottomColor: "#E5E7EB",
|
|
2468
2303
|
borderBottomWidth: 1,
|
|
2469
2304
|
flexDirection: "row",
|
|
2470
2305
|
justifyContent: "space-between",
|
|
@@ -2478,7 +2313,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2478
2313
|
justifyContent: "center"
|
|
2479
2314
|
},
|
|
2480
2315
|
modalTitle: {
|
|
2481
|
-
color: "#111827",
|
|
2482
2316
|
fontSize: 18,
|
|
2483
2317
|
fontWeight: "600"
|
|
2484
2318
|
},
|
|
@@ -2502,36 +2336,21 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2502
2336
|
marginVertical: 2,
|
|
2503
2337
|
paddingVertical: 10
|
|
2504
2338
|
},
|
|
2505
|
-
pickerItemSelected: {
|
|
2506
|
-
backgroundColor: "#3B82F6"
|
|
2507
|
-
},
|
|
2508
2339
|
pickerItemText: {
|
|
2509
|
-
color: "#374151",
|
|
2510
2340
|
fontSize: 18
|
|
2511
2341
|
},
|
|
2512
|
-
pickerItemTextSelected: {
|
|
2513
|
-
color: "#FFFFFF",
|
|
2514
|
-
fontWeight: "600"
|
|
2515
|
-
},
|
|
2516
2342
|
pickerLabel: {
|
|
2517
|
-
color: "#6B7280",
|
|
2518
2343
|
fontSize: 12,
|
|
2519
2344
|
fontWeight: "600",
|
|
2520
2345
|
marginBottom: 8,
|
|
2521
2346
|
textAlign: "center"
|
|
2522
2347
|
},
|
|
2523
2348
|
pickerSeparator: {
|
|
2524
|
-
color: "#374151",
|
|
2525
2349
|
fontSize: 24,
|
|
2526
2350
|
fontWeight: "600"
|
|
2527
2351
|
},
|
|
2528
|
-
required: {
|
|
2529
|
-
color: "#EF4444"
|
|
2530
|
-
},
|
|
2531
2352
|
trigger: {
|
|
2532
2353
|
alignItems: "center",
|
|
2533
|
-
backgroundColor: "#FFFFFF",
|
|
2534
|
-
borderColor: "#D1D5DB",
|
|
2535
2354
|
borderRadius: 6,
|
|
2536
2355
|
borderWidth: 1,
|
|
2537
2356
|
flexDirection: "row",
|
|
@@ -2539,89 +2358,115 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2539
2358
|
paddingHorizontal: 12,
|
|
2540
2359
|
paddingVertical: 10
|
|
2541
2360
|
},
|
|
2542
|
-
triggerError: {
|
|
2543
|
-
borderColor: "#EF4444"
|
|
2544
|
-
},
|
|
2545
|
-
triggerPlaceholder: {
|
|
2546
|
-
color: "#9CA3AF"
|
|
2547
|
-
},
|
|
2548
2361
|
triggerText: {
|
|
2549
|
-
color: "#374151",
|
|
2550
2362
|
flex: 1,
|
|
2551
2363
|
fontSize: 14
|
|
2552
2364
|
}
|
|
2553
|
-
}),
|
|
2554
|
-
const [
|
|
2555
|
-
const
|
|
2556
|
-
|
|
2557
|
-
}, [
|
|
2558
|
-
|
|
2365
|
+
}), Tt = ({ node: r, value: s, setValue: i, error: n, label: c, helperText: S }) => {
|
|
2366
|
+
const [y, p] = R(!1), [l, g] = R(!0), a = se(), { colors: o } = q(), d = Array.isArray(s) ? s : [], m = d[0] || "", C = d[1] || "", v = m.split(":"), w = Number.parseInt(v[0], 10), f = Number.parseInt(v[1], 10), b = Number.isNaN(w) ? 0 : w, z = Number.isNaN(f) ? 0 : f, j = C.split(":"), P = Number.parseInt(j[0], 10), u = Number.parseInt(j[1], 10), D = Number.isNaN(P) ? 0 : P, N = Number.isNaN(u) ? 0 : u, [K, te] = R(0), [T, A] = R(0), Z = Array.from({ length: 24 }, (M, ce) => ce), Q = Array.from({ length: 60 }, (M, ce) => ce), I = () => m && C ? `${m} - ${C}` : m || a("renderer.defaultInputs.selectDateRange"), B = ye(() => {
|
|
2367
|
+
const M = `${String(K).padStart(2, "0")}:${String(T).padStart(2, "0")}`;
|
|
2368
|
+
l ? (i([M, C]), g(!1), te(D || 0), A(N || 0)) : (i([m, M]), p(!1), g(!0));
|
|
2369
|
+
}, [l, K, T, m, C, D, N, i]), ee = () => {
|
|
2370
|
+
te(b || 0), A(z || 0), g(!0), p(!0);
|
|
2559
2371
|
};
|
|
2560
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2561
|
-
/* @__PURE__ */ e.jsxs(t, { style:
|
|
2562
|
-
|
|
2563
|
-
r.data.required && /* @__PURE__ */ e.jsx(t, { style:
|
|
2372
|
+
return /* @__PURE__ */ e.jsxs(x, { style: O.container, children: [
|
|
2373
|
+
/* @__PURE__ */ e.jsxs(t, { style: [O.label, { color: o.textSecondary }], children: [
|
|
2374
|
+
c || r.data.name,
|
|
2375
|
+
r.data.required && /* @__PURE__ */ e.jsx(t, { style: { color: o.error }, children: "*" })
|
|
2564
2376
|
] }),
|
|
2565
|
-
/* @__PURE__ */ e.jsxs(
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2377
|
+
/* @__PURE__ */ e.jsxs(
|
|
2378
|
+
h,
|
|
2379
|
+
{
|
|
2380
|
+
style: [O.trigger, { backgroundColor: o.input, borderColor: o.border }, n && { borderColor: o.error }],
|
|
2381
|
+
onPress: ee,
|
|
2382
|
+
activeOpacity: 0.7,
|
|
2383
|
+
children: [
|
|
2384
|
+
/* @__PURE__ */ e.jsx(t, { style: [O.triggerText, { color: o.text }, !m && { color: o.textMuted }], numberOfLines: 1, children: I() }),
|
|
2385
|
+
/* @__PURE__ */ e.jsx(t, { style: O.icon, children: "🕐" })
|
|
2386
|
+
]
|
|
2387
|
+
}
|
|
2388
|
+
),
|
|
2389
|
+
/* @__PURE__ */ e.jsx(ae, { visible: y, transparent: !0, animationType: "fade", onRequestClose: () => p(!1), children: /* @__PURE__ */ e.jsx(h, { style: O.modalOverlay, activeOpacity: 1, onPress: () => p(!1), children: /* @__PURE__ */ e.jsxs(h, { style: [O.modalContent, { backgroundColor: o.card }], activeOpacity: 1, onPress: () => {
|
|
2570
2390
|
}, children: [
|
|
2571
|
-
/* @__PURE__ */ e.jsxs(
|
|
2572
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2573
|
-
/* @__PURE__ */ e.jsx(h, { onPress: () =>
|
|
2391
|
+
/* @__PURE__ */ e.jsxs(x, { style: [O.modalHeader, { borderBottomColor: o.separator }], children: [
|
|
2392
|
+
/* @__PURE__ */ e.jsx(t, { style: [O.modalTitle, { color: o.text }], children: c || r.data.name }),
|
|
2393
|
+
/* @__PURE__ */ e.jsx(h, { onPress: () => p(!1), children: /* @__PURE__ */ e.jsx(t, { style: [O.closeButton, { color: o.textMuted }], children: "✕" }) })
|
|
2574
2394
|
] }),
|
|
2575
|
-
/* @__PURE__ */ e.jsx(
|
|
2576
|
-
/* @__PURE__ */ e.jsxs(
|
|
2577
|
-
/* @__PURE__ */ e.jsxs(
|
|
2578
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2579
|
-
/* @__PURE__ */ e.jsx(
|
|
2395
|
+
/* @__PURE__ */ e.jsx(x, { style: [O.rangeIndicator, { backgroundColor: o.primaryLight }], children: /* @__PURE__ */ e.jsx(t, { style: [O.rangeIndicatorText, { color: o.primary }], children: a(l ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime") }) }),
|
|
2396
|
+
/* @__PURE__ */ e.jsxs(x, { style: O.pickerContainer, children: [
|
|
2397
|
+
/* @__PURE__ */ e.jsxs(x, { style: O.pickerColumn, children: [
|
|
2398
|
+
/* @__PURE__ */ e.jsx(t, { style: [O.pickerLabel, { color: o.textMuted }], children: "Hour" }),
|
|
2399
|
+
/* @__PURE__ */ e.jsx(be, { style: O.picker, contentContainerStyle: O.pickerContent, showsVerticalScrollIndicator: !1, children: Z.map((M) => /* @__PURE__ */ e.jsx(
|
|
2580
2400
|
h,
|
|
2581
2401
|
{
|
|
2582
|
-
style: [
|
|
2583
|
-
onPress: () =>
|
|
2402
|
+
style: [O.pickerItem, K === M && { backgroundColor: o.primary }],
|
|
2403
|
+
onPress: () => te(M),
|
|
2584
2404
|
activeOpacity: 0.7,
|
|
2585
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2405
|
+
children: /* @__PURE__ */ e.jsx(
|
|
2406
|
+
t,
|
|
2407
|
+
{
|
|
2408
|
+
style: [
|
|
2409
|
+
O.pickerItemText,
|
|
2410
|
+
{ color: o.text },
|
|
2411
|
+
K === M && { color: o.background, fontWeight: "600" }
|
|
2412
|
+
],
|
|
2413
|
+
children: String(M).padStart(2, "0")
|
|
2414
|
+
}
|
|
2415
|
+
)
|
|
2586
2416
|
},
|
|
2587
|
-
|
|
2417
|
+
M
|
|
2588
2418
|
)) })
|
|
2589
2419
|
] }),
|
|
2590
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2591
|
-
/* @__PURE__ */ e.jsxs(
|
|
2592
|
-
/* @__PURE__ */ e.jsx(t, { style:
|
|
2593
|
-
/* @__PURE__ */ e.jsx(
|
|
2420
|
+
/* @__PURE__ */ e.jsx(t, { style: [O.pickerSeparator, { color: o.text }], children: ":" }),
|
|
2421
|
+
/* @__PURE__ */ e.jsxs(x, { style: O.pickerColumn, children: [
|
|
2422
|
+
/* @__PURE__ */ e.jsx(t, { style: [O.pickerLabel, { color: o.textMuted }], children: "Minute" }),
|
|
2423
|
+
/* @__PURE__ */ e.jsx(be, { style: O.picker, contentContainerStyle: O.pickerContent, showsVerticalScrollIndicator: !1, children: Q.map((M) => /* @__PURE__ */ e.jsx(
|
|
2594
2424
|
h,
|
|
2595
2425
|
{
|
|
2596
|
-
style: [
|
|
2597
|
-
onPress: () =>
|
|
2426
|
+
style: [O.pickerItem, T === M && { backgroundColor: o.primary }],
|
|
2427
|
+
onPress: () => A(M),
|
|
2598
2428
|
activeOpacity: 0.7,
|
|
2599
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2429
|
+
children: /* @__PURE__ */ e.jsx(
|
|
2430
|
+
t,
|
|
2431
|
+
{
|
|
2432
|
+
style: [
|
|
2433
|
+
O.pickerItemText,
|
|
2434
|
+
{ color: o.text },
|
|
2435
|
+
T === M && { color: o.background, fontWeight: "600" }
|
|
2436
|
+
],
|
|
2437
|
+
children: String(M).padStart(2, "0")
|
|
2438
|
+
}
|
|
2439
|
+
)
|
|
2600
2440
|
},
|
|
2601
|
-
|
|
2441
|
+
M
|
|
2602
2442
|
)) })
|
|
2603
2443
|
] })
|
|
2604
2444
|
] }),
|
|
2605
|
-
/* @__PURE__ */ e.jsx(
|
|
2445
|
+
/* @__PURE__ */ e.jsx(
|
|
2446
|
+
h,
|
|
2447
|
+
{
|
|
2448
|
+
style: [O.confirmButton, { backgroundColor: o.primary }],
|
|
2449
|
+
onPress: B,
|
|
2450
|
+
activeOpacity: 0.7,
|
|
2451
|
+
children: /* @__PURE__ */ e.jsx(t, { style: [O.confirmButtonText, { color: o.background }], children: l ? "Next" : "Confirm" })
|
|
2452
|
+
}
|
|
2453
|
+
)
|
|
2606
2454
|
] }) }) }),
|
|
2607
|
-
n && /* @__PURE__ */ e.jsx(t, { style:
|
|
2608
|
-
|
|
2455
|
+
n && /* @__PURE__ */ e.jsx(t, { style: [O.error, { color: o.error }], children: n }),
|
|
2456
|
+
S && !n && /* @__PURE__ */ e.jsx(t, { style: [O.helperText, { color: o.textMuted }], children: S })
|
|
2609
2457
|
] });
|
|
2610
|
-
},
|
|
2458
|
+
}, O = _.create({
|
|
2611
2459
|
closeButton: {
|
|
2612
|
-
color: "#6B7280",
|
|
2613
2460
|
fontSize: 24,
|
|
2614
2461
|
fontWeight: "300"
|
|
2615
2462
|
},
|
|
2616
2463
|
confirmButton: {
|
|
2617
2464
|
alignItems: "center",
|
|
2618
|
-
backgroundColor: "#3B82F6",
|
|
2619
2465
|
borderRadius: 6,
|
|
2620
2466
|
marginTop: 16,
|
|
2621
2467
|
paddingVertical: 12
|
|
2622
2468
|
},
|
|
2623
2469
|
confirmButtonText: {
|
|
2624
|
-
color: "#FFFFFF",
|
|
2625
2470
|
fontSize: 16,
|
|
2626
2471
|
fontWeight: "600"
|
|
2627
2472
|
},
|
|
@@ -2629,12 +2474,10 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2629
2474
|
marginBottom: 16
|
|
2630
2475
|
},
|
|
2631
2476
|
error: {
|
|
2632
|
-
color: "#EF4444",
|
|
2633
2477
|
fontSize: 12,
|
|
2634
2478
|
marginTop: 4
|
|
2635
2479
|
},
|
|
2636
2480
|
helperText: {
|
|
2637
|
-
color: "#6B7280",
|
|
2638
2481
|
fontSize: 12,
|
|
2639
2482
|
marginTop: 4
|
|
2640
2483
|
},
|
|
@@ -2642,20 +2485,17 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2642
2485
|
fontSize: 16
|
|
2643
2486
|
},
|
|
2644
2487
|
label: {
|
|
2645
|
-
color: "#374151",
|
|
2646
2488
|
fontSize: 14,
|
|
2647
2489
|
fontWeight: "500",
|
|
2648
2490
|
marginBottom: 8
|
|
2649
2491
|
},
|
|
2650
2492
|
modalContent: {
|
|
2651
|
-
backgroundColor: "#FFFFFF",
|
|
2652
2493
|
borderRadius: 12,
|
|
2653
2494
|
padding: 16,
|
|
2654
2495
|
width: "80%"
|
|
2655
2496
|
},
|
|
2656
2497
|
modalHeader: {
|
|
2657
2498
|
alignItems: "center",
|
|
2658
|
-
borderBottomColor: "#E5E7EB",
|
|
2659
2499
|
borderBottomWidth: 1,
|
|
2660
2500
|
flexDirection: "row",
|
|
2661
2501
|
justifyContent: "space-between",
|
|
@@ -2669,7 +2509,6 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2669
2509
|
justifyContent: "center"
|
|
2670
2510
|
},
|
|
2671
2511
|
modalTitle: {
|
|
2672
|
-
color: "#111827",
|
|
2673
2512
|
fontSize: 18,
|
|
2674
2513
|
fontWeight: "600"
|
|
2675
2514
|
},
|
|
@@ -2693,48 +2532,31 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2693
2532
|
marginVertical: 2,
|
|
2694
2533
|
paddingVertical: 10
|
|
2695
2534
|
},
|
|
2696
|
-
pickerItemSelected: {
|
|
2697
|
-
backgroundColor: "#3B82F6"
|
|
2698
|
-
},
|
|
2699
2535
|
pickerItemText: {
|
|
2700
|
-
color: "#374151",
|
|
2701
2536
|
fontSize: 18
|
|
2702
2537
|
},
|
|
2703
|
-
pickerItemTextSelected: {
|
|
2704
|
-
color: "#FFFFFF",
|
|
2705
|
-
fontWeight: "600"
|
|
2706
|
-
},
|
|
2707
2538
|
pickerLabel: {
|
|
2708
|
-
color: "#6B7280",
|
|
2709
2539
|
fontSize: 12,
|
|
2710
2540
|
fontWeight: "600",
|
|
2711
2541
|
marginBottom: 8,
|
|
2712
2542
|
textAlign: "center"
|
|
2713
2543
|
},
|
|
2714
2544
|
pickerSeparator: {
|
|
2715
|
-
color: "#374151",
|
|
2716
2545
|
fontSize: 24,
|
|
2717
2546
|
fontWeight: "600"
|
|
2718
2547
|
},
|
|
2719
2548
|
rangeIndicator: {
|
|
2720
2549
|
alignItems: "center",
|
|
2721
|
-
backgroundColor: "#EFF6FF",
|
|
2722
2550
|
borderRadius: 6,
|
|
2723
2551
|
marginBottom: 12,
|
|
2724
2552
|
paddingVertical: 8
|
|
2725
2553
|
},
|
|
2726
2554
|
rangeIndicatorText: {
|
|
2727
|
-
color: "#3B82F6",
|
|
2728
2555
|
fontSize: 14,
|
|
2729
2556
|
fontWeight: "600"
|
|
2730
2557
|
},
|
|
2731
|
-
required: {
|
|
2732
|
-
color: "#EF4444"
|
|
2733
|
-
},
|
|
2734
2558
|
trigger: {
|
|
2735
2559
|
alignItems: "center",
|
|
2736
|
-
backgroundColor: "#FFFFFF",
|
|
2737
|
-
borderColor: "#D1D5DB",
|
|
2738
2560
|
borderRadius: 6,
|
|
2739
2561
|
borderWidth: 1,
|
|
2740
2562
|
flexDirection: "row",
|
|
@@ -2742,166 +2564,205 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2742
2564
|
paddingHorizontal: 12,
|
|
2743
2565
|
paddingVertical: 10
|
|
2744
2566
|
},
|
|
2745
|
-
triggerError: {
|
|
2746
|
-
borderColor: "#EF4444"
|
|
2747
|
-
},
|
|
2748
|
-
triggerPlaceholder: {
|
|
2749
|
-
color: "#9CA3AF"
|
|
2750
|
-
},
|
|
2751
2567
|
triggerText: {
|
|
2752
|
-
color: "#374151",
|
|
2753
2568
|
flex: 1,
|
|
2754
2569
|
fontSize: 14
|
|
2755
2570
|
}
|
|
2756
|
-
}),
|
|
2571
|
+
}), kt = ({ node: r }) => /* @__PURE__ */ e.jsxs(t, { children: [
|
|
2757
2572
|
"TODO: Implement ",
|
|
2758
2573
|
r.data.type,
|
|
2759
2574
|
" input for React Native"
|
|
2760
|
-
] }),
|
|
2761
|
-
address:
|
|
2762
|
-
autocomplete:
|
|
2763
|
-
checkbox:
|
|
2764
|
-
date:
|
|
2765
|
-
daterange:
|
|
2766
|
-
file:
|
|
2767
|
-
hidden:
|
|
2768
|
-
http:
|
|
2769
|
-
number:
|
|
2770
|
-
password:
|
|
2771
|
-
radio:
|
|
2575
|
+
] }), It = kt, zt = {
|
|
2576
|
+
address: st,
|
|
2577
|
+
autocomplete: lt,
|
|
2578
|
+
checkbox: it,
|
|
2579
|
+
date: at,
|
|
2580
|
+
daterange: ct,
|
|
2581
|
+
file: dt,
|
|
2582
|
+
hidden: ut,
|
|
2583
|
+
http: mt,
|
|
2584
|
+
number: yt,
|
|
2585
|
+
password: pt,
|
|
2586
|
+
radio: ht,
|
|
2772
2587
|
select: ft,
|
|
2773
|
-
submit:
|
|
2774
|
-
switch:
|
|
2775
|
-
text:
|
|
2776
|
-
textarea:
|
|
2777
|
-
time:
|
|
2778
|
-
timerange:
|
|
2779
|
-
},
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2588
|
+
submit: It,
|
|
2589
|
+
switch: bt,
|
|
2590
|
+
text: Ct,
|
|
2591
|
+
textarea: jt,
|
|
2592
|
+
time: St,
|
|
2593
|
+
timerange: Tt
|
|
2594
|
+
}, wt = ({ children: r = "Submit", disabled: s, isSubmitting: i, onPress: n }) => {
|
|
2595
|
+
const { colors: c } = q();
|
|
2596
|
+
return /* @__PURE__ */ e.jsx(
|
|
2597
|
+
h,
|
|
2598
|
+
{
|
|
2599
|
+
style: [
|
|
2600
|
+
Ae.button,
|
|
2601
|
+
{ backgroundColor: c.primary },
|
|
2602
|
+
(s || i) && { backgroundColor: c.primaryDisabled, opacity: 0.6 }
|
|
2603
|
+
],
|
|
2604
|
+
disabled: s || i,
|
|
2605
|
+
onPress: n,
|
|
2606
|
+
activeOpacity: 0.7,
|
|
2607
|
+
children: i ? /* @__PURE__ */ e.jsx(he, { color: c.primaryForeground }) : /* @__PURE__ */ e.jsx(t, { style: [Ae.buttonText, { color: c.primaryForeground }], children: r })
|
|
2608
|
+
}
|
|
2609
|
+
);
|
|
2610
|
+
}, Ae = _.create({
|
|
2789
2611
|
button: {
|
|
2790
2612
|
alignItems: "center",
|
|
2791
|
-
backgroundColor: "#3B82F6",
|
|
2792
2613
|
borderRadius: 6,
|
|
2793
2614
|
justifyContent: "center",
|
|
2794
2615
|
marginTop: 16,
|
|
2795
2616
|
paddingHorizontal: 24,
|
|
2796
2617
|
paddingVertical: 12
|
|
2797
2618
|
},
|
|
2798
|
-
buttonDisabled: {
|
|
2799
|
-
backgroundColor: "#9CA3AF",
|
|
2800
|
-
opacity: 0.6
|
|
2801
|
-
},
|
|
2802
2619
|
buttonText: {
|
|
2803
|
-
color: "#FFFFFF",
|
|
2804
2620
|
fontSize: 16,
|
|
2805
2621
|
fontWeight: "600"
|
|
2806
2622
|
}
|
|
2807
|
-
}),
|
|
2808
|
-
const s =
|
|
2809
|
-
return /* @__PURE__ */ e.jsx(t, { style:
|
|
2810
|
-
},
|
|
2623
|
+
}), vt = ({ children: r }) => r, Dt = ({ node: r }) => {
|
|
2624
|
+
const s = se(), { colors: i } = q(), n = s(r.data?.label);
|
|
2625
|
+
return /* @__PURE__ */ e.jsx(t, { style: [Ne.title, { color: i.text }], children: n });
|
|
2626
|
+
}, Bt = () => {
|
|
2627
|
+
const { colors: r } = q();
|
|
2628
|
+
return /* @__PURE__ */ e.jsx(x, { style: [Ne.divider, { backgroundColor: r.separator }] });
|
|
2629
|
+
}, Ne = _.create({
|
|
2811
2630
|
divider: {
|
|
2812
|
-
backgroundColor: "#E5E7EB",
|
|
2813
2631
|
height: 1,
|
|
2814
2632
|
marginBottom: 16,
|
|
2815
2633
|
marginTop: 0
|
|
2816
2634
|
},
|
|
2817
2635
|
title: {
|
|
2818
|
-
color: "#111827",
|
|
2819
2636
|
fontSize: 20,
|
|
2820
2637
|
fontWeight: "700",
|
|
2821
2638
|
marginBottom: 16
|
|
2822
2639
|
}
|
|
2823
|
-
}),
|
|
2824
|
-
divider:
|
|
2640
|
+
}), Mt = {
|
|
2641
|
+
divider: Bt,
|
|
2825
2642
|
title: Dt
|
|
2826
2643
|
}, Ot = ({
|
|
2827
2644
|
components: r,
|
|
2828
|
-
contentContainerStyle:
|
|
2829
|
-
flows:
|
|
2645
|
+
contentContainerStyle: s,
|
|
2646
|
+
flows: i,
|
|
2830
2647
|
googleApiKey: n,
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2648
|
+
initialValues: c,
|
|
2649
|
+
language: S,
|
|
2650
|
+
onChange: y,
|
|
2651
|
+
onSubmit: p,
|
|
2652
|
+
style: l,
|
|
2653
|
+
theme: g,
|
|
2654
|
+
validate: a,
|
|
2655
|
+
validationMode: o
|
|
2838
2656
|
}) => {
|
|
2839
|
-
const {
|
|
2840
|
-
canSubmit:
|
|
2841
|
-
clearSubmitMessage:
|
|
2842
|
-
config:
|
|
2843
|
-
formErrors:
|
|
2844
|
-
formValues:
|
|
2845
|
-
handleSubmit:
|
|
2846
|
-
inputNodes:
|
|
2657
|
+
const { colors: d } = q(), {
|
|
2658
|
+
canSubmit: m,
|
|
2659
|
+
clearSubmitMessage: C,
|
|
2660
|
+
config: v,
|
|
2661
|
+
formErrors: w,
|
|
2662
|
+
formValues: f,
|
|
2663
|
+
handleSubmit: b,
|
|
2664
|
+
inputNodes: z,
|
|
2847
2665
|
isSubmitting: j,
|
|
2848
|
-
mergedFlow:
|
|
2849
|
-
missingRequiredFields:
|
|
2850
|
-
setFieldValue:
|
|
2851
|
-
submitMessage:
|
|
2852
|
-
t:
|
|
2853
|
-
visibleNodes:
|
|
2854
|
-
visibleRootNodes:
|
|
2855
|
-
} =
|
|
2666
|
+
mergedFlow: P,
|
|
2667
|
+
missingRequiredFields: u,
|
|
2668
|
+
setFieldValue: D,
|
|
2669
|
+
submitMessage: N,
|
|
2670
|
+
t: K,
|
|
2671
|
+
visibleNodes: te,
|
|
2672
|
+
visibleRootNodes: T
|
|
2673
|
+
} = Ue({
|
|
2856
2674
|
components: r,
|
|
2857
|
-
flows:
|
|
2675
|
+
flows: i,
|
|
2858
2676
|
googleApiKey: n,
|
|
2859
|
-
initialValues:
|
|
2860
|
-
language:
|
|
2861
|
-
onChange:
|
|
2862
|
-
onSubmit:
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2677
|
+
initialValues: c,
|
|
2678
|
+
language: S,
|
|
2679
|
+
onChange: y,
|
|
2680
|
+
onSubmit: p,
|
|
2681
|
+
theme: g,
|
|
2682
|
+
validate: a,
|
|
2683
|
+
validationMode: o
|
|
2684
|
+
}), { FormWrapper: A, SubmitButton: Z, SubmitButtonWrapper: Q, renderNode: I } = Je({
|
|
2685
|
+
config: v,
|
|
2686
|
+
DefaultFormWrapper: et,
|
|
2687
|
+
DefaultGroup: rt,
|
|
2688
|
+
DefaultSubmitButton: wt,
|
|
2689
|
+
DefaultSubmitButtonWrapper: vt,
|
|
2690
|
+
defaultInputRenderers: zt,
|
|
2691
|
+
defaultUI: Mt,
|
|
2692
|
+
formErrors: w,
|
|
2693
|
+
formValues: f,
|
|
2694
|
+
missingRequiredFields: u,
|
|
2695
|
+
setFieldValue: D,
|
|
2696
|
+
visibleNodes: te
|
|
2878
2697
|
});
|
|
2879
|
-
return /* @__PURE__ */ e.jsx(
|
|
2880
|
-
|
|
2698
|
+
return /* @__PURE__ */ e.jsx(
|
|
2699
|
+
be,
|
|
2881
2700
|
{
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2701
|
+
nestedScrollEnabled: !0,
|
|
2702
|
+
style: [Ie.container, { backgroundColor: d.background }, l],
|
|
2703
|
+
contentContainerStyle: s,
|
|
2704
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
2705
|
+
Ke,
|
|
2706
|
+
{
|
|
2707
|
+
value: {
|
|
2708
|
+
flows: P,
|
|
2709
|
+
formErrors: w,
|
|
2710
|
+
formValues: f,
|
|
2711
|
+
googleApiKey: v.googleApiKey,
|
|
2712
|
+
inputNodes: z,
|
|
2713
|
+
language: v.language,
|
|
2714
|
+
setFieldValue: D
|
|
2715
|
+
},
|
|
2716
|
+
children: [
|
|
2717
|
+
/* @__PURE__ */ e.jsxs(A, { onSubmit: b, children: [
|
|
2718
|
+
T.map((B) => I(B)),
|
|
2719
|
+
m && /* @__PURE__ */ e.jsx(Q, { missingFields: u, children: /* @__PURE__ */ e.jsx(Z, { onPress: b, disabled: j, isSubmitting: j, children: K("renderer.defaultSubmitButton.submit") }) }),
|
|
2720
|
+
/* @__PURE__ */ e.jsx(t, { style: [Ie.poweredBy, { color: d.textMuted }], children: "Powered by Treege" })
|
|
2721
|
+
] }),
|
|
2722
|
+
N && /* @__PURE__ */ e.jsxs(
|
|
2723
|
+
x,
|
|
2724
|
+
{
|
|
2725
|
+
style: [
|
|
2726
|
+
Ie.message,
|
|
2727
|
+
{
|
|
2728
|
+
backgroundColor: N.type === "success" ? d.successBg : d.errorBg
|
|
2729
|
+
}
|
|
2730
|
+
],
|
|
2731
|
+
children: [
|
|
2732
|
+
/* @__PURE__ */ e.jsx(
|
|
2733
|
+
t,
|
|
2734
|
+
{
|
|
2735
|
+
style: [
|
|
2736
|
+
Ie.messageText,
|
|
2737
|
+
{
|
|
2738
|
+
color: N.type === "success" ? d.success : d.error
|
|
2739
|
+
}
|
|
2740
|
+
],
|
|
2741
|
+
children: N.message
|
|
2742
|
+
}
|
|
2743
|
+
),
|
|
2744
|
+
/* @__PURE__ */ e.jsx(
|
|
2745
|
+
t,
|
|
2746
|
+
{
|
|
2747
|
+
style: [
|
|
2748
|
+
Ie.messageClose,
|
|
2749
|
+
{
|
|
2750
|
+
color: N.type === "success" ? d.success : d.error
|
|
2751
|
+
}
|
|
2752
|
+
],
|
|
2753
|
+
onPress: C,
|
|
2754
|
+
children: K("common.close")
|
|
2755
|
+
}
|
|
2756
|
+
)
|
|
2757
|
+
]
|
|
2758
|
+
}
|
|
2759
|
+
)
|
|
2760
|
+
]
|
|
2761
|
+
}
|
|
2762
|
+
)
|
|
2902
2763
|
}
|
|
2903
|
-
)
|
|
2904
|
-
},
|
|
2764
|
+
);
|
|
2765
|
+
}, Lt = (r) => /* @__PURE__ */ e.jsx(Qe, { theme: r.theme, storageKey: "treege-renderer-theme", children: /* @__PURE__ */ e.jsx(Ot, { ...r }) }), Ie = _.create({
|
|
2905
2766
|
container: {
|
|
2906
2767
|
flex: 1
|
|
2907
2768
|
},
|
|
@@ -2915,65 +2776,58 @@ const Qe = ({ children: r }) => /* @__PURE__ */ e.jsx(l, { style: Xe.container,
|
|
|
2915
2776
|
marginTop: 8,
|
|
2916
2777
|
textDecorationLine: "underline"
|
|
2917
2778
|
},
|
|
2918
|
-
messageError: {
|
|
2919
|
-
backgroundColor: "#FEE2E2"
|
|
2920
|
-
},
|
|
2921
|
-
messageSuccess: {
|
|
2922
|
-
backgroundColor: "#D1FAE5"
|
|
2923
|
-
},
|
|
2924
2779
|
messageText: {
|
|
2925
2780
|
fontSize: 14,
|
|
2926
2781
|
fontWeight: "500"
|
|
2927
2782
|
},
|
|
2928
2783
|
poweredBy: {
|
|
2929
|
-
color: "#9CA3AF",
|
|
2930
2784
|
fontSize: 12,
|
|
2931
2785
|
paddingVertical: 8,
|
|
2932
2786
|
textAlign: "center"
|
|
2933
2787
|
}
|
|
2934
2788
|
});
|
|
2935
2789
|
export {
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2790
|
+
st as DefaultAddressInput,
|
|
2791
|
+
lt as DefaultAutocompleteInput,
|
|
2792
|
+
it as DefaultCheckboxInput,
|
|
2793
|
+
at as DefaultDateInput,
|
|
2794
|
+
ct as DefaultDateRangeInput,
|
|
2795
|
+
Bt as DefaultDividerUI,
|
|
2796
|
+
dt as DefaultFileInput,
|
|
2797
|
+
ut as DefaultHiddenInput,
|
|
2798
|
+
mt as DefaultHttpInput,
|
|
2799
|
+
yt as DefaultNumberInput,
|
|
2800
|
+
pt as DefaultPasswordInput,
|
|
2801
|
+
ht as DefaultRadioInput,
|
|
2948
2802
|
ft as DefaultSelectInput,
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2803
|
+
It as DefaultSubmitInput,
|
|
2804
|
+
bt as DefaultSwitchInput,
|
|
2805
|
+
Ct as DefaultTextInput,
|
|
2806
|
+
jt as DefaultTextareaInput,
|
|
2807
|
+
St as DefaultTimeInput,
|
|
2808
|
+
Tt as DefaultTimeRangeInput,
|
|
2955
2809
|
Dt as DefaultTitleUI,
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2810
|
+
Vt as TreegeConfigProvider,
|
|
2811
|
+
Lt as TreegeRenderer,
|
|
2812
|
+
Nt as applyReferenceTransformation,
|
|
2813
|
+
$t as calculateReferenceFieldUpdates,
|
|
2814
|
+
Et as checkFormFieldHasValue,
|
|
2815
|
+
Ye as convertFormValuesToNamedFormat,
|
|
2816
|
+
zt as defaultInputRenderers,
|
|
2817
|
+
Mt as defaultUI,
|
|
2818
|
+
qt as evaluateCondition,
|
|
2819
|
+
_t as evaluateConditions,
|
|
2820
|
+
Yt as fileToSerializable,
|
|
2821
|
+
Gt as filesToSerializable,
|
|
2822
|
+
Ut as findStartNode,
|
|
2823
|
+
Jt as getFlowRenderState,
|
|
2824
|
+
rr as getTranslatedText,
|
|
2825
|
+
Kt as isFieldEmpty,
|
|
2826
|
+
Qt as isStartNode,
|
|
2827
|
+
Xt as mergeFlows,
|
|
2828
|
+
Le as sanitize,
|
|
2829
|
+
Re as sanitizeHttpResponse,
|
|
2830
|
+
Zt as serializableToFile,
|
|
2831
|
+
er as useTreegeConfig,
|
|
2832
|
+
Ue as useTreegeRenderer
|
|
2979
2833
|
};
|