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