@elice/material-runbox 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 (55) hide show
  1. package/cjs/assets/queue.gif.js +2 -1
  2. package/cjs/assets/runbox_logo.png.js +2 -1
  3. package/cjs/assets/terminated.png.js +2 -1
  4. package/cjs/components/material-runbox/MaterialRunbox.js +20 -24
  5. package/cjs/components/material-runbox/MaterialRunboxBody.js +4 -10
  6. package/cjs/components/material-runbox/MaterialRunboxContent.js +103 -132
  7. package/cjs/components/material-runbox/MaterialRunboxFooter.js +18 -27
  8. package/cjs/components/material-runbox/MaterialRunboxHeader.js +87 -103
  9. package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -31
  10. package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -242
  11. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -32
  12. package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -125
  13. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -84
  14. package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -40
  15. package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +15 -27
  16. package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +36 -52
  17. package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +8 -11
  18. package/cjs/components/material-runbox/hooks/useRunboxControl.js +38 -62
  19. package/cjs/components/material-runbox/runtime/Runtime.js +17 -25
  20. package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +29 -33
  21. package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +39 -40
  22. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +57 -72
  23. package/es/assets/queue.gif.js +2 -1
  24. package/es/assets/runbox_logo.png.js +2 -1
  25. package/es/assets/terminated.png.js +2 -1
  26. package/es/components/material-runbox/MaterialRunbox.js +20 -24
  27. package/es/components/material-runbox/MaterialRunboxBody.js +4 -6
  28. package/es/components/material-runbox/MaterialRunboxContent.js +103 -128
  29. package/es/components/material-runbox/MaterialRunboxFooter.js +18 -23
  30. package/es/components/material-runbox/MaterialRunboxHeader.js +88 -99
  31. package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -27
  32. package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +159 -237
  33. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -28
  34. package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +76 -121
  35. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +53 -80
  36. package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +28 -36
  37. package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +14 -22
  38. package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +35 -47
  39. package/es/components/material-runbox/contexts/MaterialRunboxContext.js +7 -6
  40. package/es/components/material-runbox/hooks/useRunboxControl.js +38 -62
  41. package/es/components/material-runbox/runtime/Runtime.js +17 -21
  42. package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +30 -34
  43. package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +40 -41
  44. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +58 -69
  45. package/package.json +11 -8
  46. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -386
  47. package/cjs/components/material-runbox/contexts/index.js +0 -17
  48. package/cjs/components/material-runbox/hooks/index.js +0 -7
  49. package/cjs/components/material-runbox/index.js +0 -7
  50. package/cjs/components/material-runbox/locales/index.js +0 -13
  51. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -377
  52. package/es/components/material-runbox/contexts/index.js +0 -3
  53. package/es/components/material-runbox/hooks/index.js +0 -1
  54. package/es/components/material-runbox/index.js +0 -1
  55. package/es/components/material-runbox/locales/index.js +0 -4
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('react/jsx-runtime');
6
5
  var React = require('react');
7
6
  var runboxClient = require('@elice/runbox-client');
8
7
  var material = require('@mui/material');
@@ -10,27 +9,25 @@ var MaterialRunboxActionReset = require('./MaterialRunboxActionReset.js');
10
9
  var MaterialRunboxActionRestart = require('./MaterialRunboxActionRestart.js');
11
10
  var MaterialRunboxActionShare = require('./MaterialRunboxActionShare.js');
12
11
 
13
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
-
15
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
-
17
12
  //
18
13
  //
19
14
  //
20
- var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
21
- var runbox = _ref.runbox,
22
- runtime = _ref.runtime,
23
- courseId = _ref.courseId,
24
- menuAnchorEl = _ref.menuAnchorEl,
25
- refetch = _ref.refetch,
26
- handleMenuClose = _ref.handleMenuClose;
27
- var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
28
- status = _useEliceRunboxRunnin.status;
29
- var isRunboxRunning = status === 'running';
15
+ const MaterialRunboxActionMenu = ({
16
+ runbox,
17
+ runtime,
18
+ courseId,
19
+ menuAnchorEl,
20
+ refetch,
21
+ handleMenuClose
22
+ }) => {
23
+ const {
24
+ status
25
+ } = runboxClient.useEliceRunboxRunning();
26
+ const isRunboxRunning = status === 'running';
30
27
  //
31
28
  //
32
29
  //
33
- React__default.default.useEffect(function () {
30
+ React.useEffect(() => {
34
31
  if (!isRunboxRunning) {
35
32
  handleMenuClose();
36
33
  }
@@ -38,7 +35,7 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
38
35
  //
39
36
  //
40
37
  //
41
- return jsxRuntime.jsxs(material.Menu, {
38
+ return React.createElement(material.Menu, {
42
39
  open: Boolean(menuAnchorEl),
43
40
  anchorEl: menuAnchorEl,
44
41
  anchorOrigin: {
@@ -49,21 +46,20 @@ var MaterialRunboxActionMenu = function MaterialRunboxActionMenu(_ref) {
49
46
  vertical: 'top',
50
47
  horizontal: 'right'
51
48
  },
52
- onClose: handleMenuClose,
53
- children: [jsxRuntime.jsx(MaterialRunboxActionShare.default, {
54
- handleMenuClose: handleMenuClose
55
- }), jsxRuntime.jsx(MaterialRunboxActionRestart.default, {
56
- runbox: runbox,
57
- runtime: runtime,
58
- courseId: courseId,
59
- refetch: refetch,
60
- handleMenuClose: handleMenuClose
61
- }), jsxRuntime.jsx(MaterialRunboxActionReset.default, {
62
- runtime: runtime,
63
- courseId: courseId,
64
- handleMenuClose: handleMenuClose
65
- })]
66
- });
49
+ onClose: handleMenuClose
50
+ }, React.createElement(MaterialRunboxActionShare.default, {
51
+ handleMenuClose: handleMenuClose
52
+ }), React.createElement(MaterialRunboxActionRestart.default, {
53
+ runbox: runbox,
54
+ runtime: runtime,
55
+ courseId: courseId,
56
+ refetch: refetch,
57
+ handleMenuClose: handleMenuClose
58
+ }), React.createElement(MaterialRunboxActionReset.default, {
59
+ runtime: runtime,
60
+ courseId: courseId,
61
+ handleMenuClose: handleMenuClose
62
+ }));
67
63
  };
68
64
 
69
65
  exports.default = MaterialRunboxActionMenu;
@@ -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 intl = require('@elice/intl');
9
7
  var muiElements = require('@elice/mui-elements');
@@ -16,158 +14,111 @@ var MaterialRunboxApiContext = require('../contexts/MaterialRunboxApiContext.js'
16
14
  var MaterialRunboxCommandContext = require('../contexts/MaterialRunboxCommandContext.js');
17
15
  require('../contexts/MaterialRunboxContext.js');
18
16
 
19
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
20
-
21
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
-
23
17
  //
24
18
  //
25
19
  //
26
- var MaterialRunboxActionReset = function MaterialRunboxActionReset(_ref) {
27
- var runtime = _ref.runtime,
28
- courseId = _ref.courseId;
29
- _ref.handleMenuClose;
30
- var intl$1 = intl.useRawEliceIntl();
31
- var _useSnackbar = muiXSnackbar.useSnackbar(),
32
- enqueueSnackbar = _useSnackbar.enqueueSnackbar;
33
- var materialRunboxApi = MaterialRunboxApiContext.useMaterialRunboxApiContext();
34
- var _React$useState = React__default.default.useState(false),
35
- _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
36
- isLoading = _React$useState2[0],
37
- setLoading = _React$useState2[1];
38
- var _React$useState3 = React__default.default.useState(false),
39
- _React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
40
- isDialogOpened = _React$useState4[0],
41
- setDialogOpened = _React$useState4[1];
42
- var _useMaterialRunboxCom = MaterialRunboxCommandContext.useMaterialRunboxCommandContext(),
43
- isLastCommandRunning = _useMaterialRunboxCom.isLastCommandRunning,
44
- setCommandIdToPing = _useMaterialRunboxCom.setCommandIdToPing;
20
+ const MaterialRunboxActionReset = ({
21
+ runtime,
22
+ courseId,
23
+ handleMenuClose
24
+ }) => {
25
+ const intl$1 = intl.useRawEliceIntl();
26
+ const {
27
+ enqueueSnackbar
28
+ } = muiXSnackbar.useSnackbar();
29
+ const materialRunboxApi = MaterialRunboxApiContext.useMaterialRunboxApiContext();
30
+ const [isLoading, setLoading] = React.useState(false);
31
+ const [isDialogOpened, setDialogOpened] = React.useState(false);
32
+ const {
33
+ isLastCommandRunning,
34
+ setCommandIdToPing
35
+ } = MaterialRunboxCommandContext.useMaterialRunboxCommandContext();
45
36
  /**
46
37
  *
47
38
  */
48
- var handleDialogClose = function handleDialogClose() {
39
+ const handleDialogClose = () => {
49
40
  setDialogOpened(false);
50
41
  };
51
42
  /**
52
43
  *
53
44
  */
54
- var handleReset = /*#__PURE__*/function () {
55
- var _ref2 = _rollupPluginBabelHelpers.asyncToGenerator( /*#__PURE__*/_rollupPluginBabelHelpers.regeneratorRuntime().mark(function _callee() {
56
- var runtimeId, _yield$materialRunbox, commentId;
57
- return _rollupPluginBabelHelpers.regeneratorRuntime().wrap(function _callee$(_context) {
58
- while (1) switch (_context.prev = _context.next) {
59
- case 0:
60
- setLoading(true);
61
- _context.prev = 1;
62
- runtimeId = runtime === null || runtime === void 0 ? void 0 : runtime.id;
63
- _context.next = 5;
64
- return materialRunboxApi.runtime.runtimeRuntimeIdCommandPost({
65
- runtimeId: runtimeId,
66
- eliceCourseId: courseId,
67
- runboxCommandPostRequest: {
68
- commandType: openapiClientMaterialRunbox.CommandType.ProjectFileReset
69
- }
70
- });
71
- case 5:
72
- _yield$materialRunbox = _context.sent;
73
- commentId = _yield$materialRunbox.id;
74
- setCommandIdToPing(commentId);
75
- handleDialogClose();
76
- _context.next = 14;
77
- break;
78
- case 11:
79
- _context.prev = 11;
80
- _context.t0 = _context["catch"](1);
81
- enqueueSnackbar(intl$1.formatMessage({
82
- id: 'runbox.action.reset.noti.error'
83
- }), {
84
- variant: 'error'
85
- });
86
- case 14:
87
- _context.prev = 14;
88
- setLoading(false);
89
- return _context.finish(14);
90
- case 17:
91
- case "end":
92
- return _context.stop();
45
+ const handleReset = async () => {
46
+ setLoading(true);
47
+ try {
48
+ const runtimeId = runtime === null || runtime === void 0 ? void 0 : runtime.id;
49
+ const {
50
+ id: commentId
51
+ } = await materialRunboxApi.runtime.runtimeRuntimeIdCommandPost({
52
+ runtimeId,
53
+ eliceCourseId: courseId,
54
+ runboxCommandPostRequest: {
55
+ commandType: openapiClientMaterialRunbox.CommandType.ProjectFileReset
93
56
  }
94
- }, _callee, null, [[1, 11, 14, 17]]);
95
- }));
96
- return function handleReset() {
97
- return _ref2.apply(this, arguments);
98
- };
99
- }();
57
+ });
58
+ setCommandIdToPing(commentId);
59
+ handleDialogClose();
60
+ } catch (err) {
61
+ enqueueSnackbar(intl$1.formatMessage({
62
+ id: 'runbox.action.reset.noti.error'
63
+ }), {
64
+ variant: 'error'
65
+ });
66
+ } finally {
67
+ setLoading(false);
68
+ }
69
+ };
100
70
  /**
101
71
  *
102
72
  */
103
- var renderResetMenuItem = function renderResetMenuItem() {
104
- return jsxRuntime.jsxs(material.MenuItem, {
105
- onClick: function onClick() {
106
- return setDialogOpened(true);
107
- },
108
- disabled: isLastCommandRunning,
109
- children: [jsxRuntime.jsx(material.ListItemIcon, {
110
- children: jsxRuntime.jsx(muiElements.EliceIcon, {
111
- icon: proSolidSvgIcons.faRefresh
112
- })
113
- }), jsxRuntime.jsx(material.ListItemText, {
114
- children: intl$1.formatMessage({
115
- id: 'runbox.action.reset.title'
116
- })
117
- })]
118
- });
73
+ const renderResetMenuItem = () => {
74
+ return React.createElement(material.MenuItem, {
75
+ onClick: () => setDialogOpened(true),
76
+ disabled: isLastCommandRunning
77
+ }, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
78
+ icon: proSolidSvgIcons.faRefresh
79
+ })), React.createElement(material.ListItemText, null, intl$1.formatMessage({
80
+ id: 'runbox.action.reset.title'
81
+ })));
119
82
  };
120
83
  /**
121
84
  *
122
85
  */
123
- var renderConfirmDialog = function renderConfirmDialog() {
86
+ const renderConfirmDialog = () => {
124
87
  if (!isDialogOpened) {
125
88
  return null;
126
89
  }
127
- return jsxRuntime.jsxs(material.Dialog, {
90
+ return React.createElement(material.Dialog, {
128
91
  open: true,
129
92
  maxWidth: "xs",
130
93
  fullWidth: true,
131
- onClose: handleDialogClose,
132
- children: [jsxRuntime.jsx(material.DialogTitle, {
133
- children: intl$1.formatMessage({
134
- id: 'runbox.action.reset.title'
135
- })
136
- }), jsxRuntime.jsx(material.DialogContent, {
137
- children: jsxRuntime.jsx(material.DialogContentText, {
138
- sx: {
139
- whiteSpace: 'pre-line'
140
- },
141
- children: intl$1.formatMessage({
142
- id: 'runbox.action.reset.dialog.description'
143
- })
144
- })
145
- }), jsxRuntime.jsxs(material.DialogActions, {
146
- children: [jsxRuntime.jsx(material.Button, {
147
- color: "inherit",
148
- disabled: isLoading,
149
- onClick: handleDialogClose,
150
- children: intl$1.formatMessage({
151
- id: 'runbox.common.close'
152
- })
153
- }), jsxRuntime.jsx(lab.LoadingButton, {
154
- variant: "contained",
155
- color: "warning",
156
- loading: isLoading || isLastCommandRunning,
157
- onClick: handleReset,
158
- children: intl$1.formatMessage({
159
- id: 'runbox.action.reset.dialog.actions.confirm'
160
- })
161
- })]
162
- })]
163
- });
94
+ onClose: handleDialogClose
95
+ }, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
96
+ id: 'runbox.action.reset.title'
97
+ })), React.createElement(material.DialogContent, null, React.createElement(material.DialogContentText, {
98
+ sx: {
99
+ whiteSpace: 'pre-line'
100
+ }
101
+ }, intl$1.formatMessage({
102
+ id: 'runbox.action.reset.dialog.description'
103
+ }))), React.createElement(material.DialogActions, null, React.createElement(material.Button, {
104
+ color: "inherit",
105
+ disabled: isLoading,
106
+ onClick: handleDialogClose
107
+ }, intl$1.formatMessage({
108
+ id: 'runbox.common.close'
109
+ })), React.createElement(lab.LoadingButton, {
110
+ variant: "contained",
111
+ color: "warning",
112
+ loading: isLoading || isLastCommandRunning,
113
+ onClick: handleReset
114
+ }, intl$1.formatMessage({
115
+ id: 'runbox.action.reset.dialog.actions.confirm'
116
+ }))));
164
117
  };
165
118
  //
166
119
  //
167
120
  //
168
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
169
- children: [renderResetMenuItem(), renderConfirmDialog()]
170
- });
121
+ return React.createElement(React.Fragment, null, renderResetMenuItem(), renderConfirmDialog());
171
122
  };
172
123
 
173
124
  exports.default = MaterialRunboxActionReset;
@@ -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 intl = require('@elice/intl');
9
7
  var muiElements = require('@elice/mui-elements');
@@ -12,48 +10,38 @@ var lab = require('@mui/lab');
12
10
  var material = require('@mui/material');
13
11
  var useRunboxControl = require('../hooks/useRunboxControl.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
-
19
13
  //
20
14
  //
21
15
  //
22
- var MaterialRunboxActionRestart = function MaterialRunboxActionRestart(_ref) {
23
- var runbox = _ref.runbox,
24
- courseId = _ref.courseId,
25
- refetch = _ref.refetch,
26
- handleMenuClose = _ref.handleMenuClose;
27
- var intl$1 = intl.useRawEliceIntl();
28
- var _React$useState = React__default.default.useState(false),
29
- _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
30
- isLoading = _React$useState2[0],
31
- setIsLoading = _React$useState2[1];
32
- var _React$useState3 = React__default.default.useState(false),
33
- _React$useState4 = _rollupPluginBabelHelpers.slicedToArray(_React$useState3, 2),
34
- isDialogOpened = _React$useState4[0],
35
- setDialogOpened = _React$useState4[1];
16
+ const MaterialRunboxActionRestart = ({
17
+ runbox,
18
+ courseId,
19
+ refetch,
20
+ handleMenuClose
21
+ }) => {
22
+ const intl$1 = intl.useRawEliceIntl();
23
+ const [isLoading, setIsLoading] = React.useState(false);
24
+ const [isDialogOpened, setDialogOpened] = React.useState(false);
36
25
  // restart
37
- var _useRunboxControl = useRunboxControl.useRunboxControl({
38
- runbox: runbox,
39
- courseId: courseId,
40
- refetch: refetch
41
- }),
42
- start = _useRunboxControl.start;
26
+ const {
27
+ start
28
+ } = useRunboxControl.useRunboxControl({
29
+ runbox,
30
+ courseId,
31
+ refetch
32
+ });
43
33
  /**
44
34
  *
45
35
  */
46
- var handleDialogClose = function handleDialogClose() {
36
+ const handleDialogClose = () => {
47
37
  setDialogOpened(false);
48
38
  };
49
39
  /**
50
40
  *
51
41
  */
52
- var handleRestartAction = function handleRestartAction() {
42
+ const handleRestartAction = () => {
53
43
  setIsLoading(true);
54
- start(true).catch(function () {
55
- return void 0;
56
- }).finally(function () {
44
+ start(true).catch(() => void 0).finally(() => {
57
45
  handleDialogClose();
58
46
  handleMenuClose();
59
47
  setIsLoading(false);
@@ -62,73 +50,54 @@ var MaterialRunboxActionRestart = function MaterialRunboxActionRestart(_ref) {
62
50
  /**
63
51
  *
64
52
  */
65
- var renderRestartMenuItem = function renderRestartMenuItem() {
66
- return jsxRuntime.jsxs(material.MenuItem, {
67
- onClick: function onClick() {
68
- return setDialogOpened(true);
69
- },
70
- children: [jsxRuntime.jsx(material.ListItemIcon, {
71
- children: jsxRuntime.jsx(muiElements.EliceIcon, {
72
- icon: proSolidSvgIcons.faRotateRight
73
- })
74
- }), jsxRuntime.jsx(material.ListItemText, {
75
- children: intl$1.formatMessage({
76
- id: 'runbox.action.restart.title'
77
- })
78
- })]
79
- });
53
+ const renderRestartMenuItem = () => {
54
+ return React.createElement(material.MenuItem, {
55
+ onClick: () => setDialogOpened(true)
56
+ }, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
57
+ icon: proSolidSvgIcons.faRotateRight
58
+ })), React.createElement(material.ListItemText, null, intl$1.formatMessage({
59
+ id: 'runbox.action.restart.title'
60
+ })));
80
61
  };
81
62
  /**
82
63
  *
83
64
  */
84
- var renderConfirmDialog = function renderConfirmDialog() {
65
+ const renderConfirmDialog = () => {
85
66
  if (!isDialogOpened) {
86
67
  return null;
87
68
  }
88
- return jsxRuntime.jsxs(material.Dialog, {
69
+ return React.createElement(material.Dialog, {
89
70
  maxWidth: "xs",
90
71
  open: true,
91
72
  fullWidth: true,
92
- onClose: handleDialogClose,
93
- children: [jsxRuntime.jsx(material.DialogTitle, {
94
- children: intl$1.formatMessage({
95
- id: 'runbox.action.restart.title'
96
- })
97
- }), jsxRuntime.jsx(material.DialogContent, {
98
- children: jsxRuntime.jsx(material.DialogContentText, {
99
- sx: {
100
- whiteSpace: 'pre-line'
101
- },
102
- children: intl$1.formatMessage({
103
- id: 'runbox.action.restart.dialog.description'
104
- })
105
- })
106
- }), jsxRuntime.jsxs(material.DialogActions, {
107
- children: [jsxRuntime.jsx(material.Button, {
108
- color: "inherit",
109
- disabled: isLoading,
110
- onClick: handleDialogClose,
111
- children: intl$1.formatMessage({
112
- id: 'runbox.common.close'
113
- })
114
- }), jsxRuntime.jsx(lab.LoadingButton, {
115
- variant: "contained",
116
- color: "warning",
117
- loading: isLoading,
118
- onClick: handleRestartAction,
119
- children: intl$1.formatMessage({
120
- id: 'runbox.action.restart.dialog.actions.confirm'
121
- })
122
- })]
123
- })]
124
- });
73
+ onClose: handleDialogClose
74
+ }, React.createElement(material.DialogTitle, null, intl$1.formatMessage({
75
+ id: 'runbox.action.restart.title'
76
+ })), React.createElement(material.DialogContent, null, React.createElement(material.DialogContentText, {
77
+ sx: {
78
+ whiteSpace: 'pre-line'
79
+ }
80
+ }, intl$1.formatMessage({
81
+ id: 'runbox.action.restart.dialog.description'
82
+ }))), React.createElement(material.DialogActions, null, React.createElement(material.Button, {
83
+ color: "inherit",
84
+ disabled: isLoading,
85
+ onClick: handleDialogClose
86
+ }, intl$1.formatMessage({
87
+ id: 'runbox.common.close'
88
+ })), React.createElement(lab.LoadingButton, {
89
+ variant: "contained",
90
+ color: "warning",
91
+ loading: isLoading,
92
+ onClick: handleRestartAction
93
+ }, intl$1.formatMessage({
94
+ id: 'runbox.action.restart.dialog.actions.confirm'
95
+ }))));
125
96
  };
126
97
  //
127
98
  //
128
99
  //
129
- return jsxRuntime.jsxs(jsxRuntime.Fragment, {
130
- children: [renderRestartMenuItem(), renderConfirmDialog()]
131
- });
100
+ return React.createElement(React.Fragment, null, renderRestartMenuItem(), renderConfirmDialog());
132
101
  };
133
102
 
134
103
  exports.default = MaterialRunboxActionRestart;
@@ -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 intl = require('@elice/intl');
@@ -16,57 +14,47 @@ require('../contexts/MaterialRunboxApiContext.js');
16
14
  require('../contexts/MaterialRunboxCommandContext.js');
17
15
  var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
18
16
 
19
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
20
-
21
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
-
23
17
  //
24
18
  //
25
19
  //
26
- var MaterialRunboxActionShare = function MaterialRunboxActionShare(_ref) {
27
- var handleMenuClose = _ref.handleMenuClose;
28
- var intl$1 = intl.useRawEliceIntl();
29
- var _useSnackbar = muiXSnackbar.useSnackbar(),
30
- enqueueSnackbar = _useSnackbar.enqueueSnackbar;
31
- var _useMaterialRunboxCon = MaterialRunboxContext.useMaterialRunboxContext(),
32
- enableUrlShare = _useMaterialRunboxCon.enableUrlShare;
33
- var _useEliceRunboxRunnin = runboxClient.useEliceRunboxRunning(),
34
- url = _useEliceRunboxRunnin.url;
35
- var _useCopyToClipboard = reactUse.useCopyToClipboard(),
36
- _useCopyToClipboard2 = _rollupPluginBabelHelpers.slicedToArray(_useCopyToClipboard, 2),
37
- _useCopyToClipboard2$ = _useCopyToClipboard2[0],
38
- clipboardValue = _useCopyToClipboard2$.value,
39
- error = _useCopyToClipboard2$.error,
40
- copy = _useCopyToClipboard2[1];
41
- var _React$useState = React__default.default.useState(false),
42
- _React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
43
- isClipboardCopied = _React$useState2[0],
44
- setClipboardCopied = _React$useState2[1];
20
+ const MaterialRunboxActionShare = ({
21
+ handleMenuClose
22
+ }) => {
23
+ const intl$1 = intl.useRawEliceIntl();
24
+ const {
25
+ enqueueSnackbar
26
+ } = muiXSnackbar.useSnackbar();
27
+ const {
28
+ enableUrlShare
29
+ } = MaterialRunboxContext.useMaterialRunboxContext();
30
+ const {
31
+ url
32
+ } = runboxClient.useEliceRunboxRunning();
33
+ const [{
34
+ value: clipboardValue,
35
+ error
36
+ }, copy] = reactUse.useCopyToClipboard();
37
+ const [isClipboardCopied, setClipboardCopied] = React.useState(false);
45
38
  /**
46
39
  *
47
40
  */
48
- var renderShareMenuItem = function renderShareMenuItem() {
41
+ const renderShareMenuItem = () => {
49
42
  if (!enableUrlShare) {
50
43
  return null;
51
44
  }
52
- return jsxRuntime.jsxs(material.MenuItem, {
45
+ return React.createElement(material.MenuItem, {
53
46
  disabled: !url,
54
- onClick: handleShareAction,
55
- children: [jsxRuntime.jsx(material.ListItemIcon, {
56
- children: jsxRuntime.jsx(muiElements.EliceIcon, {
57
- icon: proSolidSvgIcons.faLinkSimple
58
- })
59
- }), jsxRuntime.jsx(material.ListItemText, {
60
- children: intl$1.formatMessage({
61
- id: 'runbox.action.share.title'
62
- })
63
- })]
64
- });
47
+ onClick: handleShareAction
48
+ }, React.createElement(material.ListItemIcon, null, React.createElement(muiElements.EliceIcon, {
49
+ icon: proSolidSvgIcons.faLinkSimple
50
+ })), React.createElement(material.ListItemText, null, intl$1.formatMessage({
51
+ id: 'runbox.action.share.title'
52
+ })));
65
53
  };
66
54
  /**
67
55
  *
68
56
  */
69
- var handleShareAction = function handleShareAction() {
57
+ const handleShareAction = () => {
70
58
  if (url) {
71
59
  copy(url);
72
60
  if (!error) {
@@ -78,7 +66,7 @@ var MaterialRunboxActionShare = function MaterialRunboxActionShare(_ref) {
78
66
  //
79
67
  //
80
68
  //
81
- React__default.default.useEffect(function () {
69
+ React.useEffect(() => {
82
70
  if (!isClipboardCopied) {
83
71
  return;
84
72
  }