@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.
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +16 -0
- package/cjs/assets/runbox-loading.svg.js +7 -0
- package/cjs/components/material-runbox/MaterialRunbox.js +16 -11
- package/cjs/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
- package/cjs/components/material-runbox/MaterialRunboxContent.js +93 -65
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +55 -69
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +29 -2
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +90 -0
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +26 -7
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
- package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
- package/cjs/components/material-runbox/contexts/MaterialRunboxControlContext.js +56 -0
- package/cjs/components/material-runbox/contexts/index.d.ts +2 -0
- package/cjs/components/material-runbox/contexts/index.js +4 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +71 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +98 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +151 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
- package/cjs/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +98 -0
- package/cjs/components/material-runbox/disk/index.d.ts +8 -1
- package/cjs/components/material-runbox/disk/index.js +8 -2
- package/cjs/components/material-runbox/hooks/index.d.ts +3 -0
- package/cjs/components/material-runbox/hooks/index.js +14 -0
- package/cjs/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +43 -14
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/cjs/components/material-runbox/hooks/useRunboxDiskUsage.js +50 -0
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/cjs/components/material-runbox/hooks/useRunboxNetworkStatus.js +65 -0
- package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
- package/cjs/components/material-runbox/hooks/useRunboxSessionEndWarning.js +67 -0
- package/cjs/components/material-runbox/locales/en.json.js +1 -1
- package/cjs/components/material-runbox/locales/ja.json.js +1 -1
- package/cjs/components/material-runbox/locales/ko.json.js +1 -1
- package/cjs/components/material-runbox/locales/th.json.js +1 -1
- package/cjs/components/material-runbox/runtime/Runtime.js +21 -18
- package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
- package/cjs/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +6 -54
- package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
- package/cjs/components/material-runbox/runtime/RuntimeOverlayConflicted.js +68 -64
- package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayLoading.js +283 -0
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +6 -64
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +92 -70
- package/cjs/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
- package/cjs/components/material-runbox/runtime/runtime-loading-tips.js +148 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusButton.js +117 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +35 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusPopover.js +161 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
- package/cjs/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +41 -0
- package/cjs/components/material-runbox/status/index.d.ts +4 -0
- package/cjs/components/material-runbox/status/index.js +9 -0
- package/cjs/components/material-runbox/theme.d.ts +2 -0
- package/cjs/components/material-runbox/theme.js +15 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +125 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +56 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +126 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +50 -0
- package/cjs/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
- package/cjs/components/material-runbox/timer/MaterialRunboxTimer.js +26 -18
- package/cjs/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +21 -81
- package/cjs/components/shared/hooks/index.d.ts +1 -0
- package/cjs/components/shared/hooks/index.js +7 -0
- package/cjs/components/shared/hooks/useBreakpoint.d.ts +4 -0
- package/cjs/components/shared/hooks/useBreakpoint.js +12 -0
- package/es/_virtual/_rollupPluginBabelHelpers.js +13 -1
- package/es/assets/runbox-loading.svg.js +3 -0
- package/es/components/material-runbox/MaterialRunbox.js +16 -11
- package/es/components/material-runbox/MaterialRunboxContent.d.ts +2 -0
- package/es/components/material-runbox/MaterialRunboxContent.js +94 -66
- package/es/components/material-runbox/MaterialRunboxHeader.js +56 -70
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.d.ts +1 -4
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnect.js +30 -3
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.d.ts +3 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionDisconnectMenuItem.js +82 -0
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.d.ts +3 -1
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -9
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.d.ts +1 -2
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +9 -26
- package/es/components/material-runbox/contexts/MaterialRunboxControlContext.d.ts +14 -0
- package/es/components/material-runbox/contexts/MaterialRunboxControlContext.js +46 -0
- package/es/components/material-runbox/contexts/index.d.ts +2 -0
- package/es/components/material-runbox/contexts/index.js +1 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.d.ts +13 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageAlert.js +67 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxDiskUsageDialog.js +94 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.d.ts +10 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetButton.js +143 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.d.ts +13 -0
- package/es/components/material-runbox/disk/MaterialRunboxEnvResetDialog.js +90 -0
- package/es/components/material-runbox/disk/index.d.ts +8 -1
- package/es/components/material-runbox/disk/index.js +4 -1
- package/es/components/material-runbox/hooks/index.d.ts +3 -0
- package/es/components/material-runbox/hooks/index.js +3 -0
- package/es/components/material-runbox/hooks/useRunboxControl.d.ts +4 -3
- package/es/components/material-runbox/hooks/useRunboxControl.js +43 -14
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.d.ts +16 -0
- package/es/components/material-runbox/hooks/useRunboxDiskUsage.js +42 -0
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.d.ts +14 -0
- package/es/components/material-runbox/hooks/useRunboxNetworkStatus.js +59 -0
- package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.d.ts +18 -0
- package/es/components/material-runbox/hooks/useRunboxSessionEndWarning.js +63 -0
- package/es/components/material-runbox/locales/en.json.js +1 -1
- package/es/components/material-runbox/locales/ja.json.js +1 -1
- package/es/components/material-runbox/locales/ko.json.js +1 -1
- package/es/components/material-runbox/locales/th.json.js +1 -1
- package/es/components/material-runbox/runtime/Runtime.js +22 -19
- package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.d.ts +0 -1
- package/es/components/material-runbox/runtime/RuntimeChangeMaterialDialog.js +9 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.d.ts +5 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +7 -55
- package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.d.ts +0 -1
- package/es/components/material-runbox/runtime/RuntimeOverlayConflicted.js +69 -65
- package/es/components/material-runbox/runtime/RuntimeOverlayLoading.d.ts +9 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayLoading.js +275 -0
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.d.ts +5 -3
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +7 -65
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.d.ts +4 -1
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +82 -60
- package/es/components/material-runbox/runtime/runtime-loading-tips.d.ts +7 -0
- package/es/components/material-runbox/runtime/runtime-loading-tips.js +146 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.d.ts +15 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusButton.js +109 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.d.ts +12 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusConnectionItem.js +31 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.d.ts +14 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusPopover.js +157 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.d.ts +11 -0
- package/es/components/material-runbox/status/MaterialRunboxStatusResourceItem.js +37 -0
- package/es/components/material-runbox/status/index.d.ts +4 -0
- package/es/components/material-runbox/status/index.js +2 -0
- package/es/components/material-runbox/theme.d.ts +2 -0
- package/es/components/material-runbox/theme.js +12 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.d.ts +11 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAlmostEndDialog.js +121 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.d.ts +13 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaAmount.js +52 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.d.ts +12 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaPerSessionAlmostEndDialog.js +122 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.d.ts +15 -0
- package/es/components/material-runbox/timer/MaterialRunboxQuotaTimePart.js +46 -0
- package/es/components/material-runbox/timer/MaterialRunboxTimer.d.ts +6 -1
- package/es/components/material-runbox/timer/MaterialRunboxTimer.js +25 -17
- package/es/components/material-runbox/timer/MaterialRunboxTimerDetailPopover.js +18 -78
- package/es/components/shared/hooks/index.d.ts +1 -0
- package/es/components/shared/hooks/index.js +1 -0
- package/es/components/shared/hooks/useBreakpoint.d.ts +4 -0
- package/es/components/shared/hooks/useBreakpoint.js +10 -0
- package/package.json +7 -7
- package/cjs/assets/queue.gif.js +0 -7
- package/cjs/assets/runbox_logo.png.js +0 -7
- package/cjs/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
- package/cjs/components/material-runbox/MaterialRunboxFooter.js +0 -64
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/cjs/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -98
- package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
- package/cjs/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.js +0 -90
- package/es/assets/queue.gif.js +0 -3
- package/es/assets/runbox_logo.png.js +0 -3
- package/es/components/material-runbox/MaterialRunboxFooter.d.ts +0 -4
- package/es/components/material-runbox/MaterialRunboxFooter.js +0 -56
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.d.ts +0 -5
- package/es/components/material-runbox/disk/MaterialRunboxDiskAlmostFullSnackbar.js +0 -94
- package/es/components/material-runbox/timer/MaterialRunboxAlmostEndSnackbars.d.ts +0 -6
- 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
|
|
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
|
|
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
|
|
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(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
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.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
-
|
|
5
|
-
|
|
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
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
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
|
-
|
|
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;
|