@elice/material-exercise 1.240401.0 → 1.240508.0-globalization.1
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/locales/en.json.js +7 -0
- package/cjs/components/locales/index.d.ts +3 -0
- package/cjs/components/locales/ko.json.js +7 -0
- package/cjs/components/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/MaterialExercise.d.ts +3 -1
- package/cjs/components/material-exercise/MaterialExercise.js +11 -14
- package/cjs/components/material-exercise/context/ExerciseProviderNoImage.d.ts +2 -1
- package/cjs/components/material-exercise/context/ExerciseProviderNoImage.js +7 -15
- package/cjs/components/material-exercise/context/locales/noImage.en.json.js +2 -2
- package/cjs/components/material-exercise/context/locales/noImage.ko.json.js +2 -2
- package/cjs/components/material-exercise/context/locales/noImage.th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +9 -12
- package/cjs/components/material-exercise/exercise-code-history/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-code-history/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-code-history/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-code-history/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.d.ts +3 -5
- package/cjs/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +14 -5
- package/cjs/components/material-exercise/exercise-file-editor/locales/en.json.js +7 -0
- package/cjs/components/material-exercise/exercise-file-editor/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-file-editor/locales/ko.json.js +7 -0
- package/cjs/components/material-exercise/exercise-file-editor/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.d.ts +3 -2
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +17 -4
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.d.ts +2 -2
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +5 -15
- package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-file-tabs/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.d.ts +2 -3
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +8 -10
- package/cjs/components/material-exercise/exercise-file-tree/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-file-tree/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-file-tree/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-file-tree/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenu.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenu.js +9 -9
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +4 -3
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +13 -13
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +8 -8
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuReset.js +10 -10
- package/cjs/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +7 -7
- package/cjs/components/material-exercise/exercise-menu/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-menu/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-menu/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-menu/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-preview/ExercisePreview.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-preview/ExercisePreview.js +8 -8
- package/cjs/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +4 -4
- package/cjs/components/material-exercise/exercise-preview/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-preview/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-preview/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-preview/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.d.ts +2 -3
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +14 -15
- package/cjs/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +18 -18
- package/cjs/components/material-exercise/exercise-rightpane/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-rightpane/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-rightpane/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-rightpane/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-room/ExerciseRoom.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-room/ExerciseRoom.js +9 -9
- package/cjs/components/material-exercise/exercise-room/ExerciseRoomDetail.js +28 -28
- package/cjs/components/material-exercise/exercise-room/ExerciseRoomList.js +15 -15
- package/cjs/components/material-exercise/exercise-room/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-room/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-room/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-room/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunner.js +26 -29
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +20 -18
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +10 -10
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +13 -13
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +6 -5
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +27 -30
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +8 -7
- package/cjs/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +6 -6
- package/cjs/components/material-exercise/exercise-runner/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-runner/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-runner/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-runner/locales/th.json.js +7 -0
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -1
- package/cjs/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +13 -16
- package/cjs/components/material-exercise/exercise-submit-history/locales/en.json.js +2 -2
- package/cjs/components/material-exercise/exercise-submit-history/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-submit-history/locales/ko.json.js +2 -2
- package/cjs/components/material-exercise/exercise-submit-history/locales/th.json.js +7 -0
- package/cjs/components/shared/file-tree/FileTree.d.ts +1 -5
- package/cjs/components/shared/file-tree/FileTree.js +11 -12
- package/cjs/components/shared/file-tree/FileTreeConfig.js +1 -2
- package/cjs/components/shared/file-tree/FileTreeList.js +1 -2
- package/cjs/components/shared/file-tree/FileTreeListItemContentInput.js +8 -8
- package/cjs/components/shared/file-tree/FileTreeListItemContentMenu.js +24 -24
- package/cjs/components/shared/file-tree/FileTreeToolbar.js +6 -7
- package/cjs/components/shared/file-tree/locales/en.json.js +2 -2
- package/cjs/components/shared/file-tree/locales/index.d.ts +3 -0
- package/cjs/components/shared/file-tree/locales/ko.json.js +2 -2
- package/cjs/components/shared/file-tree/locales/th.json.js +7 -0
- package/cjs/components/shared/file-viewer/FileViewer.d.ts +2 -1
- package/cjs/components/shared/file-viewer/FileViewer.js +8 -16
- package/cjs/components/shared/file-viewer/FileViewerCsv.js +8 -7
- package/cjs/components/shared/file-viewer/FileViewerNonViewable.d.ts +2 -1
- package/cjs/components/shared/file-viewer/FileViewerNonViewable.js +11 -18
- package/cjs/components/shared/file-viewer/locales/index.d.ts +6 -0
- package/cjs/components/shared/file-viewer/locales/nonViewable.en.json.js +2 -2
- package/cjs/components/shared/file-viewer/locales/nonViewable.ko.json.js +2 -2
- package/cjs/components/shared/file-viewer/locales/nonViewable.th.json.js +7 -0
- package/cjs/components/shared/monaco-editor/MonacoEditorPerferenceForm.d.ts +2 -1
- package/cjs/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +29 -37
- package/cjs/components/shared/monaco-editor/locales/en.json.js +2 -2
- package/cjs/components/shared/monaco-editor/locales/index.d.ts +3 -0
- package/cjs/components/shared/monaco-editor/locales/ko.json.js +2 -2
- package/cjs/components/shared/monaco-editor/locales/th.json.js +7 -0
- package/cjs/components/shared/xterm/Xterm.d.ts +3 -1
- package/cjs/components/shared/xterm/Xterm.js +8 -18
- package/cjs/components/shared/xterm/locales/en.json.js +2 -2
- package/cjs/components/shared/xterm/locales/index.d.ts +3 -0
- package/cjs/components/shared/xterm/locales/ko.json.js +2 -2
- package/cjs/components/shared/xterm/locales/th.json.js +7 -0
- package/es/components/locales/en.json.js +3 -0
- package/es/components/locales/index.d.ts +3 -0
- package/es/components/locales/ko.json.js +3 -0
- package/es/components/locales/th.json.js +3 -0
- package/es/components/material-exercise/MaterialExercise.d.ts +3 -1
- package/es/components/material-exercise/MaterialExercise.js +11 -15
- package/es/components/material-exercise/context/ExerciseProviderNoImage.d.ts +2 -1
- package/es/components/material-exercise/context/ExerciseProviderNoImage.js +9 -17
- package/es/components/material-exercise/context/locales/noImage.en.json.js +2 -2
- package/es/components/material-exercise/context/locales/noImage.ko.json.js +2 -2
- package/es/components/material-exercise/context/locales/noImage.th.json.js +3 -0
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.d.ts +2 -1
- package/es/components/material-exercise/exercise-code-history/ExerciseCodeHistory.js +11 -14
- package/es/components/material-exercise/exercise-code-history/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-code-history/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-code-history/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-code-history/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.d.ts +3 -5
- package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.js +14 -5
- package/es/components/material-exercise/exercise-file-editor/locales/en.json.js +3 -0
- package/es/components/material-exercise/exercise-file-editor/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-file-editor/locales/ko.json.js +3 -0
- package/es/components/material-exercise/exercise-file-editor/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.d.ts +3 -2
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +17 -4
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.d.ts +2 -2
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js +3 -13
- package/es/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.en.json.js +2 -2
- package/es/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.ko.json.js +2 -2
- package/es/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.th.json.js +3 -0
- package/es/components/material-exercise/exercise-file-tabs/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.d.ts +2 -3
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +10 -12
- package/es/components/material-exercise/exercise-file-tree/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-file-tree/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-file-tree/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-file-tree/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-menu/ExerciseMenu.d.ts +2 -1
- package/es/components/material-exercise/exercise-menu/ExerciseMenu.js +9 -9
- package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoAgentModalButton.js +4 -3
- package/es/components/material-exercise/exercise-menu/ExerciseMenuArduinoSettings.js +12 -12
- package/es/components/material-exercise/exercise-menu/ExerciseMenuDropdown.js +2 -2
- package/es/components/material-exercise/exercise-menu/ExerciseMenuReset.js +6 -6
- package/es/components/material-exercise/exercise-menu/ExerciseMenuStdioFileBrowser.js +6 -6
- package/es/components/material-exercise/exercise-menu/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-menu/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-menu/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-menu/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-preview/ExercisePreview.d.ts +2 -1
- package/es/components/material-exercise/exercise-preview/ExercisePreview.js +9 -9
- package/es/components/material-exercise/exercise-preview/ExercisePreviewDisplayModeButton.js +2 -2
- package/es/components/material-exercise/exercise-preview/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-preview/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-preview/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-preview/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.d.ts +2 -3
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpane.js +14 -15
- package/es/components/material-exercise/exercise-rightpane/ExerciseRightpaneEnvironment.js +2 -2
- package/es/components/material-exercise/exercise-rightpane/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-rightpane/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-rightpane/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-rightpane/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-room/ExerciseRoom.d.ts +2 -1
- package/es/components/material-exercise/exercise-room/ExerciseRoom.js +9 -9
- package/es/components/material-exercise/exercise-room/ExerciseRoomDetail.js +4 -4
- package/es/components/material-exercise/exercise-room/ExerciseRoomList.js +2 -2
- package/es/components/material-exercise/exercise-room/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-room/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-room/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-room/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-runner/ExerciseRunner.d.ts +2 -1
- package/es/components/material-exercise/exercise-runner/ExerciseRunner.js +26 -29
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoAgentModal.js +18 -16
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerArduinoStatusMessage.js +2 -2
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerButtonGroup.js +12 -12
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerCodeHelpRequestButton.js +6 -5
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerRunningInfo.js +26 -29
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerStatusMessage.js +8 -7
- package/es/components/material-exercise/exercise-runner/ExerciseRunnerControllerTimer.js +6 -6
- package/es/components/material-exercise/exercise-runner/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-runner/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-runner/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-runner/locales/th.json.js +3 -0
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.d.ts +2 -1
- package/es/components/material-exercise/exercise-submit-history/ExerciseSubmitHistory.js +14 -17
- package/es/components/material-exercise/exercise-submit-history/locales/en.json.js +2 -2
- package/es/components/material-exercise/exercise-submit-history/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-submit-history/locales/ko.json.js +2 -2
- package/es/components/material-exercise/exercise-submit-history/locales/th.json.js +3 -0
- package/es/components/shared/file-tree/FileTree.d.ts +1 -5
- package/es/components/shared/file-tree/FileTree.js +11 -12
- package/es/components/shared/file-tree/FileTreeConfig.js +1 -2
- package/es/components/shared/file-tree/FileTreeList.js +1 -2
- package/es/components/shared/file-tree/FileTreeListItemContentInput.js +2 -2
- package/es/components/shared/file-tree/FileTreeListItemContentMenu.js +22 -22
- package/es/components/shared/file-tree/FileTreeToolbar.js +3 -4
- package/es/components/shared/file-tree/locales/en.json.js +2 -2
- package/es/components/shared/file-tree/locales/index.d.ts +3 -0
- package/es/components/shared/file-tree/locales/ko.json.js +2 -2
- package/es/components/shared/file-tree/locales/th.json.js +3 -0
- package/es/components/shared/file-viewer/FileViewer.d.ts +2 -1
- package/es/components/shared/file-viewer/FileViewer.js +8 -16
- package/es/components/shared/file-viewer/FileViewerCsv.js +8 -7
- package/es/components/shared/file-viewer/FileViewerNonViewable.d.ts +2 -1
- package/es/components/shared/file-viewer/FileViewerNonViewable.js +13 -20
- package/es/components/shared/file-viewer/locales/index.d.ts +6 -0
- package/es/components/shared/file-viewer/locales/nonViewable.en.json.js +2 -2
- package/es/components/shared/file-viewer/locales/nonViewable.ko.json.js +2 -2
- package/es/components/shared/file-viewer/locales/nonViewable.th.json.js +3 -0
- package/es/components/shared/monaco-editor/MonacoEditorPerferenceForm.d.ts +2 -1
- package/es/components/shared/monaco-editor/MonacoEditorPerferenceForm.js +30 -38
- package/es/components/shared/monaco-editor/locales/en.json.js +2 -2
- package/es/components/shared/monaco-editor/locales/index.d.ts +3 -0
- package/es/components/shared/monaco-editor/locales/ko.json.js +2 -2
- package/es/components/shared/monaco-editor/locales/th.json.js +3 -0
- package/es/components/shared/xterm/Xterm.d.ts +3 -1
- package/es/components/shared/xterm/Xterm.js +10 -20
- package/es/components/shared/xterm/locales/en.json.js +2 -2
- package/es/components/shared/xterm/locales/index.d.ts +3 -0
- package/es/components/shared/xterm/locales/ko.json.js +2 -2
- package/es/components/shared/xterm/locales/th.json.js +3 -0
- package/package.json +6 -6
- package/cjs/components/material-exercise/MaterialExercise.i18n.d.ts +0 -5
- package/cjs/components/material-exercise/MaterialExercise.i18n.js +0 -13
- package/cjs/components/material-exercise/context/ExerciseIntlProvider.d.ts +0 -12
- package/cjs/components/material-exercise/context/ExerciseIntlProvider.js +0 -44
- package/es/components/material-exercise/MaterialExercise.i18n.d.ts +0 -5
- package/es/components/material-exercise/MaterialExercise.i18n.js +0 -10
- package/es/components/material-exercise/context/ExerciseIntlProvider.d.ts +0 -12
- package/es/components/material-exercise/context/ExerciseIntlProvider.js +0 -41
|
@@ -4,5 +4,7 @@ export interface MaterialExerciseProps extends MaterialExerciseCommonProps {
|
|
|
4
4
|
locale?: string;
|
|
5
5
|
}
|
|
6
6
|
export type MaterialExerciseApis = MaterialExerciseCommonApis;
|
|
7
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<MaterialExerciseProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & {
|
|
8
|
+
__intl: import("@elice/intl").EliceIntlShape;
|
|
9
|
+
} & React.RefAttributes<MaterialExerciseCommonApis> & import("@elice/material-shared-utils").MaterialCommponentCommonProps, "ref"> & React.RefAttributes<MaterialExerciseCommonApis>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<MaterialExerciseCommonApis>>;
|
|
8
10
|
export default _default;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import { useIntl, IntlProvider } from 'react-intl';
|
|
3
2
|
import { config } from '@elice/api-client';
|
|
4
3
|
import { ResizableNext, Button, Icon, Hspace } from '@elice/blocks';
|
|
5
4
|
import { eilClassroom } from '@elice/icons';
|
|
5
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
6
6
|
import { withForwardRefMaterial } from '@elice/material-shared-utils';
|
|
7
7
|
import { useRecoilValue } from 'recoil';
|
|
8
8
|
import { MATERIAL_RESIZABLE_COMMON_PROPS } from '../../constants/stylesheets.js';
|
|
9
|
+
import messageEn from '../locales/en.json.js';
|
|
10
|
+
import messageKo from '../locales/ko.json.js';
|
|
11
|
+
import messageTh from '../locales/th.json.js';
|
|
9
12
|
import ExerciseFileTabsFileTreeButton from './exercise-file-tabs/ExerciseFileTabsFileTreeButton.js';
|
|
10
13
|
import { exerciseContainerSizeState, exerciseState, exerciseFileTreeOpenedState, exercisePreviewTypeState, exercisePreviewDisplayModeState, exerciseMonacoEditorApisState } from './context/recoil.js';
|
|
11
14
|
import { ExerciseContext } from './context/context.js';
|
|
@@ -24,8 +27,6 @@ import ExercisePreview from './exercise-preview/ExercisePreview.js';
|
|
|
24
27
|
import ExerciseRightpane from './exercise-rightpane/ExerciseRightpane.js';
|
|
25
28
|
import ExerciseRunner from './exercise-runner/ExerciseRunner.js';
|
|
26
29
|
import { StyledExerciseContainer, EXERCISE_PREVIEW_MIN_WIDTH, EXERCISE_HORIZONTAL_RATIO, StyledExerciseMain, StyledExerciseFileAndTabWrap, StyledExerciseTabBar, StyledExerciseRunnerWrap, EXERCISE_RUNNER_MIN_HEIGHT, StyledxerciseFileTreeContaner, EXERCISE_FILE_TREE_MIN_WIDTH, StyledExerciseFileTreeWrap, StyledExerciseTabsWrap, StyledExerciseTabMenuWrap, StyledExerciseFileWrap } from './MaterialExercise.styled.js';
|
|
27
|
-
import * as MaterialExercise_i18n from './MaterialExercise.i18n.js';
|
|
28
|
-
import { en } from './MaterialExercise.i18n.js';
|
|
29
30
|
|
|
30
31
|
//
|
|
31
32
|
//
|
|
@@ -34,7 +35,9 @@ import { en } from './MaterialExercise.i18n.js';
|
|
|
34
35
|
* Material exercise.
|
|
35
36
|
*/
|
|
36
37
|
const MaterialExercise = forwardRef((props, ref) => {
|
|
37
|
-
const
|
|
38
|
+
const {
|
|
39
|
+
__intl
|
|
40
|
+
} = props;
|
|
38
41
|
const {
|
|
39
42
|
onReferenceDocsToggle
|
|
40
43
|
} = React.useContext(ExerciseContext);
|
|
@@ -89,7 +92,7 @@ const MaterialExercise = forwardRef((props, ref) => {
|
|
|
89
92
|
icon: eilClassroom
|
|
90
93
|
}), React.createElement(Hspace, {
|
|
91
94
|
width: 0.25
|
|
92
|
-
}),
|
|
95
|
+
}), __intl.formatMessage({
|
|
93
96
|
id: 'materialExercise.button.referenceDocs'
|
|
94
97
|
})), React.createElement(Hspace, {
|
|
95
98
|
width: 0.5
|
|
@@ -166,19 +169,12 @@ const MaterialExercise = forwardRef((props, ref) => {
|
|
|
166
169
|
//
|
|
167
170
|
//
|
|
168
171
|
//
|
|
169
|
-
var MaterialExercise$1 = withForwardRefMaterial(forwardRef((props, ref) => {
|
|
170
|
-
|
|
171
|
-
locale = 'en'
|
|
172
|
-
} = props;
|
|
173
|
-
return React.createElement(IntlProvider, {
|
|
174
|
-
locale: locale,
|
|
175
|
-
defaultLocale: "en",
|
|
176
|
-
messages: locale in MaterialExercise_i18n ? MaterialExercise_i18n[locale] : en
|
|
177
|
-
}, React.createElement(ExerciseProvider, Object.assign({}, props), React.createElement(MaterialExercise, Object.assign({}, props, {
|
|
172
|
+
var MaterialExercise$1 = new IntlComponentBuilder(withForwardRefMaterial(forwardRef((props, ref) => {
|
|
173
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, props.__intl), React.createElement(ExerciseProvider, Object.assign({}, props), React.createElement(MaterialExercise, Object.assign({}, props, {
|
|
178
174
|
ref: ref
|
|
179
175
|
}))));
|
|
180
176
|
}), config.init, {
|
|
181
177
|
overrideRecoilScope: true
|
|
182
|
-
});
|
|
178
|
+
})).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
183
179
|
|
|
184
180
|
export { MaterialExercise$1 as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
export interface ExerciseProviderNoImageProps {
|
|
3
4
|
/** */
|
|
4
5
|
text?: React.ReactChild;
|
|
@@ -11,5 +12,5 @@ export interface ExerciseProviderNoImageProps {
|
|
|
11
12
|
/** */
|
|
12
13
|
locale?: string;
|
|
13
14
|
}
|
|
14
|
-
declare const _default: (
|
|
15
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<ExerciseProviderNoImageProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
15
16
|
export default _default;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
2
|
import { SafeImage, Box, Text, Button } from '@elice/blocks';
|
|
4
3
|
import { base } from '@elice/design-tokens';
|
|
5
|
-
import {
|
|
4
|
+
import { IntlComponentBuilder } from '@elice/intl';
|
|
6
5
|
import styled from 'styled-components';
|
|
7
|
-
import
|
|
8
|
-
import
|
|
6
|
+
import noImageMessageEn from './locales/noImage.en.json.js';
|
|
7
|
+
import noImageMessageKo from './locales/noImage.ko.json.js';
|
|
8
|
+
import noImageMessageTh from './locales/noImage.th.json.js';
|
|
9
9
|
|
|
10
10
|
const StyledProviderNoImage = styled.div.withConfig({
|
|
11
11
|
componentId: "sc-oaauqc-0"
|
|
@@ -14,9 +14,9 @@ const ExerciseProviderNoImage = ({
|
|
|
14
14
|
text,
|
|
15
15
|
imageSrc = '',
|
|
16
16
|
buttonText,
|
|
17
|
-
onButtonClick
|
|
17
|
+
onButtonClick,
|
|
18
|
+
__intl
|
|
18
19
|
}) => {
|
|
19
|
-
const intl = useIntl();
|
|
20
20
|
/**
|
|
21
21
|
* render action button
|
|
22
22
|
*/
|
|
@@ -26,7 +26,7 @@ const ExerciseProviderNoImage = ({
|
|
|
26
26
|
}
|
|
27
27
|
return React.createElement(Button, {
|
|
28
28
|
onClick: onButtonClick
|
|
29
|
-
}, buttonText ||
|
|
29
|
+
}, buttonText || __intl.formatMessage({
|
|
30
30
|
id: 'exerciseContext.provider.noImage.button'
|
|
31
31
|
}));
|
|
32
32
|
};
|
|
@@ -45,21 +45,13 @@ const ExerciseProviderNoImage = ({
|
|
|
45
45
|
paddingbottom: "2rem"
|
|
46
46
|
}, React.createElement(Text, {
|
|
47
47
|
role: "white"
|
|
48
|
-
}, text ||
|
|
48
|
+
}, text || __intl.formatMessage({
|
|
49
49
|
id: 'exerciseContext.provider.noImage.title'
|
|
50
50
|
}))), renderActionButton());
|
|
51
51
|
};
|
|
52
52
|
//
|
|
53
53
|
//
|
|
54
54
|
//
|
|
55
|
-
var MaterialExerciseNoImage = (
|
|
56
|
-
return React.createElement(MaterialIntlProvider, {
|
|
57
|
-
locale: props.locale,
|
|
58
|
-
phrases: {
|
|
59
|
-
en: phrasesEn,
|
|
60
|
-
ko: phrasesKo
|
|
61
|
-
}
|
|
62
|
-
}, React.createElement(ExerciseProviderNoImage, Object.assign({}, props)));
|
|
63
|
-
});
|
|
55
|
+
var MaterialExerciseNoImage = new IntlComponentBuilder(ExerciseProviderNoImage).add('en', noImageMessageEn).add('ko', noImageMessageKo).add('th', noImageMessageTh).build();
|
|
64
56
|
|
|
65
57
|
export { MaterialExerciseNoImage as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var noImageMessageEn = {"exerciseContext.provider.noImage.button":"Create a new image","exerciseContext.provider.noImage.title":"Exercise image is not ready yet."};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { noImageMessageEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var noImageMessageKo = {"exerciseContext.provider.noImage.button":"예제 작성","exerciseContext.provider.noImage.title":"실습 코드가 작성되지 않았습니다."};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { noImageMessageKo as default };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps as EliceIntlProps } from '@elice/intl';
|
|
2
3
|
export interface ExerciseCodeHistoryProps {
|
|
3
4
|
onHide?: () => void;
|
|
4
5
|
onLoadVersionButtonClick?: (doc: string) => void;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: React.
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<EliceIntlProps<ExerciseCodeHistoryProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
7
8
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
2
|
import { Button, Text } from '@elice/blocks';
|
|
3
|
+
import { IntlComponentBuilder } from '@elice/intl';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import { useRecoilValue } from 'recoil';
|
|
6
6
|
import ExerciseVersionList from '../../shared/exercise-version-list/ExerciseVersionList.js';
|
|
@@ -26,16 +26,16 @@ import 'lodash/debounce';
|
|
|
26
26
|
import 'ot-text-unicode';
|
|
27
27
|
import 'random-words';
|
|
28
28
|
import 'unicount';
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
29
|
+
import messageEn from './locales/en.json.js';
|
|
30
|
+
import messageKo from './locales/ko.json.js';
|
|
31
|
+
import messageTh from './locales/th.json.js';
|
|
32
32
|
import { StyledModalContent, StyledVersionsWrapper, StyledVersionRangeInputWrapper, StyledVersionRangeInput, StyledEditorWrapper, StyledFileNameBox } from './ExerciseCodeHistory.styled.js';
|
|
33
33
|
|
|
34
34
|
const ExerciseCodeHistory = ({
|
|
35
35
|
onHide,
|
|
36
|
-
onLoadVersionButtonClick
|
|
36
|
+
onLoadVersionButtonClick,
|
|
37
|
+
__intl
|
|
37
38
|
}) => {
|
|
38
|
-
const intl = useIntl();
|
|
39
39
|
const {
|
|
40
40
|
exerciseRoomId
|
|
41
41
|
} = React.useContext(ExerciseContext);
|
|
@@ -62,7 +62,7 @@ const ExerciseCodeHistory = ({
|
|
|
62
62
|
}, React.createElement(Text, {
|
|
63
63
|
role: "gray3",
|
|
64
64
|
size: "small"
|
|
65
|
-
},
|
|
65
|
+
}, __intl.formatMessage({
|
|
66
66
|
id: 'exerciseCodeHistory.op.version'
|
|
67
67
|
}, {
|
|
68
68
|
version: op.version,
|
|
@@ -75,7 +75,7 @@ const ExerciseCodeHistory = ({
|
|
|
75
75
|
}, React.createElement(Text, {
|
|
76
76
|
role: "white",
|
|
77
77
|
size: "small"
|
|
78
|
-
},
|
|
78
|
+
}, __intl.formatMessage({
|
|
79
79
|
id: 'exerciseCodeHistory.button.load.more'
|
|
80
80
|
}))) : null);
|
|
81
81
|
/**
|
|
@@ -126,7 +126,7 @@ const ExerciseCodeHistory = ({
|
|
|
126
126
|
onClick: () => {
|
|
127
127
|
onLoadVersionButtonClick(doc);
|
|
128
128
|
}
|
|
129
|
-
},
|
|
129
|
+
}, __intl.formatMessage({
|
|
130
130
|
id: 'exerciseCodeHistory.button.load.selectedVersions'
|
|
131
131
|
}));
|
|
132
132
|
};
|
|
@@ -134,7 +134,7 @@ const ExerciseCodeHistory = ({
|
|
|
134
134
|
//
|
|
135
135
|
//
|
|
136
136
|
return React.createElement(MaterialModal, {
|
|
137
|
-
title:
|
|
137
|
+
title: __intl.formatMessage({
|
|
138
138
|
id: 'exerciseCodeHistory.title'
|
|
139
139
|
}),
|
|
140
140
|
onHide: onHide,
|
|
@@ -144,9 +144,6 @@ const ExerciseCodeHistory = ({
|
|
|
144
144
|
//
|
|
145
145
|
//
|
|
146
146
|
//
|
|
147
|
-
var ExerciseCodeHistory$1 =
|
|
148
|
-
en: phrasesEn,
|
|
149
|
-
ko: phrasesKo
|
|
150
|
-
});
|
|
147
|
+
var ExerciseCodeHistory$1 = new IntlComponentBuilder(ExerciseCodeHistory).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
151
148
|
|
|
152
149
|
export { ExerciseCodeHistory$1 as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageEn = {"exerciseCodeHistory.button.load.more":"Load more","exerciseCodeHistory.button.load.selectedVersions":"Load selected versions","exerciseCodeHistory.op.version":"Version {version} {datetime}","exerciseCodeHistory.title":"Code revision history"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageKo = {"exerciseCodeHistory.button.load.more":"더 불러오기","exerciseCodeHistory.button.load.selectedVersions":"선택 버전 불러오기","exerciseCodeHistory.op.version":"버전 {version} {datetime}","exerciseCodeHistory.title":"코드 수정 이력"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageKo as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var messageTh = {"exerciseCodeHistory.button.load.more":"โหลดเพิ่มเติม","exerciseCodeHistory.button.load.selectedVersions":"โหลดเวอร์ชันที่เลือก","exerciseCodeHistory.op.version":"เวอร์ชัน {version} {datetime}","exerciseCodeHistory.title":"ประวัติการแก้ไขโค้ด"};
|
|
2
|
+
|
|
3
|
+
export { messageTh as default };
|
package/es/components/material-exercise/exercise-file-editor/ExerciseFileReadOnlyBanner.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const ExerciseFileReadOnlyBanner: React.FC;
|
|
6
|
-
export default ExerciseFileReadOnlyBanner;
|
|
2
|
+
import type { WithIntlComponentBuilderProps as EliceIntlProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<EliceIntlProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<any>>;
|
|
4
|
+
export default _default;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
2
|
import { Text } from '@elice/blocks';
|
|
4
3
|
import { base } from '@elice/design-tokens';
|
|
4
|
+
import { IntlComponentBuilder } from '@elice/intl';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import '../context/recoil.js';
|
|
7
7
|
import { ExerciseContext } from '../context/context.js';
|
|
8
8
|
import '../context/recoilTypes.js';
|
|
9
9
|
import '../context/subjects.js';
|
|
10
10
|
import '../context/ExerciseProvider.js';
|
|
11
|
+
import messageEn from './locales/en.json.js';
|
|
12
|
+
import messageKo from './locales/ko.json.js';
|
|
13
|
+
import messageTh from './locales/th.json.js';
|
|
11
14
|
|
|
12
15
|
const StyledEditorReadOnlyBanner = styled.div.withConfig({
|
|
13
16
|
componentId: "sc-kh9iw2-0"
|
|
@@ -15,7 +18,9 @@ const StyledEditorReadOnlyBanner = styled.div.withConfig({
|
|
|
15
18
|
/**
|
|
16
19
|
* Banner for readonly exercise file.
|
|
17
20
|
*/
|
|
18
|
-
const ExerciseFileReadOnlyBanner = (
|
|
21
|
+
const ExerciseFileReadOnlyBanner = ({
|
|
22
|
+
__intl
|
|
23
|
+
}) => {
|
|
19
24
|
const {
|
|
20
25
|
readOnlyActiveFile
|
|
21
26
|
} = React.useContext(ExerciseContext);
|
|
@@ -25,9 +30,13 @@ const ExerciseFileReadOnlyBanner = () => {
|
|
|
25
30
|
return React.createElement(StyledEditorReadOnlyBanner, null, React.createElement(Text, {
|
|
26
31
|
size: "tiny",
|
|
27
32
|
role: "gray3"
|
|
28
|
-
},
|
|
29
|
-
id:
|
|
33
|
+
}, __intl.formatMessage({
|
|
34
|
+
id: 'materialExercise.text.readOnlyBanner'
|
|
30
35
|
})));
|
|
31
36
|
};
|
|
37
|
+
//
|
|
38
|
+
//
|
|
39
|
+
//
|
|
40
|
+
var ExerciseFileReadOnlyBanner$1 = new IntlComponentBuilder(ExerciseFileReadOnlyBanner).add('ko', messageKo).add('en', messageEn).add('th', messageTh).build();
|
|
32
41
|
|
|
33
|
-
export { ExerciseFileReadOnlyBanner as default };
|
|
42
|
+
export { ExerciseFileReadOnlyBanner$1 as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { WithIntlComponentBuilderProps as EliceIntlProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<EliceIntlProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<any>>;
|
|
4
|
+
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
2
3
|
import { useRecoilState } from 'recoil';
|
|
3
4
|
import styled from 'styled-components';
|
|
4
5
|
import '../../shared/exercise-shimmer/ExerciseFileShimmer.js';
|
|
@@ -11,12 +12,23 @@ import { ExerciseContext } from '../context/context.js';
|
|
|
11
12
|
import '../context/recoilTypes.js';
|
|
12
13
|
import '../context/subjects.js';
|
|
13
14
|
import '../context/ExerciseProvider.js';
|
|
15
|
+
import messageEn from './locales/fileTreeButton.en.json.js';
|
|
16
|
+
import messageKo from './locales/fileTreeButton.ko.json.js';
|
|
17
|
+
import messageTh from './locales/fileTreeButton.th.json.js';
|
|
14
18
|
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
//
|
|
15
22
|
const AsyncFileTabs = React.lazy(() => import('../../shared/file-tabs/FileTabs.js'));
|
|
16
23
|
const StyledFileTabsWrapper = styled.div.withConfig({
|
|
17
24
|
componentId: "sc-11fdoyl-0"
|
|
18
25
|
})(["flex:0 0 3rem;"]);
|
|
19
|
-
|
|
26
|
+
//
|
|
27
|
+
//
|
|
28
|
+
//
|
|
29
|
+
const ExerciseFileTabs = ({
|
|
30
|
+
__intl
|
|
31
|
+
}) => {
|
|
20
32
|
const {
|
|
21
33
|
exerciseRoomId,
|
|
22
34
|
materialExerciseId
|
|
@@ -48,7 +60,7 @@ const ExerciseFileTabs = () => {
|
|
|
48
60
|
}
|
|
49
61
|
setActiveFilename(path);
|
|
50
62
|
};
|
|
51
|
-
return React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
63
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
52
64
|
fallback: React.createElement(ExerciseFileTabsShimmer, null)
|
|
53
65
|
}, React.createElement(AsyncFileTabs, {
|
|
54
66
|
openedTabs: openedTabs,
|
|
@@ -56,7 +68,8 @@ const ExerciseFileTabs = () => {
|
|
|
56
68
|
onCloseTab: handleCloseTab,
|
|
57
69
|
onSelectTab: handleActivePathChange,
|
|
58
70
|
onTabOrderChange: handleTabOrderChange
|
|
59
|
-
})));
|
|
71
|
+
}))));
|
|
60
72
|
};
|
|
73
|
+
var ExerciseFileTabs$1 = new IntlComponentBuilder(ExerciseFileTabs).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
61
74
|
|
|
62
|
-
export { ExerciseFileTabs as default };
|
|
75
|
+
export { ExerciseFileTabs$1 as default };
|
package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
2
|
+
declare const ExerciseFileTabsFileTreeButton: React.ForwardRefExoticComponent<React.RefAttributes<HTMLButtonElement>>;
|
|
3
|
+
export default ExerciseFileTabsFileTreeButton;
|
package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
2
|
import { useHover } from 'react-use';
|
|
4
3
|
import { IconButton, Tooltip } from '@elice/blocks';
|
|
5
4
|
import { base } from '@elice/design-tokens';
|
|
6
5
|
import { eilArrowRightwardsDouble, eilFolder } from '@elice/icons';
|
|
6
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
7
7
|
import { enums } from '@elice/types';
|
|
8
8
|
import { eliceApiUiConfigNormalizeHelper } from '@elice/utils';
|
|
9
9
|
import { useRecoilValue, useRecoilState } from 'recoil';
|
|
@@ -13,16 +13,13 @@ import { ExerciseContext } from '../context/context.js';
|
|
|
13
13
|
import '../context/recoilTypes.js';
|
|
14
14
|
import '../context/subjects.js';
|
|
15
15
|
import '../context/ExerciseProvider.js';
|
|
16
|
-
import { withForwardRefExerciseIntlProvider } from '../context/ExerciseIntlProvider.js';
|
|
17
|
-
import phrasesEn from './locales/fileTreeButton.en.json.js';
|
|
18
|
-
import phrasesKo from './locales/fileTreeButton.ko.json.js';
|
|
19
16
|
|
|
20
17
|
const ICON_BUTTON_SIZE = '2.25rem';
|
|
21
18
|
const StyledFileTreeButton = styled(IconButton).withConfig({
|
|
22
19
|
componentId: "sc-ohtsjn-0"
|
|
23
20
|
})(["width:", " !important;height:", " !important;border-right:1px solid ", " !important;background-color:", " !important;&:hover{background-color:", " !important;}"], ICON_BUTTON_SIZE, ICON_BUTTON_SIZE, base.color.navy7, props => props.active ? base.color.navy8 : base.color.navy8, base.color.navy9);
|
|
24
21
|
const ExerciseFileTabsFileTreeButton = forwardRef((_, ref) => {
|
|
25
|
-
const intl =
|
|
22
|
+
const intl = useRawEliceIntl();
|
|
26
23
|
const {
|
|
27
24
|
materialExerciseId
|
|
28
25
|
} = React.useContext(ExerciseContext);
|
|
@@ -70,12 +67,5 @@ const ExerciseFileTabsFileTreeButton = forwardRef((_, ref) => {
|
|
|
70
67
|
});
|
|
71
68
|
return (exercise === null || exercise === void 0 ? void 0 : exercise.uiConfig.editorFileTreeDefaultStatus) === enums.ExerciseUiConfigEditorFileTreeDefaultStatus.Hide ? null : el;
|
|
72
69
|
});
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
var ExerciseFileTabsFileTreeButton$1 = withForwardRefExerciseIntlProvider(ExerciseFileTabsFileTreeButton, {
|
|
77
|
-
en: phrasesEn,
|
|
78
|
-
ko: phrasesKo
|
|
79
|
-
});
|
|
80
70
|
|
|
81
|
-
export { ExerciseFileTabsFileTreeButton
|
|
71
|
+
export { ExerciseFileTabsFileTreeButton as default };
|
package/es/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.en.json.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageEn = {"exerciseFileTab.fileTreeButton.tooltip.close":"Close Filetree","exerciseFileTab.fileTreeButton.tooltip.open":"Open Filetree"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageEn as default };
|
package/es/components/material-exercise/exercise-file-tabs/locales/fileTreeButton.ko.json.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageKo = {"exerciseFileTab.fileTreeButton.tooltip.close":"파일 트리 닫기","exerciseFileTab.fileTreeButton.tooltip.open":"파일 트리 열기"};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageKo as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}>;
|
|
2
|
+
import type { WithIntlComponentBuilderProps as EliceIntlProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<EliceIntlProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<any>>;
|
|
5
4
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useIntl } from 'react-intl';
|
|
3
2
|
import { postOrgMaterialExerciseExerciseRoomUserFileAdd, postOrgMaterialExerciseExerciseRoomUserFileDirectoryAdd, postOrgMaterialExerciseExerciseRoomUserFileDelete, postOrgMaterialExerciseExerciseRoomUserFileDirectoryDelete, postOrgMaterialExerciseExerciseRoomUserFileMove, postOrgMaterialExerciseExerciseRoomUserFileDirectoryMove, getOrgMaterialExerciseExerciseRoomGet } from '@elice/api-client';
|
|
4
3
|
import { Flex, Notification } from '@elice/blocks';
|
|
4
|
+
import { IntlComponentBuilder } from '@elice/intl';
|
|
5
5
|
import { enums } from '@elice/types';
|
|
6
6
|
import { camelize } from 'humps';
|
|
7
7
|
import { useRecoilValue, useRecoilState } from 'recoil';
|
|
@@ -17,9 +17,9 @@ import { ExerciseContext } from '../context/context.js';
|
|
|
17
17
|
import '../context/recoilTypes.js';
|
|
18
18
|
import '../context/subjects.js';
|
|
19
19
|
import '../context/ExerciseProvider.js';
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
20
|
+
import messageEn from './locales/en.json.js';
|
|
21
|
+
import messageKo from './locales/ko.json.js';
|
|
22
|
+
import messageTh from './locales/th.json.js';
|
|
23
23
|
|
|
24
24
|
const AsyncFileTree = React.lazy(() => import('../../shared/file-tree/FileTree.js'));
|
|
25
25
|
const AsyncFileTreeList = React.lazy(() => import('../../shared/file-tree/FileTreeList.js'));
|
|
@@ -40,9 +40,10 @@ var MaterialExerciseFileError;
|
|
|
40
40
|
MaterialExerciseFileError["UsableSizeExceed"] = "usable_size_exceed";
|
|
41
41
|
MaterialExerciseFileError["SubFileOrPathExist"] = "sub_file_or_path_exist";
|
|
42
42
|
})(MaterialExerciseFileError || (MaterialExerciseFileError = {}));
|
|
43
|
-
const ExerciseFileTree = (
|
|
43
|
+
const ExerciseFileTree = ({
|
|
44
|
+
__intl
|
|
45
|
+
}) => {
|
|
44
46
|
var _a, _b, _c, _d;
|
|
45
|
-
const intl = useIntl();
|
|
46
47
|
const {
|
|
47
48
|
exerciseRoomId,
|
|
48
49
|
materialExerciseId,
|
|
@@ -116,7 +117,7 @@ const ExerciseFileTree = () => {
|
|
|
116
117
|
setExerciseRoom(exerciseRoom);
|
|
117
118
|
} catch (error) {
|
|
118
119
|
console.error(error);
|
|
119
|
-
Notification.error(
|
|
120
|
+
Notification.error(__intl.formatMessage({
|
|
120
121
|
id: 'materialExercise.exerciseFileTree.fetchRoom.failure'
|
|
121
122
|
}));
|
|
122
123
|
}
|
|
@@ -143,7 +144,7 @@ const ExerciseFileTree = () => {
|
|
|
143
144
|
message = ((_b = error.detail) === null || _b === void 0 ? void 0 : _b.failCode) ? error.detail.failCode : `materialExercise.exerciseFileTree.errorCode.unknown`;
|
|
144
145
|
failMessage = (_c = error.detail) === null || _c === void 0 ? void 0 : _c.failMessage;
|
|
145
146
|
}
|
|
146
|
-
Notification.error(
|
|
147
|
+
Notification.error(__intl.formatMessage({
|
|
147
148
|
id: message
|
|
148
149
|
}) + `${failMessage ? ` (${failMessage})` : ''}`);
|
|
149
150
|
if (typeof onError === 'function') {
|
|
@@ -326,9 +327,6 @@ const ExerciseFileTree = () => {
|
|
|
326
327
|
locale: locale
|
|
327
328
|
}, React.createElement(AsyncFileTreeToolbar, null), React.createElement(StyledFileTreeDivider, null), React.createElement(AsyncFileTreeList, null))));
|
|
328
329
|
};
|
|
329
|
-
var ExerciseFileTree$1 =
|
|
330
|
-
en: phrasesEn,
|
|
331
|
-
ko: phrasesKo
|
|
332
|
-
});
|
|
330
|
+
var ExerciseFileTree$1 = new IntlComponentBuilder(ExerciseFileTree).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
333
331
|
|
|
334
332
|
export { ExerciseFileTree$1 as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageEn = {"exerciseFileTree.errorCode.insufficientPermission":"[Error] Insufficient Permission","exerciseFileTree.errorCode.invalidParameter":"[Error] Invalid Parameter","exerciseFileTree.errorCode.invalidParameterCombination":"[Error] Invalid Parameter Combination","exerciseFileTree.errorCode.notFoundCurrentFilename":"[Error] Not Found Current Filename","exerciseFileTree.errorCode.notFoundExerciseRoom":"[Error] Not Found ExerciseRoom","exerciseFileTree.errorCode.notFoundPath":"[Error] Not Found Path","exerciseFileTree.errorCode.overwriteExistingOne":"[Error] Overwrite Existing One","exerciseFileTree.errorCode.resultingFilenameUnderCurrentFilename":"[Error] Resulting Filename Under Current Filename","exerciseFileTree.errorCode.subFileOrPathExist":"[Error] Sub File Or Path Exist","exerciseFileTree.errorCode.unknown":"[Error] An unkown error has occurred.","exerciseFileTree.errorCode.usableSizeExceed":"[Error] Usable Size Exceed","exerciseFileTree.fetchRoom.failure":"Failed to fetch exercise room."};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageEn as default };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var messageKo = {"exerciseFileTree.errorCode.insufficientPermission":"[Error] 권한이 없습니다.","exerciseFileTree.errorCode.invalidParameter":"[Error] 파라미터가 올바르지 않습니다.","exerciseFileTree.errorCode.invalidParameterCombination":"[Error] 파라미터 조합이 올바르지 않습니다.","exerciseFileTree.errorCode.notFoundCurrentFilename":"[Error] 파일을 찾을 수 없습니다.","exerciseFileTree.errorCode.notFoundExerciseRoom":"[Error] 실습방을 찾을 수 없습니다.","exerciseFileTree.errorCode.notFoundPath":"[Error] 해당 경로를 찾을 수 없습니다.","exerciseFileTree.errorCode.overwriteExistingOne":"[Error] 덮어쓰기가 불가능합니다.","exerciseFileTree.errorCode.resultingFilenameUnderCurrentFilename":"[Error] 같은 경로에 디렉토리를 옮길 수 없습니다.","exerciseFileTree.errorCode.subFileOrPathExist":"[Error] 디렉토리를 삭제하지 못했습니다. 디렉토리가 비어있어야 삭제할 수 있습니다.","exerciseFileTree.errorCode.unknown":"[Error] 알수 없는 에러가 발생하였습니다.","exerciseFileTree.errorCode.usableSizeExceed":"[Error] 허용된 용량을 초과하였습니다.","exerciseFileTree.fetchRoom.failure":"실습을 가져오는데 실패했습니다."};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { messageKo as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var messageTh = {"exerciseFileTree.errorCode.insufficientPermission":"[ข้อผิดพลาด] ไม่มีสิทธิ์.","exerciseFileTree.errorCode.invalidParameter":"[ข้อผิดพลาด] พารามิเตอร์ไม่ถูกต้อง","exerciseFileTree.errorCode.invalidParameterCombination":"[ข้อผิดพลาด] การรวมพารามิเตอร์ไม่ถูกต้อง.","exerciseFileTree.errorCode.notFoundCurrentFilename":"[ข้อผิดพลาด] ไม่พบไฟล์","exerciseFileTree.errorCode.notFoundExerciseRoom":"[ข้อผิดพลาด] ไม่พบห้องปฏิบัติการ.","exerciseFileTree.errorCode.notFoundPath":"[ข้อผิดพลาด] ไม่สามารถหาเส้นทางที่ระบุ","exerciseFileTree.errorCode.overwriteExistingOne":"[ข้อผิดพลาด] ไม่สามารถเขียนทับได้.","exerciseFileTree.errorCode.resultingFilenameUnderCurrentFilename":"[ข้อผิดพลาด] ไม่สามารถย้ายไดเรกทอรีไปยังตำแหน่งเดียวกันได้ ค่ะ.","exerciseFileTree.errorCode.subFileOrPathExist":"[ข้อผิดพลาด] ไม่สามารถลบไดเรกทอรี ไดเร็กทอรีต้องว่างเปล่าก่อนจึงจะสามารถลบได้","exerciseFileTree.errorCode.unknown":"[ข้อผิดพลาด] เกิดข้อผิดพลาดที่ไม่สามารถระบุได้.","exerciseFileTree.errorCode.usableSizeExceed":"[ข้อผิดพลาด] คุณเกินพื้นที่ที่อนุญาตแล้วค่ะ.","exerciseFileTree.fetchRoom.failure":"การเรียนปฏิบัติล้มเหลว "};
|
|
2
|
+
|
|
3
|
+
export { messageTh as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import type { WithIntlComponentBuilderProps as EliceIntlProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<EliceIntlProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<any>>;
|
|
3
4
|
export default _default;
|