@elice/material-exercise 1.230111.0-mobexercise.1 → 1.230117.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-file-editor/ExerciseFileEditor.js +17 -5
- package/cjs/components/shared/monaco-editor/MonacoEditorMobile.js +0 -4
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileEditor.js +17 -5
- package/es/components/shared/monaco-editor/MonacoEditorMobile.js +0 -4
- package/package.json +4 -4
|
@@ -4,6 +4,7 @@ var React = require('react');
|
|
|
4
4
|
var apiClient = require('@elice/api-client');
|
|
5
5
|
var blocks = require('@elice/blocks');
|
|
6
6
|
var types = require('@elice/types');
|
|
7
|
+
var utils = require('@elice/utils');
|
|
7
8
|
var recoil = require('recoil');
|
|
8
9
|
var ExerciseFileShimmer = require('../../shared/exercise-shimmer/ExerciseFileShimmer.js');
|
|
9
10
|
require('../../shared/exercise-shimmer/ExerciseFileTabsShimmer.js');
|
|
@@ -251,7 +252,7 @@ const ExerciseFileEditor = () => {
|
|
|
251
252
|
|
|
252
253
|
|
|
253
254
|
React__default["default"].useEffect(() => {
|
|
254
|
-
var _a;
|
|
255
|
+
var _a, _b;
|
|
255
256
|
|
|
256
257
|
const _editorApis = editorApis.current;
|
|
257
258
|
|
|
@@ -262,10 +263,21 @@ const ExerciseFileEditor = () => {
|
|
|
262
263
|
_editorApis.setValue(wsUsercode.doc);
|
|
263
264
|
|
|
264
265
|
pushEditorDocHistories();
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
let subscription = undefined;
|
|
267
|
+
|
|
268
|
+
if (utils.FlutterApp.checkWebview()) {
|
|
269
|
+
subscription = (_a = _editorApis.editor) === null || _a === void 0 ? void 0 : _a.onDidChangeModelContent(e => {
|
|
270
|
+
pushEditorDocHistories();
|
|
271
|
+
handleChange(e);
|
|
272
|
+
utils.FlutterApp.onDidChangeContent();
|
|
273
|
+
});
|
|
274
|
+
} else {
|
|
275
|
+
subscription = (_b = _editorApis.editor) === null || _b === void 0 ? void 0 : _b.onDidChangeModelContent(e => {
|
|
276
|
+
pushEditorDocHistories();
|
|
277
|
+
handleChange(e);
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
269
281
|
return () => {
|
|
270
282
|
if (subscription) {
|
|
271
283
|
subscription.dispose();
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var reactUse = require('react-use');
|
|
5
|
-
var utils = require('@elice/utils');
|
|
6
5
|
var monaco = require('monaco-editor/esm/vs/editor/editor.api');
|
|
7
6
|
var MonacoEditor = require('./MonacoEditor.js');
|
|
8
7
|
|
|
@@ -150,9 +149,6 @@ const MonacoEditorMobile = React.forwardRef((props, ref) => {
|
|
|
150
149
|
|
|
151
150
|
addKeyboardButtonOverlayWidget(editor);
|
|
152
151
|
exposeWindowGlobalEvents(editor);
|
|
153
|
-
editor.onDidChangeModelContent(() => {
|
|
154
|
-
utils.FlutterApp.onDidChangeContent();
|
|
155
|
-
});
|
|
156
152
|
}; //
|
|
157
153
|
//
|
|
158
154
|
//
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { getOrgMaterialExerciseExerciseImageExerciseFileGet } from '@elice/api-client';
|
|
3
3
|
import { Flex } from '@elice/blocks';
|
|
4
4
|
import { enums } from '@elice/types';
|
|
5
|
+
import { FlutterApp } from '@elice/utils';
|
|
5
6
|
import { useRecoilValue, useSetRecoilState } from 'recoil';
|
|
6
7
|
import ExerciseFileShimmer from '../../shared/exercise-shimmer/ExerciseFileShimmer.js';
|
|
7
8
|
import '../../shared/exercise-shimmer/ExerciseFileTabsShimmer.js';
|
|
@@ -245,7 +246,7 @@ const ExerciseFileEditor = () => {
|
|
|
245
246
|
|
|
246
247
|
|
|
247
248
|
React.useEffect(() => {
|
|
248
|
-
var _a;
|
|
249
|
+
var _a, _b;
|
|
249
250
|
|
|
250
251
|
const _editorApis = editorApis.current;
|
|
251
252
|
|
|
@@ -256,10 +257,21 @@ const ExerciseFileEditor = () => {
|
|
|
256
257
|
_editorApis.setValue(wsUsercode.doc);
|
|
257
258
|
|
|
258
259
|
pushEditorDocHistories();
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
let subscription = undefined;
|
|
261
|
+
|
|
262
|
+
if (FlutterApp.checkWebview()) {
|
|
263
|
+
subscription = (_a = _editorApis.editor) === null || _a === void 0 ? void 0 : _a.onDidChangeModelContent(e => {
|
|
264
|
+
pushEditorDocHistories();
|
|
265
|
+
handleChange(e);
|
|
266
|
+
FlutterApp.onDidChangeContent();
|
|
267
|
+
});
|
|
268
|
+
} else {
|
|
269
|
+
subscription = (_b = _editorApis.editor) === null || _b === void 0 ? void 0 : _b.onDidChangeModelContent(e => {
|
|
270
|
+
pushEditorDocHistories();
|
|
271
|
+
handleChange(e);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
|
|
263
275
|
return () => {
|
|
264
276
|
if (subscription) {
|
|
265
277
|
subscription.dispose();
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { useEnsuredForwardedRef } from 'react-use';
|
|
3
|
-
import { FlutterApp } from '@elice/utils';
|
|
4
3
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
|
5
4
|
import MonacoEditor from './MonacoEditor.js';
|
|
6
5
|
|
|
@@ -125,9 +124,6 @@ const MonacoEditorMobile = forwardRef((props, ref) => {
|
|
|
125
124
|
|
|
126
125
|
addKeyboardButtonOverlayWidget(editor);
|
|
127
126
|
exposeWindowGlobalEvents(editor);
|
|
128
|
-
editor.onDidChangeModelContent(() => {
|
|
129
|
-
FlutterApp.onDidChangeContent();
|
|
130
|
-
});
|
|
131
127
|
}; //
|
|
132
128
|
//
|
|
133
129
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230117.0",
|
|
4
4
|
"description": "User view and editing components of Elice material exercise",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@elice/design-tokens": "^1.220803.0",
|
|
80
80
|
"@elice/icons": "^1.220803.0",
|
|
81
81
|
"@elice/markdown": "^1.220803.0",
|
|
82
|
-
"@elice/material-shared-types": "1.
|
|
83
|
-
"@elice/material-shared-utils": "1.
|
|
82
|
+
"@elice/material-shared-types": "1.230117.0",
|
|
83
|
+
"@elice/material-shared-utils": "1.230117.0",
|
|
84
84
|
"@elice/types": "1.221217.0",
|
|
85
85
|
"@elice/websocket": "^1.220803.0",
|
|
86
86
|
"@types/classnames": "^2.3.1",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"recoil": "^0.6.1",
|
|
103
103
|
"styled-components": "^5.2.0"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "6cde68fb6f8e5860924c43a0e3d0c80e4a589326"
|
|
106
106
|
}
|