treege 3.0.0-beta.54 → 3.0.0-beta.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -35
- package/dist/DefaultInputs-DklwwMaZ.js +1807 -0
- package/dist/ThemeContext-DAMkr9gW.js +1362 -0
- package/dist/editor/constants/edgeTypes.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +34 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +18 -2
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypePickerMenuContent.d.ts +12 -0
- package/dist/editor/utils/edge.d.ts +37 -1
- package/dist/editor-uMYOjG2i.js +6079 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- package/dist/renderer/utils/http.d.ts +13 -1
- package/dist/renderer-native.js +899 -896
- package/dist/renderer.js +3 -3
- package/dist/shared/locales/ar.json.d.ts +8 -0
- package/dist/shared/locales/de.json.d.ts +8 -0
- package/dist/shared/locales/en.json.d.ts +8 -0
- package/dist/shared/locales/es.json.d.ts +8 -0
- package/dist/shared/locales/fr.json.d.ts +8 -0
- package/dist/shared/locales/it.json.d.ts +8 -0
- package/dist/shared/locales/pt.json.d.ts +8 -0
- package/dist/shared/types/node.d.ts +20 -0
- package/package.json +1 -1
- package/dist/DefaultInputs-BbfholiM.js +0 -1799
- package/dist/ThemeContext-C9418UR6.js +0 -1354
- package/dist/editor-DgUCBTZ0.js +0 -5831
package/dist/renderer-native.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback as
|
|
1
|
+
import { C as e, D as t, M as n, N as r, R as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as ee, u as w, x as T } from "./ThemeContext-DAMkr9gW.js";
|
|
2
|
+
import { useCallback as te, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
3
3
|
import { jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
4
|
-
import { ActivityIndicator as M, Alert as N, Animated as P, FlatList as
|
|
4
|
+
import { ActivityIndicator as M, Alert as N, Animated as P, FlatList as F, Image as ne, Modal as re, ScrollView as I, StyleSheet as L, Switch as R, Text as z, TextInput as B, TouchableOpacity as V, View as H } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var ie = ({ children: e }) => /* @__PURE__ */ A(
|
|
6
|
+
var ie = ({ children: e }) => /* @__PURE__ */ A(H, {
|
|
7
7
|
style: ae.container,
|
|
8
8
|
children: e
|
|
9
9
|
}), ae = L.create({ container: { padding: 16 } }), oe = async (e, t) => {
|
|
@@ -34,147 +34,147 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
34
34
|
} catch (e) {
|
|
35
35
|
return console.error("Google Places fetch error:", e), [];
|
|
36
36
|
}
|
|
37
|
-
}, ce = ({ node: e, value: t, setValue:
|
|
38
|
-
let [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
37
|
+
}, ce = ({ node: e, value: t, setValue: n, error: i, label: a, placeholder: o, helperText: s, id: c, name: l }) => {
|
|
38
|
+
let [u, d] = k(""), [f, p] = k([]), [m, h] = k(!1), [_, v] = k(!1), { language: b, googleApiKey: x } = r(), S = g(), { colors: C } = y(), ee = te((e) => {
|
|
39
|
+
n(e.value), d(""), h(!1), p([]);
|
|
40
|
+
}, [n]), w = () => {
|
|
41
|
+
h(!1);
|
|
42
42
|
};
|
|
43
43
|
return E(() => {
|
|
44
|
-
if (!
|
|
45
|
-
|
|
44
|
+
if (!u || u.trim().length < 3) {
|
|
45
|
+
p([]), v(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
v(!0);
|
|
49
49
|
let e = setTimeout(async () => {
|
|
50
|
-
|
|
50
|
+
p(x ? await se(u, x) : await oe(u, b)), v(!1);
|
|
51
51
|
}, 300);
|
|
52
52
|
return () => {
|
|
53
|
-
clearTimeout(e),
|
|
53
|
+
clearTimeout(e), v(!1);
|
|
54
54
|
};
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
u,
|
|
57
57
|
b,
|
|
58
58
|
x
|
|
59
|
-
]), /* @__PURE__ */ j(
|
|
60
|
-
style:
|
|
59
|
+
]), /* @__PURE__ */ j(H, {
|
|
60
|
+
style: U.container,
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ j(z, {
|
|
63
|
-
style: [
|
|
64
|
-
children: [
|
|
63
|
+
style: [U.label, { color: C.textSecondary }],
|
|
64
|
+
children: [a || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
65
65
|
style: { color: C.error },
|
|
66
66
|
children: "*"
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */ j(
|
|
69
|
+
/* @__PURE__ */ j(V, {
|
|
70
70
|
style: [
|
|
71
|
-
|
|
71
|
+
U.trigger,
|
|
72
72
|
{
|
|
73
73
|
backgroundColor: C.input,
|
|
74
74
|
borderColor: C.border
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
i && { borderColor: C.error }
|
|
77
77
|
],
|
|
78
|
-
onPress: () =>
|
|
78
|
+
onPress: () => h(!0),
|
|
79
79
|
activeOpacity: .7,
|
|
80
80
|
children: [/* @__PURE__ */ A(z, {
|
|
81
81
|
style: [
|
|
82
|
-
|
|
82
|
+
U.triggerText,
|
|
83
83
|
{ color: C.text },
|
|
84
84
|
!t && { color: C.textMuted }
|
|
85
85
|
],
|
|
86
86
|
numberOfLines: 1,
|
|
87
|
-
children: t ||
|
|
87
|
+
children: t || o || S("renderer.defaultAddressInput.enterAddress")
|
|
88
88
|
}), /* @__PURE__ */ A(z, {
|
|
89
|
-
style:
|
|
89
|
+
style: U.icon,
|
|
90
90
|
children: "📍"
|
|
91
91
|
})]
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */ A(
|
|
94
|
-
visible:
|
|
93
|
+
/* @__PURE__ */ A(re, {
|
|
94
|
+
visible: m,
|
|
95
95
|
transparent: !0,
|
|
96
96
|
animationType: "fade",
|
|
97
|
-
onRequestClose:
|
|
98
|
-
children: /* @__PURE__ */ A(
|
|
99
|
-
style:
|
|
97
|
+
onRequestClose: w,
|
|
98
|
+
children: /* @__PURE__ */ A(V, {
|
|
99
|
+
style: U.modalOverlay,
|
|
100
100
|
activeOpacity: 1,
|
|
101
|
-
onPress:
|
|
102
|
-
children: /* @__PURE__ */ j(
|
|
103
|
-
style: [
|
|
101
|
+
onPress: w,
|
|
102
|
+
children: /* @__PURE__ */ j(V, {
|
|
103
|
+
style: [U.modalContent, { backgroundColor: C.card }],
|
|
104
104
|
activeOpacity: 1,
|
|
105
105
|
onPress: () => {},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ j(
|
|
108
|
-
style: [
|
|
107
|
+
/* @__PURE__ */ j(H, {
|
|
108
|
+
style: [U.modalHeader, { borderBottomColor: C.separator }],
|
|
109
109
|
children: [/* @__PURE__ */ A(z, {
|
|
110
|
-
style: [
|
|
111
|
-
children:
|
|
112
|
-
}), /* @__PURE__ */ A(
|
|
113
|
-
onPress:
|
|
110
|
+
style: [U.modalTitle, { color: C.text }],
|
|
111
|
+
children: a || e.data.name
|
|
112
|
+
}), /* @__PURE__ */ A(V, {
|
|
113
|
+
onPress: w,
|
|
114
114
|
children: /* @__PURE__ */ A(z, {
|
|
115
|
-
style: [
|
|
115
|
+
style: [U.closeButton, { color: C.textMuted }],
|
|
116
116
|
children: "✕"
|
|
117
117
|
})
|
|
118
118
|
})]
|
|
119
119
|
}),
|
|
120
|
-
/* @__PURE__ */ j(
|
|
121
|
-
style:
|
|
122
|
-
children: [/* @__PURE__ */ A(
|
|
123
|
-
style: [
|
|
120
|
+
/* @__PURE__ */ j(H, {
|
|
121
|
+
style: U.searchContainer,
|
|
122
|
+
children: [/* @__PURE__ */ A(B, {
|
|
123
|
+
style: [U.searchInput, {
|
|
124
124
|
backgroundColor: C.muted,
|
|
125
125
|
borderColor: C.border,
|
|
126
126
|
color: C.text
|
|
127
127
|
}],
|
|
128
|
-
placeholder:
|
|
128
|
+
placeholder: o || S("renderer.defaultAddressInput.enterAddress"),
|
|
129
129
|
placeholderTextColor: C.textMuted,
|
|
130
|
-
value:
|
|
131
|
-
onChangeText:
|
|
130
|
+
value: u,
|
|
131
|
+
onChangeText: d,
|
|
132
132
|
autoFocus: !0,
|
|
133
133
|
autoCapitalize: "none",
|
|
134
134
|
autoCorrect: !1
|
|
135
|
-
}),
|
|
135
|
+
}), _ && /* @__PURE__ */ A(M, {
|
|
136
136
|
size: "small",
|
|
137
137
|
color: C.primary,
|
|
138
|
-
style:
|
|
138
|
+
style: U.searchLoader
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
142
|
-
style:
|
|
141
|
+
_ ? /* @__PURE__ */ j(H, {
|
|
142
|
+
style: U.loadingContainer,
|
|
143
143
|
children: [/* @__PURE__ */ A(M, {
|
|
144
144
|
size: "small",
|
|
145
145
|
color: C.primary
|
|
146
146
|
}), /* @__PURE__ */ A(z, {
|
|
147
|
-
style: [
|
|
147
|
+
style: [U.loadingText, { color: C.textMuted }],
|
|
148
148
|
children: S("renderer.defaultAddressInput.searching")
|
|
149
149
|
})]
|
|
150
|
-
}) : /* @__PURE__ */ A(
|
|
151
|
-
data:
|
|
150
|
+
}) : /* @__PURE__ */ A(F, {
|
|
151
|
+
data: f,
|
|
152
152
|
keyExtractor: (e, t) => t.toString(),
|
|
153
|
-
style:
|
|
154
|
-
contentContainerStyle:
|
|
153
|
+
style: U.suggestionsList,
|
|
154
|
+
contentContainerStyle: U.suggestionsListContent,
|
|
155
155
|
keyboardShouldPersistTaps: "handled",
|
|
156
|
-
ListEmptyComponent:
|
|
157
|
-
style:
|
|
156
|
+
ListEmptyComponent: u.length >= 3 ? /* @__PURE__ */ A(H, {
|
|
157
|
+
style: U.emptyContainer,
|
|
158
158
|
children: /* @__PURE__ */ A(z, {
|
|
159
|
-
style: [
|
|
159
|
+
style: [U.emptyText, { color: C.textMuted }],
|
|
160
160
|
children: S("renderer.defaultAddressInput.noAddressesFound")
|
|
161
161
|
})
|
|
162
|
-
}) : /* @__PURE__ */ A(
|
|
163
|
-
style:
|
|
162
|
+
}) : /* @__PURE__ */ A(H, {
|
|
163
|
+
style: U.emptyContainer,
|
|
164
164
|
children: /* @__PURE__ */ A(z, {
|
|
165
|
-
style: [
|
|
165
|
+
style: [U.emptyText, { color: C.textMuted }],
|
|
166
166
|
children: S("renderer.defaultAddressInput.typeMinChars")
|
|
167
167
|
})
|
|
168
168
|
}),
|
|
169
|
-
renderItem: ({ item: e }) => /* @__PURE__ */ j(
|
|
170
|
-
style:
|
|
171
|
-
onPress: () =>
|
|
169
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ j(V, {
|
|
170
|
+
style: U.suggestionItem,
|
|
171
|
+
onPress: () => ee(e),
|
|
172
172
|
activeOpacity: .7,
|
|
173
173
|
children: [/* @__PURE__ */ A(z, {
|
|
174
|
-
style:
|
|
174
|
+
style: U.suggestionIcon,
|
|
175
175
|
children: "📍"
|
|
176
176
|
}), /* @__PURE__ */ A(z, {
|
|
177
|
-
style: [
|
|
177
|
+
style: [U.suggestionText, { color: C.text }],
|
|
178
178
|
numberOfLines: 2,
|
|
179
179
|
children: e.label
|
|
180
180
|
})]
|
|
@@ -184,17 +184,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
184
184
|
})
|
|
185
185
|
})
|
|
186
186
|
}),
|
|
187
|
-
|
|
188
|
-
style: [
|
|
189
|
-
children:
|
|
187
|
+
i && /* @__PURE__ */ A(z, {
|
|
188
|
+
style: [U.error, { color: C.error }],
|
|
189
|
+
children: i
|
|
190
190
|
}),
|
|
191
|
-
|
|
192
|
-
style: [
|
|
193
|
-
children:
|
|
191
|
+
s && !i && /* @__PURE__ */ A(z, {
|
|
192
|
+
style: [U.helperText, { color: C.textMuted }],
|
|
193
|
+
children: s
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
});
|
|
197
|
-
},
|
|
197
|
+
}, U = L.create({
|
|
198
198
|
closeButton: {
|
|
199
199
|
fontSize: 24,
|
|
200
200
|
fontWeight: "300"
|
|
@@ -304,126 +304,126 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
304
304
|
flex: 1,
|
|
305
305
|
fontSize: 14
|
|
306
306
|
}
|
|
307
|
-
}), le = ({ node: e, value: t, setValue: n, error:
|
|
308
|
-
let [
|
|
309
|
-
if (!
|
|
310
|
-
let e =
|
|
311
|
-
return
|
|
307
|
+
}), le = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
308
|
+
let [s, c] = k(!1), [l, u] = k(""), d = g(), { colors: f } = y(), p = e.data.options || [], m = p.find((e) => e.value === t), h = D(() => {
|
|
309
|
+
if (!l.trim()) return p;
|
|
310
|
+
let e = l.toLowerCase();
|
|
311
|
+
return p.filter((t) => d(t.label).toLowerCase().includes(e) || t.value.toLowerCase().includes(e));
|
|
312
312
|
}, [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
]),
|
|
317
|
-
n(e === t ? "" : e),
|
|
318
|
-
},
|
|
319
|
-
|
|
313
|
+
p,
|
|
314
|
+
l,
|
|
315
|
+
d
|
|
316
|
+
]), _ = (e) => {
|
|
317
|
+
n(e === t ? "" : e), c(!1), u("");
|
|
318
|
+
}, v = () => {
|
|
319
|
+
c(!1), u("");
|
|
320
320
|
};
|
|
321
|
-
return /* @__PURE__ */ j(
|
|
322
|
-
style:
|
|
321
|
+
return /* @__PURE__ */ j(H, {
|
|
322
|
+
style: W.container,
|
|
323
323
|
children: [
|
|
324
324
|
/* @__PURE__ */ j(z, {
|
|
325
|
-
style: [
|
|
326
|
-
children: [
|
|
327
|
-
style: { color:
|
|
325
|
+
style: [W.label, { color: f.textSecondary }],
|
|
326
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
327
|
+
style: { color: f.error },
|
|
328
328
|
children: "*"
|
|
329
329
|
})]
|
|
330
330
|
}),
|
|
331
|
-
/* @__PURE__ */ j(
|
|
331
|
+
/* @__PURE__ */ j(V, {
|
|
332
332
|
style: [
|
|
333
|
-
|
|
333
|
+
W.trigger,
|
|
334
334
|
{
|
|
335
|
-
backgroundColor:
|
|
336
|
-
borderColor:
|
|
335
|
+
backgroundColor: f.input,
|
|
336
|
+
borderColor: f.border
|
|
337
337
|
},
|
|
338
|
-
|
|
338
|
+
r && { borderColor: f.error }
|
|
339
339
|
],
|
|
340
|
-
onPress: () =>
|
|
340
|
+
onPress: () => c(!0),
|
|
341
341
|
activeOpacity: .7,
|
|
342
342
|
children: [/* @__PURE__ */ A(z, {
|
|
343
343
|
style: [
|
|
344
|
-
|
|
345
|
-
{ color:
|
|
346
|
-
!t && { color:
|
|
344
|
+
W.triggerText,
|
|
345
|
+
{ color: f.text },
|
|
346
|
+
!t && { color: f.textMuted }
|
|
347
347
|
],
|
|
348
348
|
numberOfLines: 1,
|
|
349
|
-
children: t &&
|
|
349
|
+
children: t && m ? d(m.label) : a || d("renderer.defaultAutocompleteInput.selectOption")
|
|
350
350
|
}), /* @__PURE__ */ A(z, {
|
|
351
|
-
style: [
|
|
351
|
+
style: [W.arrow, { color: f.textMuted }],
|
|
352
352
|
children: "▼"
|
|
353
353
|
})]
|
|
354
354
|
}),
|
|
355
|
-
/* @__PURE__ */ A(
|
|
356
|
-
visible:
|
|
355
|
+
/* @__PURE__ */ A(re, {
|
|
356
|
+
visible: s,
|
|
357
357
|
transparent: !0,
|
|
358
358
|
animationType: "fade",
|
|
359
|
-
onRequestClose:
|
|
360
|
-
children: /* @__PURE__ */ A(
|
|
361
|
-
style:
|
|
359
|
+
onRequestClose: v,
|
|
360
|
+
children: /* @__PURE__ */ A(V, {
|
|
361
|
+
style: W.modalOverlay,
|
|
362
362
|
activeOpacity: 1,
|
|
363
|
-
onPress:
|
|
364
|
-
children: /* @__PURE__ */ j(
|
|
365
|
-
style: [
|
|
363
|
+
onPress: v,
|
|
364
|
+
children: /* @__PURE__ */ j(V, {
|
|
365
|
+
style: [W.modalContent, { backgroundColor: f.card }],
|
|
366
366
|
activeOpacity: 1,
|
|
367
367
|
onPress: () => {},
|
|
368
368
|
children: [
|
|
369
|
-
/* @__PURE__ */ j(
|
|
370
|
-
style: [
|
|
369
|
+
/* @__PURE__ */ j(H, {
|
|
370
|
+
style: [W.modalHeader, { borderBottomColor: f.separator }],
|
|
371
371
|
children: [/* @__PURE__ */ A(z, {
|
|
372
|
-
style: [
|
|
373
|
-
children:
|
|
374
|
-
}), /* @__PURE__ */ A(
|
|
375
|
-
onPress:
|
|
372
|
+
style: [W.modalTitle, { color: f.text }],
|
|
373
|
+
children: i || e.data.name
|
|
374
|
+
}), /* @__PURE__ */ A(V, {
|
|
375
|
+
onPress: v,
|
|
376
376
|
children: /* @__PURE__ */ A(z, {
|
|
377
|
-
style: [
|
|
377
|
+
style: [W.closeButton, { color: f.textMuted }],
|
|
378
378
|
children: "✕"
|
|
379
379
|
})
|
|
380
380
|
})]
|
|
381
381
|
}),
|
|
382
|
-
/* @__PURE__ */ A(
|
|
383
|
-
style:
|
|
384
|
-
children: /* @__PURE__ */ A(
|
|
385
|
-
style: [
|
|
386
|
-
backgroundColor:
|
|
387
|
-
borderColor:
|
|
388
|
-
color:
|
|
382
|
+
/* @__PURE__ */ A(H, {
|
|
383
|
+
style: W.searchContainer,
|
|
384
|
+
children: /* @__PURE__ */ A(B, {
|
|
385
|
+
style: [W.searchInput, {
|
|
386
|
+
backgroundColor: f.muted,
|
|
387
|
+
borderColor: f.border,
|
|
388
|
+
color: f.text
|
|
389
389
|
}],
|
|
390
|
-
placeholder:
|
|
391
|
-
placeholderTextColor:
|
|
392
|
-
value:
|
|
393
|
-
onChangeText:
|
|
390
|
+
placeholder: a || d("renderer.defaultAutocompleteInput.search"),
|
|
391
|
+
placeholderTextColor: f.textMuted,
|
|
392
|
+
value: l,
|
|
393
|
+
onChangeText: u,
|
|
394
394
|
autoFocus: !0,
|
|
395
395
|
autoCapitalize: "none",
|
|
396
396
|
autoCorrect: !1
|
|
397
397
|
})
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */ A(
|
|
400
|
-
data:
|
|
399
|
+
/* @__PURE__ */ A(F, {
|
|
400
|
+
data: h,
|
|
401
401
|
keyExtractor: (e) => e.value,
|
|
402
|
-
style:
|
|
403
|
-
contentContainerStyle:
|
|
404
|
-
ListEmptyComponent: /* @__PURE__ */ A(
|
|
405
|
-
style:
|
|
402
|
+
style: W.optionsList,
|
|
403
|
+
contentContainerStyle: W.optionsListContent,
|
|
404
|
+
ListEmptyComponent: /* @__PURE__ */ A(H, {
|
|
405
|
+
style: W.emptyContainer,
|
|
406
406
|
children: /* @__PURE__ */ A(z, {
|
|
407
|
-
style: [
|
|
408
|
-
children:
|
|
407
|
+
style: [W.emptyText, { color: f.textMuted }],
|
|
408
|
+
children: d("renderer.defaultAutocompleteInput.noResults")
|
|
409
409
|
})
|
|
410
410
|
}),
|
|
411
411
|
renderItem: ({ item: e }) => {
|
|
412
412
|
let n = e.value === t;
|
|
413
|
-
return /* @__PURE__ */ j(
|
|
414
|
-
style: [
|
|
415
|
-
onPress: () =>
|
|
413
|
+
return /* @__PURE__ */ j(V, {
|
|
414
|
+
style: [W.option, n && { backgroundColor: f.primaryLight }],
|
|
415
|
+
onPress: () => _(e.value),
|
|
416
416
|
disabled: e.disabled,
|
|
417
417
|
activeOpacity: .7,
|
|
418
418
|
children: [/* @__PURE__ */ A(z, {
|
|
419
419
|
style: [
|
|
420
|
-
|
|
421
|
-
{ color:
|
|
422
|
-
e.disabled && { color:
|
|
420
|
+
W.optionText,
|
|
421
|
+
{ color: f.text },
|
|
422
|
+
e.disabled && { color: f.textMuted }
|
|
423
423
|
],
|
|
424
|
-
children:
|
|
424
|
+
children: d(e.label)
|
|
425
425
|
}), n && /* @__PURE__ */ A(z, {
|
|
426
|
-
style: [
|
|
426
|
+
style: [W.checkmark, { color: f.primary }],
|
|
427
427
|
children: "✓"
|
|
428
428
|
})]
|
|
429
429
|
});
|
|
@@ -433,17 +433,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
433
433
|
})
|
|
434
434
|
})
|
|
435
435
|
}),
|
|
436
|
-
|
|
437
|
-
style: [
|
|
438
|
-
children:
|
|
436
|
+
r && /* @__PURE__ */ A(z, {
|
|
437
|
+
style: [W.error, { color: f.error }],
|
|
438
|
+
children: r
|
|
439
439
|
}),
|
|
440
|
-
|
|
441
|
-
style: [
|
|
442
|
-
children:
|
|
440
|
+
o && !r && /* @__PURE__ */ A(z, {
|
|
441
|
+
style: [W.helperText, { color: f.textMuted }],
|
|
442
|
+
children: o
|
|
443
443
|
})
|
|
444
444
|
]
|
|
445
445
|
});
|
|
446
|
-
},
|
|
446
|
+
}, W = L.create({
|
|
447
447
|
arrow: { fontSize: 12 },
|
|
448
448
|
checkmark: {
|
|
449
449
|
fontSize: 18,
|
|
@@ -534,101 +534,101 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
534
534
|
flex: 1,
|
|
535
535
|
fontSize: 14
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
538
|
-
let
|
|
539
|
-
n(
|
|
540
|
-
},
|
|
541
|
-
return /* @__PURE__ */ j(
|
|
537
|
+
}), ue = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
538
|
+
let o = g(), { colors: s } = y(), c = e.data.options || [], l = c.length > 0, u = Array.isArray(t) ? t : [], d = typeof t == "boolean" ? t : !1, f = (e) => {
|
|
539
|
+
n(l ? u.includes(e) ? u.filter((t) => t !== e) : [...u, e] : !d);
|
|
540
|
+
}, p = (e) => l ? u.includes(e) : d;
|
|
541
|
+
return /* @__PURE__ */ j(H, {
|
|
542
542
|
style: G.container,
|
|
543
543
|
children: [
|
|
544
544
|
/* @__PURE__ */ j(z, {
|
|
545
|
-
style: [G.label, { color:
|
|
546
|
-
children: [
|
|
547
|
-
style: { color:
|
|
545
|
+
style: [G.label, { color: s.textSecondary }],
|
|
546
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
547
|
+
style: { color: s.error },
|
|
548
548
|
children: "*"
|
|
549
549
|
})]
|
|
550
550
|
}),
|
|
551
|
-
|
|
552
|
-
let t =
|
|
553
|
-
return /* @__PURE__ */ j(
|
|
551
|
+
c.length > 0 ? c.map((e) => {
|
|
552
|
+
let t = o(e.description);
|
|
553
|
+
return /* @__PURE__ */ j(V, {
|
|
554
554
|
style: G.option,
|
|
555
|
-
onPress: () =>
|
|
555
|
+
onPress: () => f(e.value),
|
|
556
556
|
disabled: e.disabled,
|
|
557
557
|
activeOpacity: .7,
|
|
558
558
|
accessible: !0,
|
|
559
559
|
accessibilityRole: "checkbox",
|
|
560
560
|
accessibilityState: {
|
|
561
|
-
checked:
|
|
561
|
+
checked: p(e.value),
|
|
562
562
|
disabled: e.disabled
|
|
563
563
|
},
|
|
564
|
-
accessibilityLabel:
|
|
565
|
-
children: [/* @__PURE__ */ A(
|
|
564
|
+
accessibilityLabel: o(e.label) || e.value,
|
|
565
|
+
children: [/* @__PURE__ */ A(H, {
|
|
566
566
|
style: [
|
|
567
567
|
G.checkbox,
|
|
568
568
|
{
|
|
569
|
-
backgroundColor:
|
|
570
|
-
borderColor:
|
|
569
|
+
backgroundColor: s.input,
|
|
570
|
+
borderColor: s.border
|
|
571
571
|
},
|
|
572
|
-
|
|
573
|
-
backgroundColor:
|
|
574
|
-
borderColor:
|
|
572
|
+
p(e.value) && {
|
|
573
|
+
backgroundColor: s.primary,
|
|
574
|
+
borderColor: s.primary
|
|
575
575
|
}
|
|
576
576
|
],
|
|
577
|
-
children:
|
|
577
|
+
children: p(e.value) && /* @__PURE__ */ A(z, {
|
|
578
578
|
style: G.checkmark,
|
|
579
579
|
children: "✓"
|
|
580
580
|
})
|
|
581
|
-
}), /* @__PURE__ */ j(
|
|
581
|
+
}), /* @__PURE__ */ j(H, {
|
|
582
582
|
style: G.optionTextContainer,
|
|
583
583
|
children: [/* @__PURE__ */ A(z, {
|
|
584
584
|
style: [
|
|
585
585
|
G.optionLabel,
|
|
586
|
-
{ color:
|
|
587
|
-
e.disabled && { color:
|
|
586
|
+
{ color: s.textSecondary },
|
|
587
|
+
e.disabled && { color: s.textMuted }
|
|
588
588
|
],
|
|
589
|
-
children:
|
|
589
|
+
children: o(e.label) || e.value
|
|
590
590
|
}), t && /* @__PURE__ */ A(z, {
|
|
591
|
-
style: [G.optionDescription, { color:
|
|
591
|
+
style: [G.optionDescription, { color: s.textMuted }],
|
|
592
592
|
children: t
|
|
593
593
|
})]
|
|
594
594
|
})]
|
|
595
595
|
}, e.value);
|
|
596
|
-
}) : /* @__PURE__ */ j(
|
|
596
|
+
}) : /* @__PURE__ */ j(V, {
|
|
597
597
|
style: G.option,
|
|
598
|
-
onPress: () =>
|
|
598
|
+
onPress: () => f(""),
|
|
599
599
|
activeOpacity: .7,
|
|
600
600
|
accessible: !0,
|
|
601
601
|
accessibilityRole: "checkbox",
|
|
602
|
-
accessibilityState: { checked:
|
|
603
|
-
accessibilityLabel:
|
|
604
|
-
children: [/* @__PURE__ */ A(
|
|
602
|
+
accessibilityState: { checked: d },
|
|
603
|
+
accessibilityLabel: i || e.data.name,
|
|
604
|
+
children: [/* @__PURE__ */ A(H, {
|
|
605
605
|
style: [
|
|
606
606
|
G.checkbox,
|
|
607
607
|
{
|
|
608
|
-
backgroundColor:
|
|
609
|
-
borderColor:
|
|
608
|
+
backgroundColor: s.input,
|
|
609
|
+
borderColor: s.border
|
|
610
610
|
},
|
|
611
|
-
|
|
612
|
-
backgroundColor:
|
|
613
|
-
borderColor:
|
|
611
|
+
d && {
|
|
612
|
+
backgroundColor: s.primary,
|
|
613
|
+
borderColor: s.primary
|
|
614
614
|
}
|
|
615
615
|
],
|
|
616
|
-
children:
|
|
616
|
+
children: d && /* @__PURE__ */ A(z, {
|
|
617
617
|
style: G.checkmark,
|
|
618
618
|
children: "✓"
|
|
619
619
|
})
|
|
620
620
|
}), /* @__PURE__ */ A(z, {
|
|
621
|
-
style: [G.optionLabel, { color:
|
|
622
|
-
children:
|
|
621
|
+
style: [G.optionLabel, { color: s.textSecondary }],
|
|
622
|
+
children: i || e.data.name
|
|
623
623
|
})]
|
|
624
624
|
}),
|
|
625
|
-
|
|
626
|
-
style: [G.error, { color:
|
|
627
|
-
children:
|
|
625
|
+
r && /* @__PURE__ */ A(z, {
|
|
626
|
+
style: [G.error, { color: s.error }],
|
|
627
|
+
children: r
|
|
628
628
|
}),
|
|
629
|
-
|
|
630
|
-
style: [G.helperText, { color:
|
|
631
|
-
children:
|
|
629
|
+
a && !r && /* @__PURE__ */ A(z, {
|
|
630
|
+
style: [G.helperText, { color: s.textMuted }],
|
|
631
|
+
children: a
|
|
632
632
|
})
|
|
633
633
|
]
|
|
634
634
|
});
|
|
@@ -672,15 +672,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
672
672
|
},
|
|
673
673
|
optionLabel: { fontSize: 14 },
|
|
674
674
|
optionTextContainer: { flex: 1 }
|
|
675
|
-
}),
|
|
676
|
-
let [
|
|
677
|
-
let e =
|
|
675
|
+
}), de = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
676
|
+
let [s, c] = k(!1), l = g(), { colors: u } = y(), d = t ? new Date(t) : void 0, { year: f, month: p, today: m } = D(() => {
|
|
677
|
+
let e = d || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
678
678
|
return r.setHours(0, 0, 0, 0), {
|
|
679
679
|
month: n,
|
|
680
680
|
today: r,
|
|
681
681
|
year: t
|
|
682
682
|
};
|
|
683
|
-
}, [
|
|
683
|
+
}, [d]), [h, _] = k(f), [v, b] = k(p), x = [
|
|
684
684
|
"January",
|
|
685
685
|
"February",
|
|
686
686
|
"March",
|
|
@@ -694,126 +694,126 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
694
694
|
"November",
|
|
695
695
|
"December"
|
|
696
696
|
], S = D(() => {
|
|
697
|
-
let e = new Date(
|
|
697
|
+
let e = new Date(h, v, 1).getDay(), t = new Date(h, v + 1, 0).getDate(), n = new Date(h, v, 0).getDate(), r = [];
|
|
698
698
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
699
|
-
date: new Date(
|
|
699
|
+
date: new Date(h, v - 1, n - t),
|
|
700
700
|
day: n - t,
|
|
701
701
|
isCurrentMonth: !1
|
|
702
702
|
});
|
|
703
703
|
for (let e = 1; e <= t; e++) r.push({
|
|
704
|
-
date: new Date(
|
|
704
|
+
date: new Date(h, v, e),
|
|
705
705
|
day: e,
|
|
706
706
|
isCurrentMonth: !0
|
|
707
707
|
});
|
|
708
708
|
let i = 42 - r.length;
|
|
709
709
|
for (let e = 1; e <= i; e++) r.push({
|
|
710
|
-
date: new Date(
|
|
710
|
+
date: new Date(h, v + 1, e),
|
|
711
711
|
day: e,
|
|
712
712
|
isCurrentMonth: !1
|
|
713
713
|
});
|
|
714
714
|
return r;
|
|
715
|
-
}, [
|
|
716
|
-
e.data.disablePast && t <
|
|
715
|
+
}, [h, v]), C = te((t) => {
|
|
716
|
+
e.data.disablePast && t < m || (n(t.toISOString()), c(!1));
|
|
717
717
|
}, [
|
|
718
718
|
e.data.disablePast,
|
|
719
|
-
|
|
719
|
+
m,
|
|
720
720
|
n
|
|
721
|
-
]),
|
|
722
|
-
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
return /* @__PURE__ */ j(
|
|
721
|
+
]), ee = () => {
|
|
722
|
+
v === 0 ? (b(11), _(h - 1)) : b(v - 1);
|
|
723
|
+
}, w = () => {
|
|
724
|
+
v === 11 ? (b(0), _(h + 1)) : b(v + 1);
|
|
725
|
+
}, T = () => d ? d.toLocaleDateString() : a || l("renderer.defaultInputs.selectDate"), E = (t) => e.data.disablePast ? t < m : !1, O = (e) => d ? e.getDate() === d.getDate() && e.getMonth() === d.getMonth() && e.getFullYear() === d.getFullYear() : !1;
|
|
726
|
+
return /* @__PURE__ */ j(H, {
|
|
727
727
|
style: K.container,
|
|
728
728
|
children: [
|
|
729
729
|
/* @__PURE__ */ j(z, {
|
|
730
|
-
style: [K.label, { color:
|
|
731
|
-
children: [
|
|
732
|
-
style: { color:
|
|
730
|
+
style: [K.label, { color: u.textSecondary }],
|
|
731
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
732
|
+
style: { color: u.error },
|
|
733
733
|
children: "*"
|
|
734
734
|
})]
|
|
735
735
|
}),
|
|
736
|
-
/* @__PURE__ */ j(
|
|
736
|
+
/* @__PURE__ */ j(V, {
|
|
737
737
|
style: [
|
|
738
738
|
K.trigger,
|
|
739
739
|
{
|
|
740
|
-
backgroundColor:
|
|
741
|
-
borderColor:
|
|
740
|
+
backgroundColor: u.input,
|
|
741
|
+
borderColor: u.border
|
|
742
742
|
},
|
|
743
|
-
|
|
743
|
+
r && { borderColor: u.error }
|
|
744
744
|
],
|
|
745
|
-
onPress: () =>
|
|
745
|
+
onPress: () => c(!0),
|
|
746
746
|
activeOpacity: .7,
|
|
747
747
|
children: [/* @__PURE__ */ A(z, {
|
|
748
748
|
style: [
|
|
749
749
|
K.triggerText,
|
|
750
|
-
{ color:
|
|
751
|
-
!t && { color:
|
|
750
|
+
{ color: u.text },
|
|
751
|
+
!t && { color: u.textMuted }
|
|
752
752
|
],
|
|
753
753
|
numberOfLines: 1,
|
|
754
|
-
children:
|
|
754
|
+
children: T()
|
|
755
755
|
}), /* @__PURE__ */ A(z, {
|
|
756
756
|
style: K.icon,
|
|
757
757
|
children: "📅"
|
|
758
758
|
})]
|
|
759
759
|
}),
|
|
760
|
-
/* @__PURE__ */ A(
|
|
761
|
-
visible:
|
|
760
|
+
/* @__PURE__ */ A(re, {
|
|
761
|
+
visible: s,
|
|
762
762
|
transparent: !0,
|
|
763
763
|
animationType: "fade",
|
|
764
|
-
onRequestClose: () =>
|
|
765
|
-
children: /* @__PURE__ */ A(
|
|
764
|
+
onRequestClose: () => c(!1),
|
|
765
|
+
children: /* @__PURE__ */ A(V, {
|
|
766
766
|
style: K.modalOverlay,
|
|
767
767
|
activeOpacity: 1,
|
|
768
|
-
onPress: () =>
|
|
769
|
-
children: /* @__PURE__ */ j(
|
|
770
|
-
style: [K.modalContent, { backgroundColor:
|
|
768
|
+
onPress: () => c(!1),
|
|
769
|
+
children: /* @__PURE__ */ j(V, {
|
|
770
|
+
style: [K.modalContent, { backgroundColor: u.card }],
|
|
771
771
|
activeOpacity: 1,
|
|
772
772
|
onPress: () => {},
|
|
773
773
|
children: [
|
|
774
|
-
/* @__PURE__ */ j(
|
|
775
|
-
style: [K.modalHeader, { borderBottomColor:
|
|
774
|
+
/* @__PURE__ */ j(H, {
|
|
775
|
+
style: [K.modalHeader, { borderBottomColor: u.separator }],
|
|
776
776
|
children: [/* @__PURE__ */ A(z, {
|
|
777
|
-
style: [K.modalTitle, { color:
|
|
778
|
-
children:
|
|
779
|
-
}), /* @__PURE__ */ A(
|
|
780
|
-
onPress: () =>
|
|
777
|
+
style: [K.modalTitle, { color: u.text }],
|
|
778
|
+
children: i || e.data.name
|
|
779
|
+
}), /* @__PURE__ */ A(V, {
|
|
780
|
+
onPress: () => c(!1),
|
|
781
781
|
children: /* @__PURE__ */ A(z, {
|
|
782
|
-
style: [K.closeButton, { color:
|
|
782
|
+
style: [K.closeButton, { color: u.textMuted }],
|
|
783
783
|
children: "✕"
|
|
784
784
|
})
|
|
785
785
|
})]
|
|
786
786
|
}),
|
|
787
|
-
/* @__PURE__ */ j(
|
|
787
|
+
/* @__PURE__ */ j(H, {
|
|
788
788
|
style: K.calendarHeader,
|
|
789
789
|
children: [
|
|
790
|
-
/* @__PURE__ */ A(
|
|
791
|
-
onPress:
|
|
790
|
+
/* @__PURE__ */ A(V, {
|
|
791
|
+
onPress: ee,
|
|
792
792
|
style: K.navButton,
|
|
793
793
|
children: /* @__PURE__ */ A(z, {
|
|
794
|
-
style: [K.navButtonText, { color:
|
|
794
|
+
style: [K.navButtonText, { color: u.primary }],
|
|
795
795
|
children: "‹"
|
|
796
796
|
})
|
|
797
797
|
}),
|
|
798
798
|
/* @__PURE__ */ j(z, {
|
|
799
|
-
style: [K.monthYear, { color:
|
|
799
|
+
style: [K.monthYear, { color: u.text }],
|
|
800
800
|
children: [
|
|
801
|
-
x[
|
|
801
|
+
x[v],
|
|
802
802
|
" ",
|
|
803
|
-
|
|
803
|
+
h
|
|
804
804
|
]
|
|
805
805
|
}),
|
|
806
|
-
/* @__PURE__ */ A(
|
|
807
|
-
onPress:
|
|
806
|
+
/* @__PURE__ */ A(V, {
|
|
807
|
+
onPress: w,
|
|
808
808
|
style: K.navButton,
|
|
809
809
|
children: /* @__PURE__ */ A(z, {
|
|
810
|
-
style: [K.navButtonText, { color:
|
|
810
|
+
style: [K.navButtonText, { color: u.primary }],
|
|
811
811
|
children: "›"
|
|
812
812
|
})
|
|
813
813
|
})
|
|
814
814
|
]
|
|
815
815
|
}),
|
|
816
|
-
/* @__PURE__ */ A(
|
|
816
|
+
/* @__PURE__ */ A(H, {
|
|
817
817
|
style: K.weekDays,
|
|
818
818
|
children: [
|
|
819
819
|
"Sun",
|
|
@@ -824,11 +824,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
824
824
|
"Fri",
|
|
825
825
|
"Sat"
|
|
826
826
|
].map((e) => /* @__PURE__ */ A(z, {
|
|
827
|
-
style: [K.weekDay, { color:
|
|
827
|
+
style: [K.weekDay, { color: u.textMuted }],
|
|
828
828
|
children: e
|
|
829
829
|
}, e))
|
|
830
830
|
}),
|
|
831
|
-
/* @__PURE__ */ A(
|
|
831
|
+
/* @__PURE__ */ A(F, {
|
|
832
832
|
data: S,
|
|
833
833
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
834
834
|
numColumns: 7,
|
|
@@ -836,13 +836,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
836
836
|
style: K.calendar,
|
|
837
837
|
contentContainerStyle: K.calendarContent,
|
|
838
838
|
renderItem: ({ item: e }) => {
|
|
839
|
-
let t =
|
|
840
|
-
return /* @__PURE__ */ A(
|
|
839
|
+
let t = E(e.date), n = O(e.date);
|
|
840
|
+
return /* @__PURE__ */ A(V, {
|
|
841
841
|
style: [
|
|
842
842
|
K.dayCell,
|
|
843
843
|
!e.isCurrentMonth && K.dayCellOtherMonth,
|
|
844
844
|
n && {
|
|
845
|
-
backgroundColor:
|
|
845
|
+
backgroundColor: u.primary,
|
|
846
846
|
borderRadius: 20
|
|
847
847
|
},
|
|
848
848
|
t && K.dayCellDisabled
|
|
@@ -853,13 +853,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
853
853
|
children: /* @__PURE__ */ A(z, {
|
|
854
854
|
style: [
|
|
855
855
|
K.dayText,
|
|
856
|
-
{ color:
|
|
857
|
-
!e.isCurrentMonth && { color:
|
|
856
|
+
{ color: u.text },
|
|
857
|
+
!e.isCurrentMonth && { color: u.textMuted },
|
|
858
858
|
n && {
|
|
859
|
-
color:
|
|
859
|
+
color: u.background,
|
|
860
860
|
fontWeight: "600"
|
|
861
861
|
},
|
|
862
|
-
t && { color:
|
|
862
|
+
t && { color: u.textMuted }
|
|
863
863
|
],
|
|
864
864
|
children: e.day
|
|
865
865
|
})
|
|
@@ -870,13 +870,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
870
870
|
})
|
|
871
871
|
})
|
|
872
872
|
}),
|
|
873
|
-
|
|
874
|
-
style: [K.error, { color:
|
|
875
|
-
children:
|
|
873
|
+
r && /* @__PURE__ */ A(z, {
|
|
874
|
+
style: [K.error, { color: u.error }],
|
|
875
|
+
children: r
|
|
876
876
|
}),
|
|
877
|
-
|
|
878
|
-
style: [K.helperText, { color:
|
|
879
|
-
children:
|
|
877
|
+
o && !r && /* @__PURE__ */ A(z, {
|
|
878
|
+
style: [K.helperText, { color: u.textMuted }],
|
|
879
|
+
children: o
|
|
880
880
|
})
|
|
881
881
|
]
|
|
882
882
|
});
|
|
@@ -980,15 +980,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
980
980
|
flexDirection: "row",
|
|
981
981
|
marginBottom: 8
|
|
982
982
|
}
|
|
983
|
-
}),
|
|
984
|
-
let [
|
|
985
|
-
let e =
|
|
983
|
+
}), fe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
984
|
+
let [o, s] = k(!1), [c, l] = k(!0), u = g(), { colors: d } = y(), f = Array.isArray(t) ? t : [], p = f[0] ? new Date(f[0]) : void 0, m = f[1] ? new Date(f[1]) : void 0, { year: h, month: _, today: v } = D(() => {
|
|
985
|
+
let e = p || /* @__PURE__ */ new Date(), t = e.getFullYear(), n = e.getMonth(), r = /* @__PURE__ */ new Date();
|
|
986
986
|
return r.setHours(0, 0, 0, 0), {
|
|
987
987
|
month: n,
|
|
988
988
|
today: r,
|
|
989
989
|
year: t
|
|
990
990
|
};
|
|
991
|
-
}, [
|
|
991
|
+
}, [p]), [b, x] = k(h), [S, C] = k(_), ee = [
|
|
992
992
|
"January",
|
|
993
993
|
"February",
|
|
994
994
|
"March",
|
|
@@ -1001,7 +1001,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1001
1001
|
"October",
|
|
1002
1002
|
"November",
|
|
1003
1003
|
"December"
|
|
1004
|
-
],
|
|
1004
|
+
], w = D(() => {
|
|
1005
1005
|
let e = new Date(b, S, 1).getDay(), t = new Date(b, S + 1, 0).getDate(), n = new Date(b, S, 0).getDate(), r = [];
|
|
1006
1006
|
for (let t = e - 1; t >= 0; t--) r.push({
|
|
1007
1007
|
date: new Date(b, S - 1, n - t),
|
|
@@ -1020,122 +1020,122 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1020
1020
|
isCurrentMonth: !1
|
|
1021
1021
|
});
|
|
1022
1022
|
return r;
|
|
1023
|
-
}, [b, S]),
|
|
1024
|
-
e.data.disablePast && t <
|
|
1023
|
+
}, [b, S]), T = te((t) => {
|
|
1024
|
+
e.data.disablePast && t < v || (c ? (n([t.toISOString(), m?.toISOString()]), l(!1)) : (n(p && t < p ? [t.toISOString(), p.toISOString()] : [p?.toISOString(), t.toISOString()]), s(!1), l(!0)));
|
|
1025
1025
|
}, [
|
|
1026
1026
|
e.data.disablePast,
|
|
1027
|
-
|
|
1028
|
-
|
|
1027
|
+
v,
|
|
1028
|
+
c,
|
|
1029
|
+
p,
|
|
1029
1030
|
m,
|
|
1030
|
-
h,
|
|
1031
1031
|
n
|
|
1032
|
-
]),
|
|
1032
|
+
]), E = () => {
|
|
1033
1033
|
S === 0 ? (C(11), x(b - 1)) : C(S - 1);
|
|
1034
|
-
},
|
|
1034
|
+
}, O = () => {
|
|
1035
1035
|
S === 11 ? (C(0), x(b + 1)) : C(S + 1);
|
|
1036
|
-
},
|
|
1037
|
-
if (!(
|
|
1038
|
-
let t =
|
|
1036
|
+
}, M = () => p && m ? `${p.toLocaleDateString()} - ${m.toLocaleDateString()}` : p ? p.toLocaleDateString() : u("renderer.defaultInputs.selectDateRange"), N = (t) => e.data.disablePast ? t < v : !1, P = (e) => p && m ? e >= p && e <= m : !1, ne = (e) => {
|
|
1037
|
+
if (!(p || m)) return !1;
|
|
1038
|
+
let t = p && e.getDate() === p.getDate() && e.getMonth() === p.getMonth() && e.getFullYear() === p.getFullYear(), n = m && e.getDate() === m.getDate() && e.getMonth() === m.getMonth() && e.getFullYear() === m.getFullYear();
|
|
1039
1039
|
return t || n;
|
|
1040
1040
|
};
|
|
1041
|
-
return /* @__PURE__ */ j(
|
|
1041
|
+
return /* @__PURE__ */ j(H, {
|
|
1042
1042
|
style: q.container,
|
|
1043
1043
|
children: [
|
|
1044
1044
|
/* @__PURE__ */ j(z, {
|
|
1045
|
-
style: [q.label, { color:
|
|
1046
|
-
children: [
|
|
1047
|
-
style: { color:
|
|
1045
|
+
style: [q.label, { color: d.textSecondary }],
|
|
1046
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
1047
|
+
style: { color: d.error },
|
|
1048
1048
|
children: "*"
|
|
1049
1049
|
})]
|
|
1050
1050
|
}),
|
|
1051
|
-
/* @__PURE__ */ j(
|
|
1051
|
+
/* @__PURE__ */ j(V, {
|
|
1052
1052
|
style: [
|
|
1053
1053
|
q.trigger,
|
|
1054
1054
|
{
|
|
1055
|
-
backgroundColor:
|
|
1056
|
-
borderColor:
|
|
1055
|
+
backgroundColor: d.input,
|
|
1056
|
+
borderColor: d.border
|
|
1057
1057
|
},
|
|
1058
|
-
|
|
1058
|
+
r && { borderColor: d.error }
|
|
1059
1059
|
],
|
|
1060
|
-
onPress: () =>
|
|
1060
|
+
onPress: () => s(!0),
|
|
1061
1061
|
activeOpacity: .7,
|
|
1062
1062
|
children: [/* @__PURE__ */ A(z, {
|
|
1063
1063
|
style: [
|
|
1064
1064
|
q.triggerText,
|
|
1065
|
-
{ color:
|
|
1066
|
-
!
|
|
1065
|
+
{ color: d.text },
|
|
1066
|
+
!p && { color: d.textMuted }
|
|
1067
1067
|
],
|
|
1068
1068
|
numberOfLines: 1,
|
|
1069
|
-
children:
|
|
1069
|
+
children: M()
|
|
1070
1070
|
}), /* @__PURE__ */ A(z, {
|
|
1071
1071
|
style: q.icon,
|
|
1072
1072
|
children: "📅"
|
|
1073
1073
|
})]
|
|
1074
1074
|
}),
|
|
1075
|
-
/* @__PURE__ */ A(
|
|
1076
|
-
visible:
|
|
1075
|
+
/* @__PURE__ */ A(re, {
|
|
1076
|
+
visible: o,
|
|
1077
1077
|
transparent: !0,
|
|
1078
1078
|
animationType: "fade",
|
|
1079
|
-
onRequestClose: () =>
|
|
1080
|
-
children: /* @__PURE__ */ A(
|
|
1079
|
+
onRequestClose: () => s(!1),
|
|
1080
|
+
children: /* @__PURE__ */ A(V, {
|
|
1081
1081
|
style: q.modalOverlay,
|
|
1082
1082
|
activeOpacity: 1,
|
|
1083
|
-
onPress: () =>
|
|
1084
|
-
children: /* @__PURE__ */ j(
|
|
1085
|
-
style: [q.modalContent, { backgroundColor:
|
|
1083
|
+
onPress: () => s(!1),
|
|
1084
|
+
children: /* @__PURE__ */ j(V, {
|
|
1085
|
+
style: [q.modalContent, { backgroundColor: d.card }],
|
|
1086
1086
|
activeOpacity: 1,
|
|
1087
1087
|
onPress: () => {},
|
|
1088
1088
|
children: [
|
|
1089
|
-
/* @__PURE__ */ j(
|
|
1090
|
-
style: [q.modalHeader, { borderBottomColor:
|
|
1089
|
+
/* @__PURE__ */ j(H, {
|
|
1090
|
+
style: [q.modalHeader, { borderBottomColor: d.separator }],
|
|
1091
1091
|
children: [/* @__PURE__ */ A(z, {
|
|
1092
|
-
style: [q.modalTitle, { color:
|
|
1093
|
-
children:
|
|
1094
|
-
}), /* @__PURE__ */ A(
|
|
1095
|
-
onPress: () =>
|
|
1092
|
+
style: [q.modalTitle, { color: d.text }],
|
|
1093
|
+
children: i || e.data.name
|
|
1094
|
+
}), /* @__PURE__ */ A(V, {
|
|
1095
|
+
onPress: () => s(!1),
|
|
1096
1096
|
children: /* @__PURE__ */ A(z, {
|
|
1097
|
-
style: [q.closeButton, { color:
|
|
1097
|
+
style: [q.closeButton, { color: d.textMuted }],
|
|
1098
1098
|
children: "✕"
|
|
1099
1099
|
})
|
|
1100
1100
|
})]
|
|
1101
1101
|
}),
|
|
1102
|
-
/* @__PURE__ */ A(
|
|
1103
|
-
style: [q.rangeIndicator, { backgroundColor:
|
|
1102
|
+
/* @__PURE__ */ A(H, {
|
|
1103
|
+
style: [q.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
1104
1104
|
children: /* @__PURE__ */ A(z, {
|
|
1105
|
-
style: [q.rangeIndicatorText, { color:
|
|
1106
|
-
children:
|
|
1105
|
+
style: [q.rangeIndicatorText, { color: d.primary }],
|
|
1106
|
+
children: u(c ? "renderer.defaultInputs.startDate" : "renderer.defaultInputs.endDate")
|
|
1107
1107
|
})
|
|
1108
1108
|
}),
|
|
1109
|
-
/* @__PURE__ */ j(
|
|
1109
|
+
/* @__PURE__ */ j(H, {
|
|
1110
1110
|
style: q.calendarHeader,
|
|
1111
1111
|
children: [
|
|
1112
|
-
/* @__PURE__ */ A(
|
|
1113
|
-
onPress:
|
|
1112
|
+
/* @__PURE__ */ A(V, {
|
|
1113
|
+
onPress: E,
|
|
1114
1114
|
style: q.navButton,
|
|
1115
1115
|
children: /* @__PURE__ */ A(z, {
|
|
1116
|
-
style: [q.navButtonText, { color:
|
|
1116
|
+
style: [q.navButtonText, { color: d.primary }],
|
|
1117
1117
|
children: "‹"
|
|
1118
1118
|
})
|
|
1119
1119
|
}),
|
|
1120
1120
|
/* @__PURE__ */ j(z, {
|
|
1121
|
-
style: [q.monthYear, { color:
|
|
1121
|
+
style: [q.monthYear, { color: d.text }],
|
|
1122
1122
|
children: [
|
|
1123
|
-
|
|
1123
|
+
ee[S],
|
|
1124
1124
|
" ",
|
|
1125
1125
|
b
|
|
1126
1126
|
]
|
|
1127
1127
|
}),
|
|
1128
|
-
/* @__PURE__ */ A(
|
|
1129
|
-
onPress:
|
|
1128
|
+
/* @__PURE__ */ A(V, {
|
|
1129
|
+
onPress: O,
|
|
1130
1130
|
style: q.navButton,
|
|
1131
1131
|
children: /* @__PURE__ */ A(z, {
|
|
1132
|
-
style: [q.navButtonText, { color:
|
|
1132
|
+
style: [q.navButtonText, { color: d.primary }],
|
|
1133
1133
|
children: "›"
|
|
1134
1134
|
})
|
|
1135
1135
|
})
|
|
1136
1136
|
]
|
|
1137
1137
|
}),
|
|
1138
|
-
/* @__PURE__ */ A(
|
|
1138
|
+
/* @__PURE__ */ A(H, {
|
|
1139
1139
|
style: q.weekDays,
|
|
1140
1140
|
children: [
|
|
1141
1141
|
"Sun",
|
|
@@ -1146,44 +1146,44 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1146
1146
|
"Fri",
|
|
1147
1147
|
"Sat"
|
|
1148
1148
|
].map((e) => /* @__PURE__ */ A(z, {
|
|
1149
|
-
style: [q.weekDay, { color:
|
|
1149
|
+
style: [q.weekDay, { color: d.textMuted }],
|
|
1150
1150
|
children: e
|
|
1151
1151
|
}, e))
|
|
1152
1152
|
}),
|
|
1153
|
-
/* @__PURE__ */ A(
|
|
1154
|
-
data:
|
|
1153
|
+
/* @__PURE__ */ A(F, {
|
|
1154
|
+
data: w,
|
|
1155
1155
|
keyExtractor: (e, t) => `${e.date.getTime()}-${t}`,
|
|
1156
1156
|
numColumns: 7,
|
|
1157
1157
|
scrollEnabled: !1,
|
|
1158
1158
|
style: q.calendar,
|
|
1159
1159
|
contentContainerStyle: q.calendarContent,
|
|
1160
1160
|
renderItem: ({ item: e }) => {
|
|
1161
|
-
let t =
|
|
1162
|
-
return /* @__PURE__ */ A(
|
|
1161
|
+
let t = N(e.date), n = P(e.date), r = ne(e.date);
|
|
1162
|
+
return /* @__PURE__ */ A(V, {
|
|
1163
1163
|
style: [
|
|
1164
1164
|
q.dayCell,
|
|
1165
1165
|
!e.isCurrentMonth && q.dayCellOtherMonth,
|
|
1166
|
-
n && { backgroundColor:
|
|
1166
|
+
n && { backgroundColor: d.primaryLight },
|
|
1167
1167
|
r && {
|
|
1168
|
-
backgroundColor:
|
|
1168
|
+
backgroundColor: d.primary,
|
|
1169
1169
|
borderRadius: 20
|
|
1170
1170
|
},
|
|
1171
1171
|
t && q.dayCellDisabled
|
|
1172
1172
|
],
|
|
1173
|
-
onPress: () =>
|
|
1173
|
+
onPress: () => T(e.date),
|
|
1174
1174
|
disabled: t,
|
|
1175
1175
|
activeOpacity: .7,
|
|
1176
1176
|
children: /* @__PURE__ */ A(z, {
|
|
1177
1177
|
style: [
|
|
1178
1178
|
q.dayText,
|
|
1179
|
-
{ color:
|
|
1180
|
-
!e.isCurrentMonth && { color:
|
|
1181
|
-
n && { color:
|
|
1179
|
+
{ color: d.text },
|
|
1180
|
+
!e.isCurrentMonth && { color: d.textMuted },
|
|
1181
|
+
n && { color: d.primary },
|
|
1182
1182
|
r && {
|
|
1183
|
-
color:
|
|
1183
|
+
color: d.background,
|
|
1184
1184
|
fontWeight: "600"
|
|
1185
1185
|
},
|
|
1186
|
-
t && { color:
|
|
1186
|
+
t && { color: d.textMuted }
|
|
1187
1187
|
],
|
|
1188
1188
|
children: e.day
|
|
1189
1189
|
})
|
|
@@ -1194,13 +1194,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1194
1194
|
})
|
|
1195
1195
|
})
|
|
1196
1196
|
}),
|
|
1197
|
-
|
|
1198
|
-
style: [q.error, { color:
|
|
1199
|
-
children:
|
|
1197
|
+
r && /* @__PURE__ */ A(z, {
|
|
1198
|
+
style: [q.error, { color: d.error }],
|
|
1199
|
+
children: r
|
|
1200
1200
|
}),
|
|
1201
|
-
|
|
1202
|
-
style: [q.helperText, { color:
|
|
1203
|
-
children:
|
|
1201
|
+
a && !r && /* @__PURE__ */ A(z, {
|
|
1202
|
+
style: [q.helperText, { color: d.textMuted }],
|
|
1203
|
+
children: a
|
|
1204
1204
|
})
|
|
1205
1205
|
]
|
|
1206
1206
|
});
|
|
@@ -1314,133 +1314,133 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1314
1314
|
flexDirection: "row",
|
|
1315
1315
|
marginBottom: 8
|
|
1316
1316
|
}
|
|
1317
|
-
}),
|
|
1318
|
-
let [
|
|
1319
|
-
if (
|
|
1320
|
-
let e = (await
|
|
1317
|
+
}), pe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
1318
|
+
let [o, s] = k(null), [c, l] = k(!0), u = g(), { colors: d } = y(), f = Array.isArray(t) ? t : t ? [t] : [], p = e.data.multiple, m = te(async () => {
|
|
1319
|
+
if (o) try {
|
|
1320
|
+
let e = (await o({ allowMultiSelection: p })).map((e) => ({
|
|
1321
1321
|
data: e.uri,
|
|
1322
1322
|
lastModified: Date.now(),
|
|
1323
1323
|
name: e.name,
|
|
1324
1324
|
size: e.size,
|
|
1325
1325
|
type: e.type || "application/octet-stream"
|
|
1326
1326
|
}));
|
|
1327
|
-
n(
|
|
1327
|
+
n(p ? [...f, ...e] : e[0] || null);
|
|
1328
1328
|
} catch (e) {
|
|
1329
|
-
e.code !== "DOCUMENT_PICKER_CANCELED" && N.alert("Error",
|
|
1329
|
+
e.code !== "DOCUMENT_PICKER_CANCELED" && N.alert("Error", u("renderer.defaultInputs.filePickerError"));
|
|
1330
1330
|
}
|
|
1331
1331
|
}, [
|
|
1332
|
-
|
|
1332
|
+
o,
|
|
1333
|
+
f,
|
|
1333
1334
|
p,
|
|
1334
|
-
m,
|
|
1335
1335
|
n,
|
|
1336
|
-
|
|
1337
|
-
]),
|
|
1338
|
-
let t =
|
|
1336
|
+
u
|
|
1337
|
+
]), h = te((e) => {
|
|
1338
|
+
let t = f.filter((t, n) => n !== e);
|
|
1339
1339
|
n(t.length > 0 ? t : null);
|
|
1340
|
-
}, [
|
|
1340
|
+
}, [f, n]), _ = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1341
1341
|
return E(() => {
|
|
1342
1342
|
(async () => {
|
|
1343
1343
|
try {
|
|
1344
1344
|
let { pick: e } = await import("react-native-document-picker");
|
|
1345
|
-
|
|
1345
|
+
s(() => e);
|
|
1346
1346
|
} catch {
|
|
1347
|
-
|
|
1347
|
+
s(null);
|
|
1348
1348
|
} finally {
|
|
1349
|
-
|
|
1349
|
+
l(!1);
|
|
1350
1350
|
}
|
|
1351
1351
|
})();
|
|
1352
|
-
}, []),
|
|
1352
|
+
}, []), c ? null : o ? /* @__PURE__ */ j(H, {
|
|
1353
1353
|
style: J.container,
|
|
1354
1354
|
children: [
|
|
1355
1355
|
/* @__PURE__ */ j(z, {
|
|
1356
|
-
style: [J.label, { color:
|
|
1357
|
-
children: [
|
|
1358
|
-
style: { color:
|
|
1356
|
+
style: [J.label, { color: d.textSecondary }],
|
|
1357
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
1358
|
+
style: { color: d.error },
|
|
1359
1359
|
children: "*"
|
|
1360
1360
|
})]
|
|
1361
1361
|
}),
|
|
1362
|
-
|
|
1362
|
+
f.length > 0 && /* @__PURE__ */ A(H, {
|
|
1363
1363
|
style: J.filesList,
|
|
1364
|
-
children:
|
|
1364
|
+
children: f.map((e, t) => /* @__PURE__ */ j(H, {
|
|
1365
1365
|
style: [J.fileItem, {
|
|
1366
|
-
backgroundColor:
|
|
1367
|
-
borderColor:
|
|
1366
|
+
backgroundColor: d.card,
|
|
1367
|
+
borderColor: d.separator
|
|
1368
1368
|
}],
|
|
1369
1369
|
children: [
|
|
1370
|
-
/* @__PURE__ */ A(
|
|
1371
|
-
style: [J.fileIcon, { backgroundColor:
|
|
1370
|
+
/* @__PURE__ */ A(H, {
|
|
1371
|
+
style: [J.fileIcon, { backgroundColor: d.muted }],
|
|
1372
1372
|
children: /* @__PURE__ */ A(z, {
|
|
1373
1373
|
style: J.fileIconText,
|
|
1374
1374
|
children: "📄"
|
|
1375
1375
|
})
|
|
1376
1376
|
}),
|
|
1377
|
-
/* @__PURE__ */ j(
|
|
1377
|
+
/* @__PURE__ */ j(H, {
|
|
1378
1378
|
style: J.fileInfo,
|
|
1379
1379
|
children: [/* @__PURE__ */ A(z, {
|
|
1380
|
-
style: [J.fileName, { color:
|
|
1380
|
+
style: [J.fileName, { color: d.text }],
|
|
1381
1381
|
numberOfLines: 1,
|
|
1382
1382
|
children: e.name
|
|
1383
1383
|
}), e.size > 0 && /* @__PURE__ */ A(z, {
|
|
1384
|
-
style: [J.fileSize, { color:
|
|
1385
|
-
children:
|
|
1384
|
+
style: [J.fileSize, { color: d.textMuted }],
|
|
1385
|
+
children: _(e.size)
|
|
1386
1386
|
})]
|
|
1387
1387
|
}),
|
|
1388
|
-
/* @__PURE__ */ A(
|
|
1388
|
+
/* @__PURE__ */ A(V, {
|
|
1389
1389
|
style: J.removeButton,
|
|
1390
|
-
onPress: () =>
|
|
1390
|
+
onPress: () => h(t),
|
|
1391
1391
|
activeOpacity: .7,
|
|
1392
1392
|
children: /* @__PURE__ */ A(z, {
|
|
1393
|
-
style: [J.removeButtonText, { color:
|
|
1393
|
+
style: [J.removeButtonText, { color: d.textMuted }],
|
|
1394
1394
|
children: "✕"
|
|
1395
1395
|
})
|
|
1396
1396
|
})
|
|
1397
1397
|
]
|
|
1398
1398
|
}, `${e.name}-${t}`))
|
|
1399
1399
|
}),
|
|
1400
|
-
/* @__PURE__ */ A(
|
|
1400
|
+
/* @__PURE__ */ A(V, {
|
|
1401
1401
|
style: [J.pickButton, {
|
|
1402
|
-
backgroundColor:
|
|
1403
|
-
borderColor:
|
|
1402
|
+
backgroundColor: d.input,
|
|
1403
|
+
borderColor: d.border
|
|
1404
1404
|
}],
|
|
1405
|
-
onPress:
|
|
1405
|
+
onPress: m,
|
|
1406
1406
|
activeOpacity: .7,
|
|
1407
1407
|
children: /* @__PURE__ */ A(z, {
|
|
1408
|
-
style: [J.pickButtonText, { color:
|
|
1409
|
-
children:
|
|
1408
|
+
style: [J.pickButtonText, { color: d.textMuted }],
|
|
1409
|
+
children: f.length === 0 ? u(p ? "renderer.defaultInputs.selectFiles" : "renderer.defaultInputs.selectFile") : u(p ? "renderer.defaultInputs.addMoreFiles" : "renderer.defaultInputs.replaceFile")
|
|
1410
1410
|
})
|
|
1411
1411
|
}),
|
|
1412
|
-
|
|
1413
|
-
style: [J.error, { color:
|
|
1414
|
-
children:
|
|
1412
|
+
r && /* @__PURE__ */ A(z, {
|
|
1413
|
+
style: [J.error, { color: d.error }],
|
|
1414
|
+
children: r
|
|
1415
1415
|
}),
|
|
1416
|
-
|
|
1417
|
-
style: [J.helperText, { color:
|
|
1418
|
-
children:
|
|
1416
|
+
a && !r && /* @__PURE__ */ A(z, {
|
|
1417
|
+
style: [J.helperText, { color: d.textMuted }],
|
|
1418
|
+
children: a
|
|
1419
1419
|
})
|
|
1420
1420
|
]
|
|
1421
|
-
}) : /* @__PURE__ */ j(
|
|
1421
|
+
}) : /* @__PURE__ */ j(H, {
|
|
1422
1422
|
style: J.container,
|
|
1423
1423
|
children: [
|
|
1424
1424
|
/* @__PURE__ */ j(z, {
|
|
1425
|
-
style: [J.label, { color:
|
|
1426
|
-
children: [
|
|
1427
|
-
style: { color:
|
|
1425
|
+
style: [J.label, { color: d.textSecondary }],
|
|
1426
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
1427
|
+
style: { color: d.error },
|
|
1428
1428
|
children: "*"
|
|
1429
1429
|
})]
|
|
1430
1430
|
}),
|
|
1431
|
-
/* @__PURE__ */ A(
|
|
1431
|
+
/* @__PURE__ */ A(H, {
|
|
1432
1432
|
style: [J.unavailableContainer, {
|
|
1433
|
-
backgroundColor:
|
|
1434
|
-
borderColor:
|
|
1433
|
+
backgroundColor: d.errorLight,
|
|
1434
|
+
borderColor: d.error
|
|
1435
1435
|
}],
|
|
1436
1436
|
children: /* @__PURE__ */ A(z, {
|
|
1437
|
-
style: [J.unavailableText, { color:
|
|
1438
|
-
children:
|
|
1437
|
+
style: [J.unavailableText, { color: d.error }],
|
|
1438
|
+
children: u("renderer.defaultInputs.filePickerUnavailable")
|
|
1439
1439
|
})
|
|
1440
1440
|
}),
|
|
1441
|
-
|
|
1442
|
-
style: [J.helperText, { color:
|
|
1443
|
-
children:
|
|
1441
|
+
a && /* @__PURE__ */ A(z, {
|
|
1442
|
+
style: [J.helperText, { color: d.textMuted }],
|
|
1443
|
+
children: a
|
|
1444
1444
|
})
|
|
1445
1445
|
]
|
|
1446
1446
|
});
|
|
@@ -1513,146 +1513,149 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1513
1513
|
fontSize: 12,
|
|
1514
1514
|
textAlign: "center"
|
|
1515
1515
|
}
|
|
1516
|
-
}),
|
|
1517
|
-
if (n >
|
|
1516
|
+
}), me = (e) => null, he = (e) => e.replace(/<[^>]*>/g, ""), ge = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), _e = (e, t = {}) => e == null || e === "" ? "" : ge(he(String(e))), ve = 100, ye = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1517
|
+
if (n > ve) return console.warn(`sanitizeHttpResponse: Maximum depth (${ve}) exceeded.`), typeof e == "string" ? _e(e, t) : "[Max Depth Exceeded]";
|
|
1518
1518
|
if (e == null) return e;
|
|
1519
|
-
if (typeof e == "string") return
|
|
1520
|
-
if (Array.isArray(e)) return e.map((e) =>
|
|
1519
|
+
if (typeof e == "string") return _e(e, t);
|
|
1520
|
+
if (Array.isArray(e)) return e.map((e) => ye(e, t, n + 1, r));
|
|
1521
1521
|
if (typeof e == "object") {
|
|
1522
1522
|
if (r.has(e)) return console.warn("sanitizeHttpResponse: Circular reference detected. Breaking cycle to prevent infinite recursion."), "[Circular Reference]";
|
|
1523
1523
|
r.add(e);
|
|
1524
1524
|
let i = {};
|
|
1525
|
-
for (let [a, o] of Object.entries(e)) i[a] =
|
|
1525
|
+
for (let [a, o] of Object.entries(e)) i[a] = ye(o, t, n + 1, r);
|
|
1526
1526
|
return r.delete(e), i;
|
|
1527
1527
|
}
|
|
1528
1528
|
return e;
|
|
1529
|
-
},
|
|
1529
|
+
}, be = (e) => {
|
|
1530
1530
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1531
1531
|
return Array.from(t, (e) => e[1]);
|
|
1532
|
-
},
|
|
1532
|
+
}, xe = (e, t) => be(e).every((e) => {
|
|
1533
1533
|
let n = t[e];
|
|
1534
1534
|
return n != null && n !== "";
|
|
1535
|
-
}),
|
|
1535
|
+
}), Se = (e, t, n = !1) => e.replace(/{{([\w-]+)}}/g, (e, r) => {
|
|
1536
1536
|
let i = t[r], a = i == null ? "" : String(i);
|
|
1537
1537
|
return n ? encodeURIComponent(a) : a;
|
|
1538
|
-
}),
|
|
1539
|
-
let [
|
|
1538
|
+
}), Ce = ({ node: n, value: i, setValue: a, error: c, label: l, placeholder: u, helperText: d, id: f, name: p }) => {
|
|
1539
|
+
let [h, _] = k(!1), [v, b] = k(null), [x, S] = k([]), [C, ee] = k(""), [w, T] = k(!1), { formValues: N, inputNodes: P, headers: ne } = r(), { colors: I } = y(), { httpConfig: L } = n.data, R = g(), ie = O(!1), ae = O(""), oe = O(L), se = O(N), ce = O(P), U = O(ne), le = O(a), W = O(null), ue = O(null), G = D(() => L?.url ? be(L.url) : [], [L?.url]), de = G.length > 0, K = D(() => G.map((e) => `${e}:${String(N[e] ?? "")}`).join("|"), [G, N]), fe = D(() => L?.url ? de ? xe(L.url, N) : !0 : !1, [
|
|
1540
1540
|
L?.url,
|
|
1541
|
-
|
|
1541
|
+
de,
|
|
1542
1542
|
N
|
|
1543
|
-
]), q =
|
|
1544
|
-
|
|
1545
|
-
let
|
|
1546
|
-
|
|
1547
|
-
let
|
|
1548
|
-
if (!
|
|
1549
|
-
|
|
1543
|
+
]), q = te(async (n) => {
|
|
1544
|
+
ue.current && ue.current.abort();
|
|
1545
|
+
let r = new AbortController();
|
|
1546
|
+
ue.current = r;
|
|
1547
|
+
let i = oe.current, a = se.current, s = le.current;
|
|
1548
|
+
if (!i?.url) {
|
|
1549
|
+
b(R("renderer.defaultHttpInput.noUrlConfigured")), ue.current = null;
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
|
-
if (
|
|
1553
|
-
|
|
1552
|
+
if (i.url && !xe(i.url, a)) {
|
|
1553
|
+
ue.current = null;
|
|
1554
1554
|
return;
|
|
1555
1555
|
}
|
|
1556
|
-
|
|
1556
|
+
_(!0), b(null);
|
|
1557
1557
|
try {
|
|
1558
|
-
let
|
|
1558
|
+
let c = Se(i.url, a, !0), l = e(i.searchParam && n ? `${c}${c.includes("?") ? "&" : "?"}${i.searchParam}=${encodeURIComponent(n)}` : c, i.queryParams?.map((e) => ({
|
|
1559
|
+
key: e.key,
|
|
1560
|
+
value: Se(e.value, a)
|
|
1561
|
+
}))), u = (e) => ({
|
|
1559
1562
|
key: e.key,
|
|
1560
|
-
value:
|
|
1561
|
-
}),
|
|
1563
|
+
value: Se(e.value, a)
|
|
1564
|
+
}), d = t([{
|
|
1562
1565
|
key: "Content-Type",
|
|
1563
1566
|
value: "application/json"
|
|
1564
|
-
}],
|
|
1567
|
+
}], U.current?.map(u), i.headers?.map(u)), f = [
|
|
1565
1568
|
"POST",
|
|
1566
1569
|
"PUT",
|
|
1567
1570
|
"PATCH"
|
|
1568
|
-
].includes(
|
|
1569
|
-
body:
|
|
1570
|
-
headers: Object.fromEntries(
|
|
1571
|
-
method:
|
|
1572
|
-
signal:
|
|
1571
|
+
].includes(i.method || "") ? i.sendAllFormValues ? JSON.stringify(m(a, ce.current)) : i.body ? Se(i.body, a) : void 0 : void 0, p = setTimeout(() => r.abort(), 3e4), h = await fetch(l, {
|
|
1572
|
+
body: f || void 0,
|
|
1573
|
+
headers: Object.fromEntries(d.filter((e) => e.key && e.value).map((e) => [e.key, e.value])),
|
|
1574
|
+
method: i.method || "GET",
|
|
1575
|
+
signal: r.signal
|
|
1573
1576
|
});
|
|
1574
|
-
if (clearTimeout(
|
|
1575
|
-
|
|
1577
|
+
if (clearTimeout(p), !h.ok) {
|
|
1578
|
+
b(`HTTP Error ${h.status}: ${h.statusText}`), _(!1);
|
|
1576
1579
|
return;
|
|
1577
1580
|
}
|
|
1578
|
-
let
|
|
1579
|
-
if (
|
|
1580
|
-
let { valueField: e = "value", labelField: t = "label" } =
|
|
1581
|
-
|
|
1582
|
-
label: String(
|
|
1583
|
-
value: String(
|
|
1581
|
+
let g = ye(await h.json()), v = i.responsePath ? o(g, i.responsePath) : g;
|
|
1582
|
+
if (i.responseMapping && Array.isArray(v)) {
|
|
1583
|
+
let { valueField: e = "value", labelField: t = "label" } = i.responseMapping;
|
|
1584
|
+
S(v.map((n) => ({
|
|
1585
|
+
label: String(o(n, t) || ""),
|
|
1586
|
+
value: String(o(n, e) || "")
|
|
1584
1587
|
})));
|
|
1585
|
-
} else
|
|
1588
|
+
} else s(typeof v == "string" ? v : JSON.stringify(v));
|
|
1586
1589
|
} catch (e) {
|
|
1587
1590
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1588
|
-
|
|
1591
|
+
b(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1589
1592
|
} finally {
|
|
1590
|
-
|
|
1593
|
+
_(!1), ue.current = null;
|
|
1591
1594
|
}
|
|
1592
1595
|
}, [R]);
|
|
1593
1596
|
if (E(() => {
|
|
1594
|
-
oe.current = L, se.current = N, ce.current = P,
|
|
1597
|
+
oe.current = L, se.current = N, ce.current = P, U.current = ne, le.current = a, W.current = q;
|
|
1595
1598
|
}, [
|
|
1596
1599
|
L,
|
|
1597
1600
|
N,
|
|
1598
1601
|
P,
|
|
1599
|
-
|
|
1600
|
-
|
|
1602
|
+
ne,
|
|
1603
|
+
a,
|
|
1601
1604
|
q
|
|
1602
1605
|
]), E(() => () => {
|
|
1603
|
-
|
|
1606
|
+
ue.current && ue.current.abort(), ie.current = !1;
|
|
1604
1607
|
}, []), E(() => {
|
|
1605
1608
|
if (ie.current) return;
|
|
1606
1609
|
ie.current = !0;
|
|
1607
|
-
let e = oe.current, t = se.current, n =
|
|
1608
|
-
e?.fetchOnMount && r && n && (n(), e.url && (ae.current =
|
|
1610
|
+
let e = oe.current, t = se.current, n = W.current, r = e?.url && xe(e.url, t);
|
|
1611
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ae.current = be(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1609
1612
|
}, []), E(() => {
|
|
1610
|
-
if (!ie.current || !
|
|
1613
|
+
if (!ie.current || !de || ae.current === K || !fe) return;
|
|
1611
1614
|
let e = setTimeout(() => {
|
|
1612
1615
|
q(), ae.current = K;
|
|
1613
1616
|
}, 500);
|
|
1614
1617
|
return () => clearTimeout(e);
|
|
1615
1618
|
}, [
|
|
1616
1619
|
K,
|
|
1617
|
-
ue,
|
|
1618
1620
|
de,
|
|
1621
|
+
fe,
|
|
1619
1622
|
q
|
|
1620
1623
|
]), E(() => {
|
|
1621
|
-
if (!(L?.searchParam &&
|
|
1624
|
+
if (!(L?.searchParam && C)) return;
|
|
1622
1625
|
let e = setTimeout(() => {
|
|
1623
|
-
q(
|
|
1626
|
+
q(C);
|
|
1624
1627
|
}, 300);
|
|
1625
1628
|
return () => clearTimeout(e);
|
|
1626
1629
|
}, [
|
|
1627
|
-
|
|
1630
|
+
C,
|
|
1628
1631
|
L?.searchParam,
|
|
1629
1632
|
q
|
|
1630
1633
|
]), L?.responseMapping) {
|
|
1631
|
-
let e = Array.isArray(i) ? i[0] : i,
|
|
1634
|
+
let e = Array.isArray(i) ? i[0] : i, t = x.find((t) => t.value === e);
|
|
1632
1635
|
if (L.searchParam) {
|
|
1633
|
-
let r =
|
|
1634
|
-
return /* @__PURE__ */ j(
|
|
1636
|
+
let r = h && L?.showLoading;
|
|
1637
|
+
return /* @__PURE__ */ j(H, {
|
|
1635
1638
|
style: Y.container,
|
|
1636
1639
|
children: [
|
|
1637
1640
|
/* @__PURE__ */ j(z, {
|
|
1638
1641
|
style: [Y.label, { color: I.textSecondary }],
|
|
1639
|
-
children: [
|
|
1642
|
+
children: [l || n.data.name, n.data.required && /* @__PURE__ */ A(z, {
|
|
1640
1643
|
style: { color: I.error },
|
|
1641
1644
|
children: "*"
|
|
1642
1645
|
})]
|
|
1643
1646
|
}),
|
|
1644
|
-
/* @__PURE__ */ j(
|
|
1647
|
+
/* @__PURE__ */ j(V, {
|
|
1645
1648
|
style: [
|
|
1646
1649
|
Y.trigger,
|
|
1647
1650
|
{
|
|
1648
1651
|
backgroundColor: I.input,
|
|
1649
1652
|
borderColor: I.border
|
|
1650
1653
|
},
|
|
1651
|
-
|
|
1654
|
+
c && { borderColor: I.error }
|
|
1652
1655
|
],
|
|
1653
1656
|
onPress: () => T(!0),
|
|
1654
1657
|
activeOpacity: .7,
|
|
1655
|
-
children: [r ? /* @__PURE__ */ j(
|
|
1658
|
+
children: [r ? /* @__PURE__ */ j(H, {
|
|
1656
1659
|
style: Y.loadingTrigger,
|
|
1657
1660
|
children: [/* @__PURE__ */ A(M, {
|
|
1658
1661
|
size: "small",
|
|
@@ -1660,41 +1663,41 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1660
1663
|
}), /* @__PURE__ */ A(z, {
|
|
1661
1664
|
style: [Y.triggerText, { color: I.textMuted }],
|
|
1662
1665
|
numberOfLines: 1,
|
|
1663
|
-
children:
|
|
1666
|
+
children: t?.label || u || R("renderer.defaultHttpInput.search")
|
|
1664
1667
|
})]
|
|
1665
1668
|
}) : /* @__PURE__ */ A(z, {
|
|
1666
1669
|
style: [
|
|
1667
1670
|
Y.triggerText,
|
|
1668
1671
|
{ color: I.text },
|
|
1669
|
-
!
|
|
1672
|
+
!t && { color: I.textMuted }
|
|
1670
1673
|
],
|
|
1671
1674
|
numberOfLines: 1,
|
|
1672
|
-
children:
|
|
1675
|
+
children: t?.label || u || R("renderer.defaultHttpInput.search")
|
|
1673
1676
|
}), /* @__PURE__ */ A(z, {
|
|
1674
1677
|
style: [Y.arrow, { color: I.textMuted }],
|
|
1675
1678
|
children: "▼"
|
|
1676
1679
|
})]
|
|
1677
1680
|
}),
|
|
1678
|
-
/* @__PURE__ */ A(
|
|
1679
|
-
visible:
|
|
1681
|
+
/* @__PURE__ */ A(re, {
|
|
1682
|
+
visible: w,
|
|
1680
1683
|
transparent: !0,
|
|
1681
1684
|
animationType: "fade",
|
|
1682
1685
|
onRequestClose: () => T(!1),
|
|
1683
|
-
children: /* @__PURE__ */ A(
|
|
1686
|
+
children: /* @__PURE__ */ A(V, {
|
|
1684
1687
|
style: Y.modalOverlay,
|
|
1685
1688
|
activeOpacity: 1,
|
|
1686
1689
|
onPress: () => T(!1),
|
|
1687
|
-
children: /* @__PURE__ */ j(
|
|
1690
|
+
children: /* @__PURE__ */ j(V, {
|
|
1688
1691
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1689
1692
|
activeOpacity: 1,
|
|
1690
1693
|
onPress: () => {},
|
|
1691
1694
|
children: [
|
|
1692
|
-
/* @__PURE__ */ j(
|
|
1695
|
+
/* @__PURE__ */ j(H, {
|
|
1693
1696
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1694
1697
|
children: [/* @__PURE__ */ A(z, {
|
|
1695
1698
|
style: [Y.modalTitle, { color: I.text }],
|
|
1696
|
-
children:
|
|
1697
|
-
}), /* @__PURE__ */ A(
|
|
1699
|
+
children: l || n.data.name
|
|
1700
|
+
}), /* @__PURE__ */ A(V, {
|
|
1698
1701
|
onPress: () => T(!1),
|
|
1699
1702
|
children: /* @__PURE__ */ A(z, {
|
|
1700
1703
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
@@ -1702,9 +1705,9 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1702
1705
|
})
|
|
1703
1706
|
})]
|
|
1704
1707
|
}),
|
|
1705
|
-
/* @__PURE__ */ A(
|
|
1708
|
+
/* @__PURE__ */ A(H, {
|
|
1706
1709
|
style: Y.searchContainer,
|
|
1707
|
-
children: /* @__PURE__ */ A(
|
|
1710
|
+
children: /* @__PURE__ */ A(B, {
|
|
1708
1711
|
style: [Y.searchInput, {
|
|
1709
1712
|
backgroundColor: I.muted,
|
|
1710
1713
|
borderColor: I.border,
|
|
@@ -1712,40 +1715,40 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1712
1715
|
}],
|
|
1713
1716
|
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1714
1717
|
placeholderTextColor: I.textMuted,
|
|
1715
|
-
value:
|
|
1718
|
+
value: C,
|
|
1716
1719
|
onChangeText: (e) => {
|
|
1717
|
-
|
|
1720
|
+
ee(e), b(null);
|
|
1718
1721
|
},
|
|
1719
1722
|
autoFocus: !0,
|
|
1720
1723
|
autoCapitalize: "none",
|
|
1721
1724
|
autoCorrect: !1
|
|
1722
1725
|
})
|
|
1723
1726
|
}),
|
|
1724
|
-
|
|
1727
|
+
h ? /* @__PURE__ */ A(H, {
|
|
1725
1728
|
style: Y.loadingContainer,
|
|
1726
1729
|
children: /* @__PURE__ */ A(M, {
|
|
1727
1730
|
size: "small",
|
|
1728
1731
|
color: I.primary
|
|
1729
1732
|
})
|
|
1730
|
-
}) :
|
|
1733
|
+
}) : v ? /* @__PURE__ */ j(H, {
|
|
1731
1734
|
style: Y.errorContainer,
|
|
1732
1735
|
children: [/* @__PURE__ */ A(z, {
|
|
1733
1736
|
style: [Y.errorText, { color: I.error }],
|
|
1734
|
-
children:
|
|
1735
|
-
}), /* @__PURE__ */ A(
|
|
1736
|
-
onPress: () => q(
|
|
1737
|
+
children: v
|
|
1738
|
+
}), /* @__PURE__ */ A(V, {
|
|
1739
|
+
onPress: () => q(C),
|
|
1737
1740
|
style: Y.retryButton,
|
|
1738
1741
|
children: /* @__PURE__ */ A(z, {
|
|
1739
1742
|
style: [Y.retryButtonText, { color: I.primary }],
|
|
1740
1743
|
children: R("renderer.defaultHttpInput.retry")
|
|
1741
1744
|
})
|
|
1742
1745
|
})]
|
|
1743
|
-
}) : /* @__PURE__ */ A(
|
|
1744
|
-
data:
|
|
1746
|
+
}) : /* @__PURE__ */ A(F, {
|
|
1747
|
+
data: x,
|
|
1745
1748
|
keyExtractor: (e) => e.value,
|
|
1746
1749
|
style: Y.optionsList,
|
|
1747
1750
|
contentContainerStyle: Y.optionsListContent,
|
|
1748
|
-
ListEmptyComponent: /* @__PURE__ */ A(
|
|
1751
|
+
ListEmptyComponent: /* @__PURE__ */ A(H, {
|
|
1749
1752
|
style: Y.emptyContainer,
|
|
1750
1753
|
children: /* @__PURE__ */ A(z, {
|
|
1751
1754
|
style: [Y.emptyText, { color: I.textMuted }],
|
|
@@ -1754,10 +1757,10 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1754
1757
|
}),
|
|
1755
1758
|
renderItem: ({ item: t }) => {
|
|
1756
1759
|
let n = t.value === e;
|
|
1757
|
-
return /* @__PURE__ */ j(
|
|
1760
|
+
return /* @__PURE__ */ j(V, {
|
|
1758
1761
|
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1759
1762
|
onPress: () => {
|
|
1760
|
-
|
|
1763
|
+
a(t.value), T(!1);
|
|
1761
1764
|
},
|
|
1762
1765
|
activeOpacity: .7,
|
|
1763
1766
|
children: [/* @__PURE__ */ A(z, {
|
|
@@ -1774,43 +1777,43 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1774
1777
|
})
|
|
1775
1778
|
})
|
|
1776
1779
|
}),
|
|
1777
|
-
|
|
1780
|
+
c && /* @__PURE__ */ A(z, {
|
|
1778
1781
|
style: [Y.error, { color: I.error }],
|
|
1779
|
-
children:
|
|
1782
|
+
children: c
|
|
1780
1783
|
}),
|
|
1781
|
-
|
|
1784
|
+
d && !c && /* @__PURE__ */ A(z, {
|
|
1782
1785
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1783
|
-
children:
|
|
1786
|
+
children: d
|
|
1784
1787
|
})
|
|
1785
1788
|
]
|
|
1786
1789
|
});
|
|
1787
1790
|
}
|
|
1788
|
-
let r =
|
|
1791
|
+
let r = h && L?.showLoading, o = G.filter((e) => {
|
|
1789
1792
|
let t = N[e];
|
|
1790
1793
|
return t == null || t === "";
|
|
1791
|
-
}), f =
|
|
1792
|
-
return /* @__PURE__ */ j(
|
|
1794
|
+
}), f = o.map((e) => s(e, P) || e), p = x.length === 0 && !r ? v || (o.length > 0 ? `${R("renderer.defaultHttpInput.waitingForRequiredFields")}: ${f.join(", ")}` : R("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1795
|
+
return /* @__PURE__ */ j(H, {
|
|
1793
1796
|
style: Y.container,
|
|
1794
1797
|
children: [
|
|
1795
1798
|
/* @__PURE__ */ j(z, {
|
|
1796
1799
|
style: [Y.label, { color: I.textSecondary }],
|
|
1797
|
-
children: [
|
|
1800
|
+
children: [l || n.data.name, n.data.required && /* @__PURE__ */ A(z, {
|
|
1798
1801
|
style: { color: I.error },
|
|
1799
1802
|
children: "*"
|
|
1800
1803
|
})]
|
|
1801
1804
|
}),
|
|
1802
|
-
/* @__PURE__ */ j(
|
|
1805
|
+
/* @__PURE__ */ j(V, {
|
|
1803
1806
|
style: [
|
|
1804
1807
|
Y.trigger,
|
|
1805
1808
|
{
|
|
1806
1809
|
backgroundColor: I.input,
|
|
1807
1810
|
borderColor: I.border
|
|
1808
1811
|
},
|
|
1809
|
-
|
|
1810
|
-
(r ||
|
|
1812
|
+
c && { borderColor: I.error },
|
|
1813
|
+
(r || x.length === 0) && { backgroundColor: I.muted }
|
|
1811
1814
|
],
|
|
1812
1815
|
onPress: () => T(!0),
|
|
1813
|
-
disabled: r ||
|
|
1816
|
+
disabled: r || x.length === 0,
|
|
1814
1817
|
activeOpacity: .7,
|
|
1815
1818
|
children: [
|
|
1816
1819
|
r && /* @__PURE__ */ A(M, {
|
|
@@ -1822,10 +1825,10 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1822
1825
|
style: [
|
|
1823
1826
|
Y.triggerText,
|
|
1824
1827
|
{ color: I.text },
|
|
1825
|
-
!
|
|
1828
|
+
!t && { color: I.textMuted }
|
|
1826
1829
|
],
|
|
1827
1830
|
numberOfLines: 1,
|
|
1828
|
-
children:
|
|
1831
|
+
children: t?.label || u || R("renderer.defaultHttpInput.selectOption")
|
|
1829
1832
|
}),
|
|
1830
1833
|
/* @__PURE__ */ A(z, {
|
|
1831
1834
|
style: [Y.arrow, { color: I.textMuted }],
|
|
@@ -1837,42 +1840,42 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1837
1840
|
style: [Y.disabledMessage, { color: I.error }],
|
|
1838
1841
|
children: p
|
|
1839
1842
|
}),
|
|
1840
|
-
/* @__PURE__ */ A(
|
|
1841
|
-
visible:
|
|
1843
|
+
/* @__PURE__ */ A(re, {
|
|
1844
|
+
visible: w,
|
|
1842
1845
|
transparent: !0,
|
|
1843
1846
|
animationType: "fade",
|
|
1844
1847
|
onRequestClose: () => T(!1),
|
|
1845
|
-
children: /* @__PURE__ */ A(
|
|
1848
|
+
children: /* @__PURE__ */ A(V, {
|
|
1846
1849
|
style: Y.modalOverlay,
|
|
1847
1850
|
activeOpacity: 1,
|
|
1848
1851
|
onPress: () => T(!1),
|
|
1849
|
-
children: /* @__PURE__ */ j(
|
|
1852
|
+
children: /* @__PURE__ */ j(V, {
|
|
1850
1853
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1851
1854
|
activeOpacity: 1,
|
|
1852
1855
|
onPress: () => {},
|
|
1853
|
-
children: [/* @__PURE__ */ j(
|
|
1856
|
+
children: [/* @__PURE__ */ j(H, {
|
|
1854
1857
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1855
1858
|
children: [/* @__PURE__ */ A(z, {
|
|
1856
1859
|
style: [Y.modalTitle, { color: I.text }],
|
|
1857
|
-
children:
|
|
1858
|
-
}), /* @__PURE__ */ A(
|
|
1860
|
+
children: l || n.data.name
|
|
1861
|
+
}), /* @__PURE__ */ A(V, {
|
|
1859
1862
|
onPress: () => T(!1),
|
|
1860
1863
|
children: /* @__PURE__ */ A(z, {
|
|
1861
1864
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
1862
1865
|
children: "✕"
|
|
1863
1866
|
})
|
|
1864
1867
|
})]
|
|
1865
|
-
}), /* @__PURE__ */ A(
|
|
1866
|
-
data:
|
|
1868
|
+
}), /* @__PURE__ */ A(F, {
|
|
1869
|
+
data: x,
|
|
1867
1870
|
keyExtractor: (e) => e.value,
|
|
1868
1871
|
style: Y.optionsList,
|
|
1869
1872
|
contentContainerStyle: Y.optionsListContent,
|
|
1870
1873
|
renderItem: ({ item: t }) => {
|
|
1871
1874
|
let n = t.value === e;
|
|
1872
|
-
return /* @__PURE__ */ j(
|
|
1875
|
+
return /* @__PURE__ */ j(V, {
|
|
1873
1876
|
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1874
1877
|
onPress: () => {
|
|
1875
|
-
|
|
1878
|
+
a(t.value), T(!1);
|
|
1876
1879
|
},
|
|
1877
1880
|
activeOpacity: .7,
|
|
1878
1881
|
children: [/* @__PURE__ */ A(z, {
|
|
@@ -1888,28 +1891,28 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1888
1891
|
})
|
|
1889
1892
|
})
|
|
1890
1893
|
}),
|
|
1891
|
-
|
|
1894
|
+
c && /* @__PURE__ */ A(z, {
|
|
1892
1895
|
style: [Y.error, { color: I.error }],
|
|
1893
|
-
children:
|
|
1896
|
+
children: c
|
|
1894
1897
|
}),
|
|
1895
|
-
|
|
1898
|
+
d && !c && /* @__PURE__ */ A(z, {
|
|
1896
1899
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1897
|
-
children:
|
|
1900
|
+
children: d
|
|
1898
1901
|
})
|
|
1899
1902
|
]
|
|
1900
1903
|
});
|
|
1901
1904
|
}
|
|
1902
|
-
return /* @__PURE__ */ j(
|
|
1905
|
+
return /* @__PURE__ */ j(H, {
|
|
1903
1906
|
style: Y.container,
|
|
1904
1907
|
children: [
|
|
1905
1908
|
/* @__PURE__ */ j(z, {
|
|
1906
1909
|
style: [Y.label, { color: I.textSecondary }],
|
|
1907
|
-
children: [
|
|
1910
|
+
children: [l || n.data.name, n.data.required && /* @__PURE__ */ A(z, {
|
|
1908
1911
|
style: { color: I.error },
|
|
1909
1912
|
children: "*"
|
|
1910
1913
|
})]
|
|
1911
1914
|
}),
|
|
1912
|
-
/* @__PURE__ */ A(
|
|
1915
|
+
/* @__PURE__ */ A(B, {
|
|
1913
1916
|
style: [Y.input, {
|
|
1914
1917
|
backgroundColor: I.muted,
|
|
1915
1918
|
borderColor: I.border,
|
|
@@ -1918,13 +1921,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1918
1921
|
value: typeof i == "string" ? i : JSON.stringify(i),
|
|
1919
1922
|
editable: !1
|
|
1920
1923
|
}),
|
|
1921
|
-
|
|
1924
|
+
c && /* @__PURE__ */ A(z, {
|
|
1922
1925
|
style: [Y.error, { color: I.error }],
|
|
1923
|
-
children:
|
|
1926
|
+
children: c
|
|
1924
1927
|
}),
|
|
1925
|
-
|
|
1928
|
+
d && !c && /* @__PURE__ */ A(z, {
|
|
1926
1929
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1927
|
-
children:
|
|
1930
|
+
children: d
|
|
1928
1931
|
})
|
|
1929
1932
|
]
|
|
1930
1933
|
});
|
|
@@ -2054,23 +2057,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2054
2057
|
flex: 1,
|
|
2055
2058
|
fontSize: 14
|
|
2056
2059
|
}
|
|
2057
|
-
}),
|
|
2058
|
-
let { colors: c } =
|
|
2060
|
+
}), we = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2061
|
+
let { colors: c } = y(), [l, u] = k(t?.toString() ?? "");
|
|
2059
2062
|
return E(() => {
|
|
2060
2063
|
u(t?.toString() ?? "");
|
|
2061
|
-
}, [t]), /* @__PURE__ */ j(
|
|
2062
|
-
style:
|
|
2064
|
+
}, [t]), /* @__PURE__ */ j(H, {
|
|
2065
|
+
style: Te.container,
|
|
2063
2066
|
children: [
|
|
2064
2067
|
/* @__PURE__ */ j(z, {
|
|
2065
|
-
style: [
|
|
2068
|
+
style: [Te.label, { color: c.textSecondary }],
|
|
2066
2069
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2067
2070
|
style: { color: c.error },
|
|
2068
2071
|
children: "*"
|
|
2069
2072
|
})]
|
|
2070
2073
|
}),
|
|
2071
|
-
/* @__PURE__ */ A(
|
|
2074
|
+
/* @__PURE__ */ A(B, {
|
|
2072
2075
|
style: [
|
|
2073
|
-
|
|
2076
|
+
Te.input,
|
|
2074
2077
|
{
|
|
2075
2078
|
backgroundColor: c.input,
|
|
2076
2079
|
borderColor: c.border,
|
|
@@ -2093,16 +2096,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2093
2096
|
accessibilityLabel: s
|
|
2094
2097
|
}),
|
|
2095
2098
|
r && /* @__PURE__ */ A(z, {
|
|
2096
|
-
style: [
|
|
2099
|
+
style: [Te.error, { color: c.error }],
|
|
2097
2100
|
children: r
|
|
2098
2101
|
}),
|
|
2099
2102
|
o && !r && /* @__PURE__ */ A(z, {
|
|
2100
|
-
style: [
|
|
2103
|
+
style: [Te.helperText, { color: c.textMuted }],
|
|
2101
2104
|
children: o
|
|
2102
2105
|
})
|
|
2103
2106
|
]
|
|
2104
2107
|
});
|
|
2105
|
-
},
|
|
2108
|
+
}, Te = L.create({
|
|
2106
2109
|
container: { marginBottom: 16 },
|
|
2107
2110
|
error: {
|
|
2108
2111
|
fontSize: 12,
|
|
@@ -2124,23 +2127,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2124
2127
|
fontWeight: "500",
|
|
2125
2128
|
marginBottom: 8
|
|
2126
2129
|
}
|
|
2127
|
-
}),
|
|
2128
|
-
let { colors: c } =
|
|
2129
|
-
return /* @__PURE__ */ j(
|
|
2130
|
-
style:
|
|
2130
|
+
}), Ee = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2131
|
+
let { colors: c } = y(), [l, u] = k(!1);
|
|
2132
|
+
return /* @__PURE__ */ j(H, {
|
|
2133
|
+
style: De.container,
|
|
2131
2134
|
children: [
|
|
2132
2135
|
/* @__PURE__ */ j(z, {
|
|
2133
|
-
style: [
|
|
2136
|
+
style: [De.label, { color: c.textSecondary }],
|
|
2134
2137
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2135
2138
|
style: { color: c.error },
|
|
2136
2139
|
children: "*"
|
|
2137
2140
|
})]
|
|
2138
2141
|
}),
|
|
2139
|
-
/* @__PURE__ */ j(
|
|
2140
|
-
style:
|
|
2141
|
-
children: [/* @__PURE__ */ A(
|
|
2142
|
+
/* @__PURE__ */ j(H, {
|
|
2143
|
+
style: De.inputWrapper,
|
|
2144
|
+
children: [/* @__PURE__ */ A(B, {
|
|
2142
2145
|
style: [
|
|
2143
|
-
|
|
2146
|
+
De.input,
|
|
2144
2147
|
{
|
|
2145
2148
|
backgroundColor: c.input,
|
|
2146
2149
|
borderColor: c.border,
|
|
@@ -2154,27 +2157,27 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2154
2157
|
placeholderTextColor: c.textMuted,
|
|
2155
2158
|
secureTextEntry: !l,
|
|
2156
2159
|
accessibilityLabel: s
|
|
2157
|
-
}), /* @__PURE__ */ A(
|
|
2158
|
-
style:
|
|
2160
|
+
}), /* @__PURE__ */ A(V, {
|
|
2161
|
+
style: De.toggleButton,
|
|
2159
2162
|
onPress: () => u(!l),
|
|
2160
2163
|
activeOpacity: .7,
|
|
2161
2164
|
children: /* @__PURE__ */ A(z, {
|
|
2162
|
-
style: [
|
|
2165
|
+
style: [De.toggleText, { color: c.primary }],
|
|
2163
2166
|
children: l ? "Hide" : "Show"
|
|
2164
2167
|
})
|
|
2165
2168
|
})]
|
|
2166
2169
|
}),
|
|
2167
2170
|
r && /* @__PURE__ */ A(z, {
|
|
2168
|
-
style: [
|
|
2171
|
+
style: [De.error, { color: c.error }],
|
|
2169
2172
|
children: r
|
|
2170
2173
|
}),
|
|
2171
2174
|
o && !r && /* @__PURE__ */ A(z, {
|
|
2172
|
-
style: [
|
|
2175
|
+
style: [De.helperText, { color: c.textMuted }],
|
|
2173
2176
|
children: o
|
|
2174
2177
|
})
|
|
2175
2178
|
]
|
|
2176
2179
|
});
|
|
2177
|
-
},
|
|
2180
|
+
}, De = L.create({
|
|
2178
2181
|
container: { marginBottom: 16 },
|
|
2179
2182
|
error: {
|
|
2180
2183
|
fontSize: 12,
|
|
@@ -2212,111 +2215,111 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2212
2215
|
fontSize: 12,
|
|
2213
2216
|
fontWeight: "600"
|
|
2214
2217
|
}
|
|
2215
|
-
}),
|
|
2216
|
-
let
|
|
2218
|
+
}), Oe = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2219
|
+
let o = g(), { colors: s } = y(), c = e.data.options || [], l = t || "", u = e.data.variant !== "default", d = (e) => {
|
|
2217
2220
|
n(e);
|
|
2218
2221
|
};
|
|
2219
|
-
return /* @__PURE__ */ j(
|
|
2222
|
+
return /* @__PURE__ */ j(H, {
|
|
2220
2223
|
style: X.container,
|
|
2221
2224
|
children: [
|
|
2222
2225
|
/* @__PURE__ */ j(z, {
|
|
2223
|
-
style: [X.label, { color:
|
|
2224
|
-
children: [
|
|
2225
|
-
style: { color:
|
|
2226
|
+
style: [X.label, { color: s.textSecondary }],
|
|
2227
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2228
|
+
style: { color: s.error },
|
|
2226
2229
|
children: "*"
|
|
2227
2230
|
})]
|
|
2228
2231
|
}),
|
|
2229
|
-
|
|
2230
|
-
let t =
|
|
2231
|
-
return
|
|
2232
|
+
c.map((e) => {
|
|
2233
|
+
let t = l === e.value, n = o(e.label) || e.value, r = o(e.description);
|
|
2234
|
+
return u ? /* @__PURE__ */ j(V, {
|
|
2232
2235
|
style: [
|
|
2233
2236
|
X.card,
|
|
2234
2237
|
{
|
|
2235
|
-
backgroundColor:
|
|
2236
|
-
borderColor:
|
|
2238
|
+
backgroundColor: s.input,
|
|
2239
|
+
borderColor: s.border
|
|
2237
2240
|
},
|
|
2238
2241
|
t && {
|
|
2239
|
-
backgroundColor: `${
|
|
2240
|
-
borderColor:
|
|
2242
|
+
backgroundColor: `${s.primary}10`,
|
|
2243
|
+
borderColor: s.primary
|
|
2241
2244
|
},
|
|
2242
2245
|
e.disabled && { opacity: .5 }
|
|
2243
2246
|
],
|
|
2244
|
-
onPress: () =>
|
|
2247
|
+
onPress: () => d(e.value),
|
|
2245
2248
|
disabled: e.disabled,
|
|
2246
2249
|
activeOpacity: .7,
|
|
2247
2250
|
children: [
|
|
2248
|
-
e.image && /* @__PURE__ */ A(
|
|
2251
|
+
e.image && /* @__PURE__ */ A(ne, {
|
|
2249
2252
|
source: { uri: e.image },
|
|
2250
2253
|
style: X.cardImage
|
|
2251
2254
|
}),
|
|
2252
|
-
/* @__PURE__ */ j(
|
|
2255
|
+
/* @__PURE__ */ j(H, {
|
|
2253
2256
|
style: X.cardTextContainer,
|
|
2254
2257
|
children: [/* @__PURE__ */ A(z, {
|
|
2255
|
-
style: [X.cardLabel, { color:
|
|
2258
|
+
style: [X.cardLabel, { color: s.textSecondary }],
|
|
2256
2259
|
children: n
|
|
2257
2260
|
}), r && /* @__PURE__ */ A(z, {
|
|
2258
|
-
style: [X.cardDescription, { color:
|
|
2261
|
+
style: [X.cardDescription, { color: s.textMuted }],
|
|
2259
2262
|
children: r
|
|
2260
2263
|
})]
|
|
2261
2264
|
}),
|
|
2262
|
-
/* @__PURE__ */ A(
|
|
2265
|
+
/* @__PURE__ */ A(H, {
|
|
2263
2266
|
style: [
|
|
2264
2267
|
X.radio,
|
|
2265
2268
|
X.cardRadio,
|
|
2266
2269
|
{
|
|
2267
|
-
backgroundColor:
|
|
2268
|
-
borderColor:
|
|
2270
|
+
backgroundColor: s.input,
|
|
2271
|
+
borderColor: s.border
|
|
2269
2272
|
},
|
|
2270
|
-
t && { borderColor:
|
|
2273
|
+
t && { borderColor: s.primary }
|
|
2271
2274
|
],
|
|
2272
|
-
children: t && /* @__PURE__ */ A(
|
|
2275
|
+
children: t && /* @__PURE__ */ A(H, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2273
2276
|
})
|
|
2274
2277
|
]
|
|
2275
|
-
}, e.value) : /* @__PURE__ */ j(
|
|
2278
|
+
}, e.value) : /* @__PURE__ */ j(V, {
|
|
2276
2279
|
style: X.option,
|
|
2277
|
-
onPress: () =>
|
|
2280
|
+
onPress: () => d(e.value),
|
|
2278
2281
|
disabled: e.disabled,
|
|
2279
2282
|
activeOpacity: .7,
|
|
2280
2283
|
children: [
|
|
2281
|
-
/* @__PURE__ */ A(
|
|
2284
|
+
/* @__PURE__ */ A(H, {
|
|
2282
2285
|
style: [
|
|
2283
2286
|
X.radio,
|
|
2284
2287
|
{
|
|
2285
|
-
backgroundColor:
|
|
2286
|
-
borderColor:
|
|
2288
|
+
backgroundColor: s.input,
|
|
2289
|
+
borderColor: s.border
|
|
2287
2290
|
},
|
|
2288
|
-
t && { borderColor:
|
|
2291
|
+
t && { borderColor: s.primary }
|
|
2289
2292
|
],
|
|
2290
|
-
children: t && /* @__PURE__ */ A(
|
|
2293
|
+
children: t && /* @__PURE__ */ A(H, { style: [X.radioInner, { backgroundColor: s.primary }] })
|
|
2291
2294
|
}),
|
|
2292
|
-
e.image && /* @__PURE__ */ A(
|
|
2295
|
+
e.image && /* @__PURE__ */ A(ne, {
|
|
2293
2296
|
source: { uri: e.image },
|
|
2294
2297
|
style: X.image
|
|
2295
2298
|
}),
|
|
2296
|
-
/* @__PURE__ */ j(
|
|
2299
|
+
/* @__PURE__ */ j(H, {
|
|
2297
2300
|
style: X.optionTextContainer,
|
|
2298
2301
|
children: [/* @__PURE__ */ A(z, {
|
|
2299
2302
|
style: [
|
|
2300
2303
|
X.optionLabel,
|
|
2301
|
-
{ color:
|
|
2302
|
-
e.disabled && { color:
|
|
2304
|
+
{ color: s.textSecondary },
|
|
2305
|
+
e.disabled && { color: s.textMuted }
|
|
2303
2306
|
],
|
|
2304
2307
|
children: n
|
|
2305
2308
|
}), r && /* @__PURE__ */ A(z, {
|
|
2306
|
-
style: [X.optionDescription, { color:
|
|
2309
|
+
style: [X.optionDescription, { color: s.textMuted }],
|
|
2307
2310
|
children: r
|
|
2308
2311
|
})]
|
|
2309
2312
|
})
|
|
2310
2313
|
]
|
|
2311
2314
|
}, e.value);
|
|
2312
2315
|
}),
|
|
2313
|
-
|
|
2314
|
-
style: [X.error, { color:
|
|
2315
|
-
children:
|
|
2316
|
+
r && /* @__PURE__ */ A(z, {
|
|
2317
|
+
style: [X.error, { color: s.error }],
|
|
2318
|
+
children: r
|
|
2316
2319
|
}),
|
|
2317
|
-
|
|
2318
|
-
style: [X.helperText, { color:
|
|
2319
|
-
children:
|
|
2320
|
+
a && !r && /* @__PURE__ */ A(z, {
|
|
2321
|
+
style: [X.helperText, { color: s.textMuted }],
|
|
2322
|
+
children: a
|
|
2320
2323
|
})
|
|
2321
2324
|
]
|
|
2322
2325
|
});
|
|
@@ -2393,100 +2396,100 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2393
2396
|
height: 10,
|
|
2394
2397
|
width: 10
|
|
2395
2398
|
}
|
|
2396
|
-
}),
|
|
2397
|
-
let [
|
|
2398
|
-
|
|
2399
|
+
}), ke = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2400
|
+
let [s, c] = k(!1), l = g(), { colors: u } = y(), d = e.data.options || [], f = e.data.multiple, p = Array.isArray(t) ? t : t ? [t] : [], m = (e) => {
|
|
2401
|
+
f ? n(p.includes(e) ? p.filter((t) => t !== e) : [...p, e]) : (n(e), c(!1));
|
|
2399
2402
|
};
|
|
2400
|
-
return /* @__PURE__ */ j(
|
|
2403
|
+
return /* @__PURE__ */ j(H, {
|
|
2401
2404
|
style: Z.container,
|
|
2402
2405
|
children: [
|
|
2403
2406
|
/* @__PURE__ */ j(z, {
|
|
2404
|
-
style: [Z.label, { color:
|
|
2405
|
-
children: [
|
|
2406
|
-
style: { color:
|
|
2407
|
+
style: [Z.label, { color: u.textSecondary }],
|
|
2408
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2409
|
+
style: { color: u.error },
|
|
2407
2410
|
children: "*"
|
|
2408
2411
|
})]
|
|
2409
2412
|
}),
|
|
2410
|
-
/* @__PURE__ */ j(
|
|
2413
|
+
/* @__PURE__ */ j(V, {
|
|
2411
2414
|
style: [
|
|
2412
2415
|
Z.trigger,
|
|
2413
2416
|
{
|
|
2414
|
-
backgroundColor:
|
|
2415
|
-
borderColor:
|
|
2417
|
+
backgroundColor: u.input,
|
|
2418
|
+
borderColor: u.border
|
|
2416
2419
|
},
|
|
2417
|
-
|
|
2420
|
+
r && { borderColor: u.error }
|
|
2418
2421
|
],
|
|
2419
|
-
onPress: () =>
|
|
2422
|
+
onPress: () => c(!0),
|
|
2420
2423
|
activeOpacity: .7,
|
|
2421
2424
|
children: [/* @__PURE__ */ A(z, {
|
|
2422
2425
|
style: [
|
|
2423
2426
|
Z.triggerText,
|
|
2424
|
-
{ color:
|
|
2425
|
-
|
|
2427
|
+
{ color: u.text },
|
|
2428
|
+
p.length === 0 && { color: u.textMuted }
|
|
2426
2429
|
],
|
|
2427
2430
|
children: (() => {
|
|
2428
|
-
if (
|
|
2429
|
-
if (
|
|
2430
|
-
let e =
|
|
2431
|
-
return e ?
|
|
2431
|
+
if (p.length === 0) return a || "Select...";
|
|
2432
|
+
if (f) return d.filter((e) => p.includes(e.value)).map((e) => l(e.label) || e.value).join(", ");
|
|
2433
|
+
let e = d.find((e) => e.value === p[0]);
|
|
2434
|
+
return e ? l(e.label) || e.value : a || "Select...";
|
|
2432
2435
|
})()
|
|
2433
2436
|
}), /* @__PURE__ */ A(z, {
|
|
2434
|
-
style: [Z.arrow, { color:
|
|
2437
|
+
style: [Z.arrow, { color: u.textMuted }],
|
|
2435
2438
|
children: "▼"
|
|
2436
2439
|
})]
|
|
2437
2440
|
}),
|
|
2438
|
-
/* @__PURE__ */ A(
|
|
2439
|
-
visible:
|
|
2441
|
+
/* @__PURE__ */ A(re, {
|
|
2442
|
+
visible: s,
|
|
2440
2443
|
transparent: !0,
|
|
2441
2444
|
animationType: "fade",
|
|
2442
|
-
onRequestClose: () =>
|
|
2443
|
-
children: /* @__PURE__ */ A(
|
|
2445
|
+
onRequestClose: () => c(!1),
|
|
2446
|
+
children: /* @__PURE__ */ A(V, {
|
|
2444
2447
|
style: Z.modalOverlay,
|
|
2445
2448
|
activeOpacity: 1,
|
|
2446
|
-
onPress: () =>
|
|
2447
|
-
children: /* @__PURE__ */ j(
|
|
2448
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2449
|
+
onPress: () => c(!1),
|
|
2450
|
+
children: /* @__PURE__ */ j(H, {
|
|
2451
|
+
style: [Z.modalContent, { backgroundColor: u.card }],
|
|
2449
2452
|
onStartShouldSetResponder: () => !0,
|
|
2450
2453
|
children: [
|
|
2451
|
-
/* @__PURE__ */ j(
|
|
2452
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2454
|
+
/* @__PURE__ */ j(H, {
|
|
2455
|
+
style: [Z.modalHeader, { borderBottomColor: u.border }],
|
|
2453
2456
|
children: [/* @__PURE__ */ A(z, {
|
|
2454
|
-
style: [Z.modalTitle, { color:
|
|
2455
|
-
children:
|
|
2456
|
-
}), /* @__PURE__ */ A(
|
|
2457
|
-
onPress: () =>
|
|
2457
|
+
style: [Z.modalTitle, { color: u.text }],
|
|
2458
|
+
children: i || e.data.name
|
|
2459
|
+
}), /* @__PURE__ */ A(V, {
|
|
2460
|
+
onPress: () => c(!1),
|
|
2458
2461
|
children: /* @__PURE__ */ A(z, {
|
|
2459
|
-
style: [Z.closeButton, { color:
|
|
2462
|
+
style: [Z.closeButton, { color: u.textMuted }],
|
|
2460
2463
|
children: "✕"
|
|
2461
2464
|
})
|
|
2462
2465
|
})]
|
|
2463
2466
|
}),
|
|
2464
2467
|
/* @__PURE__ */ A(I, {
|
|
2465
2468
|
style: Z.optionsList,
|
|
2466
|
-
children:
|
|
2467
|
-
let t =
|
|
2468
|
-
return /* @__PURE__ */ j(
|
|
2469
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2470
|
-
onPress: () =>
|
|
2469
|
+
children: d.map((e) => {
|
|
2470
|
+
let t = p.includes(e.value);
|
|
2471
|
+
return /* @__PURE__ */ j(V, {
|
|
2472
|
+
style: [Z.option, t && { backgroundColor: `${u.primary}20` }],
|
|
2473
|
+
onPress: () => m(e.value),
|
|
2471
2474
|
disabled: e.disabled,
|
|
2472
2475
|
activeOpacity: .7,
|
|
2473
2476
|
children: [/* @__PURE__ */ A(z, {
|
|
2474
2477
|
style: [
|
|
2475
2478
|
Z.optionText,
|
|
2476
|
-
{ color:
|
|
2477
|
-
e.disabled && { color:
|
|
2479
|
+
{ color: u.textSecondary },
|
|
2480
|
+
e.disabled && { color: u.textMuted }
|
|
2478
2481
|
],
|
|
2479
|
-
children:
|
|
2482
|
+
children: l(e.label) || e.value
|
|
2480
2483
|
}), t && /* @__PURE__ */ A(z, {
|
|
2481
|
-
style: [Z.checkmark, { color:
|
|
2484
|
+
style: [Z.checkmark, { color: u.primary }],
|
|
2482
2485
|
children: "✓"
|
|
2483
2486
|
})]
|
|
2484
2487
|
}, e.value);
|
|
2485
2488
|
})
|
|
2486
2489
|
}),
|
|
2487
|
-
|
|
2488
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2489
|
-
onPress: () =>
|
|
2490
|
+
f && /* @__PURE__ */ A(V, {
|
|
2491
|
+
style: [Z.doneButton, { backgroundColor: u.primary }],
|
|
2492
|
+
onPress: () => c(!1),
|
|
2490
2493
|
children: /* @__PURE__ */ A(z, {
|
|
2491
2494
|
style: Z.doneButtonText,
|
|
2492
2495
|
children: "Done"
|
|
@@ -2496,13 +2499,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2496
2499
|
})
|
|
2497
2500
|
})
|
|
2498
2501
|
}),
|
|
2499
|
-
|
|
2500
|
-
style: [Z.error, { color:
|
|
2501
|
-
children:
|
|
2502
|
+
r && /* @__PURE__ */ A(z, {
|
|
2503
|
+
style: [Z.error, { color: u.error }],
|
|
2504
|
+
children: r
|
|
2502
2505
|
}),
|
|
2503
|
-
|
|
2504
|
-
style: [Z.helperText, { color:
|
|
2505
|
-
children:
|
|
2506
|
+
o && !r && /* @__PURE__ */ A(z, {
|
|
2507
|
+
style: [Z.helperText, { color: u.textMuted }],
|
|
2508
|
+
children: o
|
|
2506
2509
|
})
|
|
2507
2510
|
]
|
|
2508
2511
|
});
|
|
@@ -2588,17 +2591,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2588
2591
|
flex: 1,
|
|
2589
2592
|
fontSize: 14
|
|
2590
2593
|
}
|
|
2591
|
-
}),
|
|
2592
|
-
let { colors: o } =
|
|
2593
|
-
return /* @__PURE__ */ j(
|
|
2594
|
-
style:
|
|
2594
|
+
}), Ae = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
2595
|
+
let { colors: o } = y(), s = !!t;
|
|
2596
|
+
return /* @__PURE__ */ j(H, {
|
|
2597
|
+
style: je.container,
|
|
2595
2598
|
children: [
|
|
2596
|
-
/* @__PURE__ */ j(
|
|
2597
|
-
style:
|
|
2598
|
-
children: [/* @__PURE__ */ A(
|
|
2599
|
-
style:
|
|
2599
|
+
/* @__PURE__ */ j(H, {
|
|
2600
|
+
style: je.row,
|
|
2601
|
+
children: [/* @__PURE__ */ A(H, {
|
|
2602
|
+
style: je.labelContainer,
|
|
2600
2603
|
children: /* @__PURE__ */ j(z, {
|
|
2601
|
-
style: [
|
|
2604
|
+
style: [je.label, { color: o.textSecondary }],
|
|
2602
2605
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2603
2606
|
style: { color: o.error },
|
|
2604
2607
|
children: "*"
|
|
@@ -2616,16 +2619,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2616
2619
|
})]
|
|
2617
2620
|
}),
|
|
2618
2621
|
r && /* @__PURE__ */ A(z, {
|
|
2619
|
-
style: [
|
|
2622
|
+
style: [je.error, { color: o.error }],
|
|
2620
2623
|
children: r
|
|
2621
2624
|
}),
|
|
2622
2625
|
a && !r && /* @__PURE__ */ A(z, {
|
|
2623
|
-
style: [
|
|
2626
|
+
style: [je.helperText, { color: o.textMuted }],
|
|
2624
2627
|
children: a
|
|
2625
2628
|
})
|
|
2626
2629
|
]
|
|
2627
2630
|
});
|
|
2628
|
-
},
|
|
2631
|
+
}, je = L.create({
|
|
2629
2632
|
container: { marginBottom: 16 },
|
|
2630
2633
|
error: {
|
|
2631
2634
|
fontSize: 12,
|
|
@@ -2645,21 +2648,21 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2645
2648
|
flexDirection: "row",
|
|
2646
2649
|
justifyContent: "space-between"
|
|
2647
2650
|
}
|
|
2648
|
-
}),
|
|
2649
|
-
let { colors: c } =
|
|
2650
|
-
return /* @__PURE__ */ j(
|
|
2651
|
-
style:
|
|
2651
|
+
}), Me = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2652
|
+
let { colors: c } = y();
|
|
2653
|
+
return /* @__PURE__ */ j(H, {
|
|
2654
|
+
style: Ne.container,
|
|
2652
2655
|
children: [
|
|
2653
2656
|
/* @__PURE__ */ j(z, {
|
|
2654
|
-
style: [
|
|
2657
|
+
style: [Ne.label, { color: c.textSecondary }],
|
|
2655
2658
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2656
2659
|
style: { color: c.error },
|
|
2657
2660
|
children: "*"
|
|
2658
2661
|
})]
|
|
2659
2662
|
}),
|
|
2660
|
-
/* @__PURE__ */ A(
|
|
2663
|
+
/* @__PURE__ */ A(B, {
|
|
2661
2664
|
style: [
|
|
2662
|
-
|
|
2665
|
+
Ne.textarea,
|
|
2663
2666
|
{
|
|
2664
2667
|
backgroundColor: c.input,
|
|
2665
2668
|
borderColor: c.border,
|
|
@@ -2677,16 +2680,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2677
2680
|
accessibilityLabel: s
|
|
2678
2681
|
}),
|
|
2679
2682
|
r && /* @__PURE__ */ A(z, {
|
|
2680
|
-
style: [
|
|
2683
|
+
style: [Ne.error, { color: c.error }],
|
|
2681
2684
|
children: r
|
|
2682
2685
|
}),
|
|
2683
2686
|
o && !r && /* @__PURE__ */ A(z, {
|
|
2684
|
-
style: [
|
|
2687
|
+
style: [Ne.helperText, { color: c.textMuted }],
|
|
2685
2688
|
children: o
|
|
2686
2689
|
})
|
|
2687
2690
|
]
|
|
2688
2691
|
});
|
|
2689
|
-
},
|
|
2692
|
+
}, Ne = L.create({
|
|
2690
2693
|
container: { marginBottom: 16 },
|
|
2691
2694
|
error: {
|
|
2692
2695
|
fontSize: 12,
|
|
@@ -2709,21 +2712,21 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2709
2712
|
paddingHorizontal: 12,
|
|
2710
2713
|
paddingVertical: 8
|
|
2711
2714
|
}
|
|
2712
|
-
}),
|
|
2713
|
-
let { colors: c } =
|
|
2714
|
-
return /* @__PURE__ */ j(
|
|
2715
|
-
style:
|
|
2715
|
+
}), Pe = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o, name: s }) => {
|
|
2716
|
+
let { colors: c } = y();
|
|
2717
|
+
return /* @__PURE__ */ j(H, {
|
|
2718
|
+
style: Fe.container,
|
|
2716
2719
|
children: [
|
|
2717
2720
|
/* @__PURE__ */ j(z, {
|
|
2718
|
-
style: [
|
|
2721
|
+
style: [Fe.label, { color: c.textSecondary }],
|
|
2719
2722
|
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
2720
2723
|
style: { color: c.error },
|
|
2721
2724
|
children: "*"
|
|
2722
2725
|
})]
|
|
2723
2726
|
}),
|
|
2724
|
-
/* @__PURE__ */ A(
|
|
2727
|
+
/* @__PURE__ */ A(B, {
|
|
2725
2728
|
style: [
|
|
2726
|
-
|
|
2729
|
+
Fe.input,
|
|
2727
2730
|
{
|
|
2728
2731
|
backgroundColor: c.input,
|
|
2729
2732
|
borderColor: c.border,
|
|
@@ -2738,16 +2741,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2738
2741
|
accessibilityLabel: s
|
|
2739
2742
|
}),
|
|
2740
2743
|
r && /* @__PURE__ */ A(z, {
|
|
2741
|
-
style: [
|
|
2744
|
+
style: [Fe.error, { color: c.error }],
|
|
2742
2745
|
children: r
|
|
2743
2746
|
}),
|
|
2744
2747
|
o && !r && /* @__PURE__ */ A(z, {
|
|
2745
|
-
style: [
|
|
2748
|
+
style: [Fe.helperText, { color: c.textMuted }],
|
|
2746
2749
|
children: o
|
|
2747
2750
|
})
|
|
2748
2751
|
]
|
|
2749
2752
|
});
|
|
2750
|
-
},
|
|
2753
|
+
}, Fe = L.create({
|
|
2751
2754
|
container: { marginBottom: 16 },
|
|
2752
2755
|
error: {
|
|
2753
2756
|
fontSize: 12,
|
|
@@ -2769,15 +2772,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2769
2772
|
fontWeight: "500",
|
|
2770
2773
|
marginBottom: 8
|
|
2771
2774
|
}
|
|
2772
|
-
}),
|
|
2773
|
-
let [s, c] = k(!1), { colors: l } =
|
|
2774
|
-
n(`${String(h).padStart(2, "0")}:${String(
|
|
2775
|
+
}), Ie = ({ node: e, value: t, setValue: n, error: r, label: i, placeholder: a, helperText: o }) => {
|
|
2776
|
+
let [s, c] = k(!1), { colors: l } = y(), u = (t || "").split(":"), d = Number.parseInt(u[0], 10), f = Number.parseInt(u[1], 10), p = Number.isNaN(d) ? 0 : d, m = Number.isNaN(f) ? 0 : f, [h, g] = k(p || 0), [_, v] = k(m || 0), b = O(null), x = O(null), S = Array.from({ length: 24 }, (e, t) => t), C = Array.from({ length: 60 }, (e, t) => t), ee = () => t || a || "Select time", w = te(() => {
|
|
2777
|
+
n(`${String(h).padStart(2, "0")}:${String(_).padStart(2, "0")}`), c(!1);
|
|
2775
2778
|
}, [
|
|
2776
2779
|
h,
|
|
2777
|
-
|
|
2780
|
+
_,
|
|
2778
2781
|
n
|
|
2779
2782
|
]);
|
|
2780
|
-
return /* @__PURE__ */ j(
|
|
2783
|
+
return /* @__PURE__ */ j(H, {
|
|
2781
2784
|
style: Q.container,
|
|
2782
2785
|
children: [
|
|
2783
2786
|
/* @__PURE__ */ j(z, {
|
|
@@ -2787,7 +2790,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2787
2790
|
children: "*"
|
|
2788
2791
|
})]
|
|
2789
2792
|
}),
|
|
2790
|
-
/* @__PURE__ */ j(
|
|
2793
|
+
/* @__PURE__ */ j(V, {
|
|
2791
2794
|
style: [
|
|
2792
2795
|
Q.trigger,
|
|
2793
2796
|
{
|
|
@@ -2797,7 +2800,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2797
2800
|
r && { borderColor: l.error }
|
|
2798
2801
|
],
|
|
2799
2802
|
onPress: () => {
|
|
2800
|
-
g(p || 0),
|
|
2803
|
+
g(p || 0), v(m || 0), c(!0);
|
|
2801
2804
|
},
|
|
2802
2805
|
activeOpacity: .7,
|
|
2803
2806
|
children: [/* @__PURE__ */ A(z, {
|
|
@@ -2807,32 +2810,32 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2807
2810
|
!t && { color: l.textMuted }
|
|
2808
2811
|
],
|
|
2809
2812
|
numberOfLines: 1,
|
|
2810
|
-
children:
|
|
2813
|
+
children: ee()
|
|
2811
2814
|
}), /* @__PURE__ */ A(z, {
|
|
2812
2815
|
style: Q.icon,
|
|
2813
2816
|
children: "🕐"
|
|
2814
2817
|
})]
|
|
2815
2818
|
}),
|
|
2816
|
-
/* @__PURE__ */ A(
|
|
2819
|
+
/* @__PURE__ */ A(re, {
|
|
2817
2820
|
visible: s,
|
|
2818
2821
|
transparent: !0,
|
|
2819
2822
|
animationType: "fade",
|
|
2820
2823
|
onRequestClose: () => c(!1),
|
|
2821
|
-
children: /* @__PURE__ */ A(
|
|
2824
|
+
children: /* @__PURE__ */ A(V, {
|
|
2822
2825
|
style: Q.modalOverlay,
|
|
2823
2826
|
activeOpacity: 1,
|
|
2824
2827
|
onPress: () => c(!1),
|
|
2825
|
-
children: /* @__PURE__ */ j(
|
|
2828
|
+
children: /* @__PURE__ */ j(V, {
|
|
2826
2829
|
style: [Q.modalContent, { backgroundColor: l.card }],
|
|
2827
2830
|
activeOpacity: 1,
|
|
2828
2831
|
onPress: () => {},
|
|
2829
2832
|
children: [
|
|
2830
|
-
/* @__PURE__ */ j(
|
|
2833
|
+
/* @__PURE__ */ j(H, {
|
|
2831
2834
|
style: [Q.modalHeader, { borderBottomColor: l.separator }],
|
|
2832
2835
|
children: [/* @__PURE__ */ A(z, {
|
|
2833
2836
|
style: [Q.modalTitle, { color: l.text }],
|
|
2834
2837
|
children: i || e.data.name
|
|
2835
|
-
}), /* @__PURE__ */ A(
|
|
2838
|
+
}), /* @__PURE__ */ A(V, {
|
|
2836
2839
|
onPress: () => c(!1),
|
|
2837
2840
|
children: /* @__PURE__ */ A(z, {
|
|
2838
2841
|
style: [Q.closeButton, { color: l.textMuted }],
|
|
@@ -2840,10 +2843,10 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2840
2843
|
})
|
|
2841
2844
|
})]
|
|
2842
2845
|
}),
|
|
2843
|
-
/* @__PURE__ */ j(
|
|
2846
|
+
/* @__PURE__ */ j(H, {
|
|
2844
2847
|
style: Q.pickerContainer,
|
|
2845
2848
|
children: [
|
|
2846
|
-
/* @__PURE__ */ j(
|
|
2849
|
+
/* @__PURE__ */ j(H, {
|
|
2847
2850
|
style: Q.pickerColumn,
|
|
2848
2851
|
children: [/* @__PURE__ */ A(z, {
|
|
2849
2852
|
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
@@ -2853,7 +2856,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2853
2856
|
style: Q.picker,
|
|
2854
2857
|
contentContainerStyle: Q.pickerContent,
|
|
2855
2858
|
showsVerticalScrollIndicator: !1,
|
|
2856
|
-
children: S.map((e) => /* @__PURE__ */ A(
|
|
2859
|
+
children: S.map((e) => /* @__PURE__ */ A(V, {
|
|
2857
2860
|
style: [Q.pickerItem, h === e && { backgroundColor: l.primary }],
|
|
2858
2861
|
onPress: () => g(e),
|
|
2859
2862
|
activeOpacity: .7,
|
|
@@ -2875,7 +2878,7 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2875
2878
|
style: [Q.pickerSeparator, { color: l.text }],
|
|
2876
2879
|
children: ":"
|
|
2877
2880
|
}),
|
|
2878
|
-
/* @__PURE__ */ j(
|
|
2881
|
+
/* @__PURE__ */ j(H, {
|
|
2879
2882
|
style: Q.pickerColumn,
|
|
2880
2883
|
children: [/* @__PURE__ */ A(z, {
|
|
2881
2884
|
style: [Q.pickerLabel, { color: l.textMuted }],
|
|
@@ -2885,15 +2888,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2885
2888
|
style: Q.picker,
|
|
2886
2889
|
contentContainerStyle: Q.pickerContent,
|
|
2887
2890
|
showsVerticalScrollIndicator: !1,
|
|
2888
|
-
children: C.map((e) => /* @__PURE__ */ A(
|
|
2889
|
-
style: [Q.pickerItem,
|
|
2890
|
-
onPress: () =>
|
|
2891
|
+
children: C.map((e) => /* @__PURE__ */ A(V, {
|
|
2892
|
+
style: [Q.pickerItem, _ === e && { backgroundColor: l.primary }],
|
|
2893
|
+
onPress: () => v(e),
|
|
2891
2894
|
activeOpacity: .7,
|
|
2892
2895
|
children: /* @__PURE__ */ A(z, {
|
|
2893
2896
|
style: [
|
|
2894
2897
|
Q.pickerItemText,
|
|
2895
2898
|
{ color: l.text },
|
|
2896
|
-
|
|
2899
|
+
_ === e && {
|
|
2897
2900
|
color: l.background,
|
|
2898
2901
|
fontWeight: "600"
|
|
2899
2902
|
}
|
|
@@ -2905,9 +2908,9 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2905
2908
|
})
|
|
2906
2909
|
]
|
|
2907
2910
|
}),
|
|
2908
|
-
/* @__PURE__ */ A(
|
|
2911
|
+
/* @__PURE__ */ A(V, {
|
|
2909
2912
|
style: [Q.confirmButton, { backgroundColor: l.primary }],
|
|
2910
|
-
onPress:
|
|
2913
|
+
onPress: w,
|
|
2911
2914
|
activeOpacity: .7,
|
|
2912
2915
|
children: /* @__PURE__ */ A(z, {
|
|
2913
2916
|
style: [Q.confirmButtonText, { color: l.background }],
|
|
@@ -3019,48 +3022,48 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3019
3022
|
flex: 1,
|
|
3020
3023
|
fontSize: 14
|
|
3021
3024
|
}
|
|
3022
|
-
}),
|
|
3023
|
-
let [
|
|
3024
|
-
let e = `${String(
|
|
3025
|
-
|
|
3025
|
+
}), Le = ({ node: e, value: t, setValue: n, error: r, label: i, helperText: a }) => {
|
|
3026
|
+
let [o, s] = k(!1), [c, l] = k(!0), u = g(), { colors: d } = y(), f = Array.isArray(t) ? t : [], p = f[0] || "", m = f[1] || "", h = p.split(":"), _ = Number.parseInt(h[0], 10), v = Number.parseInt(h[1], 10), b = Number.isNaN(_) ? 0 : _, x = Number.isNaN(v) ? 0 : v, S = m.split(":"), C = Number.parseInt(S[0], 10), ee = Number.parseInt(S[1], 10), w = Number.isNaN(C) ? 0 : C, T = Number.isNaN(ee) ? 0 : ee, [E, D] = k(0), [O, M] = k(0), N = Array.from({ length: 24 }, (e, t) => t), P = Array.from({ length: 60 }, (e, t) => t), F = () => p && m ? `${p} - ${m}` : p || u("renderer.defaultInputs.selectDateRange"), ne = te(() => {
|
|
3027
|
+
let e = `${String(E).padStart(2, "0")}:${String(O).padStart(2, "0")}`;
|
|
3028
|
+
c ? (n([e, m]), l(!1), D(w || 0), M(T || 0)) : (n([p, e]), s(!1), l(!0));
|
|
3026
3029
|
}, [
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
+
c,
|
|
3031
|
+
E,
|
|
3032
|
+
O,
|
|
3033
|
+
p,
|
|
3030
3034
|
m,
|
|
3031
|
-
|
|
3035
|
+
w,
|
|
3032
3036
|
T,
|
|
3033
|
-
E,
|
|
3034
3037
|
n
|
|
3035
3038
|
]);
|
|
3036
|
-
return /* @__PURE__ */ j(
|
|
3039
|
+
return /* @__PURE__ */ j(H, {
|
|
3037
3040
|
style: $.container,
|
|
3038
3041
|
children: [
|
|
3039
3042
|
/* @__PURE__ */ j(z, {
|
|
3040
|
-
style: [$.label, { color:
|
|
3041
|
-
children: [
|
|
3042
|
-
style: { color:
|
|
3043
|
+
style: [$.label, { color: d.textSecondary }],
|
|
3044
|
+
children: [i || e.data.name, e.data.required && /* @__PURE__ */ A(z, {
|
|
3045
|
+
style: { color: d.error },
|
|
3043
3046
|
children: "*"
|
|
3044
3047
|
})]
|
|
3045
3048
|
}),
|
|
3046
|
-
/* @__PURE__ */ j(
|
|
3049
|
+
/* @__PURE__ */ j(V, {
|
|
3047
3050
|
style: [
|
|
3048
3051
|
$.trigger,
|
|
3049
3052
|
{
|
|
3050
|
-
backgroundColor:
|
|
3051
|
-
borderColor:
|
|
3053
|
+
backgroundColor: d.input,
|
|
3054
|
+
borderColor: d.border
|
|
3052
3055
|
},
|
|
3053
|
-
|
|
3056
|
+
r && { borderColor: d.error }
|
|
3054
3057
|
],
|
|
3055
3058
|
onPress: () => {
|
|
3056
|
-
|
|
3059
|
+
D(b || 0), M(x || 0), l(!0), s(!0);
|
|
3057
3060
|
},
|
|
3058
3061
|
activeOpacity: .7,
|
|
3059
3062
|
children: [/* @__PURE__ */ A(z, {
|
|
3060
3063
|
style: [
|
|
3061
3064
|
$.triggerText,
|
|
3062
|
-
{ color:
|
|
3063
|
-
!
|
|
3065
|
+
{ color: d.text },
|
|
3066
|
+
!p && { color: d.textMuted }
|
|
3064
3067
|
],
|
|
3065
3068
|
numberOfLines: 1,
|
|
3066
3069
|
children: F()
|
|
@@ -3069,62 +3072,62 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3069
3072
|
children: "🕐"
|
|
3070
3073
|
})]
|
|
3071
3074
|
}),
|
|
3072
|
-
/* @__PURE__ */ A(
|
|
3073
|
-
visible:
|
|
3075
|
+
/* @__PURE__ */ A(re, {
|
|
3076
|
+
visible: o,
|
|
3074
3077
|
transparent: !0,
|
|
3075
3078
|
animationType: "fade",
|
|
3076
|
-
onRequestClose: () =>
|
|
3077
|
-
children: /* @__PURE__ */ A(
|
|
3079
|
+
onRequestClose: () => s(!1),
|
|
3080
|
+
children: /* @__PURE__ */ A(V, {
|
|
3078
3081
|
style: $.modalOverlay,
|
|
3079
3082
|
activeOpacity: 1,
|
|
3080
|
-
onPress: () =>
|
|
3081
|
-
children: /* @__PURE__ */ j(
|
|
3082
|
-
style: [$.modalContent, { backgroundColor:
|
|
3083
|
+
onPress: () => s(!1),
|
|
3084
|
+
children: /* @__PURE__ */ j(V, {
|
|
3085
|
+
style: [$.modalContent, { backgroundColor: d.card }],
|
|
3083
3086
|
activeOpacity: 1,
|
|
3084
3087
|
onPress: () => {},
|
|
3085
3088
|
children: [
|
|
3086
|
-
/* @__PURE__ */ j(
|
|
3087
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3089
|
+
/* @__PURE__ */ j(H, {
|
|
3090
|
+
style: [$.modalHeader, { borderBottomColor: d.separator }],
|
|
3088
3091
|
children: [/* @__PURE__ */ A(z, {
|
|
3089
|
-
style: [$.modalTitle, { color:
|
|
3090
|
-
children:
|
|
3091
|
-
}), /* @__PURE__ */ A(
|
|
3092
|
-
onPress: () =>
|
|
3092
|
+
style: [$.modalTitle, { color: d.text }],
|
|
3093
|
+
children: i || e.data.name
|
|
3094
|
+
}), /* @__PURE__ */ A(V, {
|
|
3095
|
+
onPress: () => s(!1),
|
|
3093
3096
|
children: /* @__PURE__ */ A(z, {
|
|
3094
|
-
style: [$.closeButton, { color:
|
|
3097
|
+
style: [$.closeButton, { color: d.textMuted }],
|
|
3095
3098
|
children: "✕"
|
|
3096
3099
|
})
|
|
3097
3100
|
})]
|
|
3098
3101
|
}),
|
|
3099
|
-
/* @__PURE__ */ A(
|
|
3100
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3102
|
+
/* @__PURE__ */ A(H, {
|
|
3103
|
+
style: [$.rangeIndicator, { backgroundColor: d.primaryLight }],
|
|
3101
3104
|
children: /* @__PURE__ */ A(z, {
|
|
3102
|
-
style: [$.rangeIndicatorText, { color:
|
|
3103
|
-
children:
|
|
3105
|
+
style: [$.rangeIndicatorText, { color: d.primary }],
|
|
3106
|
+
children: u(c ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3104
3107
|
})
|
|
3105
3108
|
}),
|
|
3106
|
-
/* @__PURE__ */ j(
|
|
3109
|
+
/* @__PURE__ */ j(H, {
|
|
3107
3110
|
style: $.pickerContainer,
|
|
3108
3111
|
children: [
|
|
3109
|
-
/* @__PURE__ */ j(
|
|
3112
|
+
/* @__PURE__ */ j(H, {
|
|
3110
3113
|
style: $.pickerColumn,
|
|
3111
3114
|
children: [/* @__PURE__ */ A(z, {
|
|
3112
|
-
style: [$.pickerLabel, { color:
|
|
3115
|
+
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3113
3116
|
children: "Hour"
|
|
3114
3117
|
}), /* @__PURE__ */ A(I, {
|
|
3115
3118
|
style: $.picker,
|
|
3116
3119
|
contentContainerStyle: $.pickerContent,
|
|
3117
3120
|
showsVerticalScrollIndicator: !1,
|
|
3118
|
-
children:
|
|
3119
|
-
style: [$.pickerItem,
|
|
3120
|
-
onPress: () =>
|
|
3121
|
+
children: N.map((e) => /* @__PURE__ */ A(V, {
|
|
3122
|
+
style: [$.pickerItem, E === e && { backgroundColor: d.primary }],
|
|
3123
|
+
onPress: () => D(e),
|
|
3121
3124
|
activeOpacity: .7,
|
|
3122
3125
|
children: /* @__PURE__ */ A(z, {
|
|
3123
3126
|
style: [
|
|
3124
3127
|
$.pickerItemText,
|
|
3125
|
-
{ color:
|
|
3126
|
-
|
|
3127
|
-
color:
|
|
3128
|
+
{ color: d.text },
|
|
3129
|
+
E === e && {
|
|
3130
|
+
color: d.background,
|
|
3128
3131
|
fontWeight: "600"
|
|
3129
3132
|
}
|
|
3130
3133
|
],
|
|
@@ -3134,28 +3137,28 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3134
3137
|
})]
|
|
3135
3138
|
}),
|
|
3136
3139
|
/* @__PURE__ */ A(z, {
|
|
3137
|
-
style: [$.pickerSeparator, { color:
|
|
3140
|
+
style: [$.pickerSeparator, { color: d.text }],
|
|
3138
3141
|
children: ":"
|
|
3139
3142
|
}),
|
|
3140
|
-
/* @__PURE__ */ j(
|
|
3143
|
+
/* @__PURE__ */ j(H, {
|
|
3141
3144
|
style: $.pickerColumn,
|
|
3142
3145
|
children: [/* @__PURE__ */ A(z, {
|
|
3143
|
-
style: [$.pickerLabel, { color:
|
|
3146
|
+
style: [$.pickerLabel, { color: d.textMuted }],
|
|
3144
3147
|
children: "Minute"
|
|
3145
3148
|
}), /* @__PURE__ */ A(I, {
|
|
3146
3149
|
style: $.picker,
|
|
3147
3150
|
contentContainerStyle: $.pickerContent,
|
|
3148
3151
|
showsVerticalScrollIndicator: !1,
|
|
3149
|
-
children:
|
|
3150
|
-
style: [$.pickerItem,
|
|
3151
|
-
onPress: () =>
|
|
3152
|
+
children: P.map((e) => /* @__PURE__ */ A(V, {
|
|
3153
|
+
style: [$.pickerItem, O === e && { backgroundColor: d.primary }],
|
|
3154
|
+
onPress: () => M(e),
|
|
3152
3155
|
activeOpacity: .7,
|
|
3153
3156
|
children: /* @__PURE__ */ A(z, {
|
|
3154
3157
|
style: [
|
|
3155
3158
|
$.pickerItemText,
|
|
3156
|
-
{ color:
|
|
3157
|
-
|
|
3158
|
-
color:
|
|
3159
|
+
{ color: d.text },
|
|
3160
|
+
O === e && {
|
|
3161
|
+
color: d.background,
|
|
3159
3162
|
fontWeight: "600"
|
|
3160
3163
|
}
|
|
3161
3164
|
],
|
|
@@ -3166,26 +3169,26 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3166
3169
|
})
|
|
3167
3170
|
]
|
|
3168
3171
|
}),
|
|
3169
|
-
/* @__PURE__ */ A(
|
|
3170
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3171
|
-
onPress:
|
|
3172
|
+
/* @__PURE__ */ A(V, {
|
|
3173
|
+
style: [$.confirmButton, { backgroundColor: d.primary }],
|
|
3174
|
+
onPress: ne,
|
|
3172
3175
|
activeOpacity: .7,
|
|
3173
3176
|
children: /* @__PURE__ */ A(z, {
|
|
3174
|
-
style: [$.confirmButtonText, { color:
|
|
3175
|
-
children:
|
|
3177
|
+
style: [$.confirmButtonText, { color: d.background }],
|
|
3178
|
+
children: c ? "Next" : "Confirm"
|
|
3176
3179
|
})
|
|
3177
3180
|
})
|
|
3178
3181
|
]
|
|
3179
3182
|
})
|
|
3180
3183
|
})
|
|
3181
3184
|
}),
|
|
3182
|
-
|
|
3183
|
-
style: [$.error, { color:
|
|
3184
|
-
children:
|
|
3185
|
+
r && /* @__PURE__ */ A(z, {
|
|
3186
|
+
style: [$.error, { color: d.error }],
|
|
3187
|
+
children: r
|
|
3185
3188
|
}),
|
|
3186
|
-
|
|
3187
|
-
style: [$.helperText, { color:
|
|
3188
|
-
children:
|
|
3189
|
+
a && !r && /* @__PURE__ */ A(z, {
|
|
3190
|
+
style: [$.helperText, { color: d.textMuted }],
|
|
3191
|
+
children: a
|
|
3189
3192
|
})
|
|
3190
3193
|
]
|
|
3191
3194
|
});
|
|
@@ -3290,75 +3293,75 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3290
3293
|
flex: 1,
|
|
3291
3294
|
fontSize: 14
|
|
3292
3295
|
}
|
|
3293
|
-
}),
|
|
3296
|
+
}), Re = ({ node: e }) => /* @__PURE__ */ j(z, { children: [
|
|
3294
3297
|
"TODO: Implement ",
|
|
3295
3298
|
e.data.type,
|
|
3296
3299
|
" input for React Native"
|
|
3297
|
-
] }),
|
|
3300
|
+
] }), ze = {
|
|
3298
3301
|
address: ce,
|
|
3299
3302
|
autocomplete: le,
|
|
3300
|
-
checkbox:
|
|
3301
|
-
date:
|
|
3302
|
-
daterange:
|
|
3303
|
-
file:
|
|
3304
|
-
hidden:
|
|
3305
|
-
http:
|
|
3306
|
-
number:
|
|
3307
|
-
password:
|
|
3308
|
-
radio:
|
|
3309
|
-
select:
|
|
3310
|
-
submit:
|
|
3311
|
-
switch:
|
|
3312
|
-
text:
|
|
3313
|
-
textarea:
|
|
3314
|
-
time:
|
|
3315
|
-
timerange:
|
|
3316
|
-
},
|
|
3317
|
-
let
|
|
3318
|
-
return /* @__PURE__ */ j(
|
|
3303
|
+
checkbox: ue,
|
|
3304
|
+
date: de,
|
|
3305
|
+
daterange: fe,
|
|
3306
|
+
file: pe,
|
|
3307
|
+
hidden: me,
|
|
3308
|
+
http: Ce,
|
|
3309
|
+
number: we,
|
|
3310
|
+
password: Ee,
|
|
3311
|
+
radio: Oe,
|
|
3312
|
+
select: ke,
|
|
3313
|
+
submit: Re,
|
|
3314
|
+
switch: Ae,
|
|
3315
|
+
text: Pe,
|
|
3316
|
+
textarea: Me,
|
|
3317
|
+
time: Ie,
|
|
3318
|
+
timerange: Le
|
|
3319
|
+
}, Be = ({ label: e, children: t, isFirstStep: n, isLastStep: r, canContinue: i, isSubmitting: a, onBack: o, onContinue: s }) => {
|
|
3320
|
+
let c = g(), { colors: l } = y(), u = !i || a;
|
|
3321
|
+
return /* @__PURE__ */ j(H, { children: [
|
|
3319
3322
|
e ? /* @__PURE__ */ A(z, {
|
|
3320
|
-
style: [
|
|
3323
|
+
style: [Ve.label, { color: l.text }],
|
|
3321
3324
|
children: e
|
|
3322
3325
|
}) : null,
|
|
3323
|
-
/* @__PURE__ */ A(
|
|
3324
|
-
style:
|
|
3326
|
+
/* @__PURE__ */ A(H, {
|
|
3327
|
+
style: Ve.content,
|
|
3325
3328
|
children: t
|
|
3326
3329
|
}),
|
|
3327
|
-
/* @__PURE__ */ j(
|
|
3328
|
-
style:
|
|
3329
|
-
children: [n ? /* @__PURE__ */ A(
|
|
3330
|
+
/* @__PURE__ */ j(H, {
|
|
3331
|
+
style: Ve.actions,
|
|
3332
|
+
children: [n ? /* @__PURE__ */ A(H, {}) : /* @__PURE__ */ A(V, {
|
|
3330
3333
|
style: [
|
|
3331
|
-
|
|
3332
|
-
{ borderColor:
|
|
3333
|
-
|
|
3334
|
+
Ve.backButton,
|
|
3335
|
+
{ borderColor: l.border },
|
|
3336
|
+
a && Ve.disabled
|
|
3334
3337
|
],
|
|
3335
|
-
onPress:
|
|
3336
|
-
disabled:
|
|
3338
|
+
onPress: o,
|
|
3339
|
+
disabled: a,
|
|
3337
3340
|
activeOpacity: .7,
|
|
3338
3341
|
children: /* @__PURE__ */ A(z, {
|
|
3339
|
-
style: [
|
|
3340
|
-
children:
|
|
3342
|
+
style: [Ve.backButtonText, { color: l.text }],
|
|
3343
|
+
children: c("renderer.step.back")
|
|
3341
3344
|
})
|
|
3342
|
-
}), /* @__PURE__ */ A(
|
|
3345
|
+
}), /* @__PURE__ */ A(V, {
|
|
3343
3346
|
style: [
|
|
3344
|
-
|
|
3345
|
-
{ backgroundColor:
|
|
3346
|
-
|
|
3347
|
-
backgroundColor:
|
|
3347
|
+
Ve.continueButton,
|
|
3348
|
+
{ backgroundColor: l.primary },
|
|
3349
|
+
u && {
|
|
3350
|
+
backgroundColor: l.primaryDisabled,
|
|
3348
3351
|
opacity: .6
|
|
3349
3352
|
}
|
|
3350
3353
|
],
|
|
3351
|
-
onPress:
|
|
3352
|
-
disabled:
|
|
3354
|
+
onPress: s,
|
|
3355
|
+
disabled: u,
|
|
3353
3356
|
activeOpacity: .7,
|
|
3354
|
-
children:
|
|
3355
|
-
style: [
|
|
3356
|
-
children:
|
|
3357
|
+
children: a ? /* @__PURE__ */ A(M, { color: l.primaryForeground }) : /* @__PURE__ */ A(z, {
|
|
3358
|
+
style: [Ve.continueButtonText, { color: l.primaryForeground }],
|
|
3359
|
+
children: c(r ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")
|
|
3357
3360
|
})
|
|
3358
3361
|
})]
|
|
3359
3362
|
})
|
|
3360
3363
|
] });
|
|
3361
|
-
},
|
|
3364
|
+
}, Ve = L.create({
|
|
3362
3365
|
actions: {
|
|
3363
3366
|
alignItems: "center",
|
|
3364
3367
|
flexDirection: "row",
|
|
@@ -3393,11 +3396,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3393
3396
|
fontWeight: "600",
|
|
3394
3397
|
marginBottom: 12
|
|
3395
3398
|
}
|
|
3396
|
-
}),
|
|
3397
|
-
let { colors: i } =
|
|
3398
|
-
return /* @__PURE__ */ A(
|
|
3399
|
+
}), He = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3400
|
+
let { colors: i } = y();
|
|
3401
|
+
return /* @__PURE__ */ A(V, {
|
|
3399
3402
|
style: [
|
|
3400
|
-
|
|
3403
|
+
Ue.button,
|
|
3401
3404
|
{ backgroundColor: i.primary },
|
|
3402
3405
|
(t || n) && {
|
|
3403
3406
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3408,11 +3411,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3408
3411
|
onPress: r,
|
|
3409
3412
|
activeOpacity: .7,
|
|
3410
3413
|
children: n ? /* @__PURE__ */ A(M, { color: i.primaryForeground }) : /* @__PURE__ */ A(z, {
|
|
3411
|
-
style: [
|
|
3414
|
+
style: [Ue.buttonText, { color: i.primaryForeground }],
|
|
3412
3415
|
children: e
|
|
3413
3416
|
})
|
|
3414
3417
|
});
|
|
3415
|
-
},
|
|
3418
|
+
}, Ue = L.create({
|
|
3416
3419
|
button: {
|
|
3417
3420
|
alignItems: "center",
|
|
3418
3421
|
borderRadius: 6,
|
|
@@ -3425,16 +3428,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3425
3428
|
fontSize: 16,
|
|
3426
3429
|
fontWeight: "600"
|
|
3427
3430
|
}
|
|
3428
|
-
}),
|
|
3429
|
-
let t =
|
|
3431
|
+
}), We = ({ children: e }) => e, Ge = ({ node: e }) => {
|
|
3432
|
+
let t = g(), { colors: n } = y(), r = t(e.data?.label);
|
|
3430
3433
|
return /* @__PURE__ */ A(z, {
|
|
3431
|
-
style: [
|
|
3432
|
-
children:
|
|
3434
|
+
style: [qe.title, { color: n.text }],
|
|
3435
|
+
children: r
|
|
3433
3436
|
});
|
|
3434
|
-
},
|
|
3435
|
-
let { colors: e } =
|
|
3436
|
-
return /* @__PURE__ */ A(
|
|
3437
|
-
},
|
|
3437
|
+
}, Ke = () => {
|
|
3438
|
+
let { colors: e } = y();
|
|
3439
|
+
return /* @__PURE__ */ A(H, { style: [qe.divider, { backgroundColor: e.separator }] });
|
|
3440
|
+
}, qe = L.create({
|
|
3438
3441
|
divider: {
|
|
3439
3442
|
height: 1,
|
|
3440
3443
|
marginBottom: 16,
|
|
@@ -3445,23 +3448,23 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3445
3448
|
fontWeight: "700",
|
|
3446
3449
|
marginBottom: 16
|
|
3447
3450
|
}
|
|
3448
|
-
}),
|
|
3449
|
-
divider:
|
|
3450
|
-
title:
|
|
3451
|
-
},
|
|
3451
|
+
}), Je = {
|
|
3452
|
+
divider: Ke,
|
|
3453
|
+
title: Ge
|
|
3454
|
+
}, Ye = ({ node: e, children: t }) => {
|
|
3452
3455
|
let { image: n } = e.data;
|
|
3453
|
-
return /* @__PURE__ */ j(
|
|
3456
|
+
return /* @__PURE__ */ j(H, { children: [n && /* @__PURE__ */ A(ne, {
|
|
3454
3457
|
source: { uri: n },
|
|
3455
|
-
style:
|
|
3458
|
+
style: Xe.image,
|
|
3456
3459
|
resizeMode: "cover"
|
|
3457
3460
|
}), t] });
|
|
3458
|
-
},
|
|
3461
|
+
}, Xe = L.create({ image: {
|
|
3459
3462
|
borderRadius: 6,
|
|
3460
3463
|
height: 160,
|
|
3461
3464
|
marginBottom: 8,
|
|
3462
3465
|
width: "100%"
|
|
3463
|
-
} }),
|
|
3464
|
-
let { colors: t } =
|
|
3466
|
+
} }), Ze = ({ style: e }) => {
|
|
3467
|
+
let { colors: t } = y(), n = O(new P.Value(.5)).current;
|
|
3465
3468
|
return E(() => {
|
|
3466
3469
|
let e = P.loop(P.sequence([P.timing(n, {
|
|
3467
3470
|
duration: 600,
|
|
@@ -3474,34 +3477,34 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3474
3477
|
})]));
|
|
3475
3478
|
return e.start(), () => e.stop();
|
|
3476
3479
|
}, [n]), /* @__PURE__ */ A(P.View, { style: [
|
|
3477
|
-
|
|
3480
|
+
$e.bar,
|
|
3478
3481
|
{
|
|
3479
3482
|
backgroundColor: t.muted,
|
|
3480
3483
|
opacity: n
|
|
3481
3484
|
},
|
|
3482
3485
|
e
|
|
3483
3486
|
] });
|
|
3484
|
-
},
|
|
3487
|
+
}, Qe = () => /* @__PURE__ */ j(H, {
|
|
3485
3488
|
accessibilityState: { busy: !0 },
|
|
3486
3489
|
children: [
|
|
3487
|
-
/* @__PURE__ */ A(
|
|
3488
|
-
/* @__PURE__ */ A(
|
|
3489
|
-
style:
|
|
3490
|
+
/* @__PURE__ */ A(Ze, { style: $e.title }),
|
|
3491
|
+
/* @__PURE__ */ A(H, {
|
|
3492
|
+
style: $e.fields,
|
|
3490
3493
|
children: [
|
|
3491
3494
|
0,
|
|
3492
3495
|
1,
|
|
3493
3496
|
2
|
|
3494
|
-
].map((e) => /* @__PURE__ */ j(
|
|
3495
|
-
style:
|
|
3496
|
-
children: [/* @__PURE__ */ A(
|
|
3497
|
+
].map((e) => /* @__PURE__ */ j(H, {
|
|
3498
|
+
style: $e.field,
|
|
3499
|
+
children: [/* @__PURE__ */ A(Ze, { style: $e.fieldLabel }), /* @__PURE__ */ A(Ze, { style: $e.fieldInput })]
|
|
3497
3500
|
}, e))
|
|
3498
3501
|
}),
|
|
3499
|
-
/* @__PURE__ */ A(
|
|
3500
|
-
style:
|
|
3501
|
-
children: /* @__PURE__ */ A(
|
|
3502
|
+
/* @__PURE__ */ A(H, {
|
|
3503
|
+
style: $e.actions,
|
|
3504
|
+
children: /* @__PURE__ */ A(Ze, { style: $e.button })
|
|
3502
3505
|
})
|
|
3503
3506
|
]
|
|
3504
|
-
}),
|
|
3507
|
+
}), $e = L.create({
|
|
3505
3508
|
actions: {
|
|
3506
3509
|
alignItems: "flex-end",
|
|
3507
3510
|
marginTop: 24
|
|
@@ -3526,101 +3529,101 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3526
3529
|
marginBottom: 24,
|
|
3527
3530
|
width: "33%"
|
|
3528
3531
|
}
|
|
3529
|
-
}),
|
|
3530
|
-
let { colors: g } =
|
|
3532
|
+
}), et = ({ components: e, contentContainerStyle: t, flows: r, googleApiKey: i, headers: a, initialValues: o, isLoading: s = !1, language: c, onChange: l, onSubmit: u, style: d, theme: f, validate: p, validationMode: m }) => {
|
|
3533
|
+
let { colors: g } = y(), { canContinueStep: _, canSubmit: v, clearSubmitMessage: b, config: x, currentStep: C, currentStepGroupNode: ee, currentStepIndex: w, formErrors: T, formValues: E, goToNextStep: O, goToPreviousStep: k, handleSubmit: M, inputNodes: N, isFirstStep: P, isLastStep: F, isSubmitting: ne, missingRequiredFields: re, setFieldValue: L, steps: R, submitMessage: B, t: V } = h({
|
|
3531
3534
|
components: e,
|
|
3532
|
-
flows:
|
|
3533
|
-
googleApiKey:
|
|
3534
|
-
headers:
|
|
3535
|
-
initialValues:
|
|
3536
|
-
language:
|
|
3537
|
-
onChange:
|
|
3538
|
-
onSubmit:
|
|
3539
|
-
theme:
|
|
3540
|
-
validate:
|
|
3541
|
-
validationMode:
|
|
3542
|
-
}), { FormWrapper:
|
|
3543
|
-
config:
|
|
3535
|
+
flows: r,
|
|
3536
|
+
googleApiKey: i,
|
|
3537
|
+
headers: a,
|
|
3538
|
+
initialValues: o,
|
|
3539
|
+
language: c,
|
|
3540
|
+
onChange: l,
|
|
3541
|
+
onSubmit: u,
|
|
3542
|
+
theme: f,
|
|
3543
|
+
validate: p,
|
|
3544
|
+
validationMode: m
|
|
3545
|
+
}), { FormWrapper: ae, SubmitButtonWrapper: oe, renderNode: se } = S({
|
|
3546
|
+
config: x,
|
|
3544
3547
|
DefaultFormWrapper: ie,
|
|
3545
|
-
DefaultInputWrapper:
|
|
3546
|
-
DefaultSubmitButton:
|
|
3547
|
-
DefaultSubmitButtonWrapper:
|
|
3548
|
-
defaultInputRenderers:
|
|
3549
|
-
defaultUI:
|
|
3550
|
-
formErrors:
|
|
3551
|
-
formValues:
|
|
3552
|
-
missingRequiredFields:
|
|
3553
|
-
setFieldValue:
|
|
3554
|
-
}),
|
|
3548
|
+
DefaultInputWrapper: Ye,
|
|
3549
|
+
DefaultSubmitButton: He,
|
|
3550
|
+
DefaultSubmitButtonWrapper: We,
|
|
3551
|
+
defaultInputRenderers: ze,
|
|
3552
|
+
defaultUI: Je,
|
|
3553
|
+
formErrors: T,
|
|
3554
|
+
formValues: E,
|
|
3555
|
+
missingRequiredFields: re,
|
|
3556
|
+
setFieldValue: L
|
|
3557
|
+
}), ce = x.components.step ?? Be, U = x.components.loadingSkeleton ?? Qe, le = D(() => V(ee?.data?.label), [V, ee]), W = te(() => {
|
|
3555
3558
|
if (F) {
|
|
3556
|
-
|
|
3559
|
+
M();
|
|
3557
3560
|
return;
|
|
3558
3561
|
}
|
|
3559
|
-
|
|
3562
|
+
O();
|
|
3560
3563
|
}, [
|
|
3561
3564
|
F,
|
|
3562
|
-
|
|
3563
|
-
|
|
3565
|
+
M,
|
|
3566
|
+
O
|
|
3564
3567
|
]);
|
|
3565
3568
|
return /* @__PURE__ */ A(I, {
|
|
3566
3569
|
nestedScrollEnabled: !0,
|
|
3567
3570
|
style: [
|
|
3568
|
-
|
|
3571
|
+
nt.container,
|
|
3569
3572
|
{ backgroundColor: g.background },
|
|
3570
|
-
|
|
3573
|
+
d
|
|
3571
3574
|
],
|
|
3572
3575
|
contentContainerStyle: t,
|
|
3573
|
-
children:
|
|
3576
|
+
children: s ? /* @__PURE__ */ A(U, {}) : /* @__PURE__ */ j(n, {
|
|
3574
3577
|
value: {
|
|
3575
|
-
flows:
|
|
3576
|
-
formErrors:
|
|
3577
|
-
formValues:
|
|
3578
|
-
googleApiKey:
|
|
3579
|
-
headers:
|
|
3580
|
-
inputNodes:
|
|
3581
|
-
language:
|
|
3582
|
-
setFieldValue:
|
|
3578
|
+
flows: r,
|
|
3579
|
+
formErrors: T,
|
|
3580
|
+
formValues: E,
|
|
3581
|
+
googleApiKey: x.googleApiKey,
|
|
3582
|
+
headers: x.headers,
|
|
3583
|
+
inputNodes: N,
|
|
3584
|
+
language: x.language,
|
|
3585
|
+
setFieldValue: L
|
|
3583
3586
|
},
|
|
3584
|
-
children: [/* @__PURE__ */ j(
|
|
3585
|
-
onSubmit:
|
|
3586
|
-
children: [C && /* @__PURE__ */ A(
|
|
3587
|
-
missingFields: F ?
|
|
3588
|
-
children: /* @__PURE__ */ A(
|
|
3587
|
+
children: [/* @__PURE__ */ j(ae, {
|
|
3588
|
+
onSubmit: M,
|
|
3589
|
+
children: [C && /* @__PURE__ */ A(oe, {
|
|
3590
|
+
missingFields: F ? re : void 0,
|
|
3591
|
+
children: /* @__PURE__ */ A(ce, {
|
|
3589
3592
|
step: C,
|
|
3590
|
-
groupNode:
|
|
3591
|
-
stepIndex:
|
|
3592
|
-
totalSteps:
|
|
3593
|
-
isFirstStep:
|
|
3593
|
+
groupNode: ee,
|
|
3594
|
+
stepIndex: w,
|
|
3595
|
+
totalSteps: R.length,
|
|
3596
|
+
isFirstStep: P,
|
|
3594
3597
|
isLastStep: F,
|
|
3595
|
-
canContinue:
|
|
3598
|
+
canContinue: _ && (!F || v),
|
|
3596
3599
|
isSubmitting: ne,
|
|
3597
|
-
onBack:
|
|
3600
|
+
onBack: k,
|
|
3598
3601
|
onContinue: W,
|
|
3599
|
-
label:
|
|
3600
|
-
children: C.nodes.map((e) =>
|
|
3602
|
+
label: le,
|
|
3603
|
+
children: C.nodes.map((e) => se(e))
|
|
3601
3604
|
})
|
|
3602
3605
|
}), /* @__PURE__ */ A(z, {
|
|
3603
|
-
style: [
|
|
3606
|
+
style: [nt.poweredBy, { color: g.textMuted }],
|
|
3604
3607
|
children: "Powered by Treege"
|
|
3605
3608
|
})]
|
|
3606
|
-
}), B && /* @__PURE__ */ j(
|
|
3607
|
-
style: [
|
|
3609
|
+
}), B && /* @__PURE__ */ j(H, {
|
|
3610
|
+
style: [nt.message, { backgroundColor: B.type === "success" ? g.successBg : g.errorBg }],
|
|
3608
3611
|
children: [/* @__PURE__ */ A(z, {
|
|
3609
|
-
style: [
|
|
3612
|
+
style: [nt.messageText, { color: B.type === "success" ? g.success : g.error }],
|
|
3610
3613
|
children: B.message
|
|
3611
3614
|
}), /* @__PURE__ */ A(z, {
|
|
3612
|
-
style: [
|
|
3613
|
-
onPress:
|
|
3614
|
-
children:
|
|
3615
|
+
style: [nt.messageClose, { color: B.type === "success" ? g.success : g.error }],
|
|
3616
|
+
onPress: b,
|
|
3617
|
+
children: V("common.close")
|
|
3615
3618
|
})]
|
|
3616
3619
|
})]
|
|
3617
3620
|
})
|
|
3618
3621
|
});
|
|
3619
|
-
},
|
|
3622
|
+
}, tt = (e) => /* @__PURE__ */ A(ee, {
|
|
3620
3623
|
theme: e.theme,
|
|
3621
3624
|
storageKey: "treege-renderer-theme",
|
|
3622
|
-
children: /* @__PURE__ */ A(
|
|
3623
|
-
}),
|
|
3625
|
+
children: /* @__PURE__ */ A(et, { ...e })
|
|
3626
|
+
}), nt = L.create({
|
|
3624
3627
|
container: { flex: 1 },
|
|
3625
3628
|
message: {
|
|
3626
3629
|
borderRadius: 6,
|
|
@@ -3643,4 +3646,4 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3643
3646
|
}
|
|
3644
3647
|
});
|
|
3645
3648
|
//#endregion
|
|
3646
|
-
export { ce as DefaultAddressInput, le as DefaultAutocompleteInput,
|
|
3649
|
+
export { ce as DefaultAddressInput, le as DefaultAutocompleteInput, ue as DefaultCheckboxInput, de as DefaultDateInput, fe as DefaultDateRangeInput, Ke as DefaultDividerUI, pe as DefaultFileInput, me as DefaultHiddenInput, Ce as DefaultHttpInput, we as DefaultNumberInput, Ee as DefaultPasswordInput, Oe as DefaultRadioInput, ke as DefaultSelectInput, Re as DefaultSubmitInput, Ae as DefaultSwitchInput, Pe as DefaultTextInput, Me as DefaultTextareaInput, Ie as DefaultTimeInput, Le as DefaultTimeRangeInput, Ge as DefaultTitleUI, w as TreegeConfigProvider, tt as TreegeRenderer, f as applyReferenceTransformation, x as calculateReferenceFieldUpdates, v as checkFormFieldHasValue, m as convertFormValuesToNamedFormat, ze as defaultInputRenderers, Je as defaultUI, u as evaluateCondition, _ as evaluateConditions, l as fileToSerializable, T as filesToSerializable, c as findStartNode, b as getFlowRenderState, i as getTranslatedText, p as isFieldEmpty, C as isStartNode, _e as sanitize, ye as sanitizeHttpResponse, a as serializableToFile, d as useTreegeConfig, h as useTreegeRenderer };
|