@elice/material-exercise 1.240520.0 → 1.240521.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 +1 -1
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.d.ts +2 -3
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +4 -13
- package/cjs/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.d.ts +4 -0
- package/cjs/components/material-exercise/exercise-file-tabs/{ExerciseFileTabsFileTreeButton.js → exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js} +19 -11
- package/cjs/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/index.d.ts +1 -0
- package/cjs/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/locales/index.d.ts +3 -0
- package/cjs/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +1 -1
- package/cjs/components/shared/file-tree/FileTree.d.ts +2 -1
- package/cjs/components/shared/file-tree/FileTree.js +5 -3
- package/cjs/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.d.ts +6 -0
- package/cjs/components/shared/file-tree/{FileTreeToolbar.js → file-tree-toolbar/FileTreeToolbar.js} +10 -6
- package/cjs/components/shared/file-tree/file-tree-toolbar/index.d.ts +1 -0
- package/cjs/components/shared/file-tree/file-tree-toolbar/locales/en.json.js +7 -0
- package/cjs/components/shared/file-tree/file-tree-toolbar/locales/index.d.ts +3 -0
- package/cjs/components/shared/file-tree/file-tree-toolbar/locales/ko.json.js +7 -0
- package/cjs/components/shared/file-tree/file-tree-toolbar/locales/th.json.js +7 -0
- package/cjs/components/shared/file-tree/index.d.ts +1 -1
- package/es/components/material-exercise/MaterialExercise.js +1 -1
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.d.ts +2 -3
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabs.js +4 -13
- package/es/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.d.ts +4 -0
- package/es/components/material-exercise/exercise-file-tabs/{ExerciseFileTabsFileTreeButton.js → exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js} +20 -12
- package/es/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/index.d.ts +1 -0
- package/es/components/material-exercise/exercise-file-tabs/exercise-file-tabs-file-tree-button/locales/index.d.ts +3 -0
- package/es/components/material-exercise/exercise-file-tree/ExerciseFileTree.js +1 -1
- package/es/components/shared/file-tree/FileTree.d.ts +2 -1
- package/es/components/shared/file-tree/FileTree.js +6 -4
- package/es/components/shared/file-tree/file-tree-toolbar/FileTreeToolbar.d.ts +6 -0
- package/es/components/shared/file-tree/{FileTreeToolbar.js → file-tree-toolbar/FileTreeToolbar.js} +11 -7
- package/es/components/shared/file-tree/file-tree-toolbar/index.d.ts +1 -0
- package/es/components/shared/file-tree/file-tree-toolbar/locales/en.json.js +3 -0
- package/es/components/shared/file-tree/file-tree-toolbar/locales/index.d.ts +3 -0
- package/es/components/shared/file-tree/file-tree-toolbar/locales/ko.json.js +3 -0
- package/es/components/shared/file-tree/file-tree-toolbar/locales/th.json.js +3 -0
- package/es/components/shared/file-tree/index.d.ts +1 -1
- package/package.json +4 -4
- package/cjs/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.d.ts +0 -3
- package/cjs/components/material-exercise/exercise-file-tabs/locales/index.d.ts +0 -3
- package/cjs/components/shared/file-tree/FileTreeToolbar.d.ts +0 -6
- package/es/components/material-exercise/exercise-file-tabs/ExerciseFileTabsFileTreeButton.d.ts +0 -3
- package/es/components/material-exercise/exercise-file-tabs/locales/index.d.ts +0 -3
- package/es/components/shared/file-tree/FileTreeToolbar.d.ts +0 -6
- /package/cjs/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.en.json.js → exercise-file-tabs-file-tree-button/locales/en.json.js} +0 -0
- /package/cjs/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.ko.json.js → exercise-file-tabs-file-tree-button/locales/ko.json.js} +0 -0
- /package/cjs/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.th.json.js → exercise-file-tabs-file-tree-button/locales/th.json.js} +0 -0
- /package/es/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.en.json.js → exercise-file-tabs-file-tree-button/locales/en.json.js} +0 -0
- /package/es/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.ko.json.js → exercise-file-tabs-file-tree-button/locales/ko.json.js} +0 -0
- /package/es/components/material-exercise/exercise-file-tabs/{locales/fileTreeButton.th.json.js → exercise-file-tabs-file-tree-button/locales/th.json.js} +0 -0
|
@@ -13,7 +13,7 @@ var stylesheets = require('../../constants/stylesheets.js');
|
|
|
13
13
|
var en = require('../locales/en.json.js');
|
|
14
14
|
var ko = require('../locales/ko.json.js');
|
|
15
15
|
var th = require('../locales/th.json.js');
|
|
16
|
-
var ExerciseFileTabsFileTreeButton = require('./exercise-file-tabs/ExerciseFileTabsFileTreeButton.js');
|
|
16
|
+
var ExerciseFileTabsFileTreeButton = require('./exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js');
|
|
17
17
|
var recoil$1 = require('./context/recoil.js');
|
|
18
18
|
var context = require('./context/context.js');
|
|
19
19
|
var recoilTypes = require('./context/recoilTypes.js');
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default _default;
|
|
2
|
+
declare const ExerciseFileTabs: React.FC;
|
|
3
|
+
export default ExerciseFileTabs;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var intl = require('@elice/intl');
|
|
7
6
|
var recoil = require('recoil');
|
|
8
7
|
var styled = require('styled-components');
|
|
9
8
|
require('../../shared/exercise-shimmer/ExerciseFileShimmer.js');
|
|
@@ -16,9 +15,6 @@ var context = require('../context/context.js');
|
|
|
16
15
|
require('../context/recoilTypes.js');
|
|
17
16
|
require('../context/subjects.js');
|
|
18
17
|
require('../context/ExerciseProvider.js');
|
|
19
|
-
var fileTreeButton_en = require('./locales/fileTreeButton.en.json.js');
|
|
20
|
-
var fileTreeButton_ko = require('./locales/fileTreeButton.ko.json.js');
|
|
21
|
-
var fileTreeButton_th = require('./locales/fileTreeButton.th.json.js');
|
|
22
18
|
|
|
23
19
|
//
|
|
24
20
|
//
|
|
@@ -30,9 +26,7 @@ const StyledFileTabsWrapper = styled.div.withConfig({
|
|
|
30
26
|
//
|
|
31
27
|
//
|
|
32
28
|
//
|
|
33
|
-
const ExerciseFileTabs = ({
|
|
34
|
-
__intl
|
|
35
|
-
}) => {
|
|
29
|
+
const ExerciseFileTabs = () => {
|
|
36
30
|
const {
|
|
37
31
|
exerciseRoomId,
|
|
38
32
|
materialExerciseId
|
|
@@ -64,9 +58,7 @@ const ExerciseFileTabs = ({
|
|
|
64
58
|
}
|
|
65
59
|
setActiveFilename(path);
|
|
66
60
|
};
|
|
67
|
-
return React.createElement(
|
|
68
|
-
value: __intl
|
|
69
|
-
}, React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
61
|
+
return React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
70
62
|
fallback: React.createElement(ExerciseFileTabsShimmer.default, null)
|
|
71
63
|
}, React.createElement(AsyncFileTabs, {
|
|
72
64
|
openedTabs: openedTabs,
|
|
@@ -74,8 +66,7 @@ const ExerciseFileTabs = ({
|
|
|
74
66
|
onCloseTab: handleCloseTab,
|
|
75
67
|
onSelectTab: handleActivePathChange,
|
|
76
68
|
onTabOrderChange: handleTabOrderChange
|
|
77
|
-
})))
|
|
69
|
+
})));
|
|
78
70
|
};
|
|
79
|
-
var ExerciseFileTabs$1 = new intl.IntlComponentBuilder(ExerciseFileTabs).add('en', fileTreeButton_en.default).add('ko', fileTreeButton_ko.default).add('th', fileTreeButton_th.default).build();
|
|
80
71
|
|
|
81
|
-
exports.default = ExerciseFileTabs
|
|
72
|
+
exports.default = ExerciseFileTabs;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<Omit<WithIntlComponentBuilderProps, "ref"> & React.RefAttributes<HTMLButtonElement>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default _default;
|
|
@@ -12,18 +12,22 @@ var types = require('@elice/types');
|
|
|
12
12
|
var utils = require('@elice/utils');
|
|
13
13
|
var recoil = require('recoil');
|
|
14
14
|
var styled = require('styled-components');
|
|
15
|
-
var recoil$1 = require('
|
|
16
|
-
var context = require('
|
|
17
|
-
require('
|
|
18
|
-
require('
|
|
19
|
-
require('
|
|
15
|
+
var recoil$1 = require('../../context/recoil.js');
|
|
16
|
+
var context = require('../../context/context.js');
|
|
17
|
+
require('../../context/recoilTypes.js');
|
|
18
|
+
require('../../context/subjects.js');
|
|
19
|
+
require('../../context/ExerciseProvider.js');
|
|
20
|
+
var en = require('./locales/en.json.js');
|
|
21
|
+
var ko = require('./locales/ko.json.js');
|
|
22
|
+
var th = require('./locales/th.json.js');
|
|
20
23
|
|
|
21
24
|
const ICON_BUTTON_SIZE = '2.25rem';
|
|
22
25
|
const StyledFileTreeButton = styled(blocks.IconButton).withConfig({
|
|
23
|
-
componentId: "sc-
|
|
26
|
+
componentId: "sc-1ulolpl-0"
|
|
24
27
|
})(["width:", " !important;height:", " !important;border-right:1px solid ", " !important;background-color:", " !important;&:hover{background-color:", " !important;}"], ICON_BUTTON_SIZE, ICON_BUTTON_SIZE, designTokens.base.color.navy7, props => props.active ? designTokens.base.color.navy8 : designTokens.base.color.navy8, designTokens.base.color.navy9);
|
|
25
|
-
const ExerciseFileTabsFileTreeButton = React.forwardRef((
|
|
26
|
-
|
|
28
|
+
const ExerciseFileTabsFileTreeButton = React.forwardRef(({
|
|
29
|
+
__intl
|
|
30
|
+
}, ref) => {
|
|
27
31
|
const {
|
|
28
32
|
materialExerciseId
|
|
29
33
|
} = React.useContext(context.ExerciseContext);
|
|
@@ -50,9 +54,9 @@ const ExerciseFileTabsFileTreeButton = React.forwardRef((_, ref) => {
|
|
|
50
54
|
//
|
|
51
55
|
const [el] = reactUse.useHover(isHovering => {
|
|
52
56
|
return React.createElement("div", null, React.createElement(blocks.Tooltip, {
|
|
53
|
-
title: exerciseFileTreeOpened ?
|
|
57
|
+
title: exerciseFileTreeOpened ? __intl.formatMessage({
|
|
54
58
|
id: 'exerciseFileTab.fileTreeButton.tooltip.close'
|
|
55
|
-
}) :
|
|
59
|
+
}) : __intl.formatMessage({
|
|
56
60
|
id: 'exerciseFileTab.fileTreeButton.tooltip.open'
|
|
57
61
|
}),
|
|
58
62
|
placement: "bottom-start"
|
|
@@ -71,5 +75,9 @@ const ExerciseFileTabsFileTreeButton = React.forwardRef((_, ref) => {
|
|
|
71
75
|
});
|
|
72
76
|
return (exercise === null || exercise === void 0 ? void 0 : exercise.uiConfig.editorFileTreeDefaultStatus) === types.enums.ExerciseUiConfigEditorFileTreeDefaultStatus.Hide ? null : el;
|
|
73
77
|
});
|
|
78
|
+
//
|
|
79
|
+
//
|
|
80
|
+
//
|
|
81
|
+
var ExerciseFileTabsFileTreeButton$1 = new intl.IntlComponentBuilder(ExerciseFileTabsFileTreeButton).add('en', en.default).add('ko', ko.default).add('th', th.default).build();
|
|
74
82
|
|
|
75
|
-
exports.default = ExerciseFileTabsFileTreeButton;
|
|
83
|
+
exports.default = ExerciseFileTabsFileTreeButton$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ExerciseFileTabsFileTreeButton } from './ExerciseFileTabsFileTreeButton';
|
|
@@ -27,7 +27,7 @@ var th = require('./locales/th.json.js');
|
|
|
27
27
|
|
|
28
28
|
const AsyncFileTree = React.lazy(() => Promise.resolve().then(function () { return require('../../shared/file-tree/FileTree.js'); }));
|
|
29
29
|
const AsyncFileTreeList = React.lazy(() => Promise.resolve().then(function () { return require('../../shared/file-tree/FileTreeList.js'); }));
|
|
30
|
-
const AsyncFileTreeToolbar = React.lazy(() => Promise.resolve().then(function () { return require('../../shared/file-tree/FileTreeToolbar.js'); }));
|
|
30
|
+
const AsyncFileTreeToolbar = React.lazy(() => Promise.resolve().then(function () { return require('../../shared/file-tree/file-tree-toolbar/FileTreeToolbar.js'); }));
|
|
31
31
|
const StyledFileTreeDivider = styled.hr.withConfig({
|
|
32
32
|
componentId: "sc-107xvf5-0"
|
|
33
33
|
})(["margin:0;width:100%;height:1px;border:0;border-bottom:", ";"], stylesheets.MATERIAL_DIVIDER_BORDER_VALUE);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
import type { FileTreeTheme } from './context';
|
|
3
4
|
import type { OnDirectoryAdd, OnDirectoryDelete, OnDirectoryMove, OnFileAdd, OnFileDelete, OnFileMove, OnFilesUpload, OnHiddenSet, OnInitialOpenFileSet, OnReadOnlySet } from './interface';
|
|
4
5
|
/**
|
|
@@ -61,5 +62,5 @@ export interface FileTreeProps {
|
|
|
61
62
|
style?: React.CSSProperties;
|
|
62
63
|
locale?: string;
|
|
63
64
|
}
|
|
64
|
-
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<FileTreeProps
|
|
65
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<FileTreeProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
65
66
|
export default _default;
|
|
@@ -8,9 +8,9 @@ var designTokens = require('@elice/design-tokens');
|
|
|
8
8
|
var intl = require('@elice/intl');
|
|
9
9
|
var styled = require('styled-components');
|
|
10
10
|
var FileTreeContext = require('./context/FileTreeContext.js');
|
|
11
|
+
var FileTreeToolbar = require('./file-tree-toolbar/FileTreeToolbar.js');
|
|
11
12
|
var FileTreeConfig = require('./FileTreeConfig.js');
|
|
12
13
|
var FileTreeList = require('./FileTreeList.js');
|
|
13
|
-
var FileTreeToolbar = require('./FileTreeToolbar.js');
|
|
14
14
|
var en = require('./locales/en.json.js');
|
|
15
15
|
var ko = require('./locales/ko.json.js');
|
|
16
16
|
var th = require('./locales/th.json.js');
|
|
@@ -22,9 +22,11 @@ const StyledLoading = styled.div.withConfig({
|
|
|
22
22
|
componentId: "sc-6ext2i-1"
|
|
23
23
|
})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:", ";opacity:0.5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:100;"], designTokens.base.color.navy7);
|
|
24
24
|
const FileTree = props => {
|
|
25
|
-
return React.createElement(
|
|
25
|
+
return React.createElement(intl.RawEliceIntlProvider, {
|
|
26
|
+
value: props.__intl
|
|
27
|
+
}, React.createElement(FileTreeContext.FileTreeProvider, Object.assign({}, props), React.createElement(StyledFileTreeWrapper, {
|
|
26
28
|
style: props.style
|
|
27
|
-
}, props.loading ? React.createElement(StyledLoading, null, React.createElement(blocks.Spinner, null)) : null, props.children));
|
|
29
|
+
}, props.loading ? React.createElement(StyledLoading, null, React.createElement(blocks.Spinner, null)) : null, props.children)));
|
|
28
30
|
};
|
|
29
31
|
//
|
|
30
32
|
//
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FileTreeToolbarProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<FileTreeToolbarProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
6
|
+
export default _default;
|
package/cjs/components/shared/file-tree/{FileTreeToolbar.js → file-tree-toolbar/FileTreeToolbar.js}
RENAMED
|
@@ -5,11 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var icons = require('@elice/icons');
|
|
7
7
|
var intl = require('@elice/intl');
|
|
8
|
-
var ExerciseMenuButton = require('
|
|
9
|
-
var FileTreeContext = require('
|
|
10
|
-
var fileTreeFiles = require('
|
|
11
|
-
var fileTreeInput = require('
|
|
12
|
-
var
|
|
8
|
+
var ExerciseMenuButton = require('../../exercise-menu-button/ExerciseMenuButton.js');
|
|
9
|
+
var FileTreeContext = require('../context/FileTreeContext.js');
|
|
10
|
+
var fileTreeFiles = require('../utils/fileTreeFiles.js');
|
|
11
|
+
var fileTreeInput = require('../utils/fileTreeInput.js');
|
|
12
|
+
var en = require('./locales/en.json.js');
|
|
13
|
+
var ko = require('./locales/ko.json.js');
|
|
14
|
+
var th = require('./locales/th.json.js');
|
|
15
|
+
var FileTreeToolbar_styled = require('../FileTreeToolbar.styled.js');
|
|
13
16
|
|
|
14
17
|
const FileTreeToolbar = ({
|
|
15
18
|
className
|
|
@@ -111,5 +114,6 @@ const FileTreeToolbar = ({
|
|
|
111
114
|
className: className
|
|
112
115
|
}, renderFileAddButton(), renderFolderAddButton(), renderFileUploadButton());
|
|
113
116
|
};
|
|
117
|
+
var FileTreeToolbar$1 = new intl.IntlComponentBuilder(FileTreeToolbar).add('en', en.default).add('ko', ko.default).add('th', th.default).build();
|
|
114
118
|
|
|
115
|
-
exports.default = FileTreeToolbar;
|
|
119
|
+
exports.default = FileTreeToolbar$1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FileTreeToolbar } from './FileTreeToolbar';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as FileTree } from './FileTree';
|
|
2
2
|
export type { FileTreeProps } from './FileTree';
|
|
3
|
-
export type { FileTreeToolbarProps } from './FileTreeToolbar';
|
|
3
|
+
export type { FileTreeToolbarProps } from './file-tree-toolbar/FileTreeToolbar';
|
|
4
4
|
export type { FileTreeListProps } from './FileTreeList';
|
|
5
5
|
export type { FileTreeConfigProps } from './FileTreeConfig';
|
|
6
6
|
export type { OnDirectoryAdd, OnDirectoryAddParams } from './interface';
|
|
@@ -9,7 +9,7 @@ import { MATERIAL_RESIZABLE_COMMON_PROPS } from '../../constants/stylesheets.js'
|
|
|
9
9
|
import messageEn from '../locales/en.json.js';
|
|
10
10
|
import messageKo from '../locales/ko.json.js';
|
|
11
11
|
import messageTh from '../locales/th.json.js';
|
|
12
|
-
import ExerciseFileTabsFileTreeButton from './exercise-file-tabs/ExerciseFileTabsFileTreeButton.js';
|
|
12
|
+
import ExerciseFileTabsFileTreeButton from './exercise-file-tabs/exercise-file-tabs-file-tree-button/ExerciseFileTabsFileTreeButton.js';
|
|
13
13
|
import { exerciseContainerSizeState, exerciseState, exerciseFileTreeOpenedState, exercisePreviewTypeState, exercisePreviewDisplayModeState, exerciseMonacoEditorApisState } from './context/recoil.js';
|
|
14
14
|
import { ExerciseContext } from './context/context.js';
|
|
15
15
|
import { ExercisePreviewType, ExercisePreviewDisplayMode } from './context/recoilTypes.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default _default;
|
|
2
|
+
declare const ExerciseFileTabs: React.FC;
|
|
3
|
+
export default ExerciseFileTabs;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
3
2
|
import { useRecoilState } from 'recoil';
|
|
4
3
|
import styled from 'styled-components';
|
|
5
4
|
import '../../shared/exercise-shimmer/ExerciseFileShimmer.js';
|
|
@@ -12,9 +11,6 @@ import { ExerciseContext } from '../context/context.js';
|
|
|
12
11
|
import '../context/recoilTypes.js';
|
|
13
12
|
import '../context/subjects.js';
|
|
14
13
|
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';
|
|
18
14
|
|
|
19
15
|
//
|
|
20
16
|
//
|
|
@@ -26,9 +22,7 @@ const StyledFileTabsWrapper = styled.div.withConfig({
|
|
|
26
22
|
//
|
|
27
23
|
//
|
|
28
24
|
//
|
|
29
|
-
const ExerciseFileTabs = ({
|
|
30
|
-
__intl
|
|
31
|
-
}) => {
|
|
25
|
+
const ExerciseFileTabs = () => {
|
|
32
26
|
const {
|
|
33
27
|
exerciseRoomId,
|
|
34
28
|
materialExerciseId
|
|
@@ -60,9 +54,7 @@ const ExerciseFileTabs = ({
|
|
|
60
54
|
}
|
|
61
55
|
setActiveFilename(path);
|
|
62
56
|
};
|
|
63
|
-
return React.createElement(
|
|
64
|
-
value: __intl
|
|
65
|
-
}, React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
57
|
+
return React.createElement(StyledFileTabsWrapper, null, React.createElement(React.Suspense, {
|
|
66
58
|
fallback: React.createElement(ExerciseFileTabsShimmer, null)
|
|
67
59
|
}, React.createElement(AsyncFileTabs, {
|
|
68
60
|
openedTabs: openedTabs,
|
|
@@ -70,8 +62,7 @@ const ExerciseFileTabs = ({
|
|
|
70
62
|
onCloseTab: handleCloseTab,
|
|
71
63
|
onSelectTab: handleActivePathChange,
|
|
72
64
|
onTabOrderChange: handleTabOrderChange
|
|
73
|
-
})))
|
|
65
|
+
})));
|
|
74
66
|
};
|
|
75
|
-
var ExerciseFileTabs$1 = new IntlComponentBuilder(ExerciseFileTabs).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
76
67
|
|
|
77
|
-
export { ExerciseFileTabs
|
|
68
|
+
export { ExerciseFileTabs as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<import("@elice/intl").IntlComponentExtraProps & Omit<Omit<WithIntlComponentBuilderProps, "ref"> & React.RefAttributes<HTMLButtonElement>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl">, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export default _default;
|
|
@@ -3,23 +3,27 @@ import { useHover } from 'react-use';
|
|
|
3
3
|
import { IconButton, Tooltip } from '@elice/blocks';
|
|
4
4
|
import { base } from '@elice/design-tokens';
|
|
5
5
|
import { eilArrowRightwardsDouble, eilFolder } from '@elice/icons';
|
|
6
|
-
import {
|
|
6
|
+
import { IntlComponentBuilder } from '@elice/intl';
|
|
7
7
|
import { enums } from '@elice/types';
|
|
8
8
|
import { eliceApiUiConfigNormalizeHelper } from '@elice/utils';
|
|
9
9
|
import { useRecoilValue, useRecoilState } from 'recoil';
|
|
10
10
|
import styled from 'styled-components';
|
|
11
|
-
import { exerciseState, exerciseFileTreeOpenedState } from '
|
|
12
|
-
import { ExerciseContext } from '
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
11
|
+
import { exerciseState, exerciseFileTreeOpenedState } from '../../context/recoil.js';
|
|
12
|
+
import { ExerciseContext } from '../../context/context.js';
|
|
13
|
+
import '../../context/recoilTypes.js';
|
|
14
|
+
import '../../context/subjects.js';
|
|
15
|
+
import '../../context/ExerciseProvider.js';
|
|
16
|
+
import messageEn from './locales/en.json.js';
|
|
17
|
+
import messageKo from './locales/ko.json.js';
|
|
18
|
+
import messageTh from './locales/th.json.js';
|
|
16
19
|
|
|
17
20
|
const ICON_BUTTON_SIZE = '2.25rem';
|
|
18
21
|
const StyledFileTreeButton = styled(IconButton).withConfig({
|
|
19
|
-
componentId: "sc-
|
|
22
|
+
componentId: "sc-1ulolpl-0"
|
|
20
23
|
})(["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);
|
|
21
|
-
const ExerciseFileTabsFileTreeButton = forwardRef((
|
|
22
|
-
|
|
24
|
+
const ExerciseFileTabsFileTreeButton = forwardRef(({
|
|
25
|
+
__intl
|
|
26
|
+
}, ref) => {
|
|
23
27
|
const {
|
|
24
28
|
materialExerciseId
|
|
25
29
|
} = React.useContext(ExerciseContext);
|
|
@@ -46,9 +50,9 @@ const ExerciseFileTabsFileTreeButton = forwardRef((_, ref) => {
|
|
|
46
50
|
//
|
|
47
51
|
const [el] = useHover(isHovering => {
|
|
48
52
|
return React.createElement("div", null, React.createElement(Tooltip, {
|
|
49
|
-
title: exerciseFileTreeOpened ?
|
|
53
|
+
title: exerciseFileTreeOpened ? __intl.formatMessage({
|
|
50
54
|
id: 'exerciseFileTab.fileTreeButton.tooltip.close'
|
|
51
|
-
}) :
|
|
55
|
+
}) : __intl.formatMessage({
|
|
52
56
|
id: 'exerciseFileTab.fileTreeButton.tooltip.open'
|
|
53
57
|
}),
|
|
54
58
|
placement: "bottom-start"
|
|
@@ -67,5 +71,9 @@ const ExerciseFileTabsFileTreeButton = forwardRef((_, ref) => {
|
|
|
67
71
|
});
|
|
68
72
|
return (exercise === null || exercise === void 0 ? void 0 : exercise.uiConfig.editorFileTreeDefaultStatus) === enums.ExerciseUiConfigEditorFileTreeDefaultStatus.Hide ? null : el;
|
|
69
73
|
});
|
|
74
|
+
//
|
|
75
|
+
//
|
|
76
|
+
//
|
|
77
|
+
var ExerciseFileTabsFileTreeButton$1 = new IntlComponentBuilder(ExerciseFileTabsFileTreeButton).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
70
78
|
|
|
71
|
-
export { ExerciseFileTabsFileTreeButton as default };
|
|
79
|
+
export { ExerciseFileTabsFileTreeButton$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ExerciseFileTabsFileTreeButton } from './ExerciseFileTabsFileTreeButton';
|
|
@@ -23,7 +23,7 @@ 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'));
|
|
26
|
-
const AsyncFileTreeToolbar = React.lazy(() => import('../../shared/file-tree/FileTreeToolbar.js'));
|
|
26
|
+
const AsyncFileTreeToolbar = React.lazy(() => import('../../shared/file-tree/file-tree-toolbar/FileTreeToolbar.js'));
|
|
27
27
|
const StyledFileTreeDivider = styled.hr.withConfig({
|
|
28
28
|
componentId: "sc-107xvf5-0"
|
|
29
29
|
})(["margin:0;width:100%;height:1px;border:0;border-bottom:", ";"], MATERIAL_DIVIDER_BORDER_VALUE);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
import type { FileTreeTheme } from './context';
|
|
3
4
|
import type { OnDirectoryAdd, OnDirectoryDelete, OnDirectoryMove, OnFileAdd, OnFileDelete, OnFileMove, OnFilesUpload, OnHiddenSet, OnInitialOpenFileSet, OnReadOnlySet } from './interface';
|
|
4
5
|
/**
|
|
@@ -61,5 +62,5 @@ export interface FileTreeProps {
|
|
|
61
62
|
style?: React.CSSProperties;
|
|
62
63
|
locale?: string;
|
|
63
64
|
}
|
|
64
|
-
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<FileTreeProps
|
|
65
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<FileTreeProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
65
66
|
export default _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Spinner } from '@elice/blocks';
|
|
3
3
|
import { base } from '@elice/design-tokens';
|
|
4
|
-
import { IntlComponentBuilder } from '@elice/intl';
|
|
4
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import { FileTreeProvider } from './context/FileTreeContext.js';
|
|
7
|
+
import FileTreeToolbar from './file-tree-toolbar/FileTreeToolbar.js';
|
|
7
8
|
import FileTreeConfig from './FileTreeConfig.js';
|
|
8
9
|
import FileTreeList from './FileTreeList.js';
|
|
9
|
-
import FileTreeToolbar from './FileTreeToolbar.js';
|
|
10
10
|
import messageEn from './locales/en.json.js';
|
|
11
11
|
import messageKo from './locales/ko.json.js';
|
|
12
12
|
import messageTh from './locales/th.json.js';
|
|
@@ -18,9 +18,11 @@ const StyledLoading = styled.div.withConfig({
|
|
|
18
18
|
componentId: "sc-6ext2i-1"
|
|
19
19
|
})(["position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background-color:", ";opacity:0.5;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:100;"], base.color.navy7);
|
|
20
20
|
const FileTree = props => {
|
|
21
|
-
return React.createElement(
|
|
21
|
+
return React.createElement(RawEliceIntlProvider, {
|
|
22
|
+
value: props.__intl
|
|
23
|
+
}, React.createElement(FileTreeProvider, Object.assign({}, props), React.createElement(StyledFileTreeWrapper, {
|
|
22
24
|
style: props.style
|
|
23
|
-
}, props.loading ? React.createElement(StyledLoading, null, React.createElement(Spinner, null)) : null, props.children));
|
|
25
|
+
}, props.loading ? React.createElement(StyledLoading, null, React.createElement(Spinner, null)) : null, props.children)));
|
|
24
26
|
};
|
|
25
27
|
//
|
|
26
28
|
//
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FileTreeToolbarProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<FileTreeToolbarProps, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
6
|
+
export default _default;
|
package/es/components/shared/file-tree/{FileTreeToolbar.js → file-tree-toolbar/FileTreeToolbar.js}
RENAMED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { eilFileAdd, eilFolderAdd, eilUpload } from '@elice/icons';
|
|
3
|
-
import { useRawEliceIntl } from '@elice/intl';
|
|
4
|
-
import ExerciseMenuButton from '
|
|
5
|
-
import { useFileTreeState, useFileTreeDispatch } from '
|
|
6
|
-
import { validateFilesSize } from '
|
|
7
|
-
import { getTargetDirectoryPath } from '
|
|
8
|
-
import
|
|
3
|
+
import { IntlComponentBuilder, useRawEliceIntl } from '@elice/intl';
|
|
4
|
+
import ExerciseMenuButton from '../../exercise-menu-button/ExerciseMenuButton.js';
|
|
5
|
+
import { useFileTreeState, useFileTreeDispatch } from '../context/FileTreeContext.js';
|
|
6
|
+
import { validateFilesSize } from '../utils/fileTreeFiles.js';
|
|
7
|
+
import { getTargetDirectoryPath } from '../utils/fileTreeInput.js';
|
|
8
|
+
import messageEn from './locales/en.json.js';
|
|
9
|
+
import messageKo from './locales/ko.json.js';
|
|
10
|
+
import messageTh from './locales/th.json.js';
|
|
11
|
+
import { StyledFileTreeToolbar } from '../FileTreeToolbar.styled.js';
|
|
9
12
|
|
|
10
13
|
const FileTreeToolbar = ({
|
|
11
14
|
className
|
|
@@ -107,5 +110,6 @@ const FileTreeToolbar = ({
|
|
|
107
110
|
className: className
|
|
108
111
|
}, renderFileAddButton(), renderFolderAddButton(), renderFileUploadButton());
|
|
109
112
|
};
|
|
113
|
+
var FileTreeToolbar$1 = new IntlComponentBuilder(FileTreeToolbar).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
110
114
|
|
|
111
|
-
export { FileTreeToolbar as default };
|
|
115
|
+
export { FileTreeToolbar$1 as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FileTreeToolbar } from './FileTreeToolbar';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { default as FileTree } from './FileTree';
|
|
2
2
|
export type { FileTreeProps } from './FileTree';
|
|
3
|
-
export type { FileTreeToolbarProps } from './FileTreeToolbar';
|
|
3
|
+
export type { FileTreeToolbarProps } from './file-tree-toolbar/FileTreeToolbar';
|
|
4
4
|
export type { FileTreeListProps } from './FileTreeList';
|
|
5
5
|
export type { FileTreeConfigProps } from './FileTreeConfig';
|
|
6
6
|
export type { OnDirectoryAdd, OnDirectoryAddParams } from './interface';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-exercise",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240521.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",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@elice/icons": "^1.230814.0",
|
|
86
86
|
"@elice/intl": "0.240425.0-rc.1",
|
|
87
87
|
"@elice/markdown": "^1.220815.0",
|
|
88
|
-
"@elice/material-shared-types": "1.
|
|
89
|
-
"@elice/material-shared-utils": "1.
|
|
88
|
+
"@elice/material-shared-types": "1.240521.0",
|
|
89
|
+
"@elice/material-shared-utils": "1.240521.0",
|
|
90
90
|
"@elice/mui-elements": "^5.230825.0",
|
|
91
91
|
"@elice/mui-system": "^5.230825.0",
|
|
92
92
|
"@elice/types": "^1.240208.0",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"recoil": "^0.6.1",
|
|
117
117
|
"styled-components": "^5.2.0"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "7db81d8d591875a8649e417a7bd18d9cae06d770"
|
|
120
120
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|