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