@100mslive/react-native-room-kit 1.1.2 → 1.1.3
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/lib/commonjs/HMSRoomSetup.js +13 -1
- package/lib/commonjs/HMSRoomSetup.js.map +1 -1
- package/lib/commonjs/Icons/Clock/assets/clock-vector.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/commonjs/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/commonjs/Icons/Clock/index.js +7 -2
- package/lib/commonjs/Icons/Clock/index.js.map +1 -1
- package/lib/commonjs/components/CreatePoll.js +3 -2
- package/lib/commonjs/components/CreatePoll.js.map +1 -1
- package/lib/commonjs/components/HLSView.js +15 -1
- package/lib/commonjs/components/HLSView.js.map +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js +1 -1
- package/lib/commonjs/components/HMSPollsQuizzesNotification.js.map +1 -1
- package/lib/commonjs/components/LeaderboardEntry.js +135 -0
- package/lib/commonjs/components/LeaderboardEntry.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizSheetScreen.js +69 -0
- package/lib/commonjs/components/PollAndQuizSheetScreen.js.map +1 -0
- package/lib/commonjs/components/PollAndQuizVoting.js +133 -4
- package/lib/commonjs/components/PollAndQuizVoting.js.map +1 -1
- package/lib/commonjs/components/PollQuestions.js +104 -4
- package/lib/commonjs/components/PollQuestions.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js +9 -11
- package/lib/commonjs/components/PollsAndQuizBottomSheet.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizzesCard.js +1 -1
- package/lib/commonjs/components/PollsAndQuizzesCard.js.map +1 -1
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js +26 -120
- package/lib/commonjs/components/PollsAndQuizzesModalContent.js.map +1 -1
- package/lib/commonjs/components/PollsConfigAndList.js +81 -4
- package/lib/commonjs/components/PollsConfigAndList.js.map +1 -1
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js +7 -15
- package/lib/commonjs/components/PreviousPollsAndQuizzesList.js.map +1 -1
- package/lib/commonjs/components/QuizLeaderboardEntriesScreen.js +284 -0
- package/lib/commonjs/components/QuizLeaderboardEntriesScreen.js.map +1 -0
- package/lib/commonjs/components/QuizLeaderboardScreen.js +279 -0
- package/lib/commonjs/components/QuizLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/components/QuizLeaderboardSummary.js +195 -0
- package/lib/commonjs/components/QuizLeaderboardSummary.js.map +1 -0
- package/lib/commonjs/components/VoterParticipationSummary.js +46 -0
- package/lib/commonjs/components/VoterParticipationSummary.js.map +1 -0
- package/lib/commonjs/redux/actionTypes.js +7 -1
- package/lib/commonjs/redux/actionTypes.js.map +1 -1
- package/lib/commonjs/redux/actions/index.js +25 -5
- package/lib/commonjs/redux/actions/index.js.map +1 -1
- package/lib/commonjs/redux/reducers/polls.js +65 -5
- package/lib/commonjs/redux/reducers/polls.js.map +1 -1
- package/lib/commonjs/utils/hooks.js +107 -2
- package/lib/commonjs/utils/hooks.js.map +1 -1
- package/lib/module/HMSRoomSetup.js +13 -1
- package/lib/module/HMSRoomSetup.js.map +1 -1
- package/lib/module/Icons/Clock/assets/clock-vector.png +0 -0
- package/lib/module/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@2x.png +0 -0
- package/lib/module/Icons/Clock/assets/clock@3x.png +0 -0
- package/lib/module/Icons/Clock/index.js +7 -2
- package/lib/module/Icons/Clock/index.js.map +1 -1
- package/lib/module/components/CreatePoll.js +4 -3
- package/lib/module/components/CreatePoll.js.map +1 -1
- package/lib/module/components/HLSView.js +17 -3
- package/lib/module/components/HLSView.js.map +1 -1
- package/lib/module/components/HMSPollsQuizzesNotification.js +2 -2
- package/lib/module/components/HMSPollsQuizzesNotification.js.map +1 -1
- package/lib/module/components/LeaderboardEntry.js +126 -0
- package/lib/module/components/LeaderboardEntry.js.map +1 -0
- package/lib/module/components/PollAndQuizSheetScreen.js +60 -0
- package/lib/module/components/PollAndQuizSheetScreen.js.map +1 -0
- package/lib/module/components/PollAndQuizVoting.js +135 -6
- package/lib/module/components/PollAndQuizVoting.js.map +1 -1
- package/lib/module/components/PollQuestions.js +107 -7
- package/lib/module/components/PollQuestions.js.map +1 -1
- package/lib/module/components/PollsAndQuizBottomSheet.js +11 -13
- package/lib/module/components/PollsAndQuizBottomSheet.js.map +1 -1
- package/lib/module/components/PollsAndQuizzesCard.js +2 -2
- package/lib/module/components/PollsAndQuizzesCard.js.map +1 -1
- package/lib/module/components/PollsAndQuizzesModalContent.js +28 -122
- package/lib/module/components/PollsAndQuizzesModalContent.js.map +1 -1
- package/lib/module/components/PollsConfigAndList.js +82 -5
- package/lib/module/components/PollsConfigAndList.js.map +1 -1
- package/lib/module/components/PreviousPollsAndQuizzesList.js +7 -15
- package/lib/module/components/PreviousPollsAndQuizzesList.js.map +1 -1
- package/lib/module/components/QuizLeaderboardEntriesScreen.js +275 -0
- package/lib/module/components/QuizLeaderboardEntriesScreen.js.map +1 -0
- package/lib/module/components/QuizLeaderboardScreen.js +270 -0
- package/lib/module/components/QuizLeaderboardScreen.js.map +1 -0
- package/lib/module/components/QuizLeaderboardSummary.js +186 -0
- package/lib/module/components/QuizLeaderboardSummary.js.map +1 -0
- package/lib/module/components/VoterParticipationSummary.js +37 -0
- package/lib/module/components/VoterParticipationSummary.js.map +1 -0
- package/lib/module/redux/actionTypes.js +7 -1
- package/lib/module/redux/actionTypes.js.map +1 -1
- package/lib/module/redux/actions/index.js +18 -3
- package/lib/module/redux/actions/index.js.map +1 -1
- package/lib/module/redux/reducers/polls.js +65 -5
- package/lib/module/redux/reducers/polls.js.map +1 -1
- package/lib/module/utils/hooks.js +105 -2
- package/lib/module/utils/hooks.js.map +1 -1
- package/lib/typescript/HMSRoomSetup.d.ts.map +1 -1
- package/lib/typescript/Icons/Clock/index.d.ts +1 -0
- package/lib/typescript/Icons/Clock/index.d.ts.map +1 -1
- package/lib/typescript/components/CreatePoll.d.ts.map +1 -1
- package/lib/typescript/components/HLSView.d.ts.map +1 -1
- package/lib/typescript/components/LeaderboardEntry.d.ts +11 -0
- package/lib/typescript/components/LeaderboardEntry.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizSheetScreen.d.ts +8 -0
- package/lib/typescript/components/PollAndQuizSheetScreen.d.ts.map +1 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts +2 -0
- package/lib/typescript/components/PollAndQuizVoting.d.ts.map +1 -1
- package/lib/typescript/components/PollQuestions.d.ts +2 -0
- package/lib/typescript/components/PollQuestions.d.ts.map +1 -1
- package/lib/typescript/components/PollsAndQuizBottomSheet.d.ts.map +1 -1
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts +0 -1
- package/lib/typescript/components/PollsAndQuizzesModalContent.d.ts.map +1 -1
- package/lib/typescript/components/PollsConfigAndList.d.ts +1 -0
- package/lib/typescript/components/PollsConfigAndList.d.ts.map +1 -1
- package/lib/typescript/components/PreviousPollsAndQuizzesList.d.ts.map +1 -1
- package/lib/typescript/components/QuizLeaderboardEntriesScreen.d.ts +8 -0
- package/lib/typescript/components/QuizLeaderboardEntriesScreen.d.ts.map +1 -0
- package/lib/typescript/components/QuizLeaderboardScreen.d.ts +8 -0
- package/lib/typescript/components/QuizLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/components/QuizLeaderboardSummary.d.ts +9 -0
- package/lib/typescript/components/QuizLeaderboardSummary.d.ts.map +1 -0
- package/lib/typescript/components/VoterParticipationSummary.d.ts +7 -0
- package/lib/typescript/components/VoterParticipationSummary.d.ts.map +1 -0
- package/lib/typescript/redux/actionTypes.d.ts +29 -8
- package/lib/typescript/redux/actionTypes.d.ts.map +1 -1
- package/lib/typescript/redux/actions/index.d.ts +6 -2
- package/lib/typescript/redux/actions/index.d.ts.map +1 -1
- package/lib/typescript/redux/index.d.ts +2 -1
- package/lib/typescript/redux/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/index.d.ts +2 -1
- package/lib/typescript/redux/reducers/index.d.ts.map +1 -1
- package/lib/typescript/redux/reducers/polls.d.ts +3 -2
- package/lib/typescript/redux/reducers/polls.d.ts.map +1 -1
- package/lib/typescript/utils/hooks.d.ts +6 -0
- package/lib/typescript/utils/hooks.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/HMSRoomSetup.tsx +19 -1
- package/src/Icons/Clock/assets/clock-vector.png +0 -0
- package/src/Icons/Clock/assets/clock-vector@2x.png +0 -0
- package/src/Icons/Clock/assets/clock-vector@3x.png +0 -0
- package/src/Icons/Clock/assets/clock.png +0 -0
- package/src/Icons/Clock/assets/clock@2x.png +0 -0
- package/src/Icons/Clock/assets/clock@3x.png +0 -0
- package/src/Icons/Clock/index.tsx +16 -3
- package/src/components/CreatePoll.tsx +7 -2
- package/src/components/HLSView.tsx +27 -1
- package/src/components/HMSPollsQuizzesNotification.tsx +2 -2
- package/src/components/LeaderboardEntry.tsx +172 -0
- package/src/components/PollAndQuizSheetScreen.tsx +85 -0
- package/src/components/PollAndQuizVoting.tsx +181 -7
- package/src/components/PollQuestions.tsx +171 -49
- package/src/components/PollsAndQuizBottomSheet.tsx +20 -42
- package/src/components/PollsAndQuizzesCard.tsx +2 -2
- package/src/components/PollsAndQuizzesModalContent.tsx +40 -163
- package/src/components/PollsConfigAndList.tsx +107 -11
- package/src/components/PreviousPollsAndQuizzesList.tsx +33 -40
- package/src/components/QuizLeaderboardEntriesScreen.tsx +323 -0
- package/src/components/QuizLeaderboardScreen.tsx +342 -0
- package/src/components/QuizLeaderboardSummary.tsx +207 -0
- package/src/components/VoterParticipationSummary.tsx +67 -0
- package/src/redux/actionTypes.ts +35 -5
- package/src/redux/actions/index.ts +34 -6
- package/src/redux/reducers/polls.ts +84 -6
- package/src/utils/hooks.ts +190 -3
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, StyleSheet, View, Keyboard, TouchableOpacity, ActivityIndicator } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { FlashList } from '@shopify/flash-list';
|
|
5
|
+
import { useHMSInstance, useHMSRoomColorPalette, useHMSRoomStyleSheet } from '../hooks-util';
|
|
6
|
+
import { popFromNavigationStack } from '../redux/actions';
|
|
7
|
+
import { BottomSheet } from './BottomSheet';
|
|
8
|
+
import { ChevronIcon, CloseIcon } from '../Icons';
|
|
9
|
+
import { PollAndQuizzStateLabel } from './PollAndQuizzStateLabel';
|
|
10
|
+
import { LeaderboardEntry } from './LeaderboardEntry';
|
|
11
|
+
export const QuizLeaderboardEntriesScreen = ({
|
|
12
|
+
currentIdx,
|
|
13
|
+
dismissModal,
|
|
14
|
+
unmountScreenWithAnimation
|
|
15
|
+
}) => {
|
|
16
|
+
var _selectedPoll$questio, _selectedPoll$questio2;
|
|
17
|
+
const hmsInstance = useHMSInstance();
|
|
18
|
+
const dispatch = useDispatch();
|
|
19
|
+
const selectedPoll = useSelector(state => {
|
|
20
|
+
const pollsData = state.polls;
|
|
21
|
+
if (pollsData.selectedPollId !== null) {
|
|
22
|
+
return pollsData.polls[pollsData.selectedPollId] || null;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
});
|
|
26
|
+
const initialLeaderboardEntries = useSelector(state => {
|
|
27
|
+
var _state$polls$leaderbo;
|
|
28
|
+
return selectedPoll !== null && selectedPoll !== void 0 && selectedPoll.pollId ? (_state$polls$leaderbo = state.polls.leaderboards[selectedPoll.pollId]) === null || _state$polls$leaderbo === void 0 ? void 0 : _state$polls$leaderbo.entries : null;
|
|
29
|
+
});
|
|
30
|
+
const [leaderboardEntries, setLeaderboardEntries] = React.useState(initialLeaderboardEntries ? [...initialLeaderboardEntries] : []);
|
|
31
|
+
const startIndexRef = React.useRef(leaderboardEntries.length);
|
|
32
|
+
const {
|
|
33
|
+
primary_default: primaryDefaultColor
|
|
34
|
+
} = useHMSRoomColorPalette();
|
|
35
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
36
|
+
regularHighText: {
|
|
37
|
+
color: theme.palette.on_surface_high,
|
|
38
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
39
|
+
},
|
|
40
|
+
regularMediumText: {
|
|
41
|
+
color: theme.palette.on_surface_medium,
|
|
42
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
43
|
+
},
|
|
44
|
+
semiBoldMediumText: {
|
|
45
|
+
color: theme.palette.on_surface_medium,
|
|
46
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
47
|
+
},
|
|
48
|
+
semiBoldHighText: {
|
|
49
|
+
color: theme.palette.on_surface_high,
|
|
50
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
51
|
+
},
|
|
52
|
+
headerText: {
|
|
53
|
+
color: theme.palette.on_surface_high,
|
|
54
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
55
|
+
},
|
|
56
|
+
container: {
|
|
57
|
+
backgroundColor: theme.palette.surface_dim
|
|
58
|
+
},
|
|
59
|
+
summaryContainer: {
|
|
60
|
+
backgroundColor: theme.palette.surface_default
|
|
61
|
+
},
|
|
62
|
+
entriesCard: {
|
|
63
|
+
backgroundColor: theme.palette.surface_default
|
|
64
|
+
},
|
|
65
|
+
divider: {
|
|
66
|
+
backgroundColor: theme.palette.border_bright
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
const handleBackPress = () => {
|
|
70
|
+
Keyboard.dismiss();
|
|
71
|
+
if (typeof unmountScreenWithAnimation === 'function') {
|
|
72
|
+
unmountScreenWithAnimation(() => dispatch(popFromNavigationStack()));
|
|
73
|
+
} else {
|
|
74
|
+
dispatch(popFromNavigationStack());
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleClosePress = () => {
|
|
78
|
+
Keyboard.dismiss();
|
|
79
|
+
dismissModal();
|
|
80
|
+
};
|
|
81
|
+
const [loading, setLoading] = React.useState(false);
|
|
82
|
+
const loadingRef = React.useRef(false);
|
|
83
|
+
const mounted = React.useRef(true);
|
|
84
|
+
const canFetchMore = React.useRef(true);
|
|
85
|
+
const fetchLeaderboard = React.useCallback(async () => {
|
|
86
|
+
if (selectedPoll !== null && selectedPoll !== void 0 && selectedPoll.pollId && canFetchMore.current && !loadingRef.current) {
|
|
87
|
+
setLoading(true);
|
|
88
|
+
loadingRef.current = true;
|
|
89
|
+
const response = await hmsInstance.interactivityCenter.fetchLeaderboard(selectedPoll.pollId, 50, startIndexRef.current + 1,
|
|
90
|
+
// Indexing starts from 1
|
|
91
|
+
false);
|
|
92
|
+
if (mounted) {
|
|
93
|
+
setLoading(false);
|
|
94
|
+
loadingRef.current = false;
|
|
95
|
+
if (Array.isArray(response.entries)) {
|
|
96
|
+
const entries = response.entries;
|
|
97
|
+
setLeaderboardEntries(prev => {
|
|
98
|
+
const list = [...prev, ...entries];
|
|
99
|
+
startIndexRef.current = list.length;
|
|
100
|
+
return list;
|
|
101
|
+
});
|
|
102
|
+
if (entries.length <= 0) {
|
|
103
|
+
canFetchMore.current = false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (response.hasNext === false) {
|
|
107
|
+
canFetchMore.current = false;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}, [selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.pollId]);
|
|
112
|
+
const totalPoints = (selectedPoll === null || selectedPoll === void 0 || (_selectedPoll$questio = selectedPoll.questions) === null || _selectedPoll$questio === void 0 ? void 0 : _selectedPoll$questio.reduce((acc, curr) => {
|
|
113
|
+
acc += curr.weight;
|
|
114
|
+
return acc;
|
|
115
|
+
}, 0)) ?? 0;
|
|
116
|
+
const totalQuestions = (selectedPoll === null || selectedPoll === void 0 || (_selectedPoll$questio2 = selectedPoll.questions) === null || _selectedPoll$questio2 === void 0 ? void 0 : _selectedPoll$questio2.length) ?? 0;
|
|
117
|
+
const _keyExtractor = React.useCallback((item, index) => {
|
|
118
|
+
var _item$peer;
|
|
119
|
+
return ((_item$peer = item.peer) === null || _item$peer === void 0 ? void 0 : _item$peer.peerId) ?? index.toString();
|
|
120
|
+
}, []);
|
|
121
|
+
const _renderItem = React.useCallback(data => {
|
|
122
|
+
return /*#__PURE__*/React.createElement(LeaderboardEntry, {
|
|
123
|
+
totalPoints: totalPoints,
|
|
124
|
+
totalQuestions: totalQuestions,
|
|
125
|
+
entry: data.item,
|
|
126
|
+
style: {
|
|
127
|
+
marginBottom: 16
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}, [totalPoints, totalQuestions]);
|
|
131
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
132
|
+
style: [styles.fullView, hmsRoomStyles.container]
|
|
133
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
134
|
+
style: styles.header
|
|
135
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
136
|
+
style: styles.headerControls
|
|
137
|
+
}, currentIdx > 0 ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
138
|
+
onPress: handleBackPress,
|
|
139
|
+
hitSlop: styles.closeIconHitSlop,
|
|
140
|
+
style: styles.backIcon
|
|
141
|
+
}, /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
142
|
+
direction: "left"
|
|
143
|
+
})) : null, /*#__PURE__*/React.createElement(Text, {
|
|
144
|
+
numberOfLines: 2,
|
|
145
|
+
style: [styles.headerText, {
|
|
146
|
+
flexShrink: 1
|
|
147
|
+
}, hmsRoomStyles.headerText]
|
|
148
|
+
}, selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.title), selectedPoll !== null && selectedPoll !== void 0 && selectedPoll.state ? /*#__PURE__*/React.createElement(PollAndQuizzStateLabel, {
|
|
149
|
+
state: selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.state
|
|
150
|
+
}) : null), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
151
|
+
onPress: handleClosePress,
|
|
152
|
+
hitSlop: styles.closeIconHitSlop,
|
|
153
|
+
style: {
|
|
154
|
+
marginLeft: 16
|
|
155
|
+
}
|
|
156
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
157
|
+
style: styles.halfDivider
|
|
158
|
+
}), /*#__PURE__*/React.createElement(FlashList, {
|
|
159
|
+
data: leaderboardEntries,
|
|
160
|
+
ListHeaderComponent: () => /*#__PURE__*/React.createElement(View, {
|
|
161
|
+
style: {
|
|
162
|
+
paddingTop: 24,
|
|
163
|
+
paddingBottom: 28
|
|
164
|
+
}
|
|
165
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
166
|
+
style: [styles.normalText, hmsRoomStyles.semiBoldHighText]
|
|
167
|
+
}, "Leaderboard"), /*#__PURE__*/React.createElement(Text, {
|
|
168
|
+
style: [styles.smallerText, hmsRoomStyles.regularMediumText]
|
|
169
|
+
}, "Based on time taken to cast the correct answer")),
|
|
170
|
+
ListFooterComponent: () => loading ? /*#__PURE__*/React.createElement(ActivityIndicator, {
|
|
171
|
+
size: "small",
|
|
172
|
+
color: primaryDefaultColor
|
|
173
|
+
}) : null,
|
|
174
|
+
estimatedItemSize: 56,
|
|
175
|
+
onEndReached: () => {
|
|
176
|
+
fetchLeaderboard();
|
|
177
|
+
}
|
|
178
|
+
// showsVerticalScrollIndicator={Platform.OS !== 'android'}
|
|
179
|
+
,
|
|
180
|
+
contentContainerStyle: {
|
|
181
|
+
paddingHorizontal: 24
|
|
182
|
+
}
|
|
183
|
+
// keyboardShouldPersistTaps="always"
|
|
184
|
+
// ItemSeparatorComponent={() => <View style={{ height: 16 }} />} // TODO: There is a bug related to this: https://github.com/Shopify/flash-list/issues/638
|
|
185
|
+
,
|
|
186
|
+
renderItem: _renderItem,
|
|
187
|
+
keyExtractor: _keyExtractor
|
|
188
|
+
}));
|
|
189
|
+
};
|
|
190
|
+
const styles = StyleSheet.create({
|
|
191
|
+
tinyText: {
|
|
192
|
+
fontSize: 10,
|
|
193
|
+
lineHeight: 16,
|
|
194
|
+
letterSpacing: 1.5
|
|
195
|
+
},
|
|
196
|
+
smallerText: {
|
|
197
|
+
fontSize: 12,
|
|
198
|
+
lineHeight: 16
|
|
199
|
+
},
|
|
200
|
+
smallText: {
|
|
201
|
+
fontSize: 14,
|
|
202
|
+
lineHeight: 20
|
|
203
|
+
},
|
|
204
|
+
normalText: {
|
|
205
|
+
fontSize: 16,
|
|
206
|
+
lineHeight: 24
|
|
207
|
+
},
|
|
208
|
+
marginBottom16: {
|
|
209
|
+
marginBottom: 16
|
|
210
|
+
},
|
|
211
|
+
iconWrapper: {
|
|
212
|
+
flexDirection: 'row',
|
|
213
|
+
alignItems: 'center',
|
|
214
|
+
marginLeft: 12
|
|
215
|
+
},
|
|
216
|
+
// Utilities
|
|
217
|
+
fullView: {
|
|
218
|
+
flex: 1
|
|
219
|
+
},
|
|
220
|
+
// Header
|
|
221
|
+
header: {
|
|
222
|
+
flexDirection: 'row',
|
|
223
|
+
alignItems: 'center',
|
|
224
|
+
justifyContent: 'space-between',
|
|
225
|
+
marginTop: 24,
|
|
226
|
+
marginHorizontal: 24
|
|
227
|
+
},
|
|
228
|
+
headerControls: {
|
|
229
|
+
flexDirection: 'row',
|
|
230
|
+
alignItems: 'center',
|
|
231
|
+
flexShrink: 1
|
|
232
|
+
},
|
|
233
|
+
headerText: {
|
|
234
|
+
fontSize: 20,
|
|
235
|
+
lineHeight: 24,
|
|
236
|
+
letterSpacing: 0.15,
|
|
237
|
+
marginRight: 12
|
|
238
|
+
},
|
|
239
|
+
closeIconHitSlop: {
|
|
240
|
+
bottom: 16,
|
|
241
|
+
left: 16,
|
|
242
|
+
right: 16,
|
|
243
|
+
top: 16
|
|
244
|
+
},
|
|
245
|
+
backIcon: {
|
|
246
|
+
marginRight: 8
|
|
247
|
+
},
|
|
248
|
+
// Divider
|
|
249
|
+
halfDivider: {
|
|
250
|
+
marginHorizontal: 24,
|
|
251
|
+
marginVertical: 0,
|
|
252
|
+
marginTop: 24,
|
|
253
|
+
width: undefined
|
|
254
|
+
},
|
|
255
|
+
divider: {
|
|
256
|
+
height: 1,
|
|
257
|
+
width: '100%'
|
|
258
|
+
},
|
|
259
|
+
viewAllBtn: {
|
|
260
|
+
flexDirection: 'row',
|
|
261
|
+
alignItems: 'center',
|
|
262
|
+
justifyContent: 'flex-end',
|
|
263
|
+
paddingVertical: 12,
|
|
264
|
+
paddingHorizontal: 16
|
|
265
|
+
},
|
|
266
|
+
leaderboardEntry: {
|
|
267
|
+
marginBottom: 16,
|
|
268
|
+
marginHorizontal: 16
|
|
269
|
+
},
|
|
270
|
+
entriesCard: {
|
|
271
|
+
paddingTop: 12,
|
|
272
|
+
borderRadius: 8
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
//# sourceMappingURL=QuizLeaderboardEntriesScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","StyleSheet","View","Keyboard","TouchableOpacity","ActivityIndicator","useDispatch","useSelector","FlashList","useHMSInstance","useHMSRoomColorPalette","useHMSRoomStyleSheet","popFromNavigationStack","BottomSheet","ChevronIcon","CloseIcon","PollAndQuizzStateLabel","LeaderboardEntry","QuizLeaderboardEntriesScreen","currentIdx","dismissModal","unmountScreenWithAnimation","_selectedPoll$questio","_selectedPoll$questio2","hmsInstance","dispatch","selectedPoll","state","pollsData","polls","selectedPollId","initialLeaderboardEntries","_state$polls$leaderbo","pollId","leaderboards","entries","leaderboardEntries","setLeaderboardEntries","useState","startIndexRef","useRef","length","primary_default","primaryDefaultColor","hmsRoomStyles","theme","typography","regularHighText","color","palette","on_surface_high","fontFamily","font_family","regularMediumText","on_surface_medium","semiBoldMediumText","semiBoldHighText","headerText","container","backgroundColor","surface_dim","summaryContainer","surface_default","entriesCard","divider","border_bright","handleBackPress","dismiss","handleClosePress","loading","setLoading","loadingRef","mounted","canFetchMore","fetchLeaderboard","useCallback","current","response","interactivityCenter","Array","isArray","prev","list","hasNext","totalPoints","questions","reduce","acc","curr","weight","totalQuestions","_keyExtractor","item","index","_item$peer","peer","peerId","toString","_renderItem","data","createElement","entry","style","marginBottom","styles","fullView","header","headerControls","onPress","hitSlop","closeIconHitSlop","backIcon","direction","numberOfLines","flexShrink","title","marginLeft","Divider","halfDivider","ListHeaderComponent","paddingTop","paddingBottom","normalText","smallerText","ListFooterComponent","size","estimatedItemSize","onEndReached","contentContainerStyle","paddingHorizontal","renderItem","keyExtractor","create","tinyText","fontSize","lineHeight","letterSpacing","smallText","marginBottom16","iconWrapper","flexDirection","alignItems","flex","justifyContent","marginTop","marginHorizontal","marginRight","bottom","left","right","top","marginVertical","width","undefined","height","viewAllBtn","paddingVertical","leaderboardEntry","borderRadius"],"sourceRoot":"../../../src","sources":["components/QuizLeaderboardEntriesScreen.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,EAChBC,iBAAiB,QACZ,cAAc;AACrB,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,SAAS,QAAQ,qBAAqB;AAE/C,SACEC,cAAc,EACdC,sBAAsB,EACtBC,oBAAoB,QACf,eAAe;AAEtB,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,WAAW,EAAEC,SAAS,QAAQ,UAAU;AACjD,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gBAAgB,QAAQ,oBAAoB;AAQrD,OAAO,MAAMC,4BAEZ,GAAGA,CAAC;EAAEC,UAAU;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AAU;IAC1Ba,eAAe,EAAE,EAAE;IACnB3B,iBAAiB,EAAE;EACrB,CAAC;EACD4B,gBAAgB,EAAE;IAAEtD,YAAY,EAAE,EAAE;IAAE0C,gBAAgB,EAAE;EAAG,CAAC;EAC5DlF,WAAW,EAAE;IAAEyD,UAAU,EAAE,EAAE;IAAEsC,YAAY,EAAE;EAAE;AACjD,CAAC,CAAC"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Text, StyleSheet, ScrollView, View, Keyboard, TouchableOpacity } from 'react-native';
|
|
3
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
4
|
+
import { useHMSRoomStyleSheet } from '../hooks-util';
|
|
5
|
+
import { popFromNavigationStack, pushToNavigationStack } from '../redux/actions';
|
|
6
|
+
import { BottomSheet } from './BottomSheet';
|
|
7
|
+
import { ChevronIcon, CloseIcon } from '../Icons';
|
|
8
|
+
import { PollAndQuizzStateLabel } from './PollAndQuizzStateLabel';
|
|
9
|
+
import { LeaderboardEntry } from './LeaderboardEntry';
|
|
10
|
+
import { CreatePollStages } from '../redux/actionTypes';
|
|
11
|
+
import { QuizLeaderboardSummary } from './QuizLeaderboardSummary';
|
|
12
|
+
import { useFetchLeaderboardResponse, useLeaderboardSummaryData } from '../utils/hooks';
|
|
13
|
+
export const QuizLeaderboardScreen = ({
|
|
14
|
+
currentIdx,
|
|
15
|
+
dismissModal,
|
|
16
|
+
unmountScreenWithAnimation
|
|
17
|
+
}) => {
|
|
18
|
+
var _selectedPoll$questio;
|
|
19
|
+
const dispatch = useDispatch();
|
|
20
|
+
const selectedPoll = useSelector(state => {
|
|
21
|
+
const pollsData = state.polls;
|
|
22
|
+
if (pollsData.selectedPollId !== null) {
|
|
23
|
+
return pollsData.polls[pollsData.selectedPollId] || null;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
});
|
|
27
|
+
const headerTitle = useSelector(state => {
|
|
28
|
+
const pollsData = state.polls;
|
|
29
|
+
if (pollsData.selectedPollId !== null) {
|
|
30
|
+
var _pollsData$polls$poll;
|
|
31
|
+
return ((_pollsData$polls$poll = pollsData.polls[pollsData.selectedPollId]) === null || _pollsData$polls$poll === void 0 ? void 0 : _pollsData$polls$poll.title) || null;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
});
|
|
35
|
+
const hmsRoomStyles = useHMSRoomStyleSheet((theme, typography) => ({
|
|
36
|
+
regularHighText: {
|
|
37
|
+
color: theme.palette.on_surface_high,
|
|
38
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
39
|
+
},
|
|
40
|
+
regularMediumText: {
|
|
41
|
+
color: theme.palette.on_surface_medium,
|
|
42
|
+
fontFamily: `${typography.font_family}-Regular`
|
|
43
|
+
},
|
|
44
|
+
semiBoldMediumText: {
|
|
45
|
+
color: theme.palette.on_surface_medium,
|
|
46
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
47
|
+
},
|
|
48
|
+
semiBoldHighText: {
|
|
49
|
+
color: theme.palette.on_surface_high,
|
|
50
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
51
|
+
},
|
|
52
|
+
headerText: {
|
|
53
|
+
color: theme.palette.on_surface_high,
|
|
54
|
+
fontFamily: `${typography.font_family}-SemiBold`
|
|
55
|
+
},
|
|
56
|
+
container: {
|
|
57
|
+
backgroundColor: theme.palette.surface_dim
|
|
58
|
+
},
|
|
59
|
+
summaryContainer: {
|
|
60
|
+
backgroundColor: theme.palette.surface_default
|
|
61
|
+
},
|
|
62
|
+
entriesCard: {
|
|
63
|
+
backgroundColor: theme.palette.surface_default
|
|
64
|
+
},
|
|
65
|
+
divider: {
|
|
66
|
+
backgroundColor: theme.palette.border_bright
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
const handleBackPress = () => {
|
|
70
|
+
Keyboard.dismiss();
|
|
71
|
+
if (typeof unmountScreenWithAnimation === 'function') {
|
|
72
|
+
unmountScreenWithAnimation(() => dispatch(popFromNavigationStack()));
|
|
73
|
+
} else {
|
|
74
|
+
dispatch(popFromNavigationStack());
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const handleClosePress = () => {
|
|
78
|
+
Keyboard.dismiss();
|
|
79
|
+
dismissModal();
|
|
80
|
+
};
|
|
81
|
+
const viewAllLeaderboardEntries = () => {
|
|
82
|
+
dispatch(pushToNavigationStack(CreatePollStages.QUIZ_LEADERBOARD_ENTRIES));
|
|
83
|
+
};
|
|
84
|
+
const leaderboardData = useFetchLeaderboardResponse(selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.pollId);
|
|
85
|
+
const leaderboardEntries = leaderboardData === null || leaderboardData === void 0 ? void 0 : leaderboardData.entries;
|
|
86
|
+
const summaryData = useLeaderboardSummaryData(selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.pollId);
|
|
87
|
+
const totalPoints = (selectedPoll === null || selectedPoll === void 0 || (_selectedPoll$questio = selectedPoll.questions) === null || _selectedPoll$questio === void 0 ? void 0 : _selectedPoll$questio.reduce((acc, curr) => {
|
|
88
|
+
acc += curr.weight;
|
|
89
|
+
return acc;
|
|
90
|
+
}, 0)) ?? 0;
|
|
91
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
92
|
+
style: [styles.fullView, hmsRoomStyles.container]
|
|
93
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
94
|
+
style: styles.header
|
|
95
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
96
|
+
style: styles.headerControls
|
|
97
|
+
}, currentIdx > 0 ? /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
98
|
+
onPress: handleBackPress,
|
|
99
|
+
hitSlop: styles.closeIconHitSlop,
|
|
100
|
+
style: styles.backIcon
|
|
101
|
+
}, /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
102
|
+
direction: "left"
|
|
103
|
+
})) : null, /*#__PURE__*/React.createElement(Text, {
|
|
104
|
+
numberOfLines: 2,
|
|
105
|
+
style: [styles.headerText, {
|
|
106
|
+
flexShrink: 1
|
|
107
|
+
}, hmsRoomStyles.headerText]
|
|
108
|
+
}, headerTitle), selectedPoll !== null && selectedPoll !== void 0 && selectedPoll.state ? /*#__PURE__*/React.createElement(PollAndQuizzStateLabel, {
|
|
109
|
+
state: selectedPoll === null || selectedPoll === void 0 ? void 0 : selectedPoll.state
|
|
110
|
+
}) : null), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
111
|
+
onPress: handleClosePress,
|
|
112
|
+
hitSlop: styles.closeIconHitSlop,
|
|
113
|
+
style: {
|
|
114
|
+
marginLeft: 16
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, null))), /*#__PURE__*/React.createElement(BottomSheet.Divider, {
|
|
117
|
+
style: styles.halfDivider
|
|
118
|
+
}), /*#__PURE__*/React.createElement(ScrollView, {
|
|
119
|
+
style: styles.contentContainer,
|
|
120
|
+
contentContainerStyle: styles.scrollViewContentContainer
|
|
121
|
+
}, summaryData ? /*#__PURE__*/React.createElement(QuizLeaderboardSummary, {
|
|
122
|
+
data: summaryData
|
|
123
|
+
}) : null, selectedPoll && Array.isArray(selectedPoll.questions) && Array.isArray(leaderboardEntries) && leaderboardEntries.length > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
|
|
124
|
+
style: [styles.normalText, hmsRoomStyles.semiBoldHighText]
|
|
125
|
+
}, "Leaderboard"), /*#__PURE__*/React.createElement(Text, {
|
|
126
|
+
style: [styles.smallerText, hmsRoomStyles.regularMediumText, styles.marginBottom16]
|
|
127
|
+
}, "Based on time taken to cast the correct answer"), /*#__PURE__*/React.createElement(View, {
|
|
128
|
+
style: [styles.entriesCard, hmsRoomStyles.entriesCard]
|
|
129
|
+
}, leaderboardEntries.map((entry, index) => {
|
|
130
|
+
var _selectedPoll$questio2;
|
|
131
|
+
return /*#__PURE__*/React.createElement(LeaderboardEntry, {
|
|
132
|
+
key: index,
|
|
133
|
+
entry: entry,
|
|
134
|
+
totalPoints: totalPoints,
|
|
135
|
+
totalQuestions: ((_selectedPoll$questio2 = selectedPoll.questions) === null || _selectedPoll$questio2 === void 0 ? void 0 : _selectedPoll$questio2.length) ?? 0,
|
|
136
|
+
style: styles.leaderboardEntry
|
|
137
|
+
});
|
|
138
|
+
}), leaderboardData !== null && leaderboardData !== void 0 && leaderboardData.hasNext && leaderboardEntries.length <= 5 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(View, {
|
|
139
|
+
style: [styles.divider, hmsRoomStyles.divider]
|
|
140
|
+
}), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
141
|
+
onPress: viewAllLeaderboardEntries,
|
|
142
|
+
style: styles.viewAllBtn
|
|
143
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
144
|
+
style: [styles.smallText, hmsRoomStyles.regularHighText, {
|
|
145
|
+
marginRight: 4
|
|
146
|
+
}]
|
|
147
|
+
}, "View All"), /*#__PURE__*/React.createElement(ChevronIcon, {
|
|
148
|
+
direction: "right"
|
|
149
|
+
}))) : null)) : null));
|
|
150
|
+
};
|
|
151
|
+
const styles = StyleSheet.create({
|
|
152
|
+
tinyText: {
|
|
153
|
+
fontSize: 10,
|
|
154
|
+
lineHeight: 16,
|
|
155
|
+
letterSpacing: 1.5
|
|
156
|
+
},
|
|
157
|
+
smallerText: {
|
|
158
|
+
fontSize: 12,
|
|
159
|
+
lineHeight: 16
|
|
160
|
+
},
|
|
161
|
+
smallText: {
|
|
162
|
+
fontSize: 14,
|
|
163
|
+
lineHeight: 20
|
|
164
|
+
},
|
|
165
|
+
normalText: {
|
|
166
|
+
fontSize: 16,
|
|
167
|
+
lineHeight: 24
|
|
168
|
+
},
|
|
169
|
+
marginBottom8: {
|
|
170
|
+
marginBottom: 8
|
|
171
|
+
},
|
|
172
|
+
marginBottom16: {
|
|
173
|
+
marginBottom: 16
|
|
174
|
+
},
|
|
175
|
+
contentContainer: {
|
|
176
|
+
paddingHorizontal: 24
|
|
177
|
+
},
|
|
178
|
+
scrollViewContentContainer: {
|
|
179
|
+
flexGrow: 1,
|
|
180
|
+
paddingVertical: 24
|
|
181
|
+
},
|
|
182
|
+
summaryWrapper: {
|
|
183
|
+
flexBasis: '50%',
|
|
184
|
+
flexGrow: 1,
|
|
185
|
+
flexShrink: 1,
|
|
186
|
+
padding: 16,
|
|
187
|
+
borderRadius: 12
|
|
188
|
+
},
|
|
189
|
+
position: {
|
|
190
|
+
width: 24,
|
|
191
|
+
height: 24,
|
|
192
|
+
borderRadius: 12,
|
|
193
|
+
textAlign: 'center',
|
|
194
|
+
textAlignVertical: 'center',
|
|
195
|
+
marginRight: 12
|
|
196
|
+
},
|
|
197
|
+
firstPosition: {
|
|
198
|
+
backgroundColor: '#D69516' // '#FFD700'
|
|
199
|
+
},
|
|
200
|
+
secondPosition: {
|
|
201
|
+
backgroundColor: '#3E3E3E' // '#C0C0C0'
|
|
202
|
+
},
|
|
203
|
+
thirdPosition: {
|
|
204
|
+
backgroundColor: '#583B0F' // '#CD7F32'
|
|
205
|
+
},
|
|
206
|
+
iconWrapper: {
|
|
207
|
+
flexDirection: 'row',
|
|
208
|
+
alignItems: 'center',
|
|
209
|
+
marginLeft: 12
|
|
210
|
+
},
|
|
211
|
+
// Utilities
|
|
212
|
+
fullView: {
|
|
213
|
+
flex: 1
|
|
214
|
+
},
|
|
215
|
+
// Header
|
|
216
|
+
header: {
|
|
217
|
+
flexDirection: 'row',
|
|
218
|
+
alignItems: 'center',
|
|
219
|
+
justifyContent: 'space-between',
|
|
220
|
+
marginTop: 24,
|
|
221
|
+
marginHorizontal: 24
|
|
222
|
+
},
|
|
223
|
+
headerControls: {
|
|
224
|
+
flexDirection: 'row',
|
|
225
|
+
alignItems: 'center',
|
|
226
|
+
flexShrink: 1
|
|
227
|
+
},
|
|
228
|
+
headerText: {
|
|
229
|
+
fontSize: 20,
|
|
230
|
+
lineHeight: 24,
|
|
231
|
+
letterSpacing: 0.15,
|
|
232
|
+
marginRight: 12
|
|
233
|
+
},
|
|
234
|
+
closeIconHitSlop: {
|
|
235
|
+
bottom: 16,
|
|
236
|
+
left: 16,
|
|
237
|
+
right: 16,
|
|
238
|
+
top: 16
|
|
239
|
+
},
|
|
240
|
+
backIcon: {
|
|
241
|
+
marginRight: 8
|
|
242
|
+
},
|
|
243
|
+
// Divider
|
|
244
|
+
halfDivider: {
|
|
245
|
+
marginHorizontal: 24,
|
|
246
|
+
marginVertical: 0,
|
|
247
|
+
marginTop: 24,
|
|
248
|
+
width: undefined
|
|
249
|
+
},
|
|
250
|
+
divider: {
|
|
251
|
+
height: 1,
|
|
252
|
+
width: '100%'
|
|
253
|
+
},
|
|
254
|
+
viewAllBtn: {
|
|
255
|
+
flexDirection: 'row',
|
|
256
|
+
alignItems: 'center',
|
|
257
|
+
justifyContent: 'flex-end',
|
|
258
|
+
paddingVertical: 12,
|
|
259
|
+
paddingHorizontal: 16
|
|
260
|
+
},
|
|
261
|
+
leaderboardEntry: {
|
|
262
|
+
marginBottom: 16,
|
|
263
|
+
marginHorizontal: 16
|
|
264
|
+
},
|
|
265
|
+
entriesCard: {
|
|
266
|
+
paddingTop: 12,
|
|
267
|
+
borderRadius: 8
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
//# sourceMappingURL=QuizLeaderboardScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Text","StyleSheet","ScrollView","View","Keyboard","TouchableOpacity","useDispatch","useSelector","useHMSRoomStyleSheet","popFromNavigationStack","pushToNavigationStack","BottomSheet","ChevronIcon","CloseIcon","PollAndQuizzStateLabel","LeaderboardEntry","CreatePollStages","QuizLeaderboardSummary","useFetchLeaderboardResponse","useLeaderboardSummaryData","QuizLeaderboardScreen","currentIdx","dismissModal","unmountScreenWithAnimation","_selectedPoll$questio","dispatch","selectedPoll","state","pollsData","polls","selectedPollId","headerTitle","_pollsData$polls$poll","title","hmsRoomStyles","theme","typography","regularHighText","color","palette","on_surface_high","fontFamily","font_family","regularMediumText","on_surface_medium","semiBoldMediumText","semiBoldHighText","headerText","container","backgroundColor","surface_dim","summaryContainer","surface_default","entriesCard","divider","border_bright","handleBackPress","dismiss","handleClosePress","viewAllLeaderboardEntries","QUIZ_LEADERBOARD_ENTRIES","leaderboardData","pollId","leaderboardEntries","entries","summaryData","totalPoints","questions","reduce","acc","curr","weight","createElement","style","styles","fullView","header","headerControls","onPress","hitSlop","closeIconHitSlop","backIcon","direction","numberOfLines","flexShrink","marginLeft","Divider","halfDivider","contentContainer","contentContainerStyle","scrollViewContentContainer","data","Array","isArray","length","Fragment","normalText","smallerText","marginBottom16","map","entry","index","_selectedPoll$questio2","key","totalQuestions","leaderboardEntry","hasNext","viewAllBtn","smallText","marginRight","create","tinyText","fontSize","lineHeight","letterSpacing","marginBottom8","marginBottom","paddingHorizontal","flexGrow","paddingVertical","summaryWrapper","flexBasis","padding","borderRadius","position","width","height","textAlign","textAlignVertical","firstPosition","secondPosition","thirdPosition","iconWrapper","flexDirection","alignItems","flex","justifyContent","marginTop","marginHorizontal","bottom","left","right","top","marginVertical","undefined","paddingTop"],"sourceRoot":"../../../src","sources":["components/QuizLeaderboardScreen.tsx"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,IAAI,EACJC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,QACX,cAAc;AACrB,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AAEtD,SAASC,oBAAoB,QAAQ,eAAe;AAEpD,SACEC,sBAAsB,EACtBC,qBAAqB,QAChB,kBAAkB;AACzB,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,WAAW,EAAEC,SAAS,QAAQ,UAAU;AACjD,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,gBAAgB,QAAQ,sBAAsB;AACvD,SAASC,sBAAsB,QAAQ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