@elice/material-exercise 1.230328.0 → 1.230418.0

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 (369) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +526 -0
  2. package/cjs/components/material-exercise/MaterialExercise.js +44 -63
  3. package/cjs/components/material-exercise/MaterialExercise.styled.js +20 -23
  4. package/cjs/components/material-exercise/MaterialExerciseMobile.js +19 -15
  5. package/cjs/components/material-exercise/context/ExerciseIntlProvider.js +9 -13
  6. package/cjs/components/material-exercise/context/ExerciseProvider.js +83 -81
  7. package/cjs/components/material-exercise/context/ExerciseProviderNoImage.js +16 -16
  8. package/cjs/components/material-exercise/context/context.js +1 -1
  9. package/cjs/components/material-exercise/context/locales/noImage.en.json.js +3 -1
  10. package/cjs/components/material-exercise/context/locales/noImage.ko.json.js +3 -1
  11. package/cjs/components/material-exercise/context/recoil.js +559 -371
  12. package/cjs/components/material-exercise/context/recoilTypes.js +0 -5
  13. package/cjs/components/material-exercise/context/subjects.js +3 -6
  14. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -2
  15. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +78 -65
  16. package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +8 -8
  17. package/cjs/components/material-exercise/exercise-code-history/locales/en.json.js +7 -0
  18. package/cjs/components/material-exercise/exercise-code-history/locales/ko.json.js +7 -0
  19. package/cjs/components/material-exercise/exercise-file/ExerciseFile.js +20 -21
  20. package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +225 -198
  21. package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +8 -10
  22. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +35 -32
  23. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +57 -48
  24. package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +6 -4
  25. package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.en.json.js +3 -1
  26. package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.ko.json.js +3 -1
  27. package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +327 -231
  28. package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +6 -4
  29. package/cjs/components/material-exercise/exercise-file-tree/locales/en.json.js +3 -1
  30. package/cjs/components/material-exercise/exercise-file-tree/locales/ko.json.js +3 -1
  31. package/cjs/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +17 -17
  32. package/cjs/components/material-exercise/exercise-menu/ExerciseMenu.js +13 -14
  33. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +6 -6
  34. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +47 -38
  35. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +60 -42
  36. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuReset.js +29 -22
  37. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +45 -56
  38. package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +12 -12
  39. package/cjs/components/material-exercise/exercise-menu/locales/en.json.js +3 -1
  40. package/cjs/components/material-exercise/exercise-menu/locales/ko.json.js +3 -1
  41. package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +28 -20
  42. package/cjs/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.js +5 -3
  43. package/cjs/components/material-exercise/exercise-preview/ExercisePreview.js +30 -41
  44. package/cjs/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +17 -12
  45. package/cjs/components/material-exercise/exercise-preview/locales/en.json.js +3 -1
  46. package/cjs/components/material-exercise/exercise-preview/locales/ko.json.js +3 -1
  47. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +24 -33
  48. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +13 -8
  49. package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +84 -83
  50. package/cjs/components/material-exercise/exercise-rightpane/locales/en.json.js +3 -1
  51. package/cjs/components/material-exercise/exercise-rightpane/locales/ko.json.js +3 -1
  52. package/cjs/components/material-exercise/exercise-room/ExerciseRoom.js +20 -12
  53. package/cjs/components/material-exercise/exercise-room/ExerciseRoom.styled.js +14 -12
  54. package/cjs/components/material-exercise/exercise-room/ExerciseRoomDetail.js +239 -147
  55. package/cjs/components/material-exercise/exercise-room/ExerciseRoomList.js +92 -63
  56. package/cjs/components/material-exercise/exercise-room/helpers/exerciseRoomPermissionStringConvertor.js +2 -8
  57. package/cjs/components/material-exercise/exercise-room/locales/en.json.js +3 -1
  58. package/cjs/components/material-exercise/exercise-room/locales/ko.json.js +3 -1
  59. package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.js +219 -220
  60. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerContext.js +1 -1
  61. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerController.js +13 -13
  62. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +30 -26
  63. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +26 -26
  64. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +70 -95
  65. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +27 -27
  66. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +54 -60
  67. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +5 -5
  68. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +10 -13
  69. package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +29 -26
  70. package/cjs/components/material-exercise/exercise-runner/locales/en.json.js +3 -1
  71. package/cjs/components/material-exercise/exercise-runner/locales/ko.json.js +3 -1
  72. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -2
  73. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +290 -180
  74. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +8 -8
  75. package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +41 -45
  76. package/cjs/components/material-exercise/exercise-submit-history/locales/en.json.js +7 -0
  77. package/cjs/components/material-exercise/exercise-submit-history/locales/ko.json.js +7 -0
  78. package/cjs/components/shared/exercise-menu-button/ExerciseMenuButton.js +19 -17
  79. package/cjs/components/shared/exercise-shimmer/ExerciseFileShimmer.js +5 -4
  80. package/cjs/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +15 -14
  81. package/cjs/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +7 -6
  82. package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +17 -16
  83. package/cjs/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +18 -11
  84. package/cjs/components/shared/exercise-version-list/ExerciseVersionList.js +5 -4
  85. package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.js +1 -1
  86. package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.js +8 -7
  87. package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +9 -5
  88. package/cjs/components/shared/file-icon/FileIcon.js +23 -23
  89. package/cjs/components/shared/file-tabs/FileTab.js +32 -43
  90. package/cjs/components/shared/file-tabs/FileTab.styled.js +26 -22
  91. package/cjs/components/shared/file-tabs/FileTabs.js +55 -49
  92. package/cjs/components/shared/file-tabs/FileTabs.styled.js +2 -2
  93. package/cjs/components/shared/file-tabs/util.js +29 -18
  94. package/cjs/components/shared/file-tree/FileTree.js +11 -11
  95. package/cjs/components/shared/file-tree/FileTreeConfig.js +24 -23
  96. package/cjs/components/shared/file-tree/FileTreeList.js +35 -41
  97. package/cjs/components/shared/file-tree/FileTreeListItemContent.js +75 -91
  98. package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.js +29 -40
  99. package/cjs/components/shared/file-tree/FileTreeListItemContentInput.js +77 -101
  100. package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.js +6 -6
  101. package/cjs/components/shared/file-tree/FileTreeListItemContentMenu.js +51 -86
  102. package/cjs/components/shared/file-tree/FileTreeListItems.js +150 -153
  103. package/cjs/components/shared/file-tree/FileTreeListItems.styled.js +2 -2
  104. package/cjs/components/shared/file-tree/FileTreeToolbar.js +30 -41
  105. package/cjs/components/shared/file-tree/FileTreeToolbar.styled.js +1 -1
  106. package/cjs/components/shared/file-tree/context/FileTreeContext.js +91 -97
  107. package/cjs/components/shared/file-tree/locales/en.json.js +3 -1
  108. package/cjs/components/shared/file-tree/locales/ko.json.js +3 -1
  109. package/cjs/components/shared/file-tree/utils/fileTreeFiles.js +20 -22
  110. package/cjs/components/shared/file-tree/utils/fileTreeGenerator.js +193 -173
  111. package/cjs/components/shared/file-tree/utils/fileTreeInput.js +0 -1
  112. package/cjs/components/shared/file-tree/utils/fileTreeItem.js +1 -1
  113. package/cjs/components/shared/file-tree/utils/fileTreePath.js +5 -7
  114. package/cjs/components/shared/file-viewer/FileViewer.js +59 -60
  115. package/cjs/components/shared/file-viewer/FileViewerCsv.js +145 -101
  116. package/cjs/components/shared/file-viewer/FileViewerImage.js +7 -8
  117. package/cjs/components/shared/file-viewer/FileViewerIpynb.js +20 -14
  118. package/cjs/components/shared/file-viewer/FileViewerNonViewable.js +28 -34
  119. package/cjs/components/shared/file-viewer/FileViewerText.js +23 -16
  120. package/cjs/components/shared/file-viewer/locales/en.json.js +3 -1
  121. package/cjs/components/shared/file-viewer/locales/ko.json.js +3 -1
  122. package/cjs/components/shared/file-viewer/locales/nonViewable.en.json.js +3 -1
  123. package/cjs/components/shared/file-viewer/locales/nonViewable.ko.json.js +3 -1
  124. package/cjs/components/shared/material-modal/MaterialModal.js +10 -12
  125. package/cjs/components/shared/material-modal/MaterialModal.styled.js +5 -5
  126. package/cjs/components/shared/monaco-editor/MonacoEditor.js +123 -149
  127. package/cjs/components/shared/monaco-editor/MonacoEditorLazy.js +10 -8
  128. package/cjs/components/shared/monaco-editor/MonacoEditorMobile.js +49 -58
  129. package/cjs/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +78 -85
  130. package/cjs/components/shared/monaco-editor/constants/grammars/index.js +131 -52
  131. package/cjs/components/shared/monaco-editor/constants/monaco/preferences.js +5 -9
  132. package/cjs/components/shared/monaco-editor/constants/themes/index.js +80 -32
  133. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventChange.js +10 -13
  134. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventCursor.js +14 -18
  135. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoEventScroll.js +8 -9
  136. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +54 -72
  137. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +14 -15
  138. package/cjs/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +8 -9
  139. package/cjs/components/shared/monaco-editor/editor-languages/css/formatter.js +36 -12
  140. package/cjs/components/shared/monaco-editor/editor-languages/css/index.js +5 -8
  141. package/cjs/components/shared/monaco-editor/editor-languages/html/formatter.js +36 -12
  142. package/cjs/components/shared/monaco-editor/editor-languages/html/index.js +3 -6
  143. package/cjs/components/shared/monaco-editor/editor-languages/index.js +3 -1
  144. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/_helper.js +1 -1
  145. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/express.js +3 -2
  146. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/propTypes.js +3 -2
  147. package/cjs/components/shared/monaco-editor/editor-languages/typescript/dts/react.js +3 -2
  148. package/cjs/components/shared/monaco-editor/editor-languages/typescript/formatter.js +36 -12
  149. package/cjs/components/shared/monaco-editor/editor-languages/typescript/index.js +18 -24
  150. package/cjs/components/shared/monaco-editor/hooks/useEditorOptions.js +12 -9
  151. package/cjs/components/shared/monaco-editor/locales/en.json.js +3 -1
  152. package/cjs/components/shared/monaco-editor/locales/ko.json.js +3 -1
  153. package/cjs/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +18 -28
  154. package/cjs/components/shared/monaco-editor/utils/emmet/emmet.js +0 -3
  155. package/cjs/components/shared/monaco-editor/utils/emmet/registerProvider.js +12 -8
  156. package/cjs/components/shared/monaco-editor/utils/grammar/index.js +70 -32
  157. package/cjs/components/shared/monaco-editor/utils/grammar/onigasm.js +25 -7
  158. package/cjs/components/shared/monaco-editor/utils/grammar/textmate.js +67 -43
  159. package/cjs/components/shared/monaco-editor/utils/monacoLanguage.js +9 -19
  160. package/cjs/components/shared/monaco-editor/utils/monacoPreference.js +6 -5
  161. package/cjs/components/shared/monaco-editor/utils/prettier/config.js +2 -3
  162. package/cjs/components/shared/monaco-editor/utils/prettier/index.js +30 -9
  163. package/cjs/components/shared/monaco-editor/utils/theme/convert.js +20 -26
  164. package/cjs/components/shared/monaco-editor/utils/theme/index.js +22 -5
  165. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +77 -75
  166. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +82 -93
  167. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +125 -135
  168. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +148 -160
  169. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +104 -118
  170. package/cjs/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
  171. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/configCompat.js +1 -3
  172. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/data.js +2 -3
  173. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +218 -329
  174. package/cjs/components/shared/monaco-editor/vendors/vscode-emmet-helper/utils.js +3 -6
  175. package/cjs/components/shared/no-vnc/NoVnc.js +93 -90
  176. package/cjs/components/shared/no-vnc/NoVncLazy.js +7 -5
  177. package/cjs/components/shared/preview-container/PreviewContainer.js +7 -10
  178. package/cjs/components/shared/web-browser/WebBrowser.js +54 -59
  179. package/cjs/components/shared/xterm/Xterm.js +112 -105
  180. package/cjs/components/shared/xterm/XtermLazy.js +7 -5
  181. package/cjs/components/shared/xterm/locales/en.json.js +3 -1
  182. package/cjs/components/shared/xterm/locales/ko.json.js +3 -1
  183. package/cjs/constants/arduino.js +10 -10
  184. package/cjs/constants/shortcutKeyMap.js +5 -5
  185. package/cjs/constants/stylesheets.js +7 -10
  186. package/cjs/hooks/useArduino.js +327 -255
  187. package/cjs/hooks/useExerciseFile.js +24 -24
  188. package/cjs/hooks/useExericseShortcut.js +6 -5
  189. package/cjs/hooks/useMaterialExerciseFileUrl.js +54 -37
  190. package/cjs/hooks/useRunnerRoomWebSocket.js +58 -56
  191. package/cjs/hooks/useStdioTextConcator.js +18 -12
  192. package/cjs/hooks/useStdioWebSocket.js +41 -67
  193. package/cjs/hooks/useUsercodeEditWebSocket.js +230 -252
  194. package/cjs/hooks/useUsercodeHistory.js +121 -82
  195. package/cjs/index.js +4 -4
  196. package/cjs/utils/arduino.js +23 -25
  197. package/cjs/utils/exerciseFile.js +8 -16
  198. package/cjs/utils/runner.js +29 -25
  199. package/es/_virtual/_rollupPluginBabelHelpers.js +504 -0
  200. package/es/components/material-exercise/MaterialExercise.js +33 -54
  201. package/es/components/material-exercise/MaterialExercise.styled.js +20 -23
  202. package/es/components/material-exercise/MaterialExerciseMobile.js +15 -13
  203. package/es/components/material-exercise/context/ExerciseIntlProvider.js +9 -13
  204. package/es/components/material-exercise/context/ExerciseProvider.js +79 -79
  205. package/es/components/material-exercise/context/ExerciseProviderNoImage.js +11 -13
  206. package/es/components/material-exercise/context/context.js +1 -1
  207. package/es/components/material-exercise/context/recoil.js +560 -372
  208. package/es/components/material-exercise/context/recoilTypes.js +0 -5
  209. package/es/components/material-exercise/context/subjects.js +3 -6
  210. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -2
  211. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +73 -62
  212. package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +8 -8
  213. package/es/components/material-exercise/exercise-code-history/locales/en.json.js +3 -0
  214. package/es/components/material-exercise/exercise-code-history/locales/ko.json.js +3 -0
  215. package/es/components/material-exercise/exercise-file/ExerciseFile.js +15 -18
  216. package/es/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +218 -193
  217. package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +5 -9
  218. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +31 -28
  219. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +52 -45
  220. package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsLazy.js +1 -1
  221. package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +321 -225
  222. package/es/components/material-exercise/exercise-file-tree/ExerciseFileTreeLazy.js +1 -1
  223. package/es/components/material-exercise/exercise-file-viewer/ExerciseFileViewer.js +12 -14
  224. package/es/components/material-exercise/exercise-menu/ExerciseMenu.js +7 -10
  225. package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +3 -5
  226. package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +43 -36
  227. package/es/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +53 -37
  228. package/es/components/material-exercise/exercise-menu/ExerciseMenuReset.js +25 -20
  229. package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +41 -54
  230. package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.styled.js +12 -12
  231. package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdown.js +25 -19
  232. package/es/components/material-exercise/exercise-multilang-dropdown/ExerciseMultilangDropdownLazy.js +1 -1
  233. package/es/components/material-exercise/exercise-preview/ExercisePreview.js +21 -34
  234. package/es/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +13 -10
  235. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +17 -28
  236. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEditorPerference.js +9 -6
  237. package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +81 -82
  238. package/es/components/material-exercise/exercise-room/ExerciseRoom.js +13 -7
  239. package/es/components/material-exercise/exercise-room/ExerciseRoom.styled.js +14 -12
  240. package/es/components/material-exercise/exercise-room/ExerciseRoomDetail.js +236 -146
  241. package/es/components/material-exercise/exercise-room/ExerciseRoomList.js +90 -63
  242. package/es/components/material-exercise/exercise-room/helpers/exerciseRoomPermissionStringConvertor.js +2 -8
  243. package/es/components/material-exercise/exercise-runner/ExerciseRunner.js +212 -215
  244. package/es/components/material-exercise/exercise-runner/ExerciseRunnerContext.js +1 -1
  245. package/es/components/material-exercise/exercise-runner/ExerciseRunnerController.js +7 -9
  246. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +27 -25
  247. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +22 -24
  248. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +66 -93
  249. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +24 -26
  250. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +51 -59
  251. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusIndicator.js +2 -4
  252. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +6 -11
  253. package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +26 -25
  254. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -2
  255. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +284 -174
  256. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.styled.js +8 -8
  257. package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistoryOutput.js +38 -44
  258. package/es/components/material-exercise/exercise-submit-history/locales/en.json.js +3 -0
  259. package/es/components/material-exercise/exercise-submit-history/locales/ko.json.js +3 -0
  260. package/es/components/shared/exercise-menu-button/ExerciseMenuButton.js +16 -16
  261. package/es/components/shared/exercise-shimmer/ExerciseFileShimmer.js +2 -3
  262. package/es/components/shared/exercise-shimmer/ExerciseFileTabShimmer.js +12 -13
  263. package/es/components/shared/exercise-shimmer/ExerciseFileTabsShimmer.js +2 -3
  264. package/es/components/shared/exercise-shimmer/ExerciseFileTreeListItemShimmer.js +14 -15
  265. package/es/components/shared/exercise-shimmer/ExerciseFileTreeListShimmer.js +15 -10
  266. package/es/components/shared/exercise-version-list/ExerciseVersionList.js +2 -3
  267. package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.js +1 -1
  268. package/es/components/shared/exercise-version-list/ExerciseVersionListItem.js +5 -6
  269. package/es/components/shared/exercise-version-list/ExerciseVersionListItem.styled.js +9 -5
  270. package/es/components/shared/file-icon/FileIcon.js +20 -22
  271. package/es/components/shared/file-tabs/FileTab.js +28 -41
  272. package/es/components/shared/file-tabs/FileTab.styled.js +26 -22
  273. package/es/components/shared/file-tabs/FileTabs.js +52 -48
  274. package/es/components/shared/file-tabs/FileTabs.styled.js +2 -2
  275. package/es/components/shared/file-tabs/util.js +29 -18
  276. package/es/components/shared/file-tree/FileTree.js +3 -5
  277. package/es/components/shared/file-tree/FileTreeConfig.js +21 -22
  278. package/es/components/shared/file-tree/FileTreeList.js +31 -39
  279. package/es/components/shared/file-tree/FileTreeListItemContent.js +67 -85
  280. package/es/components/shared/file-tree/FileTreeListItemContent.styled.js +29 -40
  281. package/es/components/shared/file-tree/FileTreeListItemContentInput.js +74 -100
  282. package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.js +6 -6
  283. package/es/components/shared/file-tree/FileTreeListItemContentMenu.js +48 -85
  284. package/es/components/shared/file-tree/FileTreeListItems.js +147 -152
  285. package/es/components/shared/file-tree/FileTreeListItems.styled.js +2 -2
  286. package/es/components/shared/file-tree/FileTreeToolbar.js +24 -37
  287. package/es/components/shared/file-tree/FileTreeToolbar.styled.js +1 -1
  288. package/es/components/shared/file-tree/context/FileTreeContext.js +91 -97
  289. package/es/components/shared/file-tree/utils/fileTreeFiles.js +20 -22
  290. package/es/components/shared/file-tree/utils/fileTreeGenerator.js +193 -173
  291. package/es/components/shared/file-tree/utils/fileTreeInput.js +0 -1
  292. package/es/components/shared/file-tree/utils/fileTreeItem.js +1 -1
  293. package/es/components/shared/file-tree/utils/fileTreePath.js +5 -7
  294. package/es/components/shared/file-viewer/FileViewer.js +52 -53
  295. package/es/components/shared/file-viewer/FileViewerCsv.js +141 -99
  296. package/es/components/shared/file-viewer/FileViewerImage.js +3 -6
  297. package/es/components/shared/file-viewer/FileViewerIpynb.js +16 -12
  298. package/es/components/shared/file-viewer/FileViewerNonViewable.js +22 -30
  299. package/es/components/shared/file-viewer/FileViewerText.js +18 -13
  300. package/es/components/shared/material-modal/MaterialModal.js +7 -11
  301. package/es/components/shared/material-modal/MaterialModal.styled.js +5 -5
  302. package/es/components/shared/monaco-editor/MonacoEditor.js +119 -147
  303. package/es/components/shared/monaco-editor/MonacoEditorLazy.js +6 -4
  304. package/es/components/shared/monaco-editor/MonacoEditorMobile.js +45 -56
  305. package/es/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +73 -82
  306. package/es/components/shared/monaco-editor/constants/grammars/index.js +131 -52
  307. package/es/components/shared/monaco-editor/constants/monaco/preferences.js +5 -9
  308. package/es/components/shared/monaco-editor/constants/themes/index.js +80 -32
  309. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventChange.js +10 -13
  310. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventCursor.js +14 -18
  311. package/es/components/shared/monaco-editor/editor-hooks/useMonacoEventScroll.js +8 -9
  312. package/es/components/shared/monaco-editor/editor-hooks/useMonacoMarkers.js +54 -72
  313. package/es/components/shared/monaco-editor/editor-hooks/useMonacoOptions.js +14 -15
  314. package/es/components/shared/monaco-editor/editor-hooks/useMonacoTheme.js +8 -9
  315. package/es/components/shared/monaco-editor/editor-languages/css/formatter.js +33 -11
  316. package/es/components/shared/monaco-editor/editor-languages/css/index.js +2 -5
  317. package/es/components/shared/monaco-editor/editor-languages/html/formatter.js +33 -11
  318. package/es/components/shared/monaco-editor/editor-languages/html/index.js +2 -5
  319. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/_helper.js +1 -1
  320. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/express.js +0 -1
  321. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/propTypes.js +0 -1
  322. package/es/components/shared/monaco-editor/editor-languages/typescript/dts/react.js +0 -1
  323. package/es/components/shared/monaco-editor/editor-languages/typescript/formatter.js +33 -11
  324. package/es/components/shared/monaco-editor/editor-languages/typescript/index.js +10 -16
  325. package/es/components/shared/monaco-editor/hooks/useEditorOptions.js +12 -9
  326. package/es/components/shared/monaco-editor/utils/emmet/abbreviationActions.js +18 -28
  327. package/es/components/shared/monaco-editor/utils/emmet/emmet.js +0 -3
  328. package/es/components/shared/monaco-editor/utils/emmet/registerProvider.js +12 -8
  329. package/es/components/shared/monaco-editor/utils/grammar/index.js +67 -31
  330. package/es/components/shared/monaco-editor/utils/grammar/onigasm.js +25 -7
  331. package/es/components/shared/monaco-editor/utils/grammar/textmate.js +67 -43
  332. package/es/components/shared/monaco-editor/utils/monacoLanguage.js +9 -19
  333. package/es/components/shared/monaco-editor/utils/monacoPreference.js +6 -5
  334. package/es/components/shared/monaco-editor/utils/prettier/config.js +2 -3
  335. package/es/components/shared/monaco-editor/utils/prettier/index.js +27 -8
  336. package/es/components/shared/monaco-editor/utils/theme/convert.js +20 -26
  337. package/es/components/shared/monaco-editor/utils/theme/index.js +22 -5
  338. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursor.js +77 -75
  339. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorManager.js +82 -93
  340. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteCursorWidget.js +125 -135
  341. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelection.js +148 -160
  342. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/RemoteSelectionManager.js +104 -118
  343. package/es/components/shared/monaco-editor/vendors/monaco-collab-ext/styles.js +2 -2
  344. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/configCompat.js +1 -3
  345. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/data.js +2 -3
  346. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/emmetHelper.js +219 -330
  347. package/es/components/shared/monaco-editor/vendors/vscode-emmet-helper/utils.js +3 -6
  348. package/es/components/shared/no-vnc/NoVnc.js +89 -88
  349. package/es/components/shared/no-vnc/NoVncLazy.js +4 -2
  350. package/es/components/shared/preview-container/PreviewContainer.js +7 -10
  351. package/es/components/shared/web-browser/WebBrowser.js +49 -56
  352. package/es/components/shared/xterm/Xterm.js +107 -102
  353. package/es/components/shared/xterm/XtermLazy.js +4 -2
  354. package/es/constants/arduino.js +10 -10
  355. package/es/constants/shortcutKeyMap.js +3 -5
  356. package/es/constants/stylesheets.js +7 -10
  357. package/es/hooks/useArduino.js +327 -255
  358. package/es/hooks/useExerciseFile.js +24 -24
  359. package/es/hooks/useExericseShortcut.js +6 -5
  360. package/es/hooks/useMaterialExerciseFileUrl.js +55 -38
  361. package/es/hooks/useRunnerRoomWebSocket.js +58 -56
  362. package/es/hooks/useStdioTextConcator.js +18 -12
  363. package/es/hooks/useStdioWebSocket.js +41 -67
  364. package/es/hooks/useUsercodeEditWebSocket.js +230 -252
  365. package/es/hooks/useUsercodeHistory.js +122 -83
  366. package/es/utils/arduino.js +23 -25
  367. package/es/utils/exerciseFile.js +8 -16
  368. package/es/utils/runner.js +29 -25
  369. package/package.json +8 -8
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
3
6
  var React = require('react');
4
7
  var reactIntl = require('react-intl');
5
8
  var apiClient = require('@elice/api-client');
@@ -13,50 +16,48 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
13
16
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
14
17
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
15
18
 
16
- const ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_KEY = 'elice-material-exercise-aibot-tooltip-hidden';
17
- const ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_VALUE = 'true';
18
- const StyledControllerButton = styled__default["default"](blocks.Button).withConfig({
19
+ var ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_KEY = 'elice-material-exercise-aibot-tooltip-hidden';
20
+ var ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_VALUE = 'true';
21
+ var StyledControllerButton = styled__default["default"](blocks.Button).withConfig({
19
22
  componentId: "sc-10grd0k-0"
20
23
  })(["position:relative;transition:none;"]);
21
- const ExerciseRunnerControllerCodeHelpRequestButton = React__default["default"].forwardRef((props, ref) => {
22
- const {
23
- orgNameShort
24
- } = materialSharedUtils.useMaterialConfig();
25
- const [isTooltipHidden, setIsTooltipHidden] = React__default["default"].useState(false); //
24
+ var ExerciseRunnerControllerCodeHelpRequestButton = React__default["default"].forwardRef(function (props, ref) {
25
+ var _useMaterialConfig = materialSharedUtils.useMaterialConfig(),
26
+ orgNameShort = _useMaterialConfig.orgNameShort;
27
+ var _React$useState = React__default["default"].useState(false),
28
+ _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
29
+ isTooltipHidden = _React$useState2[0],
30
+ setIsTooltipHidden = _React$useState2[1];
31
+ //
26
32
  //
27
33
  // Get ai info from organization and check all resovle below conditions.
28
34
  // - isEnable is true.
29
35
  // - quotaPerDay is upper than zero.
30
36
  // - tooltip hidden is false.
31
-
32
- React__default["default"].useEffect(() => {
33
- const isTooltipHidden = sessionStorage.getItem(ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_KEY) === ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_VALUE;
34
-
37
+ React__default["default"].useEffect(function () {
38
+ var isTooltipHidden = sessionStorage.getItem(ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_KEY) === ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_VALUE;
35
39
  if (isTooltipHidden) {
36
40
  setIsTooltipHidden(true);
37
41
  return;
38
42
  }
39
-
40
43
  apiClient.getGlobalOrganizationGet({
41
44
  organizationNameShort: orgNameShort
42
- }).then(res => {
43
- const {
44
- aibotInfo
45
- } = res.organization;
46
- const isHidden = !aibotInfo.isEnabled || aibotInfo.quotaPerDay <= 0;
45
+ }).then(function (res) {
46
+ var aibotInfo = res.organization.aibotInfo;
47
+ var isHidden = !aibotInfo.isEnabled || aibotInfo.quotaPerDay <= 0;
47
48
  setIsTooltipHidden(isHidden);
48
- }).catch(() => {
49
+ }).catch(function () {
49
50
  setIsTooltipHidden(true);
50
- }); // eslint-disable-next-line react-hooks/exhaustive-deps
51
- }, []); //
51
+ });
52
+ // eslint-disable-next-line react-hooks/exhaustive-deps
53
+ }, []);
54
+ //
52
55
  //
53
56
  //
54
-
55
57
  /**
56
58
  *
57
59
  */
58
-
59
- const renderAiBotTooltipTitle = () => {
60
+ var renderAiBotTooltipTitle = function renderAiBotTooltipTitle() {
60
61
  return React__default["default"].createElement(blocks.Flex, {
61
62
  align: "center"
62
63
  }, React__default["default"].createElement(blocks.BadgeNext, {
@@ -81,13 +82,12 @@ const ExerciseRunnerControllerCodeHelpRequestButton = React__default["default"].
81
82
  hasPadding: false,
82
83
  border: false,
83
84
  icon: icons.eilMathsignMultiplyBasic,
84
- onClick: () => {
85
+ onClick: function onClick() {
85
86
  sessionStorage.setItem(ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_KEY, ELICE_MATERIAL_EXERCISE_AI_BOT_TOOLTIP_VALUE);
86
87
  setIsTooltipHidden(true);
87
88
  }
88
89
  }));
89
90
  };
90
-
91
91
  return React__default["default"].createElement(blocks.Tooltip, {
92
92
  placement: "top",
93
93
  dark: false,
@@ -106,4 +106,4 @@ const ExerciseRunnerControllerCodeHelpRequestButton = React__default["default"].
106
106
  })));
107
107
  });
108
108
 
109
- module.exports = ExerciseRunnerControllerCodeHelpRequestButton;
109
+ exports["default"] = ExerciseRunnerControllerCodeHelpRequestButton;
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
3
6
  var React = require('react');
4
7
  var reactIntl = require('react-intl');
5
8
  var reactUse = require('react-use');
@@ -20,117 +23,113 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
20
23
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
21
24
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
22
25
 
23
- const StyledHr = styled__default["default"](blocks.Hr).withConfig({
26
+ var StyledHr = styled__default["default"](blocks.Hr).withConfig({
24
27
  componentId: "sc-30ywzi-0"
25
28
  })(["height:2rem;"]);
26
- const StyledRunnerInfoTitle = styled__default["default"].span.withConfig({
29
+ var StyledRunnerInfoTitle = styled__default["default"].span.withConfig({
27
30
  componentId: "sc-30ywzi-1"
28
31
  })(["display:block;color:", ";font-size:11px;line-height:1.25;"], designTokens.base.color.navy3);
29
- const StyledRunnerInfoContent = styled__default["default"].span.withConfig({
32
+ var StyledRunnerInfoContent = styled__default["default"].span.withConfig({
30
33
  componentId: "sc-30ywzi-2"
31
34
  })(["display:block;color:", ";font-size:12px;line-height:1.25;"], designTokens.base.color.navy1);
32
-
33
- const ExerciseRunnerControllerRunningInfo = () => {
34
- const intl = reactIntl.useIntl();
35
- const {
36
- materialExerciseId,
37
- exerciseRoomId,
38
- onExerciseRunningDone,
39
- onError
40
- } = React__default["default"].useContext(context.ExerciseContext);
41
- const isRunning = recoil.useRecoilValue(recoil$1.exerciseRunnerRunningState);
42
- const isPrevRunning = reactUse.usePrevious(isRunning);
43
- const isNoRunning = isPrevRunning === undefined;
44
- const isRunningDone = isPrevRunning === true && !isRunning;
45
- const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
46
- const user = recoil.useRecoilValue(recoil$1.exerciseUserState);
47
- const [course, setCourse] = React__default["default"].useState();
48
- const [exerciseLastRunning, setExerciseLastRunning] = React__default["default"].useState(null); //
35
+ var ExerciseRunnerControllerRunningInfo = function ExerciseRunnerControllerRunningInfo() {
36
+ var intl = reactIntl.useIntl();
37
+ var _React$useContext = React__default["default"].useContext(context.ExerciseContext),
38
+ materialExerciseId = _React$useContext.materialExerciseId,
39
+ exerciseRoomId = _React$useContext.exerciseRoomId,
40
+ onExerciseRunningDone = _React$useContext.onExerciseRunningDone,
41
+ onError = _React$useContext.onError;
42
+ var isRunning = recoil.useRecoilValue(recoil$1.exerciseRunnerRunningState);
43
+ var isPrevRunning = reactUse.usePrevious(isRunning);
44
+ var isNoRunning = isPrevRunning === undefined;
45
+ var isRunningDone = isPrevRunning === true && !isRunning;
46
+ var exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
47
+ var user = recoil.useRecoilValue(recoil$1.exerciseUserState);
48
+ var _React$useState = React__default["default"].useState(),
49
+ _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
50
+ course = _React$useState2[0],
51
+ setCourse = _React$useState2[1];
52
+ var _React$useState3 = React__default["default"].useState(null),
53
+ _React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
54
+ exerciseLastRunning = _React$useState4[0],
55
+ setExerciseLastRunning = _React$useState4[1];
56
+ //
49
57
  // Get exercise running list.
50
58
  //
51
-
52
- React__default["default"].useEffect(() => {
53
- const userId = user === null || user === void 0 ? void 0 : user.id;
54
-
59
+ React__default["default"].useEffect(function () {
60
+ var userId = user === null || user === void 0 ? void 0 : user.id;
55
61
  if (!userId || !exercise || !exerciseRoomId) {
56
62
  return;
57
- } // fetch last running only if
63
+ }
64
+ // fetch last running only if
58
65
  // - not running yet (no history)
59
66
  // - or, running done
60
-
61
-
62
67
  if (!isNoRunning && !isRunningDone) {
63
68
  return;
64
69
  }
65
-
66
- const abortCtrl = new AbortController();
70
+ var abortCtrl = new AbortController();
67
71
  apiClient.getOrgMaterialExerciseExerciseRunningList({
68
- exerciseRoomId,
72
+ exerciseRoomId: exerciseRoomId,
69
73
  filterRunType: exercise.isNoSubmitGrade ? types.enums.ExerciseRunType.Run : undefined,
70
74
  offset: 0,
71
75
  count: 1,
72
- userId
76
+ userId: userId
73
77
  }, {
74
78
  signal: abortCtrl.signal
75
- }).then(res => {
79
+ }).then(function (res) {
76
80
  var _a;
77
-
78
81
  return (_a = res.exerciseRunnings[0]) !== null && _a !== void 0 ? _a : null;
79
- }).then(running => {
82
+ }).then(function (running) {
80
83
  setExerciseLastRunning(running);
81
-
82
84
  if (isRunningDone && typeof onExerciseRunningDone === 'function') {
83
85
  onExerciseRunningDone(running);
84
86
  }
85
- }).catch(err => {
87
+ }).catch(function (err) {
86
88
  if (err.name === 'AbortError') {
87
89
  return;
88
90
  }
89
-
90
91
  if (typeof onError === 'function') {
91
92
  onError(err);
92
93
  }
93
-
94
94
  blocks.Notification.error(intl.formatMessage({
95
95
  id: 'exerciseRunner.controller.runningInfo.error.fetch'
96
96
  }));
97
97
  });
98
- return () => {
98
+ return function () {
99
99
  abortCtrl.abort();
100
100
  };
101
- }, // eslint-disable-next-line react-hooks/exhaustive-deps
102
- [isRunningDone, exercise, exerciseRoomId, user]); //
101
+ },
102
+ // eslint-disable-next-line react-hooks/exhaustive-deps
103
+ [isRunningDone, exercise, exerciseRoomId, user]);
104
+ //
103
105
  // Get course
104
106
  //
105
-
106
- React__default["default"].useEffect(() => {
107
+ React__default["default"].useEffect(function () {
107
108
  if (!exercise) {
108
109
  return;
109
110
  }
110
-
111
- const abortCtrl = new AbortController();
111
+ var abortCtrl = new AbortController();
112
112
  apiClient.getOrgCourseGet({
113
113
  courseId: exercise._courseId
114
114
  }, {
115
115
  signal: abortCtrl.signal
116
- }).then(res => res.course).then(setCourse).catch(console.error);
117
- return () => {
116
+ }).then(function (res) {
117
+ return res.course;
118
+ }).then(setCourse).catch(console.error);
119
+ return function () {
118
120
  abortCtrl.abort();
119
121
  };
120
122
  }, [exercise]);
121
123
  /**
122
124
  * Last running score.
123
125
  */
124
-
125
- const renderRunningInfoLastRunningScore = () => {
126
+ var renderRunningInfoLastRunningScore = function renderRunningInfoLastRunningScore() {
126
127
  if (exercise === null || exercise === void 0 ? void 0 : exercise.isNoSubmitGrade) {
127
128
  return null;
128
129
  }
129
-
130
130
  if (!course || course.courseType === types.enums.CourseType.Challenge) {
131
131
  return;
132
132
  }
133
-
134
133
  return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(blocks.Flex, {
135
134
  column: true,
136
135
  justify: "center"
@@ -151,13 +150,10 @@ const ExerciseRunnerControllerRunningInfo = () => {
151
150
  /**
152
151
  * Last running time.
153
152
  */
154
-
155
-
156
- const renderRunningInfoLastRunningTime = () => {
153
+ var renderRunningInfoLastRunningTime = function renderRunningInfoLastRunningTime() {
157
154
  if (!course || (course === null || course === void 0 ? void 0 : course.courseType) === types.enums.CourseType.Challenge) {
158
155
  return;
159
156
  }
160
-
161
157
  return React__default["default"].createElement(blocks.Flex, {
162
158
  column: true,
163
159
  justify: "center"
@@ -175,17 +171,15 @@ const ExerciseRunnerControllerRunningInfo = () => {
175
171
  second: "2-digit",
176
172
  hour12: false
177
173
  }) : '--'));
178
- }; //
174
+ };
175
+ //
179
176
  //
180
177
  //
181
178
  // hide running info, if exercise running.
182
-
183
-
184
179
  if (isRunning) {
185
180
  return null;
186
181
  }
187
-
188
182
  return React__default["default"].createElement(blocks.Flex, null, renderRunningInfoLastRunningScore(), renderRunningInfoLastRunningTime());
189
183
  };
190
184
 
191
- module.exports = ExerciseRunnerControllerRunningInfo;
185
+ exports["default"] = ExerciseRunnerControllerRunningInfo;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var designTokens = require('@elice/design-tokens');
4
6
  var styled = require('styled-components');
5
7
 
@@ -7,19 +9,17 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
7
9
 
8
10
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
9
11
 
10
- const ExerciseRunnerControllerStatusIndicator = styled__default["default"].div.withConfig({
12
+ var ExerciseRunnerControllerStatusIndicator = styled__default["default"].div.withConfig({
11
13
  componentId: "sc-15703mt-0"
12
- })(["margin-top:1px;margin-right:0.3rem;width:0.375rem;height:0.375rem;border-radius:50%;vertical-align:middle;background-color:", ";"], props => {
14
+ })(["margin-top:1px;margin-right:0.3rem;width:0.375rem;height:0.375rem;border-radius:50%;vertical-align:middle;background-color:", ";"], function (props) {
13
15
  switch (props.status) {
14
16
  case 'success':
15
17
  return designTokens.base.color.green8;
16
-
17
18
  case 'warning':
18
19
  return designTokens.base.color.orange8;
19
-
20
20
  case 'error':
21
21
  return designTokens.base.color.red8;
22
22
  }
23
23
  });
24
24
 
25
- module.exports = ExerciseRunnerControllerStatusIndicator;
25
+ exports["default"] = ExerciseRunnerControllerStatusIndicator;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var React = require('react');
4
6
  var reactIntl = require('react-intl');
5
7
  var blocks = require('@elice/blocks');
@@ -18,42 +20,37 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
18
20
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
19
21
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
20
22
 
21
- const StyledMessageWrapper = styled__default["default"](blocks.Flex).withConfig({
23
+ var StyledMessageWrapper = styled__default["default"](blocks.Flex).withConfig({
22
24
  componentId: "sc-1yqi8o2-0"
23
25
  })(["height:1rem;"]);
24
-
25
- const ExerciseRunnerControllerStatusMessage = () => {
26
- const websocketStatus = recoil.useRecoilValue(recoil$1.exerciseRunnerWebSocketStatusQuery);
26
+ var ExerciseRunnerControllerStatusMessage = function ExerciseRunnerControllerStatusMessage() {
27
+ var websocketStatus = recoil.useRecoilValue(recoil$1.exerciseRunnerWebSocketStatusQuery);
27
28
  /**
28
29
  * Websocket state message.
29
30
  */
30
-
31
- const getWebsocketStateMessage = () => {
31
+ var getWebsocketStateMessage = function getWebsocketStateMessage() {
32
32
  switch (websocketStatus) {
33
33
  case websocket.EliceWebSocket.OPEN:
34
34
  return React__default["default"].createElement(reactIntl.FormattedMessage, {
35
35
  id: "exerciseRunner.controller.statusMessage.open"
36
36
  });
37
-
38
37
  case websocket.EliceWebSocket.CLOSED:
39
38
  return React__default["default"].createElement(reactIntl.FormattedMessage, {
40
39
  id: "exerciseRunner.controller.statusMessage.closed"
41
40
  });
42
-
43
41
  case websocket.EliceWebSocket.CONNECTING:
44
42
  default:
45
43
  return React__default["default"].createElement(reactIntl.FormattedMessage, {
46
44
  id: "exerciseRunner.controller.statusMessage.connecting"
47
45
  });
48
46
  }
49
- }; //
47
+ };
48
+ //
50
49
  //
51
50
  //
52
-
53
-
54
51
  return React__default["default"].createElement(StyledMessageWrapper, {
55
52
  align: "center"
56
- }, React__default["default"].createElement(ExerciseRunnerControllerStatusIndicator, {
53
+ }, React__default["default"].createElement(ExerciseRunnerControllerStatusIndicator["default"], {
57
54
  status: websocketStatus === websocket.EliceWebSocket.OPEN ? 'success' : websocketStatus === websocket.EliceWebSocket.CLOSED ? 'error' : 'warning'
58
55
  }), React__default["default"].createElement(blocks.Text, {
59
56
  role: "gray3",
@@ -62,4 +59,4 @@ const ExerciseRunnerControllerStatusMessage = () => {
62
59
  }, getWebsocketStateMessage()));
63
60
  };
64
61
 
65
- module.exports = ExerciseRunnerControllerStatusMessage;
62
+ exports["default"] = ExerciseRunnerControllerStatusMessage;
@@ -1,5 +1,8 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
3
6
  var React = require('react');
4
7
  var reactIntl = require('react-intl');
5
8
  var blocks = require('@elice/blocks');
@@ -17,57 +20,57 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
17
20
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
21
  var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
19
22
 
20
- const StyledControllerTimerText = styled__default["default"](blocks.Text).withConfig({
23
+ var StyledControllerTimerText = styled__default["default"](blocks.Text).withConfig({
21
24
  componentId: "sc-1ez8ns0-0"
22
25
  })(["margin-top:-3px;color:", ";"], designTokens.base.color.secondary4);
23
-
24
- const ExerciseRunnerControllerTimer = () => {
25
- const {
26
- materialExerciseId
27
- } = React__default["default"].useContext(context.ExerciseContext);
28
- const exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
29
- const isRunning = recoil.useRecoilValue(recoil$1.exerciseRunnerRunningState);
30
- const [exerciseTimeLimit, setExerciseTimeLimit] = React__default["default"].useState(0);
31
- const [remainingTime, setRemainingTime] = React__default["default"].useState(0); //
26
+ var ExerciseRunnerControllerTimer = function ExerciseRunnerControllerTimer() {
27
+ var _React$useContext = React__default["default"].useContext(context.ExerciseContext),
28
+ materialExerciseId = _React$useContext.materialExerciseId;
29
+ var exercise = recoil.useRecoilValue(recoil$1.exerciseState(materialExerciseId));
30
+ var isRunning = recoil.useRecoilValue(recoil$1.exerciseRunnerRunningState);
31
+ var _React$useState = React__default["default"].useState(0),
32
+ _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
33
+ exerciseTimeLimit = _React$useState2[0],
34
+ setExerciseTimeLimit = _React$useState2[1];
35
+ var _React$useState3 = React__default["default"].useState(0),
36
+ _React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
37
+ remainingTime = _React$useState4[0],
38
+ setRemainingTime = _React$useState4[1];
39
+ //
32
40
  // Get time limit from exercise.
33
41
  //
34
-
35
- React__default["default"].useEffect(() => {
42
+ React__default["default"].useEffect(function () {
36
43
  var _a, _b;
37
-
38
44
  if (isRunning) {
39
45
  setExerciseTimeLimit((_b = (_a = exercise === null || exercise === void 0 ? void 0 : exercise.readyExerciseImage) === null || _a === void 0 ? void 0 : _a.timeLimit) !== null && _b !== void 0 ? _b : 0);
40
46
  } else {
41
47
  setExerciseTimeLimit(0);
42
48
  }
43
- }, [exercise, isRunning]); //
49
+ }, [exercise, isRunning]);
50
+ //
44
51
  // Calculate remaining time.
45
52
  //
46
-
47
- React__default["default"].useEffect(() => {
48
- const startTime = Date.now();
53
+ React__default["default"].useEffect(function () {
54
+ var startTime = Date.now();
49
55
  setRemainingTime(exerciseTimeLimit);
50
- const interval = window.setInterval(() => {
51
- const newRemainingTime = exerciseTimeLimit - (Date.now() - startTime);
52
-
56
+ var interval = window.setInterval(function () {
57
+ var newRemainingTime = exerciseTimeLimit - (Date.now() - startTime);
53
58
  if (newRemainingTime < 0) {
54
59
  window.clearInterval(interval);
55
60
  }
56
-
57
61
  setRemainingTime(Math.max(newRemainingTime, 0));
58
62
  }, 100);
59
- return () => {
63
+ return function () {
60
64
  setRemainingTime(0);
61
65
  window.clearInterval(interval);
62
66
  };
63
- }, [exerciseTimeLimit]); //
67
+ }, [exerciseTimeLimit]);
68
+ //
64
69
  //
65
70
  //
66
-
67
71
  if (!remainingTime) {
68
72
  return null;
69
73
  }
70
-
71
74
  return React__default["default"].createElement(StyledControllerTimerText, {
72
75
  size: "small"
73
76
  }, React__default["default"].createElement(reactIntl.FormattedMessage, {
@@ -78,4 +81,4 @@ const ExerciseRunnerControllerTimer = () => {
78
81
  }));
79
82
  };
80
83
 
81
- module.exports = ExerciseRunnerControllerTimer;
84
+ exports["default"] = ExerciseRunnerControllerTimer;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var phrasesEn = {"exerciseRunner.controller.arduino.connectionStatus.connected":"Connected to Arduino","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"Connected to {device}","exerciseRunner.controller.arduino.connectionStatus.connecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.disconnected":"Disconnected from Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.noDevice":"No connected device","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"Connecting to Elice Arduino Agent","exerciseRunner.controller.arduino.connectionStatus.uploading":"Uploading...","exerciseRunner.controller.arduino.agent.title":"Connect to Agent","exerciseRunner.controller.arduino.agent.instruction.install":"1. Install Elice arduino agent","exerciseRunner.controller.arduino.agent.instruction.install.detail":"Install 'elice-arduino-agent' program to connect to arduino.","exerciseRunner.controller.arduino.agent.instruction.install.window":"Download for Windows","exerciseRunner.controller.arduino.agent.instruction.install.mac":"Download for MacOS","exerciseRunner.controller.arduino.agent.instruction.connect":"2. Connect to arduino","exerciseRunner.controller.arduino.agent.instruction.connect.detail":"After the download is completed, it should be connected to exercise environment. If connection is unavailable, please follow the manual.\nClick the button below to read the manual.","exerciseRunner.controller.arduino.agent.instruction.connect.button":"Go to Manual","exerciseRunner.controller.arduino.agent.instruction.close":"Close","exerciseRunner.controller.buttonGroup.button.compile":"Compile","exerciseRunner.controller.buttonGroup.button.helpRequest":"Help me","exerciseRunner.controller.buttonGroup.button.run":"Run","exerciseRunner.controller.buttonGroup.button.stop":"Stop","exerciseRunner.controller.buttonGroup.button.submit":"Submit","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"Exercise without submission","exerciseRunner.controller.buttonGroup.button.syncRequest":"Sync code","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"A function to get help from AI has been added.","exerciseRunner.controller.runningInfo.error.fetch":"An error occurred while fetching running info","exerciseRunner.controller.runningInfo.lastRunningDatetime":"Last running datetime","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"Last submit datetime","exerciseRunner.controller.runningInfo.lastSubmitScore":"Last submit score","exerciseRunner.controller.runningInfo.score":"{score}","exerciseRunner.controller.statusMessage.closed":"Editor disconnected","exerciseRunner.controller.statusMessage.connecting":"Connecting to editor...","exerciseRunner.controller.statusMessage.open":"Editor connected","exerciseRunner.controller.timer.runningRemainingTime":"Remaining: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"OK","exerciseRunner.submitErrorDialog.action.reload":"Reload page","exerciseRunner.submitErrorDialog.body.commonError":"An error occurred while running the code.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"You have exceeded the allowed number of lab submissions.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"The exercise image has been updated.\nPlease refresh and try again.","exerciseRunner.submitErrorDialog.body.networkError":"An error occurred while running the code.\nPlease refresh and try again.\nIf the problem persists, please check the network status.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"This exercise is not allowed to be submitted.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"The exercise room is being prepared.\nPlease try again later.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"The exercise room is running.\nPlease wait a moment.","exerciseRunner.submitErrorDialog.body.unknown":"An error occurred while running the code.\nPlease try again later.","exerciseRunner.submitErrorDialog.title":"Unable to run the code"};
4
6
 
5
- module.exports = phrasesEn;
7
+ exports["default"] = phrasesEn;
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var phrasesKo = {"exerciseRunner.controller.arduino.connectionStatus.connected":"아두이노 기기 연결됨","exerciseRunner.controller.arduino.connectionStatus.connectedDevice":"{device} 연결됨","exerciseRunner.controller.arduino.connectionStatus.connecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.disconnected":"엘리스 아두이노 에이전트 연결 끊김","exerciseRunner.controller.arduino.connectionStatus.noDevice":"연결된 기기 없음","exerciseRunner.controller.arduino.connectionStatus.reconnecting":"엘리스 아두이노 에이전트 연결 중","exerciseRunner.controller.arduino.connectionStatus.uploading":"업로드 중","exerciseRunner.controller.arduino.agent.title":"에이전트 연결","exerciseRunner.controller.arduino.agent.instruction.install":"1. 엘리스 아두이노 에이전트 설치하기","exerciseRunner.controller.arduino.agent.instruction.install.detail":"아두이노와 연결하기 위해 ‘엘리스 아두이노 에이전트'를 설치해주세요.","exerciseRunner.controller.arduino.agent.instruction.install.window":"Windows 용 설치","exerciseRunner.controller.arduino.agent.instruction.install.mac":"MacOS 용 설치","exerciseRunner.controller.arduino.agent.instruction.connect":"2. 연결하기","exerciseRunner.controller.arduino.agent.instruction.connect.detail":"다운로드를 완료하였다면 실습 환경과 연결이 필요합니다. 연결되지 않을 경우 매뉴얼을 확인하세요.\n아래 버튼을 클릭해 매뉴얼을 확인하실 수 있습니다.","exerciseRunner.controller.arduino.agent.instruction.connect.button":"매뉴얼 이동","exerciseRunner.controller.arduino.agent.instruction.close":"닫기","exerciseRunner.controller.buttonGroup.button.compile":"컴파일","exerciseRunner.controller.buttonGroup.button.helpRequest":"도와주세요","exerciseRunner.controller.buttonGroup.button.run":"실행","exerciseRunner.controller.buttonGroup.button.stop":"정지","exerciseRunner.controller.buttonGroup.button.submit":"제출","exerciseRunner.controller.buttonGroup.button.submit.tooltip.noSubmit":"실행만 가능한 실습입니다.","exerciseRunner.controller.buttonGroup.button.syncRequest":"코드 동기화","exerciseRunner.controller.buttonGroup.button.tooltip.aiHelp":"AI에게 도움받기 기능이 추가되었어요.","exerciseRunner.controller.runningInfo.error.fetch":"최종 실행 내역을 가져오는데 문제가 발생하였습니다.","exerciseRunner.controller.runningInfo.lastRunningDatetime":"최종 실행 시간","exerciseRunner.controller.runningInfo.lastSubmitDatetime":"최종 제출 시간","exerciseRunner.controller.runningInfo.lastSubmitScore":"최종 제출 점수","exerciseRunner.controller.runningInfo.score":"{score} 점","exerciseRunner.controller.statusMessage.closed":"에디터 연결 끊김","exerciseRunner.controller.statusMessage.connecting":"에디터 연결 중...","exerciseRunner.controller.statusMessage.open":"에디터 연결됨","exerciseRunner.controller.timer.runningRemainingTime":"실행 제한시간: {remainingTime}","exerciseRunner.submitErrorDialog.action.confirm":"확인","exerciseRunner.submitErrorDialog.action.reload":"새로고침","exerciseRunner.submitErrorDialog.body.commonError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.exceedSubmitGradeLimit":"실습 제출 허용 횟수를 초과했습니다.","exerciseRunner.submitErrorDialog.body.expiredExerciseImage":"실습환경이 업데이트 되었습니다.\n새로고침 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.networkError":"코드 실행 중 오류가 발생했습니다.\n새로고침 후 다시 시도해주세요.\n문제가 계속되면 네트워크 상태를 확인해주세요.","exerciseRunner.submitErrorDialog.body.notForSubmitGrade":"제출이 허용되지 않은 실습입니다.","exerciseRunner.submitErrorDialog.body.notPreparedRoom":"실습환경이 준비 중입니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.body.roomIsBusy":"실습을 실행하고 있습니다.\n잠시만 기다려주세요.","exerciseRunner.submitErrorDialog.body.unknown":"코드 실행 중 오류가 발생했습니다.\n잠시 후 다시 시도해주세요.","exerciseRunner.submitErrorDialog.title":"실습을 실행할 수 없습니다"};
4
6
 
5
- module.exports = phrasesKo;
7
+ exports["default"] = phrasesKo;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  export interface ExerciseSubmitHistoryProps {
3
3
  onHide?: () => void;
4
4
  }
5
- declare const ExerciseSubmitHistory: React.VFC<ExerciseSubmitHistoryProps>;
6
- export default ExerciseSubmitHistory;
5
+ declare const _default: React.VFC<ExerciseSubmitHistoryProps>;
6
+ export default _default;