react-native-my-survey-sdk 2.0.7 → 2.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-my-survey-sdk",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Xebo survey collection SDK for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -24,4 +24,4 @@
24
24
  "@types/react-native": "^0.73.0",
25
25
  "typescript": "^5.3.0"
26
26
  }
27
- }
27
+ }
@@ -154,12 +154,12 @@ const styles = StyleSheet.create({
154
154
  },
155
155
  scoreButton: {
156
156
  flex: 1,
157
- height: 30,
157
+ height: 40,
158
158
  borderRadius: 5,
159
159
  alignItems: 'center',
160
160
  justifyContent: 'center',
161
161
  },
162
- scoreText: { fontSize: 11, fontWeight: '700' },
162
+ scoreText: { fontSize: 12, fontWeight: '700' },
163
163
  errorText: { color: '#EF4444', fontSize: 13, marginBottom: 8 },
164
164
  button: { paddingVertical: 14, alignItems: 'center', marginTop: 4 },
165
165
  buttonText: { color: '#FFFFFF', fontSize: 16, fontWeight: '600' },
@@ -112,7 +112,7 @@ export const XeboMultiRatingView: React.FC<Props> = ({ question, isLastQuestion,
112
112
  </Text>
113
113
  </View>
114
114
  ) : (
115
- <Text style={{ fontSize: 24, color: isFilled ? ratingColor : '#E5E7EB' }}>
115
+ <Text style={{ fontSize: 30, color: isFilled ? ratingColor : '#E5E7EB' }}>
116
116
  {starIcon(isFilled)}
117
117
  </Text>
118
118
  )}
@@ -148,17 +148,17 @@ const styles = StyleSheet.create({
148
148
  scroll: { flex: 1, marginBottom: 12 },
149
149
  rowWrap: { marginBottom: 20 },
150
150
  rowLabel: { fontSize: 15, fontWeight: '500', marginBottom: 8 },
151
- iconsRow: { flexDirection: 'row', flexWrap: 'wrap' },
152
- iconButton: { marginRight: 6, marginBottom: 6 },
153
- circle: { width: 28, height: 28, borderRadius: 14 },
151
+ iconsRow: { flexDirection: 'row', flexWrap: 'nowrap', justifyContent: 'space-between' },
152
+ iconButton: { alignItems: 'center', justifyContent: 'center' },
153
+ circle: { width: 36, height: 36, borderRadius: 18 },
154
154
  tile: {
155
- width: 32,
156
- height: 32,
155
+ width: 40,
156
+ height: 40,
157
157
  borderRadius: 6,
158
158
  alignItems: 'center',
159
159
  justifyContent: 'center',
160
160
  },
161
- tileText: { fontSize: 12, fontWeight: '700' },
161
+ tileText: { fontSize: 13, fontWeight: '700' },
162
162
  errorText: { color: '#EF4444', fontSize: 13, marginBottom: 8 },
163
163
  button: { paddingVertical: 14, alignItems: 'center', marginTop: 4 },
164
164
  buttonText: { color: '#FFFFFF', fontSize: 16, fontWeight: '600' },
@@ -254,12 +254,12 @@ const styles = StyleSheet.create({
254
254
  flex: 1,
255
255
  },
256
256
  scoreButton: {
257
- height: 34,
257
+ height: 44,
258
258
  borderRadius: 6,
259
259
  alignItems: 'center',
260
260
  justifyContent: 'center',
261
261
  },
262
- scoreText: { fontSize: 12, fontWeight: '700' },
262
+ scoreText: { fontSize: 13, fontWeight: '700' },
263
263
  labelsRow: {
264
264
  flexDirection: 'row',
265
265
  justifyContent: 'space-between',
@@ -42,7 +42,7 @@ function RatingIcon({
42
42
  switch (style) {
43
43
  case 'heart':
44
44
  return (
45
- <Text style={{ fontSize: 28, color: filled ? activeColor : inactive }}>
45
+ <Text style={{ fontSize: 34, color: filled ? activeColor : inactive }}>
46
46
  {filled ? '♥' : '♡'}
47
47
  </Text>
48
48
  );
@@ -50,9 +50,9 @@ function RatingIcon({
50
50
  return (
51
51
  <View
52
52
  style={{
53
- width: 32,
54
- height: 32,
55
- borderRadius: 16,
53
+ width: 38,
54
+ height: 38,
55
+ borderRadius: 19,
56
56
  backgroundColor: filled ? activeColor : inactive,
57
57
  borderWidth: filled ? 0 : 1,
58
58
  borderColor: '#D1D5DB',
@@ -63,29 +63,29 @@ function RatingIcon({
63
63
  return (
64
64
  <View
65
65
  style={{
66
- width: 36,
67
- height: 36,
66
+ width: 42,
67
+ height: 42,
68
68
  borderRadius: 6,
69
69
  backgroundColor: filled ? activeColor : inactive,
70
70
  alignItems: 'center',
71
71
  justifyContent: 'center',
72
72
  }}
73
73
  >
74
- <Text style={{ fontSize: 13, fontWeight: '700', color: filled ? '#FFF' : '#6B7280' }}>
74
+ <Text style={{ fontSize: 14, fontWeight: '700', color: filled ? '#FFF' : '#6B7280' }}>
75
75
  {index + 1}
76
76
  </Text>
77
77
  </View>
78
78
  );
79
79
  case 'emoji':
80
80
  return (
81
- <Text style={{ fontSize: 28, opacity: selected ? 1 : 0.35 }}>
81
+ <Text style={{ fontSize: 34, opacity: selected ? 1 : 0.35 }}>
82
82
  {EMOJI_MAP[Math.min(index, EMOJI_MAP.length - 1)]}
83
83
  </Text>
84
84
  );
85
85
  case 'star':
86
86
  default:
87
87
  return (
88
- <Text style={{ fontSize: 28, color: filled ? activeColor : inactive }}>
88
+ <Text style={{ fontSize: 34, color: filled ? activeColor : inactive }}>
89
89
  {filled ? '★' : '☆'}
90
90
  </Text>
91
91
  );
@@ -235,8 +235,8 @@ const styles = StyleSheet.create({
235
235
  container: { paddingHorizontal: 20, paddingTop: 16, paddingBottom: 24, flexGrow: 1 },
236
236
  title: { fontSize: 18, fontWeight: '700', marginBottom: 6 },
237
237
  subtitle: { fontSize: 14, opacity: 0.6, marginBottom: 16 },
238
- iconsRow: { flexDirection: 'row', marginBottom: 8, flexWrap: 'wrap' },
239
- iconButton: { marginRight: 8, marginBottom: 8 },
238
+ iconsRow: { flexDirection: 'row', marginBottom: 8, flexWrap: 'nowrap', justifyContent: 'space-between' },
239
+ iconButton: { alignItems: 'center', justifyContent: 'center' },
240
240
  colLabels: {
241
241
  flexDirection: 'row',
242
242
  justifyContent: 'space-between',
@@ -48,18 +48,21 @@ function computeSheetHeight(question: XeboQuestion | null, screen: ModalScreen):
48
48
  }
49
49
  case XeboQuestionType.nps:
50
50
  return (question.conditionalFollowUps?.length ?? 0) > 0
51
- ? SCREEN_HEIGHT * 0.68 // NPS Pro — space for follow-up card
52
- : SCREEN_HEIGHT * 0.40; // simple NPS — just scale + button
51
+ ? SCREEN_HEIGHT * 0.62 // NPS Pro — space for follow-up card
52
+ : SCREEN_HEIGHT * 0.46; // simple NPS
53
53
  case XeboQuestionType.rating:
54
- return question.followUpQuestion ? SCREEN_HEIGHT * 0.55 : SCREEN_HEIGHT * 0.40;
54
+ return question.followUpQuestion ? SCREEN_HEIGHT * 0.56 : SCREEN_HEIGHT * 0.46;
55
55
  case XeboQuestionType.singleTextBox:
56
- case XeboQuestionType.multipleTextBox:
57
56
  return SCREEN_HEIGHT * 0.44;
57
+ case XeboQuestionType.multipleTextBox: {
58
+ const fieldCount = question.options?.length ?? 1;
59
+ return Math.min(SCREEN_HEIGHT * 0.70, SCREEN_HEIGHT * (0.28 + fieldCount * 0.10));
60
+ }
58
61
  case XeboQuestionType.singleChoice:
59
62
  case XeboQuestionType.multipleChoice:
60
63
  case XeboQuestionType.dropdown: {
61
64
  const optCount = question.options?.length ?? 0;
62
- return Math.min(SCREEN_HEIGHT * 0.72, SCREEN_HEIGHT * (0.28 + optCount * 0.055));
65
+ return Math.min(SCREEN_HEIGHT * 0.72, SCREEN_HEIGHT * (0.30 + optCount * 0.058));
63
66
  }
64
67
  default:
65
68
  return SCREEN_HEIGHT * 0.48;