@elice/material-runbox 1.260908.0 → 1.260910.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 (185) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +16 -0
  2. package/cjs/assets/runbox-loading.svg.js +7 -0
  3. package/cjs/components/material-runbox/MaterialRunbox.js +16 -11
  4. package/cjs/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
  5. package/cjs/components/material-runbox/MaterialRunboxContent.js +93 -65
  6. package/cjs/components/material-runbox/MaterialRunboxHeader.js +55 -69
  7. package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
  8. package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +29 -2
  9. package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
  10. package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +90 -0
  11. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
  12. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +26 -7
  13. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
  14. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
  15. package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
  16. package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.js +56 -0
  17. package/cjs/components/material-runbox/contexts/index.d.ts +2 -0
  18. package/cjs/components/material-runbox/contexts/index.js +4 -0
  19. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
  20. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +71 -0
  21. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
  22. package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +98 -0
  23. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
  24. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +151 -0
  25. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
  26. package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +98 -0
  27. package/cjs/components/material-runbox/disk/index.d.ts +8 -1
  28. package/cjs/components/material-runbox/disk/index.js +8 -2
  29. package/cjs/components/material-runbox/hooks/index.d.ts +3 -0
  30. package/cjs/components/material-runbox/hooks/index.js +14 -0
  31. package/cjs/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
  32. package/cjs/components/material-runbox/hooks/useRunboxControl.js +43 -14
  33. package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
  34. package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.js +50 -0
  35. package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
  36. package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.js +65 -0
  37. package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
  38. package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.js +67 -0
  39. package/cjs/components/material-runbox/locales/en.json.js +1 -1
  40. package/cjs/components/material-runbox/locales/ja.json.js +1 -1
  41. package/cjs/components/material-runbox/locales/ko.json.js +1 -1
  42. package/cjs/components/material-runbox/locales/th.json.js +1 -1
  43. package/cjs/components/material-runbox/runtime/Runtime.js +21 -18
  44. package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
  45. package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
  46. package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
  47. package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +6 -54
  48. package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
  49. package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.js +68 -64
  50. package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
  51. package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.js +283 -0
  52. package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
  53. package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +6 -64
  54. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
  55. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +92 -70
  56. package/cjs/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
  57. package/cjs/components/material-runbox/runtime/runtime-loading-tips.js +148 -0
  58. package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
  59. package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +117 -0
  60. package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
  61. package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +35 -0
  62. package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
  63. package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +161 -0
  64. package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
  65. package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +41 -0
  66. package/cjs/components/material-runbox/status/index.d.ts +4 -0
  67. package/cjs/components/material-runbox/status/index.js +9 -0
  68. package/cjs/components/material-runbox/theme.d.ts +2 -0
  69. package/cjs/components/material-runbox/theme.js +15 -0
  70. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
  71. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +125 -0
  72. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
  73. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +56 -0
  74. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
  75. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +126 -0
  76. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
  77. package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +50 -0
  78. package/cjs/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
  79. package/cjs/components/material-runbox/timer/MaterialRunboxTimer.js +26 -18
  80. package/cjs/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +21 -81
  81. package/cjs/components/shared/hooks/index.d.ts +1 -0
  82. package/cjs/components/shared/hooks/index.js +7 -0
  83. package/cjs/components/shared/hooks/useBreakpoint.d.ts +4 -0
  84. package/cjs/components/shared/hooks/useBreakpoint.js +12 -0
  85. package/es/_virtual/_rollupPluginBabelHelpers.js +13 -1
  86. package/es/assets/runbox-loading.svg.js +3 -0
  87. package/es/components/material-runbox/MaterialRunbox.js +16 -11
  88. package/es/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
  89. package/es/components/material-runbox/MaterialRunboxContent.js +94 -66
  90. package/es/components/material-runbox/MaterialRunboxHeader.js +56 -70
  91. package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
  92. package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +30 -3
  93. package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
  94. package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +82 -0
  95. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
  96. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -9
  97. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
  98. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
  99. package/es/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
  100. package/es/components/material-runbox/contexts/MaterialRunboxControlContext.js +46 -0
  101. package/es/components/material-runbox/contexts/index.d.ts +2 -0
  102. package/es/components/material-runbox/contexts/index.js +1 -0
  103. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
  104. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +67 -0
  105. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
  106. package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +94 -0
  107. package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
  108. package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +143 -0
  109. package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
  110. package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +90 -0
  111. package/es/components/material-runbox/disk/index.d.ts +8 -1
  112. package/es/components/material-runbox/disk/index.js +4 -1
  113. package/es/components/material-runbox/hooks/index.d.ts +3 -0
  114. package/es/components/material-runbox/hooks/index.js +3 -0
  115. package/es/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
  116. package/es/components/material-runbox/hooks/useRunboxControl.js +43 -14
  117. package/es/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
  118. package/es/components/material-runbox/hooks/useRunboxDiskUsage.js +42 -0
  119. package/es/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
  120. package/es/components/material-runbox/hooks/useRunboxNetworkStatus.js +59 -0
  121. package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
  122. package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.js +63 -0
  123. package/es/components/material-runbox/locales/en.json.js +1 -1
  124. package/es/components/material-runbox/locales/ja.json.js +1 -1
  125. package/es/components/material-runbox/locales/ko.json.js +1 -1
  126. package/es/components/material-runbox/locales/th.json.js +1 -1
  127. package/es/components/material-runbox/runtime/Runtime.js +22 -19
  128. package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
  129. package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
  130. package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
  131. package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +7 -55
  132. package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
  133. package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.js +69 -65
  134. package/es/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
  135. package/es/components/material-runbox/runtime/RuntimeOverlayLoading.js +275 -0
  136. package/es/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
  137. package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +7 -65
  138. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
  139. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +82 -60
  140. package/es/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
  141. package/es/components/material-runbox/runtime/runtime-loading-tips.js +146 -0
  142. package/es/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
  143. package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +109 -0
  144. package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
  145. package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +31 -0
  146. package/es/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
  147. package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +157 -0
  148. package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
  149. package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +37 -0
  150. package/es/components/material-runbox/status/index.d.ts +4 -0
  151. package/es/components/material-runbox/status/index.js +2 -0
  152. package/es/components/material-runbox/theme.d.ts +2 -0
  153. package/es/components/material-runbox/theme.js +12 -0
  154. package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
  155. package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +121 -0
  156. package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
  157. package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +52 -0
  158. package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
  159. package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +122 -0
  160. package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
  161. package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +46 -0
  162. package/es/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
  163. package/es/components/material-runbox/timer/MaterialRunboxTimer.js +25 -17
  164. package/es/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +18 -78
  165. package/es/components/shared/hooks/index.d.ts +1 -0
  166. package/es/components/shared/hooks/index.js +1 -0
  167. package/es/components/shared/hooks/useBreakpoint.d.ts +4 -0
  168. package/es/components/shared/hooks/useBreakpoint.js +10 -0
  169. package/package.json +7 -7
  170. package/cjs/assets/queue.gif.js +0 -7
  171. package/cjs/assets/runbox_logo.png.js +0 -7
  172. package/cjs/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
  173. package/cjs/components/material-runbox/MaterialRunboxFooter.js +0 -64
  174. package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
  175. package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -98
  176. package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
  177. package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.js +0 -90
  178. package/es/assets/queue.gif.js +0 -3
  179. package/es/assets/runbox_logo.png.js +0 -3
  180. package/es/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
  181. package/es/components/material-runbox/MaterialRunboxFooter.js +0 -56
  182. package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
  183. package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -94
  184. package/es/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
  185. package/es/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.js +0 -86
@@ -8,10 +8,10 @@ var React = require('react');
8
8
  var apiClient = require('@elice/api-client');
9
9
  var intl = require('@elice/intl');
10
10
  var muiElements = require('@elice/mui-elements');
11
- var muiSystem = require('@elice/mui-system');
12
11
  var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
13
12
  var material = require('@mui/material');
14
13
  var reactQuery = require('@tanstack/react-query');
14
+ var theme = require('../theme.js');
15
15
  var RuntimeChangeMaterialDialog = require('./RuntimeChangeMaterialDialog.js');
16
16
  var terminated = require('../../../assets/terminated.png.js');
17
17
  var en = require('../locales/en.json.js');
@@ -28,8 +28,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
28
28
  var RuntimeOverlayConflicted = function RuntimeOverlayConflicted(_ref) {
29
29
  var intl = _ref.__intl,
30
30
  courseId = _ref.courseId,
31
- runningRunbox = _ref.runningRunbox,
32
- startRuntime = _ref.startRuntime;
31
+ runningRunbox = _ref.runningRunbox;
33
32
  var _React$useState = React__default.default.useState(false),
34
33
  _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
35
34
  isChangeMaterialDialogOpen = _React$useState2[0],
@@ -101,7 +100,7 @@ var RuntimeOverlayConflicted = function RuntimeOverlayConflicted(_ref) {
101
100
  width: '32rem',
102
101
  maxWidth: '100%',
103
102
  padding: '1rem',
104
- color: 'text.primary.contrastText',
103
+ color: 'text.primary',
105
104
  bgcolor: 'grey.100',
106
105
  cursor: runningRunboxLinkProps ? 'pointer' : 'default',
107
106
  '&:hover': {
@@ -114,10 +113,10 @@ var RuntimeOverlayConflicted = function RuntimeOverlayConflicted(_ref) {
114
113
  direction: "column",
115
114
  alignItems: "flex-start",
116
115
  children: [courseId !== runningCourse.id ? jsxRuntime.jsx(material.Typography, {
117
- color: "text.tertiary.contrastText",
116
+ color: "text.tertiary",
118
117
  children: runningCourse === null || runningCourse === void 0 ? void 0 : runningCourse.title
119
118
  }) : null, jsxRuntime.jsx(material.Typography, {
120
- color: "text.primary.contrastText",
119
+ color: "text.primary",
121
120
  children: runningRunbox.title
122
121
  })]
123
122
  })
@@ -130,13 +129,15 @@ var RuntimeOverlayConflicted = function RuntimeOverlayConflicted(_ref) {
130
129
  if (!isChangeMaterialDialogOpen) {
131
130
  return null;
132
131
  }
133
- return jsxRuntime.jsx(RuntimeChangeMaterialDialog.default, {
134
- intl: intl,
135
- open: isChangeMaterialDialogOpen,
136
- startRuntime: startRuntime,
137
- onClose: function onClose() {
138
- return setChangeMaterialDialogOpen(false);
139
- }
132
+ return jsxRuntime.jsx(material.ThemeProvider, {
133
+ theme: theme.runboxDarkTheme,
134
+ children: jsxRuntime.jsx(RuntimeChangeMaterialDialog.default, {
135
+ intl: intl,
136
+ open: isChangeMaterialDialogOpen,
137
+ onClose: function onClose() {
138
+ return setChangeMaterialDialogOpen(false);
139
+ }
140
+ })
140
141
  });
141
142
  };
142
143
  /**
@@ -149,58 +150,61 @@ var RuntimeOverlayConflicted = function RuntimeOverlayConflicted(_ref) {
149
150
  //
150
151
  //
151
152
  var renderOverlay = function renderOverlay() {
152
- return jsxRuntime.jsx(material.Box, {
153
- sx: {
154
- display: 'flex',
155
- justifyContent: 'center',
156
- alignItems: 'center',
157
- width: '100%',
158
- height: '100%'
159
- },
160
- children: jsxRuntime.jsxs(material.Stack, {
161
- gap: "1.5rem",
162
- alignItems: "center",
163
- children: [jsxRuntime.jsx(material.Box, {
164
- component: "img",
165
- src: terminated.default,
166
- alt: "terminated",
167
- sx: {
168
- maxWidth: '10rem',
169
- height: 'auto'
170
- }
171
- }), jsxRuntime.jsx(material.Typography, {
172
- variant: "h6",
173
- textAlign: "center",
174
- children: intl.formatMessage({
175
- id: 'runbox.runtime.overlay.conflicted.title'
176
- })
177
- }), renderNavButton(), jsxRuntime.jsx(material.Typography, {
178
- variant: "body1",
179
- textAlign: "center",
180
- whiteSpace: "pre-line",
181
- children: intl.formatMessage({
182
- id: 'runbox.runtime.overlay.conflicted.description'
183
- })
184
- }), jsxRuntime.jsx(material.Button, {
185
- variant: "contained",
186
- color: "primary",
187
- startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
188
- icon: proSolidSvgIcons.faLinkSimple
189
- }),
190
- sx: {
191
- width: '20rem',
192
- maxWidth: '100%',
193
- color: 'text.primary',
194
- bgcolor: muiSystem.colors.elicepurple[700],
195
- '&:hover': {
196
- bgcolor: muiSystem.colors.elicepurple[800]
153
+ return jsxRuntime.jsx(material.ThemeProvider, {
154
+ theme: theme.runboxLightTheme,
155
+ children: jsxRuntime.jsx(material.Box, {
156
+ sx: {
157
+ display: 'flex',
158
+ justifyContent: 'center',
159
+ alignItems: 'center',
160
+ width: '100%',
161
+ height: '100%',
162
+ backgroundColor: 'background.paper',
163
+ color: 'text.primary'
164
+ },
165
+ children: jsxRuntime.jsxs(material.Stack, {
166
+ gap: "1.5rem",
167
+ alignItems: "center",
168
+ children: [jsxRuntime.jsx(material.Box, {
169
+ component: "img",
170
+ src: terminated.default,
171
+ alt: "terminated",
172
+ sx: {
173
+ maxWidth: '10rem',
174
+ height: 'auto'
197
175
  }
198
- },
199
- onClick: handleClickConnect,
200
- children: intl.formatMessage({
201
- id: 'runbox.common.connect'
202
- })
203
- })]
176
+ }), jsxRuntime.jsx(material.Typography, {
177
+ variant: "h6",
178
+ textAlign: "center",
179
+ children: intl.formatMessage({
180
+ id: 'runbox.runtime.overlay.conflicted.title'
181
+ })
182
+ }), renderNavButton(), jsxRuntime.jsx(material.Typography, {
183
+ variant: "body1",
184
+ textAlign: "center",
185
+ whiteSpace: "pre-line",
186
+ children: intl.formatMessage({
187
+ id: 'runbox.runtime.overlay.conflicted.description'
188
+ })
189
+ }), jsxRuntime.jsx(material.Box, {
190
+ sx: {
191
+ width: '20rem',
192
+ maxWidth: '100%'
193
+ },
194
+ children: jsxRuntime.jsx(material.Button, {
195
+ fullWidth: true,
196
+ variant: "contained",
197
+ color: "primary",
198
+ startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
199
+ icon: proSolidSvgIcons.faLinkSimple
200
+ }),
201
+ onClick: handleClickConnect,
202
+ children: intl.formatMessage({
203
+ id: 'runbox.common.connect'
204
+ })
205
+ })
206
+ })]
207
+ })
204
208
  })
205
209
  });
206
210
  };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { WithIntlComponentBuilderProps } from '@elice/intl';
3
+ export interface RuntimeOverlayLoadingProps {
4
+ activeStep: 1 | 2 | 3;
5
+ /** Container image name, which picks the tips shown while the runbox starts. */
6
+ containerImageName?: string;
7
+ }
8
+ declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<RuntimeOverlayLoadingProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
9
+ export default _default;
@@ -0,0 +1,283 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var React = require('react');
8
+ var reactUse = require('react-use');
9
+ var intl = require('@elice/intl');
10
+ var muiElements = require('@elice/mui-elements');
11
+ var muiSystem = require('@elice/mui-system');
12
+ var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
13
+ var material = require('@mui/material');
14
+ var theme = require('../theme.js');
15
+ var runtimeLoadingTips = require('./runtime-loading-tips.js');
16
+ var runboxLoading = require('../../../assets/runbox-loading.svg.js');
17
+ var en = require('../locales/en.json.js');
18
+ var ko = require('../locales/ko.json.js');
19
+
20
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
23
+
24
+ //
25
+ //
26
+ //
27
+ var STEPS = [{
28
+ labelId: 'runbox.runtime.loading.step.prepare',
29
+ progressId: 'runbox.runtime.loading.step.prepare_progress'
30
+ }, {
31
+ labelId: 'runbox.runtime.loading.step.connect',
32
+ progressId: 'runbox.runtime.loading.step.connect_progress'
33
+ }, {
34
+ labelId: 'runbox.runtime.loading.step.material',
35
+ progressId: 'runbox.runtime.loading.step.material_progress'
36
+ }];
37
+ var STEP_STATUS_ID = Object.freeze({
38
+ completed: 'runbox.runtime.loading.step.status.completed',
39
+ active: 'runbox.runtime.loading.step.status.active',
40
+ pending: 'runbox.runtime.loading.step.status.pending'
41
+ });
42
+ /** Two tips fit side by side, and one pair holds long enough to read. */
43
+ var TIPS_PER_PAGE = 2;
44
+ var PAGE_DURATION_MS = 7000;
45
+ //
46
+ //
47
+ //
48
+ var RuntimeOverlayLoading = function RuntimeOverlayLoading(_ref) {
49
+ var intl = _ref.__intl,
50
+ activeStep = _ref.activeStep,
51
+ containerImageName = _ref.containerImageName;
52
+ var _React$useState = React__default.default.useState(0),
53
+ _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
54
+ page = _React$useState2[0],
55
+ setPage = _React$useState2[1];
56
+ var tips = runtimeLoadingTips.getRuntimeLoadingTips(containerImageName);
57
+ var shownTips = tips.slice(page * TIPS_PER_PAGE, page * TIPS_PER_PAGE + TIPS_PER_PAGE);
58
+ var pageCount = Math.floor(tips.length / TIPS_PER_PAGE);
59
+ //
60
+ //
61
+ //
62
+ reactUse.useInterval(function () {
63
+ return setPage(function (current) {
64
+ return (current + 1) % pageCount;
65
+ });
66
+ }, pageCount > 1 ? PAGE_DURATION_MS : null);
67
+ //
68
+ //
69
+ //
70
+ return jsxRuntime.jsx(material.ThemeProvider, {
71
+ theme: theme.runboxLightTheme,
72
+ children: jsxRuntime.jsxs(material.Stack, {
73
+ sx: {
74
+ width: '100%',
75
+ height: '100%',
76
+ padding: {
77
+ xs: '1.5rem',
78
+ sm: '2.5rem'
79
+ },
80
+ gap: '2.5rem',
81
+ overflow: 'auto',
82
+ backgroundColor: 'background.paper',
83
+ color: 'text.primary'
84
+ },
85
+ children: [jsxRuntime.jsxs(material.Stack, {
86
+ direction: {
87
+ xs: 'column',
88
+ md: 'row'
89
+ },
90
+ sx: {
91
+ flex: 1,
92
+ justifyContent: 'center',
93
+ alignItems: 'center',
94
+ gap: {
95
+ xs: '1rem',
96
+ md: '2rem'
97
+ }
98
+ },
99
+ children: [jsxRuntime.jsxs(material.Stack, {
100
+ sx: {
101
+ width: '100%',
102
+ maxWidth: '30rem',
103
+ flex: {
104
+ md: '1 1 0'
105
+ },
106
+ gap: '1.5rem'
107
+ },
108
+ children: [jsxRuntime.jsxs(material.Stack, {
109
+ gap: "0.5rem",
110
+ children: [jsxRuntime.jsx(material.Typography, {
111
+ variant: "h4",
112
+ color: "text.primary",
113
+ children: intl.formatMessage({
114
+ id: 'runbox.runtime.loading.title'
115
+ })
116
+ }), jsxRuntime.jsx(material.Typography, {
117
+ variant: "body1",
118
+ color: "text.secondary",
119
+ children: intl.formatMessage({
120
+ id: 'runbox.runtime.loading.description'
121
+ })
122
+ })]
123
+ }), jsxRuntime.jsx(material.Stack, {
124
+ children: STEPS.map(function (step, index) {
125
+ var stepNumber = index + 1;
126
+ var isActive = stepNumber === activeStep;
127
+ var isCompleted = stepNumber < activeStep;
128
+ return jsxRuntime.jsxs(material.Stack, {
129
+ direction: "row",
130
+ sx: {
131
+ alignItems: 'center',
132
+ gap: '0.75rem',
133
+ padding: '0.625rem 0.75rem',
134
+ borderRadius: '0.5rem',
135
+ backgroundColor: isActive ? material.alpha(muiSystem.colors.elicepurple[700], 0.04) : 'transparent'
136
+ },
137
+ children: [jsxRuntime.jsx(material.Box, {
138
+ sx: {
139
+ display: 'flex',
140
+ justifyContent: 'center',
141
+ alignItems: 'center',
142
+ width: '1rem'
143
+ },
144
+ children: isActive ? jsxRuntime.jsx(material.CircularProgress, {
145
+ size: "1rem",
146
+ sx: {
147
+ color: muiSystem.colors.elicepurple[700]
148
+ }
149
+ }) : isCompleted ? jsxRuntime.jsx(muiElements.EliceIcon, {
150
+ icon: proSolidSvgIcons.faCheck,
151
+ sx: {
152
+ fontSize: '1rem',
153
+ color: muiSystem.colors.elicepurple[700]
154
+ }
155
+ }) : jsxRuntime.jsx(material.Typography, {
156
+ variant: "body2",
157
+ color: "text.tertiary",
158
+ children: stepNumber
159
+ })
160
+ }), jsxRuntime.jsx(material.Typography, {
161
+ variant: "body2",
162
+ fontWeight: isActive ? 700 : 500,
163
+ color: isActive ? 'text.primary' : 'text.secondary',
164
+ sx: {
165
+ flex: 1
166
+ },
167
+ children: intl.formatMessage({
168
+ id: step.labelId
169
+ })
170
+ }), jsxRuntime.jsx(material.Typography, {
171
+ variant: "caption",
172
+ color: "text.tertiary",
173
+ whiteSpace: "nowrap",
174
+ children: intl.formatMessage({
175
+ id: isCompleted ? STEP_STATUS_ID.completed : isActive ? STEP_STATUS_ID.active : STEP_STATUS_ID.pending
176
+ })
177
+ })]
178
+ }, step.labelId);
179
+ })
180
+ }), jsxRuntime.jsxs(material.Stack, {
181
+ direction: "row",
182
+ sx: {
183
+ alignItems: 'center',
184
+ gap: '0.75rem'
185
+ },
186
+ children: [jsxRuntime.jsx(material.LinearProgress, {
187
+ variant: "determinate",
188
+ value: activeStep / STEPS.length * 100,
189
+ sx: _rollupPluginBabelHelpers.defineProperty({
190
+ flex: 1,
191
+ height: '0.25rem',
192
+ borderRadius: '0.25rem',
193
+ backgroundColor: material.alpha(muiSystem.colors.elicepurple[700], 0.2)
194
+ }, "& .MuiLinearProgress-bar", {
195
+ backgroundColor: muiSystem.colors.elicepurple[700]
196
+ })
197
+ }), jsxRuntime.jsx(material.Typography, {
198
+ variant: "caption",
199
+ color: "text.tertiary",
200
+ whiteSpace: "nowrap",
201
+ children: intl.formatMessage({
202
+ id: STEPS[activeStep - 1].progressId
203
+ }, {
204
+ current: activeStep,
205
+ total: STEPS.length
206
+ })
207
+ })]
208
+ })]
209
+ }), jsxRuntime.jsx(material.Box, {
210
+ sx: {
211
+ display: 'flex',
212
+ justifyContent: 'center',
213
+ alignItems: 'center',
214
+ flex: {
215
+ md: 1
216
+ }
217
+ },
218
+ children: jsxRuntime.jsx(material.Box, {
219
+ component: "img",
220
+ src: runboxLoading.default,
221
+ alt: intl.formatMessage({
222
+ id: 'runbox.runtime.loading.illustration_alt'
223
+ }),
224
+ sx: {
225
+ width: '100%',
226
+ maxWidth: {
227
+ xs: '9.625rem',
228
+ md: '13rem'
229
+ },
230
+ height: 'auto'
231
+ }
232
+ })
233
+ })]
234
+ }), jsxRuntime.jsx(material.Fade, {
235
+ "in": true,
236
+ appear: page > 0,
237
+ children: jsxRuntime.jsx(material.Stack, {
238
+ direction: {
239
+ xs: 'column',
240
+ md: 'row'
241
+ },
242
+ gap: "1rem",
243
+ children: shownTips.map(function (tip) {
244
+ return jsxRuntime.jsxs(material.Stack, {
245
+ direction: "row",
246
+ sx: {
247
+ flex: 1,
248
+ gap: '0.75rem'
249
+ },
250
+ children: [jsxRuntime.jsx(muiElements.EliceIcon, {
251
+ icon: tip.icon,
252
+ sx: {
253
+ fontSize: '1.25rem',
254
+ color: 'text.secondary',
255
+ marginTop: '0.125rem'
256
+ }
257
+ }), jsxRuntime.jsxs(material.Stack, {
258
+ gap: "0.125rem",
259
+ children: [jsxRuntime.jsx(material.Typography, {
260
+ variant: "body1",
261
+ fontWeight: 700,
262
+ color: "text.primary",
263
+ children: intl.formatMessage({
264
+ id: tip.titleId
265
+ })
266
+ }), jsxRuntime.jsx(material.Typography, {
267
+ variant: "caption",
268
+ color: "text.tertiary",
269
+ children: intl.formatMessage({
270
+ id: tip.descriptionId
271
+ })
272
+ })]
273
+ })]
274
+ }, tip.titleId);
275
+ })
276
+ })
277
+ }, page)]
278
+ })
279
+ });
280
+ };
281
+ var RuntimeOverlayLoading$1 = new intl.IntlComponentBuilder(RuntimeOverlayLoading).add('en', en.default).add('ko', ko.default).addAsync('th', Promise.resolve().then(function () { return require('../locales/th.json.js'); })).addAsync('ja', Promise.resolve().then(function () { return require('../locales/ja.json.js'); })).build();
282
+
283
+ exports.default = RuntimeOverlayLoading$1;
@@ -1,5 +1,7 @@
1
- import type { WithIntlComponentBuilderProps } from '@elice/intl';
2
1
  import type { EliceRunboxViewerOverlayQueuedComponentProps as QueuedComponentProps } from '@elice/runbox-client';
3
2
  import type React from 'react';
4
- declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<QueuedComponentProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
5
- export default _default;
3
+ export interface RuntimeOverlayQueuedProps extends QueuedComponentProps {
4
+ containerImageName?: string;
5
+ }
6
+ declare const RuntimeOverlayQueued: React.FC<RuntimeOverlayQueuedProps>;
7
+ export default RuntimeOverlayQueued;
@@ -3,72 +3,14 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
- var intl = require('@elice/intl');
7
- var muiSystem = require('@elice/mui-system');
8
- var iconsMaterial = require('@mui/icons-material');
9
- var material = require('@mui/material');
10
- var queue = require('../../../assets/queue.gif.js');
11
- var en = require('../locales/en.json.js');
12
- var ko = require('../locales/ko.json.js');
13
- var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
6
+ var RuntimeOverlayLoading = require('./RuntimeOverlayLoading.js');
14
7
 
15
- //
16
- //
17
- //
18
8
  var RuntimeOverlayQueued = function RuntimeOverlayQueued(_ref) {
19
- var intl = _ref.__intl,
20
- numWaiters = _ref.numWaiters;
21
- var _useMaterialRunboxCon = MaterialRunboxContext.useMaterialRunboxContext(),
22
- showMessenger = _useMaterialRunboxCon.showMessenger;
23
- //
24
- //
25
- //
26
- return jsxRuntime.jsxs(material.Stack, {
27
- gap: "1.5rem",
28
- sx: {
29
- display: 'flex',
30
- justifyContent: 'center',
31
- alignItems: 'center',
32
- width: '100%',
33
- height: '100%'
34
- },
35
- children: [jsxRuntime.jsx(material.Box, {
36
- component: "img",
37
- src: queue.default,
38
- alt: "queue",
39
- sx: {
40
- width: '100%',
41
- height: 'auto',
42
- maxWidth: '13.375rem'
43
- }
44
- }), jsxRuntime.jsx(material.Typography, {
45
- variant: "subtitle2",
46
- color: "text:secondary",
47
- sx: {
48
- whiteSpace: 'pre-wrap',
49
- textAlign: 'center'
50
- },
51
- children: numWaiters > 0 ? intl.formatMessage({
52
- id: 'runbox.runtime.overlay.queued.description'
53
- }, {
54
- waiters: numWaiters
55
- }) : intl.formatMessage({
56
- id: 'runbox.runtime.overlay.queued.description_zero'
57
- })
58
- }), typeof showMessenger === 'function' ? jsxRuntime.jsx(material.Button, {
59
- variant: "outlined",
60
- startIcon: jsxRuntime.jsx(iconsMaterial.QuestionAnswer, {}),
61
- sx: {
62
- color: muiSystem.colors.elicepurple[700],
63
- borderColor: muiSystem.colors.elicepurple[700]
64
- },
65
- onClick: showMessenger,
66
- children: intl.formatMessage({
67
- id: 'runbox.common.support'
68
- })
69
- }) : null]
9
+ var containerImageName = _ref.containerImageName;
10
+ return jsxRuntime.jsx(RuntimeOverlayLoading.default, {
11
+ activeStep: 1,
12
+ containerImageName: containerImageName
70
13
  });
71
14
  };
72
- var RuntimeOverlayQueued$1 = new intl.IntlComponentBuilder(RuntimeOverlayQueued).add('en', en.default).add('ko', ko.default).addAsync('th', Promise.resolve().then(function () { return require('../locales/th.json.js'); })).addAsync('ja', Promise.resolve().then(function () { return require('../locales/ja.json.js'); })).build();
73
15
 
74
- exports.default = RuntimeOverlayQueued$1;
16
+ exports.default = RuntimeOverlayQueued;
@@ -2,7 +2,10 @@ import type { WithIntlComponentBuilderProps } from '@elice/intl';
2
2
  import type { EliceRunboxViewerOverlayTerminatedComponentProps as TerminatedComponentProps } from '@elice/runbox-client';
3
3
  import type React from 'react';
4
4
  interface RuntimeOverlayTerminatedProps extends TerminatedComponentProps {
5
- startRuntime: () => Promise<void>;
5
+ runtimeTemplateId: string;
6
+ courseId: number;
7
+ /** User ID for tutoring. */
8
+ studentUserId?: number;
6
9
  }
7
10
  declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<RuntimeOverlayTerminatedProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
8
11
  export default _default;