@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.
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
@@ -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 runboxTerminatedImage from '../../../assets/terminated.png.js';
13
+ import img from '../../../assets/terminated.png.js';
12
14
 
13
15
  //
14
16
  //
15
17
  //
16
- const RuntimeOverlayTerminated = ({
17
- __intl: intl,
18
- reason,
19
- startRuntime
20
- }) => {
21
- const {
22
- showMessenger
23
- } = useMaterialRunboxContext();
24
- const [isRestarting, setRestarting] = React.useState(false);
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
- const handleRestart = () => {
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
- const runtimeTerminatedAction = React.useMemo(() => {
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 React.createElement(Box, {
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
- }, React.createElement(Stack, {
94
- gap: "1.5rem",
95
- alignItems: "center"
96
- }, React.createElement(Box, {
97
- component: "img",
98
- src: runboxTerminatedImage,
99
- alt: "terminated",
100
- sx: {
101
- maxWidth: '10rem',
102
- height: 'auto'
103
- }
104
- }), React.createElement(Stack, {
105
- gap: "0.5rem"
106
- }, React.createElement(Typography, {
107
- variant: "h6",
108
- textAlign: "center"
109
- }, intl.formatMessage({
110
- id: 'runbox.runtime.overlay.terminated.title'
111
- })), React.createElement(Typography, {
112
- variant: "body2",
113
- textAlign: "center",
114
- whiteSpace: "pre-line"
115
- }, runtimeTerminatedAction.unexpected ? runtimeTerminatedAction.description.concat('\n', intl.formatMessage({
116
- id: 'runbox.runtime.overlay.terminated.description.unexpected'
117
- })) : runtimeTerminatedAction.description)), React.createElement(Stack, {
118
- gap: "0.5rem",
119
- sx: {
120
- width: '100%',
121
- maxWidth: '17rem'
122
- }
123
- }, React.createElement(LoadingButton, {
124
- variant: "contained",
125
- loading: isRestarting,
126
- startIcon: React.createElement(PlayArrow, null),
127
- onClick: handleRestart
128
- }, intl.formatMessage({
129
- id: 'runbox.runtime.overlay.terminated.restart'
130
- })), runtimeTerminatedAction.unexpected && typeof showMessenger === 'function' ? React.createElement(Button, {
131
- variant: "text",
132
- onClick: showMessenger
133
- }, intl.formatMessage({
134
- id: 'runbox.common.support'
135
- })) : null)));
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.0",
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": "run-p build:es build:cjs",
21
- "build:es": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es",
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.0",
56
- "@elice/material-shared-utils": "1.240718.0-trasncript.0",
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.230815.0",
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": "^1.240619.0",
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
  }