@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
@@ -0,0 +1,275 @@
1
+ import { slicedToArray as _slicedToArray, defineProperty as _defineProperty } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import React from 'react';
4
+ import { useInterval } from 'react-use';
5
+ import { IntlComponentBuilder } from '@elice/intl';
6
+ import { EliceIcon } from '@elice/mui-elements';
7
+ import { colors } from '@elice/mui-system';
8
+ import { faCheck } from '@fortawesome/pro-solid-svg-icons';
9
+ import { ThemeProvider, Stack, Typography, Box, CircularProgress, alpha, LinearProgress, Fade } from '@mui/material';
10
+ import { runboxLightTheme } from '../theme.js';
11
+ import { getRuntimeLoadingTips } from './runtime-loading-tips.js';
12
+ import img from '../../../assets/runbox-loading.svg.js';
13
+ import messageEn from '../locales/en.json.js';
14
+ import messageKo from '../locales/ko.json.js';
15
+
16
+ //
17
+ //
18
+ //
19
+ var STEPS = [{
20
+ labelId: 'runbox.runtime.loading.step.prepare',
21
+ progressId: 'runbox.runtime.loading.step.prepare_progress'
22
+ }, {
23
+ labelId: 'runbox.runtime.loading.step.connect',
24
+ progressId: 'runbox.runtime.loading.step.connect_progress'
25
+ }, {
26
+ labelId: 'runbox.runtime.loading.step.material',
27
+ progressId: 'runbox.runtime.loading.step.material_progress'
28
+ }];
29
+ var STEP_STATUS_ID = Object.freeze({
30
+ completed: 'runbox.runtime.loading.step.status.completed',
31
+ active: 'runbox.runtime.loading.step.status.active',
32
+ pending: 'runbox.runtime.loading.step.status.pending'
33
+ });
34
+ /** Two tips fit side by side, and one pair holds long enough to read. */
35
+ var TIPS_PER_PAGE = 2;
36
+ var PAGE_DURATION_MS = 7000;
37
+ //
38
+ //
39
+ //
40
+ var RuntimeOverlayLoading = function RuntimeOverlayLoading(_ref) {
41
+ var intl = _ref.__intl,
42
+ activeStep = _ref.activeStep,
43
+ containerImageName = _ref.containerImageName;
44
+ var _React$useState = React.useState(0),
45
+ _React$useState2 = _slicedToArray(_React$useState, 2),
46
+ page = _React$useState2[0],
47
+ setPage = _React$useState2[1];
48
+ var tips = getRuntimeLoadingTips(containerImageName);
49
+ var shownTips = tips.slice(page * TIPS_PER_PAGE, page * TIPS_PER_PAGE + TIPS_PER_PAGE);
50
+ var pageCount = Math.floor(tips.length / TIPS_PER_PAGE);
51
+ //
52
+ //
53
+ //
54
+ useInterval(function () {
55
+ return setPage(function (current) {
56
+ return (current + 1) % pageCount;
57
+ });
58
+ }, pageCount > 1 ? PAGE_DURATION_MS : null);
59
+ //
60
+ //
61
+ //
62
+ return jsx(ThemeProvider, {
63
+ theme: runboxLightTheme,
64
+ children: jsxs(Stack, {
65
+ sx: {
66
+ width: '100%',
67
+ height: '100%',
68
+ padding: {
69
+ xs: '1.5rem',
70
+ sm: '2.5rem'
71
+ },
72
+ gap: '2.5rem',
73
+ overflow: 'auto',
74
+ backgroundColor: 'background.paper',
75
+ color: 'text.primary'
76
+ },
77
+ children: [jsxs(Stack, {
78
+ direction: {
79
+ xs: 'column',
80
+ md: 'row'
81
+ },
82
+ sx: {
83
+ flex: 1,
84
+ justifyContent: 'center',
85
+ alignItems: 'center',
86
+ gap: {
87
+ xs: '1rem',
88
+ md: '2rem'
89
+ }
90
+ },
91
+ children: [jsxs(Stack, {
92
+ sx: {
93
+ width: '100%',
94
+ maxWidth: '30rem',
95
+ flex: {
96
+ md: '1 1 0'
97
+ },
98
+ gap: '1.5rem'
99
+ },
100
+ children: [jsxs(Stack, {
101
+ gap: "0.5rem",
102
+ children: [jsx(Typography, {
103
+ variant: "h4",
104
+ color: "text.primary",
105
+ children: intl.formatMessage({
106
+ id: 'runbox.runtime.loading.title'
107
+ })
108
+ }), jsx(Typography, {
109
+ variant: "body1",
110
+ color: "text.secondary",
111
+ children: intl.formatMessage({
112
+ id: 'runbox.runtime.loading.description'
113
+ })
114
+ })]
115
+ }), jsx(Stack, {
116
+ children: STEPS.map(function (step, index) {
117
+ var stepNumber = index + 1;
118
+ var isActive = stepNumber === activeStep;
119
+ var isCompleted = stepNumber < activeStep;
120
+ return jsxs(Stack, {
121
+ direction: "row",
122
+ sx: {
123
+ alignItems: 'center',
124
+ gap: '0.75rem',
125
+ padding: '0.625rem 0.75rem',
126
+ borderRadius: '0.5rem',
127
+ backgroundColor: isActive ? alpha(colors.elicepurple[700], 0.04) : 'transparent'
128
+ },
129
+ children: [jsx(Box, {
130
+ sx: {
131
+ display: 'flex',
132
+ justifyContent: 'center',
133
+ alignItems: 'center',
134
+ width: '1rem'
135
+ },
136
+ children: isActive ? jsx(CircularProgress, {
137
+ size: "1rem",
138
+ sx: {
139
+ color: colors.elicepurple[700]
140
+ }
141
+ }) : isCompleted ? jsx(EliceIcon, {
142
+ icon: faCheck,
143
+ sx: {
144
+ fontSize: '1rem',
145
+ color: colors.elicepurple[700]
146
+ }
147
+ }) : jsx(Typography, {
148
+ variant: "body2",
149
+ color: "text.tertiary",
150
+ children: stepNumber
151
+ })
152
+ }), jsx(Typography, {
153
+ variant: "body2",
154
+ fontWeight: isActive ? 700 : 500,
155
+ color: isActive ? 'text.primary' : 'text.secondary',
156
+ sx: {
157
+ flex: 1
158
+ },
159
+ children: intl.formatMessage({
160
+ id: step.labelId
161
+ })
162
+ }), jsx(Typography, {
163
+ variant: "caption",
164
+ color: "text.tertiary",
165
+ whiteSpace: "nowrap",
166
+ children: intl.formatMessage({
167
+ id: isCompleted ? STEP_STATUS_ID.completed : isActive ? STEP_STATUS_ID.active : STEP_STATUS_ID.pending
168
+ })
169
+ })]
170
+ }, step.labelId);
171
+ })
172
+ }), jsxs(Stack, {
173
+ direction: "row",
174
+ sx: {
175
+ alignItems: 'center',
176
+ gap: '0.75rem'
177
+ },
178
+ children: [jsx(LinearProgress, {
179
+ variant: "determinate",
180
+ value: activeStep / STEPS.length * 100,
181
+ sx: _defineProperty({
182
+ flex: 1,
183
+ height: '0.25rem',
184
+ borderRadius: '0.25rem',
185
+ backgroundColor: alpha(colors.elicepurple[700], 0.2)
186
+ }, "& .MuiLinearProgress-bar", {
187
+ backgroundColor: colors.elicepurple[700]
188
+ })
189
+ }), jsx(Typography, {
190
+ variant: "caption",
191
+ color: "text.tertiary",
192
+ whiteSpace: "nowrap",
193
+ children: intl.formatMessage({
194
+ id: STEPS[activeStep - 1].progressId
195
+ }, {
196
+ current: activeStep,
197
+ total: STEPS.length
198
+ })
199
+ })]
200
+ })]
201
+ }), jsx(Box, {
202
+ sx: {
203
+ display: 'flex',
204
+ justifyContent: 'center',
205
+ alignItems: 'center',
206
+ flex: {
207
+ md: 1
208
+ }
209
+ },
210
+ children: jsx(Box, {
211
+ component: "img",
212
+ src: img,
213
+ alt: intl.formatMessage({
214
+ id: 'runbox.runtime.loading.illustration_alt'
215
+ }),
216
+ sx: {
217
+ width: '100%',
218
+ maxWidth: {
219
+ xs: '9.625rem',
220
+ md: '13rem'
221
+ },
222
+ height: 'auto'
223
+ }
224
+ })
225
+ })]
226
+ }), jsx(Fade, {
227
+ "in": true,
228
+ appear: page > 0,
229
+ children: jsx(Stack, {
230
+ direction: {
231
+ xs: 'column',
232
+ md: 'row'
233
+ },
234
+ gap: "1rem",
235
+ children: shownTips.map(function (tip) {
236
+ return jsxs(Stack, {
237
+ direction: "row",
238
+ sx: {
239
+ flex: 1,
240
+ gap: '0.75rem'
241
+ },
242
+ children: [jsx(EliceIcon, {
243
+ icon: tip.icon,
244
+ sx: {
245
+ fontSize: '1.25rem',
246
+ color: 'text.secondary',
247
+ marginTop: '0.125rem'
248
+ }
249
+ }), jsxs(Stack, {
250
+ gap: "0.125rem",
251
+ children: [jsx(Typography, {
252
+ variant: "body1",
253
+ fontWeight: 700,
254
+ color: "text.primary",
255
+ children: intl.formatMessage({
256
+ id: tip.titleId
257
+ })
258
+ }), jsx(Typography, {
259
+ variant: "caption",
260
+ color: "text.tertiary",
261
+ children: intl.formatMessage({
262
+ id: tip.descriptionId
263
+ })
264
+ })]
265
+ })]
266
+ }, tip.titleId);
267
+ })
268
+ })
269
+ }, page)]
270
+ })
271
+ });
272
+ };
273
+ var RuntimeOverlayLoading$1 = new IntlComponentBuilder(RuntimeOverlayLoading).add('en', messageEn).add('ko', messageKo).addAsync('th', import('../locales/th.json.js')).addAsync('ja', import('../locales/ja.json.js')).build();
274
+
275
+ export { RuntimeOverlayLoading$1 as default };
@@ -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;
@@ -1,70 +1,12 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { IntlComponentBuilder } from '@elice/intl';
3
- import { colors } from '@elice/mui-system';
4
- import { QuestionAnswer } from '@mui/icons-material';
5
- import { Stack, Box, Typography, Button } from '@mui/material';
6
- import img from '../../../assets/queue.gif.js';
7
- import messageEn from '../locales/en.json.js';
8
- import messageKo from '../locales/ko.json.js';
9
- import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import RuntimeOverlayLoading from './RuntimeOverlayLoading.js';
10
3
 
11
- //
12
- //
13
- //
14
4
  var RuntimeOverlayQueued = function RuntimeOverlayQueued(_ref) {
15
- var intl = _ref.__intl,
16
- numWaiters = _ref.numWaiters;
17
- var _useMaterialRunboxCon = useMaterialRunboxContext(),
18
- showMessenger = _useMaterialRunboxCon.showMessenger;
19
- //
20
- //
21
- //
22
- return jsxs(Stack, {
23
- gap: "1.5rem",
24
- sx: {
25
- display: 'flex',
26
- justifyContent: 'center',
27
- alignItems: 'center',
28
- width: '100%',
29
- height: '100%'
30
- },
31
- children: [jsx(Box, {
32
- component: "img",
33
- src: img,
34
- alt: "queue",
35
- sx: {
36
- width: '100%',
37
- height: 'auto',
38
- maxWidth: '13.375rem'
39
- }
40
- }), jsx(Typography, {
41
- variant: "subtitle2",
42
- color: "text:secondary",
43
- sx: {
44
- whiteSpace: 'pre-wrap',
45
- textAlign: 'center'
46
- },
47
- children: numWaiters > 0 ? intl.formatMessage({
48
- id: 'runbox.runtime.overlay.queued.description'
49
- }, {
50
- waiters: numWaiters
51
- }) : intl.formatMessage({
52
- id: 'runbox.runtime.overlay.queued.description_zero'
53
- })
54
- }), typeof showMessenger === 'function' ? jsx(Button, {
55
- variant: "outlined",
56
- startIcon: jsx(QuestionAnswer, {}),
57
- sx: {
58
- color: colors.elicepurple[700],
59
- borderColor: colors.elicepurple[700]
60
- },
61
- onClick: showMessenger,
62
- children: intl.formatMessage({
63
- id: 'runbox.common.support'
64
- })
65
- }) : null]
5
+ var containerImageName = _ref.containerImageName;
6
+ return jsx(RuntimeOverlayLoading, {
7
+ activeStep: 1,
8
+ containerImageName: containerImageName
66
9
  });
67
10
  };
68
- var RuntimeOverlayQueued$1 = new IntlComponentBuilder(RuntimeOverlayQueued).add('en', messageEn).add('ko', messageKo).addAsync('th', import('../locales/th.json.js')).addAsync('ja', import('../locales/ja.json.js')).build();
69
11
 
70
- export { RuntimeOverlayQueued$1 as default };
12
+ export { RuntimeOverlayQueued as default };
@@ -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;
@@ -1,14 +1,16 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { IntlComponentBuilder } from '@elice/intl';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
3
3
  import { EliceIcon } from '@elice/mui-elements';
4
- import { colors } from '@elice/mui-system';
5
4
  import { useEliceRunboxQuota } from '@elice/runbox-client';
6
- import { faLinkSimple } from '@fortawesome/pro-solid-svg-icons';
7
- import { Box, Stack, Typography, Button, Card, Divider } from '@mui/material';
5
+ import { faArrowsRotate, faLinkSimple } from '@fortawesome/pro-solid-svg-icons';
6
+ import { ThemeProvider, Box, Stack, Typography, Button, Card, Divider } from '@mui/material';
7
+ import { runboxLightTheme } from '../theme.js';
8
8
  import img from '../../../assets/terminated.png.js';
9
9
  import messageEn from '../locales/en.json.js';
10
10
  import messageKo from '../locales/ko.json.js';
11
+ import { useMaterialRunboxControlContext } from '../contexts/MaterialRunboxControlContext.js';
11
12
  import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
13
+ import MaterialRunboxEnvResetButton from '../disk/MaterialRunboxEnvResetButton.js';
12
14
 
13
15
  //
14
16
  //
@@ -16,11 +18,15 @@ import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
16
18
  var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
17
19
  var intl = _ref.__intl,
18
20
  reason = _ref.reason,
19
- startRuntime = _ref.startRuntime;
21
+ runtimeTemplateId = _ref.runtimeTemplateId,
22
+ courseId = _ref.courseId,
23
+ studentUserId = _ref.studentUserId;
20
24
  var _useEliceRunboxQuota = useEliceRunboxQuota(),
21
25
  quotaInfo = _useEliceRunboxQuota.quotaInfo;
22
- var _useMaterialRunboxCon = useMaterialRunboxContext(),
23
- showMessenger = _useMaterialRunboxCon.showMessenger;
26
+ var _useMaterialRunboxCon = useMaterialRunboxControlContext(),
27
+ startRuntime = _useMaterialRunboxCon.start;
28
+ var _useMaterialRunboxCon2 = useMaterialRunboxContext(),
29
+ showMessenger = _useMaterialRunboxCon2.showMessenger;
24
30
  /**
25
31
  *
26
32
  */
@@ -31,23 +37,22 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
31
37
  *
32
38
  */
33
39
  var renderConnectButton = function renderConnectButton() {
34
- return jsx(Button, {
35
- variant: "contained",
36
- startIcon: jsx(EliceIcon, {
37
- icon: faLinkSimple
38
- }),
40
+ return jsx(Box, {
39
41
  sx: {
40
42
  width: '20rem',
41
- maxWidth: '100%',
42
- color: 'text.primary',
43
- bgcolor: colors.elicepurple[700],
44
- '&:hover': {
45
- bgcolor: colors.elicepurple[800]
46
- }
43
+ maxWidth: '100%'
47
44
  },
48
- onClick: handleClickConnect,
49
- children: intl.formatMessage({
50
- id: 'runbox.runtime.overlay.terminated.connect'
45
+ children: jsx(Button, {
46
+ fullWidth: true,
47
+ variant: "contained",
48
+ color: "primary",
49
+ startIcon: jsx(EliceIcon, {
50
+ icon: faLinkSimple
51
+ }),
52
+ onClick: handleClickConnect,
53
+ children: intl.formatMessage({
54
+ id: 'runbox.runtime.overlay.terminated.connect'
55
+ })
51
56
  })
52
57
  });
53
58
  };
@@ -58,9 +63,6 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
58
63
  return jsx(Button, {
59
64
  variant: "text",
60
65
  color: "primary",
61
- sx: {
62
- color: colors.elicepurple[700]
63
- },
64
66
  onClick: showMessenger,
65
67
  children: intl.formatMessage({
66
68
  id: 'runbox.runtime.overlay.terminated.contact'
@@ -76,7 +78,7 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
76
78
  sx: {
77
79
  width: '20rem',
78
80
  maxWidth: '100%',
79
- color: 'secondary.contrastText',
81
+ color: 'text.primary',
80
82
  bgcolor: 'grey.100',
81
83
  padding: '1rem'
82
84
  },
@@ -110,37 +112,51 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
110
112
  *
111
113
  */
112
114
  var renderOverlay = function renderOverlay(args) {
113
- return jsx(Box, {
114
- sx: {
115
- display: 'flex',
116
- justifyContent: 'center',
117
- alignItems: 'center',
118
- width: '100%',
119
- height: '100%'
120
- },
121
- children: jsxs(Stack, {
122
- gap: "1.5rem",
123
- alignItems: "center",
124
- children: [jsx(Box, {
125
- component: "img",
126
- src: img,
127
- alt: "terminated",
128
- sx: {
129
- maxWidth: '10rem',
130
- height: 'auto'
131
- }
132
- }), jsx(Typography, {
133
- variant: "h6",
134
- textAlign: "center",
135
- children: args.title
136
- }), jsx(Typography, {
137
- variant: "body1",
138
- textAlign: "center",
139
- whiteSpace: "pre-line",
140
- children: args.description
141
- }), args.body]
115
+ return (
116
+ // EliceRunboxView shadows the consumer intl context with the runbox-client
117
+ // bundle, so re-provide this package's messages for descendants that call
118
+ // useRawEliceIntl (e.g. MaterialRunboxEnvResetButton and its dialog).
119
+ jsx(RawEliceIntlProvider, {
120
+ value: intl,
121
+ children: jsx(ThemeProvider, {
122
+ theme: runboxLightTheme,
123
+ children: jsx(Box, {
124
+ sx: {
125
+ display: 'flex',
126
+ justifyContent: 'center',
127
+ alignItems: 'center',
128
+ width: '100%',
129
+ height: '100%',
130
+ backgroundColor: 'background.paper',
131
+ color: 'text.primary'
132
+ },
133
+ children: jsxs(Stack, {
134
+ gap: "1.5rem",
135
+ alignItems: "center",
136
+ children: [jsx(Box, {
137
+ component: "img",
138
+ src: img,
139
+ alt: "terminated",
140
+ sx: {
141
+ maxWidth: '10rem',
142
+ height: 'auto'
143
+ }
144
+ }), jsx(Typography, {
145
+ variant: "h6",
146
+ textAlign: "center",
147
+ whiteSpace: "pre-line",
148
+ children: args.title
149
+ }), jsx(Typography, {
150
+ variant: "body1",
151
+ textAlign: "center",
152
+ whiteSpace: "pre-line",
153
+ children: args.description
154
+ }), args.body]
155
+ })
156
+ })
157
+ })
142
158
  })
143
- });
159
+ );
144
160
  };
145
161
  //
146
162
  //
@@ -149,14 +165,20 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
149
165
  if (reason === 'os_disk_is_full') {
150
166
  return renderOverlay({
151
167
  title: intl.formatMessage({
152
- id: 'runbox.runtime.overlay.terminated.title'
168
+ id: 'runbox.runtime.overlay.terminated.title.os_disk_is_full'
153
169
  }),
154
170
  description: intl.formatMessage({
155
171
  id: 'runbox.runtime.overlay.terminated.description.os_disk_is_full'
156
172
  }),
157
- body:
158
- // TODO: Add disk usage information.
159
- renderContactButton()
173
+ body: jsx(MaterialRunboxEnvResetButton, {
174
+ variant: "contained",
175
+ startIcon: jsx(EliceIcon, {
176
+ icon: faArrowsRotate
177
+ }),
178
+ runtimeTemplateId: runtimeTemplateId,
179
+ courseId: courseId,
180
+ userId: studentUserId
181
+ })
160
182
  });
161
183
  } else if (reason === 'quota_exceeded') {
162
184
  return renderOverlay({
@@ -0,0 +1,7 @@
1
+ import type { EliceIconDefinition } from '@elice/mui-elements';
2
+ export interface RuntimeLoadingTip {
3
+ icon: EliceIconDefinition;
4
+ titleId: string;
5
+ descriptionId: string;
6
+ }
7
+ export declare const getRuntimeLoadingTips: (containerImageName?: string) => RuntimeLoadingTip[];