@elice/material-runbox 1.240718.0-trasncript.0 → 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 +386 -0
- package/cjs/assets/queue.gif.js +1 -2
- package/cjs/assets/runbox_logo.png.js +1 -2
- package/cjs/assets/terminated.png.js +1 -2
- package/cjs/components/material-runbox/MaterialRunbox.js +24 -20
- package/cjs/components/material-runbox/MaterialRunboxBody.js +10 -4
- package/cjs/components/material-runbox/MaterialRunboxContent.js +132 -103
- package/cjs/components/material-runbox/MaterialRunboxFooter.js +27 -18
- package/cjs/components/material-runbox/MaterialRunboxHeader.js +103 -87
- package/cjs/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +31 -27
- package/cjs/components/material-runbox/actions/MaterialRunboxActionGrade.js +242 -159
- package/cjs/components/material-runbox/actions/MaterialRunboxActionMenu.js +32 -28
- package/cjs/components/material-runbox/actions/MaterialRunboxActionReset.js +125 -76
- package/cjs/components/material-runbox/actions/MaterialRunboxActionRestart.js +84 -53
- package/cjs/components/material-runbox/actions/MaterialRunboxActionShare.js +40 -28
- package/cjs/components/material-runbox/contexts/MaterialRunboxApiContext.js +27 -15
- package/cjs/components/material-runbox/contexts/MaterialRunboxCommandContext.js +52 -36
- package/cjs/components/material-runbox/contexts/MaterialRunboxContext.js +11 -8
- package/cjs/components/material-runbox/contexts/index.js +17 -0
- package/cjs/components/material-runbox/hooks/index.js +7 -0
- package/cjs/components/material-runbox/hooks/useRunboxControl.js +62 -38
- package/cjs/components/material-runbox/index.js +7 -0
- package/cjs/components/material-runbox/locales/index.js +13 -0
- package/cjs/components/material-runbox/runtime/Runtime.js +25 -17
- package/cjs/components/material-runbox/runtime/RuntimeOverlayAssigned.js +33 -29
- package/cjs/components/material-runbox/runtime/RuntimeOverlayQueued.js +40 -39
- package/cjs/components/material-runbox/runtime/RuntimeOverlayTerminated.js +72 -57
- package/es/_virtual/_rollupPluginBabelHelpers.js +377 -0
- package/es/assets/queue.gif.js +1 -2
- package/es/assets/runbox_logo.png.js +1 -2
- package/es/assets/terminated.png.js +1 -2
- package/es/components/material-runbox/MaterialRunbox.js +24 -20
- package/es/components/material-runbox/MaterialRunboxBody.js +6 -4
- package/es/components/material-runbox/MaterialRunboxContent.js +128 -103
- package/es/components/material-runbox/MaterialRunboxFooter.js +23 -18
- package/es/components/material-runbox/MaterialRunboxHeader.js +99 -88
- package/es/components/material-runbox/actions/MaterialRunboxActionAutoShutdown.js +27 -27
- package/es/components/material-runbox/actions/MaterialRunboxActionGrade.js +237 -159
- package/es/components/material-runbox/actions/MaterialRunboxActionMenu.js +28 -28
- package/es/components/material-runbox/actions/MaterialRunboxActionReset.js +121 -76
- package/es/components/material-runbox/actions/MaterialRunboxActionRestart.js +80 -53
- package/es/components/material-runbox/actions/MaterialRunboxActionShare.js +36 -28
- package/es/components/material-runbox/contexts/MaterialRunboxApiContext.js +22 -14
- package/es/components/material-runbox/contexts/MaterialRunboxCommandContext.js +47 -35
- package/es/components/material-runbox/contexts/MaterialRunboxContext.js +6 -7
- package/es/components/material-runbox/contexts/index.js +3 -0
- package/es/components/material-runbox/hooks/index.js +1 -0
- package/es/components/material-runbox/hooks/useRunboxControl.js +62 -38
- package/es/components/material-runbox/index.js +1 -0
- package/es/components/material-runbox/locales/index.js +4 -0
- package/es/components/material-runbox/runtime/Runtime.js +21 -17
- package/es/components/material-runbox/runtime/RuntimeOverlayAssigned.js +34 -30
- package/es/components/material-runbox/runtime/RuntimeOverlayQueued.js +41 -40
- package/es/components/material-runbox/runtime/RuntimeOverlayTerminated.js +69 -58
- package/package.json +8 -11
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { slicedToArray as _slicedToArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
3
5
|
import { PlayArrow } from '@mui/icons-material';
|
|
@@ -8,33 +10,34 @@ import '../contexts/MaterialRunboxCommandContext.js';
|
|
|
8
10
|
import { useMaterialRunboxContext } from '../contexts/MaterialRunboxContext.js';
|
|
9
11
|
import messageEn from '../locales/en.json.js';
|
|
10
12
|
import messageKo from '../locales/ko.json.js';
|
|
11
|
-
import
|
|
13
|
+
import img from '../../../assets/terminated.png.js';
|
|
12
14
|
|
|
13
15
|
//
|
|
14
16
|
//
|
|
15
17
|
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
var RuntimeOverlayTerminated = function RuntimeOverlayTerminated(_ref) {
|
|
19
|
+
var intl = _ref.__intl,
|
|
20
|
+
reason = _ref.reason,
|
|
21
|
+
startRuntime = _ref.startRuntime;
|
|
22
|
+
var _useMaterialRunboxCon = useMaterialRunboxContext(),
|
|
23
|
+
showMessenger = _useMaterialRunboxCon.showMessenger;
|
|
24
|
+
var _React$useState = React.useState(false),
|
|
25
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
26
|
+
isRestarting = _React$useState2[0],
|
|
27
|
+
setRestarting = _React$useState2[1];
|
|
25
28
|
/**
|
|
26
29
|
* Restart the project.
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
var handleRestart = function handleRestart() {
|
|
29
32
|
setRestarting(true);
|
|
30
|
-
startRuntime().finally(()
|
|
33
|
+
startRuntime().finally(function () {
|
|
31
34
|
setRestarting(false);
|
|
32
35
|
});
|
|
33
36
|
};
|
|
34
37
|
/**
|
|
35
38
|
* Terminated description and action.
|
|
36
39
|
*/
|
|
37
|
-
|
|
40
|
+
var runtimeTerminatedAction = React.useMemo(function () {
|
|
38
41
|
switch (reason) {
|
|
39
42
|
// general shutdown
|
|
40
43
|
case 'stopped_by_user':
|
|
@@ -82,57 +85,65 @@ const RuntimeOverlayTerminated = ({
|
|
|
82
85
|
//
|
|
83
86
|
//
|
|
84
87
|
//
|
|
85
|
-
return
|
|
88
|
+
return jsx(Box, {
|
|
86
89
|
sx: {
|
|
87
90
|
display: 'flex',
|
|
88
91
|
justifyContent: 'center',
|
|
89
92
|
alignItems: 'center',
|
|
90
93
|
width: '100%',
|
|
91
94
|
height: '100%'
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
95
|
+
},
|
|
96
|
+
children: jsxs(Stack, {
|
|
97
|
+
gap: "1.5rem",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
children: [jsx(Box, {
|
|
100
|
+
component: "img",
|
|
101
|
+
src: img,
|
|
102
|
+
alt: "terminated",
|
|
103
|
+
sx: {
|
|
104
|
+
maxWidth: '10rem',
|
|
105
|
+
height: 'auto'
|
|
106
|
+
}
|
|
107
|
+
}), jsxs(Stack, {
|
|
108
|
+
gap: "0.5rem",
|
|
109
|
+
children: [jsx(Typography, {
|
|
110
|
+
variant: "h6",
|
|
111
|
+
textAlign: "center",
|
|
112
|
+
children: intl.formatMessage({
|
|
113
|
+
id: 'runbox.runtime.overlay.terminated.title'
|
|
114
|
+
})
|
|
115
|
+
}), jsx(Typography, {
|
|
116
|
+
variant: "body2",
|
|
117
|
+
textAlign: "center",
|
|
118
|
+
whiteSpace: "pre-line",
|
|
119
|
+
children: runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl.formatMessage({
|
|
120
|
+
id: 'runbox.runtime.overlay.terminated.description.unexpected'
|
|
121
|
+
})) : runtimeTerminatedAction.description
|
|
122
|
+
})]
|
|
123
|
+
}), jsxs(Stack, {
|
|
124
|
+
gap: "0.5rem",
|
|
125
|
+
sx: {
|
|
126
|
+
width: '100%',
|
|
127
|
+
maxWidth: '17rem'
|
|
128
|
+
},
|
|
129
|
+
children: [jsx(LoadingButton, {
|
|
130
|
+
variant: "contained",
|
|
131
|
+
loading: isRestarting,
|
|
132
|
+
startIcon: jsx(PlayArrow, {}),
|
|
133
|
+
onClick: handleRestart,
|
|
134
|
+
children: intl.formatMessage({
|
|
135
|
+
id: 'runbox.runtime.overlay.terminated.restart'
|
|
136
|
+
})
|
|
137
|
+
}), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ? jsx(Button, {
|
|
138
|
+
variant: "text",
|
|
139
|
+
onClick: showMessenger,
|
|
140
|
+
children: intl.formatMessage({
|
|
141
|
+
id: 'runbox.common.support'
|
|
142
|
+
})
|
|
143
|
+
}) : null]
|
|
144
|
+
})]
|
|
145
|
+
})
|
|
146
|
+
});
|
|
136
147
|
};
|
|
137
148
|
var RuntimeOverlayTerminated$1 = new IntlComponentBuilder(RuntimeOverlayTerminated).add('en', messageEn).add('ko', messageKo).addAsync('th', import('../locales/th.json.js')).addAsync('ja', import('../locales/ja.json.js')).build();
|
|
138
149
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-runbox",
|
|
3
|
-
"version": "1.240718.0-trasncript.
|
|
3
|
+
"version": "1.240718.0-trasncript.2",
|
|
4
4
|
"description": "User view and editing components of Elice material runbox",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -17,10 +17,8 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
22
|
-
"build:cjs": "rollup -c ../../rollup.config.ts --configPlugin typescript -f cjs",
|
|
23
|
-
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -w",
|
|
20
|
+
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs",
|
|
21
|
+
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs -w",
|
|
24
22
|
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
25
23
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
26
24
|
},
|
|
@@ -52,14 +50,14 @@
|
|
|
52
50
|
},
|
|
53
51
|
"devDependencies": {
|
|
54
52
|
"@elice/intl": "0.240425.0-rc.2",
|
|
55
|
-
"@elice/material-shared-types": "1.240718.0-trasncript.
|
|
56
|
-
"@elice/material-shared-utils": "1.240718.0-trasncript.
|
|
53
|
+
"@elice/material-shared-types": "1.240718.0-trasncript.2",
|
|
54
|
+
"@elice/material-shared-utils": "1.240718.0-trasncript.2",
|
|
57
55
|
"@elice/mui-elements": "^5.231130.0",
|
|
58
|
-
"@elice/mui-system": "^5.
|
|
56
|
+
"@elice/mui-system": "^5.240108.1",
|
|
59
57
|
"@elice/mui-x-snackbar": "^5.231130.0",
|
|
60
58
|
"@elice/openapi-client-material-runbox": "1.240328.0",
|
|
61
59
|
"@elice/runbox-client": "1.240711.0",
|
|
62
|
-
"@elice/types": "
|
|
60
|
+
"@elice/types": "1.240709.0",
|
|
63
61
|
"@emotion/react": "^11.10.5",
|
|
64
62
|
"@emotion/styled": "^11.10.5",
|
|
65
63
|
"@fortawesome/pro-regular-svg-icons": "^6.4.2",
|
|
@@ -73,6 +71,5 @@
|
|
|
73
71
|
"@types/react-transition-group": "^4.4.4",
|
|
74
72
|
"react": "^17.0.2",
|
|
75
73
|
"react-use": "^17.2.4"
|
|
76
|
-
}
|
|
77
|
-
"gitHead": "832dc77a5e38ff02e0bfec8905a3a9706b9b9593"
|
|
74
|
+
}
|
|
78
75
|
}
|