@elice/material-exercise 1.260514.0 → 1.260515.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.
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.d.ts +10 -0
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.js +213 -0
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogNativeMock.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-runner/arduino/{ArduinoConnectionGuideDialogNativeMock.js → ArduinoConnectionPreflightDialogNativeMock.js} +5 -5
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-runner/arduino/{ArduinoConnectionGuideDialogSteps.js → ArduinoConnectionPreflightDialogSteps.js} +5 -5
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionUpload.js +18 -20
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoControllerStatusMessage.js +6 -15
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoProvider.js +97 -19
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoProviderSessionWriter.js +1 -9
- package/cjs/components/material-exercise/exercise-runner/arduino/_context.d.ts +6 -4
- package/cjs/components/material-exercise/exercise-runner/locales/en.json.js +1 -1
- package/cjs/components/material-exercise/exercise-runner/locales/ja.json.js +1 -1
- package/cjs/components/material-exercise/exercise-runner/locales/ko.json.js +1 -1
- package/cjs/components/material-exercise/exercise-runner/locales/th.json.js +1 -1
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.d.ts +10 -0
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialog.js +194 -0
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogNativeMock.d.ts +3 -0
- package/es/components/material-exercise/exercise-runner/arduino/{ArduinoConnectionGuideDialogNativeMock.js → ArduinoConnectionPreflightDialogNativeMock.js} +5 -5
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionPreflightDialogSteps.d.ts +3 -0
- package/es/components/material-exercise/exercise-runner/arduino/{ArduinoConnectionGuideDialogSteps.js → ArduinoConnectionPreflightDialogSteps.js} +5 -5
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerActionUpload.js +18 -20
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoControllerStatusMessage.js +6 -15
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoProvider.js +99 -21
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoProviderSessionWriter.js +2 -10
- package/es/components/material-exercise/exercise-runner/arduino/_context.d.ts +6 -4
- package/es/components/material-exercise/exercise-runner/locales/en.json.js +1 -1
- package/es/components/material-exercise/exercise-runner/locales/ja.json.js +1 -1
- package/es/components/material-exercise/exercise-runner/locales/ko.json.js +1 -1
- package/es/components/material-exercise/exercise-runner/locales/th.json.js +1 -1
- package/package.json +8 -6
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialog.d.ts +0 -3
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialog.js +0 -156
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialogNativeMock.d.ts +0 -3
- package/cjs/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialogSteps.d.ts +0 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialog.d.ts +0 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialog.js +0 -141
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialogNativeMock.d.ts +0 -3
- package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialogSteps.d.ts +0 -3
package/es/components/material-exercise/exercise-runner/arduino/ArduinoConnectionGuideDialog.js
DELETED
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useRawEliceIntl } from '@elice/intl';
|
|
3
|
-
import { usePermissionPhase } from '@elice/mcu-bridge';
|
|
4
|
-
import ArrowUpwardIcon from '@mui/icons-material/ArrowUpward';
|
|
5
|
-
import Alert from '@mui/material/Alert';
|
|
6
|
-
import Dialog from '@mui/material/Dialog';
|
|
7
|
-
import DialogActions from '@mui/material/DialogActions';
|
|
8
|
-
import DialogContent from '@mui/material/DialogContent';
|
|
9
|
-
import DialogTitle from '@mui/material/DialogTitle';
|
|
10
|
-
import Stack from '@mui/material/Stack';
|
|
11
|
-
import Typography from '@mui/material/Typography';
|
|
12
|
-
import { useArduinoBridge } from './_context.js';
|
|
13
|
-
import ArduinoConnectionGuideDialogNativeMock from './ArduinoConnectionGuideDialogNativeMock.js';
|
|
14
|
-
import ArduinoConnectionGuideDialogSteps from './ArduinoConnectionGuideDialogSteps.js';
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
var ArduinoConnectionGuideDialog = function ArduinoConnectionGuideDialog() {
|
|
20
|
-
var intl = useRawEliceIntl();
|
|
21
|
-
var phase = usePermissionPhase();
|
|
22
|
-
var _useArduinoBridge = useArduinoBridge(),
|
|
23
|
-
connectionIntent = _useArduinoBridge.connectionIntent;
|
|
24
|
-
var open = phase === 'requesting';
|
|
25
|
-
var isUpload = connectionIntent === 'upload';
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
var renderTitle = function renderTitle() {
|
|
30
|
-
return intl.formatMessage({
|
|
31
|
-
id: isUpload ? 'exerciseRunner.arduino.connectGuide.title.upload' : 'exerciseRunner.arduino.connectGuide.title.connect'
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
var renderUploadNotice = function renderUploadNotice() {
|
|
38
|
-
if (!isUpload) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
return jsx(Alert, {
|
|
42
|
-
severity: "info",
|
|
43
|
-
children: intl.formatMessage({
|
|
44
|
-
id: 'exerciseRunner.arduino.connectGuide.upload.note'
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
var renderPreview = function renderPreview() {
|
|
52
|
-
return jsxs(Stack, {
|
|
53
|
-
alignItems: "center",
|
|
54
|
-
spacing: 1.25,
|
|
55
|
-
sx: {
|
|
56
|
-
bgcolor: function bgcolor(theme) {
|
|
57
|
-
return theme.palette.background.paper;
|
|
58
|
-
},
|
|
59
|
-
border: function border(theme) {
|
|
60
|
-
return "1px solid ".concat(theme.palette.divider);
|
|
61
|
-
},
|
|
62
|
-
borderRadius: '10px',
|
|
63
|
-
p: '14px'
|
|
64
|
-
},
|
|
65
|
-
children: [jsxs(Stack, {
|
|
66
|
-
direction: "row",
|
|
67
|
-
spacing: 0.75,
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
children: [jsx(ArrowUpwardIcon, {
|
|
70
|
-
sx: {
|
|
71
|
-
fontSize: 11
|
|
72
|
-
}
|
|
73
|
-
}), jsx(Typography, {
|
|
74
|
-
color: "primary.main",
|
|
75
|
-
sx: {
|
|
76
|
-
fontSize: 12,
|
|
77
|
-
fontWeight: 700,
|
|
78
|
-
letterSpacing: '-.01em'
|
|
79
|
-
},
|
|
80
|
-
children: intl.formatMessage({
|
|
81
|
-
id: 'exerciseRunner.arduino.connectGuide.preview.label'
|
|
82
|
-
})
|
|
83
|
-
})]
|
|
84
|
-
}), jsx(ArduinoConnectionGuideDialogNativeMock, {})]
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
var renderActions = function renderActions() {
|
|
91
|
-
return jsx(DialogActions, {
|
|
92
|
-
sx: {
|
|
93
|
-
justifyContent: 'flex-start',
|
|
94
|
-
px: 3,
|
|
95
|
-
py: 2
|
|
96
|
-
},
|
|
97
|
-
children: jsx(Typography, {
|
|
98
|
-
variant: "caption",
|
|
99
|
-
color: "text.secondary",
|
|
100
|
-
children: intl.formatMessage({
|
|
101
|
-
id: 'exerciseRunner.arduino.connectGuide.footer'
|
|
102
|
-
})
|
|
103
|
-
})
|
|
104
|
-
});
|
|
105
|
-
};
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
// No onClose: open state is fully derived from the picker phase.
|
|
110
|
-
return jsxs(Dialog, {
|
|
111
|
-
disableEnforceFocus: true,
|
|
112
|
-
hideBackdrop: true,
|
|
113
|
-
fullWidth: true,
|
|
114
|
-
open: open,
|
|
115
|
-
maxWidth: "sm",
|
|
116
|
-
sx: {
|
|
117
|
-
pointerEvents: 'none'
|
|
118
|
-
},
|
|
119
|
-
PaperProps: {
|
|
120
|
-
sx: {
|
|
121
|
-
pointerEvents: 'auto'
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
children: [jsx(DialogTitle, {
|
|
125
|
-
children: renderTitle()
|
|
126
|
-
}), jsx(DialogContent, {
|
|
127
|
-
children: jsxs(Stack, {
|
|
128
|
-
spacing: 2,
|
|
129
|
-
children: [renderUploadNotice(), jsx(Typography, {
|
|
130
|
-
variant: "body2",
|
|
131
|
-
color: "text.secondary",
|
|
132
|
-
children: intl.formatMessage({
|
|
133
|
-
id: 'exerciseRunner.arduino.connectGuide.body'
|
|
134
|
-
})
|
|
135
|
-
}), renderPreview(), jsx(ArduinoConnectionGuideDialogSteps, {})]
|
|
136
|
-
})
|
|
137
|
-
}), renderActions()]
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
export { ArduinoConnectionGuideDialog as default };
|