@ringg/react-native 0.0.1-alpha.10

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.
Files changed (112) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +250 -0
  3. package/app.plugin.js +51 -0
  4. package/lib/module/adapters/index.js +4 -0
  5. package/lib/module/adapters/index.js.map +1 -0
  6. package/lib/module/adapters/livekit-rn-adapter.js +216 -0
  7. package/lib/module/adapters/livekit-rn-adapter.js.map +1 -0
  8. package/lib/module/components/RinggWidget.js +554 -0
  9. package/lib/module/components/RinggWidget.js.map +1 -0
  10. package/lib/module/components/steps/ButtonsStep.js +146 -0
  11. package/lib/module/components/steps/ButtonsStep.js.map +1 -0
  12. package/lib/module/components/steps/CalendarStep.js +190 -0
  13. package/lib/module/components/steps/CalendarStep.js.map +1 -0
  14. package/lib/module/components/steps/ConfirmationStep.js +175 -0
  15. package/lib/module/components/steps/ConfirmationStep.js.map +1 -0
  16. package/lib/module/components/steps/FormStep.js +346 -0
  17. package/lib/module/components/steps/FormStep.js.map +1 -0
  18. package/lib/module/components/steps/InteractiveFlow.js +249 -0
  19. package/lib/module/components/steps/InteractiveFlow.js.map +1 -0
  20. package/lib/module/components/ui/ActionButton.js +92 -0
  21. package/lib/module/components/ui/ActionButton.js.map +1 -0
  22. package/lib/module/components/ui/CallControls.js +168 -0
  23. package/lib/module/components/ui/CallControls.js.map +1 -0
  24. package/lib/module/components/ui/FeedbackScreen.js +180 -0
  25. package/lib/module/components/ui/FeedbackScreen.js.map +1 -0
  26. package/lib/module/components/ui/Icons.js +294 -0
  27. package/lib/module/components/ui/Icons.js.map +1 -0
  28. package/lib/module/components/ui/MessageBubble.js +80 -0
  29. package/lib/module/components/ui/MessageBubble.js.map +1 -0
  30. package/lib/module/components/ui/TabSelector.js +80 -0
  31. package/lib/module/components/ui/TabSelector.js.map +1 -0
  32. package/lib/module/components/ui/WidgetHeader.js +168 -0
  33. package/lib/module/components/ui/WidgetHeader.js.map +1 -0
  34. package/lib/module/context/RinggProvider.js +134 -0
  35. package/lib/module/context/RinggProvider.js.map +1 -0
  36. package/lib/module/context/index.js +4 -0
  37. package/lib/module/context/index.js.map +1 -0
  38. package/lib/module/globals.d.js +2 -0
  39. package/lib/module/globals.d.js.map +1 -0
  40. package/lib/module/hooks/index.js +10 -0
  41. package/lib/module/hooks/index.js.map +1 -0
  42. package/lib/module/hooks/useRinggCall.js +259 -0
  43. package/lib/module/hooks/useRinggCall.js.map +1 -0
  44. package/lib/module/hooks/useRinggChat.js +141 -0
  45. package/lib/module/hooks/useRinggChat.js.map +1 -0
  46. package/lib/module/hooks/useRinggComponents.js +236 -0
  47. package/lib/module/hooks/useRinggComponents.js.map +1 -0
  48. package/lib/module/hooks/useRinggFeedback.js +66 -0
  49. package/lib/module/hooks/useRinggFeedback.js.map +1 -0
  50. package/lib/module/hooks/useRinggTheme.js +39 -0
  51. package/lib/module/hooks/useRinggTheme.js.map +1 -0
  52. package/lib/module/hooks/useRinggTranscripts.js +70 -0
  53. package/lib/module/hooks/useRinggTranscripts.js.map +1 -0
  54. package/lib/module/hooks/useRinggWidgetState.js +51 -0
  55. package/lib/module/hooks/useRinggWidgetState.js.map +1 -0
  56. package/lib/module/index.js +56 -0
  57. package/lib/module/index.js.map +1 -0
  58. package/lib/module/package.json +1 -0
  59. package/lib/typescript/adapters/index.d.ts +2 -0
  60. package/lib/typescript/adapters/index.d.ts.map +1 -0
  61. package/lib/typescript/adapters/livekit-rn-adapter.d.ts +38 -0
  62. package/lib/typescript/adapters/livekit-rn-adapter.d.ts.map +1 -0
  63. package/lib/typescript/components/RinggWidget.d.ts +44 -0
  64. package/lib/typescript/components/RinggWidget.d.ts.map +1 -0
  65. package/lib/typescript/components/steps/ButtonsStep.d.ts +17 -0
  66. package/lib/typescript/components/steps/ButtonsStep.d.ts.map +1 -0
  67. package/lib/typescript/components/steps/CalendarStep.d.ts +16 -0
  68. package/lib/typescript/components/steps/CalendarStep.d.ts.map +1 -0
  69. package/lib/typescript/components/steps/ConfirmationStep.d.ts +16 -0
  70. package/lib/typescript/components/steps/ConfirmationStep.d.ts.map +1 -0
  71. package/lib/typescript/components/steps/FormStep.d.ts +17 -0
  72. package/lib/typescript/components/steps/FormStep.d.ts.map +1 -0
  73. package/lib/typescript/components/steps/InteractiveFlow.d.ts +23 -0
  74. package/lib/typescript/components/steps/InteractiveFlow.d.ts.map +1 -0
  75. package/lib/typescript/components/ui/ActionButton.d.ts +22 -0
  76. package/lib/typescript/components/ui/ActionButton.d.ts.map +1 -0
  77. package/lib/typescript/components/ui/CallControls.d.ts +22 -0
  78. package/lib/typescript/components/ui/CallControls.d.ts.map +1 -0
  79. package/lib/typescript/components/ui/FeedbackScreen.d.ts +24 -0
  80. package/lib/typescript/components/ui/FeedbackScreen.d.ts.map +1 -0
  81. package/lib/typescript/components/ui/Icons.d.ts +28 -0
  82. package/lib/typescript/components/ui/Icons.d.ts.map +1 -0
  83. package/lib/typescript/components/ui/MessageBubble.d.ts +17 -0
  84. package/lib/typescript/components/ui/MessageBubble.d.ts.map +1 -0
  85. package/lib/typescript/components/ui/TabSelector.d.ts +21 -0
  86. package/lib/typescript/components/ui/TabSelector.d.ts.map +1 -0
  87. package/lib/typescript/components/ui/WidgetHeader.d.ts +20 -0
  88. package/lib/typescript/components/ui/WidgetHeader.d.ts.map +1 -0
  89. package/lib/typescript/context/RinggProvider.d.ts +53 -0
  90. package/lib/typescript/context/RinggProvider.d.ts.map +1 -0
  91. package/lib/typescript/context/index.d.ts +3 -0
  92. package/lib/typescript/context/index.d.ts.map +1 -0
  93. package/lib/typescript/hooks/index.d.ts +15 -0
  94. package/lib/typescript/hooks/index.d.ts.map +1 -0
  95. package/lib/typescript/hooks/useRinggCall.d.ts +41 -0
  96. package/lib/typescript/hooks/useRinggCall.d.ts.map +1 -0
  97. package/lib/typescript/hooks/useRinggChat.d.ts +29 -0
  98. package/lib/typescript/hooks/useRinggChat.d.ts.map +1 -0
  99. package/lib/typescript/hooks/useRinggComponents.d.ts +52 -0
  100. package/lib/typescript/hooks/useRinggComponents.d.ts.map +1 -0
  101. package/lib/typescript/hooks/useRinggFeedback.d.ts +23 -0
  102. package/lib/typescript/hooks/useRinggFeedback.d.ts.map +1 -0
  103. package/lib/typescript/hooks/useRinggTheme.d.ts +40 -0
  104. package/lib/typescript/hooks/useRinggTheme.d.ts.map +1 -0
  105. package/lib/typescript/hooks/useRinggTranscripts.d.ts +30 -0
  106. package/lib/typescript/hooks/useRinggTranscripts.d.ts.map +1 -0
  107. package/lib/typescript/hooks/useRinggWidgetState.d.ts +38 -0
  108. package/lib/typescript/hooks/useRinggWidgetState.d.ts.map +1 -0
  109. package/lib/typescript/index.d.ts +44 -0
  110. package/lib/typescript/index.d.ts.map +1 -0
  111. package/lib/typescript/package.json +1 -0
  112. package/package.json +80 -0
@@ -0,0 +1,346 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * FormStep — dynamic form renderer supporting 9 field types with validation.
5
+ *
6
+ * Field types: text, email, tel, number, select, multiselect, textarea, date, boolean.
7
+ * Matches CDN form-step.tsx behavior.
8
+ */
9
+
10
+ import React, { useState, useCallback } from "react";
11
+ import { View, Text, TextInput, TouchableOpacity, ActivityIndicator, Switch, ScrollView, StyleSheet } from "react-native";
12
+ import { colorToSolid, getButtonRadius } from "@ringg/core";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ export function FormStep({
15
+ payload,
16
+ theme,
17
+ isProcessing,
18
+ onComplete
19
+ }) {
20
+ const {
21
+ data
22
+ } = payload;
23
+ const buttonRadius = parseInt(getButtonRadius(theme.buttonStyle), 10) || 8;
24
+ const primarySolid = colorToSolid(theme.primaryColor);
25
+ const [formData, setFormData] = useState({});
26
+ const [fieldErrors, setFieldErrors] = useState({});
27
+ const getOptionLabel = option => typeof option === "string" ? option : option.label;
28
+ const getOptionValue = option => typeof option === "string" ? option : option.value;
29
+ const validateField = useCallback((field, value) => {
30
+ if (field.required) {
31
+ if (value === undefined || value === null || value === "" || Array.isArray(value) && value.length === 0 || typeof value === "string" && !value.trim()) {
32
+ return `${field.label} is required`;
33
+ }
34
+ }
35
+ if (typeof value === "string" && value) {
36
+ if (field.validation) {
37
+ if (field.validation.minLength && value.length < field.validation.minLength) {
38
+ return field.validation.message || `${field.label} must be at least ${field.validation.minLength} characters`;
39
+ }
40
+ if (field.validation.maxLength && value.length > field.validation.maxLength) {
41
+ return field.validation.message || `${field.label} must be at most ${field.validation.maxLength} characters`;
42
+ }
43
+ if (field.validation.pattern) {
44
+ const regex = new RegExp(field.validation.pattern);
45
+ if (!regex.test(value)) {
46
+ return field.validation.message || `${field.label} is invalid`;
47
+ }
48
+ }
49
+ }
50
+ if (field.type === "email") {
51
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
52
+ if (!emailRegex.test(value)) {
53
+ return "Please enter a valid email address";
54
+ }
55
+ }
56
+ if (field.type === "tel") {
57
+ const phoneRegex = /^[\d\s\-+()]{7,}$/;
58
+ if (!phoneRegex.test(value)) {
59
+ return "Please enter a valid phone number";
60
+ }
61
+ }
62
+ }
63
+ return null;
64
+ }, []);
65
+ const handleFieldChange = useCallback((fieldName, value) => {
66
+ setFormData(prev => ({
67
+ ...prev,
68
+ [fieldName]: value
69
+ }));
70
+ setFieldErrors(prev => {
71
+ if (prev[fieldName]) {
72
+ const next = {
73
+ ...prev
74
+ };
75
+ delete next[fieldName];
76
+ return next;
77
+ }
78
+ return prev;
79
+ });
80
+ }, []);
81
+ const handleMultiselectToggle = useCallback((fieldName, optionValue, checked) => {
82
+ setFormData(prev => {
83
+ const current = prev[fieldName] || [];
84
+ const next = checked ? [...current, optionValue] : current.filter(v => v !== optionValue);
85
+ return {
86
+ ...prev,
87
+ [fieldName]: next
88
+ };
89
+ });
90
+ setFieldErrors(prev => {
91
+ if (prev[fieldName]) {
92
+ const next = {
93
+ ...prev
94
+ };
95
+ delete next[fieldName];
96
+ return next;
97
+ }
98
+ return prev;
99
+ });
100
+ }, []);
101
+ const handleSubmit = useCallback(() => {
102
+ const errors = {};
103
+ let valid = true;
104
+ data.fields.forEach(field => {
105
+ const error = validateField(field, formData[field.name]);
106
+ if (error) {
107
+ errors[field.name] = error;
108
+ valid = false;
109
+ }
110
+ });
111
+ setFieldErrors(errors);
112
+ if (valid) {
113
+ onComplete(formData);
114
+ }
115
+ }, [data.fields, formData, validateField, onComplete]);
116
+ const inputStyle = hasError => ({
117
+ backgroundColor: "#ffffff",
118
+ color: theme.textColor,
119
+ borderColor: hasError ? theme.errorColor : theme.borderColor,
120
+ borderWidth: 1,
121
+ borderRadius: buttonRadius
122
+ });
123
+ return /*#__PURE__*/_jsxs(View, {
124
+ children: [/*#__PURE__*/_jsx(Text, {
125
+ style: [styles.title, {
126
+ color: theme.textColor
127
+ }],
128
+ children: data.title
129
+ }), data.description ? /*#__PURE__*/_jsx(Text, {
130
+ style: [styles.description, {
131
+ color: theme.mutedTextColor
132
+ }],
133
+ children: data.description
134
+ }) : null, /*#__PURE__*/_jsx(View, {
135
+ style: styles.fieldsContainer,
136
+ children: data.fields.map(field => {
137
+ const hasError = !!fieldErrors[field.name];
138
+ return /*#__PURE__*/_jsxs(View, {
139
+ style: styles.fieldWrapper,
140
+ children: [/*#__PURE__*/_jsxs(Text, {
141
+ style: [styles.fieldLabel, {
142
+ color: theme.mutedTextColor
143
+ }],
144
+ children: [field.label, field.required ? /*#__PURE__*/_jsx(Text, {
145
+ style: {
146
+ color: theme.errorColor
147
+ },
148
+ children: " *"
149
+ }) : null]
150
+ }), field.type === "select" && field.options ? /*#__PURE__*/_jsx(ScrollView, {
151
+ horizontal: true,
152
+ showsHorizontalScrollIndicator: false,
153
+ children: field.options.map((option, idx) => {
154
+ const val = getOptionValue(option);
155
+ const isSelected = formData[field.name] === val;
156
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
157
+ onPress: () => handleFieldChange(field.name, val),
158
+ style: [styles.selectPill, {
159
+ borderRadius: buttonRadius,
160
+ backgroundColor: isSelected ? primarySolid : "#ffffff",
161
+ borderColor: isSelected ? primarySolid : theme.borderColor,
162
+ borderWidth: 1
163
+ }],
164
+ activeOpacity: 0.8,
165
+ children: /*#__PURE__*/_jsx(Text, {
166
+ style: [styles.selectPillText, {
167
+ color: isSelected ? theme.primaryTextColor : theme.textColor
168
+ }],
169
+ children: getOptionLabel(option)
170
+ })
171
+ }, idx);
172
+ })
173
+ }) : null, field.type === "multiselect" && field.options ? /*#__PURE__*/_jsx(View, {
174
+ style: styles.multiselectContainer,
175
+ children: field.options.map((option, idx) => {
176
+ const val = getOptionValue(option);
177
+ const isChecked = (formData[field.name] || []).includes(val);
178
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
179
+ onPress: () => handleMultiselectToggle(field.name, val, !isChecked),
180
+ style: [styles.selectPill, {
181
+ borderRadius: buttonRadius,
182
+ backgroundColor: isChecked ? primarySolid : "#ffffff",
183
+ borderColor: isChecked ? primarySolid : theme.borderColor,
184
+ borderWidth: 1
185
+ }],
186
+ activeOpacity: 0.8,
187
+ children: /*#__PURE__*/_jsx(Text, {
188
+ style: [styles.selectPillText, {
189
+ color: isChecked ? theme.primaryTextColor : theme.textColor
190
+ }],
191
+ children: getOptionLabel(option)
192
+ })
193
+ }, idx);
194
+ })
195
+ }) : null, field.type === "boolean" ? /*#__PURE__*/_jsxs(View, {
196
+ style: styles.booleanRow,
197
+ children: [/*#__PURE__*/_jsx(Switch, {
198
+ value: formData[field.name] || false,
199
+ onValueChange: v => handleFieldChange(field.name, v),
200
+ trackColor: {
201
+ false: theme.borderColor,
202
+ true: primarySolid
203
+ },
204
+ thumbColor: "#ffffff"
205
+ }), /*#__PURE__*/_jsx(Text, {
206
+ style: [styles.booleanLabel, {
207
+ color: theme.mutedTextColor
208
+ }],
209
+ children: field.placeholder || "Yes"
210
+ })]
211
+ }) : null, field.type === "textarea" ? /*#__PURE__*/_jsx(TextInput, {
212
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
213
+ placeholderTextColor: theme.mutedTextColor,
214
+ value: formData[field.name] || "",
215
+ onChangeText: v => handleFieldChange(field.name, v),
216
+ multiline: true,
217
+ numberOfLines: 3,
218
+ textAlignVertical: "top",
219
+ style: [styles.textArea, inputStyle(hasError)]
220
+ }) : null, field.type === "number" ? /*#__PURE__*/_jsx(TextInput, {
221
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
222
+ placeholderTextColor: theme.mutedTextColor,
223
+ value: formData[field.name] !== undefined ? String(formData[field.name]) : "",
224
+ onChangeText: v => handleFieldChange(field.name, v ? Number(v) : ""),
225
+ keyboardType: "numeric",
226
+ style: [styles.textInput, inputStyle(hasError)]
227
+ }) : null, field.type !== "select" && field.type !== "multiselect" && field.type !== "boolean" && field.type !== "textarea" && field.type !== "number" ? /*#__PURE__*/_jsx(TextInput, {
228
+ placeholder: field.placeholder || `Enter ${field.label.toLowerCase()}`,
229
+ placeholderTextColor: theme.mutedTextColor,
230
+ value: formData[field.name] || "",
231
+ onChangeText: v => handleFieldChange(field.name, v),
232
+ keyboardType: field.type === "email" ? "email-address" : field.type === "tel" ? "phone-pad" : "default",
233
+ autoCapitalize: field.type === "email" ? "none" : "sentences",
234
+ style: [styles.textInput, inputStyle(hasError)]
235
+ }) : null, hasError ? /*#__PURE__*/_jsx(Text, {
236
+ style: [styles.errorText, {
237
+ color: theme.errorColor
238
+ }],
239
+ children: fieldErrors[field.name]
240
+ }) : null]
241
+ }, field.name);
242
+ })
243
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
244
+ onPress: handleSubmit,
245
+ disabled: isProcessing,
246
+ style: [styles.submitButton, {
247
+ borderRadius: buttonRadius,
248
+ backgroundColor: isProcessing ? theme.borderColor : primarySolid,
249
+ opacity: isProcessing ? 0.5 : 1
250
+ }],
251
+ activeOpacity: 0.9,
252
+ children: isProcessing ? /*#__PURE__*/_jsxs(View, {
253
+ style: styles.loadingRow,
254
+ children: [/*#__PURE__*/_jsx(ActivityIndicator, {
255
+ color: theme.primaryTextColor,
256
+ size: "small"
257
+ }), /*#__PURE__*/_jsx(Text, {
258
+ style: [styles.submitText, {
259
+ color: theme.primaryTextColor
260
+ }],
261
+ children: "Submitting..."
262
+ })]
263
+ }) : /*#__PURE__*/_jsx(Text, {
264
+ style: [styles.submitText, {
265
+ color: theme.primaryTextColor
266
+ }],
267
+ children: data.submit_label || "Next"
268
+ })
269
+ })]
270
+ });
271
+ }
272
+ const styles = StyleSheet.create({
273
+ title: {
274
+ fontSize: 14,
275
+ fontWeight: "500",
276
+ marginBottom: 4
277
+ },
278
+ description: {
279
+ fontSize: 12,
280
+ marginBottom: 10
281
+ },
282
+ fieldsContainer: {
283
+ gap: 10,
284
+ marginBottom: 12
285
+ },
286
+ fieldWrapper: {
287
+ gap: 4
288
+ },
289
+ fieldLabel: {
290
+ fontSize: 11,
291
+ fontWeight: "500"
292
+ },
293
+ textInput: {
294
+ paddingHorizontal: 12,
295
+ paddingVertical: 8,
296
+ fontSize: 13
297
+ },
298
+ textArea: {
299
+ paddingHorizontal: 12,
300
+ paddingVertical: 8,
301
+ fontSize: 13,
302
+ minHeight: 64
303
+ },
304
+ selectPill: {
305
+ paddingHorizontal: 12,
306
+ paddingVertical: 6,
307
+ marginRight: 6,
308
+ marginBottom: 4
309
+ },
310
+ selectPillText: {
311
+ fontSize: 12,
312
+ fontWeight: "500"
313
+ },
314
+ multiselectContainer: {
315
+ flexDirection: "row",
316
+ flexWrap: "wrap"
317
+ },
318
+ booleanRow: {
319
+ flexDirection: "row",
320
+ alignItems: "center",
321
+ gap: 8,
322
+ paddingVertical: 2
323
+ },
324
+ booleanLabel: {
325
+ fontSize: 12
326
+ },
327
+ errorText: {
328
+ fontSize: 11,
329
+ marginTop: 2
330
+ },
331
+ submitButton: {
332
+ height: 36,
333
+ alignItems: "center",
334
+ justifyContent: "center"
335
+ },
336
+ loadingRow: {
337
+ flexDirection: "row",
338
+ alignItems: "center",
339
+ gap: 8
340
+ },
341
+ submitText: {
342
+ fontSize: 13,
343
+ fontWeight: "600"
344
+ }
345
+ });
346
+ //# sourceMappingURL=FormStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useCallback","View","Text","TextInput","TouchableOpacity","ActivityIndicator","Switch","ScrollView","StyleSheet","colorToSolid","getButtonRadius","jsx","_jsx","jsxs","_jsxs","FormStep","payload","theme","isProcessing","onComplete","data","buttonRadius","parseInt","buttonStyle","primarySolid","primaryColor","formData","setFormData","fieldErrors","setFieldErrors","getOptionLabel","option","label","getOptionValue","value","validateField","field","required","undefined","Array","isArray","length","trim","validation","minLength","message","maxLength","pattern","regex","RegExp","test","type","emailRegex","phoneRegex","handleFieldChange","fieldName","prev","next","handleMultiselectToggle","optionValue","checked","current","filter","v","handleSubmit","errors","valid","fields","forEach","error","name","inputStyle","hasError","backgroundColor","color","textColor","borderColor","errorColor","borderWidth","borderRadius","children","style","styles","title","description","mutedTextColor","fieldsContainer","map","fieldWrapper","fieldLabel","options","horizontal","showsHorizontalScrollIndicator","idx","val","isSelected","onPress","selectPill","activeOpacity","selectPillText","primaryTextColor","multiselectContainer","isChecked","includes","booleanRow","onValueChange","trackColor","false","true","thumbColor","booleanLabel","placeholder","toLowerCase","placeholderTextColor","onChangeText","multiline","numberOfLines","textAlignVertical","textArea","String","Number","keyboardType","textInput","autoCapitalize","errorText","disabled","submitButton","opacity","loadingRow","size","submitText","submit_label","create","fontSize","fontWeight","marginBottom","gap","paddingHorizontal","paddingVertical","minHeight","marginRight","flexDirection","flexWrap","alignItems","marginTop","height","justifyContent"],"sourceRoot":"../../../../src","sources":["components/steps/FormStep.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AACpD,SAASC,IAAI,EAAEC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,iBAAiB,EAAEC,MAAM,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAGzH,SAASC,Y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,CAAC;IAClBL,QAAQ,EAAE;EACZ,CAAC;EACDf,QAAQ,EAAE;IACRmB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBL,QAAQ,EAAE,EAAE;IACZM,SAAS,EAAE;EACb,CAAC;EACD1C,UAAU,EAAE;IACVwC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBE,WAAW,EAAE,CAAC;IACdL,YAAY,EAAE;EAChB,CAAC;EACDpC,cAAc,EAAE;IACdkC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDjC,oBAAoB,EAAE;IACpBwC,aAAa,EAAE,KAAK;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDtC,UAAU,EAAE;IACVqC,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBP,GAAG,EAAE,CAAC;IACNE,eAAe,EAAE;EACnB,CAAC;EACD5B,YAAY,EAAE;IACZuB,QAAQ,EAAE;EACZ,CAAC;EACDT,SAAS,EAAE;IACTS,QAAQ,EAAE,EAAE;IACZW,SAAS,EAAE;EACb,CAAC;EACDlB,YAAY,EAAE;IACZmB,MAAM,EAAE,EAAE;IACVF,UAAU,EAAE,QAAQ;IACpBG,cAAc,EAAE;EAClB,CAAC;EACDlB,UAAU,EAAE;IACVa,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBP,GAAG,EAAE;EACP,CAAC;EACDN,UAAU,EAAE;IACVG,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,249 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * InteractiveFlow — orchestrator for interactive components.
5
+ *
6
+ * Handles:
7
+ * - Single components (calendar, form, buttons, confirmation)
8
+ * - Multi-step interactive flows with back/forward navigation
9
+ * - Step progress indicator
10
+ * - Post-completion confirmation screen
11
+ * - RPC response sending via onSendResponse callback
12
+ *
13
+ * Matches CDN interactive-flow.tsx behavior.
14
+ */
15
+
16
+ import React, { useState, useCallback, useMemo } from "react";
17
+ import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
18
+ import { isCalendarBooking, isForm, isButtons, isConfirmation, formatSlotTime, formatSlotDate, colorToSolid } from "@ringg/core";
19
+ import { CalendarStep } from "./CalendarStep.js";
20
+ import { FormStep } from "./FormStep.js";
21
+ import { ButtonsStep } from "./ButtonsStep.js";
22
+ import { ConfirmationStep } from "./ConfirmationStep.js";
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ function isInteractiveFlow(payload) {
25
+ return payload.component_type === "interactive_flow";
26
+ }
27
+ export function InteractiveFlow({
28
+ initialComponent,
29
+ theme,
30
+ onSendResponse,
31
+ onComplete
32
+ }) {
33
+ const isMultiStepFlow = isInteractiveFlow(initialComponent);
34
+ const primarySolid = colorToSolid(theme.primaryColor);
35
+ const flowSteps = useMemo(() => isMultiStepFlow ? initialComponent.data.steps : [{
36
+ id: "single",
37
+ title: "",
38
+ component: initialComponent
39
+ }], [isMultiStepFlow, initialComponent]);
40
+ const totalSteps = flowSteps.length;
41
+ const [currentStepIndex, setCurrentStepIndex] = useState(0);
42
+ const [isProcessing, setIsProcessing] = useState(false);
43
+ const [allCollectedData, setAllCollectedData] = useState({});
44
+ const [confirmation, setConfirmation] = useState(null);
45
+ const [stepCompleted, setStepCompleted] = useState(new Array(totalSteps).fill(false));
46
+ const currentStep = flowSteps[currentStepIndex];
47
+ const showStepper = totalSteps > 1;
48
+ const handleBack = useCallback(() => {
49
+ if (currentStepIndex > 0) {
50
+ setCurrentStepIndex(prev => prev - 1);
51
+ }
52
+ }, [currentStepIndex]);
53
+ const handleStepComplete = useCallback(async stepData => {
54
+ setIsProcessing(true);
55
+ const newAllData = {
56
+ ...allCollectedData,
57
+ ...stepData
58
+ };
59
+ setAllCollectedData(newAllData);
60
+ setStepCompleted(prev => {
61
+ const updated = [...prev];
62
+ updated[currentStepIndex] = true;
63
+ return updated;
64
+ });
65
+ try {
66
+ const isLastStep = currentStepIndex === totalSteps - 1;
67
+ if (onSendResponse) {
68
+ await onSendResponse(initialComponent.component_id, {
69
+ step_index: currentStepIndex,
70
+ step_data: stepData,
71
+ all_data: newAllData,
72
+ is_final_step: isLastStep
73
+ });
74
+ if (isLastStep) {
75
+ setConfirmation({
76
+ title: "Success!",
77
+ message: "Your selection has been submitted.",
78
+ icon: "success"
79
+ });
80
+ onComplete?.(newAllData);
81
+ } else {
82
+ setCurrentStepIndex(prev => prev + 1);
83
+ }
84
+ } else {
85
+ // No RPC handler — just advance steps
86
+ if (isLastStep) {
87
+ setConfirmation({
88
+ title: "Success!",
89
+ message: "Completed.",
90
+ icon: "success"
91
+ });
92
+ onComplete?.(newAllData);
93
+ } else {
94
+ setCurrentStepIndex(prev => prev + 1);
95
+ }
96
+ }
97
+ } catch (error) {
98
+ setConfirmation({
99
+ title: "Something went wrong",
100
+ message: error.message || "Please try again.",
101
+ icon: "error"
102
+ });
103
+ } finally {
104
+ setIsProcessing(false);
105
+ }
106
+ }, [allCollectedData, currentStepIndex, totalSteps, initialComponent, onSendResponse, onComplete]);
107
+ const handleButtonClick = useCallback((buttonId, action) => {
108
+ // Navigate is handled inside ButtonsStep (Linking.openURL)
109
+ // For all other actions, just send the selection
110
+ handleStepComplete({
111
+ selected_button: buttonId
112
+ });
113
+ }, [handleStepComplete]);
114
+ return /*#__PURE__*/_jsxs(View, {
115
+ style: [styles.container, {
116
+ backgroundColor: theme.surfaceColor
117
+ }],
118
+ children: [showStepper && !confirmation ? /*#__PURE__*/_jsxs(View, {
119
+ style: styles.stepperContainer,
120
+ children: [/*#__PURE__*/_jsx(View, {
121
+ style: styles.stepperRow,
122
+ children: flowSteps.map((step, index) => /*#__PURE__*/_jsxs(View, {
123
+ style: styles.stepIndicatorGroup,
124
+ children: [/*#__PURE__*/_jsx(View, {
125
+ style: [styles.stepCircle, {
126
+ backgroundColor: stepCompleted[index] ? theme.successColor : index === currentStepIndex ? primarySolid : theme.borderColor
127
+ }],
128
+ children: /*#__PURE__*/_jsx(Text, {
129
+ style: [styles.stepCircleText, {
130
+ color: stepCompleted[index] || index === currentStepIndex ? theme.primaryTextColor : theme.mutedTextColor
131
+ }],
132
+ children: stepCompleted[index] ? "✓" : index + 1
133
+ })
134
+ }), index < flowSteps.length - 1 ? /*#__PURE__*/_jsx(View, {
135
+ style: [styles.stepConnector, {
136
+ backgroundColor: stepCompleted[index] ? theme.successColor : theme.borderColor
137
+ }]
138
+ }) : null]
139
+ }, step.id))
140
+ }), /*#__PURE__*/_jsx(Text, {
141
+ style: [styles.stepTitle, {
142
+ color: theme.textColor
143
+ }],
144
+ numberOfLines: 1,
145
+ children: currentStep.title || `Step ${currentStepIndex + 1} of ${totalSteps}`
146
+ })]
147
+ }) : null, /*#__PURE__*/_jsxs(View, {
148
+ style: styles.content,
149
+ children: [currentStepIndex > 0 && !confirmation ? /*#__PURE__*/_jsx(TouchableOpacity, {
150
+ onPress: handleBack,
151
+ style: styles.backButton,
152
+ activeOpacity: 0.7,
153
+ children: /*#__PURE__*/_jsx(Text, {
154
+ style: [styles.backText, {
155
+ color: theme.mutedTextColor
156
+ }],
157
+ children: "\u2190 Back"
158
+ })
159
+ }) : null, confirmation ? /*#__PURE__*/_jsx(ConfirmationStep, {
160
+ data: confirmation,
161
+ theme: theme,
162
+ collectedData: allCollectedData
163
+ }) : /*#__PURE__*/_jsxs(View, {
164
+ children: [isCalendarBooking(currentStep.component) ? /*#__PURE__*/_jsx(CalendarStep, {
165
+ payload: currentStep.component,
166
+ theme: theme,
167
+ isProcessing: isProcessing,
168
+ onComplete: (slotId, slotDatetime) => {
169
+ const tz = currentStep.component.data.timezone;
170
+ handleStepComplete({
171
+ slot_id: slotId,
172
+ slot_datetime: slotDatetime,
173
+ slot_time: formatSlotTime(slotDatetime, tz),
174
+ slot_date: formatSlotDate(slotDatetime, tz)
175
+ });
176
+ }
177
+ }) : null, isForm(currentStep.component) ? /*#__PURE__*/_jsx(FormStep, {
178
+ payload: currentStep.component,
179
+ theme: theme,
180
+ isProcessing: isProcessing,
181
+ onComplete: formData => handleStepComplete(formData)
182
+ }) : null, isButtons(currentStep.component) ? /*#__PURE__*/_jsx(ButtonsStep, {
183
+ payload: currentStep.component,
184
+ theme: theme,
185
+ isProcessing: isProcessing,
186
+ onButtonClick: handleButtonClick
187
+ }) : null, isConfirmation(currentStep.component) ? /*#__PURE__*/_jsx(ConfirmationStep, {
188
+ data: currentStep.component.data,
189
+ theme: theme
190
+ }) : null]
191
+ })]
192
+ })]
193
+ });
194
+ }
195
+ const styles = StyleSheet.create({
196
+ container: {
197
+ borderRadius: 12,
198
+ overflow: "hidden"
199
+ },
200
+ stepperContainer: {
201
+ paddingHorizontal: 14,
202
+ paddingTop: 14,
203
+ paddingBottom: 10
204
+ },
205
+ stepperRow: {
206
+ flexDirection: "row",
207
+ alignItems: "center",
208
+ gap: 4
209
+ },
210
+ stepIndicatorGroup: {
211
+ flexDirection: "row",
212
+ alignItems: "center",
213
+ flex: 1,
214
+ minWidth: 0
215
+ },
216
+ stepCircle: {
217
+ width: 24,
218
+ height: 24,
219
+ borderRadius: 12,
220
+ alignItems: "center",
221
+ justifyContent: "center"
222
+ },
223
+ stepCircleText: {
224
+ fontSize: 11,
225
+ fontWeight: "600"
226
+ },
227
+ stepConnector: {
228
+ flex: 1,
229
+ height: 2,
230
+ borderRadius: 1,
231
+ marginLeft: 4
232
+ },
233
+ stepTitle: {
234
+ fontSize: 11,
235
+ fontWeight: "500",
236
+ marginTop: 8
237
+ },
238
+ content: {
239
+ paddingHorizontal: 14,
240
+ paddingBottom: 14
241
+ },
242
+ backButton: {
243
+ marginBottom: 8
244
+ },
245
+ backText: {
246
+ fontSize: 12
247
+ }
248
+ });
249
+ //# sourceMappingURL=InteractiveFlow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useCallback","useMemo","View","Text","TouchableOpacity","StyleSheet","isCalendarBooking","isForm","isButtons","isConfirmation","formatSlotTime","formatSlotDate","colorToSolid","CalendarStep","FormStep","ButtonsStep","ConfirmationStep","jsx","_jsx","jsxs","_jsxs","isInteractiveFlow","payload","component_type","InteractiveFlow","initialComponent","theme","onSendResponse","onComplete","isMultiStepFlow","primarySolid","primaryColor","flowSteps","data","steps","id","title","component","totalSteps","length","currentStepIndex","setCurrentStepIndex","isProcessing","setIsProcessing","allCollectedData","setAllCollectedData","confirmation","setConfirmation","stepCompleted","setStepCompleted","Array","fill","currentStep","showStepper","handleBack","prev","handleStepComplete","stepData","newAllData","updated","isLastStep","component_id","step_index","step_data","all_data","is_final_step","message","icon","error","handleButtonClick","buttonId","action","selected_button","style","styles","container","backgroundColor","surfaceColor","children","stepperContainer","stepperRow","map","step","index","stepIndicatorGroup","stepCircle","successColor","borderColor","stepCircleText","color","primaryTextColor","mutedTextColor","stepConnector","stepTitle","textColor","numberOfLines","content","onPress","backButton","activeOpacity","backText","collectedData","slotId","slotDatetime","tz","timezone","slot_id","slot_datetime","slot_time","slot_date","formData","onButtonClick","create","borderRadius","overflow","paddingHorizontal","paddingTop","paddingBottom","flexDirection","alignItems","gap","flex","minWidth","width","height","justifyContent","fontSize","fontWeight","marginLeft","marginTop","marginBottom"],"sourceRoot":"../../../../src","sources":["components/steps/InteractiveFlow.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAC7D,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAGvE,SAASC,iBAAiB,EAAEC,MAAM,EAAEC,SAAS,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,YAAY,QAAQ,aAAa;AAEhI,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,QAAQ,QAAQ,eAAY;AACrC,SAASC,WAAW,QAAQ,kBA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