@elice/material-runbox 1.240718.3 → 1.240719.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.
Files changed (55) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +386 -0
  2. package/cjs/assets/queue.gif.js +1 -2
  3. package/cjs/assets/runbox_logo.png.js +1 -2
  4. package/cjs/assets/terminated.png.js +1 -2
  5. package/cjs/components/material-runbox/MaterialRunbox.js +24 -20
  6. package/cjs/components/material-runbox/MaterialRunboxBody.js +10 -4
  7. package/cjs/components/material-runbox/MaterialRunboxContent.js +132 -103
  8. package/cjs/components/material-runbox/MaterialRunboxFooter.js +27 -18
  9. package/cjs/components/material-runbox/MaterialRunboxHeader.js +103 -87
  10. package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +31 -27
  11. package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +242 -159
  12. package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +32 -28
  13. package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +125 -76
  14. package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +84 -53
  15. package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +40 -28
  16. package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +27 -15
  17. package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +52 -36
  18. package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +11 -8
  19. package/cjs/components/material-runbox/contexts/index.js +17 -0
  20. package/cjs/components/material-runbox/hooks/index.js +7 -0
  21. package/cjs/components/material-runbox/hooks/useRunboxControl.js +62 -38
  22. package/cjs/components/material-runbox/index.js +7 -0
  23. package/cjs/components/material-runbox/locales/index.js +13 -0
  24. package/cjs/components/material-runbox/runtime/Runtime.js +25 -17
  25. package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +33 -29
  26. package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +40 -39
  27. package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +72 -57
  28. package/es/_virtual/_rollupPluginBabelHelpers.js +377 -0
  29. package/es/assets/queue.gif.js +1 -2
  30. package/es/assets/runbox_logo.png.js +1 -2
  31. package/es/assets/terminated.png.js +1 -2
  32. package/es/components/material-runbox/MaterialRunbox.js +24 -20
  33. package/es/components/material-runbox/MaterialRunboxBody.js +6 -4
  34. package/es/components/material-runbox/MaterialRunboxContent.js +128 -103
  35. package/es/components/material-runbox/MaterialRunboxFooter.js +23 -18
  36. package/es/components/material-runbox/MaterialRunboxHeader.js +99 -88
  37. package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -27
  38. package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +237 -159
  39. package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -28
  40. package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +121 -76
  41. package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +80 -53
  42. package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +36 -28
  43. package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +22 -14
  44. package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +47 -35
  45. package/es/components/material-runbox/contexts/MaterialRunboxContext.js +6 -7
  46. package/es/components/material-runbox/contexts/index.js +3 -0
  47. package/es/components/material-runbox/hooks/index.js +1 -0
  48. package/es/components/material-runbox/hooks/useRunboxControl.js +62 -38
  49. package/es/components/material-runbox/index.js +1 -0
  50. package/es/components/material-runbox/locales/index.js +4 -0
  51. package/es/components/material-runbox/runtime/Runtime.js +21 -17
  52. package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +34 -30
  53. package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +41 -40
  54. package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +69 -58
  55. package/package.json +8 -11
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var jsxRuntime = require('react/jsx-runtime');
5
6
  var React = require('react');
6
7
  var runboxClient = require('@elice/runbox-client');
7
8
  var material = require('@mui/material');
@@ -9,25 +10,27 @@ var MaterialRunboxActionReset = require('./MaterialRunboxActionReset.js');
9
10
  var MaterialRunboxActionRestart = require('./MaterialRunboxActionRestart.js');
10
11
  var MaterialRunboxActionShare = require('./MaterialRunboxActionShare.js');
11
12
 
13
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
+
15
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
+
12
17
  //
13
18
  //
14
19
  //
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';
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';
27
30
  //
28
31
  //
29
32
  //
30
- React.useEffect(() => {
33
+ React__default.default.useEffect(function () {
31
34
  if (!isRunboxRunning) {
32
35
  handleMenuClose();
33
36
  }
@@ -35,7 +38,7 @@ const MaterialRunboxActionMenu = ({
35
38
  //
36
39
  //
37
40
  //
38
- return React.createElement(material.Menu, {
41
+ return jsxRuntime.jsxs(material.Menu, {
39
42
  open: Boolean(menuAnchorEl),
40
43
  anchorEl: menuAnchorEl,
41
44
  anchorOrigin: {
@@ -46,20 +49,21 @@ const MaterialRunboxActionMenu = ({
46
49
  vertical: 'top',
47
50
  horizontal: 'right'
48
51
  },
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
- }));
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
+ });
63
67
  };
64
68
 
65
69
  exports.default = MaterialRunboxActionMenu;
@@ -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 intl = require('@elice/intl');
7
9
  var muiElements = require('@elice/mui-elements');
@@ -14,111 +16,158 @@ var MaterialRunboxApiContext = require('../contexts/MaterialRunboxApiContext.js'
14
16
  var MaterialRunboxCommandContext = require('../contexts/MaterialRunboxCommandContext.js');
15
17
  require('../contexts/MaterialRunboxContext.js');
16
18
 
19
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
20
+
21
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
+
17
23
  //
18
24
  //
19
25
  //
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();
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;
36
45
  /**
37
46
  *
38
47
  */
39
- const handleDialogClose = () => {
48
+ var handleDialogClose = function handleDialogClose() {
40
49
  setDialogOpened(false);
41
50
  };
42
51
  /**
43
52
  *
44
53
  */
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
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();
56
93
  }
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
- };
94
+ }, _callee, null, [[1, 11, 14, 17]]);
95
+ }));
96
+ return function handleReset() {
97
+ return _ref2.apply(this, arguments);
98
+ };
99
+ }();
70
100
  /**
71
101
  *
72
102
  */
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
- })));
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
+ });
82
119
  };
83
120
  /**
84
121
  *
85
122
  */
86
- const renderConfirmDialog = () => {
123
+ var renderConfirmDialog = function renderConfirmDialog() {
87
124
  if (!isDialogOpened) {
88
125
  return null;
89
126
  }
90
- return React.createElement(material.Dialog, {
127
+ return jsxRuntime.jsxs(material.Dialog, {
91
128
  open: true,
92
129
  maxWidth: "xs",
93
130
  fullWidth: true,
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
- }))));
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
+ });
117
164
  };
118
165
  //
119
166
  //
120
167
  //
121
- return React.createElement(React.Fragment, null, renderResetMenuItem(), renderConfirmDialog());
168
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
169
+ children: [renderResetMenuItem(), renderConfirmDialog()]
170
+ });
122
171
  };
123
172
 
124
173
  exports.default = MaterialRunboxActionReset;
@@ -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 intl = require('@elice/intl');
7
9
  var muiElements = require('@elice/mui-elements');
@@ -10,38 +12,48 @@ var lab = require('@mui/lab');
10
12
  var material = require('@mui/material');
11
13
  var useRunboxControl = require('../hooks/useRunboxControl.js');
12
14
 
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
19
  //
14
20
  //
15
21
  //
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);
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];
25
36
  // restart
26
- const {
27
- start
28
- } = useRunboxControl.useRunboxControl({
29
- runbox,
30
- courseId,
31
- refetch
32
- });
37
+ var _useRunboxControl = useRunboxControl.useRunboxControl({
38
+ runbox: runbox,
39
+ courseId: courseId,
40
+ refetch: refetch
41
+ }),
42
+ start = _useRunboxControl.start;
33
43
  /**
34
44
  *
35
45
  */
36
- const handleDialogClose = () => {
46
+ var handleDialogClose = function handleDialogClose() {
37
47
  setDialogOpened(false);
38
48
  };
39
49
  /**
40
50
  *
41
51
  */
42
- const handleRestartAction = () => {
52
+ var handleRestartAction = function handleRestartAction() {
43
53
  setIsLoading(true);
44
- start(true).catch(() => void 0).finally(() => {
54
+ start(true).catch(function () {
55
+ return void 0;
56
+ }).finally(function () {
45
57
  handleDialogClose();
46
58
  handleMenuClose();
47
59
  setIsLoading(false);
@@ -50,54 +62,73 @@ const MaterialRunboxActionRestart = ({
50
62
  /**
51
63
  *
52
64
  */
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
- })));
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
+ });
61
80
  };
62
81
  /**
63
82
  *
64
83
  */
65
- const renderConfirmDialog = () => {
84
+ var renderConfirmDialog = function renderConfirmDialog() {
66
85
  if (!isDialogOpened) {
67
86
  return null;
68
87
  }
69
- return React.createElement(material.Dialog, {
88
+ return jsxRuntime.jsxs(material.Dialog, {
70
89
  maxWidth: "xs",
71
90
  open: true,
72
91
  fullWidth: true,
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
- }))));
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
+ });
96
125
  };
97
126
  //
98
127
  //
99
128
  //
100
- return React.createElement(React.Fragment, null, renderRestartMenuItem(), renderConfirmDialog());
129
+ return jsxRuntime.jsxs(jsxRuntime.Fragment, {
130
+ children: [renderRestartMenuItem(), renderConfirmDialog()]
131
+ });
101
132
  };
102
133
 
103
134
  exports.default = MaterialRunboxActionRestart;
@@ -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 intl = require('@elice/intl');
@@ -14,47 +16,57 @@ require('../contexts/MaterialRunboxApiContext.js');
14
16
  require('../contexts/MaterialRunboxCommandContext.js');
15
17
  var MaterialRunboxContext = require('../contexts/MaterialRunboxContext.js');
16
18
 
19
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
20
+
21
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
+
17
23
  //
18
24
  //
19
25
  //
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);
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];
38
45
  /**
39
46
  *
40
47
  */
41
- const renderShareMenuItem = () => {
48
+ var renderShareMenuItem = function renderShareMenuItem() {
42
49
  if (!enableUrlShare) {
43
50
  return null;
44
51
  }
45
- return React.createElement(material.MenuItem, {
52
+ return jsxRuntime.jsxs(material.MenuItem, {
46
53
  disabled: !url,
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
- })));
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
+ });
53
65
  };
54
66
  /**
55
67
  *
56
68
  */
57
- const handleShareAction = () => {
69
+ var handleShareAction = function handleShareAction() {
58
70
  if (url) {
59
71
  copy(url);
60
72
  if (!error) {
@@ -66,7 +78,7 @@ const MaterialRunboxActionShare = ({
66
78
  //
67
79
  //
68
80
  //
69
- React.useEffect(() => {
81
+ React__default.default.useEffect(function () {
70
82
  if (!isClipboardCopied) {
71
83
  return;
72
84
  }