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