treege 3.0.0-beta.60 → 3.0.0-beta.62
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 +46 -46
- package/dist/DefaultInputs-DamDWb5R.js +1988 -0
- package/dist/{ThemeContext-Ddk_Y-Dz.js → ThemeContext-cGSTk24y.js} +121 -126
- package/dist/editor/context/TreegeEditorRuntimeProvider.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +3 -3
- package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +2 -2
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +4 -4
- package/dist/editor/hooks/useKeyValueRows.d.ts +15 -0
- package/dist/editor/types/editor.d.ts +4 -10
- package/dist/editor/utils/sensitiveHeaders.d.ts +8 -3
- package/dist/{editor-D2pBjE7E.js → editor-K1jjfc5n.js} +1350 -1324
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeRenderRuntimeProvider.d.ts +3 -3
- package/dist/renderer/features/TreegeRenderer/native/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/OptionItemContent.d.ts +17 -0
- package/dist/renderer/hooks/useSubmitHandler.d.ts +2 -2
- package/dist/renderer/types/renderer.d.ts +5 -2
- package/dist/renderer/utils/http.d.ts +14 -5
- package/dist/renderer/utils/submit.d.ts +2 -2
- package/dist/renderer-native.js +1114 -1080
- package/dist/renderer.js +3 -3
- package/dist/shared/components/ui/item.d.ts +23 -0
- package/dist/shared/components/ui/popover.d.ts +7 -1
- package/dist/shared/context/PortalContainerContext.d.ts +5 -0
- package/dist/shared/types/node.d.ts +26 -26
- package/dist/shared/utils/httpRecord.d.ts +20 -0
- package/package.json +1 -1
- package/dist/DefaultInputs-nRQc9BHG.js +0 -1881
package/dist/renderer-native.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback as ee, useEffect as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { ActivityIndicator as
|
|
1
|
+
import { A as e, B as t, E as n, F as r, O as i, P as a, S as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, k as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, w as T, x as E, y as D } from "./ThemeContext-cGSTk24y.js";
|
|
2
|
+
import { useCallback as ee, useEffect as O, useMemo as k, useRef as A, useState as j } from "react";
|
|
3
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
4
|
+
import { ActivityIndicator as F, Alert as te, Animated as I, FlatList as ne, Image as L, Modal as re, ScrollView as ie, StyleSheet as R, Switch as z, Text as B, TextInput as ae, TouchableOpacity as V, View as H } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var
|
|
7
|
-
style:
|
|
6
|
+
var oe = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
7
|
+
style: se.container,
|
|
8
8
|
children: e
|
|
9
|
-
}),
|
|
9
|
+
}), se = R.create({ container: { padding: 16 } }), ce = async (e, t) => {
|
|
10
10
|
if (!e || e.trim().length < 3) return [];
|
|
11
11
|
try {
|
|
12
12
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -21,7 +21,7 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
21
21
|
} catch (e) {
|
|
22
22
|
return console.error("Nominatim fetch error:", e), [];
|
|
23
23
|
}
|
|
24
|
-
},
|
|
24
|
+
}, le = async (e, t) => {
|
|
25
25
|
if (!e || e.trim().length < 3) return [];
|
|
26
26
|
try {
|
|
27
27
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -34,39 +34,39 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
34
34
|
} catch (e) {
|
|
35
35
|
return console.error("Google Places fetch error:", e), [];
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
let [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
37
|
+
}, ue = (t, n) => {
|
|
38
|
+
let [i, a] = j(""), [o, s] = j([]), [c, l] = j(!1), [u, d] = j(!1), { value: f, placeholder: p, id: m, name: h } = t, { node: g, setValue: _, error: y, label: b, helperText: x } = n, { language: S, googleApiKey: C } = r(), w = e(), { colors: T } = v(), E = ee((e) => {
|
|
39
|
+
_(e.value), a(""), l(!1), s([]);
|
|
40
|
+
}, [_]), D = () => {
|
|
41
|
+
l(!1);
|
|
42
42
|
};
|
|
43
|
-
return
|
|
44
|
-
if (!
|
|
45
|
-
|
|
43
|
+
return O(() => {
|
|
44
|
+
if (!i || i.trim().length < 3) {
|
|
45
|
+
s([]), d(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
d(!0);
|
|
49
49
|
let e = setTimeout(async () => {
|
|
50
|
-
|
|
50
|
+
s(C ? await le(i, C) : await ce(i, S)), d(!1);
|
|
51
51
|
}, 300);
|
|
52
52
|
return () => {
|
|
53
|
-
clearTimeout(e),
|
|
53
|
+
clearTimeout(e), d(!1);
|
|
54
54
|
};
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
i,
|
|
57
57
|
S,
|
|
58
58
|
C
|
|
59
|
-
]), /* @__PURE__ */
|
|
59
|
+
]), /* @__PURE__ */ P(H, {
|
|
60
60
|
style: U.container,
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ P(B, {
|
|
63
63
|
style: [U.label, { color: T.textSecondary }],
|
|
64
|
-
children: [b ||
|
|
64
|
+
children: [b || g.data.name, g.data.required && /* @__PURE__ */ N(B, {
|
|
65
65
|
style: { color: T.error },
|
|
66
66
|
children: "*"
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ P(V, {
|
|
70
70
|
style: [
|
|
71
71
|
U.trigger,
|
|
72
72
|
{
|
|
@@ -75,105 +75,105 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
75
75
|
},
|
|
76
76
|
y && { borderColor: T.error }
|
|
77
77
|
],
|
|
78
|
-
onPress: () =>
|
|
78
|
+
onPress: () => l(!0),
|
|
79
79
|
activeOpacity: .7,
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ N(B, {
|
|
81
81
|
style: [
|
|
82
82
|
U.triggerText,
|
|
83
83
|
{ color: T.text },
|
|
84
|
-
!
|
|
84
|
+
!f && { color: T.textMuted }
|
|
85
85
|
],
|
|
86
86
|
numberOfLines: 1,
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */
|
|
87
|
+
children: f || p || w("renderer.defaultAddressInput.enterAddress")
|
|
88
|
+
}), /* @__PURE__ */ N(B, {
|
|
89
89
|
style: U.icon,
|
|
90
90
|
children: "📍"
|
|
91
91
|
})]
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
visible:
|
|
93
|
+
/* @__PURE__ */ N(re, {
|
|
94
|
+
visible: c,
|
|
95
95
|
transparent: !0,
|
|
96
96
|
animationType: "fade",
|
|
97
|
-
onRequestClose:
|
|
98
|
-
children: /* @__PURE__ */
|
|
97
|
+
onRequestClose: D,
|
|
98
|
+
children: /* @__PURE__ */ N(V, {
|
|
99
99
|
style: U.modalOverlay,
|
|
100
100
|
activeOpacity: 1,
|
|
101
|
-
onPress:
|
|
102
|
-
children: /* @__PURE__ */
|
|
101
|
+
onPress: D,
|
|
102
|
+
children: /* @__PURE__ */ P(V, {
|
|
103
103
|
style: [U.modalContent, { backgroundColor: T.card }],
|
|
104
104
|
activeOpacity: 1,
|
|
105
105
|
onPress: () => {},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ P(H, {
|
|
108
108
|
style: [U.modalHeader, { borderBottomColor: T.separator }],
|
|
109
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ N(B, {
|
|
110
110
|
style: [U.modalTitle, { color: T.text }],
|
|
111
|
-
children: b ||
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
onPress:
|
|
114
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: b || g.data.name
|
|
112
|
+
}), /* @__PURE__ */ N(V, {
|
|
113
|
+
onPress: D,
|
|
114
|
+
children: /* @__PURE__ */ N(B, {
|
|
115
115
|
style: [U.closeButton, { color: T.textMuted }],
|
|
116
116
|
children: "✕"
|
|
117
117
|
})
|
|
118
118
|
})]
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ P(H, {
|
|
121
121
|
style: U.searchContainer,
|
|
122
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ N(ae, {
|
|
123
123
|
style: [U.searchInput, {
|
|
124
124
|
backgroundColor: T.muted,
|
|
125
125
|
borderColor: T.border,
|
|
126
126
|
color: T.text
|
|
127
127
|
}],
|
|
128
|
-
placeholder:
|
|
128
|
+
placeholder: p || w("renderer.defaultAddressInput.enterAddress"),
|
|
129
129
|
placeholderTextColor: T.textMuted,
|
|
130
|
-
value:
|
|
131
|
-
onChangeText:
|
|
130
|
+
value: i,
|
|
131
|
+
onChangeText: a,
|
|
132
132
|
autoFocus: !0,
|
|
133
133
|
autoCapitalize: "none",
|
|
134
134
|
autoCorrect: !1
|
|
135
|
-
}),
|
|
135
|
+
}), u && /* @__PURE__ */ N(F, {
|
|
136
136
|
size: "small",
|
|
137
137
|
color: T.primary,
|
|
138
138
|
style: U.searchLoader
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
141
|
+
u ? /* @__PURE__ */ P(H, {
|
|
142
142
|
style: U.loadingContainer,
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ N(F, {
|
|
144
144
|
size: "small",
|
|
145
145
|
color: T.primary
|
|
146
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ N(B, {
|
|
147
147
|
style: [U.loadingText, { color: T.textMuted }],
|
|
148
148
|
children: w("renderer.defaultAddressInput.searching")
|
|
149
149
|
})]
|
|
150
|
-
}) : /* @__PURE__ */
|
|
151
|
-
data:
|
|
150
|
+
}) : /* @__PURE__ */ N(ne, {
|
|
151
|
+
data: o,
|
|
152
152
|
keyExtractor: (e, t) => t.toString(),
|
|
153
153
|
style: U.suggestionsList,
|
|
154
154
|
contentContainerStyle: U.suggestionsListContent,
|
|
155
155
|
keyboardShouldPersistTaps: "handled",
|
|
156
|
-
ListEmptyComponent:
|
|
156
|
+
ListEmptyComponent: i.length >= 3 ? /* @__PURE__ */ N(H, {
|
|
157
157
|
style: U.emptyContainer,
|
|
158
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ N(B, {
|
|
159
159
|
style: [U.emptyText, { color: T.textMuted }],
|
|
160
160
|
children: w("renderer.defaultAddressInput.noAddressesFound")
|
|
161
161
|
})
|
|
162
|
-
}) : /* @__PURE__ */
|
|
162
|
+
}) : /* @__PURE__ */ N(H, {
|
|
163
163
|
style: U.emptyContainer,
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ N(B, {
|
|
165
165
|
style: [U.emptyText, { color: T.textMuted }],
|
|
166
166
|
children: w("renderer.defaultAddressInput.typeMinChars")
|
|
167
167
|
})
|
|
168
168
|
}),
|
|
169
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
169
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ P(V, {
|
|
170
170
|
style: U.suggestionItem,
|
|
171
171
|
onPress: () => E(e),
|
|
172
172
|
activeOpacity: .7,
|
|
173
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ N(B, {
|
|
174
174
|
style: U.suggestionIcon,
|
|
175
175
|
children: "📍"
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ N(B, {
|
|
177
177
|
style: [U.suggestionText, { color: T.text }],
|
|
178
178
|
numberOfLines: 2,
|
|
179
179
|
children: e.label
|
|
@@ -184,17 +184,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
184
184
|
})
|
|
185
185
|
})
|
|
186
186
|
}),
|
|
187
|
-
y && /* @__PURE__ */
|
|
187
|
+
y && /* @__PURE__ */ N(B, {
|
|
188
188
|
style: [U.error, { color: T.error }],
|
|
189
189
|
children: y
|
|
190
190
|
}),
|
|
191
|
-
x && !y && /* @__PURE__ */
|
|
191
|
+
x && !y && /* @__PURE__ */ N(B, {
|
|
192
192
|
style: [U.helperText, { color: T.textMuted }],
|
|
193
193
|
children: x
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
});
|
|
197
|
-
}, U =
|
|
197
|
+
}, U = R.create({
|
|
198
198
|
closeButton: {
|
|
199
199
|
fontSize: 24,
|
|
200
200
|
fontWeight: "300"
|
|
@@ -304,125 +304,159 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
304
304
|
flex: 1,
|
|
305
305
|
fontSize: 14
|
|
306
306
|
}
|
|
307
|
-
}),
|
|
308
|
-
let
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
307
|
+
}), de = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
308
|
+
let { colors: i } = v();
|
|
309
|
+
return /* @__PURE__ */ P(H, {
|
|
310
|
+
style: fe.content,
|
|
311
|
+
children: [n ? /* @__PURE__ */ N(L, {
|
|
312
|
+
source: { uri: n },
|
|
313
|
+
style: fe.image
|
|
314
|
+
}) : null, /* @__PURE__ */ P(H, {
|
|
315
|
+
style: fe.textWrapper,
|
|
316
|
+
children: [/* @__PURE__ */ N(B, {
|
|
317
|
+
style: [fe.label, { color: r ? i.textMuted : i.text }],
|
|
318
|
+
children: e
|
|
319
|
+
}), t ? /* @__PURE__ */ N(B, {
|
|
320
|
+
style: [fe.description, { color: i.textMuted }],
|
|
321
|
+
children: t
|
|
322
|
+
}) : null]
|
|
323
|
+
})]
|
|
324
|
+
});
|
|
325
|
+
}, fe = R.create({
|
|
326
|
+
content: {
|
|
327
|
+
alignItems: "center",
|
|
328
|
+
flex: 1,
|
|
329
|
+
flexDirection: "row",
|
|
330
|
+
gap: 12
|
|
331
|
+
},
|
|
332
|
+
description: {
|
|
333
|
+
fontSize: 12,
|
|
334
|
+
marginTop: 2
|
|
335
|
+
},
|
|
336
|
+
image: {
|
|
337
|
+
borderRadius: 6,
|
|
338
|
+
height: 40,
|
|
339
|
+
width: 40
|
|
340
|
+
},
|
|
341
|
+
label: { fontSize: 14 },
|
|
342
|
+
textWrapper: { flex: 1 }
|
|
343
|
+
}), pe = (t, n) => {
|
|
344
|
+
let [r, i] = j(!1), [a, o] = j(""), { value: s, placeholder: c } = t, { node: l, setValue: u, error: d, label: f, helperText: p } = n, m = e(), { colors: h } = v(), g = l.data.options || [], _ = g.find((e) => e.value === s), y = k(() => {
|
|
345
|
+
if (!a.trim()) return g;
|
|
346
|
+
let e = a.toLowerCase();
|
|
347
|
+
return g.filter((t) => m(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
312
348
|
}, [
|
|
313
|
-
|
|
314
|
-
|
|
349
|
+
g,
|
|
350
|
+
a,
|
|
315
351
|
m
|
|
316
352
|
]), b = (e) => {
|
|
317
|
-
|
|
353
|
+
u(e === s ? "" : e), i(!1), o("");
|
|
318
354
|
}, x = () => {
|
|
319
|
-
|
|
355
|
+
i(!1), o("");
|
|
320
356
|
};
|
|
321
|
-
return /* @__PURE__ */
|
|
357
|
+
return /* @__PURE__ */ P(H, {
|
|
322
358
|
style: W.container,
|
|
323
359
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ P(B, {
|
|
325
361
|
style: [W.label, { color: h.textSecondary }],
|
|
326
|
-
children: [
|
|
362
|
+
children: [f || l.data.name, l.data.required && /* @__PURE__ */ N(B, {
|
|
327
363
|
style: { color: h.error },
|
|
328
364
|
children: "*"
|
|
329
365
|
})]
|
|
330
366
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ P(V, {
|
|
332
368
|
style: [
|
|
333
369
|
W.trigger,
|
|
334
370
|
{
|
|
335
371
|
backgroundColor: h.input,
|
|
336
372
|
borderColor: h.border
|
|
337
373
|
},
|
|
338
|
-
|
|
374
|
+
d && { borderColor: h.error }
|
|
339
375
|
],
|
|
340
|
-
onPress: () =>
|
|
376
|
+
onPress: () => i(!0),
|
|
341
377
|
activeOpacity: .7,
|
|
342
|
-
children: [/* @__PURE__ */
|
|
378
|
+
children: [/* @__PURE__ */ N(B, {
|
|
343
379
|
style: [
|
|
344
380
|
W.triggerText,
|
|
345
381
|
{ color: h.text },
|
|
346
|
-
!
|
|
382
|
+
!s && { color: h.textMuted }
|
|
347
383
|
],
|
|
348
384
|
numberOfLines: 1,
|
|
349
|
-
children:
|
|
350
|
-
}), /* @__PURE__ */
|
|
385
|
+
children: s && _ ? m(_.label) : c || m("renderer.defaultAutocompleteInput.selectOption")
|
|
386
|
+
}), /* @__PURE__ */ N(B, {
|
|
351
387
|
style: [W.arrow, { color: h.textMuted }],
|
|
352
388
|
children: "▼"
|
|
353
389
|
})]
|
|
354
390
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
visible:
|
|
391
|
+
/* @__PURE__ */ N(re, {
|
|
392
|
+
visible: r,
|
|
357
393
|
transparent: !0,
|
|
358
394
|
animationType: "fade",
|
|
359
395
|
onRequestClose: x,
|
|
360
|
-
children: /* @__PURE__ */
|
|
396
|
+
children: /* @__PURE__ */ N(V, {
|
|
361
397
|
style: W.modalOverlay,
|
|
362
398
|
activeOpacity: 1,
|
|
363
399
|
onPress: x,
|
|
364
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ P(V, {
|
|
365
401
|
style: [W.modalContent, { backgroundColor: h.card }],
|
|
366
402
|
activeOpacity: 1,
|
|
367
403
|
onPress: () => {},
|
|
368
404
|
children: [
|
|
369
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ P(H, {
|
|
370
406
|
style: [W.modalHeader, { borderBottomColor: h.separator }],
|
|
371
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ N(B, {
|
|
372
408
|
style: [W.modalTitle, { color: h.text }],
|
|
373
|
-
children:
|
|
374
|
-
}), /* @__PURE__ */
|
|
409
|
+
children: f || l.data.name
|
|
410
|
+
}), /* @__PURE__ */ N(V, {
|
|
375
411
|
onPress: x,
|
|
376
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ N(B, {
|
|
377
413
|
style: [W.closeButton, { color: h.textMuted }],
|
|
378
414
|
children: "✕"
|
|
379
415
|
})
|
|
380
416
|
})]
|
|
381
417
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ N(H, {
|
|
383
419
|
style: W.searchContainer,
|
|
384
|
-
children: /* @__PURE__ */
|
|
420
|
+
children: /* @__PURE__ */ N(ae, {
|
|
385
421
|
style: [W.searchInput, {
|
|
386
422
|
backgroundColor: h.muted,
|
|
387
423
|
borderColor: h.border,
|
|
388
424
|
color: h.text
|
|
389
425
|
}],
|
|
390
|
-
placeholder:
|
|
426
|
+
placeholder: c || m("renderer.defaultAutocompleteInput.search"),
|
|
391
427
|
placeholderTextColor: h.textMuted,
|
|
392
|
-
value:
|
|
393
|
-
onChangeText:
|
|
428
|
+
value: a,
|
|
429
|
+
onChangeText: o,
|
|
394
430
|
autoFocus: !0,
|
|
395
431
|
autoCapitalize: "none",
|
|
396
432
|
autoCorrect: !1
|
|
397
433
|
})
|
|
398
434
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ N(ne, {
|
|
400
436
|
data: y,
|
|
401
437
|
keyExtractor: (e) => e.value,
|
|
402
438
|
style: W.optionsList,
|
|
403
439
|
contentContainerStyle: W.optionsListContent,
|
|
404
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
440
|
+
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
405
441
|
style: W.emptyContainer,
|
|
406
|
-
children: /* @__PURE__ */
|
|
442
|
+
children: /* @__PURE__ */ N(B, {
|
|
407
443
|
style: [W.emptyText, { color: h.textMuted }],
|
|
408
444
|
children: m("renderer.defaultAutocompleteInput.noResults")
|
|
409
445
|
})
|
|
410
446
|
}),
|
|
411
447
|
renderItem: ({ item: e }) => {
|
|
412
|
-
let t = e.value ===
|
|
413
|
-
return /* @__PURE__ */
|
|
448
|
+
let t = e.value === s;
|
|
449
|
+
return /* @__PURE__ */ P(V, {
|
|
414
450
|
style: [W.option, t && { backgroundColor: h.primaryLight }],
|
|
415
451
|
onPress: () => b(e.value),
|
|
416
452
|
disabled: e.disabled,
|
|
417
453
|
activeOpacity: .7,
|
|
418
|
-
children: [/* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
children: m(e.label)
|
|
425
|
-
}), t && /* @__PURE__ */ j(z, {
|
|
454
|
+
children: [/* @__PURE__ */ N(de, {
|
|
455
|
+
label: m(e.label) || e.value,
|
|
456
|
+
description: m(e.description),
|
|
457
|
+
image: e.image,
|
|
458
|
+
disabled: e.disabled
|
|
459
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
426
460
|
style: [W.checkmark, { color: h.primary }],
|
|
427
461
|
children: "✓"
|
|
428
462
|
})]
|
|
@@ -433,17 +467,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
433
467
|
})
|
|
434
468
|
})
|
|
435
469
|
}),
|
|
436
|
-
|
|
470
|
+
d && /* @__PURE__ */ N(B, {
|
|
437
471
|
style: [W.error, { color: h.error }],
|
|
438
|
-
children:
|
|
472
|
+
children: d
|
|
439
473
|
}),
|
|
440
|
-
|
|
474
|
+
p && !d && /* @__PURE__ */ N(B, {
|
|
441
475
|
style: [W.helperText, { color: h.textMuted }],
|
|
442
|
-
children:
|
|
476
|
+
children: p
|
|
443
477
|
})
|
|
444
478
|
]
|
|
445
479
|
});
|
|
446
|
-
}, W =
|
|
480
|
+
}, W = R.create({
|
|
447
481
|
arrow: { fontSize: 12 },
|
|
448
482
|
checkmark: {
|
|
449
483
|
fontSize: 18,
|
|
@@ -509,10 +543,6 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
509
543
|
flexShrink: 1
|
|
510
544
|
},
|
|
511
545
|
optionsListContent: { flexGrow: 0 },
|
|
512
|
-
optionText: {
|
|
513
|
-
flex: 1,
|
|
514
|
-
fontSize: 14
|
|
515
|
-
},
|
|
516
546
|
searchContainer: { marginBottom: 12 },
|
|
517
547
|
searchInput: {
|
|
518
548
|
borderRadius: 6,
|
|
@@ -534,23 +564,23 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
534
564
|
flex: 1,
|
|
535
565
|
fontSize: 14
|
|
536
566
|
}
|
|
537
|
-
}),
|
|
538
|
-
let
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
return /* @__PURE__ */
|
|
567
|
+
}), me = (t, n) => {
|
|
568
|
+
let r = e(), { value: i } = t, { node: a, setValue: o, error: s, label: c, helperText: l } = n, { colors: u } = v(), d = a.data.options || [], f = d.length > 0, p = Array.isArray(i) ? i : [], m = typeof i == "boolean" ? i : !1, h = (e) => {
|
|
569
|
+
o(f ? p.includes(e) ? p.filter((t) => t !== e) : [...p, e] : !m);
|
|
570
|
+
}, g = (e) => f ? p.includes(e) : m;
|
|
571
|
+
return /* @__PURE__ */ P(H, {
|
|
542
572
|
style: G.container,
|
|
543
573
|
children: [
|
|
544
|
-
/* @__PURE__ */
|
|
545
|
-
style: [G.label, { color:
|
|
546
|
-
children: [
|
|
547
|
-
style: { color:
|
|
574
|
+
/* @__PURE__ */ P(B, {
|
|
575
|
+
style: [G.label, { color: u.textSecondary }],
|
|
576
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(B, {
|
|
577
|
+
style: { color: u.error },
|
|
548
578
|
children: "*"
|
|
549
579
|
})]
|
|
550
580
|
}),
|
|
551
|
-
|
|
552
|
-
let t =
|
|
553
|
-
return /* @__PURE__ */
|
|
581
|
+
d.length > 0 ? d.map((e) => {
|
|
582
|
+
let t = r(e.description);
|
|
583
|
+
return /* @__PURE__ */ P(V, {
|
|
554
584
|
style: G.option,
|
|
555
585
|
onPress: () => h(e.value),
|
|
556
586
|
disabled: e.disabled,
|
|
@@ -558,81 +588,88 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
558
588
|
accessible: !0,
|
|
559
589
|
accessibilityRole: "checkbox",
|
|
560
590
|
accessibilityState: {
|
|
561
|
-
checked:
|
|
591
|
+
checked: g(e.value),
|
|
562
592
|
disabled: e.disabled
|
|
563
593
|
},
|
|
564
|
-
accessibilityLabel:
|
|
565
|
-
children: [
|
|
566
|
-
|
|
567
|
-
G.checkbox,
|
|
568
|
-
{
|
|
569
|
-
backgroundColor: l.input,
|
|
570
|
-
borderColor: l.border
|
|
571
|
-
},
|
|
572
|
-
_(e.value) && {
|
|
573
|
-
backgroundColor: l.primary,
|
|
574
|
-
borderColor: l.primary
|
|
575
|
-
}
|
|
576
|
-
],
|
|
577
|
-
children: _(e.value) && /* @__PURE__ */ j(z, {
|
|
578
|
-
style: G.checkmark,
|
|
579
|
-
children: "✓"
|
|
580
|
-
})
|
|
581
|
-
}), /* @__PURE__ */ M(H, {
|
|
582
|
-
style: G.optionTextContainer,
|
|
583
|
-
children: [/* @__PURE__ */ j(z, {
|
|
594
|
+
accessibilityLabel: r(e.label) || e.value,
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ N(H, {
|
|
584
597
|
style: [
|
|
585
|
-
G.
|
|
586
|
-
{
|
|
587
|
-
|
|
598
|
+
G.checkbox,
|
|
599
|
+
{
|
|
600
|
+
backgroundColor: u.input,
|
|
601
|
+
borderColor: u.border
|
|
602
|
+
},
|
|
603
|
+
g(e.value) && {
|
|
604
|
+
backgroundColor: u.primary,
|
|
605
|
+
borderColor: u.primary
|
|
606
|
+
}
|
|
588
607
|
],
|
|
589
|
-
children:
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
})
|
|
594
|
-
|
|
608
|
+
children: g(e.value) && /* @__PURE__ */ N(B, {
|
|
609
|
+
style: G.checkmark,
|
|
610
|
+
children: "✓"
|
|
611
|
+
})
|
|
612
|
+
}),
|
|
613
|
+
e.image ? /* @__PURE__ */ N(L, {
|
|
614
|
+
source: { uri: e.image },
|
|
615
|
+
style: G.image
|
|
616
|
+
}) : null,
|
|
617
|
+
/* @__PURE__ */ P(H, {
|
|
618
|
+
style: G.optionTextContainer,
|
|
619
|
+
children: [/* @__PURE__ */ N(B, {
|
|
620
|
+
style: [
|
|
621
|
+
G.optionLabel,
|
|
622
|
+
{ color: u.textSecondary },
|
|
623
|
+
e.disabled && { color: u.textMuted }
|
|
624
|
+
],
|
|
625
|
+
children: r(e.label) || e.value
|
|
626
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
627
|
+
style: [G.optionDescription, { color: u.textMuted }],
|
|
628
|
+
children: t
|
|
629
|
+
})]
|
|
630
|
+
})
|
|
631
|
+
]
|
|
595
632
|
}, e.value);
|
|
596
|
-
}) : /* @__PURE__ */
|
|
633
|
+
}) : /* @__PURE__ */ P(V, {
|
|
597
634
|
style: G.option,
|
|
598
635
|
onPress: () => h(""),
|
|
599
636
|
activeOpacity: .7,
|
|
600
637
|
accessible: !0,
|
|
601
638
|
accessibilityRole: "checkbox",
|
|
602
639
|
accessibilityState: { checked: m },
|
|
603
|
-
accessibilityLabel:
|
|
604
|
-
children: [/* @__PURE__ */
|
|
640
|
+
accessibilityLabel: c || a.data.name,
|
|
641
|
+
children: [/* @__PURE__ */ N(H, {
|
|
605
642
|
style: [
|
|
606
643
|
G.checkbox,
|
|
607
644
|
{
|
|
608
|
-
backgroundColor:
|
|
609
|
-
borderColor:
|
|
645
|
+
backgroundColor: u.input,
|
|
646
|
+
borderColor: u.border
|
|
610
647
|
},
|
|
611
648
|
m && {
|
|
612
|
-
backgroundColor:
|
|
613
|
-
borderColor:
|
|
649
|
+
backgroundColor: u.primary,
|
|
650
|
+
borderColor: u.primary
|
|
614
651
|
}
|
|
615
652
|
],
|
|
616
|
-
children: m && /* @__PURE__ */
|
|
653
|
+
children: m && /* @__PURE__ */ N(B, {
|
|
617
654
|
style: G.checkmark,
|
|
618
655
|
children: "✓"
|
|
619
656
|
})
|
|
620
|
-
}), /* @__PURE__ */
|
|
621
|
-
style: [G.optionLabel, { color:
|
|
622
|
-
children:
|
|
657
|
+
}), /* @__PURE__ */ N(B, {
|
|
658
|
+
style: [G.optionLabel, { color: u.textSecondary }],
|
|
659
|
+
children: c || a.data.name
|
|
623
660
|
})]
|
|
624
661
|
}),
|
|
625
|
-
|
|
626
|
-
style: [G.error, { color:
|
|
627
|
-
children:
|
|
662
|
+
s && /* @__PURE__ */ N(B, {
|
|
663
|
+
style: [G.error, { color: u.error }],
|
|
664
|
+
children: s
|
|
628
665
|
}),
|
|
629
|
-
|
|
630
|
-
style: [G.helperText, { color:
|
|
631
|
-
children:
|
|
666
|
+
l && !s && /* @__PURE__ */ N(B, {
|
|
667
|
+
style: [G.helperText, { color: u.textMuted }],
|
|
668
|
+
children: l
|
|
632
669
|
})
|
|
633
670
|
]
|
|
634
671
|
});
|
|
635
|
-
}, G =
|
|
672
|
+
}, G = R.create({
|
|
636
673
|
checkbox: {
|
|
637
674
|
alignItems: "center",
|
|
638
675
|
borderRadius: 4,
|
|
@@ -656,6 +693,12 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
656
693
|
fontSize: 12,
|
|
657
694
|
marginTop: 4
|
|
658
695
|
},
|
|
696
|
+
image: {
|
|
697
|
+
borderRadius: 4,
|
|
698
|
+
height: 32,
|
|
699
|
+
marginRight: 8,
|
|
700
|
+
width: 32
|
|
701
|
+
},
|
|
659
702
|
label: {
|
|
660
703
|
fontSize: 14,
|
|
661
704
|
fontWeight: "500",
|
|
@@ -672,15 +715,15 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
672
715
|
},
|
|
673
716
|
optionLabel: { fontSize: 14 },
|
|
674
717
|
optionTextContainer: { flex: 1 }
|
|
675
|
-
}),
|
|
676
|
-
let [
|
|
718
|
+
}), he = (t, n) => {
|
|
719
|
+
let [r, i] = j(!1), { value: a, placeholder: o } = t, { node: s, setValue: c, error: l, label: u, helperText: d } = n, { colors: f } = v(), p = e(), m = a ? new Date(a) : void 0, { year: h, month: g, today: _ } = k(() => {
|
|
677
720
|
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
678
721
|
return r.setHours(0, 0, 0, 0), {
|
|
679
722
|
month: n,
|
|
680
723
|
today: r,
|
|
681
724
|
year: t
|
|
682
725
|
};
|
|
683
|
-
}, [m]), [y, b] =
|
|
726
|
+
}, [m]), [y, b] = j(h), [x, S] = j(g), C = [
|
|
684
727
|
"January",
|
|
685
728
|
"February",
|
|
686
729
|
"March",
|
|
@@ -693,7 +736,7 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
693
736
|
"October",
|
|
694
737
|
"November",
|
|
695
738
|
"December"
|
|
696
|
-
], w =
|
|
739
|
+
], w = k(() => {
|
|
697
740
|
let e = new Date(y, x, 1).getDay(), t = new Date(y, x + 1, 0).getDate(), n = new Date(y, x, 0).getDate(), r = [];
|
|
698
741
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
699
742
|
date: new Date(y, x - 1, n - t),
|
|
@@ -713,107 +756,107 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
713
756
|
});
|
|
714
757
|
return r;
|
|
715
758
|
}, [y, x]), T = ee((e) => {
|
|
716
|
-
|
|
759
|
+
s.data.disablePast && e < _ || (c(e.toISOString()), i(!1));
|
|
717
760
|
}, [
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
761
|
+
s.data.disablePast,
|
|
762
|
+
_,
|
|
763
|
+
c
|
|
721
764
|
]), E = () => {
|
|
722
765
|
x === 0 ? (S(11), b(y - 1)) : S(x - 1);
|
|
723
766
|
}, D = () => {
|
|
724
767
|
x === 11 ? (S(0), b(y + 1)) : S(x + 1);
|
|
725
|
-
},
|
|
726
|
-
return /* @__PURE__ */
|
|
768
|
+
}, O = () => m ? m.toLocaleDateString() : o || p("renderer.defaultInputs.selectDate"), A = (e) => s.data.disablePast ? e < _ : !1, M = (e) => m ? e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear() : !1;
|
|
769
|
+
return /* @__PURE__ */ P(H, {
|
|
727
770
|
style: K.container,
|
|
728
771
|
children: [
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
style: [K.label, { color:
|
|
731
|
-
children: [
|
|
732
|
-
style: { color:
|
|
772
|
+
/* @__PURE__ */ P(B, {
|
|
773
|
+
style: [K.label, { color: f.textSecondary }],
|
|
774
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
775
|
+
style: { color: f.error },
|
|
733
776
|
children: "*"
|
|
734
777
|
})]
|
|
735
778
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
779
|
+
/* @__PURE__ */ P(V, {
|
|
737
780
|
style: [
|
|
738
781
|
K.trigger,
|
|
739
782
|
{
|
|
740
|
-
backgroundColor:
|
|
741
|
-
borderColor:
|
|
783
|
+
backgroundColor: f.input,
|
|
784
|
+
borderColor: f.border
|
|
742
785
|
},
|
|
743
|
-
|
|
786
|
+
l && { borderColor: f.error }
|
|
744
787
|
],
|
|
745
|
-
onPress: () =>
|
|
788
|
+
onPress: () => i(!0),
|
|
746
789
|
activeOpacity: .7,
|
|
747
|
-
children: [/* @__PURE__ */
|
|
790
|
+
children: [/* @__PURE__ */ N(B, {
|
|
748
791
|
style: [
|
|
749
792
|
K.triggerText,
|
|
750
|
-
{ color:
|
|
751
|
-
!
|
|
793
|
+
{ color: f.text },
|
|
794
|
+
!a && { color: f.textMuted }
|
|
752
795
|
],
|
|
753
796
|
numberOfLines: 1,
|
|
754
|
-
children:
|
|
755
|
-
}), /* @__PURE__ */
|
|
797
|
+
children: O()
|
|
798
|
+
}), /* @__PURE__ */ N(B, {
|
|
756
799
|
style: K.icon,
|
|
757
800
|
children: "📅"
|
|
758
801
|
})]
|
|
759
802
|
}),
|
|
760
|
-
/* @__PURE__ */
|
|
761
|
-
visible:
|
|
803
|
+
/* @__PURE__ */ N(re, {
|
|
804
|
+
visible: r,
|
|
762
805
|
transparent: !0,
|
|
763
806
|
animationType: "fade",
|
|
764
|
-
onRequestClose: () =>
|
|
765
|
-
children: /* @__PURE__ */
|
|
807
|
+
onRequestClose: () => i(!1),
|
|
808
|
+
children: /* @__PURE__ */ N(V, {
|
|
766
809
|
style: K.modalOverlay,
|
|
767
810
|
activeOpacity: 1,
|
|
768
|
-
onPress: () =>
|
|
769
|
-
children: /* @__PURE__ */
|
|
770
|
-
style: [K.modalContent, { backgroundColor:
|
|
811
|
+
onPress: () => i(!1),
|
|
812
|
+
children: /* @__PURE__ */ P(V, {
|
|
813
|
+
style: [K.modalContent, { backgroundColor: f.card }],
|
|
771
814
|
activeOpacity: 1,
|
|
772
815
|
onPress: () => {},
|
|
773
816
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
776
|
-
children: [/* @__PURE__ */
|
|
777
|
-
style: [K.modalTitle, { color:
|
|
778
|
-
children:
|
|
779
|
-
}), /* @__PURE__ */
|
|
780
|
-
onPress: () =>
|
|
781
|
-
children: /* @__PURE__ */
|
|
782
|
-
style: [K.closeButton, { color:
|
|
817
|
+
/* @__PURE__ */ P(H, {
|
|
818
|
+
style: [K.modalHeader, { borderBottomColor: f.separator }],
|
|
819
|
+
children: [/* @__PURE__ */ N(B, {
|
|
820
|
+
style: [K.modalTitle, { color: f.text }],
|
|
821
|
+
children: u || s.data.name
|
|
822
|
+
}), /* @__PURE__ */ N(V, {
|
|
823
|
+
onPress: () => i(!1),
|
|
824
|
+
children: /* @__PURE__ */ N(B, {
|
|
825
|
+
style: [K.closeButton, { color: f.textMuted }],
|
|
783
826
|
children: "✕"
|
|
784
827
|
})
|
|
785
828
|
})]
|
|
786
829
|
}),
|
|
787
|
-
/* @__PURE__ */
|
|
830
|
+
/* @__PURE__ */ P(H, {
|
|
788
831
|
style: K.calendarHeader,
|
|
789
832
|
children: [
|
|
790
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ N(V, {
|
|
791
834
|
onPress: E,
|
|
792
835
|
style: K.navButton,
|
|
793
|
-
children: /* @__PURE__ */
|
|
794
|
-
style: [K.navButtonText, { color:
|
|
836
|
+
children: /* @__PURE__ */ N(B, {
|
|
837
|
+
style: [K.navButtonText, { color: f.primary }],
|
|
795
838
|
children: "‹"
|
|
796
839
|
})
|
|
797
840
|
}),
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
style: [K.monthYear, { color:
|
|
841
|
+
/* @__PURE__ */ P(B, {
|
|
842
|
+
style: [K.monthYear, { color: f.text }],
|
|
800
843
|
children: [
|
|
801
844
|
C[x],
|
|
802
845
|
" ",
|
|
803
846
|
y
|
|
804
847
|
]
|
|
805
848
|
}),
|
|
806
|
-
/* @__PURE__ */
|
|
849
|
+
/* @__PURE__ */ N(V, {
|
|
807
850
|
onPress: D,
|
|
808
851
|
style: K.navButton,
|
|
809
|
-
children: /* @__PURE__ */
|
|
810
|
-
style: [K.navButtonText, { color:
|
|
852
|
+
children: /* @__PURE__ */ N(B, {
|
|
853
|
+
style: [K.navButtonText, { color: f.primary }],
|
|
811
854
|
children: "›"
|
|
812
855
|
})
|
|
813
856
|
})
|
|
814
857
|
]
|
|
815
858
|
}),
|
|
816
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ N(H, {
|
|
817
860
|
style: K.weekDays,
|
|
818
861
|
children: [
|
|
819
862
|
"Sun",
|
|
@@ -823,12 +866,12 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
823
866
|
"Thu",
|
|
824
867
|
"Fri",
|
|
825
868
|
"Sat"
|
|
826
|
-
].map((e) => /* @__PURE__ */
|
|
827
|
-
style: [K.weekDay, { color:
|
|
869
|
+
].map((e) => /* @__PURE__ */ N(B, {
|
|
870
|
+
style: [K.weekDay, { color: f.textMuted }],
|
|
828
871
|
children: e
|
|
829
872
|
}, e))
|
|
830
873
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ N(ne, {
|
|
832
875
|
data: w,
|
|
833
876
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
834
877
|
numColumns: 7,
|
|
@@ -836,13 +879,13 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
836
879
|
style: K.calendar,
|
|
837
880
|
contentContainerStyle: K.calendarContent,
|
|
838
881
|
renderItem: ({ item: e }) => {
|
|
839
|
-
let t =
|
|
840
|
-
return /* @__PURE__ */
|
|
882
|
+
let t = A(e.date), n = M(e.date);
|
|
883
|
+
return /* @__PURE__ */ N(V, {
|
|
841
884
|
style: [
|
|
842
885
|
K.dayCell,
|
|
843
886
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
844
887
|
n && {
|
|
845
|
-
backgroundColor:
|
|
888
|
+
backgroundColor: f.primary,
|
|
846
889
|
borderRadius: 20
|
|
847
890
|
},
|
|
848
891
|
t && K.dayCellDisabled
|
|
@@ -850,16 +893,16 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
850
893
|
onPress: () => T(e.date),
|
|
851
894
|
disabled: t,
|
|
852
895
|
activeOpacity: .7,
|
|
853
|
-
children: /* @__PURE__ */
|
|
896
|
+
children: /* @__PURE__ */ N(B, {
|
|
854
897
|
style: [
|
|
855
898
|
K.dayText,
|
|
856
|
-
{ color:
|
|
857
|
-
!e.isCurrentMonth && { color:
|
|
899
|
+
{ color: f.text },
|
|
900
|
+
!e.isCurrentMonth && { color: f.textMuted },
|
|
858
901
|
n && {
|
|
859
|
-
color:
|
|
902
|
+
color: f.background,
|
|
860
903
|
fontWeight: "600"
|
|
861
904
|
},
|
|
862
|
-
t && { color:
|
|
905
|
+
t && { color: f.textMuted }
|
|
863
906
|
],
|
|
864
907
|
children: e.day
|
|
865
908
|
})
|
|
@@ -870,17 +913,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
870
913
|
})
|
|
871
914
|
})
|
|
872
915
|
}),
|
|
873
|
-
|
|
874
|
-
style: [K.error, { color:
|
|
875
|
-
children:
|
|
916
|
+
l && /* @__PURE__ */ N(B, {
|
|
917
|
+
style: [K.error, { color: f.error }],
|
|
918
|
+
children: l
|
|
876
919
|
}),
|
|
877
|
-
|
|
878
|
-
style: [K.helperText, { color:
|
|
879
|
-
children:
|
|
920
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
921
|
+
style: [K.helperText, { color: f.textMuted }],
|
|
922
|
+
children: d
|
|
880
923
|
})
|
|
881
924
|
]
|
|
882
925
|
});
|
|
883
|
-
}, K =
|
|
926
|
+
}, K = R.create({
|
|
884
927
|
calendar: {
|
|
885
928
|
flexGrow: 0,
|
|
886
929
|
flexShrink: 1
|
|
@@ -980,15 +1023,15 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
980
1023
|
flexDirection: "row",
|
|
981
1024
|
marginBottom: 8
|
|
982
1025
|
}
|
|
983
|
-
}),
|
|
984
|
-
let [
|
|
985
|
-
let e =
|
|
1026
|
+
}), ge = (t, n) => {
|
|
1027
|
+
let [r, i] = j(!1), [a, o] = j(!0), { value: s } = t, { node: c, setValue: l, error: u, label: d, helperText: f } = n, p = e(), { colors: m } = v(), h = Array.isArray(s) ? s : [], g = h[0] ? new Date(h[0]) : void 0, _ = h[1] ? new Date(h[1]) : void 0, { year: y, month: b, today: x } = k(() => {
|
|
1028
|
+
let e = g || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
986
1029
|
return r.setHours(0, 0, 0, 0), {
|
|
987
1030
|
month: n,
|
|
988
1031
|
today: r,
|
|
989
1032
|
year: t
|
|
990
1033
|
};
|
|
991
|
-
}, [
|
|
1034
|
+
}, [g]), [S, C] = j(y), [w, T] = j(b), E = [
|
|
992
1035
|
"January",
|
|
993
1036
|
"February",
|
|
994
1037
|
"March",
|
|
@@ -1001,7 +1044,7 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1001
1044
|
"October",
|
|
1002
1045
|
"November",
|
|
1003
1046
|
"December"
|
|
1004
|
-
], D =
|
|
1047
|
+
], D = k(() => {
|
|
1005
1048
|
let e = new Date(S, w, 1).getDay(), t = new Date(S, w + 1, 0).getDate(), n = new Date(S, w, 0).getDate(), r = [];
|
|
1006
1049
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1007
1050
|
date: new Date(S, w - 1, n - t),
|
|
@@ -1020,104 +1063,104 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1020
1063
|
isCurrentMonth: !1
|
|
1021
1064
|
});
|
|
1022
1065
|
return r;
|
|
1023
|
-
}, [S, w]),
|
|
1024
|
-
|
|
1066
|
+
}, [S, w]), O = ee((e) => {
|
|
1067
|
+
c.data.disablePast && e < x || (a ? (l([e.toISOString(), _?.toISOString()]), o(!1)) : (l(g && e < g ? [e.toISOString(), g.toISOString()] : [g?.toISOString(), e.toISOString()]), i(!1), o(!0)));
|
|
1025
1068
|
}, [
|
|
1026
|
-
|
|
1069
|
+
c.data.disablePast,
|
|
1027
1070
|
x,
|
|
1028
|
-
|
|
1071
|
+
a,
|
|
1072
|
+
g,
|
|
1029
1073
|
_,
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
]), te = () => {
|
|
1074
|
+
l
|
|
1075
|
+
]), A = () => {
|
|
1033
1076
|
w === 0 ? (T(11), C(S - 1)) : T(w - 1);
|
|
1034
|
-
},
|
|
1077
|
+
}, M = () => {
|
|
1035
1078
|
w === 11 ? (T(0), C(S + 1)) : T(w + 1);
|
|
1036
|
-
},
|
|
1037
|
-
if (!(
|
|
1038
|
-
let t =
|
|
1079
|
+
}, F = () => g && _ ? `${g.toLocaleDateString()} - ${_.toLocaleDateString()}` : g ? g.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), te = (e) => c.data.disablePast ? e < x : !1, I = (e) => g && _ ? e >= g && e <= _ : !1, L = (e) => {
|
|
1080
|
+
if (!(g || _)) return !1;
|
|
1081
|
+
let t = g && e.getDate() === g.getDate() && e.getMonth() === g.getMonth() && e.getFullYear() === g.getFullYear(), n = _ && e.getDate() === _.getDate() && e.getMonth() === _.getMonth() && e.getFullYear() === _.getFullYear();
|
|
1039
1082
|
return t || n;
|
|
1040
1083
|
};
|
|
1041
|
-
return /* @__PURE__ */
|
|
1084
|
+
return /* @__PURE__ */ P(H, {
|
|
1042
1085
|
style: q.container,
|
|
1043
1086
|
children: [
|
|
1044
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ P(B, {
|
|
1045
1088
|
style: [q.label, { color: m.textSecondary }],
|
|
1046
|
-
children: [
|
|
1089
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(B, {
|
|
1047
1090
|
style: { color: m.error },
|
|
1048
1091
|
children: "*"
|
|
1049
1092
|
})]
|
|
1050
1093
|
}),
|
|
1051
|
-
/* @__PURE__ */
|
|
1094
|
+
/* @__PURE__ */ P(V, {
|
|
1052
1095
|
style: [
|
|
1053
1096
|
q.trigger,
|
|
1054
1097
|
{
|
|
1055
1098
|
backgroundColor: m.input,
|
|
1056
1099
|
borderColor: m.border
|
|
1057
1100
|
},
|
|
1058
|
-
|
|
1101
|
+
u && { borderColor: m.error }
|
|
1059
1102
|
],
|
|
1060
|
-
onPress: () =>
|
|
1103
|
+
onPress: () => i(!0),
|
|
1061
1104
|
activeOpacity: .7,
|
|
1062
|
-
children: [/* @__PURE__ */
|
|
1105
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1063
1106
|
style: [
|
|
1064
1107
|
q.triggerText,
|
|
1065
1108
|
{ color: m.text },
|
|
1066
|
-
!
|
|
1109
|
+
!g && { color: m.textMuted }
|
|
1067
1110
|
],
|
|
1068
1111
|
numberOfLines: 1,
|
|
1069
|
-
children:
|
|
1070
|
-
}), /* @__PURE__ */
|
|
1112
|
+
children: F()
|
|
1113
|
+
}), /* @__PURE__ */ N(B, {
|
|
1071
1114
|
style: q.icon,
|
|
1072
1115
|
children: "📅"
|
|
1073
1116
|
})]
|
|
1074
1117
|
}),
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
visible:
|
|
1118
|
+
/* @__PURE__ */ N(re, {
|
|
1119
|
+
visible: r,
|
|
1077
1120
|
transparent: !0,
|
|
1078
1121
|
animationType: "fade",
|
|
1079
|
-
onRequestClose: () =>
|
|
1080
|
-
children: /* @__PURE__ */
|
|
1122
|
+
onRequestClose: () => i(!1),
|
|
1123
|
+
children: /* @__PURE__ */ N(V, {
|
|
1081
1124
|
style: q.modalOverlay,
|
|
1082
1125
|
activeOpacity: 1,
|
|
1083
|
-
onPress: () =>
|
|
1084
|
-
children: /* @__PURE__ */
|
|
1126
|
+
onPress: () => i(!1),
|
|
1127
|
+
children: /* @__PURE__ */ P(V, {
|
|
1085
1128
|
style: [q.modalContent, { backgroundColor: m.card }],
|
|
1086
1129
|
activeOpacity: 1,
|
|
1087
1130
|
onPress: () => {},
|
|
1088
1131
|
children: [
|
|
1089
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ P(H, {
|
|
1090
1133
|
style: [q.modalHeader, { borderBottomColor: m.separator }],
|
|
1091
|
-
children: [/* @__PURE__ */
|
|
1134
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1092
1135
|
style: [q.modalTitle, { color: m.text }],
|
|
1093
|
-
children:
|
|
1094
|
-
}), /* @__PURE__ */
|
|
1095
|
-
onPress: () =>
|
|
1096
|
-
children: /* @__PURE__ */
|
|
1136
|
+
children: d || c.data.name
|
|
1137
|
+
}), /* @__PURE__ */ N(V, {
|
|
1138
|
+
onPress: () => i(!1),
|
|
1139
|
+
children: /* @__PURE__ */ N(B, {
|
|
1097
1140
|
style: [q.closeButton, { color: m.textMuted }],
|
|
1098
1141
|
children: "✕"
|
|
1099
1142
|
})
|
|
1100
1143
|
})]
|
|
1101
1144
|
}),
|
|
1102
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ N(H, {
|
|
1103
1146
|
style: [q.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
1104
|
-
children: /* @__PURE__ */
|
|
1147
|
+
children: /* @__PURE__ */ N(B, {
|
|
1105
1148
|
style: [q.rangeIndicatorText, { color: m.primary }],
|
|
1106
|
-
children:
|
|
1149
|
+
children: p(a ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1107
1150
|
})
|
|
1108
1151
|
}),
|
|
1109
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ P(H, {
|
|
1110
1153
|
style: q.calendarHeader,
|
|
1111
1154
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1113
|
-
onPress:
|
|
1155
|
+
/* @__PURE__ */ N(V, {
|
|
1156
|
+
onPress: A,
|
|
1114
1157
|
style: q.navButton,
|
|
1115
|
-
children: /* @__PURE__ */
|
|
1158
|
+
children: /* @__PURE__ */ N(B, {
|
|
1116
1159
|
style: [q.navButtonText, { color: m.primary }],
|
|
1117
1160
|
children: "‹"
|
|
1118
1161
|
})
|
|
1119
1162
|
}),
|
|
1120
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ P(B, {
|
|
1121
1164
|
style: [q.monthYear, { color: m.text }],
|
|
1122
1165
|
children: [
|
|
1123
1166
|
E[w],
|
|
@@ -1125,17 +1168,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1125
1168
|
S
|
|
1126
1169
|
]
|
|
1127
1170
|
}),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
onPress:
|
|
1171
|
+
/* @__PURE__ */ N(V, {
|
|
1172
|
+
onPress: M,
|
|
1130
1173
|
style: q.navButton,
|
|
1131
|
-
children: /* @__PURE__ */
|
|
1174
|
+
children: /* @__PURE__ */ N(B, {
|
|
1132
1175
|
style: [q.navButtonText, { color: m.primary }],
|
|
1133
1176
|
children: "›"
|
|
1134
1177
|
})
|
|
1135
1178
|
})
|
|
1136
1179
|
]
|
|
1137
1180
|
}),
|
|
1138
|
-
/* @__PURE__ */
|
|
1181
|
+
/* @__PURE__ */ N(H, {
|
|
1139
1182
|
style: q.weekDays,
|
|
1140
1183
|
children: [
|
|
1141
1184
|
"Sun",
|
|
@@ -1145,12 +1188,12 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1145
1188
|
"Thu",
|
|
1146
1189
|
"Fri",
|
|
1147
1190
|
"Sat"
|
|
1148
|
-
].map((e) => /* @__PURE__ */
|
|
1191
|
+
].map((e) => /* @__PURE__ */ N(B, {
|
|
1149
1192
|
style: [q.weekDay, { color: m.textMuted }],
|
|
1150
1193
|
children: e
|
|
1151
1194
|
}, e))
|
|
1152
1195
|
}),
|
|
1153
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ N(ne, {
|
|
1154
1197
|
data: D,
|
|
1155
1198
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1156
1199
|
numColumns: 7,
|
|
@@ -1158,8 +1201,8 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1158
1201
|
style: q.calendar,
|
|
1159
1202
|
contentContainerStyle: q.calendarContent,
|
|
1160
1203
|
renderItem: ({ item: e }) => {
|
|
1161
|
-
let t =
|
|
1162
|
-
return /* @__PURE__ */
|
|
1204
|
+
let t = te(e.date), n = I(e.date), r = L(e.date);
|
|
1205
|
+
return /* @__PURE__ */ N(V, {
|
|
1163
1206
|
style: [
|
|
1164
1207
|
q.dayCell,
|
|
1165
1208
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
@@ -1170,10 +1213,10 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1170
1213
|
},
|
|
1171
1214
|
t && q.dayCellDisabled
|
|
1172
1215
|
],
|
|
1173
|
-
onPress: () =>
|
|
1216
|
+
onPress: () => O(e.date),
|
|
1174
1217
|
disabled: t,
|
|
1175
1218
|
activeOpacity: .7,
|
|
1176
|
-
children: /* @__PURE__ */
|
|
1219
|
+
children: /* @__PURE__ */ N(B, {
|
|
1177
1220
|
style: [
|
|
1178
1221
|
q.dayText,
|
|
1179
1222
|
{ color: m.text },
|
|
@@ -1194,17 +1237,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1194
1237
|
})
|
|
1195
1238
|
})
|
|
1196
1239
|
}),
|
|
1197
|
-
|
|
1240
|
+
u && /* @__PURE__ */ N(B, {
|
|
1198
1241
|
style: [q.error, { color: m.error }],
|
|
1199
|
-
children:
|
|
1242
|
+
children: u
|
|
1200
1243
|
}),
|
|
1201
|
-
|
|
1244
|
+
f && !u && /* @__PURE__ */ N(B, {
|
|
1202
1245
|
style: [q.helperText, { color: m.textMuted }],
|
|
1203
|
-
children:
|
|
1246
|
+
children: f
|
|
1204
1247
|
})
|
|
1205
1248
|
]
|
|
1206
1249
|
});
|
|
1207
|
-
}, q =
|
|
1250
|
+
}, q = R.create({
|
|
1208
1251
|
calendar: {
|
|
1209
1252
|
flexGrow: 0,
|
|
1210
1253
|
flexShrink: 1
|
|
@@ -1314,137 +1357,137 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1314
1357
|
flexDirection: "row",
|
|
1315
1358
|
marginBottom: 8
|
|
1316
1359
|
}
|
|
1317
|
-
}),
|
|
1318
|
-
let [
|
|
1319
|
-
if (
|
|
1320
|
-
let e = (await
|
|
1360
|
+
}), _e = (t, n) => {
|
|
1361
|
+
let [r, i] = j(null), [a, o] = j(!0), { value: s } = t, { node: c, setValue: l, error: u, label: d, helperText: f } = n, { colors: p } = v(), m = e(), h = Array.isArray(s) ? s : s ? [s] : [], g = c.data.multiple, _ = ee(async () => {
|
|
1362
|
+
if (r) try {
|
|
1363
|
+
let e = (await r({ allowMultiSelection: g })).map((e) => ({
|
|
1321
1364
|
data: e.uri,
|
|
1322
1365
|
lastModified: Date.now(),
|
|
1323
1366
|
name: e.name,
|
|
1324
1367
|
size: e.size,
|
|
1325
1368
|
type: e.type || "application/octet-stream"
|
|
1326
1369
|
}));
|
|
1327
|
-
|
|
1370
|
+
l(g ? [...h, ...e] : e[0] || null);
|
|
1328
1371
|
} catch (e) {
|
|
1329
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1372
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && te.alert("Error", m("renderer.defaultInputs.filePickerError"));
|
|
1330
1373
|
}
|
|
1331
1374
|
}, [
|
|
1332
|
-
|
|
1375
|
+
r,
|
|
1333
1376
|
h,
|
|
1334
|
-
|
|
1335
|
-
|
|
1377
|
+
g,
|
|
1378
|
+
l,
|
|
1336
1379
|
m
|
|
1337
1380
|
]), y = ee((e) => {
|
|
1338
1381
|
let t = h.filter((t, n) => n !== e);
|
|
1339
|
-
|
|
1340
|
-
}, [h,
|
|
1341
|
-
return
|
|
1382
|
+
l(t.length > 0 ? t : null);
|
|
1383
|
+
}, [h, l]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1384
|
+
return O(() => {
|
|
1342
1385
|
(async () => {
|
|
1343
1386
|
try {
|
|
1344
1387
|
let { pick: e } = await import("react-native-document-picker");
|
|
1345
|
-
|
|
1388
|
+
i(() => e);
|
|
1346
1389
|
} catch {
|
|
1347
|
-
|
|
1390
|
+
i(null);
|
|
1348
1391
|
} finally {
|
|
1349
|
-
|
|
1392
|
+
o(!1);
|
|
1350
1393
|
}
|
|
1351
1394
|
})();
|
|
1352
|
-
}, []),
|
|
1395
|
+
}, []), a ? null : r ? /* @__PURE__ */ P(H, {
|
|
1353
1396
|
style: J.container,
|
|
1354
1397
|
children: [
|
|
1355
|
-
/* @__PURE__ */
|
|
1356
|
-
style: [J.label, { color:
|
|
1357
|
-
children: [
|
|
1358
|
-
style: { color:
|
|
1398
|
+
/* @__PURE__ */ P(B, {
|
|
1399
|
+
style: [J.label, { color: p.textSecondary }],
|
|
1400
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(B, {
|
|
1401
|
+
style: { color: p.error },
|
|
1359
1402
|
children: "*"
|
|
1360
1403
|
})]
|
|
1361
1404
|
}),
|
|
1362
|
-
h.length > 0 && /* @__PURE__ */
|
|
1405
|
+
h.length > 0 && /* @__PURE__ */ N(H, {
|
|
1363
1406
|
style: J.filesList,
|
|
1364
|
-
children: h.map((e, t) => /* @__PURE__ */
|
|
1407
|
+
children: h.map((e, t) => /* @__PURE__ */ P(H, {
|
|
1365
1408
|
style: [J.fileItem, {
|
|
1366
|
-
backgroundColor:
|
|
1367
|
-
borderColor:
|
|
1409
|
+
backgroundColor: p.card,
|
|
1410
|
+
borderColor: p.separator
|
|
1368
1411
|
}],
|
|
1369
1412
|
children: [
|
|
1370
|
-
/* @__PURE__ */
|
|
1371
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1372
|
-
children: /* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ N(H, {
|
|
1414
|
+
style: [J.fileIcon, { backgroundColor: p.muted }],
|
|
1415
|
+
children: /* @__PURE__ */ N(B, {
|
|
1373
1416
|
style: J.fileIconText,
|
|
1374
1417
|
children: "📄"
|
|
1375
1418
|
})
|
|
1376
1419
|
}),
|
|
1377
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ P(H, {
|
|
1378
1421
|
style: J.fileInfo,
|
|
1379
|
-
children: [/* @__PURE__ */
|
|
1380
|
-
style: [J.fileName, { color:
|
|
1422
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1423
|
+
style: [J.fileName, { color: p.text }],
|
|
1381
1424
|
numberOfLines: 1,
|
|
1382
1425
|
children: e.name
|
|
1383
|
-
}), e.size > 0 && /* @__PURE__ */
|
|
1384
|
-
style: [J.fileSize, { color:
|
|
1426
|
+
}), e.size > 0 && /* @__PURE__ */ N(B, {
|
|
1427
|
+
style: [J.fileSize, { color: p.textMuted }],
|
|
1385
1428
|
children: b(e.size)
|
|
1386
1429
|
})]
|
|
1387
1430
|
}),
|
|
1388
|
-
/* @__PURE__ */
|
|
1431
|
+
/* @__PURE__ */ N(V, {
|
|
1389
1432
|
style: J.removeButton,
|
|
1390
1433
|
onPress: () => y(t),
|
|
1391
1434
|
activeOpacity: .7,
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1393
|
-
style: [J.removeButtonText, { color:
|
|
1435
|
+
children: /* @__PURE__ */ N(B, {
|
|
1436
|
+
style: [J.removeButtonText, { color: p.textMuted }],
|
|
1394
1437
|
children: "✕"
|
|
1395
1438
|
})
|
|
1396
1439
|
})
|
|
1397
1440
|
]
|
|
1398
1441
|
}, `${e.name}-${t}`))
|
|
1399
1442
|
}),
|
|
1400
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ N(V, {
|
|
1401
1444
|
style: [J.pickButton, {
|
|
1402
|
-
backgroundColor:
|
|
1403
|
-
borderColor:
|
|
1445
|
+
backgroundColor: p.input,
|
|
1446
|
+
borderColor: p.border
|
|
1404
1447
|
}],
|
|
1405
|
-
onPress:
|
|
1448
|
+
onPress: _,
|
|
1406
1449
|
activeOpacity: .7,
|
|
1407
|
-
children: /* @__PURE__ */
|
|
1408
|
-
style: [J.pickButtonText, { color:
|
|
1409
|
-
children: h.length === 0 ? m(
|
|
1450
|
+
children: /* @__PURE__ */ N(B, {
|
|
1451
|
+
style: [J.pickButtonText, { color: p.textMuted }],
|
|
1452
|
+
children: h.length === 0 ? m(g ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : m(g ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1410
1453
|
})
|
|
1411
1454
|
}),
|
|
1412
|
-
|
|
1413
|
-
style: [J.error, { color:
|
|
1414
|
-
children:
|
|
1455
|
+
u && /* @__PURE__ */ N(B, {
|
|
1456
|
+
style: [J.error, { color: p.error }],
|
|
1457
|
+
children: u
|
|
1415
1458
|
}),
|
|
1416
|
-
|
|
1417
|
-
style: [J.helperText, { color:
|
|
1418
|
-
children:
|
|
1459
|
+
f && !u && /* @__PURE__ */ N(B, {
|
|
1460
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1461
|
+
children: f
|
|
1419
1462
|
})
|
|
1420
1463
|
]
|
|
1421
|
-
}) : /* @__PURE__ */
|
|
1464
|
+
}) : /* @__PURE__ */ P(H, {
|
|
1422
1465
|
style: J.container,
|
|
1423
1466
|
children: [
|
|
1424
|
-
/* @__PURE__ */
|
|
1425
|
-
style: [J.label, { color:
|
|
1426
|
-
children: [
|
|
1427
|
-
style: { color:
|
|
1467
|
+
/* @__PURE__ */ P(B, {
|
|
1468
|
+
style: [J.label, { color: p.textSecondary }],
|
|
1469
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(B, {
|
|
1470
|
+
style: { color: p.error },
|
|
1428
1471
|
children: "*"
|
|
1429
1472
|
})]
|
|
1430
1473
|
}),
|
|
1431
|
-
/* @__PURE__ */
|
|
1474
|
+
/* @__PURE__ */ N(H, {
|
|
1432
1475
|
style: [J.unavailableContainer, {
|
|
1433
|
-
backgroundColor:
|
|
1434
|
-
borderColor:
|
|
1476
|
+
backgroundColor: p.errorLight,
|
|
1477
|
+
borderColor: p.error
|
|
1435
1478
|
}],
|
|
1436
|
-
children: /* @__PURE__ */
|
|
1437
|
-
style: [J.unavailableText, { color:
|
|
1479
|
+
children: /* @__PURE__ */ N(B, {
|
|
1480
|
+
style: [J.unavailableText, { color: p.error }],
|
|
1438
1481
|
children: m("renderer.defaultInputs.filePickerUnavailable")
|
|
1439
1482
|
})
|
|
1440
1483
|
}),
|
|
1441
|
-
|
|
1442
|
-
style: [J.helperText, { color:
|
|
1443
|
-
children:
|
|
1484
|
+
f && /* @__PURE__ */ N(B, {
|
|
1485
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1486
|
+
children: f
|
|
1444
1487
|
})
|
|
1445
1488
|
]
|
|
1446
1489
|
});
|
|
1447
|
-
}, J =
|
|
1490
|
+
}, J = R.create({
|
|
1448
1491
|
container: { marginBottom: 16 },
|
|
1449
1492
|
error: {
|
|
1450
1493
|
fontSize: 12,
|
|
@@ -1513,15 +1556,15 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1513
1556
|
fontSize: 12,
|
|
1514
1557
|
textAlign: "center"
|
|
1515
1558
|
}
|
|
1516
|
-
}),
|
|
1517
|
-
let
|
|
1518
|
-
return /* @__PURE__ */ M
|
|
1519
|
-
style:
|
|
1520
|
-
children: [/* @__PURE__ */
|
|
1521
|
-
style: [
|
|
1522
|
-
children:
|
|
1523
|
-
}),
|
|
1524
|
-
style: [
|
|
1559
|
+
}), ve = (e, t) => null, ye = ({ missing: t, children: n }) => {
|
|
1560
|
+
let r = e(), { colors: i } = v();
|
|
1561
|
+
return /* @__PURE__ */ P(M, { children: [n, t.length > 0 && /* @__PURE__ */ P(H, {
|
|
1562
|
+
style: be.container,
|
|
1563
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1564
|
+
style: [be.title, { color: i.textMuted }],
|
|
1565
|
+
children: r("renderer.dependencyHint.title")
|
|
1566
|
+
}), t.map((e) => /* @__PURE__ */ P(B, {
|
|
1567
|
+
style: [be.item, { color: i.textMuted }],
|
|
1525
1568
|
children: [
|
|
1526
1569
|
"•",
|
|
1527
1570
|
" ",
|
|
@@ -1529,7 +1572,7 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1529
1572
|
]
|
|
1530
1573
|
}, e.id))]
|
|
1531
1574
|
})] });
|
|
1532
|
-
},
|
|
1575
|
+
}, be = R.create({
|
|
1533
1576
|
container: {
|
|
1534
1577
|
gap: 2,
|
|
1535
1578
|
marginTop: 4
|
|
@@ -1539,285 +1582,282 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1539
1582
|
fontSize: 12,
|
|
1540
1583
|
fontWeight: "500"
|
|
1541
1584
|
}
|
|
1542
|
-
}),
|
|
1543
|
-
if (n >
|
|
1585
|
+
}), xe = (e) => e.replace(/<[^>]*>/g, ""), Se = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), Ce = (e, t = {}) => e == null || e === "" ? "" : Se(xe(String(e))), we = 100, Te = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1586
|
+
if (n > we) return console.warn(`sanitizeHttpResponse: Maximum depth (${we}) exceeded.`), typeof e == "string" ? Ce(e, t) : "[Max Depth Exceeded]";
|
|
1544
1587
|
if (e == null) return e;
|
|
1545
|
-
if (typeof e == "string") return
|
|
1546
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1588
|
+
if (typeof e == "string") return Ce(e, t);
|
|
1589
|
+
if (Array.isArray(e)) return e.map((e) => Te(e, t, n + 1, r));
|
|
1547
1590
|
if (typeof e == "object") {
|
|
1548
1591
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1549
1592
|
r.add(e);
|
|
1550
1593
|
let i = {};
|
|
1551
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1594
|
+
for (let [a, o] of Object.entries(e)) i[a] = Te(o, t, n + 1, r);
|
|
1552
1595
|
return r.delete(e), i;
|
|
1553
1596
|
}
|
|
1554
1597
|
return e;
|
|
1555
|
-
},
|
|
1598
|
+
}, Ee = (e) => {
|
|
1556
1599
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1557
1600
|
return Array.from(t, (e) => e[1]);
|
|
1558
|
-
},
|
|
1601
|
+
}, De = (e, t) => Ee(e).every((e) => {
|
|
1559
1602
|
let n = t[e];
|
|
1560
1603
|
return n != null && n !== "";
|
|
1561
|
-
}),
|
|
1604
|
+
}), Oe = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1562
1605
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1563
1606
|
return n ? encodeURIComponent(a) : a;
|
|
1564
|
-
}),
|
|
1565
|
-
let [
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
]),
|
|
1570
|
-
|
|
1571
|
-
let
|
|
1572
|
-
|
|
1573
|
-
let
|
|
1574
|
-
if (!
|
|
1575
|
-
|
|
1607
|
+
}), ke = (t, a) => {
|
|
1608
|
+
let [s, c] = j(!1), [l, u] = j(null), [d, f] = j([]), [m, g] = j(""), [_, y] = j(!1), { value: b, placeholder: x } = t, { node: S, setValue: C, error: w, label: E, helperText: D, missingDependencies: M } = a, { formValues: te, inputNodes: I, headers: L, baseUrl: ie } = r(), { colors: R } = v(), { httpConfig: z } = S.data, oe = e(), se = A(!1), ce = A(!1), le = A(""), ue = A(z), U = A(te), fe = A(I), pe = A(L), W = A(ie), me = A(C), G = A(null), he = A(null), K = k(() => z?.url ? Ee(z.url) : [], [z?.url]), ge = K.length > 0, q = k(() => K.map((e) => `${e}:${String(te[e] ?? "")}`).join("|"), [K, te]), _e = k(() => z?.url ? ge ? De(z.url, te) : !0 : !1, [
|
|
1609
|
+
z?.url,
|
|
1610
|
+
ge,
|
|
1611
|
+
te
|
|
1612
|
+
]), J = ee(async (e) => {
|
|
1613
|
+
he.current && he.current.abort();
|
|
1614
|
+
let t = new AbortController();
|
|
1615
|
+
he.current = t;
|
|
1616
|
+
let r = ue.current, a = U.current, s = me.current;
|
|
1617
|
+
if (!r?.url) {
|
|
1618
|
+
u(oe("renderer.defaultHttpInput.noUrlConfigured")), he.current = null;
|
|
1576
1619
|
return;
|
|
1577
1620
|
}
|
|
1578
|
-
if (
|
|
1579
|
-
|
|
1621
|
+
if (r.url && !De(r.url, a)) {
|
|
1622
|
+
he.current = null;
|
|
1580
1623
|
return;
|
|
1581
1624
|
}
|
|
1582
|
-
|
|
1625
|
+
c(!0), u(null);
|
|
1583
1626
|
try {
|
|
1584
|
-
let
|
|
1585
|
-
key: e.key,
|
|
1586
|
-
value: Te(e.value, o)
|
|
1587
|
-
}))), m = (e) => ({
|
|
1588
|
-
key: e.key,
|
|
1589
|
-
value: Te(e.value, o)
|
|
1590
|
-
}), h = e([{
|
|
1591
|
-
key: "Content-Type",
|
|
1592
|
-
value: "application/json"
|
|
1593
|
-
}], W.current?.map(m), a.headers?.map(m)), g = [
|
|
1627
|
+
let l = h(Oe(r.url, a, !0), W.current), d = o(r.searchParam && e ? `${l}${l.includes("?") ? "&" : "?"}${r.searchParam}=${encodeURIComponent(e)}` : l, i(r.queryParams, a)), m = n({ "Content-Type": "application/json" }, i(pe.current, a), i(r.headers, a)), g = [
|
|
1594
1628
|
"POST",
|
|
1595
1629
|
"PUT",
|
|
1596
1630
|
"PATCH"
|
|
1597
|
-
].includes(
|
|
1631
|
+
].includes(r.method || "") ? r.sendAllFormValues ? JSON.stringify(p(a, fe.current)) : r.body ? Oe(r.body, a) : void 0 : void 0, _ = setTimeout(() => t.abort(), 3e4), v = await fetch(d, {
|
|
1598
1632
|
body: g || void 0,
|
|
1599
|
-
headers: Object.fromEntries(
|
|
1600
|
-
method:
|
|
1601
|
-
signal:
|
|
1633
|
+
headers: Object.fromEntries(Object.entries(m).filter(([, e]) => e)),
|
|
1634
|
+
method: r.method || "GET",
|
|
1635
|
+
signal: t.signal
|
|
1602
1636
|
});
|
|
1603
1637
|
if (clearTimeout(_), !v.ok) {
|
|
1604
|
-
|
|
1638
|
+
u(`HTTP Error ${v.status}: ${v.statusText}`), c(!1);
|
|
1605
1639
|
return;
|
|
1606
1640
|
}
|
|
1607
|
-
let y =
|
|
1608
|
-
if (
|
|
1609
|
-
let { valueField: e = "value", labelField: t = "label" } =
|
|
1610
|
-
f(b.map((
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1641
|
+
let y = Te(await v.json()), b = r.responsePath ? T(y, r.responsePath) : y;
|
|
1642
|
+
if (r.responseMapping && Array.isArray(b)) {
|
|
1643
|
+
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: i } = r.responseMapping;
|
|
1644
|
+
f(b.map((r) => {
|
|
1645
|
+
let a = n ? T(r, n) : void 0, o = i ? T(r, i) : void 0;
|
|
1646
|
+
return {
|
|
1647
|
+
description: a != null && a !== "" ? String(a) : void 0,
|
|
1648
|
+
image: typeof o == "string" && o !== "" ? o : void 0,
|
|
1649
|
+
label: String(T(r, t) || ""),
|
|
1650
|
+
value: String(T(r, e) || "")
|
|
1651
|
+
};
|
|
1652
|
+
}));
|
|
1653
|
+
} else s(typeof b == "string" ? b : JSON.stringify(b));
|
|
1615
1654
|
} catch (e) {
|
|
1616
1655
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1617
|
-
|
|
1656
|
+
u(e instanceof Error ? e.message : oe("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1618
1657
|
} finally {
|
|
1619
|
-
|
|
1658
|
+
c(!1), he.current = null;
|
|
1620
1659
|
}
|
|
1621
|
-
}, [
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1660
|
+
}, [oe]);
|
|
1661
|
+
if (O(() => {
|
|
1662
|
+
ue.current = z, U.current = te, fe.current = I, pe.current = L, W.current = ie, me.current = C, G.current = J;
|
|
1624
1663
|
}, [
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1664
|
+
z,
|
|
1665
|
+
te,
|
|
1666
|
+
I,
|
|
1667
|
+
L,
|
|
1629
1668
|
ie,
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
]),
|
|
1633
|
-
|
|
1634
|
-
}, []),
|
|
1635
|
-
if (
|
|
1636
|
-
|
|
1637
|
-
let e =
|
|
1638
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1639
|
-
}, []),
|
|
1640
|
-
if (!
|
|
1669
|
+
C,
|
|
1670
|
+
J
|
|
1671
|
+
]), O(() => () => {
|
|
1672
|
+
he.current && he.current.abort(), se.current = !1, ce.current = !1;
|
|
1673
|
+
}, []), O(() => {
|
|
1674
|
+
if (se.current) return;
|
|
1675
|
+
se.current = !0;
|
|
1676
|
+
let e = ue.current, t = U.current, n = G.current, r = e?.url && De(e.url, t);
|
|
1677
|
+
e?.fetchOnMount && r && n && (n(), e.url && (le.current = Ee(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1678
|
+
}, []), O(() => {
|
|
1679
|
+
if (!se.current || !ge || le.current === q || !_e) return;
|
|
1641
1680
|
let e = setTimeout(() => {
|
|
1642
|
-
|
|
1681
|
+
J(), le.current = q;
|
|
1643
1682
|
}, 500);
|
|
1644
1683
|
return () => clearTimeout(e);
|
|
1645
1684
|
}, [
|
|
1646
|
-
me,
|
|
1647
1685
|
q,
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1686
|
+
ge,
|
|
1687
|
+
_e,
|
|
1688
|
+
J
|
|
1689
|
+
]), O(() => {
|
|
1690
|
+
if (!ce.current) {
|
|
1691
|
+
ce.current = !0;
|
|
1653
1692
|
return;
|
|
1654
1693
|
}
|
|
1655
|
-
let e =
|
|
1656
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1657
|
-
}, [
|
|
1658
|
-
body:
|
|
1659
|
-
fetchOnMount:
|
|
1660
|
-
headers:
|
|
1661
|
-
method:
|
|
1662
|
-
queryParams:
|
|
1663
|
-
responseMapping:
|
|
1664
|
-
responsePath:
|
|
1665
|
-
searchParam:
|
|
1666
|
-
sendAllFormValues:
|
|
1667
|
-
url:
|
|
1668
|
-
}), [
|
|
1669
|
-
if (!(
|
|
1694
|
+
let e = ue.current, t = U.current, n = G.current, r = e?.url && De(e.url, t);
|
|
1695
|
+
e?.fetchOnMount && r && n && (n(), e.url && (le.current = Ee(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1696
|
+
}, [k(() => JSON.stringify({
|
|
1697
|
+
body: z?.body,
|
|
1698
|
+
fetchOnMount: z?.fetchOnMount,
|
|
1699
|
+
headers: z?.headers,
|
|
1700
|
+
method: z?.method,
|
|
1701
|
+
queryParams: z?.queryParams,
|
|
1702
|
+
responseMapping: z?.responseMapping,
|
|
1703
|
+
responsePath: z?.responsePath,
|
|
1704
|
+
searchParam: z?.searchParam,
|
|
1705
|
+
sendAllFormValues: z?.sendAllFormValues,
|
|
1706
|
+
url: z?.url
|
|
1707
|
+
}), [z])]), O(() => {
|
|
1708
|
+
if (!(z?.searchParam && m)) return;
|
|
1670
1709
|
let e = setTimeout(() => {
|
|
1671
|
-
|
|
1710
|
+
J(m);
|
|
1672
1711
|
}, 300);
|
|
1673
1712
|
return () => clearTimeout(e);
|
|
1674
1713
|
}, [
|
|
1675
1714
|
m,
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
]),
|
|
1679
|
-
let e = Array.isArray(
|
|
1680
|
-
if (
|
|
1681
|
-
let n =
|
|
1682
|
-
return /* @__PURE__ */
|
|
1715
|
+
z?.searchParam,
|
|
1716
|
+
J
|
|
1717
|
+
]), z?.responseMapping) {
|
|
1718
|
+
let e = Array.isArray(b) ? b[0] : b, t = d.find((t) => t.value === e);
|
|
1719
|
+
if (z.searchParam) {
|
|
1720
|
+
let n = s && z?.showLoading;
|
|
1721
|
+
return /* @__PURE__ */ P(H, {
|
|
1683
1722
|
style: Y.container,
|
|
1684
1723
|
children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1686
|
-
style: [Y.label, { color:
|
|
1687
|
-
children: [
|
|
1688
|
-
style: { color:
|
|
1724
|
+
/* @__PURE__ */ P(B, {
|
|
1725
|
+
style: [Y.label, { color: R.textSecondary }],
|
|
1726
|
+
children: [E || S.data.name, S.data.required && /* @__PURE__ */ N(B, {
|
|
1727
|
+
style: { color: R.error },
|
|
1689
1728
|
children: "*"
|
|
1690
1729
|
})]
|
|
1691
1730
|
}),
|
|
1692
|
-
/* @__PURE__ */
|
|
1693
|
-
missing:
|
|
1694
|
-
children: /* @__PURE__ */
|
|
1731
|
+
/* @__PURE__ */ N(ye, {
|
|
1732
|
+
missing: M,
|
|
1733
|
+
children: /* @__PURE__ */ P(V, {
|
|
1695
1734
|
style: [
|
|
1696
1735
|
Y.trigger,
|
|
1697
1736
|
{
|
|
1698
|
-
backgroundColor:
|
|
1699
|
-
borderColor:
|
|
1737
|
+
backgroundColor: R.input,
|
|
1738
|
+
borderColor: R.border
|
|
1700
1739
|
},
|
|
1701
|
-
w && { borderColor:
|
|
1702
|
-
|
|
1740
|
+
w && { borderColor: R.error },
|
|
1741
|
+
M.length > 0 && { backgroundColor: R.muted }
|
|
1703
1742
|
],
|
|
1704
|
-
onPress: () =>
|
|
1705
|
-
disabled:
|
|
1743
|
+
onPress: () => y(!0),
|
|
1744
|
+
disabled: M.length > 0,
|
|
1706
1745
|
activeOpacity: .7,
|
|
1707
|
-
children: [n ? /* @__PURE__ */
|
|
1746
|
+
children: [n ? /* @__PURE__ */ P(H, {
|
|
1708
1747
|
style: Y.loadingTrigger,
|
|
1709
|
-
children: [/* @__PURE__ */
|
|
1748
|
+
children: [/* @__PURE__ */ N(F, {
|
|
1710
1749
|
size: "small",
|
|
1711
|
-
color:
|
|
1712
|
-
}), /* @__PURE__ */
|
|
1713
|
-
style: [Y.triggerText, { color:
|
|
1750
|
+
color: R.primary
|
|
1751
|
+
}), /* @__PURE__ */ N(B, {
|
|
1752
|
+
style: [Y.triggerText, { color: R.textMuted }],
|
|
1714
1753
|
numberOfLines: 1,
|
|
1715
|
-
children: t?.label ||
|
|
1754
|
+
children: t?.label || x || oe("renderer.defaultHttpInput.search")
|
|
1716
1755
|
})]
|
|
1717
|
-
}) : /* @__PURE__ */
|
|
1756
|
+
}) : /* @__PURE__ */ N(B, {
|
|
1718
1757
|
style: [
|
|
1719
1758
|
Y.triggerText,
|
|
1720
|
-
{ color:
|
|
1721
|
-
!t && { color:
|
|
1759
|
+
{ color: R.text },
|
|
1760
|
+
!t && { color: R.textMuted }
|
|
1722
1761
|
],
|
|
1723
1762
|
numberOfLines: 1,
|
|
1724
|
-
children: t?.label ||
|
|
1725
|
-
}), /* @__PURE__ */
|
|
1726
|
-
style: [Y.arrow, { color:
|
|
1763
|
+
children: t?.label || x || oe("renderer.defaultHttpInput.search")
|
|
1764
|
+
}), /* @__PURE__ */ N(B, {
|
|
1765
|
+
style: [Y.arrow, { color: R.textMuted }],
|
|
1727
1766
|
children: "▼"
|
|
1728
1767
|
})]
|
|
1729
1768
|
})
|
|
1730
1769
|
}),
|
|
1731
|
-
/* @__PURE__ */
|
|
1770
|
+
/* @__PURE__ */ N(re, {
|
|
1732
1771
|
visible: _,
|
|
1733
1772
|
transparent: !0,
|
|
1734
1773
|
animationType: "fade",
|
|
1735
|
-
onRequestClose: () =>
|
|
1736
|
-
children: /* @__PURE__ */
|
|
1774
|
+
onRequestClose: () => y(!1),
|
|
1775
|
+
children: /* @__PURE__ */ N(V, {
|
|
1737
1776
|
style: Y.modalOverlay,
|
|
1738
1777
|
activeOpacity: 1,
|
|
1739
|
-
onPress: () =>
|
|
1740
|
-
children: /* @__PURE__ */
|
|
1741
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1778
|
+
onPress: () => y(!1),
|
|
1779
|
+
children: /* @__PURE__ */ P(V, {
|
|
1780
|
+
style: [Y.modalContent, { backgroundColor: R.card }],
|
|
1742
1781
|
activeOpacity: 1,
|
|
1743
1782
|
onPress: () => {},
|
|
1744
1783
|
children: [
|
|
1745
|
-
/* @__PURE__ */
|
|
1746
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1747
|
-
children: [/* @__PURE__ */
|
|
1748
|
-
style: [Y.modalTitle, { color:
|
|
1749
|
-
children:
|
|
1750
|
-
}), /* @__PURE__ */
|
|
1751
|
-
onPress: () =>
|
|
1752
|
-
children: /* @__PURE__ */
|
|
1753
|
-
style: [Y.closeButton, { color:
|
|
1784
|
+
/* @__PURE__ */ P(H, {
|
|
1785
|
+
style: [Y.modalHeader, { borderBottomColor: R.separator }],
|
|
1786
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1787
|
+
style: [Y.modalTitle, { color: R.text }],
|
|
1788
|
+
children: E || S.data.name
|
|
1789
|
+
}), /* @__PURE__ */ N(V, {
|
|
1790
|
+
onPress: () => y(!1),
|
|
1791
|
+
children: /* @__PURE__ */ N(B, {
|
|
1792
|
+
style: [Y.closeButton, { color: R.textMuted }],
|
|
1754
1793
|
children: "✕"
|
|
1755
1794
|
})
|
|
1756
1795
|
})]
|
|
1757
1796
|
}),
|
|
1758
|
-
/* @__PURE__ */
|
|
1797
|
+
/* @__PURE__ */ N(H, {
|
|
1759
1798
|
style: Y.searchContainer,
|
|
1760
|
-
children: /* @__PURE__ */
|
|
1799
|
+
children: /* @__PURE__ */ N(ae, {
|
|
1761
1800
|
style: [Y.searchInput, {
|
|
1762
|
-
backgroundColor:
|
|
1763
|
-
borderColor:
|
|
1764
|
-
color:
|
|
1801
|
+
backgroundColor: R.muted,
|
|
1802
|
+
borderColor: R.border,
|
|
1803
|
+
color: R.text
|
|
1765
1804
|
}],
|
|
1766
|
-
placeholder:
|
|
1767
|
-
placeholderTextColor:
|
|
1805
|
+
placeholder: oe("renderer.defaultHttpInput.search"),
|
|
1806
|
+
placeholderTextColor: R.textMuted,
|
|
1768
1807
|
value: m,
|
|
1769
1808
|
onChangeText: (e) => {
|
|
1770
|
-
|
|
1809
|
+
g(e), u(null);
|
|
1771
1810
|
},
|
|
1772
1811
|
autoFocus: !0,
|
|
1773
1812
|
autoCapitalize: "none",
|
|
1774
1813
|
autoCorrect: !1
|
|
1775
1814
|
})
|
|
1776
1815
|
}),
|
|
1777
|
-
|
|
1816
|
+
s ? /* @__PURE__ */ N(H, {
|
|
1778
1817
|
style: Y.loadingContainer,
|
|
1779
|
-
children: /* @__PURE__ */
|
|
1818
|
+
children: /* @__PURE__ */ N(F, {
|
|
1780
1819
|
size: "small",
|
|
1781
|
-
color:
|
|
1820
|
+
color: R.primary
|
|
1782
1821
|
})
|
|
1783
|
-
}) :
|
|
1822
|
+
}) : l ? /* @__PURE__ */ P(H, {
|
|
1784
1823
|
style: Y.errorContainer,
|
|
1785
|
-
children: [/* @__PURE__ */
|
|
1786
|
-
style: [Y.errorText, { color:
|
|
1787
|
-
children:
|
|
1788
|
-
}), /* @__PURE__ */
|
|
1789
|
-
onPress: () =>
|
|
1824
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1825
|
+
style: [Y.errorText, { color: R.error }],
|
|
1826
|
+
children: l
|
|
1827
|
+
}), /* @__PURE__ */ N(V, {
|
|
1828
|
+
onPress: () => J(m),
|
|
1790
1829
|
style: Y.retryButton,
|
|
1791
|
-
children: /* @__PURE__ */
|
|
1792
|
-
style: [Y.retryButtonText, { color:
|
|
1793
|
-
children:
|
|
1830
|
+
children: /* @__PURE__ */ N(B, {
|
|
1831
|
+
style: [Y.retryButtonText, { color: R.primary }],
|
|
1832
|
+
children: oe("renderer.defaultHttpInput.retry")
|
|
1794
1833
|
})
|
|
1795
1834
|
})]
|
|
1796
|
-
}) : /* @__PURE__ */
|
|
1797
|
-
data:
|
|
1835
|
+
}) : /* @__PURE__ */ N(ne, {
|
|
1836
|
+
data: d,
|
|
1798
1837
|
keyExtractor: (e) => e.value,
|
|
1799
1838
|
style: Y.optionsList,
|
|
1800
1839
|
contentContainerStyle: Y.optionsListContent,
|
|
1801
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1840
|
+
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
1802
1841
|
style: Y.emptyContainer,
|
|
1803
|
-
children: /* @__PURE__ */
|
|
1804
|
-
style: [Y.emptyText, { color:
|
|
1805
|
-
children:
|
|
1842
|
+
children: /* @__PURE__ */ N(B, {
|
|
1843
|
+
style: [Y.emptyText, { color: R.textMuted }],
|
|
1844
|
+
children: oe("renderer.defaultHttpInput.noResults")
|
|
1806
1845
|
})
|
|
1807
1846
|
}),
|
|
1808
1847
|
renderItem: ({ item: t }) => {
|
|
1809
1848
|
let n = t.value === e;
|
|
1810
|
-
return /* @__PURE__ */
|
|
1811
|
-
style: [Y.option, n && { backgroundColor:
|
|
1849
|
+
return /* @__PURE__ */ P(V, {
|
|
1850
|
+
style: [Y.option, n && { backgroundColor: R.primaryLight }],
|
|
1812
1851
|
onPress: () => {
|
|
1813
|
-
|
|
1852
|
+
C(t.value), y(!1);
|
|
1814
1853
|
},
|
|
1815
1854
|
activeOpacity: .7,
|
|
1816
|
-
children: [/* @__PURE__ */
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1855
|
+
children: [/* @__PURE__ */ N(de, {
|
|
1856
|
+
label: t.label,
|
|
1857
|
+
description: t.description,
|
|
1858
|
+
image: t.image
|
|
1859
|
+
}), n && /* @__PURE__ */ N(B, {
|
|
1860
|
+
style: [Y.checkmark, { color: R.primary }],
|
|
1821
1861
|
children: "✓"
|
|
1822
1862
|
})]
|
|
1823
1863
|
});
|
|
@@ -1827,112 +1867,113 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1827
1867
|
})
|
|
1828
1868
|
})
|
|
1829
1869
|
}),
|
|
1830
|
-
w && /* @__PURE__ */
|
|
1831
|
-
style: [Y.error, { color:
|
|
1870
|
+
w && /* @__PURE__ */ N(B, {
|
|
1871
|
+
style: [Y.error, { color: R.error }],
|
|
1832
1872
|
children: w
|
|
1833
1873
|
}),
|
|
1834
|
-
|
|
1835
|
-
style: [Y.helperText, { color:
|
|
1836
|
-
children:
|
|
1874
|
+
D && !w && /* @__PURE__ */ N(B, {
|
|
1875
|
+
style: [Y.helperText, { color: R.textMuted }],
|
|
1876
|
+
children: D
|
|
1837
1877
|
})
|
|
1838
1878
|
]
|
|
1839
1879
|
});
|
|
1840
1880
|
}
|
|
1841
|
-
let n =
|
|
1842
|
-
return /* @__PURE__ */
|
|
1881
|
+
let n = s && z?.showLoading, r = M.length === 0 && d.length === 0 && !n ? l ?? oe("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1882
|
+
return /* @__PURE__ */ P(H, {
|
|
1843
1883
|
style: Y.container,
|
|
1844
1884
|
children: [
|
|
1845
|
-
/* @__PURE__ */
|
|
1846
|
-
style: [Y.label, { color:
|
|
1847
|
-
children: [
|
|
1848
|
-
style: { color:
|
|
1885
|
+
/* @__PURE__ */ P(B, {
|
|
1886
|
+
style: [Y.label, { color: R.textSecondary }],
|
|
1887
|
+
children: [E || S.data.name, S.data.required && /* @__PURE__ */ N(B, {
|
|
1888
|
+
style: { color: R.error },
|
|
1849
1889
|
children: "*"
|
|
1850
1890
|
})]
|
|
1851
1891
|
}),
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
missing:
|
|
1854
|
-
children: /* @__PURE__ */
|
|
1892
|
+
/* @__PURE__ */ N(ye, {
|
|
1893
|
+
missing: M,
|
|
1894
|
+
children: /* @__PURE__ */ P(V, {
|
|
1855
1895
|
style: [
|
|
1856
1896
|
Y.trigger,
|
|
1857
1897
|
{
|
|
1858
|
-
backgroundColor:
|
|
1859
|
-
borderColor:
|
|
1898
|
+
backgroundColor: R.input,
|
|
1899
|
+
borderColor: R.border
|
|
1860
1900
|
},
|
|
1861
|
-
w && { borderColor:
|
|
1862
|
-
(n ||
|
|
1901
|
+
w && { borderColor: R.error },
|
|
1902
|
+
(n || d.length === 0) && { backgroundColor: R.muted }
|
|
1863
1903
|
],
|
|
1864
|
-
onPress: () =>
|
|
1865
|
-
disabled: n ||
|
|
1904
|
+
onPress: () => y(!0),
|
|
1905
|
+
disabled: n || d.length === 0,
|
|
1866
1906
|
activeOpacity: .7,
|
|
1867
1907
|
children: [
|
|
1868
|
-
n && /* @__PURE__ */
|
|
1908
|
+
n && /* @__PURE__ */ N(F, {
|
|
1869
1909
|
size: "small",
|
|
1870
|
-
color:
|
|
1910
|
+
color: R.primary,
|
|
1871
1911
|
style: Y.triggerLoader
|
|
1872
1912
|
}),
|
|
1873
|
-
/* @__PURE__ */
|
|
1913
|
+
/* @__PURE__ */ N(B, {
|
|
1874
1914
|
style: [
|
|
1875
1915
|
Y.triggerText,
|
|
1876
|
-
{ color:
|
|
1877
|
-
!t && { color:
|
|
1916
|
+
{ color: R.text },
|
|
1917
|
+
!t && { color: R.textMuted }
|
|
1878
1918
|
],
|
|
1879
1919
|
numberOfLines: 1,
|
|
1880
|
-
children: t?.label ||
|
|
1920
|
+
children: t?.label || x || oe("renderer.defaultHttpInput.selectOption")
|
|
1881
1921
|
}),
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
style: [Y.arrow, { color:
|
|
1922
|
+
/* @__PURE__ */ N(B, {
|
|
1923
|
+
style: [Y.arrow, { color: R.textMuted }],
|
|
1884
1924
|
children: "▼"
|
|
1885
1925
|
})
|
|
1886
1926
|
]
|
|
1887
1927
|
})
|
|
1888
1928
|
}),
|
|
1889
|
-
r && /* @__PURE__ */
|
|
1890
|
-
style: [Y.disabledMessage, { color:
|
|
1929
|
+
r && /* @__PURE__ */ N(B, {
|
|
1930
|
+
style: [Y.disabledMessage, { color: R.error }],
|
|
1891
1931
|
children: r
|
|
1892
1932
|
}),
|
|
1893
|
-
/* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ N(re, {
|
|
1894
1934
|
visible: _,
|
|
1895
1935
|
transparent: !0,
|
|
1896
1936
|
animationType: "fade",
|
|
1897
|
-
onRequestClose: () =>
|
|
1898
|
-
children: /* @__PURE__ */
|
|
1937
|
+
onRequestClose: () => y(!1),
|
|
1938
|
+
children: /* @__PURE__ */ N(V, {
|
|
1899
1939
|
style: Y.modalOverlay,
|
|
1900
1940
|
activeOpacity: 1,
|
|
1901
|
-
onPress: () =>
|
|
1902
|
-
children: /* @__PURE__ */
|
|
1903
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1941
|
+
onPress: () => y(!1),
|
|
1942
|
+
children: /* @__PURE__ */ P(V, {
|
|
1943
|
+
style: [Y.modalContent, { backgroundColor: R.card }],
|
|
1904
1944
|
activeOpacity: 1,
|
|
1905
1945
|
onPress: () => {},
|
|
1906
|
-
children: [/* @__PURE__ */
|
|
1907
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1908
|
-
children: [/* @__PURE__ */
|
|
1909
|
-
style: [Y.modalTitle, { color:
|
|
1910
|
-
children:
|
|
1911
|
-
}), /* @__PURE__ */
|
|
1912
|
-
onPress: () =>
|
|
1913
|
-
children: /* @__PURE__ */
|
|
1914
|
-
style: [Y.closeButton, { color:
|
|
1946
|
+
children: [/* @__PURE__ */ P(H, {
|
|
1947
|
+
style: [Y.modalHeader, { borderBottomColor: R.separator }],
|
|
1948
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1949
|
+
style: [Y.modalTitle, { color: R.text }],
|
|
1950
|
+
children: E || S.data.name
|
|
1951
|
+
}), /* @__PURE__ */ N(V, {
|
|
1952
|
+
onPress: () => y(!1),
|
|
1953
|
+
children: /* @__PURE__ */ N(B, {
|
|
1954
|
+
style: [Y.closeButton, { color: R.textMuted }],
|
|
1915
1955
|
children: "✕"
|
|
1916
1956
|
})
|
|
1917
1957
|
})]
|
|
1918
|
-
}), /* @__PURE__ */
|
|
1919
|
-
data:
|
|
1958
|
+
}), /* @__PURE__ */ N(ne, {
|
|
1959
|
+
data: d,
|
|
1920
1960
|
keyExtractor: (e) => e.value,
|
|
1921
1961
|
style: Y.optionsList,
|
|
1922
1962
|
contentContainerStyle: Y.optionsListContent,
|
|
1923
1963
|
renderItem: ({ item: t }) => {
|
|
1924
1964
|
let n = t.value === e;
|
|
1925
|
-
return /* @__PURE__ */
|
|
1926
|
-
style: [Y.option, n && { backgroundColor:
|
|
1965
|
+
return /* @__PURE__ */ P(V, {
|
|
1966
|
+
style: [Y.option, n && { backgroundColor: R.primaryLight }],
|
|
1927
1967
|
onPress: () => {
|
|
1928
|
-
|
|
1968
|
+
C(t.value), y(!1);
|
|
1929
1969
|
},
|
|
1930
1970
|
activeOpacity: .7,
|
|
1931
|
-
children: [/* @__PURE__ */
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1971
|
+
children: [/* @__PURE__ */ N(de, {
|
|
1972
|
+
label: t.label,
|
|
1973
|
+
description: t.description,
|
|
1974
|
+
image: t.image
|
|
1975
|
+
}), n && /* @__PURE__ */ N(B, {
|
|
1976
|
+
style: [Y.checkmark, { color: R.primary }],
|
|
1936
1977
|
children: "✓"
|
|
1937
1978
|
})]
|
|
1938
1979
|
});
|
|
@@ -1941,47 +1982,47 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
1941
1982
|
})
|
|
1942
1983
|
})
|
|
1943
1984
|
}),
|
|
1944
|
-
w && /* @__PURE__ */
|
|
1945
|
-
style: [Y.error, { color:
|
|
1985
|
+
w && /* @__PURE__ */ N(B, {
|
|
1986
|
+
style: [Y.error, { color: R.error }],
|
|
1946
1987
|
children: w
|
|
1947
1988
|
}),
|
|
1948
|
-
|
|
1949
|
-
style: [Y.helperText, { color:
|
|
1950
|
-
children:
|
|
1989
|
+
D && !w && /* @__PURE__ */ N(B, {
|
|
1990
|
+
style: [Y.helperText, { color: R.textMuted }],
|
|
1991
|
+
children: D
|
|
1951
1992
|
})
|
|
1952
1993
|
]
|
|
1953
1994
|
});
|
|
1954
1995
|
}
|
|
1955
|
-
return /* @__PURE__ */
|
|
1996
|
+
return /* @__PURE__ */ P(H, {
|
|
1956
1997
|
style: Y.container,
|
|
1957
1998
|
children: [
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
style: [Y.label, { color:
|
|
1960
|
-
children: [
|
|
1961
|
-
style: { color:
|
|
1999
|
+
/* @__PURE__ */ P(B, {
|
|
2000
|
+
style: [Y.label, { color: R.textSecondary }],
|
|
2001
|
+
children: [E || S.data.name, S.data.required && /* @__PURE__ */ N(B, {
|
|
2002
|
+
style: { color: R.error },
|
|
1962
2003
|
children: "*"
|
|
1963
2004
|
})]
|
|
1964
2005
|
}),
|
|
1965
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ N(ae, {
|
|
1966
2007
|
style: [Y.input, {
|
|
1967
|
-
backgroundColor:
|
|
1968
|
-
borderColor:
|
|
1969
|
-
color:
|
|
2008
|
+
backgroundColor: R.muted,
|
|
2009
|
+
borderColor: R.border,
|
|
2010
|
+
color: R.textMuted
|
|
1970
2011
|
}],
|
|
1971
|
-
value: typeof
|
|
2012
|
+
value: typeof b == "string" ? b : JSON.stringify(b),
|
|
1972
2013
|
editable: !1
|
|
1973
2014
|
}),
|
|
1974
|
-
w && /* @__PURE__ */
|
|
1975
|
-
style: [Y.error, { color:
|
|
2015
|
+
w && /* @__PURE__ */ N(B, {
|
|
2016
|
+
style: [Y.error, { color: R.error }],
|
|
1976
2017
|
children: w
|
|
1977
2018
|
}),
|
|
1978
|
-
|
|
1979
|
-
style: [Y.helperText, { color:
|
|
1980
|
-
children:
|
|
2019
|
+
D && !w && /* @__PURE__ */ N(B, {
|
|
2020
|
+
style: [Y.helperText, { color: R.textMuted }],
|
|
2021
|
+
children: D
|
|
1981
2022
|
})
|
|
1982
2023
|
]
|
|
1983
2024
|
});
|
|
1984
|
-
}, Y =
|
|
2025
|
+
}, Y = R.create({
|
|
1985
2026
|
arrow: { fontSize: 12 },
|
|
1986
2027
|
checkmark: {
|
|
1987
2028
|
fontSize: 18,
|
|
@@ -2076,10 +2117,6 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2076
2117
|
flexShrink: 1
|
|
2077
2118
|
},
|
|
2078
2119
|
optionsListContent: { flexGrow: 0 },
|
|
2079
|
-
optionText: {
|
|
2080
|
-
flex: 1,
|
|
2081
|
-
fontSize: 14
|
|
2082
|
-
},
|
|
2083
2120
|
retryButton: { marginTop: 12 },
|
|
2084
2121
|
retryButtonText: {
|
|
2085
2122
|
fontSize: 14,
|
|
@@ -2107,23 +2144,23 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2107
2144
|
flex: 1,
|
|
2108
2145
|
fontSize: 14
|
|
2109
2146
|
}
|
|
2110
|
-
}),
|
|
2111
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2112
|
-
return
|
|
2147
|
+
}), Ae = (e, t) => {
|
|
2148
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = j(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = v();
|
|
2149
|
+
return O(() => {
|
|
2113
2150
|
o(n?.toString() ?? "");
|
|
2114
|
-
}, [n]), /* @__PURE__ */
|
|
2115
|
-
style:
|
|
2151
|
+
}, [n]), /* @__PURE__ */ P(H, {
|
|
2152
|
+
style: je.container,
|
|
2116
2153
|
children: [
|
|
2117
|
-
/* @__PURE__ */
|
|
2118
|
-
style: [
|
|
2119
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */
|
|
2154
|
+
/* @__PURE__ */ P(B, {
|
|
2155
|
+
style: [je.label, { color: f.textSecondary }],
|
|
2156
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
2120
2157
|
style: { color: f.error },
|
|
2121
2158
|
children: "*"
|
|
2122
2159
|
})]
|
|
2123
2160
|
}),
|
|
2124
|
-
/* @__PURE__ */
|
|
2161
|
+
/* @__PURE__ */ N(ae, {
|
|
2125
2162
|
style: [
|
|
2126
|
-
|
|
2163
|
+
je.input,
|
|
2127
2164
|
{
|
|
2128
2165
|
backgroundColor: f.input,
|
|
2129
2166
|
borderColor: f.border,
|
|
@@ -2145,17 +2182,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2145
2182
|
keyboardType: "numeric",
|
|
2146
2183
|
accessibilityLabel: i
|
|
2147
2184
|
}),
|
|
2148
|
-
l && /* @__PURE__ */
|
|
2149
|
-
style: [
|
|
2185
|
+
l && /* @__PURE__ */ N(B, {
|
|
2186
|
+
style: [je.error, { color: f.error }],
|
|
2150
2187
|
children: l
|
|
2151
2188
|
}),
|
|
2152
|
-
d && !l && /* @__PURE__ */
|
|
2153
|
-
style: [
|
|
2189
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
2190
|
+
style: [je.helperText, { color: f.textMuted }],
|
|
2154
2191
|
children: d
|
|
2155
2192
|
})
|
|
2156
2193
|
]
|
|
2157
2194
|
});
|
|
2158
|
-
},
|
|
2195
|
+
}, je = R.create({
|
|
2159
2196
|
container: { marginBottom: 16 },
|
|
2160
2197
|
error: {
|
|
2161
2198
|
fontSize: 12,
|
|
@@ -2177,23 +2214,23 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2177
2214
|
fontWeight: "500",
|
|
2178
2215
|
marginBottom: 8
|
|
2179
2216
|
}
|
|
2180
|
-
}),
|
|
2181
|
-
let [n, r] =
|
|
2182
|
-
return /* @__PURE__ */
|
|
2183
|
-
style:
|
|
2217
|
+
}), Me = (e, t) => {
|
|
2218
|
+
let [n, r] = j(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = v();
|
|
2219
|
+
return /* @__PURE__ */ P(H, {
|
|
2220
|
+
style: Ne.container,
|
|
2184
2221
|
children: [
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
style: [
|
|
2187
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */
|
|
2222
|
+
/* @__PURE__ */ P(B, {
|
|
2223
|
+
style: [Ne.label, { color: f.textSecondary }],
|
|
2224
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
2188
2225
|
style: { color: f.error },
|
|
2189
2226
|
children: "*"
|
|
2190
2227
|
})]
|
|
2191
2228
|
}),
|
|
2192
|
-
/* @__PURE__ */
|
|
2193
|
-
style:
|
|
2194
|
-
children: [/* @__PURE__ */
|
|
2229
|
+
/* @__PURE__ */ P(H, {
|
|
2230
|
+
style: Ne.inputWrapper,
|
|
2231
|
+
children: [/* @__PURE__ */ N(ae, {
|
|
2195
2232
|
style: [
|
|
2196
|
-
|
|
2233
|
+
Ne.input,
|
|
2197
2234
|
{
|
|
2198
2235
|
backgroundColor: f.input,
|
|
2199
2236
|
borderColor: f.border,
|
|
@@ -2207,27 +2244,27 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2207
2244
|
placeholderTextColor: f.textMuted,
|
|
2208
2245
|
secureTextEntry: !n,
|
|
2209
2246
|
accessibilityLabel: o
|
|
2210
|
-
}), /* @__PURE__ */
|
|
2211
|
-
style:
|
|
2247
|
+
}), /* @__PURE__ */ N(V, {
|
|
2248
|
+
style: Ne.toggleButton,
|
|
2212
2249
|
onPress: () => r(!n),
|
|
2213
2250
|
activeOpacity: .7,
|
|
2214
|
-
children: /* @__PURE__ */
|
|
2215
|
-
style: [
|
|
2251
|
+
children: /* @__PURE__ */ N(B, {
|
|
2252
|
+
style: [Ne.toggleText, { color: f.primary }],
|
|
2216
2253
|
children: n ? "Hide" : "Show"
|
|
2217
2254
|
})
|
|
2218
2255
|
})]
|
|
2219
2256
|
}),
|
|
2220
|
-
l && /* @__PURE__ */
|
|
2221
|
-
style: [
|
|
2257
|
+
l && /* @__PURE__ */ N(B, {
|
|
2258
|
+
style: [Ne.error, { color: f.error }],
|
|
2222
2259
|
children: l
|
|
2223
2260
|
}),
|
|
2224
|
-
d && !l && /* @__PURE__ */
|
|
2225
|
-
style: [
|
|
2261
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
2262
|
+
style: [Ne.helperText, { color: f.textMuted }],
|
|
2226
2263
|
children: d
|
|
2227
2264
|
})
|
|
2228
2265
|
]
|
|
2229
2266
|
});
|
|
2230
|
-
},
|
|
2267
|
+
}, Ne = R.create({
|
|
2231
2268
|
container: { marginBottom: 16 },
|
|
2232
2269
|
error: {
|
|
2233
2270
|
fontSize: 12,
|
|
@@ -2265,32 +2302,32 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2265
2302
|
fontSize: 12,
|
|
2266
2303
|
fontWeight: "600"
|
|
2267
2304
|
}
|
|
2268
|
-
}),
|
|
2269
|
-
let { value:
|
|
2270
|
-
|
|
2305
|
+
}), Pe = (t, n) => {
|
|
2306
|
+
let { value: r } = t, { node: i, setValue: a, error: o, label: s, helperText: c } = n, { colors: l } = v(), u = e(), d = i.data.options || [], f = r || "", p = i.data.variant !== "default", m = (e) => {
|
|
2307
|
+
a(e);
|
|
2271
2308
|
};
|
|
2272
|
-
return /* @__PURE__ */
|
|
2309
|
+
return /* @__PURE__ */ P(H, {
|
|
2273
2310
|
style: X.container,
|
|
2274
2311
|
children: [
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
style: [X.label, { color:
|
|
2277
|
-
children: [
|
|
2278
|
-
style: { color:
|
|
2312
|
+
/* @__PURE__ */ P(B, {
|
|
2313
|
+
style: [X.label, { color: l.textSecondary }],
|
|
2314
|
+
children: [s || i.data.name, i.data.required && /* @__PURE__ */ N(B, {
|
|
2315
|
+
style: { color: l.error },
|
|
2279
2316
|
children: "*"
|
|
2280
2317
|
})]
|
|
2281
2318
|
}),
|
|
2282
|
-
|
|
2283
|
-
let t =
|
|
2284
|
-
return
|
|
2319
|
+
d.map((e) => {
|
|
2320
|
+
let t = f === e.value, n = u(e.label) || e.value, r = u(e.description);
|
|
2321
|
+
return p ? /* @__PURE__ */ P(V, {
|
|
2285
2322
|
style: [
|
|
2286
2323
|
X.card,
|
|
2287
2324
|
{
|
|
2288
|
-
backgroundColor:
|
|
2289
|
-
borderColor:
|
|
2325
|
+
backgroundColor: l.input,
|
|
2326
|
+
borderColor: l.border
|
|
2290
2327
|
},
|
|
2291
2328
|
t && {
|
|
2292
|
-
backgroundColor: `${
|
|
2293
|
-
borderColor:
|
|
2329
|
+
backgroundColor: `${l.primary}10`,
|
|
2330
|
+
borderColor: l.primary
|
|
2294
2331
|
},
|
|
2295
2332
|
e.disabled && { opacity: .5 }
|
|
2296
2333
|
],
|
|
@@ -2298,82 +2335,82 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2298
2335
|
disabled: e.disabled,
|
|
2299
2336
|
activeOpacity: .7,
|
|
2300
2337
|
children: [
|
|
2301
|
-
e.image && /* @__PURE__ */
|
|
2338
|
+
e.image && /* @__PURE__ */ N(L, {
|
|
2302
2339
|
source: { uri: e.image },
|
|
2303
2340
|
style: X.cardImage
|
|
2304
2341
|
}),
|
|
2305
|
-
/* @__PURE__ */
|
|
2342
|
+
/* @__PURE__ */ P(H, {
|
|
2306
2343
|
style: X.cardTextContainer,
|
|
2307
|
-
children: [/* @__PURE__ */
|
|
2308
|
-
style: [X.cardLabel, { color:
|
|
2344
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2345
|
+
style: [X.cardLabel, { color: l.textSecondary }],
|
|
2309
2346
|
children: n
|
|
2310
|
-
}), r && /* @__PURE__ */
|
|
2311
|
-
style: [X.cardDescription, { color:
|
|
2347
|
+
}), r && /* @__PURE__ */ N(B, {
|
|
2348
|
+
style: [X.cardDescription, { color: l.textMuted }],
|
|
2312
2349
|
children: r
|
|
2313
2350
|
})]
|
|
2314
2351
|
}),
|
|
2315
|
-
/* @__PURE__ */
|
|
2352
|
+
/* @__PURE__ */ N(H, {
|
|
2316
2353
|
style: [
|
|
2317
2354
|
X.radio,
|
|
2318
2355
|
X.cardRadio,
|
|
2319
2356
|
{
|
|
2320
|
-
backgroundColor:
|
|
2321
|
-
borderColor:
|
|
2357
|
+
backgroundColor: l.input,
|
|
2358
|
+
borderColor: l.border
|
|
2322
2359
|
},
|
|
2323
|
-
t && { borderColor:
|
|
2360
|
+
t && { borderColor: l.primary }
|
|
2324
2361
|
],
|
|
2325
|
-
children: t && /* @__PURE__ */
|
|
2362
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2326
2363
|
})
|
|
2327
2364
|
]
|
|
2328
|
-
}, e.value) : /* @__PURE__ */
|
|
2365
|
+
}, e.value) : /* @__PURE__ */ P(V, {
|
|
2329
2366
|
style: X.option,
|
|
2330
2367
|
onPress: () => m(e.value),
|
|
2331
2368
|
disabled: e.disabled,
|
|
2332
2369
|
activeOpacity: .7,
|
|
2333
2370
|
children: [
|
|
2334
|
-
/* @__PURE__ */
|
|
2371
|
+
/* @__PURE__ */ N(H, {
|
|
2335
2372
|
style: [
|
|
2336
2373
|
X.radio,
|
|
2337
2374
|
{
|
|
2338
|
-
backgroundColor:
|
|
2339
|
-
borderColor:
|
|
2375
|
+
backgroundColor: l.input,
|
|
2376
|
+
borderColor: l.border
|
|
2340
2377
|
},
|
|
2341
|
-
t && { borderColor:
|
|
2378
|
+
t && { borderColor: l.primary }
|
|
2342
2379
|
],
|
|
2343
|
-
children: t && /* @__PURE__ */
|
|
2380
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2344
2381
|
}),
|
|
2345
|
-
e.image && /* @__PURE__ */
|
|
2382
|
+
e.image && /* @__PURE__ */ N(L, {
|
|
2346
2383
|
source: { uri: e.image },
|
|
2347
2384
|
style: X.image
|
|
2348
2385
|
}),
|
|
2349
|
-
/* @__PURE__ */
|
|
2386
|
+
/* @__PURE__ */ P(H, {
|
|
2350
2387
|
style: X.optionTextContainer,
|
|
2351
|
-
children: [/* @__PURE__ */
|
|
2388
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2352
2389
|
style: [
|
|
2353
2390
|
X.optionLabel,
|
|
2354
|
-
{ color:
|
|
2355
|
-
e.disabled && { color:
|
|
2391
|
+
{ color: l.textSecondary },
|
|
2392
|
+
e.disabled && { color: l.textMuted }
|
|
2356
2393
|
],
|
|
2357
2394
|
children: n
|
|
2358
|
-
}), r && /* @__PURE__ */
|
|
2359
|
-
style: [X.optionDescription, { color:
|
|
2395
|
+
}), r && /* @__PURE__ */ N(B, {
|
|
2396
|
+
style: [X.optionDescription, { color: l.textMuted }],
|
|
2360
2397
|
children: r
|
|
2361
2398
|
})]
|
|
2362
2399
|
})
|
|
2363
2400
|
]
|
|
2364
2401
|
}, e.value);
|
|
2365
2402
|
}),
|
|
2366
|
-
|
|
2367
|
-
style: [X.error, { color:
|
|
2368
|
-
children:
|
|
2403
|
+
o && /* @__PURE__ */ N(B, {
|
|
2404
|
+
style: [X.error, { color: l.error }],
|
|
2405
|
+
children: o
|
|
2369
2406
|
}),
|
|
2370
|
-
|
|
2371
|
-
style: [X.helperText, { color:
|
|
2372
|
-
children:
|
|
2407
|
+
c && !o && /* @__PURE__ */ N(B, {
|
|
2408
|
+
style: [X.helperText, { color: l.textMuted }],
|
|
2409
|
+
children: c
|
|
2373
2410
|
})
|
|
2374
2411
|
]
|
|
2375
2412
|
});
|
|
2376
|
-
}, X =
|
|
2413
|
+
}, X = R.create({
|
|
2377
2414
|
card: {
|
|
2378
2415
|
alignItems: "center",
|
|
2379
2416
|
borderRadius: 8,
|
|
@@ -2446,101 +2483,99 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2446
2483
|
height: 10,
|
|
2447
2484
|
width: 10
|
|
2448
2485
|
}
|
|
2449
|
-
}),
|
|
2450
|
-
let [
|
|
2451
|
-
h ?
|
|
2486
|
+
}), Fe = (t, n) => {
|
|
2487
|
+
let [r, i] = j(!1), { value: a, placeholder: o } = t, { node: s, setValue: c, error: l, label: u, helperText: d } = n, { colors: f } = v(), p = e(), m = s.data.options || [], h = s.data.multiple, g = Array.isArray(a) ? a : a ? [a] : [], _ = (e) => {
|
|
2488
|
+
h ? c(g.includes(e) ? g.filter((t) => t !== e) : [...g, e]) : (c(e), i(!1));
|
|
2452
2489
|
};
|
|
2453
|
-
return /* @__PURE__ */
|
|
2490
|
+
return /* @__PURE__ */ P(H, {
|
|
2454
2491
|
style: Z.container,
|
|
2455
2492
|
children: [
|
|
2456
|
-
/* @__PURE__ */
|
|
2457
|
-
style: [Z.label, { color:
|
|
2458
|
-
children: [
|
|
2459
|
-
style: { color:
|
|
2493
|
+
/* @__PURE__ */ P(B, {
|
|
2494
|
+
style: [Z.label, { color: f.textSecondary }],
|
|
2495
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
2496
|
+
style: { color: f.error },
|
|
2460
2497
|
children: "*"
|
|
2461
2498
|
})]
|
|
2462
2499
|
}),
|
|
2463
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ P(V, {
|
|
2464
2501
|
style: [
|
|
2465
2502
|
Z.trigger,
|
|
2466
2503
|
{
|
|
2467
|
-
backgroundColor:
|
|
2468
|
-
borderColor:
|
|
2504
|
+
backgroundColor: f.input,
|
|
2505
|
+
borderColor: f.border
|
|
2469
2506
|
},
|
|
2470
|
-
|
|
2507
|
+
l && { borderColor: f.error }
|
|
2471
2508
|
],
|
|
2472
|
-
onPress: () =>
|
|
2509
|
+
onPress: () => i(!0),
|
|
2473
2510
|
activeOpacity: .7,
|
|
2474
|
-
children: [/* @__PURE__ */
|
|
2511
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2475
2512
|
style: [
|
|
2476
2513
|
Z.triggerText,
|
|
2477
|
-
{ color:
|
|
2478
|
-
|
|
2514
|
+
{ color: f.text },
|
|
2515
|
+
g.length === 0 && { color: f.textMuted }
|
|
2479
2516
|
],
|
|
2480
2517
|
children: (() => {
|
|
2481
|
-
if (
|
|
2482
|
-
if (h) return m.filter((e) =>
|
|
2483
|
-
let e = m.find((e) => e.value ===
|
|
2484
|
-
return e ?
|
|
2518
|
+
if (g.length === 0) return o || "Select...";
|
|
2519
|
+
if (h) return m.filter((e) => g.includes(e.value)).map((e) => p(e.label) || e.value).join(", ");
|
|
2520
|
+
let e = m.find((e) => e.value === g[0]);
|
|
2521
|
+
return e ? p(e.label) || e.value : o || "Select...";
|
|
2485
2522
|
})()
|
|
2486
|
-
}), /* @__PURE__ */
|
|
2487
|
-
style: [Z.arrow, { color:
|
|
2523
|
+
}), /* @__PURE__ */ N(B, {
|
|
2524
|
+
style: [Z.arrow, { color: f.textMuted }],
|
|
2488
2525
|
children: "▼"
|
|
2489
2526
|
})]
|
|
2490
2527
|
}),
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
visible:
|
|
2528
|
+
/* @__PURE__ */ N(re, {
|
|
2529
|
+
visible: r,
|
|
2493
2530
|
transparent: !0,
|
|
2494
2531
|
animationType: "fade",
|
|
2495
|
-
onRequestClose: () =>
|
|
2496
|
-
children: /* @__PURE__ */
|
|
2532
|
+
onRequestClose: () => i(!1),
|
|
2533
|
+
children: /* @__PURE__ */ N(V, {
|
|
2497
2534
|
style: Z.modalOverlay,
|
|
2498
2535
|
activeOpacity: 1,
|
|
2499
|
-
onPress: () =>
|
|
2500
|
-
children: /* @__PURE__ */
|
|
2501
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2536
|
+
onPress: () => i(!1),
|
|
2537
|
+
children: /* @__PURE__ */ P(H, {
|
|
2538
|
+
style: [Z.modalContent, { backgroundColor: f.card }],
|
|
2502
2539
|
onStartShouldSetResponder: () => !0,
|
|
2503
2540
|
children: [
|
|
2504
|
-
/* @__PURE__ */
|
|
2505
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2506
|
-
children: [/* @__PURE__ */
|
|
2507
|
-
style: [Z.modalTitle, { color:
|
|
2508
|
-
children:
|
|
2509
|
-
}), /* @__PURE__ */
|
|
2510
|
-
onPress: () =>
|
|
2511
|
-
children: /* @__PURE__ */
|
|
2512
|
-
style: [Z.closeButton, { color:
|
|
2541
|
+
/* @__PURE__ */ P(H, {
|
|
2542
|
+
style: [Z.modalHeader, { borderBottomColor: f.border }],
|
|
2543
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2544
|
+
style: [Z.modalTitle, { color: f.text }],
|
|
2545
|
+
children: u || s.data.name
|
|
2546
|
+
}), /* @__PURE__ */ N(V, {
|
|
2547
|
+
onPress: () => i(!1),
|
|
2548
|
+
children: /* @__PURE__ */ N(B, {
|
|
2549
|
+
style: [Z.closeButton, { color: f.textMuted }],
|
|
2513
2550
|
children: "✕"
|
|
2514
2551
|
})
|
|
2515
2552
|
})]
|
|
2516
2553
|
}),
|
|
2517
|
-
/* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ N(ie, {
|
|
2518
2555
|
style: Z.optionsList,
|
|
2519
2556
|
children: m.map((e) => {
|
|
2520
|
-
let t =
|
|
2521
|
-
return /* @__PURE__ */
|
|
2522
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2523
|
-
onPress: () =>
|
|
2557
|
+
let t = g.includes(e.value);
|
|
2558
|
+
return /* @__PURE__ */ P(V, {
|
|
2559
|
+
style: [Z.option, t && { backgroundColor: `${f.primary}20` }],
|
|
2560
|
+
onPress: () => _(e.value),
|
|
2524
2561
|
disabled: e.disabled,
|
|
2525
2562
|
activeOpacity: .7,
|
|
2526
|
-
children: [/* @__PURE__ */
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
}), t && /* @__PURE__ */ j(z, {
|
|
2534
|
-
style: [Z.checkmark, { color: d.primary }],
|
|
2563
|
+
children: [/* @__PURE__ */ N(de, {
|
|
2564
|
+
label: p(e.label) || e.value,
|
|
2565
|
+
description: p(e.description),
|
|
2566
|
+
image: e.image,
|
|
2567
|
+
disabled: e.disabled
|
|
2568
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
2569
|
+
style: [Z.checkmark, { color: f.primary }],
|
|
2535
2570
|
children: "✓"
|
|
2536
2571
|
})]
|
|
2537
2572
|
}, e.value);
|
|
2538
2573
|
})
|
|
2539
2574
|
}),
|
|
2540
|
-
h && /* @__PURE__ */
|
|
2541
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2542
|
-
onPress: () =>
|
|
2543
|
-
children: /* @__PURE__ */
|
|
2575
|
+
h && /* @__PURE__ */ N(V, {
|
|
2576
|
+
style: [Z.doneButton, { backgroundColor: f.primary }],
|
|
2577
|
+
onPress: () => i(!1),
|
|
2578
|
+
children: /* @__PURE__ */ N(B, {
|
|
2544
2579
|
style: Z.doneButtonText,
|
|
2545
2580
|
children: "Done"
|
|
2546
2581
|
})
|
|
@@ -2549,17 +2584,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2549
2584
|
})
|
|
2550
2585
|
})
|
|
2551
2586
|
}),
|
|
2552
|
-
|
|
2553
|
-
style: [Z.error, { color:
|
|
2554
|
-
children:
|
|
2587
|
+
l && /* @__PURE__ */ N(B, {
|
|
2588
|
+
style: [Z.error, { color: f.error }],
|
|
2589
|
+
children: l
|
|
2555
2590
|
}),
|
|
2556
|
-
|
|
2557
|
-
style: [Z.helperText, { color:
|
|
2558
|
-
children:
|
|
2591
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
2592
|
+
style: [Z.helperText, { color: f.textMuted }],
|
|
2593
|
+
children: d
|
|
2559
2594
|
})
|
|
2560
2595
|
]
|
|
2561
2596
|
});
|
|
2562
|
-
}, Z =
|
|
2597
|
+
}, Z = R.create({
|
|
2563
2598
|
arrow: { fontSize: 12 },
|
|
2564
2599
|
checkmark: {
|
|
2565
2600
|
fontSize: 18,
|
|
@@ -2627,7 +2662,6 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2627
2662
|
paddingVertical: 12
|
|
2628
2663
|
},
|
|
2629
2664
|
optionsList: { maxHeight: 300 },
|
|
2630
|
-
optionText: { fontSize: 14 },
|
|
2631
2665
|
trigger: {
|
|
2632
2666
|
alignItems: "center",
|
|
2633
2667
|
borderRadius: 6,
|
|
@@ -2641,23 +2675,23 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2641
2675
|
flex: 1,
|
|
2642
2676
|
fontSize: 14
|
|
2643
2677
|
}
|
|
2644
|
-
}),
|
|
2645
|
-
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } =
|
|
2646
|
-
return /* @__PURE__ */
|
|
2647
|
-
style:
|
|
2678
|
+
}), Ie = (e, t) => {
|
|
2679
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = v(), l = !!n;
|
|
2680
|
+
return /* @__PURE__ */ P(H, {
|
|
2681
|
+
style: Le.container,
|
|
2648
2682
|
children: [
|
|
2649
|
-
/* @__PURE__ */
|
|
2650
|
-
style:
|
|
2651
|
-
children: [/* @__PURE__ */
|
|
2652
|
-
style:
|
|
2653
|
-
children: /* @__PURE__ */
|
|
2654
|
-
style: [
|
|
2655
|
-
children: [o || r.data.name, r.data.required && /* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ P(H, {
|
|
2684
|
+
style: Le.row,
|
|
2685
|
+
children: [/* @__PURE__ */ N(H, {
|
|
2686
|
+
style: Le.labelContainer,
|
|
2687
|
+
children: /* @__PURE__ */ P(B, {
|
|
2688
|
+
style: [Le.label, { color: c.textSecondary }],
|
|
2689
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(B, {
|
|
2656
2690
|
style: { color: c.error },
|
|
2657
2691
|
children: "*"
|
|
2658
2692
|
})]
|
|
2659
2693
|
})
|
|
2660
|
-
}), /* @__PURE__ */
|
|
2694
|
+
}), /* @__PURE__ */ N(z, {
|
|
2661
2695
|
trackColor: {
|
|
2662
2696
|
false: c.border,
|
|
2663
2697
|
true: `${c.primary}80`
|
|
@@ -2668,17 +2702,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2668
2702
|
value: l
|
|
2669
2703
|
})]
|
|
2670
2704
|
}),
|
|
2671
|
-
a && /* @__PURE__ */
|
|
2672
|
-
style: [
|
|
2705
|
+
a && /* @__PURE__ */ N(B, {
|
|
2706
|
+
style: [Le.error, { color: c.error }],
|
|
2673
2707
|
children: a
|
|
2674
2708
|
}),
|
|
2675
|
-
s && !a && /* @__PURE__ */
|
|
2676
|
-
style: [
|
|
2709
|
+
s && !a && /* @__PURE__ */ N(B, {
|
|
2710
|
+
style: [Le.helperText, { color: c.textMuted }],
|
|
2677
2711
|
children: s
|
|
2678
2712
|
})
|
|
2679
2713
|
]
|
|
2680
2714
|
});
|
|
2681
|
-
},
|
|
2715
|
+
}, Le = R.create({
|
|
2682
2716
|
container: { marginBottom: 16 },
|
|
2683
2717
|
error: {
|
|
2684
2718
|
fontSize: 12,
|
|
@@ -2698,21 +2732,21 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2698
2732
|
flexDirection: "row",
|
|
2699
2733
|
justifyContent: "space-between"
|
|
2700
2734
|
}
|
|
2701
|
-
}),
|
|
2702
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2703
|
-
return /* @__PURE__ */
|
|
2704
|
-
style:
|
|
2735
|
+
}), Re = (e, t) => {
|
|
2736
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = v();
|
|
2737
|
+
return /* @__PURE__ */ P(H, {
|
|
2738
|
+
style: ze.container,
|
|
2705
2739
|
children: [
|
|
2706
|
-
/* @__PURE__ */
|
|
2707
|
-
style: [
|
|
2708
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ P(B, {
|
|
2741
|
+
style: [ze.label, { color: u.textSecondary }],
|
|
2742
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(B, {
|
|
2709
2743
|
style: { color: u.error },
|
|
2710
2744
|
children: "*"
|
|
2711
2745
|
})]
|
|
2712
2746
|
}),
|
|
2713
|
-
/* @__PURE__ */
|
|
2747
|
+
/* @__PURE__ */ N(ae, {
|
|
2714
2748
|
style: [
|
|
2715
|
-
|
|
2749
|
+
ze.textarea,
|
|
2716
2750
|
{
|
|
2717
2751
|
backgroundColor: u.input,
|
|
2718
2752
|
borderColor: u.border,
|
|
@@ -2729,17 +2763,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2729
2763
|
textAlignVertical: "top",
|
|
2730
2764
|
accessibilityLabel: i
|
|
2731
2765
|
}),
|
|
2732
|
-
s && /* @__PURE__ */
|
|
2733
|
-
style: [
|
|
2766
|
+
s && /* @__PURE__ */ N(B, {
|
|
2767
|
+
style: [ze.error, { color: u.error }],
|
|
2734
2768
|
children: s
|
|
2735
2769
|
}),
|
|
2736
|
-
l && !s && /* @__PURE__ */
|
|
2737
|
-
style: [
|
|
2770
|
+
l && !s && /* @__PURE__ */ N(B, {
|
|
2771
|
+
style: [ze.helperText, { color: u.textMuted }],
|
|
2738
2772
|
children: l
|
|
2739
2773
|
})
|
|
2740
2774
|
]
|
|
2741
2775
|
});
|
|
2742
|
-
},
|
|
2776
|
+
}, ze = R.create({
|
|
2743
2777
|
container: { marginBottom: 16 },
|
|
2744
2778
|
error: {
|
|
2745
2779
|
fontSize: 12,
|
|
@@ -2762,21 +2796,21 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2762
2796
|
paddingHorizontal: 12,
|
|
2763
2797
|
paddingVertical: 8
|
|
2764
2798
|
}
|
|
2765
|
-
}),
|
|
2766
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2767
|
-
return /* @__PURE__ */
|
|
2768
|
-
style:
|
|
2799
|
+
}), Be = (e, t) => {
|
|
2800
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = v();
|
|
2801
|
+
return /* @__PURE__ */ P(H, {
|
|
2802
|
+
style: Ve.container,
|
|
2769
2803
|
children: [
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
style: [
|
|
2772
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ P(B, {
|
|
2805
|
+
style: [Ve.label, { color: u.textSecondary }],
|
|
2806
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(B, {
|
|
2773
2807
|
style: { color: u.error },
|
|
2774
2808
|
children: "*"
|
|
2775
2809
|
})]
|
|
2776
2810
|
}),
|
|
2777
|
-
/* @__PURE__ */
|
|
2811
|
+
/* @__PURE__ */ N(ae, {
|
|
2778
2812
|
style: [
|
|
2779
|
-
|
|
2813
|
+
Ve.input,
|
|
2780
2814
|
{
|
|
2781
2815
|
backgroundColor: u.input,
|
|
2782
2816
|
borderColor: u.border,
|
|
@@ -2790,17 +2824,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2790
2824
|
placeholderTextColor: u.textMuted,
|
|
2791
2825
|
accessibilityLabel: i
|
|
2792
2826
|
}),
|
|
2793
|
-
s && /* @__PURE__ */
|
|
2794
|
-
style: [
|
|
2827
|
+
s && /* @__PURE__ */ N(B, {
|
|
2828
|
+
style: [Ve.error, { color: u.error }],
|
|
2795
2829
|
children: s
|
|
2796
2830
|
}),
|
|
2797
|
-
l && !s && /* @__PURE__ */
|
|
2798
|
-
style: [
|
|
2831
|
+
l && !s && /* @__PURE__ */ N(B, {
|
|
2832
|
+
style: [Ve.helperText, { color: u.textMuted }],
|
|
2799
2833
|
children: l
|
|
2800
2834
|
})
|
|
2801
2835
|
]
|
|
2802
2836
|
});
|
|
2803
|
-
},
|
|
2837
|
+
}, Ve = R.create({
|
|
2804
2838
|
container: { marginBottom: 16 },
|
|
2805
2839
|
error: {
|
|
2806
2840
|
fontSize: 12,
|
|
@@ -2822,38 +2856,38 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2822
2856
|
fontWeight: "500",
|
|
2823
2857
|
marginBottom: 8
|
|
2824
2858
|
}
|
|
2825
|
-
}),
|
|
2826
|
-
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] =
|
|
2827
|
-
|
|
2859
|
+
}), He = (e, t) => {
|
|
2860
|
+
let { value: n, placeholder: r } = e, i = (n || "").split(":"), a = Number.parseInt(i[0], 10), o = Number.parseInt(i[1], 10), s = Number.isNaN(a) ? 0 : a, c = Number.isNaN(o) ? 0 : o, [l, u] = j(s || 0), [d, f] = j(c || 0), [p, m] = j(!1), { node: h, setValue: g, error: _, label: y, helperText: b } = t, { colors: x } = v(), S = A(null), C = A(null), w = Array.from({ length: 24 }, (e, t) => t), T = Array.from({ length: 60 }, (e, t) => t), E = () => n || r || "Select time", D = ee(() => {
|
|
2861
|
+
g(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2828
2862
|
}, [
|
|
2829
2863
|
l,
|
|
2830
2864
|
d,
|
|
2831
|
-
|
|
2865
|
+
g
|
|
2832
2866
|
]);
|
|
2833
|
-
return /* @__PURE__ */
|
|
2867
|
+
return /* @__PURE__ */ P(H, {
|
|
2834
2868
|
style: Q.container,
|
|
2835
2869
|
children: [
|
|
2836
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ P(B, {
|
|
2837
2871
|
style: [Q.label, { color: x.textSecondary }],
|
|
2838
|
-
children: [y || h.data.name, h.data.required && /* @__PURE__ */
|
|
2872
|
+
children: [y || h.data.name, h.data.required && /* @__PURE__ */ N(B, {
|
|
2839
2873
|
style: { color: x.error },
|
|
2840
2874
|
children: "*"
|
|
2841
2875
|
})]
|
|
2842
2876
|
}),
|
|
2843
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ P(V, {
|
|
2844
2878
|
style: [
|
|
2845
2879
|
Q.trigger,
|
|
2846
2880
|
{
|
|
2847
2881
|
backgroundColor: x.input,
|
|
2848
2882
|
borderColor: x.border
|
|
2849
2883
|
},
|
|
2850
|
-
|
|
2884
|
+
_ && { borderColor: x.error }
|
|
2851
2885
|
],
|
|
2852
2886
|
onPress: () => {
|
|
2853
2887
|
u(s || 0), f(c || 0), m(!0);
|
|
2854
2888
|
},
|
|
2855
2889
|
activeOpacity: .7,
|
|
2856
|
-
children: [/* @__PURE__ */
|
|
2890
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2857
2891
|
style: [
|
|
2858
2892
|
Q.triggerText,
|
|
2859
2893
|
{ color: x.text },
|
|
@@ -2861,56 +2895,56 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2861
2895
|
],
|
|
2862
2896
|
numberOfLines: 1,
|
|
2863
2897
|
children: E()
|
|
2864
|
-
}), /* @__PURE__ */
|
|
2898
|
+
}), /* @__PURE__ */ N(B, {
|
|
2865
2899
|
style: Q.icon,
|
|
2866
2900
|
children: "🕐"
|
|
2867
2901
|
})]
|
|
2868
2902
|
}),
|
|
2869
|
-
/* @__PURE__ */
|
|
2903
|
+
/* @__PURE__ */ N(re, {
|
|
2870
2904
|
visible: p,
|
|
2871
2905
|
transparent: !0,
|
|
2872
2906
|
animationType: "fade",
|
|
2873
2907
|
onRequestClose: () => m(!1),
|
|
2874
|
-
children: /* @__PURE__ */
|
|
2908
|
+
children: /* @__PURE__ */ N(V, {
|
|
2875
2909
|
style: Q.modalOverlay,
|
|
2876
2910
|
activeOpacity: 1,
|
|
2877
2911
|
onPress: () => m(!1),
|
|
2878
|
-
children: /* @__PURE__ */
|
|
2912
|
+
children: /* @__PURE__ */ P(V, {
|
|
2879
2913
|
style: [Q.modalContent, { backgroundColor: x.card }],
|
|
2880
2914
|
activeOpacity: 1,
|
|
2881
2915
|
onPress: () => {},
|
|
2882
2916
|
children: [
|
|
2883
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ P(H, {
|
|
2884
2918
|
style: [Q.modalHeader, { borderBottomColor: x.separator }],
|
|
2885
|
-
children: [/* @__PURE__ */
|
|
2919
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2886
2920
|
style: [Q.modalTitle, { color: x.text }],
|
|
2887
2921
|
children: y || h.data.name
|
|
2888
|
-
}), /* @__PURE__ */
|
|
2922
|
+
}), /* @__PURE__ */ N(V, {
|
|
2889
2923
|
onPress: () => m(!1),
|
|
2890
|
-
children: /* @__PURE__ */
|
|
2924
|
+
children: /* @__PURE__ */ N(B, {
|
|
2891
2925
|
style: [Q.closeButton, { color: x.textMuted }],
|
|
2892
2926
|
children: "✕"
|
|
2893
2927
|
})
|
|
2894
2928
|
})]
|
|
2895
2929
|
}),
|
|
2896
|
-
/* @__PURE__ */
|
|
2930
|
+
/* @__PURE__ */ P(H, {
|
|
2897
2931
|
style: Q.pickerContainer,
|
|
2898
2932
|
children: [
|
|
2899
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ P(H, {
|
|
2900
2934
|
style: Q.pickerColumn,
|
|
2901
|
-
children: [/* @__PURE__ */
|
|
2935
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2902
2936
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2903
2937
|
children: "Hour"
|
|
2904
|
-
}), /* @__PURE__ */
|
|
2938
|
+
}), /* @__PURE__ */ N(ie, {
|
|
2905
2939
|
ref: S,
|
|
2906
2940
|
style: Q.picker,
|
|
2907
2941
|
contentContainerStyle: Q.pickerContent,
|
|
2908
2942
|
showsVerticalScrollIndicator: !1,
|
|
2909
|
-
children: w.map((e) => /* @__PURE__ */
|
|
2943
|
+
children: w.map((e) => /* @__PURE__ */ N(V, {
|
|
2910
2944
|
style: [Q.pickerItem, l === e && { backgroundColor: x.primary }],
|
|
2911
2945
|
onPress: () => u(e),
|
|
2912
2946
|
activeOpacity: .7,
|
|
2913
|
-
children: /* @__PURE__ */
|
|
2947
|
+
children: /* @__PURE__ */ N(B, {
|
|
2914
2948
|
style: [
|
|
2915
2949
|
Q.pickerItemText,
|
|
2916
2950
|
{ color: x.text },
|
|
@@ -2924,25 +2958,25 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2924
2958
|
}, e))
|
|
2925
2959
|
})]
|
|
2926
2960
|
}),
|
|
2927
|
-
/* @__PURE__ */
|
|
2961
|
+
/* @__PURE__ */ N(B, {
|
|
2928
2962
|
style: [Q.pickerSeparator, { color: x.text }],
|
|
2929
2963
|
children: ":"
|
|
2930
2964
|
}),
|
|
2931
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ P(H, {
|
|
2932
2966
|
style: Q.pickerColumn,
|
|
2933
|
-
children: [/* @__PURE__ */
|
|
2967
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2934
2968
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2935
2969
|
children: "Minute"
|
|
2936
|
-
}), /* @__PURE__ */
|
|
2970
|
+
}), /* @__PURE__ */ N(ie, {
|
|
2937
2971
|
ref: C,
|
|
2938
2972
|
style: Q.picker,
|
|
2939
2973
|
contentContainerStyle: Q.pickerContent,
|
|
2940
2974
|
showsVerticalScrollIndicator: !1,
|
|
2941
|
-
children: T.map((e) => /* @__PURE__ */
|
|
2975
|
+
children: T.map((e) => /* @__PURE__ */ N(V, {
|
|
2942
2976
|
style: [Q.pickerItem, d === e && { backgroundColor: x.primary }],
|
|
2943
2977
|
onPress: () => f(e),
|
|
2944
2978
|
activeOpacity: .7,
|
|
2945
|
-
children: /* @__PURE__ */
|
|
2979
|
+
children: /* @__PURE__ */ N(B, {
|
|
2946
2980
|
style: [
|
|
2947
2981
|
Q.pickerItemText,
|
|
2948
2982
|
{ color: x.text },
|
|
@@ -2958,11 +2992,11 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2958
2992
|
})
|
|
2959
2993
|
]
|
|
2960
2994
|
}),
|
|
2961
|
-
/* @__PURE__ */
|
|
2995
|
+
/* @__PURE__ */ N(V, {
|
|
2962
2996
|
style: [Q.confirmButton, { backgroundColor: x.primary }],
|
|
2963
2997
|
onPress: D,
|
|
2964
2998
|
activeOpacity: .7,
|
|
2965
|
-
children: /* @__PURE__ */
|
|
2999
|
+
children: /* @__PURE__ */ N(B, {
|
|
2966
3000
|
style: [Q.confirmButtonText, { color: x.background }],
|
|
2967
3001
|
children: "Confirm"
|
|
2968
3002
|
})
|
|
@@ -2971,17 +3005,17 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
2971
3005
|
})
|
|
2972
3006
|
})
|
|
2973
3007
|
}),
|
|
2974
|
-
|
|
3008
|
+
_ && /* @__PURE__ */ N(B, {
|
|
2975
3009
|
style: [Q.error, { color: x.error }],
|
|
2976
|
-
children:
|
|
3010
|
+
children: _
|
|
2977
3011
|
}),
|
|
2978
|
-
b && !
|
|
3012
|
+
b && !_ && /* @__PURE__ */ N(B, {
|
|
2979
3013
|
style: [Q.helperText, { color: x.textMuted }],
|
|
2980
3014
|
children: b
|
|
2981
3015
|
})
|
|
2982
3016
|
]
|
|
2983
3017
|
});
|
|
2984
|
-
}, Q =
|
|
3018
|
+
}, Q = R.create({
|
|
2985
3019
|
closeButton: {
|
|
2986
3020
|
fontSize: 24,
|
|
2987
3021
|
fontWeight: "300"
|
|
@@ -3072,112 +3106,112 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3072
3106
|
flex: 1,
|
|
3073
3107
|
fontSize: 14
|
|
3074
3108
|
}
|
|
3075
|
-
}),
|
|
3076
|
-
let [
|
|
3077
|
-
let e = `${String(k).padStart(2, "0")}:${String(
|
|
3078
|
-
|
|
3109
|
+
}), Ue = (t, n) => {
|
|
3110
|
+
let [r, i] = j(!1), [a, o] = j(!0), { value: s } = t, { node: c, setValue: l, error: u, label: d, helperText: f } = n, { colors: p } = v(), m = e(), h = Array.isArray(s) ? s : [], g = h[0] || "", _ = h[1] || "", y = g.split(":"), b = Number.parseInt(y[0], 10), x = Number.parseInt(y[1], 10), S = Number.isNaN(b) ? 0 : b, C = Number.isNaN(x) ? 0 : x, w = _.split(":"), T = Number.parseInt(w[0], 10), E = Number.parseInt(w[1], 10), D = Number.isNaN(T) ? 0 : T, O = Number.isNaN(E) ? 0 : E, [k, A] = j(0), [M, F] = j(0), te = Array.from({ length: 24 }, (e, t) => t), I = Array.from({ length: 60 }, (e, t) => t), ne = () => g && _ ? `${g} - ${_}` : g || m("renderer.defaultInputs.selectDateRange"), L = ee(() => {
|
|
3111
|
+
let e = `${String(k).padStart(2, "0")}:${String(M).padStart(2, "0")}`;
|
|
3112
|
+
a ? (l([e, _]), o(!1), A(D || 0), F(O || 0)) : (l([g, e]), i(!1), o(!0));
|
|
3079
3113
|
}, [
|
|
3080
|
-
|
|
3114
|
+
a,
|
|
3081
3115
|
k,
|
|
3082
|
-
|
|
3116
|
+
M,
|
|
3117
|
+
g,
|
|
3083
3118
|
_,
|
|
3084
|
-
v,
|
|
3085
3119
|
D,
|
|
3086
3120
|
O,
|
|
3087
|
-
|
|
3121
|
+
l
|
|
3088
3122
|
]);
|
|
3089
|
-
return /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ P(H, {
|
|
3090
3124
|
style: $.container,
|
|
3091
3125
|
children: [
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
style: [$.label, { color:
|
|
3094
|
-
children: [
|
|
3095
|
-
style: { color:
|
|
3126
|
+
/* @__PURE__ */ P(B, {
|
|
3127
|
+
style: [$.label, { color: p.textSecondary }],
|
|
3128
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(B, {
|
|
3129
|
+
style: { color: p.error },
|
|
3096
3130
|
children: "*"
|
|
3097
3131
|
})]
|
|
3098
3132
|
}),
|
|
3099
|
-
/* @__PURE__ */
|
|
3133
|
+
/* @__PURE__ */ P(V, {
|
|
3100
3134
|
style: [
|
|
3101
3135
|
$.trigger,
|
|
3102
3136
|
{
|
|
3103
|
-
backgroundColor:
|
|
3104
|
-
borderColor:
|
|
3137
|
+
backgroundColor: p.input,
|
|
3138
|
+
borderColor: p.border
|
|
3105
3139
|
},
|
|
3106
|
-
|
|
3140
|
+
u && { borderColor: p.error }
|
|
3107
3141
|
],
|
|
3108
3142
|
onPress: () => {
|
|
3109
|
-
|
|
3143
|
+
A(S || 0), F(C || 0), o(!0), i(!0);
|
|
3110
3144
|
},
|
|
3111
3145
|
activeOpacity: .7,
|
|
3112
|
-
children: [/* @__PURE__ */
|
|
3146
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3113
3147
|
style: [
|
|
3114
3148
|
$.triggerText,
|
|
3115
|
-
{ color:
|
|
3116
|
-
!
|
|
3149
|
+
{ color: p.text },
|
|
3150
|
+
!g && { color: p.textMuted }
|
|
3117
3151
|
],
|
|
3118
3152
|
numberOfLines: 1,
|
|
3119
3153
|
children: ne()
|
|
3120
|
-
}), /* @__PURE__ */
|
|
3154
|
+
}), /* @__PURE__ */ N(B, {
|
|
3121
3155
|
style: $.icon,
|
|
3122
3156
|
children: "🕐"
|
|
3123
3157
|
})]
|
|
3124
3158
|
}),
|
|
3125
|
-
/* @__PURE__ */
|
|
3126
|
-
visible:
|
|
3159
|
+
/* @__PURE__ */ N(re, {
|
|
3160
|
+
visible: r,
|
|
3127
3161
|
transparent: !0,
|
|
3128
3162
|
animationType: "fade",
|
|
3129
|
-
onRequestClose: () =>
|
|
3130
|
-
children: /* @__PURE__ */
|
|
3163
|
+
onRequestClose: () => i(!1),
|
|
3164
|
+
children: /* @__PURE__ */ N(V, {
|
|
3131
3165
|
style: $.modalOverlay,
|
|
3132
3166
|
activeOpacity: 1,
|
|
3133
|
-
onPress: () =>
|
|
3134
|
-
children: /* @__PURE__ */
|
|
3135
|
-
style: [$.modalContent, { backgroundColor:
|
|
3167
|
+
onPress: () => i(!1),
|
|
3168
|
+
children: /* @__PURE__ */ P(V, {
|
|
3169
|
+
style: [$.modalContent, { backgroundColor: p.card }],
|
|
3136
3170
|
activeOpacity: 1,
|
|
3137
3171
|
onPress: () => {},
|
|
3138
3172
|
children: [
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3141
|
-
children: [/* @__PURE__ */
|
|
3142
|
-
style: [$.modalTitle, { color:
|
|
3143
|
-
children:
|
|
3144
|
-
}), /* @__PURE__ */
|
|
3145
|
-
onPress: () =>
|
|
3146
|
-
children: /* @__PURE__ */
|
|
3147
|
-
style: [$.closeButton, { color:
|
|
3173
|
+
/* @__PURE__ */ P(H, {
|
|
3174
|
+
style: [$.modalHeader, { borderBottomColor: p.separator }],
|
|
3175
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3176
|
+
style: [$.modalTitle, { color: p.text }],
|
|
3177
|
+
children: d || c.data.name
|
|
3178
|
+
}), /* @__PURE__ */ N(V, {
|
|
3179
|
+
onPress: () => i(!1),
|
|
3180
|
+
children: /* @__PURE__ */ N(B, {
|
|
3181
|
+
style: [$.closeButton, { color: p.textMuted }],
|
|
3148
3182
|
children: "✕"
|
|
3149
3183
|
})
|
|
3150
3184
|
})]
|
|
3151
3185
|
}),
|
|
3152
|
-
/* @__PURE__ */
|
|
3153
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3154
|
-
children: /* @__PURE__ */
|
|
3155
|
-
style: [$.rangeIndicatorText, { color:
|
|
3156
|
-
children: m(
|
|
3186
|
+
/* @__PURE__ */ N(H, {
|
|
3187
|
+
style: [$.rangeIndicator, { backgroundColor: p.primaryLight }],
|
|
3188
|
+
children: /* @__PURE__ */ N(B, {
|
|
3189
|
+
style: [$.rangeIndicatorText, { color: p.primary }],
|
|
3190
|
+
children: m(a ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3157
3191
|
})
|
|
3158
3192
|
}),
|
|
3159
|
-
/* @__PURE__ */
|
|
3193
|
+
/* @__PURE__ */ P(H, {
|
|
3160
3194
|
style: $.pickerContainer,
|
|
3161
3195
|
children: [
|
|
3162
|
-
/* @__PURE__ */
|
|
3196
|
+
/* @__PURE__ */ P(H, {
|
|
3163
3197
|
style: $.pickerColumn,
|
|
3164
|
-
children: [/* @__PURE__ */
|
|
3165
|
-
style: [$.pickerLabel, { color:
|
|
3198
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3199
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3166
3200
|
children: "Hour"
|
|
3167
|
-
}), /* @__PURE__ */
|
|
3201
|
+
}), /* @__PURE__ */ N(ie, {
|
|
3168
3202
|
style: $.picker,
|
|
3169
3203
|
contentContainerStyle: $.pickerContent,
|
|
3170
3204
|
showsVerticalScrollIndicator: !1,
|
|
3171
|
-
children:
|
|
3172
|
-
style: [$.pickerItem, k === e && { backgroundColor:
|
|
3173
|
-
onPress: () =>
|
|
3205
|
+
children: te.map((e) => /* @__PURE__ */ N(V, {
|
|
3206
|
+
style: [$.pickerItem, k === e && { backgroundColor: p.primary }],
|
|
3207
|
+
onPress: () => A(e),
|
|
3174
3208
|
activeOpacity: .7,
|
|
3175
|
-
children: /* @__PURE__ */
|
|
3209
|
+
children: /* @__PURE__ */ N(B, {
|
|
3176
3210
|
style: [
|
|
3177
3211
|
$.pickerItemText,
|
|
3178
|
-
{ color:
|
|
3212
|
+
{ color: p.text },
|
|
3179
3213
|
k === e && {
|
|
3180
|
-
color:
|
|
3214
|
+
color: p.background,
|
|
3181
3215
|
fontWeight: "600"
|
|
3182
3216
|
}
|
|
3183
3217
|
],
|
|
@@ -3186,29 +3220,29 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3186
3220
|
}, e))
|
|
3187
3221
|
})]
|
|
3188
3222
|
}),
|
|
3189
|
-
/* @__PURE__ */
|
|
3190
|
-
style: [$.pickerSeparator, { color:
|
|
3223
|
+
/* @__PURE__ */ N(B, {
|
|
3224
|
+
style: [$.pickerSeparator, { color: p.text }],
|
|
3191
3225
|
children: ":"
|
|
3192
3226
|
}),
|
|
3193
|
-
/* @__PURE__ */
|
|
3227
|
+
/* @__PURE__ */ P(H, {
|
|
3194
3228
|
style: $.pickerColumn,
|
|
3195
|
-
children: [/* @__PURE__ */
|
|
3196
|
-
style: [$.pickerLabel, { color:
|
|
3229
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3230
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3197
3231
|
children: "Minute"
|
|
3198
|
-
}), /* @__PURE__ */
|
|
3232
|
+
}), /* @__PURE__ */ N(ie, {
|
|
3199
3233
|
style: $.picker,
|
|
3200
3234
|
contentContainerStyle: $.pickerContent,
|
|
3201
3235
|
showsVerticalScrollIndicator: !1,
|
|
3202
|
-
children: I.map((e) => /* @__PURE__ */
|
|
3203
|
-
style: [$.pickerItem,
|
|
3204
|
-
onPress: () =>
|
|
3236
|
+
children: I.map((e) => /* @__PURE__ */ N(V, {
|
|
3237
|
+
style: [$.pickerItem, M === e && { backgroundColor: p.primary }],
|
|
3238
|
+
onPress: () => F(e),
|
|
3205
3239
|
activeOpacity: .7,
|
|
3206
|
-
children: /* @__PURE__ */
|
|
3240
|
+
children: /* @__PURE__ */ N(B, {
|
|
3207
3241
|
style: [
|
|
3208
3242
|
$.pickerItemText,
|
|
3209
|
-
{ color:
|
|
3210
|
-
|
|
3211
|
-
color:
|
|
3243
|
+
{ color: p.text },
|
|
3244
|
+
M === e && {
|
|
3245
|
+
color: p.background,
|
|
3212
3246
|
fontWeight: "600"
|
|
3213
3247
|
}
|
|
3214
3248
|
],
|
|
@@ -3219,30 +3253,30 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3219
3253
|
})
|
|
3220
3254
|
]
|
|
3221
3255
|
}),
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3256
|
+
/* @__PURE__ */ N(V, {
|
|
3257
|
+
style: [$.confirmButton, { backgroundColor: p.primary }],
|
|
3224
3258
|
onPress: L,
|
|
3225
3259
|
activeOpacity: .7,
|
|
3226
|
-
children: /* @__PURE__ */
|
|
3227
|
-
style: [$.confirmButtonText, { color:
|
|
3228
|
-
children:
|
|
3260
|
+
children: /* @__PURE__ */ N(B, {
|
|
3261
|
+
style: [$.confirmButtonText, { color: p.background }],
|
|
3262
|
+
children: a ? "Next" : "Confirm"
|
|
3229
3263
|
})
|
|
3230
3264
|
})
|
|
3231
3265
|
]
|
|
3232
3266
|
})
|
|
3233
3267
|
})
|
|
3234
3268
|
}),
|
|
3235
|
-
|
|
3236
|
-
style: [$.error, { color:
|
|
3237
|
-
children:
|
|
3269
|
+
u && /* @__PURE__ */ N(B, {
|
|
3270
|
+
style: [$.error, { color: p.error }],
|
|
3271
|
+
children: u
|
|
3238
3272
|
}),
|
|
3239
|
-
|
|
3240
|
-
style: [$.helperText, { color:
|
|
3241
|
-
children:
|
|
3273
|
+
f && !u && /* @__PURE__ */ N(B, {
|
|
3274
|
+
style: [$.helperText, { color: p.textMuted }],
|
|
3275
|
+
children: f
|
|
3242
3276
|
})
|
|
3243
3277
|
]
|
|
3244
3278
|
});
|
|
3245
|
-
}, $ =
|
|
3279
|
+
}, $ = R.create({
|
|
3246
3280
|
closeButton: {
|
|
3247
3281
|
fontSize: 24,
|
|
3248
3282
|
fontWeight: "300"
|
|
@@ -3343,75 +3377,75 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3343
3377
|
flex: 1,
|
|
3344
3378
|
fontSize: 14
|
|
3345
3379
|
}
|
|
3346
|
-
}),
|
|
3380
|
+
}), We = (e, t) => /* @__PURE__ */ P(B, { children: [
|
|
3347
3381
|
"TODO: Implement ",
|
|
3348
3382
|
t.node.data.type,
|
|
3349
3383
|
" input for React Native"
|
|
3350
|
-
] }),
|
|
3351
|
-
address:
|
|
3352
|
-
autocomplete:
|
|
3353
|
-
checkbox:
|
|
3354
|
-
date:
|
|
3355
|
-
daterange:
|
|
3356
|
-
file:
|
|
3357
|
-
hidden:
|
|
3358
|
-
http:
|
|
3359
|
-
number:
|
|
3360
|
-
password:
|
|
3361
|
-
radio:
|
|
3362
|
-
select:
|
|
3363
|
-
submit:
|
|
3364
|
-
switch:
|
|
3365
|
-
text:
|
|
3366
|
-
textarea:
|
|
3367
|
-
time:
|
|
3368
|
-
timerange:
|
|
3369
|
-
},
|
|
3370
|
-
let { colors:
|
|
3371
|
-
return /* @__PURE__ */
|
|
3372
|
-
|
|
3373
|
-
style: [
|
|
3374
|
-
children: e
|
|
3375
|
-
}) : null,
|
|
3376
|
-
/* @__PURE__ */ j(H, {
|
|
3377
|
-
style: We.content,
|
|
3384
|
+
] }), Ge = {
|
|
3385
|
+
address: ue,
|
|
3386
|
+
autocomplete: pe,
|
|
3387
|
+
checkbox: me,
|
|
3388
|
+
date: he,
|
|
3389
|
+
daterange: ge,
|
|
3390
|
+
file: _e,
|
|
3391
|
+
hidden: ve,
|
|
3392
|
+
http: ke,
|
|
3393
|
+
number: Ae,
|
|
3394
|
+
password: Me,
|
|
3395
|
+
radio: Pe,
|
|
3396
|
+
select: Fe,
|
|
3397
|
+
submit: We,
|
|
3398
|
+
switch: Ie,
|
|
3399
|
+
text: Be,
|
|
3400
|
+
textarea: Re,
|
|
3401
|
+
time: He,
|
|
3402
|
+
timerange: Ue
|
|
3403
|
+
}, Ke = ({ label: t, children: n, isFirstStep: r, isLastStep: i, canContinue: a, isSubmitting: o, onBack: s, onContinue: c }) => {
|
|
3404
|
+
let { colors: l } = v(), u = e(), d = !a || o;
|
|
3405
|
+
return /* @__PURE__ */ P(H, { children: [
|
|
3406
|
+
t ? /* @__PURE__ */ N(B, {
|
|
3407
|
+
style: [qe.label, { color: l.text }],
|
|
3378
3408
|
children: t
|
|
3409
|
+
}) : null,
|
|
3410
|
+
/* @__PURE__ */ N(H, {
|
|
3411
|
+
style: qe.content,
|
|
3412
|
+
children: n
|
|
3379
3413
|
}),
|
|
3380
|
-
/* @__PURE__ */
|
|
3381
|
-
style:
|
|
3382
|
-
children: [
|
|
3414
|
+
/* @__PURE__ */ P(H, {
|
|
3415
|
+
style: qe.actions,
|
|
3416
|
+
children: [r ? /* @__PURE__ */ N(H, {}) : /* @__PURE__ */ N(V, {
|
|
3383
3417
|
style: [
|
|
3384
|
-
|
|
3385
|
-
{ borderColor:
|
|
3386
|
-
|
|
3418
|
+
qe.backButton,
|
|
3419
|
+
{ borderColor: l.border },
|
|
3420
|
+
o && qe.disabled
|
|
3387
3421
|
],
|
|
3388
|
-
onPress:
|
|
3389
|
-
disabled:
|
|
3422
|
+
onPress: s,
|
|
3423
|
+
disabled: o,
|
|
3390
3424
|
activeOpacity: .7,
|
|
3391
|
-
children: /* @__PURE__ */
|
|
3392
|
-
style: [
|
|
3393
|
-
children:
|
|
3425
|
+
children: /* @__PURE__ */ N(B, {
|
|
3426
|
+
style: [qe.backButtonText, { color: l.text }],
|
|
3427
|
+
children: u("renderer.step.back")
|
|
3394
3428
|
})
|
|
3395
|
-
}), /* @__PURE__ */
|
|
3429
|
+
}), /* @__PURE__ */ N(V, {
|
|
3396
3430
|
style: [
|
|
3397
|
-
|
|
3398
|
-
{ backgroundColor:
|
|
3399
|
-
|
|
3400
|
-
backgroundColor:
|
|
3431
|
+
qe.continueButton,
|
|
3432
|
+
{ backgroundColor: l.primary },
|
|
3433
|
+
d && {
|
|
3434
|
+
backgroundColor: l.primaryDisabled,
|
|
3401
3435
|
opacity: .6
|
|
3402
3436
|
}
|
|
3403
3437
|
],
|
|
3404
|
-
onPress:
|
|
3405
|
-
disabled:
|
|
3438
|
+
onPress: c,
|
|
3439
|
+
disabled: d,
|
|
3406
3440
|
activeOpacity: .7,
|
|
3407
|
-
children:
|
|
3408
|
-
style: [
|
|
3409
|
-
children:
|
|
3441
|
+
children: o ? /* @__PURE__ */ N(F, { color: l.primaryForeground }) : /* @__PURE__ */ N(B, {
|
|
3442
|
+
style: [qe.continueButtonText, { color: l.primaryForeground }],
|
|
3443
|
+
children: u(i ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")
|
|
3410
3444
|
})
|
|
3411
3445
|
})]
|
|
3412
3446
|
})
|
|
3413
3447
|
] });
|
|
3414
|
-
},
|
|
3448
|
+
}, qe = R.create({
|
|
3415
3449
|
actions: {
|
|
3416
3450
|
alignItems: "center",
|
|
3417
3451
|
flexDirection: "row",
|
|
@@ -3446,11 +3480,11 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3446
3480
|
fontWeight: "600",
|
|
3447
3481
|
marginBottom: 12
|
|
3448
3482
|
}
|
|
3449
|
-
}),
|
|
3450
|
-
let { colors: i } =
|
|
3451
|
-
return /* @__PURE__ */
|
|
3483
|
+
}), Je = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3484
|
+
let { colors: i } = v();
|
|
3485
|
+
return /* @__PURE__ */ N(V, {
|
|
3452
3486
|
style: [
|
|
3453
|
-
|
|
3487
|
+
Ye.button,
|
|
3454
3488
|
{ backgroundColor: i.primary },
|
|
3455
3489
|
(t || n) && {
|
|
3456
3490
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3460,12 +3494,12 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3460
3494
|
disabled: t || n,
|
|
3461
3495
|
onPress: r,
|
|
3462
3496
|
activeOpacity: .7,
|
|
3463
|
-
children: n ? /* @__PURE__ */
|
|
3464
|
-
style: [
|
|
3497
|
+
children: n ? /* @__PURE__ */ N(F, { color: i.primaryForeground }) : /* @__PURE__ */ N(B, {
|
|
3498
|
+
style: [Ye.buttonText, { color: i.primaryForeground }],
|
|
3465
3499
|
children: e
|
|
3466
3500
|
})
|
|
3467
3501
|
});
|
|
3468
|
-
},
|
|
3502
|
+
}, Ye = R.create({
|
|
3469
3503
|
button: {
|
|
3470
3504
|
alignItems: "center",
|
|
3471
3505
|
borderRadius: 6,
|
|
@@ -3478,16 +3512,16 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3478
3512
|
fontSize: 16,
|
|
3479
3513
|
fontWeight: "600"
|
|
3480
3514
|
}
|
|
3481
|
-
}),
|
|
3482
|
-
let
|
|
3483
|
-
return /* @__PURE__ */
|
|
3484
|
-
style: [
|
|
3485
|
-
children:
|
|
3515
|
+
}), Xe = ({ children: e }) => e, Ze = ({ node: t }) => {
|
|
3516
|
+
let n = e(), { colors: r } = v(), i = n(t.data?.label);
|
|
3517
|
+
return /* @__PURE__ */ N(B, {
|
|
3518
|
+
style: [$e.title, { color: r.text }],
|
|
3519
|
+
children: i
|
|
3486
3520
|
});
|
|
3487
|
-
},
|
|
3488
|
-
let { colors: e } =
|
|
3489
|
-
return /* @__PURE__ */
|
|
3490
|
-
},
|
|
3521
|
+
}, Qe = () => {
|
|
3522
|
+
let { colors: e } = v();
|
|
3523
|
+
return /* @__PURE__ */ N(H, { style: [$e.divider, { backgroundColor: e.separator }] });
|
|
3524
|
+
}, $e = R.create({
|
|
3491
3525
|
divider: {
|
|
3492
3526
|
height: 1,
|
|
3493
3527
|
marginBottom: 16,
|
|
@@ -3498,63 +3532,63 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3498
3532
|
fontWeight: "700",
|
|
3499
3533
|
marginBottom: 16
|
|
3500
3534
|
}
|
|
3501
|
-
}),
|
|
3502
|
-
divider:
|
|
3503
|
-
title:
|
|
3504
|
-
},
|
|
3535
|
+
}), et = {
|
|
3536
|
+
divider: Qe,
|
|
3537
|
+
title: Ze
|
|
3538
|
+
}, tt = ({ node: e, children: t }) => {
|
|
3505
3539
|
let { image: n } = e.data;
|
|
3506
|
-
return /* @__PURE__ */
|
|
3540
|
+
return /* @__PURE__ */ P(H, { children: [n && /* @__PURE__ */ N(L, {
|
|
3507
3541
|
source: { uri: n },
|
|
3508
|
-
style:
|
|
3542
|
+
style: nt.image,
|
|
3509
3543
|
resizeMode: "cover"
|
|
3510
3544
|
}), t] });
|
|
3511
|
-
},
|
|
3545
|
+
}, nt = R.create({ image: {
|
|
3512
3546
|
borderRadius: 6,
|
|
3513
3547
|
height: 160,
|
|
3514
3548
|
marginBottom: 8,
|
|
3515
3549
|
width: "100%"
|
|
3516
|
-
} }),
|
|
3517
|
-
let { colors: t } =
|
|
3518
|
-
return
|
|
3519
|
-
let e =
|
|
3550
|
+
} }), rt = ({ style: e }) => {
|
|
3551
|
+
let { colors: t } = v(), n = A(new I.Value(.5)).current;
|
|
3552
|
+
return O(() => {
|
|
3553
|
+
let e = I.loop(I.sequence([I.timing(n, {
|
|
3520
3554
|
duration: 600,
|
|
3521
3555
|
toValue: 1,
|
|
3522
3556
|
useNativeDriver: !0
|
|
3523
|
-
}),
|
|
3557
|
+
}), I.timing(n, {
|
|
3524
3558
|
duration: 600,
|
|
3525
3559
|
toValue: .5,
|
|
3526
3560
|
useNativeDriver: !0
|
|
3527
3561
|
})]));
|
|
3528
3562
|
return e.start(), () => e.stop();
|
|
3529
|
-
}, [n]), /* @__PURE__ */
|
|
3530
|
-
|
|
3563
|
+
}, [n]), /* @__PURE__ */ N(I.View, { style: [
|
|
3564
|
+
at.bar,
|
|
3531
3565
|
{
|
|
3532
3566
|
backgroundColor: t.muted,
|
|
3533
3567
|
opacity: n
|
|
3534
3568
|
},
|
|
3535
3569
|
e
|
|
3536
3570
|
] });
|
|
3537
|
-
},
|
|
3571
|
+
}, it = () => /* @__PURE__ */ P(H, {
|
|
3538
3572
|
accessibilityState: { busy: !0 },
|
|
3539
3573
|
children: [
|
|
3540
|
-
/* @__PURE__ */
|
|
3541
|
-
/* @__PURE__ */
|
|
3542
|
-
style:
|
|
3574
|
+
/* @__PURE__ */ N(rt, { style: at.title }),
|
|
3575
|
+
/* @__PURE__ */ N(H, {
|
|
3576
|
+
style: at.fields,
|
|
3543
3577
|
children: [
|
|
3544
3578
|
0,
|
|
3545
3579
|
1,
|
|
3546
3580
|
2
|
|
3547
|
-
].map((e) => /* @__PURE__ */
|
|
3548
|
-
style:
|
|
3549
|
-
children: [/* @__PURE__ */
|
|
3581
|
+
].map((e) => /* @__PURE__ */ P(H, {
|
|
3582
|
+
style: at.field,
|
|
3583
|
+
children: [/* @__PURE__ */ N(rt, { style: at.fieldLabel }), /* @__PURE__ */ N(rt, { style: at.fieldInput })]
|
|
3550
3584
|
}, e))
|
|
3551
3585
|
}),
|
|
3552
|
-
/* @__PURE__ */
|
|
3553
|
-
style:
|
|
3554
|
-
children: /* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ N(H, {
|
|
3587
|
+
style: at.actions,
|
|
3588
|
+
children: /* @__PURE__ */ N(rt, { style: at.button })
|
|
3555
3589
|
})
|
|
3556
3590
|
]
|
|
3557
|
-
}),
|
|
3591
|
+
}), at = R.create({
|
|
3558
3592
|
actions: {
|
|
3559
3593
|
alignItems: "flex-end",
|
|
3560
3594
|
marginTop: 24
|
|
@@ -3579,104 +3613,104 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3579
3613
|
marginBottom: 24,
|
|
3580
3614
|
width: "33%"
|
|
3581
3615
|
}
|
|
3582
|
-
}),
|
|
3583
|
-
let { colors:
|
|
3616
|
+
}), ot = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: r, googleApiKey: i, headers: o, initialValues: s, isLoading: c = !1, language: l, onChange: u, onSubmit: d, style: f, theme: p, validate: h, validationMode: g }) => {
|
|
3617
|
+
let { colors: _ } = v(), { canContinueStep: y, canSubmit: b, clearSubmitMessage: S, config: C, currentStep: w, currentStepGroupNode: T, currentStepIndex: E, formErrors: D, formValues: O, goToNextStep: A, goToPreviousStep: j, handleSubmit: M, inputNodes: F, isFirstStep: te, isLastStep: I, isSubmitting: ne, missingRequiredFields: L, setFieldValue: re, steps: R, submitMessage: z, t: ae } = m({
|
|
3584
3618
|
baseUrl: e,
|
|
3585
|
-
components:
|
|
3586
|
-
flow:
|
|
3587
|
-
googleApiKey:
|
|
3619
|
+
components: t,
|
|
3620
|
+
flow: r,
|
|
3621
|
+
googleApiKey: i,
|
|
3588
3622
|
headers: o,
|
|
3589
3623
|
initialValues: s,
|
|
3590
3624
|
language: l,
|
|
3591
3625
|
onChange: u,
|
|
3592
3626
|
onSubmit: d,
|
|
3593
|
-
theme:
|
|
3627
|
+
theme: p,
|
|
3594
3628
|
validate: h,
|
|
3595
|
-
validationMode:
|
|
3596
|
-
}), { FormWrapper:
|
|
3629
|
+
validationMode: g
|
|
3630
|
+
}), { FormWrapper: V, SubmitButtonWrapper: se, renderNode: ce } = x({
|
|
3597
3631
|
config: C,
|
|
3598
|
-
DefaultFormWrapper:
|
|
3599
|
-
DefaultInputWrapper:
|
|
3600
|
-
DefaultSubmitButton:
|
|
3601
|
-
DefaultSubmitButtonWrapper:
|
|
3602
|
-
defaultInputRenderers:
|
|
3603
|
-
defaultUI:
|
|
3632
|
+
DefaultFormWrapper: oe,
|
|
3633
|
+
DefaultInputWrapper: tt,
|
|
3634
|
+
DefaultSubmitButton: Je,
|
|
3635
|
+
DefaultSubmitButtonWrapper: Xe,
|
|
3636
|
+
defaultInputRenderers: Ge,
|
|
3637
|
+
defaultUI: et,
|
|
3604
3638
|
formErrors: D,
|
|
3605
|
-
formValues:
|
|
3606
|
-
inputNodes:
|
|
3607
|
-
missingRequiredFields:
|
|
3608
|
-
setFieldValue:
|
|
3609
|
-
}), le = C.components.step ??
|
|
3639
|
+
formValues: O,
|
|
3640
|
+
inputNodes: F,
|
|
3641
|
+
missingRequiredFields: L,
|
|
3642
|
+
setFieldValue: re
|
|
3643
|
+
}), le = C.components.step ?? Ke, ue = C.components.loadingSkeleton ?? it, U = k(() => ae(T?.data?.label), [ae, T]), de = ee(() => {
|
|
3610
3644
|
if (I) {
|
|
3611
|
-
|
|
3645
|
+
M();
|
|
3612
3646
|
return;
|
|
3613
3647
|
}
|
|
3614
3648
|
A();
|
|
3615
3649
|
}, [
|
|
3616
3650
|
I,
|
|
3617
|
-
|
|
3651
|
+
M,
|
|
3618
3652
|
A
|
|
3619
3653
|
]);
|
|
3620
|
-
return /* @__PURE__ */
|
|
3654
|
+
return /* @__PURE__ */ N(ie, {
|
|
3621
3655
|
nestedScrollEnabled: !0,
|
|
3622
3656
|
style: [
|
|
3623
|
-
|
|
3624
|
-
{ backgroundColor:
|
|
3625
|
-
|
|
3657
|
+
ct.container,
|
|
3658
|
+
{ backgroundColor: _.background },
|
|
3659
|
+
f
|
|
3626
3660
|
],
|
|
3627
|
-
contentContainerStyle:
|
|
3628
|
-
children: c ? /* @__PURE__ */
|
|
3661
|
+
contentContainerStyle: n,
|
|
3662
|
+
children: c ? /* @__PURE__ */ N(ue, {}) : /* @__PURE__ */ P(a, {
|
|
3629
3663
|
value: {
|
|
3630
3664
|
baseUrl: C.baseUrl,
|
|
3631
|
-
flow:
|
|
3665
|
+
flow: r,
|
|
3632
3666
|
formErrors: D,
|
|
3633
|
-
formValues:
|
|
3667
|
+
formValues: O,
|
|
3634
3668
|
googleApiKey: C.googleApiKey,
|
|
3635
3669
|
headers: C.headers,
|
|
3636
|
-
inputNodes:
|
|
3670
|
+
inputNodes: F,
|
|
3637
3671
|
language: C.language,
|
|
3638
|
-
setFieldValue:
|
|
3672
|
+
setFieldValue: re
|
|
3639
3673
|
},
|
|
3640
|
-
children: [/* @__PURE__ */
|
|
3641
|
-
onSubmit:
|
|
3642
|
-
children: [w && /* @__PURE__ */
|
|
3643
|
-
missingFields: I ?
|
|
3644
|
-
children: /* @__PURE__ */
|
|
3674
|
+
children: [/* @__PURE__ */ P(V, {
|
|
3675
|
+
onSubmit: M,
|
|
3676
|
+
children: [w && /* @__PURE__ */ N(se, {
|
|
3677
|
+
missingFields: I ? L : void 0,
|
|
3678
|
+
children: /* @__PURE__ */ N(le, {
|
|
3645
3679
|
step: w,
|
|
3646
3680
|
groupNode: T,
|
|
3647
3681
|
stepIndex: E,
|
|
3648
3682
|
totalSteps: R.length,
|
|
3649
|
-
isFirstStep:
|
|
3683
|
+
isFirstStep: te,
|
|
3650
3684
|
isLastStep: I,
|
|
3651
|
-
canContinue:
|
|
3685
|
+
canContinue: y && (!I || b),
|
|
3652
3686
|
isSubmitting: ne,
|
|
3653
|
-
onBack:
|
|
3654
|
-
onContinue:
|
|
3655
|
-
label:
|
|
3687
|
+
onBack: j,
|
|
3688
|
+
onContinue: de,
|
|
3689
|
+
label: U,
|
|
3656
3690
|
children: w.nodes.map((e) => ce(e))
|
|
3657
3691
|
})
|
|
3658
|
-
}), /* @__PURE__ */
|
|
3659
|
-
style: [
|
|
3692
|
+
}), /* @__PURE__ */ N(B, {
|
|
3693
|
+
style: [ct.poweredBy, { color: _.textMuted }],
|
|
3660
3694
|
children: "Powered by Treege"
|
|
3661
3695
|
})]
|
|
3662
|
-
}),
|
|
3663
|
-
style: [
|
|
3664
|
-
children: [/* @__PURE__ */
|
|
3665
|
-
style: [
|
|
3666
|
-
children:
|
|
3667
|
-
}), /* @__PURE__ */
|
|
3668
|
-
style: [
|
|
3696
|
+
}), z && /* @__PURE__ */ P(H, {
|
|
3697
|
+
style: [ct.message, { backgroundColor: z.type === "success" ? _.successBg : _.errorBg }],
|
|
3698
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3699
|
+
style: [ct.messageText, { color: z.type === "success" ? _.success : _.error }],
|
|
3700
|
+
children: z.message
|
|
3701
|
+
}), /* @__PURE__ */ N(B, {
|
|
3702
|
+
style: [ct.messageClose, { color: z.type === "success" ? _.success : _.error }],
|
|
3669
3703
|
onPress: S,
|
|
3670
|
-
children:
|
|
3704
|
+
children: ae("common.close")
|
|
3671
3705
|
})]
|
|
3672
3706
|
})]
|
|
3673
3707
|
})
|
|
3674
3708
|
});
|
|
3675
|
-
},
|
|
3709
|
+
}, st = (e) => /* @__PURE__ */ N(C, {
|
|
3676
3710
|
theme: e.theme,
|
|
3677
3711
|
storageKey: "treege-renderer-theme",
|
|
3678
|
-
children: /* @__PURE__ */
|
|
3679
|
-
}),
|
|
3712
|
+
children: /* @__PURE__ */ N(ot, { ...e })
|
|
3713
|
+
}), ct = R.create({
|
|
3680
3714
|
container: { flex: 1 },
|
|
3681
3715
|
message: {
|
|
3682
3716
|
borderRadius: 6,
|
|
@@ -3699,4 +3733,4 @@ var ae = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
|
3699
3733
|
}
|
|
3700
3734
|
});
|
|
3701
3735
|
//#endregion
|
|
3702
|
-
export {
|
|
3736
|
+
export { ue as DefaultAddressInput, pe as DefaultAutocompleteInput, me as DefaultCheckboxInput, he as DefaultDateInput, ge as DefaultDateRangeInput, Qe as DefaultDividerUI, _e as DefaultFileInput, ve as DefaultHiddenInput, ke as DefaultHttpInput, Ae as DefaultNumberInput, Me as DefaultPasswordInput, Pe as DefaultRadioInput, Fe as DefaultSelectInput, We as DefaultSubmitInput, Ie as DefaultSwitchInput, Be as DefaultTextInput, Re as DefaultTextareaInput, He as DefaultTimeInput, Ue as DefaultTimeRangeInput, Ze as DefaultTitleUI, st as TreegeRenderer, w as TreegeRendererProvider, d as applyReferenceTransformation, b as calculateReferenceFieldUpdates, _ as checkFormFieldHasValue, p as convertFormValuesToNamedFormat, Ge as defaultInputRenderers, et as defaultUI, l as evaluateCondition, g as evaluateConditions, D as fileToSerializable, c as filesToSerializable, s as findStartNode, y as getFlowRenderState, t as getTranslatedText, f as isFieldEmpty, S as isStartNode, Ce as sanitize, Te as sanitizeHttpResponse, E as serializableToFile, m as useTreegeRenderer, u as useTreegeRendererConfig };
|