@elice/material-runbox-legacy 1.240718.0-trasncript.1 → 1.240718.0-trasncript.2
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 +383 -0
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.js +22 -20
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +5 -1
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +250 -171
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +10 -6
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +80 -43
- package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +63 -30
- package/cjs/components/material-runbox-legacy/index.js +7 -0
- package/cjs/components/material-runbox-legacy/locales/index.js +13 -0
- package/cjs/components/material-runbox-legacy/websocket.js +2 -2
- package/es/_virtual/_rollupPluginBabelHelpers.js +374 -0
- package/es/components/material-runbox-legacy/MaterialRunboxLegacy.js +22 -20
- package/es/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +1 -1
- package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +246 -171
- package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +6 -6
- package/es/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +76 -43
- package/es/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +59 -30
- package/es/components/material-runbox-legacy/index.js +1 -0
- package/es/components/material-runbox-legacy/locales/index.js +4 -0
- package/es/components/material-runbox-legacy/websocket.js +2 -2
- package/package.json +9 -12
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
7
|
var React = require('react');
|
|
6
8
|
var reactUse = require('react-use');
|
|
7
9
|
var blocks = require('@elice/blocks');
|
|
@@ -10,7 +12,10 @@ var intl = require('@elice/intl');
|
|
|
10
12
|
var websocket = require('./websocket.js');
|
|
11
13
|
var MaterialRunboxLegacyContent_styled = require('./MaterialRunboxLegacyContent.styled.js');
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
|
+
|
|
14
19
|
exports.MaterialRunboxLegacyStatus = void 0;
|
|
15
20
|
(function (MaterialRunboxLegacyStatus) {
|
|
16
21
|
MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Idle"] = 0] = "Idle";
|
|
@@ -21,47 +26,74 @@ exports.MaterialRunboxLegacyStatus = void 0;
|
|
|
21
26
|
MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Terminated"] = 5] = "Terminated";
|
|
22
27
|
MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Error"] = 6] = "Error";
|
|
23
28
|
})(exports.MaterialRunboxLegacyStatus || (exports.MaterialRunboxLegacyStatus = {}));
|
|
24
|
-
|
|
25
|
-
runboxUrl,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
29
|
+
var MaterialRunboxLegacyContent = function MaterialRunboxLegacyContent(_ref) {
|
|
30
|
+
var runboxUrl = _ref.runboxUrl,
|
|
31
|
+
isRunboxTerminated = _ref.isRunboxTerminated,
|
|
32
|
+
isRunboxJoinError = _ref.isRunboxJoinError,
|
|
33
|
+
reconnect = _ref.reconnect;
|
|
34
|
+
var intl$1 = intl.useRawEliceIntl();
|
|
35
|
+
var _React$useState = React__default.default.useState(null),
|
|
36
|
+
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
37
|
+
runboxStats = _React$useState2[0],
|
|
38
|
+
setRunboxStats = _React$useState2[1];
|
|
39
|
+
var _React$useState3 = React__default.default.useState(false),
|
|
40
|
+
_React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
|
|
41
|
+
isRunboxUrlLoaded = _React$useState4[0],
|
|
42
|
+
setRunboxUrlLoaded = _React$useState4[1];
|
|
43
|
+
var isRunboxUrlLoadedPrev = reactUse.usePrevious(isRunboxUrlLoaded);
|
|
44
|
+
var _React$useState5 = React__default.default.useState(exports.MaterialRunboxLegacyStatus.Idle),
|
|
45
|
+
_React$useState6 = _rollupPluginBabelHelpers.slicedToArray(_React$useState5, 2),
|
|
46
|
+
runboxStatus = _React$useState6[0],
|
|
47
|
+
setRunboxStatus = _React$useState6[1];
|
|
48
|
+
var isRunboxPreparing = runboxStatus !== exports.MaterialRunboxLegacyStatus.Done && runboxStatus !== exports.MaterialRunboxLegacyStatus.Terminated;
|
|
49
|
+
websocket.WSMaterialRunboxLegacyStdio.useMessage(function (message) {
|
|
37
50
|
if (message.type === 'stats') {
|
|
38
51
|
setRunboxStats(message.data);
|
|
39
52
|
}
|
|
40
|
-
}, {
|
|
41
|
-
camelize: true
|
|
42
53
|
});
|
|
43
|
-
|
|
54
|
+
var handleReconnect = function handleReconnect() {
|
|
44
55
|
setRunboxStats(null);
|
|
45
56
|
setRunboxUrlLoaded(false);
|
|
46
57
|
reconnect();
|
|
47
58
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
var handleShare = /*#__PURE__*/function () {
|
|
60
|
+
var _ref2 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee() {
|
|
61
|
+
return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
if (runboxUrl) {
|
|
65
|
+
_context.next = 2;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
return _context.abrupt("return");
|
|
69
|
+
case 2:
|
|
70
|
+
_context.prev = 2;
|
|
71
|
+
_context.next = 5;
|
|
72
|
+
return navigator.clipboard.writeText(runboxUrl);
|
|
73
|
+
case 5:
|
|
74
|
+
blocks.Notification.success(intl$1.formatMessage({
|
|
75
|
+
id: 'runboxLegacy.share.success'
|
|
76
|
+
}));
|
|
77
|
+
_context.next = 11;
|
|
78
|
+
break;
|
|
79
|
+
case 8:
|
|
80
|
+
_context.prev = 8;
|
|
81
|
+
_context.t0 = _context["catch"](2);
|
|
82
|
+
alert(runboxUrl);
|
|
83
|
+
case 11:
|
|
84
|
+
case "end":
|
|
85
|
+
return _context.stop();
|
|
86
|
+
}
|
|
87
|
+
}, _callee, null, [[2, 8]]);
|
|
88
|
+
}));
|
|
89
|
+
return function handleShare() {
|
|
90
|
+
return _ref2.apply(this, arguments);
|
|
91
|
+
};
|
|
92
|
+
}();
|
|
61
93
|
//
|
|
62
94
|
// Change `isRunboxUrlLoaded` flag to false, when runbox url removed.
|
|
63
95
|
//
|
|
64
|
-
|
|
96
|
+
React__default.default.useEffect(function () {
|
|
65
97
|
if (!runboxUrl) {
|
|
66
98
|
setRunboxUrlLoaded(false);
|
|
67
99
|
}
|
|
@@ -69,8 +101,8 @@ const MaterialRunboxLegacyContent = ({
|
|
|
69
101
|
//
|
|
70
102
|
// Determine runbox status.
|
|
71
103
|
//
|
|
72
|
-
|
|
73
|
-
setRunboxStatus((
|
|
104
|
+
React__default.default.useEffect(function () {
|
|
105
|
+
setRunboxStatus(function () {
|
|
74
106
|
switch (true) {
|
|
75
107
|
case isRunboxJoinError:
|
|
76
108
|
return exports.MaterialRunboxLegacyStatus.Error;
|
|
@@ -87,12 +119,12 @@ const MaterialRunboxLegacyContent = ({
|
|
|
87
119
|
default:
|
|
88
120
|
return exports.MaterialRunboxLegacyStatus.Idle;
|
|
89
121
|
}
|
|
90
|
-
}
|
|
122
|
+
}());
|
|
91
123
|
}, [isRunboxJoinError, isRunboxTerminated, isRunboxUrlLoaded, isRunboxUrlLoadedPrev, runboxUrl]);
|
|
92
124
|
/**
|
|
93
125
|
* Runbox status message shown at header.
|
|
94
126
|
*/
|
|
95
|
-
|
|
127
|
+
var renderRunboxStatusMessage = function renderRunboxStatusMessage() {
|
|
96
128
|
switch (runboxStatus) {
|
|
97
129
|
case exports.MaterialRunboxLegacyStatus.Idle:
|
|
98
130
|
return intl$1.formatMessage({
|
|
@@ -123,154 +155,201 @@ const MaterialRunboxLegacyContent = ({
|
|
|
123
155
|
/**
|
|
124
156
|
* Header of runbox.
|
|
125
157
|
*/
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
158
|
+
var renderRunboxHeader = function renderRunboxHeader() {
|
|
159
|
+
var runboxStatsInfo = runboxStats ? jsxRuntime.jsx(blocks.LaptopOrLarger, {
|
|
160
|
+
children: jsxRuntime.jsxs(blocks.Flex, {
|
|
161
|
+
children: [jsxRuntime.jsxs(blocks.Flex, {
|
|
162
|
+
align: "center",
|
|
163
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
164
|
+
size: "tiny",
|
|
165
|
+
lineHeight: 1.5,
|
|
166
|
+
role: "gray7",
|
|
167
|
+
bold: true,
|
|
168
|
+
children: "CPU:\xA0"
|
|
169
|
+
}), jsxRuntime.jsx(blocks.Flex, {
|
|
170
|
+
align: "center",
|
|
171
|
+
width: "30px",
|
|
172
|
+
children: jsxRuntime.jsx(blocks.AntProgress, {
|
|
173
|
+
type: "line",
|
|
174
|
+
percent: runboxStats.cpu.percent,
|
|
175
|
+
status: 'active',
|
|
176
|
+
showInfo: false
|
|
177
|
+
})
|
|
178
|
+
}), jsxRuntime.jsxs(blocks.Text, {
|
|
179
|
+
size: "tiny",
|
|
180
|
+
lineHeight: 1.5,
|
|
181
|
+
role: "gray5",
|
|
182
|
+
children: ["\xA0", "".concat(runboxStats.cpu.percent.toFixed(0), "%")]
|
|
183
|
+
})]
|
|
184
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
185
|
+
width: 1
|
|
186
|
+
}), jsxRuntime.jsxs(blocks.Flex, {
|
|
187
|
+
align: "center",
|
|
188
|
+
children: [jsxRuntime.jsx(blocks.Text, {
|
|
189
|
+
size: "tiny",
|
|
190
|
+
lineHeight: 1.5,
|
|
191
|
+
role: "gray7",
|
|
192
|
+
bold: true,
|
|
193
|
+
children: "MEM:\xA0"
|
|
194
|
+
}), jsxRuntime.jsx(blocks.Flex, {
|
|
195
|
+
align: "center",
|
|
196
|
+
width: "30px",
|
|
197
|
+
children: jsxRuntime.jsx(blocks.AntProgress, {
|
|
198
|
+
percent: runboxStats.memory.currentBytes / runboxStats.memory.limitBytes * 100,
|
|
199
|
+
status: 'active',
|
|
200
|
+
showInfo: false
|
|
201
|
+
})
|
|
202
|
+
}), jsxRuntime.jsxs(blocks.Text, {
|
|
203
|
+
size: "tiny",
|
|
204
|
+
lineHeight: 1.5,
|
|
205
|
+
role: "gray5",
|
|
206
|
+
children: ["\xA0", "".concat((runboxStats.memory.currentBytes / 1024 / 1024).toFixed(0), "M / ").concat((runboxStats.memory.limitBytes / 1024 / 1024).toFixed(0), "M")]
|
|
207
|
+
})]
|
|
208
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
209
|
+
width: 1
|
|
210
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
211
|
+
size: "tiny",
|
|
212
|
+
lineHeight: 1.5,
|
|
213
|
+
role: "gray7",
|
|
214
|
+
bold: true,
|
|
215
|
+
children: "DISK:\xA0"
|
|
216
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
217
|
+
size: "tiny",
|
|
218
|
+
lineHeight: 1.5,
|
|
219
|
+
role: "gray5",
|
|
220
|
+
children: "Read ".concat((runboxStats.block.rxBytes / 1024 / 1024).toFixed(0), "M Write ").concat((runboxStats.block.txBytes / 1024 / 1024).toFixed(0), "M")
|
|
221
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
222
|
+
width: 1
|
|
223
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
224
|
+
size: "tiny",
|
|
225
|
+
lineHeight: 1.5,
|
|
226
|
+
role: "gray7",
|
|
227
|
+
bold: true,
|
|
228
|
+
children: "NET:\xA0"
|
|
229
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
230
|
+
size: "tiny",
|
|
231
|
+
lineHeight: 1.5,
|
|
232
|
+
role: "gray5",
|
|
233
|
+
children: "\u2193".concat((runboxStats.network.rxBytes / 1024 / 1024).toFixed(0), "M \u2191").concat((runboxStats.network.txBytes / 1024 / 1024).toFixed(0), "M")
|
|
234
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
235
|
+
width: 1
|
|
236
|
+
})]
|
|
237
|
+
})
|
|
238
|
+
}) : null;
|
|
239
|
+
return jsxRuntime.jsxs(MaterialRunboxLegacyContent_styled.RunboxHeader, {
|
|
240
|
+
children: [runboxStatsInfo, jsxRuntime.jsxs(blocks.Flex, {
|
|
241
|
+
align: "center",
|
|
242
|
+
children: [jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxStatusLight, {
|
|
243
|
+
status: runboxStatus
|
|
244
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
245
|
+
width: 0.5
|
|
246
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
247
|
+
size: "small",
|
|
248
|
+
children: renderRunboxStatusMessage()
|
|
249
|
+
})]
|
|
250
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
251
|
+
width: 1
|
|
252
|
+
}), jsxRuntime.jsx(blocks.IconButton, {
|
|
253
|
+
icon: icons.eilShare,
|
|
254
|
+
role: "greyfb",
|
|
255
|
+
size: "small",
|
|
256
|
+
border: true,
|
|
257
|
+
disabled: isRunboxPreparing,
|
|
258
|
+
onClick: handleShare
|
|
259
|
+
}), jsxRuntime.jsx(blocks.Hspace, {
|
|
260
|
+
width: 0.5
|
|
261
|
+
}), jsxRuntime.jsx(blocks.Tooltip, {
|
|
262
|
+
title: isRunboxPreparing ? intl$1.formatMessage({
|
|
263
|
+
id: 'runboxLegacy.reloadButton.tooltip'
|
|
264
|
+
}) : undefined,
|
|
265
|
+
children: jsxRuntime.jsx("span", {
|
|
266
|
+
children: jsxRuntime.jsx(blocks.IconButton, {
|
|
267
|
+
icon: icons.eilReset,
|
|
268
|
+
iconSpin: isRunboxPreparing,
|
|
269
|
+
role: "greyfb",
|
|
270
|
+
size: "small",
|
|
271
|
+
border: true,
|
|
272
|
+
disabled: isRunboxPreparing,
|
|
273
|
+
onClick: handleReconnect
|
|
274
|
+
})
|
|
275
|
+
})
|
|
276
|
+
})]
|
|
277
|
+
});
|
|
223
278
|
};
|
|
224
279
|
/**
|
|
225
280
|
* Body of runbox.
|
|
226
281
|
*/
|
|
227
|
-
|
|
282
|
+
var renderRunboxBody = function renderRunboxBody() {
|
|
228
283
|
if (runboxStatus === exports.MaterialRunboxLegacyStatus.Terminated) {
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
284
|
+
return jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBody, {
|
|
285
|
+
children: jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
|
|
286
|
+
children: jsxRuntime.jsx(blocks.Box, {
|
|
287
|
+
children: jsxRuntime.jsx(blocks.Text, {
|
|
288
|
+
size: "small",
|
|
289
|
+
preWrap: true,
|
|
290
|
+
lineHeight: 1.5,
|
|
291
|
+
textAlign: "center",
|
|
292
|
+
children: intl$1.formatMessage({
|
|
293
|
+
id: 'runboxLegacy.overlay.message.terminated'
|
|
294
|
+
})
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
})
|
|
298
|
+
});
|
|
237
299
|
}
|
|
238
300
|
if (runboxStatus === exports.MaterialRunboxLegacyStatus.Error) {
|
|
239
|
-
return
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
301
|
+
return jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBody, {
|
|
302
|
+
children: jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
|
|
303
|
+
children: jsxRuntime.jsx(blocks.Box, {
|
|
304
|
+
children: jsxRuntime.jsx(blocks.Text, {
|
|
305
|
+
size: "small",
|
|
306
|
+
preWrap: true,
|
|
307
|
+
lineHeight: 1.5,
|
|
308
|
+
textAlign: "center",
|
|
309
|
+
children: intl$1.formatMessage({
|
|
310
|
+
id: 'runboxLegacy.overlay.message.error'
|
|
311
|
+
})
|
|
312
|
+
})
|
|
313
|
+
})
|
|
314
|
+
})
|
|
315
|
+
});
|
|
247
316
|
}
|
|
248
|
-
return
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
317
|
+
return jsxRuntime.jsxs(MaterialRunboxLegacyContent_styled.RunboxBody, {
|
|
318
|
+
children: [jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
|
|
319
|
+
"aria-hidden": !isRunboxPreparing,
|
|
320
|
+
children: jsxRuntime.jsxs(blocks.Box, {
|
|
321
|
+
children: [jsxRuntime.jsx(blocks.Spinner, {}), jsxRuntime.jsx(blocks.Vspace, {
|
|
322
|
+
height: 1
|
|
323
|
+
}), jsxRuntime.jsx(blocks.Text, {
|
|
324
|
+
size: "small",
|
|
325
|
+
preWrap: true,
|
|
326
|
+
lineHeight: 1.5,
|
|
327
|
+
textAlign: "center",
|
|
328
|
+
children: runboxStatus === exports.MaterialRunboxLegacyStatus.Disconnected ? intl$1.formatMessage({
|
|
329
|
+
id: 'runboxLegacy.overlay.message.disconnected'
|
|
330
|
+
}) : intl$1.formatMessage({
|
|
331
|
+
id: 'runboxLegacy.overlay.message.connecting'
|
|
332
|
+
})
|
|
333
|
+
})]
|
|
334
|
+
})
|
|
335
|
+
}), runboxUrl ? jsxRuntime.jsx(MaterialRunboxLegacyContent_styled.RunboxBodyIframe, {
|
|
336
|
+
src: runboxUrl + '/?folder=/mnt/elice/workspace',
|
|
337
|
+
title: "material-runbox-legacy",
|
|
338
|
+
onLoad: function onLoad() {
|
|
339
|
+
return setRunboxUrlLoaded(true);
|
|
340
|
+
},
|
|
341
|
+
allow: "clipboard-read; clipboard-write; camera *; microphone *"
|
|
342
|
+
}) : null]
|
|
343
|
+
});
|
|
267
344
|
};
|
|
268
345
|
//
|
|
269
346
|
//
|
|
270
347
|
//
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
|
|
348
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
349
|
+
children: [renderRunboxHeader(), jsxRuntime.jsx(blocks.Vspace, {
|
|
350
|
+
height: 0.5
|
|
351
|
+
}), renderRunboxBody()]
|
|
352
|
+
});
|
|
274
353
|
};
|
|
275
354
|
|
|
276
355
|
exports.default = MaterialRunboxLegacyContent;
|
|
@@ -4,21 +4,25 @@ var designTokens = require('@elice/design-tokens');
|
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
var MaterialRunboxLegacyContent = require('./MaterialRunboxLegacyContent.js');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
|
+
|
|
9
|
+
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
10
|
+
|
|
11
|
+
var RunboxHeader = styled__default.default.div.withConfig({
|
|
8
12
|
componentId: "sc-18a3wux-0"
|
|
9
13
|
})(["flex:0 0 2.5rem;display:flex;justify-content:flex-end;align-items:center;padding:0 0.5rem;"]);
|
|
10
|
-
|
|
14
|
+
var RunboxBody = styled__default.default.div.withConfig({
|
|
11
15
|
componentId: "sc-18a3wux-1"
|
|
12
16
|
})(["position:relative;flex:1;"]);
|
|
13
|
-
|
|
17
|
+
var RunboxBodyOverlay = styled__default.default.div.withConfig({
|
|
14
18
|
componentId: "sc-18a3wux-2"
|
|
15
19
|
})(["position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center;flex:1;width:100%;height:100%;background:rgba(255,255,255,0.8);&[aria-hidden='true']{display:none;}"]);
|
|
16
|
-
|
|
20
|
+
var RunboxBodyIframe = styled__default.default.iframe.withConfig({
|
|
17
21
|
componentId: "sc-18a3wux-3"
|
|
18
22
|
})(["width:100%;height:100%;border:none;"]);
|
|
19
|
-
|
|
23
|
+
var RunboxStatusLight = styled__default.default.span.withConfig({
|
|
20
24
|
componentId: "sc-18a3wux-4"
|
|
21
|
-
})(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], props
|
|
25
|
+
})(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], function (props) {
|
|
22
26
|
switch (props.status) {
|
|
23
27
|
case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Loading:
|
|
24
28
|
case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Connecting:
|