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