@elice/material-exercise 1.260305.0 → 1.260429.0-improvetimerpopoverui.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/MaterialExercise.js +113 -17
- package/cjs/components/material-exercise/context/ExerciseProvider.d.ts +3 -1
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +52 -7
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +1 -1
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.js +18 -2
- package/cjs/components/shared/exercise-version-list/ExerciseVersionListItem.d.ts +1 -0
- package/cjs/components/shared/file-tabs/FileTab.js +70 -8
- package/cjs/components/shared/file-tabs/FileTabs.js +24 -3
- package/cjs/components/shared/file-tree/FileTreeListItemContent.js +103 -14
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.js +24 -3
- package/cjs/components/shared/file-tree/FileTreeListItems.js +28 -3
- package/cjs/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.js +7 -2
- package/cjs/components/shared/material-modal/MaterialModal.d.ts +1 -0
- package/cjs/components/shared/material-modal/MaterialModal.js +34 -6
- package/es/components/material-exercise/MaterialExercise.js +97 -2
- package/es/components/material-exercise/context/ExerciseProvider.d.ts +3 -1
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +46 -2
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +1 -1
- package/es/components/shared/exercise-version-list/ExerciseVersionList.js +13 -1
- package/es/components/shared/exercise-version-list/ExerciseVersionListItem.d.ts +1 -0
- package/es/components/shared/file-tabs/FileTab.js +62 -1
- package/es/components/shared/file-tabs/FileTabs.js +21 -1
- package/es/components/shared/file-tree/FileTreeListItemContent.js +90 -2
- package/es/components/shared/file-tree/FileTreeListItemContentInput.js +21 -1
- package/es/components/shared/file-tree/FileTreeListItems.js +22 -1
- package/es/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.js +5 -1
- package/es/components/shared/material-modal/MaterialModal.d.ts +1 -0
- package/es/components/shared/material-modal/MaterialModal.js +26 -2
- package/package.json +26 -17
- package/cjs/components/material-exercise/MaterialExercise.styled.d.ts +0 -66
- package/cjs/components/material-exercise/MaterialExercise.styled.js +0 -119
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.d.ts +0 -24
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +0 -62
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.d.ts +0 -5
- package/cjs/components/shared/exercise-version-list/ExerciseVersionList.styled.js +0 -22
- package/cjs/components/shared/file-tabs/FileTab.styled.d.ts +0 -33
- package/cjs/components/shared/file-tabs/FileTab.styled.js +0 -77
- package/cjs/components/shared/file-tabs/FileTabs.styled.d.ts +0 -12
- package/cjs/components/shared/file-tabs/FileTabs.styled.js +0 -31
- package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.d.ts +0 -62
- package/cjs/components/shared/file-tree/FileTreeListItemContent.styled.js +0 -108
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.d.ts +0 -7
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.styled.js +0 -31
- package/cjs/components/shared/file-tree/FileTreeListItems.styled.d.ts +0 -8
- package/cjs/components/shared/file-tree/FileTreeListItems.styled.js +0 -32
- package/cjs/components/shared/file-tree/FileTreeToolbar.styled.d.ts +0 -4
- package/cjs/components/shared/file-tree/FileTreeToolbar.styled.js +0 -14
- package/cjs/components/shared/material-modal/MaterialModal.styled.d.ts +0 -20
- package/cjs/components/shared/material-modal/MaterialModal.styled.js +0 -39
- package/es/components/material-exercise/MaterialExercise.styled.d.ts +0 -66
- package/es/components/material-exercise/MaterialExercise.styled.js +0 -100
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.d.ts +0 -24
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.styled.js +0 -49
- package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.d.ts +0 -5
- package/es/components/shared/exercise-version-list/ExerciseVersionList.styled.js +0 -16
- package/es/components/shared/file-tabs/FileTab.styled.d.ts +0 -33
- package/es/components/shared/file-tabs/FileTab.styled.js +0 -65
- package/es/components/shared/file-tabs/FileTabs.styled.d.ts +0 -12
- package/es/components/shared/file-tabs/FileTabs.styled.js +0 -24
- package/es/components/shared/file-tree/FileTreeListItemContent.styled.d.ts +0 -62
- package/es/components/shared/file-tree/FileTreeListItemContent.styled.js +0 -94
- package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.d.ts +0 -7
- package/es/components/shared/file-tree/FileTreeListItemContentInput.styled.js +0 -24
- package/es/components/shared/file-tree/FileTreeListItems.styled.d.ts +0 -8
- package/es/components/shared/file-tree/FileTreeListItems.styled.js +0 -25
- package/es/components/shared/file-tree/FileTreeToolbar.styled.d.ts +0 -4
- package/es/components/shared/file-tree/FileTreeToolbar.styled.js +0 -8
- package/es/components/shared/material-modal/MaterialModal.styled.d.ts +0 -20
- package/es/components/shared/material-modal/MaterialModal.styled.js +0 -29
|
@@ -3,21 +3,110 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
|
|
6
|
+
var _styled = require('@emotion/styled/base');
|
|
6
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
8
|
var React = require('react');
|
|
8
9
|
var blocks = require('@elice/blocks');
|
|
9
10
|
var designTokens = require('@elice/design-tokens');
|
|
10
11
|
var icons = require('@elice/icons');
|
|
12
|
+
var react = require('@emotion/react');
|
|
11
13
|
var FileTreeListItemContentInput = require('./FileTreeListItemContentInput.js');
|
|
12
14
|
var FileTreeListItemContentMenu = require('./FileTreeListItemContentMenu.js');
|
|
13
|
-
var FileTreeListItemContent_styled = require('./FileTreeListItemContent.styled.js');
|
|
14
15
|
var FileIcon = require('../file-icon/FileIcon.js');
|
|
15
16
|
var FileTreeContext = require('./context/FileTreeContext.js');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
19
|
|
|
20
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
19
21
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
22
|
|
|
23
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
24
|
+
//
|
|
25
|
+
//
|
|
26
|
+
//
|
|
27
|
+
var CONTENT_MIN_HEIGHT = 28; // 1.75rem
|
|
28
|
+
var CONTENT_LEFT_BORDER_WIDTH = 3; // 0.1875rem
|
|
29
|
+
var CONTENT_RIGHT_PADDING = 12; // 0.75rem
|
|
30
|
+
var CONTENT_LABEL_VERTICAL_PADDING = 4; // 0.25rem
|
|
31
|
+
var CONTENT_LABEL_ICON_SIZE = 16; // 1rem
|
|
32
|
+
var CONTENT_LABEL_ICON_AFTER_MARGIN = 4; // 1rem
|
|
33
|
+
var CONTENT_LABEL_DIR_ARROW_PADDING = 4; // 0.25rem
|
|
34
|
+
var CONTENT_LABEL_DIR_ARROW_SIZE = 12; // 0.75rem
|
|
35
|
+
var CONTENT_LABEL_MENU_BUTTON_SIZE = CONTENT_MIN_HEIGHT - CONTENT_LABEL_VERTICAL_PADDING * 2;
|
|
36
|
+
//
|
|
37
|
+
//
|
|
38
|
+
//
|
|
39
|
+
/**
|
|
40
|
+
* indent
|
|
41
|
+
*/
|
|
42
|
+
var StyledContentIndents = /*#__PURE__*/_styled__default.default("div", {
|
|
43
|
+
target: "e1mtizjs8"
|
|
44
|
+
})();
|
|
45
|
+
var StyledContentIndentGuide = /*#__PURE__*/_styled__default.default("div", {
|
|
46
|
+
target: "e1mtizjs7"
|
|
47
|
+
})("display:inline-block;height:100%;border-right:0.5px solid ", designTokens.base.color.gray7, ";");
|
|
48
|
+
/**
|
|
49
|
+
* label
|
|
50
|
+
*/
|
|
51
|
+
var StyledContentLabel = /*#__PURE__*/_styled__default.default("div", {
|
|
52
|
+
target: "e1mtizjs6"
|
|
53
|
+
})("flex:1;display:flex;align-items:center;padding-top:", CONTENT_LABEL_VERTICAL_PADDING, "px;padding-bottom:", CONTENT_LABEL_VERTICAL_PADDING, "px;overflow:hidden;");
|
|
54
|
+
/**
|
|
55
|
+
* label > dir arrow
|
|
56
|
+
*/
|
|
57
|
+
var StyledContentLabelDirArrowWrap = /*#__PURE__*/_styled__default.default("div", {
|
|
58
|
+
target: "e1mtizjs5"
|
|
59
|
+
})("flex:0 0 ", CONTENT_LABEL_DIR_ARROW_SIZE + CONTENT_LABEL_DIR_ARROW_PADDING * 2, "px;display:flex;justify-content:center;align-items:center;padding:", CONTENT_LABEL_DIR_ARROW_PADDING, ";height:", CONTENT_LABEL_DIR_ARROW_SIZE, "px;");
|
|
60
|
+
/**
|
|
61
|
+
* label > icon
|
|
62
|
+
*/
|
|
63
|
+
var StyledContentLabelIconWrap = /*#__PURE__*/_styled__default.default("div", {
|
|
64
|
+
target: "e1mtizjs4"
|
|
65
|
+
})("flex:0 0 ", CONTENT_LABEL_ICON_SIZE + CONTENT_LABEL_ICON_AFTER_MARGIN, "px;display:flex;margin-right:", CONTENT_LABEL_ICON_AFTER_MARGIN, "px;height:", CONTENT_LABEL_ICON_SIZE, "px;");
|
|
66
|
+
/**
|
|
67
|
+
* label > filename
|
|
68
|
+
*/
|
|
69
|
+
var StyledContentLabelFilename = /*#__PURE__*/_styled__default.default(blocks.Text, {
|
|
70
|
+
target: "e1mtizjs3"
|
|
71
|
+
})("flex:1;margin-right:0.125rem;color:", designTokens.base.color.gray4, ";font-weight:500;");
|
|
72
|
+
/**
|
|
73
|
+
* label > status icon
|
|
74
|
+
*/
|
|
75
|
+
var StyledContentLabelStatusIcon = /*#__PURE__*/_styled__default.default(blocks.Icon, {
|
|
76
|
+
target: "e1mtizjs2"
|
|
77
|
+
})("production" === "production" ? {
|
|
78
|
+
name: "129lf1x",
|
|
79
|
+
styles: "margin-left:0.25rem;margin-right:0;&:last-of-type{margin-right:0.25rem;}"
|
|
80
|
+
} : {
|
|
81
|
+
name: "129lf1x",
|
|
82
|
+
styles: "margin-left:0.25rem;margin-right:0;&:last-of-type{margin-right:0.25rem;}",
|
|
83
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* label > menu button
|
|
87
|
+
*/
|
|
88
|
+
var StyledContentLabelMenuButton = /*#__PURE__*/_styled__default.default(blocks.IconButton, {
|
|
89
|
+
target: "e1mtizjs1"
|
|
90
|
+
})("flex:0 0 ", CONTENT_LABEL_MENU_BUTTON_SIZE, "px;width:", CONTENT_LABEL_MENU_BUTTON_SIZE, "px!important;height:", CONTENT_LABEL_MENU_BUTTON_SIZE, "px!important;opacity:0;transition:opacity 150ms ease-in-out;");
|
|
91
|
+
//
|
|
92
|
+
//
|
|
93
|
+
//
|
|
94
|
+
var cssStyledContentActive = /*#__PURE__*/react.css("border-left-color:", designTokens.base.color.primary4, ";background-color:", designTokens.base.color.navy7, ";", StyledContentLabelFilename, "{color:", designTokens.base.color.gray3, ";}");
|
|
95
|
+
var cssStyledContentDragging = "production" === "production" ? {
|
|
96
|
+
name: "1ym7stk",
|
|
97
|
+
styles: "border-left-color:transparent!important;background-color:transparent!important"
|
|
98
|
+
} : {
|
|
99
|
+
name: "1ym7stk",
|
|
100
|
+
styles: "border-left-color:transparent!important;background-color:transparent!important",
|
|
101
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
102
|
+
};
|
|
103
|
+
var StyledContent = /*#__PURE__*/_styled__default.default("div", {
|
|
104
|
+
target: "e1mtizjs0"
|
|
105
|
+
})("display:flex;padding-right:", CONTENT_RIGHT_PADDING, "px;width:100%;min-width:0;min-height:", CONTENT_MIN_HEIGHT, "px;border-left-width:", CONTENT_LEFT_BORDER_WIDTH, "px;border-left-style:solid;border-left-color:transparent;user-select:none;", function (props) {
|
|
106
|
+
return props.active && cssStyledContentActive;
|
|
107
|
+
}, " ", function (props) {
|
|
108
|
+
return props.isDragging && cssStyledContentDragging;
|
|
109
|
+
}, " &:hover{background-color:", designTokens.base.color.navy8, ";", StyledContentLabelFilename, "{color:", designTokens.base.color.gray3, ";}", StyledContentLabelMenuButton, "{opacity:1;}}");
|
|
21
110
|
var ITEM_IDENT_WIDTH = 8; // 0.5rem
|
|
22
111
|
var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
23
112
|
var node = _ref.node,
|
|
@@ -43,12 +132,12 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
43
132
|
var contentIndents = React__default.default.useMemo(function () {
|
|
44
133
|
var depth = (node.path.match(/\//g) || []).length;
|
|
45
134
|
var counts = depth === 0 ? 0 : indent * depth;
|
|
46
|
-
return jsxRuntime.jsx(
|
|
135
|
+
return jsxRuntime.jsx(StyledContentIndents, {
|
|
47
136
|
style: {
|
|
48
137
|
flex: "0 0 ".concat(ITEM_IDENT_WIDTH * counts, "px")
|
|
49
138
|
},
|
|
50
139
|
children: Array(counts).fill(0).map(function (_, index) {
|
|
51
|
-
return jsxRuntime.jsx(
|
|
140
|
+
return jsxRuntime.jsx(StyledContentIndentGuide, {
|
|
52
141
|
style: {
|
|
53
142
|
width: "".concat(ITEM_IDENT_WIDTH, "px")
|
|
54
143
|
}
|
|
@@ -87,9 +176,9 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
87
176
|
var renderContentDirectoryExpandArrow = function renderContentDirectoryExpandArrow() {
|
|
88
177
|
// new or directory
|
|
89
178
|
if (isNewItem || !node.isDirectory) {
|
|
90
|
-
return jsxRuntime.jsx(
|
|
179
|
+
return jsxRuntime.jsx(StyledContentLabelDirArrowWrap, {});
|
|
91
180
|
}
|
|
92
|
-
return jsxRuntime.jsx(
|
|
181
|
+
return jsxRuntime.jsx(StyledContentLabelDirArrowWrap, {
|
|
93
182
|
children: jsxRuntime.jsx(blocks.Icon, {
|
|
94
183
|
icon: icons.eilArrowDownwardsSingle,
|
|
95
184
|
size: "tiny",
|
|
@@ -104,7 +193,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
104
193
|
var renderContentIcon = function renderContentIcon() {
|
|
105
194
|
// new
|
|
106
195
|
if (isNewItem) {
|
|
107
|
-
return jsxRuntime.jsx(
|
|
196
|
+
return jsxRuntime.jsx(StyledContentLabelIconWrap, {
|
|
108
197
|
children: jsxRuntime.jsx(FileIcon.default, {
|
|
109
198
|
filename: "newfile",
|
|
110
199
|
directory: (newInput === null || newInput === void 0 ? void 0 : newInput.type) === 'directory',
|
|
@@ -115,7 +204,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
115
204
|
}
|
|
116
205
|
// checkbox for file
|
|
117
206
|
if (mode === 'checkbox' && !node.isDirectory) {
|
|
118
|
-
return jsxRuntime.jsx(
|
|
207
|
+
return jsxRuntime.jsx(StyledContentLabelIconWrap, {
|
|
119
208
|
children: jsxRuntime.jsx(blocks.Checkbox, {
|
|
120
209
|
dark: true,
|
|
121
210
|
value: node.isInitialOpen,
|
|
@@ -128,7 +217,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
128
217
|
})
|
|
129
218
|
});
|
|
130
219
|
}
|
|
131
|
-
return jsxRuntime.jsx(
|
|
220
|
+
return jsxRuntime.jsx(StyledContentLabelIconWrap, {
|
|
132
221
|
children: jsxRuntime.jsx(FileIcon.default, {
|
|
133
222
|
filename: node.title,
|
|
134
223
|
directory: node.isDirectory,
|
|
@@ -170,7 +259,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
170
259
|
})
|
|
171
260
|
});
|
|
172
261
|
}
|
|
173
|
-
return jsxRuntime.jsx(
|
|
262
|
+
return jsxRuntime.jsx(StyledContentLabelFilename, {
|
|
174
263
|
block: true,
|
|
175
264
|
ellipsis: true,
|
|
176
265
|
size: "tiny",
|
|
@@ -187,7 +276,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
187
276
|
}
|
|
188
277
|
// hidden
|
|
189
278
|
if (node.isHidden) {
|
|
190
|
-
return jsxRuntime.jsx(
|
|
279
|
+
return jsxRuntime.jsx(StyledContentLabelStatusIcon, {
|
|
191
280
|
icon: icons.eilVisibilityOff,
|
|
192
281
|
color: designTokens.base.color.gray4,
|
|
193
282
|
size: "small"
|
|
@@ -195,7 +284,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
195
284
|
}
|
|
196
285
|
// readonly
|
|
197
286
|
if (node.isReadonly) {
|
|
198
|
-
return jsxRuntime.jsx(
|
|
287
|
+
return jsxRuntime.jsx(StyledContentLabelStatusIcon, {
|
|
199
288
|
icon: icons.eilLockOn,
|
|
200
289
|
color: designTokens.base.color.gray4,
|
|
201
290
|
size: "small"
|
|
@@ -212,7 +301,7 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
212
301
|
return null;
|
|
213
302
|
}
|
|
214
303
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
215
|
-
children: [jsxRuntime.jsx(
|
|
304
|
+
children: [jsxRuntime.jsx(StyledContentLabelMenuButton, {
|
|
216
305
|
transparent: true,
|
|
217
306
|
icon: icons.eilMoreVertical,
|
|
218
307
|
size: "tiny",
|
|
@@ -234,13 +323,13 @@ var FileTreeListItemContent = function FileTreeListItemContent(_ref) {
|
|
|
234
323
|
//
|
|
235
324
|
//
|
|
236
325
|
//
|
|
237
|
-
return jsxRuntime.jsxs(
|
|
326
|
+
return jsxRuntime.jsxs(StyledContent, {
|
|
238
327
|
title: "~/".concat(node.path),
|
|
239
328
|
active: activePath === node.path,
|
|
240
329
|
isDragging: dropzonePath !== null,
|
|
241
330
|
onClick: handleClick,
|
|
242
331
|
onContextMenu: handleContextMenu,
|
|
243
|
-
children: [contentIndents, jsxRuntime.jsxs(
|
|
332
|
+
children: [contentIndents, jsxRuntime.jsxs(StyledContentLabel, {
|
|
244
333
|
children: [renderContentDirectoryExpandArrow(), renderContentIcon(), renderContentFilename(), renderContentStatusIcon(), renderContentMenuButton()]
|
|
245
334
|
})]
|
|
246
335
|
});
|
|
@@ -2,25 +2,46 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _styled = require('@emotion/styled/base');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
var React = require('react');
|
|
7
8
|
var reactHookForm = require('react-hook-form');
|
|
8
9
|
var reactUse = require('react-use');
|
|
10
|
+
var blocks = require('@elice/blocks');
|
|
11
|
+
var designTokens = require('@elice/design-tokens');
|
|
9
12
|
var intl = require('@elice/intl');
|
|
10
13
|
var fileTreeGenerator = require('./utils/fileTreeGenerator.js');
|
|
11
|
-
var FileTreeListItemContentInput_styled = require('./FileTreeListItemContentInput.styled.js');
|
|
12
14
|
var FileTreeContext = require('./context/FileTreeContext.js');
|
|
13
15
|
|
|
14
16
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
17
|
|
|
18
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
16
19
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
20
|
|
|
21
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
22
|
+
var INPUT_HEIGHT = '1.25rem';
|
|
23
|
+
var INPUT_FONT_SIZE = '0.75rem';
|
|
24
|
+
var INPUT_INNER_LEFT_PADDING = '0.125rem';
|
|
25
|
+
var INPUT_INNER_RIGHT_PADDING = '0.25rem';
|
|
18
26
|
var FILENAME_MAX_LENGTH = 65535;
|
|
19
27
|
var FILENAME_REGEXP_DOT = /^\.$/;
|
|
20
28
|
var FILENAME_REGEXP_DOTDOT = /^\.\.$/;
|
|
21
29
|
var FILENAME_REGEXP_DOT_ELICE = /^\.elice$/;
|
|
22
30
|
var FILENAME_REGEXP_SLASH = /\//;
|
|
23
31
|
var FILENAME_REGEXP_BACK_SLASH = /\\/;
|
|
32
|
+
var StyledInputForm = /*#__PURE__*/_styled__default.default("form", {
|
|
33
|
+
target: "e1lewuzv1"
|
|
34
|
+
})("production" === "production" ? {
|
|
35
|
+
name: "y3klfd",
|
|
36
|
+
styles: "flex:1;display:flex"
|
|
37
|
+
} : {
|
|
38
|
+
name: "y3klfd",
|
|
39
|
+
styles: "flex:1;display:flex",
|
|
40
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
41
|
+
});
|
|
42
|
+
var StyledInput = /*#__PURE__*/_styled__default.default(blocks.Input, {
|
|
43
|
+
target: "e1lewuzv0"
|
|
44
|
+
})("min-height:", INPUT_HEIGHT, ";>div{background:transparent!important;>div{&:nth-child(1){padding:", INPUT_INNER_LEFT_PADDING, ";}&:nth-child(3){padding:", INPUT_INNER_RIGHT_PADDING, ";}}.eb-icon{width:0.875em;height:0.875em;font-size:0.875em;}}& input{padding-top:0!important;padding-bottom:0!important;height:", INPUT_HEIGHT, "!important;color:", designTokens.base.color.gray0, "!important;font-size:", INPUT_FONT_SIZE, "!important;}");
|
|
24
45
|
var FileTreeListItemContentInput = function FileTreeListItemContentInput(_ref) {
|
|
25
46
|
var type = _ref.type,
|
|
26
47
|
initialValue = _ref.initialValue,
|
|
@@ -231,7 +252,7 @@ var FileTreeListItemContentInput = function FileTreeListItemContentInput(_ref) {
|
|
|
231
252
|
//
|
|
232
253
|
//
|
|
233
254
|
//
|
|
234
|
-
return jsxRuntime.jsx(
|
|
255
|
+
return jsxRuntime.jsx(StyledInputForm, {
|
|
235
256
|
ref: formElRef,
|
|
236
257
|
onSubmit: handleFormSubmit,
|
|
237
258
|
children: jsxRuntime.jsx(reactHookForm.Controller, {
|
|
@@ -258,7 +279,7 @@ var FileTreeListItemContentInput = function FileTreeListItemContentInput(_ref) {
|
|
|
258
279
|
var field = _ref2.field,
|
|
259
280
|
fieldState = _ref2.fieldState;
|
|
260
281
|
var _a;
|
|
261
|
-
return jsxRuntime.jsx(
|
|
282
|
+
return jsxRuntime.jsx(StyledInput, Object.assign({}, field, {
|
|
262
283
|
autoFocus: true,
|
|
263
284
|
type: "text",
|
|
264
285
|
className: className,
|
|
@@ -2,15 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _styled = require('@emotion/styled/base');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
var designTokens = require('@elice/design-tokens');
|
|
7
8
|
var FileTreeListItemContent = require('./FileTreeListItemContent.js');
|
|
8
|
-
var FileTreeListItems_styled = require('./FileTreeListItems.styled.js');
|
|
9
9
|
var fileTreePath = require('./utils/fileTreePath.js');
|
|
10
10
|
var FileTreeContext = require('./context/FileTreeContext.js');
|
|
11
11
|
var fileTreeInput = require('./utils/fileTreeInput.js');
|
|
12
12
|
var fileTreeFiles = require('./utils/fileTreeFiles.js');
|
|
13
13
|
|
|
14
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
+
|
|
16
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
17
|
+
|
|
18
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
19
|
+
var StyledTreeItems = /*#__PURE__*/_styled__default.default("ul", {
|
|
20
|
+
target: "eqj36uk1"
|
|
21
|
+
})("production" === "production" ? {
|
|
22
|
+
name: "n5lwfe",
|
|
23
|
+
styles: "padding:0;margin:0;overflow:hidden"
|
|
24
|
+
} : {
|
|
25
|
+
name: "n5lwfe",
|
|
26
|
+
styles: "padding:0;margin:0;overflow:hidden",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
});
|
|
29
|
+
var StyledTreeItem = /*#__PURE__*/_styled__default.default("li", {
|
|
30
|
+
target: "eqj36uk0"
|
|
31
|
+
})("production" === "production" ? {
|
|
32
|
+
name: "i710ph",
|
|
33
|
+
styles: "list-style:none;cursor:pointer"
|
|
34
|
+
} : {
|
|
35
|
+
name: "i710ph",
|
|
36
|
+
styles: "list-style:none;cursor:pointer",
|
|
37
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
38
|
+
});
|
|
14
39
|
var _FileTreeListItems = function FileTreeListItems(_ref) {
|
|
15
40
|
var node = _ref.node,
|
|
16
41
|
_ref$indent = _ref.indent,
|
|
@@ -165,14 +190,14 @@ var _FileTreeListItems = function FileTreeListItems(_ref) {
|
|
|
165
190
|
//
|
|
166
191
|
//
|
|
167
192
|
//
|
|
168
|
-
return jsxRuntime.jsx(
|
|
193
|
+
return jsxRuntime.jsx(StyledTreeItems, {
|
|
169
194
|
style: {
|
|
170
195
|
backgroundColor: dropzonePath === '' ? designTokens.base.color.primary7 : 'transparent'
|
|
171
196
|
},
|
|
172
197
|
children: node.children.filter(function (childNode) {
|
|
173
198
|
return isHiddenFilelistVisible ? true : !childNode.isHidden;
|
|
174
199
|
}).map(function (childNode, index) {
|
|
175
|
-
return jsxRuntime.jsxs(
|
|
200
|
+
return jsxRuntime.jsxs(StyledTreeItem, {
|
|
176
201
|
id: "".concat(uniqCompId, "-").concat(childNode.path),
|
|
177
202
|
role: "treeitem",
|
|
178
203
|
"aria-selected": childNode.path === activePath,
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _styled = require('@emotion/styled/base');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
var React = require('react');
|
|
8
|
+
var designTokens = require('@elice/design-tokens');
|
|
7
9
|
var icons = require('@elice/icons');
|
|
8
10
|
var intl = require('@elice/intl');
|
|
9
|
-
var FileTreeToolbar_styled = require('../FileTreeToolbar.styled.js');
|
|
10
11
|
var en = require('./locales/en.json.js');
|
|
11
12
|
var ko = require('./locales/ko.json.js');
|
|
12
13
|
var FileTreeContext = require('../context/FileTreeContext.js');
|
|
@@ -16,8 +17,12 @@ var fileTreeFiles = require('../utils/fileTreeFiles.js');
|
|
|
16
17
|
|
|
17
18
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
19
|
|
|
20
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
19
21
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
20
22
|
|
|
23
|
+
var StyledFileTreeToolbar = /*#__PURE__*/_styled__default.default("div", {
|
|
24
|
+
target: "emczy7z0"
|
|
25
|
+
})("flex:0 0 2.25rem;display:flex;align-items:center;padding:0.25rem 0.5rem;background-color:", designTokens.base.color.navy8, ";");
|
|
21
26
|
var FileTreeToolbar = function FileTreeToolbar(_ref) {
|
|
22
27
|
var className = _ref.className;
|
|
23
28
|
var intl$1 = intl.useRawEliceIntl();
|
|
@@ -113,7 +118,7 @@ var FileTreeToolbar = function FileTreeToolbar(_ref) {
|
|
|
113
118
|
//
|
|
114
119
|
//
|
|
115
120
|
//
|
|
116
|
-
return jsxRuntime.jsxs(
|
|
121
|
+
return jsxRuntime.jsxs(StyledFileTreeToolbar, {
|
|
117
122
|
className: className,
|
|
118
123
|
children: [renderFileAddButton(), renderFolderAddButton(), renderFileUploadButton()]
|
|
119
124
|
});
|
|
@@ -2,12 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _styled = require('@emotion/styled/base');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
var reactUse = require('react-use');
|
|
7
8
|
var blocks = require('@elice/blocks');
|
|
9
|
+
var designTokens = require('@elice/design-tokens');
|
|
8
10
|
var icons = require('@elice/icons');
|
|
9
|
-
var MaterialModal_styled = require('./MaterialModal.styled.js');
|
|
10
11
|
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
|
+
|
|
14
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
15
|
+
|
|
16
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
17
|
+
var StyledModalWrapper = /*#__PURE__*/_styled__default.default("div", {
|
|
18
|
+
target: "e17uxf0q4"
|
|
19
|
+
})("position:relative;display:flex;flex-flow:column nowrap;width:90vw;height:90vh;padding:0;background-color:", designTokens.base.color.gray8, ";border-radius:0.375rem;");
|
|
20
|
+
var StyledModalHeader = /*#__PURE__*/_styled__default.default(blocks.Text, {
|
|
21
|
+
target: "e17uxf0q3"
|
|
22
|
+
})("flex:0 1 auto;width:100%;height:3.25rem;min-height:3.25rem;line-height:3.25rem;border-top-left-radius:0.375rem;border-top-right-radius:0.375rem;border-bottom:1px solid ", designTokens.base.color.navy9, ";text-align:center;color:", designTokens.base.color.white, ";");
|
|
23
|
+
var StyledModalBody = /*#__PURE__*/_styled__default.default("div", {
|
|
24
|
+
target: "e17uxf0q2"
|
|
25
|
+
})("production" === "production" ? {
|
|
26
|
+
name: "1pb620b",
|
|
27
|
+
styles: "position:relative;flex:1 1 auto;width:100%;height:80%"
|
|
28
|
+
} : {
|
|
29
|
+
name: "1pb620b",
|
|
30
|
+
styles: "position:relative;flex:1 1 auto;width:100%;height:80%",
|
|
31
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
|
+
});
|
|
33
|
+
var StyledModalFooter = /*#__PURE__*/_styled__default.default(blocks.Flex, {
|
|
34
|
+
target: "e17uxf0q1"
|
|
35
|
+
})("flex:0 1 auto;width:100%;height:3.75rem;min-height:3.75rem;border-bottom-left-radius:0.375rem;border-bottom-right-radius:0.375rem;border-top:1px solid ", designTokens.base.color.navy9, ";padding:0.5rem 1.5rem;overflow:hidden;text-align:right;align-items:center;justify-content:flex-end;");
|
|
36
|
+
var StyledCloseButton = /*#__PURE__*/_styled__default.default(blocks.IconButton, {
|
|
37
|
+
target: "e17uxf0q0"
|
|
38
|
+
})("position:absolute;top:0;right:0;color:", designTokens.base.color.gray4, "!important;");
|
|
11
39
|
var MaterialModal = function MaterialModal(_ref) {
|
|
12
40
|
var children = _ref.children,
|
|
13
41
|
title = _ref.title,
|
|
@@ -22,7 +50,7 @@ var MaterialModal = function MaterialModal(_ref) {
|
|
|
22
50
|
if (!onHide) {
|
|
23
51
|
return null;
|
|
24
52
|
}
|
|
25
|
-
return jsxRuntime.jsx(
|
|
53
|
+
return jsxRuntime.jsx(StyledCloseButton, {
|
|
26
54
|
transparent: true,
|
|
27
55
|
border: false,
|
|
28
56
|
icon: icons.eilMathsignMultiplyBasic,
|
|
@@ -30,12 +58,12 @@ var MaterialModal = function MaterialModal(_ref) {
|
|
|
30
58
|
});
|
|
31
59
|
};
|
|
32
60
|
return jsxRuntime.jsx(blocks.BorderlessDialog, {
|
|
33
|
-
children: jsxRuntime.jsxs(
|
|
34
|
-
children: [jsxRuntime.jsxs(
|
|
61
|
+
children: jsxRuntime.jsxs(StyledModalWrapper, {
|
|
62
|
+
children: [jsxRuntime.jsxs(StyledModalHeader, {
|
|
35
63
|
children: [title, renderCloseButton()]
|
|
36
|
-
}), jsxRuntime.jsx(
|
|
64
|
+
}), jsxRuntime.jsx(StyledModalBody, {
|
|
37
65
|
children: children
|
|
38
|
-
}), footer && jsxRuntime.jsx(
|
|
66
|
+
}), footer && jsxRuntime.jsx(StyledModalFooter, {
|
|
39
67
|
children: footer
|
|
40
68
|
})]
|
|
41
69
|
})
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
1
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import React, { forwardRef } from 'react';
|
|
3
4
|
import { config } from '@elice/api-client';
|
|
4
5
|
import { ResizableNext, Button, Icon, Hspace } from '@elice/blocks';
|
|
6
|
+
import { base } from '@elice/design-tokens';
|
|
5
7
|
import { eilClassroom } from '@elice/icons';
|
|
6
8
|
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
7
9
|
import { withForwardRefMaterial } from '@elice/material-shared-utils';
|
|
8
10
|
import { useRecoilValue } from 'recoil';
|
|
9
|
-
import { MATERIAL_RESIZABLE_COMMON_PROPS } from '../../constants/stylesheets.js';
|
|
10
|
-
import { StyledExerciseContainer, StyledExerciseMain, StyledExerciseFileAndTabWrap, StyledExerciseTabBar, StyledExerciseRunnerWrap, EXERCISE_RUNNER_MIN_HEIGHT, EXERCISE_PREVIEW_MIN_WIDTH, EXERCISE_HORIZONTAL_RATIO, StyledxerciseFileTreeContaner, EXERCISE_FILE_TREE_MIN_WIDTH, StyledExerciseFileTreeWrap, StyledExerciseTabsWrap, StyledExerciseTabMenuWrap, StyledExerciseFileWrap } from './MaterialExercise.styled.js';
|
|
11
|
+
import { MATERIAL_RESIZABLE_COMMON_PROPS, MATERIAL_DIVIDER_BORDER_VALUE } from '../../constants/stylesheets.js';
|
|
11
12
|
import ExerciseProvider from './context/ExerciseProvider.js';
|
|
12
13
|
import messageEn from '../locales/en.json.js';
|
|
13
14
|
import messageKo from '../locales/ko.json.js';
|
|
@@ -25,9 +26,103 @@ import { exerciseContainerSizeState, exerciseState, exerciseFileTreeOpenedState,
|
|
|
25
26
|
import { exerciseRunnerRoomsOpen$, exerciseRunnerTextSend$ } from './context/subjects.js';
|
|
26
27
|
import { ExercisePreviewType, ExercisePreviewDisplayMode } from './context/recoilTypes.js';
|
|
27
28
|
|
|
29
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
30
|
+
var EXERCISE_FILE_TREE_MIN_WIDTH = 128;
|
|
31
|
+
var EXERCISE_PREVIEW_MIN_WIDTH = 128;
|
|
32
|
+
var EXERCISE_RUNNER_MIN_HEIGHT = 128;
|
|
33
|
+
var EXERCISE_HORIZONTAL_RATIO = {
|
|
34
|
+
FILETREE: 0.15,
|
|
35
|
+
PREVIEW: 0.4
|
|
36
|
+
};
|
|
28
37
|
//
|
|
29
38
|
//
|
|
30
39
|
//
|
|
40
|
+
/**
|
|
41
|
+
* Wrapper contains:
|
|
42
|
+
* - FileTree
|
|
43
|
+
* - FileTabs
|
|
44
|
+
* - File (Editor)
|
|
45
|
+
* - Runner
|
|
46
|
+
*/
|
|
47
|
+
var StyledExerciseContainer = /*#__PURE__*/_styled("div", {
|
|
48
|
+
target: "e1tvay129"
|
|
49
|
+
})("production" === "production" ? {
|
|
50
|
+
name: "1x6515k",
|
|
51
|
+
styles: "flex:1;display:flex;flex-direction:column;height:100%;min-width:0;min-height:0"
|
|
52
|
+
} : {
|
|
53
|
+
name: "1x6515k",
|
|
54
|
+
styles: "flex:1;display:flex;flex-direction:column;height:100%;min-width:0;min-height:0",
|
|
55
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Wrapper contains:
|
|
59
|
+
* - FileTree
|
|
60
|
+
* - FileTabs
|
|
61
|
+
* - File (Editor)
|
|
62
|
+
*/
|
|
63
|
+
var StyledExerciseMain = /*#__PURE__*/_styled("div", {
|
|
64
|
+
target: "e1tvay128"
|
|
65
|
+
})("production" === "production" ? {
|
|
66
|
+
name: "gaqfa6",
|
|
67
|
+
styles: "flex:1;display:flex;width:100%;min-width:0;min-height:0"
|
|
68
|
+
} : {
|
|
69
|
+
name: "gaqfa6",
|
|
70
|
+
styles: "flex:1;display:flex;width:100%;min-width:0;min-height:0",
|
|
71
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
72
|
+
});
|
|
73
|
+
/**
|
|
74
|
+
* Wrapper contains:
|
|
75
|
+
* - FileTabs
|
|
76
|
+
* - File (Editor)
|
|
77
|
+
*/
|
|
78
|
+
var StyledExerciseFileAndTabWrap = /*#__PURE__*/_styled("div", {
|
|
79
|
+
target: "e1tvay127"
|
|
80
|
+
})("flex:1;display:flex;flex-direction:column;height:100%;min-width:0;min-height:0;background-color:", base.color.navy9, ";");
|
|
81
|
+
var StyledExerciseFileWrap = /*#__PURE__*/_styled("div", {
|
|
82
|
+
target: "e1tvay126"
|
|
83
|
+
})("production" === "production" ? {
|
|
84
|
+
name: "1qvekf5",
|
|
85
|
+
styles: "flex:1;min-height:0"
|
|
86
|
+
} : {
|
|
87
|
+
name: "1qvekf5",
|
|
88
|
+
styles: "flex:1;min-height:0",
|
|
89
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
90
|
+
});
|
|
91
|
+
// ========== Exercise FileTab ==========
|
|
92
|
+
var StyledExerciseTabBar = /*#__PURE__*/_styled("div", {
|
|
93
|
+
target: "e1tvay125"
|
|
94
|
+
})("display:flex;border-bottom:", MATERIAL_DIVIDER_BORDER_VALUE, ";");
|
|
95
|
+
var StyledExerciseTabsWrap = /*#__PURE__*/_styled("div", {
|
|
96
|
+
target: "e1tvay124"
|
|
97
|
+
})("production" === "production" ? {
|
|
98
|
+
name: "fxp7t8",
|
|
99
|
+
styles: "flex:1;min-width:0"
|
|
100
|
+
} : {
|
|
101
|
+
name: "fxp7t8",
|
|
102
|
+
styles: "flex:1;min-width:0",
|
|
103
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
104
|
+
});
|
|
105
|
+
var StyledExerciseTabMenuWrap = /*#__PURE__*/_styled("div", {
|
|
106
|
+
target: "e1tvay123"
|
|
107
|
+
})("display:flex;justify-content:center;align-items:center;padding:0 0.5rem 0 1rem;background-color:", base.color.navy8, ";");
|
|
108
|
+
// ========== Exercise FileTree ==========
|
|
109
|
+
var StyledExerciseFileTreeWrap = /*#__PURE__*/_styled("div", {
|
|
110
|
+
target: "e1tvay122"
|
|
111
|
+
})("flex:1;display:flex;flex-direction:column;min-width:0;height:100%;border-right:", MATERIAL_DIVIDER_BORDER_VALUE, ";");
|
|
112
|
+
var StyledxerciseFileTreeContaner = /*#__PURE__*/_styled("div", {
|
|
113
|
+
target: "e1tvay121"
|
|
114
|
+
})("production" === "production" ? {
|
|
115
|
+
name: "ajoz9e",
|
|
116
|
+
styles: "display:flex;height:100%;max-width:auto;&[aria-hidden='true']{max-width:0;overflow:hidden;}"
|
|
117
|
+
} : {
|
|
118
|
+
name: "ajoz9e",
|
|
119
|
+
styles: "display:flex;height:100%;max-width:auto;&[aria-hidden='true']{max-width:0;overflow:hidden;}",
|
|
120
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
121
|
+
});
|
|
122
|
+
// ========== Exercise Runner ==========
|
|
123
|
+
var StyledExerciseRunnerWrap = /*#__PURE__*/_styled("div", {
|
|
124
|
+
target: "e1tvay120"
|
|
125
|
+
})("width:100%;height:100%;border-top:", MATERIAL_DIVIDER_BORDER_VALUE, ";");
|
|
31
126
|
/**
|
|
32
127
|
* Material exercise.
|
|
33
128
|
*/
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExerciseProviderDedicatedProps, MaterialExerciseCommonProps } from './types';
|
|
3
|
-
export type ExerciseProviderProps = MaterialExerciseCommonProps & Omit<ExerciseProviderDedicatedProps, 'readOnlyActiveFile'
|
|
3
|
+
export type ExerciseProviderProps = MaterialExerciseCommonProps & Omit<ExerciseProviderDedicatedProps, 'readOnlyActiveFile'> & {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
};
|
|
4
6
|
/**
|
|
5
7
|
* Provider for exercise, which...
|
|
6
8
|
* - wrapping with `ExerciseContext`
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
1
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
+
import { Flex, Text, Button } from '@elice/blocks';
|
|
5
|
+
import { base } from '@elice/design-tokens';
|
|
4
6
|
import { IntlComponentBuilder } from '@elice/intl';
|
|
7
|
+
import { css } from '@emotion/react';
|
|
5
8
|
import dayjs from 'dayjs';
|
|
6
9
|
import { useRecoilValue } from 'recoil';
|
|
7
|
-
import { StyledModalContent, StyledVersionsWrapper, StyledVersionRangeInputWrapper, StyledVersionRangeInput, StyledEditorWrapper, StyledFileNameBox } from './ExerciseCodeHistory.styled.js';
|
|
8
10
|
import messageEn from './locales/en.json.js';
|
|
9
11
|
import messageKo from './locales/ko.json.js';
|
|
10
12
|
import { useUsercodeHistory } from '../../../hooks/useUsercodeHistory.js';
|
|
@@ -15,6 +17,48 @@ import ExerciseVersionListItem from '../../shared/exercise-version-list/Exercise
|
|
|
15
17
|
import { ExerciseContext } from '../context/context.js';
|
|
16
18
|
import { exerciseActiveFilenameState, exerciseEditorPreferenceState } from '../context/recoil.js';
|
|
17
19
|
|
|
20
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
21
|
+
var cssInputRangeTrack = "production" === "production" ? {
|
|
22
|
+
name: "jsy83f",
|
|
23
|
+
styles: "width:100%;height:0.375rem;cursor:pointer;transition:all 0.2s ease"
|
|
24
|
+
} : {
|
|
25
|
+
name: "jsy83f",
|
|
26
|
+
styles: "width:100%;height:0.375rem;cursor:pointer;transition:all 0.2s ease",
|
|
27
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
28
|
+
};
|
|
29
|
+
var cssInputRangeThumb = /*#__PURE__*/css("height:1rem;width:1rem;border-radius:50%;background:", base.color.primary6, ";cursor:pointer;");
|
|
30
|
+
var StyledModalContent = /*#__PURE__*/_styled(Flex, {
|
|
31
|
+
target: "e1y3ui135"
|
|
32
|
+
})("production" === "production" ? {
|
|
33
|
+
name: "1j1fdpn",
|
|
34
|
+
styles: "position:absolute;width:100%;height:100%;overflow:hidden"
|
|
35
|
+
} : {
|
|
36
|
+
name: "1j1fdpn",
|
|
37
|
+
styles: "position:absolute;width:100%;height:100%;overflow:hidden",
|
|
38
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
|
+
});
|
|
40
|
+
var StyledVersionRangeInput = /*#__PURE__*/_styled("input", {
|
|
41
|
+
target: "e1y3ui134"
|
|
42
|
+
})("--webkit-appearance:none;margin:0.5rem 0;width:100%;cursor:pointer;&:focus{outline:none;}&::-webkit-slider-runnable-track{background:", base.color.navy9, ";", cssInputRangeTrack, ";}&::-webkit-slider-thumb{-webkit-appearance:none;margin-top:calc((0.375rem - 1rem) / 2);", cssInputRangeThumb, ";}&:focus::-webkit-slider-runnable-track{background:rgba(", base.color.navy9, ", 0.05);}&::-moz-range-track{background:", base.color.navy9, ";", cssInputRangeTrack, ";}&::-moz-range-thumb{", cssInputRangeThumb, ";}");
|
|
43
|
+
var StyledVersionsWrapper = /*#__PURE__*/_styled(Flex, {
|
|
44
|
+
target: "e1y3ui133"
|
|
45
|
+
})("flex-direction:column;flex:1 1.75 25rem;position:relative;height:100%;border-right:1px solid ", base.color.navy9, ";");
|
|
46
|
+
var StyledVersionRangeInputWrapper = /*#__PURE__*/_styled(Flex, {
|
|
47
|
+
target: "e1y3ui132"
|
|
48
|
+
})("height:3rem;padding:1rem;border-bottom:1px solid ", base.color.navy9, ";");
|
|
49
|
+
var StyledEditorWrapper = /*#__PURE__*/_styled(Flex, {
|
|
50
|
+
target: "e1y3ui131"
|
|
51
|
+
})("production" === "production" ? {
|
|
52
|
+
name: "xf8y5j",
|
|
53
|
+
styles: "flex-direction:column;flex:1 1 auto;width:100%;height:100%;overflow:scroll"
|
|
54
|
+
} : {
|
|
55
|
+
name: "xf8y5j",
|
|
56
|
+
styles: "flex-direction:column;flex:1 1 auto;width:100%;height:100%;overflow:scroll",
|
|
57
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
58
|
+
});
|
|
59
|
+
var StyledFileNameBox = /*#__PURE__*/_styled(Text, {
|
|
60
|
+
target: "e1y3ui130"
|
|
61
|
+
})("min-height:3rem;height:3rem;line-height:3rem;padding-left:1rem;border-bottom:1px solid ", base.color.navy9, ";");
|
|
18
62
|
var ExerciseCodeHistory = function ExerciseCodeHistory(_ref) {
|
|
19
63
|
var onHide = _ref.onHide,
|
|
20
64
|
onLoadVersionButtonClick = _ref.onLoadVersionButtonClick,
|
package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js
CHANGED
|
@@ -139,7 +139,7 @@ var ExerciseRunnerControllerArduinoAgentModal = function ExerciseRunnerControlle
|
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
141
141
|
return jsx(Modal, {
|
|
142
|
-
theme:
|
|
142
|
+
theme: "dark",
|
|
143
143
|
title: intl.formatMessage({
|
|
144
144
|
id: 'exerciseRunner.controller.arduino.agent.title'
|
|
145
145
|
}),
|