treege 3.0.0-beta.44 → 3.0.0-beta.45
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 +16 -9
- package/dist/DefaultInputs-DYKtphqY.js +1701 -0
- package/dist/ThemeContext-O482h1XZ.js +1397 -0
- package/dist/editor/context/OpenApiContext.d.ts +79 -0
- package/dist/editor/context/TreegeEditorContext.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/dialogs/AuthorizeDialog.d.ts +20 -0
- package/dist/editor/features/TreegeEditor/dialogs/HeadersDialog.d.ts +19 -0
- package/dist/editor/features/TreegeEditor/dialogs/OpenApiDialog.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/forms/OptionsSourceForm.d.ts +7 -0
- package/dist/editor/features/TreegeEditor/inputs/ApiUrlCombobox.d.ts +30 -0
- package/dist/editor/features/TreegeEditor/nodes/TreegeNode.d.ts +0 -1
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImage.d.ts +5 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeImageButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeOptions.d.ts +12 -0
- package/dist/editor/features/TreegeEditor/nodes/components/NodeRequiredButton.d.ts +6 -0
- package/dist/editor/features/TreegeEditor/panel/ActionsPanel.d.ts +5 -2
- package/dist/editor/types/editor.d.ts +39 -1
- package/dist/editor/types/openapi.d.ts +81 -0
- package/dist/editor/utils/openapi.d.ts +35 -0
- package/dist/editor-DBCMmZtt.js +5147 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/context/TreegeConfigContext.d.ts +3 -27
- package/dist/renderer/context/TreegeRendererContext.d.ts +99 -2
- package/dist/renderer/features/TreegeRenderer/native/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/features/TreegeRenderer/useTreegeRenderer.d.ts +3 -2
- package/dist/renderer/features/TreegeRenderer/web/TreegeRenderer.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultFormWrapper.d.ts +1 -1
- package/dist/renderer/features/TreegeRenderer/web/components/DefaultInputWrapper.d.ts +9 -0
- package/dist/renderer/hooks/useInputOptions.d.ts +28 -0
- package/dist/renderer/hooks/useRenderNode.d.ts +7 -3
- package/dist/renderer/hooks/useSubmitHandler.d.ts +3 -2
- package/dist/renderer/types/renderer.d.ts +13 -25
- package/dist/renderer/utils/http.d.ts +29 -1
- package/dist/renderer/utils/submit.d.ts +3 -2
- package/dist/renderer-native.js +794 -782
- package/dist/renderer.js +3 -3
- package/dist/shared/components/ui/button.d.ts +1 -1
- package/dist/shared/components/ui/field.d.ts +24 -0
- package/dist/shared/components/ui/toggle-group.d.ts +7 -0
- package/dist/shared/components/ui/toggle.d.ts +9 -0
- package/dist/shared/locales/ar.json.d.ts +80 -0
- package/dist/shared/locales/de.json.d.ts +80 -0
- package/dist/shared/locales/en.json.d.ts +80 -0
- package/dist/shared/locales/es.json.d.ts +80 -0
- package/dist/shared/locales/fr.json.d.ts +80 -0
- package/dist/shared/locales/it.json.d.ts +80 -0
- package/dist/shared/locales/pt.json.d.ts +80 -0
- package/dist/shared/types/node.d.ts +44 -0
- package/package.json +3 -1
- package/dist/DefaultInputs-D6a1ESW-.js +0 -1562
- package/dist/ThemeContext-CUHjGVUf.js +0 -1602
- package/dist/editor/features/TreegeEditor/nodes/components/OptionsEditor.d.ts +0 -7
- package/dist/editor/features/TreegeEditor/nodes/components/RequiredBadge.d.ts +0 -6
- package/dist/editor-DjtjUgyb.js +0 -4041
package/dist/renderer-native.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { C as e, D as t,
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { ActivityIndicator as
|
|
1
|
+
import { C as e, D as t, E as n, M as r, N as i, O as a, R as o, S as s, T as c, a as l, b as u, c as d, d as f, h as p, i as m, k as h, l as g, n as _, o as v, p as y, r as b, s as x, t as S, v as C, w, x as T, y as ee } from "./ThemeContext-O482h1XZ.js";
|
|
2
|
+
import { useCallback as E, useEffect as D, useMemo as O, useRef as k, useState as A } from "react";
|
|
3
|
+
import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
4
|
+
import { ActivityIndicator as N, Alert as te, FlatList as ne, Image as P, Modal as F, ScrollView as I, StyleSheet as L, Switch as R, Text as z, TextInput as re, TouchableOpacity as B, View as V } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var
|
|
7
|
-
style:
|
|
6
|
+
var ie = ({ children: e }) => /* @__PURE__ */ j(V, {
|
|
7
|
+
style: ae.container,
|
|
8
8
|
children: e
|
|
9
|
-
}),
|
|
10
|
-
let n =
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
style:
|
|
13
|
-
children: [i && /* @__PURE__ */
|
|
14
|
-
style: [
|
|
9
|
+
}), ae = L.create({ container: { padding: 16 } }), oe = ({ children: e, node: t }) => {
|
|
10
|
+
let n = p(), { colors: r } = _(), i = n(t.data.label);
|
|
11
|
+
return /* @__PURE__ */ M(V, {
|
|
12
|
+
style: se.container,
|
|
13
|
+
children: [i && /* @__PURE__ */ j(z, {
|
|
14
|
+
style: [se.label, { color: r.text }],
|
|
15
15
|
children: i
|
|
16
|
-
}), /* @__PURE__ */
|
|
17
|
-
style:
|
|
16
|
+
}), /* @__PURE__ */ j(V, {
|
|
17
|
+
style: se.content,
|
|
18
18
|
children: e
|
|
19
19
|
})]
|
|
20
20
|
});
|
|
21
|
-
},
|
|
21
|
+
}, se = L.create({
|
|
22
22
|
container: { marginBottom: 16 },
|
|
23
23
|
content: { gap: 8 },
|
|
24
24
|
label: {
|
|
@@ -26,7 +26,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
26
26
|
fontWeight: "600",
|
|
27
27
|
marginBottom: 12
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
29
|
+
}), ce = async (e, t) => {
|
|
30
30
|
if (!e || e.trim().length < 3) return [];
|
|
31
31
|
try {
|
|
32
32
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -41,7 +41,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
41
41
|
} catch (e) {
|
|
42
42
|
return console.error("Nominatim fetch error:", e), [];
|
|
43
43
|
}
|
|
44
|
-
},
|
|
44
|
+
}, le = async (e, t) => {
|
|
45
45
|
if (!e || e.trim().length < 3) return [];
|
|
46
46
|
try {
|
|
47
47
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -54,20 +54,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
54
54
|
} catch (e) {
|
|
55
55
|
return console.error("Google Places fetch error:", e), [];
|
|
56
56
|
}
|
|
57
|
-
},
|
|
58
|
-
let [l, u] =
|
|
59
|
-
n(e.value), u(""),
|
|
60
|
-
}, [n]),
|
|
61
|
-
|
|
57
|
+
}, ue = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, id: s, name: c }) => {
|
|
58
|
+
let [l, u] = A(""), [d, f] = A([]), [m, h] = A(!1), [g, v] = A(!1), { language: y, googleApiKey: b } = ee(), x = p(), { colors: S } = _(), C = E((e) => {
|
|
59
|
+
n(e.value), u(""), h(!1), f([]);
|
|
60
|
+
}, [n]), w = () => {
|
|
61
|
+
h(!1);
|
|
62
62
|
};
|
|
63
|
-
return
|
|
63
|
+
return D(() => {
|
|
64
64
|
if (!l || l.trim().length < 3) {
|
|
65
65
|
f([]), v(!1);
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
v(!0);
|
|
69
69
|
let e = setTimeout(async () => {
|
|
70
|
-
f(
|
|
70
|
+
f(b ? await le(l, b) : await ce(l, y)), v(!1);
|
|
71
71
|
}, 300);
|
|
72
72
|
return () => {
|
|
73
73
|
clearTimeout(e), v(!1);
|
|
@@ -75,126 +75,126 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
75
75
|
}, [
|
|
76
76
|
l,
|
|
77
77
|
y,
|
|
78
|
-
|
|
79
|
-
]), /* @__PURE__ */
|
|
80
|
-
style:
|
|
78
|
+
b
|
|
79
|
+
]), /* @__PURE__ */ M(V, {
|
|
80
|
+
style: H.container,
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
style: [
|
|
84
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
85
|
-
style: { color:
|
|
82
|
+
/* @__PURE__ */ M(z, {
|
|
83
|
+
style: [H.label, { color: S.textSecondary }],
|
|
84
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
85
|
+
style: { color: S.error },
|
|
86
86
|
children: "*"
|
|
87
87
|
})]
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ M(B, {
|
|
90
90
|
style: [
|
|
91
|
-
|
|
91
|
+
H.trigger,
|
|
92
92
|
{
|
|
93
|
-
backgroundColor:
|
|
94
|
-
borderColor:
|
|
93
|
+
backgroundColor: S.input,
|
|
94
|
+
borderColor: S.border
|
|
95
95
|
},
|
|
96
|
-
r && { borderColor:
|
|
96
|
+
r && { borderColor: S.error }
|
|
97
97
|
],
|
|
98
|
-
onPress: () =>
|
|
98
|
+
onPress: () => h(!0),
|
|
99
99
|
activeOpacity: .7,
|
|
100
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ j(z, {
|
|
101
101
|
style: [
|
|
102
|
-
|
|
103
|
-
{ color:
|
|
104
|
-
!t && { color:
|
|
102
|
+
H.triggerText,
|
|
103
|
+
{ color: S.text },
|
|
104
|
+
!t && { color: S.textMuted }
|
|
105
105
|
],
|
|
106
106
|
numberOfLines: 1,
|
|
107
|
-
children: t || a ||
|
|
108
|
-
}), /* @__PURE__ */
|
|
109
|
-
style:
|
|
107
|
+
children: t || a || x("renderer.defaultAddressInput.enterAddress")
|
|
108
|
+
}), /* @__PURE__ */ j(z, {
|
|
109
|
+
style: H.icon,
|
|
110
110
|
children: "📍"
|
|
111
111
|
})]
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
visible:
|
|
113
|
+
/* @__PURE__ */ j(F, {
|
|
114
|
+
visible: m,
|
|
115
115
|
transparent: !0,
|
|
116
116
|
animationType: "fade",
|
|
117
|
-
onRequestClose:
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
-
style:
|
|
117
|
+
onRequestClose: w,
|
|
118
|
+
children: /* @__PURE__ */ j(B, {
|
|
119
|
+
style: H.modalOverlay,
|
|
120
120
|
activeOpacity: 1,
|
|
121
|
-
onPress:
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
-
style: [
|
|
121
|
+
onPress: w,
|
|
122
|
+
children: /* @__PURE__ */ M(B, {
|
|
123
|
+
style: [H.modalContent, { backgroundColor: S.card }],
|
|
124
124
|
activeOpacity: 1,
|
|
125
125
|
onPress: () => {},
|
|
126
126
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
style: [
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
-
style: [
|
|
127
|
+
/* @__PURE__ */ M(V, {
|
|
128
|
+
style: [H.modalHeader, { borderBottomColor: S.separator }],
|
|
129
|
+
children: [/* @__PURE__ */ j(z, {
|
|
130
|
+
style: [H.modalTitle, { color: S.text }],
|
|
131
131
|
children: i || e.data.name
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
-
onPress:
|
|
134
|
-
children: /* @__PURE__ */
|
|
135
|
-
style: [
|
|
132
|
+
}), /* @__PURE__ */ j(B, {
|
|
133
|
+
onPress: w,
|
|
134
|
+
children: /* @__PURE__ */ j(z, {
|
|
135
|
+
style: [H.closeButton, { color: S.textMuted }],
|
|
136
136
|
children: "✕"
|
|
137
137
|
})
|
|
138
138
|
})]
|
|
139
139
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
style:
|
|
142
|
-
children: [/* @__PURE__ */
|
|
143
|
-
style: [
|
|
144
|
-
backgroundColor:
|
|
145
|
-
borderColor:
|
|
146
|
-
color:
|
|
140
|
+
/* @__PURE__ */ M(V, {
|
|
141
|
+
style: H.searchContainer,
|
|
142
|
+
children: [/* @__PURE__ */ j(re, {
|
|
143
|
+
style: [H.searchInput, {
|
|
144
|
+
backgroundColor: S.muted,
|
|
145
|
+
borderColor: S.border,
|
|
146
|
+
color: S.text
|
|
147
147
|
}],
|
|
148
|
-
placeholder: a ||
|
|
149
|
-
placeholderTextColor:
|
|
148
|
+
placeholder: a || x("renderer.defaultAddressInput.enterAddress"),
|
|
149
|
+
placeholderTextColor: S.textMuted,
|
|
150
150
|
value: l,
|
|
151
151
|
onChangeText: u,
|
|
152
152
|
autoFocus: !0,
|
|
153
153
|
autoCapitalize: "none",
|
|
154
154
|
autoCorrect: !1
|
|
155
|
-
}),
|
|
155
|
+
}), g && /* @__PURE__ */ j(N, {
|
|
156
156
|
size: "small",
|
|
157
|
-
color:
|
|
158
|
-
style:
|
|
157
|
+
color: S.primary,
|
|
158
|
+
style: H.searchLoader
|
|
159
159
|
})]
|
|
160
160
|
}),
|
|
161
|
-
|
|
162
|
-
style:
|
|
163
|
-
children: [/* @__PURE__ */
|
|
161
|
+
g ? /* @__PURE__ */ M(V, {
|
|
162
|
+
style: H.loadingContainer,
|
|
163
|
+
children: [/* @__PURE__ */ j(N, {
|
|
164
164
|
size: "small",
|
|
165
|
-
color:
|
|
166
|
-
}), /* @__PURE__ */
|
|
167
|
-
style: [
|
|
168
|
-
children:
|
|
165
|
+
color: S.primary
|
|
166
|
+
}), /* @__PURE__ */ j(z, {
|
|
167
|
+
style: [H.loadingText, { color: S.textMuted }],
|
|
168
|
+
children: x("renderer.defaultAddressInput.searching")
|
|
169
169
|
})]
|
|
170
|
-
}) : /* @__PURE__ */
|
|
170
|
+
}) : /* @__PURE__ */ j(ne, {
|
|
171
171
|
data: d,
|
|
172
172
|
keyExtractor: (e, t) => t.toString(),
|
|
173
|
-
style:
|
|
174
|
-
contentContainerStyle:
|
|
173
|
+
style: H.suggestionsList,
|
|
174
|
+
contentContainerStyle: H.suggestionsListContent,
|
|
175
175
|
keyboardShouldPersistTaps: "handled",
|
|
176
|
-
ListEmptyComponent: l.length >= 3 ? /* @__PURE__ */
|
|
177
|
-
style:
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
-
style: [
|
|
180
|
-
children:
|
|
176
|
+
ListEmptyComponent: l.length >= 3 ? /* @__PURE__ */ j(V, {
|
|
177
|
+
style: H.emptyContainer,
|
|
178
|
+
children: /* @__PURE__ */ j(z, {
|
|
179
|
+
style: [H.emptyText, { color: S.textMuted }],
|
|
180
|
+
children: x("renderer.defaultAddressInput.noAddressesFound")
|
|
181
181
|
})
|
|
182
|
-
}) : /* @__PURE__ */
|
|
183
|
-
style:
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
style: [
|
|
186
|
-
children:
|
|
182
|
+
}) : /* @__PURE__ */ j(V, {
|
|
183
|
+
style: H.emptyContainer,
|
|
184
|
+
children: /* @__PURE__ */ j(z, {
|
|
185
|
+
style: [H.emptyText, { color: S.textMuted }],
|
|
186
|
+
children: x("renderer.defaultAddressInput.typeMinChars")
|
|
187
187
|
})
|
|
188
188
|
}),
|
|
189
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
190
|
-
style:
|
|
191
|
-
onPress: () =>
|
|
189
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ M(B, {
|
|
190
|
+
style: H.suggestionItem,
|
|
191
|
+
onPress: () => C(e),
|
|
192
192
|
activeOpacity: .7,
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
-
style:
|
|
193
|
+
children: [/* @__PURE__ */ j(z, {
|
|
194
|
+
style: H.suggestionIcon,
|
|
195
195
|
children: "📍"
|
|
196
|
-
}), /* @__PURE__ */
|
|
197
|
-
style: [
|
|
196
|
+
}), /* @__PURE__ */ j(z, {
|
|
197
|
+
style: [H.suggestionText, { color: S.text }],
|
|
198
198
|
numberOfLines: 2,
|
|
199
199
|
children: e.label
|
|
200
200
|
})]
|
|
@@ -204,17 +204,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
204
204
|
})
|
|
205
205
|
})
|
|
206
206
|
}),
|
|
207
|
-
r && /* @__PURE__ */
|
|
208
|
-
style: [
|
|
207
|
+
r && /* @__PURE__ */ j(z, {
|
|
208
|
+
style: [H.error, { color: S.error }],
|
|
209
209
|
children: r
|
|
210
210
|
}),
|
|
211
|
-
o && !r && /* @__PURE__ */
|
|
212
|
-
style: [
|
|
211
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
212
|
+
style: [H.helperText, { color: S.textMuted }],
|
|
213
213
|
children: o
|
|
214
214
|
})
|
|
215
215
|
]
|
|
216
216
|
});
|
|
217
|
-
},
|
|
217
|
+
}, H = L.create({
|
|
218
218
|
closeButton: {
|
|
219
219
|
fontSize: 24,
|
|
220
220
|
fontWeight: "300"
|
|
@@ -324,31 +324,31 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
324
324
|
flex: 1,
|
|
325
325
|
fontSize: 14
|
|
326
326
|
}
|
|
327
|
-
}),
|
|
328
|
-
let [s, c] =
|
|
329
|
-
if (!l.trim()) return
|
|
327
|
+
}), U = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
328
|
+
let [s, c] = A(!1), [l, u] = A(""), d = p(), { colors: f } = _(), m = e.data.options || [], h = m.find((e) => e.value === t), g = O(() => {
|
|
329
|
+
if (!l.trim()) return m;
|
|
330
330
|
let e = l.toLowerCase();
|
|
331
|
-
return
|
|
331
|
+
return m.filter((t) => d(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
332
332
|
}, [
|
|
333
|
-
|
|
333
|
+
m,
|
|
334
334
|
l,
|
|
335
335
|
d
|
|
336
|
-
]),
|
|
336
|
+
]), v = (e) => {
|
|
337
337
|
n(e === t ? "" : e), c(!1), u("");
|
|
338
|
-
},
|
|
338
|
+
}, y = () => {
|
|
339
339
|
c(!1), u("");
|
|
340
340
|
};
|
|
341
|
-
return /* @__PURE__ */
|
|
341
|
+
return /* @__PURE__ */ M(V, {
|
|
342
342
|
style: W.container,
|
|
343
343
|
children: [
|
|
344
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ M(z, {
|
|
345
345
|
style: [W.label, { color: f.textSecondary }],
|
|
346
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
346
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
347
347
|
style: { color: f.error },
|
|
348
348
|
children: "*"
|
|
349
349
|
})]
|
|
350
350
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ M(B, {
|
|
352
352
|
style: [
|
|
353
353
|
W.trigger,
|
|
354
354
|
{
|
|
@@ -359,7 +359,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
359
359
|
],
|
|
360
360
|
onPress: () => c(!0),
|
|
361
361
|
activeOpacity: .7,
|
|
362
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ j(z, {
|
|
363
363
|
style: [
|
|
364
364
|
W.triggerText,
|
|
365
365
|
{ color: f.text },
|
|
@@ -367,41 +367,41 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
367
367
|
],
|
|
368
368
|
numberOfLines: 1,
|
|
369
369
|
children: t && h ? d(h.label) : a || d("renderer.defaultAutocompleteInput.selectOption")
|
|
370
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ j(z, {
|
|
371
371
|
style: [W.arrow, { color: f.textMuted }],
|
|
372
372
|
children: "▼"
|
|
373
373
|
})]
|
|
374
374
|
}),
|
|
375
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ j(F, {
|
|
376
376
|
visible: s,
|
|
377
377
|
transparent: !0,
|
|
378
378
|
animationType: "fade",
|
|
379
|
-
onRequestClose:
|
|
380
|
-
children: /* @__PURE__ */
|
|
379
|
+
onRequestClose: y,
|
|
380
|
+
children: /* @__PURE__ */ j(B, {
|
|
381
381
|
style: W.modalOverlay,
|
|
382
382
|
activeOpacity: 1,
|
|
383
|
-
onPress:
|
|
384
|
-
children: /* @__PURE__ */
|
|
383
|
+
onPress: y,
|
|
384
|
+
children: /* @__PURE__ */ M(B, {
|
|
385
385
|
style: [W.modalContent, { backgroundColor: f.card }],
|
|
386
386
|
activeOpacity: 1,
|
|
387
387
|
onPress: () => {},
|
|
388
388
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ M(V, {
|
|
390
390
|
style: [W.modalHeader, { borderBottomColor: f.separator }],
|
|
391
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ j(z, {
|
|
392
392
|
style: [W.modalTitle, { color: f.text }],
|
|
393
393
|
children: i || e.data.name
|
|
394
|
-
}), /* @__PURE__ */
|
|
395
|
-
onPress:
|
|
396
|
-
children: /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ j(B, {
|
|
395
|
+
onPress: y,
|
|
396
|
+
children: /* @__PURE__ */ j(z, {
|
|
397
397
|
style: [W.closeButton, { color: f.textMuted }],
|
|
398
398
|
children: "✕"
|
|
399
399
|
})
|
|
400
400
|
})]
|
|
401
401
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ j(V, {
|
|
403
403
|
style: W.searchContainer,
|
|
404
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ j(re, {
|
|
405
405
|
style: [W.searchInput, {
|
|
406
406
|
backgroundColor: f.muted,
|
|
407
407
|
borderColor: f.border,
|
|
@@ -416,33 +416,33 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
416
416
|
autoCorrect: !1
|
|
417
417
|
})
|
|
418
418
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ j(ne, {
|
|
420
420
|
data: g,
|
|
421
421
|
keyExtractor: (e) => e.value,
|
|
422
422
|
style: W.optionsList,
|
|
423
423
|
contentContainerStyle: W.optionsListContent,
|
|
424
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
424
|
+
ListEmptyComponent: /* @__PURE__ */ j(V, {
|
|
425
425
|
style: W.emptyContainer,
|
|
426
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ j(z, {
|
|
427
427
|
style: [W.emptyText, { color: f.textMuted }],
|
|
428
428
|
children: d("renderer.defaultAutocompleteInput.noResults")
|
|
429
429
|
})
|
|
430
430
|
}),
|
|
431
431
|
renderItem: ({ item: e }) => {
|
|
432
432
|
let n = e.value === t;
|
|
433
|
-
return /* @__PURE__ */
|
|
433
|
+
return /* @__PURE__ */ M(B, {
|
|
434
434
|
style: [W.option, n && { backgroundColor: f.primaryLight }],
|
|
435
|
-
onPress: () =>
|
|
435
|
+
onPress: () => v(e.value),
|
|
436
436
|
disabled: e.disabled,
|
|
437
437
|
activeOpacity: .7,
|
|
438
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ j(z, {
|
|
439
439
|
style: [
|
|
440
440
|
W.optionText,
|
|
441
441
|
{ color: f.text },
|
|
442
442
|
e.disabled && { color: f.textMuted }
|
|
443
443
|
],
|
|
444
444
|
children: d(e.label)
|
|
445
|
-
}), n && /* @__PURE__ */
|
|
445
|
+
}), n && /* @__PURE__ */ j(z, {
|
|
446
446
|
style: [W.checkmark, { color: f.primary }],
|
|
447
447
|
children: "✓"
|
|
448
448
|
})]
|
|
@@ -453,11 +453,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
453
453
|
})
|
|
454
454
|
})
|
|
455
455
|
}),
|
|
456
|
-
r && /* @__PURE__ */
|
|
456
|
+
r && /* @__PURE__ */ j(z, {
|
|
457
457
|
style: [W.error, { color: f.error }],
|
|
458
458
|
children: r
|
|
459
459
|
}),
|
|
460
|
-
o && !r && /* @__PURE__ */
|
|
460
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
461
461
|
style: [W.helperText, { color: f.textMuted }],
|
|
462
462
|
children: o
|
|
463
463
|
})
|
|
@@ -554,23 +554,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
554
554
|
flex: 1,
|
|
555
555
|
fontSize: 14
|
|
556
556
|
}
|
|
557
|
-
}),
|
|
558
|
-
let o =
|
|
557
|
+
}), de = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
558
|
+
let o = p(), { colors: s } = _(), c = e.data.options || [], l = c.length > 0, u = Array.isArray(t) ? t : [], d = typeof t == "boolean" ? t : !1, f = (e) => {
|
|
559
559
|
n(l ? u.includes(e) ? u.filter((t) => t !== e) : [...u, e] : !d);
|
|
560
|
-
},
|
|
561
|
-
return /* @__PURE__ */
|
|
560
|
+
}, m = (e) => l ? u.includes(e) : d;
|
|
561
|
+
return /* @__PURE__ */ M(V, {
|
|
562
562
|
style: G.container,
|
|
563
563
|
children: [
|
|
564
|
-
/* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ M(z, {
|
|
565
565
|
style: [G.label, { color: s.textSecondary }],
|
|
566
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
566
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
567
567
|
style: { color: s.error },
|
|
568
568
|
children: "*"
|
|
569
569
|
})]
|
|
570
570
|
}),
|
|
571
571
|
c.length > 0 ? c.map((e) => {
|
|
572
572
|
let t = o(e.description);
|
|
573
|
-
return /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ M(B, {
|
|
574
574
|
style: G.option,
|
|
575
575
|
onPress: () => f(e.value),
|
|
576
576
|
disabled: e.disabled,
|
|
@@ -578,42 +578,42 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
578
578
|
accessible: !0,
|
|
579
579
|
accessibilityRole: "checkbox",
|
|
580
580
|
accessibilityState: {
|
|
581
|
-
checked:
|
|
581
|
+
checked: m(e.value),
|
|
582
582
|
disabled: e.disabled
|
|
583
583
|
},
|
|
584
584
|
accessibilityLabel: o(e.label) || e.value,
|
|
585
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ j(V, {
|
|
586
586
|
style: [
|
|
587
587
|
G.checkbox,
|
|
588
588
|
{
|
|
589
589
|
backgroundColor: s.input,
|
|
590
590
|
borderColor: s.border
|
|
591
591
|
},
|
|
592
|
-
|
|
592
|
+
m(e.value) && {
|
|
593
593
|
backgroundColor: s.primary,
|
|
594
594
|
borderColor: s.primary
|
|
595
595
|
}
|
|
596
596
|
],
|
|
597
|
-
children:
|
|
597
|
+
children: m(e.value) && /* @__PURE__ */ j(z, {
|
|
598
598
|
style: G.checkmark,
|
|
599
599
|
children: "✓"
|
|
600
600
|
})
|
|
601
|
-
}), /* @__PURE__ */
|
|
601
|
+
}), /* @__PURE__ */ M(V, {
|
|
602
602
|
style: G.optionTextContainer,
|
|
603
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ j(z, {
|
|
604
604
|
style: [
|
|
605
605
|
G.optionLabel,
|
|
606
606
|
{ color: s.textSecondary },
|
|
607
607
|
e.disabled && { color: s.textMuted }
|
|
608
608
|
],
|
|
609
609
|
children: o(e.label) || e.value
|
|
610
|
-
}), t && /* @__PURE__ */
|
|
610
|
+
}), t && /* @__PURE__ */ j(z, {
|
|
611
611
|
style: [G.optionDescription, { color: s.textMuted }],
|
|
612
612
|
children: t
|
|
613
613
|
})]
|
|
614
614
|
})]
|
|
615
615
|
}, e.value);
|
|
616
|
-
}) : /* @__PURE__ */
|
|
616
|
+
}) : /* @__PURE__ */ M(B, {
|
|
617
617
|
style: G.option,
|
|
618
618
|
onPress: () => f(""),
|
|
619
619
|
activeOpacity: .7,
|
|
@@ -621,7 +621,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
621
621
|
accessibilityRole: "checkbox",
|
|
622
622
|
accessibilityState: { checked: d },
|
|
623
623
|
accessibilityLabel: i || e.data.name,
|
|
624
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ j(V, {
|
|
625
625
|
style: [
|
|
626
626
|
G.checkbox,
|
|
627
627
|
{
|
|
@@ -633,20 +633,20 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
633
633
|
borderColor: s.primary
|
|
634
634
|
}
|
|
635
635
|
],
|
|
636
|
-
children: d && /* @__PURE__ */
|
|
636
|
+
children: d && /* @__PURE__ */ j(z, {
|
|
637
637
|
style: G.checkmark,
|
|
638
638
|
children: "✓"
|
|
639
639
|
})
|
|
640
|
-
}), /* @__PURE__ */
|
|
640
|
+
}), /* @__PURE__ */ j(z, {
|
|
641
641
|
style: [G.optionLabel, { color: s.textSecondary }],
|
|
642
642
|
children: i || e.data.name
|
|
643
643
|
})]
|
|
644
644
|
}),
|
|
645
|
-
r && /* @__PURE__ */
|
|
645
|
+
r && /* @__PURE__ */ j(z, {
|
|
646
646
|
style: [G.error, { color: s.error }],
|
|
647
647
|
children: r
|
|
648
648
|
}),
|
|
649
|
-
a && !r && /* @__PURE__ */
|
|
649
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
650
650
|
style: [G.helperText, { color: s.textMuted }],
|
|
651
651
|
children: a
|
|
652
652
|
})
|
|
@@ -692,15 +692,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
692
692
|
},
|
|
693
693
|
optionLabel: { fontSize: 14 },
|
|
694
694
|
optionTextContainer: { flex: 1 }
|
|
695
|
-
}),
|
|
696
|
-
let [s, c] =
|
|
695
|
+
}), fe = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
696
|
+
let [s, c] = A(!1), l = p(), { colors: u } = _(), d = t ? new Date(t) : void 0, { year: f, month: m, today: h } = O(() => {
|
|
697
697
|
let e = d || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
698
698
|
return r.setHours(0, 0, 0, 0), {
|
|
699
699
|
month: n,
|
|
700
700
|
today: r,
|
|
701
701
|
year: t
|
|
702
702
|
};
|
|
703
|
-
}, [d]), [g,
|
|
703
|
+
}, [d]), [g, v] = A(f), [y, b] = A(m), x = [
|
|
704
704
|
"January",
|
|
705
705
|
"February",
|
|
706
706
|
"March",
|
|
@@ -713,47 +713,47 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
713
713
|
"October",
|
|
714
714
|
"November",
|
|
715
715
|
"December"
|
|
716
|
-
], S =
|
|
717
|
-
let e = new Date(g,
|
|
716
|
+
], S = O(() => {
|
|
717
|
+
let e = new Date(g, y, 1).getDay(), t = new Date(g, y + 1, 0).getDate(), n = new Date(g, y, 0).getDate(), r = [];
|
|
718
718
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
719
|
-
date: new Date(g,
|
|
719
|
+
date: new Date(g, y - 1, n - t),
|
|
720
720
|
day: n - t,
|
|
721
721
|
isCurrentMonth: !1
|
|
722
722
|
});
|
|
723
723
|
for (let e = 1; e <= t; e++) r.push({
|
|
724
|
-
date: new Date(g,
|
|
724
|
+
date: new Date(g, y, e),
|
|
725
725
|
day: e,
|
|
726
726
|
isCurrentMonth: !0
|
|
727
727
|
});
|
|
728
728
|
let i = 42 - r.length;
|
|
729
729
|
for (let e = 1; e <= i; e++) r.push({
|
|
730
|
-
date: new Date(g,
|
|
730
|
+
date: new Date(g, y + 1, e),
|
|
731
731
|
day: e,
|
|
732
732
|
isCurrentMonth: !1
|
|
733
733
|
});
|
|
734
734
|
return r;
|
|
735
|
-
}, [g,
|
|
735
|
+
}, [g, y]), C = E((t) => {
|
|
736
736
|
e.data.disablePast && t < h || (n(t.toISOString()), c(!1));
|
|
737
737
|
}, [
|
|
738
738
|
e.data.disablePast,
|
|
739
739
|
h,
|
|
740
740
|
n
|
|
741
741
|
]), w = () => {
|
|
742
|
-
|
|
742
|
+
y === 0 ? (b(11), v(g - 1)) : b(y - 1);
|
|
743
743
|
}, T = () => {
|
|
744
|
-
|
|
745
|
-
},
|
|
746
|
-
return /* @__PURE__ */
|
|
744
|
+
y === 11 ? (b(0), v(g + 1)) : b(y + 1);
|
|
745
|
+
}, ee = () => d ? d.toLocaleDateString() : a || l("renderer.defaultInputs.selectDate"), D = (t) => e.data.disablePast ? t < h : !1, k = (e) => d ? e.getDate() === d.getDate() && e.getMonth() === d.getMonth() && e.getFullYear() === d.getFullYear() : !1;
|
|
746
|
+
return /* @__PURE__ */ M(V, {
|
|
747
747
|
style: K.container,
|
|
748
748
|
children: [
|
|
749
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ M(z, {
|
|
750
750
|
style: [K.label, { color: u.textSecondary }],
|
|
751
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
751
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
752
752
|
style: { color: u.error },
|
|
753
753
|
children: "*"
|
|
754
754
|
})]
|
|
755
755
|
}),
|
|
756
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ M(B, {
|
|
757
757
|
style: [
|
|
758
758
|
K.trigger,
|
|
759
759
|
{
|
|
@@ -764,76 +764,76 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
764
764
|
],
|
|
765
765
|
onPress: () => c(!0),
|
|
766
766
|
activeOpacity: .7,
|
|
767
|
-
children: [/* @__PURE__ */
|
|
767
|
+
children: [/* @__PURE__ */ j(z, {
|
|
768
768
|
style: [
|
|
769
769
|
K.triggerText,
|
|
770
770
|
{ color: u.text },
|
|
771
771
|
!t && { color: u.textMuted }
|
|
772
772
|
],
|
|
773
773
|
numberOfLines: 1,
|
|
774
|
-
children:
|
|
775
|
-
}), /* @__PURE__ */
|
|
774
|
+
children: ee()
|
|
775
|
+
}), /* @__PURE__ */ j(z, {
|
|
776
776
|
style: K.icon,
|
|
777
777
|
children: "📅"
|
|
778
778
|
})]
|
|
779
779
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ j(F, {
|
|
781
781
|
visible: s,
|
|
782
782
|
transparent: !0,
|
|
783
783
|
animationType: "fade",
|
|
784
784
|
onRequestClose: () => c(!1),
|
|
785
|
-
children: /* @__PURE__ */
|
|
785
|
+
children: /* @__PURE__ */ j(B, {
|
|
786
786
|
style: K.modalOverlay,
|
|
787
787
|
activeOpacity: 1,
|
|
788
788
|
onPress: () => c(!1),
|
|
789
|
-
children: /* @__PURE__ */
|
|
789
|
+
children: /* @__PURE__ */ M(B, {
|
|
790
790
|
style: [K.modalContent, { backgroundColor: u.card }],
|
|
791
791
|
activeOpacity: 1,
|
|
792
792
|
onPress: () => {},
|
|
793
793
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ M(V, {
|
|
795
795
|
style: [K.modalHeader, { borderBottomColor: u.separator }],
|
|
796
|
-
children: [/* @__PURE__ */
|
|
796
|
+
children: [/* @__PURE__ */ j(z, {
|
|
797
797
|
style: [K.modalTitle, { color: u.text }],
|
|
798
798
|
children: i || e.data.name
|
|
799
|
-
}), /* @__PURE__ */
|
|
799
|
+
}), /* @__PURE__ */ j(B, {
|
|
800
800
|
onPress: () => c(!1),
|
|
801
|
-
children: /* @__PURE__ */
|
|
801
|
+
children: /* @__PURE__ */ j(z, {
|
|
802
802
|
style: [K.closeButton, { color: u.textMuted }],
|
|
803
803
|
children: "✕"
|
|
804
804
|
})
|
|
805
805
|
})]
|
|
806
806
|
}),
|
|
807
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ M(V, {
|
|
808
808
|
style: K.calendarHeader,
|
|
809
809
|
children: [
|
|
810
|
-
/* @__PURE__ */
|
|
810
|
+
/* @__PURE__ */ j(B, {
|
|
811
811
|
onPress: w,
|
|
812
812
|
style: K.navButton,
|
|
813
|
-
children: /* @__PURE__ */
|
|
813
|
+
children: /* @__PURE__ */ j(z, {
|
|
814
814
|
style: [K.navButtonText, { color: u.primary }],
|
|
815
815
|
children: "‹"
|
|
816
816
|
})
|
|
817
817
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ M(z, {
|
|
819
819
|
style: [K.monthYear, { color: u.text }],
|
|
820
820
|
children: [
|
|
821
|
-
x[
|
|
821
|
+
x[y],
|
|
822
822
|
" ",
|
|
823
823
|
g
|
|
824
824
|
]
|
|
825
825
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ j(B, {
|
|
827
827
|
onPress: T,
|
|
828
828
|
style: K.navButton,
|
|
829
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ j(z, {
|
|
830
830
|
style: [K.navButtonText, { color: u.primary }],
|
|
831
831
|
children: "›"
|
|
832
832
|
})
|
|
833
833
|
})
|
|
834
834
|
]
|
|
835
835
|
}),
|
|
836
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ j(V, {
|
|
837
837
|
style: K.weekDays,
|
|
838
838
|
children: [
|
|
839
839
|
"Sun",
|
|
@@ -843,12 +843,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
843
843
|
"Thu",
|
|
844
844
|
"Fri",
|
|
845
845
|
"Sat"
|
|
846
|
-
].map((e) => /* @__PURE__ */
|
|
846
|
+
].map((e) => /* @__PURE__ */ j(z, {
|
|
847
847
|
style: [K.weekDay, { color: u.textMuted }],
|
|
848
848
|
children: e
|
|
849
849
|
}, e))
|
|
850
850
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
851
|
+
/* @__PURE__ */ j(ne, {
|
|
852
852
|
data: S,
|
|
853
853
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
854
854
|
numColumns: 7,
|
|
@@ -856,8 +856,8 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
856
856
|
style: K.calendar,
|
|
857
857
|
contentContainerStyle: K.calendarContent,
|
|
858
858
|
renderItem: ({ item: e }) => {
|
|
859
|
-
let t =
|
|
860
|
-
return /* @__PURE__ */
|
|
859
|
+
let t = D(e.date), n = k(e.date);
|
|
860
|
+
return /* @__PURE__ */ j(B, {
|
|
861
861
|
style: [
|
|
862
862
|
K.dayCell,
|
|
863
863
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
@@ -870,7 +870,7 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
870
870
|
onPress: () => C(e.date),
|
|
871
871
|
disabled: t,
|
|
872
872
|
activeOpacity: .7,
|
|
873
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ j(z, {
|
|
874
874
|
style: [
|
|
875
875
|
K.dayText,
|
|
876
876
|
{ color: u.text },
|
|
@@ -890,11 +890,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
890
890
|
})
|
|
891
891
|
})
|
|
892
892
|
}),
|
|
893
|
-
r && /* @__PURE__ */
|
|
893
|
+
r && /* @__PURE__ */ j(z, {
|
|
894
894
|
style: [K.error, { color: u.error }],
|
|
895
895
|
children: r
|
|
896
896
|
}),
|
|
897
|
-
o && !r && /* @__PURE__ */
|
|
897
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
898
898
|
style: [K.helperText, { color: u.textMuted }],
|
|
899
899
|
children: o
|
|
900
900
|
})
|
|
@@ -1000,15 +1000,15 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1000
1000
|
flexDirection: "row",
|
|
1001
1001
|
marginBottom: 8
|
|
1002
1002
|
}
|
|
1003
|
-
}),
|
|
1004
|
-
let [o, s] =
|
|
1005
|
-
let e =
|
|
1003
|
+
}), pe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
1004
|
+
let [o, s] = A(!1), [c, l] = A(!0), u = p(), { colors: d } = _(), f = Array.isArray(t) ? t : [], m = f[0] ? new Date(f[0]) : void 0, h = f[1] ? new Date(f[1]) : void 0, { year: g, month: v, today: y } = O(() => {
|
|
1005
|
+
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1006
1006
|
return r.setHours(0, 0, 0, 0), {
|
|
1007
1007
|
month: n,
|
|
1008
1008
|
today: r,
|
|
1009
1009
|
year: t
|
|
1010
1010
|
};
|
|
1011
|
-
}, [
|
|
1011
|
+
}, [m]), [b, x] = A(g), [S, C] = A(v), w = [
|
|
1012
1012
|
"January",
|
|
1013
1013
|
"February",
|
|
1014
1014
|
"March",
|
|
@@ -1021,54 +1021,54 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1021
1021
|
"October",
|
|
1022
1022
|
"November",
|
|
1023
1023
|
"December"
|
|
1024
|
-
], T =
|
|
1025
|
-
let e = new Date(
|
|
1024
|
+
], T = O(() => {
|
|
1025
|
+
let e = new Date(b, S, 1).getDay(), t = new Date(b, S + 1, 0).getDate(), n = new Date(b, S, 0).getDate(), r = [];
|
|
1026
1026
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1027
|
-
date: new Date(
|
|
1027
|
+
date: new Date(b, S - 1, n - t),
|
|
1028
1028
|
day: n - t,
|
|
1029
1029
|
isCurrentMonth: !1
|
|
1030
1030
|
});
|
|
1031
1031
|
for (let e = 1; e <= t; e++) r.push({
|
|
1032
|
-
date: new Date(
|
|
1032
|
+
date: new Date(b, S, e),
|
|
1033
1033
|
day: e,
|
|
1034
1034
|
isCurrentMonth: !0
|
|
1035
1035
|
});
|
|
1036
1036
|
let i = 42 - r.length;
|
|
1037
1037
|
for (let e = 1; e <= i; e++) r.push({
|
|
1038
|
-
date: new Date(
|
|
1038
|
+
date: new Date(b, S + 1, e),
|
|
1039
1039
|
day: e,
|
|
1040
1040
|
isCurrentMonth: !1
|
|
1041
1041
|
});
|
|
1042
1042
|
return r;
|
|
1043
|
-
}, [
|
|
1044
|
-
e.data.disablePast && t <
|
|
1043
|
+
}, [b, S]), ee = E((t) => {
|
|
1044
|
+
e.data.disablePast && t < y || (c ? (n([t.toISOString(), h?.toISOString()]), l(!1)) : (n(m && t < m ? [t.toISOString(), m.toISOString()] : [m?.toISOString(), t.toISOString()]), s(!1), l(!0)));
|
|
1045
1045
|
}, [
|
|
1046
1046
|
e.data.disablePast,
|
|
1047
|
-
|
|
1047
|
+
y,
|
|
1048
1048
|
c,
|
|
1049
|
-
|
|
1049
|
+
m,
|
|
1050
1050
|
h,
|
|
1051
1051
|
n
|
|
1052
|
-
]),
|
|
1053
|
-
S === 0 ? (C(11), x(
|
|
1054
|
-
},
|
|
1055
|
-
S === 11 ? (C(0), x(
|
|
1056
|
-
},
|
|
1057
|
-
if (!(
|
|
1058
|
-
let t =
|
|
1052
|
+
]), D = () => {
|
|
1053
|
+
S === 0 ? (C(11), x(b - 1)) : C(S - 1);
|
|
1054
|
+
}, k = () => {
|
|
1055
|
+
S === 11 ? (C(0), x(b + 1)) : C(S + 1);
|
|
1056
|
+
}, N = () => m && h ? `${m.toLocaleDateString()} - ${h.toLocaleDateString()}` : m ? m.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), te = (t) => e.data.disablePast ? t < y : !1, P = (e) => m && h ? e >= m && e <= h : !1, I = (e) => {
|
|
1057
|
+
if (!(m || h)) return !1;
|
|
1058
|
+
let t = m && e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear(), n = h && e.getDate() === h.getDate() && e.getMonth() === h.getMonth() && e.getFullYear() === h.getFullYear();
|
|
1059
1059
|
return t || n;
|
|
1060
1060
|
};
|
|
1061
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ M(V, {
|
|
1062
1062
|
style: q.container,
|
|
1063
1063
|
children: [
|
|
1064
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ M(z, {
|
|
1065
1065
|
style: [q.label, { color: d.textSecondary }],
|
|
1066
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
1066
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1067
1067
|
style: { color: d.error },
|
|
1068
1068
|
children: "*"
|
|
1069
1069
|
})]
|
|
1070
1070
|
}),
|
|
1071
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ M(B, {
|
|
1072
1072
|
style: [
|
|
1073
1073
|
q.trigger,
|
|
1074
1074
|
{
|
|
@@ -1079,83 +1079,83 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1079
1079
|
],
|
|
1080
1080
|
onPress: () => s(!0),
|
|
1081
1081
|
activeOpacity: .7,
|
|
1082
|
-
children: [/* @__PURE__ */
|
|
1082
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1083
1083
|
style: [
|
|
1084
1084
|
q.triggerText,
|
|
1085
1085
|
{ color: d.text },
|
|
1086
|
-
!
|
|
1086
|
+
!m && { color: d.textMuted }
|
|
1087
1087
|
],
|
|
1088
1088
|
numberOfLines: 1,
|
|
1089
|
-
children:
|
|
1090
|
-
}), /* @__PURE__ */
|
|
1089
|
+
children: N()
|
|
1090
|
+
}), /* @__PURE__ */ j(z, {
|
|
1091
1091
|
style: q.icon,
|
|
1092
1092
|
children: "📅"
|
|
1093
1093
|
})]
|
|
1094
1094
|
}),
|
|
1095
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ j(F, {
|
|
1096
1096
|
visible: o,
|
|
1097
1097
|
transparent: !0,
|
|
1098
1098
|
animationType: "fade",
|
|
1099
1099
|
onRequestClose: () => s(!1),
|
|
1100
|
-
children: /* @__PURE__ */
|
|
1100
|
+
children: /* @__PURE__ */ j(B, {
|
|
1101
1101
|
style: q.modalOverlay,
|
|
1102
1102
|
activeOpacity: 1,
|
|
1103
1103
|
onPress: () => s(!1),
|
|
1104
|
-
children: /* @__PURE__ */
|
|
1104
|
+
children: /* @__PURE__ */ M(B, {
|
|
1105
1105
|
style: [q.modalContent, { backgroundColor: d.card }],
|
|
1106
1106
|
activeOpacity: 1,
|
|
1107
1107
|
onPress: () => {},
|
|
1108
1108
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ M(V, {
|
|
1110
1110
|
style: [q.modalHeader, { borderBottomColor: d.separator }],
|
|
1111
|
-
children: [/* @__PURE__ */
|
|
1111
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1112
1112
|
style: [q.modalTitle, { color: d.text }],
|
|
1113
1113
|
children: i || e.data.name
|
|
1114
|
-
}), /* @__PURE__ */
|
|
1114
|
+
}), /* @__PURE__ */ j(B, {
|
|
1115
1115
|
onPress: () => s(!1),
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ j(z, {
|
|
1117
1117
|
style: [q.closeButton, { color: d.textMuted }],
|
|
1118
1118
|
children: "✕"
|
|
1119
1119
|
})
|
|
1120
1120
|
})]
|
|
1121
1121
|
}),
|
|
1122
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ j(V, {
|
|
1123
1123
|
style: [q.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
1124
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ j(z, {
|
|
1125
1125
|
style: [q.rangeIndicatorText, { color: d.primary }],
|
|
1126
1126
|
children: u(c ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1127
1127
|
})
|
|
1128
1128
|
}),
|
|
1129
|
-
/* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ M(V, {
|
|
1130
1130
|
style: q.calendarHeader,
|
|
1131
1131
|
children: [
|
|
1132
|
-
/* @__PURE__ */
|
|
1133
|
-
onPress:
|
|
1132
|
+
/* @__PURE__ */ j(B, {
|
|
1133
|
+
onPress: D,
|
|
1134
1134
|
style: q.navButton,
|
|
1135
|
-
children: /* @__PURE__ */
|
|
1135
|
+
children: /* @__PURE__ */ j(z, {
|
|
1136
1136
|
style: [q.navButtonText, { color: d.primary }],
|
|
1137
1137
|
children: "‹"
|
|
1138
1138
|
})
|
|
1139
1139
|
}),
|
|
1140
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ M(z, {
|
|
1141
1141
|
style: [q.monthYear, { color: d.text }],
|
|
1142
1142
|
children: [
|
|
1143
1143
|
w[S],
|
|
1144
1144
|
" ",
|
|
1145
|
-
|
|
1145
|
+
b
|
|
1146
1146
|
]
|
|
1147
1147
|
}),
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
onPress:
|
|
1148
|
+
/* @__PURE__ */ j(B, {
|
|
1149
|
+
onPress: k,
|
|
1150
1150
|
style: q.navButton,
|
|
1151
|
-
children: /* @__PURE__ */
|
|
1151
|
+
children: /* @__PURE__ */ j(z, {
|
|
1152
1152
|
style: [q.navButtonText, { color: d.primary }],
|
|
1153
1153
|
children: "›"
|
|
1154
1154
|
})
|
|
1155
1155
|
})
|
|
1156
1156
|
]
|
|
1157
1157
|
}),
|
|
1158
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ j(V, {
|
|
1159
1159
|
style: q.weekDays,
|
|
1160
1160
|
children: [
|
|
1161
1161
|
"Sun",
|
|
@@ -1165,12 +1165,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1165
1165
|
"Thu",
|
|
1166
1166
|
"Fri",
|
|
1167
1167
|
"Sat"
|
|
1168
|
-
].map((e) => /* @__PURE__ */
|
|
1168
|
+
].map((e) => /* @__PURE__ */ j(z, {
|
|
1169
1169
|
style: [q.weekDay, { color: d.textMuted }],
|
|
1170
1170
|
children: e
|
|
1171
1171
|
}, e))
|
|
1172
1172
|
}),
|
|
1173
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ j(ne, {
|
|
1174
1174
|
data: T,
|
|
1175
1175
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1176
1176
|
numColumns: 7,
|
|
@@ -1178,8 +1178,8 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1178
1178
|
style: q.calendar,
|
|
1179
1179
|
contentContainerStyle: q.calendarContent,
|
|
1180
1180
|
renderItem: ({ item: e }) => {
|
|
1181
|
-
let t =
|
|
1182
|
-
return /* @__PURE__ */
|
|
1181
|
+
let t = te(e.date), n = P(e.date), r = I(e.date);
|
|
1182
|
+
return /* @__PURE__ */ j(B, {
|
|
1183
1183
|
style: [
|
|
1184
1184
|
q.dayCell,
|
|
1185
1185
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
@@ -1190,10 +1190,10 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1190
1190
|
},
|
|
1191
1191
|
t && q.dayCellDisabled
|
|
1192
1192
|
],
|
|
1193
|
-
onPress: () =>
|
|
1193
|
+
onPress: () => ee(e.date),
|
|
1194
1194
|
disabled: t,
|
|
1195
1195
|
activeOpacity: .7,
|
|
1196
|
-
children: /* @__PURE__ */
|
|
1196
|
+
children: /* @__PURE__ */ j(z, {
|
|
1197
1197
|
style: [
|
|
1198
1198
|
q.dayText,
|
|
1199
1199
|
{ color: d.text },
|
|
@@ -1214,11 +1214,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1214
1214
|
})
|
|
1215
1215
|
})
|
|
1216
1216
|
}),
|
|
1217
|
-
r && /* @__PURE__ */
|
|
1217
|
+
r && /* @__PURE__ */ j(z, {
|
|
1218
1218
|
style: [q.error, { color: d.error }],
|
|
1219
1219
|
children: r
|
|
1220
1220
|
}),
|
|
1221
|
-
a && !r && /* @__PURE__ */
|
|
1221
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
1222
1222
|
style: [q.helperText, { color: d.textMuted }],
|
|
1223
1223
|
children: a
|
|
1224
1224
|
})
|
|
@@ -1334,31 +1334,31 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1334
1334
|
flexDirection: "row",
|
|
1335
1335
|
marginBottom: 8
|
|
1336
1336
|
}
|
|
1337
|
-
}),
|
|
1338
|
-
let [o, s] =
|
|
1337
|
+
}), me = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
1338
|
+
let [o, s] = A(null), [c, l] = A(!0), u = p(), { colors: d } = _(), f = Array.isArray(t) ? t : t ? [t] : [], m = e.data.multiple, h = E(async () => {
|
|
1339
1339
|
if (o) try {
|
|
1340
|
-
let e = (await o({ allowMultiSelection:
|
|
1340
|
+
let e = (await o({ allowMultiSelection: m })).map((e) => ({
|
|
1341
1341
|
data: e.uri,
|
|
1342
1342
|
lastModified: Date.now(),
|
|
1343
1343
|
name: e.name,
|
|
1344
1344
|
size: e.size,
|
|
1345
1345
|
type: e.type || "application/octet-stream"
|
|
1346
1346
|
}));
|
|
1347
|
-
n(
|
|
1347
|
+
n(m ? [...f, ...e] : e[0] || null);
|
|
1348
1348
|
} catch (e) {
|
|
1349
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1349
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && te.alert("Error", u("renderer.defaultInputs.filePickerError"));
|
|
1350
1350
|
}
|
|
1351
1351
|
}, [
|
|
1352
1352
|
o,
|
|
1353
1353
|
f,
|
|
1354
|
-
|
|
1354
|
+
m,
|
|
1355
1355
|
n,
|
|
1356
1356
|
u
|
|
1357
|
-
]), g =
|
|
1357
|
+
]), g = E((e) => {
|
|
1358
1358
|
let t = f.filter((t, n) => n !== e);
|
|
1359
1359
|
n(t.length > 0 ? t : null);
|
|
1360
|
-
}, [f, n]),
|
|
1361
|
-
return
|
|
1360
|
+
}, [f, n]), v = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1361
|
+
return D(() => {
|
|
1362
1362
|
(async () => {
|
|
1363
1363
|
try {
|
|
1364
1364
|
let { pick: e } = await import("react-native-document-picker");
|
|
@@ -1369,47 +1369,47 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1369
1369
|
l(!1);
|
|
1370
1370
|
}
|
|
1371
1371
|
})();
|
|
1372
|
-
}, []), c ? null : o ? /* @__PURE__ */
|
|
1372
|
+
}, []), c ? null : o ? /* @__PURE__ */ M(V, {
|
|
1373
1373
|
style: J.container,
|
|
1374
1374
|
children: [
|
|
1375
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ M(z, {
|
|
1376
1376
|
style: [J.label, { color: d.textSecondary }],
|
|
1377
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
1377
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1378
1378
|
style: { color: d.error },
|
|
1379
1379
|
children: "*"
|
|
1380
1380
|
})]
|
|
1381
1381
|
}),
|
|
1382
|
-
f.length > 0 && /* @__PURE__ */
|
|
1382
|
+
f.length > 0 && /* @__PURE__ */ j(V, {
|
|
1383
1383
|
style: J.filesList,
|
|
1384
|
-
children: f.map((e, t) => /* @__PURE__ */
|
|
1384
|
+
children: f.map((e, t) => /* @__PURE__ */ M(V, {
|
|
1385
1385
|
style: [J.fileItem, {
|
|
1386
1386
|
backgroundColor: d.card,
|
|
1387
1387
|
borderColor: d.separator
|
|
1388
1388
|
}],
|
|
1389
1389
|
children: [
|
|
1390
|
-
/* @__PURE__ */
|
|
1390
|
+
/* @__PURE__ */ j(V, {
|
|
1391
1391
|
style: [J.fileIcon, { backgroundColor: d.muted }],
|
|
1392
|
-
children: /* @__PURE__ */
|
|
1392
|
+
children: /* @__PURE__ */ j(z, {
|
|
1393
1393
|
style: J.fileIconText,
|
|
1394
1394
|
children: "📄"
|
|
1395
1395
|
})
|
|
1396
1396
|
}),
|
|
1397
|
-
/* @__PURE__ */
|
|
1397
|
+
/* @__PURE__ */ M(V, {
|
|
1398
1398
|
style: J.fileInfo,
|
|
1399
|
-
children: [/* @__PURE__ */
|
|
1399
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1400
1400
|
style: [J.fileName, { color: d.text }],
|
|
1401
1401
|
numberOfLines: 1,
|
|
1402
1402
|
children: e.name
|
|
1403
|
-
}), e.size > 0 && /* @__PURE__ */
|
|
1403
|
+
}), e.size > 0 && /* @__PURE__ */ j(z, {
|
|
1404
1404
|
style: [J.fileSize, { color: d.textMuted }],
|
|
1405
|
-
children:
|
|
1405
|
+
children: v(e.size)
|
|
1406
1406
|
})]
|
|
1407
1407
|
}),
|
|
1408
|
-
/* @__PURE__ */
|
|
1408
|
+
/* @__PURE__ */ j(B, {
|
|
1409
1409
|
style: J.removeButton,
|
|
1410
1410
|
onPress: () => g(t),
|
|
1411
1411
|
activeOpacity: .7,
|
|
1412
|
-
children: /* @__PURE__ */
|
|
1412
|
+
children: /* @__PURE__ */ j(z, {
|
|
1413
1413
|
style: [J.removeButtonText, { color: d.textMuted }],
|
|
1414
1414
|
children: "✕"
|
|
1415
1415
|
})
|
|
@@ -1417,48 +1417,48 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1417
1417
|
]
|
|
1418
1418
|
}, `${e.name}-${t}`))
|
|
1419
1419
|
}),
|
|
1420
|
-
/* @__PURE__ */
|
|
1420
|
+
/* @__PURE__ */ j(B, {
|
|
1421
1421
|
style: [J.pickButton, {
|
|
1422
1422
|
backgroundColor: d.input,
|
|
1423
1423
|
borderColor: d.border
|
|
1424
1424
|
}],
|
|
1425
1425
|
onPress: h,
|
|
1426
1426
|
activeOpacity: .7,
|
|
1427
|
-
children: /* @__PURE__ */
|
|
1427
|
+
children: /* @__PURE__ */ j(z, {
|
|
1428
1428
|
style: [J.pickButtonText, { color: d.textMuted }],
|
|
1429
|
-
children: f.length === 0 ? u(
|
|
1429
|
+
children: f.length === 0 ? u(m ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(m ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1430
1430
|
})
|
|
1431
1431
|
}),
|
|
1432
|
-
r && /* @__PURE__ */
|
|
1432
|
+
r && /* @__PURE__ */ j(z, {
|
|
1433
1433
|
style: [J.error, { color: d.error }],
|
|
1434
1434
|
children: r
|
|
1435
1435
|
}),
|
|
1436
|
-
a && !r && /* @__PURE__ */
|
|
1436
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
1437
1437
|
style: [J.helperText, { color: d.textMuted }],
|
|
1438
1438
|
children: a
|
|
1439
1439
|
})
|
|
1440
1440
|
]
|
|
1441
|
-
}) : /* @__PURE__ */
|
|
1441
|
+
}) : /* @__PURE__ */ M(V, {
|
|
1442
1442
|
style: J.container,
|
|
1443
1443
|
children: [
|
|
1444
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ M(z, {
|
|
1445
1445
|
style: [J.label, { color: d.textSecondary }],
|
|
1446
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
1446
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1447
1447
|
style: { color: d.error },
|
|
1448
1448
|
children: "*"
|
|
1449
1449
|
})]
|
|
1450
1450
|
}),
|
|
1451
|
-
/* @__PURE__ */
|
|
1451
|
+
/* @__PURE__ */ j(V, {
|
|
1452
1452
|
style: [J.unavailableContainer, {
|
|
1453
1453
|
backgroundColor: d.errorLight,
|
|
1454
1454
|
borderColor: d.error
|
|
1455
1455
|
}],
|
|
1456
|
-
children: /* @__PURE__ */
|
|
1456
|
+
children: /* @__PURE__ */ j(z, {
|
|
1457
1457
|
style: [J.unavailableText, { color: d.error }],
|
|
1458
1458
|
children: u("renderer.defaultInputs.filePickerUnavailable")
|
|
1459
1459
|
})
|
|
1460
1460
|
}),
|
|
1461
|
-
a && /* @__PURE__ */
|
|
1461
|
+
a && /* @__PURE__ */ j(z, {
|
|
1462
1462
|
style: [J.helperText, { color: d.textMuted }],
|
|
1463
1463
|
children: a
|
|
1464
1464
|
})
|
|
@@ -1533,265 +1533,257 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1533
1533
|
fontSize: 12,
|
|
1534
1534
|
textAlign: "center"
|
|
1535
1535
|
}
|
|
1536
|
-
}),
|
|
1537
|
-
if (n >
|
|
1536
|
+
}), he = (e) => null, ge = (e) => e.replace(/<[^>]*>/g, ""), _e = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), ve = (e, t = {}) => e == null || e === "" ? "" : _e(ge(String(e))), ye = 100, be = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1537
|
+
if (n > ye) return console.warn(`sanitizeHttpResponse: Maximum depth (${ye}) exceeded.`), typeof e == "string" ? ve(e, t) : "[Max Depth Exceeded]";
|
|
1538
1538
|
if (e == null) return e;
|
|
1539
|
-
if (typeof e == "string") return
|
|
1540
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1539
|
+
if (typeof e == "string") return ve(e, t);
|
|
1540
|
+
if (Array.isArray(e)) return e.map((e) => be(e, t, n + 1, r));
|
|
1541
1541
|
if (typeof e == "object") {
|
|
1542
1542
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1543
1543
|
r.add(e);
|
|
1544
1544
|
let i = {};
|
|
1545
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1545
|
+
for (let [a, o] of Object.entries(e)) i[a] = be(o, t, n + 1, r);
|
|
1546
1546
|
return r.delete(e), i;
|
|
1547
1547
|
}
|
|
1548
1548
|
return e;
|
|
1549
|
-
},
|
|
1550
|
-
if (e == null) return;
|
|
1551
|
-
let n = t.match(/^(\w+)\[(\d+)]$/);
|
|
1552
|
-
if (n) {
|
|
1553
|
-
let [, t, r] = n, i = e[t];
|
|
1554
|
-
return Array.isArray(i) ? i[Number.parseInt(r, 10)] : i;
|
|
1555
|
-
}
|
|
1556
|
-
return e[t];
|
|
1557
|
-
}, e) : e, be = (e) => {
|
|
1549
|
+
}, xe = (e) => {
|
|
1558
1550
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1559
1551
|
return Array.from(t, (e) => e[1]);
|
|
1560
|
-
},
|
|
1552
|
+
}, Se = (e, t) => xe(e).every((e) => {
|
|
1561
1553
|
let n = t[e];
|
|
1562
1554
|
return n != null && n !== "";
|
|
1563
|
-
}),
|
|
1555
|
+
}), Ce = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1564
1556
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1565
1557
|
return n ? encodeURIComponent(a) : a;
|
|
1566
|
-
}),
|
|
1567
|
-
let [u, d] =
|
|
1558
|
+
}), we = ({ node: e, value: n, setValue: r, error: i, label: a, placeholder: o, helperText: s, id: c, name: l }) => {
|
|
1559
|
+
let [u, d] = A(!1), [m, g] = A(null), [v, b] = A([]), [x, S] = A(""), [C, w] = A(!1), { formValues: T, inputNodes: te, headers: P } = ee(), { colors: I } = _(), { httpConfig: L } = e.data, R = p(), ie = k(!1), ae = k(""), oe = k(L), se = k(T), ce = k(te), le = k(P), ue = k(r), H = k(null), U = k(null), W = O(() => L?.url ? xe(L.url) : [], [L?.url]), de = W.length > 0, G = O(() => W.map((e) => `${e}:${String(T[e] ?? "")}`).join("|"), [W, T]), fe = O(() => L?.url ? de ? Se(L.url, T) : !0 : !1, [
|
|
1568
1560
|
L?.url,
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
]),
|
|
1572
|
-
|
|
1573
|
-
let
|
|
1574
|
-
|
|
1575
|
-
let
|
|
1576
|
-
if (!
|
|
1577
|
-
|
|
1561
|
+
de,
|
|
1562
|
+
T
|
|
1563
|
+
]), K = E(async (e) => {
|
|
1564
|
+
U.current && U.current.abort();
|
|
1565
|
+
let n = new AbortController();
|
|
1566
|
+
U.current = n;
|
|
1567
|
+
let r = oe.current, i = se.current, a = ue.current;
|
|
1568
|
+
if (!r?.url) {
|
|
1569
|
+
g(R("renderer.defaultHttpInput.noUrlConfigured")), U.current = null;
|
|
1578
1570
|
return;
|
|
1579
1571
|
}
|
|
1580
|
-
if (
|
|
1581
|
-
|
|
1572
|
+
if (r.url && !Se(r.url, i)) {
|
|
1573
|
+
U.current = null;
|
|
1582
1574
|
return;
|
|
1583
1575
|
}
|
|
1584
|
-
d(!0),
|
|
1576
|
+
d(!0), g(null);
|
|
1585
1577
|
try {
|
|
1586
|
-
let o =
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
})
|
|
1590
|
-
|
|
1578
|
+
let o = Ce(r.url, i, !0), s = r.searchParam && e ? `${o}${o.includes("?") ? "&" : "?"}${r.searchParam}=${encodeURIComponent(e)}` : o, c = (e) => ({
|
|
1579
|
+
key: e.key,
|
|
1580
|
+
value: Ce(e.value, i)
|
|
1581
|
+
}), l = y([{
|
|
1582
|
+
key: "Content-Type",
|
|
1583
|
+
value: "application/json"
|
|
1584
|
+
}], le.current?.map(c), r.headers?.map(c)), u = [
|
|
1591
1585
|
"POST",
|
|
1592
1586
|
"PUT",
|
|
1593
1587
|
"PATCH"
|
|
1594
|
-
].includes(
|
|
1595
|
-
body:
|
|
1596
|
-
headers:
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
},
|
|
1600
|
-
method: n.method || "GET",
|
|
1601
|
-
signal: t.signal
|
|
1588
|
+
].includes(r.method || "") ? r.sendAllFormValues ? JSON.stringify(t(i, ce.current)) : r.body ? Ce(r.body, i) : void 0 : void 0, p = setTimeout(() => n.abort(), 3e4), m = await fetch(s, {
|
|
1589
|
+
body: u || void 0,
|
|
1590
|
+
headers: Object.fromEntries(l.filter((e) => e.key && e.value).map((e) => [e.key, e.value])),
|
|
1591
|
+
method: r.method || "GET",
|
|
1592
|
+
signal: n.signal
|
|
1602
1593
|
});
|
|
1603
|
-
if (clearTimeout(
|
|
1604
|
-
|
|
1594
|
+
if (clearTimeout(p), !m.ok) {
|
|
1595
|
+
g(`HTTP Error ${m.status}: ${m.statusText}`), d(!1);
|
|
1605
1596
|
return;
|
|
1606
1597
|
}
|
|
1607
|
-
let
|
|
1608
|
-
if (
|
|
1609
|
-
let { valueField: e = "value", labelField: t = "label" } =
|
|
1610
|
-
_
|
|
1611
|
-
label: String(
|
|
1612
|
-
value: String(
|
|
1598
|
+
let h = be(await m.json()), _ = r.responsePath ? f(h, r.responsePath) : h;
|
|
1599
|
+
if (r.responseMapping && Array.isArray(_)) {
|
|
1600
|
+
let { valueField: e = "value", labelField: t = "label" } = r.responseMapping;
|
|
1601
|
+
b(_.map((n) => ({
|
|
1602
|
+
label: String(f(n, t) || ""),
|
|
1603
|
+
value: String(f(n, e) || "")
|
|
1613
1604
|
})));
|
|
1614
|
-
} else a(typeof
|
|
1605
|
+
} else a(typeof _ == "string" ? _ : JSON.stringify(_));
|
|
1615
1606
|
} catch (e) {
|
|
1616
1607
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1617
|
-
|
|
1608
|
+
g(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1618
1609
|
} finally {
|
|
1619
|
-
d(!1),
|
|
1610
|
+
d(!1), U.current = null;
|
|
1620
1611
|
}
|
|
1621
|
-
}, [
|
|
1622
|
-
if (
|
|
1623
|
-
|
|
1612
|
+
}, [R]);
|
|
1613
|
+
if (D(() => {
|
|
1614
|
+
oe.current = L, se.current = T, ce.current = te, le.current = P, ue.current = r, H.current = K;
|
|
1624
1615
|
}, [
|
|
1625
1616
|
L,
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
e
|
|
1637
|
-
|
|
1638
|
-
|
|
1617
|
+
T,
|
|
1618
|
+
te,
|
|
1619
|
+
P,
|
|
1620
|
+
r,
|
|
1621
|
+
K
|
|
1622
|
+
]), D(() => () => {
|
|
1623
|
+
U.current && U.current.abort();
|
|
1624
|
+
}, []), D(() => {
|
|
1625
|
+
if (ie.current) return;
|
|
1626
|
+
ie.current = !0;
|
|
1627
|
+
let e = oe.current, t = se.current, n = H.current, r = e?.url && Se(e.url, t);
|
|
1628
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ae.current = xe(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1629
|
+
}, []), D(() => {
|
|
1630
|
+
if (!ie.current || !de || ae.current === G || !fe) return;
|
|
1639
1631
|
let e = setTimeout(() => {
|
|
1640
|
-
|
|
1632
|
+
K(), ae.current = G;
|
|
1641
1633
|
}, 500);
|
|
1642
1634
|
return () => clearTimeout(e);
|
|
1643
1635
|
}, [
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
]),
|
|
1649
|
-
if (!(L?.searchParam &&
|
|
1636
|
+
G,
|
|
1637
|
+
de,
|
|
1638
|
+
fe,
|
|
1639
|
+
K
|
|
1640
|
+
]), D(() => {
|
|
1641
|
+
if (!(L?.searchParam && x)) return;
|
|
1650
1642
|
let e = setTimeout(() => {
|
|
1651
|
-
|
|
1643
|
+
K(x);
|
|
1652
1644
|
}, 300);
|
|
1653
1645
|
return () => clearTimeout(e);
|
|
1654
1646
|
}, [
|
|
1655
|
-
|
|
1647
|
+
x,
|
|
1656
1648
|
L?.searchParam,
|
|
1657
|
-
|
|
1649
|
+
K
|
|
1658
1650
|
]), L?.responseMapping) {
|
|
1659
|
-
let
|
|
1651
|
+
let t = Array.isArray(n) ? n[0] : n, c = v.find((e) => e.value === t);
|
|
1660
1652
|
if (L.searchParam) {
|
|
1661
|
-
let
|
|
1662
|
-
return /* @__PURE__ */
|
|
1653
|
+
let n = u && L?.showLoading;
|
|
1654
|
+
return /* @__PURE__ */ M(V, {
|
|
1663
1655
|
style: Y.container,
|
|
1664
1656
|
children: [
|
|
1665
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ M(z, {
|
|
1666
1658
|
style: [Y.label, { color: I.textSecondary }],
|
|
1667
|
-
children: [a || e.data.name, e.data.required && /* @__PURE__ */
|
|
1659
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1668
1660
|
style: { color: I.error },
|
|
1669
1661
|
children: "*"
|
|
1670
1662
|
})]
|
|
1671
1663
|
}),
|
|
1672
|
-
/* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ M(B, {
|
|
1673
1665
|
style: [
|
|
1674
1666
|
Y.trigger,
|
|
1675
1667
|
{
|
|
1676
1668
|
backgroundColor: I.input,
|
|
1677
1669
|
borderColor: I.border
|
|
1678
1670
|
},
|
|
1679
|
-
|
|
1671
|
+
i && { borderColor: I.error }
|
|
1680
1672
|
],
|
|
1681
|
-
onPress: () =>
|
|
1673
|
+
onPress: () => w(!0),
|
|
1682
1674
|
activeOpacity: .7,
|
|
1683
|
-
children: [
|
|
1675
|
+
children: [n ? /* @__PURE__ */ M(V, {
|
|
1684
1676
|
style: Y.loadingTrigger,
|
|
1685
|
-
children: [/* @__PURE__ */
|
|
1677
|
+
children: [/* @__PURE__ */ j(N, {
|
|
1686
1678
|
size: "small",
|
|
1687
1679
|
color: I.primary
|
|
1688
|
-
}), /* @__PURE__ */
|
|
1680
|
+
}), /* @__PURE__ */ j(z, {
|
|
1689
1681
|
style: [Y.triggerText, { color: I.textMuted }],
|
|
1690
1682
|
numberOfLines: 1,
|
|
1691
|
-
children: c?.label || o ||
|
|
1683
|
+
children: c?.label || o || R("renderer.defaultHttpInput.search")
|
|
1692
1684
|
})]
|
|
1693
|
-
}) : /* @__PURE__ */
|
|
1685
|
+
}) : /* @__PURE__ */ j(z, {
|
|
1694
1686
|
style: [
|
|
1695
1687
|
Y.triggerText,
|
|
1696
1688
|
{ color: I.text },
|
|
1697
1689
|
!c && { color: I.textMuted }
|
|
1698
1690
|
],
|
|
1699
1691
|
numberOfLines: 1,
|
|
1700
|
-
children: c?.label || o ||
|
|
1701
|
-
}), /* @__PURE__ */
|
|
1692
|
+
children: c?.label || o || R("renderer.defaultHttpInput.search")
|
|
1693
|
+
}), /* @__PURE__ */ j(z, {
|
|
1702
1694
|
style: [Y.arrow, { color: I.textMuted }],
|
|
1703
1695
|
children: "▼"
|
|
1704
1696
|
})]
|
|
1705
1697
|
}),
|
|
1706
|
-
/* @__PURE__ */
|
|
1707
|
-
visible:
|
|
1698
|
+
/* @__PURE__ */ j(F, {
|
|
1699
|
+
visible: C,
|
|
1708
1700
|
transparent: !0,
|
|
1709
1701
|
animationType: "fade",
|
|
1710
|
-
onRequestClose: () =>
|
|
1711
|
-
children: /* @__PURE__ */
|
|
1702
|
+
onRequestClose: () => w(!1),
|
|
1703
|
+
children: /* @__PURE__ */ j(B, {
|
|
1712
1704
|
style: Y.modalOverlay,
|
|
1713
1705
|
activeOpacity: 1,
|
|
1714
|
-
onPress: () =>
|
|
1715
|
-
children: /* @__PURE__ */
|
|
1706
|
+
onPress: () => w(!1),
|
|
1707
|
+
children: /* @__PURE__ */ M(B, {
|
|
1716
1708
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1717
1709
|
activeOpacity: 1,
|
|
1718
1710
|
onPress: () => {},
|
|
1719
1711
|
children: [
|
|
1720
|
-
/* @__PURE__ */
|
|
1712
|
+
/* @__PURE__ */ M(V, {
|
|
1721
1713
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1722
|
-
children: [/* @__PURE__ */
|
|
1714
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1723
1715
|
style: [Y.modalTitle, { color: I.text }],
|
|
1724
1716
|
children: a || e.data.name
|
|
1725
|
-
}), /* @__PURE__ */
|
|
1726
|
-
onPress: () =>
|
|
1727
|
-
children: /* @__PURE__ */
|
|
1717
|
+
}), /* @__PURE__ */ j(B, {
|
|
1718
|
+
onPress: () => w(!1),
|
|
1719
|
+
children: /* @__PURE__ */ j(z, {
|
|
1728
1720
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
1729
1721
|
children: "✕"
|
|
1730
1722
|
})
|
|
1731
1723
|
})]
|
|
1732
1724
|
}),
|
|
1733
|
-
/* @__PURE__ */
|
|
1725
|
+
/* @__PURE__ */ j(V, {
|
|
1734
1726
|
style: Y.searchContainer,
|
|
1735
|
-
children: /* @__PURE__ */
|
|
1727
|
+
children: /* @__PURE__ */ j(re, {
|
|
1736
1728
|
style: [Y.searchInput, {
|
|
1737
1729
|
backgroundColor: I.muted,
|
|
1738
1730
|
borderColor: I.border,
|
|
1739
1731
|
color: I.text
|
|
1740
1732
|
}],
|
|
1741
|
-
placeholder:
|
|
1733
|
+
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1742
1734
|
placeholderTextColor: I.textMuted,
|
|
1743
|
-
value:
|
|
1735
|
+
value: x,
|
|
1744
1736
|
onChangeText: (e) => {
|
|
1745
|
-
|
|
1737
|
+
S(e), g(null);
|
|
1746
1738
|
},
|
|
1747
1739
|
autoFocus: !0,
|
|
1748
1740
|
autoCapitalize: "none",
|
|
1749
1741
|
autoCorrect: !1
|
|
1750
1742
|
})
|
|
1751
1743
|
}),
|
|
1752
|
-
u ? /* @__PURE__ */
|
|
1744
|
+
u ? /* @__PURE__ */ j(V, {
|
|
1753
1745
|
style: Y.loadingContainer,
|
|
1754
|
-
children: /* @__PURE__ */
|
|
1746
|
+
children: /* @__PURE__ */ j(N, {
|
|
1755
1747
|
size: "small",
|
|
1756
1748
|
color: I.primary
|
|
1757
1749
|
})
|
|
1758
|
-
}) :
|
|
1750
|
+
}) : m ? /* @__PURE__ */ M(V, {
|
|
1759
1751
|
style: Y.errorContainer,
|
|
1760
|
-
children: [/* @__PURE__ */
|
|
1752
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1761
1753
|
style: [Y.errorText, { color: I.error }],
|
|
1762
|
-
children:
|
|
1763
|
-
}), /* @__PURE__ */
|
|
1764
|
-
onPress: () =>
|
|
1754
|
+
children: m
|
|
1755
|
+
}), /* @__PURE__ */ j(B, {
|
|
1756
|
+
onPress: () => K(x),
|
|
1765
1757
|
style: Y.retryButton,
|
|
1766
|
-
children: /* @__PURE__ */
|
|
1758
|
+
children: /* @__PURE__ */ j(z, {
|
|
1767
1759
|
style: [Y.retryButtonText, { color: I.primary }],
|
|
1768
|
-
children:
|
|
1760
|
+
children: R("renderer.defaultHttpInput.retry")
|
|
1769
1761
|
})
|
|
1770
1762
|
})]
|
|
1771
|
-
}) : /* @__PURE__ */
|
|
1772
|
-
data:
|
|
1763
|
+
}) : /* @__PURE__ */ j(ne, {
|
|
1764
|
+
data: v,
|
|
1773
1765
|
keyExtractor: (e) => e.value,
|
|
1774
1766
|
style: Y.optionsList,
|
|
1775
1767
|
contentContainerStyle: Y.optionsListContent,
|
|
1776
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1768
|
+
ListEmptyComponent: /* @__PURE__ */ j(V, {
|
|
1777
1769
|
style: Y.emptyContainer,
|
|
1778
|
-
children: /* @__PURE__ */
|
|
1770
|
+
children: /* @__PURE__ */ j(z, {
|
|
1779
1771
|
style: [Y.emptyText, { color: I.textMuted }],
|
|
1780
|
-
children:
|
|
1772
|
+
children: R("renderer.defaultHttpInput.noResults")
|
|
1781
1773
|
})
|
|
1782
1774
|
}),
|
|
1783
1775
|
renderItem: ({ item: e }) => {
|
|
1784
|
-
let
|
|
1785
|
-
return /* @__PURE__ */
|
|
1786
|
-
style: [Y.option,
|
|
1776
|
+
let n = e.value === t;
|
|
1777
|
+
return /* @__PURE__ */ M(B, {
|
|
1778
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1787
1779
|
onPress: () => {
|
|
1788
|
-
|
|
1780
|
+
r(e.value), w(!1);
|
|
1789
1781
|
},
|
|
1790
1782
|
activeOpacity: .7,
|
|
1791
|
-
children: [/* @__PURE__ */
|
|
1783
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1792
1784
|
style: [Y.optionText, { color: I.text }],
|
|
1793
1785
|
children: e.label
|
|
1794
|
-
}),
|
|
1786
|
+
}), n && /* @__PURE__ */ j(z, {
|
|
1795
1787
|
style: [Y.checkmark, { color: I.primary }],
|
|
1796
1788
|
children: "✓"
|
|
1797
1789
|
})]
|
|
@@ -1802,111 +1794,111 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1802
1794
|
})
|
|
1803
1795
|
})
|
|
1804
1796
|
}),
|
|
1805
|
-
|
|
1797
|
+
i && /* @__PURE__ */ j(z, {
|
|
1806
1798
|
style: [Y.error, { color: I.error }],
|
|
1807
|
-
children:
|
|
1799
|
+
children: i
|
|
1808
1800
|
}),
|
|
1809
|
-
s && !
|
|
1801
|
+
s && !i && /* @__PURE__ */ j(z, {
|
|
1810
1802
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1811
1803
|
children: s
|
|
1812
1804
|
})
|
|
1813
1805
|
]
|
|
1814
1806
|
});
|
|
1815
1807
|
}
|
|
1816
|
-
let l = u && L?.showLoading, d =
|
|
1817
|
-
let t =
|
|
1808
|
+
let l = u && L?.showLoading, d = W.filter((e) => {
|
|
1809
|
+
let t = T[e];
|
|
1818
1810
|
return t == null || t === "";
|
|
1819
|
-
}),
|
|
1820
|
-
return /* @__PURE__ */
|
|
1811
|
+
}), f = d.map((e) => h(e, te) || e), p = v.length === 0 && !l ? m || (d.length > 0 ? `${R("renderer.defaultHttpInput.waitingForRequiredFields")}: ${f.join(", ")}` : R("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1812
|
+
return /* @__PURE__ */ M(V, {
|
|
1821
1813
|
style: Y.container,
|
|
1822
1814
|
children: [
|
|
1823
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ M(z, {
|
|
1824
1816
|
style: [Y.label, { color: I.textSecondary }],
|
|
1825
|
-
children: [a || e.data.name, e.data.required && /* @__PURE__ */
|
|
1817
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1826
1818
|
style: { color: I.error },
|
|
1827
1819
|
children: "*"
|
|
1828
1820
|
})]
|
|
1829
1821
|
}),
|
|
1830
|
-
/* @__PURE__ */
|
|
1822
|
+
/* @__PURE__ */ M(B, {
|
|
1831
1823
|
style: [
|
|
1832
1824
|
Y.trigger,
|
|
1833
1825
|
{
|
|
1834
1826
|
backgroundColor: I.input,
|
|
1835
1827
|
borderColor: I.border
|
|
1836
1828
|
},
|
|
1837
|
-
|
|
1838
|
-
(l ||
|
|
1829
|
+
i && { borderColor: I.error },
|
|
1830
|
+
(l || v.length === 0) && { backgroundColor: I.muted }
|
|
1839
1831
|
],
|
|
1840
|
-
onPress: () =>
|
|
1841
|
-
disabled: l ||
|
|
1832
|
+
onPress: () => w(!0),
|
|
1833
|
+
disabled: l || v.length === 0,
|
|
1842
1834
|
activeOpacity: .7,
|
|
1843
1835
|
children: [
|
|
1844
|
-
l && /* @__PURE__ */
|
|
1836
|
+
l && /* @__PURE__ */ j(N, {
|
|
1845
1837
|
size: "small",
|
|
1846
1838
|
color: I.primary,
|
|
1847
1839
|
style: Y.triggerLoader
|
|
1848
1840
|
}),
|
|
1849
|
-
/* @__PURE__ */
|
|
1841
|
+
/* @__PURE__ */ j(z, {
|
|
1850
1842
|
style: [
|
|
1851
1843
|
Y.triggerText,
|
|
1852
1844
|
{ color: I.text },
|
|
1853
1845
|
!c && { color: I.textMuted }
|
|
1854
1846
|
],
|
|
1855
1847
|
numberOfLines: 1,
|
|
1856
|
-
children: c?.label || o ||
|
|
1848
|
+
children: c?.label || o || R("renderer.defaultHttpInput.selectOption")
|
|
1857
1849
|
}),
|
|
1858
|
-
/* @__PURE__ */
|
|
1850
|
+
/* @__PURE__ */ j(z, {
|
|
1859
1851
|
style: [Y.arrow, { color: I.textMuted }],
|
|
1860
1852
|
children: "▼"
|
|
1861
1853
|
})
|
|
1862
1854
|
]
|
|
1863
1855
|
}),
|
|
1864
|
-
|
|
1856
|
+
p && /* @__PURE__ */ j(z, {
|
|
1865
1857
|
style: [Y.disabledMessage, { color: I.error }],
|
|
1866
|
-
children:
|
|
1858
|
+
children: p
|
|
1867
1859
|
}),
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
visible:
|
|
1860
|
+
/* @__PURE__ */ j(F, {
|
|
1861
|
+
visible: C,
|
|
1870
1862
|
transparent: !0,
|
|
1871
1863
|
animationType: "fade",
|
|
1872
|
-
onRequestClose: () =>
|
|
1873
|
-
children: /* @__PURE__ */
|
|
1864
|
+
onRequestClose: () => w(!1),
|
|
1865
|
+
children: /* @__PURE__ */ j(B, {
|
|
1874
1866
|
style: Y.modalOverlay,
|
|
1875
1867
|
activeOpacity: 1,
|
|
1876
|
-
onPress: () =>
|
|
1877
|
-
children: /* @__PURE__ */
|
|
1868
|
+
onPress: () => w(!1),
|
|
1869
|
+
children: /* @__PURE__ */ M(B, {
|
|
1878
1870
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1879
1871
|
activeOpacity: 1,
|
|
1880
1872
|
onPress: () => {},
|
|
1881
|
-
children: [/* @__PURE__ */
|
|
1873
|
+
children: [/* @__PURE__ */ M(V, {
|
|
1882
1874
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1883
|
-
children: [/* @__PURE__ */
|
|
1875
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1884
1876
|
style: [Y.modalTitle, { color: I.text }],
|
|
1885
1877
|
children: a || e.data.name
|
|
1886
|
-
}), /* @__PURE__ */
|
|
1887
|
-
onPress: () =>
|
|
1888
|
-
children: /* @__PURE__ */
|
|
1878
|
+
}), /* @__PURE__ */ j(B, {
|
|
1879
|
+
onPress: () => w(!1),
|
|
1880
|
+
children: /* @__PURE__ */ j(z, {
|
|
1889
1881
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
1890
1882
|
children: "✕"
|
|
1891
1883
|
})
|
|
1892
1884
|
})]
|
|
1893
|
-
}), /* @__PURE__ */
|
|
1894
|
-
data:
|
|
1885
|
+
}), /* @__PURE__ */ j(ne, {
|
|
1886
|
+
data: v,
|
|
1895
1887
|
keyExtractor: (e) => e.value,
|
|
1896
1888
|
style: Y.optionsList,
|
|
1897
1889
|
contentContainerStyle: Y.optionsListContent,
|
|
1898
1890
|
renderItem: ({ item: e }) => {
|
|
1899
|
-
let
|
|
1900
|
-
return /* @__PURE__ */
|
|
1901
|
-
style: [Y.option,
|
|
1891
|
+
let n = e.value === t;
|
|
1892
|
+
return /* @__PURE__ */ M(B, {
|
|
1893
|
+
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1902
1894
|
onPress: () => {
|
|
1903
|
-
|
|
1895
|
+
r(e.value), w(!1);
|
|
1904
1896
|
},
|
|
1905
1897
|
activeOpacity: .7,
|
|
1906
|
-
children: [/* @__PURE__ */
|
|
1898
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1907
1899
|
style: [Y.optionText, { color: I.text }],
|
|
1908
1900
|
children: e.label
|
|
1909
|
-
}),
|
|
1901
|
+
}), n && /* @__PURE__ */ j(z, {
|
|
1910
1902
|
style: [Y.checkmark, { color: I.primary }],
|
|
1911
1903
|
children: "✓"
|
|
1912
1904
|
})]
|
|
@@ -1916,41 +1908,41 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
1916
1908
|
})
|
|
1917
1909
|
})
|
|
1918
1910
|
}),
|
|
1919
|
-
|
|
1911
|
+
i && /* @__PURE__ */ j(z, {
|
|
1920
1912
|
style: [Y.error, { color: I.error }],
|
|
1921
|
-
children:
|
|
1913
|
+
children: i
|
|
1922
1914
|
}),
|
|
1923
|
-
s && !
|
|
1915
|
+
s && !i && /* @__PURE__ */ j(z, {
|
|
1924
1916
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1925
1917
|
children: s
|
|
1926
1918
|
})
|
|
1927
1919
|
]
|
|
1928
1920
|
});
|
|
1929
1921
|
}
|
|
1930
|
-
return /* @__PURE__ */
|
|
1922
|
+
return /* @__PURE__ */ M(V, {
|
|
1931
1923
|
style: Y.container,
|
|
1932
1924
|
children: [
|
|
1933
|
-
/* @__PURE__ */
|
|
1925
|
+
/* @__PURE__ */ M(z, {
|
|
1934
1926
|
style: [Y.label, { color: I.textSecondary }],
|
|
1935
|
-
children: [a || e.data.name, e.data.required && /* @__PURE__ */
|
|
1927
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
1936
1928
|
style: { color: I.error },
|
|
1937
1929
|
children: "*"
|
|
1938
1930
|
})]
|
|
1939
1931
|
}),
|
|
1940
|
-
/* @__PURE__ */
|
|
1932
|
+
/* @__PURE__ */ j(re, {
|
|
1941
1933
|
style: [Y.input, {
|
|
1942
1934
|
backgroundColor: I.muted,
|
|
1943
1935
|
borderColor: I.border,
|
|
1944
1936
|
color: I.textMuted
|
|
1945
1937
|
}],
|
|
1946
|
-
value: typeof
|
|
1938
|
+
value: typeof n == "string" ? n : JSON.stringify(n),
|
|
1947
1939
|
editable: !1
|
|
1948
1940
|
}),
|
|
1949
|
-
|
|
1941
|
+
i && /* @__PURE__ */ j(z, {
|
|
1950
1942
|
style: [Y.error, { color: I.error }],
|
|
1951
|
-
children:
|
|
1943
|
+
children: i
|
|
1952
1944
|
}),
|
|
1953
|
-
s && !
|
|
1945
|
+
s && !i && /* @__PURE__ */ j(z, {
|
|
1954
1946
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1955
1947
|
children: s
|
|
1956
1948
|
})
|
|
@@ -2082,23 +2074,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2082
2074
|
flex: 1,
|
|
2083
2075
|
fontSize: 14
|
|
2084
2076
|
}
|
|
2085
|
-
}),
|
|
2086
|
-
let { colors: c } =
|
|
2087
|
-
return
|
|
2077
|
+
}), Te = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2078
|
+
let { colors: c } = _(), [l, u] = A(t?.toString() ?? "");
|
|
2079
|
+
return D(() => {
|
|
2088
2080
|
u(t?.toString() ?? "");
|
|
2089
|
-
}, [t]), /* @__PURE__ */
|
|
2090
|
-
style:
|
|
2081
|
+
}, [t]), /* @__PURE__ */ M(V, {
|
|
2082
|
+
style: Ee.container,
|
|
2091
2083
|
children: [
|
|
2092
|
-
/* @__PURE__ */
|
|
2093
|
-
style: [
|
|
2094
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2084
|
+
/* @__PURE__ */ M(z, {
|
|
2085
|
+
style: [Ee.label, { color: c.textSecondary }],
|
|
2086
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2095
2087
|
style: { color: c.error },
|
|
2096
2088
|
children: "*"
|
|
2097
2089
|
})]
|
|
2098
2090
|
}),
|
|
2099
|
-
/* @__PURE__ */
|
|
2091
|
+
/* @__PURE__ */ j(re, {
|
|
2100
2092
|
style: [
|
|
2101
|
-
|
|
2093
|
+
Ee.input,
|
|
2102
2094
|
{
|
|
2103
2095
|
backgroundColor: c.input,
|
|
2104
2096
|
borderColor: c.border,
|
|
@@ -2120,17 +2112,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2120
2112
|
keyboardType: "numeric",
|
|
2121
2113
|
accessibilityLabel: s
|
|
2122
2114
|
}),
|
|
2123
|
-
r && /* @__PURE__ */
|
|
2124
|
-
style: [
|
|
2115
|
+
r && /* @__PURE__ */ j(z, {
|
|
2116
|
+
style: [Ee.error, { color: c.error }],
|
|
2125
2117
|
children: r
|
|
2126
2118
|
}),
|
|
2127
|
-
o && !r && /* @__PURE__ */
|
|
2128
|
-
style: [
|
|
2119
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2120
|
+
style: [Ee.helperText, { color: c.textMuted }],
|
|
2129
2121
|
children: o
|
|
2130
2122
|
})
|
|
2131
2123
|
]
|
|
2132
2124
|
});
|
|
2133
|
-
},
|
|
2125
|
+
}, Ee = L.create({
|
|
2134
2126
|
container: { marginBottom: 16 },
|
|
2135
2127
|
error: {
|
|
2136
2128
|
fontSize: 12,
|
|
@@ -2152,23 +2144,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2152
2144
|
fontWeight: "500",
|
|
2153
2145
|
marginBottom: 8
|
|
2154
2146
|
}
|
|
2155
|
-
}),
|
|
2156
|
-
let { colors: c } =
|
|
2157
|
-
return /* @__PURE__ */
|
|
2158
|
-
style:
|
|
2147
|
+
}), De = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2148
|
+
let { colors: c } = _(), [l, u] = A(!1);
|
|
2149
|
+
return /* @__PURE__ */ M(V, {
|
|
2150
|
+
style: Oe.container,
|
|
2159
2151
|
children: [
|
|
2160
|
-
/* @__PURE__ */
|
|
2161
|
-
style: [
|
|
2162
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2152
|
+
/* @__PURE__ */ M(z, {
|
|
2153
|
+
style: [Oe.label, { color: c.textSecondary }],
|
|
2154
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2163
2155
|
style: { color: c.error },
|
|
2164
2156
|
children: "*"
|
|
2165
2157
|
})]
|
|
2166
2158
|
}),
|
|
2167
|
-
/* @__PURE__ */
|
|
2168
|
-
style:
|
|
2169
|
-
children: [/* @__PURE__ */
|
|
2159
|
+
/* @__PURE__ */ M(V, {
|
|
2160
|
+
style: Oe.inputWrapper,
|
|
2161
|
+
children: [/* @__PURE__ */ j(re, {
|
|
2170
2162
|
style: [
|
|
2171
|
-
|
|
2163
|
+
Oe.input,
|
|
2172
2164
|
{
|
|
2173
2165
|
backgroundColor: c.input,
|
|
2174
2166
|
borderColor: c.border,
|
|
@@ -2182,27 +2174,27 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2182
2174
|
placeholderTextColor: c.textMuted,
|
|
2183
2175
|
secureTextEntry: !l,
|
|
2184
2176
|
accessibilityLabel: s
|
|
2185
|
-
}), /* @__PURE__ */
|
|
2186
|
-
style:
|
|
2177
|
+
}), /* @__PURE__ */ j(B, {
|
|
2178
|
+
style: Oe.toggleButton,
|
|
2187
2179
|
onPress: () => u(!l),
|
|
2188
2180
|
activeOpacity: .7,
|
|
2189
|
-
children: /* @__PURE__ */
|
|
2190
|
-
style: [
|
|
2181
|
+
children: /* @__PURE__ */ j(z, {
|
|
2182
|
+
style: [Oe.toggleText, { color: c.primary }],
|
|
2191
2183
|
children: l ? "Hide" : "Show"
|
|
2192
2184
|
})
|
|
2193
2185
|
})]
|
|
2194
2186
|
}),
|
|
2195
|
-
r && /* @__PURE__ */
|
|
2196
|
-
style: [
|
|
2187
|
+
r && /* @__PURE__ */ j(z, {
|
|
2188
|
+
style: [Oe.error, { color: c.error }],
|
|
2197
2189
|
children: r
|
|
2198
2190
|
}),
|
|
2199
|
-
o && !r && /* @__PURE__ */
|
|
2200
|
-
style: [
|
|
2191
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2192
|
+
style: [Oe.helperText, { color: c.textMuted }],
|
|
2201
2193
|
children: o
|
|
2202
2194
|
})
|
|
2203
2195
|
]
|
|
2204
2196
|
});
|
|
2205
|
-
},
|
|
2197
|
+
}, Oe = L.create({
|
|
2206
2198
|
container: { marginBottom: 16 },
|
|
2207
2199
|
error: {
|
|
2208
2200
|
fontSize: 12,
|
|
@@ -2240,23 +2232,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2240
2232
|
fontSize: 12,
|
|
2241
2233
|
fontWeight: "600"
|
|
2242
2234
|
}
|
|
2243
|
-
}),
|
|
2244
|
-
let o =
|
|
2235
|
+
}), ke = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2236
|
+
let o = p(), { colors: s } = _(), c = e.data.options || [], l = t || "", u = e.data.variant !== "default", d = (e) => {
|
|
2245
2237
|
n(e);
|
|
2246
2238
|
};
|
|
2247
|
-
return /* @__PURE__ */
|
|
2239
|
+
return /* @__PURE__ */ M(V, {
|
|
2248
2240
|
style: X.container,
|
|
2249
2241
|
children: [
|
|
2250
|
-
/* @__PURE__ */
|
|
2242
|
+
/* @__PURE__ */ M(z, {
|
|
2251
2243
|
style: [X.label, { color: s.textSecondary }],
|
|
2252
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2244
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2253
2245
|
style: { color: s.error },
|
|
2254
2246
|
children: "*"
|
|
2255
2247
|
})]
|
|
2256
2248
|
}),
|
|
2257
2249
|
c.map((e) => {
|
|
2258
2250
|
let t = l === e.value, n = o(e.label) || e.value, r = o(e.description);
|
|
2259
|
-
return u ? /* @__PURE__ */
|
|
2251
|
+
return u ? /* @__PURE__ */ M(B, {
|
|
2260
2252
|
style: [
|
|
2261
2253
|
X.card,
|
|
2262
2254
|
{
|
|
@@ -2273,39 +2265,40 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2273
2265
|
disabled: e.disabled,
|
|
2274
2266
|
activeOpacity: .7,
|
|
2275
2267
|
children: [
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
style: [
|
|
2278
|
-
X.radio,
|
|
2279
|
-
{
|
|
2280
|
-
backgroundColor: s.input,
|
|
2281
|
-
borderColor: s.border
|
|
2282
|
-
},
|
|
2283
|
-
t && { borderColor: s.primary }
|
|
2284
|
-
],
|
|
2285
|
-
children: t && /* @__PURE__ */ k(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2286
|
-
}),
|
|
2287
|
-
e.image && /* @__PURE__ */ k(P, {
|
|
2268
|
+
e.image && /* @__PURE__ */ j(P, {
|
|
2288
2269
|
source: { uri: e.image },
|
|
2289
2270
|
style: X.cardImage
|
|
2290
2271
|
}),
|
|
2291
|
-
/* @__PURE__ */
|
|
2272
|
+
/* @__PURE__ */ M(V, {
|
|
2292
2273
|
style: X.cardTextContainer,
|
|
2293
|
-
children: [/* @__PURE__ */
|
|
2274
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2294
2275
|
style: [X.cardLabel, { color: s.textSecondary }],
|
|
2295
2276
|
children: n
|
|
2296
|
-
}), r && /* @__PURE__ */
|
|
2277
|
+
}), r && /* @__PURE__ */ j(z, {
|
|
2297
2278
|
style: [X.cardDescription, { color: s.textMuted }],
|
|
2298
2279
|
children: r
|
|
2299
2280
|
})]
|
|
2281
|
+
}),
|
|
2282
|
+
/* @__PURE__ */ j(V, {
|
|
2283
|
+
style: [
|
|
2284
|
+
X.radio,
|
|
2285
|
+
X.cardRadio,
|
|
2286
|
+
{
|
|
2287
|
+
backgroundColor: s.input,
|
|
2288
|
+
borderColor: s.border
|
|
2289
|
+
},
|
|
2290
|
+
t && { borderColor: s.primary }
|
|
2291
|
+
],
|
|
2292
|
+
children: t && /* @__PURE__ */ j(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2300
2293
|
})
|
|
2301
2294
|
]
|
|
2302
|
-
}, e.value) : /* @__PURE__ */
|
|
2295
|
+
}, e.value) : /* @__PURE__ */ M(B, {
|
|
2303
2296
|
style: X.option,
|
|
2304
2297
|
onPress: () => d(e.value),
|
|
2305
2298
|
disabled: e.disabled,
|
|
2306
2299
|
activeOpacity: .7,
|
|
2307
2300
|
children: [
|
|
2308
|
-
/* @__PURE__ */
|
|
2301
|
+
/* @__PURE__ */ j(V, {
|
|
2309
2302
|
style: [
|
|
2310
2303
|
X.radio,
|
|
2311
2304
|
{
|
|
@@ -2314,22 +2307,22 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2314
2307
|
},
|
|
2315
2308
|
t && { borderColor: s.primary }
|
|
2316
2309
|
],
|
|
2317
|
-
children: t && /* @__PURE__ */
|
|
2310
|
+
children: t && /* @__PURE__ */ j(V, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2318
2311
|
}),
|
|
2319
|
-
e.image && /* @__PURE__ */
|
|
2312
|
+
e.image && /* @__PURE__ */ j(P, {
|
|
2320
2313
|
source: { uri: e.image },
|
|
2321
2314
|
style: X.image
|
|
2322
2315
|
}),
|
|
2323
|
-
/* @__PURE__ */
|
|
2316
|
+
/* @__PURE__ */ M(V, {
|
|
2324
2317
|
style: X.optionTextContainer,
|
|
2325
|
-
children: [/* @__PURE__ */
|
|
2318
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2326
2319
|
style: [
|
|
2327
2320
|
X.optionLabel,
|
|
2328
2321
|
{ color: s.textSecondary },
|
|
2329
2322
|
e.disabled && { color: s.textMuted }
|
|
2330
2323
|
],
|
|
2331
2324
|
children: n
|
|
2332
|
-
}), r && /* @__PURE__ */
|
|
2325
|
+
}), r && /* @__PURE__ */ j(z, {
|
|
2333
2326
|
style: [X.optionDescription, { color: s.textMuted }],
|
|
2334
2327
|
children: r
|
|
2335
2328
|
})]
|
|
@@ -2337,11 +2330,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2337
2330
|
]
|
|
2338
2331
|
}, e.value);
|
|
2339
2332
|
}),
|
|
2340
|
-
r && /* @__PURE__ */
|
|
2333
|
+
r && /* @__PURE__ */ j(z, {
|
|
2341
2334
|
style: [X.error, { color: s.error }],
|
|
2342
2335
|
children: r
|
|
2343
2336
|
}),
|
|
2344
|
-
a && !r && /* @__PURE__ */
|
|
2337
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
2345
2338
|
style: [X.helperText, { color: s.textMuted }],
|
|
2346
2339
|
children: a
|
|
2347
2340
|
})
|
|
@@ -2349,16 +2342,16 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2349
2342
|
});
|
|
2350
2343
|
}, X = L.create({
|
|
2351
2344
|
card: {
|
|
2352
|
-
alignItems: "
|
|
2345
|
+
alignItems: "center",
|
|
2353
2346
|
borderRadius: 8,
|
|
2354
2347
|
borderWidth: 1,
|
|
2355
2348
|
flexDirection: "row",
|
|
2356
2349
|
marginBottom: 8,
|
|
2357
|
-
padding:
|
|
2350
|
+
padding: 16
|
|
2358
2351
|
},
|
|
2359
2352
|
cardDescription: {
|
|
2360
2353
|
fontSize: 12,
|
|
2361
|
-
marginTop:
|
|
2354
|
+
marginTop: 4
|
|
2362
2355
|
},
|
|
2363
2356
|
cardImage: {
|
|
2364
2357
|
borderRadius: 4,
|
|
@@ -2370,6 +2363,10 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2370
2363
|
fontSize: 14,
|
|
2371
2364
|
fontWeight: "500"
|
|
2372
2365
|
},
|
|
2366
|
+
cardRadio: {
|
|
2367
|
+
marginLeft: 12,
|
|
2368
|
+
marginRight: 0
|
|
2369
|
+
},
|
|
2373
2370
|
cardTextContainer: { flex: 1 },
|
|
2374
2371
|
container: { marginBottom: 16 },
|
|
2375
2372
|
error: {
|
|
@@ -2416,21 +2413,21 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2416
2413
|
height: 10,
|
|
2417
2414
|
width: 10
|
|
2418
2415
|
}
|
|
2419
|
-
}),
|
|
2420
|
-
let [s, c] =
|
|
2421
|
-
f ? n(
|
|
2416
|
+
}), Ae = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2417
|
+
let [s, c] = A(!1), l = p(), { colors: u } = _(), d = e.data.options || [], f = e.data.multiple, m = Array.isArray(t) ? t : t ? [t] : [], h = (e) => {
|
|
2418
|
+
f ? n(m.includes(e) ? m.filter((t) => t !== e) : [...m, e]) : (n(e), c(!1));
|
|
2422
2419
|
};
|
|
2423
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ M(V, {
|
|
2424
2421
|
style: Z.container,
|
|
2425
2422
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2423
|
+
/* @__PURE__ */ M(z, {
|
|
2427
2424
|
style: [Z.label, { color: u.textSecondary }],
|
|
2428
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2425
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2429
2426
|
style: { color: u.error },
|
|
2430
2427
|
children: "*"
|
|
2431
2428
|
})]
|
|
2432
2429
|
}),
|
|
2433
|
-
/* @__PURE__ */
|
|
2430
|
+
/* @__PURE__ */ M(B, {
|
|
2434
2431
|
style: [
|
|
2435
2432
|
Z.trigger,
|
|
2436
2433
|
{
|
|
@@ -2441,76 +2438,76 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2441
2438
|
],
|
|
2442
2439
|
onPress: () => c(!0),
|
|
2443
2440
|
activeOpacity: .7,
|
|
2444
|
-
children: [/* @__PURE__ */
|
|
2441
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2445
2442
|
style: [
|
|
2446
2443
|
Z.triggerText,
|
|
2447
2444
|
{ color: u.text },
|
|
2448
|
-
|
|
2445
|
+
m.length === 0 && { color: u.textMuted }
|
|
2449
2446
|
],
|
|
2450
2447
|
children: (() => {
|
|
2451
|
-
if (
|
|
2452
|
-
if (f) return d.filter((e) =>
|
|
2453
|
-
let e = d.find((e) => e.value ===
|
|
2448
|
+
if (m.length === 0) return a || "Select...";
|
|
2449
|
+
if (f) return d.filter((e) => m.includes(e.value)).map((e) => l(e.label) || e.value).join(", ");
|
|
2450
|
+
let e = d.find((e) => e.value === m[0]);
|
|
2454
2451
|
return e ? l(e.label) || e.value : a || "Select...";
|
|
2455
2452
|
})()
|
|
2456
|
-
}), /* @__PURE__ */
|
|
2453
|
+
}), /* @__PURE__ */ j(z, {
|
|
2457
2454
|
style: [Z.arrow, { color: u.textMuted }],
|
|
2458
2455
|
children: "▼"
|
|
2459
2456
|
})]
|
|
2460
2457
|
}),
|
|
2461
|
-
/* @__PURE__ */
|
|
2458
|
+
/* @__PURE__ */ j(F, {
|
|
2462
2459
|
visible: s,
|
|
2463
2460
|
transparent: !0,
|
|
2464
2461
|
animationType: "fade",
|
|
2465
2462
|
onRequestClose: () => c(!1),
|
|
2466
|
-
children: /* @__PURE__ */
|
|
2463
|
+
children: /* @__PURE__ */ j(B, {
|
|
2467
2464
|
style: Z.modalOverlay,
|
|
2468
2465
|
activeOpacity: 1,
|
|
2469
2466
|
onPress: () => c(!1),
|
|
2470
|
-
children: /* @__PURE__ */
|
|
2467
|
+
children: /* @__PURE__ */ M(V, {
|
|
2471
2468
|
style: [Z.modalContent, { backgroundColor: u.card }],
|
|
2472
2469
|
onStartShouldSetResponder: () => !0,
|
|
2473
2470
|
children: [
|
|
2474
|
-
/* @__PURE__ */
|
|
2471
|
+
/* @__PURE__ */ M(V, {
|
|
2475
2472
|
style: [Z.modalHeader, { borderBottomColor: u.border }],
|
|
2476
|
-
children: [/* @__PURE__ */
|
|
2473
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2477
2474
|
style: [Z.modalTitle, { color: u.text }],
|
|
2478
2475
|
children: i || e.data.name
|
|
2479
|
-
}), /* @__PURE__ */
|
|
2476
|
+
}), /* @__PURE__ */ j(B, {
|
|
2480
2477
|
onPress: () => c(!1),
|
|
2481
|
-
children: /* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ j(z, {
|
|
2482
2479
|
style: [Z.closeButton, { color: u.textMuted }],
|
|
2483
2480
|
children: "✕"
|
|
2484
2481
|
})
|
|
2485
2482
|
})]
|
|
2486
2483
|
}),
|
|
2487
|
-
/* @__PURE__ */
|
|
2484
|
+
/* @__PURE__ */ j(I, {
|
|
2488
2485
|
style: Z.optionsList,
|
|
2489
2486
|
children: d.map((e) => {
|
|
2490
|
-
let t =
|
|
2491
|
-
return /* @__PURE__ */
|
|
2487
|
+
let t = m.includes(e.value);
|
|
2488
|
+
return /* @__PURE__ */ M(B, {
|
|
2492
2489
|
style: [Z.option, t && { backgroundColor: `${u.primary}20` }],
|
|
2493
2490
|
onPress: () => h(e.value),
|
|
2494
2491
|
disabled: e.disabled,
|
|
2495
2492
|
activeOpacity: .7,
|
|
2496
|
-
children: [/* @__PURE__ */
|
|
2493
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2497
2494
|
style: [
|
|
2498
2495
|
Z.optionText,
|
|
2499
2496
|
{ color: u.textSecondary },
|
|
2500
2497
|
e.disabled && { color: u.textMuted }
|
|
2501
2498
|
],
|
|
2502
2499
|
children: l(e.label) || e.value
|
|
2503
|
-
}), t && /* @__PURE__ */
|
|
2500
|
+
}), t && /* @__PURE__ */ j(z, {
|
|
2504
2501
|
style: [Z.checkmark, { color: u.primary }],
|
|
2505
2502
|
children: "✓"
|
|
2506
2503
|
})]
|
|
2507
2504
|
}, e.value);
|
|
2508
2505
|
})
|
|
2509
2506
|
}),
|
|
2510
|
-
f && /* @__PURE__ */
|
|
2507
|
+
f && /* @__PURE__ */ j(B, {
|
|
2511
2508
|
style: [Z.doneButton, { backgroundColor: u.primary }],
|
|
2512
2509
|
onPress: () => c(!1),
|
|
2513
|
-
children: /* @__PURE__ */
|
|
2510
|
+
children: /* @__PURE__ */ j(z, {
|
|
2514
2511
|
style: Z.doneButtonText,
|
|
2515
2512
|
children: "Done"
|
|
2516
2513
|
})
|
|
@@ -2519,11 +2516,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2519
2516
|
})
|
|
2520
2517
|
})
|
|
2521
2518
|
}),
|
|
2522
|
-
r && /* @__PURE__ */
|
|
2519
|
+
r && /* @__PURE__ */ j(z, {
|
|
2523
2520
|
style: [Z.error, { color: u.error }],
|
|
2524
2521
|
children: r
|
|
2525
2522
|
}),
|
|
2526
|
-
o && !r && /* @__PURE__ */
|
|
2523
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2527
2524
|
style: [Z.helperText, { color: u.textMuted }],
|
|
2528
2525
|
children: o
|
|
2529
2526
|
})
|
|
@@ -2611,23 +2608,23 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2611
2608
|
flex: 1,
|
|
2612
2609
|
fontSize: 14
|
|
2613
2610
|
}
|
|
2614
|
-
}),
|
|
2615
|
-
let { colors: o } =
|
|
2616
|
-
return /* @__PURE__ */
|
|
2617
|
-
style:
|
|
2611
|
+
}), je = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2612
|
+
let { colors: o } = _(), s = !!t;
|
|
2613
|
+
return /* @__PURE__ */ M(V, {
|
|
2614
|
+
style: Me.container,
|
|
2618
2615
|
children: [
|
|
2619
|
-
/* @__PURE__ */
|
|
2620
|
-
style:
|
|
2621
|
-
children: [/* @__PURE__ */
|
|
2622
|
-
style:
|
|
2623
|
-
children: /* @__PURE__ */
|
|
2624
|
-
style: [
|
|
2625
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ M(V, {
|
|
2617
|
+
style: Me.row,
|
|
2618
|
+
children: [/* @__PURE__ */ j(V, {
|
|
2619
|
+
style: Me.labelContainer,
|
|
2620
|
+
children: /* @__PURE__ */ M(z, {
|
|
2621
|
+
style: [Me.label, { color: o.textSecondary }],
|
|
2622
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2626
2623
|
style: { color: o.error },
|
|
2627
2624
|
children: "*"
|
|
2628
2625
|
})]
|
|
2629
2626
|
})
|
|
2630
|
-
}), /* @__PURE__ */
|
|
2627
|
+
}), /* @__PURE__ */ j(R, {
|
|
2631
2628
|
trackColor: {
|
|
2632
2629
|
false: o.border,
|
|
2633
2630
|
true: `${o.primary}80`
|
|
@@ -2638,17 +2635,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2638
2635
|
value: s
|
|
2639
2636
|
})]
|
|
2640
2637
|
}),
|
|
2641
|
-
r && /* @__PURE__ */
|
|
2642
|
-
style: [
|
|
2638
|
+
r && /* @__PURE__ */ j(z, {
|
|
2639
|
+
style: [Me.error, { color: o.error }],
|
|
2643
2640
|
children: r
|
|
2644
2641
|
}),
|
|
2645
|
-
a && !r && /* @__PURE__ */
|
|
2646
|
-
style: [
|
|
2642
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
2643
|
+
style: [Me.helperText, { color: o.textMuted }],
|
|
2647
2644
|
children: a
|
|
2648
2645
|
})
|
|
2649
2646
|
]
|
|
2650
2647
|
});
|
|
2651
|
-
},
|
|
2648
|
+
}, Me = L.create({
|
|
2652
2649
|
container: { marginBottom: 16 },
|
|
2653
2650
|
error: {
|
|
2654
2651
|
fontSize: 12,
|
|
@@ -2668,21 +2665,21 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2668
2665
|
flexDirection: "row",
|
|
2669
2666
|
justifyContent: "space-between"
|
|
2670
2667
|
}
|
|
2671
|
-
}),
|
|
2672
|
-
let { colors: c } =
|
|
2673
|
-
return /* @__PURE__ */
|
|
2674
|
-
style:
|
|
2668
|
+
}), Ne = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2669
|
+
let { colors: c } = _();
|
|
2670
|
+
return /* @__PURE__ */ M(V, {
|
|
2671
|
+
style: Pe.container,
|
|
2675
2672
|
children: [
|
|
2676
|
-
/* @__PURE__ */
|
|
2677
|
-
style: [
|
|
2678
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2673
|
+
/* @__PURE__ */ M(z, {
|
|
2674
|
+
style: [Pe.label, { color: c.textSecondary }],
|
|
2675
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2679
2676
|
style: { color: c.error },
|
|
2680
2677
|
children: "*"
|
|
2681
2678
|
})]
|
|
2682
2679
|
}),
|
|
2683
|
-
/* @__PURE__ */
|
|
2680
|
+
/* @__PURE__ */ j(re, {
|
|
2684
2681
|
style: [
|
|
2685
|
-
|
|
2682
|
+
Pe.textarea,
|
|
2686
2683
|
{
|
|
2687
2684
|
backgroundColor: c.input,
|
|
2688
2685
|
borderColor: c.border,
|
|
@@ -2699,17 +2696,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2699
2696
|
textAlignVertical: "top",
|
|
2700
2697
|
accessibilityLabel: s
|
|
2701
2698
|
}),
|
|
2702
|
-
r && /* @__PURE__ */
|
|
2703
|
-
style: [
|
|
2699
|
+
r && /* @__PURE__ */ j(z, {
|
|
2700
|
+
style: [Pe.error, { color: c.error }],
|
|
2704
2701
|
children: r
|
|
2705
2702
|
}),
|
|
2706
|
-
o && !r && /* @__PURE__ */
|
|
2707
|
-
style: [
|
|
2703
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2704
|
+
style: [Pe.helperText, { color: c.textMuted }],
|
|
2708
2705
|
children: o
|
|
2709
2706
|
})
|
|
2710
2707
|
]
|
|
2711
2708
|
});
|
|
2712
|
-
},
|
|
2709
|
+
}, Pe = L.create({
|
|
2713
2710
|
container: { marginBottom: 16 },
|
|
2714
2711
|
error: {
|
|
2715
2712
|
fontSize: 12,
|
|
@@ -2732,21 +2729,21 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2732
2729
|
paddingHorizontal: 12,
|
|
2733
2730
|
paddingVertical: 8
|
|
2734
2731
|
}
|
|
2735
|
-
}),
|
|
2736
|
-
let { colors: c } =
|
|
2737
|
-
return /* @__PURE__ */
|
|
2738
|
-
style:
|
|
2732
|
+
}), Fe = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2733
|
+
let { colors: c } = _();
|
|
2734
|
+
return /* @__PURE__ */ M(V, {
|
|
2735
|
+
style: Ie.container,
|
|
2739
2736
|
children: [
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
style: [
|
|
2742
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ M(z, {
|
|
2738
|
+
style: [Ie.label, { color: c.textSecondary }],
|
|
2739
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2743
2740
|
style: { color: c.error },
|
|
2744
2741
|
children: "*"
|
|
2745
2742
|
})]
|
|
2746
2743
|
}),
|
|
2747
|
-
/* @__PURE__ */
|
|
2744
|
+
/* @__PURE__ */ j(re, {
|
|
2748
2745
|
style: [
|
|
2749
|
-
|
|
2746
|
+
Ie.input,
|
|
2750
2747
|
{
|
|
2751
2748
|
backgroundColor: c.input,
|
|
2752
2749
|
borderColor: c.border,
|
|
@@ -2760,17 +2757,17 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2760
2757
|
placeholderTextColor: c.textMuted,
|
|
2761
2758
|
accessibilityLabel: s
|
|
2762
2759
|
}),
|
|
2763
|
-
r && /* @__PURE__ */
|
|
2764
|
-
style: [
|
|
2760
|
+
r && /* @__PURE__ */ j(z, {
|
|
2761
|
+
style: [Ie.error, { color: c.error }],
|
|
2765
2762
|
children: r
|
|
2766
2763
|
}),
|
|
2767
|
-
o && !r && /* @__PURE__ */
|
|
2768
|
-
style: [
|
|
2764
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2765
|
+
style: [Ie.helperText, { color: c.textMuted }],
|
|
2769
2766
|
children: o
|
|
2770
2767
|
})
|
|
2771
2768
|
]
|
|
2772
2769
|
});
|
|
2773
|
-
},
|
|
2770
|
+
}, Ie = L.create({
|
|
2774
2771
|
container: { marginBottom: 16 },
|
|
2775
2772
|
error: {
|
|
2776
2773
|
fontSize: 12,
|
|
@@ -2792,25 +2789,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2792
2789
|
fontWeight: "500",
|
|
2793
2790
|
marginBottom: 8
|
|
2794
2791
|
}
|
|
2795
|
-
}),
|
|
2796
|
-
let [s, c] =
|
|
2797
|
-
n(`${String(
|
|
2792
|
+
}), Le = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2793
|
+
let [s, c] = A(!1), { colors: l } = _(), u = (t || "").split(":"), d = Number.parseInt(u[0], 10), f = Number.parseInt(u[1], 10), p = Number.isNaN(d) ? 0 : d, m = Number.isNaN(f) ? 0 : f, [h, g] = A(p || 0), [v, y] = A(m || 0), b = k(null), x = k(null), S = Array.from({ length: 24 }, (e, t) => t), C = Array.from({ length: 60 }, (e, t) => t), w = () => t || a || "Select time", T = E(() => {
|
|
2794
|
+
n(`${String(h).padStart(2, "0")}:${String(v).padStart(2, "0")}`), c(!1);
|
|
2798
2795
|
}, [
|
|
2799
|
-
|
|
2796
|
+
h,
|
|
2800
2797
|
v,
|
|
2801
2798
|
n
|
|
2802
2799
|
]);
|
|
2803
|
-
return /* @__PURE__ */
|
|
2800
|
+
return /* @__PURE__ */ M(V, {
|
|
2804
2801
|
style: Q.container,
|
|
2805
2802
|
children: [
|
|
2806
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ M(z, {
|
|
2807
2804
|
style: [Q.label, { color: l.textSecondary }],
|
|
2808
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
2805
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
2809
2806
|
style: { color: l.error },
|
|
2810
2807
|
children: "*"
|
|
2811
2808
|
})]
|
|
2812
2809
|
}),
|
|
2813
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ M(B, {
|
|
2814
2811
|
style: [
|
|
2815
2812
|
Q.trigger,
|
|
2816
2813
|
{
|
|
@@ -2820,10 +2817,10 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2820
2817
|
r && { borderColor: l.error }
|
|
2821
2818
|
],
|
|
2822
2819
|
onPress: () => {
|
|
2823
|
-
|
|
2820
|
+
g(p || 0), y(m || 0), c(!0);
|
|
2824
2821
|
},
|
|
2825
2822
|
activeOpacity: .7,
|
|
2826
|
-
children: [/* @__PURE__ */
|
|
2823
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2827
2824
|
style: [
|
|
2828
2825
|
Q.triggerText,
|
|
2829
2826
|
{ color: l.text },
|
|
@@ -2831,60 +2828,60 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2831
2828
|
],
|
|
2832
2829
|
numberOfLines: 1,
|
|
2833
2830
|
children: w()
|
|
2834
|
-
}), /* @__PURE__ */
|
|
2831
|
+
}), /* @__PURE__ */ j(z, {
|
|
2835
2832
|
style: Q.icon,
|
|
2836
2833
|
children: "🕐"
|
|
2837
2834
|
})]
|
|
2838
2835
|
}),
|
|
2839
|
-
/* @__PURE__ */
|
|
2836
|
+
/* @__PURE__ */ j(F, {
|
|
2840
2837
|
visible: s,
|
|
2841
2838
|
transparent: !0,
|
|
2842
2839
|
animationType: "fade",
|
|
2843
2840
|
onRequestClose: () => c(!1),
|
|
2844
|
-
children: /* @__PURE__ */
|
|
2841
|
+
children: /* @__PURE__ */ j(B, {
|
|
2845
2842
|
style: Q.modalOverlay,
|
|
2846
2843
|
activeOpacity: 1,
|
|
2847
2844
|
onPress: () => c(!1),
|
|
2848
|
-
children: /* @__PURE__ */
|
|
2845
|
+
children: /* @__PURE__ */ M(B, {
|
|
2849
2846
|
style: [Q.modalContent, { backgroundColor: l.card }],
|
|
2850
2847
|
activeOpacity: 1,
|
|
2851
2848
|
onPress: () => {},
|
|
2852
2849
|
children: [
|
|
2853
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ M(V, {
|
|
2854
2851
|
style: [Q.modalHeader, { borderBottomColor: l.separator }],
|
|
2855
|
-
children: [/* @__PURE__ */
|
|
2852
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2856
2853
|
style: [Q.modalTitle, { color: l.text }],
|
|
2857
2854
|
children: i || e.data.name
|
|
2858
|
-
}), /* @__PURE__ */
|
|
2855
|
+
}), /* @__PURE__ */ j(B, {
|
|
2859
2856
|
onPress: () => c(!1),
|
|
2860
|
-
children: /* @__PURE__ */
|
|
2857
|
+
children: /* @__PURE__ */ j(z, {
|
|
2861
2858
|
style: [Q.closeButton, { color: l.textMuted }],
|
|
2862
2859
|
children: "✕"
|
|
2863
2860
|
})
|
|
2864
2861
|
})]
|
|
2865
2862
|
}),
|
|
2866
|
-
/* @__PURE__ */
|
|
2863
|
+
/* @__PURE__ */ M(V, {
|
|
2867
2864
|
style: Q.pickerContainer,
|
|
2868
2865
|
children: [
|
|
2869
|
-
/* @__PURE__ */
|
|
2866
|
+
/* @__PURE__ */ M(V, {
|
|
2870
2867
|
style: Q.pickerColumn,
|
|
2871
|
-
children: [/* @__PURE__ */
|
|
2868
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2872
2869
|
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
2873
2870
|
children: "Hour"
|
|
2874
|
-
}), /* @__PURE__ */
|
|
2871
|
+
}), /* @__PURE__ */ j(I, {
|
|
2875
2872
|
ref: b,
|
|
2876
2873
|
style: Q.picker,
|
|
2877
2874
|
contentContainerStyle: Q.pickerContent,
|
|
2878
2875
|
showsVerticalScrollIndicator: !1,
|
|
2879
|
-
children: S.map((e) => /* @__PURE__ */
|
|
2880
|
-
style: [Q.pickerItem,
|
|
2881
|
-
onPress: () =>
|
|
2876
|
+
children: S.map((e) => /* @__PURE__ */ j(B, {
|
|
2877
|
+
style: [Q.pickerItem, h === e && { backgroundColor: l.primary }],
|
|
2878
|
+
onPress: () => g(e),
|
|
2882
2879
|
activeOpacity: .7,
|
|
2883
|
-
children: /* @__PURE__ */
|
|
2880
|
+
children: /* @__PURE__ */ j(z, {
|
|
2884
2881
|
style: [
|
|
2885
2882
|
Q.pickerItemText,
|
|
2886
2883
|
{ color: l.text },
|
|
2887
|
-
|
|
2884
|
+
h === e && {
|
|
2888
2885
|
color: l.background,
|
|
2889
2886
|
fontWeight: "600"
|
|
2890
2887
|
}
|
|
@@ -2894,25 +2891,25 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2894
2891
|
}, e))
|
|
2895
2892
|
})]
|
|
2896
2893
|
}),
|
|
2897
|
-
/* @__PURE__ */
|
|
2894
|
+
/* @__PURE__ */ j(z, {
|
|
2898
2895
|
style: [Q.pickerSeparator, { color: l.text }],
|
|
2899
2896
|
children: ":"
|
|
2900
2897
|
}),
|
|
2901
|
-
/* @__PURE__ */
|
|
2898
|
+
/* @__PURE__ */ M(V, {
|
|
2902
2899
|
style: Q.pickerColumn,
|
|
2903
|
-
children: [/* @__PURE__ */
|
|
2900
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2904
2901
|
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
2905
2902
|
children: "Minute"
|
|
2906
|
-
}), /* @__PURE__ */
|
|
2903
|
+
}), /* @__PURE__ */ j(I, {
|
|
2907
2904
|
ref: x,
|
|
2908
2905
|
style: Q.picker,
|
|
2909
2906
|
contentContainerStyle: Q.pickerContent,
|
|
2910
2907
|
showsVerticalScrollIndicator: !1,
|
|
2911
|
-
children: C.map((e) => /* @__PURE__ */
|
|
2908
|
+
children: C.map((e) => /* @__PURE__ */ j(B, {
|
|
2912
2909
|
style: [Q.pickerItem, v === e && { backgroundColor: l.primary }],
|
|
2913
2910
|
onPress: () => y(e),
|
|
2914
2911
|
activeOpacity: .7,
|
|
2915
|
-
children: /* @__PURE__ */
|
|
2912
|
+
children: /* @__PURE__ */ j(z, {
|
|
2916
2913
|
style: [
|
|
2917
2914
|
Q.pickerItemText,
|
|
2918
2915
|
{ color: l.text },
|
|
@@ -2928,11 +2925,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2928
2925
|
})
|
|
2929
2926
|
]
|
|
2930
2927
|
}),
|
|
2931
|
-
/* @__PURE__ */
|
|
2928
|
+
/* @__PURE__ */ j(B, {
|
|
2932
2929
|
style: [Q.confirmButton, { backgroundColor: l.primary }],
|
|
2933
2930
|
onPress: T,
|
|
2934
2931
|
activeOpacity: .7,
|
|
2935
|
-
children: /* @__PURE__ */
|
|
2932
|
+
children: /* @__PURE__ */ j(z, {
|
|
2936
2933
|
style: [Q.confirmButtonText, { color: l.background }],
|
|
2937
2934
|
children: "Confirm"
|
|
2938
2935
|
})
|
|
@@ -2941,11 +2938,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
2941
2938
|
})
|
|
2942
2939
|
})
|
|
2943
2940
|
}),
|
|
2944
|
-
r && /* @__PURE__ */
|
|
2941
|
+
r && /* @__PURE__ */ j(z, {
|
|
2945
2942
|
style: [Q.error, { color: l.error }],
|
|
2946
2943
|
children: r
|
|
2947
2944
|
}),
|
|
2948
|
-
o && !r && /* @__PURE__ */
|
|
2945
|
+
o && !r && /* @__PURE__ */ j(z, {
|
|
2949
2946
|
style: [Q.helperText, { color: l.textMuted }],
|
|
2950
2947
|
children: o
|
|
2951
2948
|
})
|
|
@@ -3042,31 +3039,31 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3042
3039
|
flex: 1,
|
|
3043
3040
|
fontSize: 14
|
|
3044
3041
|
}
|
|
3045
|
-
}),
|
|
3046
|
-
let [o, s] =
|
|
3047
|
-
let e = `${String(D).padStart(2, "0")}:${String(
|
|
3048
|
-
c ? (n([e, h]), l(!1),
|
|
3042
|
+
}), Re = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
3043
|
+
let [o, s] = A(!1), [c, l] = A(!0), u = p(), { colors: d } = _(), f = Array.isArray(t) ? t : [], m = f[0] || "", h = f[1] || "", g = m.split(":"), v = Number.parseInt(g[0], 10), y = Number.parseInt(g[1], 10), b = Number.isNaN(v) ? 0 : v, x = Number.isNaN(y) ? 0 : y, S = h.split(":"), C = Number.parseInt(S[0], 10), w = Number.parseInt(S[1], 10), T = Number.isNaN(C) ? 0 : C, ee = Number.isNaN(w) ? 0 : w, [D, O] = A(0), [k, N] = A(0), te = Array.from({ length: 24 }, (e, t) => t), ne = Array.from({ length: 60 }, (e, t) => t), P = () => m && h ? `${m} - ${h}` : m || u("renderer.defaultInputs.selectDateRange"), L = E(() => {
|
|
3044
|
+
let e = `${String(D).padStart(2, "0")}:${String(k).padStart(2, "0")}`;
|
|
3045
|
+
c ? (n([e, h]), l(!1), O(T || 0), N(ee || 0)) : (n([m, e]), s(!1), l(!0));
|
|
3049
3046
|
}, [
|
|
3050
3047
|
c,
|
|
3051
3048
|
D,
|
|
3052
|
-
|
|
3053
|
-
|
|
3049
|
+
k,
|
|
3050
|
+
m,
|
|
3054
3051
|
h,
|
|
3055
3052
|
T,
|
|
3056
|
-
|
|
3053
|
+
ee,
|
|
3057
3054
|
n
|
|
3058
3055
|
]);
|
|
3059
|
-
return /* @__PURE__ */
|
|
3056
|
+
return /* @__PURE__ */ M(V, {
|
|
3060
3057
|
style: $.container,
|
|
3061
3058
|
children: [
|
|
3062
|
-
/* @__PURE__ */
|
|
3059
|
+
/* @__PURE__ */ M(z, {
|
|
3063
3060
|
style: [$.label, { color: d.textSecondary }],
|
|
3064
|
-
children: [i || e.data.name, e.data.required && /* @__PURE__ */
|
|
3061
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ j(z, {
|
|
3065
3062
|
style: { color: d.error },
|
|
3066
3063
|
children: "*"
|
|
3067
3064
|
})]
|
|
3068
3065
|
}),
|
|
3069
|
-
/* @__PURE__ */
|
|
3066
|
+
/* @__PURE__ */ M(B, {
|
|
3070
3067
|
style: [
|
|
3071
3068
|
$.trigger,
|
|
3072
3069
|
{
|
|
@@ -3076,73 +3073,73 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3076
3073
|
r && { borderColor: d.error }
|
|
3077
3074
|
],
|
|
3078
3075
|
onPress: () => {
|
|
3079
|
-
|
|
3076
|
+
O(b || 0), N(x || 0), l(!0), s(!0);
|
|
3080
3077
|
},
|
|
3081
3078
|
activeOpacity: .7,
|
|
3082
|
-
children: [/* @__PURE__ */
|
|
3079
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3083
3080
|
style: [
|
|
3084
3081
|
$.triggerText,
|
|
3085
3082
|
{ color: d.text },
|
|
3086
|
-
!
|
|
3083
|
+
!m && { color: d.textMuted }
|
|
3087
3084
|
],
|
|
3088
3085
|
numberOfLines: 1,
|
|
3089
|
-
children:
|
|
3090
|
-
}), /* @__PURE__ */
|
|
3086
|
+
children: P()
|
|
3087
|
+
}), /* @__PURE__ */ j(z, {
|
|
3091
3088
|
style: $.icon,
|
|
3092
3089
|
children: "🕐"
|
|
3093
3090
|
})]
|
|
3094
3091
|
}),
|
|
3095
|
-
/* @__PURE__ */
|
|
3092
|
+
/* @__PURE__ */ j(F, {
|
|
3096
3093
|
visible: o,
|
|
3097
3094
|
transparent: !0,
|
|
3098
3095
|
animationType: "fade",
|
|
3099
3096
|
onRequestClose: () => s(!1),
|
|
3100
|
-
children: /* @__PURE__ */
|
|
3097
|
+
children: /* @__PURE__ */ j(B, {
|
|
3101
3098
|
style: $.modalOverlay,
|
|
3102
3099
|
activeOpacity: 1,
|
|
3103
3100
|
onPress: () => s(!1),
|
|
3104
|
-
children: /* @__PURE__ */
|
|
3101
|
+
children: /* @__PURE__ */ M(B, {
|
|
3105
3102
|
style: [$.modalContent, { backgroundColor: d.card }],
|
|
3106
3103
|
activeOpacity: 1,
|
|
3107
3104
|
onPress: () => {},
|
|
3108
3105
|
children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
3106
|
+
/* @__PURE__ */ M(V, {
|
|
3110
3107
|
style: [$.modalHeader, { borderBottomColor: d.separator }],
|
|
3111
|
-
children: [/* @__PURE__ */
|
|
3108
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3112
3109
|
style: [$.modalTitle, { color: d.text }],
|
|
3113
3110
|
children: i || e.data.name
|
|
3114
|
-
}), /* @__PURE__ */
|
|
3111
|
+
}), /* @__PURE__ */ j(B, {
|
|
3115
3112
|
onPress: () => s(!1),
|
|
3116
|
-
children: /* @__PURE__ */
|
|
3113
|
+
children: /* @__PURE__ */ j(z, {
|
|
3117
3114
|
style: [$.closeButton, { color: d.textMuted }],
|
|
3118
3115
|
children: "✕"
|
|
3119
3116
|
})
|
|
3120
3117
|
})]
|
|
3121
3118
|
}),
|
|
3122
|
-
/* @__PURE__ */
|
|
3119
|
+
/* @__PURE__ */ j(V, {
|
|
3123
3120
|
style: [$.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
3124
|
-
children: /* @__PURE__ */
|
|
3121
|
+
children: /* @__PURE__ */ j(z, {
|
|
3125
3122
|
style: [$.rangeIndicatorText, { color: d.primary }],
|
|
3126
3123
|
children: u(c ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3127
3124
|
})
|
|
3128
3125
|
}),
|
|
3129
|
-
/* @__PURE__ */
|
|
3126
|
+
/* @__PURE__ */ M(V, {
|
|
3130
3127
|
style: $.pickerContainer,
|
|
3131
3128
|
children: [
|
|
3132
|
-
/* @__PURE__ */
|
|
3129
|
+
/* @__PURE__ */ M(V, {
|
|
3133
3130
|
style: $.pickerColumn,
|
|
3134
|
-
children: [/* @__PURE__ */
|
|
3131
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3135
3132
|
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3136
3133
|
children: "Hour"
|
|
3137
|
-
}), /* @__PURE__ */
|
|
3134
|
+
}), /* @__PURE__ */ j(I, {
|
|
3138
3135
|
style: $.picker,
|
|
3139
3136
|
contentContainerStyle: $.pickerContent,
|
|
3140
3137
|
showsVerticalScrollIndicator: !1,
|
|
3141
|
-
children:
|
|
3138
|
+
children: te.map((e) => /* @__PURE__ */ j(B, {
|
|
3142
3139
|
style: [$.pickerItem, D === e && { backgroundColor: d.primary }],
|
|
3143
|
-
onPress: () =>
|
|
3140
|
+
onPress: () => O(e),
|
|
3144
3141
|
activeOpacity: .7,
|
|
3145
|
-
children: /* @__PURE__ */
|
|
3142
|
+
children: /* @__PURE__ */ j(z, {
|
|
3146
3143
|
style: [
|
|
3147
3144
|
$.pickerItemText,
|
|
3148
3145
|
{ color: d.text },
|
|
@@ -3156,28 +3153,28 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3156
3153
|
}, e))
|
|
3157
3154
|
})]
|
|
3158
3155
|
}),
|
|
3159
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ j(z, {
|
|
3160
3157
|
style: [$.pickerSeparator, { color: d.text }],
|
|
3161
3158
|
children: ":"
|
|
3162
3159
|
}),
|
|
3163
|
-
/* @__PURE__ */
|
|
3160
|
+
/* @__PURE__ */ M(V, {
|
|
3164
3161
|
style: $.pickerColumn,
|
|
3165
|
-
children: [/* @__PURE__ */
|
|
3162
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3166
3163
|
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3167
3164
|
children: "Minute"
|
|
3168
|
-
}), /* @__PURE__ */
|
|
3165
|
+
}), /* @__PURE__ */ j(I, {
|
|
3169
3166
|
style: $.picker,
|
|
3170
3167
|
contentContainerStyle: $.pickerContent,
|
|
3171
3168
|
showsVerticalScrollIndicator: !1,
|
|
3172
|
-
children:
|
|
3173
|
-
style: [$.pickerItem,
|
|
3169
|
+
children: ne.map((e) => /* @__PURE__ */ j(B, {
|
|
3170
|
+
style: [$.pickerItem, k === e && { backgroundColor: d.primary }],
|
|
3174
3171
|
onPress: () => N(e),
|
|
3175
3172
|
activeOpacity: .7,
|
|
3176
|
-
children: /* @__PURE__ */
|
|
3173
|
+
children: /* @__PURE__ */ j(z, {
|
|
3177
3174
|
style: [
|
|
3178
3175
|
$.pickerItemText,
|
|
3179
3176
|
{ color: d.text },
|
|
3180
|
-
|
|
3177
|
+
k === e && {
|
|
3181
3178
|
color: d.background,
|
|
3182
3179
|
fontWeight: "600"
|
|
3183
3180
|
}
|
|
@@ -3189,11 +3186,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3189
3186
|
})
|
|
3190
3187
|
]
|
|
3191
3188
|
}),
|
|
3192
|
-
/* @__PURE__ */
|
|
3189
|
+
/* @__PURE__ */ j(B, {
|
|
3193
3190
|
style: [$.confirmButton, { backgroundColor: d.primary }],
|
|
3194
|
-
onPress:
|
|
3191
|
+
onPress: L,
|
|
3195
3192
|
activeOpacity: .7,
|
|
3196
|
-
children: /* @__PURE__ */
|
|
3193
|
+
children: /* @__PURE__ */ j(z, {
|
|
3197
3194
|
style: [$.confirmButtonText, { color: d.background }],
|
|
3198
3195
|
children: c ? "Next" : "Confirm"
|
|
3199
3196
|
})
|
|
@@ -3202,11 +3199,11 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3202
3199
|
})
|
|
3203
3200
|
})
|
|
3204
3201
|
}),
|
|
3205
|
-
r && /* @__PURE__ */
|
|
3202
|
+
r && /* @__PURE__ */ j(z, {
|
|
3206
3203
|
style: [$.error, { color: d.error }],
|
|
3207
3204
|
children: r
|
|
3208
3205
|
}),
|
|
3209
|
-
a && !r && /* @__PURE__ */
|
|
3206
|
+
a && !r && /* @__PURE__ */ j(z, {
|
|
3210
3207
|
style: [$.helperText, { color: d.textMuted }],
|
|
3211
3208
|
children: a
|
|
3212
3209
|
})
|
|
@@ -3313,34 +3310,34 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3313
3310
|
flex: 1,
|
|
3314
3311
|
fontSize: 14
|
|
3315
3312
|
}
|
|
3316
|
-
}),
|
|
3313
|
+
}), ze = ({ node: e }) => /* @__PURE__ */ M(z, { children: [
|
|
3317
3314
|
"TODO: Implement ",
|
|
3318
3315
|
e.data.type,
|
|
3319
3316
|
" input for React Native"
|
|
3320
|
-
] }),
|
|
3321
|
-
address:
|
|
3322
|
-
autocomplete:
|
|
3323
|
-
checkbox:
|
|
3324
|
-
date:
|
|
3325
|
-
daterange:
|
|
3326
|
-
file:
|
|
3327
|
-
hidden:
|
|
3328
|
-
http:
|
|
3329
|
-
number:
|
|
3330
|
-
password:
|
|
3331
|
-
radio:
|
|
3332
|
-
select:
|
|
3333
|
-
submit:
|
|
3334
|
-
switch:
|
|
3335
|
-
text:
|
|
3336
|
-
textarea:
|
|
3337
|
-
time:
|
|
3338
|
-
timerange:
|
|
3339
|
-
},
|
|
3340
|
-
let { colors: i } =
|
|
3341
|
-
return /* @__PURE__ */
|
|
3317
|
+
] }), Be = {
|
|
3318
|
+
address: ue,
|
|
3319
|
+
autocomplete: U,
|
|
3320
|
+
checkbox: de,
|
|
3321
|
+
date: fe,
|
|
3322
|
+
daterange: pe,
|
|
3323
|
+
file: me,
|
|
3324
|
+
hidden: he,
|
|
3325
|
+
http: we,
|
|
3326
|
+
number: Te,
|
|
3327
|
+
password: De,
|
|
3328
|
+
radio: ke,
|
|
3329
|
+
select: Ae,
|
|
3330
|
+
submit: ze,
|
|
3331
|
+
switch: je,
|
|
3332
|
+
text: Fe,
|
|
3333
|
+
textarea: Ne,
|
|
3334
|
+
time: Le,
|
|
3335
|
+
timerange: Re
|
|
3336
|
+
}, Ve = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3337
|
+
let { colors: i } = _();
|
|
3338
|
+
return /* @__PURE__ */ j(B, {
|
|
3342
3339
|
style: [
|
|
3343
|
-
|
|
3340
|
+
He.button,
|
|
3344
3341
|
{ backgroundColor: i.primary },
|
|
3345
3342
|
(t || n) && {
|
|
3346
3343
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3350,12 +3347,12 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3350
3347
|
disabled: t || n,
|
|
3351
3348
|
onPress: r,
|
|
3352
3349
|
activeOpacity: .7,
|
|
3353
|
-
children: n ? /* @__PURE__ */
|
|
3354
|
-
style: [
|
|
3350
|
+
children: n ? /* @__PURE__ */ j(N, { color: i.primaryForeground }) : /* @__PURE__ */ j(z, {
|
|
3351
|
+
style: [He.buttonText, { color: i.primaryForeground }],
|
|
3355
3352
|
children: e
|
|
3356
3353
|
})
|
|
3357
3354
|
});
|
|
3358
|
-
},
|
|
3355
|
+
}, He = L.create({
|
|
3359
3356
|
button: {
|
|
3360
3357
|
alignItems: "center",
|
|
3361
3358
|
borderRadius: 6,
|
|
@@ -3368,16 +3365,16 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3368
3365
|
fontSize: 16,
|
|
3369
3366
|
fontWeight: "600"
|
|
3370
3367
|
}
|
|
3371
|
-
}),
|
|
3372
|
-
let t =
|
|
3373
|
-
return /* @__PURE__ */
|
|
3374
|
-
style: [
|
|
3368
|
+
}), Ue = ({ children: e }) => e, We = ({ node: e }) => {
|
|
3369
|
+
let t = p(), { colors: n } = _(), r = t(e.data?.label);
|
|
3370
|
+
return /* @__PURE__ */ j(z, {
|
|
3371
|
+
style: [Ke.title, { color: n.text }],
|
|
3375
3372
|
children: r
|
|
3376
3373
|
});
|
|
3377
|
-
},
|
|
3378
|
-
let { colors: e } =
|
|
3379
|
-
return /* @__PURE__ */
|
|
3380
|
-
},
|
|
3374
|
+
}, Ge = () => {
|
|
3375
|
+
let { colors: e } = _();
|
|
3376
|
+
return /* @__PURE__ */ j(V, { style: [Ke.divider, { backgroundColor: e.separator }] });
|
|
3377
|
+
}, Ke = L.create({
|
|
3381
3378
|
divider: {
|
|
3382
3379
|
height: 1,
|
|
3383
3380
|
marginBottom: 16,
|
|
@@ -3388,89 +3385,104 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3388
3385
|
fontWeight: "700",
|
|
3389
3386
|
marginBottom: 16
|
|
3390
3387
|
}
|
|
3391
|
-
}),
|
|
3392
|
-
divider:
|
|
3393
|
-
title:
|
|
3394
|
-
},
|
|
3395
|
-
let {
|
|
3388
|
+
}), qe = {
|
|
3389
|
+
divider: Ge,
|
|
3390
|
+
title: We
|
|
3391
|
+
}, Je = ({ node: e, children: t }) => {
|
|
3392
|
+
let { image: n } = e.data;
|
|
3393
|
+
return /* @__PURE__ */ M(V, { children: [n && /* @__PURE__ */ j(P, {
|
|
3394
|
+
source: { uri: n },
|
|
3395
|
+
style: Ye.image,
|
|
3396
|
+
resizeMode: "cover"
|
|
3397
|
+
}), t] });
|
|
3398
|
+
}, Ye = L.create({ image: {
|
|
3399
|
+
borderRadius: 6,
|
|
3400
|
+
height: 160,
|
|
3401
|
+
marginBottom: 8,
|
|
3402
|
+
width: "100%"
|
|
3403
|
+
} }), Xe = ({ components: e, contentContainerStyle: t, flows: n, googleApiKey: r, headers: i, initialValues: a, language: o, onChange: s, onSubmit: c, style: l, theme: u, validate: d, validationMode: f }) => {
|
|
3404
|
+
let { colors: p } = _(), { canSubmit: h, clearSubmitMessage: g, config: v, formErrors: y, formValues: x, handleSubmit: S, inputNodes: w, isSubmitting: T, mergedFlow: ee, missingRequiredFields: E, setFieldValue: D, submitMessage: O, t: k, visibleNodes: A, visibleRootNodes: N } = m({
|
|
3396
3405
|
components: e,
|
|
3397
3406
|
flows: n,
|
|
3398
3407
|
googleApiKey: r,
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3408
|
+
headers: i,
|
|
3409
|
+
initialValues: a,
|
|
3410
|
+
language: o,
|
|
3411
|
+
onChange: s,
|
|
3412
|
+
onSubmit: c,
|
|
3413
|
+
theme: u,
|
|
3414
|
+
validate: d,
|
|
3405
3415
|
validationMode: f
|
|
3406
|
-
}), { FormWrapper:
|
|
3407
|
-
config:
|
|
3408
|
-
DefaultFormWrapper:
|
|
3409
|
-
DefaultGroup:
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3416
|
+
}), { FormWrapper: te, SubmitButton: ne, SubmitButtonWrapper: P, renderNode: F } = b({
|
|
3417
|
+
config: v,
|
|
3418
|
+
DefaultFormWrapper: ie,
|
|
3419
|
+
DefaultGroup: oe,
|
|
3420
|
+
DefaultInputWrapper: Je,
|
|
3421
|
+
DefaultSubmitButton: Ve,
|
|
3422
|
+
DefaultSubmitButtonWrapper: Ue,
|
|
3423
|
+
defaultInputRenderers: Be,
|
|
3424
|
+
defaultUI: qe,
|
|
3425
|
+
formErrors: y,
|
|
3415
3426
|
formValues: x,
|
|
3416
|
-
missingRequiredFields:
|
|
3417
|
-
setFieldValue:
|
|
3418
|
-
visibleNodes:
|
|
3427
|
+
missingRequiredFields: E,
|
|
3428
|
+
setFieldValue: D,
|
|
3429
|
+
visibleNodes: A
|
|
3419
3430
|
});
|
|
3420
|
-
return /* @__PURE__ */
|
|
3431
|
+
return /* @__PURE__ */ j(I, {
|
|
3421
3432
|
nestedScrollEnabled: !0,
|
|
3422
3433
|
style: [
|
|
3423
|
-
|
|
3434
|
+
Qe.container,
|
|
3424
3435
|
{ backgroundColor: p.background },
|
|
3425
|
-
|
|
3436
|
+
l
|
|
3426
3437
|
],
|
|
3427
3438
|
contentContainerStyle: t,
|
|
3428
|
-
children: /* @__PURE__ */
|
|
3439
|
+
children: /* @__PURE__ */ M(C, {
|
|
3429
3440
|
value: {
|
|
3430
3441
|
flows: ee,
|
|
3431
|
-
formErrors:
|
|
3442
|
+
formErrors: y,
|
|
3432
3443
|
formValues: x,
|
|
3433
|
-
googleApiKey:
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3444
|
+
googleApiKey: v.googleApiKey,
|
|
3445
|
+
headers: v.headers,
|
|
3446
|
+
inputNodes: w,
|
|
3447
|
+
language: v.language,
|
|
3448
|
+
setFieldValue: D
|
|
3437
3449
|
},
|
|
3438
|
-
children: [/* @__PURE__ */
|
|
3450
|
+
children: [/* @__PURE__ */ M(te, {
|
|
3439
3451
|
onSubmit: S,
|
|
3440
3452
|
children: [
|
|
3441
|
-
|
|
3442
|
-
h && /* @__PURE__ */
|
|
3443
|
-
missingFields:
|
|
3444
|
-
children: /* @__PURE__ */
|
|
3453
|
+
N.map((e) => F(e)),
|
|
3454
|
+
h && /* @__PURE__ */ j(P, {
|
|
3455
|
+
missingFields: E,
|
|
3456
|
+
children: /* @__PURE__ */ j(ne, {
|
|
3445
3457
|
onPress: S,
|
|
3446
|
-
disabled:
|
|
3447
|
-
isSubmitting:
|
|
3448
|
-
children:
|
|
3458
|
+
disabled: T,
|
|
3459
|
+
isSubmitting: T,
|
|
3460
|
+
children: k("renderer.defaultSubmitButton.submit")
|
|
3449
3461
|
})
|
|
3450
3462
|
}),
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
style: [
|
|
3463
|
+
/* @__PURE__ */ j(z, {
|
|
3464
|
+
style: [Qe.poweredBy, { color: p.textMuted }],
|
|
3453
3465
|
children: "Powered by Treege"
|
|
3454
3466
|
})
|
|
3455
3467
|
]
|
|
3456
|
-
}),
|
|
3457
|
-
style: [
|
|
3458
|
-
children: [/* @__PURE__ */
|
|
3459
|
-
style: [
|
|
3460
|
-
children:
|
|
3461
|
-
}), /* @__PURE__ */
|
|
3462
|
-
style: [
|
|
3463
|
-
onPress:
|
|
3464
|
-
children:
|
|
3468
|
+
}), O && /* @__PURE__ */ M(V, {
|
|
3469
|
+
style: [Qe.message, { backgroundColor: O.type === "success" ? p.successBg : p.errorBg }],
|
|
3470
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3471
|
+
style: [Qe.messageText, { color: O.type === "success" ? p.success : p.error }],
|
|
3472
|
+
children: O.message
|
|
3473
|
+
}), /* @__PURE__ */ j(z, {
|
|
3474
|
+
style: [Qe.messageClose, { color: O.type === "success" ? p.success : p.error }],
|
|
3475
|
+
onPress: g,
|
|
3476
|
+
children: k("common.close")
|
|
3465
3477
|
})]
|
|
3466
3478
|
})]
|
|
3467
3479
|
})
|
|
3468
3480
|
});
|
|
3469
|
-
},
|
|
3481
|
+
}, Ze = (e) => /* @__PURE__ */ j(S, {
|
|
3470
3482
|
theme: e.theme,
|
|
3471
3483
|
storageKey: "treege-renderer-theme",
|
|
3472
|
-
children: /* @__PURE__ */
|
|
3473
|
-
}),
|
|
3484
|
+
children: /* @__PURE__ */ j(Xe, { ...e })
|
|
3485
|
+
}), Qe = L.create({
|
|
3474
3486
|
container: { flex: 1 },
|
|
3475
3487
|
message: {
|
|
3476
3488
|
borderRadius: 6,
|
|
@@ -3493,4 +3505,4 @@ var ne = ({ children: e }) => /* @__PURE__ */ k(V, {
|
|
|
3493
3505
|
}
|
|
3494
3506
|
});
|
|
3495
3507
|
//#endregion
|
|
3496
|
-
export {
|
|
3508
|
+
export { ue as DefaultAddressInput, U as DefaultAutocompleteInput, de as DefaultCheckboxInput, fe as DefaultDateInput, pe as DefaultDateRangeInput, Ge as DefaultDividerUI, me as DefaultFileInput, he as DefaultHiddenInput, we as DefaultHttpInput, Te as DefaultNumberInput, De as DefaultPasswordInput, ke as DefaultRadioInput, Ae as DefaultSelectInput, ze as DefaultSubmitInput, je as DefaultSwitchInput, Fe as DefaultTextInput, Ne as DefaultTextareaInput, Le as DefaultTimeInput, Re as DefaultTimeRangeInput, We as DefaultTitleUI, l as TreegeConfigProvider, Ze as TreegeRenderer, w as applyReferenceTransformation, c as calculateReferenceFieldUpdates, n as checkFormFieldHasValue, t as convertFormValuesToNamedFormat, Be as defaultInputRenderers, qe as defaultUI, r as evaluateCondition, i as evaluateConditions, x as fileToSerializable, d as filesToSerializable, u as findStartNode, T as getFlowRenderState, o as getTranslatedText, a as isFieldEmpty, s as isStartNode, e as mergeFlows, ve as sanitize, be as sanitizeHttpResponse, g as serializableToFile, v as useTreegeConfig, m as useTreegeRenderer };
|