@tinyweb_dev/oe-exam-sdk 0.1.3 → 0.1.4

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 (289) hide show
  1. package/README.md +58 -4
  2. package/dist/api/contest-rooms.d.ts +13 -0
  3. package/dist/api/contest-rooms.js +1 -0
  4. package/dist/api/contest-rooms.types.d.ts +47 -0
  5. package/dist/api/contest-rooms.types.js +1 -0
  6. package/dist/api/exam-entry.d.ts +14 -0
  7. package/dist/api/exam-entry.js +1 -0
  8. package/dist/api/exam-entry.types.d.ts +93 -0
  9. package/dist/api/exam-entry.types.js +1 -0
  10. package/dist/api/index.d.ts +2 -0
  11. package/dist/api/index.js +1 -1
  12. package/dist/components/exams/entry/EntryRestartDialog.d.ts +12 -0
  13. package/dist/components/exams/entry/EntryRestartDialog.js +1 -0
  14. package/dist/components/exams/entry/StudentExamEntryPageContainer.d.ts +31 -0
  15. package/dist/components/exams/entry/StudentExamEntryPageContainer.js +1 -0
  16. package/dist/components/exams/entry/exam-entry.states.d.ts +22 -0
  17. package/dist/components/exams/entry/exam-entry.states.js +1 -0
  18. package/dist/components/exams/entry/exam-entry.utils.d.ts +16 -0
  19. package/dist/components/exams/entry/exam-entry.utils.js +1 -0
  20. package/dist/components/exams/entry/fullscreen-loading.d.ts +5 -0
  21. package/dist/components/exams/entry/fullscreen-loading.js +1 -0
  22. package/dist/components/exams/entry/index.d.ts +7 -0
  23. package/dist/components/exams/entry/index.js +1 -0
  24. package/dist/components/exams/index.d.ts +8 -0
  25. package/dist/components/exams/index.js +1 -1
  26. package/dist/components/exams/rooms/StudentContestRoomsPageContainer.d.ts +18 -0
  27. package/dist/components/exams/rooms/StudentContestRoomsPageContainer.js +1 -0
  28. package/dist/components/exams/rooms/contest-rooms.utils.d.ts +32 -0
  29. package/dist/components/exams/rooms/contest-rooms.utils.js +1 -0
  30. package/dist/components/exams/rooms/index.d.ts +3 -0
  31. package/dist/components/exams/rooms/index.js +1 -0
  32. package/dist/components/exams/take/ExamTakingApiContext.d.ts +10 -0
  33. package/dist/components/exams/take/ExamTakingApiContext.js +1 -0
  34. package/dist/components/exams/take/ExamTakingPageContainer.d.ts +28 -4
  35. package/dist/components/exams/take/ExamTakingPageContainer.js +1 -1
  36. package/dist/components/exams/take/components/QuestionRenderer.d.ts +25 -0
  37. package/dist/components/exams/take/components/QuestionRenderer.js +1 -0
  38. package/dist/components/exams/take/components/index.d.ts +10 -0
  39. package/dist/components/exams/take/components/index.js +1 -0
  40. package/dist/components/exams/take/components/question-renderers/ArticlesViewer.d.ts +7 -0
  41. package/dist/components/exams/take/components/question-renderers/ArticlesViewer.js +1 -0
  42. package/dist/components/exams/take/components/question-renderers/MoversAnswerTheQuestionRenderer.d.ts +22 -0
  43. package/dist/components/exams/take/components/question-renderers/MoversAnswerTheQuestionRenderer.js +1 -0
  44. package/dist/components/exams/take/components/question-renderers/MoversChooseAdjectiveRenderer.d.ts +14 -0
  45. package/dist/components/exams/take/components/question-renderers/MoversChooseAdjectiveRenderer.js +1 -0
  46. package/dist/components/exams/take/components/question-renderers/MoversChooseBestAnswerRenderer.d.ts +2 -0
  47. package/dist/components/exams/take/components/question-renderers/MoversChooseBestAnswerRenderer.js +1 -0
  48. package/dist/components/exams/take/components/question-renderers/MoversColoringRenderer.d.ts +3 -0
  49. package/dist/components/exams/take/components/question-renderers/MoversColoringRenderer.js +1 -0
  50. package/dist/components/exams/take/components/question-renderers/MoversFillWordHintRenderer.d.ts +2 -0
  51. package/dist/components/exams/take/components/question-renderers/MoversFillWordHintRenderer.js +1 -0
  52. package/dist/components/exams/take/components/question-renderers/MoversGridFillRenderer.d.ts +2 -0
  53. package/dist/components/exams/take/components/question-renderers/MoversGridFillRenderer.js +1 -0
  54. package/dist/components/exams/take/components/question-renderers/MoversLabelThePictureRenderer.d.ts +2 -0
  55. package/dist/components/exams/take/components/question-renderers/MoversLabelThePictureRenderer.js +1 -0
  56. package/dist/components/exams/take/components/question-renderers/MoversListenAndWriteRenderer.d.ts +21 -0
  57. package/dist/components/exams/take/components/question-renderers/MoversListenAndWriteRenderer.js +1 -0
  58. package/dist/components/exams/take/components/question-renderers/MoversMatchByWritingAnswerRenderer.d.ts +19 -0
  59. package/dist/components/exams/take/components/question-renderers/MoversMatchByWritingAnswerRenderer.js +1 -0
  60. package/dist/components/exams/take/components/question-renderers/MoversPictureChooseRenderer.d.ts +2 -0
  61. package/dist/components/exams/take/components/question-renderers/MoversPictureChooseRenderer.js +1 -0
  62. package/dist/components/exams/take/components/question-renderers/MoversPictureFillBlankChooseRenderer.d.ts +2 -0
  63. package/dist/components/exams/take/components/question-renderers/MoversPictureFillBlankChooseRenderer.js +1 -0
  64. package/dist/components/exams/take/components/question-renderers/MoversReadingPassageRenderer.d.ts +2 -0
  65. package/dist/components/exams/take/components/question-renderers/MoversReadingPassageRenderer.js +1 -0
  66. package/dist/components/exams/take/components/question-renderers/MoversTrueFalseRenderer.d.ts +20 -0
  67. package/dist/components/exams/take/components/question-renderers/MoversTrueFalseRenderer.js +1 -0
  68. package/dist/components/exams/take/components/question-renderers/MoversWordFillParagraphRenderer.d.ts +32 -0
  69. package/dist/components/exams/take/components/question-renderers/MoversWordFillParagraphRenderer.js +1 -0
  70. package/dist/components/exams/take/components/question-renderers/MoversWordFillStructuredFormRenderer.d.ts +18 -0
  71. package/dist/components/exams/take/components/question-renderers/MoversWordFillStructuredFormRenderer.js +1 -0
  72. package/dist/components/exams/take/components/question-renderers/MoversWordOrderingRenderer.d.ts +19 -0
  73. package/dist/components/exams/take/components/question-renderers/MoversWordOrderingRenderer.js +1 -0
  74. package/dist/components/exams/take/components/question-renderers/MoversWriteSentencesRenderer.d.ts +22 -0
  75. package/dist/components/exams/take/components/question-renderers/MoversWriteSentencesRenderer.js +1 -0
  76. package/dist/components/exams/take/components/question-renderers/MoversWritingRenderer.d.ts +18 -0
  77. package/dist/components/exams/take/components/question-renderers/MoversWritingRenderer.js +1 -0
  78. package/dist/components/exams/take/components/question-renderers/index.d.ts +19 -0
  79. package/dist/components/exams/take/components/question-renderers/index.js +1 -0
  80. package/dist/components/exams/take/components/speaking/FindObjectInPicture.module.css +133 -0
  81. package/dist/components/exams/take/components/speaking/SpeakingAudioPlayer.d.ts +9 -0
  82. package/dist/components/exams/take/components/speaking/SpeakingAudioPlayer.js +1 -0
  83. package/dist/components/exams/take/components/speaking/SpeakingCompareImages.module.css +153 -0
  84. package/dist/components/exams/take/components/speaking/SpeakingContentFrame.d.ts +7 -0
  85. package/dist/components/exams/take/components/speaking/SpeakingContentFrame.js +1 -0
  86. package/dist/components/exams/take/components/speaking/SpeakingDragObjects.module.css +238 -0
  87. package/dist/components/exams/take/components/speaking/SpeakingExamLayout.d.ts +27 -0
  88. package/dist/components/exams/take/components/speaking/SpeakingExamLayout.js +1 -0
  89. package/dist/components/exams/take/components/speaking/SpeakingHeader.d.ts +6 -0
  90. package/dist/components/exams/take/components/speaking/SpeakingHeader.js +1 -0
  91. package/dist/components/exams/take/components/speaking/SpeakingInfoExchange.module.css +193 -0
  92. package/dist/components/exams/take/components/speaking/SpeakingInfoExchangeSummerSky.module.css +238 -0
  93. package/dist/components/exams/take/components/speaking/SpeakingInstructionBar.d.ts +5 -0
  94. package/dist/components/exams/take/components/speaking/SpeakingInstructionBar.js +1 -0
  95. package/dist/components/exams/take/components/speaking/SpeakingMicButton.d.ts +14 -0
  96. package/dist/components/exams/take/components/speaking/SpeakingMicButton.js +1 -0
  97. package/dist/components/exams/take/components/speaking/SpeakingNavButton.d.ts +7 -0
  98. package/dist/components/exams/take/components/speaking/SpeakingNavButton.js +1 -0
  99. package/dist/components/exams/take/components/speaking/SpeakingPartBadge.d.ts +6 -0
  100. package/dist/components/exams/take/components/speaking/SpeakingPartBadge.js +1 -0
  101. package/dist/components/exams/take/components/speaking/SpeakingReadDisplayedContent.module.css +115 -0
  102. package/dist/components/exams/take/components/speaking/SpeakingRecordingPreview.d.ts +11 -0
  103. package/dist/components/exams/take/components/speaking/SpeakingRecordingPreview.js +1 -0
  104. package/dist/components/exams/take/components/speaking/SpeakingReportErrorButton.d.ts +1 -0
  105. package/dist/components/exams/take/components/speaking/SpeakingReportErrorButton.js +1 -0
  106. package/dist/components/exams/take/components/speaking/SpeakingStoryImages.module.css +231 -0
  107. package/dist/components/exams/take/components/speaking/SpeakingVideoIntro.d.ts +13 -0
  108. package/dist/components/exams/take/components/speaking/SpeakingVideoIntro.js +1 -0
  109. package/dist/components/exams/take/components/speaking/index.d.ts +1 -0
  110. package/dist/components/exams/take/components/speaking/index.js +1 -0
  111. package/dist/components/exams/take/components/speaking/renderers/SpeakingChooseAnswerGroupRenderer.d.ts +16 -0
  112. package/dist/components/exams/take/components/speaking/renderers/SpeakingChooseAnswerGroupRenderer.js +1 -0
  113. package/dist/components/exams/take/components/speaking/renderers/SpeakingChooseObjectsRenderer.d.ts +16 -0
  114. package/dist/components/exams/take/components/speaking/renderers/SpeakingChooseObjectsRenderer.js +1 -0
  115. package/dist/components/exams/take/components/speaking/renderers/SpeakingCompareImagesRenderer.d.ts +17 -0
  116. package/dist/components/exams/take/components/speaking/renderers/SpeakingCompareImagesRenderer.js +1 -0
  117. package/dist/components/exams/take/components/speaking/renderers/SpeakingConversationRenderer.d.ts +16 -0
  118. package/dist/components/exams/take/components/speaking/renderers/SpeakingConversationRenderer.js +1 -0
  119. package/dist/components/exams/take/components/speaking/renderers/SpeakingCueCardRenderer.d.ts +17 -0
  120. package/dist/components/exams/take/components/speaking/renderers/SpeakingCueCardRenderer.js +1 -0
  121. package/dist/components/exams/take/components/speaking/renderers/SpeakingDescribeImageRenderer.d.ts +18 -0
  122. package/dist/components/exams/take/components/speaking/renderers/SpeakingDescribeImageRenderer.js +1 -0
  123. package/dist/components/exams/take/components/speaking/renderers/SpeakingDragObjectsRenderer.d.ts +16 -0
  124. package/dist/components/exams/take/components/speaking/renderers/SpeakingDragObjectsRenderer.js +1 -0
  125. package/dist/components/exams/take/components/speaking/renderers/SpeakingGNInterviewRenderer.d.ts +16 -0
  126. package/dist/components/exams/take/components/speaking/renderers/SpeakingGNInterviewRenderer.js +1 -0
  127. package/dist/components/exams/take/components/speaking/renderers/SpeakingInfoExchangeRenderer.d.ts +16 -0
  128. package/dist/components/exams/take/components/speaking/renderers/SpeakingInfoExchangeRenderer.js +1 -0
  129. package/dist/components/exams/take/components/speaking/renderers/SpeakingListenAndSpeakAnswerRenderer.d.ts +16 -0
  130. package/dist/components/exams/take/components/speaking/renderers/SpeakingListenAndSpeakAnswerRenderer.js +1 -0
  131. package/dist/components/exams/take/components/speaking/renderers/SpeakingOddOneOutRenderer.d.ts +16 -0
  132. package/dist/components/exams/take/components/speaking/renderers/SpeakingOddOneOutRenderer.js +1 -0
  133. package/dist/components/exams/take/components/speaking/renderers/SpeakingQuestionListRenderer.d.ts +26 -0
  134. package/dist/components/exams/take/components/speaking/renderers/SpeakingQuestionListRenderer.js +1 -0
  135. package/dist/components/exams/take/components/speaking/renderers/SpeakingQuestionRenderer.d.ts +32 -0
  136. package/dist/components/exams/take/components/speaking/renderers/SpeakingQuestionRenderer.js +1 -0
  137. package/dist/components/exams/take/components/speaking/renderers/SpeakingReadDisplayedContentRenderer.d.ts +34 -0
  138. package/dist/components/exams/take/components/speaking/renderers/SpeakingReadDisplayedContentRenderer.js +1 -0
  139. package/dist/components/exams/take/components/speaking/renderers/SpeakingSpontaneousQARenderer.d.ts +17 -0
  140. package/dist/components/exams/take/components/speaking/renderers/SpeakingSpontaneousQARenderer.js +1 -0
  141. package/dist/components/exams/take/components/speaking/renderers/SpeakingStoryImagesRenderer.d.ts +17 -0
  142. package/dist/components/exams/take/components/speaking/renderers/SpeakingStoryImagesRenderer.js +1 -0
  143. package/dist/components/exams/take/components/speaking/renderers/index.d.ts +13 -0
  144. package/dist/components/exams/take/components/speaking/renderers/index.js +1 -0
  145. package/dist/components/exams/take/hooks/index.d.ts +2 -0
  146. package/dist/components/exams/take/hooks/index.js +1 -0
  147. package/dist/components/exams/take/hooks/useAnswerAutosave.d.ts +27 -0
  148. package/dist/components/exams/take/hooks/useAnswerAutosave.js +1 -0
  149. package/dist/components/exams/take/hooks/useAttemptSubmit.d.ts +29 -0
  150. package/dist/components/exams/take/hooks/useAttemptSubmit.js +1 -0
  151. package/dist/components/exams/take/hooks/useAutoSave.d.ts +20 -0
  152. package/dist/components/exams/take/hooks/useAutoSave.js +1 -0
  153. package/dist/components/exams/take/hooks/useExamCountdown.d.ts +22 -0
  154. package/dist/components/exams/take/hooks/useExamCountdown.js +1 -0
  155. package/dist/components/exams/take/hooks/useExamTimer.d.ts +21 -0
  156. package/dist/components/exams/take/hooks/useExamTimer.js +1 -0
  157. package/dist/components/exams/take/hooks/useProctoringCamera.d.ts +19 -0
  158. package/dist/components/exams/take/hooks/useProctoringCamera.js +1 -0
  159. package/dist/components/exams/take/hooks/useProctoringSnapshot.d.ts +25 -0
  160. package/dist/components/exams/take/hooks/useProctoringSnapshot.js +1 -0
  161. package/dist/components/exams/take/hooks/useSpeakingConversationAudio.d.ts +19 -0
  162. package/dist/components/exams/take/hooks/useSpeakingConversationAudio.js +1 -0
  163. package/dist/components/exams/take/hooks/useSpeakingNavigation.d.ts +37 -0
  164. package/dist/components/exams/take/hooks/useSpeakingNavigation.js +1 -0
  165. package/dist/components/exams/take/hooks/useSpeakingRecorder.d.ts +45 -5
  166. package/dist/components/exams/take/hooks/useSpeakingRecorder.js +1 -1
  167. package/dist/components/exams/take/hooks/useSpeakingRendererSetup.d.ts +39 -0
  168. package/dist/components/exams/take/hooks/useSpeakingRendererSetup.js +1 -0
  169. package/dist/components/exams/take/hooks/useToeicAudio.d.ts +17 -0
  170. package/dist/components/exams/take/hooks/useToeicAudio.js +1 -0
  171. package/dist/components/exams/take/index.d.ts +9 -1
  172. package/dist/components/exams/take/index.js +1 -1
  173. package/dist/components/exams/take/types/speaking-cue-card.types.d.ts +10 -0
  174. package/dist/components/exams/take/types/speaking-cue-card.types.js +1 -0
  175. package/dist/components/exams/take/types/speaking.types.d.ts +153 -0
  176. package/dist/components/exams/take/types/speaking.types.js +1 -0
  177. package/dist/components/exams/take/types.d.ts +286 -1
  178. package/dist/components/exams/take/utils/answer-transformers.d.ts +26 -0
  179. package/dist/components/exams/take/utils/answer-transformers.js +1 -0
  180. package/dist/components/exams/take/utils/coloring-assignments.d.ts +5 -0
  181. package/dist/components/exams/take/utils/coloring-assignments.js +1 -0
  182. package/dist/components/exams/take/utils/question-transformers.d.ts +362 -0
  183. package/dist/components/exams/take/utils/question-transformers.js +1 -0
  184. package/dist/components/features/exam-entry/entry-state-cards.d.ts +19 -0
  185. package/dist/components/features/exam-entry/entry-state-cards.js +1 -0
  186. package/dist/components/features/exam-entry/index.d.ts +2 -0
  187. package/dist/components/features/exam-entry/index.js +1 -0
  188. package/dist/components/features/exam-entry/themed/CambridgeYleWaitingRoom.d.ts +12 -0
  189. package/dist/components/features/exam-entry/themed/CambridgeYleWaitingRoom.js +1 -0
  190. package/dist/components/features/exam-entry/themed/ThemedWaitingRoom.d.ts +14 -0
  191. package/dist/components/features/exam-entry/themed/ThemedWaitingRoom.js +1 -0
  192. package/dist/components/features/exam-entry/themed/ToeicWaitingRoom.d.ts +16 -0
  193. package/dist/components/features/exam-entry/themed/ToeicWaitingRoom.js +1 -0
  194. package/dist/components/features/exam-entry/themed/components/CloseButton.d.ts +9 -0
  195. package/dist/components/features/exam-entry/themed/components/CloseButton.js +1 -0
  196. package/dist/components/features/exam-entry/themed/components/ExamInfoPanel.d.ts +13 -0
  197. package/dist/components/features/exam-entry/themed/components/ExamInfoPanel.js +1 -0
  198. package/dist/components/features/exam-entry/themed/components/ModeSelector.d.ts +7 -0
  199. package/dist/components/features/exam-entry/themed/components/ModeSelector.js +1 -0
  200. package/dist/components/features/exam-entry/themed/components/StartButton.d.ts +11 -0
  201. package/dist/components/features/exam-entry/themed/components/StartButton.js +1 -0
  202. package/dist/components/features/exam-entry/themed/components/index.d.ts +4 -0
  203. package/dist/components/features/exam-entry/themed/components/index.js +1 -0
  204. package/dist/components/features/exam-entry/themed/index.d.ts +1 -0
  205. package/dist/components/features/exam-entry/themed/index.js +1 -0
  206. package/dist/components/results/ResultReviewPageContainer.d.ts +3 -1
  207. package/dist/components/results/ResultReviewPageContainer.js +1 -1
  208. package/dist/components/results/hooks/useResultReviewPolling.d.ts +27 -0
  209. package/dist/components/results/hooks/useResultReviewPolling.js +1 -0
  210. package/dist/components/results/index.d.ts +3 -0
  211. package/dist/components/results/index.js +1 -1
  212. package/dist/components/results/review-status.utils.d.ts +12 -0
  213. package/dist/components/results/review-status.utils.js +1 -0
  214. package/dist/components/shared/audio/SpeakingAudioPlayer.d.ts +12 -0
  215. package/dist/components/shared/audio/SpeakingAudioPlayer.js +1 -0
  216. package/dist/components/shared/audio/SpeakingAudioPlayer.module.css +115 -0
  217. package/dist/components/shared/audio/assets/fr-image-part1-border.png +0 -0
  218. package/dist/components/shared/audio/assets/ic-speaker.webp +0 -0
  219. package/dist/components/themes/english-certification/EnglishCertificationAudioPlayer.d.ts +11 -3
  220. package/dist/components/themes/english-certification/EnglishCertificationAudioPlayer.js +1 -1
  221. package/dist/components/themes/english-certification/EnglishCertificationQuestionRenderer.d.ts +5 -1
  222. package/dist/components/themes/english-certification/EnglishCertificationQuestionRenderer.js +1 -1
  223. package/dist/components/themes/index.d.ts +11 -0
  224. package/dist/components/themes/index.js +1 -1
  225. package/dist/components/themes/spaceship/SpaceshipAudioPlayer.d.ts +8 -0
  226. package/dist/components/themes/spaceship/SpaceshipAudioPlayer.js +1 -0
  227. package/dist/components/themes/spaceship/SpaceshipLayout.d.ts +2 -0
  228. package/dist/components/themes/spaceship/SpaceshipLayout.js +1 -0
  229. package/dist/components/themes/spaceship/assets/images/X-sunset.png +0 -0
  230. package/dist/components/themes/spaceship/assets/images/X.webp +0 -0
  231. package/dist/components/themes/spaceship/assets/images/audio-bar.webp +0 -0
  232. package/dist/components/themes/spaceship/assets/images/background.webp +0 -0
  233. package/dist/components/themes/spaceship/assets/images/bg_sunset.png +0 -0
  234. package/dist/components/themes/spaceship/assets/images/big-blue-badge-sunset.png +0 -0
  235. package/dist/components/themes/spaceship/assets/images/big-blue-badge.png +0 -0
  236. package/dist/components/themes/spaceship/assets/images/big-blue-badge.webp +0 -0
  237. package/dist/components/themes/spaceship/assets/images/bingo.webp +0 -0
  238. package/dist/components/themes/spaceship/assets/images/blue-badge-sunset.png +0 -0
  239. package/dist/components/themes/spaceship/assets/images/blue-badge.png +0 -0
  240. package/dist/components/themes/spaceship/assets/images/blue-wrapper-sunset.png +0 -0
  241. package/dist/components/themes/spaceship/assets/images/blue-wrapper.webp +0 -0
  242. package/dist/components/themes/spaceship/assets/images/board_red.png +0 -0
  243. package/dist/components/themes/spaceship/assets/images/button_feedback_vi.png +0 -0
  244. package/dist/components/themes/spaceship/assets/images/circle-btn-right-sunset.png +0 -0
  245. package/dist/components/themes/spaceship/assets/images/circle-btn-right.png +0 -0
  246. package/dist/components/themes/spaceship/assets/images/circle-btn-sunset.png +0 -0
  247. package/dist/components/themes/spaceship/assets/images/circle-btn.webp +0 -0
  248. package/dist/components/themes/spaceship/assets/images/focus-vector.webp +0 -0
  249. package/dist/components/themes/spaceship/assets/images/head-phone_red.png +0 -0
  250. package/dist/components/themes/spaceship/assets/images/ic-mute-sunset.png +0 -0
  251. package/dist/components/themes/spaceship/assets/images/ic-mute.png +0 -0
  252. package/dist/components/themes/spaceship/assets/images/ic-play-sunset.png +0 -0
  253. package/dist/components/themes/spaceship/assets/images/ic-play-violet.webp +0 -0
  254. package/dist/components/themes/spaceship/assets/images/ic-play.webp +0 -0
  255. package/dist/components/themes/spaceship/assets/images/micro.png +0 -0
  256. package/dist/components/themes/spaceship/assets/images/next-small.webp +0 -0
  257. package/dist/components/themes/spaceship/assets/images/next-sunset.png +0 -0
  258. package/dist/components/themes/spaceship/assets/images/next.webp +0 -0
  259. package/dist/components/themes/spaceship/assets/images/purple-circle.webp +0 -0
  260. package/dist/components/themes/spaceship/assets/images/question-badge-sunset.png +0 -0
  261. package/dist/components/themes/spaceship/assets/images/question-badge.webp +0 -0
  262. package/dist/components/themes/spaceship/assets/images/red-badge-sunset.png +0 -0
  263. package/dist/components/themes/spaceship/assets/images/red-badge.webp +0 -0
  264. package/dist/components/themes/spaceship/assets/images/red-wrapper-sunset.png +0 -0
  265. package/dist/components/themes/spaceship/assets/images/red-wrapper.webp +0 -0
  266. package/dist/components/themes/spaceship/assets/images/robot-avatar.png +0 -0
  267. package/dist/components/themes/spaceship/assets/images/sound_red.png +0 -0
  268. package/dist/components/themes/spaceship/assets/images/student-avatar.png +0 -0
  269. package/dist/components/themes/spaceship/assets/images/teacher-play-sunset.png +0 -0
  270. package/dist/components/themes/spaceship/assets/images/teacher-play.webp +0 -0
  271. package/dist/components/themes/spaceship/assets/images/timer-badge.png +0 -0
  272. package/dist/components/themes/spaceship/assets/styles/SpaceshipLayout.module.css +347 -0
  273. package/dist/components/themes/spaceship/assets/styles/SpaceshipWaitingRoom.module.css +395 -0
  274. package/dist/components/ui/badge.d.ts +1 -1
  275. package/dist/index.d.ts +4 -4
  276. package/dist/index.js +1 -1
  277. package/dist/shared/lib/stores/examTakingStore.d.ts +54 -0
  278. package/dist/shared/lib/stores/examTakingStore.js +1 -0
  279. package/dist/shared/lib/stores/gradingTransientStore.d.ts +23 -0
  280. package/dist/shared/lib/stores/gradingTransientStore.js +1 -0
  281. package/dist/shared/lib/themes/config/starters.config.d.ts +3 -0
  282. package/dist/shared/lib/themes/config/starters.config.js +1 -0
  283. package/dist/shared/lib/themes/index.d.ts +18 -0
  284. package/dist/shared/lib/themes/index.js +1 -0
  285. package/dist/shared/lib/themes/types.d.ts +39 -0
  286. package/dist/shared/lib/themes/types.js +1 -0
  287. package/dist/shared/lib/toast.d.ts +19 -0
  288. package/dist/shared/lib/toast.js +1 -0
  289. package/package.json +10 -2
@@ -1 +1,286 @@
1
- export type { ExamTakingAnswerValue, ExamTakingAttempt, ExamTakingQuestion, ExamTakingQuestionsResult, ExamTakingSdkApi, ExamTakingTemplatePart, SaveExamTakingAnswersInput } from '../../../api/exam-taking';
1
+ /**
2
+ * Types for Movers Exam UI
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ export interface FillBlankQuestion {
6
+ id: string;
7
+ questionNumber: number;
8
+ textBefore: string;
9
+ textAfter: string;
10
+ verbHint?: string;
11
+ correctAnswer?: string;
12
+ imageUrl?: string;
13
+ hints?: string[];
14
+ isExample?: boolean;
15
+ }
16
+ export interface MoversListenAndWriteRendererProps {
17
+ partNumber: number;
18
+ partName?: string;
19
+ questionCount: number;
20
+ instruction: string;
21
+ imageUrl?: string;
22
+ audioUrl?: string;
23
+ title: string;
24
+ exampleText?: string;
25
+ exampleHighlight?: string;
26
+ questions: FillBlankQuestion[];
27
+ answers: Record<string, string>;
28
+ onAnswerChange: (questionId: string, value: string) => void;
29
+ isReviewMode?: boolean;
30
+ showHints?: boolean;
31
+ }
32
+ export interface MoversExamLayoutProps {
33
+ children: ReactNode;
34
+ headerProps: {
35
+ remainingSeconds: number;
36
+ totalQuestions: number;
37
+ answeredCount: number;
38
+ progress: number;
39
+ };
40
+ onPrevious: () => void;
41
+ onNext: () => void;
42
+ isFirstQuestion: boolean;
43
+ isLastQuestion: boolean;
44
+ }
45
+ export interface MoversQuestionCardProps {
46
+ children: ReactNode;
47
+ className?: string;
48
+ }
49
+ export interface MoversPartBannerProps {
50
+ partNumber: number;
51
+ questionCount: number;
52
+ partName?: string;
53
+ }
54
+ export interface MoversInstructionBannerProps {
55
+ instruction: string;
56
+ }
57
+ export interface MoversAudioPlayerProps {
58
+ audioUrl: string;
59
+ }
60
+ export interface MoversExampleTextProps {
61
+ text: string;
62
+ highlight?: string;
63
+ }
64
+ export interface WritingQuestion {
65
+ id: string;
66
+ partNumber: number;
67
+ prompt: string;
68
+ requirements?: string[];
69
+ minWords?: number;
70
+ maxWords?: number;
71
+ }
72
+ export interface MoversWritingRendererProps {
73
+ partNumber: number;
74
+ prompt: string;
75
+ requirements?: string[];
76
+ minWords?: number;
77
+ maxWords?: number;
78
+ answer: string;
79
+ onAnswerChange: (value: string) => void;
80
+ isReviewMode?: boolean;
81
+ }
82
+ /** Hint item - có thể là color-only, text-only, hoặc cả hai */
83
+ export interface ColoringHintItem {
84
+ id: string;
85
+ color?: string;
86
+ label?: string;
87
+ }
88
+ /** Region trên image để drop hint */
89
+ export interface ColoringRegion {
90
+ id: string;
91
+ x: number;
92
+ y: number;
93
+ width: number;
94
+ height: number;
95
+ correctHintId: string;
96
+ }
97
+ /** Props cho MoversColoringRenderer */
98
+ export interface MoversColoringRendererProps {
99
+ partNumber: number;
100
+ partName?: string;
101
+ questionCount: number;
102
+ instruction: string;
103
+ instructions?: string[];
104
+ hasExample?: boolean;
105
+ imageUrl: string;
106
+ audioUrl?: string;
107
+ hintItems: ColoringHintItem[];
108
+ regions: ColoringRegion[];
109
+ assignments: Record<string, string>;
110
+ onAssignmentChange: (regionId: string, hintItemId: string | null) => void;
111
+ isReviewMode?: boolean;
112
+ }
113
+ export interface ChooseBestAnswerOption {
114
+ id: string;
115
+ label: string;
116
+ text: string;
117
+ }
118
+ export interface ChooseBestAnswerQuestion {
119
+ id: string;
120
+ questionNumber: number;
121
+ questionText: string;
122
+ options: ChooseBestAnswerOption[];
123
+ correctOptionId?: string;
124
+ correctOptionIds?: string[];
125
+ imageUrl?: string;
126
+ optionType?: 'text' | 'image';
127
+ multipleAnswers?: boolean;
128
+ explanation?: string;
129
+ }
130
+ export interface ChooseBestAnswerExample {
131
+ questionNumber: number;
132
+ questionText: string;
133
+ options: ChooseBestAnswerOption[];
134
+ correctOptionId: string;
135
+ optionType?: 'text' | 'image';
136
+ imageUrl?: string;
137
+ }
138
+ export interface MoversChooseBestAnswerRendererProps {
139
+ partNumber: number;
140
+ partName?: string;
141
+ questionCount: number;
142
+ instruction: string;
143
+ imageUrl?: string;
144
+ groupTitle?: string;
145
+ groupContent?: string;
146
+ audioUrl?: string;
147
+ example?: ChooseBestAnswerExample;
148
+ questions: ChooseBestAnswerQuestion[];
149
+ answers: Record<string, string | string[]>;
150
+ onAnswerChange: (questionId: string, optionId: string | string[]) => void;
151
+ isReviewMode?: boolean;
152
+ articles?: ArticleItem[];
153
+ }
154
+ /** Article data for ARTICLES group type (e.g., KFS Reading Part 2) */
155
+ export interface ArticleItem {
156
+ name: string;
157
+ content: string;
158
+ imageUrl?: string;
159
+ }
160
+ export interface PictureChooseOption {
161
+ id: string;
162
+ label: string;
163
+ text: string;
164
+ }
165
+ export interface PictureChooseSubQuestion {
166
+ id: string;
167
+ questionNumber: number;
168
+ imageUrl: string;
169
+ questionText?: string;
170
+ options: PictureChooseOption[];
171
+ correctOptionId?: string;
172
+ }
173
+ export interface MoversPictureChooseRendererProps {
174
+ partNumber: number;
175
+ partName?: string;
176
+ questionCount: number;
177
+ instruction: string;
178
+ subQuestions: PictureChooseSubQuestion[];
179
+ answers: Record<string, string>;
180
+ onAnswerChange: (subQuestionId: string, optionId: string) => void;
181
+ isReviewMode?: boolean;
182
+ }
183
+ export interface PictureFillBlankOption {
184
+ id: string;
185
+ label: string;
186
+ text: string;
187
+ }
188
+ export interface PictureFillBlankSubQuestion {
189
+ id: string;
190
+ questionNumber: number;
191
+ imageUrl: string;
192
+ question: string;
193
+ options: PictureFillBlankOption[];
194
+ correctOptionId?: string;
195
+ }
196
+ export interface MoversPictureFillBlankChooseRendererProps {
197
+ partNumber: number;
198
+ partName?: string;
199
+ questionCount: number;
200
+ instruction: string;
201
+ subQuestions: PictureFillBlankSubQuestion[];
202
+ answers: Record<string, string>;
203
+ onAnswerChange: (subQuestionId: string, optionId: string) => void;
204
+ isReviewMode?: boolean;
205
+ }
206
+ export interface ReadingPassageOption {
207
+ id: string;
208
+ label: string;
209
+ text: string;
210
+ }
211
+ export interface ReadingPassageQuestion {
212
+ id: string;
213
+ questionNumber: number;
214
+ questionText: string;
215
+ options: ReadingPassageOption[];
216
+ correctOptionId?: string;
217
+ }
218
+ export interface MoversReadingPassageRendererProps {
219
+ partNumber: number;
220
+ partName?: string;
221
+ questionCount: number;
222
+ instruction: string;
223
+ passageTitle?: string;
224
+ passage: string;
225
+ passageImageUrl?: string;
226
+ questions: ReadingPassageQuestion[];
227
+ answers: Record<string, string>;
228
+ onAnswerChange: (questionId: string, optionId: string) => void;
229
+ isReviewMode?: boolean;
230
+ correctOptionIdMap?: Record<string, string>;
231
+ }
232
+ export interface LabelThePictureLabel {
233
+ id: string;
234
+ number: number;
235
+ correctAnswer?: string;
236
+ isPreFilled?: boolean;
237
+ }
238
+ export interface MoversLabelThePictureRendererProps {
239
+ partNumber: number;
240
+ partName?: string;
241
+ questionCount: number;
242
+ instruction: string;
243
+ imageUrl: string;
244
+ wordBank: string[];
245
+ labels: LabelThePictureLabel[];
246
+ answers: Record<string, string>;
247
+ onAnswerChange: (labelId: string, value: string) => void;
248
+ isReviewMode?: boolean;
249
+ }
250
+ export interface FillWordHintSubQuestion {
251
+ id: string;
252
+ questionNumber: number;
253
+ imageUrl: string;
254
+ word: string;
255
+ correctAnswer?: string;
256
+ blankIndex?: number;
257
+ }
258
+ export interface MoversFillWordHintRendererProps {
259
+ partNumber: number;
260
+ partName?: string;
261
+ questionCount: number;
262
+ instruction: string;
263
+ hintLetters: string[];
264
+ subQuestions: FillWordHintSubQuestion[];
265
+ answers: Record<string, string>;
266
+ onAnswerChange: (subQuestionId: string, value: string) => void;
267
+ isReviewMode?: boolean;
268
+ }
269
+ export interface GridCellAnswer {
270
+ correctAnswer: string;
271
+ }
272
+ export interface MoversGridFillRendererProps {
273
+ partNumber: number;
274
+ partName?: string;
275
+ questionCount: number;
276
+ instruction: string;
277
+ grid: (string | null)[][];
278
+ rows: number;
279
+ columns: number;
280
+ cellAnswers: Record<string, GridCellAnswer>;
281
+ answers: Record<string, string>;
282
+ onAnswerChange: (cellKey: string, value: string) => void;
283
+ isReviewMode?: boolean;
284
+ caseSensitive?: boolean;
285
+ disabledCells?: string[];
286
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Answer Transformers - Transform frontend answers to API format
3
+ *
4
+ * Frontend stores answers with synthetic IDs for UI convenience.
5
+ * This module transforms them to the format backend expects.
6
+ *
7
+ * Backend grading service expects:
8
+ * - Single choice: { answer: optionIndex } or { optionId: "uuid" }
9
+ * - Fill blank: { answer: "text" } or { answers: ["text1", "text2"] }
10
+ * - Matching: { pairs: [{ left: "id1", right: "id2" }] }
11
+ */
12
+ import type { SaveAnswerRequest } from '../../../../shared/types/student.types';
13
+ import type { QuestionPart } from './question-transformers';
14
+ /**
15
+ * Transform frontend answers to API format
16
+ *
17
+ * @param answers - Record of questionId -> answer from store
18
+ * @param parts - Question parts for context
19
+ * @returns Array of SaveAnswerRequest ready for API
20
+ */
21
+ export declare function transformAnswersForSubmission(answers: Record<string, any>, parts: QuestionPart[]): SaveAnswerRequest[];
22
+ /**
23
+ * Get all valid question IDs from parts
24
+ * Used to filter out invalid IDs before submission
25
+ */
26
+ export declare function getValidQuestionIds(parts: QuestionPart[]): Set<string>;
@@ -0,0 +1 @@
1
+ function n(n){const t=n.match(/-opt-(\d+)$/);return t?parseInt(t[1],10):0}function t(n){return"string"==typeof n&&n.includes("-opt-")}function e(n){return Array.isArray(n)&&n.every(n=>t(n))}function s(n){return"object"==typeof n&&null!==n&&!Array.isArray(n)&&t(n.optionId)}function o(n){return n.startsWith("sq-")||n.includes("-sq-")||n.includes("-blank-")}function r(n){return/^\d+-\d+$/.test(n)}function i(n){return n.startsWith("label-")}function u(n){return n.startsWith("region-")}function f(n,t){for(const n of t)if("READ_PASSAGE_AND_ANSWER_QUESTIONS"===n.questionType&&n.questions.length>0)return{parentId:n.questions[0].id,questionType:n.questionType};return null}function a(n){for(const t of n)if("FILL_MISSING_WORDS_IN_GRID"===t.questionType&&t.questions.length>0)return{parentId:t.questions[0].id,questionType:t.questionType};return null}function c(n){for(const t of n)if("LABEL_THE_PICTURE"===t.questionType&&t.questions.length>0)return{parentId:t.questions[0].id,questionType:t.questionType};return null}function p(n,t){for(const e of t)if(("READ_AND_COLOR_OBJECTS"===e.questionType||"IMAGE_OBJECT_MATCHING"===e.questionType)&&e.questions.length>0){const t=e.questions[0],s=t.content;if((s?.regions||s?.regionNodes||[]).some(t=>t.id===n))return{parentId:t.id,questionType:e.questionType}}return null}function d(n,t){for(const e of t)if("LOOK_PICTURE_FILL_WORD_HINT"===e.questionType)for(const t of e.questions){if(n.startsWith(`${t.id}-blank-`))return{parentId:t.id,questionType:e.questionType};const s=t.content;if(s?.subQuestions?.some(t=>t.id===n))return{parentId:t.id,questionType:e.questionType}}return null}function I(n,t){for(const e of t)for(const t of e.questions)if(t.id===n)return e.questionType;return null}function q(n,t){return"number"==typeof n||"string"==typeof n?{answer:n}:Array.isArray(n)?"WORD_FILL_PARAGRAPH"===t?{answers:n}:{answer:n}:"object"==typeof n&&null!==n?n:{answer:n}}export function transformAnswersForSubmission(l,y){const T=[],_=new Map,h=new Map,w=new Map,A=new Map,g=new Set;for(const n of y)for(const t of n.questions)"SPEAKING"===t.question_skill_type&&g.add(t.id);for(const[S,b]of Object.entries(l)){if(null==b||""===b)continue;if(g.has(S)&&"string"==typeof b)continue;if(r(S)){const n=a(y);n&&(h.has(n.parentId)||h.set(n.parentId,{}),h.get(n.parentId)[S]=String(b));continue}if(i(S)){const n=c(y);n&&(w.has(n.parentId)||w.set(n.parentId,{}),w.get(n.parentId)[S]=String(b));continue}if(u(S)){const n=p(S,y);n&&(A.has(n.parentId)||A.set(n.parentId,{}),A.get(n.parentId)[S]=String(b));continue}if(o(S)){let e=f(0,y);if(e||(e=d(S,y)),e){_.has(e.parentId)||_.set(e.parentId,{});const s=t(b)?n(b):b;_.get(e.parentId)[S]=s}continue}const l=I(S,y);let E;E=t(b)?q(n(b),l):e(b)?q(b.map(t=>n(t)),l):s(b)?q(n(b.optionId),l):q(b,l),T.push({questionId:S,answer:E})}for(const[n,t]of _){if(Object.keys(t).some(n=>n.includes("-blank-"))){const e=Object.entries(t).sort(([n],[t])=>{const e=n.match(/-blank-(\d+)$/),s=t.match(/-blank-(\d+)$/);return(e?parseInt(e[1],10):0)-(s?parseInt(s[1],10):0)}).map(([,n])=>n).join(", ");T.push({questionId:n,answer:{answer:e}})}else T.push({questionId:n,answer:{subAnswers:t}})}for(const[n,t]of h)T.push({questionId:n,answer:{answers:t}});for(const[n,t]of w)T.push({questionId:n,answer:{answers:t}});for(const[n,t]of A)T.push({questionId:n,answer:{answers:t}});return T}export function getValidQuestionIds(n){const t=new Set;for(const e of n)for(const n of e.questions)t.add(n.id);return t}
@@ -0,0 +1,5 @@
1
+ export interface ColoringHintItemLike {
2
+ id: string;
3
+ color?: string | null;
4
+ }
5
+ export declare function normalizeColoringAssignments(rawAssignments: unknown, hintItems: ColoringHintItemLike[]): Record<string, string>;
@@ -0,0 +1 @@
1
+ function t(t){return"object"==typeof t&&null!==t}export function normalizeColoringAssignments(n,r){if(!t(n))return{};const o={};return Object.entries(n).forEach(([n,i])=>{const e=function(n){if("string"==typeof n)return n;if(!t(n))return null;const r=["hintItemId","id","value","color"];for(const t of r){const r=n[t];if("string"==typeof r&&r.trim())return r}return null}(i);if(e){if(e.startsWith("#")){const t=r.find(t=>t.color===e);return void(t&&(o[n]=t.id))}o[n]=e}}),o}
@@ -0,0 +1,362 @@
1
+ /**
2
+ * Question Transformers - Transform API response to renderer props
3
+ *
4
+ * Maps backend question types to frontend renderer props.
5
+ * Each transformer handles specific question type data structure.
6
+ */
7
+ import type { FillBlankQuestion, ChooseBestAnswerQuestion, PictureChooseSubQuestion, PictureFillBlankSubQuestion, ReadingPassageQuestion, LabelThePictureLabel, FillWordHintSubQuestion, ColoringHintItem, ColoringRegion } from '../types';
8
+ export type QuestionType = 'FILL_IN_BLANK' | 'WRITE_CORRECT_VERB_FORM' | 'CHOOSE_THE_CORRECT_ANSWER' | 'CHOOSE_CORRECT_ADJECTIVE' | 'WRITE_A_SHORT_LETTER' | 'READ_AND_COLOR_OBJECTS' | 'LOOK_PICTURE_CHOOSE_CORRECT_ANSWER' | 'LOOK_PICTURE_FILL_BLANK_CHOOSE_ANSWER' | 'READ_PASSAGE_AND_ANSWER_QUESTIONS' | 'LABEL_THE_PICTURE' | 'LOOK_PICTURE_FILL_WORD_HINT' | 'FILL_MISSING_WORDS_IN_GRID' | 'IMAGE_OBJECT_MATCHING' | 'ANSWER_THE_QUESTION' | 'TRUE_FALSE' | 'WORD_ORDERING' | 'WORD_FILL_PARAGRAPH' | 'MATCH_BY_WRITING_ANSWER' | 'WRITE_SENTENCES' | 'WORD_FILL_STRUCTURED_FORM' | 'LISTEN_AND_CHOOSE_OBJECTS_IN_SCENE' | 'LISTEN_AND_CHOOSE_FROM_ANSWER_GROUP' | 'LISTEN_AND_DRAG_OBJECTS_INTO_SCENE' | 'LISTEN_AND_SPEAK_ANSWER' | 'LISTEN_AND_SPEAK_COMPARE_IMAGES' | 'LISTEN_AND_SPEAK_WITH_STORY_IMAGES' | 'LISTEN_AND_SPEAK_IMAGE_GROUP' | 'LISTEN_AND_SPEAK_ODD_ONE_OUT' | 'LISTEN_AND_SPEAK_QUESTION_LIST' | 'LISTEN_AND_SPEAK_INFO_EXCHANGE' | 'READ_DISPLAYED_CONTENT' | 'SPEAKING_DESCRIBE_IMAGE' | 'SPONTANEOUS_QA' | 'SPEAKING_CONVERSATION' | 'GN_SPEAKING_INTERVIEW' | 'SPEAKING_CUE_CARD';
9
+ export interface ApiQuestion {
10
+ id: string;
11
+ content: any;
12
+ is_example: boolean;
13
+ total_points: string;
14
+ question_type: QuestionType;
15
+ explanation: string;
16
+ difficult_level: string;
17
+ question_skill_type: string;
18
+ exam_id: string;
19
+ part_id: string;
20
+ part_no: number;
21
+ question_number: number;
22
+ correct_answer?: any;
23
+ audio_url?: string;
24
+ group_id?: string;
25
+ questionGroup?: {
26
+ id: string;
27
+ payload: {
28
+ passage?: string;
29
+ passageTitle?: string;
30
+ passageImageUrl?: string;
31
+ mainImageUrl?: string;
32
+ instructions?: string;
33
+ hintLetters?: string[];
34
+ [key: string]: any;
35
+ };
36
+ } | null;
37
+ }
38
+ export interface QuestionPart {
39
+ partId: string;
40
+ partNo: number;
41
+ questionType: QuestionType;
42
+ questions: ApiQuestion[];
43
+ name?: string;
44
+ instructions?: string;
45
+ audioUrl?: string;
46
+ templateOrder?: number;
47
+ category?: string;
48
+ /** Section-level metadata carried from the template when a part is split by sections. */
49
+ sectionId?: number;
50
+ isGroup?: boolean;
51
+ optionMode?: string;
52
+ optionCount?: number;
53
+ viewMode?: string;
54
+ defaultValue?: string[];
55
+ multipleAnswers?: boolean;
56
+ questionConfig?: string[];
57
+ wordBankConfig?: string[];
58
+ group?: TemplateGroupConfig;
59
+ /** Section list kept whole for IELTS Reading parts (DOCUMENT passage + mixed sub-sections). */
60
+ sections?: TemplateSection[];
61
+ /** Zero-based exam-order start index of this part/section (for question numbering). */
62
+ startIndex?: number;
63
+ endIndex?: number;
64
+ }
65
+ /** Nested template group payload ({ items, config, type }) from the API template. */
66
+ export interface TemplateGroupConfig {
67
+ items?: Array<{
68
+ number: number;
69
+ questionCount: number;
70
+ }>;
71
+ config?: string[];
72
+ type?: string;
73
+ }
74
+ /**
75
+ * Section within a template part (for parts with mixed question types)
76
+ * Used in Movers P8 (2 sections) and P11 (3 sections), and IELTS parts
77
+ * whose sections mix question types (e.g. SECTION 2 / Reading passages).
78
+ */
79
+ export interface TemplateSection {
80
+ name?: string;
81
+ sectionId?: number;
82
+ startIndex: number;
83
+ endIndex: number;
84
+ questionType: QuestionType;
85
+ questionCount: number;
86
+ viewMode?: string;
87
+ instructions?: string;
88
+ isGroup?: boolean;
89
+ optionMode?: string;
90
+ optionCount?: number;
91
+ defaultValue?: string[];
92
+ multipleAnswers?: boolean;
93
+ questionConfig?: string[];
94
+ wordBankConfig?: string[];
95
+ group?: TemplateGroupConfig;
96
+ }
97
+ /**
98
+ * Template part structure from exam.template.parts
99
+ */
100
+ export interface TemplatePart {
101
+ id: string | number;
102
+ name: string;
103
+ instructions?: string;
104
+ sections?: TemplateSection[];
105
+ audioUrl?: string;
106
+ category?: string;
107
+ }
108
+ /**
109
+ * Group questions by part_id AND questionGroup.id
110
+ * This ensures questions with different passages (different questionGroups)
111
+ * within the same part are properly separated.
112
+ *
113
+ * Handles template sections: parts with `sections` array are split into
114
+ * multiple QuestionPart entries with section-specific questionTypes.
115
+ * Used for Movers P8 (2 sections) and P11 (3 sections).
116
+ *
117
+ * @param questions - API questions to group
118
+ * @param templateParts - Optional template parts with name/instructions metadata
119
+ */
120
+ export declare function groupQuestionsByPart(questions: ApiQuestion[], templateParts?: TemplatePart[]): QuestionPart[];
121
+ export declare function transformFillInBlank(questions: ApiQuestion[]): {
122
+ questions: FillBlankQuestion[];
123
+ title: string;
124
+ imageUrl?: string;
125
+ audioUrl?: string;
126
+ exampleText?: string;
127
+ exampleHighlight?: string;
128
+ instruction: string;
129
+ showHints?: boolean;
130
+ groupContent?: string;
131
+ groupTitle?: string;
132
+ groupImageUrl?: string;
133
+ };
134
+ export declare function transformWriteCorrectVerbForm(questions: ApiQuestion[]): {
135
+ questions: FillBlankQuestion[];
136
+ title: string;
137
+ instruction: string;
138
+ };
139
+ export declare function transformChooseCorrectAnswer(questions: ApiQuestion[]): {
140
+ questions: ChooseBestAnswerQuestion[];
141
+ example?: import('../types').ChooseBestAnswerExample;
142
+ imageUrl?: string;
143
+ groupImageUrl?: string;
144
+ groupTitle?: string;
145
+ groupContent?: string;
146
+ articles?: Array<{
147
+ name: string;
148
+ content: string;
149
+ imageUrl?: string;
150
+ }>;
151
+ audioUrl?: string;
152
+ instruction: string;
153
+ };
154
+ export interface ChooseAdjectiveOption {
155
+ id: string;
156
+ label: string;
157
+ text: string;
158
+ }
159
+ export interface ChooseAdjectiveQuestion {
160
+ id: string;
161
+ questionNumber: number;
162
+ sentenceBefore: string;
163
+ sentenceAfter: string;
164
+ options: ChooseAdjectiveOption[];
165
+ }
166
+ export declare function transformChooseCorrectAdjective(questions: ApiQuestion[]): {
167
+ questions: ChooseAdjectiveQuestion[];
168
+ instruction: string;
169
+ };
170
+ export declare function transformWriteShortLetter(question: ApiQuestion): {
171
+ prompt: string;
172
+ requirements?: string[];
173
+ minWords?: number;
174
+ maxWords?: number;
175
+ guideImages?: string[];
176
+ };
177
+ export declare function transformColorObjects(questions: ApiQuestion[]): {
178
+ instruction: string;
179
+ instructions?: string[];
180
+ imageUrl: string;
181
+ audioUrl?: string;
182
+ hintItems: ColoringHintItem[];
183
+ regions: ColoringRegion[];
184
+ };
185
+ export declare function transformPictureChoose(questions: ApiQuestion[]): {
186
+ subQuestions: PictureChooseSubQuestion[];
187
+ instruction: string;
188
+ };
189
+ export declare function transformPictureFillBlankChoose(questions: ApiQuestion[]): {
190
+ subQuestions: PictureFillBlankSubQuestion[];
191
+ instruction: string;
192
+ };
193
+ export declare function transformReadingPassage(questions: ApiQuestion[]): {
194
+ passage: string;
195
+ passageTitle?: string;
196
+ passageImageUrl?: string;
197
+ instruction: string;
198
+ questions: ReadingPassageQuestion[];
199
+ };
200
+ export declare function transformLabelPicture(questions: ApiQuestion[]): {
201
+ imageUrl: string;
202
+ wordBank: string[];
203
+ labels: LabelThePictureLabel[];
204
+ instruction: string;
205
+ };
206
+ export declare function transformFillWordHint(questions: ApiQuestion[]): {
207
+ subQuestions: FillWordHintSubQuestion[];
208
+ hintLetters: string[];
209
+ instruction: string;
210
+ };
211
+ export declare function transformGridFill(questions: ApiQuestion[]): {
212
+ grid: (string | null)[][];
213
+ rows: number;
214
+ columns: number;
215
+ instruction: string;
216
+ disabledCells: string[];
217
+ };
218
+ export interface AnswerTheQuestionQuestion {
219
+ id: string;
220
+ questionNumber: number;
221
+ question: string;
222
+ imageUrl?: string;
223
+ prefixText?: string;
224
+ suffixText?: string;
225
+ suggestedAnswers?: string[];
226
+ isExample: boolean;
227
+ exampleAnswer?: string;
228
+ }
229
+ export declare function transformAnswerTheQuestion(questions: ApiQuestion[]): {
230
+ questions: AnswerTheQuestionQuestion[];
231
+ instruction: string;
232
+ imageUrl?: string;
233
+ title?: string;
234
+ groupContent?: string;
235
+ };
236
+ export interface TrueFalseQuestion {
237
+ id: string;
238
+ questionNumber: number;
239
+ question: string;
240
+ imageUrl?: string;
241
+ isExample: boolean;
242
+ exampleCorrectAnswer?: boolean;
243
+ }
244
+ export declare function transformTrueFalse(questions: ApiQuestion[]): {
245
+ questions: TrueFalseQuestion[];
246
+ instruction: string;
247
+ imageUrl?: string;
248
+ groupContent?: string;
249
+ };
250
+ export interface WordOrderingQuestion {
251
+ id: string;
252
+ questionNumber: number;
253
+ words: string[];
254
+ imageUrl?: string;
255
+ isExample: boolean;
256
+ exampleAnswer?: string[];
257
+ }
258
+ export declare function transformWordOrdering(questions: ApiQuestion[]): {
259
+ questions: WordOrderingQuestion[];
260
+ instruction: string;
261
+ };
262
+ export declare function transformWordFillParagraph(questions: ApiQuestion[]): {
263
+ questionId: string;
264
+ paragraph: string;
265
+ title?: string;
266
+ imageUrl?: string;
267
+ wordBank: Array<{
268
+ word: string;
269
+ imageUrl?: string;
270
+ isExample?: boolean;
271
+ }>;
272
+ viewMode: 'WITH_WORD_BANK' | 'WITH_OPTIONS' | 'DEFAULT' | 'EMAIL';
273
+ instruction: string;
274
+ exampleAnswer?: string[];
275
+ emailFrom?: string;
276
+ emailTo?: string;
277
+ };
278
+ export interface MatchByWritingAnswerQuestion {
279
+ id: string;
280
+ questionNumber: number;
281
+ question: string;
282
+ imageUrl?: string;
283
+ isExample: boolean;
284
+ exampleAnswer?: string;
285
+ askerName?: string;
286
+ answererName?: string;
287
+ }
288
+ export interface MatchByWritingAnswerOption {
289
+ answer: string;
290
+ imageUrl: string;
291
+ content?: string;
292
+ }
293
+ export declare function transformMatchByWritingAnswer(questions: ApiQuestion[]): {
294
+ questions: MatchByWritingAnswerQuestion[];
295
+ options: MatchByWritingAnswerOption[];
296
+ instruction: string;
297
+ viewMode: 'DEFAULT' | 'CONVERSATION';
298
+ groupImageUrl?: string;
299
+ askerName?: string;
300
+ answererName?: string;
301
+ };
302
+ export declare function transformWriteSentences(questions: ApiQuestion[]): {
303
+ questions: Array<{
304
+ id: string;
305
+ questionNumber: number;
306
+ }>;
307
+ instruction: string;
308
+ imageUrl?: string;
309
+ title?: string;
310
+ groupContent?: string;
311
+ };
312
+ export interface WordFillStructuredFormQuestion {
313
+ id: string;
314
+ questionNumber: number;
315
+ title: string;
316
+ imageUrl?: string;
317
+ content: string;
318
+ answers: Record<string, string>;
319
+ caseSensitive: boolean;
320
+ }
321
+ export declare function transformWordFillStructuredForm(questions: ApiQuestion[]): {
322
+ questions: WordFillStructuredFormQuestion[];
323
+ instruction: string;
324
+ groupTitle?: string;
325
+ groupContent?: string;
326
+ groupImageUrl?: string;
327
+ audioUrl?: string;
328
+ };
329
+ export interface SceneObjectNode {
330
+ id: string;
331
+ imageUrl: string;
332
+ label: string;
333
+ x: number;
334
+ y: number;
335
+ width: number;
336
+ height: number;
337
+ }
338
+ export declare function transformListenChooseObjects(questions: ApiQuestion[]): {
339
+ audioUrl: string;
340
+ backgroundImageUrl: string;
341
+ objectNodes: SceneObjectNode[];
342
+ correctObjectId: string;
343
+ isBackup: boolean;
344
+ instruction: string;
345
+ };
346
+ export interface ListenSpeakAnswerArrowNode {
347
+ x: number;
348
+ y: number;
349
+ width: number;
350
+ height: number;
351
+ }
352
+ export declare function transformListenSpeakAnswer(questions: ApiQuestion[]): {
353
+ questions: Array<{
354
+ id: string;
355
+ questionNumber: number;
356
+ audioUrl: string;
357
+ arrowNode?: ListenSpeakAnswerArrowNode;
358
+ backgroundImageUrl: string;
359
+ isBackup: boolean;
360
+ }>;
361
+ instruction: string;
362
+ };