treege 3.0.0-beta.55 → 3.0.0-beta.57
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-CoJrOYMe.js +1859 -0
- package/dist/ThemeContext-BhIeqgqN.js +1398 -0
- package/dist/editor/constants/edgeTypes.d.ts +1 -1
- package/dist/editor/context/TreegeEditorContext.d.ts +8 -1
- package/dist/editor/features/TreegeEditor/TreegeEditor.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/edges/DefaultEdge.d.ts +1 -1
- package/dist/editor/features/TreegeEditor/forms/OptionsMappingFields.d.ts +34 -0
- package/dist/editor/features/TreegeEditor/forms/SensitiveHeaderWarning.d.ts +13 -0
- package/dist/editor/features/TreegeEditor/nodes/components/BottomHandleDropdown.d.ts +18 -2
- package/dist/editor/features/TreegeEditor/nodes/components/NodeTypePickerMenuContent.d.ts +12 -0
- package/dist/editor/types/editor.d.ts +19 -1
- package/dist/editor/utils/cleanNodeConfig.d.ts +5 -0
- package/dist/editor/utils/edge.d.ts +37 -1
- package/dist/editor/utils/sensitiveHeaders.d.ts +15 -0
- package/dist/editor-D3cbfAxI.js +6232 -0
- package/dist/editor.js +2 -2
- package/dist/main.js +4 -4
- 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 +18 -18
- 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/types/renderer.d.ts +62 -23
- package/dist/renderer/utils/http.d.ts +13 -1
- package/dist/renderer/utils/node.d.ts +11 -0
- package/dist/renderer/utils/templateDependencies.d.ts +17 -0
- package/dist/renderer-native.js +1251 -1216
- package/dist/renderer.js +3 -3
- package/dist/shared/constants/inputType.d.ts +5 -0
- package/dist/shared/locales/ar.json.d.ts +20 -1
- package/dist/shared/locales/de.json.d.ts +20 -1
- package/dist/shared/locales/en.json.d.ts +20 -1
- package/dist/shared/locales/es.json.d.ts +20 -1
- package/dist/shared/locales/fr.json.d.ts +20 -1
- package/dist/shared/locales/it.json.d.ts +20 -1
- package/dist/shared/locales/pt.json.d.ts +20 -1
- package/dist/shared/types/node.d.ts +20 -0
- package/package.json +1 -1
- package/dist/DefaultInputs-BbfholiM.js +0 -1799
- package/dist/ThemeContext-C9418UR6.js +0 -1354
- package/dist/editor-DgUCBTZ0.js +0 -5831
package/dist/renderer-native.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { E as e,
|
|
1
|
+
import { E as e, M as t, N as n, O as r, R as i, S as a, a as o, b as s, c, d as l, f as u, g as d, h as f, i 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 } from "./ThemeContext-BhIeqgqN.js";
|
|
2
2
|
import { useCallback as ee, useEffect as E, useMemo as D, useRef as O, useState as k } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { ActivityIndicator as
|
|
3
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
4
|
+
import { ActivityIndicator as N, Alert as P, Animated as F, FlatList as te, Image as ne, Modal as re, ScrollView as I, StyleSheet as L, Switch as R, Text as z, TextInput as B, TouchableOpacity as V, View as H } from "react-native";
|
|
5
5
|
//#region src/renderer/features/TreegeRenderer/native/components/DefaultFormWrapper.tsx
|
|
6
|
-
var ie = ({ children: e }) => /* @__PURE__ */
|
|
6
|
+
var ie = ({ children: e }) => /* @__PURE__ */ j(H, {
|
|
7
7
|
style: ae.container,
|
|
8
8
|
children: e
|
|
9
9
|
}), ae = L.create({ container: { padding: 16 } }), oe = async (e, t) => {
|
|
@@ -34,147 +34,147 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
34
34
|
} catch (e) {
|
|
35
35
|
return console.error("Google Places fetch error:", e), [];
|
|
36
36
|
}
|
|
37
|
-
}, ce = (
|
|
38
|
-
let [
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
37
|
+
}, ce = (e, t) => {
|
|
38
|
+
let [i, a] = k(""), [o, s] = k([]), [c, l] = k(!1), [u, d] = k(!1), { value: f, placeholder: p, id: m, name: h } = e, { node: _, setValue: v, error: y, label: b, helperText: x } = t, { language: S, googleApiKey: C } = n(), w = r(), { colors: T } = g(), D = ee((e) => {
|
|
39
|
+
v(e.value), a(""), l(!1), s([]);
|
|
40
|
+
}, [v]), O = () => {
|
|
41
|
+
l(!1);
|
|
42
42
|
};
|
|
43
43
|
return E(() => {
|
|
44
|
-
if (!
|
|
45
|
-
|
|
44
|
+
if (!i || i.trim().length < 3) {
|
|
45
|
+
s([]), d(!1);
|
|
46
46
|
return;
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
d(!0);
|
|
49
49
|
let e = setTimeout(async () => {
|
|
50
|
-
|
|
50
|
+
s(C ? await se(i, C) : await oe(i, S)), d(!1);
|
|
51
51
|
}, 300);
|
|
52
52
|
return () => {
|
|
53
|
-
clearTimeout(e),
|
|
53
|
+
clearTimeout(e), d(!1);
|
|
54
54
|
};
|
|
55
55
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
]), /* @__PURE__ */
|
|
60
|
-
style:
|
|
56
|
+
i,
|
|
57
|
+
S,
|
|
58
|
+
C
|
|
59
|
+
]), /* @__PURE__ */ M(H, {
|
|
60
|
+
style: U.container,
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
style: [
|
|
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: () => l(!0),
|
|
79
79
|
activeOpacity: .7,
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ j(z, {
|
|
81
81
|
style: [
|
|
82
|
-
|
|
83
|
-
{ color:
|
|
84
|
-
!
|
|
82
|
+
U.triggerText,
|
|
83
|
+
{ color: T.text },
|
|
84
|
+
!f && { color: T.textMuted }
|
|
85
85
|
],
|
|
86
86
|
numberOfLines: 1,
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */
|
|
89
|
-
style:
|
|
87
|
+
children: f || p || w("renderer.defaultAddressInput.enterAddress")
|
|
88
|
+
}), /* @__PURE__ */ j(z, {
|
|
89
|
+
style: U.icon,
|
|
90
90
|
children: "📍"
|
|
91
91
|
})]
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
visible:
|
|
93
|
+
/* @__PURE__ */ j(re, {
|
|
94
|
+
visible: c,
|
|
95
95
|
transparent: !0,
|
|
96
96
|
animationType: "fade",
|
|
97
|
-
onRequestClose:
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
style:
|
|
97
|
+
onRequestClose: O,
|
|
98
|
+
children: /* @__PURE__ */ j(V, {
|
|
99
|
+
style: U.modalOverlay,
|
|
100
100
|
activeOpacity: 1,
|
|
101
|
-
onPress:
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
-
style: [
|
|
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: [
|
|
109
|
-
children: [/* @__PURE__ */
|
|
110
|
-
style: [
|
|
111
|
-
children:
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
onPress:
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
style: [
|
|
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__ */
|
|
121
|
-
style:
|
|
122
|
-
children: [/* @__PURE__ */
|
|
123
|
-
style: [
|
|
124
|
-
backgroundColor:
|
|
125
|
-
borderColor:
|
|
126
|
-
color:
|
|
120
|
+
/* @__PURE__ */ M(H, {
|
|
121
|
+
style: U.searchContainer,
|
|
122
|
+
children: [/* @__PURE__ */ j(B, {
|
|
123
|
+
style: [U.searchInput, {
|
|
124
|
+
backgroundColor: T.muted,
|
|
125
|
+
borderColor: T.border,
|
|
126
|
+
color: T.text
|
|
127
127
|
}],
|
|
128
|
-
placeholder:
|
|
129
|
-
placeholderTextColor:
|
|
130
|
-
value:
|
|
131
|
-
onChangeText:
|
|
128
|
+
placeholder: p || w("renderer.defaultAddressInput.enterAddress"),
|
|
129
|
+
placeholderTextColor: T.textMuted,
|
|
130
|
+
value: i,
|
|
131
|
+
onChangeText: a,
|
|
132
132
|
autoFocus: !0,
|
|
133
133
|
autoCapitalize: "none",
|
|
134
134
|
autoCorrect: !1
|
|
135
|
-
}),
|
|
135
|
+
}), u && /* @__PURE__ */ j(N, {
|
|
136
136
|
size: "small",
|
|
137
|
-
color:
|
|
138
|
-
style:
|
|
137
|
+
color: T.primary,
|
|
138
|
+
style: U.searchLoader
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
142
|
-
style:
|
|
143
|
-
children: [/* @__PURE__ */
|
|
141
|
+
u ? /* @__PURE__ */ M(H, {
|
|
142
|
+
style: U.loadingContainer,
|
|
143
|
+
children: [/* @__PURE__ */ j(N, {
|
|
144
144
|
size: "small",
|
|
145
|
-
color:
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
-
style: [
|
|
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(te, {
|
|
151
|
+
data: o,
|
|
152
152
|
keyExtractor: (e, t) => t.toString(),
|
|
153
|
-
style:
|
|
154
|
-
contentContainerStyle:
|
|
153
|
+
style: U.suggestionsList,
|
|
154
|
+
contentContainerStyle: U.suggestionsListContent,
|
|
155
155
|
keyboardShouldPersistTaps: "handled",
|
|
156
|
-
ListEmptyComponent:
|
|
157
|
-
style:
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
style: [
|
|
160
|
-
children:
|
|
156
|
+
ListEmptyComponent: i.length >= 3 ? /* @__PURE__ */ j(H, {
|
|
157
|
+
style: U.emptyContainer,
|
|
158
|
+
children: /* @__PURE__ */ j(z, {
|
|
159
|
+
style: [U.emptyText, { color: T.textMuted }],
|
|
160
|
+
children: w("renderer.defaultAddressInput.noAddressesFound")
|
|
161
161
|
})
|
|
162
|
-
}) : /* @__PURE__ */
|
|
163
|
-
style:
|
|
164
|
-
children: /* @__PURE__ */
|
|
165
|
-
style: [
|
|
166
|
-
children:
|
|
162
|
+
}) : /* @__PURE__ */ j(H, {
|
|
163
|
+
style: U.emptyContainer,
|
|
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__ */
|
|
170
|
-
style:
|
|
171
|
-
onPress: () =>
|
|
169
|
+
renderItem: ({ item: e }) => /* @__PURE__ */ M(V, {
|
|
170
|
+
style: U.suggestionItem,
|
|
171
|
+
onPress: () => D(e),
|
|
172
172
|
activeOpacity: .7,
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
-
style:
|
|
173
|
+
children: [/* @__PURE__ */ j(z, {
|
|
174
|
+
style: U.suggestionIcon,
|
|
175
175
|
children: "📍"
|
|
176
|
-
}), /* @__PURE__ */
|
|
177
|
-
style: [
|
|
176
|
+
}), /* @__PURE__ */ j(z, {
|
|
177
|
+
style: [U.suggestionText, { color: T.text }],
|
|
178
178
|
numberOfLines: 2,
|
|
179
179
|
children: e.label
|
|
180
180
|
})]
|
|
@@ -184,17 +184,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
184
184
|
})
|
|
185
185
|
})
|
|
186
186
|
}),
|
|
187
|
-
|
|
188
|
-
style: [
|
|
189
|
-
children:
|
|
187
|
+
y && /* @__PURE__ */ j(z, {
|
|
188
|
+
style: [U.error, { color: T.error }],
|
|
189
|
+
children: y
|
|
190
190
|
}),
|
|
191
|
-
|
|
192
|
-
style: [
|
|
193
|
-
children:
|
|
191
|
+
x && !y && /* @__PURE__ */ j(z, {
|
|
192
|
+
style: [U.helperText, { color: T.textMuted }],
|
|
193
|
+
children: x
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
});
|
|
197
|
-
},
|
|
197
|
+
}, U = L.create({
|
|
198
198
|
closeButton: {
|
|
199
199
|
fontSize: 24,
|
|
200
200
|
fontWeight: "300"
|
|
@@ -304,126 +304,126 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
304
304
|
flex: 1,
|
|
305
305
|
fontSize: 14
|
|
306
306
|
}
|
|
307
|
-
}), le = (
|
|
308
|
-
let [
|
|
309
|
-
if (!
|
|
310
|
-
let e =
|
|
311
|
-
return
|
|
307
|
+
}), le = (e, t) => {
|
|
308
|
+
let [n, i] = k(!1), [a, o] = k(""), { value: s, placeholder: c } = e, { node: l, setValue: u, error: d, label: f, helperText: p } = t, m = r(), { colors: h } = g(), _ = l.data.options || [], v = _.find((e) => e.value === s), y = D(() => {
|
|
309
|
+
if (!a.trim()) return _;
|
|
310
|
+
let e = a.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
|
+
a,
|
|
315
|
+
m
|
|
316
|
+
]), b = (e) => {
|
|
317
|
+
u(e === s ? "" : e), i(!1), o("");
|
|
318
|
+
}, x = () => {
|
|
319
|
+
i(!1), o("");
|
|
320
320
|
};
|
|
321
|
-
return /* @__PURE__ */
|
|
322
|
-
style:
|
|
321
|
+
return /* @__PURE__ */ M(H, {
|
|
322
|
+
style: W.container,
|
|
323
323
|
children: [
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
style: [
|
|
326
|
-
children: [
|
|
327
|
-
style: { color:
|
|
324
|
+
/* @__PURE__ */ M(z, {
|
|
325
|
+
style: [W.label, { color: h.textSecondary }],
|
|
326
|
+
children: [f || l.data.name, l.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
|
+
d && { borderColor: h.error }
|
|
339
339
|
],
|
|
340
|
-
onPress: () =>
|
|
340
|
+
onPress: () => i(!0),
|
|
341
341
|
activeOpacity: .7,
|
|
342
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ j(z, {
|
|
343
343
|
style: [
|
|
344
|
-
|
|
345
|
-
{ color:
|
|
346
|
-
!
|
|
344
|
+
W.triggerText,
|
|
345
|
+
{ color: h.text },
|
|
346
|
+
!s && { color: h.textMuted }
|
|
347
347
|
],
|
|
348
348
|
numberOfLines: 1,
|
|
349
|
-
children:
|
|
350
|
-
}), /* @__PURE__ */
|
|
351
|
-
style: [
|
|
349
|
+
children: s && v ? m(v.label) : c || 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__ */
|
|
361
|
-
style:
|
|
359
|
+
onRequestClose: x,
|
|
360
|
+
children: /* @__PURE__ */ j(V, {
|
|
361
|
+
style: W.modalOverlay,
|
|
362
362
|
activeOpacity: 1,
|
|
363
|
-
onPress:
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
-
style: [
|
|
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: [
|
|
371
|
-
children: [/* @__PURE__ */
|
|
372
|
-
style: [
|
|
373
|
-
children:
|
|
374
|
-
}), /* @__PURE__ */
|
|
375
|
-
onPress:
|
|
376
|
-
children: /* @__PURE__ */
|
|
377
|
-
style: [
|
|
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: f || l.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__ */
|
|
383
|
-
style:
|
|
384
|
-
children: /* @__PURE__ */
|
|
385
|
-
style: [
|
|
386
|
-
backgroundColor:
|
|
387
|
-
borderColor:
|
|
388
|
-
color:
|
|
382
|
+
/* @__PURE__ */ j(H, {
|
|
383
|
+
style: W.searchContainer,
|
|
384
|
+
children: /* @__PURE__ */ j(B, {
|
|
385
|
+
style: [W.searchInput, {
|
|
386
|
+
backgroundColor: h.muted,
|
|
387
|
+
borderColor: h.border,
|
|
388
|
+
color: h.text
|
|
389
389
|
}],
|
|
390
|
-
placeholder:
|
|
391
|
-
placeholderTextColor:
|
|
392
|
-
value:
|
|
393
|
-
onChangeText:
|
|
390
|
+
placeholder: c || m("renderer.defaultAutocompleteInput.search"),
|
|
391
|
+
placeholderTextColor: h.textMuted,
|
|
392
|
+
value: a,
|
|
393
|
+
onChangeText: o,
|
|
394
394
|
autoFocus: !0,
|
|
395
395
|
autoCapitalize: "none",
|
|
396
396
|
autoCorrect: !1
|
|
397
397
|
})
|
|
398
398
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
data:
|
|
399
|
+
/* @__PURE__ */ j(te, {
|
|
400
|
+
data: y,
|
|
401
401
|
keyExtractor: (e) => e.value,
|
|
402
|
-
style:
|
|
403
|
-
contentContainerStyle:
|
|
404
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
405
|
-
style:
|
|
406
|
-
children: /* @__PURE__ */
|
|
407
|
-
style: [
|
|
408
|
-
children:
|
|
402
|
+
style: W.optionsList,
|
|
403
|
+
contentContainerStyle: W.optionsListContent,
|
|
404
|
+
ListEmptyComponent: /* @__PURE__ */ j(H, {
|
|
405
|
+
style: W.emptyContainer,
|
|
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: [
|
|
415
|
-
onPress: () =>
|
|
412
|
+
let t = e.value === s;
|
|
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
|
-
|
|
421
|
-
{ color:
|
|
422
|
-
e.disabled && { color:
|
|
420
|
+
W.optionText,
|
|
421
|
+
{ color: h.text },
|
|
422
|
+
e.disabled && { color: h.textMuted }
|
|
423
423
|
],
|
|
424
|
-
children:
|
|
425
|
-
}),
|
|
426
|
-
style: [
|
|
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,17 +433,17 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
433
433
|
})
|
|
434
434
|
})
|
|
435
435
|
}),
|
|
436
|
-
|
|
437
|
-
style: [
|
|
438
|
-
children:
|
|
436
|
+
d && /* @__PURE__ */ j(z, {
|
|
437
|
+
style: [W.error, { color: h.error }],
|
|
438
|
+
children: d
|
|
439
439
|
}),
|
|
440
|
-
|
|
441
|
-
style: [
|
|
442
|
-
children:
|
|
440
|
+
p && !d && /* @__PURE__ */ j(z, {
|
|
441
|
+
style: [W.helperText, { color: h.textMuted }],
|
|
442
|
+
children: p
|
|
443
443
|
})
|
|
444
444
|
]
|
|
445
445
|
});
|
|
446
|
-
},
|
|
446
|
+
}, W = L.create({
|
|
447
447
|
arrow: { fontSize: 12 },
|
|
448
448
|
checkmark: {
|
|
449
449
|
fontSize: 18,
|
|
@@ -534,101 +534,101 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
534
534
|
flex: 1,
|
|
535
535
|
fontSize: 14
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
538
|
-
let
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
return /* @__PURE__ */
|
|
537
|
+
}), ue = (e, t) => {
|
|
538
|
+
let n = r(), { value: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g(), d = a.data.options || [], f = d.length > 0, p = Array.isArray(i) ? i : [], m = typeof i == "boolean" ? i : !1, h = (e) => {
|
|
539
|
+
o(f ? p.includes(e) ? p.filter((t) => t !== e) : [...p, e] : !m);
|
|
540
|
+
}, _ = (e) => f ? p.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: u.textSecondary }],
|
|
546
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ j(z, {
|
|
547
|
+
style: { color: u.error },
|
|
548
548
|
children: "*"
|
|
549
549
|
})]
|
|
550
550
|
}),
|
|
551
|
-
|
|
552
|
-
let t =
|
|
553
|
-
return /* @__PURE__ */
|
|
551
|
+
d.length > 0 ? d.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: u.input,
|
|
570
|
+
borderColor: u.border
|
|
571
571
|
},
|
|
572
|
-
|
|
573
|
-
backgroundColor:
|
|
574
|
-
borderColor:
|
|
572
|
+
_(e.value) && {
|
|
573
|
+
backgroundColor: u.primary,
|
|
574
|
+
borderColor: u.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: u.textSecondary },
|
|
587
|
+
e.disabled && { color: u.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: u.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: c || a.data.name,
|
|
604
|
+
children: [/* @__PURE__ */ j(H, {
|
|
605
605
|
style: [
|
|
606
606
|
G.checkbox,
|
|
607
607
|
{
|
|
608
|
-
backgroundColor:
|
|
609
|
-
borderColor:
|
|
608
|
+
backgroundColor: u.input,
|
|
609
|
+
borderColor: u.border
|
|
610
610
|
},
|
|
611
|
-
|
|
612
|
-
backgroundColor:
|
|
613
|
-
borderColor:
|
|
611
|
+
m && {
|
|
612
|
+
backgroundColor: u.primary,
|
|
613
|
+
borderColor: u.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: u.textSecondary }],
|
|
622
|
+
children: c || a.data.name
|
|
623
623
|
})]
|
|
624
624
|
}),
|
|
625
|
-
|
|
626
|
-
style: [G.error, { color:
|
|
627
|
-
children:
|
|
625
|
+
s && /* @__PURE__ */ j(z, {
|
|
626
|
+
style: [G.error, { color: u.error }],
|
|
627
|
+
children: s
|
|
628
628
|
}),
|
|
629
|
-
|
|
630
|
-
style: [G.helperText, { color:
|
|
631
|
-
children:
|
|
629
|
+
l && !s && /* @__PURE__ */ j(z, {
|
|
630
|
+
style: [G.helperText, { color: u.textMuted }],
|
|
631
|
+
children: l
|
|
632
632
|
})
|
|
633
633
|
]
|
|
634
634
|
});
|
|
@@ -672,15 +672,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
672
672
|
},
|
|
673
673
|
optionLabel: { fontSize: 14 },
|
|
674
674
|
optionTextContainer: { flex: 1 }
|
|
675
|
-
}),
|
|
676
|
-
let [
|
|
677
|
-
let e =
|
|
675
|
+
}), de = (e, t) => {
|
|
676
|
+
let [n, i] = k(!1), { value: a, placeholder: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), p = r(), m = a ? new Date(a) : void 0, { year: h, month: _, today: v } = D(() => {
|
|
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] = k(h), [x, S] = k(_), C = [
|
|
684
684
|
"January",
|
|
685
685
|
"February",
|
|
686
686
|
"March",
|
|
@@ -693,127 +693,127 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
693
693
|
"October",
|
|
694
694
|
"November",
|
|
695
695
|
"December"
|
|
696
|
-
],
|
|
697
|
-
let e = new Date(
|
|
696
|
+
], w = D(() => {
|
|
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
|
+
s.data.disablePast && e < v || (c(e.toISOString()), i(!1));
|
|
717
717
|
}, [
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
]),
|
|
722
|
-
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
},
|
|
726
|
-
return /* @__PURE__ */
|
|
718
|
+
s.data.disablePast,
|
|
719
|
+
v,
|
|
720
|
+
c
|
|
721
|
+
]), E = () => {
|
|
722
|
+
x === 0 ? (S(11), b(y - 1)) : S(x - 1);
|
|
723
|
+
}, O = () => {
|
|
724
|
+
x === 11 ? (S(0), b(y + 1)) : S(x + 1);
|
|
725
|
+
}, A = () => m ? m.toLocaleDateString() : o || p("renderer.defaultInputs.selectDate"), N = (e) => s.data.disablePast ? e < v : !1, P = (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: f.textSecondary }],
|
|
731
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
732
|
+
style: { color: f.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: f.input,
|
|
741
|
+
borderColor: f.border
|
|
742
742
|
},
|
|
743
|
-
|
|
743
|
+
l && { borderColor: f.error }
|
|
744
744
|
],
|
|
745
|
-
onPress: () =>
|
|
745
|
+
onPress: () => i(!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: f.text },
|
|
751
|
+
!a && { color: f.textMuted }
|
|
752
752
|
],
|
|
753
753
|
numberOfLines: 1,
|
|
754
|
-
children:
|
|
755
|
-
}), /* @__PURE__ */
|
|
754
|
+
children: A()
|
|
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: () => i(!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: () => i(!1),
|
|
769
|
+
children: /* @__PURE__ */ M(V, {
|
|
770
|
+
style: [K.modalContent, { backgroundColor: f.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: f.separator }],
|
|
776
|
+
children: [/* @__PURE__ */ j(z, {
|
|
777
|
+
style: [K.modalTitle, { color: f.text }],
|
|
778
|
+
children: u || s.data.name
|
|
779
|
+
}), /* @__PURE__ */ j(V, {
|
|
780
|
+
onPress: () => i(!1),
|
|
781
|
+
children: /* @__PURE__ */ j(z, {
|
|
782
|
+
style: [K.closeButton, { color: f.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: f.primary }],
|
|
795
795
|
children: "‹"
|
|
796
796
|
})
|
|
797
797
|
}),
|
|
798
|
-
/* @__PURE__ */
|
|
799
|
-
style: [K.monthYear, { color:
|
|
798
|
+
/* @__PURE__ */ M(z, {
|
|
799
|
+
style: [K.monthYear, { color: f.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: O,
|
|
808
808
|
style: K.navButton,
|
|
809
|
-
children: /* @__PURE__ */
|
|
810
|
-
style: [K.navButtonText, { color:
|
|
809
|
+
children: /* @__PURE__ */ j(z, {
|
|
810
|
+
style: [K.navButtonText, { color: f.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(V, {
|
|
|
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: f.textMuted }],
|
|
828
828
|
children: e
|
|
829
829
|
}, e))
|
|
830
830
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
832
|
-
data:
|
|
831
|
+
/* @__PURE__ */ j(te, {
|
|
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 = N(e.date), n = P(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: f.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: f.text },
|
|
857
|
+
!e.isCurrentMonth && { color: f.textMuted },
|
|
858
858
|
n && {
|
|
859
|
-
color:
|
|
859
|
+
color: f.background,
|
|
860
860
|
fontWeight: "600"
|
|
861
861
|
},
|
|
862
|
-
t && { color:
|
|
862
|
+
t && { color: f.textMuted }
|
|
863
863
|
],
|
|
864
864
|
children: e.day
|
|
865
865
|
})
|
|
@@ -870,13 +870,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
870
870
|
})
|
|
871
871
|
})
|
|
872
872
|
}),
|
|
873
|
-
|
|
874
|
-
style: [K.error, { color:
|
|
875
|
-
children:
|
|
873
|
+
l && /* @__PURE__ */ j(z, {
|
|
874
|
+
style: [K.error, { color: f.error }],
|
|
875
|
+
children: l
|
|
876
876
|
}),
|
|
877
|
-
|
|
878
|
-
style: [K.helperText, { color:
|
|
879
|
-
children:
|
|
877
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
878
|
+
style: [K.helperText, { color: f.textMuted }],
|
|
879
|
+
children: d
|
|
880
880
|
})
|
|
881
881
|
]
|
|
882
882
|
});
|
|
@@ -980,15 +980,15 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
980
980
|
flexDirection: "row",
|
|
981
981
|
marginBottom: 8
|
|
982
982
|
}
|
|
983
|
-
}),
|
|
984
|
-
let [
|
|
985
|
-
let e =
|
|
983
|
+
}), fe = (e, t) => {
|
|
984
|
+
let [n, i] = k(!1), [a, o] = k(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, p = r(), { colors: m } = g(), h = Array.isArray(s) ? s : [], _ = h[0] ? new Date(h[0]) : void 0, v = h[1] ? new Date(h[1]) : void 0, { year: y, month: b, today: x } = D(() => {
|
|
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] = k(y), [w, T] = k(b), E = [
|
|
992
992
|
"January",
|
|
993
993
|
"February",
|
|
994
994
|
"March",
|
|
@@ -1001,141 +1001,141 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1001
1001
|
"October",
|
|
1002
1002
|
"November",
|
|
1003
1003
|
"December"
|
|
1004
|
-
],
|
|
1005
|
-
let e = new Date(
|
|
1004
|
+
], O = D(() => {
|
|
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]), A = ee((e) => {
|
|
1024
|
+
c.data.disablePast && e < x || (a ? (l([e.toISOString(), v?.toISOString()]), o(!1)) : (l(_ && e < _ ? [e.toISOString(), _.toISOString()] : [_?.toISOString(), e.toISOString()]), i(!1), o(!0)));
|
|
1025
1025
|
}, [
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
]),
|
|
1033
|
-
|
|
1034
|
-
},
|
|
1035
|
-
|
|
1036
|
-
},
|
|
1037
|
-
if (!(
|
|
1038
|
-
let t =
|
|
1026
|
+
c.data.disablePast,
|
|
1027
|
+
x,
|
|
1028
|
+
a,
|
|
1029
|
+
_,
|
|
1030
|
+
v,
|
|
1031
|
+
l
|
|
1032
|
+
]), N = () => {
|
|
1033
|
+
w === 0 ? (T(11), C(S - 1)) : T(w - 1);
|
|
1034
|
+
}, P = () => {
|
|
1035
|
+
w === 11 ? (T(0), C(S + 1)) : T(w + 1);
|
|
1036
|
+
}, F = () => _ && v ? `${_.toLocaleDateString()} - ${v.toLocaleDateString()}` : _ ? _.toLocaleDateString() : p("renderer.defaultInputs.selectDateRange"), ne = (e) => c.data.disablePast ? e < x : !1, I = (e) => _ && v ? e >= _ && e <= v : !1, L = (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: [d || c.data.name, c.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
|
+
u && { borderColor: m.error }
|
|
1059
1059
|
],
|
|
1060
|
-
onPress: () =>
|
|
1060
|
+
onPress: () => i(!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: F()
|
|
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: () => i(!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: () => i(!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: d || c.data.name
|
|
1094
|
+
}), /* @__PURE__ */ j(V, {
|
|
1095
|
+
onPress: () => i(!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: p(a ? "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: N,
|
|
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
|
-
w
|
|
1123
|
+
E[w],
|
|
1124
1124
|
" ",
|
|
1125
|
-
|
|
1125
|
+
S
|
|
1126
1126
|
]
|
|
1127
1127
|
}),
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
onPress:
|
|
1128
|
+
/* @__PURE__ */ j(V, {
|
|
1129
|
+
onPress: P,
|
|
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(V, {
|
|
|
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(te, {
|
|
1154
|
+
data: O,
|
|
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 = ne(e.date), n = I(e.date), r = L(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: () => A(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(V, {
|
|
|
1194
1194
|
})
|
|
1195
1195
|
})
|
|
1196
1196
|
}),
|
|
1197
|
-
|
|
1198
|
-
style: [q.error, { color:
|
|
1199
|
-
children:
|
|
1197
|
+
u && /* @__PURE__ */ j(z, {
|
|
1198
|
+
style: [q.error, { color: m.error }],
|
|
1199
|
+
children: u
|
|
1200
1200
|
}),
|
|
1201
|
-
|
|
1202
|
-
style: [q.helperText, { color:
|
|
1203
|
-
children:
|
|
1201
|
+
f && !u && /* @__PURE__ */ j(z, {
|
|
1202
|
+
style: [q.helperText, { color: m.textMuted }],
|
|
1203
|
+
children: f
|
|
1204
1204
|
})
|
|
1205
1205
|
]
|
|
1206
1206
|
});
|
|
@@ -1314,133 +1314,133 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1314
1314
|
flexDirection: "row",
|
|
1315
1315
|
marginBottom: 8
|
|
1316
1316
|
}
|
|
1317
|
-
}),
|
|
1318
|
-
let [
|
|
1319
|
-
if (
|
|
1320
|
-
let e = (await
|
|
1317
|
+
}), pe = (e, t) => {
|
|
1318
|
+
let [n, i] = k(null), [a, o] = k(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = g(), m = r(), h = Array.isArray(s) ? s : s ? [s] : [], _ = c.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
|
+
l(_ ? [...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
|
-
s,
|
|
1333
|
-
p,
|
|
1334
|
-
m,
|
|
1335
1332
|
n,
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1333
|
+
h,
|
|
1334
|
+
_,
|
|
1335
|
+
l,
|
|
1336
|
+
m
|
|
1337
|
+
]), y = ee((e) => {
|
|
1338
|
+
let t = h.filter((t, n) => n !== e);
|
|
1339
|
+
l(t.length > 0 ? t : null);
|
|
1340
|
+
}, [h, l]), b = (e) => e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1341
1341
|
return E(() => {
|
|
1342
1342
|
(async () => {
|
|
1343
1343
|
try {
|
|
1344
1344
|
let { pick: e } = await import("react-native-document-picker");
|
|
1345
|
-
|
|
1345
|
+
i(() => e);
|
|
1346
1346
|
} catch {
|
|
1347
|
-
|
|
1347
|
+
i(null);
|
|
1348
1348
|
} finally {
|
|
1349
|
-
|
|
1349
|
+
o(!1);
|
|
1350
1350
|
}
|
|
1351
1351
|
})();
|
|
1352
|
-
}, []),
|
|
1352
|
+
}, []), a ? 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: p.textSecondary }],
|
|
1357
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ j(z, {
|
|
1358
|
+
style: { color: p.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: p.card,
|
|
1367
|
+
borderColor: p.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: p.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: p.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: p.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: p.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: p.input,
|
|
1403
|
+
borderColor: p.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: p.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
|
+
u && /* @__PURE__ */ j(z, {
|
|
1413
|
+
style: [J.error, { color: p.error }],
|
|
1414
|
+
children: u
|
|
1415
1415
|
}),
|
|
1416
|
-
|
|
1417
|
-
style: [J.helperText, { color:
|
|
1418
|
-
children:
|
|
1416
|
+
f && !u && /* @__PURE__ */ j(z, {
|
|
1417
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1418
|
+
children: f
|
|
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: p.textSecondary }],
|
|
1426
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ j(z, {
|
|
1427
|
+
style: { color: p.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: p.errorLight,
|
|
1434
|
+
borderColor: p.error
|
|
1435
1435
|
}],
|
|
1436
|
-
children: /* @__PURE__ */
|
|
1437
|
-
style: [J.unavailableText, { color:
|
|
1438
|
-
children:
|
|
1436
|
+
children: /* @__PURE__ */ j(z, {
|
|
1437
|
+
style: [J.unavailableText, { color: p.error }],
|
|
1438
|
+
children: m("renderer.defaultInputs.filePickerUnavailable")
|
|
1439
1439
|
})
|
|
1440
1440
|
}),
|
|
1441
|
-
|
|
1442
|
-
style: [J.helperText, { color:
|
|
1443
|
-
children:
|
|
1441
|
+
f && /* @__PURE__ */ j(z, {
|
|
1442
|
+
style: [J.helperText, { color: p.textMuted }],
|
|
1443
|
+
children: f
|
|
1444
1444
|
})
|
|
1445
1445
|
]
|
|
1446
1446
|
});
|
|
@@ -1513,198 +1513,232 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1513
1513
|
fontSize: 12,
|
|
1514
1514
|
textAlign: "center"
|
|
1515
1515
|
}
|
|
1516
|
-
}),
|
|
1517
|
-
|
|
1516
|
+
}), me = (e, t) => null, he = ({ missing: e, children: t }) => {
|
|
1517
|
+
let n = r(), { colors: i } = g();
|
|
1518
|
+
return /* @__PURE__ */ M(A, { children: [t, e.length > 0 && /* @__PURE__ */ M(H, {
|
|
1519
|
+
style: ge.container,
|
|
1520
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1521
|
+
style: [ge.title, { color: i.textMuted }],
|
|
1522
|
+
children: n("renderer.dependencyHint.title")
|
|
1523
|
+
}), e.map((e) => /* @__PURE__ */ M(z, {
|
|
1524
|
+
style: [ge.item, { color: i.textMuted }],
|
|
1525
|
+
children: [
|
|
1526
|
+
"•",
|
|
1527
|
+
" ",
|
|
1528
|
+
e.label
|
|
1529
|
+
]
|
|
1530
|
+
}, e.id))]
|
|
1531
|
+
})] });
|
|
1532
|
+
}, ge = 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
|
+
}), _e = (e) => e.replace(/<[^>]*>/g, ""), ve = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'").replace(///g, "/"), ye = (e, t = {}) => e == null || e === "" ? "" : ve(_e(String(e))), be = 100, xe = (e, t = {}, n = 0, r = /* @__PURE__ */ new WeakSet()) => {
|
|
1543
|
+
if (n > be) return console.warn(`sanitizeHttpResponse: Maximum depth (${be}) exceeded.`), typeof e == "string" ? ye(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 ye(e, t);
|
|
1546
|
+
if (Array.isArray(e)) return e.map((e) => xe(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] = xe(o, t, n + 1, r);
|
|
1526
1552
|
return r.delete(e), i;
|
|
1527
1553
|
}
|
|
1528
1554
|
return e;
|
|
1529
|
-
},
|
|
1555
|
+
}, Se = (e) => {
|
|
1530
1556
|
let t = e.matchAll(/{{([\w-]+)}}/g);
|
|
1531
1557
|
return Array.from(t, (e) => e[1]);
|
|
1532
|
-
},
|
|
1558
|
+
}, Ce = (e, t) => Se(e).every((e) => {
|
|
1533
1559
|
let n = t[e];
|
|
1534
1560
|
return n != null && n !== "";
|
|
1535
|
-
}),
|
|
1561
|
+
}), we = (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 [
|
|
1564
|
+
}), Te = (t, i) => {
|
|
1565
|
+
let [o, s] = k(!1), [c, l] = k(null), [u, d] = k([]), [p, m] = k(""), [h, _] = k(!1), { value: v, placeholder: y } = t, { node: b, setValue: x, error: S, label: w, helperText: T, missingDependencies: A } = i, { formValues: P, inputNodes: F, headers: ne } = n(), { colors: I } = g(), { httpConfig: L } = b.data, R = r(), ie = O(!1), ae = O(""), oe = O(L), se = O(P), ce = O(F), U = O(ne), le = O(x), W = O(null), ue = O(null), G = D(() => L?.url ? Se(L.url) : [], [L?.url]), de = G.length > 0, K = D(() => G.map((e) => `${e}:${String(P[e] ?? "")}`).join("|"), [G, P]), fe = D(() => L?.url ? de ? Ce(L.url, P) : !0 : !1, [
|
|
1540
1566
|
L?.url,
|
|
1541
|
-
|
|
1542
|
-
|
|
1567
|
+
de,
|
|
1568
|
+
P
|
|
1543
1569
|
]), q = ee(async (t) => {
|
|
1544
|
-
|
|
1570
|
+
ue.current && ue.current.abort();
|
|
1545
1571
|
let n = new AbortController();
|
|
1546
|
-
|
|
1547
|
-
let r = oe.current, i = se.current,
|
|
1572
|
+
ue.current = n;
|
|
1573
|
+
let r = oe.current, i = se.current, o = le.current;
|
|
1548
1574
|
if (!r?.url) {
|
|
1549
|
-
|
|
1575
|
+
l(R("renderer.defaultHttpInput.noUrlConfigured")), ue.current = null;
|
|
1550
1576
|
return;
|
|
1551
1577
|
}
|
|
1552
|
-
if (r.url && !
|
|
1553
|
-
|
|
1578
|
+
if (r.url && !Ce(r.url, i)) {
|
|
1579
|
+
ue.current = null;
|
|
1554
1580
|
return;
|
|
1555
1581
|
}
|
|
1556
|
-
|
|
1582
|
+
s(!0), l(null);
|
|
1557
1583
|
try {
|
|
1558
|
-
let
|
|
1584
|
+
let c = we(r.url, i, !0), u = a(r.searchParam && t ? `${c}${c.includes("?") ? "&" : "?"}${r.searchParam}=${encodeURIComponent(t)}` : c, r.queryParams?.map((e) => ({
|
|
1585
|
+
key: e.key,
|
|
1586
|
+
value: we(e.value, i)
|
|
1587
|
+
}))), p = (e) => ({
|
|
1559
1588
|
key: e.key,
|
|
1560
|
-
value:
|
|
1561
|
-
}),
|
|
1589
|
+
value: we(e.value, i)
|
|
1590
|
+
}), m = e([{
|
|
1562
1591
|
key: "Content-Type",
|
|
1563
1592
|
value: "application/json"
|
|
1564
|
-
}],
|
|
1593
|
+
}], U.current?.map(p), r.headers?.map(p)), h = [
|
|
1565
1594
|
"POST",
|
|
1566
1595
|
"PUT",
|
|
1567
1596
|
"PATCH"
|
|
1568
|
-
].includes(r.method || "") ? r.sendAllFormValues ? JSON.stringify(f(i, ce.current)) : r.body ?
|
|
1569
|
-
body:
|
|
1570
|
-
headers: Object.fromEntries(
|
|
1597
|
+
].includes(r.method || "") ? r.sendAllFormValues ? JSON.stringify(f(i, ce.current)) : r.body ? we(r.body, i) : void 0 : void 0, g = setTimeout(() => n.abort(), 3e4), _ = await fetch(u, {
|
|
1598
|
+
body: h || void 0,
|
|
1599
|
+
headers: Object.fromEntries(m.filter((e) => e.key && e.value).map((e) => [e.key, e.value])),
|
|
1571
1600
|
method: r.method || "GET",
|
|
1572
1601
|
signal: n.signal
|
|
1573
1602
|
});
|
|
1574
|
-
if (clearTimeout(
|
|
1575
|
-
|
|
1603
|
+
if (clearTimeout(g), !_.ok) {
|
|
1604
|
+
l(`HTTP Error ${_.status}: ${_.statusText}`), s(!1);
|
|
1576
1605
|
return;
|
|
1577
1606
|
}
|
|
1578
|
-
let
|
|
1579
|
-
if (r.responseMapping && Array.isArray(
|
|
1607
|
+
let v = xe(await _.json()), y = r.responsePath ? C(v, r.responsePath) : v;
|
|
1608
|
+
if (r.responseMapping && Array.isArray(y)) {
|
|
1580
1609
|
let { valueField: e = "value", labelField: t = "label" } = r.responseMapping;
|
|
1581
|
-
|
|
1582
|
-
label: String(
|
|
1583
|
-
value: String(
|
|
1610
|
+
d(y.map((n) => ({
|
|
1611
|
+
label: String(C(n, t) || ""),
|
|
1612
|
+
value: String(C(n, e) || "")
|
|
1584
1613
|
})));
|
|
1585
|
-
} else
|
|
1614
|
+
} else o(typeof y == "string" ? y : JSON.stringify(y));
|
|
1586
1615
|
} catch (e) {
|
|
1587
1616
|
if (e instanceof Error && e.name === "AbortError") return;
|
|
1588
|
-
|
|
1617
|
+
l(e instanceof Error ? e.message : R("renderer.defaultHttpInput.fetchFailed")), console.error("HTTP Input fetch error:", e);
|
|
1589
1618
|
} finally {
|
|
1590
|
-
|
|
1619
|
+
s(!1), ue.current = null;
|
|
1591
1620
|
}
|
|
1592
1621
|
}, [R]);
|
|
1593
1622
|
if (E(() => {
|
|
1594
|
-
oe.current = L, se.current =
|
|
1623
|
+
oe.current = L, se.current = P, ce.current = F, U.current = ne, le.current = x, W.current = q;
|
|
1595
1624
|
}, [
|
|
1596
1625
|
L,
|
|
1597
|
-
N,
|
|
1598
1626
|
P,
|
|
1599
1627
|
F,
|
|
1600
|
-
|
|
1628
|
+
ne,
|
|
1629
|
+
x,
|
|
1601
1630
|
q
|
|
1602
1631
|
]), E(() => () => {
|
|
1603
|
-
|
|
1632
|
+
ue.current && ue.current.abort(), ie.current = !1;
|
|
1604
1633
|
}, []), E(() => {
|
|
1605
1634
|
if (ie.current) return;
|
|
1606
1635
|
ie.current = !0;
|
|
1607
|
-
let e = oe.current, t = se.current, n =
|
|
1608
|
-
e?.fetchOnMount && r && n && (n(), e.url && (ae.current =
|
|
1636
|
+
let e = oe.current, t = se.current, n = W.current, r = e?.url && Ce(e.url, t);
|
|
1637
|
+
e?.fetchOnMount && r && n && (n(), e.url && (ae.current = Se(e.url).map((e) => `${e}:${String(t[e] ?? "")}`).join("|")));
|
|
1609
1638
|
}, []), E(() => {
|
|
1610
|
-
if (!ie.current || !
|
|
1639
|
+
if (!ie.current || !de || ae.current === K || !fe) return;
|
|
1611
1640
|
let e = setTimeout(() => {
|
|
1612
1641
|
q(), ae.current = K;
|
|
1613
1642
|
}, 500);
|
|
1614
1643
|
return () => clearTimeout(e);
|
|
1615
1644
|
}, [
|
|
1616
1645
|
K,
|
|
1617
|
-
ue,
|
|
1618
1646
|
de,
|
|
1647
|
+
fe,
|
|
1619
1648
|
q
|
|
1620
1649
|
]), E(() => {
|
|
1621
|
-
if (!(L?.searchParam &&
|
|
1650
|
+
if (!(L?.searchParam && p)) return;
|
|
1622
1651
|
let e = setTimeout(() => {
|
|
1623
|
-
q(
|
|
1652
|
+
q(p);
|
|
1624
1653
|
}, 300);
|
|
1625
1654
|
return () => clearTimeout(e);
|
|
1626
1655
|
}, [
|
|
1627
|
-
|
|
1656
|
+
p,
|
|
1628
1657
|
L?.searchParam,
|
|
1629
1658
|
q
|
|
1630
1659
|
]), L?.responseMapping) {
|
|
1631
|
-
let e = Array.isArray(
|
|
1660
|
+
let e = Array.isArray(v) ? v[0] : v, t = u.find((t) => t.value === e);
|
|
1632
1661
|
if (L.searchParam) {
|
|
1633
|
-
let
|
|
1634
|
-
return /* @__PURE__ */
|
|
1662
|
+
let n = o && L?.showLoading;
|
|
1663
|
+
return /* @__PURE__ */ M(H, {
|
|
1635
1664
|
style: Y.container,
|
|
1636
1665
|
children: [
|
|
1637
|
-
/* @__PURE__ */
|
|
1666
|
+
/* @__PURE__ */ M(z, {
|
|
1638
1667
|
style: [Y.label, { color: I.textSecondary }],
|
|
1639
|
-
children: [
|
|
1668
|
+
children: [w || b.data.name, b.data.required && /* @__PURE__ */ j(z, {
|
|
1640
1669
|
style: { color: I.error },
|
|
1641
1670
|
children: "*"
|
|
1642
1671
|
})]
|
|
1643
1672
|
}),
|
|
1644
|
-
/* @__PURE__ */ j(
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
{
|
|
1648
|
-
backgroundColor: I.input,
|
|
1649
|
-
borderColor: I.border
|
|
1650
|
-
},
|
|
1651
|
-
s && { borderColor: I.error }
|
|
1652
|
-
],
|
|
1653
|
-
onPress: () => T(!0),
|
|
1654
|
-
activeOpacity: .7,
|
|
1655
|
-
children: [r ? /* @__PURE__ */ j(V, {
|
|
1656
|
-
style: Y.loadingTrigger,
|
|
1657
|
-
children: [/* @__PURE__ */ A(M, {
|
|
1658
|
-
size: "small",
|
|
1659
|
-
color: I.primary
|
|
1660
|
-
}), /* @__PURE__ */ A(z, {
|
|
1661
|
-
style: [Y.triggerText, { color: I.textMuted }],
|
|
1662
|
-
numberOfLines: 1,
|
|
1663
|
-
children: n?.label || l || R("renderer.defaultHttpInput.search")
|
|
1664
|
-
})]
|
|
1665
|
-
}) : /* @__PURE__ */ A(z, {
|
|
1673
|
+
/* @__PURE__ */ j(he, {
|
|
1674
|
+
missing: A,
|
|
1675
|
+
children: /* @__PURE__ */ M(V, {
|
|
1666
1676
|
style: [
|
|
1667
|
-
Y.
|
|
1668
|
-
{
|
|
1669
|
-
|
|
1677
|
+
Y.trigger,
|
|
1678
|
+
{
|
|
1679
|
+
backgroundColor: I.input,
|
|
1680
|
+
borderColor: I.border
|
|
1681
|
+
},
|
|
1682
|
+
S && { borderColor: I.error },
|
|
1683
|
+
A.length > 0 && { backgroundColor: I.muted }
|
|
1670
1684
|
],
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1685
|
+
onPress: () => _(!0),
|
|
1686
|
+
disabled: A.length > 0,
|
|
1687
|
+
activeOpacity: .7,
|
|
1688
|
+
children: [n ? /* @__PURE__ */ M(H, {
|
|
1689
|
+
style: Y.loadingTrigger,
|
|
1690
|
+
children: [/* @__PURE__ */ j(N, {
|
|
1691
|
+
size: "small",
|
|
1692
|
+
color: I.primary
|
|
1693
|
+
}), /* @__PURE__ */ j(z, {
|
|
1694
|
+
style: [Y.triggerText, { color: I.textMuted }],
|
|
1695
|
+
numberOfLines: 1,
|
|
1696
|
+
children: t?.label || y || R("renderer.defaultHttpInput.search")
|
|
1697
|
+
})]
|
|
1698
|
+
}) : /* @__PURE__ */ j(z, {
|
|
1699
|
+
style: [
|
|
1700
|
+
Y.triggerText,
|
|
1701
|
+
{ color: I.text },
|
|
1702
|
+
!t && { color: I.textMuted }
|
|
1703
|
+
],
|
|
1704
|
+
numberOfLines: 1,
|
|
1705
|
+
children: t?.label || y || R("renderer.defaultHttpInput.search")
|
|
1706
|
+
}), /* @__PURE__ */ j(z, {
|
|
1707
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1708
|
+
children: "▼"
|
|
1709
|
+
})]
|
|
1710
|
+
})
|
|
1677
1711
|
}),
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
visible:
|
|
1712
|
+
/* @__PURE__ */ j(re, {
|
|
1713
|
+
visible: h,
|
|
1680
1714
|
transparent: !0,
|
|
1681
1715
|
animationType: "fade",
|
|
1682
|
-
onRequestClose: () =>
|
|
1683
|
-
children: /* @__PURE__ */
|
|
1716
|
+
onRequestClose: () => _(!1),
|
|
1717
|
+
children: /* @__PURE__ */ j(V, {
|
|
1684
1718
|
style: Y.modalOverlay,
|
|
1685
1719
|
activeOpacity: 1,
|
|
1686
|
-
onPress: () =>
|
|
1687
|
-
children: /* @__PURE__ */
|
|
1720
|
+
onPress: () => _(!1),
|
|
1721
|
+
children: /* @__PURE__ */ M(V, {
|
|
1688
1722
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1689
1723
|
activeOpacity: 1,
|
|
1690
1724
|
onPress: () => {},
|
|
1691
1725
|
children: [
|
|
1692
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ M(H, {
|
|
1693
1727
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1694
|
-
children: [/* @__PURE__ */
|
|
1728
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1695
1729
|
style: [Y.modalTitle, { color: I.text }],
|
|
1696
|
-
children:
|
|
1697
|
-
}), /* @__PURE__ */
|
|
1698
|
-
onPress: () =>
|
|
1699
|
-
children: /* @__PURE__ */
|
|
1730
|
+
children: w || b.data.name
|
|
1731
|
+
}), /* @__PURE__ */ j(V, {
|
|
1732
|
+
onPress: () => _(!1),
|
|
1733
|
+
children: /* @__PURE__ */ j(z, {
|
|
1700
1734
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
1701
1735
|
children: "✕"
|
|
1702
1736
|
})
|
|
1703
1737
|
})]
|
|
1704
1738
|
}),
|
|
1705
|
-
/* @__PURE__ */
|
|
1739
|
+
/* @__PURE__ */ j(H, {
|
|
1706
1740
|
style: Y.searchContainer,
|
|
1707
|
-
children: /* @__PURE__ */
|
|
1741
|
+
children: /* @__PURE__ */ j(B, {
|
|
1708
1742
|
style: [Y.searchInput, {
|
|
1709
1743
|
backgroundColor: I.muted,
|
|
1710
1744
|
borderColor: I.border,
|
|
@@ -1712,58 +1746,58 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1712
1746
|
}],
|
|
1713
1747
|
placeholder: R("renderer.defaultHttpInput.search"),
|
|
1714
1748
|
placeholderTextColor: I.textMuted,
|
|
1715
|
-
value:
|
|
1749
|
+
value: p,
|
|
1716
1750
|
onChangeText: (e) => {
|
|
1717
|
-
|
|
1751
|
+
m(e), l(null);
|
|
1718
1752
|
},
|
|
1719
1753
|
autoFocus: !0,
|
|
1720
1754
|
autoCapitalize: "none",
|
|
1721
1755
|
autoCorrect: !1
|
|
1722
1756
|
})
|
|
1723
1757
|
}),
|
|
1724
|
-
|
|
1758
|
+
o ? /* @__PURE__ */ j(H, {
|
|
1725
1759
|
style: Y.loadingContainer,
|
|
1726
|
-
children: /* @__PURE__ */
|
|
1760
|
+
children: /* @__PURE__ */ j(N, {
|
|
1727
1761
|
size: "small",
|
|
1728
1762
|
color: I.primary
|
|
1729
1763
|
})
|
|
1730
|
-
}) :
|
|
1764
|
+
}) : c ? /* @__PURE__ */ M(H, {
|
|
1731
1765
|
style: Y.errorContainer,
|
|
1732
|
-
children: [/* @__PURE__ */
|
|
1766
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1733
1767
|
style: [Y.errorText, { color: I.error }],
|
|
1734
|
-
children:
|
|
1735
|
-
}), /* @__PURE__ */
|
|
1736
|
-
onPress: () => q(
|
|
1768
|
+
children: c
|
|
1769
|
+
}), /* @__PURE__ */ j(V, {
|
|
1770
|
+
onPress: () => q(p),
|
|
1737
1771
|
style: Y.retryButton,
|
|
1738
|
-
children: /* @__PURE__ */
|
|
1772
|
+
children: /* @__PURE__ */ j(z, {
|
|
1739
1773
|
style: [Y.retryButtonText, { color: I.primary }],
|
|
1740
1774
|
children: R("renderer.defaultHttpInput.retry")
|
|
1741
1775
|
})
|
|
1742
1776
|
})]
|
|
1743
|
-
}) : /* @__PURE__ */
|
|
1744
|
-
data:
|
|
1777
|
+
}) : /* @__PURE__ */ j(te, {
|
|
1778
|
+
data: u,
|
|
1745
1779
|
keyExtractor: (e) => e.value,
|
|
1746
1780
|
style: Y.optionsList,
|
|
1747
1781
|
contentContainerStyle: Y.optionsListContent,
|
|
1748
|
-
ListEmptyComponent: /* @__PURE__ */
|
|
1782
|
+
ListEmptyComponent: /* @__PURE__ */ j(H, {
|
|
1749
1783
|
style: Y.emptyContainer,
|
|
1750
|
-
children: /* @__PURE__ */
|
|
1784
|
+
children: /* @__PURE__ */ j(z, {
|
|
1751
1785
|
style: [Y.emptyText, { color: I.textMuted }],
|
|
1752
1786
|
children: R("renderer.defaultHttpInput.noResults")
|
|
1753
1787
|
})
|
|
1754
1788
|
}),
|
|
1755
1789
|
renderItem: ({ item: t }) => {
|
|
1756
1790
|
let n = t.value === e;
|
|
1757
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ M(V, {
|
|
1758
1792
|
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1759
1793
|
onPress: () => {
|
|
1760
|
-
|
|
1794
|
+
x(t.value), _(!1);
|
|
1761
1795
|
},
|
|
1762
1796
|
activeOpacity: .7,
|
|
1763
|
-
children: [/* @__PURE__ */
|
|
1797
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1764
1798
|
style: [Y.optionText, { color: I.text }],
|
|
1765
1799
|
children: t.label
|
|
1766
|
-
}), n && /* @__PURE__ */
|
|
1800
|
+
}), n && /* @__PURE__ */ j(z, {
|
|
1767
1801
|
style: [Y.checkmark, { color: I.primary }],
|
|
1768
1802
|
children: "✓"
|
|
1769
1803
|
})]
|
|
@@ -1774,111 +1808,111 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1774
1808
|
})
|
|
1775
1809
|
})
|
|
1776
1810
|
}),
|
|
1777
|
-
|
|
1811
|
+
S && /* @__PURE__ */ j(z, {
|
|
1778
1812
|
style: [Y.error, { color: I.error }],
|
|
1779
|
-
children:
|
|
1813
|
+
children: S
|
|
1780
1814
|
}),
|
|
1781
|
-
|
|
1815
|
+
T && !S && /* @__PURE__ */ j(z, {
|
|
1782
1816
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1783
|
-
children:
|
|
1817
|
+
children: T
|
|
1784
1818
|
})
|
|
1785
1819
|
]
|
|
1786
1820
|
});
|
|
1787
1821
|
}
|
|
1788
|
-
let
|
|
1789
|
-
|
|
1790
|
-
return t == null || t === "";
|
|
1791
|
-
}), f = d.map((e) => a(e, P) || e), p = y.length === 0 && !r ? g || (d.length > 0 ? `${R("renderer.defaultHttpInput.waitingForRequiredFields")}: ${f.join(", ")}` : R("renderer.defaultHttpInput.noDataAvailable")) : void 0;
|
|
1792
|
-
return /* @__PURE__ */ j(V, {
|
|
1822
|
+
let n = o && L?.showLoading, r = A.length === 0 && u.length === 0 && !n ? c ?? R("renderer.defaultHttpInput.noDataAvailable") : void 0;
|
|
1823
|
+
return /* @__PURE__ */ M(H, {
|
|
1793
1824
|
style: Y.container,
|
|
1794
1825
|
children: [
|
|
1795
|
-
/* @__PURE__ */
|
|
1826
|
+
/* @__PURE__ */ M(z, {
|
|
1796
1827
|
style: [Y.label, { color: I.textSecondary }],
|
|
1797
|
-
children: [
|
|
1828
|
+
children: [w || b.data.name, b.data.required && /* @__PURE__ */ j(z, {
|
|
1798
1829
|
style: { color: I.error },
|
|
1799
1830
|
children: "*"
|
|
1800
1831
|
})]
|
|
1801
1832
|
}),
|
|
1802
|
-
/* @__PURE__ */ j(
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
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
|
-
|
|
1833
|
+
/* @__PURE__ */ j(he, {
|
|
1834
|
+
missing: A,
|
|
1835
|
+
children: /* @__PURE__ */ M(V, {
|
|
1836
|
+
style: [
|
|
1837
|
+
Y.trigger,
|
|
1838
|
+
{
|
|
1839
|
+
backgroundColor: I.input,
|
|
1840
|
+
borderColor: I.border
|
|
1841
|
+
},
|
|
1842
|
+
S && { borderColor: I.error },
|
|
1843
|
+
(n || u.length === 0) && { backgroundColor: I.muted }
|
|
1844
|
+
],
|
|
1845
|
+
onPress: () => _(!0),
|
|
1846
|
+
disabled: n || u.length === 0,
|
|
1847
|
+
activeOpacity: .7,
|
|
1848
|
+
children: [
|
|
1849
|
+
n && /* @__PURE__ */ j(N, {
|
|
1850
|
+
size: "small",
|
|
1851
|
+
color: I.primary,
|
|
1852
|
+
style: Y.triggerLoader
|
|
1853
|
+
}),
|
|
1854
|
+
/* @__PURE__ */ j(z, {
|
|
1855
|
+
style: [
|
|
1856
|
+
Y.triggerText,
|
|
1857
|
+
{ color: I.text },
|
|
1858
|
+
!t && { color: I.textMuted }
|
|
1859
|
+
],
|
|
1860
|
+
numberOfLines: 1,
|
|
1861
|
+
children: t?.label || y || R("renderer.defaultHttpInput.selectOption")
|
|
1862
|
+
}),
|
|
1863
|
+
/* @__PURE__ */ j(z, {
|
|
1864
|
+
style: [Y.arrow, { color: I.textMuted }],
|
|
1865
|
+
children: "▼"
|
|
1866
|
+
})
|
|
1867
|
+
]
|
|
1868
|
+
})
|
|
1835
1869
|
}),
|
|
1836
|
-
|
|
1870
|
+
r && /* @__PURE__ */ j(z, {
|
|
1837
1871
|
style: [Y.disabledMessage, { color: I.error }],
|
|
1838
|
-
children:
|
|
1872
|
+
children: r
|
|
1839
1873
|
}),
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
visible:
|
|
1874
|
+
/* @__PURE__ */ j(re, {
|
|
1875
|
+
visible: h,
|
|
1842
1876
|
transparent: !0,
|
|
1843
1877
|
animationType: "fade",
|
|
1844
|
-
onRequestClose: () =>
|
|
1845
|
-
children: /* @__PURE__ */
|
|
1878
|
+
onRequestClose: () => _(!1),
|
|
1879
|
+
children: /* @__PURE__ */ j(V, {
|
|
1846
1880
|
style: Y.modalOverlay,
|
|
1847
1881
|
activeOpacity: 1,
|
|
1848
|
-
onPress: () =>
|
|
1849
|
-
children: /* @__PURE__ */
|
|
1882
|
+
onPress: () => _(!1),
|
|
1883
|
+
children: /* @__PURE__ */ M(V, {
|
|
1850
1884
|
style: [Y.modalContent, { backgroundColor: I.card }],
|
|
1851
1885
|
activeOpacity: 1,
|
|
1852
1886
|
onPress: () => {},
|
|
1853
|
-
children: [/* @__PURE__ */
|
|
1887
|
+
children: [/* @__PURE__ */ M(H, {
|
|
1854
1888
|
style: [Y.modalHeader, { borderBottomColor: I.separator }],
|
|
1855
|
-
children: [/* @__PURE__ */
|
|
1889
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1856
1890
|
style: [Y.modalTitle, { color: I.text }],
|
|
1857
|
-
children:
|
|
1858
|
-
}), /* @__PURE__ */
|
|
1859
|
-
onPress: () =>
|
|
1860
|
-
children: /* @__PURE__ */
|
|
1891
|
+
children: w || b.data.name
|
|
1892
|
+
}), /* @__PURE__ */ j(V, {
|
|
1893
|
+
onPress: () => _(!1),
|
|
1894
|
+
children: /* @__PURE__ */ j(z, {
|
|
1861
1895
|
style: [Y.closeButton, { color: I.textMuted }],
|
|
1862
1896
|
children: "✕"
|
|
1863
1897
|
})
|
|
1864
1898
|
})]
|
|
1865
|
-
}), /* @__PURE__ */
|
|
1866
|
-
data:
|
|
1899
|
+
}), /* @__PURE__ */ j(te, {
|
|
1900
|
+
data: u,
|
|
1867
1901
|
keyExtractor: (e) => e.value,
|
|
1868
1902
|
style: Y.optionsList,
|
|
1869
1903
|
contentContainerStyle: Y.optionsListContent,
|
|
1870
1904
|
renderItem: ({ item: t }) => {
|
|
1871
1905
|
let n = t.value === e;
|
|
1872
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ M(V, {
|
|
1873
1907
|
style: [Y.option, n && { backgroundColor: I.primaryLight }],
|
|
1874
1908
|
onPress: () => {
|
|
1875
|
-
|
|
1909
|
+
x(t.value), _(!1);
|
|
1876
1910
|
},
|
|
1877
1911
|
activeOpacity: .7,
|
|
1878
|
-
children: [/* @__PURE__ */
|
|
1912
|
+
children: [/* @__PURE__ */ j(z, {
|
|
1879
1913
|
style: [Y.optionText, { color: I.text }],
|
|
1880
1914
|
children: t.label
|
|
1881
|
-
}), n && /* @__PURE__ */
|
|
1915
|
+
}), n && /* @__PURE__ */ j(z, {
|
|
1882
1916
|
style: [Y.checkmark, { color: I.primary }],
|
|
1883
1917
|
children: "✓"
|
|
1884
1918
|
})]
|
|
@@ -1888,43 +1922,43 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
1888
1922
|
})
|
|
1889
1923
|
})
|
|
1890
1924
|
}),
|
|
1891
|
-
|
|
1925
|
+
S && /* @__PURE__ */ j(z, {
|
|
1892
1926
|
style: [Y.error, { color: I.error }],
|
|
1893
|
-
children:
|
|
1927
|
+
children: S
|
|
1894
1928
|
}),
|
|
1895
|
-
|
|
1929
|
+
T && !S && /* @__PURE__ */ j(z, {
|
|
1896
1930
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1897
|
-
children:
|
|
1931
|
+
children: T
|
|
1898
1932
|
})
|
|
1899
1933
|
]
|
|
1900
1934
|
});
|
|
1901
1935
|
}
|
|
1902
|
-
return /* @__PURE__ */
|
|
1936
|
+
return /* @__PURE__ */ M(H, {
|
|
1903
1937
|
style: Y.container,
|
|
1904
1938
|
children: [
|
|
1905
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ M(z, {
|
|
1906
1940
|
style: [Y.label, { color: I.textSecondary }],
|
|
1907
|
-
children: [
|
|
1941
|
+
children: [w || b.data.name, b.data.required && /* @__PURE__ */ j(z, {
|
|
1908
1942
|
style: { color: I.error },
|
|
1909
1943
|
children: "*"
|
|
1910
1944
|
})]
|
|
1911
1945
|
}),
|
|
1912
|
-
/* @__PURE__ */
|
|
1946
|
+
/* @__PURE__ */ j(B, {
|
|
1913
1947
|
style: [Y.input, {
|
|
1914
1948
|
backgroundColor: I.muted,
|
|
1915
1949
|
borderColor: I.border,
|
|
1916
1950
|
color: I.textMuted
|
|
1917
1951
|
}],
|
|
1918
|
-
value: typeof
|
|
1952
|
+
value: typeof v == "string" ? v : JSON.stringify(v),
|
|
1919
1953
|
editable: !1
|
|
1920
1954
|
}),
|
|
1921
|
-
|
|
1955
|
+
S && /* @__PURE__ */ j(z, {
|
|
1922
1956
|
style: [Y.error, { color: I.error }],
|
|
1923
|
-
children:
|
|
1957
|
+
children: S
|
|
1924
1958
|
}),
|
|
1925
|
-
|
|
1959
|
+
T && !S && /* @__PURE__ */ j(z, {
|
|
1926
1960
|
style: [Y.helperText, { color: I.textMuted }],
|
|
1927
|
-
children:
|
|
1961
|
+
children: T
|
|
1928
1962
|
})
|
|
1929
1963
|
]
|
|
1930
1964
|
});
|
|
@@ -2054,55 +2088,55 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2054
2088
|
flex: 1,
|
|
2055
2089
|
fontSize: 14
|
|
2056
2090
|
}
|
|
2057
|
-
}),
|
|
2058
|
-
let {
|
|
2091
|
+
}), Ee = (e, t) => {
|
|
2092
|
+
let { value: n, placeholder: r, name: i } = e, [a, o] = k(n?.toString() ?? ""), { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2059
2093
|
return E(() => {
|
|
2060
|
-
|
|
2061
|
-
}, [
|
|
2062
|
-
style:
|
|
2094
|
+
o(n?.toString() ?? "");
|
|
2095
|
+
}, [n]), /* @__PURE__ */ M(H, {
|
|
2096
|
+
style: De.container,
|
|
2063
2097
|
children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
style: [
|
|
2066
|
-
children: [
|
|
2067
|
-
style: { color:
|
|
2098
|
+
/* @__PURE__ */ M(z, {
|
|
2099
|
+
style: [De.label, { color: f.textSecondary }],
|
|
2100
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
2101
|
+
style: { color: f.error },
|
|
2068
2102
|
children: "*"
|
|
2069
2103
|
})]
|
|
2070
2104
|
}),
|
|
2071
|
-
/* @__PURE__ */
|
|
2105
|
+
/* @__PURE__ */ j(B, {
|
|
2072
2106
|
style: [
|
|
2073
|
-
|
|
2107
|
+
De.input,
|
|
2074
2108
|
{
|
|
2075
|
-
backgroundColor:
|
|
2076
|
-
borderColor:
|
|
2077
|
-
color:
|
|
2109
|
+
backgroundColor: f.input,
|
|
2110
|
+
borderColor: f.border,
|
|
2111
|
+
color: f.text
|
|
2078
2112
|
},
|
|
2079
|
-
|
|
2113
|
+
l && { borderColor: f.error }
|
|
2080
2114
|
],
|
|
2081
|
-
value:
|
|
2115
|
+
value: a,
|
|
2082
2116
|
onChangeText: (e) => {
|
|
2083
|
-
if (
|
|
2084
|
-
|
|
2117
|
+
if (o(e), e.trim() === "") {
|
|
2118
|
+
c(null);
|
|
2085
2119
|
return;
|
|
2086
2120
|
}
|
|
2087
2121
|
let t = Number(e);
|
|
2088
|
-
Number.isNaN(t) ||
|
|
2122
|
+
Number.isNaN(t) || c(t);
|
|
2089
2123
|
},
|
|
2090
|
-
placeholder:
|
|
2091
|
-
placeholderTextColor:
|
|
2124
|
+
placeholder: r,
|
|
2125
|
+
placeholderTextColor: f.textMuted,
|
|
2092
2126
|
keyboardType: "numeric",
|
|
2093
|
-
accessibilityLabel:
|
|
2127
|
+
accessibilityLabel: i
|
|
2094
2128
|
}),
|
|
2095
|
-
|
|
2096
|
-
style: [
|
|
2097
|
-
children:
|
|
2129
|
+
l && /* @__PURE__ */ j(z, {
|
|
2130
|
+
style: [De.error, { color: f.error }],
|
|
2131
|
+
children: l
|
|
2098
2132
|
}),
|
|
2099
|
-
|
|
2100
|
-
style: [
|
|
2101
|
-
children:
|
|
2133
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
2134
|
+
style: [De.helperText, { color: f.textMuted }],
|
|
2135
|
+
children: d
|
|
2102
2136
|
})
|
|
2103
2137
|
]
|
|
2104
2138
|
});
|
|
2105
|
-
},
|
|
2139
|
+
}, De = L.create({
|
|
2106
2140
|
container: { marginBottom: 16 },
|
|
2107
2141
|
error: {
|
|
2108
2142
|
fontSize: 12,
|
|
@@ -2124,57 +2158,57 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2124
2158
|
fontWeight: "500",
|
|
2125
2159
|
marginBottom: 8
|
|
2126
2160
|
}
|
|
2127
|
-
}),
|
|
2128
|
-
let {
|
|
2129
|
-
return /* @__PURE__ */
|
|
2130
|
-
style:
|
|
2161
|
+
}), Oe = (e, t) => {
|
|
2162
|
+
let [n, r] = k(!1), { value: i, placeholder: a, name: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g();
|
|
2163
|
+
return /* @__PURE__ */ M(H, {
|
|
2164
|
+
style: ke.container,
|
|
2131
2165
|
children: [
|
|
2132
|
-
/* @__PURE__ */
|
|
2133
|
-
style: [
|
|
2134
|
-
children: [
|
|
2135
|
-
style: { color:
|
|
2166
|
+
/* @__PURE__ */ M(z, {
|
|
2167
|
+
style: [ke.label, { color: f.textSecondary }],
|
|
2168
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
2169
|
+
style: { color: f.error },
|
|
2136
2170
|
children: "*"
|
|
2137
2171
|
})]
|
|
2138
2172
|
}),
|
|
2139
|
-
/* @__PURE__ */
|
|
2140
|
-
style:
|
|
2141
|
-
children: [/* @__PURE__ */
|
|
2173
|
+
/* @__PURE__ */ M(H, {
|
|
2174
|
+
style: ke.inputWrapper,
|
|
2175
|
+
children: [/* @__PURE__ */ j(B, {
|
|
2142
2176
|
style: [
|
|
2143
|
-
|
|
2177
|
+
ke.input,
|
|
2144
2178
|
{
|
|
2145
|
-
backgroundColor:
|
|
2146
|
-
borderColor:
|
|
2147
|
-
color:
|
|
2179
|
+
backgroundColor: f.input,
|
|
2180
|
+
borderColor: f.border,
|
|
2181
|
+
color: f.text
|
|
2148
2182
|
},
|
|
2149
|
-
|
|
2183
|
+
l && { borderColor: f.error }
|
|
2150
2184
|
],
|
|
2151
|
-
value:
|
|
2152
|
-
onChangeText:
|
|
2185
|
+
value: i ?? "",
|
|
2186
|
+
onChangeText: c,
|
|
2153
2187
|
placeholder: a,
|
|
2154
|
-
placeholderTextColor:
|
|
2155
|
-
secureTextEntry: !
|
|
2156
|
-
accessibilityLabel:
|
|
2157
|
-
}), /* @__PURE__ */
|
|
2158
|
-
style:
|
|
2159
|
-
onPress: () =>
|
|
2188
|
+
placeholderTextColor: f.textMuted,
|
|
2189
|
+
secureTextEntry: !n,
|
|
2190
|
+
accessibilityLabel: o
|
|
2191
|
+
}), /* @__PURE__ */ j(V, {
|
|
2192
|
+
style: ke.toggleButton,
|
|
2193
|
+
onPress: () => r(!n),
|
|
2160
2194
|
activeOpacity: .7,
|
|
2161
|
-
children: /* @__PURE__ */
|
|
2162
|
-
style: [
|
|
2163
|
-
children:
|
|
2195
|
+
children: /* @__PURE__ */ j(z, {
|
|
2196
|
+
style: [ke.toggleText, { color: f.primary }],
|
|
2197
|
+
children: n ? "Hide" : "Show"
|
|
2164
2198
|
})
|
|
2165
2199
|
})]
|
|
2166
2200
|
}),
|
|
2167
|
-
|
|
2168
|
-
style: [
|
|
2169
|
-
children:
|
|
2201
|
+
l && /* @__PURE__ */ j(z, {
|
|
2202
|
+
style: [ke.error, { color: f.error }],
|
|
2203
|
+
children: l
|
|
2170
2204
|
}),
|
|
2171
|
-
|
|
2172
|
-
style: [
|
|
2173
|
-
children:
|
|
2205
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
2206
|
+
style: [ke.helperText, { color: f.textMuted }],
|
|
2207
|
+
children: d
|
|
2174
2208
|
})
|
|
2175
2209
|
]
|
|
2176
2210
|
});
|
|
2177
|
-
},
|
|
2211
|
+
}, ke = L.create({
|
|
2178
2212
|
container: { marginBottom: 16 },
|
|
2179
2213
|
error: {
|
|
2180
2214
|
fontSize: 12,
|
|
@@ -2212,111 +2246,111 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2212
2246
|
fontSize: 12,
|
|
2213
2247
|
fontWeight: "600"
|
|
2214
2248
|
}
|
|
2215
|
-
}),
|
|
2216
|
-
let s =
|
|
2217
|
-
|
|
2249
|
+
}), Ae = (e, t) => {
|
|
2250
|
+
let { value: n } = e, { node: i, setValue: a, error: o, label: s, helperText: c } = t, { colors: l } = g(), u = r(), d = i.data.options || [], f = n || "", p = i.data.variant !== "default", m = (e) => {
|
|
2251
|
+
a(e);
|
|
2218
2252
|
};
|
|
2219
|
-
return /* @__PURE__ */
|
|
2253
|
+
return /* @__PURE__ */ M(H, {
|
|
2220
2254
|
style: X.container,
|
|
2221
2255
|
children: [
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
style: [X.label, { color:
|
|
2224
|
-
children: [
|
|
2225
|
-
style: { color:
|
|
2256
|
+
/* @__PURE__ */ M(z, {
|
|
2257
|
+
style: [X.label, { color: l.textSecondary }],
|
|
2258
|
+
children: [s || i.data.name, i.data.required && /* @__PURE__ */ j(z, {
|
|
2259
|
+
style: { color: l.error },
|
|
2226
2260
|
children: "*"
|
|
2227
2261
|
})]
|
|
2228
2262
|
}),
|
|
2229
|
-
|
|
2230
|
-
let t =
|
|
2231
|
-
return
|
|
2263
|
+
d.map((e) => {
|
|
2264
|
+
let t = f === e.value, n = u(e.label) || e.value, r = u(e.description);
|
|
2265
|
+
return p ? /* @__PURE__ */ M(V, {
|
|
2232
2266
|
style: [
|
|
2233
2267
|
X.card,
|
|
2234
2268
|
{
|
|
2235
|
-
backgroundColor:
|
|
2236
|
-
borderColor:
|
|
2269
|
+
backgroundColor: l.input,
|
|
2270
|
+
borderColor: l.border
|
|
2237
2271
|
},
|
|
2238
2272
|
t && {
|
|
2239
|
-
backgroundColor: `${
|
|
2240
|
-
borderColor:
|
|
2273
|
+
backgroundColor: `${l.primary}10`,
|
|
2274
|
+
borderColor: l.primary
|
|
2241
2275
|
},
|
|
2242
2276
|
e.disabled && { opacity: .5 }
|
|
2243
2277
|
],
|
|
2244
|
-
onPress: () =>
|
|
2278
|
+
onPress: () => m(e.value),
|
|
2245
2279
|
disabled: e.disabled,
|
|
2246
2280
|
activeOpacity: .7,
|
|
2247
2281
|
children: [
|
|
2248
|
-
e.image && /* @__PURE__ */
|
|
2282
|
+
e.image && /* @__PURE__ */ j(ne, {
|
|
2249
2283
|
source: { uri: e.image },
|
|
2250
2284
|
style: X.cardImage
|
|
2251
2285
|
}),
|
|
2252
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ M(H, {
|
|
2253
2287
|
style: X.cardTextContainer,
|
|
2254
|
-
children: [/* @__PURE__ */
|
|
2255
|
-
style: [X.cardLabel, { color:
|
|
2288
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2289
|
+
style: [X.cardLabel, { color: l.textSecondary }],
|
|
2256
2290
|
children: n
|
|
2257
|
-
}), r && /* @__PURE__ */
|
|
2258
|
-
style: [X.cardDescription, { color:
|
|
2291
|
+
}), r && /* @__PURE__ */ j(z, {
|
|
2292
|
+
style: [X.cardDescription, { color: l.textMuted }],
|
|
2259
2293
|
children: r
|
|
2260
2294
|
})]
|
|
2261
2295
|
}),
|
|
2262
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ j(H, {
|
|
2263
2297
|
style: [
|
|
2264
2298
|
X.radio,
|
|
2265
2299
|
X.cardRadio,
|
|
2266
2300
|
{
|
|
2267
|
-
backgroundColor:
|
|
2268
|
-
borderColor:
|
|
2301
|
+
backgroundColor: l.input,
|
|
2302
|
+
borderColor: l.border
|
|
2269
2303
|
},
|
|
2270
|
-
t && { borderColor:
|
|
2304
|
+
t && { borderColor: l.primary }
|
|
2271
2305
|
],
|
|
2272
|
-
children: t && /* @__PURE__ */
|
|
2306
|
+
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2273
2307
|
})
|
|
2274
2308
|
]
|
|
2275
|
-
}, e.value) : /* @__PURE__ */
|
|
2309
|
+
}, e.value) : /* @__PURE__ */ M(V, {
|
|
2276
2310
|
style: X.option,
|
|
2277
|
-
onPress: () =>
|
|
2311
|
+
onPress: () => m(e.value),
|
|
2278
2312
|
disabled: e.disabled,
|
|
2279
2313
|
activeOpacity: .7,
|
|
2280
2314
|
children: [
|
|
2281
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ j(H, {
|
|
2282
2316
|
style: [
|
|
2283
2317
|
X.radio,
|
|
2284
2318
|
{
|
|
2285
|
-
backgroundColor:
|
|
2286
|
-
borderColor:
|
|
2319
|
+
backgroundColor: l.input,
|
|
2320
|
+
borderColor: l.border
|
|
2287
2321
|
},
|
|
2288
|
-
t && { borderColor:
|
|
2322
|
+
t && { borderColor: l.primary }
|
|
2289
2323
|
],
|
|
2290
|
-
children: t && /* @__PURE__ */
|
|
2324
|
+
children: t && /* @__PURE__ */ j(H, { style: [X.radioInner, { backgroundColor: l.primary }] })
|
|
2291
2325
|
}),
|
|
2292
|
-
e.image && /* @__PURE__ */
|
|
2326
|
+
e.image && /* @__PURE__ */ j(ne, {
|
|
2293
2327
|
source: { uri: e.image },
|
|
2294
2328
|
style: X.image
|
|
2295
2329
|
}),
|
|
2296
|
-
/* @__PURE__ */
|
|
2330
|
+
/* @__PURE__ */ M(H, {
|
|
2297
2331
|
style: X.optionTextContainer,
|
|
2298
|
-
children: [/* @__PURE__ */
|
|
2332
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2299
2333
|
style: [
|
|
2300
2334
|
X.optionLabel,
|
|
2301
|
-
{ color:
|
|
2302
|
-
e.disabled && { color:
|
|
2335
|
+
{ color: l.textSecondary },
|
|
2336
|
+
e.disabled && { color: l.textMuted }
|
|
2303
2337
|
],
|
|
2304
2338
|
children: n
|
|
2305
|
-
}), r && /* @__PURE__ */
|
|
2306
|
-
style: [X.optionDescription, { color:
|
|
2339
|
+
}), r && /* @__PURE__ */ j(z, {
|
|
2340
|
+
style: [X.optionDescription, { color: l.textMuted }],
|
|
2307
2341
|
children: r
|
|
2308
2342
|
})]
|
|
2309
2343
|
})
|
|
2310
2344
|
]
|
|
2311
2345
|
}, e.value);
|
|
2312
2346
|
}),
|
|
2313
|
-
|
|
2314
|
-
style: [X.error, { color:
|
|
2315
|
-
children: i
|
|
2316
|
-
}),
|
|
2317
|
-
o && !i && /* @__PURE__ */ A(z, {
|
|
2318
|
-
style: [X.helperText, { color: c.textMuted }],
|
|
2347
|
+
o && /* @__PURE__ */ j(z, {
|
|
2348
|
+
style: [X.error, { color: l.error }],
|
|
2319
2349
|
children: o
|
|
2350
|
+
}),
|
|
2351
|
+
c && !o && /* @__PURE__ */ j(z, {
|
|
2352
|
+
style: [X.helperText, { color: l.textMuted }],
|
|
2353
|
+
children: c
|
|
2320
2354
|
})
|
|
2321
2355
|
]
|
|
2322
2356
|
});
|
|
@@ -2393,101 +2427,101 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2393
2427
|
height: 10,
|
|
2394
2428
|
width: 10
|
|
2395
2429
|
}
|
|
2396
|
-
}),
|
|
2397
|
-
let [
|
|
2398
|
-
|
|
2430
|
+
}), je = (e, t) => {
|
|
2431
|
+
let [n, i] = k(!1), { value: a, placeholder: o } = e, { node: s, setValue: c, error: l, label: u, helperText: d } = t, { colors: f } = g(), p = r(), m = s.data.options || [], h = s.data.multiple, _ = Array.isArray(a) ? a : a ? [a] : [], v = (e) => {
|
|
2432
|
+
h ? c(_.includes(e) ? _.filter((t) => t !== e) : [..._, e]) : (c(e), i(!1));
|
|
2399
2433
|
};
|
|
2400
|
-
return /* @__PURE__ */
|
|
2434
|
+
return /* @__PURE__ */ M(H, {
|
|
2401
2435
|
style: Z.container,
|
|
2402
2436
|
children: [
|
|
2403
|
-
/* @__PURE__ */
|
|
2404
|
-
style: [Z.label, { color:
|
|
2405
|
-
children: [
|
|
2406
|
-
style: { color:
|
|
2437
|
+
/* @__PURE__ */ M(z, {
|
|
2438
|
+
style: [Z.label, { color: f.textSecondary }],
|
|
2439
|
+
children: [u || s.data.name, s.data.required && /* @__PURE__ */ j(z, {
|
|
2440
|
+
style: { color: f.error },
|
|
2407
2441
|
children: "*"
|
|
2408
2442
|
})]
|
|
2409
2443
|
}),
|
|
2410
|
-
/* @__PURE__ */
|
|
2444
|
+
/* @__PURE__ */ M(V, {
|
|
2411
2445
|
style: [
|
|
2412
2446
|
Z.trigger,
|
|
2413
2447
|
{
|
|
2414
|
-
backgroundColor:
|
|
2415
|
-
borderColor:
|
|
2448
|
+
backgroundColor: f.input,
|
|
2449
|
+
borderColor: f.border
|
|
2416
2450
|
},
|
|
2417
|
-
|
|
2451
|
+
l && { borderColor: f.error }
|
|
2418
2452
|
],
|
|
2419
|
-
onPress: () =>
|
|
2453
|
+
onPress: () => i(!0),
|
|
2420
2454
|
activeOpacity: .7,
|
|
2421
|
-
children: [/* @__PURE__ */
|
|
2455
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2422
2456
|
style: [
|
|
2423
2457
|
Z.triggerText,
|
|
2424
|
-
{ color:
|
|
2425
|
-
|
|
2458
|
+
{ color: f.text },
|
|
2459
|
+
_.length === 0 && { color: f.textMuted }
|
|
2426
2460
|
],
|
|
2427
2461
|
children: (() => {
|
|
2428
|
-
if (
|
|
2429
|
-
if (
|
|
2430
|
-
let e =
|
|
2431
|
-
return e ?
|
|
2462
|
+
if (_.length === 0) return o || "Select...";
|
|
2463
|
+
if (h) return m.filter((e) => _.includes(e.value)).map((e) => p(e.label) || e.value).join(", ");
|
|
2464
|
+
let e = m.find((e) => e.value === _[0]);
|
|
2465
|
+
return e ? p(e.label) || e.value : o || "Select...";
|
|
2432
2466
|
})()
|
|
2433
|
-
}), /* @__PURE__ */
|
|
2434
|
-
style: [Z.arrow, { color:
|
|
2467
|
+
}), /* @__PURE__ */ j(z, {
|
|
2468
|
+
style: [Z.arrow, { color: f.textMuted }],
|
|
2435
2469
|
children: "▼"
|
|
2436
2470
|
})]
|
|
2437
2471
|
}),
|
|
2438
|
-
/* @__PURE__ */
|
|
2439
|
-
visible:
|
|
2472
|
+
/* @__PURE__ */ j(re, {
|
|
2473
|
+
visible: n,
|
|
2440
2474
|
transparent: !0,
|
|
2441
2475
|
animationType: "fade",
|
|
2442
|
-
onRequestClose: () =>
|
|
2443
|
-
children: /* @__PURE__ */
|
|
2476
|
+
onRequestClose: () => i(!1),
|
|
2477
|
+
children: /* @__PURE__ */ j(V, {
|
|
2444
2478
|
style: Z.modalOverlay,
|
|
2445
2479
|
activeOpacity: 1,
|
|
2446
|
-
onPress: () =>
|
|
2447
|
-
children: /* @__PURE__ */
|
|
2448
|
-
style: [Z.modalContent, { backgroundColor:
|
|
2480
|
+
onPress: () => i(!1),
|
|
2481
|
+
children: /* @__PURE__ */ M(H, {
|
|
2482
|
+
style: [Z.modalContent, { backgroundColor: f.card }],
|
|
2449
2483
|
onStartShouldSetResponder: () => !0,
|
|
2450
2484
|
children: [
|
|
2451
|
-
/* @__PURE__ */
|
|
2452
|
-
style: [Z.modalHeader, { borderBottomColor:
|
|
2453
|
-
children: [/* @__PURE__ */
|
|
2454
|
-
style: [Z.modalTitle, { color:
|
|
2455
|
-
children:
|
|
2456
|
-
}), /* @__PURE__ */
|
|
2457
|
-
onPress: () =>
|
|
2458
|
-
children: /* @__PURE__ */
|
|
2459
|
-
style: [Z.closeButton, { color:
|
|
2485
|
+
/* @__PURE__ */ M(H, {
|
|
2486
|
+
style: [Z.modalHeader, { borderBottomColor: f.border }],
|
|
2487
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2488
|
+
style: [Z.modalTitle, { color: f.text }],
|
|
2489
|
+
children: u || s.data.name
|
|
2490
|
+
}), /* @__PURE__ */ j(V, {
|
|
2491
|
+
onPress: () => i(!1),
|
|
2492
|
+
children: /* @__PURE__ */ j(z, {
|
|
2493
|
+
style: [Z.closeButton, { color: f.textMuted }],
|
|
2460
2494
|
children: "✕"
|
|
2461
2495
|
})
|
|
2462
2496
|
})]
|
|
2463
2497
|
}),
|
|
2464
|
-
/* @__PURE__ */
|
|
2498
|
+
/* @__PURE__ */ j(I, {
|
|
2465
2499
|
style: Z.optionsList,
|
|
2466
|
-
children:
|
|
2467
|
-
let t =
|
|
2468
|
-
return /* @__PURE__ */
|
|
2469
|
-
style: [Z.option, t && { backgroundColor: `${
|
|
2470
|
-
onPress: () =>
|
|
2500
|
+
children: m.map((e) => {
|
|
2501
|
+
let t = _.includes(e.value);
|
|
2502
|
+
return /* @__PURE__ */ M(V, {
|
|
2503
|
+
style: [Z.option, t && { backgroundColor: `${f.primary}20` }],
|
|
2504
|
+
onPress: () => v(e.value),
|
|
2471
2505
|
disabled: e.disabled,
|
|
2472
2506
|
activeOpacity: .7,
|
|
2473
|
-
children: [/* @__PURE__ */
|
|
2507
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2474
2508
|
style: [
|
|
2475
2509
|
Z.optionText,
|
|
2476
|
-
{ color:
|
|
2477
|
-
e.disabled && { color:
|
|
2510
|
+
{ color: f.textSecondary },
|
|
2511
|
+
e.disabled && { color: f.textMuted }
|
|
2478
2512
|
],
|
|
2479
|
-
children:
|
|
2480
|
-
}), t && /* @__PURE__ */
|
|
2481
|
-
style: [Z.checkmark, { color:
|
|
2513
|
+
children: p(e.label) || e.value
|
|
2514
|
+
}), t && /* @__PURE__ */ j(z, {
|
|
2515
|
+
style: [Z.checkmark, { color: f.primary }],
|
|
2482
2516
|
children: "✓"
|
|
2483
2517
|
})]
|
|
2484
2518
|
}, e.value);
|
|
2485
2519
|
})
|
|
2486
2520
|
}),
|
|
2487
|
-
|
|
2488
|
-
style: [Z.doneButton, { backgroundColor:
|
|
2489
|
-
onPress: () =>
|
|
2490
|
-
children: /* @__PURE__ */
|
|
2521
|
+
h && /* @__PURE__ */ j(V, {
|
|
2522
|
+
style: [Z.doneButton, { backgroundColor: f.primary }],
|
|
2523
|
+
onPress: () => i(!1),
|
|
2524
|
+
children: /* @__PURE__ */ j(z, {
|
|
2491
2525
|
style: Z.doneButtonText,
|
|
2492
2526
|
children: "Done"
|
|
2493
2527
|
})
|
|
@@ -2496,13 +2530,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2496
2530
|
})
|
|
2497
2531
|
})
|
|
2498
2532
|
}),
|
|
2499
|
-
|
|
2500
|
-
style: [Z.error, { color:
|
|
2501
|
-
children:
|
|
2533
|
+
l && /* @__PURE__ */ j(z, {
|
|
2534
|
+
style: [Z.error, { color: f.error }],
|
|
2535
|
+
children: l
|
|
2502
2536
|
}),
|
|
2503
|
-
|
|
2504
|
-
style: [Z.helperText, { color:
|
|
2505
|
-
children:
|
|
2537
|
+
d && !l && /* @__PURE__ */ j(z, {
|
|
2538
|
+
style: [Z.helperText, { color: f.textMuted }],
|
|
2539
|
+
children: d
|
|
2506
2540
|
})
|
|
2507
2541
|
]
|
|
2508
2542
|
});
|
|
@@ -2588,44 +2622,44 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2588
2622
|
flex: 1,
|
|
2589
2623
|
fontSize: 14
|
|
2590
2624
|
}
|
|
2591
|
-
}),
|
|
2592
|
-
let {
|
|
2593
|
-
return /* @__PURE__ */
|
|
2594
|
-
style:
|
|
2625
|
+
}), Me = (e, t) => {
|
|
2626
|
+
let { value: n } = e, { node: r, setValue: i, error: a, label: o, helperText: s } = t, { colors: c } = g(), l = !!n;
|
|
2627
|
+
return /* @__PURE__ */ M(H, {
|
|
2628
|
+
style: Ne.container,
|
|
2595
2629
|
children: [
|
|
2596
|
-
/* @__PURE__ */
|
|
2597
|
-
style:
|
|
2598
|
-
children: [/* @__PURE__ */
|
|
2599
|
-
style:
|
|
2600
|
-
children: /* @__PURE__ */
|
|
2601
|
-
style: [
|
|
2602
|
-
children: [
|
|
2603
|
-
style: { color:
|
|
2630
|
+
/* @__PURE__ */ M(H, {
|
|
2631
|
+
style: Ne.row,
|
|
2632
|
+
children: [/* @__PURE__ */ j(H, {
|
|
2633
|
+
style: Ne.labelContainer,
|
|
2634
|
+
children: /* @__PURE__ */ M(z, {
|
|
2635
|
+
style: [Ne.label, { color: c.textSecondary }],
|
|
2636
|
+
children: [o || r.data.name, r.data.required && /* @__PURE__ */ j(z, {
|
|
2637
|
+
style: { color: c.error },
|
|
2604
2638
|
children: "*"
|
|
2605
2639
|
})]
|
|
2606
2640
|
})
|
|
2607
|
-
}), /* @__PURE__ */
|
|
2641
|
+
}), /* @__PURE__ */ j(R, {
|
|
2608
2642
|
trackColor: {
|
|
2609
|
-
false:
|
|
2610
|
-
true: `${
|
|
2643
|
+
false: c.border,
|
|
2644
|
+
true: `${c.primary}80`
|
|
2611
2645
|
},
|
|
2612
|
-
thumbColor:
|
|
2613
|
-
ios_backgroundColor:
|
|
2614
|
-
onValueChange:
|
|
2615
|
-
value:
|
|
2646
|
+
thumbColor: l ? c.primary : c.card,
|
|
2647
|
+
ios_backgroundColor: c.border,
|
|
2648
|
+
onValueChange: i,
|
|
2649
|
+
value: l
|
|
2616
2650
|
})]
|
|
2617
2651
|
}),
|
|
2618
|
-
|
|
2619
|
-
style: [
|
|
2620
|
-
children: r
|
|
2621
|
-
}),
|
|
2622
|
-
a && !r && /* @__PURE__ */ A(z, {
|
|
2623
|
-
style: [Ae.helperText, { color: o.textMuted }],
|
|
2652
|
+
a && /* @__PURE__ */ j(z, {
|
|
2653
|
+
style: [Ne.error, { color: c.error }],
|
|
2624
2654
|
children: a
|
|
2655
|
+
}),
|
|
2656
|
+
s && !a && /* @__PURE__ */ j(z, {
|
|
2657
|
+
style: [Ne.helperText, { color: c.textMuted }],
|
|
2658
|
+
children: s
|
|
2625
2659
|
})
|
|
2626
2660
|
]
|
|
2627
2661
|
});
|
|
2628
|
-
},
|
|
2662
|
+
}, Ne = L.create({
|
|
2629
2663
|
container: { marginBottom: 16 },
|
|
2630
2664
|
error: {
|
|
2631
2665
|
fontSize: 12,
|
|
@@ -2645,48 +2679,48 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2645
2679
|
flexDirection: "row",
|
|
2646
2680
|
justifyContent: "space-between"
|
|
2647
2681
|
}
|
|
2648
|
-
}),
|
|
2649
|
-
let {
|
|
2650
|
-
return /* @__PURE__ */
|
|
2651
|
-
style:
|
|
2682
|
+
}), Pe = (e, t) => {
|
|
2683
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2684
|
+
return /* @__PURE__ */ M(H, {
|
|
2685
|
+
style: Fe.container,
|
|
2652
2686
|
children: [
|
|
2653
|
-
/* @__PURE__ */
|
|
2654
|
-
style: [
|
|
2655
|
-
children: [
|
|
2656
|
-
style: { color:
|
|
2687
|
+
/* @__PURE__ */ M(z, {
|
|
2688
|
+
style: [Fe.label, { color: u.textSecondary }],
|
|
2689
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ j(z, {
|
|
2690
|
+
style: { color: u.error },
|
|
2657
2691
|
children: "*"
|
|
2658
2692
|
})]
|
|
2659
2693
|
}),
|
|
2660
|
-
/* @__PURE__ */
|
|
2694
|
+
/* @__PURE__ */ j(B, {
|
|
2661
2695
|
style: [
|
|
2662
|
-
|
|
2696
|
+
Fe.textarea,
|
|
2663
2697
|
{
|
|
2664
|
-
backgroundColor:
|
|
2665
|
-
borderColor:
|
|
2666
|
-
color:
|
|
2698
|
+
backgroundColor: u.input,
|
|
2699
|
+
borderColor: u.border,
|
|
2700
|
+
color: u.text
|
|
2667
2701
|
},
|
|
2668
|
-
|
|
2702
|
+
s && { borderColor: u.error }
|
|
2669
2703
|
],
|
|
2670
|
-
value:
|
|
2671
|
-
onChangeText:
|
|
2672
|
-
placeholder:
|
|
2673
|
-
placeholderTextColor:
|
|
2704
|
+
value: n ?? "",
|
|
2705
|
+
onChangeText: o,
|
|
2706
|
+
placeholder: r,
|
|
2707
|
+
placeholderTextColor: u.textMuted,
|
|
2674
2708
|
multiline: !0,
|
|
2675
2709
|
numberOfLines: 4,
|
|
2676
2710
|
textAlignVertical: "top",
|
|
2677
|
-
accessibilityLabel:
|
|
2711
|
+
accessibilityLabel: i
|
|
2678
2712
|
}),
|
|
2679
|
-
|
|
2680
|
-
style: [
|
|
2681
|
-
children:
|
|
2713
|
+
s && /* @__PURE__ */ j(z, {
|
|
2714
|
+
style: [Fe.error, { color: u.error }],
|
|
2715
|
+
children: s
|
|
2682
2716
|
}),
|
|
2683
|
-
|
|
2684
|
-
style: [
|
|
2685
|
-
children:
|
|
2717
|
+
l && !s && /* @__PURE__ */ j(z, {
|
|
2718
|
+
style: [Fe.helperText, { color: u.textMuted }],
|
|
2719
|
+
children: l
|
|
2686
2720
|
})
|
|
2687
2721
|
]
|
|
2688
2722
|
});
|
|
2689
|
-
},
|
|
2723
|
+
}, Fe = L.create({
|
|
2690
2724
|
container: { marginBottom: 16 },
|
|
2691
2725
|
error: {
|
|
2692
2726
|
fontSize: 12,
|
|
@@ -2709,45 +2743,45 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2709
2743
|
paddingHorizontal: 12,
|
|
2710
2744
|
paddingVertical: 8
|
|
2711
2745
|
}
|
|
2712
|
-
}),
|
|
2713
|
-
let {
|
|
2714
|
-
return /* @__PURE__ */
|
|
2715
|
-
style:
|
|
2746
|
+
}), Ie = (e, t) => {
|
|
2747
|
+
let { value: n, placeholder: r, name: i } = e, { node: a, setValue: o, error: s, label: c, helperText: l } = t, { colors: u } = g();
|
|
2748
|
+
return /* @__PURE__ */ M(H, {
|
|
2749
|
+
style: Le.container,
|
|
2716
2750
|
children: [
|
|
2717
|
-
/* @__PURE__ */
|
|
2718
|
-
style: [
|
|
2719
|
-
children: [
|
|
2720
|
-
style: { color:
|
|
2751
|
+
/* @__PURE__ */ M(z, {
|
|
2752
|
+
style: [Le.label, { color: u.textSecondary }],
|
|
2753
|
+
children: [c || a.data.name, a.data.required && /* @__PURE__ */ j(z, {
|
|
2754
|
+
style: { color: u.error },
|
|
2721
2755
|
children: "*"
|
|
2722
2756
|
})]
|
|
2723
2757
|
}),
|
|
2724
|
-
/* @__PURE__ */
|
|
2758
|
+
/* @__PURE__ */ j(B, {
|
|
2725
2759
|
style: [
|
|
2726
|
-
|
|
2760
|
+
Le.input,
|
|
2727
2761
|
{
|
|
2728
|
-
backgroundColor:
|
|
2729
|
-
borderColor:
|
|
2730
|
-
color:
|
|
2762
|
+
backgroundColor: u.input,
|
|
2763
|
+
borderColor: u.border,
|
|
2764
|
+
color: u.text
|
|
2731
2765
|
},
|
|
2732
|
-
|
|
2766
|
+
s && { borderColor: u.error }
|
|
2733
2767
|
],
|
|
2734
|
-
value:
|
|
2735
|
-
onChangeText:
|
|
2736
|
-
placeholder:
|
|
2737
|
-
placeholderTextColor:
|
|
2738
|
-
accessibilityLabel:
|
|
2768
|
+
value: n ?? "",
|
|
2769
|
+
onChangeText: o,
|
|
2770
|
+
placeholder: r,
|
|
2771
|
+
placeholderTextColor: u.textMuted,
|
|
2772
|
+
accessibilityLabel: i
|
|
2739
2773
|
}),
|
|
2740
|
-
|
|
2741
|
-
style: [
|
|
2742
|
-
children:
|
|
2774
|
+
s && /* @__PURE__ */ j(z, {
|
|
2775
|
+
style: [Le.error, { color: u.error }],
|
|
2776
|
+
children: s
|
|
2743
2777
|
}),
|
|
2744
|
-
|
|
2745
|
-
style: [
|
|
2746
|
-
children:
|
|
2778
|
+
l && !s && /* @__PURE__ */ j(z, {
|
|
2779
|
+
style: [Le.helperText, { color: u.textMuted }],
|
|
2780
|
+
children: l
|
|
2747
2781
|
})
|
|
2748
2782
|
]
|
|
2749
2783
|
});
|
|
2750
|
-
},
|
|
2784
|
+
}, Le = L.create({
|
|
2751
2785
|
container: { marginBottom: 16 },
|
|
2752
2786
|
error: {
|
|
2753
2787
|
fontSize: 12,
|
|
@@ -2769,100 +2803,100 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2769
2803
|
fontWeight: "500",
|
|
2770
2804
|
marginBottom: 8
|
|
2771
2805
|
}
|
|
2772
|
-
}),
|
|
2773
|
-
let
|
|
2774
|
-
|
|
2806
|
+
}), Re = (e, t) => {
|
|
2807
|
+
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] = k(s || 0), [d, f] = k(c || 0), [p, m] = k(!1), { node: h, setValue: _, error: v, label: y, helperText: b } = t, { colors: x } = g(), S = O(null), C = O(null), w = Array.from({ length: 24 }, (e, t) => t), T = Array.from({ length: 60 }, (e, t) => t), E = () => n || r || "Select time", D = ee(() => {
|
|
2808
|
+
_(`${String(l).padStart(2, "0")}:${String(d).padStart(2, "0")}`), m(!1);
|
|
2775
2809
|
}, [
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2810
|
+
l,
|
|
2811
|
+
d,
|
|
2812
|
+
_
|
|
2779
2813
|
]);
|
|
2780
|
-
return /* @__PURE__ */
|
|
2814
|
+
return /* @__PURE__ */ M(H, {
|
|
2781
2815
|
style: Q.container,
|
|
2782
2816
|
children: [
|
|
2783
|
-
/* @__PURE__ */
|
|
2784
|
-
style: [Q.label, { color:
|
|
2785
|
-
children: [
|
|
2786
|
-
style: { color:
|
|
2817
|
+
/* @__PURE__ */ M(z, {
|
|
2818
|
+
style: [Q.label, { color: x.textSecondary }],
|
|
2819
|
+
children: [y || h.data.name, h.data.required && /* @__PURE__ */ j(z, {
|
|
2820
|
+
style: { color: x.error },
|
|
2787
2821
|
children: "*"
|
|
2788
2822
|
})]
|
|
2789
2823
|
}),
|
|
2790
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ M(V, {
|
|
2791
2825
|
style: [
|
|
2792
2826
|
Q.trigger,
|
|
2793
2827
|
{
|
|
2794
|
-
backgroundColor:
|
|
2795
|
-
borderColor:
|
|
2828
|
+
backgroundColor: x.input,
|
|
2829
|
+
borderColor: x.border
|
|
2796
2830
|
},
|
|
2797
|
-
|
|
2831
|
+
v && { borderColor: x.error }
|
|
2798
2832
|
],
|
|
2799
2833
|
onPress: () => {
|
|
2800
|
-
|
|
2834
|
+
u(s || 0), f(c || 0), m(!0);
|
|
2801
2835
|
},
|
|
2802
2836
|
activeOpacity: .7,
|
|
2803
|
-
children: [/* @__PURE__ */
|
|
2837
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2804
2838
|
style: [
|
|
2805
2839
|
Q.triggerText,
|
|
2806
|
-
{ color:
|
|
2807
|
-
!
|
|
2840
|
+
{ color: x.text },
|
|
2841
|
+
!n && { color: x.textMuted }
|
|
2808
2842
|
],
|
|
2809
2843
|
numberOfLines: 1,
|
|
2810
|
-
children:
|
|
2811
|
-
}), /* @__PURE__ */
|
|
2844
|
+
children: E()
|
|
2845
|
+
}), /* @__PURE__ */ j(z, {
|
|
2812
2846
|
style: Q.icon,
|
|
2813
2847
|
children: "🕐"
|
|
2814
2848
|
})]
|
|
2815
2849
|
}),
|
|
2816
|
-
/* @__PURE__ */
|
|
2817
|
-
visible:
|
|
2850
|
+
/* @__PURE__ */ j(re, {
|
|
2851
|
+
visible: p,
|
|
2818
2852
|
transparent: !0,
|
|
2819
2853
|
animationType: "fade",
|
|
2820
|
-
onRequestClose: () =>
|
|
2821
|
-
children: /* @__PURE__ */
|
|
2854
|
+
onRequestClose: () => m(!1),
|
|
2855
|
+
children: /* @__PURE__ */ j(V, {
|
|
2822
2856
|
style: Q.modalOverlay,
|
|
2823
2857
|
activeOpacity: 1,
|
|
2824
|
-
onPress: () =>
|
|
2825
|
-
children: /* @__PURE__ */
|
|
2826
|
-
style: [Q.modalContent, { backgroundColor:
|
|
2858
|
+
onPress: () => m(!1),
|
|
2859
|
+
children: /* @__PURE__ */ M(V, {
|
|
2860
|
+
style: [Q.modalContent, { backgroundColor: x.card }],
|
|
2827
2861
|
activeOpacity: 1,
|
|
2828
2862
|
onPress: () => {},
|
|
2829
2863
|
children: [
|
|
2830
|
-
/* @__PURE__ */
|
|
2831
|
-
style: [Q.modalHeader, { borderBottomColor:
|
|
2832
|
-
children: [/* @__PURE__ */
|
|
2833
|
-
style: [Q.modalTitle, { color:
|
|
2834
|
-
children:
|
|
2835
|
-
}), /* @__PURE__ */
|
|
2836
|
-
onPress: () =>
|
|
2837
|
-
children: /* @__PURE__ */
|
|
2838
|
-
style: [Q.closeButton, { color:
|
|
2864
|
+
/* @__PURE__ */ M(H, {
|
|
2865
|
+
style: [Q.modalHeader, { borderBottomColor: x.separator }],
|
|
2866
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2867
|
+
style: [Q.modalTitle, { color: x.text }],
|
|
2868
|
+
children: y || h.data.name
|
|
2869
|
+
}), /* @__PURE__ */ j(V, {
|
|
2870
|
+
onPress: () => m(!1),
|
|
2871
|
+
children: /* @__PURE__ */ j(z, {
|
|
2872
|
+
style: [Q.closeButton, { color: x.textMuted }],
|
|
2839
2873
|
children: "✕"
|
|
2840
2874
|
})
|
|
2841
2875
|
})]
|
|
2842
2876
|
}),
|
|
2843
|
-
/* @__PURE__ */
|
|
2877
|
+
/* @__PURE__ */ M(H, {
|
|
2844
2878
|
style: Q.pickerContainer,
|
|
2845
2879
|
children: [
|
|
2846
|
-
/* @__PURE__ */
|
|
2880
|
+
/* @__PURE__ */ M(H, {
|
|
2847
2881
|
style: Q.pickerColumn,
|
|
2848
|
-
children: [/* @__PURE__ */
|
|
2849
|
-
style: [Q.pickerLabel, { color:
|
|
2882
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2883
|
+
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2850
2884
|
children: "Hour"
|
|
2851
|
-
}), /* @__PURE__ */
|
|
2852
|
-
ref:
|
|
2885
|
+
}), /* @__PURE__ */ j(I, {
|
|
2886
|
+
ref: S,
|
|
2853
2887
|
style: Q.picker,
|
|
2854
2888
|
contentContainerStyle: Q.pickerContent,
|
|
2855
2889
|
showsVerticalScrollIndicator: !1,
|
|
2856
|
-
children:
|
|
2857
|
-
style: [Q.pickerItem,
|
|
2858
|
-
onPress: () =>
|
|
2890
|
+
children: w.map((e) => /* @__PURE__ */ j(V, {
|
|
2891
|
+
style: [Q.pickerItem, l === e && { backgroundColor: x.primary }],
|
|
2892
|
+
onPress: () => u(e),
|
|
2859
2893
|
activeOpacity: .7,
|
|
2860
|
-
children: /* @__PURE__ */
|
|
2894
|
+
children: /* @__PURE__ */ j(z, {
|
|
2861
2895
|
style: [
|
|
2862
2896
|
Q.pickerItemText,
|
|
2863
|
-
{ color:
|
|
2864
|
-
|
|
2865
|
-
color:
|
|
2897
|
+
{ color: x.text },
|
|
2898
|
+
l === e && {
|
|
2899
|
+
color: x.background,
|
|
2866
2900
|
fontWeight: "600"
|
|
2867
2901
|
}
|
|
2868
2902
|
],
|
|
@@ -2871,30 +2905,30 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2871
2905
|
}, e))
|
|
2872
2906
|
})]
|
|
2873
2907
|
}),
|
|
2874
|
-
/* @__PURE__ */
|
|
2875
|
-
style: [Q.pickerSeparator, { color:
|
|
2908
|
+
/* @__PURE__ */ j(z, {
|
|
2909
|
+
style: [Q.pickerSeparator, { color: x.text }],
|
|
2876
2910
|
children: ":"
|
|
2877
2911
|
}),
|
|
2878
|
-
/* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ M(H, {
|
|
2879
2913
|
style: Q.pickerColumn,
|
|
2880
|
-
children: [/* @__PURE__ */
|
|
2881
|
-
style: [Q.pickerLabel, { color:
|
|
2914
|
+
children: [/* @__PURE__ */ j(z, {
|
|
2915
|
+
style: [Q.pickerLabel, { color: x.textMuted }],
|
|
2882
2916
|
children: "Minute"
|
|
2883
|
-
}), /* @__PURE__ */
|
|
2884
|
-
ref:
|
|
2917
|
+
}), /* @__PURE__ */ j(I, {
|
|
2918
|
+
ref: C,
|
|
2885
2919
|
style: Q.picker,
|
|
2886
2920
|
contentContainerStyle: Q.pickerContent,
|
|
2887
2921
|
showsVerticalScrollIndicator: !1,
|
|
2888
|
-
children:
|
|
2889
|
-
style: [Q.pickerItem,
|
|
2890
|
-
onPress: () =>
|
|
2922
|
+
children: T.map((e) => /* @__PURE__ */ j(V, {
|
|
2923
|
+
style: [Q.pickerItem, d === e && { backgroundColor: x.primary }],
|
|
2924
|
+
onPress: () => f(e),
|
|
2891
2925
|
activeOpacity: .7,
|
|
2892
|
-
children: /* @__PURE__ */
|
|
2926
|
+
children: /* @__PURE__ */ j(z, {
|
|
2893
2927
|
style: [
|
|
2894
2928
|
Q.pickerItemText,
|
|
2895
|
-
{ color:
|
|
2896
|
-
|
|
2897
|
-
color:
|
|
2929
|
+
{ color: x.text },
|
|
2930
|
+
d === e && {
|
|
2931
|
+
color: x.background,
|
|
2898
2932
|
fontWeight: "600"
|
|
2899
2933
|
}
|
|
2900
2934
|
],
|
|
@@ -2905,12 +2939,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2905
2939
|
})
|
|
2906
2940
|
]
|
|
2907
2941
|
}),
|
|
2908
|
-
/* @__PURE__ */
|
|
2909
|
-
style: [Q.confirmButton, { backgroundColor:
|
|
2910
|
-
onPress:
|
|
2942
|
+
/* @__PURE__ */ j(V, {
|
|
2943
|
+
style: [Q.confirmButton, { backgroundColor: x.primary }],
|
|
2944
|
+
onPress: D,
|
|
2911
2945
|
activeOpacity: .7,
|
|
2912
|
-
children: /* @__PURE__ */
|
|
2913
|
-
style: [Q.confirmButtonText, { color:
|
|
2946
|
+
children: /* @__PURE__ */ j(z, {
|
|
2947
|
+
style: [Q.confirmButtonText, { color: x.background }],
|
|
2914
2948
|
children: "Confirm"
|
|
2915
2949
|
})
|
|
2916
2950
|
})
|
|
@@ -2918,13 +2952,13 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
2918
2952
|
})
|
|
2919
2953
|
})
|
|
2920
2954
|
}),
|
|
2921
|
-
|
|
2922
|
-
style: [Q.error, { color:
|
|
2923
|
-
children:
|
|
2955
|
+
v && /* @__PURE__ */ j(z, {
|
|
2956
|
+
style: [Q.error, { color: x.error }],
|
|
2957
|
+
children: v
|
|
2924
2958
|
}),
|
|
2925
|
-
|
|
2926
|
-
style: [Q.helperText, { color:
|
|
2927
|
-
children:
|
|
2959
|
+
b && !v && /* @__PURE__ */ j(z, {
|
|
2960
|
+
style: [Q.helperText, { color: x.textMuted }],
|
|
2961
|
+
children: b
|
|
2928
2962
|
})
|
|
2929
2963
|
]
|
|
2930
2964
|
});
|
|
@@ -3019,112 +3053,112 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3019
3053
|
flex: 1,
|
|
3020
3054
|
fontSize: 14
|
|
3021
3055
|
}
|
|
3022
|
-
}),
|
|
3023
|
-
let [
|
|
3024
|
-
let e = `${String(
|
|
3025
|
-
|
|
3056
|
+
}), ze = (e, t) => {
|
|
3057
|
+
let [n, i] = k(!1), [a, o] = k(!0), { value: s } = e, { node: c, setValue: l, error: u, label: d, helperText: f } = t, { colors: p } = g(), m = r(), h = Array.isArray(s) ? s : [], _ = 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, [A, N] = k(0), [P, F] = k(0), te = Array.from({ length: 24 }, (e, t) => t), ne = Array.from({ length: 60 }, (e, t) => t), L = () => _ && v ? `${_} - ${v}` : _ || m("renderer.defaultInputs.selectDateRange"), R = ee(() => {
|
|
3058
|
+
let e = `${String(A).padStart(2, "0")}:${String(P).padStart(2, "0")}`;
|
|
3059
|
+
a ? (l([e, v]), o(!1), N(D || 0), F(O || 0)) : (l([_, e]), i(!1), o(!0));
|
|
3026
3060
|
}, [
|
|
3027
|
-
|
|
3061
|
+
a,
|
|
3062
|
+
A,
|
|
3063
|
+
P,
|
|
3064
|
+
_,
|
|
3065
|
+
v,
|
|
3028
3066
|
D,
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
h,
|
|
3032
|
-
T,
|
|
3033
|
-
E,
|
|
3034
|
-
n
|
|
3067
|
+
O,
|
|
3068
|
+
l
|
|
3035
3069
|
]);
|
|
3036
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ M(H, {
|
|
3037
3071
|
style: $.container,
|
|
3038
3072
|
children: [
|
|
3039
|
-
/* @__PURE__ */
|
|
3040
|
-
style: [$.label, { color:
|
|
3041
|
-
children: [
|
|
3042
|
-
style: { color:
|
|
3073
|
+
/* @__PURE__ */ M(z, {
|
|
3074
|
+
style: [$.label, { color: p.textSecondary }],
|
|
3075
|
+
children: [d || c.data.name, c.data.required && /* @__PURE__ */ j(z, {
|
|
3076
|
+
style: { color: p.error },
|
|
3043
3077
|
children: "*"
|
|
3044
3078
|
})]
|
|
3045
3079
|
}),
|
|
3046
|
-
/* @__PURE__ */
|
|
3080
|
+
/* @__PURE__ */ M(V, {
|
|
3047
3081
|
style: [
|
|
3048
3082
|
$.trigger,
|
|
3049
3083
|
{
|
|
3050
|
-
backgroundColor:
|
|
3051
|
-
borderColor:
|
|
3084
|
+
backgroundColor: p.input,
|
|
3085
|
+
borderColor: p.border
|
|
3052
3086
|
},
|
|
3053
|
-
|
|
3087
|
+
u && { borderColor: p.error }
|
|
3054
3088
|
],
|
|
3055
3089
|
onPress: () => {
|
|
3056
|
-
|
|
3090
|
+
N(S || 0), F(C || 0), o(!0), i(!0);
|
|
3057
3091
|
},
|
|
3058
3092
|
activeOpacity: .7,
|
|
3059
|
-
children: [/* @__PURE__ */
|
|
3093
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3060
3094
|
style: [
|
|
3061
3095
|
$.triggerText,
|
|
3062
|
-
{ color:
|
|
3063
|
-
!
|
|
3096
|
+
{ color: p.text },
|
|
3097
|
+
!_ && { color: p.textMuted }
|
|
3064
3098
|
],
|
|
3065
3099
|
numberOfLines: 1,
|
|
3066
|
-
children:
|
|
3067
|
-
}), /* @__PURE__ */
|
|
3100
|
+
children: L()
|
|
3101
|
+
}), /* @__PURE__ */ j(z, {
|
|
3068
3102
|
style: $.icon,
|
|
3069
3103
|
children: "🕐"
|
|
3070
3104
|
})]
|
|
3071
3105
|
}),
|
|
3072
|
-
/* @__PURE__ */
|
|
3073
|
-
visible:
|
|
3106
|
+
/* @__PURE__ */ j(re, {
|
|
3107
|
+
visible: n,
|
|
3074
3108
|
transparent: !0,
|
|
3075
3109
|
animationType: "fade",
|
|
3076
|
-
onRequestClose: () =>
|
|
3077
|
-
children: /* @__PURE__ */
|
|
3110
|
+
onRequestClose: () => i(!1),
|
|
3111
|
+
children: /* @__PURE__ */ j(V, {
|
|
3078
3112
|
style: $.modalOverlay,
|
|
3079
3113
|
activeOpacity: 1,
|
|
3080
|
-
onPress: () =>
|
|
3081
|
-
children: /* @__PURE__ */
|
|
3082
|
-
style: [$.modalContent, { backgroundColor:
|
|
3114
|
+
onPress: () => i(!1),
|
|
3115
|
+
children: /* @__PURE__ */ M(V, {
|
|
3116
|
+
style: [$.modalContent, { backgroundColor: p.card }],
|
|
3083
3117
|
activeOpacity: 1,
|
|
3084
3118
|
onPress: () => {},
|
|
3085
3119
|
children: [
|
|
3086
|
-
/* @__PURE__ */
|
|
3087
|
-
style: [$.modalHeader, { borderBottomColor:
|
|
3088
|
-
children: [/* @__PURE__ */
|
|
3089
|
-
style: [$.modalTitle, { color:
|
|
3090
|
-
children:
|
|
3091
|
-
}), /* @__PURE__ */
|
|
3092
|
-
onPress: () =>
|
|
3093
|
-
children: /* @__PURE__ */
|
|
3094
|
-
style: [$.closeButton, { color:
|
|
3120
|
+
/* @__PURE__ */ M(H, {
|
|
3121
|
+
style: [$.modalHeader, { borderBottomColor: p.separator }],
|
|
3122
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3123
|
+
style: [$.modalTitle, { color: p.text }],
|
|
3124
|
+
children: d || c.data.name
|
|
3125
|
+
}), /* @__PURE__ */ j(V, {
|
|
3126
|
+
onPress: () => i(!1),
|
|
3127
|
+
children: /* @__PURE__ */ j(z, {
|
|
3128
|
+
style: [$.closeButton, { color: p.textMuted }],
|
|
3095
3129
|
children: "✕"
|
|
3096
3130
|
})
|
|
3097
3131
|
})]
|
|
3098
3132
|
}),
|
|
3099
|
-
/* @__PURE__ */
|
|
3100
|
-
style: [$.rangeIndicator, { backgroundColor:
|
|
3101
|
-
children: /* @__PURE__ */
|
|
3102
|
-
style: [$.rangeIndicatorText, { color:
|
|
3103
|
-
children:
|
|
3133
|
+
/* @__PURE__ */ j(H, {
|
|
3134
|
+
style: [$.rangeIndicator, { backgroundColor: p.primaryLight }],
|
|
3135
|
+
children: /* @__PURE__ */ j(z, {
|
|
3136
|
+
style: [$.rangeIndicatorText, { color: p.primary }],
|
|
3137
|
+
children: m(a ? "renderer.defaultInputs.startTime" : "renderer.defaultInputs.endTime")
|
|
3104
3138
|
})
|
|
3105
3139
|
}),
|
|
3106
|
-
/* @__PURE__ */
|
|
3140
|
+
/* @__PURE__ */ M(H, {
|
|
3107
3141
|
style: $.pickerContainer,
|
|
3108
3142
|
children: [
|
|
3109
|
-
/* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ M(H, {
|
|
3110
3144
|
style: $.pickerColumn,
|
|
3111
|
-
children: [/* @__PURE__ */
|
|
3112
|
-
style: [$.pickerLabel, { color:
|
|
3145
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3146
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3113
3147
|
children: "Hour"
|
|
3114
|
-
}), /* @__PURE__ */
|
|
3148
|
+
}), /* @__PURE__ */ j(I, {
|
|
3115
3149
|
style: $.picker,
|
|
3116
3150
|
contentContainerStyle: $.pickerContent,
|
|
3117
3151
|
showsVerticalScrollIndicator: !1,
|
|
3118
|
-
children:
|
|
3119
|
-
style: [$.pickerItem,
|
|
3120
|
-
onPress: () =>
|
|
3152
|
+
children: te.map((e) => /* @__PURE__ */ j(V, {
|
|
3153
|
+
style: [$.pickerItem, A === e && { backgroundColor: p.primary }],
|
|
3154
|
+
onPress: () => N(e),
|
|
3121
3155
|
activeOpacity: .7,
|
|
3122
|
-
children: /* @__PURE__ */
|
|
3156
|
+
children: /* @__PURE__ */ j(z, {
|
|
3123
3157
|
style: [
|
|
3124
3158
|
$.pickerItemText,
|
|
3125
|
-
{ color:
|
|
3126
|
-
|
|
3127
|
-
color:
|
|
3159
|
+
{ color: p.text },
|
|
3160
|
+
A === e && {
|
|
3161
|
+
color: p.background,
|
|
3128
3162
|
fontWeight: "600"
|
|
3129
3163
|
}
|
|
3130
3164
|
],
|
|
@@ -3133,29 +3167,29 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3133
3167
|
}, e))
|
|
3134
3168
|
})]
|
|
3135
3169
|
}),
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
style: [$.pickerSeparator, { color:
|
|
3170
|
+
/* @__PURE__ */ j(z, {
|
|
3171
|
+
style: [$.pickerSeparator, { color: p.text }],
|
|
3138
3172
|
children: ":"
|
|
3139
3173
|
}),
|
|
3140
|
-
/* @__PURE__ */
|
|
3174
|
+
/* @__PURE__ */ M(H, {
|
|
3141
3175
|
style: $.pickerColumn,
|
|
3142
|
-
children: [/* @__PURE__ */
|
|
3143
|
-
style: [$.pickerLabel, { color:
|
|
3176
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3177
|
+
style: [$.pickerLabel, { color: p.textMuted }],
|
|
3144
3178
|
children: "Minute"
|
|
3145
|
-
}), /* @__PURE__ */
|
|
3179
|
+
}), /* @__PURE__ */ j(I, {
|
|
3146
3180
|
style: $.picker,
|
|
3147
3181
|
contentContainerStyle: $.pickerContent,
|
|
3148
3182
|
showsVerticalScrollIndicator: !1,
|
|
3149
|
-
children:
|
|
3150
|
-
style: [$.pickerItem,
|
|
3151
|
-
onPress: () =>
|
|
3183
|
+
children: ne.map((e) => /* @__PURE__ */ j(V, {
|
|
3184
|
+
style: [$.pickerItem, P === e && { backgroundColor: p.primary }],
|
|
3185
|
+
onPress: () => F(e),
|
|
3152
3186
|
activeOpacity: .7,
|
|
3153
|
-
children: /* @__PURE__ */
|
|
3187
|
+
children: /* @__PURE__ */ j(z, {
|
|
3154
3188
|
style: [
|
|
3155
3189
|
$.pickerItemText,
|
|
3156
|
-
{ color:
|
|
3157
|
-
|
|
3158
|
-
color:
|
|
3190
|
+
{ color: p.text },
|
|
3191
|
+
P === e && {
|
|
3192
|
+
color: p.background,
|
|
3159
3193
|
fontWeight: "600"
|
|
3160
3194
|
}
|
|
3161
3195
|
],
|
|
@@ -3166,26 +3200,26 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3166
3200
|
})
|
|
3167
3201
|
]
|
|
3168
3202
|
}),
|
|
3169
|
-
/* @__PURE__ */
|
|
3170
|
-
style: [$.confirmButton, { backgroundColor:
|
|
3171
|
-
onPress:
|
|
3203
|
+
/* @__PURE__ */ j(V, {
|
|
3204
|
+
style: [$.confirmButton, { backgroundColor: p.primary }],
|
|
3205
|
+
onPress: R,
|
|
3172
3206
|
activeOpacity: .7,
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3174
|
-
style: [$.confirmButtonText, { color:
|
|
3175
|
-
children:
|
|
3207
|
+
children: /* @__PURE__ */ j(z, {
|
|
3208
|
+
style: [$.confirmButtonText, { color: p.background }],
|
|
3209
|
+
children: a ? "Next" : "Confirm"
|
|
3176
3210
|
})
|
|
3177
3211
|
})
|
|
3178
3212
|
]
|
|
3179
3213
|
})
|
|
3180
3214
|
})
|
|
3181
3215
|
}),
|
|
3182
|
-
|
|
3183
|
-
style: [$.error, { color:
|
|
3184
|
-
children:
|
|
3216
|
+
u && /* @__PURE__ */ j(z, {
|
|
3217
|
+
style: [$.error, { color: p.error }],
|
|
3218
|
+
children: u
|
|
3185
3219
|
}),
|
|
3186
|
-
|
|
3187
|
-
style: [$.helperText, { color:
|
|
3188
|
-
children:
|
|
3220
|
+
f && !u && /* @__PURE__ */ j(z, {
|
|
3221
|
+
style: [$.helperText, { color: p.textMuted }],
|
|
3222
|
+
children: f
|
|
3189
3223
|
})
|
|
3190
3224
|
]
|
|
3191
3225
|
});
|
|
@@ -3290,75 +3324,75 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3290
3324
|
flex: 1,
|
|
3291
3325
|
fontSize: 14
|
|
3292
3326
|
}
|
|
3293
|
-
}),
|
|
3327
|
+
}), Be = (e, t) => /* @__PURE__ */ M(z, { children: [
|
|
3294
3328
|
"TODO: Implement ",
|
|
3295
|
-
|
|
3329
|
+
t.node.data.type,
|
|
3296
3330
|
" input for React Native"
|
|
3297
|
-
] }),
|
|
3331
|
+
] }), Ve = {
|
|
3298
3332
|
address: ce,
|
|
3299
3333
|
autocomplete: le,
|
|
3300
|
-
checkbox:
|
|
3301
|
-
date:
|
|
3302
|
-
daterange:
|
|
3303
|
-
file:
|
|
3304
|
-
hidden:
|
|
3305
|
-
http:
|
|
3306
|
-
number:
|
|
3307
|
-
password:
|
|
3308
|
-
radio:
|
|
3309
|
-
select:
|
|
3310
|
-
submit:
|
|
3311
|
-
switch:
|
|
3312
|
-
text:
|
|
3313
|
-
textarea:
|
|
3314
|
-
time:
|
|
3315
|
-
timerange:
|
|
3316
|
-
},
|
|
3317
|
-
let l =
|
|
3318
|
-
return /* @__PURE__ */
|
|
3319
|
-
e ? /* @__PURE__ */
|
|
3320
|
-
style: [
|
|
3334
|
+
checkbox: ue,
|
|
3335
|
+
date: de,
|
|
3336
|
+
daterange: fe,
|
|
3337
|
+
file: pe,
|
|
3338
|
+
hidden: me,
|
|
3339
|
+
http: Te,
|
|
3340
|
+
number: Ee,
|
|
3341
|
+
password: Oe,
|
|
3342
|
+
radio: Ae,
|
|
3343
|
+
select: je,
|
|
3344
|
+
submit: Be,
|
|
3345
|
+
switch: Me,
|
|
3346
|
+
text: Ie,
|
|
3347
|
+
textarea: Pe,
|
|
3348
|
+
time: Re,
|
|
3349
|
+
timerange: ze
|
|
3350
|
+
}, He = ({ label: e, children: t, isFirstStep: n, isLastStep: i, canContinue: a, isSubmitting: o, onBack: s, onContinue: c }) => {
|
|
3351
|
+
let { colors: l } = g(), u = r(), d = !a || o;
|
|
3352
|
+
return /* @__PURE__ */ M(H, { children: [
|
|
3353
|
+
e ? /* @__PURE__ */ j(z, {
|
|
3354
|
+
style: [Ue.label, { color: l.text }],
|
|
3321
3355
|
children: e
|
|
3322
3356
|
}) : null,
|
|
3323
|
-
/* @__PURE__ */
|
|
3324
|
-
style:
|
|
3357
|
+
/* @__PURE__ */ j(H, {
|
|
3358
|
+
style: Ue.content,
|
|
3325
3359
|
children: t
|
|
3326
3360
|
}),
|
|
3327
|
-
/* @__PURE__ */
|
|
3328
|
-
style:
|
|
3329
|
-
children: [n ? /* @__PURE__ */
|
|
3361
|
+
/* @__PURE__ */ M(H, {
|
|
3362
|
+
style: Ue.actions,
|
|
3363
|
+
children: [n ? /* @__PURE__ */ j(H, {}) : /* @__PURE__ */ j(V, {
|
|
3330
3364
|
style: [
|
|
3331
|
-
|
|
3332
|
-
{ borderColor:
|
|
3333
|
-
o &&
|
|
3365
|
+
Ue.backButton,
|
|
3366
|
+
{ borderColor: l.border },
|
|
3367
|
+
o && Ue.disabled
|
|
3334
3368
|
],
|
|
3335
3369
|
onPress: s,
|
|
3336
3370
|
disabled: o,
|
|
3337
3371
|
activeOpacity: .7,
|
|
3338
|
-
children: /* @__PURE__ */
|
|
3339
|
-
style: [
|
|
3340
|
-
children:
|
|
3372
|
+
children: /* @__PURE__ */ j(z, {
|
|
3373
|
+
style: [Ue.backButtonText, { color: l.text }],
|
|
3374
|
+
children: u("renderer.step.back")
|
|
3341
3375
|
})
|
|
3342
|
-
}), /* @__PURE__ */
|
|
3376
|
+
}), /* @__PURE__ */ j(V, {
|
|
3343
3377
|
style: [
|
|
3344
|
-
|
|
3345
|
-
{ backgroundColor:
|
|
3378
|
+
Ue.continueButton,
|
|
3379
|
+
{ backgroundColor: l.primary },
|
|
3346
3380
|
d && {
|
|
3347
|
-
backgroundColor:
|
|
3381
|
+
backgroundColor: l.primaryDisabled,
|
|
3348
3382
|
opacity: .6
|
|
3349
3383
|
}
|
|
3350
3384
|
],
|
|
3351
3385
|
onPress: c,
|
|
3352
3386
|
disabled: d,
|
|
3353
3387
|
activeOpacity: .7,
|
|
3354
|
-
children: o ? /* @__PURE__ */
|
|
3355
|
-
style: [
|
|
3356
|
-
children:
|
|
3388
|
+
children: o ? /* @__PURE__ */ j(N, { color: l.primaryForeground }) : /* @__PURE__ */ j(z, {
|
|
3389
|
+
style: [Ue.continueButtonText, { color: l.primaryForeground }],
|
|
3390
|
+
children: u(i ? "renderer.defaultSubmitButton.submit" : "renderer.step.continue")
|
|
3357
3391
|
})
|
|
3358
3392
|
})]
|
|
3359
3393
|
})
|
|
3360
3394
|
] });
|
|
3361
|
-
},
|
|
3395
|
+
}, Ue = L.create({
|
|
3362
3396
|
actions: {
|
|
3363
3397
|
alignItems: "center",
|
|
3364
3398
|
flexDirection: "row",
|
|
@@ -3393,11 +3427,11 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3393
3427
|
fontWeight: "600",
|
|
3394
3428
|
marginBottom: 12
|
|
3395
3429
|
}
|
|
3396
|
-
}),
|
|
3397
|
-
let { colors: i } =
|
|
3398
|
-
return /* @__PURE__ */
|
|
3430
|
+
}), We = ({ children: e = "Submit", disabled: t, isSubmitting: n, onPress: r }) => {
|
|
3431
|
+
let { colors: i } = g();
|
|
3432
|
+
return /* @__PURE__ */ j(V, {
|
|
3399
3433
|
style: [
|
|
3400
|
-
|
|
3434
|
+
Ge.button,
|
|
3401
3435
|
{ backgroundColor: i.primary },
|
|
3402
3436
|
(t || n) && {
|
|
3403
3437
|
backgroundColor: i.primaryDisabled,
|
|
@@ -3407,12 +3441,12 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3407
3441
|
disabled: t || n,
|
|
3408
3442
|
onPress: r,
|
|
3409
3443
|
activeOpacity: .7,
|
|
3410
|
-
children: n ? /* @__PURE__ */
|
|
3411
|
-
style: [
|
|
3444
|
+
children: n ? /* @__PURE__ */ j(N, { color: i.primaryForeground }) : /* @__PURE__ */ j(z, {
|
|
3445
|
+
style: [Ge.buttonText, { color: i.primaryForeground }],
|
|
3412
3446
|
children: e
|
|
3413
3447
|
})
|
|
3414
3448
|
});
|
|
3415
|
-
},
|
|
3449
|
+
}, Ge = L.create({
|
|
3416
3450
|
button: {
|
|
3417
3451
|
alignItems: "center",
|
|
3418
3452
|
borderRadius: 6,
|
|
@@ -3425,16 +3459,16 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3425
3459
|
fontSize: 16,
|
|
3426
3460
|
fontWeight: "600"
|
|
3427
3461
|
}
|
|
3428
|
-
}),
|
|
3429
|
-
let t = r(), { colors: n } =
|
|
3430
|
-
return /* @__PURE__ */
|
|
3431
|
-
style: [
|
|
3462
|
+
}), Ke = ({ children: e }) => e, qe = ({ node: e }) => {
|
|
3463
|
+
let t = r(), { colors: n } = g(), i = t(e.data?.label);
|
|
3464
|
+
return /* @__PURE__ */ j(z, {
|
|
3465
|
+
style: [Ye.title, { color: n.text }],
|
|
3432
3466
|
children: i
|
|
3433
3467
|
});
|
|
3434
|
-
},
|
|
3435
|
-
let { colors: e } =
|
|
3436
|
-
return /* @__PURE__ */
|
|
3437
|
-
},
|
|
3468
|
+
}, Je = () => {
|
|
3469
|
+
let { colors: e } = g();
|
|
3470
|
+
return /* @__PURE__ */ j(H, { style: [Ye.divider, { backgroundColor: e.separator }] });
|
|
3471
|
+
}, Ye = L.create({
|
|
3438
3472
|
divider: {
|
|
3439
3473
|
height: 1,
|
|
3440
3474
|
marginBottom: 16,
|
|
@@ -3445,63 +3479,63 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3445
3479
|
fontWeight: "700",
|
|
3446
3480
|
marginBottom: 16
|
|
3447
3481
|
}
|
|
3448
|
-
}),
|
|
3449
|
-
divider:
|
|
3450
|
-
title:
|
|
3451
|
-
},
|
|
3482
|
+
}), Xe = {
|
|
3483
|
+
divider: Je,
|
|
3484
|
+
title: qe
|
|
3485
|
+
}, Ze = ({ node: e, children: t }) => {
|
|
3452
3486
|
let { image: n } = e.data;
|
|
3453
|
-
return /* @__PURE__ */
|
|
3487
|
+
return /* @__PURE__ */ M(H, { children: [n && /* @__PURE__ */ j(ne, {
|
|
3454
3488
|
source: { uri: n },
|
|
3455
|
-
style:
|
|
3489
|
+
style: Qe.image,
|
|
3456
3490
|
resizeMode: "cover"
|
|
3457
3491
|
}), t] });
|
|
3458
|
-
},
|
|
3492
|
+
}, Qe = L.create({ image: {
|
|
3459
3493
|
borderRadius: 6,
|
|
3460
3494
|
height: 160,
|
|
3461
3495
|
marginBottom: 8,
|
|
3462
3496
|
width: "100%"
|
|
3463
|
-
} }),
|
|
3464
|
-
let { colors: t } =
|
|
3497
|
+
} }), $e = ({ style: e }) => {
|
|
3498
|
+
let { colors: t } = g(), n = O(new F.Value(.5)).current;
|
|
3465
3499
|
return E(() => {
|
|
3466
|
-
let e =
|
|
3500
|
+
let e = F.loop(F.sequence([F.timing(n, {
|
|
3467
3501
|
duration: 600,
|
|
3468
3502
|
toValue: 1,
|
|
3469
3503
|
useNativeDriver: !0
|
|
3470
|
-
}),
|
|
3504
|
+
}), F.timing(n, {
|
|
3471
3505
|
duration: 600,
|
|
3472
3506
|
toValue: .5,
|
|
3473
3507
|
useNativeDriver: !0
|
|
3474
3508
|
})]));
|
|
3475
3509
|
return e.start(), () => e.stop();
|
|
3476
|
-
}, [n]), /* @__PURE__ */
|
|
3477
|
-
|
|
3510
|
+
}, [n]), /* @__PURE__ */ j(F.View, { style: [
|
|
3511
|
+
tt.bar,
|
|
3478
3512
|
{
|
|
3479
3513
|
backgroundColor: t.muted,
|
|
3480
3514
|
opacity: n
|
|
3481
3515
|
},
|
|
3482
3516
|
e
|
|
3483
3517
|
] });
|
|
3484
|
-
},
|
|
3518
|
+
}, et = () => /* @__PURE__ */ M(H, {
|
|
3485
3519
|
accessibilityState: { busy: !0 },
|
|
3486
3520
|
children: [
|
|
3487
|
-
/* @__PURE__ */
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
style:
|
|
3521
|
+
/* @__PURE__ */ j($e, { style: tt.title }),
|
|
3522
|
+
/* @__PURE__ */ j(H, {
|
|
3523
|
+
style: tt.fields,
|
|
3490
3524
|
children: [
|
|
3491
3525
|
0,
|
|
3492
3526
|
1,
|
|
3493
3527
|
2
|
|
3494
|
-
].map((e) => /* @__PURE__ */
|
|
3495
|
-
style:
|
|
3496
|
-
children: [/* @__PURE__ */
|
|
3528
|
+
].map((e) => /* @__PURE__ */ M(H, {
|
|
3529
|
+
style: tt.field,
|
|
3530
|
+
children: [/* @__PURE__ */ j($e, { style: tt.fieldLabel }), /* @__PURE__ */ j($e, { style: tt.fieldInput })]
|
|
3497
3531
|
}, e))
|
|
3498
3532
|
}),
|
|
3499
|
-
/* @__PURE__ */
|
|
3500
|
-
style:
|
|
3501
|
-
children: /* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ j(H, {
|
|
3534
|
+
style: tt.actions,
|
|
3535
|
+
children: /* @__PURE__ */ j($e, { style: tt.button })
|
|
3502
3536
|
})
|
|
3503
3537
|
]
|
|
3504
|
-
}),
|
|
3538
|
+
}), tt = L.create({
|
|
3505
3539
|
actions: {
|
|
3506
3540
|
alignItems: "flex-end",
|
|
3507
3541
|
marginTop: 24
|
|
@@ -3526,101 +3560,102 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3526
3560
|
marginBottom: 24,
|
|
3527
3561
|
width: "33%"
|
|
3528
3562
|
}
|
|
3529
|
-
}),
|
|
3530
|
-
let { colors:
|
|
3563
|
+
}), nt = ({ components: e, contentContainerStyle: n, flows: r, googleApiKey: i, headers: a, initialValues: o, isLoading: s = !1, language: c, onChange: l, onSubmit: u, style: d, theme: f, validate: m, validationMode: h }) => {
|
|
3564
|
+
let { colors: _ } = g(), { canContinueStep: v, canSubmit: b, clearSubmitMessage: x, config: S, currentStep: C, currentStepGroupNode: w, currentStepIndex: T, formErrors: E, formValues: O, goToNextStep: k, goToPreviousStep: A, handleSubmit: N, inputNodes: P, isFirstStep: F, isLastStep: te, isSubmitting: ne, missingRequiredFields: re, setFieldValue: L, steps: R, submitMessage: B, t: V } = p({
|
|
3531
3565
|
components: e,
|
|
3532
|
-
flows:
|
|
3533
|
-
googleApiKey:
|
|
3534
|
-
headers:
|
|
3535
|
-
initialValues:
|
|
3536
|
-
language:
|
|
3537
|
-
onChange:
|
|
3538
|
-
onSubmit:
|
|
3539
|
-
theme:
|
|
3540
|
-
validate:
|
|
3566
|
+
flows: r,
|
|
3567
|
+
googleApiKey: i,
|
|
3568
|
+
headers: a,
|
|
3569
|
+
initialValues: o,
|
|
3570
|
+
language: c,
|
|
3571
|
+
onChange: l,
|
|
3572
|
+
onSubmit: u,
|
|
3573
|
+
theme: f,
|
|
3574
|
+
validate: m,
|
|
3541
3575
|
validationMode: h
|
|
3542
|
-
}), { FormWrapper:
|
|
3576
|
+
}), { FormWrapper: ae, SubmitButtonWrapper: oe, renderNode: se } = y({
|
|
3543
3577
|
config: S,
|
|
3544
3578
|
DefaultFormWrapper: ie,
|
|
3545
|
-
DefaultInputWrapper:
|
|
3546
|
-
DefaultSubmitButton:
|
|
3547
|
-
DefaultSubmitButtonWrapper:
|
|
3548
|
-
defaultInputRenderers:
|
|
3549
|
-
defaultUI:
|
|
3579
|
+
DefaultInputWrapper: Ze,
|
|
3580
|
+
DefaultSubmitButton: We,
|
|
3581
|
+
DefaultSubmitButtonWrapper: Ke,
|
|
3582
|
+
defaultInputRenderers: Ve,
|
|
3583
|
+
defaultUI: Xe,
|
|
3550
3584
|
formErrors: E,
|
|
3551
3585
|
formValues: O,
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3586
|
+
inputNodes: P,
|
|
3587
|
+
missingRequiredFields: re,
|
|
3588
|
+
setFieldValue: L
|
|
3589
|
+
}), ce = S.components.step ?? He, U = S.components.loadingSkeleton ?? et, le = D(() => V(w?.data?.label), [V, w]), W = ee(() => {
|
|
3590
|
+
if (te) {
|
|
3556
3591
|
N();
|
|
3557
3592
|
return;
|
|
3558
3593
|
}
|
|
3559
3594
|
k();
|
|
3560
3595
|
}, [
|
|
3561
|
-
|
|
3596
|
+
te,
|
|
3562
3597
|
N,
|
|
3563
3598
|
k
|
|
3564
3599
|
]);
|
|
3565
|
-
return /* @__PURE__ */
|
|
3600
|
+
return /* @__PURE__ */ j(I, {
|
|
3566
3601
|
nestedScrollEnabled: !0,
|
|
3567
3602
|
style: [
|
|
3568
|
-
|
|
3569
|
-
{ backgroundColor:
|
|
3570
|
-
|
|
3603
|
+
it.container,
|
|
3604
|
+
{ backgroundColor: _.background },
|
|
3605
|
+
d
|
|
3571
3606
|
],
|
|
3572
|
-
contentContainerStyle:
|
|
3573
|
-
children:
|
|
3607
|
+
contentContainerStyle: n,
|
|
3608
|
+
children: s ? /* @__PURE__ */ j(U, {}) : /* @__PURE__ */ M(t, {
|
|
3574
3609
|
value: {
|
|
3575
|
-
flows:
|
|
3610
|
+
flows: r,
|
|
3576
3611
|
formErrors: E,
|
|
3577
3612
|
formValues: O,
|
|
3578
3613
|
googleApiKey: S.googleApiKey,
|
|
3579
3614
|
headers: S.headers,
|
|
3580
3615
|
inputNodes: P,
|
|
3581
3616
|
language: S.language,
|
|
3582
|
-
setFieldValue:
|
|
3617
|
+
setFieldValue: L
|
|
3583
3618
|
},
|
|
3584
|
-
children: [/* @__PURE__ */
|
|
3619
|
+
children: [/* @__PURE__ */ M(ae, {
|
|
3585
3620
|
onSubmit: N,
|
|
3586
|
-
children: [C && /* @__PURE__ */
|
|
3587
|
-
missingFields:
|
|
3588
|
-
children: /* @__PURE__ */
|
|
3621
|
+
children: [C && /* @__PURE__ */ j(oe, {
|
|
3622
|
+
missingFields: te ? re : void 0,
|
|
3623
|
+
children: /* @__PURE__ */ j(ce, {
|
|
3589
3624
|
step: C,
|
|
3590
3625
|
groupNode: w,
|
|
3591
3626
|
stepIndex: T,
|
|
3592
|
-
totalSteps:
|
|
3593
|
-
isFirstStep:
|
|
3594
|
-
isLastStep:
|
|
3595
|
-
canContinue: v && (!
|
|
3627
|
+
totalSteps: R.length,
|
|
3628
|
+
isFirstStep: F,
|
|
3629
|
+
isLastStep: te,
|
|
3630
|
+
canContinue: v && (!te || b),
|
|
3596
3631
|
isSubmitting: ne,
|
|
3597
|
-
onBack:
|
|
3632
|
+
onBack: A,
|
|
3598
3633
|
onContinue: W,
|
|
3599
|
-
label:
|
|
3600
|
-
children: C.nodes.map((e) =>
|
|
3634
|
+
label: le,
|
|
3635
|
+
children: C.nodes.map((e) => se(e))
|
|
3601
3636
|
})
|
|
3602
|
-
}), /* @__PURE__ */
|
|
3603
|
-
style: [
|
|
3637
|
+
}), /* @__PURE__ */ j(z, {
|
|
3638
|
+
style: [it.poweredBy, { color: _.textMuted }],
|
|
3604
3639
|
children: "Powered by Treege"
|
|
3605
3640
|
})]
|
|
3606
|
-
}), B && /* @__PURE__ */
|
|
3607
|
-
style: [
|
|
3608
|
-
children: [/* @__PURE__ */
|
|
3609
|
-
style: [
|
|
3641
|
+
}), B && /* @__PURE__ */ M(H, {
|
|
3642
|
+
style: [it.message, { backgroundColor: B.type === "success" ? _.successBg : _.errorBg }],
|
|
3643
|
+
children: [/* @__PURE__ */ j(z, {
|
|
3644
|
+
style: [it.messageText, { color: B.type === "success" ? _.success : _.error }],
|
|
3610
3645
|
children: B.message
|
|
3611
|
-
}), /* @__PURE__ */
|
|
3612
|
-
style: [
|
|
3646
|
+
}), /* @__PURE__ */ j(z, {
|
|
3647
|
+
style: [it.messageClose, { color: B.type === "success" ? _.success : _.error }],
|
|
3613
3648
|
onPress: x,
|
|
3614
|
-
children:
|
|
3649
|
+
children: V("common.close")
|
|
3615
3650
|
})]
|
|
3616
3651
|
})]
|
|
3617
3652
|
})
|
|
3618
3653
|
});
|
|
3619
|
-
},
|
|
3654
|
+
}, rt = (e) => /* @__PURE__ */ j(x, {
|
|
3620
3655
|
theme: e.theme,
|
|
3621
3656
|
storageKey: "treege-renderer-theme",
|
|
3622
|
-
children: /* @__PURE__ */
|
|
3623
|
-
}),
|
|
3657
|
+
children: /* @__PURE__ */ j(nt, { ...e })
|
|
3658
|
+
}), it = L.create({
|
|
3624
3659
|
container: { flex: 1 },
|
|
3625
3660
|
message: {
|
|
3626
3661
|
borderRadius: 6,
|
|
@@ -3643,4 +3678,4 @@ var ie = ({ children: e }) => /* @__PURE__ */ A(V, {
|
|
|
3643
3678
|
}
|
|
3644
3679
|
});
|
|
3645
3680
|
//#endregion
|
|
3646
|
-
export { ce as DefaultAddressInput, le as DefaultAutocompleteInput,
|
|
3681
|
+
export { ce as DefaultAddressInput, le as DefaultAutocompleteInput, ue as DefaultCheckboxInput, de as DefaultDateInput, fe as DefaultDateRangeInput, Je as DefaultDividerUI, pe as DefaultFileInput, me as DefaultHiddenInput, Te as DefaultHttpInput, Ee as DefaultNumberInput, Oe as DefaultPasswordInput, Ae as DefaultRadioInput, je as DefaultSelectInput, Be as DefaultSubmitInput, Me as DefaultSwitchInput, Ie as DefaultTextInput, Pe as DefaultTextareaInput, Re as DefaultTimeInput, ze as DefaultTimeRangeInput, qe as DefaultTitleUI, S as TreegeConfigProvider, rt as TreegeRenderer, u as applyReferenceTransformation, v as calculateReferenceFieldUpdates, h as checkFormFieldHasValue, f as convertFormValuesToNamedFormat, Ve as defaultInputRenderers, Xe as defaultUI, c as evaluateCondition, m as evaluateConditions, T as fileToSerializable, s as filesToSerializable, o as findStartNode, _ as getFlowRenderState, i as getTranslatedText, d as isFieldEmpty, b as isStartNode, ye as sanitize, xe as sanitizeHttpResponse, w as serializableToFile, l as useTreegeConfig, p as useTreegeRenderer };
|