react-native-my-survey-sdk 2.2.20 → 2.2.21

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.2.20",
3
+ "version": "2.2.21",
4
4
  "description": "Xebo survey collection SDK for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -78,8 +78,8 @@ type ModalScreen = 'intro' | 'question' | 'thankYou';
78
78
 
79
79
  export const XeboSurveyModal: React.FC = () => {
80
80
  const theme = getTheme();
81
- // Bottom inset: iOS home indicator (34) or Android nav bar height (min 16)
82
- const bottomInset = Platform.OS === 'ios' ? 34 : Math.max(16, _androidNavBar);
81
+ // Bottom inset: iOS home indicator (34) or Android gesture nav zone (min 34)
82
+ const bottomInset = Platform.OS === 'ios' ? 34 : Math.max(34, _androidNavBar);
83
83
 
84
84
  // Slides the sheet above the keyboard when any TextInput is focused.
85
85
  // Using translateY keeps the layout stable — no height re-calculation needed.
@@ -94,7 +94,7 @@ export const XeboSurveyModal: React.FC = () => {
94
94
  const [questionIndex, setQuestionIndex] = useState(0);
95
95
 
96
96
  const sheetHeight = useMemo(
97
- () => computeSheetHeight(survey?.questions[questionIndex] ?? null, screen),
97
+ () => computeSheetHeight(survey?.questions[questionIndex] ?? null, screen) + (Platform.OS === 'android' ? 18 : 0),
98
98
  [survey, questionIndex, screen]
99
99
  );
100
100
  // Keep ref in sync so keyboard listener always has the latest height
@@ -108,8 +108,8 @@ export const XeboSurveyModal: React.FC = () => {
108
108
 
109
109
  const onShow = (e: { endCoordinates: { height: number } }) => {
110
110
  const kh = e.endCoordinates.height;
111
- // Cap so the sheet never slides above a 24px top margin
112
- const maxShift = Math.max(0, SCREEN_HEIGHT - sheetHeightRef.current - 24);
111
+ // Cap only to prevent sheet going above screen top edge
112
+ const maxShift = Math.max(0, SCREEN_HEIGHT - sheetHeightRef.current);
113
113
  Animated.timing(shiftAnim, {
114
114
  toValue: -Math.min(kh, maxShift),
115
115
  duration: Platform.OS === 'ios' ? 250 : 0,
@@ -355,7 +355,7 @@ export async function submitResponse(
355
355
  if (meta.userData.name) customVariables.fName = meta.userData.name;
356
356
  if (meta.userData.email) customVariables.email = meta.userData.email;
357
357
  if (meta.userData.phone) customVariables.mobile = meta.userData.phone;
358
- if (meta.userData.uniqueId) customVariables.unique_id = meta.userData.uniqueId;
358
+ if (meta.userData.uniqueId) customVariables.unique_id = meta.userData.uniqueId;
359
359
  if (meta.userData.country) customVariables.country = meta.userData.country;
360
360
  if (meta.userData.city) customVariables.city = meta.userData.city;
361
361
  }