treege 3.0.0-beta.26 → 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/README.md +188 -24
- package/dist/ThemeContext-BBEqRK_Q.js +429 -0
- package/dist/{TreegeEditor-WqTXkYl3.js → TreegeEditor-Bi7GcSKl.js} +198 -197
- package/dist/TreegeRenderer-DbE0m_4e.js +1047 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +50 -49
- package/dist/renderer/features/TreegeRenderer/native/TreegeRenderer.d.ts +19 -11
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultGroup.d.ts +7 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputs.d.ts +26 -15
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButton.d.ts +9 -7
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultSubmitButtonWrapper.d.ts +11 -0
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultUI.d.ts +8 -7
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAddressInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultAutocompleteInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultCheckboxInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultDateRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultFileInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHiddenInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultHttpInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultNumberInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultPasswordInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultRadioInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSelectInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultSwitchInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTextareaInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/native/components/inputs/DefaultTimeRangeInput.d.ts +3 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +81 -23
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/hooks/useRenderNode.d.ts +55 -0
- package/dist/renderer/index.d.ts +1 -0
- package/dist/renderer/index.native.d.ts +19 -0
- package/dist/renderer/types/renderer.d.ts +20 -4
- package/dist/renderer/utils/sanitize.native.d.ts +69 -0
- package/dist/renderer/utils/submit.d.ts +1 -1
- package/dist/renderer-native.d.ts +2 -0
- package/dist/renderer-native.js +2833 -0
- package/dist/renderer.js +48 -47
- 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/shared/locales/ar.json.d.ts +13 -5
- package/dist/shared/locales/de.json.d.ts +13 -5
- package/dist/shared/locales/en.json.d.ts +13 -5
- package/dist/shared/locales/es.json.d.ts +13 -5
- package/dist/shared/locales/fr.json.d.ts +13 -5
- package/dist/shared/locales/it.json.d.ts +13 -5
- package/dist/shared/locales/pt.json.d.ts +13 -5
- package/dist/shared/types/node.d.ts +2 -2
- package/dist/useRenderNode-BACcrUML.js +863 -0
- package/package.json +24 -1
- package/dist/ThemeContext-BIT4DHqC.js +0 -764
- package/dist/TreegeRenderer-BSR_ez96.js +0 -1812
|
@@ -0,0 +1,2833 @@
|
|
|
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
|
+
container: {
|
|
9
|
+
padding: 16
|
|
10
|
+
}
|
|
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
|
+
] });
|
|
17
|
+
}, De = _.create({
|
|
18
|
+
container: {
|
|
19
|
+
marginBottom: 16
|
|
20
|
+
},
|
|
21
|
+
content: {
|
|
22
|
+
gap: 8
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
fontSize: 16,
|
|
26
|
+
fontWeight: "600",
|
|
27
|
+
marginBottom: 12
|
|
28
|
+
}
|
|
29
|
+
}), ot = async (r, s) => {
|
|
30
|
+
if (!r || r.trim().length < 3)
|
|
31
|
+
return [];
|
|
32
|
+
try {
|
|
33
|
+
const i = await fetch(
|
|
34
|
+
`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(r)}&format=jsonv2&addressdetails=1&limit=5`,
|
|
35
|
+
{
|
|
36
|
+
headers: {
|
|
37
|
+
Accept: "application/json",
|
|
38
|
+
"User-Agent": "Treege Renderer",
|
|
39
|
+
...s && { "Accept-Language": s }
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
return i.ok ? (await i.json()).map((c) => ({
|
|
44
|
+
label: c.display_name,
|
|
45
|
+
value: c.display_name
|
|
46
|
+
})) : [];
|
|
47
|
+
} catch (i) {
|
|
48
|
+
return console.error("Nominatim fetch error:", i), [];
|
|
49
|
+
}
|
|
50
|
+
}, nt = async (r, s) => {
|
|
51
|
+
if (!r || r.trim().length < 3)
|
|
52
|
+
return [];
|
|
53
|
+
try {
|
|
54
|
+
const i = await fetch(
|
|
55
|
+
`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(r)}&key=${s}`
|
|
56
|
+
);
|
|
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
|
|
63
|
+
}));
|
|
64
|
+
} catch (i) {
|
|
65
|
+
return console.error("Google Places fetch error:", i), [];
|
|
66
|
+
}
|
|
67
|
+
}, st = ({
|
|
68
|
+
node: r,
|
|
69
|
+
value: s,
|
|
70
|
+
setValue: i,
|
|
71
|
+
error: n,
|
|
72
|
+
label: c,
|
|
73
|
+
placeholder: S,
|
|
74
|
+
helperText: y,
|
|
75
|
+
id: p,
|
|
76
|
+
name: l
|
|
77
|
+
}) => {
|
|
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([]);
|
|
81
|
+
},
|
|
82
|
+
[i]
|
|
83
|
+
), u = () => {
|
|
84
|
+
C(!1);
|
|
85
|
+
};
|
|
86
|
+
return ge(() => {
|
|
87
|
+
if (!g || g.trim().length < 3) {
|
|
88
|
+
d([]), w(!1);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
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);
|
|
95
|
+
}, 300);
|
|
96
|
+
return () => {
|
|
97
|
+
clearTimeout(D), w(!1);
|
|
98
|
+
};
|
|
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: "*" })
|
|
103
|
+
] }),
|
|
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: () => {
|
|
117
|
+
}, children: [
|
|
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: "✕" }) })
|
|
121
|
+
] }),
|
|
122
|
+
/* @__PURE__ */ e.jsxs(x, { style: L.searchContainer, children: [
|
|
123
|
+
/* @__PURE__ */ e.jsx(
|
|
124
|
+
me,
|
|
125
|
+
{
|
|
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,
|
|
131
|
+
autoFocus: !0,
|
|
132
|
+
autoCapitalize: "none",
|
|
133
|
+
autoCorrect: !1
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
v && /* @__PURE__ */ e.jsx(he, { size: "small", color: j.primary, style: L.searchLoader })
|
|
137
|
+
] }),
|
|
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") })
|
|
141
|
+
] }) : /* @__PURE__ */ e.jsx(
|
|
142
|
+
fe,
|
|
143
|
+
{
|
|
144
|
+
data: o,
|
|
145
|
+
keyExtractor: (D, N) => N.toString(),
|
|
146
|
+
style: L.suggestionsList,
|
|
147
|
+
contentContainerStyle: L.suggestionsListContent,
|
|
148
|
+
keyboardShouldPersistTaps: "handled",
|
|
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 })
|
|
153
|
+
] })
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
] }) }) }),
|
|
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 })
|
|
159
|
+
] });
|
|
160
|
+
}, L = _.create({
|
|
161
|
+
closeButton: {
|
|
162
|
+
fontSize: 24,
|
|
163
|
+
fontWeight: "300"
|
|
164
|
+
},
|
|
165
|
+
container: {
|
|
166
|
+
marginBottom: 16
|
|
167
|
+
},
|
|
168
|
+
emptyContainer: {
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
paddingVertical: 24
|
|
171
|
+
},
|
|
172
|
+
emptyText: {
|
|
173
|
+
fontSize: 14
|
|
174
|
+
},
|
|
175
|
+
error: {
|
|
176
|
+
fontSize: 12,
|
|
177
|
+
marginTop: 4
|
|
178
|
+
},
|
|
179
|
+
helperText: {
|
|
180
|
+
fontSize: 12,
|
|
181
|
+
marginTop: 4
|
|
182
|
+
},
|
|
183
|
+
icon: {
|
|
184
|
+
fontSize: 16
|
|
185
|
+
},
|
|
186
|
+
label: {
|
|
187
|
+
fontSize: 14,
|
|
188
|
+
fontWeight: "500",
|
|
189
|
+
marginBottom: 8
|
|
190
|
+
},
|
|
191
|
+
loadingContainer: {
|
|
192
|
+
alignItems: "center",
|
|
193
|
+
flexDirection: "row",
|
|
194
|
+
justifyContent: "center",
|
|
195
|
+
paddingVertical: 24
|
|
196
|
+
},
|
|
197
|
+
loadingText: {
|
|
198
|
+
fontSize: 14,
|
|
199
|
+
marginLeft: 8
|
|
200
|
+
},
|
|
201
|
+
modalContent: {
|
|
202
|
+
borderRadius: 12,
|
|
203
|
+
maxHeight: "80%",
|
|
204
|
+
padding: 16,
|
|
205
|
+
width: "90%"
|
|
206
|
+
},
|
|
207
|
+
modalHeader: {
|
|
208
|
+
alignItems: "center",
|
|
209
|
+
borderBottomWidth: 1,
|
|
210
|
+
flexDirection: "row",
|
|
211
|
+
justifyContent: "space-between",
|
|
212
|
+
marginBottom: 12,
|
|
213
|
+
paddingBottom: 12
|
|
214
|
+
},
|
|
215
|
+
modalOverlay: {
|
|
216
|
+
alignItems: "center",
|
|
217
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
218
|
+
flex: 1,
|
|
219
|
+
justifyContent: "center"
|
|
220
|
+
},
|
|
221
|
+
modalTitle: {
|
|
222
|
+
fontSize: 18,
|
|
223
|
+
fontWeight: "600"
|
|
224
|
+
},
|
|
225
|
+
searchContainer: {
|
|
226
|
+
marginBottom: 12,
|
|
227
|
+
position: "relative"
|
|
228
|
+
},
|
|
229
|
+
searchInput: {
|
|
230
|
+
borderRadius: 6,
|
|
231
|
+
borderWidth: 1,
|
|
232
|
+
fontSize: 14,
|
|
233
|
+
paddingHorizontal: 12,
|
|
234
|
+
paddingRight: 40,
|
|
235
|
+
paddingVertical: 10
|
|
236
|
+
},
|
|
237
|
+
searchLoader: {
|
|
238
|
+
position: "absolute",
|
|
239
|
+
right: 12,
|
|
240
|
+
top: "50%",
|
|
241
|
+
transform: [{ translateY: -10 }]
|
|
242
|
+
},
|
|
243
|
+
suggestionIcon: {
|
|
244
|
+
fontSize: 16,
|
|
245
|
+
marginRight: 8
|
|
246
|
+
},
|
|
247
|
+
suggestionItem: {
|
|
248
|
+
alignItems: "center",
|
|
249
|
+
borderRadius: 6,
|
|
250
|
+
flexDirection: "row",
|
|
251
|
+
paddingHorizontal: 12,
|
|
252
|
+
paddingVertical: 12
|
|
253
|
+
},
|
|
254
|
+
suggestionsList: {
|
|
255
|
+
flexGrow: 0,
|
|
256
|
+
flexShrink: 1
|
|
257
|
+
},
|
|
258
|
+
suggestionsListContent: {
|
|
259
|
+
flexGrow: 0
|
|
260
|
+
},
|
|
261
|
+
suggestionText: {
|
|
262
|
+
flex: 1,
|
|
263
|
+
fontSize: 14
|
|
264
|
+
},
|
|
265
|
+
trigger: {
|
|
266
|
+
alignItems: "center",
|
|
267
|
+
borderRadius: 6,
|
|
268
|
+
borderWidth: 1,
|
|
269
|
+
flexDirection: "row",
|
|
270
|
+
justifyContent: "space-between",
|
|
271
|
+
paddingHorizontal: 12,
|
|
272
|
+
paddingVertical: 10
|
|
273
|
+
},
|
|
274
|
+
triggerText: {
|
|
275
|
+
flex: 1,
|
|
276
|
+
fontSize: 14
|
|
277
|
+
}
|
|
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: "*" })
|
|
293
|
+
] }),
|
|
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: () => {
|
|
307
|
+
}, children: [
|
|
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: "✕" }) })
|
|
311
|
+
] }),
|
|
312
|
+
/* @__PURE__ */ e.jsx(x, { style: E.searchContainer, children: /* @__PURE__ */ e.jsx(
|
|
313
|
+
me,
|
|
314
|
+
{
|
|
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,
|
|
320
|
+
autoFocus: !0,
|
|
321
|
+
autoCapitalize: "none",
|
|
322
|
+
autoCorrect: !1
|
|
323
|
+
}
|
|
324
|
+
) }),
|
|
325
|
+
/* @__PURE__ */ e.jsx(
|
|
326
|
+
fe,
|
|
327
|
+
{
|
|
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;
|
|
335
|
+
return /* @__PURE__ */ e.jsxs(
|
|
336
|
+
h,
|
|
337
|
+
{
|
|
338
|
+
style: [E.option, j && { backgroundColor: d.primaryLight }],
|
|
339
|
+
onPress: () => w(z.value),
|
|
340
|
+
disabled: z.disabled,
|
|
341
|
+
activeOpacity: 0.7,
|
|
342
|
+
children: [
|
|
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: "✓" })
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
)
|
|
351
|
+
] }) }) }),
|
|
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 })
|
|
354
|
+
] });
|
|
355
|
+
}, E = _.create({
|
|
356
|
+
arrow: {
|
|
357
|
+
fontSize: 12
|
|
358
|
+
},
|
|
359
|
+
checkmark: {
|
|
360
|
+
fontSize: 18,
|
|
361
|
+
fontWeight: "700"
|
|
362
|
+
},
|
|
363
|
+
closeButton: {
|
|
364
|
+
fontSize: 24,
|
|
365
|
+
fontWeight: "300"
|
|
366
|
+
},
|
|
367
|
+
container: {
|
|
368
|
+
marginBottom: 16
|
|
369
|
+
},
|
|
370
|
+
emptyContainer: {
|
|
371
|
+
alignItems: "center",
|
|
372
|
+
paddingVertical: 24
|
|
373
|
+
},
|
|
374
|
+
emptyText: {
|
|
375
|
+
fontSize: 14
|
|
376
|
+
},
|
|
377
|
+
error: {
|
|
378
|
+
fontSize: 12,
|
|
379
|
+
marginTop: 4
|
|
380
|
+
},
|
|
381
|
+
helperText: {
|
|
382
|
+
fontSize: 12,
|
|
383
|
+
marginTop: 4
|
|
384
|
+
},
|
|
385
|
+
label: {
|
|
386
|
+
fontSize: 14,
|
|
387
|
+
fontWeight: "500",
|
|
388
|
+
marginBottom: 8
|
|
389
|
+
},
|
|
390
|
+
modalContent: {
|
|
391
|
+
borderRadius: 12,
|
|
392
|
+
maxHeight: "80%",
|
|
393
|
+
padding: 16,
|
|
394
|
+
width: "90%"
|
|
395
|
+
},
|
|
396
|
+
modalHeader: {
|
|
397
|
+
alignItems: "center",
|
|
398
|
+
borderBottomWidth: 1,
|
|
399
|
+
flexDirection: "row",
|
|
400
|
+
justifyContent: "space-between",
|
|
401
|
+
marginBottom: 12,
|
|
402
|
+
paddingBottom: 12
|
|
403
|
+
},
|
|
404
|
+
modalOverlay: {
|
|
405
|
+
alignItems: "center",
|
|
406
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
407
|
+
flex: 1,
|
|
408
|
+
justifyContent: "center"
|
|
409
|
+
},
|
|
410
|
+
modalTitle: {
|
|
411
|
+
fontSize: 18,
|
|
412
|
+
fontWeight: "600"
|
|
413
|
+
},
|
|
414
|
+
option: {
|
|
415
|
+
alignItems: "center",
|
|
416
|
+
borderRadius: 6,
|
|
417
|
+
flexDirection: "row",
|
|
418
|
+
justifyContent: "space-between",
|
|
419
|
+
paddingHorizontal: 12,
|
|
420
|
+
paddingVertical: 12
|
|
421
|
+
},
|
|
422
|
+
optionsList: {
|
|
423
|
+
flexGrow: 0,
|
|
424
|
+
flexShrink: 1
|
|
425
|
+
},
|
|
426
|
+
optionsListContent: {
|
|
427
|
+
flexGrow: 0
|
|
428
|
+
},
|
|
429
|
+
optionText: {
|
|
430
|
+
flex: 1,
|
|
431
|
+
fontSize: 14
|
|
432
|
+
},
|
|
433
|
+
searchContainer: {
|
|
434
|
+
marginBottom: 12
|
|
435
|
+
},
|
|
436
|
+
searchInput: {
|
|
437
|
+
borderRadius: 6,
|
|
438
|
+
borderWidth: 1,
|
|
439
|
+
fontSize: 14,
|
|
440
|
+
paddingHorizontal: 12,
|
|
441
|
+
paddingVertical: 10
|
|
442
|
+
},
|
|
443
|
+
trigger: {
|
|
444
|
+
alignItems: "center",
|
|
445
|
+
borderRadius: 6,
|
|
446
|
+
borderWidth: 1,
|
|
447
|
+
flexDirection: "row",
|
|
448
|
+
justifyContent: "space-between",
|
|
449
|
+
paddingHorizontal: 12,
|
|
450
|
+
paddingVertical: 10
|
|
451
|
+
},
|
|
452
|
+
triggerText: {
|
|
453
|
+
flex: 1,
|
|
454
|
+
fontSize: 14
|
|
455
|
+
}
|
|
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);
|
|
461
|
+
} else
|
|
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: "*" })
|
|
468
|
+
] }),
|
|
469
|
+
l.length > 0 ? l.map((C) => /* @__PURE__ */ e.jsxs(
|
|
470
|
+
h,
|
|
471
|
+
{
|
|
472
|
+
style: ne.option,
|
|
473
|
+
onPress: () => d(C.value),
|
|
474
|
+
disabled: C.disabled,
|
|
475
|
+
activeOpacity: 0.7,
|
|
476
|
+
accessible: !0,
|
|
477
|
+
accessibilityRole: "checkbox",
|
|
478
|
+
accessibilityState: { checked: m(C.value), disabled: C.disabled },
|
|
479
|
+
accessibilityLabel: y(C.label) || C.value,
|
|
480
|
+
children: [
|
|
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 })
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
C.value
|
|
496
|
+
)) : (
|
|
497
|
+
// Single checkbox without options
|
|
498
|
+
/* @__PURE__ */ e.jsxs(
|
|
499
|
+
h,
|
|
500
|
+
{
|
|
501
|
+
style: ne.option,
|
|
502
|
+
onPress: () => d(""),
|
|
503
|
+
activeOpacity: 0.7,
|
|
504
|
+
accessible: !0,
|
|
505
|
+
accessibilityRole: "checkbox",
|
|
506
|
+
accessibilityState: { checked: o },
|
|
507
|
+
accessibilityLabel: c || r.data.name,
|
|
508
|
+
children: [
|
|
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 })
|
|
521
|
+
]
|
|
522
|
+
}
|
|
523
|
+
)
|
|
524
|
+
),
|
|
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 })
|
|
527
|
+
] });
|
|
528
|
+
}, ne = _.create({
|
|
529
|
+
checkbox: {
|
|
530
|
+
alignItems: "center",
|
|
531
|
+
borderRadius: 4,
|
|
532
|
+
borderWidth: 2,
|
|
533
|
+
height: 20,
|
|
534
|
+
justifyContent: "center",
|
|
535
|
+
marginRight: 12,
|
|
536
|
+
width: 20
|
|
537
|
+
},
|
|
538
|
+
checkmark: {
|
|
539
|
+
color: "#FFFFFF",
|
|
540
|
+
fontSize: 14,
|
|
541
|
+
fontWeight: "700"
|
|
542
|
+
},
|
|
543
|
+
container: {
|
|
544
|
+
marginBottom: 16
|
|
545
|
+
},
|
|
546
|
+
error: {
|
|
547
|
+
fontSize: 12,
|
|
548
|
+
marginTop: 4
|
|
549
|
+
},
|
|
550
|
+
helperText: {
|
|
551
|
+
fontSize: 12,
|
|
552
|
+
marginTop: 4
|
|
553
|
+
},
|
|
554
|
+
label: {
|
|
555
|
+
fontSize: 14,
|
|
556
|
+
fontWeight: "500",
|
|
557
|
+
marginBottom: 8
|
|
558
|
+
},
|
|
559
|
+
option: {
|
|
560
|
+
alignItems: "center",
|
|
561
|
+
flexDirection: "row",
|
|
562
|
+
marginBottom: 8
|
|
563
|
+
},
|
|
564
|
+
optionLabel: {
|
|
565
|
+
flex: 1,
|
|
566
|
+
fontSize: 14
|
|
567
|
+
}
|
|
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 = [
|
|
573
|
+
"January",
|
|
574
|
+
"February",
|
|
575
|
+
"March",
|
|
576
|
+
"April",
|
|
577
|
+
"May",
|
|
578
|
+
"June",
|
|
579
|
+
"July",
|
|
580
|
+
"August",
|
|
581
|
+
"September",
|
|
582
|
+
"October",
|
|
583
|
+
"November",
|
|
584
|
+
"December"
|
|
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,
|
|
591
|
+
isCurrentMonth: !1
|
|
592
|
+
});
|
|
593
|
+
for (let B = 1; B <= A; B++)
|
|
594
|
+
Q.push({
|
|
595
|
+
date: new Date(v, f, B),
|
|
596
|
+
day: B,
|
|
597
|
+
isCurrentMonth: !0
|
|
598
|
+
});
|
|
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,
|
|
604
|
+
isCurrentMonth: !1
|
|
605
|
+
});
|
|
606
|
+
return Q;
|
|
607
|
+
}, [v, f]), P = ye(
|
|
608
|
+
(T) => {
|
|
609
|
+
r.data.disablePast && T < C || (i(T.toISOString()), l(!1));
|
|
610
|
+
},
|
|
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: "*" })
|
|
621
|
+
] }),
|
|
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: () => {
|
|
635
|
+
}, children: [
|
|
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: "✕" }) })
|
|
639
|
+
] }),
|
|
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],
|
|
644
|
+
" ",
|
|
645
|
+
v
|
|
646
|
+
] }),
|
|
647
|
+
/* @__PURE__ */ e.jsx(h, { onPress: D, style: F.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [F.navButtonText, { color: a.primary }], children: "›" }) })
|
|
648
|
+
] }),
|
|
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)) }),
|
|
650
|
+
/* @__PURE__ */ e.jsx(
|
|
651
|
+
fe,
|
|
652
|
+
{
|
|
653
|
+
data: j,
|
|
654
|
+
keyExtractor: (T, A) => `${T.date.getTime()}-${A}`,
|
|
655
|
+
numColumns: 7,
|
|
656
|
+
scrollEnabled: !1,
|
|
657
|
+
style: F.calendar,
|
|
658
|
+
contentContainerStyle: F.calendarContent,
|
|
659
|
+
renderItem: ({ item: T }) => {
|
|
660
|
+
const A = K(T.date), Z = te(T.date);
|
|
661
|
+
return /* @__PURE__ */ e.jsx(
|
|
662
|
+
h,
|
|
663
|
+
{
|
|
664
|
+
style: [
|
|
665
|
+
F.dayCell,
|
|
666
|
+
!T.isCurrentMonth && F.dayCellOtherMonth,
|
|
667
|
+
Z && { backgroundColor: a.primary, borderRadius: 20 },
|
|
668
|
+
A && F.dayCellDisabled
|
|
669
|
+
],
|
|
670
|
+
onPress: () => P(T.date),
|
|
671
|
+
disabled: A,
|
|
672
|
+
activeOpacity: 0.7,
|
|
673
|
+
children: /* @__PURE__ */ e.jsx(
|
|
674
|
+
t,
|
|
675
|
+
{
|
|
676
|
+
style: [
|
|
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 }
|
|
682
|
+
],
|
|
683
|
+
children: T.day
|
|
684
|
+
}
|
|
685
|
+
)
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
] }) }) }),
|
|
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 })
|
|
694
|
+
] });
|
|
695
|
+
}, F = _.create({
|
|
696
|
+
calendar: {
|
|
697
|
+
flexGrow: 0,
|
|
698
|
+
flexShrink: 1
|
|
699
|
+
},
|
|
700
|
+
calendarContent: {
|
|
701
|
+
flexGrow: 0
|
|
702
|
+
},
|
|
703
|
+
calendarHeader: {
|
|
704
|
+
alignItems: "center",
|
|
705
|
+
flexDirection: "row",
|
|
706
|
+
justifyContent: "space-between",
|
|
707
|
+
marginBottom: 16,
|
|
708
|
+
paddingHorizontal: 8
|
|
709
|
+
},
|
|
710
|
+
closeButton: {
|
|
711
|
+
fontSize: 24,
|
|
712
|
+
fontWeight: "300"
|
|
713
|
+
},
|
|
714
|
+
container: {
|
|
715
|
+
marginBottom: 16
|
|
716
|
+
},
|
|
717
|
+
dayCell: {
|
|
718
|
+
alignItems: "center",
|
|
719
|
+
aspectRatio: 1,
|
|
720
|
+
flex: 1,
|
|
721
|
+
justifyContent: "center",
|
|
722
|
+
margin: 2,
|
|
723
|
+
maxWidth: "14.28%"
|
|
724
|
+
},
|
|
725
|
+
dayCellDisabled: {
|
|
726
|
+
opacity: 0.3
|
|
727
|
+
},
|
|
728
|
+
dayCellOtherMonth: {
|
|
729
|
+
opacity: 0.3
|
|
730
|
+
},
|
|
731
|
+
dayText: {
|
|
732
|
+
fontSize: 14
|
|
733
|
+
},
|
|
734
|
+
error: {
|
|
735
|
+
fontSize: 12,
|
|
736
|
+
marginTop: 4
|
|
737
|
+
},
|
|
738
|
+
helperText: {
|
|
739
|
+
fontSize: 12,
|
|
740
|
+
marginTop: 4
|
|
741
|
+
},
|
|
742
|
+
icon: {
|
|
743
|
+
fontSize: 16
|
|
744
|
+
},
|
|
745
|
+
label: {
|
|
746
|
+
fontSize: 14,
|
|
747
|
+
fontWeight: "500",
|
|
748
|
+
marginBottom: 8
|
|
749
|
+
},
|
|
750
|
+
modalContent: {
|
|
751
|
+
borderRadius: 12,
|
|
752
|
+
maxHeight: "80%",
|
|
753
|
+
padding: 16,
|
|
754
|
+
width: "90%"
|
|
755
|
+
},
|
|
756
|
+
modalHeader: {
|
|
757
|
+
alignItems: "center",
|
|
758
|
+
borderBottomWidth: 1,
|
|
759
|
+
flexDirection: "row",
|
|
760
|
+
justifyContent: "space-between",
|
|
761
|
+
marginBottom: 16,
|
|
762
|
+
paddingBottom: 12
|
|
763
|
+
},
|
|
764
|
+
modalOverlay: {
|
|
765
|
+
alignItems: "center",
|
|
766
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
767
|
+
flex: 1,
|
|
768
|
+
justifyContent: "center"
|
|
769
|
+
},
|
|
770
|
+
modalTitle: {
|
|
771
|
+
fontSize: 18,
|
|
772
|
+
fontWeight: "600"
|
|
773
|
+
},
|
|
774
|
+
monthYear: {
|
|
775
|
+
fontSize: 16,
|
|
776
|
+
fontWeight: "600"
|
|
777
|
+
},
|
|
778
|
+
navButton: {
|
|
779
|
+
padding: 8
|
|
780
|
+
},
|
|
781
|
+
navButtonText: {
|
|
782
|
+
fontSize: 24,
|
|
783
|
+
fontWeight: "600"
|
|
784
|
+
},
|
|
785
|
+
trigger: {
|
|
786
|
+
alignItems: "center",
|
|
787
|
+
borderRadius: 6,
|
|
788
|
+
borderWidth: 1,
|
|
789
|
+
flexDirection: "row",
|
|
790
|
+
justifyContent: "space-between",
|
|
791
|
+
paddingHorizontal: 12,
|
|
792
|
+
paddingVertical: 10
|
|
793
|
+
},
|
|
794
|
+
triggerText: {
|
|
795
|
+
flex: 1,
|
|
796
|
+
fontSize: 14
|
|
797
|
+
},
|
|
798
|
+
weekDay: {
|
|
799
|
+
flex: 1,
|
|
800
|
+
fontSize: 12,
|
|
801
|
+
fontWeight: "600",
|
|
802
|
+
maxWidth: "14.28%",
|
|
803
|
+
textAlign: "center"
|
|
804
|
+
},
|
|
805
|
+
weekDays: {
|
|
806
|
+
flexDirection: "row",
|
|
807
|
+
marginBottom: 8
|
|
808
|
+
}
|
|
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 = [
|
|
814
|
+
"January",
|
|
815
|
+
"February",
|
|
816
|
+
"March",
|
|
817
|
+
"April",
|
|
818
|
+
"May",
|
|
819
|
+
"June",
|
|
820
|
+
"July",
|
|
821
|
+
"August",
|
|
822
|
+
"September",
|
|
823
|
+
"October",
|
|
824
|
+
"November",
|
|
825
|
+
"December"
|
|
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 - $,
|
|
832
|
+
isCurrentMonth: !1
|
|
833
|
+
});
|
|
834
|
+
for (let $ = 1; $ <= B; $++)
|
|
835
|
+
M.push({
|
|
836
|
+
date: new Date(b, j, $),
|
|
837
|
+
day: $,
|
|
838
|
+
isCurrentMonth: !0
|
|
839
|
+
});
|
|
840
|
+
const ce = 42 - M.length;
|
|
841
|
+
for (let $ = 1; $ <= ce; $++)
|
|
842
|
+
M.push({
|
|
843
|
+
date: new Date(b, j + 1, $),
|
|
844
|
+
day: $,
|
|
845
|
+
isCurrentMonth: !1
|
|
846
|
+
});
|
|
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)));
|
|
851
|
+
},
|
|
852
|
+
[r.data.disablePast, f, l, m, C, i]
|
|
853
|
+
), K = () => {
|
|
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))
|
|
859
|
+
return !1;
|
|
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;
|
|
862
|
+
};
|
|
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: "*" })
|
|
867
|
+
] }),
|
|
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: () => {
|
|
881
|
+
}, children: [
|
|
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: "✕" }) })
|
|
885
|
+
] }),
|
|
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],
|
|
891
|
+
" ",
|
|
892
|
+
b
|
|
893
|
+
] }),
|
|
894
|
+
/* @__PURE__ */ e.jsx(h, { onPress: te, style: W.navButton, children: /* @__PURE__ */ e.jsx(t, { style: [W.navButtonText, { color: o.primary }], children: "›" }) })
|
|
895
|
+
] }),
|
|
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)) }),
|
|
897
|
+
/* @__PURE__ */ e.jsx(
|
|
898
|
+
fe,
|
|
899
|
+
{
|
|
900
|
+
data: D,
|
|
901
|
+
keyExtractor: (I, B) => `${I.date.getTime()}-${B}`,
|
|
902
|
+
numColumns: 7,
|
|
903
|
+
scrollEnabled: !1,
|
|
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);
|
|
908
|
+
return /* @__PURE__ */ e.jsx(
|
|
909
|
+
h,
|
|
910
|
+
{
|
|
911
|
+
style: [
|
|
912
|
+
W.dayCell,
|
|
913
|
+
!I.isCurrentMonth && W.dayCellOtherMonth,
|
|
914
|
+
ee && { backgroundColor: o.primaryLight },
|
|
915
|
+
M && { backgroundColor: o.primary, borderRadius: 20 },
|
|
916
|
+
B && W.dayCellDisabled
|
|
917
|
+
],
|
|
918
|
+
onPress: () => N(I.date),
|
|
919
|
+
disabled: B,
|
|
920
|
+
activeOpacity: 0.7,
|
|
921
|
+
children: /* @__PURE__ */ e.jsx(
|
|
922
|
+
t,
|
|
923
|
+
{
|
|
924
|
+
style: [
|
|
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 }
|
|
931
|
+
],
|
|
932
|
+
children: I.day
|
|
933
|
+
}
|
|
934
|
+
)
|
|
935
|
+
}
|
|
936
|
+
);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
] }) }) }),
|
|
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 })
|
|
943
|
+
] });
|
|
944
|
+
}, W = _.create({
|
|
945
|
+
calendar: {
|
|
946
|
+
flexGrow: 0,
|
|
947
|
+
flexShrink: 1
|
|
948
|
+
},
|
|
949
|
+
calendarContent: {
|
|
950
|
+
flexGrow: 0
|
|
951
|
+
},
|
|
952
|
+
calendarHeader: {
|
|
953
|
+
alignItems: "center",
|
|
954
|
+
flexDirection: "row",
|
|
955
|
+
justifyContent: "space-between",
|
|
956
|
+
marginBottom: 16,
|
|
957
|
+
paddingHorizontal: 8
|
|
958
|
+
},
|
|
959
|
+
closeButton: {
|
|
960
|
+
fontSize: 24,
|
|
961
|
+
fontWeight: "300"
|
|
962
|
+
},
|
|
963
|
+
container: {
|
|
964
|
+
marginBottom: 16
|
|
965
|
+
},
|
|
966
|
+
dayCell: {
|
|
967
|
+
alignItems: "center",
|
|
968
|
+
aspectRatio: 1,
|
|
969
|
+
flex: 1,
|
|
970
|
+
justifyContent: "center",
|
|
971
|
+
margin: 2,
|
|
972
|
+
maxWidth: "14.28%"
|
|
973
|
+
},
|
|
974
|
+
dayCellDisabled: {
|
|
975
|
+
opacity: 0.3
|
|
976
|
+
},
|
|
977
|
+
dayCellOtherMonth: {
|
|
978
|
+
opacity: 0.3
|
|
979
|
+
},
|
|
980
|
+
dayText: {
|
|
981
|
+
fontSize: 14
|
|
982
|
+
},
|
|
983
|
+
error: {
|
|
984
|
+
fontSize: 12,
|
|
985
|
+
marginTop: 4
|
|
986
|
+
},
|
|
987
|
+
helperText: {
|
|
988
|
+
fontSize: 12,
|
|
989
|
+
marginTop: 4
|
|
990
|
+
},
|
|
991
|
+
icon: {
|
|
992
|
+
fontSize: 16
|
|
993
|
+
},
|
|
994
|
+
label: {
|
|
995
|
+
fontSize: 14,
|
|
996
|
+
fontWeight: "500",
|
|
997
|
+
marginBottom: 8
|
|
998
|
+
},
|
|
999
|
+
modalContent: {
|
|
1000
|
+
borderRadius: 12,
|
|
1001
|
+
maxHeight: "80%",
|
|
1002
|
+
padding: 16,
|
|
1003
|
+
width: "90%"
|
|
1004
|
+
},
|
|
1005
|
+
modalHeader: {
|
|
1006
|
+
alignItems: "center",
|
|
1007
|
+
borderBottomWidth: 1,
|
|
1008
|
+
flexDirection: "row",
|
|
1009
|
+
justifyContent: "space-between",
|
|
1010
|
+
marginBottom: 12,
|
|
1011
|
+
paddingBottom: 12
|
|
1012
|
+
},
|
|
1013
|
+
modalOverlay: {
|
|
1014
|
+
alignItems: "center",
|
|
1015
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1016
|
+
flex: 1,
|
|
1017
|
+
justifyContent: "center"
|
|
1018
|
+
},
|
|
1019
|
+
modalTitle: {
|
|
1020
|
+
fontSize: 18,
|
|
1021
|
+
fontWeight: "600"
|
|
1022
|
+
},
|
|
1023
|
+
monthYear: {
|
|
1024
|
+
fontSize: 16,
|
|
1025
|
+
fontWeight: "600"
|
|
1026
|
+
},
|
|
1027
|
+
navButton: {
|
|
1028
|
+
padding: 8
|
|
1029
|
+
},
|
|
1030
|
+
navButtonText: {
|
|
1031
|
+
fontSize: 24,
|
|
1032
|
+
fontWeight: "600"
|
|
1033
|
+
},
|
|
1034
|
+
rangeIndicator: {
|
|
1035
|
+
alignItems: "center",
|
|
1036
|
+
borderRadius: 6,
|
|
1037
|
+
marginBottom: 12,
|
|
1038
|
+
paddingVertical: 8
|
|
1039
|
+
},
|
|
1040
|
+
rangeIndicatorText: {
|
|
1041
|
+
fontSize: 14,
|
|
1042
|
+
fontWeight: "600"
|
|
1043
|
+
},
|
|
1044
|
+
trigger: {
|
|
1045
|
+
alignItems: "center",
|
|
1046
|
+
borderRadius: 6,
|
|
1047
|
+
borderWidth: 1,
|
|
1048
|
+
flexDirection: "row",
|
|
1049
|
+
justifyContent: "space-between",
|
|
1050
|
+
paddingHorizontal: 12,
|
|
1051
|
+
paddingVertical: 10
|
|
1052
|
+
},
|
|
1053
|
+
triggerText: {
|
|
1054
|
+
flex: 1,
|
|
1055
|
+
fontSize: 14
|
|
1056
|
+
},
|
|
1057
|
+
weekDay: {
|
|
1058
|
+
flex: 1,
|
|
1059
|
+
fontSize: 12,
|
|
1060
|
+
fontWeight: "600",
|
|
1061
|
+
maxWidth: "14.28%",
|
|
1062
|
+
textAlign: "center"
|
|
1063
|
+
},
|
|
1064
|
+
weekDays: {
|
|
1065
|
+
flexDirection: "row",
|
|
1066
|
+
marginBottom: 8
|
|
1067
|
+
}
|
|
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)
|
|
1071
|
+
try {
|
|
1072
|
+
const b = (await y({
|
|
1073
|
+
allowMultiSelection: m
|
|
1074
|
+
})).map((z) => ({
|
|
1075
|
+
data: z.uri,
|
|
1076
|
+
lastModified: Date.now(),
|
|
1077
|
+
name: z.name,
|
|
1078
|
+
size: z.size,
|
|
1079
|
+
type: z.type || "application/octet-stream"
|
|
1080
|
+
}));
|
|
1081
|
+
i(m ? [...d, ...b] : b[0] || null);
|
|
1082
|
+
} catch (f) {
|
|
1083
|
+
f.code !== "DOCUMENT_PICKER_CANCELED" && Xe.alert("Error", a("renderer.defaultInputs.filePickerError"));
|
|
1084
|
+
}
|
|
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);
|
|
1089
|
+
},
|
|
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(() => {
|
|
1093
|
+
(async () => {
|
|
1094
|
+
try {
|
|
1095
|
+
const { pick: b } = await import("react-native-document-picker");
|
|
1096
|
+
p(() => b);
|
|
1097
|
+
} catch {
|
|
1098
|
+
p(null);
|
|
1099
|
+
} finally {
|
|
1100
|
+
g(!1);
|
|
1101
|
+
}
|
|
1102
|
+
})();
|
|
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: "*" })
|
|
1107
|
+
] }),
|
|
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) })
|
|
1113
|
+
] }),
|
|
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: "*" })
|
|
1131
|
+
] }),
|
|
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 })
|
|
1134
|
+
] });
|
|
1135
|
+
}, Y = _.create({
|
|
1136
|
+
container: {
|
|
1137
|
+
marginBottom: 16
|
|
1138
|
+
},
|
|
1139
|
+
error: {
|
|
1140
|
+
fontSize: 12,
|
|
1141
|
+
marginTop: 4
|
|
1142
|
+
},
|
|
1143
|
+
fileIcon: {
|
|
1144
|
+
alignItems: "center",
|
|
1145
|
+
borderRadius: 6,
|
|
1146
|
+
height: 40,
|
|
1147
|
+
justifyContent: "center",
|
|
1148
|
+
width: 40
|
|
1149
|
+
},
|
|
1150
|
+
fileIconText: {
|
|
1151
|
+
fontSize: 20
|
|
1152
|
+
},
|
|
1153
|
+
fileInfo: {
|
|
1154
|
+
flex: 1,
|
|
1155
|
+
marginLeft: 12
|
|
1156
|
+
},
|
|
1157
|
+
fileItem: {
|
|
1158
|
+
alignItems: "center",
|
|
1159
|
+
borderRadius: 6,
|
|
1160
|
+
borderWidth: 1,
|
|
1161
|
+
flexDirection: "row",
|
|
1162
|
+
marginBottom: 8,
|
|
1163
|
+
padding: 12
|
|
1164
|
+
},
|
|
1165
|
+
fileName: {
|
|
1166
|
+
fontSize: 14,
|
|
1167
|
+
fontWeight: "500"
|
|
1168
|
+
},
|
|
1169
|
+
fileSize: {
|
|
1170
|
+
fontSize: 12,
|
|
1171
|
+
marginTop: 2
|
|
1172
|
+
},
|
|
1173
|
+
filesList: {
|
|
1174
|
+
marginBottom: 12
|
|
1175
|
+
},
|
|
1176
|
+
helperText: {
|
|
1177
|
+
fontSize: 12,
|
|
1178
|
+
marginTop: 4
|
|
1179
|
+
},
|
|
1180
|
+
label: {
|
|
1181
|
+
fontSize: 14,
|
|
1182
|
+
fontWeight: "500",
|
|
1183
|
+
marginBottom: 8
|
|
1184
|
+
},
|
|
1185
|
+
pickButton: {
|
|
1186
|
+
alignItems: "center",
|
|
1187
|
+
borderRadius: 6,
|
|
1188
|
+
borderStyle: "dashed",
|
|
1189
|
+
borderWidth: 2,
|
|
1190
|
+
justifyContent: "center",
|
|
1191
|
+
paddingVertical: 16
|
|
1192
|
+
},
|
|
1193
|
+
pickButtonText: {
|
|
1194
|
+
fontSize: 14,
|
|
1195
|
+
fontWeight: "500"
|
|
1196
|
+
},
|
|
1197
|
+
removeButton: {
|
|
1198
|
+
padding: 4
|
|
1199
|
+
},
|
|
1200
|
+
removeButtonText: {
|
|
1201
|
+
fontSize: 18
|
|
1202
|
+
},
|
|
1203
|
+
unavailableContainer: {
|
|
1204
|
+
alignItems: "center",
|
|
1205
|
+
borderRadius: 6,
|
|
1206
|
+
borderWidth: 1,
|
|
1207
|
+
justifyContent: "center",
|
|
1208
|
+
paddingVertical: 16
|
|
1209
|
+
},
|
|
1210
|
+
unavailableText: {
|
|
1211
|
+
fontSize: 12,
|
|
1212
|
+
textAlign: "center"
|
|
1213
|
+
}
|
|
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 = {}) => {
|
|
1215
|
+
if (r == null || r === "")
|
|
1216
|
+
return "";
|
|
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]";
|
|
1222
|
+
if (r == null)
|
|
1223
|
+
return r;
|
|
1224
|
+
if (typeof r == "string")
|
|
1225
|
+
return Le(r, s);
|
|
1226
|
+
if (Array.isArray(r))
|
|
1227
|
+
return r.map((c) => Re(c, s, i + 1, n));
|
|
1228
|
+
if (typeof r == "object") {
|
|
1229
|
+
if (n.has(r))
|
|
1230
|
+
return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1231
|
+
n.add(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;
|
|
1236
|
+
}
|
|
1237
|
+
return r;
|
|
1238
|
+
}, Be = (r, s) => s ? s.split(".").reduce((n, c) => {
|
|
1239
|
+
if (n == null)
|
|
1240
|
+
return;
|
|
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;
|
|
1245
|
+
}
|
|
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 = ({
|
|
1257
|
+
node: r,
|
|
1258
|
+
value: s,
|
|
1259
|
+
setValue: i,
|
|
1260
|
+
error: n,
|
|
1261
|
+
label: c,
|
|
1262
|
+
placeholder: S,
|
|
1263
|
+
helperText: y,
|
|
1264
|
+
id: p,
|
|
1265
|
+
name: l
|
|
1266
|
+
}) => {
|
|
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;
|
|
1275
|
+
return;
|
|
1276
|
+
}
|
|
1277
|
+
if (V.url && !Me(V.url, le)) {
|
|
1278
|
+
I.current = null;
|
|
1279
|
+
return;
|
|
1280
|
+
}
|
|
1281
|
+
a(!0), d(null);
|
|
1282
|
+
try {
|
|
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);
|
|
1286
|
+
});
|
|
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,
|
|
1289
|
+
headers: {
|
|
1290
|
+
"Content-Type": "application/json",
|
|
1291
|
+
...X
|
|
1292
|
+
},
|
|
1293
|
+
method: V.method || "GET",
|
|
1294
|
+
signal: oe.signal
|
|
1295
|
+
});
|
|
1296
|
+
if (clearTimeout($e), !we.ok) {
|
|
1297
|
+
d(`HTTP Error ${we.status}: ${we.statusText}`), a(!1);
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
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) || "")
|
|
1305
|
+
}));
|
|
1306
|
+
C(_e);
|
|
1307
|
+
} else
|
|
1308
|
+
je(typeof Ce == "string" ? Ce : JSON.stringify(Ce));
|
|
1309
|
+
} catch (re) {
|
|
1310
|
+
if (re instanceof Error && re.name === "AbortError")
|
|
1311
|
+
return;
|
|
1312
|
+
const U = re instanceof Error ? re.message : P("renderer.defaultHttpInput.fetchFailed");
|
|
1313
|
+
d(U), console.error("HTTP Input fetch error:", re);
|
|
1314
|
+
} finally {
|
|
1315
|
+
a(!1), I.current = null;
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
[P]
|
|
1319
|
+
);
|
|
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)
|
|
1326
|
+
return;
|
|
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("|");
|
|
1332
|
+
}
|
|
1333
|
+
}, []), ge(() => {
|
|
1334
|
+
if (!N.current || !ee || K.current === M || !ce)
|
|
1335
|
+
return;
|
|
1336
|
+
const G = setTimeout(() => {
|
|
1337
|
+
$(), K.current = M;
|
|
1338
|
+
}, 500);
|
|
1339
|
+
return () => clearTimeout(G);
|
|
1340
|
+
}, [M, ee, ce, $]), ge(() => {
|
|
1341
|
+
if (!(D?.searchParam && v))
|
|
1342
|
+
return;
|
|
1343
|
+
const G = setTimeout(() => {
|
|
1344
|
+
$(v);
|
|
1345
|
+
}, 300);
|
|
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: "*" })
|
|
1355
|
+
] }),
|
|
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: () => {
|
|
1372
|
+
}, children: [
|
|
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: "✕" }) })
|
|
1376
|
+
] }),
|
|
1377
|
+
/* @__PURE__ */ e.jsx(x, { style: k.searchContainer, children: /* @__PURE__ */ e.jsx(
|
|
1378
|
+
me,
|
|
1379
|
+
{
|
|
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);
|
|
1386
|
+
},
|
|
1387
|
+
autoFocus: !0,
|
|
1388
|
+
autoCapitalize: "none",
|
|
1389
|
+
autoCorrect: !1
|
|
1390
|
+
}
|
|
1391
|
+
) }),
|
|
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") }) })
|
|
1395
|
+
] }) : /* @__PURE__ */ e.jsx(
|
|
1396
|
+
fe,
|
|
1397
|
+
{
|
|
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;
|
|
1405
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1406
|
+
h,
|
|
1407
|
+
{
|
|
1408
|
+
style: [k.option, ze && { backgroundColor: u.primaryLight }],
|
|
1409
|
+
onPress: () => {
|
|
1410
|
+
i(X.value), b(!1);
|
|
1411
|
+
},
|
|
1412
|
+
activeOpacity: 0.7,
|
|
1413
|
+
children: [
|
|
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: "✓" })
|
|
1416
|
+
]
|
|
1417
|
+
}
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
)
|
|
1422
|
+
] }) }) }),
|
|
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 })
|
|
1425
|
+
] });
|
|
1426
|
+
}
|
|
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: "*" })
|
|
1435
|
+
] }),
|
|
1436
|
+
/* @__PURE__ */ e.jsxs(
|
|
1437
|
+
h,
|
|
1438
|
+
{
|
|
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,
|
|
1447
|
+
activeOpacity: 0.7,
|
|
1448
|
+
children: [
|
|
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: "▼" })
|
|
1452
|
+
]
|
|
1453
|
+
}
|
|
1454
|
+
),
|
|
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: () => {
|
|
1457
|
+
}, children: [
|
|
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: "✕" }) })
|
|
1461
|
+
] }),
|
|
1462
|
+
/* @__PURE__ */ e.jsx(
|
|
1463
|
+
fe,
|
|
1464
|
+
{
|
|
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;
|
|
1471
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1472
|
+
h,
|
|
1473
|
+
{
|
|
1474
|
+
style: [k.option, X && { backgroundColor: u.primaryLight }],
|
|
1475
|
+
onPress: () => {
|
|
1476
|
+
i(U.value), b(!1);
|
|
1477
|
+
},
|
|
1478
|
+
activeOpacity: 0.7,
|
|
1479
|
+
children: [
|
|
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: "✓" })
|
|
1482
|
+
]
|
|
1483
|
+
}
|
|
1484
|
+
);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
)
|
|
1488
|
+
] }) }) }),
|
|
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 })
|
|
1491
|
+
] });
|
|
1492
|
+
}
|
|
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: "*" })
|
|
1497
|
+
] }),
|
|
1498
|
+
/* @__PURE__ */ e.jsx(
|
|
1499
|
+
me,
|
|
1500
|
+
{
|
|
1501
|
+
style: [k.input, { backgroundColor: u.muted, borderColor: u.border, color: u.textMuted }],
|
|
1502
|
+
value: typeof s == "string" ? s : JSON.stringify(s),
|
|
1503
|
+
editable: !1
|
|
1504
|
+
}
|
|
1505
|
+
),
|
|
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 })
|
|
1508
|
+
] });
|
|
1509
|
+
}, k = _.create({
|
|
1510
|
+
arrow: {
|
|
1511
|
+
fontSize: 12
|
|
1512
|
+
},
|
|
1513
|
+
checkmark: {
|
|
1514
|
+
fontSize: 18,
|
|
1515
|
+
fontWeight: "700"
|
|
1516
|
+
},
|
|
1517
|
+
closeButton: {
|
|
1518
|
+
fontSize: 24,
|
|
1519
|
+
fontWeight: "300"
|
|
1520
|
+
},
|
|
1521
|
+
container: {
|
|
1522
|
+
marginBottom: 16
|
|
1523
|
+
},
|
|
1524
|
+
disabledMessage: {
|
|
1525
|
+
fontSize: 12,
|
|
1526
|
+
marginTop: 4
|
|
1527
|
+
},
|
|
1528
|
+
emptyContainer: {
|
|
1529
|
+
alignItems: "center",
|
|
1530
|
+
paddingVertical: 24
|
|
1531
|
+
},
|
|
1532
|
+
emptyText: {
|
|
1533
|
+
fontSize: 14
|
|
1534
|
+
},
|
|
1535
|
+
error: {
|
|
1536
|
+
fontSize: 12,
|
|
1537
|
+
marginTop: 4
|
|
1538
|
+
},
|
|
1539
|
+
errorContainer: {
|
|
1540
|
+
alignItems: "center",
|
|
1541
|
+
paddingVertical: 16
|
|
1542
|
+
},
|
|
1543
|
+
errorText: {
|
|
1544
|
+
fontSize: 14,
|
|
1545
|
+
textAlign: "center"
|
|
1546
|
+
},
|
|
1547
|
+
helperText: {
|
|
1548
|
+
fontSize: 12,
|
|
1549
|
+
marginTop: 4
|
|
1550
|
+
},
|
|
1551
|
+
input: {
|
|
1552
|
+
borderRadius: 6,
|
|
1553
|
+
borderWidth: 1,
|
|
1554
|
+
fontSize: 14,
|
|
1555
|
+
paddingHorizontal: 12,
|
|
1556
|
+
paddingVertical: 10
|
|
1557
|
+
},
|
|
1558
|
+
label: {
|
|
1559
|
+
fontSize: 14,
|
|
1560
|
+
fontWeight: "500",
|
|
1561
|
+
marginBottom: 8
|
|
1562
|
+
},
|
|
1563
|
+
loadingContainer: {
|
|
1564
|
+
alignItems: "center",
|
|
1565
|
+
paddingVertical: 24
|
|
1566
|
+
},
|
|
1567
|
+
loadingTrigger: {
|
|
1568
|
+
alignItems: "center",
|
|
1569
|
+
flex: 1,
|
|
1570
|
+
flexDirection: "row",
|
|
1571
|
+
gap: 8
|
|
1572
|
+
},
|
|
1573
|
+
modalContent: {
|
|
1574
|
+
borderRadius: 12,
|
|
1575
|
+
maxHeight: "80%",
|
|
1576
|
+
padding: 16,
|
|
1577
|
+
width: "90%"
|
|
1578
|
+
},
|
|
1579
|
+
modalHeader: {
|
|
1580
|
+
alignItems: "center",
|
|
1581
|
+
borderBottomWidth: 1,
|
|
1582
|
+
flexDirection: "row",
|
|
1583
|
+
justifyContent: "space-between",
|
|
1584
|
+
marginBottom: 12,
|
|
1585
|
+
paddingBottom: 12
|
|
1586
|
+
},
|
|
1587
|
+
modalOverlay: {
|
|
1588
|
+
alignItems: "center",
|
|
1589
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1590
|
+
flex: 1,
|
|
1591
|
+
justifyContent: "center"
|
|
1592
|
+
},
|
|
1593
|
+
modalTitle: {
|
|
1594
|
+
fontSize: 18,
|
|
1595
|
+
fontWeight: "600"
|
|
1596
|
+
},
|
|
1597
|
+
option: {
|
|
1598
|
+
alignItems: "center",
|
|
1599
|
+
borderRadius: 6,
|
|
1600
|
+
flexDirection: "row",
|
|
1601
|
+
justifyContent: "space-between",
|
|
1602
|
+
paddingHorizontal: 12,
|
|
1603
|
+
paddingVertical: 12
|
|
1604
|
+
},
|
|
1605
|
+
optionsList: {
|
|
1606
|
+
flexGrow: 0,
|
|
1607
|
+
flexShrink: 1
|
|
1608
|
+
},
|
|
1609
|
+
optionsListContent: {
|
|
1610
|
+
flexGrow: 0
|
|
1611
|
+
},
|
|
1612
|
+
optionText: {
|
|
1613
|
+
flex: 1,
|
|
1614
|
+
fontSize: 14
|
|
1615
|
+
},
|
|
1616
|
+
retryButton: {
|
|
1617
|
+
marginTop: 12
|
|
1618
|
+
},
|
|
1619
|
+
retryButtonText: {
|
|
1620
|
+
fontSize: 14,
|
|
1621
|
+
textDecorationLine: "underline"
|
|
1622
|
+
},
|
|
1623
|
+
searchContainer: {
|
|
1624
|
+
marginBottom: 12
|
|
1625
|
+
},
|
|
1626
|
+
searchInput: {
|
|
1627
|
+
borderRadius: 6,
|
|
1628
|
+
borderWidth: 1,
|
|
1629
|
+
fontSize: 14,
|
|
1630
|
+
paddingHorizontal: 12,
|
|
1631
|
+
paddingVertical: 10
|
|
1632
|
+
},
|
|
1633
|
+
trigger: {
|
|
1634
|
+
alignItems: "center",
|
|
1635
|
+
borderRadius: 6,
|
|
1636
|
+
borderWidth: 1,
|
|
1637
|
+
flexDirection: "row",
|
|
1638
|
+
justifyContent: "space-between",
|
|
1639
|
+
paddingHorizontal: 12,
|
|
1640
|
+
paddingVertical: 10
|
|
1641
|
+
},
|
|
1642
|
+
triggerLoader: {
|
|
1643
|
+
marginRight: 8
|
|
1644
|
+
},
|
|
1645
|
+
triggerText: {
|
|
1646
|
+
flex: 1,
|
|
1647
|
+
fontSize: 14
|
|
1648
|
+
}
|
|
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: "*" })
|
|
1657
|
+
] }),
|
|
1658
|
+
/* @__PURE__ */ e.jsx(
|
|
1659
|
+
me,
|
|
1660
|
+
{
|
|
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);
|
|
1670
|
+
return;
|
|
1671
|
+
}
|
|
1672
|
+
const d = Number(o);
|
|
1673
|
+
Number.isNaN(d) || i(d);
|
|
1674
|
+
},
|
|
1675
|
+
placeholder: S,
|
|
1676
|
+
placeholderTextColor: l.textMuted,
|
|
1677
|
+
keyboardType: "numeric",
|
|
1678
|
+
accessibilityLabel: p
|
|
1679
|
+
}
|
|
1680
|
+
),
|
|
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 })
|
|
1683
|
+
] });
|
|
1684
|
+
}, Se = _.create({
|
|
1685
|
+
container: {
|
|
1686
|
+
marginBottom: 16
|
|
1687
|
+
},
|
|
1688
|
+
error: {
|
|
1689
|
+
fontSize: 12,
|
|
1690
|
+
marginTop: 4
|
|
1691
|
+
},
|
|
1692
|
+
helperText: {
|
|
1693
|
+
fontSize: 12,
|
|
1694
|
+
marginTop: 4
|
|
1695
|
+
},
|
|
1696
|
+
input: {
|
|
1697
|
+
borderRadius: 6,
|
|
1698
|
+
borderWidth: 1,
|
|
1699
|
+
fontSize: 14,
|
|
1700
|
+
paddingHorizontal: 12,
|
|
1701
|
+
paddingVertical: 8
|
|
1702
|
+
},
|
|
1703
|
+
label: {
|
|
1704
|
+
fontSize: 14,
|
|
1705
|
+
fontWeight: "500",
|
|
1706
|
+
marginBottom: 8
|
|
1707
|
+
}
|
|
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: "*" })
|
|
1714
|
+
] }),
|
|
1715
|
+
/* @__PURE__ */ e.jsxs(x, { style: de.inputWrapper, children: [
|
|
1716
|
+
/* @__PURE__ */ e.jsx(
|
|
1717
|
+
me,
|
|
1718
|
+
{
|
|
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
|
|
1730
|
+
}
|
|
1731
|
+
),
|
|
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" }) })
|
|
1733
|
+
] }),
|
|
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 })
|
|
1736
|
+
] });
|
|
1737
|
+
}, de = _.create({
|
|
1738
|
+
container: {
|
|
1739
|
+
marginBottom: 16
|
|
1740
|
+
},
|
|
1741
|
+
error: {
|
|
1742
|
+
fontSize: 12,
|
|
1743
|
+
marginTop: 4
|
|
1744
|
+
},
|
|
1745
|
+
helperText: {
|
|
1746
|
+
fontSize: 12,
|
|
1747
|
+
marginTop: 4
|
|
1748
|
+
},
|
|
1749
|
+
input: {
|
|
1750
|
+
borderRadius: 6,
|
|
1751
|
+
borderWidth: 1,
|
|
1752
|
+
flex: 1,
|
|
1753
|
+
fontSize: 14,
|
|
1754
|
+
paddingHorizontal: 12,
|
|
1755
|
+
paddingVertical: 8
|
|
1756
|
+
},
|
|
1757
|
+
inputWrapper: {
|
|
1758
|
+
alignItems: "center",
|
|
1759
|
+
flexDirection: "row",
|
|
1760
|
+
position: "relative"
|
|
1761
|
+
},
|
|
1762
|
+
label: {
|
|
1763
|
+
fontSize: 14,
|
|
1764
|
+
fontWeight: "500",
|
|
1765
|
+
marginBottom: 8
|
|
1766
|
+
},
|
|
1767
|
+
toggleButton: {
|
|
1768
|
+
paddingHorizontal: 12,
|
|
1769
|
+
paddingVertical: 8,
|
|
1770
|
+
position: "absolute",
|
|
1771
|
+
right: 0
|
|
1772
|
+
},
|
|
1773
|
+
toggleText: {
|
|
1774
|
+
fontSize: 12,
|
|
1775
|
+
fontWeight: "600"
|
|
1776
|
+
}
|
|
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);
|
|
1780
|
+
};
|
|
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: "*" })
|
|
1785
|
+
] }),
|
|
1786
|
+
l.map((o) => {
|
|
1787
|
+
const d = g === o.value;
|
|
1788
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1789
|
+
h,
|
|
1790
|
+
{
|
|
1791
|
+
style: ue.option,
|
|
1792
|
+
onPress: () => a(o.value),
|
|
1793
|
+
disabled: o.disabled,
|
|
1794
|
+
activeOpacity: 0.7,
|
|
1795
|
+
children: [
|
|
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 })
|
|
1808
|
+
]
|
|
1809
|
+
},
|
|
1810
|
+
o.value
|
|
1811
|
+
);
|
|
1812
|
+
}),
|
|
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 })
|
|
1815
|
+
] });
|
|
1816
|
+
}, ue = _.create({
|
|
1817
|
+
container: {
|
|
1818
|
+
marginBottom: 16
|
|
1819
|
+
},
|
|
1820
|
+
error: {
|
|
1821
|
+
fontSize: 12,
|
|
1822
|
+
marginTop: 4
|
|
1823
|
+
},
|
|
1824
|
+
helperText: {
|
|
1825
|
+
fontSize: 12,
|
|
1826
|
+
marginTop: 4
|
|
1827
|
+
},
|
|
1828
|
+
label: {
|
|
1829
|
+
fontSize: 14,
|
|
1830
|
+
fontWeight: "500",
|
|
1831
|
+
marginBottom: 8
|
|
1832
|
+
},
|
|
1833
|
+
option: {
|
|
1834
|
+
alignItems: "center",
|
|
1835
|
+
flexDirection: "row",
|
|
1836
|
+
marginBottom: 8
|
|
1837
|
+
},
|
|
1838
|
+
optionLabel: {
|
|
1839
|
+
fontSize: 14
|
|
1840
|
+
},
|
|
1841
|
+
radio: {
|
|
1842
|
+
alignItems: "center",
|
|
1843
|
+
borderRadius: 10,
|
|
1844
|
+
borderWidth: 2,
|
|
1845
|
+
height: 20,
|
|
1846
|
+
justifyContent: "center",
|
|
1847
|
+
marginRight: 12,
|
|
1848
|
+
width: 20
|
|
1849
|
+
},
|
|
1850
|
+
radioInner: {
|
|
1851
|
+
borderRadius: 5,
|
|
1852
|
+
height: 10,
|
|
1853
|
+
width: 10
|
|
1854
|
+
}
|
|
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);
|
|
1860
|
+
} else
|
|
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...";
|
|
1869
|
+
};
|
|
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: "*" })
|
|
1874
|
+
] }),
|
|
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: "✕" }) })
|
|
1891
|
+
] }),
|
|
1892
|
+
/* @__PURE__ */ e.jsx(be, { style: J.optionsList, children: o.map((w) => {
|
|
1893
|
+
const f = m.includes(w.value);
|
|
1894
|
+
return /* @__PURE__ */ e.jsxs(
|
|
1895
|
+
h,
|
|
1896
|
+
{
|
|
1897
|
+
style: [J.option, f && { backgroundColor: `${a.primary}20` }],
|
|
1898
|
+
onPress: () => C(w.value),
|
|
1899
|
+
disabled: w.disabled,
|
|
1900
|
+
activeOpacity: 0.7,
|
|
1901
|
+
children: [
|
|
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: "✓" })
|
|
1904
|
+
]
|
|
1905
|
+
},
|
|
1906
|
+
w.value
|
|
1907
|
+
);
|
|
1908
|
+
}) }),
|
|
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" }) })
|
|
1910
|
+
] }) }) }),
|
|
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 })
|
|
1913
|
+
] });
|
|
1914
|
+
}, J = _.create({
|
|
1915
|
+
arrow: {
|
|
1916
|
+
fontSize: 12
|
|
1917
|
+
},
|
|
1918
|
+
checkmark: {
|
|
1919
|
+
fontSize: 18,
|
|
1920
|
+
fontWeight: "700"
|
|
1921
|
+
},
|
|
1922
|
+
closeButton: {
|
|
1923
|
+
fontSize: 24,
|
|
1924
|
+
fontWeight: "300"
|
|
1925
|
+
},
|
|
1926
|
+
container: {
|
|
1927
|
+
marginBottom: 16
|
|
1928
|
+
},
|
|
1929
|
+
doneButton: {
|
|
1930
|
+
alignItems: "center",
|
|
1931
|
+
borderRadius: 6,
|
|
1932
|
+
marginTop: 12,
|
|
1933
|
+
paddingVertical: 12
|
|
1934
|
+
},
|
|
1935
|
+
doneButtonText: {
|
|
1936
|
+
color: "#FFFFFF",
|
|
1937
|
+
fontSize: 16,
|
|
1938
|
+
fontWeight: "600"
|
|
1939
|
+
},
|
|
1940
|
+
error: {
|
|
1941
|
+
fontSize: 12,
|
|
1942
|
+
marginTop: 4
|
|
1943
|
+
},
|
|
1944
|
+
helperText: {
|
|
1945
|
+
fontSize: 12,
|
|
1946
|
+
marginTop: 4
|
|
1947
|
+
},
|
|
1948
|
+
label: {
|
|
1949
|
+
fontSize: 14,
|
|
1950
|
+
fontWeight: "500",
|
|
1951
|
+
marginBottom: 8
|
|
1952
|
+
},
|
|
1953
|
+
modalContent: {
|
|
1954
|
+
borderRadius: 12,
|
|
1955
|
+
maxHeight: "80%",
|
|
1956
|
+
padding: 16,
|
|
1957
|
+
width: "90%"
|
|
1958
|
+
},
|
|
1959
|
+
modalHeader: {
|
|
1960
|
+
alignItems: "center",
|
|
1961
|
+
borderBottomWidth: 1,
|
|
1962
|
+
flexDirection: "row",
|
|
1963
|
+
justifyContent: "space-between",
|
|
1964
|
+
marginBottom: 12,
|
|
1965
|
+
paddingBottom: 12
|
|
1966
|
+
},
|
|
1967
|
+
modalOverlay: {
|
|
1968
|
+
alignItems: "center",
|
|
1969
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1970
|
+
flex: 1,
|
|
1971
|
+
justifyContent: "center"
|
|
1972
|
+
},
|
|
1973
|
+
modalTitle: {
|
|
1974
|
+
fontSize: 18,
|
|
1975
|
+
fontWeight: "600"
|
|
1976
|
+
},
|
|
1977
|
+
option: {
|
|
1978
|
+
alignItems: "center",
|
|
1979
|
+
borderRadius: 6,
|
|
1980
|
+
flexDirection: "row",
|
|
1981
|
+
justifyContent: "space-between",
|
|
1982
|
+
paddingHorizontal: 12,
|
|
1983
|
+
paddingVertical: 12
|
|
1984
|
+
},
|
|
1985
|
+
optionsList: {
|
|
1986
|
+
maxHeight: 300
|
|
1987
|
+
},
|
|
1988
|
+
optionText: {
|
|
1989
|
+
fontSize: 14
|
|
1990
|
+
},
|
|
1991
|
+
trigger: {
|
|
1992
|
+
alignItems: "center",
|
|
1993
|
+
borderRadius: 6,
|
|
1994
|
+
borderWidth: 1,
|
|
1995
|
+
flexDirection: "row",
|
|
1996
|
+
justifyContent: "space-between",
|
|
1997
|
+
paddingHorizontal: 12,
|
|
1998
|
+
paddingVertical: 10
|
|
1999
|
+
},
|
|
2000
|
+
triggerText: {
|
|
2001
|
+
flex: 1,
|
|
2002
|
+
fontSize: 14
|
|
2003
|
+
}
|
|
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: "*" })
|
|
2011
|
+
] }) }),
|
|
2012
|
+
/* @__PURE__ */ e.jsx(
|
|
2013
|
+
Ze,
|
|
2014
|
+
{
|
|
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
|
|
2020
|
+
}
|
|
2021
|
+
)
|
|
2022
|
+
] }),
|
|
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 })
|
|
2025
|
+
] });
|
|
2026
|
+
}, pe = _.create({
|
|
2027
|
+
container: {
|
|
2028
|
+
marginBottom: 16
|
|
2029
|
+
},
|
|
2030
|
+
error: {
|
|
2031
|
+
fontSize: 12,
|
|
2032
|
+
marginTop: 4
|
|
2033
|
+
},
|
|
2034
|
+
helperText: {
|
|
2035
|
+
fontSize: 12,
|
|
2036
|
+
marginTop: 4
|
|
2037
|
+
},
|
|
2038
|
+
label: {
|
|
2039
|
+
fontSize: 14,
|
|
2040
|
+
fontWeight: "500"
|
|
2041
|
+
},
|
|
2042
|
+
labelContainer: {
|
|
2043
|
+
flex: 1
|
|
2044
|
+
},
|
|
2045
|
+
row: {
|
|
2046
|
+
alignItems: "center",
|
|
2047
|
+
flexDirection: "row",
|
|
2048
|
+
justifyContent: "space-between"
|
|
2049
|
+
}
|
|
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({
|
|
2079
|
+
container: {
|
|
2080
|
+
marginBottom: 16
|
|
2081
|
+
},
|
|
2082
|
+
error: {
|
|
2083
|
+
fontSize: 12,
|
|
2084
|
+
marginTop: 4
|
|
2085
|
+
},
|
|
2086
|
+
helperText: {
|
|
2087
|
+
fontSize: 12,
|
|
2088
|
+
marginTop: 4
|
|
2089
|
+
},
|
|
2090
|
+
label: {
|
|
2091
|
+
fontSize: 14,
|
|
2092
|
+
fontWeight: "500",
|
|
2093
|
+
marginBottom: 8
|
|
2094
|
+
},
|
|
2095
|
+
textarea: {
|
|
2096
|
+
borderRadius: 6,
|
|
2097
|
+
borderWidth: 1,
|
|
2098
|
+
fontSize: 14,
|
|
2099
|
+
minHeight: 100,
|
|
2100
|
+
paddingHorizontal: 12,
|
|
2101
|
+
paddingVertical: 8
|
|
2102
|
+
}
|
|
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({
|
|
2129
|
+
container: {
|
|
2130
|
+
marginBottom: 16
|
|
2131
|
+
},
|
|
2132
|
+
error: {
|
|
2133
|
+
fontSize: 12,
|
|
2134
|
+
marginTop: 4
|
|
2135
|
+
},
|
|
2136
|
+
helperText: {
|
|
2137
|
+
fontSize: 12,
|
|
2138
|
+
marginTop: 4
|
|
2139
|
+
},
|
|
2140
|
+
input: {
|
|
2141
|
+
borderRadius: 6,
|
|
2142
|
+
borderWidth: 1,
|
|
2143
|
+
fontSize: 14,
|
|
2144
|
+
paddingHorizontal: 12,
|
|
2145
|
+
paddingVertical: 8
|
|
2146
|
+
},
|
|
2147
|
+
label: {
|
|
2148
|
+
fontSize: 14,
|
|
2149
|
+
fontWeight: "500",
|
|
2150
|
+
marginBottom: 8
|
|
2151
|
+
}
|
|
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);
|
|
2158
|
+
};
|
|
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: "*" })
|
|
2163
|
+
] }),
|
|
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: () => {
|
|
2177
|
+
}, children: [
|
|
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: "✕" }) })
|
|
2181
|
+
] }),
|
|
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" }),
|
|
2185
|
+
/* @__PURE__ */ e.jsx(
|
|
2186
|
+
be,
|
|
2187
|
+
{
|
|
2188
|
+
ref: j,
|
|
2189
|
+
style: H.picker,
|
|
2190
|
+
contentContainerStyle: H.pickerContent,
|
|
2191
|
+
showsVerticalScrollIndicator: !1,
|
|
2192
|
+
children: u.map((T) => /* @__PURE__ */ e.jsx(
|
|
2193
|
+
h,
|
|
2194
|
+
{
|
|
2195
|
+
style: [H.pickerItem, w === T && { backgroundColor: g.primary }],
|
|
2196
|
+
onPress: () => f(T),
|
|
2197
|
+
activeOpacity: 0.7,
|
|
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
|
+
)
|
|
2209
|
+
},
|
|
2210
|
+
T
|
|
2211
|
+
))
|
|
2212
|
+
}
|
|
2213
|
+
)
|
|
2214
|
+
] }),
|
|
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" }),
|
|
2218
|
+
/* @__PURE__ */ e.jsx(
|
|
2219
|
+
be,
|
|
2220
|
+
{
|
|
2221
|
+
ref: P,
|
|
2222
|
+
style: H.picker,
|
|
2223
|
+
contentContainerStyle: H.pickerContent,
|
|
2224
|
+
showsVerticalScrollIndicator: !1,
|
|
2225
|
+
children: D.map((T) => /* @__PURE__ */ e.jsx(
|
|
2226
|
+
h,
|
|
2227
|
+
{
|
|
2228
|
+
style: [H.pickerItem, b === T && { backgroundColor: g.primary }],
|
|
2229
|
+
onPress: () => z(T),
|
|
2230
|
+
activeOpacity: 0.7,
|
|
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
|
+
)
|
|
2242
|
+
},
|
|
2243
|
+
T
|
|
2244
|
+
))
|
|
2245
|
+
}
|
|
2246
|
+
)
|
|
2247
|
+
] })
|
|
2248
|
+
] }),
|
|
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
|
+
)
|
|
2258
|
+
] }) }) }),
|
|
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 })
|
|
2261
|
+
] });
|
|
2262
|
+
}, H = _.create({
|
|
2263
|
+
closeButton: {
|
|
2264
|
+
fontSize: 24,
|
|
2265
|
+
fontWeight: "300"
|
|
2266
|
+
},
|
|
2267
|
+
confirmButton: {
|
|
2268
|
+
alignItems: "center",
|
|
2269
|
+
borderRadius: 6,
|
|
2270
|
+
marginTop: 16,
|
|
2271
|
+
paddingVertical: 12
|
|
2272
|
+
},
|
|
2273
|
+
confirmButtonText: {
|
|
2274
|
+
fontSize: 16,
|
|
2275
|
+
fontWeight: "600"
|
|
2276
|
+
},
|
|
2277
|
+
container: {
|
|
2278
|
+
marginBottom: 16
|
|
2279
|
+
},
|
|
2280
|
+
error: {
|
|
2281
|
+
fontSize: 12,
|
|
2282
|
+
marginTop: 4
|
|
2283
|
+
},
|
|
2284
|
+
helperText: {
|
|
2285
|
+
fontSize: 12,
|
|
2286
|
+
marginTop: 4
|
|
2287
|
+
},
|
|
2288
|
+
icon: {
|
|
2289
|
+
fontSize: 16
|
|
2290
|
+
},
|
|
2291
|
+
label: {
|
|
2292
|
+
fontSize: 14,
|
|
2293
|
+
fontWeight: "500",
|
|
2294
|
+
marginBottom: 8
|
|
2295
|
+
},
|
|
2296
|
+
modalContent: {
|
|
2297
|
+
borderRadius: 12,
|
|
2298
|
+
padding: 16,
|
|
2299
|
+
width: "80%"
|
|
2300
|
+
},
|
|
2301
|
+
modalHeader: {
|
|
2302
|
+
alignItems: "center",
|
|
2303
|
+
borderBottomWidth: 1,
|
|
2304
|
+
flexDirection: "row",
|
|
2305
|
+
justifyContent: "space-between",
|
|
2306
|
+
marginBottom: 16,
|
|
2307
|
+
paddingBottom: 12
|
|
2308
|
+
},
|
|
2309
|
+
modalOverlay: {
|
|
2310
|
+
alignItems: "center",
|
|
2311
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
2312
|
+
flex: 1,
|
|
2313
|
+
justifyContent: "center"
|
|
2314
|
+
},
|
|
2315
|
+
modalTitle: {
|
|
2316
|
+
fontSize: 18,
|
|
2317
|
+
fontWeight: "600"
|
|
2318
|
+
},
|
|
2319
|
+
picker: {
|
|
2320
|
+
maxHeight: 200
|
|
2321
|
+
},
|
|
2322
|
+
pickerColumn: {
|
|
2323
|
+
flex: 1
|
|
2324
|
+
},
|
|
2325
|
+
pickerContainer: {
|
|
2326
|
+
alignItems: "center",
|
|
2327
|
+
flexDirection: "row",
|
|
2328
|
+
gap: 8
|
|
2329
|
+
},
|
|
2330
|
+
pickerContent: {
|
|
2331
|
+
paddingVertical: 8
|
|
2332
|
+
},
|
|
2333
|
+
pickerItem: {
|
|
2334
|
+
alignItems: "center",
|
|
2335
|
+
borderRadius: 6,
|
|
2336
|
+
marginVertical: 2,
|
|
2337
|
+
paddingVertical: 10
|
|
2338
|
+
},
|
|
2339
|
+
pickerItemText: {
|
|
2340
|
+
fontSize: 18
|
|
2341
|
+
},
|
|
2342
|
+
pickerLabel: {
|
|
2343
|
+
fontSize: 12,
|
|
2344
|
+
fontWeight: "600",
|
|
2345
|
+
marginBottom: 8,
|
|
2346
|
+
textAlign: "center"
|
|
2347
|
+
},
|
|
2348
|
+
pickerSeparator: {
|
|
2349
|
+
fontSize: 24,
|
|
2350
|
+
fontWeight: "600"
|
|
2351
|
+
},
|
|
2352
|
+
trigger: {
|
|
2353
|
+
alignItems: "center",
|
|
2354
|
+
borderRadius: 6,
|
|
2355
|
+
borderWidth: 1,
|
|
2356
|
+
flexDirection: "row",
|
|
2357
|
+
justifyContent: "space-between",
|
|
2358
|
+
paddingHorizontal: 12,
|
|
2359
|
+
paddingVertical: 10
|
|
2360
|
+
},
|
|
2361
|
+
triggerText: {
|
|
2362
|
+
flex: 1,
|
|
2363
|
+
fontSize: 14
|
|
2364
|
+
}
|
|
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);
|
|
2371
|
+
};
|
|
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: "*" })
|
|
2376
|
+
] }),
|
|
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: () => {
|
|
2390
|
+
}, children: [
|
|
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: "✕" }) })
|
|
2394
|
+
] }),
|
|
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(
|
|
2400
|
+
h,
|
|
2401
|
+
{
|
|
2402
|
+
style: [O.pickerItem, K === M && { backgroundColor: o.primary }],
|
|
2403
|
+
onPress: () => te(M),
|
|
2404
|
+
activeOpacity: 0.7,
|
|
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
|
+
)
|
|
2416
|
+
},
|
|
2417
|
+
M
|
|
2418
|
+
)) })
|
|
2419
|
+
] }),
|
|
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(
|
|
2424
|
+
h,
|
|
2425
|
+
{
|
|
2426
|
+
style: [O.pickerItem, T === M && { backgroundColor: o.primary }],
|
|
2427
|
+
onPress: () => A(M),
|
|
2428
|
+
activeOpacity: 0.7,
|
|
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
|
+
)
|
|
2440
|
+
},
|
|
2441
|
+
M
|
|
2442
|
+
)) })
|
|
2443
|
+
] })
|
|
2444
|
+
] }),
|
|
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
|
+
)
|
|
2454
|
+
] }) }) }),
|
|
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 })
|
|
2457
|
+
] });
|
|
2458
|
+
}, O = _.create({
|
|
2459
|
+
closeButton: {
|
|
2460
|
+
fontSize: 24,
|
|
2461
|
+
fontWeight: "300"
|
|
2462
|
+
},
|
|
2463
|
+
confirmButton: {
|
|
2464
|
+
alignItems: "center",
|
|
2465
|
+
borderRadius: 6,
|
|
2466
|
+
marginTop: 16,
|
|
2467
|
+
paddingVertical: 12
|
|
2468
|
+
},
|
|
2469
|
+
confirmButtonText: {
|
|
2470
|
+
fontSize: 16,
|
|
2471
|
+
fontWeight: "600"
|
|
2472
|
+
},
|
|
2473
|
+
container: {
|
|
2474
|
+
marginBottom: 16
|
|
2475
|
+
},
|
|
2476
|
+
error: {
|
|
2477
|
+
fontSize: 12,
|
|
2478
|
+
marginTop: 4
|
|
2479
|
+
},
|
|
2480
|
+
helperText: {
|
|
2481
|
+
fontSize: 12,
|
|
2482
|
+
marginTop: 4
|
|
2483
|
+
},
|
|
2484
|
+
icon: {
|
|
2485
|
+
fontSize: 16
|
|
2486
|
+
},
|
|
2487
|
+
label: {
|
|
2488
|
+
fontSize: 14,
|
|
2489
|
+
fontWeight: "500",
|
|
2490
|
+
marginBottom: 8
|
|
2491
|
+
},
|
|
2492
|
+
modalContent: {
|
|
2493
|
+
borderRadius: 12,
|
|
2494
|
+
padding: 16,
|
|
2495
|
+
width: "80%"
|
|
2496
|
+
},
|
|
2497
|
+
modalHeader: {
|
|
2498
|
+
alignItems: "center",
|
|
2499
|
+
borderBottomWidth: 1,
|
|
2500
|
+
flexDirection: "row",
|
|
2501
|
+
justifyContent: "space-between",
|
|
2502
|
+
marginBottom: 12,
|
|
2503
|
+
paddingBottom: 12
|
|
2504
|
+
},
|
|
2505
|
+
modalOverlay: {
|
|
2506
|
+
alignItems: "center",
|
|
2507
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
2508
|
+
flex: 1,
|
|
2509
|
+
justifyContent: "center"
|
|
2510
|
+
},
|
|
2511
|
+
modalTitle: {
|
|
2512
|
+
fontSize: 18,
|
|
2513
|
+
fontWeight: "600"
|
|
2514
|
+
},
|
|
2515
|
+
picker: {
|
|
2516
|
+
maxHeight: 200
|
|
2517
|
+
},
|
|
2518
|
+
pickerColumn: {
|
|
2519
|
+
flex: 1
|
|
2520
|
+
},
|
|
2521
|
+
pickerContainer: {
|
|
2522
|
+
alignItems: "center",
|
|
2523
|
+
flexDirection: "row",
|
|
2524
|
+
gap: 8
|
|
2525
|
+
},
|
|
2526
|
+
pickerContent: {
|
|
2527
|
+
paddingVertical: 8
|
|
2528
|
+
},
|
|
2529
|
+
pickerItem: {
|
|
2530
|
+
alignItems: "center",
|
|
2531
|
+
borderRadius: 6,
|
|
2532
|
+
marginVertical: 2,
|
|
2533
|
+
paddingVertical: 10
|
|
2534
|
+
},
|
|
2535
|
+
pickerItemText: {
|
|
2536
|
+
fontSize: 18
|
|
2537
|
+
},
|
|
2538
|
+
pickerLabel: {
|
|
2539
|
+
fontSize: 12,
|
|
2540
|
+
fontWeight: "600",
|
|
2541
|
+
marginBottom: 8,
|
|
2542
|
+
textAlign: "center"
|
|
2543
|
+
},
|
|
2544
|
+
pickerSeparator: {
|
|
2545
|
+
fontSize: 24,
|
|
2546
|
+
fontWeight: "600"
|
|
2547
|
+
},
|
|
2548
|
+
rangeIndicator: {
|
|
2549
|
+
alignItems: "center",
|
|
2550
|
+
borderRadius: 6,
|
|
2551
|
+
marginBottom: 12,
|
|
2552
|
+
paddingVertical: 8
|
|
2553
|
+
},
|
|
2554
|
+
rangeIndicatorText: {
|
|
2555
|
+
fontSize: 14,
|
|
2556
|
+
fontWeight: "600"
|
|
2557
|
+
},
|
|
2558
|
+
trigger: {
|
|
2559
|
+
alignItems: "center",
|
|
2560
|
+
borderRadius: 6,
|
|
2561
|
+
borderWidth: 1,
|
|
2562
|
+
flexDirection: "row",
|
|
2563
|
+
justifyContent: "space-between",
|
|
2564
|
+
paddingHorizontal: 12,
|
|
2565
|
+
paddingVertical: 10
|
|
2566
|
+
},
|
|
2567
|
+
triggerText: {
|
|
2568
|
+
flex: 1,
|
|
2569
|
+
fontSize: 14
|
|
2570
|
+
}
|
|
2571
|
+
}), kt = ({ node: r }) => /* @__PURE__ */ e.jsxs(t, { children: [
|
|
2572
|
+
"TODO: Implement ",
|
|
2573
|
+
r.data.type,
|
|
2574
|
+
" input for React Native"
|
|
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,
|
|
2587
|
+
select: ft,
|
|
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({
|
|
2611
|
+
button: {
|
|
2612
|
+
alignItems: "center",
|
|
2613
|
+
borderRadius: 6,
|
|
2614
|
+
justifyContent: "center",
|
|
2615
|
+
marginTop: 16,
|
|
2616
|
+
paddingHorizontal: 24,
|
|
2617
|
+
paddingVertical: 12
|
|
2618
|
+
},
|
|
2619
|
+
buttonText: {
|
|
2620
|
+
fontSize: 16,
|
|
2621
|
+
fontWeight: "600"
|
|
2622
|
+
}
|
|
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({
|
|
2630
|
+
divider: {
|
|
2631
|
+
height: 1,
|
|
2632
|
+
marginBottom: 16,
|
|
2633
|
+
marginTop: 0
|
|
2634
|
+
},
|
|
2635
|
+
title: {
|
|
2636
|
+
fontSize: 20,
|
|
2637
|
+
fontWeight: "700",
|
|
2638
|
+
marginBottom: 16
|
|
2639
|
+
}
|
|
2640
|
+
}), Mt = {
|
|
2641
|
+
divider: Bt,
|
|
2642
|
+
title: Dt
|
|
2643
|
+
}, Ot = ({
|
|
2644
|
+
components: r,
|
|
2645
|
+
contentContainerStyle: s,
|
|
2646
|
+
flows: i,
|
|
2647
|
+
googleApiKey: n,
|
|
2648
|
+
initialValues: c,
|
|
2649
|
+
language: S,
|
|
2650
|
+
onChange: y,
|
|
2651
|
+
onSubmit: p,
|
|
2652
|
+
style: l,
|
|
2653
|
+
theme: g,
|
|
2654
|
+
validate: a,
|
|
2655
|
+
validationMode: o
|
|
2656
|
+
}) => {
|
|
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,
|
|
2665
|
+
isSubmitting: j,
|
|
2666
|
+
mergedFlow: P,
|
|
2667
|
+
missingRequiredFields: u,
|
|
2668
|
+
setFieldValue: D,
|
|
2669
|
+
submitMessage: N,
|
|
2670
|
+
t: K,
|
|
2671
|
+
visibleNodes: te,
|
|
2672
|
+
visibleRootNodes: T
|
|
2673
|
+
} = Ue({
|
|
2674
|
+
components: r,
|
|
2675
|
+
flows: i,
|
|
2676
|
+
googleApiKey: n,
|
|
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
|
|
2697
|
+
});
|
|
2698
|
+
return /* @__PURE__ */ e.jsx(
|
|
2699
|
+
be,
|
|
2700
|
+
{
|
|
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
|
+
)
|
|
2763
|
+
}
|
|
2764
|
+
);
|
|
2765
|
+
}, Lt = (r) => /* @__PURE__ */ e.jsx(Qe, { theme: r.theme, storageKey: "treege-renderer-theme", children: /* @__PURE__ */ e.jsx(Ot, { ...r }) }), Ie = _.create({
|
|
2766
|
+
container: {
|
|
2767
|
+
flex: 1
|
|
2768
|
+
},
|
|
2769
|
+
message: {
|
|
2770
|
+
borderRadius: 6,
|
|
2771
|
+
marginVertical: 16,
|
|
2772
|
+
padding: 16
|
|
2773
|
+
},
|
|
2774
|
+
messageClose: {
|
|
2775
|
+
fontSize: 14,
|
|
2776
|
+
marginTop: 8,
|
|
2777
|
+
textDecorationLine: "underline"
|
|
2778
|
+
},
|
|
2779
|
+
messageText: {
|
|
2780
|
+
fontSize: 14,
|
|
2781
|
+
fontWeight: "500"
|
|
2782
|
+
},
|
|
2783
|
+
poweredBy: {
|
|
2784
|
+
fontSize: 12,
|
|
2785
|
+
paddingVertical: 8,
|
|
2786
|
+
textAlign: "center"
|
|
2787
|
+
}
|
|
2788
|
+
});
|
|
2789
|
+
export {
|
|
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,
|
|
2802
|
+
ft as DefaultSelectInput,
|
|
2803
|
+
It as DefaultSubmitInput,
|
|
2804
|
+
bt as DefaultSwitchInput,
|
|
2805
|
+
Ct as DefaultTextInput,
|
|
2806
|
+
jt as DefaultTextareaInput,
|
|
2807
|
+
St as DefaultTimeInput,
|
|
2808
|
+
Tt as DefaultTimeRangeInput,
|
|
2809
|
+
Dt as DefaultTitleUI,
|
|
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
|
|
2833
|
+
};
|