@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
|
@@ -5,26 +5,32 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var intl = require('@elice/intl');
|
|
7
7
|
var muiElements = require('@elice/mui-elements');
|
|
8
|
-
var muiSystem = require('@elice/mui-system');
|
|
9
8
|
var runboxClient = require('@elice/runbox-client');
|
|
10
9
|
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
11
10
|
var material = require('@mui/material');
|
|
11
|
+
var theme = require('../theme.js');
|
|
12
12
|
var terminated = require('../../../assets/terminated.png.js');
|
|
13
13
|
var en = require('../locales/en.json.js');
|
|
14
14
|
var ko = require('../locales/ko.json.js');
|
|
15
|
+
var MaterialRunboxControlContext = require('../contexts/MaterialRunboxControlContext.js');
|
|
15
16
|
var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
|
|
17
|
+
var MaterialRunboxEnvResetButton = require('../disk/MaterialRunboxEnvResetButton.js');
|
|
16
18
|
|
|
17
19
|
//
|
|
18
20
|
//
|
|
19
21
|
//
|
|
20
22
|
var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
21
|
-
var intl = _ref.__intl,
|
|
23
|
+
var intl$1 = _ref.__intl,
|
|
22
24
|
reason = _ref.reason,
|
|
23
|
-
|
|
25
|
+
runtimeTemplateId = _ref.runtimeTemplateId,
|
|
26
|
+
courseId = _ref.courseId,
|
|
27
|
+
studentUserId = _ref.studentUserId;
|
|
24
28
|
var _useEliceRunboxQuota = runboxClient.useEliceRunboxQuota(),
|
|
25
29
|
quotaInfo = _useEliceRunboxQuota.quotaInfo;
|
|
26
|
-
var _useMaterialRunboxCon =
|
|
27
|
-
|
|
30
|
+
var _useMaterialRunboxCon = MaterialRunboxControlContext.useMaterialRunboxControlContext(),
|
|
31
|
+
startRuntime = _useMaterialRunboxCon.start;
|
|
32
|
+
var _useMaterialRunboxCon2 = MaterialRunboxContext.useMaterialRunboxContext(),
|
|
33
|
+
showMessenger = _useMaterialRunboxCon2.showMessenger;
|
|
28
34
|
/**
|
|
29
35
|
*
|
|
30
36
|
*/
|
|
@@ -35,23 +41,22 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
35
41
|
*
|
|
36
42
|
*/
|
|
37
43
|
var renderConnectButton = function renderConnectButton() {
|
|
38
|
-
return jsxRuntime.jsx(material.
|
|
39
|
-
variant: "contained",
|
|
40
|
-
startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
41
|
-
icon: proSolidSvgIcons.faLinkSimple
|
|
42
|
-
}),
|
|
44
|
+
return jsxRuntime.jsx(material.Box, {
|
|
43
45
|
sx: {
|
|
44
46
|
width: '20rem',
|
|
45
|
-
maxWidth: '100%'
|
|
46
|
-
color: 'text.primary',
|
|
47
|
-
bgcolor: muiSystem.colors.elicepurple[700],
|
|
48
|
-
'&:hover': {
|
|
49
|
-
bgcolor: muiSystem.colors.elicepurple[800]
|
|
50
|
-
}
|
|
47
|
+
maxWidth: '100%'
|
|
51
48
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
children: jsxRuntime.jsx(material.Button, {
|
|
50
|
+
fullWidth: true,
|
|
51
|
+
variant: "contained",
|
|
52
|
+
color: "primary",
|
|
53
|
+
startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
54
|
+
icon: proSolidSvgIcons.faLinkSimple
|
|
55
|
+
}),
|
|
56
|
+
onClick: handleClickConnect,
|
|
57
|
+
children: intl$1.formatMessage({
|
|
58
|
+
id: 'runbox.runtime.overlay.terminated.connect'
|
|
59
|
+
})
|
|
55
60
|
})
|
|
56
61
|
});
|
|
57
62
|
};
|
|
@@ -62,11 +67,8 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
62
67
|
return jsxRuntime.jsx(material.Button, {
|
|
63
68
|
variant: "text",
|
|
64
69
|
color: "primary",
|
|
65
|
-
sx: {
|
|
66
|
-
color: muiSystem.colors.elicepurple[700]
|
|
67
|
-
},
|
|
68
70
|
onClick: showMessenger,
|
|
69
|
-
children: intl.formatMessage({
|
|
71
|
+
children: intl$1.formatMessage({
|
|
70
72
|
id: 'runbox.runtime.overlay.terminated.contact'
|
|
71
73
|
})
|
|
72
74
|
});
|
|
@@ -80,7 +82,7 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
80
82
|
sx: {
|
|
81
83
|
width: '20rem',
|
|
82
84
|
maxWidth: '100%',
|
|
83
|
-
color: '
|
|
85
|
+
color: 'text.primary',
|
|
84
86
|
bgcolor: 'grey.100',
|
|
85
87
|
padding: '1rem'
|
|
86
88
|
},
|
|
@@ -114,37 +116,51 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
114
116
|
*
|
|
115
117
|
*/
|
|
116
118
|
var renderOverlay = function renderOverlay(args) {
|
|
117
|
-
return
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
119
|
+
return (
|
|
120
|
+
// EliceRunboxView shadows the consumer intl context with the runbox-client
|
|
121
|
+
// bundle, so re-provide this package's messages for descendants that call
|
|
122
|
+
// useRawEliceIntl (e.g. MaterialRunboxEnvResetButton and its dialog).
|
|
123
|
+
jsxRuntime.jsx(intl.RawEliceIntlProvider, {
|
|
124
|
+
value: intl$1,
|
|
125
|
+
children: jsxRuntime.jsx(material.ThemeProvider, {
|
|
126
|
+
theme: theme.runboxLightTheme,
|
|
127
|
+
children: jsxRuntime.jsx(material.Box, {
|
|
128
|
+
sx: {
|
|
129
|
+
display: 'flex',
|
|
130
|
+
justifyContent: 'center',
|
|
131
|
+
alignItems: 'center',
|
|
132
|
+
width: '100%',
|
|
133
|
+
height: '100%',
|
|
134
|
+
backgroundColor: 'background.paper',
|
|
135
|
+
color: 'text.primary'
|
|
136
|
+
},
|
|
137
|
+
children: jsxRuntime.jsxs(material.Stack, {
|
|
138
|
+
gap: "1.5rem",
|
|
139
|
+
alignItems: "center",
|
|
140
|
+
children: [jsxRuntime.jsx(material.Box, {
|
|
141
|
+
component: "img",
|
|
142
|
+
src: terminated.default,
|
|
143
|
+
alt: "terminated",
|
|
144
|
+
sx: {
|
|
145
|
+
maxWidth: '10rem',
|
|
146
|
+
height: 'auto'
|
|
147
|
+
}
|
|
148
|
+
}), jsxRuntime.jsx(material.Typography, {
|
|
149
|
+
variant: "h6",
|
|
150
|
+
textAlign: "center",
|
|
151
|
+
whiteSpace: "pre-line",
|
|
152
|
+
children: args.title
|
|
153
|
+
}), jsxRuntime.jsx(material.Typography, {
|
|
154
|
+
variant: "body1",
|
|
155
|
+
textAlign: "center",
|
|
156
|
+
whiteSpace: "pre-line",
|
|
157
|
+
children: args.description
|
|
158
|
+
}), args.body]
|
|
159
|
+
})
|
|
160
|
+
})
|
|
161
|
+
})
|
|
146
162
|
})
|
|
147
|
-
|
|
163
|
+
);
|
|
148
164
|
};
|
|
149
165
|
//
|
|
150
166
|
//
|
|
@@ -152,22 +168,28 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
152
168
|
// Handle specific cases.
|
|
153
169
|
if (reason === 'os_disk_is_full') {
|
|
154
170
|
return renderOverlay({
|
|
155
|
-
title: intl.formatMessage({
|
|
156
|
-
id: 'runbox.runtime.overlay.terminated.title'
|
|
171
|
+
title: intl$1.formatMessage({
|
|
172
|
+
id: 'runbox.runtime.overlay.terminated.title.os_disk_is_full'
|
|
157
173
|
}),
|
|
158
|
-
description: intl.formatMessage({
|
|
174
|
+
description: intl$1.formatMessage({
|
|
159
175
|
id: 'runbox.runtime.overlay.terminated.description.os_disk_is_full'
|
|
160
176
|
}),
|
|
161
|
-
body:
|
|
162
|
-
|
|
163
|
-
|
|
177
|
+
body: jsxRuntime.jsx(MaterialRunboxEnvResetButton.default, {
|
|
178
|
+
variant: "contained",
|
|
179
|
+
startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
180
|
+
icon: proSolidSvgIcons.faArrowsRotate
|
|
181
|
+
}),
|
|
182
|
+
runtimeTemplateId: runtimeTemplateId,
|
|
183
|
+
courseId: courseId,
|
|
184
|
+
userId: studentUserId
|
|
185
|
+
})
|
|
164
186
|
});
|
|
165
187
|
} else if (reason === 'quota_exceeded') {
|
|
166
188
|
return renderOverlay({
|
|
167
|
-
title: intl.formatMessage({
|
|
189
|
+
title: intl$1.formatMessage({
|
|
168
190
|
id: 'runbox.runtime.overlay.terminated.title'
|
|
169
191
|
}),
|
|
170
|
-
description: intl.formatMessage({
|
|
192
|
+
description: intl$1.formatMessage({
|
|
171
193
|
id: 'runbox.runtime.overlay.terminated.description.quota_exceeded'
|
|
172
194
|
}),
|
|
173
195
|
body: renderContactButton()
|
|
@@ -175,36 +197,36 @@ var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
|
175
197
|
}
|
|
176
198
|
// Default.
|
|
177
199
|
return renderOverlay({
|
|
178
|
-
title: intl.formatMessage({
|
|
200
|
+
title: intl$1.formatMessage({
|
|
179
201
|
id: 'runbox.runtime.overlay.terminated.title'
|
|
180
202
|
}),
|
|
181
|
-
description: intl.formatMessage({
|
|
203
|
+
description: intl$1.formatMessage({
|
|
182
204
|
id: 'runbox.runtime.overlay.terminated.description.default'
|
|
183
205
|
}),
|
|
184
206
|
body: jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
185
207
|
children: [renderConnectButton(), renderUsageCard({
|
|
186
208
|
items: quotaInfo.isUnlimited ? [{
|
|
187
|
-
title: intl.formatMessage({
|
|
209
|
+
title: intl$1.formatMessage({
|
|
188
210
|
id: 'runbox.runtime.overlay.terminated.quota.total'
|
|
189
211
|
}),
|
|
190
|
-
value: intl.formatMessage({
|
|
212
|
+
value: intl$1.formatMessage({
|
|
191
213
|
id: 'runbox.runtime.overlay.terminated.unlimited'
|
|
192
214
|
})
|
|
193
215
|
}] : [{
|
|
194
|
-
title: intl.formatMessage({
|
|
216
|
+
title: intl$1.formatMessage({
|
|
195
217
|
id: 'runbox.runtime.overlay.terminated.quota.total'
|
|
196
218
|
}),
|
|
197
219
|
// TODO: Replace with `intl.formatDuration()` adding it to elice-intl.
|
|
198
|
-
value: intl.formatNumber(quotaInfo.quota, {
|
|
220
|
+
value: intl$1.formatNumber(quotaInfo.quota, {
|
|
199
221
|
style: 'unit',
|
|
200
222
|
unit: 'minute',
|
|
201
223
|
unitDisplay: 'short'
|
|
202
224
|
})
|
|
203
225
|
}, {
|
|
204
|
-
title: intl.formatMessage({
|
|
226
|
+
title: intl$1.formatMessage({
|
|
205
227
|
id: 'runbox.runtime.overlay.terminated.quota.used'
|
|
206
228
|
}),
|
|
207
|
-
value: intl.formatNumber(quotaInfo.usedQuota, {
|
|
229
|
+
value: intl$1.formatNumber(quotaInfo.usedQuota, {
|
|
208
230
|
style: 'unit',
|
|
209
231
|
unit: 'minute',
|
|
210
232
|
unitDisplay: 'short'
|
|
@@ -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[];
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
4
|
+
var proRegularSvgIcons = require('@fortawesome/pro-regular-svg-icons');
|
|
5
|
+
|
|
6
|
+
//
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
/** Shown first, always. Not knowing these two is what costs a learner work. */
|
|
10
|
+
var INTRO_TIPS = [{
|
|
11
|
+
icon: proRegularSvgIcons.faDisplayArrowDown,
|
|
12
|
+
titleId: 'runbox.runtime.loading.note.environment.title',
|
|
13
|
+
descriptionId: 'runbox.runtime.loading.note.environment.description'
|
|
14
|
+
}, {
|
|
15
|
+
icon: proRegularSvgIcons.faFloppyDisk,
|
|
16
|
+
titleId: 'runbox.runtime.loading.note.save.title',
|
|
17
|
+
descriptionId: 'runbox.runtime.loading.note.save.description'
|
|
18
|
+
}];
|
|
19
|
+
/**
|
|
20
|
+
* Matched against the container image name, in order -- `VNC-VSCode` carries
|
|
21
|
+
* two keywords, and the editor is what the learner works in.
|
|
22
|
+
*
|
|
23
|
+
* The name is a display name an operator typed (`Jupyter Notebook`,
|
|
24
|
+
* `JupyterNotebook`, `VSCode`), so it is matched loosely rather than listed.
|
|
25
|
+
*/
|
|
26
|
+
var TIP_GROUPS = [{
|
|
27
|
+
keywords: ['jupyter'],
|
|
28
|
+
tips: [{
|
|
29
|
+
icon: proRegularSvgIcons.faListOl,
|
|
30
|
+
titleId: 'runbox.runtime.loading.tip.jupyter.cell_order.title',
|
|
31
|
+
descriptionId: 'runbox.runtime.loading.tip.jupyter.cell_order.description'
|
|
32
|
+
}, {
|
|
33
|
+
icon: proRegularSvgIcons.faSquareTerminal,
|
|
34
|
+
titleId: 'runbox.runtime.loading.tip.jupyter.run_cell.title',
|
|
35
|
+
descriptionId: 'runbox.runtime.loading.tip.jupyter.run_cell.description'
|
|
36
|
+
}, {
|
|
37
|
+
icon: proRegularSvgIcons.faRotate,
|
|
38
|
+
titleId: 'runbox.runtime.loading.tip.jupyter.restart_kernel.title',
|
|
39
|
+
descriptionId: 'runbox.runtime.loading.tip.jupyter.restart_kernel.description'
|
|
40
|
+
}, {
|
|
41
|
+
icon: proRegularSvgIcons.faListOl,
|
|
42
|
+
titleId: 'runbox.runtime.loading.tip.jupyter.cell_number.title',
|
|
43
|
+
descriptionId: 'runbox.runtime.loading.tip.jupyter.cell_number.description'
|
|
44
|
+
}]
|
|
45
|
+
}, {
|
|
46
|
+
keywords: ['vscode', 'codeserver'],
|
|
47
|
+
tips: [{
|
|
48
|
+
icon: proRegularSvgIcons.faFloppyDisk,
|
|
49
|
+
titleId: 'runbox.runtime.loading.tip.vscode.save_before_run.title',
|
|
50
|
+
descriptionId: 'runbox.runtime.loading.tip.vscode.save_before_run.description'
|
|
51
|
+
}, {
|
|
52
|
+
icon: proRegularSvgIcons.faSquareTerminal,
|
|
53
|
+
titleId: 'runbox.runtime.loading.tip.vscode.terminal.title',
|
|
54
|
+
descriptionId: 'runbox.runtime.loading.tip.vscode.terminal.description'
|
|
55
|
+
}, {
|
|
56
|
+
icon: proRegularSvgIcons.faTriangleExclamation,
|
|
57
|
+
titleId: 'runbox.runtime.loading.tip.vscode.browser_shortcut.title',
|
|
58
|
+
descriptionId: 'runbox.runtime.loading.tip.vscode.browser_shortcut.description'
|
|
59
|
+
}, {
|
|
60
|
+
icon: proRegularSvgIcons.faSitemap,
|
|
61
|
+
titleId: 'runbox.runtime.loading.tip.vscode.explorer.title',
|
|
62
|
+
descriptionId: 'runbox.runtime.loading.tip.vscode.explorer.description'
|
|
63
|
+
}]
|
|
64
|
+
}, {
|
|
65
|
+
keywords: ['orange'],
|
|
66
|
+
tips: [{
|
|
67
|
+
icon: proRegularSvgIcons.faTableCells,
|
|
68
|
+
titleId: 'runbox.runtime.loading.tip.orange.widget.title',
|
|
69
|
+
descriptionId: 'runbox.runtime.loading.tip.orange.widget.description'
|
|
70
|
+
}, {
|
|
71
|
+
icon: proRegularSvgIcons.faDiagramProject,
|
|
72
|
+
titleId: 'runbox.runtime.loading.tip.orange.connect.title',
|
|
73
|
+
descriptionId: 'runbox.runtime.loading.tip.orange.connect.description'
|
|
74
|
+
}, {
|
|
75
|
+
icon: proRegularSvgIcons.faTableCells,
|
|
76
|
+
titleId: 'runbox.runtime.loading.tip.orange.load_data.title',
|
|
77
|
+
descriptionId: 'runbox.runtime.loading.tip.orange.load_data.description'
|
|
78
|
+
}, {
|
|
79
|
+
icon: proRegularSvgIcons.faWindowRestore,
|
|
80
|
+
titleId: 'runbox.runtime.loading.tip.orange.open_settings.title',
|
|
81
|
+
descriptionId: 'runbox.runtime.loading.tip.orange.open_settings.description'
|
|
82
|
+
}]
|
|
83
|
+
}, {
|
|
84
|
+
keywords: ['dify', 'n8n', 'comfyui', 'openwebui', 'sonarqube'],
|
|
85
|
+
tips: [{
|
|
86
|
+
icon: proRegularSvgIcons.faDisplayArrowDown,
|
|
87
|
+
titleId: 'runbox.runtime.loading.tip.app.web_service.title',
|
|
88
|
+
descriptionId: 'runbox.runtime.loading.tip.app.web_service.description'
|
|
89
|
+
}, {
|
|
90
|
+
icon: proRegularSvgIcons.faHourglassHalf,
|
|
91
|
+
titleId: 'runbox.runtime.loading.tip.app.slow_start.title',
|
|
92
|
+
descriptionId: 'runbox.runtime.loading.tip.app.slow_start.description'
|
|
93
|
+
}, {
|
|
94
|
+
icon: proRegularSvgIcons.faFloppyDisk,
|
|
95
|
+
titleId: 'runbox.runtime.loading.tip.app.persisted.title',
|
|
96
|
+
descriptionId: 'runbox.runtime.loading.tip.app.persisted.description'
|
|
97
|
+
}]
|
|
98
|
+
}, {
|
|
99
|
+
keywords: ['vnc', 'unityhub', 'pyqt', 'libreoffice', 'flutter', 'codap', 'jmeter'],
|
|
100
|
+
tips: [{
|
|
101
|
+
icon: proRegularSvgIcons.faWindowRestore,
|
|
102
|
+
titleId: 'runbox.runtime.loading.tip.gui.desktop.title',
|
|
103
|
+
descriptionId: 'runbox.runtime.loading.tip.gui.desktop.description'
|
|
104
|
+
}, {
|
|
105
|
+
icon: proRegularSvgIcons.faCopy,
|
|
106
|
+
titleId: 'runbox.runtime.loading.tip.gui.clipboard.title',
|
|
107
|
+
descriptionId: 'runbox.runtime.loading.tip.gui.clipboard.description'
|
|
108
|
+
}, {
|
|
109
|
+
icon: proRegularSvgIcons.faArrowsUpDownLeftRight,
|
|
110
|
+
titleId: 'runbox.runtime.loading.tip.gui.move_window.title',
|
|
111
|
+
descriptionId: 'runbox.runtime.loading.tip.gui.move_window.description'
|
|
112
|
+
}, {
|
|
113
|
+
icon: proRegularSvgIcons.faHourglassHalf,
|
|
114
|
+
titleId: 'runbox.runtime.loading.tip.gui.slow_start.title',
|
|
115
|
+
descriptionId: 'runbox.runtime.loading.tip.gui.slow_start.description'
|
|
116
|
+
}]
|
|
117
|
+
}];
|
|
118
|
+
/** Closes out every environment, and stands alone when no group matched. */
|
|
119
|
+
var COMMON_TIPS = [{
|
|
120
|
+
icon: proRegularSvgIcons.faTriangleExclamation,
|
|
121
|
+
titleId: 'runbox.runtime.loading.tip.common.conflict.title',
|
|
122
|
+
descriptionId: 'runbox.runtime.loading.tip.common.conflict.description'
|
|
123
|
+
}, {
|
|
124
|
+
icon: proRegularSvgIcons.faHardDrive,
|
|
125
|
+
titleId: 'runbox.runtime.loading.tip.common.disk.title',
|
|
126
|
+
descriptionId: 'runbox.runtime.loading.tip.common.disk.description'
|
|
127
|
+
}, {
|
|
128
|
+
icon: proRegularSvgIcons.faClock,
|
|
129
|
+
titleId: 'runbox.runtime.loading.tip.common.quota.title',
|
|
130
|
+
descriptionId: 'runbox.runtime.loading.tip.common.quota.description'
|
|
131
|
+
}];
|
|
132
|
+
//
|
|
133
|
+
//
|
|
134
|
+
//
|
|
135
|
+
var getRuntimeLoadingTips = function getRuntimeLoadingTips() {
|
|
136
|
+
var containerImageName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
137
|
+
var _a;
|
|
138
|
+
var name = containerImageName.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
139
|
+
var group = TIP_GROUPS.find(function (_ref) {
|
|
140
|
+
var keywords = _ref.keywords;
|
|
141
|
+
return keywords.some(function (keyword) {
|
|
142
|
+
return name.includes(keyword);
|
|
143
|
+
});
|
|
144
|
+
});
|
|
145
|
+
return [].concat(INTRO_TIPS, _rollupPluginBabelHelpers.toConsumableArray((_a = group === null || group === void 0 ? void 0 : group.tips) !== null && _a !== void 0 ? _a : []), COMMON_TIPS);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
exports.getRuntimeLoadingTips = getRuntimeLoadingTips;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MaterialRunboxStatusButtonProps {
|
|
3
|
+
runtimeTemplateId: string;
|
|
4
|
+
courseId: number;
|
|
5
|
+
/** User ID for tutoring. */
|
|
6
|
+
userId?: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Opens the runbox connection/resource status popover.
|
|
10
|
+
*
|
|
11
|
+
* Replaces the always-visible resource stats of the removed footer,
|
|
12
|
+
* so the numbers are only shown on explicit request. (`[R-5]` `[R-6]`)
|
|
13
|
+
*/
|
|
14
|
+
declare const MaterialRunboxStatusButton: React.FC<MaterialRunboxStatusButtonProps>;
|
|
15
|
+
export default MaterialRunboxStatusButton;
|
|
@@ -0,0 +1,117 @@
|
|
|
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 intl = require('@elice/intl');
|
|
9
|
+
var muiElements = require('@elice/mui-elements');
|
|
10
|
+
var runboxClient = require('@elice/runbox-client');
|
|
11
|
+
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
12
|
+
var material = require('@mui/material');
|
|
13
|
+
var MaterialRunboxStatusPopover = require('./MaterialRunboxStatusPopover.js');
|
|
14
|
+
var useBreakpoint = require('../../shared/hooks/useBreakpoint.js');
|
|
15
|
+
var useRunboxDiskUsage = require('../hooks/useRunboxDiskUsage.js');
|
|
16
|
+
|
|
17
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
|
+
|
|
19
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
|
+
|
|
21
|
+
//
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
/**
|
|
25
|
+
* Opens the runbox connection/resource status popover.
|
|
26
|
+
*
|
|
27
|
+
* Replaces the always-visible resource stats of the removed footer,
|
|
28
|
+
* so the numbers are only shown on explicit request. (`[R-5]` `[R-6]`)
|
|
29
|
+
*/
|
|
30
|
+
var MaterialRunboxStatusButton = function MaterialRunboxStatusButton(_ref) {
|
|
31
|
+
var runtimeTemplateId = _ref.runtimeTemplateId,
|
|
32
|
+
courseId = _ref.courseId,
|
|
33
|
+
userId = _ref.userId;
|
|
34
|
+
var intl$1 = intl.useRawEliceIntl();
|
|
35
|
+
var isSmallTabletOrSmaller = useBreakpoint.useBreakpoint('md', 'down');
|
|
36
|
+
var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
|
|
37
|
+
status = _useEliceRunboxRunnin.status;
|
|
38
|
+
var _useRunboxDiskUsage = useRunboxDiskUsage.useRunboxDiskUsage(),
|
|
39
|
+
severity = _useRunboxDiskUsage.severity,
|
|
40
|
+
diskCurrent = _useRunboxDiskUsage.diskCurrent,
|
|
41
|
+
diskTotal = _useRunboxDiskUsage.diskTotal;
|
|
42
|
+
var _React$useState = React__default.default.useState(null),
|
|
43
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
44
|
+
anchorEl = _React$useState2[0],
|
|
45
|
+
setAnchorEl = _React$useState2[1];
|
|
46
|
+
var isRunboxRunning = status === 'running';
|
|
47
|
+
/**
|
|
48
|
+
* Over threshold the button turns into a disk gauge, so the learner sees the
|
|
49
|
+
* number that matters without opening the popover.
|
|
50
|
+
*/
|
|
51
|
+
var buttonProps = severity ? {
|
|
52
|
+
color: severity,
|
|
53
|
+
startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
54
|
+
icon: proSolidSvgIcons.faDiscDrive
|
|
55
|
+
}),
|
|
56
|
+
children: isSmallTabletOrSmaller ? undefined : "DISK ".concat(intl$1.formatDataSize(diskCurrent, {
|
|
57
|
+
unitSystem: 'iec',
|
|
58
|
+
maximumFractionDigits: 2
|
|
59
|
+
}), " / ").concat(intl$1.formatDataSize(diskTotal, {
|
|
60
|
+
unitSystem: 'iec',
|
|
61
|
+
maximumFractionDigits: 2
|
|
62
|
+
}))
|
|
63
|
+
} : {
|
|
64
|
+
color: 'inherit',
|
|
65
|
+
startIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
66
|
+
icon: proSolidSvgIcons.faWifi
|
|
67
|
+
}),
|
|
68
|
+
// The label follows the header, but the icon keeps reporting the runtime.
|
|
69
|
+
sx: _rollupPluginBabelHelpers.defineProperty({}, "& .".concat(material.buttonClasses.startIcon), {
|
|
70
|
+
color: isRunboxRunning ? 'success.main' : 'text.disabled'
|
|
71
|
+
}),
|
|
72
|
+
children: isSmallTabletOrSmaller ? undefined : intl$1.formatMessage({
|
|
73
|
+
id: 'runbox.status.button.title'
|
|
74
|
+
})
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
var handleClose = function handleClose() {
|
|
80
|
+
setAnchorEl(null);
|
|
81
|
+
};
|
|
82
|
+
//
|
|
83
|
+
//
|
|
84
|
+
//
|
|
85
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
86
|
+
children: [jsxRuntime.jsx(material.Button, Object.assign({
|
|
87
|
+
variant: "text",
|
|
88
|
+
size: "small",
|
|
89
|
+
endIcon: jsxRuntime.jsx(muiElements.EliceIcon, {
|
|
90
|
+
icon: proSolidSvgIcons.faAngleDown
|
|
91
|
+
}),
|
|
92
|
+
onClick: function onClick(e) {
|
|
93
|
+
return setAnchorEl(e.currentTarget);
|
|
94
|
+
}
|
|
95
|
+
}, buttonProps)), jsxRuntime.jsx(MaterialRunboxStatusPopover.default, {
|
|
96
|
+
open: Boolean(anchorEl),
|
|
97
|
+
anchorEl: anchorEl,
|
|
98
|
+
anchorOrigin: {
|
|
99
|
+
vertical: 'bottom',
|
|
100
|
+
horizontal: 'left'
|
|
101
|
+
},
|
|
102
|
+
transformOrigin: {
|
|
103
|
+
vertical: 'top',
|
|
104
|
+
horizontal: 'left'
|
|
105
|
+
},
|
|
106
|
+
sx: {
|
|
107
|
+
marginTop: '0.5rem'
|
|
108
|
+
},
|
|
109
|
+
runtimeTemplateId: runtimeTemplateId,
|
|
110
|
+
courseId: courseId,
|
|
111
|
+
userId: userId,
|
|
112
|
+
onClose: handleClose
|
|
113
|
+
})]
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
exports.default = MaterialRunboxStatusButton;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TypographyProps } from '@mui/material';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface MaterialRunboxStatusConnectionItemProps {
|
|
4
|
+
/** Leading icon element, or a progress indicator while connecting. */
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
/** Row label. */
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
/** Palette color for the icon, e.g. `success.main`. */
|
|
9
|
+
color?: TypographyProps['color'];
|
|
10
|
+
}
|
|
11
|
+
declare const MaterialRunboxStatusConnectionItem: React.FC<MaterialRunboxStatusConnectionItemProps>;
|
|
12
|
+
export default MaterialRunboxStatusConnectionItem;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var material = require('@mui/material');
|
|
7
|
+
|
|
8
|
+
//
|
|
9
|
+
//
|
|
10
|
+
//
|
|
11
|
+
var MaterialRunboxStatusConnectionItem = function MaterialRunboxStatusConnectionItem(_ref) {
|
|
12
|
+
var icon = _ref.icon,
|
|
13
|
+
label = _ref.label,
|
|
14
|
+
_ref$color = _ref.color,
|
|
15
|
+
color = _ref$color === void 0 ? 'text.disabled' : _ref$color;
|
|
16
|
+
return jsxRuntime.jsxs(material.Stack, {
|
|
17
|
+
direction: "row",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
gap: "0.75rem",
|
|
20
|
+
minHeight: "2.5rem",
|
|
21
|
+
padding: "0 0.75rem",
|
|
22
|
+
children: [jsxRuntime.jsx(material.Typography, {
|
|
23
|
+
component: "span",
|
|
24
|
+
display: "inline-flex",
|
|
25
|
+
color: color,
|
|
26
|
+
children: icon
|
|
27
|
+
}), jsxRuntime.jsx(material.Typography, {
|
|
28
|
+
variant: "body2",
|
|
29
|
+
color: "text.tertiary",
|
|
30
|
+
children: label
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
exports.default = MaterialRunboxStatusConnectionItem;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { PopoverProps } from '@mui/material';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
export interface MaterialRunboxStatusPopoverProps extends Omit<PopoverProps, 'open' | 'onClose' | 'children'> {
|
|
4
|
+
/** Whether the popover is open. */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Called when the popover requests to be closed. */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
runtimeTemplateId: string;
|
|
9
|
+
courseId: number;
|
|
10
|
+
/** User ID for tutoring. */
|
|
11
|
+
userId?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const MaterialRunboxStatusPopover: React.FC<MaterialRunboxStatusPopoverProps>;
|
|
14
|
+
export default MaterialRunboxStatusPopover;
|