treege 3.0.0-beta.71 → 3.0.0-beta.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{DefaultSubmitButton-C_141kVj.js → DefaultSubmitButton-VU_Lwicd.js} +580 -575
- package/dist/{ThemeContext-BGeTYtnw.js → ThemeContext-CmyrtNyt.js} +64 -48
- package/dist/{editor-CkCA6_WX.js → editor-DLXwqtbI.js} +1884 -1882
- package/dist/editor.js +2 -2
- package/dist/main.js +6 -6
- package/dist/renderer/utils/http.d.ts +16 -0
- package/dist/renderer-native.js +1091 -1086
- package/dist/{renderer-D5xQw7hp.js → renderer-pYP47xsl.js} +22 -22
- package/dist/renderer.js +5 -5
- package/dist/shared/locales/ar.json.d.ts +1 -0
- package/dist/shared/locales/de.json.d.ts +1 -0
- package/dist/shared/locales/en.json.d.ts +1 -0
- package/dist/shared/locales/es.json.d.ts +1 -0
- package/dist/shared/locales/fr.json.d.ts +1 -0
- package/dist/shared/locales/it.json.d.ts +1 -0
- package/dist/shared/locales/pt.json.d.ts +1 -0
- package/dist/{useRenderNode-eqCek6JX.js → useRenderNode-D1d8JGbe.js} +154 -154
- package/package.json +1 -1
package/dist/renderer-native.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as C, c as w, i as T, l as E, n as
|
|
3
|
-
import { useCallback as
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { ActivityIndicator as
|
|
1
|
+
import { B as e, C as t, D as n, E as r, M as i, N as a, O as o, R as s, a as c, c as l, g as u, h as d, i as f, k as p, l as m, m as h, n as g, o as _, r as v, s as y, t as b, v as x, x as S, y as ee } from "./ThemeContext-CmyrtNyt.js";
|
|
2
|
+
import { a as C, c as w, i as T, l as E, n as te, o as D, r as O, s as k, t as ne } from "./useRenderNode-D1d8JGbe.js";
|
|
3
|
+
import { useCallback as re, useEffect as A, useMemo as ie, useRef as j, useState as M } from "react";
|
|
4
|
+
import { Fragment as ae, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
5
|
+
import { ActivityIndicator as oe, Alert as se, Animated as F, FlatList as ce, Image as I, Modal as L, ScrollView as R, StyleSheet as z, Switch as le, Text as B, TextInput as ue, TouchableOpacity as V, View as H } from "react-native";
|
|
6
6
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
7
|
-
var
|
|
8
|
-
style:
|
|
7
|
+
var de = ({ children: e }) => /* @__PURE__ */ N(H, {
|
|
8
|
+
style: fe.container,
|
|
9
9
|
children: e
|
|
10
|
-
}),
|
|
10
|
+
}), fe = z.create({ container: { padding: 16 } }), pe = async (e, t) => {
|
|
11
11
|
if (!e || e.trim().length < 3) return [];
|
|
12
12
|
try {
|
|
13
13
|
let n = await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(e)}&format=jsonv2&addressdetails=1&limit=5`, { headers: {
|
|
@@ -22,7 +22,7 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
22
22
|
} catch (e) {
|
|
23
23
|
return console.error("Nominatim fetch error:", e), [];
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, me = async (e, t) => {
|
|
26
26
|
if (!e || e.trim().length < 3) return [];
|
|
27
27
|
try {
|
|
28
28
|
let n = await fetch(`https://maps.googleapis.com/maps/api/place/autocomplete/json?input=${encodeURIComponent(e)}&key=${t}`);
|
|
@@ -35,147 +35,147 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
35
35
|
} catch (e) {
|
|
36
36
|
return console.error("Google Places fetch error:", e), [];
|
|
37
37
|
}
|
|
38
|
-
},
|
|
39
|
-
let [n, r] =
|
|
40
|
-
v(e.value), r(""),
|
|
41
|
-
}, [v]),
|
|
42
|
-
|
|
38
|
+
}, he = ({ field: e, extra: t }) => {
|
|
39
|
+
let [n, r] = M(""), [i, o] = M([]), [s, c] = M(!1), [l, u] = M(!1), { value: d, placeholder: f, id: m, name: h } = e, { node: _, setValue: v, error: y, label: b, helperText: x } = t, { language: S, googleApiKey: ee } = a(), C = p(), { colors: w } = g(), T = re((e) => {
|
|
40
|
+
v(e.value), r(""), c(!1), o([]);
|
|
41
|
+
}, [v]), E = () => {
|
|
42
|
+
c(!1);
|
|
43
43
|
};
|
|
44
|
-
return
|
|
44
|
+
return A(() => {
|
|
45
45
|
if (!n || n.trim().length < 3) {
|
|
46
|
-
|
|
46
|
+
o([]), u(!1);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
u(!0);
|
|
50
50
|
let e = setTimeout(async () => {
|
|
51
|
-
|
|
51
|
+
o(ee ? await me(n, ee) : await pe(n, S)), u(!1);
|
|
52
52
|
}, 300);
|
|
53
53
|
return () => {
|
|
54
|
-
clearTimeout(e),
|
|
54
|
+
clearTimeout(e), u(!1);
|
|
55
55
|
};
|
|
56
56
|
}, [
|
|
57
57
|
n,
|
|
58
58
|
S,
|
|
59
|
-
|
|
60
|
-
]), /* @__PURE__ */
|
|
59
|
+
ee
|
|
60
|
+
]), /* @__PURE__ */ P(H, {
|
|
61
61
|
style: U.container,
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
style: [U.label, { color:
|
|
65
|
-
children: [b || _.data.name, _.data.required && /* @__PURE__ */
|
|
66
|
-
style: { color:
|
|
63
|
+
/* @__PURE__ */ P(B, {
|
|
64
|
+
style: [U.label, { color: w.textSecondary }],
|
|
65
|
+
children: [b || _.data.name, _.data.required && /* @__PURE__ */ N(B, {
|
|
66
|
+
style: { color: w.error },
|
|
67
67
|
children: "*"
|
|
68
68
|
})]
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ P(V, {
|
|
71
71
|
style: [
|
|
72
72
|
U.trigger,
|
|
73
73
|
{
|
|
74
|
-
backgroundColor:
|
|
75
|
-
borderColor:
|
|
74
|
+
backgroundColor: w.input,
|
|
75
|
+
borderColor: w.border
|
|
76
76
|
},
|
|
77
|
-
y && { borderColor:
|
|
77
|
+
y && { borderColor: w.error }
|
|
78
78
|
],
|
|
79
|
-
onPress: () =>
|
|
79
|
+
onPress: () => c(!0),
|
|
80
80
|
activeOpacity: .7,
|
|
81
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ N(B, {
|
|
82
82
|
style: [
|
|
83
83
|
U.triggerText,
|
|
84
|
-
{ color:
|
|
85
|
-
!
|
|
84
|
+
{ color: w.text },
|
|
85
|
+
!d && { color: w.textMuted }
|
|
86
86
|
],
|
|
87
87
|
numberOfLines: 1,
|
|
88
|
-
children:
|
|
89
|
-
}), /* @__PURE__ */
|
|
88
|
+
children: d || f || C("renderer.defaultAddressInput.enterAddress")
|
|
89
|
+
}), /* @__PURE__ */ N(B, {
|
|
90
90
|
style: U.icon,
|
|
91
91
|
children: "📍"
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
visible:
|
|
94
|
+
/* @__PURE__ */ N(L, {
|
|
95
|
+
visible: s,
|
|
96
96
|
transparent: !0,
|
|
97
97
|
animationType: "fade",
|
|
98
|
-
onRequestClose:
|
|
99
|
-
children: /* @__PURE__ */
|
|
98
|
+
onRequestClose: E,
|
|
99
|
+
children: /* @__PURE__ */ N(V, {
|
|
100
100
|
style: U.modalOverlay,
|
|
101
101
|
activeOpacity: 1,
|
|
102
|
-
onPress:
|
|
103
|
-
children: /* @__PURE__ */
|
|
104
|
-
style: [U.modalContent, { backgroundColor:
|
|
102
|
+
onPress: E,
|
|
103
|
+
children: /* @__PURE__ */ P(V, {
|
|
104
|
+
style: [U.modalContent, { backgroundColor: w.card }],
|
|
105
105
|
activeOpacity: 1,
|
|
106
106
|
onPress: () => {},
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
style: [U.modalHeader, { borderBottomColor:
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
-
style: [U.modalTitle, { color:
|
|
108
|
+
/* @__PURE__ */ P(H, {
|
|
109
|
+
style: [U.modalHeader, { borderBottomColor: w.separator }],
|
|
110
|
+
children: [/* @__PURE__ */ N(B, {
|
|
111
|
+
style: [U.modalTitle, { color: w.text }],
|
|
112
112
|
children: b || _.data.name
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
onPress:
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
style: [U.closeButton, { color:
|
|
113
|
+
}), /* @__PURE__ */ N(V, {
|
|
114
|
+
onPress: E,
|
|
115
|
+
children: /* @__PURE__ */ N(B, {
|
|
116
|
+
style: [U.closeButton, { color: w.textMuted }],
|
|
117
117
|
children: "✕"
|
|
118
118
|
})
|
|
119
119
|
})]
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ P(H, {
|
|
122
122
|
style: U.searchContainer,
|
|
123
|
-
children: [/* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ N(ue, {
|
|
124
124
|
style: [U.searchInput, {
|
|
125
|
-
backgroundColor:
|
|
126
|
-
borderColor:
|
|
127
|
-
color:
|
|
125
|
+
backgroundColor: w.muted,
|
|
126
|
+
borderColor: w.border,
|
|
127
|
+
color: w.text
|
|
128
128
|
}],
|
|
129
|
-
placeholder:
|
|
130
|
-
placeholderTextColor:
|
|
129
|
+
placeholder: f || C("renderer.defaultAddressInput.enterAddress"),
|
|
130
|
+
placeholderTextColor: w.textMuted,
|
|
131
131
|
value: n,
|
|
132
132
|
onChangeText: r,
|
|
133
133
|
autoFocus: !0,
|
|
134
134
|
autoCapitalize: "none",
|
|
135
135
|
autoCorrect: !1
|
|
136
|
-
}),
|
|
136
|
+
}), l && /* @__PURE__ */ N(oe, {
|
|
137
137
|
size: "small",
|
|
138
|
-
color:
|
|
138
|
+
color: w.primary,
|
|
139
139
|
style: U.searchLoader
|
|
140
140
|
})]
|
|
141
141
|
}),
|
|
142
|
-
|
|
142
|
+
l ? /* @__PURE__ */ P(H, {
|
|
143
143
|
style: U.loadingContainer,
|
|
144
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ N(oe, {
|
|
145
145
|
size: "small",
|
|
146
|
-
color:
|
|
147
|
-
}), /* @__PURE__ */
|
|
148
|
-
style: [U.loadingText, { color:
|
|
149
|
-
children:
|
|
146
|
+
color: w.primary
|
|
147
|
+
}), /* @__PURE__ */ N(B, {
|
|
148
|
+
style: [U.loadingText, { color: w.textMuted }],
|
|
149
|
+
children: C("renderer.defaultAddressInput.searching")
|
|
150
150
|
})]
|
|
151
|
-
}) : /* @__PURE__ */
|
|
152
|
-
data:
|
|
151
|
+
}) : /* @__PURE__ */ N(ce, {
|
|
152
|
+
data: i,
|
|
153
153
|
keyExtractor: (e, t) => t.toString(),
|
|
154
154
|
style: U.suggestionsList,
|
|
155
155
|
contentContainerStyle: U.suggestionsListContent,
|
|
156
156
|
keyboardShouldPersistTaps: "handled",
|
|
157
|
-
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */
|
|
157
|
+
ListEmptyComponent: n.length >= 3 ? /* @__PURE__ */ N(H, {
|
|
158
158
|
style: U.emptyContainer,
|
|
159
|
-
children: /* @__PURE__ */
|
|
160
|
-
style: [U.emptyText, { color:
|
|
161
|
-
children:
|
|
159
|
+
children: /* @__PURE__ */ N(B, {
|
|
160
|
+
style: [U.emptyText, { color: w.textMuted }],
|
|
161
|
+
children: C("renderer.defaultAddressInput.noAddressesFound")
|
|
162
162
|
})
|
|
163
|
-
}) : /* @__PURE__ */
|
|
163
|
+
}) : /* @__PURE__ */ N(H, {
|
|
164
164
|
style: U.emptyContainer,
|
|
165
|
-
children: /* @__PURE__ */
|
|
166
|
-
style: [U.emptyText, { color:
|
|
167
|
-
children:
|
|
165
|
+
children: /* @__PURE__ */ N(B, {
|
|
166
|
+
style: [U.emptyText, { color: w.textMuted }],
|
|
167
|
+
children: C("renderer.defaultAddressInput.typeMinChars")
|
|
168
168
|
})
|
|
169
169
|
}),
|
|
170
|
-
renderItem: ({ item: e }) => /* @__PURE__ */
|
|
170
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ P(V, {
|
|
171
171
|
style: U.suggestionItem,
|
|
172
|
-
onPress: () =>
|
|
172
|
+
onPress: () => T(e),
|
|
173
173
|
activeOpacity: .7,
|
|
174
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ N(B, {
|
|
175
175
|
style: U.suggestionIcon,
|
|
176
176
|
children: "📍"
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
style: [U.suggestionText, { color:
|
|
177
|
+
}), /* @__PURE__ */ N(B, {
|
|
178
|
+
style: [U.suggestionText, { color: w.text }],
|
|
179
179
|
numberOfLines: 2,
|
|
180
180
|
children: e.label
|
|
181
181
|
})]
|
|
@@ -185,12 +185,12 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
185
185
|
})
|
|
186
186
|
})
|
|
187
187
|
}),
|
|
188
|
-
y && /* @__PURE__ */
|
|
189
|
-
style: [U.error, { color:
|
|
188
|
+
y && /* @__PURE__ */ N(B, {
|
|
189
|
+
style: [U.error, { color: w.error }],
|
|
190
190
|
children: y
|
|
191
191
|
}),
|
|
192
|
-
x && !y && /* @__PURE__ */
|
|
193
|
-
style: [U.helperText, { color:
|
|
192
|
+
x && !y && /* @__PURE__ */ N(B, {
|
|
193
|
+
style: [U.helperText, { color: w.textMuted }],
|
|
194
194
|
children: x
|
|
195
195
|
})
|
|
196
196
|
]
|
|
@@ -305,25 +305,25 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
305
305
|
flex: 1,
|
|
306
306
|
fontSize: 14
|
|
307
307
|
}
|
|
308
|
-
}),
|
|
309
|
-
let { colors: i } =
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
style:
|
|
312
|
-
children: [n ? /* @__PURE__ */
|
|
308
|
+
}), ge = ({ label: e, description: t, image: n, disabled: r }) => {
|
|
309
|
+
let { colors: i } = g();
|
|
310
|
+
return /* @__PURE__ */ P(H, {
|
|
311
|
+
style: _e.content,
|
|
312
|
+
children: [n ? /* @__PURE__ */ N(I, {
|
|
313
313
|
source: { uri: n },
|
|
314
|
-
style:
|
|
315
|
-
}) : null, /* @__PURE__ */
|
|
316
|
-
style:
|
|
317
|
-
children: [/* @__PURE__ */
|
|
318
|
-
style: [
|
|
314
|
+
style: _e.image
|
|
315
|
+
}) : null, /* @__PURE__ */ P(H, {
|
|
316
|
+
style: _e.textWrapper,
|
|
317
|
+
children: [/* @__PURE__ */ N(B, {
|
|
318
|
+
style: [_e.label, { color: r ? i.textMuted : i.text }],
|
|
319
319
|
children: e
|
|
320
|
-
}), t ? /* @__PURE__ */
|
|
321
|
-
style: [
|
|
320
|
+
}), t ? /* @__PURE__ */ N(B, {
|
|
321
|
+
style: [_e.description, { color: i.textMuted }],
|
|
322
322
|
children: t
|
|
323
323
|
}) : null]
|
|
324
324
|
})]
|
|
325
325
|
});
|
|
326
|
-
},
|
|
326
|
+
}, _e = z.create({
|
|
327
327
|
content: {
|
|
328
328
|
alignItems: "center",
|
|
329
329
|
flex: 1,
|
|
@@ -341,53 +341,53 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
341
341
|
},
|
|
342
342
|
label: { fontSize: 14 },
|
|
343
343
|
textWrapper: { flex: 1 }
|
|
344
|
-
}),
|
|
345
|
-
let [n, r] =
|
|
344
|
+
}), ve = ({ field: e, extra: t }) => {
|
|
345
|
+
let [n, r] = M(!1), [i, a] = M(""), { value: o, placeholder: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, m = p(), { colors: h } = g(), _ = c.data.options || [], v = _.find((e) => e.value === o), y = ie(() => {
|
|
346
346
|
if (!i.trim()) return _;
|
|
347
347
|
let e = i.toLowerCase();
|
|
348
|
-
return _.filter((t) =>
|
|
348
|
+
return _.filter((t) => m(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
349
349
|
}, [
|
|
350
350
|
_,
|
|
351
351
|
i,
|
|
352
|
-
|
|
352
|
+
m
|
|
353
353
|
]), b = (e) => {
|
|
354
|
-
|
|
354
|
+
l(e === o ? "" : e), r(!1), a("");
|
|
355
355
|
}, x = () => {
|
|
356
|
-
r(!1),
|
|
356
|
+
r(!1), a("");
|
|
357
357
|
};
|
|
358
|
-
return /* @__PURE__ */
|
|
358
|
+
return /* @__PURE__ */ P(H, {
|
|
359
359
|
style: W.container,
|
|
360
360
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
style: [W.label, { color:
|
|
363
|
-
children: [
|
|
364
|
-
style: { color:
|
|
361
|
+
/* @__PURE__ */ P(B, {
|
|
362
|
+
style: [W.label, { color: h.textSecondary }],
|
|
363
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ N(B, {
|
|
364
|
+
style: { color: h.error },
|
|
365
365
|
children: "*"
|
|
366
366
|
})]
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ P(V, {
|
|
369
369
|
style: [
|
|
370
370
|
W.trigger,
|
|
371
371
|
{
|
|
372
|
-
backgroundColor:
|
|
373
|
-
borderColor:
|
|
372
|
+
backgroundColor: h.input,
|
|
373
|
+
borderColor: h.border
|
|
374
374
|
},
|
|
375
|
-
|
|
375
|
+
u && { borderColor: h.error }
|
|
376
376
|
],
|
|
377
377
|
onPress: () => r(!0),
|
|
378
378
|
activeOpacity: .7,
|
|
379
379
|
children: [
|
|
380
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ N(B, {
|
|
381
381
|
style: [
|
|
382
382
|
W.triggerText,
|
|
383
|
-
{ color:
|
|
384
|
-
!
|
|
383
|
+
{ color: h.text },
|
|
384
|
+
!o && { color: h.textMuted }
|
|
385
385
|
],
|
|
386
386
|
numberOfLines: 1,
|
|
387
|
-
children:
|
|
387
|
+
children: o && v ? m(v.label) : s || m("renderer.defaultAutocompleteInput.selectOption")
|
|
388
388
|
}),
|
|
389
|
-
|
|
390
|
-
onPress: () =>
|
|
389
|
+
o ? /* @__PURE__ */ N(V, {
|
|
390
|
+
onPress: () => l(""),
|
|
391
391
|
hitSlop: {
|
|
392
392
|
bottom: 8,
|
|
393
393
|
left: 8,
|
|
@@ -395,87 +395,87 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
395
395
|
top: 8
|
|
396
396
|
},
|
|
397
397
|
style: W.clearButton,
|
|
398
|
-
children: /* @__PURE__ */
|
|
399
|
-
style: [W.clearIcon, { color:
|
|
398
|
+
children: /* @__PURE__ */ N(B, {
|
|
399
|
+
style: [W.clearIcon, { color: h.textMuted }],
|
|
400
400
|
children: "✕"
|
|
401
401
|
})
|
|
402
402
|
}) : null,
|
|
403
|
-
/* @__PURE__ */
|
|
404
|
-
style: [W.arrow, { color:
|
|
403
|
+
/* @__PURE__ */ N(B, {
|
|
404
|
+
style: [W.arrow, { color: h.textMuted }],
|
|
405
405
|
children: "▼"
|
|
406
406
|
})
|
|
407
407
|
]
|
|
408
408
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ N(L, {
|
|
410
410
|
visible: n,
|
|
411
411
|
transparent: !0,
|
|
412
412
|
animationType: "fade",
|
|
413
413
|
onRequestClose: x,
|
|
414
|
-
children: /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ N(V, {
|
|
415
415
|
style: W.modalOverlay,
|
|
416
416
|
activeOpacity: 1,
|
|
417
417
|
onPress: x,
|
|
418
|
-
children: /* @__PURE__ */
|
|
419
|
-
style: [W.modalContent, { backgroundColor:
|
|
418
|
+
children: /* @__PURE__ */ P(V, {
|
|
419
|
+
style: [W.modalContent, { backgroundColor: h.card }],
|
|
420
420
|
activeOpacity: 1,
|
|
421
421
|
onPress: () => {},
|
|
422
422
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
style: [W.modalHeader, { borderBottomColor:
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
style: [W.modalTitle, { color:
|
|
427
|
-
children:
|
|
428
|
-
}), /* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ P(H, {
|
|
424
|
+
style: [W.modalHeader, { borderBottomColor: h.separator }],
|
|
425
|
+
children: [/* @__PURE__ */ N(B, {
|
|
426
|
+
style: [W.modalTitle, { color: h.text }],
|
|
427
|
+
children: d || c.data.name
|
|
428
|
+
}), /* @__PURE__ */ N(V, {
|
|
429
429
|
onPress: x,
|
|
430
|
-
children: /* @__PURE__ */
|
|
431
|
-
style: [W.closeButton, { color:
|
|
430
|
+
children: /* @__PURE__ */ N(B, {
|
|
431
|
+
style: [W.closeButton, { color: h.textMuted }],
|
|
432
432
|
children: "✕"
|
|
433
433
|
})
|
|
434
434
|
})]
|
|
435
435
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ N(H, {
|
|
437
437
|
style: W.searchContainer,
|
|
438
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ N(ue, {
|
|
439
439
|
style: [W.searchInput, {
|
|
440
|
-
backgroundColor:
|
|
441
|
-
borderColor:
|
|
442
|
-
color:
|
|
440
|
+
backgroundColor: h.muted,
|
|
441
|
+
borderColor: h.border,
|
|
442
|
+
color: h.text
|
|
443
443
|
}],
|
|
444
|
-
placeholder:
|
|
445
|
-
placeholderTextColor:
|
|
444
|
+
placeholder: s || m("renderer.defaultAutocompleteInput.search"),
|
|
445
|
+
placeholderTextColor: h.textMuted,
|
|
446
446
|
value: i,
|
|
447
|
-
onChangeText:
|
|
447
|
+
onChangeText: a,
|
|
448
448
|
autoFocus: !0,
|
|
449
449
|
autoCapitalize: "none",
|
|
450
450
|
autoCorrect: !1
|
|
451
451
|
})
|
|
452
452
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ N(ce, {
|
|
454
454
|
data: y,
|
|
455
455
|
keyExtractor: (e) => e.value,
|
|
456
456
|
style: W.optionsList,
|
|
457
457
|
contentContainerStyle: W.optionsListContent,
|
|
458
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
458
|
+
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
459
459
|
style: W.emptyContainer,
|
|
460
|
-
children: /* @__PURE__ */
|
|
461
|
-
style: [W.emptyText, { color:
|
|
462
|
-
children:
|
|
460
|
+
children: /* @__PURE__ */ N(B, {
|
|
461
|
+
style: [W.emptyText, { color: h.textMuted }],
|
|
462
|
+
children: m("renderer.defaultAutocompleteInput.noResults")
|
|
463
463
|
})
|
|
464
464
|
}),
|
|
465
465
|
renderItem: ({ item: e }) => {
|
|
466
|
-
let t = e.value ===
|
|
467
|
-
return /* @__PURE__ */
|
|
468
|
-
style: [W.option, t && { backgroundColor:
|
|
466
|
+
let t = e.value === o;
|
|
467
|
+
return /* @__PURE__ */ P(V, {
|
|
468
|
+
style: [W.option, t && { backgroundColor: h.primaryLight }],
|
|
469
469
|
onPress: () => b(e.value),
|
|
470
470
|
disabled: e.disabled,
|
|
471
471
|
activeOpacity: .7,
|
|
472
|
-
children: [/* @__PURE__ */
|
|
473
|
-
label:
|
|
474
|
-
description:
|
|
472
|
+
children: [/* @__PURE__ */ N(ge, {
|
|
473
|
+
label: m(e.label) || e.value,
|
|
474
|
+
description: m(e.description),
|
|
475
475
|
image: e.image,
|
|
476
476
|
disabled: e.disabled
|
|
477
|
-
}), t && /* @__PURE__ */
|
|
478
|
-
style: [W.checkmark, { color:
|
|
477
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
478
|
+
style: [W.checkmark, { color: h.primary }],
|
|
479
479
|
children: "✓"
|
|
480
480
|
})]
|
|
481
481
|
});
|
|
@@ -485,13 +485,13 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
485
485
|
})
|
|
486
486
|
})
|
|
487
487
|
}),
|
|
488
|
-
|
|
489
|
-
style: [W.error, { color:
|
|
490
|
-
children:
|
|
488
|
+
u && /* @__PURE__ */ N(B, {
|
|
489
|
+
style: [W.error, { color: h.error }],
|
|
490
|
+
children: u
|
|
491
491
|
}),
|
|
492
|
-
|
|
493
|
-
style: [W.helperText, { color:
|
|
494
|
-
children:
|
|
492
|
+
f && !u && /* @__PURE__ */ N(B, {
|
|
493
|
+
style: [W.helperText, { color: h.textMuted }],
|
|
494
|
+
children: f
|
|
495
495
|
})
|
|
496
496
|
]
|
|
497
497
|
});
|
|
@@ -587,25 +587,25 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
587
587
|
flex: 1,
|
|
588
588
|
fontSize: 14
|
|
589
589
|
}
|
|
590
|
-
}),
|
|
591
|
-
let n =
|
|
592
|
-
|
|
593
|
-
}, _ = (e) =>
|
|
594
|
-
return /* @__PURE__ */
|
|
590
|
+
}), ye = ({ field: e, extra: t }) => {
|
|
591
|
+
let n = p(), { value: r } = e, { node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = g(), u = i.data.options || [], d = u.length > 0, f = Array.isArray(r) ? r : [], m = typeof r == "boolean" ? r : !1, h = (e) => {
|
|
592
|
+
a(d ? f.includes(e) ? f.filter((t) => t !== e) : [...f, e] : !m);
|
|
593
|
+
}, _ = (e) => d ? f.includes(e) : m;
|
|
594
|
+
return /* @__PURE__ */ P(H, {
|
|
595
595
|
style: G.container,
|
|
596
596
|
children: [
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
style: [G.label, { color:
|
|
599
|
-
children: [
|
|
600
|
-
style: { color:
|
|
597
|
+
/* @__PURE__ */ P(B, {
|
|
598
|
+
style: [G.label, { color: l.textSecondary }],
|
|
599
|
+
children: [s || i.data.name, i.data.required && /* @__PURE__ */ N(B, {
|
|
600
|
+
style: { color: l.error },
|
|
601
601
|
children: "*"
|
|
602
602
|
})]
|
|
603
603
|
}),
|
|
604
|
-
|
|
604
|
+
u.length > 0 ? u.map((e) => {
|
|
605
605
|
let t = n(e.description);
|
|
606
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ P(V, {
|
|
607
607
|
style: G.option,
|
|
608
|
-
onPress: () =>
|
|
608
|
+
onPress: () => h(e.value),
|
|
609
609
|
disabled: e.disabled,
|
|
610
610
|
activeOpacity: .7,
|
|
611
611
|
accessible: !0,
|
|
@@ -616,79 +616,79 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
616
616
|
},
|
|
617
617
|
accessibilityLabel: n(e.label) || e.value,
|
|
618
618
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ N(H, {
|
|
620
620
|
style: [
|
|
621
621
|
G.checkbox,
|
|
622
622
|
{
|
|
623
|
-
backgroundColor:
|
|
624
|
-
borderColor:
|
|
623
|
+
backgroundColor: l.input,
|
|
624
|
+
borderColor: l.border
|
|
625
625
|
},
|
|
626
626
|
_(e.value) && {
|
|
627
|
-
backgroundColor:
|
|
628
|
-
borderColor:
|
|
627
|
+
backgroundColor: l.primary,
|
|
628
|
+
borderColor: l.primary
|
|
629
629
|
}
|
|
630
630
|
],
|
|
631
|
-
children: _(e.value) && /* @__PURE__ */
|
|
631
|
+
children: _(e.value) && /* @__PURE__ */ N(B, {
|
|
632
632
|
style: G.checkmark,
|
|
633
633
|
children: "✓"
|
|
634
634
|
})
|
|
635
635
|
}),
|
|
636
|
-
e.image ? /* @__PURE__ */
|
|
636
|
+
e.image ? /* @__PURE__ */ N(I, {
|
|
637
637
|
source: { uri: e.image },
|
|
638
638
|
style: G.image
|
|
639
639
|
}) : null,
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ P(H, {
|
|
641
641
|
style: G.optionTextContainer,
|
|
642
|
-
children: [/* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ N(B, {
|
|
643
643
|
style: [
|
|
644
644
|
G.optionLabel,
|
|
645
|
-
{ color:
|
|
646
|
-
e.disabled && { color:
|
|
645
|
+
{ color: l.textSecondary },
|
|
646
|
+
e.disabled && { color: l.textMuted }
|
|
647
647
|
],
|
|
648
648
|
children: n(e.label) || e.value
|
|
649
|
-
}), t && /* @__PURE__ */
|
|
650
|
-
style: [G.optionDescription, { color:
|
|
649
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
650
|
+
style: [G.optionDescription, { color: l.textMuted }],
|
|
651
651
|
children: t
|
|
652
652
|
})]
|
|
653
653
|
})
|
|
654
654
|
]
|
|
655
655
|
}, e.value);
|
|
656
|
-
}) : /* @__PURE__ */
|
|
656
|
+
}) : /* @__PURE__ */ P(V, {
|
|
657
657
|
style: G.option,
|
|
658
|
-
onPress: () =>
|
|
658
|
+
onPress: () => h(""),
|
|
659
659
|
activeOpacity: .7,
|
|
660
660
|
accessible: !0,
|
|
661
661
|
accessibilityRole: "checkbox",
|
|
662
|
-
accessibilityState: { checked:
|
|
663
|
-
accessibilityLabel:
|
|
664
|
-
children: [/* @__PURE__ */
|
|
662
|
+
accessibilityState: { checked: m },
|
|
663
|
+
accessibilityLabel: s || i.data.name,
|
|
664
|
+
children: [/* @__PURE__ */ N(H, {
|
|
665
665
|
style: [
|
|
666
666
|
G.checkbox,
|
|
667
667
|
{
|
|
668
|
-
backgroundColor:
|
|
669
|
-
borderColor:
|
|
668
|
+
backgroundColor: l.input,
|
|
669
|
+
borderColor: l.border
|
|
670
670
|
},
|
|
671
|
-
|
|
672
|
-
backgroundColor:
|
|
673
|
-
borderColor:
|
|
671
|
+
m && {
|
|
672
|
+
backgroundColor: l.primary,
|
|
673
|
+
borderColor: l.primary
|
|
674
674
|
}
|
|
675
675
|
],
|
|
676
|
-
children:
|
|
676
|
+
children: m && /* @__PURE__ */ N(B, {
|
|
677
677
|
style: G.checkmark,
|
|
678
678
|
children: "✓"
|
|
679
679
|
})
|
|
680
|
-
}), /* @__PURE__ */
|
|
681
|
-
style: [G.optionLabel, { color:
|
|
682
|
-
children:
|
|
680
|
+
}), /* @__PURE__ */ N(B, {
|
|
681
|
+
style: [G.optionLabel, { color: l.textSecondary }],
|
|
682
|
+
children: s || i.data.name
|
|
683
683
|
})]
|
|
684
684
|
}),
|
|
685
|
-
|
|
686
|
-
style: [G.error, { color:
|
|
687
|
-
children:
|
|
685
|
+
o && /* @__PURE__ */ N(B, {
|
|
686
|
+
style: [G.error, { color: l.error }],
|
|
687
|
+
children: o
|
|
688
688
|
}),
|
|
689
|
-
|
|
690
|
-
style: [G.helperText, { color:
|
|
691
|
-
children:
|
|
689
|
+
c && !o && /* @__PURE__ */ N(B, {
|
|
690
|
+
style: [G.helperText, { color: l.textMuted }],
|
|
691
|
+
children: c
|
|
692
692
|
})
|
|
693
693
|
]
|
|
694
694
|
});
|
|
@@ -738,15 +738,15 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
738
738
|
},
|
|
739
739
|
optionLabel: { fontSize: 14 },
|
|
740
740
|
optionTextContainer: { flex: 1 }
|
|
741
|
-
}),
|
|
742
|
-
let [n, r] =
|
|
743
|
-
let e =
|
|
741
|
+
}), be = ({ field: e, extra: t }) => {
|
|
742
|
+
let [n, r] = M(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = g(), f = p(), m = i ? new Date(i) : void 0, { year: h, month: _, today: v } = ie(() => {
|
|
743
|
+
let e = m || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
744
744
|
return r.setHours(0, 0, 0, 0), {
|
|
745
745
|
month: n,
|
|
746
746
|
today: r,
|
|
747
747
|
year: t
|
|
748
748
|
};
|
|
749
|
-
}, [
|
|
749
|
+
}, [m]), [y, b] = M(h), [x, S] = M(_), ee = [
|
|
750
750
|
"January",
|
|
751
751
|
"February",
|
|
752
752
|
"March",
|
|
@@ -759,7 +759,7 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
759
759
|
"October",
|
|
760
760
|
"November",
|
|
761
761
|
"December"
|
|
762
|
-
],
|
|
762
|
+
], C = ie(() => {
|
|
763
763
|
let e = new Date(y, x, 1).getDay(), t = new Date(y, x + 1, 0).getDate(), n = new Date(y, x, 0).getDate(), r = [];
|
|
764
764
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
765
765
|
date: new Date(y, x - 1, n - t),
|
|
@@ -778,108 +778,108 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
778
778
|
isCurrentMonth: !1
|
|
779
779
|
});
|
|
780
780
|
return r;
|
|
781
|
-
}, [y, x]),
|
|
782
|
-
|
|
781
|
+
}, [y, x]), w = re((e) => {
|
|
782
|
+
o.data.disablePast && e < v || (s(e.toISOString()), r(!1));
|
|
783
783
|
}, [
|
|
784
|
-
|
|
784
|
+
o.data.disablePast,
|
|
785
785
|
v,
|
|
786
|
-
|
|
787
|
-
]),
|
|
786
|
+
s
|
|
787
|
+
]), T = () => {
|
|
788
788
|
x === 0 ? (S(11), b(y - 1)) : S(x - 1);
|
|
789
|
-
},
|
|
789
|
+
}, E = () => {
|
|
790
790
|
x === 11 ? (S(0), b(y + 1)) : S(x + 1);
|
|
791
|
-
},
|
|
792
|
-
return /* @__PURE__ */
|
|
791
|
+
}, te = () => m ? m.toLocaleDateString() : a || f("renderer.defaultInputs.selectDate"), D = (e) => o.data.disablePast ? e < v : !1, O = (e) => m ? e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear() : !1;
|
|
792
|
+
return /* @__PURE__ */ P(H, {
|
|
793
793
|
style: K.container,
|
|
794
794
|
children: [
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
style: [K.label, { color:
|
|
797
|
-
children: [
|
|
798
|
-
style: { color:
|
|
795
|
+
/* @__PURE__ */ P(B, {
|
|
796
|
+
style: [K.label, { color: d.textSecondary }],
|
|
797
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ N(B, {
|
|
798
|
+
style: { color: d.error },
|
|
799
799
|
children: "*"
|
|
800
800
|
})]
|
|
801
801
|
}),
|
|
802
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ P(V, {
|
|
803
803
|
style: [
|
|
804
804
|
K.trigger,
|
|
805
805
|
{
|
|
806
|
-
backgroundColor:
|
|
807
|
-
borderColor:
|
|
806
|
+
backgroundColor: d.input,
|
|
807
|
+
borderColor: d.border
|
|
808
808
|
},
|
|
809
|
-
|
|
809
|
+
c && { borderColor: d.error }
|
|
810
810
|
],
|
|
811
811
|
onPress: () => r(!0),
|
|
812
812
|
activeOpacity: .7,
|
|
813
|
-
children: [/* @__PURE__ */
|
|
813
|
+
children: [/* @__PURE__ */ N(B, {
|
|
814
814
|
style: [
|
|
815
815
|
K.triggerText,
|
|
816
|
-
{ color:
|
|
817
|
-
!i && { color:
|
|
816
|
+
{ color: d.text },
|
|
817
|
+
!i && { color: d.textMuted }
|
|
818
818
|
],
|
|
819
819
|
numberOfLines: 1,
|
|
820
|
-
children:
|
|
821
|
-
}), /* @__PURE__ */
|
|
820
|
+
children: te()
|
|
821
|
+
}), /* @__PURE__ */ N(B, {
|
|
822
822
|
style: K.icon,
|
|
823
823
|
children: "📅"
|
|
824
824
|
})]
|
|
825
825
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ N(L, {
|
|
827
827
|
visible: n,
|
|
828
828
|
transparent: !0,
|
|
829
829
|
animationType: "fade",
|
|
830
830
|
onRequestClose: () => r(!1),
|
|
831
|
-
children: /* @__PURE__ */
|
|
831
|
+
children: /* @__PURE__ */ N(V, {
|
|
832
832
|
style: K.modalOverlay,
|
|
833
833
|
activeOpacity: 1,
|
|
834
834
|
onPress: () => r(!1),
|
|
835
|
-
children: /* @__PURE__ */
|
|
836
|
-
style: [K.modalContent, { backgroundColor:
|
|
835
|
+
children: /* @__PURE__ */ P(V, {
|
|
836
|
+
style: [K.modalContent, { backgroundColor: d.card }],
|
|
837
837
|
activeOpacity: 1,
|
|
838
838
|
onPress: () => {},
|
|
839
839
|
children: [
|
|
840
|
-
/* @__PURE__ */
|
|
841
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
842
|
-
children: [/* @__PURE__ */
|
|
843
|
-
style: [K.modalTitle, { color:
|
|
844
|
-
children:
|
|
845
|
-
}), /* @__PURE__ */
|
|
840
|
+
/* @__PURE__ */ P(H, {
|
|
841
|
+
style: [K.modalHeader, { borderBottomColor: d.separator }],
|
|
842
|
+
children: [/* @__PURE__ */ N(B, {
|
|
843
|
+
style: [K.modalTitle, { color: d.text }],
|
|
844
|
+
children: l || o.data.name
|
|
845
|
+
}), /* @__PURE__ */ N(V, {
|
|
846
846
|
onPress: () => r(!1),
|
|
847
|
-
children: /* @__PURE__ */
|
|
848
|
-
style: [K.closeButton, { color:
|
|
847
|
+
children: /* @__PURE__ */ N(B, {
|
|
848
|
+
style: [K.closeButton, { color: d.textMuted }],
|
|
849
849
|
children: "✕"
|
|
850
850
|
})
|
|
851
851
|
})]
|
|
852
852
|
}),
|
|
853
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ P(H, {
|
|
854
854
|
style: K.calendarHeader,
|
|
855
855
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
857
|
-
onPress:
|
|
856
|
+
/* @__PURE__ */ N(V, {
|
|
857
|
+
onPress: T,
|
|
858
858
|
style: K.navButton,
|
|
859
|
-
children: /* @__PURE__ */
|
|
860
|
-
style: [K.navButtonText, { color:
|
|
859
|
+
children: /* @__PURE__ */ N(B, {
|
|
860
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
861
861
|
children: "‹"
|
|
862
862
|
})
|
|
863
863
|
}),
|
|
864
|
-
/* @__PURE__ */
|
|
865
|
-
style: [K.monthYear, { color:
|
|
864
|
+
/* @__PURE__ */ P(B, {
|
|
865
|
+
style: [K.monthYear, { color: d.text }],
|
|
866
866
|
children: [
|
|
867
|
-
|
|
867
|
+
ee[x],
|
|
868
868
|
" ",
|
|
869
869
|
y
|
|
870
870
|
]
|
|
871
871
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
onPress:
|
|
872
|
+
/* @__PURE__ */ N(V, {
|
|
873
|
+
onPress: E,
|
|
874
874
|
style: K.navButton,
|
|
875
|
-
children: /* @__PURE__ */
|
|
876
|
-
style: [K.navButtonText, { color:
|
|
875
|
+
children: /* @__PURE__ */ N(B, {
|
|
876
|
+
style: [K.navButtonText, { color: d.primary }],
|
|
877
877
|
children: "›"
|
|
878
878
|
})
|
|
879
879
|
})
|
|
880
880
|
]
|
|
881
881
|
}),
|
|
882
|
-
/* @__PURE__ */
|
|
882
|
+
/* @__PURE__ */ N(H, {
|
|
883
883
|
style: K.weekDays,
|
|
884
884
|
children: [
|
|
885
885
|
"Sun",
|
|
@@ -889,43 +889,43 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
889
889
|
"Thu",
|
|
890
890
|
"Fri",
|
|
891
891
|
"Sat"
|
|
892
|
-
].map((e) => /* @__PURE__ */
|
|
893
|
-
style: [K.weekDay, { color:
|
|
892
|
+
].map((e) => /* @__PURE__ */ N(B, {
|
|
893
|
+
style: [K.weekDay, { color: d.textMuted }],
|
|
894
894
|
children: e
|
|
895
895
|
}, e))
|
|
896
896
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
data:
|
|
897
|
+
/* @__PURE__ */ N(ce, {
|
|
898
|
+
data: C,
|
|
899
899
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
900
900
|
numColumns: 7,
|
|
901
901
|
scrollEnabled: !1,
|
|
902
902
|
style: K.calendar,
|
|
903
903
|
contentContainerStyle: K.calendarContent,
|
|
904
904
|
renderItem: ({ item: e }) => {
|
|
905
|
-
let t =
|
|
906
|
-
return /* @__PURE__ */
|
|
905
|
+
let t = D(e.date), n = O(e.date);
|
|
906
|
+
return /* @__PURE__ */ N(V, {
|
|
907
907
|
style: [
|
|
908
908
|
K.dayCell,
|
|
909
909
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
910
910
|
n && {
|
|
911
|
-
backgroundColor:
|
|
911
|
+
backgroundColor: d.primary,
|
|
912
912
|
borderRadius: 20
|
|
913
913
|
},
|
|
914
914
|
t && K.dayCellDisabled
|
|
915
915
|
],
|
|
916
|
-
onPress: () =>
|
|
916
|
+
onPress: () => w(e.date),
|
|
917
917
|
disabled: t,
|
|
918
918
|
activeOpacity: .7,
|
|
919
|
-
children: /* @__PURE__ */
|
|
919
|
+
children: /* @__PURE__ */ N(B, {
|
|
920
920
|
style: [
|
|
921
921
|
K.dayText,
|
|
922
|
-
{ color:
|
|
923
|
-
!e.isCurrentMonth && { color:
|
|
922
|
+
{ color: d.text },
|
|
923
|
+
!e.isCurrentMonth && { color: d.textMuted },
|
|
924
924
|
n && {
|
|
925
|
-
color:
|
|
925
|
+
color: d.background,
|
|
926
926
|
fontWeight: "600"
|
|
927
927
|
},
|
|
928
|
-
t && { color:
|
|
928
|
+
t && { color: d.textMuted }
|
|
929
929
|
],
|
|
930
930
|
children: e.day
|
|
931
931
|
})
|
|
@@ -936,13 +936,13 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
936
936
|
})
|
|
937
937
|
})
|
|
938
938
|
}),
|
|
939
|
-
|
|
940
|
-
style: [K.error, { color:
|
|
941
|
-
children:
|
|
939
|
+
c && /* @__PURE__ */ N(B, {
|
|
940
|
+
style: [K.error, { color: d.error }],
|
|
941
|
+
children: c
|
|
942
942
|
}),
|
|
943
|
-
|
|
944
|
-
style: [K.helperText, { color:
|
|
945
|
-
children:
|
|
943
|
+
u && !c && /* @__PURE__ */ N(B, {
|
|
944
|
+
style: [K.helperText, { color: d.textMuted }],
|
|
945
|
+
children: u
|
|
946
946
|
})
|
|
947
947
|
]
|
|
948
948
|
});
|
|
@@ -1046,15 +1046,15 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1046
1046
|
flexDirection: "row",
|
|
1047
1047
|
marginBottom: 8
|
|
1048
1048
|
}
|
|
1049
|
-
}),
|
|
1050
|
-
let [n, r] =
|
|
1049
|
+
}), xe = ({ field: e, extra: t }) => {
|
|
1050
|
+
let [n, r] = M(!1), [i, a] = M(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, f = p(), { colors: m } = g(), h = Array.isArray(o) ? o : [], _ = h[0] ? new Date(h[0]) : void 0, v = h[1] ? new Date(h[1]) : void 0, { year: y, month: b, today: x } = ie(() => {
|
|
1051
1051
|
let e = _ || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
1052
1052
|
return r.setHours(0, 0, 0, 0), {
|
|
1053
1053
|
month: n,
|
|
1054
1054
|
today: r,
|
|
1055
1055
|
year: t
|
|
1056
1056
|
};
|
|
1057
|
-
}, [_]), [S,
|
|
1057
|
+
}, [_]), [S, ee] = M(y), [C, w] = M(b), T = [
|
|
1058
1058
|
"January",
|
|
1059
1059
|
"February",
|
|
1060
1060
|
"March",
|
|
@@ -1067,141 +1067,141 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1067
1067
|
"October",
|
|
1068
1068
|
"November",
|
|
1069
1069
|
"December"
|
|
1070
|
-
],
|
|
1071
|
-
let e = new Date(S,
|
|
1070
|
+
], E = ie(() => {
|
|
1071
|
+
let e = new Date(S, C, 1).getDay(), t = new Date(S, C + 1, 0).getDate(), n = new Date(S, C, 0).getDate(), r = [];
|
|
1072
1072
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1073
|
-
date: new Date(S,
|
|
1073
|
+
date: new Date(S, C - 1, n - t),
|
|
1074
1074
|
day: n - t,
|
|
1075
1075
|
isCurrentMonth: !1
|
|
1076
1076
|
});
|
|
1077
1077
|
for (let e = 1; e <= t; e++) r.push({
|
|
1078
|
-
date: new Date(S,
|
|
1078
|
+
date: new Date(S, C, e),
|
|
1079
1079
|
day: e,
|
|
1080
1080
|
isCurrentMonth: !0
|
|
1081
1081
|
});
|
|
1082
1082
|
let i = 42 - r.length;
|
|
1083
1083
|
for (let e = 1; e <= i; e++) r.push({
|
|
1084
|
-
date: new Date(S,
|
|
1084
|
+
date: new Date(S, C + 1, e),
|
|
1085
1085
|
day: e,
|
|
1086
1086
|
isCurrentMonth: !1
|
|
1087
1087
|
});
|
|
1088
1088
|
return r;
|
|
1089
|
-
}, [S,
|
|
1090
|
-
|
|
1089
|
+
}, [S, C]), te = re((e) => {
|
|
1090
|
+
s.data.disablePast && e < x || (i ? (c([e.toISOString(), v?.toISOString()]), a(!1)) : (c(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), r(!1), a(!0)));
|
|
1091
1091
|
}, [
|
|
1092
|
-
|
|
1092
|
+
s.data.disablePast,
|
|
1093
1093
|
x,
|
|
1094
1094
|
i,
|
|
1095
1095
|
_,
|
|
1096
1096
|
v,
|
|
1097
|
-
|
|
1098
|
-
]),
|
|
1099
|
-
|
|
1100
|
-
},
|
|
1101
|
-
|
|
1102
|
-
},
|
|
1097
|
+
c
|
|
1098
|
+
]), D = () => {
|
|
1099
|
+
C === 0 ? (w(11), ee(S - 1)) : w(C - 1);
|
|
1100
|
+
}, O = () => {
|
|
1101
|
+
C === 11 ? (w(0), ee(S + 1)) : w(C + 1);
|
|
1102
|
+
}, k = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : f("renderer.defaultInputs.selectDateRange"), ne = (e) => s.data.disablePast ? e < x : !1, A = (e) => _ && v ? e >= _ && e <= v : !1, j = (e) => {
|
|
1103
1103
|
if (!(_ || v)) return !1;
|
|
1104
1104
|
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();
|
|
1105
1105
|
return t || n;
|
|
1106
1106
|
};
|
|
1107
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ P(H, {
|
|
1108
1108
|
style: q.container,
|
|
1109
1109
|
children: [
|
|
1110
|
-
/* @__PURE__ */
|
|
1111
|
-
style: [q.label, { color:
|
|
1112
|
-
children: [
|
|
1113
|
-
style: { color:
|
|
1110
|
+
/* @__PURE__ */ P(B, {
|
|
1111
|
+
style: [q.label, { color: m.textSecondary }],
|
|
1112
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
1113
|
+
style: { color: m.error },
|
|
1114
1114
|
children: "*"
|
|
1115
1115
|
})]
|
|
1116
1116
|
}),
|
|
1117
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ P(V, {
|
|
1118
1118
|
style: [
|
|
1119
1119
|
q.trigger,
|
|
1120
1120
|
{
|
|
1121
|
-
backgroundColor:
|
|
1122
|
-
borderColor:
|
|
1121
|
+
backgroundColor: m.input,
|
|
1122
|
+
borderColor: m.border
|
|
1123
1123
|
},
|
|
1124
|
-
|
|
1124
|
+
l && { borderColor: m.error }
|
|
1125
1125
|
],
|
|
1126
1126
|
onPress: () => r(!0),
|
|
1127
1127
|
activeOpacity: .7,
|
|
1128
|
-
children: [/* @__PURE__ */
|
|
1128
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1129
1129
|
style: [
|
|
1130
1130
|
q.triggerText,
|
|
1131
|
-
{ color:
|
|
1132
|
-
!_ && { color:
|
|
1131
|
+
{ color: m.text },
|
|
1132
|
+
!_ && { color: m.textMuted }
|
|
1133
1133
|
],
|
|
1134
1134
|
numberOfLines: 1,
|
|
1135
|
-
children:
|
|
1136
|
-
}), /* @__PURE__ */
|
|
1135
|
+
children: k()
|
|
1136
|
+
}), /* @__PURE__ */ N(B, {
|
|
1137
1137
|
style: q.icon,
|
|
1138
1138
|
children: "📅"
|
|
1139
1139
|
})]
|
|
1140
1140
|
}),
|
|
1141
|
-
/* @__PURE__ */
|
|
1141
|
+
/* @__PURE__ */ N(L, {
|
|
1142
1142
|
visible: n,
|
|
1143
1143
|
transparent: !0,
|
|
1144
1144
|
animationType: "fade",
|
|
1145
1145
|
onRequestClose: () => r(!1),
|
|
1146
|
-
children: /* @__PURE__ */
|
|
1146
|
+
children: /* @__PURE__ */ N(V, {
|
|
1147
1147
|
style: q.modalOverlay,
|
|
1148
1148
|
activeOpacity: 1,
|
|
1149
1149
|
onPress: () => r(!1),
|
|
1150
|
-
children: /* @__PURE__ */
|
|
1151
|
-
style: [q.modalContent, { backgroundColor:
|
|
1150
|
+
children: /* @__PURE__ */ P(V, {
|
|
1151
|
+
style: [q.modalContent, { backgroundColor: m.card }],
|
|
1152
1152
|
activeOpacity: 1,
|
|
1153
1153
|
onPress: () => {},
|
|
1154
1154
|
children: [
|
|
1155
|
-
/* @__PURE__ */
|
|
1156
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1157
|
-
children: [/* @__PURE__ */
|
|
1158
|
-
style: [q.modalTitle, { color:
|
|
1159
|
-
children:
|
|
1160
|
-
}), /* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ P(H, {
|
|
1156
|
+
style: [q.modalHeader, { borderBottomColor: m.separator }],
|
|
1157
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1158
|
+
style: [q.modalTitle, { color: m.text }],
|
|
1159
|
+
children: u || s.data.name
|
|
1160
|
+
}), /* @__PURE__ */ N(V, {
|
|
1161
1161
|
onPress: () => r(!1),
|
|
1162
|
-
children: /* @__PURE__ */
|
|
1163
|
-
style: [q.closeButton, { color:
|
|
1162
|
+
children: /* @__PURE__ */ N(B, {
|
|
1163
|
+
style: [q.closeButton, { color: m.textMuted }],
|
|
1164
1164
|
children: "✕"
|
|
1165
1165
|
})
|
|
1166
1166
|
})]
|
|
1167
1167
|
}),
|
|
1168
|
-
/* @__PURE__ */
|
|
1169
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1170
|
-
children: /* @__PURE__ */
|
|
1171
|
-
style: [q.rangeIndicatorText, { color:
|
|
1172
|
-
children:
|
|
1168
|
+
/* @__PURE__ */ N(H, {
|
|
1169
|
+
style: [q.rangeIndicator, { backgroundColor: m.primaryLight }],
|
|
1170
|
+
children: /* @__PURE__ */ N(B, {
|
|
1171
|
+
style: [q.rangeIndicatorText, { color: m.primary }],
|
|
1172
|
+
children: f(i ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1173
1173
|
})
|
|
1174
1174
|
}),
|
|
1175
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ P(H, {
|
|
1176
1176
|
style: q.calendarHeader,
|
|
1177
1177
|
children: [
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
onPress:
|
|
1178
|
+
/* @__PURE__ */ N(V, {
|
|
1179
|
+
onPress: D,
|
|
1180
1180
|
style: q.navButton,
|
|
1181
|
-
children: /* @__PURE__ */
|
|
1182
|
-
style: [q.navButtonText, { color:
|
|
1181
|
+
children: /* @__PURE__ */ N(B, {
|
|
1182
|
+
style: [q.navButtonText, { color: m.primary }],
|
|
1183
1183
|
children: "‹"
|
|
1184
1184
|
})
|
|
1185
1185
|
}),
|
|
1186
|
-
/* @__PURE__ */
|
|
1187
|
-
style: [q.monthYear, { color:
|
|
1186
|
+
/* @__PURE__ */ P(B, {
|
|
1187
|
+
style: [q.monthYear, { color: m.text }],
|
|
1188
1188
|
children: [
|
|
1189
|
-
|
|
1189
|
+
T[C],
|
|
1190
1190
|
" ",
|
|
1191
1191
|
S
|
|
1192
1192
|
]
|
|
1193
1193
|
}),
|
|
1194
|
-
/* @__PURE__ */
|
|
1195
|
-
onPress:
|
|
1194
|
+
/* @__PURE__ */ N(V, {
|
|
1195
|
+
onPress: O,
|
|
1196
1196
|
style: q.navButton,
|
|
1197
|
-
children: /* @__PURE__ */
|
|
1198
|
-
style: [q.navButtonText, { color:
|
|
1197
|
+
children: /* @__PURE__ */ N(B, {
|
|
1198
|
+
style: [q.navButtonText, { color: m.primary }],
|
|
1199
1199
|
children: "›"
|
|
1200
1200
|
})
|
|
1201
1201
|
})
|
|
1202
1202
|
]
|
|
1203
1203
|
}),
|
|
1204
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ N(H, {
|
|
1205
1205
|
style: q.weekDays,
|
|
1206
1206
|
children: [
|
|
1207
1207
|
"Sun",
|
|
@@ -1211,45 +1211,45 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1211
1211
|
"Thu",
|
|
1212
1212
|
"Fri",
|
|
1213
1213
|
"Sat"
|
|
1214
|
-
].map((e) => /* @__PURE__ */
|
|
1215
|
-
style: [q.weekDay, { color:
|
|
1214
|
+
].map((e) => /* @__PURE__ */ N(B, {
|
|
1215
|
+
style: [q.weekDay, { color: m.textMuted }],
|
|
1216
1216
|
children: e
|
|
1217
1217
|
}, e))
|
|
1218
1218
|
}),
|
|
1219
|
-
/* @__PURE__ */
|
|
1220
|
-
data:
|
|
1219
|
+
/* @__PURE__ */ N(ce, {
|
|
1220
|
+
data: E,
|
|
1221
1221
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1222
1222
|
numColumns: 7,
|
|
1223
1223
|
scrollEnabled: !1,
|
|
1224
1224
|
style: q.calendar,
|
|
1225
1225
|
contentContainerStyle: q.calendarContent,
|
|
1226
1226
|
renderItem: ({ item: e }) => {
|
|
1227
|
-
let t =
|
|
1228
|
-
return /* @__PURE__ */
|
|
1227
|
+
let t = ne(e.date), n = A(e.date), r = j(e.date);
|
|
1228
|
+
return /* @__PURE__ */ N(V, {
|
|
1229
1229
|
style: [
|
|
1230
1230
|
q.dayCell,
|
|
1231
1231
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1232
|
-
n && { backgroundColor:
|
|
1232
|
+
n && { backgroundColor: m.primaryLight },
|
|
1233
1233
|
r && {
|
|
1234
|
-
backgroundColor:
|
|
1234
|
+
backgroundColor: m.primary,
|
|
1235
1235
|
borderRadius: 20
|
|
1236
1236
|
},
|
|
1237
1237
|
t && q.dayCellDisabled
|
|
1238
1238
|
],
|
|
1239
|
-
onPress: () =>
|
|
1239
|
+
onPress: () => te(e.date),
|
|
1240
1240
|
disabled: t,
|
|
1241
1241
|
activeOpacity: .7,
|
|
1242
|
-
children: /* @__PURE__ */
|
|
1242
|
+
children: /* @__PURE__ */ N(B, {
|
|
1243
1243
|
style: [
|
|
1244
1244
|
q.dayText,
|
|
1245
|
-
{ color:
|
|
1246
|
-
!e.isCurrentMonth && { color:
|
|
1247
|
-
n && { color:
|
|
1245
|
+
{ color: m.text },
|
|
1246
|
+
!e.isCurrentMonth && { color: m.textMuted },
|
|
1247
|
+
n && { color: m.primary },
|
|
1248
1248
|
r && {
|
|
1249
|
-
color:
|
|
1249
|
+
color: m.background,
|
|
1250
1250
|
fontWeight: "600"
|
|
1251
1251
|
},
|
|
1252
|
-
t && { color:
|
|
1252
|
+
t && { color: m.textMuted }
|
|
1253
1253
|
],
|
|
1254
1254
|
children: e.day
|
|
1255
1255
|
})
|
|
@@ -1260,13 +1260,13 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1260
1260
|
})
|
|
1261
1261
|
})
|
|
1262
1262
|
}),
|
|
1263
|
-
|
|
1264
|
-
style: [q.error, { color:
|
|
1265
|
-
children:
|
|
1263
|
+
l && /* @__PURE__ */ N(B, {
|
|
1264
|
+
style: [q.error, { color: m.error }],
|
|
1265
|
+
children: l
|
|
1266
1266
|
}),
|
|
1267
|
-
|
|
1268
|
-
style: [q.helperText, { color:
|
|
1269
|
-
children:
|
|
1267
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
1268
|
+
style: [q.helperText, { color: m.textMuted }],
|
|
1269
|
+
children: d
|
|
1270
1270
|
})
|
|
1271
1271
|
]
|
|
1272
1272
|
});
|
|
@@ -1380,8 +1380,8 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1380
1380
|
flexDirection: "row",
|
|
1381
1381
|
marginBottom: 8
|
|
1382
1382
|
}
|
|
1383
|
-
}),
|
|
1384
|
-
let [n, r] =
|
|
1383
|
+
}), Se = ({ field: e, extra: t }) => {
|
|
1384
|
+
let [n, r] = M(null), [i, a] = M(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), m = p(), h = Array.isArray(o) ? o : o ? [o] : [], _ = s.data.multiple, v = re(async () => {
|
|
1385
1385
|
if (n) try {
|
|
1386
1386
|
let e = (await n({ allowMultiSelection: _ })).map((e) => ({
|
|
1387
1387
|
data: e.uri,
|
|
@@ -1390,21 +1390,21 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1390
1390
|
size: e.size,
|
|
1391
1391
|
type: e.type || "application/octet-stream"
|
|
1392
1392
|
}));
|
|
1393
|
-
|
|
1393
|
+
c(_ ? [...h, ...e] : e[0] || null);
|
|
1394
1394
|
} catch (e) {
|
|
1395
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" &&
|
|
1395
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && se.alert("Error", m("renderer.defaultInputs.filePickerError"));
|
|
1396
1396
|
}
|
|
1397
1397
|
}, [
|
|
1398
1398
|
n,
|
|
1399
|
-
|
|
1399
|
+
h,
|
|
1400
1400
|
_,
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
]), y =
|
|
1404
|
-
let t =
|
|
1405
|
-
|
|
1406
|
-
}, [
|
|
1407
|
-
return
|
|
1401
|
+
c,
|
|
1402
|
+
m
|
|
1403
|
+
]), y = re((e) => {
|
|
1404
|
+
let t = h.filter((t, n) => n !== e);
|
|
1405
|
+
c(t.length > 0 ? t : null);
|
|
1406
|
+
}, [h, c]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1407
|
+
return A(() => {
|
|
1408
1408
|
(async () => {
|
|
1409
1409
|
try {
|
|
1410
1410
|
let { pick: e } = await import("react-native-document-picker");
|
|
@@ -1412,101 +1412,101 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1412
1412
|
} catch {
|
|
1413
1413
|
r(null);
|
|
1414
1414
|
} finally {
|
|
1415
|
-
|
|
1415
|
+
a(!1);
|
|
1416
1416
|
}
|
|
1417
1417
|
})();
|
|
1418
|
-
}, []), i ? null : n ? /* @__PURE__ */
|
|
1418
|
+
}, []), i ? null : n ? /* @__PURE__ */ P(H, {
|
|
1419
1419
|
style: J.container,
|
|
1420
1420
|
children: [
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
style: [J.label, { color:
|
|
1423
|
-
children: [
|
|
1424
|
-
style: { color:
|
|
1421
|
+
/* @__PURE__ */ P(B, {
|
|
1422
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1423
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
1424
|
+
style: { color: f.error },
|
|
1425
1425
|
children: "*"
|
|
1426
1426
|
})]
|
|
1427
1427
|
}),
|
|
1428
|
-
|
|
1428
|
+
h.length > 0 && /* @__PURE__ */ N(H, {
|
|
1429
1429
|
style: J.filesList,
|
|
1430
|
-
children:
|
|
1430
|
+
children: h.map((e, t) => /* @__PURE__ */ P(H, {
|
|
1431
1431
|
style: [J.fileItem, {
|
|
1432
|
-
backgroundColor:
|
|
1433
|
-
borderColor:
|
|
1432
|
+
backgroundColor: f.card,
|
|
1433
|
+
borderColor: f.separator
|
|
1434
1434
|
}],
|
|
1435
1435
|
children: [
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1438
|
-
children: /* @__PURE__ */
|
|
1436
|
+
/* @__PURE__ */ N(H, {
|
|
1437
|
+
style: [J.fileIcon, { backgroundColor: f.muted }],
|
|
1438
|
+
children: /* @__PURE__ */ N(B, {
|
|
1439
1439
|
style: J.fileIconText,
|
|
1440
1440
|
children: "📄"
|
|
1441
1441
|
})
|
|
1442
1442
|
}),
|
|
1443
|
-
/* @__PURE__ */
|
|
1443
|
+
/* @__PURE__ */ P(H, {
|
|
1444
1444
|
style: J.fileInfo,
|
|
1445
|
-
children: [/* @__PURE__ */
|
|
1446
|
-
style: [J.fileName, { color:
|
|
1445
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1446
|
+
style: [J.fileName, { color: f.text }],
|
|
1447
1447
|
numberOfLines: 1,
|
|
1448
1448
|
children: e.name
|
|
1449
|
-
}), e.size > 0 && /* @__PURE__ */
|
|
1450
|
-
style: [J.fileSize, { color:
|
|
1449
|
+
}), e.size > 0 && /* @__PURE__ */ N(B, {
|
|
1450
|
+
style: [J.fileSize, { color: f.textMuted }],
|
|
1451
1451
|
children: b(e.size)
|
|
1452
1452
|
})]
|
|
1453
1453
|
}),
|
|
1454
|
-
/* @__PURE__ */
|
|
1454
|
+
/* @__PURE__ */ N(V, {
|
|
1455
1455
|
style: J.removeButton,
|
|
1456
1456
|
onPress: () => y(t),
|
|
1457
1457
|
activeOpacity: .7,
|
|
1458
|
-
children: /* @__PURE__ */
|
|
1459
|
-
style: [J.removeButtonText, { color:
|
|
1458
|
+
children: /* @__PURE__ */ N(B, {
|
|
1459
|
+
style: [J.removeButtonText, { color: f.textMuted }],
|
|
1460
1460
|
children: "✕"
|
|
1461
1461
|
})
|
|
1462
1462
|
})
|
|
1463
1463
|
]
|
|
1464
1464
|
}, `${e.name}-${t}`))
|
|
1465
1465
|
}),
|
|
1466
|
-
/* @__PURE__ */
|
|
1466
|
+
/* @__PURE__ */ N(V, {
|
|
1467
1467
|
style: [J.pickButton, {
|
|
1468
|
-
backgroundColor:
|
|
1469
|
-
borderColor:
|
|
1468
|
+
backgroundColor: f.input,
|
|
1469
|
+
borderColor: f.border
|
|
1470
1470
|
}],
|
|
1471
1471
|
onPress: v,
|
|
1472
1472
|
activeOpacity: .7,
|
|
1473
|
-
children: /* @__PURE__ */
|
|
1474
|
-
style: [J.pickButtonText, { color:
|
|
1475
|
-
children:
|
|
1473
|
+
children: /* @__PURE__ */ N(B, {
|
|
1474
|
+
style: [J.pickButtonText, { color: f.textMuted }],
|
|
1475
|
+
children: h.length === 0 ? m(_ ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : m(_ ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1476
1476
|
})
|
|
1477
1477
|
}),
|
|
1478
|
-
|
|
1479
|
-
style: [J.error, { color:
|
|
1480
|
-
children:
|
|
1478
|
+
l && /* @__PURE__ */ N(B, {
|
|
1479
|
+
style: [J.error, { color: f.error }],
|
|
1480
|
+
children: l
|
|
1481
1481
|
}),
|
|
1482
|
-
|
|
1483
|
-
style: [J.helperText, { color:
|
|
1484
|
-
children:
|
|
1482
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
1483
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1484
|
+
children: d
|
|
1485
1485
|
})
|
|
1486
1486
|
]
|
|
1487
|
-
}) : /* @__PURE__ */
|
|
1487
|
+
}) : /* @__PURE__ */ P(H, {
|
|
1488
1488
|
style: J.container,
|
|
1489
1489
|
children: [
|
|
1490
|
-
/* @__PURE__ */
|
|
1491
|
-
style: [J.label, { color:
|
|
1492
|
-
children: [
|
|
1493
|
-
style: { color:
|
|
1490
|
+
/* @__PURE__ */ P(B, {
|
|
1491
|
+
style: [J.label, { color: f.textSecondary }],
|
|
1492
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
1493
|
+
style: { color: f.error },
|
|
1494
1494
|
children: "*"
|
|
1495
1495
|
})]
|
|
1496
1496
|
}),
|
|
1497
|
-
/* @__PURE__ */
|
|
1497
|
+
/* @__PURE__ */ N(H, {
|
|
1498
1498
|
style: [J.unavailableContainer, {
|
|
1499
|
-
backgroundColor:
|
|
1500
|
-
borderColor:
|
|
1499
|
+
backgroundColor: f.errorLight,
|
|
1500
|
+
borderColor: f.error
|
|
1501
1501
|
}],
|
|
1502
|
-
children: /* @__PURE__ */
|
|
1503
|
-
style: [J.unavailableText, { color:
|
|
1504
|
-
children:
|
|
1502
|
+
children: /* @__PURE__ */ N(B, {
|
|
1503
|
+
style: [J.unavailableText, { color: f.error }],
|
|
1504
|
+
children: m("renderer.defaultInputs.filePickerUnavailable")
|
|
1505
1505
|
})
|
|
1506
1506
|
}),
|
|
1507
|
-
|
|
1508
|
-
style: [J.helperText, { color:
|
|
1509
|
-
children:
|
|
1507
|
+
d && /* @__PURE__ */ N(B, {
|
|
1508
|
+
style: [J.helperText, { color: f.textMuted }],
|
|
1509
|
+
children: d
|
|
1510
1510
|
})
|
|
1511
1511
|
]
|
|
1512
1512
|
});
|
|
@@ -1579,15 +1579,15 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1579
1579
|
fontSize: 12,
|
|
1580
1580
|
textAlign: "center"
|
|
1581
1581
|
}
|
|
1582
|
-
}),
|
|
1583
|
-
let n =
|
|
1584
|
-
return /* @__PURE__ */
|
|
1585
|
-
style:
|
|
1586
|
-
children: [/* @__PURE__ */
|
|
1587
|
-
style: [
|
|
1582
|
+
}), Ce = (e) => null, we = ({ missing: e, children: t }) => {
|
|
1583
|
+
let n = p(), { colors: r } = g();
|
|
1584
|
+
return /* @__PURE__ */ P(ae, { children: [t, e.length > 0 && /* @__PURE__ */ P(H, {
|
|
1585
|
+
style: Te.container,
|
|
1586
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1587
|
+
style: [Te.title, { color: r.textMuted }],
|
|
1588
1588
|
children: n("renderer.dependencyHint.title")
|
|
1589
|
-
}), e.map((e) => /* @__PURE__ */
|
|
1590
|
-
style: [
|
|
1589
|
+
}), e.map((e) => /* @__PURE__ */ P(B, {
|
|
1590
|
+
style: [Te.item, { color: r.textMuted }],
|
|
1591
1591
|
children: [
|
|
1592
1592
|
"•",
|
|
1593
1593
|
" ",
|
|
@@ -1595,7 +1595,7 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1595
1595
|
]
|
|
1596
1596
|
}, e.id))]
|
|
1597
1597
|
})] });
|
|
1598
|
-
},
|
|
1598
|
+
}, Te = z.create({
|
|
1599
1599
|
container: {
|
|
1600
1600
|
gap: 2,
|
|
1601
1601
|
marginTop: 4
|
|
@@ -1605,75 +1605,80 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1605
1605
|
fontSize: 12,
|
|
1606
1606
|
fontWeight: "500"
|
|
1607
1607
|
}
|
|
1608
|
-
}),
|
|
1609
|
-
if (n >
|
|
1608
|
+
}), Ee = (e) => e.replace(/<[^>]*>/g, ""), De = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), Oe = (e, t = {}) => e == null || e === "" ? "" : De(Ee(String(e))), ke = 100, Ae = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1609
|
+
if (n > ke) return console.warn(`sanitizeHttpResponse: Maximum depth (${ke}) exceeded.`), typeof e == "string" ? Oe(e, t) : "[Max Depth Exceeded]";
|
|
1610
1610
|
if (e == null) return e;
|
|
1611
|
-
if (typeof e == "string") return
|
|
1612
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1611
|
+
if (typeof e == "string") return Oe(e, t);
|
|
1612
|
+
if (Array.isArray(e)) return e.map((e) => Ae(e, t, n + 1, r));
|
|
1613
1613
|
if (typeof e == "object") {
|
|
1614
1614
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1615
1615
|
r.add(e);
|
|
1616
1616
|
let i = {};
|
|
1617
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1617
|
+
for (let [a, o] of Object.entries(e)) i[a] = Ae(o, t, n + 1, r);
|
|
1618
1618
|
return r.delete(e), i;
|
|
1619
1619
|
}
|
|
1620
1620
|
return e;
|
|
1621
|
-
},
|
|
1621
|
+
}, je = (e) => {
|
|
1622
1622
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1623
1623
|
return Array.from(t, (e) => e[1]);
|
|
1624
|
-
},
|
|
1624
|
+
}, Me = (e, t) => je(e).every((e) => {
|
|
1625
1625
|
let n = t[e];
|
|
1626
1626
|
return n != null && n !== "";
|
|
1627
|
-
}),
|
|
1627
|
+
}), Ne = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1628
1628
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1629
1629
|
return n ? encodeURIComponent(a) : a;
|
|
1630
|
-
}),
|
|
1631
|
-
let [s, c] =
|
|
1632
|
-
|
|
1630
|
+
}), Pe = ({ field: e, extra: i }) => {
|
|
1631
|
+
let [s, c] = M(!1), [l, u] = M(null), [d, f] = M([]), [m, h] = M(""), [_, v] = M(!1), { value: b, placeholder: C } = e, { node: w, setValue: T, error: E, label: te, helperText: D, missingDependencies: O } = i, { formValues: k, inputNodes: ne, headers: ae, baseUrl: se } = a(), { colors: F } = g(), { httpConfig: I } = w.data, R = p(), z = j(!1), le = j(!1), de = j(""), fe = j(I), pe = j(k), me = j(ne), he = j(ae), U = j(se), _e = j(T), ve = j(null), W = j(null), ye = ie(() => I?.url ? je(I.url) : [], [I?.url]), G = ye.length > 0, be = ie(() => ye.map((e) => `${e}:${String(k[e] ?? "")}`).join("|"), [ye, k]), K = ie(() => I?.url ? G ? Me(I.url, k) : !0 : !1, [
|
|
1632
|
+
I?.url,
|
|
1633
1633
|
G,
|
|
1634
|
-
|
|
1635
|
-
]),
|
|
1634
|
+
k
|
|
1635
|
+
]), xe = re(async (e) => {
|
|
1636
1636
|
W.current && W.current.abort();
|
|
1637
1637
|
let i = new AbortController();
|
|
1638
1638
|
W.current = i;
|
|
1639
|
-
let a =
|
|
1639
|
+
let a = fe.current, s = pe.current, l = _e.current;
|
|
1640
1640
|
if (!a?.url) {
|
|
1641
1641
|
u(R("renderer.defaultHttpInput.noUrlConfigured")), W.current = null;
|
|
1642
1642
|
return;
|
|
1643
1643
|
}
|
|
1644
|
-
if (a.url && !
|
|
1644
|
+
if (a.url && !Me(a.url, s)) {
|
|
1645
1645
|
W.current = null;
|
|
1646
1646
|
return;
|
|
1647
1647
|
}
|
|
1648
1648
|
c(!0), u(null);
|
|
1649
1649
|
try {
|
|
1650
|
-
let
|
|
1650
|
+
let d = n(Ne(a.url, s, !0), U.current), p = ee(a.searchParam && e ? `${d}${d.includes("?") ? "&" : "?"}${a.searchParam}=${encodeURIComponent(e)}` : d, r(a.queryParams, s)), m = t({ "Content-Type": "application/json" }, r(he.current, s), r(a.headers, s)), h = [
|
|
1651
1651
|
"POST",
|
|
1652
1652
|
"PUT",
|
|
1653
1653
|
"PATCH"
|
|
1654
|
-
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(
|
|
1655
|
-
body:
|
|
1656
|
-
headers: Object.fromEntries(Object.entries(
|
|
1654
|
+
].includes(a.method || "") ? a.sendAllFormValues ? JSON.stringify(y(s, me.current)) : x(a.body, s, me.current) : void 0, g = setTimeout(() => i.abort(), 3e4), _ = await fetch(p, {
|
|
1655
|
+
body: h || void 0,
|
|
1656
|
+
headers: Object.fromEntries(Object.entries(m).filter(([, e]) => e)),
|
|
1657
1657
|
method: a.method || "GET",
|
|
1658
1658
|
signal: i.signal
|
|
1659
1659
|
});
|
|
1660
|
-
if (clearTimeout(
|
|
1661
|
-
u(`HTTP Error ${
|
|
1660
|
+
if (clearTimeout(g), !_.ok) {
|
|
1661
|
+
u(`HTTP Error ${_.status}: ${_.statusText}`), c(!1);
|
|
1662
|
+
return;
|
|
1663
|
+
}
|
|
1664
|
+
let v = o(await _.text());
|
|
1665
|
+
if (!v.ok) {
|
|
1666
|
+
u(R("renderer.defaultHttpInput.invalidJson"));
|
|
1662
1667
|
return;
|
|
1663
1668
|
}
|
|
1664
|
-
let
|
|
1665
|
-
if (a.responseMapping && Array.isArray(
|
|
1669
|
+
let b = Ae(v.value), C = a.responsePath ? S(b, a.responsePath) : b;
|
|
1670
|
+
if (a.responseMapping && Array.isArray(C)) {
|
|
1666
1671
|
let { valueField: e = "value", labelField: t = "label", descriptionField: n, imageField: r } = a.responseMapping;
|
|
1667
|
-
f(
|
|
1668
|
-
let a = n ?
|
|
1672
|
+
f(C.map((i) => {
|
|
1673
|
+
let a = n ? S(i, n) : void 0, o = r ? S(i, r) : void 0;
|
|
1669
1674
|
return {
|
|
1670
1675
|
description: a != null && a !== "" ? String(a) : void 0,
|
|
1671
1676
|
image: typeof o == "string" && o !== "" ? o : void 0,
|
|
1672
|
-
label: String(
|
|
1673
|
-
value: String(
|
|
1677
|
+
label: String(S(i, t) || ""),
|
|
1678
|
+
value: String(S(i, e) || "")
|
|
1674
1679
|
};
|
|
1675
1680
|
}));
|
|
1676
|
-
} else
|
|
1681
|
+
} else l(typeof C == "string" ? C : JSON.stringify(C));
|
|
1677
1682
|
} catch (e) {
|
|
1678
1683
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1679
1684
|
u(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
@@ -1681,112 +1686,112 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1681
1686
|
c(!1), W.current = null;
|
|
1682
1687
|
}
|
|
1683
1688
|
}, [R]);
|
|
1684
|
-
if (
|
|
1685
|
-
|
|
1689
|
+
if (A(() => {
|
|
1690
|
+
fe.current = I, pe.current = k, me.current = ne, he.current = ae, U.current = se, _e.current = T, ve.current = xe;
|
|
1686
1691
|
}, [
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
re,
|
|
1692
|
+
I,
|
|
1693
|
+
k,
|
|
1694
|
+
ne,
|
|
1691
1695
|
ae,
|
|
1696
|
+
se,
|
|
1692
1697
|
T,
|
|
1693
|
-
|
|
1694
|
-
]),
|
|
1695
|
-
W.current && W.current.abort(), z.current = !1,
|
|
1696
|
-
}, []),
|
|
1698
|
+
xe
|
|
1699
|
+
]), A(() => () => {
|
|
1700
|
+
W.current && W.current.abort(), z.current = !1, le.current = !1;
|
|
1701
|
+
}, []), A(() => {
|
|
1697
1702
|
if (z.current) return;
|
|
1698
1703
|
z.current = !0;
|
|
1699
|
-
let e =
|
|
1700
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1701
|
-
}, []),
|
|
1702
|
-
if (!z.current || !G ||
|
|
1704
|
+
let e = fe.current, t = pe.current, n = ve.current, r = e?.url && Me(e.url, t);
|
|
1705
|
+
e?.fetchOnMount && r && n && (n(), e.url && (de.current = je(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1706
|
+
}, []), A(() => {
|
|
1707
|
+
if (!z.current || !G || de.current === be || !K) return;
|
|
1703
1708
|
let e = setTimeout(() => {
|
|
1704
|
-
|
|
1709
|
+
xe(), de.current = be;
|
|
1705
1710
|
}, 500);
|
|
1706
1711
|
return () => clearTimeout(e);
|
|
1707
1712
|
}, [
|
|
1708
|
-
|
|
1713
|
+
be,
|
|
1709
1714
|
G,
|
|
1710
1715
|
K,
|
|
1711
|
-
|
|
1712
|
-
]),
|
|
1713
|
-
if (!
|
|
1714
|
-
|
|
1716
|
+
xe
|
|
1717
|
+
]), A(() => {
|
|
1718
|
+
if (!le.current) {
|
|
1719
|
+
le.current = !0;
|
|
1715
1720
|
return;
|
|
1716
1721
|
}
|
|
1717
|
-
let e =
|
|
1718
|
-
e?.fetchOnMount && r && n && (n(), e.url && (
|
|
1719
|
-
}, [
|
|
1720
|
-
body:
|
|
1721
|
-
fetchOnMount:
|
|
1722
|
-
headers:
|
|
1723
|
-
method:
|
|
1724
|
-
queryParams:
|
|
1725
|
-
responseMapping:
|
|
1726
|
-
responsePath:
|
|
1727
|
-
searchParam:
|
|
1728
|
-
sendAllFormValues:
|
|
1729
|
-
url:
|
|
1730
|
-
}), [
|
|
1731
|
-
if (!(
|
|
1722
|
+
let e = fe.current, t = pe.current, n = ve.current, r = e?.url && Me(e.url, t);
|
|
1723
|
+
e?.fetchOnMount && r && n && (n(), e.url && (de.current = je(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1724
|
+
}, [ie(() => JSON.stringify({
|
|
1725
|
+
body: I?.body,
|
|
1726
|
+
fetchOnMount: I?.fetchOnMount,
|
|
1727
|
+
headers: I?.headers,
|
|
1728
|
+
method: I?.method,
|
|
1729
|
+
queryParams: I?.queryParams,
|
|
1730
|
+
responseMapping: I?.responseMapping,
|
|
1731
|
+
responsePath: I?.responsePath,
|
|
1732
|
+
searchParam: I?.searchParam,
|
|
1733
|
+
sendAllFormValues: I?.sendAllFormValues,
|
|
1734
|
+
url: I?.url
|
|
1735
|
+
}), [I])]), A(() => {
|
|
1736
|
+
if (!(I?.searchParam && m)) return;
|
|
1732
1737
|
let e = setTimeout(() => {
|
|
1733
|
-
|
|
1738
|
+
xe(m);
|
|
1734
1739
|
}, 300);
|
|
1735
1740
|
return () => clearTimeout(e);
|
|
1736
1741
|
}, [
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
]),
|
|
1741
|
-
let e = Array.isArray(
|
|
1742
|
-
if (
|
|
1743
|
-
let n = s &&
|
|
1744
|
-
return /* @__PURE__ */
|
|
1742
|
+
m,
|
|
1743
|
+
I?.searchParam,
|
|
1744
|
+
xe
|
|
1745
|
+
]), I?.responseMapping) {
|
|
1746
|
+
let e = Array.isArray(b) ? b[0] : b, t = d.find((t) => t.value === e);
|
|
1747
|
+
if (I.searchParam) {
|
|
1748
|
+
let n = s && I?.showLoading;
|
|
1749
|
+
return /* @__PURE__ */ P(H, {
|
|
1745
1750
|
style: Y.container,
|
|
1746
1751
|
children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
style: [Y.label, { color:
|
|
1749
|
-
children: [
|
|
1750
|
-
style: { color:
|
|
1752
|
+
/* @__PURE__ */ P(B, {
|
|
1753
|
+
style: [Y.label, { color: F.textSecondary }],
|
|
1754
|
+
children: [te || w.data.name, w.data.required && /* @__PURE__ */ N(B, {
|
|
1755
|
+
style: { color: F.error },
|
|
1751
1756
|
children: "*"
|
|
1752
1757
|
})]
|
|
1753
1758
|
}),
|
|
1754
|
-
/* @__PURE__ */
|
|
1755
|
-
missing:
|
|
1756
|
-
children: /* @__PURE__ */
|
|
1759
|
+
/* @__PURE__ */ N(we, {
|
|
1760
|
+
missing: O,
|
|
1761
|
+
children: /* @__PURE__ */ P(V, {
|
|
1757
1762
|
style: [
|
|
1758
1763
|
Y.trigger,
|
|
1759
1764
|
{
|
|
1760
|
-
backgroundColor:
|
|
1761
|
-
borderColor:
|
|
1765
|
+
backgroundColor: F.input,
|
|
1766
|
+
borderColor: F.border
|
|
1762
1767
|
},
|
|
1763
|
-
E && { borderColor:
|
|
1764
|
-
|
|
1768
|
+
E && { borderColor: F.error },
|
|
1769
|
+
O.length > 0 && { backgroundColor: F.muted }
|
|
1765
1770
|
],
|
|
1766
1771
|
onPress: () => v(!0),
|
|
1767
|
-
disabled:
|
|
1772
|
+
disabled: O.length > 0,
|
|
1768
1773
|
activeOpacity: .7,
|
|
1769
1774
|
children: [
|
|
1770
|
-
n ? /* @__PURE__ */
|
|
1775
|
+
n ? /* @__PURE__ */ P(H, {
|
|
1771
1776
|
style: Y.loadingTrigger,
|
|
1772
|
-
children: [/* @__PURE__ */
|
|
1777
|
+
children: [/* @__PURE__ */ N(oe, {
|
|
1773
1778
|
size: "small",
|
|
1774
|
-
color:
|
|
1775
|
-
}), /* @__PURE__ */
|
|
1776
|
-
style: [Y.triggerText, { color:
|
|
1779
|
+
color: F.primary
|
|
1780
|
+
}), /* @__PURE__ */ N(B, {
|
|
1781
|
+
style: [Y.triggerText, { color: F.textMuted }],
|
|
1777
1782
|
numberOfLines: 1,
|
|
1778
1783
|
children: t?.label || C || R("renderer.defaultHttpInput.search")
|
|
1779
1784
|
})]
|
|
1780
|
-
}) : /* @__PURE__ */
|
|
1785
|
+
}) : /* @__PURE__ */ N(B, {
|
|
1781
1786
|
style: [
|
|
1782
1787
|
Y.triggerText,
|
|
1783
|
-
{ color:
|
|
1784
|
-
!t && { color:
|
|
1788
|
+
{ color: F.text },
|
|
1789
|
+
!t && { color: F.textMuted }
|
|
1785
1790
|
],
|
|
1786
1791
|
numberOfLines: 1,
|
|
1787
1792
|
children: t?.label || C || R("renderer.defaultHttpInput.search")
|
|
1788
1793
|
}),
|
|
1789
|
-
e ? /* @__PURE__ */
|
|
1794
|
+
e ? /* @__PURE__ */ N(V, {
|
|
1790
1795
|
onPress: () => T(""),
|
|
1791
1796
|
hitSlop: {
|
|
1792
1797
|
bottom: 8,
|
|
@@ -1795,56 +1800,56 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1795
1800
|
top: 8
|
|
1796
1801
|
},
|
|
1797
1802
|
style: Y.clearButton,
|
|
1798
|
-
children: /* @__PURE__ */
|
|
1799
|
-
style: [Y.clearIcon, { color:
|
|
1803
|
+
children: /* @__PURE__ */ N(B, {
|
|
1804
|
+
style: [Y.clearIcon, { color: F.textMuted }],
|
|
1800
1805
|
children: "✕"
|
|
1801
1806
|
})
|
|
1802
1807
|
}) : null,
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
style: [Y.arrow, { color:
|
|
1808
|
+
/* @__PURE__ */ N(B, {
|
|
1809
|
+
style: [Y.arrow, { color: F.textMuted }],
|
|
1805
1810
|
children: "▼"
|
|
1806
1811
|
})
|
|
1807
1812
|
]
|
|
1808
1813
|
})
|
|
1809
1814
|
}),
|
|
1810
|
-
/* @__PURE__ */
|
|
1811
|
-
visible:
|
|
1815
|
+
/* @__PURE__ */ N(L, {
|
|
1816
|
+
visible: _,
|
|
1812
1817
|
transparent: !0,
|
|
1813
1818
|
animationType: "fade",
|
|
1814
1819
|
onRequestClose: () => v(!1),
|
|
1815
|
-
children: /* @__PURE__ */
|
|
1820
|
+
children: /* @__PURE__ */ N(V, {
|
|
1816
1821
|
style: Y.modalOverlay,
|
|
1817
1822
|
activeOpacity: 1,
|
|
1818
1823
|
onPress: () => v(!1),
|
|
1819
|
-
children: /* @__PURE__ */
|
|
1820
|
-
style: [Y.modalContent, { backgroundColor:
|
|
1824
|
+
children: /* @__PURE__ */ P(V, {
|
|
1825
|
+
style: [Y.modalContent, { backgroundColor: F.card }],
|
|
1821
1826
|
activeOpacity: 1,
|
|
1822
1827
|
onPress: () => {},
|
|
1823
1828
|
children: [
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
1826
|
-
children: [/* @__PURE__ */
|
|
1827
|
-
style: [Y.modalTitle, { color:
|
|
1828
|
-
children:
|
|
1829
|
-
}), /* @__PURE__ */
|
|
1829
|
+
/* @__PURE__ */ P(H, {
|
|
1830
|
+
style: [Y.modalHeader, { borderBottomColor: F.separator }],
|
|
1831
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1832
|
+
style: [Y.modalTitle, { color: F.text }],
|
|
1833
|
+
children: te || w.data.name
|
|
1834
|
+
}), /* @__PURE__ */ N(V, {
|
|
1830
1835
|
onPress: () => v(!1),
|
|
1831
|
-
children: /* @__PURE__ */
|
|
1832
|
-
style: [Y.closeButton, { color:
|
|
1836
|
+
children: /* @__PURE__ */ N(B, {
|
|
1837
|
+
style: [Y.closeButton, { color: F.textMuted }],
|
|
1833
1838
|
children: "✕"
|
|
1834
1839
|
})
|
|
1835
1840
|
})]
|
|
1836
1841
|
}),
|
|
1837
|
-
/* @__PURE__ */
|
|
1842
|
+
/* @__PURE__ */ N(H, {
|
|
1838
1843
|
style: Y.searchContainer,
|
|
1839
|
-
children: /* @__PURE__ */
|
|
1844
|
+
children: /* @__PURE__ */ N(ue, {
|
|
1840
1845
|
style: [Y.searchInput, {
|
|
1841
|
-
backgroundColor:
|
|
1842
|
-
borderColor:
|
|
1843
|
-
color:
|
|
1846
|
+
backgroundColor: F.muted,
|
|
1847
|
+
borderColor: F.border,
|
|
1848
|
+
color: F.text
|
|
1844
1849
|
}],
|
|
1845
1850
|
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1846
|
-
placeholderTextColor:
|
|
1847
|
-
value:
|
|
1851
|
+
placeholderTextColor: F.textMuted,
|
|
1852
|
+
value: m,
|
|
1848
1853
|
onChangeText: (e) => {
|
|
1849
1854
|
h(e), u(null);
|
|
1850
1855
|
},
|
|
@@ -1853,51 +1858,51 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1853
1858
|
autoCorrect: !1
|
|
1854
1859
|
})
|
|
1855
1860
|
}),
|
|
1856
|
-
s ? /* @__PURE__ */
|
|
1861
|
+
s ? /* @__PURE__ */ N(H, {
|
|
1857
1862
|
style: Y.loadingContainer,
|
|
1858
|
-
children: /* @__PURE__ */
|
|
1863
|
+
children: /* @__PURE__ */ N(oe, {
|
|
1859
1864
|
size: "small",
|
|
1860
|
-
color:
|
|
1865
|
+
color: F.primary
|
|
1861
1866
|
})
|
|
1862
|
-
}) : l ? /* @__PURE__ */
|
|
1867
|
+
}) : l ? /* @__PURE__ */ P(H, {
|
|
1863
1868
|
style: Y.errorContainer,
|
|
1864
|
-
children: [/* @__PURE__ */
|
|
1865
|
-
style: [Y.errorText, { color:
|
|
1869
|
+
children: [/* @__PURE__ */ N(B, {
|
|
1870
|
+
style: [Y.errorText, { color: F.error }],
|
|
1866
1871
|
children: l
|
|
1867
|
-
}), /* @__PURE__ */
|
|
1868
|
-
onPress: () =>
|
|
1872
|
+
}), /* @__PURE__ */ N(V, {
|
|
1873
|
+
onPress: () => xe(m),
|
|
1869
1874
|
style: Y.retryButton,
|
|
1870
|
-
children: /* @__PURE__ */
|
|
1871
|
-
style: [Y.retryButtonText, { color:
|
|
1875
|
+
children: /* @__PURE__ */ N(B, {
|
|
1876
|
+
style: [Y.retryButtonText, { color: F.primary }],
|
|
1872
1877
|
children: R("renderer.defaultHttpInput.retry")
|
|
1873
1878
|
})
|
|
1874
1879
|
})]
|
|
1875
|
-
}) : /* @__PURE__ */
|
|
1880
|
+
}) : /* @__PURE__ */ N(ce, {
|
|
1876
1881
|
data: d,
|
|
1877
1882
|
keyExtractor: (e) => e.value,
|
|
1878
1883
|
style: Y.optionsList,
|
|
1879
1884
|
contentContainerStyle: Y.optionsListContent,
|
|
1880
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1885
|
+
ListEmptyComponent: /* @__PURE__ */ N(H, {
|
|
1881
1886
|
style: Y.emptyContainer,
|
|
1882
|
-
children: /* @__PURE__ */
|
|
1883
|
-
style: [Y.emptyText, { color:
|
|
1887
|
+
children: /* @__PURE__ */ N(B, {
|
|
1888
|
+
style: [Y.emptyText, { color: F.textMuted }],
|
|
1884
1889
|
children: R("renderer.defaultHttpInput.noResults")
|
|
1885
1890
|
})
|
|
1886
1891
|
}),
|
|
1887
1892
|
renderItem: ({ item: t }) => {
|
|
1888
1893
|
let n = t.value === e;
|
|
1889
|
-
return /* @__PURE__ */
|
|
1890
|
-
style: [Y.option, n && { backgroundColor:
|
|
1894
|
+
return /* @__PURE__ */ P(V, {
|
|
1895
|
+
style: [Y.option, n && { backgroundColor: F.primaryLight }],
|
|
1891
1896
|
onPress: () => {
|
|
1892
1897
|
T(t.value), v(!1);
|
|
1893
1898
|
},
|
|
1894
1899
|
activeOpacity: .7,
|
|
1895
|
-
children: [/* @__PURE__ */
|
|
1900
|
+
children: [/* @__PURE__ */ N(ge, {
|
|
1896
1901
|
label: t.label,
|
|
1897
1902
|
description: t.description,
|
|
1898
1903
|
image: t.image
|
|
1899
|
-
}), n && /* @__PURE__ */
|
|
1900
|
-
style: [Y.checkmark, { color:
|
|
1904
|
+
}), n && /* @__PURE__ */ N(B, {
|
|
1905
|
+
style: [Y.checkmark, { color: F.primary }],
|
|
1901
1906
|
children: "✓"
|
|
1902
1907
|
})]
|
|
1903
1908
|
});
|
|
@@ -1907,59 +1912,59 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1907
1912
|
})
|
|
1908
1913
|
})
|
|
1909
1914
|
}),
|
|
1910
|
-
E && /* @__PURE__ */
|
|
1911
|
-
style: [Y.error, { color:
|
|
1915
|
+
E && /* @__PURE__ */ N(B, {
|
|
1916
|
+
style: [Y.error, { color: F.error }],
|
|
1912
1917
|
children: E
|
|
1913
1918
|
}),
|
|
1914
|
-
|
|
1915
|
-
style: [Y.helperText, { color:
|
|
1916
|
-
children:
|
|
1919
|
+
D && !E && /* @__PURE__ */ N(B, {
|
|
1920
|
+
style: [Y.helperText, { color: F.textMuted }],
|
|
1921
|
+
children: D
|
|
1917
1922
|
})
|
|
1918
1923
|
]
|
|
1919
1924
|
});
|
|
1920
1925
|
}
|
|
1921
|
-
let n = s &&
|
|
1922
|
-
return /* @__PURE__ */
|
|
1926
|
+
let n = s && I?.showLoading, r = O.length === 0 && d.length === 0 && !n ? l ?? R("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1927
|
+
return /* @__PURE__ */ P(H, {
|
|
1923
1928
|
style: Y.container,
|
|
1924
1929
|
children: [
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
style: [Y.label, { color:
|
|
1927
|
-
children: [
|
|
1928
|
-
style: { color:
|
|
1930
|
+
/* @__PURE__ */ P(B, {
|
|
1931
|
+
style: [Y.label, { color: F.textSecondary }],
|
|
1932
|
+
children: [te || w.data.name, w.data.required && /* @__PURE__ */ N(B, {
|
|
1933
|
+
style: { color: F.error },
|
|
1929
1934
|
children: "*"
|
|
1930
1935
|
})]
|
|
1931
1936
|
}),
|
|
1932
|
-
/* @__PURE__ */
|
|
1933
|
-
missing:
|
|
1934
|
-
children: /* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ N(we, {
|
|
1938
|
+
missing: O,
|
|
1939
|
+
children: /* @__PURE__ */ P(V, {
|
|
1935
1940
|
style: [
|
|
1936
1941
|
Y.trigger,
|
|
1937
1942
|
{
|
|
1938
|
-
backgroundColor:
|
|
1939
|
-
borderColor:
|
|
1943
|
+
backgroundColor: F.input,
|
|
1944
|
+
borderColor: F.border
|
|
1940
1945
|
},
|
|
1941
|
-
E && { borderColor:
|
|
1942
|
-
(n || d.length === 0) && { backgroundColor:
|
|
1946
|
+
E && { borderColor: F.error },
|
|
1947
|
+
(n || d.length === 0) && { backgroundColor: F.muted }
|
|
1943
1948
|
],
|
|
1944
1949
|
onPress: () => v(!0),
|
|
1945
1950
|
disabled: n || d.length === 0,
|
|
1946
1951
|
activeOpacity: .7,
|
|
1947
1952
|
children: [
|
|
1948
|
-
n && /* @__PURE__ */
|
|
1953
|
+
n && /* @__PURE__ */ N(oe, {
|
|
1949
1954
|
size: "small",
|
|
1950
|
-
color:
|
|
1955
|
+
color: F.primary,
|
|
1951
1956
|
style: Y.triggerLoader
|
|
1952
1957
|
}),
|
|
1953
|
-
/* @__PURE__ */
|
|
1958
|
+
/* @__PURE__ */ N(B, {
|
|
1954
1959
|
style: [
|
|
1955
1960
|
Y.triggerText,
|
|
1956
|
-
{ color:
|
|
1957
|
-
!t && { color:
|
|
1961
|
+
{ color: F.text },
|
|
1962
|
+
!t && { color: F.textMuted }
|
|
1958
1963
|
],
|
|
1959
1964
|
numberOfLines: 1,
|
|
1960
1965
|
children: t?.label || C || R("renderer.defaultHttpInput.selectOption")
|
|
1961
1966
|
}),
|
|
1962
|
-
e ? /* @__PURE__ */
|
|
1967
|
+
e ? /* @__PURE__ */ N(V, {
|
|
1963
1968
|
onPress: () => T(""),
|
|
1964
1969
|
hitSlop: {
|
|
1965
1970
|
bottom: 8,
|
|
@@ -1968,66 +1973,66 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
1968
1973
|
top: 8
|
|
1969
1974
|
},
|
|
1970
1975
|
style: Y.clearButton,
|
|
1971
|
-
children: /* @__PURE__ */
|
|
1972
|
-
style: [Y.clearIcon, { color:
|
|
1976
|
+
children: /* @__PURE__ */ N(B, {
|
|
1977
|
+
style: [Y.clearIcon, { color: F.textMuted }],
|
|
1973
1978
|
children: "✕"
|
|
1974
1979
|
})
|
|
1975
1980
|
}) : null,
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
style: [Y.arrow, { color:
|
|
1981
|
+
/* @__PURE__ */ N(B, {
|
|
1982
|
+
style: [Y.arrow, { color: F.textMuted }],
|
|
1978
1983
|
children: "▼"
|
|
1979
1984
|
})
|
|
1980
1985
|
]
|
|
1981
1986
|
})
|
|
1982
1987
|
}),
|
|
1983
|
-
r && /* @__PURE__ */
|
|
1984
|
-
style: [Y.disabledMessage, { color:
|
|
1988
|
+
r && /* @__PURE__ */ N(B, {
|
|
1989
|
+
style: [Y.disabledMessage, { color: F.error }],
|
|
1985
1990
|
children: r
|
|
1986
1991
|
}),
|
|
1987
|
-
/* @__PURE__ */
|
|
1988
|
-
visible:
|
|
1992
|
+
/* @__PURE__ */ N(L, {
|
|
1993
|
+
visible: _,
|
|
1989
1994
|
transparent: !0,
|
|
1990
1995
|
animationType: "fade",
|
|
1991
1996
|
onRequestClose: () => v(!1),
|
|
1992
|
-
children: /* @__PURE__ */
|
|
1997
|
+
children: /* @__PURE__ */ N(V, {
|
|
1993
1998
|
style: Y.modalOverlay,
|
|
1994
1999
|
activeOpacity: 1,
|
|
1995
2000
|
onPress: () => v(!1),
|
|
1996
|
-
children: /* @__PURE__ */
|
|
1997
|
-
style: [Y.modalContent, { backgroundColor:
|
|
2001
|
+
children: /* @__PURE__ */ P(V, {
|
|
2002
|
+
style: [Y.modalContent, { backgroundColor: F.card }],
|
|
1998
2003
|
activeOpacity: 1,
|
|
1999
2004
|
onPress: () => {},
|
|
2000
|
-
children: [/* @__PURE__ */
|
|
2001
|
-
style: [Y.modalHeader, { borderBottomColor:
|
|
2002
|
-
children: [/* @__PURE__ */
|
|
2003
|
-
style: [Y.modalTitle, { color:
|
|
2004
|
-
children:
|
|
2005
|
-
}), /* @__PURE__ */
|
|
2005
|
+
children: [/* @__PURE__ */ P(H, {
|
|
2006
|
+
style: [Y.modalHeader, { borderBottomColor: F.separator }],
|
|
2007
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2008
|
+
style: [Y.modalTitle, { color: F.text }],
|
|
2009
|
+
children: te || w.data.name
|
|
2010
|
+
}), /* @__PURE__ */ N(V, {
|
|
2006
2011
|
onPress: () => v(!1),
|
|
2007
|
-
children: /* @__PURE__ */
|
|
2008
|
-
style: [Y.closeButton, { color:
|
|
2012
|
+
children: /* @__PURE__ */ N(B, {
|
|
2013
|
+
style: [Y.closeButton, { color: F.textMuted }],
|
|
2009
2014
|
children: "✕"
|
|
2010
2015
|
})
|
|
2011
2016
|
})]
|
|
2012
|
-
}), /* @__PURE__ */
|
|
2017
|
+
}), /* @__PURE__ */ N(ce, {
|
|
2013
2018
|
data: d,
|
|
2014
2019
|
keyExtractor: (e) => e.value,
|
|
2015
2020
|
style: Y.optionsList,
|
|
2016
2021
|
contentContainerStyle: Y.optionsListContent,
|
|
2017
2022
|
renderItem: ({ item: t }) => {
|
|
2018
2023
|
let n = t.value === e;
|
|
2019
|
-
return /* @__PURE__ */
|
|
2020
|
-
style: [Y.option, n && { backgroundColor:
|
|
2024
|
+
return /* @__PURE__ */ P(V, {
|
|
2025
|
+
style: [Y.option, n && { backgroundColor: F.primaryLight }],
|
|
2021
2026
|
onPress: () => {
|
|
2022
2027
|
T(t.value), v(!1);
|
|
2023
2028
|
},
|
|
2024
2029
|
activeOpacity: .7,
|
|
2025
|
-
children: [/* @__PURE__ */
|
|
2030
|
+
children: [/* @__PURE__ */ N(ge, {
|
|
2026
2031
|
label: t.label,
|
|
2027
2032
|
description: t.description,
|
|
2028
2033
|
image: t.image
|
|
2029
|
-
}), n && /* @__PURE__ */
|
|
2030
|
-
style: [Y.checkmark, { color:
|
|
2034
|
+
}), n && /* @__PURE__ */ N(B, {
|
|
2035
|
+
style: [Y.checkmark, { color: F.primary }],
|
|
2031
2036
|
children: "✓"
|
|
2032
2037
|
})]
|
|
2033
2038
|
});
|
|
@@ -2036,43 +2041,43 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2036
2041
|
})
|
|
2037
2042
|
})
|
|
2038
2043
|
}),
|
|
2039
|
-
E && /* @__PURE__ */
|
|
2040
|
-
style: [Y.error, { color:
|
|
2044
|
+
E && /* @__PURE__ */ N(B, {
|
|
2045
|
+
style: [Y.error, { color: F.error }],
|
|
2041
2046
|
children: E
|
|
2042
2047
|
}),
|
|
2043
|
-
|
|
2044
|
-
style: [Y.helperText, { color:
|
|
2045
|
-
children:
|
|
2048
|
+
D && !E && /* @__PURE__ */ N(B, {
|
|
2049
|
+
style: [Y.helperText, { color: F.textMuted }],
|
|
2050
|
+
children: D
|
|
2046
2051
|
})
|
|
2047
2052
|
]
|
|
2048
2053
|
});
|
|
2049
2054
|
}
|
|
2050
|
-
return /* @__PURE__ */
|
|
2055
|
+
return /* @__PURE__ */ P(H, {
|
|
2051
2056
|
style: Y.container,
|
|
2052
2057
|
children: [
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
style: [Y.label, { color:
|
|
2055
|
-
children: [
|
|
2056
|
-
style: { color:
|
|
2058
|
+
/* @__PURE__ */ P(B, {
|
|
2059
|
+
style: [Y.label, { color: F.textSecondary }],
|
|
2060
|
+
children: [te || w.data.name, w.data.required && /* @__PURE__ */ N(B, {
|
|
2061
|
+
style: { color: F.error },
|
|
2057
2062
|
children: "*"
|
|
2058
2063
|
})]
|
|
2059
2064
|
}),
|
|
2060
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ N(ue, {
|
|
2061
2066
|
style: [Y.input, {
|
|
2062
|
-
backgroundColor:
|
|
2063
|
-
borderColor:
|
|
2064
|
-
color:
|
|
2067
|
+
backgroundColor: F.muted,
|
|
2068
|
+
borderColor: F.border,
|
|
2069
|
+
color: F.textMuted
|
|
2065
2070
|
}],
|
|
2066
|
-
value: typeof
|
|
2071
|
+
value: typeof b == "string" ? b : JSON.stringify(b),
|
|
2067
2072
|
editable: !1
|
|
2068
2073
|
}),
|
|
2069
|
-
E && /* @__PURE__ */
|
|
2070
|
-
style: [Y.error, { color:
|
|
2074
|
+
E && /* @__PURE__ */ N(B, {
|
|
2075
|
+
style: [Y.error, { color: F.error }],
|
|
2071
2076
|
children: E
|
|
2072
2077
|
}),
|
|
2073
|
-
|
|
2074
|
-
style: [Y.helperText, { color:
|
|
2075
|
-
children:
|
|
2078
|
+
D && !E && /* @__PURE__ */ N(B, {
|
|
2079
|
+
style: [Y.helperText, { color: F.textMuted }],
|
|
2080
|
+
children: D
|
|
2076
2081
|
})
|
|
2077
2082
|
]
|
|
2078
2083
|
});
|
|
@@ -2203,23 +2208,23 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2203
2208
|
flex: 1,
|
|
2204
2209
|
fontSize: 14
|
|
2205
2210
|
}
|
|
2206
|
-
}),
|
|
2207
|
-
let { value: n, placeholder: r, name: i } = e, [a, o] =
|
|
2208
|
-
return
|
|
2211
|
+
}), Fe = ({ field: e, extra: t }) => {
|
|
2212
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = M(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2213
|
+
return A(() => {
|
|
2209
2214
|
o(n?.toString() ?? "");
|
|
2210
|
-
}, [n]), /* @__PURE__ */
|
|
2211
|
-
style:
|
|
2215
|
+
}, [n]), /* @__PURE__ */ P(H, {
|
|
2216
|
+
style: Ie.container,
|
|
2212
2217
|
children: [
|
|
2213
|
-
/* @__PURE__ */
|
|
2214
|
-
style: [
|
|
2215
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */
|
|
2218
|
+
/* @__PURE__ */ P(B, {
|
|
2219
|
+
style: [Ie.label, { color: f.textSecondary }],
|
|
2220
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
2216
2221
|
style: { color: f.error },
|
|
2217
2222
|
children: "*"
|
|
2218
2223
|
})]
|
|
2219
2224
|
}),
|
|
2220
|
-
/* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ N(ue, {
|
|
2221
2226
|
style: [
|
|
2222
|
-
|
|
2227
|
+
Ie.input,
|
|
2223
2228
|
{
|
|
2224
2229
|
backgroundColor: f.input,
|
|
2225
2230
|
borderColor: f.border,
|
|
@@ -2241,17 +2246,17 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2241
2246
|
keyboardType: "numeric",
|
|
2242
2247
|
accessibilityLabel: i
|
|
2243
2248
|
}),
|
|
2244
|
-
l && /* @__PURE__ */
|
|
2245
|
-
style: [
|
|
2249
|
+
l && /* @__PURE__ */ N(B, {
|
|
2250
|
+
style: [Ie.error, { color: f.error }],
|
|
2246
2251
|
children: l
|
|
2247
2252
|
}),
|
|
2248
|
-
d && !l && /* @__PURE__ */
|
|
2249
|
-
style: [
|
|
2253
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
2254
|
+
style: [Ie.helperText, { color: f.textMuted }],
|
|
2250
2255
|
children: d
|
|
2251
2256
|
})
|
|
2252
2257
|
]
|
|
2253
2258
|
});
|
|
2254
|
-
},
|
|
2259
|
+
}, Ie = z.create({
|
|
2255
2260
|
container: { marginBottom: 16 },
|
|
2256
2261
|
error: {
|
|
2257
2262
|
fontSize: 12,
|
|
@@ -2273,23 +2278,23 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2273
2278
|
fontWeight: "500",
|
|
2274
2279
|
marginBottom: 8
|
|
2275
2280
|
}
|
|
2276
|
-
}),
|
|
2277
|
-
let [n, r] =
|
|
2278
|
-
return /* @__PURE__ */
|
|
2279
|
-
style:
|
|
2281
|
+
}), Le = ({ field: e, extra: t }) => {
|
|
2282
|
+
let [n, r] = M(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2283
|
+
return /* @__PURE__ */ P(H, {
|
|
2284
|
+
style: Re.container,
|
|
2280
2285
|
children: [
|
|
2281
|
-
/* @__PURE__ */
|
|
2282
|
-
style: [
|
|
2283
|
-
children: [u || s.data.name, s.data.required && /* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ P(B, {
|
|
2287
|
+
style: [Re.label, { color: f.textSecondary }],
|
|
2288
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
2284
2289
|
style: { color: f.error },
|
|
2285
2290
|
children: "*"
|
|
2286
2291
|
})]
|
|
2287
2292
|
}),
|
|
2288
|
-
/* @__PURE__ */
|
|
2289
|
-
style:
|
|
2290
|
-
children: [/* @__PURE__ */
|
|
2293
|
+
/* @__PURE__ */ P(H, {
|
|
2294
|
+
style: Re.inputWrapper,
|
|
2295
|
+
children: [/* @__PURE__ */ N(ue, {
|
|
2291
2296
|
style: [
|
|
2292
|
-
|
|
2297
|
+
Re.input,
|
|
2293
2298
|
{
|
|
2294
2299
|
backgroundColor: f.input,
|
|
2295
2300
|
borderColor: f.border,
|
|
@@ -2303,27 +2308,27 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2303
2308
|
placeholderTextColor: f.textMuted,
|
|
2304
2309
|
secureTextEntry: !n,
|
|
2305
2310
|
accessibilityLabel: o
|
|
2306
|
-
}), /* @__PURE__ */
|
|
2307
|
-
style:
|
|
2311
|
+
}), /* @__PURE__ */ N(V, {
|
|
2312
|
+
style: Re.toggleButton,
|
|
2308
2313
|
onPress: () => r(!n),
|
|
2309
2314
|
activeOpacity: .7,
|
|
2310
|
-
children: /* @__PURE__ */
|
|
2311
|
-
style: [
|
|
2315
|
+
children: /* @__PURE__ */ N(B, {
|
|
2316
|
+
style: [Re.toggleText, { color: f.primary }],
|
|
2312
2317
|
children: n ? "Hide" : "Show"
|
|
2313
2318
|
})
|
|
2314
2319
|
})]
|
|
2315
2320
|
}),
|
|
2316
|
-
l && /* @__PURE__ */
|
|
2317
|
-
style: [
|
|
2321
|
+
l && /* @__PURE__ */ N(B, {
|
|
2322
|
+
style: [Re.error, { color: f.error }],
|
|
2318
2323
|
children: l
|
|
2319
2324
|
}),
|
|
2320
|
-
d && !l && /* @__PURE__ */
|
|
2321
|
-
style: [
|
|
2325
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
2326
|
+
style: [Re.helperText, { color: f.textMuted }],
|
|
2322
2327
|
children: d
|
|
2323
2328
|
})
|
|
2324
2329
|
]
|
|
2325
2330
|
});
|
|
2326
|
-
},
|
|
2331
|
+
}, Re = z.create({
|
|
2327
2332
|
container: { marginBottom: 16 },
|
|
2328
2333
|
error: {
|
|
2329
2334
|
fontSize: 12,
|
|
@@ -2361,111 +2366,111 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2361
2366
|
fontSize: 12,
|
|
2362
2367
|
fontWeight: "600"
|
|
2363
2368
|
}
|
|
2364
|
-
}),
|
|
2365
|
-
let { value: n } = e, { node: r, setValue: i, error:
|
|
2369
|
+
}), ze = ({ field: e, extra: t }) => {
|
|
2370
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = g(), l = p(), u = r.data.options || [], d = n || "", f = r.data.variant !== "default", m = (e) => {
|
|
2366
2371
|
i(e);
|
|
2367
2372
|
};
|
|
2368
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ P(H, {
|
|
2369
2374
|
style: X.container,
|
|
2370
2375
|
children: [
|
|
2371
|
-
/* @__PURE__ */
|
|
2372
|
-
style: [X.label, { color:
|
|
2373
|
-
children: [
|
|
2374
|
-
style: { color:
|
|
2376
|
+
/* @__PURE__ */ P(B, {
|
|
2377
|
+
style: [X.label, { color: c.textSecondary }],
|
|
2378
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(B, {
|
|
2379
|
+
style: { color: c.error },
|
|
2375
2380
|
children: "*"
|
|
2376
2381
|
})]
|
|
2377
2382
|
}),
|
|
2378
|
-
|
|
2379
|
-
let t =
|
|
2380
|
-
return
|
|
2383
|
+
u.map((e) => {
|
|
2384
|
+
let t = d === e.value, n = l(e.label) || e.value, r = l(e.description);
|
|
2385
|
+
return f ? /* @__PURE__ */ P(V, {
|
|
2381
2386
|
style: [
|
|
2382
2387
|
X.card,
|
|
2383
2388
|
{
|
|
2384
|
-
backgroundColor:
|
|
2385
|
-
borderColor:
|
|
2389
|
+
backgroundColor: c.input,
|
|
2390
|
+
borderColor: c.border
|
|
2386
2391
|
},
|
|
2387
2392
|
t && {
|
|
2388
|
-
backgroundColor: `${
|
|
2389
|
-
borderColor:
|
|
2393
|
+
backgroundColor: `${c.primary}10`,
|
|
2394
|
+
borderColor: c.primary
|
|
2390
2395
|
},
|
|
2391
2396
|
e.disabled && { opacity: .5 }
|
|
2392
2397
|
],
|
|
2393
|
-
onPress: () =>
|
|
2398
|
+
onPress: () => m(e.value),
|
|
2394
2399
|
disabled: e.disabled,
|
|
2395
2400
|
activeOpacity: .7,
|
|
2396
2401
|
children: [
|
|
2397
|
-
e.image && /* @__PURE__ */
|
|
2402
|
+
e.image && /* @__PURE__ */ N(I, {
|
|
2398
2403
|
source: { uri: e.image },
|
|
2399
2404
|
style: X.cardImage
|
|
2400
2405
|
}),
|
|
2401
|
-
/* @__PURE__ */
|
|
2406
|
+
/* @__PURE__ */ P(H, {
|
|
2402
2407
|
style: X.cardTextContainer,
|
|
2403
|
-
children: [/* @__PURE__ */
|
|
2404
|
-
style: [X.cardLabel, { color:
|
|
2408
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2409
|
+
style: [X.cardLabel, { color: c.textSecondary }],
|
|
2405
2410
|
children: n
|
|
2406
|
-
}), r && /* @__PURE__ */
|
|
2407
|
-
style: [X.cardDescription, { color:
|
|
2411
|
+
}), r && /* @__PURE__ */ N(B, {
|
|
2412
|
+
style: [X.cardDescription, { color: c.textMuted }],
|
|
2408
2413
|
children: r
|
|
2409
2414
|
})]
|
|
2410
2415
|
}),
|
|
2411
|
-
/* @__PURE__ */
|
|
2416
|
+
/* @__PURE__ */ N(H, {
|
|
2412
2417
|
style: [
|
|
2413
2418
|
X.radio,
|
|
2414
2419
|
X.cardRadio,
|
|
2415
2420
|
{
|
|
2416
|
-
backgroundColor:
|
|
2417
|
-
borderColor:
|
|
2421
|
+
backgroundColor: c.input,
|
|
2422
|
+
borderColor: c.border
|
|
2418
2423
|
},
|
|
2419
|
-
t && { borderColor:
|
|
2424
|
+
t && { borderColor: c.primary }
|
|
2420
2425
|
],
|
|
2421
|
-
children: t && /* @__PURE__ */
|
|
2426
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2422
2427
|
})
|
|
2423
2428
|
]
|
|
2424
|
-
}, e.value) : /* @__PURE__ */
|
|
2429
|
+
}, e.value) : /* @__PURE__ */ P(V, {
|
|
2425
2430
|
style: X.option,
|
|
2426
|
-
onPress: () =>
|
|
2431
|
+
onPress: () => m(e.value),
|
|
2427
2432
|
disabled: e.disabled,
|
|
2428
2433
|
activeOpacity: .7,
|
|
2429
2434
|
children: [
|
|
2430
|
-
/* @__PURE__ */
|
|
2435
|
+
/* @__PURE__ */ N(H, {
|
|
2431
2436
|
style: [
|
|
2432
2437
|
X.radio,
|
|
2433
2438
|
{
|
|
2434
|
-
backgroundColor:
|
|
2435
|
-
borderColor:
|
|
2439
|
+
backgroundColor: c.input,
|
|
2440
|
+
borderColor: c.border
|
|
2436
2441
|
},
|
|
2437
|
-
t && { borderColor:
|
|
2442
|
+
t && { borderColor: c.primary }
|
|
2438
2443
|
],
|
|
2439
|
-
children: t && /* @__PURE__ */
|
|
2444
|
+
children: t && /* @__PURE__ */ N(H, { style: [X.radioInner, { backgroundColor: c.primary }] })
|
|
2440
2445
|
}),
|
|
2441
|
-
e.image && /* @__PURE__ */
|
|
2446
|
+
e.image && /* @__PURE__ */ N(I, {
|
|
2442
2447
|
source: { uri: e.image },
|
|
2443
2448
|
style: X.image
|
|
2444
2449
|
}),
|
|
2445
|
-
/* @__PURE__ */
|
|
2450
|
+
/* @__PURE__ */ P(H, {
|
|
2446
2451
|
style: X.optionTextContainer,
|
|
2447
|
-
children: [/* @__PURE__ */
|
|
2452
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2448
2453
|
style: [
|
|
2449
2454
|
X.optionLabel,
|
|
2450
|
-
{ color:
|
|
2451
|
-
e.disabled && { color:
|
|
2455
|
+
{ color: c.textSecondary },
|
|
2456
|
+
e.disabled && { color: c.textMuted }
|
|
2452
2457
|
],
|
|
2453
2458
|
children: n
|
|
2454
|
-
}), r && /* @__PURE__ */
|
|
2455
|
-
style: [X.optionDescription, { color:
|
|
2459
|
+
}), r && /* @__PURE__ */ N(B, {
|
|
2460
|
+
style: [X.optionDescription, { color: c.textMuted }],
|
|
2456
2461
|
children: r
|
|
2457
2462
|
})]
|
|
2458
2463
|
})
|
|
2459
2464
|
]
|
|
2460
2465
|
}, e.value);
|
|
2461
2466
|
}),
|
|
2462
|
-
|
|
2463
|
-
style: [X.error, { color:
|
|
2464
|
-
children:
|
|
2467
|
+
a && /* @__PURE__ */ N(B, {
|
|
2468
|
+
style: [X.error, { color: c.error }],
|
|
2469
|
+
children: a
|
|
2465
2470
|
}),
|
|
2466
|
-
|
|
2467
|
-
style: [X.helperText, { color:
|
|
2468
|
-
children:
|
|
2471
|
+
s && !a && /* @__PURE__ */ N(B, {
|
|
2472
|
+
style: [X.helperText, { color: c.textMuted }],
|
|
2473
|
+
children: s
|
|
2469
2474
|
})
|
|
2470
2475
|
]
|
|
2471
2476
|
});
|
|
@@ -2542,47 +2547,47 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2542
2547
|
height: 10,
|
|
2543
2548
|
width: 10
|
|
2544
2549
|
}
|
|
2545
|
-
}),
|
|
2546
|
-
let [n, r] =
|
|
2547
|
-
|
|
2550
|
+
}), Be = ({ field: e, extra: t }) => {
|
|
2551
|
+
let [n, r] = M(!1), { value: i, placeholder: a } = e, { node: o, setValue: s, error: c, label: l, helperText: u } = t, { colors: d } = g(), f = p(), m = o.data.options || [], h = o.data.multiple, _ = Array.isArray(i) ? i : i ? [i] : [], v = (e) => {
|
|
2552
|
+
h ? s(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (s(e), r(!1));
|
|
2548
2553
|
};
|
|
2549
|
-
return /* @__PURE__ */
|
|
2554
|
+
return /* @__PURE__ */ P(H, {
|
|
2550
2555
|
style: Z.container,
|
|
2551
2556
|
children: [
|
|
2552
|
-
/* @__PURE__ */
|
|
2553
|
-
style: [Z.label, { color:
|
|
2554
|
-
children: [
|
|
2555
|
-
style: { color:
|
|
2557
|
+
/* @__PURE__ */ P(B, {
|
|
2558
|
+
style: [Z.label, { color: d.textSecondary }],
|
|
2559
|
+
children: [l || o.data.name, o.data.required && /* @__PURE__ */ N(B, {
|
|
2560
|
+
style: { color: d.error },
|
|
2556
2561
|
children: "*"
|
|
2557
2562
|
})]
|
|
2558
2563
|
}),
|
|
2559
|
-
/* @__PURE__ */
|
|
2564
|
+
/* @__PURE__ */ P(V, {
|
|
2560
2565
|
style: [
|
|
2561
2566
|
Z.trigger,
|
|
2562
2567
|
{
|
|
2563
|
-
backgroundColor:
|
|
2564
|
-
borderColor:
|
|
2568
|
+
backgroundColor: d.input,
|
|
2569
|
+
borderColor: d.border
|
|
2565
2570
|
},
|
|
2566
|
-
|
|
2571
|
+
c && { borderColor: d.error }
|
|
2567
2572
|
],
|
|
2568
2573
|
onPress: () => r(!0),
|
|
2569
2574
|
activeOpacity: .7,
|
|
2570
2575
|
children: [
|
|
2571
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ N(B, {
|
|
2572
2577
|
style: [
|
|
2573
2578
|
Z.triggerText,
|
|
2574
|
-
{ color:
|
|
2575
|
-
_.length === 0 && { color:
|
|
2579
|
+
{ color: d.text },
|
|
2580
|
+
_.length === 0 && { color: d.textMuted }
|
|
2576
2581
|
],
|
|
2577
2582
|
children: (() => {
|
|
2578
|
-
if (_.length === 0) return
|
|
2579
|
-
if (
|
|
2580
|
-
let e =
|
|
2581
|
-
return e ?
|
|
2583
|
+
if (_.length === 0) return a || "Select...";
|
|
2584
|
+
if (h) return m.filter((e) => _.includes(e.value)).map((e) => f(e.label) || e.value).join(", ");
|
|
2585
|
+
let e = m.find((e) => e.value === _[0]);
|
|
2586
|
+
return e ? f(e.label) || e.value : a || "Select...";
|
|
2582
2587
|
})()
|
|
2583
2588
|
}),
|
|
2584
|
-
_.length > 0 && /* @__PURE__ */
|
|
2585
|
-
onPress: () =>
|
|
2589
|
+
_.length > 0 && /* @__PURE__ */ N(V, {
|
|
2590
|
+
onPress: () => s(h ? [] : ""),
|
|
2586
2591
|
hitSlop: {
|
|
2587
2592
|
bottom: 8,
|
|
2588
2593
|
left: 8,
|
|
@@ -2590,68 +2595,68 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2590
2595
|
top: 8
|
|
2591
2596
|
},
|
|
2592
2597
|
style: Z.clearButton,
|
|
2593
|
-
children: /* @__PURE__ */
|
|
2594
|
-
style: [Z.clearIcon, { color:
|
|
2598
|
+
children: /* @__PURE__ */ N(B, {
|
|
2599
|
+
style: [Z.clearIcon, { color: d.textMuted }],
|
|
2595
2600
|
children: "✕"
|
|
2596
2601
|
})
|
|
2597
2602
|
}),
|
|
2598
|
-
/* @__PURE__ */
|
|
2599
|
-
style: [Z.arrow, { color:
|
|
2603
|
+
/* @__PURE__ */ N(B, {
|
|
2604
|
+
style: [Z.arrow, { color: d.textMuted }],
|
|
2600
2605
|
children: "▼"
|
|
2601
2606
|
})
|
|
2602
2607
|
]
|
|
2603
2608
|
}),
|
|
2604
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ N(L, {
|
|
2605
2610
|
visible: n,
|
|
2606
2611
|
transparent: !0,
|
|
2607
2612
|
animationType: "fade",
|
|
2608
2613
|
onRequestClose: () => r(!1),
|
|
2609
|
-
children: /* @__PURE__ */
|
|
2614
|
+
children: /* @__PURE__ */ N(V, {
|
|
2610
2615
|
style: Z.modalOverlay,
|
|
2611
2616
|
activeOpacity: 1,
|
|
2612
2617
|
onPress: () => r(!1),
|
|
2613
|
-
children: /* @__PURE__ */
|
|
2614
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2618
|
+
children: /* @__PURE__ */ P(H, {
|
|
2619
|
+
style: [Z.modalContent, { backgroundColor: d.card }],
|
|
2615
2620
|
onStartShouldSetResponder: () => !0,
|
|
2616
2621
|
children: [
|
|
2617
|
-
/* @__PURE__ */
|
|
2618
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2619
|
-
children: [/* @__PURE__ */
|
|
2620
|
-
style: [Z.modalTitle, { color:
|
|
2621
|
-
children:
|
|
2622
|
-
}), /* @__PURE__ */
|
|
2622
|
+
/* @__PURE__ */ P(H, {
|
|
2623
|
+
style: [Z.modalHeader, { borderBottomColor: d.border }],
|
|
2624
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2625
|
+
style: [Z.modalTitle, { color: d.text }],
|
|
2626
|
+
children: l || o.data.name
|
|
2627
|
+
}), /* @__PURE__ */ N(V, {
|
|
2623
2628
|
onPress: () => r(!1),
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2625
|
-
style: [Z.closeButton, { color:
|
|
2629
|
+
children: /* @__PURE__ */ N(B, {
|
|
2630
|
+
style: [Z.closeButton, { color: d.textMuted }],
|
|
2626
2631
|
children: "✕"
|
|
2627
2632
|
})
|
|
2628
2633
|
})]
|
|
2629
2634
|
}),
|
|
2630
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ N(R, {
|
|
2631
2636
|
style: Z.optionsList,
|
|
2632
|
-
children:
|
|
2637
|
+
children: m.map((e) => {
|
|
2633
2638
|
let t = _.includes(e.value);
|
|
2634
|
-
return /* @__PURE__ */
|
|
2635
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2639
|
+
return /* @__PURE__ */ P(V, {
|
|
2640
|
+
style: [Z.option, t && { backgroundColor: `${d.primary}20` }],
|
|
2636
2641
|
onPress: () => v(e.value),
|
|
2637
2642
|
disabled: e.disabled,
|
|
2638
2643
|
activeOpacity: .7,
|
|
2639
|
-
children: [/* @__PURE__ */
|
|
2640
|
-
label:
|
|
2641
|
-
description:
|
|
2644
|
+
children: [/* @__PURE__ */ N(ge, {
|
|
2645
|
+
label: f(e.label) || e.value,
|
|
2646
|
+
description: f(e.description),
|
|
2642
2647
|
image: e.image,
|
|
2643
2648
|
disabled: e.disabled
|
|
2644
|
-
}), t && /* @__PURE__ */
|
|
2645
|
-
style: [Z.checkmark, { color:
|
|
2649
|
+
}), t && /* @__PURE__ */ N(B, {
|
|
2650
|
+
style: [Z.checkmark, { color: d.primary }],
|
|
2646
2651
|
children: "✓"
|
|
2647
2652
|
})]
|
|
2648
2653
|
}, e.value);
|
|
2649
2654
|
})
|
|
2650
2655
|
}),
|
|
2651
|
-
|
|
2652
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2656
|
+
h && /* @__PURE__ */ N(V, {
|
|
2657
|
+
style: [Z.doneButton, { backgroundColor: d.primary }],
|
|
2653
2658
|
onPress: () => r(!1),
|
|
2654
|
-
children: /* @__PURE__ */
|
|
2659
|
+
children: /* @__PURE__ */ N(B, {
|
|
2655
2660
|
style: Z.doneButtonText,
|
|
2656
2661
|
children: "Done"
|
|
2657
2662
|
})
|
|
@@ -2660,13 +2665,13 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2660
2665
|
})
|
|
2661
2666
|
})
|
|
2662
2667
|
}),
|
|
2663
|
-
|
|
2664
|
-
style: [Z.error, { color:
|
|
2665
|
-
children:
|
|
2668
|
+
c && /* @__PURE__ */ N(B, {
|
|
2669
|
+
style: [Z.error, { color: d.error }],
|
|
2670
|
+
children: c
|
|
2666
2671
|
}),
|
|
2667
|
-
|
|
2668
|
-
style: [Z.helperText, { color:
|
|
2669
|
-
children:
|
|
2672
|
+
u && !c && /* @__PURE__ */ N(B, {
|
|
2673
|
+
style: [Z.helperText, { color: d.textMuted }],
|
|
2674
|
+
children: u
|
|
2670
2675
|
})
|
|
2671
2676
|
]
|
|
2672
2677
|
});
|
|
@@ -2756,23 +2761,23 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2756
2761
|
flex: 1,
|
|
2757
2762
|
fontSize: 14
|
|
2758
2763
|
}
|
|
2759
|
-
}),
|
|
2760
|
-
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } =
|
|
2761
|
-
return /* @__PURE__ */
|
|
2762
|
-
style:
|
|
2764
|
+
}), Ve = (e) => null, He = ({ field: e, extra: t }) => {
|
|
2765
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = g(), l = !!n;
|
|
2766
|
+
return /* @__PURE__ */ P(H, {
|
|
2767
|
+
style: Ue.container,
|
|
2763
2768
|
children: [
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
style:
|
|
2766
|
-
children: [/* @__PURE__ */
|
|
2767
|
-
style:
|
|
2768
|
-
children: /* @__PURE__ */
|
|
2769
|
-
style: [
|
|
2770
|
-
children: [o || r.data.name, r.data.required && /* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ P(H, {
|
|
2770
|
+
style: Ue.row,
|
|
2771
|
+
children: [/* @__PURE__ */ N(H, {
|
|
2772
|
+
style: Ue.labelContainer,
|
|
2773
|
+
children: /* @__PURE__ */ P(B, {
|
|
2774
|
+
style: [Ue.label, { color: c.textSecondary }],
|
|
2775
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ N(B, {
|
|
2771
2776
|
style: { color: c.error },
|
|
2772
2777
|
children: "*"
|
|
2773
2778
|
})]
|
|
2774
2779
|
})
|
|
2775
|
-
}), /* @__PURE__ */
|
|
2780
|
+
}), /* @__PURE__ */ N(le, {
|
|
2776
2781
|
trackColor: {
|
|
2777
2782
|
false: c.border,
|
|
2778
2783
|
true: `${c.primary}80`
|
|
@@ -2783,17 +2788,17 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2783
2788
|
value: l
|
|
2784
2789
|
})]
|
|
2785
2790
|
}),
|
|
2786
|
-
a && /* @__PURE__ */
|
|
2787
|
-
style: [
|
|
2791
|
+
a && /* @__PURE__ */ N(B, {
|
|
2792
|
+
style: [Ue.error, { color: c.error }],
|
|
2788
2793
|
children: a
|
|
2789
2794
|
}),
|
|
2790
|
-
s && !a && /* @__PURE__ */
|
|
2791
|
-
style: [
|
|
2795
|
+
s && !a && /* @__PURE__ */ N(B, {
|
|
2796
|
+
style: [Ue.helperText, { color: c.textMuted }],
|
|
2792
2797
|
children: s
|
|
2793
2798
|
})
|
|
2794
2799
|
]
|
|
2795
2800
|
});
|
|
2796
|
-
},
|
|
2801
|
+
}, Ue = z.create({
|
|
2797
2802
|
container: { marginBottom: 16 },
|
|
2798
2803
|
error: {
|
|
2799
2804
|
fontSize: 12,
|
|
@@ -2813,21 +2818,21 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2813
2818
|
flexDirection: "row",
|
|
2814
2819
|
justifyContent: "space-between"
|
|
2815
2820
|
}
|
|
2816
|
-
}),
|
|
2817
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2818
|
-
return /* @__PURE__ */
|
|
2819
|
-
style:
|
|
2821
|
+
}), We = ({ field: e, extra: t }) => {
|
|
2822
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2823
|
+
return /* @__PURE__ */ P(H, {
|
|
2824
|
+
style: Ge.container,
|
|
2820
2825
|
children: [
|
|
2821
|
-
/* @__PURE__ */
|
|
2822
|
-
style: [
|
|
2823
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */
|
|
2826
|
+
/* @__PURE__ */ P(B, {
|
|
2827
|
+
style: [Ge.label, { color: u.textSecondary }],
|
|
2828
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(B, {
|
|
2824
2829
|
style: { color: u.error },
|
|
2825
2830
|
children: "*"
|
|
2826
2831
|
})]
|
|
2827
2832
|
}),
|
|
2828
|
-
/* @__PURE__ */
|
|
2833
|
+
/* @__PURE__ */ N(ue, {
|
|
2829
2834
|
style: [
|
|
2830
|
-
|
|
2835
|
+
Ge.textarea,
|
|
2831
2836
|
{
|
|
2832
2837
|
backgroundColor: u.input,
|
|
2833
2838
|
borderColor: u.border,
|
|
@@ -2844,17 +2849,17 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2844
2849
|
textAlignVertical: "top",
|
|
2845
2850
|
accessibilityLabel: i
|
|
2846
2851
|
}),
|
|
2847
|
-
s && /* @__PURE__ */
|
|
2848
|
-
style: [
|
|
2852
|
+
s && /* @__PURE__ */ N(B, {
|
|
2853
|
+
style: [Ge.error, { color: u.error }],
|
|
2849
2854
|
children: s
|
|
2850
2855
|
}),
|
|
2851
|
-
l && !s && /* @__PURE__ */
|
|
2852
|
-
style: [
|
|
2856
|
+
l && !s && /* @__PURE__ */ N(B, {
|
|
2857
|
+
style: [Ge.helperText, { color: u.textMuted }],
|
|
2853
2858
|
children: l
|
|
2854
2859
|
})
|
|
2855
2860
|
]
|
|
2856
2861
|
});
|
|
2857
|
-
},
|
|
2862
|
+
}, Ge = z.create({
|
|
2858
2863
|
container: { marginBottom: 16 },
|
|
2859
2864
|
error: {
|
|
2860
2865
|
fontSize: 12,
|
|
@@ -2877,21 +2882,21 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2877
2882
|
paddingHorizontal: 12,
|
|
2878
2883
|
paddingVertical: 8
|
|
2879
2884
|
}
|
|
2880
|
-
}),
|
|
2881
|
-
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } =
|
|
2882
|
-
return /* @__PURE__ */
|
|
2883
|
-
style:
|
|
2885
|
+
}), Ke = ({ field: e, extra: t }) => {
|
|
2886
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2887
|
+
return /* @__PURE__ */ P(H, {
|
|
2888
|
+
style: qe.container,
|
|
2884
2889
|
children: [
|
|
2885
|
-
/* @__PURE__ */
|
|
2886
|
-
style: [
|
|
2887
|
-
children: [c || a.data.name, a.data.required && /* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ P(B, {
|
|
2891
|
+
style: [qe.label, { color: u.textSecondary }],
|
|
2892
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ N(B, {
|
|
2888
2893
|
style: { color: u.error },
|
|
2889
2894
|
children: "*"
|
|
2890
2895
|
})]
|
|
2891
2896
|
}),
|
|
2892
|
-
/* @__PURE__ */
|
|
2897
|
+
/* @__PURE__ */ N(ue, {
|
|
2893
2898
|
style: [
|
|
2894
|
-
|
|
2899
|
+
qe.input,
|
|
2895
2900
|
{
|
|
2896
2901
|
backgroundColor: u.input,
|
|
2897
2902
|
borderColor: u.border,
|
|
@@ -2905,17 +2910,17 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2905
2910
|
placeholderTextColor: u.textMuted,
|
|
2906
2911
|
accessibilityLabel: i
|
|
2907
2912
|
}),
|
|
2908
|
-
s && /* @__PURE__ */
|
|
2909
|
-
style: [
|
|
2913
|
+
s && /* @__PURE__ */ N(B, {
|
|
2914
|
+
style: [qe.error, { color: u.error }],
|
|
2910
2915
|
children: s
|
|
2911
2916
|
}),
|
|
2912
|
-
l && !s && /* @__PURE__ */
|
|
2913
|
-
style: [
|
|
2917
|
+
l && !s && /* @__PURE__ */ N(B, {
|
|
2918
|
+
style: [qe.helperText, { color: u.textMuted }],
|
|
2914
2919
|
children: l
|
|
2915
2920
|
})
|
|
2916
2921
|
]
|
|
2917
2922
|
});
|
|
2918
|
-
},
|
|
2923
|
+
}, qe = z.create({
|
|
2919
2924
|
container: { marginBottom: 16 },
|
|
2920
2925
|
error: {
|
|
2921
2926
|
fontSize: 12,
|
|
@@ -2937,25 +2942,25 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2937
2942
|
fontWeight: "500",
|
|
2938
2943
|
marginBottom: 8
|
|
2939
2944
|
}
|
|
2940
|
-
}),
|
|
2941
|
-
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] =
|
|
2942
|
-
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`),
|
|
2945
|
+
}), Je = ({ field: e, extra: t }) => {
|
|
2946
|
+
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] = M(s || 0), [d, f] = M(c || 0), [p, m] = M(!1), { node: h, setValue: _, error: v, label: y, helperText: b } = t, { colors: x } = g(), S = j(null), ee = j(null), C = Array.from({ length: 24 }, (e, t) => t), w = Array.from({ length: 60 }, (e, t) => t), T = () => n || r || "Select time", E = re(() => {
|
|
2947
|
+
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2943
2948
|
}, [
|
|
2944
2949
|
l,
|
|
2945
2950
|
d,
|
|
2946
2951
|
_
|
|
2947
2952
|
]);
|
|
2948
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ P(H, {
|
|
2949
2954
|
style: Q.container,
|
|
2950
2955
|
children: [
|
|
2951
|
-
/* @__PURE__ */
|
|
2956
|
+
/* @__PURE__ */ P(B, {
|
|
2952
2957
|
style: [Q.label, { color: x.textSecondary }],
|
|
2953
|
-
children: [y ||
|
|
2958
|
+
children: [y || h.data.name, h.data.required && /* @__PURE__ */ N(B, {
|
|
2954
2959
|
style: { color: x.error },
|
|
2955
2960
|
children: "*"
|
|
2956
2961
|
})]
|
|
2957
2962
|
}),
|
|
2958
|
-
/* @__PURE__ */
|
|
2963
|
+
/* @__PURE__ */ P(V, {
|
|
2959
2964
|
style: [
|
|
2960
2965
|
Q.trigger,
|
|
2961
2966
|
{
|
|
@@ -2965,67 +2970,67 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
2965
2970
|
v && { borderColor: x.error }
|
|
2966
2971
|
],
|
|
2967
2972
|
onPress: () => {
|
|
2968
|
-
u(s || 0), f(c || 0),
|
|
2973
|
+
u(s || 0), f(c || 0), m(!0);
|
|
2969
2974
|
},
|
|
2970
2975
|
activeOpacity: .7,
|
|
2971
|
-
children: [/* @__PURE__ */
|
|
2976
|
+
children: [/* @__PURE__ */ N(B, {
|
|
2972
2977
|
style: [
|
|
2973
2978
|
Q.triggerText,
|
|
2974
2979
|
{ color: x.text },
|
|
2975
2980
|
!n && { color: x.textMuted }
|
|
2976
2981
|
],
|
|
2977
2982
|
numberOfLines: 1,
|
|
2978
|
-
children:
|
|
2979
|
-
}), /* @__PURE__ */
|
|
2983
|
+
children: T()
|
|
2984
|
+
}), /* @__PURE__ */ N(B, {
|
|
2980
2985
|
style: Q.icon,
|
|
2981
2986
|
children: "🕐"
|
|
2982
2987
|
})]
|
|
2983
2988
|
}),
|
|
2984
|
-
/* @__PURE__ */
|
|
2989
|
+
/* @__PURE__ */ N(L, {
|
|
2985
2990
|
visible: p,
|
|
2986
2991
|
transparent: !0,
|
|
2987
2992
|
animationType: "fade",
|
|
2988
|
-
onRequestClose: () =>
|
|
2989
|
-
children: /* @__PURE__ */
|
|
2993
|
+
onRequestClose: () => m(!1),
|
|
2994
|
+
children: /* @__PURE__ */ N(V, {
|
|
2990
2995
|
style: Q.modalOverlay,
|
|
2991
2996
|
activeOpacity: 1,
|
|
2992
|
-
onPress: () =>
|
|
2993
|
-
children: /* @__PURE__ */
|
|
2997
|
+
onPress: () => m(!1),
|
|
2998
|
+
children: /* @__PURE__ */ P(V, {
|
|
2994
2999
|
style: [Q.modalContent, { backgroundColor: x.card }],
|
|
2995
3000
|
activeOpacity: 1,
|
|
2996
3001
|
onPress: () => {},
|
|
2997
3002
|
children: [
|
|
2998
|
-
/* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ P(H, {
|
|
2999
3004
|
style: [Q.modalHeader, { borderBottomColor: x.separator }],
|
|
3000
|
-
children: [/* @__PURE__ */
|
|
3005
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3001
3006
|
style: [Q.modalTitle, { color: x.text }],
|
|
3002
|
-
children: y ||
|
|
3003
|
-
}), /* @__PURE__ */
|
|
3004
|
-
onPress: () =>
|
|
3005
|
-
children: /* @__PURE__ */
|
|
3007
|
+
children: y || h.data.name
|
|
3008
|
+
}), /* @__PURE__ */ N(V, {
|
|
3009
|
+
onPress: () => m(!1),
|
|
3010
|
+
children: /* @__PURE__ */ N(B, {
|
|
3006
3011
|
style: [Q.closeButton, { color: x.textMuted }],
|
|
3007
3012
|
children: "✕"
|
|
3008
3013
|
})
|
|
3009
3014
|
})]
|
|
3010
3015
|
}),
|
|
3011
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ P(H, {
|
|
3012
3017
|
style: Q.pickerContainer,
|
|
3013
3018
|
children: [
|
|
3014
|
-
/* @__PURE__ */
|
|
3019
|
+
/* @__PURE__ */ P(H, {
|
|
3015
3020
|
style: Q.pickerColumn,
|
|
3016
|
-
children: [/* @__PURE__ */
|
|
3021
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3017
3022
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
3018
3023
|
children: "Hour"
|
|
3019
|
-
}), /* @__PURE__ */
|
|
3024
|
+
}), /* @__PURE__ */ N(R, {
|
|
3020
3025
|
ref: S,
|
|
3021
3026
|
style: Q.picker,
|
|
3022
3027
|
contentContainerStyle: Q.pickerContent,
|
|
3023
3028
|
showsVerticalScrollIndicator: !1,
|
|
3024
|
-
children:
|
|
3029
|
+
children: C.map((e) => /* @__PURE__ */ N(V, {
|
|
3025
3030
|
style: [Q.pickerItem, l === e && { backgroundColor: x.primary }],
|
|
3026
3031
|
onPress: () => u(e),
|
|
3027
3032
|
activeOpacity: .7,
|
|
3028
|
-
children: /* @__PURE__ */
|
|
3033
|
+
children: /* @__PURE__ */ N(B, {
|
|
3029
3034
|
style: [
|
|
3030
3035
|
Q.pickerItemText,
|
|
3031
3036
|
{ color: x.text },
|
|
@@ -3039,25 +3044,25 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3039
3044
|
}, e))
|
|
3040
3045
|
})]
|
|
3041
3046
|
}),
|
|
3042
|
-
/* @__PURE__ */
|
|
3047
|
+
/* @__PURE__ */ N(B, {
|
|
3043
3048
|
style: [Q.pickerSeparator, { color: x.text }],
|
|
3044
3049
|
children: ":"
|
|
3045
3050
|
}),
|
|
3046
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ P(H, {
|
|
3047
3052
|
style: Q.pickerColumn,
|
|
3048
|
-
children: [/* @__PURE__ */
|
|
3053
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3049
3054
|
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
3050
3055
|
children: "Minute"
|
|
3051
|
-
}), /* @__PURE__ */
|
|
3052
|
-
ref:
|
|
3056
|
+
}), /* @__PURE__ */ N(R, {
|
|
3057
|
+
ref: ee,
|
|
3053
3058
|
style: Q.picker,
|
|
3054
3059
|
contentContainerStyle: Q.pickerContent,
|
|
3055
3060
|
showsVerticalScrollIndicator: !1,
|
|
3056
|
-
children:
|
|
3061
|
+
children: w.map((e) => /* @__PURE__ */ N(V, {
|
|
3057
3062
|
style: [Q.pickerItem, d === e && { backgroundColor: x.primary }],
|
|
3058
3063
|
onPress: () => f(e),
|
|
3059
3064
|
activeOpacity: .7,
|
|
3060
|
-
children: /* @__PURE__ */
|
|
3065
|
+
children: /* @__PURE__ */ N(B, {
|
|
3061
3066
|
style: [
|
|
3062
3067
|
Q.pickerItemText,
|
|
3063
3068
|
{ color: x.text },
|
|
@@ -3073,11 +3078,11 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3073
3078
|
})
|
|
3074
3079
|
]
|
|
3075
3080
|
}),
|
|
3076
|
-
/* @__PURE__ */
|
|
3081
|
+
/* @__PURE__ */ N(V, {
|
|
3077
3082
|
style: [Q.confirmButton, { backgroundColor: x.primary }],
|
|
3078
|
-
onPress:
|
|
3083
|
+
onPress: E,
|
|
3079
3084
|
activeOpacity: .7,
|
|
3080
|
-
children: /* @__PURE__ */
|
|
3085
|
+
children: /* @__PURE__ */ N(B, {
|
|
3081
3086
|
style: [Q.confirmButtonText, { color: x.background }],
|
|
3082
3087
|
children: "Confirm"
|
|
3083
3088
|
})
|
|
@@ -3086,11 +3091,11 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3086
3091
|
})
|
|
3087
3092
|
})
|
|
3088
3093
|
}),
|
|
3089
|
-
v && /* @__PURE__ */
|
|
3094
|
+
v && /* @__PURE__ */ N(B, {
|
|
3090
3095
|
style: [Q.error, { color: x.error }],
|
|
3091
3096
|
children: v
|
|
3092
3097
|
}),
|
|
3093
|
-
b && !v && /* @__PURE__ */
|
|
3098
|
+
b && !v && /* @__PURE__ */ N(B, {
|
|
3094
3099
|
style: [Q.helperText, { color: x.textMuted }],
|
|
3095
3100
|
children: b
|
|
3096
3101
|
})
|
|
@@ -3187,112 +3192,112 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3187
3192
|
flex: 1,
|
|
3188
3193
|
fontSize: 14
|
|
3189
3194
|
}
|
|
3190
|
-
}),
|
|
3191
|
-
let [n, r] =
|
|
3192
|
-
let e = `${String(
|
|
3193
|
-
i ? (
|
|
3195
|
+
}), Ye = ({ field: e, extra: t }) => {
|
|
3196
|
+
let [n, r] = M(!1), [i, a] = M(!0), { value: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), m = p(), h = Array.isArray(o) ? o : [], _ = h[0] || "", v = h[1] || "", y = _.split(":"), b = Number.parseInt(y[0], 10), x = Number.parseInt(y[1], 10), S = Number.isNaN(b) ? 0 : b, ee = Number.isNaN(x) ? 0 : x, C = v.split(":"), w = Number.parseInt(C[0], 10), T = Number.parseInt(C[1], 10), E = Number.isNaN(w) ? 0 : w, te = Number.isNaN(T) ? 0 : T, [D, O] = M(0), [k, ne] = M(0), A = Array.from({ length: 24 }, (e, t) => t), ie = Array.from({ length: 60 }, (e, t) => t), j = () => _ && v ? `${_} - ${v}` : _ || m("renderer.defaultInputs.selectDateRange"), ae = re(() => {
|
|
3197
|
+
let e = `${String(D).padStart(2, "0")}:${String(k).padStart(2, "0")}`;
|
|
3198
|
+
i ? (c([e, v]), a(!1), O(E || 0), ne(te || 0)) : (c([_, e]), r(!1), a(!0));
|
|
3194
3199
|
}, [
|
|
3195
3200
|
i,
|
|
3201
|
+
D,
|
|
3196
3202
|
k,
|
|
3197
|
-
ee,
|
|
3198
3203
|
_,
|
|
3199
3204
|
v,
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3205
|
+
E,
|
|
3206
|
+
te,
|
|
3207
|
+
c
|
|
3203
3208
|
]);
|
|
3204
|
-
return /* @__PURE__ */
|
|
3209
|
+
return /* @__PURE__ */ P(H, {
|
|
3205
3210
|
style: $.container,
|
|
3206
3211
|
children: [
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
style: [$.label, { color:
|
|
3209
|
-
children: [
|
|
3210
|
-
style: { color:
|
|
3212
|
+
/* @__PURE__ */ P(B, {
|
|
3213
|
+
style: [$.label, { color: f.textSecondary }],
|
|
3214
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ N(B, {
|
|
3215
|
+
style: { color: f.error },
|
|
3211
3216
|
children: "*"
|
|
3212
3217
|
})]
|
|
3213
3218
|
}),
|
|
3214
|
-
/* @__PURE__ */
|
|
3219
|
+
/* @__PURE__ */ P(V, {
|
|
3215
3220
|
style: [
|
|
3216
3221
|
$.trigger,
|
|
3217
3222
|
{
|
|
3218
|
-
backgroundColor:
|
|
3219
|
-
borderColor:
|
|
3223
|
+
backgroundColor: f.input,
|
|
3224
|
+
borderColor: f.border
|
|
3220
3225
|
},
|
|
3221
|
-
|
|
3226
|
+
l && { borderColor: f.error }
|
|
3222
3227
|
],
|
|
3223
3228
|
onPress: () => {
|
|
3224
|
-
|
|
3229
|
+
O(S || 0), ne(ee || 0), a(!0), r(!0);
|
|
3225
3230
|
},
|
|
3226
3231
|
activeOpacity: .7,
|
|
3227
|
-
children: [/* @__PURE__ */
|
|
3232
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3228
3233
|
style: [
|
|
3229
3234
|
$.triggerText,
|
|
3230
|
-
{ color:
|
|
3231
|
-
!_ && { color:
|
|
3235
|
+
{ color: f.text },
|
|
3236
|
+
!_ && { color: f.textMuted }
|
|
3232
3237
|
],
|
|
3233
3238
|
numberOfLines: 1,
|
|
3234
|
-
children:
|
|
3235
|
-
}), /* @__PURE__ */
|
|
3239
|
+
children: j()
|
|
3240
|
+
}), /* @__PURE__ */ N(B, {
|
|
3236
3241
|
style: $.icon,
|
|
3237
3242
|
children: "🕐"
|
|
3238
3243
|
})]
|
|
3239
3244
|
}),
|
|
3240
|
-
/* @__PURE__ */
|
|
3245
|
+
/* @__PURE__ */ N(L, {
|
|
3241
3246
|
visible: n,
|
|
3242
3247
|
transparent: !0,
|
|
3243
3248
|
animationType: "fade",
|
|
3244
3249
|
onRequestClose: () => r(!1),
|
|
3245
|
-
children: /* @__PURE__ */
|
|
3250
|
+
children: /* @__PURE__ */ N(V, {
|
|
3246
3251
|
style: $.modalOverlay,
|
|
3247
3252
|
activeOpacity: 1,
|
|
3248
3253
|
onPress: () => r(!1),
|
|
3249
|
-
children: /* @__PURE__ */
|
|
3250
|
-
style: [$.modalContent, { backgroundColor:
|
|
3254
|
+
children: /* @__PURE__ */ P(V, {
|
|
3255
|
+
style: [$.modalContent, { backgroundColor: f.card }],
|
|
3251
3256
|
activeOpacity: 1,
|
|
3252
3257
|
onPress: () => {},
|
|
3253
3258
|
children: [
|
|
3254
|
-
/* @__PURE__ */
|
|
3255
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3256
|
-
children: [/* @__PURE__ */
|
|
3257
|
-
style: [$.modalTitle, { color:
|
|
3258
|
-
children:
|
|
3259
|
-
}), /* @__PURE__ */
|
|
3259
|
+
/* @__PURE__ */ P(H, {
|
|
3260
|
+
style: [$.modalHeader, { borderBottomColor: f.separator }],
|
|
3261
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3262
|
+
style: [$.modalTitle, { color: f.text }],
|
|
3263
|
+
children: u || s.data.name
|
|
3264
|
+
}), /* @__PURE__ */ N(V, {
|
|
3260
3265
|
onPress: () => r(!1),
|
|
3261
|
-
children: /* @__PURE__ */
|
|
3262
|
-
style: [$.closeButton, { color:
|
|
3266
|
+
children: /* @__PURE__ */ N(B, {
|
|
3267
|
+
style: [$.closeButton, { color: f.textMuted }],
|
|
3263
3268
|
children: "✕"
|
|
3264
3269
|
})
|
|
3265
3270
|
})]
|
|
3266
3271
|
}),
|
|
3267
|
-
/* @__PURE__ */
|
|
3268
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3269
|
-
children: /* @__PURE__ */
|
|
3270
|
-
style: [$.rangeIndicatorText, { color:
|
|
3271
|
-
children:
|
|
3272
|
+
/* @__PURE__ */ N(H, {
|
|
3273
|
+
style: [$.rangeIndicator, { backgroundColor: f.primaryLight }],
|
|
3274
|
+
children: /* @__PURE__ */ N(B, {
|
|
3275
|
+
style: [$.rangeIndicatorText, { color: f.primary }],
|
|
3276
|
+
children: m(i ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3272
3277
|
})
|
|
3273
3278
|
}),
|
|
3274
|
-
/* @__PURE__ */
|
|
3279
|
+
/* @__PURE__ */ P(H, {
|
|
3275
3280
|
style: $.pickerContainer,
|
|
3276
3281
|
children: [
|
|
3277
|
-
/* @__PURE__ */
|
|
3282
|
+
/* @__PURE__ */ P(H, {
|
|
3278
3283
|
style: $.pickerColumn,
|
|
3279
|
-
children: [/* @__PURE__ */
|
|
3280
|
-
style: [$.pickerLabel, { color:
|
|
3284
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3285
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3281
3286
|
children: "Hour"
|
|
3282
|
-
}), /* @__PURE__ */
|
|
3287
|
+
}), /* @__PURE__ */ N(R, {
|
|
3283
3288
|
style: $.picker,
|
|
3284
3289
|
contentContainerStyle: $.pickerContent,
|
|
3285
3290
|
showsVerticalScrollIndicator: !1,
|
|
3286
|
-
children:
|
|
3287
|
-
style: [$.pickerItem,
|
|
3288
|
-
onPress: () =>
|
|
3291
|
+
children: A.map((e) => /* @__PURE__ */ N(V, {
|
|
3292
|
+
style: [$.pickerItem, D === e && { backgroundColor: f.primary }],
|
|
3293
|
+
onPress: () => O(e),
|
|
3289
3294
|
activeOpacity: .7,
|
|
3290
|
-
children: /* @__PURE__ */
|
|
3295
|
+
children: /* @__PURE__ */ N(B, {
|
|
3291
3296
|
style: [
|
|
3292
3297
|
$.pickerItemText,
|
|
3293
|
-
{ color:
|
|
3294
|
-
|
|
3295
|
-
color:
|
|
3298
|
+
{ color: f.text },
|
|
3299
|
+
D === e && {
|
|
3300
|
+
color: f.background,
|
|
3296
3301
|
fontWeight: "600"
|
|
3297
3302
|
}
|
|
3298
3303
|
],
|
|
@@ -3301,29 +3306,29 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3301
3306
|
}, e))
|
|
3302
3307
|
})]
|
|
3303
3308
|
}),
|
|
3304
|
-
/* @__PURE__ */
|
|
3305
|
-
style: [$.pickerSeparator, { color:
|
|
3309
|
+
/* @__PURE__ */ N(B, {
|
|
3310
|
+
style: [$.pickerSeparator, { color: f.text }],
|
|
3306
3311
|
children: ":"
|
|
3307
3312
|
}),
|
|
3308
|
-
/* @__PURE__ */
|
|
3313
|
+
/* @__PURE__ */ P(H, {
|
|
3309
3314
|
style: $.pickerColumn,
|
|
3310
|
-
children: [/* @__PURE__ */
|
|
3311
|
-
style: [$.pickerLabel, { color:
|
|
3315
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3316
|
+
style: [$.pickerLabel, { color: f.textMuted }],
|
|
3312
3317
|
children: "Minute"
|
|
3313
|
-
}), /* @__PURE__ */
|
|
3318
|
+
}), /* @__PURE__ */ N(R, {
|
|
3314
3319
|
style: $.picker,
|
|
3315
3320
|
contentContainerStyle: $.pickerContent,
|
|
3316
3321
|
showsVerticalScrollIndicator: !1,
|
|
3317
|
-
children:
|
|
3318
|
-
style: [$.pickerItem,
|
|
3319
|
-
onPress: () =>
|
|
3322
|
+
children: ie.map((e) => /* @__PURE__ */ N(V, {
|
|
3323
|
+
style: [$.pickerItem, k === e && { backgroundColor: f.primary }],
|
|
3324
|
+
onPress: () => ne(e),
|
|
3320
3325
|
activeOpacity: .7,
|
|
3321
|
-
children: /* @__PURE__ */
|
|
3326
|
+
children: /* @__PURE__ */ N(B, {
|
|
3322
3327
|
style: [
|
|
3323
3328
|
$.pickerItemText,
|
|
3324
|
-
{ color:
|
|
3325
|
-
|
|
3326
|
-
color:
|
|
3329
|
+
{ color: f.text },
|
|
3330
|
+
k === e && {
|
|
3331
|
+
color: f.background,
|
|
3327
3332
|
fontWeight: "600"
|
|
3328
3333
|
}
|
|
3329
3334
|
],
|
|
@@ -3334,12 +3339,12 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3334
3339
|
})
|
|
3335
3340
|
]
|
|
3336
3341
|
}),
|
|
3337
|
-
/* @__PURE__ */
|
|
3338
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3339
|
-
onPress:
|
|
3342
|
+
/* @__PURE__ */ N(V, {
|
|
3343
|
+
style: [$.confirmButton, { backgroundColor: f.primary }],
|
|
3344
|
+
onPress: ae,
|
|
3340
3345
|
activeOpacity: .7,
|
|
3341
|
-
children: /* @__PURE__ */
|
|
3342
|
-
style: [$.confirmButtonText, { color:
|
|
3346
|
+
children: /* @__PURE__ */ N(B, {
|
|
3347
|
+
style: [$.confirmButtonText, { color: f.background }],
|
|
3343
3348
|
children: i ? "Next" : "Confirm"
|
|
3344
3349
|
})
|
|
3345
3350
|
})
|
|
@@ -3347,13 +3352,13 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3347
3352
|
})
|
|
3348
3353
|
})
|
|
3349
3354
|
}),
|
|
3350
|
-
|
|
3351
|
-
style: [$.error, { color:
|
|
3352
|
-
children:
|
|
3355
|
+
l && /* @__PURE__ */ N(B, {
|
|
3356
|
+
style: [$.error, { color: f.error }],
|
|
3357
|
+
children: l
|
|
3353
3358
|
}),
|
|
3354
|
-
|
|
3355
|
-
style: [$.helperText, { color:
|
|
3356
|
-
children:
|
|
3359
|
+
d && !l && /* @__PURE__ */ N(B, {
|
|
3360
|
+
style: [$.helperText, { color: f.textMuted }],
|
|
3361
|
+
children: d
|
|
3357
3362
|
})
|
|
3358
3363
|
]
|
|
3359
3364
|
});
|
|
@@ -3458,54 +3463,54 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3458
3463
|
flex: 1,
|
|
3459
3464
|
fontSize: 14
|
|
3460
3465
|
}
|
|
3461
|
-
}),
|
|
3462
|
-
address:
|
|
3463
|
-
autocomplete:
|
|
3464
|
-
checkbox:
|
|
3465
|
-
date:
|
|
3466
|
-
daterange:
|
|
3467
|
-
file:
|
|
3468
|
-
hidden:
|
|
3469
|
-
http:
|
|
3470
|
-
number:
|
|
3471
|
-
password:
|
|
3472
|
-
radio:
|
|
3473
|
-
select:
|
|
3474
|
-
submit:
|
|
3475
|
-
switch:
|
|
3476
|
-
text:
|
|
3477
|
-
textarea:
|
|
3478
|
-
time:
|
|
3479
|
-
timerange:
|
|
3480
|
-
},
|
|
3481
|
-
let { colors: u } =
|
|
3482
|
-
return /* @__PURE__ */
|
|
3483
|
-
|
|
3484
|
-
style: [
|
|
3485
|
-
children: t
|
|
3486
|
-
}) : null,
|
|
3487
|
-
/* @__PURE__ */ P(H, {
|
|
3488
|
-
style: Ze.content,
|
|
3466
|
+
}), Xe = {
|
|
3467
|
+
address: he,
|
|
3468
|
+
autocomplete: ve,
|
|
3469
|
+
checkbox: ye,
|
|
3470
|
+
date: be,
|
|
3471
|
+
daterange: xe,
|
|
3472
|
+
file: Se,
|
|
3473
|
+
hidden: Ce,
|
|
3474
|
+
http: Pe,
|
|
3475
|
+
number: Fe,
|
|
3476
|
+
password: Le,
|
|
3477
|
+
radio: ze,
|
|
3478
|
+
select: Be,
|
|
3479
|
+
submit: Ve,
|
|
3480
|
+
switch: He,
|
|
3481
|
+
text: Ke,
|
|
3482
|
+
textarea: We,
|
|
3483
|
+
time: Je,
|
|
3484
|
+
timerange: Ye
|
|
3485
|
+
}, Ze = ({ step: t, label: n, children: r, canGoBack: i, isLastStep: a, canContinue: o, isSubmitting: s, onBack: c, onContinue: l }) => {
|
|
3486
|
+
let { colors: u } = g(), d = p(), f = !o || s, m = t.nodes.find((t) => e(t) && t.data.type === "submit"), h = m && e(m) ? d(m.data.label) : void 0, _ = a ? h || d("renderer.defaultSubmitButton.submit") : d("renderer.step.continue");
|
|
3487
|
+
return /* @__PURE__ */ P(H, { children: [
|
|
3488
|
+
n ? /* @__PURE__ */ N(B, {
|
|
3489
|
+
style: [Qe.label, { color: u.text }],
|
|
3489
3490
|
children: n
|
|
3491
|
+
}) : null,
|
|
3492
|
+
/* @__PURE__ */ N(H, {
|
|
3493
|
+
style: Qe.content,
|
|
3494
|
+
children: r
|
|
3490
3495
|
}),
|
|
3491
|
-
/* @__PURE__ */
|
|
3492
|
-
style:
|
|
3493
|
-
children: [
|
|
3496
|
+
/* @__PURE__ */ P(H, {
|
|
3497
|
+
style: Qe.actions,
|
|
3498
|
+
children: [i ? /* @__PURE__ */ N(V, {
|
|
3494
3499
|
style: [
|
|
3495
|
-
|
|
3500
|
+
Qe.backButton,
|
|
3496
3501
|
{ borderColor: u.border },
|
|
3497
|
-
s &&
|
|
3502
|
+
s && Qe.disabled
|
|
3498
3503
|
],
|
|
3499
3504
|
onPress: c,
|
|
3500
3505
|
disabled: s,
|
|
3501
3506
|
activeOpacity: .7,
|
|
3502
|
-
children: /* @__PURE__ */
|
|
3503
|
-
style: [
|
|
3507
|
+
children: /* @__PURE__ */ N(B, {
|
|
3508
|
+
style: [Qe.backButtonText, { color: u.text }],
|
|
3504
3509
|
children: d("renderer.step.back")
|
|
3505
3510
|
})
|
|
3506
|
-
}) : /* @__PURE__ */
|
|
3511
|
+
}) : /* @__PURE__ */ N(H, {}), /* @__PURE__ */ N(V, {
|
|
3507
3512
|
style: [
|
|
3508
|
-
|
|
3513
|
+
Qe.continueButton,
|
|
3509
3514
|
{ backgroundColor: u.primary },
|
|
3510
3515
|
f && {
|
|
3511
3516
|
backgroundColor: u.primaryDisabled,
|
|
@@ -3515,14 +3520,14 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3515
3520
|
onPress: l,
|
|
3516
3521
|
disabled: f,
|
|
3517
3522
|
activeOpacity: .7,
|
|
3518
|
-
children: s ? /* @__PURE__ */
|
|
3519
|
-
style: [
|
|
3520
|
-
children:
|
|
3523
|
+
children: s ? /* @__PURE__ */ N(oe, { color: u.primaryForeground }) : /* @__PURE__ */ N(B, {
|
|
3524
|
+
style: [Qe.continueButtonText, { color: u.primaryForeground }],
|
|
3525
|
+
children: _
|
|
3521
3526
|
})
|
|
3522
3527
|
})]
|
|
3523
3528
|
})
|
|
3524
3529
|
] });
|
|
3525
|
-
},
|
|
3530
|
+
}, Qe = z.create({
|
|
3526
3531
|
actions: {
|
|
3527
3532
|
alignItems: "center",
|
|
3528
3533
|
flexDirection: "row",
|
|
@@ -3557,11 +3562,11 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3557
3562
|
fontWeight: "600",
|
|
3558
3563
|
marginBottom: 12
|
|
3559
3564
|
}
|
|
3560
|
-
}),
|
|
3561
|
-
let { colors: i } =
|
|
3562
|
-
return /* @__PURE__ */
|
|
3565
|
+
}), $e = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3566
|
+
let { colors: i } = g();
|
|
3567
|
+
return /* @__PURE__ */ N(V, {
|
|
3563
3568
|
style: [
|
|
3564
|
-
|
|
3569
|
+
et.button,
|
|
3565
3570
|
{ backgroundColor: i.primary },
|
|
3566
3571
|
(t || n) && {
|
|
3567
3572
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3571,12 +3576,12 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3571
3576
|
disabled: t || n,
|
|
3572
3577
|
onPress: r,
|
|
3573
3578
|
activeOpacity: .7,
|
|
3574
|
-
children: n ? /* @__PURE__ */
|
|
3575
|
-
style: [
|
|
3579
|
+
children: n ? /* @__PURE__ */ N(oe, { color: i.primaryForeground }) : /* @__PURE__ */ N(B, {
|
|
3580
|
+
style: [et.buttonText, { color: i.primaryForeground }],
|
|
3576
3581
|
children: e
|
|
3577
3582
|
})
|
|
3578
3583
|
});
|
|
3579
|
-
},
|
|
3584
|
+
}, et = z.create({
|
|
3580
3585
|
button: {
|
|
3581
3586
|
alignItems: "center",
|
|
3582
3587
|
borderRadius: 6,
|
|
@@ -3589,16 +3594,16 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3589
3594
|
fontSize: 16,
|
|
3590
3595
|
fontWeight: "600"
|
|
3591
3596
|
}
|
|
3592
|
-
}),
|
|
3593
|
-
let t =
|
|
3594
|
-
return /* @__PURE__ */
|
|
3595
|
-
style: [
|
|
3597
|
+
}), tt = ({ children: e }) => e, nt = ({ node: e }) => {
|
|
3598
|
+
let t = p(), { colors: n } = g(), r = t(e.data?.label);
|
|
3599
|
+
return /* @__PURE__ */ N(B, {
|
|
3600
|
+
style: [it.title, { color: n.text }],
|
|
3596
3601
|
children: r
|
|
3597
3602
|
});
|
|
3598
|
-
},
|
|
3599
|
-
let { colors: e } =
|
|
3600
|
-
return /* @__PURE__ */
|
|
3601
|
-
},
|
|
3603
|
+
}, rt = () => {
|
|
3604
|
+
let { colors: e } = g();
|
|
3605
|
+
return /* @__PURE__ */ N(H, { style: [it.divider, { backgroundColor: e.separator }] });
|
|
3606
|
+
}, it = z.create({
|
|
3602
3607
|
divider: {
|
|
3603
3608
|
height: 1,
|
|
3604
3609
|
marginBottom: 16,
|
|
@@ -3609,63 +3614,63 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3609
3614
|
fontWeight: "700",
|
|
3610
3615
|
marginBottom: 16
|
|
3611
3616
|
}
|
|
3612
|
-
}),
|
|
3613
|
-
divider:
|
|
3614
|
-
title:
|
|
3615
|
-
},
|
|
3617
|
+
}), at = {
|
|
3618
|
+
divider: rt,
|
|
3619
|
+
title: nt
|
|
3620
|
+
}, ot = ({ node: e, children: t }) => {
|
|
3616
3621
|
let { image: n } = e.data;
|
|
3617
|
-
return /* @__PURE__ */
|
|
3622
|
+
return /* @__PURE__ */ P(H, { children: [n && /* @__PURE__ */ N(I, {
|
|
3618
3623
|
source: { uri: n },
|
|
3619
|
-
style:
|
|
3624
|
+
style: st.image,
|
|
3620
3625
|
resizeMode: "cover"
|
|
3621
3626
|
}), t] });
|
|
3622
|
-
},
|
|
3627
|
+
}, st = z.create({ image: {
|
|
3623
3628
|
borderRadius: 6,
|
|
3624
3629
|
height: 160,
|
|
3625
3630
|
marginBottom: 8,
|
|
3626
3631
|
width: "100%"
|
|
3627
|
-
} }),
|
|
3628
|
-
let { colors: t } =
|
|
3629
|
-
return
|
|
3630
|
-
let e =
|
|
3632
|
+
} }), ct = ({ style: e }) => {
|
|
3633
|
+
let { colors: t } = g(), n = j(new F.Value(.5)).current;
|
|
3634
|
+
return A(() => {
|
|
3635
|
+
let e = F.loop(F.sequence([F.timing(n, {
|
|
3631
3636
|
duration: 600,
|
|
3632
3637
|
toValue: 1,
|
|
3633
3638
|
useNativeDriver: !0
|
|
3634
|
-
}),
|
|
3639
|
+
}), F.timing(n, {
|
|
3635
3640
|
duration: 600,
|
|
3636
3641
|
toValue: .5,
|
|
3637
3642
|
useNativeDriver: !0
|
|
3638
3643
|
})]));
|
|
3639
3644
|
return e.start(), () => e.stop();
|
|
3640
|
-
}, [n]), /* @__PURE__ */
|
|
3641
|
-
|
|
3645
|
+
}, [n]), /* @__PURE__ */ N(F.View, { style: [
|
|
3646
|
+
ut.bar,
|
|
3642
3647
|
{
|
|
3643
3648
|
backgroundColor: t.muted,
|
|
3644
3649
|
opacity: n
|
|
3645
3650
|
},
|
|
3646
3651
|
e
|
|
3647
3652
|
] });
|
|
3648
|
-
},
|
|
3653
|
+
}, lt = () => /* @__PURE__ */ P(H, {
|
|
3649
3654
|
accessibilityState: { busy: !0 },
|
|
3650
3655
|
children: [
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
style:
|
|
3656
|
+
/* @__PURE__ */ N(ct, { style: ut.title }),
|
|
3657
|
+
/* @__PURE__ */ N(H, {
|
|
3658
|
+
style: ut.fields,
|
|
3654
3659
|
children: [
|
|
3655
3660
|
0,
|
|
3656
3661
|
1,
|
|
3657
3662
|
2
|
|
3658
|
-
].map((e) => /* @__PURE__ */
|
|
3659
|
-
style:
|
|
3660
|
-
children: [/* @__PURE__ */
|
|
3663
|
+
].map((e) => /* @__PURE__ */ P(H, {
|
|
3664
|
+
style: ut.field,
|
|
3665
|
+
children: [/* @__PURE__ */ N(ct, { style: ut.fieldLabel }), /* @__PURE__ */ N(ct, { style: ut.fieldInput })]
|
|
3661
3666
|
}, e))
|
|
3662
3667
|
}),
|
|
3663
|
-
/* @__PURE__ */
|
|
3664
|
-
style:
|
|
3665
|
-
children: /* @__PURE__ */
|
|
3668
|
+
/* @__PURE__ */ N(H, {
|
|
3669
|
+
style: ut.actions,
|
|
3670
|
+
children: /* @__PURE__ */ N(ct, { style: ut.button })
|
|
3666
3671
|
})
|
|
3667
3672
|
]
|
|
3668
|
-
}),
|
|
3673
|
+
}), ut = z.create({
|
|
3669
3674
|
actions: {
|
|
3670
3675
|
alignItems: "flex-end",
|
|
3671
3676
|
marginTop: 24
|
|
@@ -3690,117 +3695,117 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3690
3695
|
marginBottom: 24,
|
|
3691
3696
|
width: "33%"
|
|
3692
3697
|
}
|
|
3693
|
-
}),
|
|
3694
|
-
let { colors: b } =
|
|
3698
|
+
}), dt = ({ baseUrl: e, components: t, contentContainerStyle: n, flow: r, googleApiKey: a, headers: o, initialValues: s, isLoading: c = !1, isSubmitting: l = !1, language: u, onBack: d, onChange: f, onSubmit: p, showPoweredBy: m, style: h, theme: _, validate: v, validationMode: y }) => {
|
|
3699
|
+
let { colors: b } = g(), { canContinueStep: x, canSubmit: S, clearSubmitMessage: ee, config: C, currentStep: w, currentStepGroupNode: T, currentStepIndex: E, formErrors: D, formValues: O, goToNextStep: k, goToPreviousStep: A, handleSubmit: j, inputNodes: M, isFirstStep: ae, isLastStep: oe, isSubmitting: se, missingRequiredFields: F, setFieldValue: ce, steps: I, submitMessage: L, t: z } = te({
|
|
3695
3700
|
baseUrl: e,
|
|
3696
3701
|
components: t,
|
|
3697
3702
|
flow: r,
|
|
3698
|
-
googleApiKey:
|
|
3699
|
-
headers:
|
|
3700
|
-
initialValues:
|
|
3701
|
-
language:
|
|
3703
|
+
googleApiKey: a,
|
|
3704
|
+
headers: o,
|
|
3705
|
+
initialValues: s,
|
|
3706
|
+
language: u,
|
|
3702
3707
|
onChange: f,
|
|
3703
3708
|
onSubmit: p,
|
|
3704
|
-
showPoweredBy:
|
|
3709
|
+
showPoweredBy: m,
|
|
3705
3710
|
theme: _,
|
|
3706
3711
|
validate: v,
|
|
3707
3712
|
validationMode: y
|
|
3708
|
-
}), le =
|
|
3709
|
-
config:
|
|
3710
|
-
DefaultFormWrapper:
|
|
3711
|
-
DefaultInputWrapper:
|
|
3712
|
-
DefaultSubmitButton:
|
|
3713
|
-
DefaultSubmitButtonWrapper:
|
|
3714
|
-
defaultInputRenderers:
|
|
3715
|
-
defaultUI:
|
|
3716
|
-
formErrors:
|
|
3717
|
-
formValues:
|
|
3718
|
-
inputNodes:
|
|
3713
|
+
}), le = l || se, { FormWrapper: ue, SubmitButtonWrapper: V, renderNode: fe } = ne({
|
|
3714
|
+
config: C,
|
|
3715
|
+
DefaultFormWrapper: de,
|
|
3716
|
+
DefaultInputWrapper: ot,
|
|
3717
|
+
DefaultSubmitButton: $e,
|
|
3718
|
+
DefaultSubmitButtonWrapper: tt,
|
|
3719
|
+
defaultInputRenderers: Xe,
|
|
3720
|
+
defaultUI: at,
|
|
3721
|
+
formErrors: D,
|
|
3722
|
+
formValues: O,
|
|
3723
|
+
inputNodes: M,
|
|
3719
3724
|
isSubmitting: le,
|
|
3720
|
-
missingRequiredFields:
|
|
3721
|
-
setFieldValue:
|
|
3722
|
-
}), pe =
|
|
3723
|
-
if (
|
|
3724
|
-
|
|
3725
|
+
missingRequiredFields: F,
|
|
3726
|
+
setFieldValue: ce
|
|
3727
|
+
}), pe = C.components.step ?? Ze, me = C.components.loadingSkeleton ?? lt, he = ie(() => z(T?.data?.label), [z, T]), U = re(() => {
|
|
3728
|
+
if (oe) {
|
|
3729
|
+
j();
|
|
3725
3730
|
return;
|
|
3726
3731
|
}
|
|
3727
|
-
|
|
3732
|
+
k();
|
|
3728
3733
|
}, [
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
]), ge =
|
|
3733
|
-
if (
|
|
3734
|
-
|
|
3734
|
+
oe,
|
|
3735
|
+
j,
|
|
3736
|
+
k
|
|
3737
|
+
]), ge = re(() => {
|
|
3738
|
+
if (ae) {
|
|
3739
|
+
d?.();
|
|
3735
3740
|
return;
|
|
3736
3741
|
}
|
|
3737
|
-
|
|
3742
|
+
A();
|
|
3738
3743
|
}, [
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
]), _e = !
|
|
3743
|
-
return /* @__PURE__ */
|
|
3744
|
+
ae,
|
|
3745
|
+
d,
|
|
3746
|
+
A
|
|
3747
|
+
]), _e = !ae || !!d;
|
|
3748
|
+
return /* @__PURE__ */ N(R, {
|
|
3744
3749
|
nestedScrollEnabled: !0,
|
|
3745
3750
|
style: [
|
|
3746
|
-
|
|
3751
|
+
pt.container,
|
|
3747
3752
|
{ backgroundColor: b.background },
|
|
3748
|
-
|
|
3753
|
+
h
|
|
3749
3754
|
],
|
|
3750
3755
|
contentContainerStyle: n,
|
|
3751
|
-
children:
|
|
3756
|
+
children: c ? /* @__PURE__ */ N(me, {}) : /* @__PURE__ */ P(i, {
|
|
3752
3757
|
value: {
|
|
3753
|
-
baseUrl:
|
|
3758
|
+
baseUrl: C.baseUrl,
|
|
3754
3759
|
flow: r,
|
|
3755
|
-
formErrors:
|
|
3756
|
-
formValues:
|
|
3757
|
-
googleApiKey:
|
|
3758
|
-
headers:
|
|
3759
|
-
inputNodes:
|
|
3760
|
-
language:
|
|
3761
|
-
setFieldValue:
|
|
3760
|
+
formErrors: D,
|
|
3761
|
+
formValues: O,
|
|
3762
|
+
googleApiKey: C.googleApiKey,
|
|
3763
|
+
headers: C.headers,
|
|
3764
|
+
inputNodes: M,
|
|
3765
|
+
language: C.language,
|
|
3766
|
+
setFieldValue: ce
|
|
3762
3767
|
},
|
|
3763
|
-
children: [/* @__PURE__ */
|
|
3764
|
-
onSubmit:
|
|
3765
|
-
children: [
|
|
3766
|
-
missingFields:
|
|
3767
|
-
children: /* @__PURE__ */
|
|
3768
|
-
step:
|
|
3769
|
-
groupNode:
|
|
3770
|
-
stepIndex:
|
|
3771
|
-
totalSteps:
|
|
3772
|
-
isFirstStep:
|
|
3773
|
-
isLastStep:
|
|
3774
|
-
canContinue: x && (!
|
|
3768
|
+
children: [/* @__PURE__ */ P(ue, {
|
|
3769
|
+
onSubmit: j,
|
|
3770
|
+
children: [w && /* @__PURE__ */ N(V, {
|
|
3771
|
+
missingFields: F,
|
|
3772
|
+
children: /* @__PURE__ */ N(pe, {
|
|
3773
|
+
step: w,
|
|
3774
|
+
groupNode: T,
|
|
3775
|
+
stepIndex: E,
|
|
3776
|
+
totalSteps: I.length,
|
|
3777
|
+
isFirstStep: ae,
|
|
3778
|
+
isLastStep: oe,
|
|
3779
|
+
canContinue: x && (!oe || S),
|
|
3775
3780
|
canGoBack: _e,
|
|
3776
3781
|
isSubmitting: le,
|
|
3777
3782
|
onBack: ge,
|
|
3778
|
-
onContinue:
|
|
3779
|
-
label:
|
|
3780
|
-
children:
|
|
3783
|
+
onContinue: U,
|
|
3784
|
+
label: he,
|
|
3785
|
+
children: w.nodes.map((e) => fe(e))
|
|
3781
3786
|
})
|
|
3782
|
-
}),
|
|
3783
|
-
style: [
|
|
3787
|
+
}), C.showPoweredBy && /* @__PURE__ */ N(B, {
|
|
3788
|
+
style: [pt.poweredBy, { color: b.textMuted }],
|
|
3784
3789
|
children: "Powered by Treege"
|
|
3785
3790
|
})]
|
|
3786
|
-
}),
|
|
3787
|
-
style: [
|
|
3788
|
-
children: [/* @__PURE__ */
|
|
3789
|
-
style: [
|
|
3790
|
-
children:
|
|
3791
|
-
}), /* @__PURE__ */
|
|
3792
|
-
style: [
|
|
3793
|
-
onPress:
|
|
3794
|
-
children:
|
|
3791
|
+
}), L && /* @__PURE__ */ P(H, {
|
|
3792
|
+
style: [pt.message, { backgroundColor: L.type === "success" ? b.successBg : b.errorBg }],
|
|
3793
|
+
children: [/* @__PURE__ */ N(B, {
|
|
3794
|
+
style: [pt.messageText, { color: L.type === "success" ? b.success : b.error }],
|
|
3795
|
+
children: L.message
|
|
3796
|
+
}), /* @__PURE__ */ N(B, {
|
|
3797
|
+
style: [pt.messageClose, { color: L.type === "success" ? b.success : b.error }],
|
|
3798
|
+
onPress: ee,
|
|
3799
|
+
children: z("common.close")
|
|
3795
3800
|
})]
|
|
3796
3801
|
})]
|
|
3797
3802
|
})
|
|
3798
3803
|
});
|
|
3799
|
-
},
|
|
3804
|
+
}, ft = (e) => /* @__PURE__ */ N(b, {
|
|
3800
3805
|
theme: e.theme,
|
|
3801
3806
|
storageKey: "treege-renderer-theme",
|
|
3802
|
-
children: /* @__PURE__ */
|
|
3803
|
-
}),
|
|
3807
|
+
children: /* @__PURE__ */ N(dt, { ...e })
|
|
3808
|
+
}), pt = z.create({
|
|
3804
3809
|
container: { flex: 1 },
|
|
3805
3810
|
message: {
|
|
3806
3811
|
borderRadius: 6,
|
|
@@ -3823,4 +3828,4 @@ var ue = ({ children: e }) => /* @__PURE__ */ P(H, {
|
|
|
3823
3828
|
}
|
|
3824
3829
|
});
|
|
3825
3830
|
//#endregion
|
|
3826
|
-
export {
|
|
3831
|
+
export { he as DefaultAddressInput, ve as DefaultAutocompleteInput, ye as DefaultCheckboxInput, be as DefaultDateInput, xe as DefaultDateRangeInput, rt as DefaultDividerUI, Se as DefaultFileInput, Ce as DefaultHiddenInput, Pe as DefaultHttpInput, Fe as DefaultNumberInput, Le as DefaultPasswordInput, ze as DefaultRadioInput, Be as DefaultSelectInput, He as DefaultSwitchInput, Ke as DefaultTextInput, We as DefaultTextareaInput, Je as DefaultTimeInput, Ye as DefaultTimeRangeInput, nt as DefaultTitleUI, ft as TreegeRenderer, w as TreegeRendererProvider, v as applyReferenceTransformation, f as buildInitialFormValues, c as calculateReferenceFieldUpdates, _ as checkFormFieldHasValue, y as convertFormValuesToNamedFormat, Xe as defaultInputRenderers, at as defaultUI, D as evaluateCondition, k as evaluateConditions, h as fileToSerializable, d as filesToSerializable, O as findStartNode, T as getFlowRenderState, s as getTranslatedText, l as isFieldEmpty, C as isStartNode, m as resolveNodeDefaultValue, Oe as sanitize, Ae as sanitizeHttpResponse, u as serializableToFile, te as useTreegeRenderer, E as useTreegeRendererConfig };
|