@elice/material-runbox-legacy 1.240718.0-trasncript.2 → 1.240718.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.
Files changed (21) hide show
  1. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.js +20 -22
  2. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +1 -5
  3. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +171 -250
  4. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +6 -10
  5. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +43 -80
  6. package/cjs/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +30 -63
  7. package/cjs/components/material-runbox-legacy/websocket.js +2 -2
  8. package/es/components/material-runbox-legacy/MaterialRunboxLegacy.js +20 -22
  9. package/es/components/material-runbox-legacy/MaterialRunboxLegacy.styled.js +1 -1
  10. package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.js +171 -246
  11. package/es/components/material-runbox-legacy/MaterialRunboxLegacyContent.styled.js +6 -6
  12. package/es/components/material-runbox-legacy/MaterialRunboxLegacyRunnerRoomWrapper.js +43 -76
  13. package/es/components/material-runbox-legacy/MaterialRunboxLegacyStdioWrapper.js +30 -59
  14. package/es/components/material-runbox-legacy/websocket.js +2 -2
  15. package/package.json +12 -9
  16. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -383
  17. package/cjs/components/material-runbox-legacy/index.js +0 -7
  18. package/cjs/components/material-runbox-legacy/locales/index.js +0 -13
  19. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -374
  20. package/es/components/material-runbox-legacy/index.js +0 -1
  21. package/es/components/material-runbox-legacy/locales/index.js +0 -4
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('react/jsx-runtime');
5
+ var React = require('react');
6
6
  var apiClient = require('@elice/api-client');
7
7
  var blocks = require('@elice/blocks');
8
8
  var intl = require('@elice/intl');
@@ -12,32 +12,30 @@ var ko = require('./locales/ko.json.js');
12
12
  var MaterialRunboxLegacyRunnerRoomWrapper = require('./MaterialRunboxLegacyRunnerRoomWrapper.js');
13
13
  var MaterialRunboxLegacy_styled = require('./MaterialRunboxLegacy.styled.js');
14
14
 
15
- var MaterialRunboxLegacy = function MaterialRunboxLegacy(_ref) {
16
- var materialRunboxId = _ref.materialRunboxId,
17
- __intl = _ref.__intl;
18
- var isReady = materialSharedUtils.useMaterialConfigApiClientUpdate(apiClient.config.init);
15
+ const MaterialRunboxLegacy = ({
16
+ materialRunboxId,
17
+ __intl
18
+ }) => {
19
+ const isReady = materialSharedUtils.useMaterialConfigApiClientUpdate(apiClient.config.init);
19
20
  if (!isReady) {
20
- return jsxRuntime.jsx(blocks.Flex, {
21
+ return React.createElement(blocks.Flex, {
21
22
  justify: "center",
22
23
  align: "center",
23
24
  width: "100%",
24
- height: "100%",
25
- children: jsxRuntime.jsx(blocks.Spinner, {
26
- size: "small"
27
- })
28
- });
25
+ height: "100%"
26
+ }, React.createElement(blocks.Spinner, {
27
+ size: "small"
28
+ }));
29
29
  }
30
- return jsxRuntime.jsx(intl.RawEliceIntlProvider, {
31
- value: __intl,
32
- children: jsxRuntime.jsx(MaterialRunboxLegacy_styled.StyledMaterialRunboxLegacy, {
33
- children: jsxRuntime.jsx(intl.RawEliceIntlProvider, {
34
- value: __intl,
35
- children: jsxRuntime.jsx(MaterialRunboxLegacyRunnerRoomWrapper.default, {
36
- materialRunboxId: materialRunboxId
37
- })
38
- })
39
- }, materialRunboxId)
40
- });
30
+ return React.createElement(intl.RawEliceIntlProvider, {
31
+ value: __intl
32
+ }, React.createElement(MaterialRunboxLegacy_styled.StyledMaterialRunboxLegacy, {
33
+ key: materialRunboxId
34
+ }, React.createElement(intl.RawEliceIntlProvider, {
35
+ value: __intl
36
+ }, React.createElement(MaterialRunboxLegacyRunnerRoomWrapper.default, {
37
+ materialRunboxId: materialRunboxId
38
+ }))));
41
39
  };
42
40
  var MaterialRunboxLegacy$1 = new intl.IntlComponentBuilder(MaterialRunboxLegacy).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();
43
41
 
@@ -2,11 +2,7 @@
2
2
 
3
3
  var styled = require('styled-components');
4
4
 
5
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
-
7
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
8
-
9
- var StyledMaterialRunboxLegacy = styled__default.default.div.withConfig({
5
+ const StyledMaterialRunboxLegacy = styled.div.withConfig({
10
6
  componentId: "sc-w139i8-0"
11
7
  })(["display:flex;flex-direction:column;padding-top:0.5rem;width:100%;height:100%;background-color:#fff;"]);
12
8
 
@@ -2,8 +2,6 @@
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');
7
5
  var React = require('react');
8
6
  var reactUse = require('react-use');
9
7
  var blocks = require('@elice/blocks');
@@ -12,10 +10,7 @@ var intl = require('@elice/intl');
12
10
  var websocket = require('./websocket.js');
13
11
  var MaterialRunboxLegacyContent_styled = require('./MaterialRunboxLegacyContent.styled.js');
14
12
 
15
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
16
-
17
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
18
-
13
+ /* eslint-disable @typescript-eslint/naming-convention */
19
14
  exports.MaterialRunboxLegacyStatus = void 0;
20
15
  (function (MaterialRunboxLegacyStatus) {
21
16
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Idle"] = 0] = "Idle";
@@ -26,74 +21,47 @@ exports.MaterialRunboxLegacyStatus = void 0;
26
21
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Terminated"] = 5] = "Terminated";
27
22
  MaterialRunboxLegacyStatus[MaterialRunboxLegacyStatus["Error"] = 6] = "Error";
28
23
  })(exports.MaterialRunboxLegacyStatus || (exports.MaterialRunboxLegacyStatus = {}));
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) {
24
+ const MaterialRunboxLegacyContent = ({
25
+ runboxUrl,
26
+ isRunboxTerminated,
27
+ isRunboxJoinError,
28
+ reconnect
29
+ }) => {
30
+ const intl$1 = intl.useRawEliceIntl();
31
+ const [runboxStats, setRunboxStats] = React.useState(null);
32
+ const [isRunboxUrlLoaded, setRunboxUrlLoaded] = React.useState(false);
33
+ const isRunboxUrlLoadedPrev = reactUse.usePrevious(isRunboxUrlLoaded);
34
+ const [runboxStatus, setRunboxStatus] = React.useState(exports.MaterialRunboxLegacyStatus.Idle);
35
+ const isRunboxPreparing = runboxStatus !== exports.MaterialRunboxLegacyStatus.Done && runboxStatus !== exports.MaterialRunboxLegacyStatus.Terminated;
36
+ websocket.WSMaterialRunboxLegacyStdio.useMessage(message => {
50
37
  if (message.type === 'stats') {
51
38
  setRunboxStats(message.data);
52
39
  }
40
+ }, {
41
+ camelize: true
53
42
  });
54
- var handleReconnect = function handleReconnect() {
43
+ const handleReconnect = () => {
55
44
  setRunboxStats(null);
56
45
  setRunboxUrlLoaded(false);
57
46
  reconnect();
58
47
  };
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
- }();
48
+ const handleShare = async () => {
49
+ if (!runboxUrl) {
50
+ return;
51
+ }
52
+ try {
53
+ await navigator.clipboard.writeText(runboxUrl);
54
+ blocks.Notification.success(intl$1.formatMessage({
55
+ id: 'runboxLegacy.share.success'
56
+ }));
57
+ } catch (e) {
58
+ alert(runboxUrl);
59
+ }
60
+ };
93
61
  //
94
62
  // Change `isRunboxUrlLoaded` flag to false, when runbox url removed.
95
63
  //
96
- React__default.default.useEffect(function () {
64
+ React.useEffect(() => {
97
65
  if (!runboxUrl) {
98
66
  setRunboxUrlLoaded(false);
99
67
  }
@@ -101,8 +69,8 @@ var MaterialRunboxLegacyContent = function MaterialRunboxLegacyContent(_ref) {
101
69
  //
102
70
  // Determine runbox status.
103
71
  //
104
- React__default.default.useEffect(function () {
105
- setRunboxStatus(function () {
72
+ React.useEffect(() => {
73
+ setRunboxStatus((() => {
106
74
  switch (true) {
107
75
  case isRunboxJoinError:
108
76
  return exports.MaterialRunboxLegacyStatus.Error;
@@ -119,12 +87,12 @@ var MaterialRunboxLegacyContent = function MaterialRunboxLegacyContent(_ref) {
119
87
  default:
120
88
  return exports.MaterialRunboxLegacyStatus.Idle;
121
89
  }
122
- }());
90
+ })());
123
91
  }, [isRunboxJoinError, isRunboxTerminated, isRunboxUrlLoaded, isRunboxUrlLoadedPrev, runboxUrl]);
124
92
  /**
125
93
  * Runbox status message shown at header.
126
94
  */
127
- var renderRunboxStatusMessage = function renderRunboxStatusMessage() {
95
+ const renderRunboxStatusMessage = () => {
128
96
  switch (runboxStatus) {
129
97
  case exports.MaterialRunboxLegacyStatus.Idle:
130
98
  return intl$1.formatMessage({
@@ -155,201 +123,154 @@ var MaterialRunboxLegacyContent = function MaterialRunboxLegacyContent(_ref) {
155
123
  /**
156
124
  * Header of runbox.
157
125
  */
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
- });
126
+ const renderRunboxHeader = () => {
127
+ const runboxStatsInfo = runboxStats ? React.createElement(blocks.LaptopOrLarger, null, React.createElement(blocks.Flex, null, React.createElement(blocks.Flex, {
128
+ align: "center"
129
+ }, React.createElement(blocks.Text, {
130
+ size: "tiny",
131
+ lineHeight: 1.5,
132
+ role: "gray7",
133
+ bold: true
134
+ }, "CPU:\u00A0"), React.createElement(blocks.Flex, {
135
+ align: "center",
136
+ width: "30px"
137
+ }, React.createElement(blocks.AntProgress, {
138
+ type: "line",
139
+ percent: runboxStats.cpu.percent,
140
+ status: 'active',
141
+ showInfo: false
142
+ })), React.createElement(blocks.Text, {
143
+ size: "tiny",
144
+ lineHeight: 1.5,
145
+ role: "gray5"
146
+ }, "\u00A0", `${runboxStats.cpu.percent.toFixed(0)}%`)), React.createElement(blocks.Hspace, {
147
+ width: 1
148
+ }), React.createElement(blocks.Flex, {
149
+ align: "center"
150
+ }, React.createElement(blocks.Text, {
151
+ size: "tiny",
152
+ lineHeight: 1.5,
153
+ role: "gray7",
154
+ bold: true
155
+ }, "MEM:\u00A0"), React.createElement(blocks.Flex, {
156
+ align: "center",
157
+ width: "30px"
158
+ }, React.createElement(blocks.AntProgress, {
159
+ percent: runboxStats.memory.currentBytes / runboxStats.memory.limitBytes * 100,
160
+ status: 'active',
161
+ showInfo: false
162
+ })), React.createElement(blocks.Text, {
163
+ size: "tiny",
164
+ lineHeight: 1.5,
165
+ role: "gray5"
166
+ }, "\u00A0", `${(runboxStats.memory.currentBytes / 1024 / 1024).toFixed(0)}M / ${(runboxStats.memory.limitBytes / 1024 / 1024).toFixed(0)}M`)), React.createElement(blocks.Hspace, {
167
+ width: 1
168
+ }), React.createElement(blocks.Text, {
169
+ size: "tiny",
170
+ lineHeight: 1.5,
171
+ role: "gray7",
172
+ bold: true
173
+ }, "DISK:\u00A0"), React.createElement(blocks.Text, {
174
+ size: "tiny",
175
+ lineHeight: 1.5,
176
+ role: "gray5"
177
+ }, `Read ${(runboxStats.block.rxBytes / 1024 / 1024).toFixed(0)}M Write ${(runboxStats.block.txBytes / 1024 / 1024).toFixed(0)}M`), React.createElement(blocks.Hspace, {
178
+ width: 1
179
+ }), React.createElement(blocks.Text, {
180
+ size: "tiny",
181
+ lineHeight: 1.5,
182
+ role: "gray7",
183
+ bold: true
184
+ }, "NET:\u00A0"), React.createElement(blocks.Text, {
185
+ size: "tiny",
186
+ lineHeight: 1.5,
187
+ role: "gray5"
188
+ }, `↓${(runboxStats.network.rxBytes / 1024 / 1024).toFixed(0)}M ↑${(runboxStats.network.txBytes / 1024 / 1024).toFixed(0)}M`), React.createElement(blocks.Hspace, {
189
+ width: 1
190
+ }))) : null;
191
+ return React.createElement(MaterialRunboxLegacyContent_styled.RunboxHeader, null, runboxStatsInfo, React.createElement(blocks.Flex, {
192
+ align: "center"
193
+ }, React.createElement(MaterialRunboxLegacyContent_styled.RunboxStatusLight, {
194
+ status: runboxStatus
195
+ }), React.createElement(blocks.Hspace, {
196
+ width: 0.5
197
+ }), React.createElement(blocks.Text, {
198
+ size: "small"
199
+ }, renderRunboxStatusMessage())), React.createElement(blocks.Hspace, {
200
+ width: 1
201
+ }), React.createElement(blocks.IconButton, {
202
+ icon: icons.eilShare,
203
+ role: "greyfb",
204
+ size: "small",
205
+ border: true,
206
+ disabled: isRunboxPreparing,
207
+ onClick: handleShare
208
+ }), React.createElement(blocks.Hspace, {
209
+ width: 0.5
210
+ }), React.createElement(blocks.Tooltip, {
211
+ title: isRunboxPreparing ? intl$1.formatMessage({
212
+ id: 'runboxLegacy.reloadButton.tooltip'
213
+ }) : undefined
214
+ }, React.createElement("span", null, React.createElement(blocks.IconButton, {
215
+ icon: icons.eilReset,
216
+ iconSpin: isRunboxPreparing,
217
+ role: "greyfb",
218
+ size: "small",
219
+ border: true,
220
+ disabled: isRunboxPreparing,
221
+ onClick: handleReconnect
222
+ }))));
278
223
  };
279
224
  /**
280
225
  * Body of runbox.
281
226
  */
282
- var renderRunboxBody = function renderRunboxBody() {
227
+ const renderRunboxBody = () => {
283
228
  if (runboxStatus === exports.MaterialRunboxLegacyStatus.Terminated) {
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
- });
229
+ return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, null, React.createElement(blocks.Box, null, React.createElement(blocks.Text, {
230
+ size: "small",
231
+ preWrap: true,
232
+ lineHeight: 1.5,
233
+ textAlign: "center"
234
+ }, intl$1.formatMessage({
235
+ id: 'runboxLegacy.overlay.message.terminated'
236
+ })))));
299
237
  }
300
238
  if (runboxStatus === exports.MaterialRunboxLegacyStatus.Error) {
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
- });
239
+ return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, null, React.createElement(blocks.Box, null, React.createElement(blocks.Text, {
240
+ size: "small",
241
+ preWrap: true,
242
+ lineHeight: 1.5,
243
+ textAlign: "center"
244
+ }, intl$1.formatMessage({
245
+ id: 'runboxLegacy.overlay.message.error'
246
+ })))));
316
247
  }
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
- });
248
+ return React.createElement(MaterialRunboxLegacyContent_styled.RunboxBody, null, React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyOverlay, {
249
+ "aria-hidden": !isRunboxPreparing
250
+ }, React.createElement(blocks.Box, null, React.createElement(blocks.Spinner, null), React.createElement(blocks.Vspace, {
251
+ height: 1
252
+ }), React.createElement(blocks.Text, {
253
+ size: "small",
254
+ preWrap: true,
255
+ lineHeight: 1.5,
256
+ textAlign: "center"
257
+ }, runboxStatus === exports.MaterialRunboxLegacyStatus.Disconnected ? intl$1.formatMessage({
258
+ id: 'runboxLegacy.overlay.message.disconnected'
259
+ }) : intl$1.formatMessage({
260
+ id: 'runboxLegacy.overlay.message.connecting'
261
+ })))), runboxUrl ? React.createElement(MaterialRunboxLegacyContent_styled.RunboxBodyIframe, {
262
+ src: runboxUrl + '/?folder=/mnt/elice/workspace',
263
+ title: "material-runbox-legacy",
264
+ onLoad: () => setRunboxUrlLoaded(true),
265
+ allow: "clipboard-read; clipboard-write; camera *; microphone *"
266
+ }) : null);
344
267
  };
345
268
  //
346
269
  //
347
270
  //
348
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
349
- children: [renderRunboxHeader(), jsxRuntime.jsx(blocks.Vspace, {
350
- height: 0.5
351
- }), renderRunboxBody()]
352
- });
271
+ return React.createElement(React.Fragment, null, renderRunboxHeader(), React.createElement(blocks.Vspace, {
272
+ height: 0.5
273
+ }), renderRunboxBody());
353
274
  };
354
275
 
355
276
  exports.default = MaterialRunboxLegacyContent;
@@ -4,25 +4,21 @@ var designTokens = require('@elice/design-tokens');
4
4
  var styled = require('styled-components');
5
5
  var MaterialRunboxLegacyContent = require('./MaterialRunboxLegacyContent.js');
6
6
 
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({
7
+ const RunboxHeader = styled.div.withConfig({
12
8
  componentId: "sc-18a3wux-0"
13
9
  })(["flex:0 0 2.5rem;display:flex;justify-content:flex-end;align-items:center;padding:0 0.5rem;"]);
14
- var RunboxBody = styled__default.default.div.withConfig({
10
+ const RunboxBody = styled.div.withConfig({
15
11
  componentId: "sc-18a3wux-1"
16
12
  })(["position:relative;flex:1;"]);
17
- var RunboxBodyOverlay = styled__default.default.div.withConfig({
13
+ const RunboxBodyOverlay = styled.div.withConfig({
18
14
  componentId: "sc-18a3wux-2"
19
15
  })(["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;}"]);
20
- var RunboxBodyIframe = styled__default.default.iframe.withConfig({
16
+ const RunboxBodyIframe = styled.iframe.withConfig({
21
17
  componentId: "sc-18a3wux-3"
22
18
  })(["width:100%;height:100%;border:none;"]);
23
- var RunboxStatusLight = styled__default.default.span.withConfig({
19
+ const RunboxStatusLight = styled.span.withConfig({
24
20
  componentId: "sc-18a3wux-4"
25
- })(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], function (props) {
21
+ })(["display:block;width:0.5rem;height:0.5rem;border-radius:50%;background-color:", ";"], props => {
26
22
  switch (props.status) {
27
23
  case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Loading:
28
24
  case MaterialRunboxLegacyContent.MaterialRunboxLegacyStatus.Connecting: