react-native-my-survey-sdk 2.2.16 → 2.2.17
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
|
@@ -41,39 +41,36 @@ const _androidNavBar = Platform.OS === 'android'
|
|
|
41
41
|
: 0;
|
|
42
42
|
|
|
43
43
|
function computeSheetHeight(question: XeboQuestion | null, screen: ModalScreen): number {
|
|
44
|
-
if (screen === 'thankYou') return SCREEN_HEIGHT * 0.
|
|
45
|
-
if (screen === 'intro') return SCREEN_HEIGHT * 0.
|
|
46
|
-
if (!question) return SCREEN_HEIGHT * 0.
|
|
44
|
+
if (screen === 'thankYou') return SCREEN_HEIGHT * 0.30;
|
|
45
|
+
if (screen === 'intro') return SCREEN_HEIGHT * 0.35;
|
|
46
|
+
if (!question) return SCREEN_HEIGHT * 0.42;
|
|
47
47
|
switch (question.type) {
|
|
48
48
|
case XeboQuestionType.multiNps:
|
|
49
49
|
case XeboQuestionType.multiRating: {
|
|
50
50
|
const rowCount = question.options?.length ?? 3;
|
|
51
|
-
return Math.min(SCREEN_HEIGHT * 0.
|
|
51
|
+
return Math.min(SCREEN_HEIGHT * 0.70, SCREEN_HEIGHT * (0.22 + rowCount * 0.13));
|
|
52
52
|
}
|
|
53
53
|
case XeboQuestionType.nps:
|
|
54
54
|
return (question.conditionalFollowUps?.length ?? 0) > 0
|
|
55
|
-
? SCREEN_HEIGHT * 0.
|
|
56
|
-
: SCREEN_HEIGHT * 0.
|
|
55
|
+
? SCREEN_HEIGHT * 0.55
|
|
56
|
+
: SCREEN_HEIGHT * 0.34;
|
|
57
57
|
case XeboQuestionType.rating:
|
|
58
|
-
return question.followUpQuestion ? SCREEN_HEIGHT * 0.
|
|
58
|
+
return question.followUpQuestion ? SCREEN_HEIGHT * 0.50 : SCREEN_HEIGHT * 0.34;
|
|
59
59
|
case XeboQuestionType.singleTextBox:
|
|
60
|
-
|
|
61
|
-
return SCREEN_HEIGHT * 0.40;
|
|
60
|
+
return SCREEN_HEIGHT * 0.35;
|
|
62
61
|
case XeboQuestionType.multipleTextBox: {
|
|
63
62
|
const fieldCount = question.options?.length ?? 1;
|
|
64
|
-
return Math.min(SCREEN_HEIGHT * 0.
|
|
63
|
+
return Math.min(SCREEN_HEIGHT * 0.65, SCREEN_HEIGHT * (0.26 + fieldCount * 0.10));
|
|
65
64
|
}
|
|
66
65
|
case XeboQuestionType.dropdown:
|
|
67
|
-
|
|
68
|
-
// Minimum ~0.62 regardless of whether options are parsed yet
|
|
69
|
-
return SCREEN_HEIGHT * 0.62;
|
|
66
|
+
return SCREEN_HEIGHT * 0.55;
|
|
70
67
|
case XeboQuestionType.singleChoice:
|
|
71
68
|
case XeboQuestionType.multipleChoice: {
|
|
72
69
|
const optCount = question.options?.length ?? 0;
|
|
73
|
-
return Math.min(SCREEN_HEIGHT * 0.
|
|
70
|
+
return Math.min(SCREEN_HEIGHT * 0.72, SCREEN_HEIGHT * (0.24 + optCount * 0.075));
|
|
74
71
|
}
|
|
75
72
|
default:
|
|
76
|
-
return SCREEN_HEIGHT * 0.
|
|
73
|
+
return SCREEN_HEIGHT * 0.42;
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
76
|
|