@elice/material-external 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/material-external/MaterialExternal.d.ts +3 -2
- package/cjs/components/material-external/MaterialExternal.js +9 -10
- package/cjs/components/material-external/MaterialExternalAdminContent.js +4 -3
- package/cjs/components/material-external/MaterialExternalContent.js +4 -3
- package/cjs/components/material-external/MaterialExternalNewWindow.js +10 -9
- package/cjs/components/material-external/MaterialExternalRedirect.js +4 -3
- package/cjs/components/material-external/locales/en.json.js +7 -0
- package/cjs/components/material-external/locales/index.d.ts +3 -0
- package/cjs/components/material-external/locales/ko.json.js +7 -0
- package/cjs/components/material-external/locales/th.json.js +7 -0
- package/es/components/material-external/MaterialExternal.d.ts +3 -2
- package/es/components/material-external/MaterialExternal.js +9 -11
- package/es/components/material-external/MaterialExternalAdminContent.js +4 -3
- package/es/components/material-external/MaterialExternalContent.js +4 -3
- package/es/components/material-external/MaterialExternalNewWindow.js +10 -9
- package/es/components/material-external/MaterialExternalRedirect.js +4 -3
- package/es/components/material-external/locales/en.json.js +3 -0
- package/es/components/material-external/locales/index.d.ts +3 -0
- package/es/components/material-external/locales/ko.json.js +3 -0
- package/es/components/material-external/locales/th.json.js +3 -0
- package/package.json +6 -6
- package/cjs/components/material-external/locales.d.ts +0 -9
- package/cjs/components/material-external/locales.js +0 -21
- package/es/components/material-external/locales.d.ts +0 -9
- package/es/components/material-external/locales.js +0 -18
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
export interface MaterialExternalProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
materialExternalId: number;
|
|
@@ -8,5 +9,5 @@ export interface MaterialExternalProps {
|
|
|
8
9
|
userId?: number;
|
|
9
10
|
locale?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialExternalProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
13
|
+
export default _default;
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var intl = require('@elice/intl');
|
|
7
7
|
var classnames = require('classnames');
|
|
8
|
-
var
|
|
8
|
+
var en = require('./locales/en.json.js');
|
|
9
|
+
var ko = require('./locales/ko.json.js');
|
|
10
|
+
var th = require('./locales/th.json.js');
|
|
9
11
|
var MaterialExternalAdminContent = require('./MaterialExternalAdminContent.js');
|
|
10
12
|
var MaterialExternalContent = require('./MaterialExternalContent.js');
|
|
11
13
|
var MaterialExternal_styled = require('./MaterialExternal.styled.js');
|
|
@@ -14,16 +16,12 @@ const MaterialExternal = ({
|
|
|
14
16
|
materialExternalId,
|
|
15
17
|
userId,
|
|
16
18
|
className,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
courseId,
|
|
20
|
+
__intl
|
|
19
21
|
}) => {
|
|
20
22
|
const prefixCls = 'em-material-external';
|
|
21
|
-
return React.createElement(MaterialExternal_styled.StyledExternalWrap, {
|
|
23
|
+
return React.createElement(intl.RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(MaterialExternal_styled.StyledExternalWrap, {
|
|
22
24
|
className: classnames(prefixCls, className)
|
|
23
|
-
}, React.createElement(reactIntl.IntlProvider, {
|
|
24
|
-
locale: locale,
|
|
25
|
-
defaultLocale: "en",
|
|
26
|
-
messages: locale in locales ? locales[locale] : locales.en
|
|
27
25
|
}, userId ? React.createElement(MaterialExternalAdminContent.default, {
|
|
28
26
|
materialExternalId: materialExternalId,
|
|
29
27
|
userId: userId
|
|
@@ -32,5 +30,6 @@ const MaterialExternal = ({
|
|
|
32
30
|
courseId: courseId
|
|
33
31
|
})));
|
|
34
32
|
};
|
|
33
|
+
var MaterialExternal$1 = new intl.IntlComponentBuilder(MaterialExternal).add('en', en.default).add('ko', ko.default).add('th', th.default).build();
|
|
35
34
|
|
|
36
|
-
exports.default = MaterialExternal;
|
|
35
|
+
exports.default = MaterialExternal$1;
|
|
@@ -3,15 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var apiClient = require('@elice/api-client');
|
|
8
7
|
var blocks = require('@elice/blocks');
|
|
8
|
+
var intl = require('@elice/intl');
|
|
9
9
|
var MaterialExternalIframe = require('./MaterialExternalIframe.js');
|
|
10
10
|
|
|
11
11
|
const MaterialExternalContent = ({
|
|
12
12
|
materialExternalId,
|
|
13
13
|
userId
|
|
14
14
|
}) => {
|
|
15
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
15
16
|
const [externalUrl, setExternalUrl] = React.useState('');
|
|
16
17
|
const [externalGetStatus, setExternalGetStatus] = React.useState('idle');
|
|
17
18
|
React.useEffect(() => {
|
|
@@ -32,8 +33,8 @@ const MaterialExternalContent = ({
|
|
|
32
33
|
if (externalGetStatus === 'rejected' || !externalUrl) {
|
|
33
34
|
return React.createElement(blocks.Text, {
|
|
34
35
|
role: "white"
|
|
35
|
-
},
|
|
36
|
-
id:
|
|
36
|
+
}, intl$1.formatMessage({
|
|
37
|
+
id: 'external.status.rejected'
|
|
37
38
|
}));
|
|
38
39
|
}
|
|
39
40
|
return React.createElement(MaterialExternalIframe.default, {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var apiClient = require('@elice/api-client');
|
|
8
7
|
var blocks = require('@elice/blocks');
|
|
8
|
+
var intl = require('@elice/intl');
|
|
9
9
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
10
10
|
var types = require('@elice/types');
|
|
11
11
|
var MaterialExternalIframe = require('./MaterialExternalIframe.js');
|
|
@@ -16,6 +16,7 @@ const MaterialExternalContent = ({
|
|
|
16
16
|
materialExternalId,
|
|
17
17
|
courseId
|
|
18
18
|
}) => {
|
|
19
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
19
20
|
const {
|
|
20
21
|
materialExternal,
|
|
21
22
|
status: externalGetStatus
|
|
@@ -30,8 +31,8 @@ const MaterialExternalContent = ({
|
|
|
30
31
|
if (externalGetStatus === 'rejected' || !materialExternal) {
|
|
31
32
|
return React.createElement(blocks.Text, {
|
|
32
33
|
role: "white"
|
|
33
|
-
},
|
|
34
|
-
id:
|
|
34
|
+
}, intl$1.formatMessage({
|
|
35
|
+
id: 'external.status.rejected'
|
|
35
36
|
}));
|
|
36
37
|
}
|
|
37
38
|
const renderByDisplayType = displayType => {
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var blocks = require('@elice/blocks');
|
|
8
7
|
var designTokens = require('@elice/design-tokens');
|
|
8
|
+
var intl = require('@elice/intl');
|
|
9
9
|
var calendar = require('../../assets/calendar.png.js');
|
|
10
10
|
|
|
11
11
|
const MaterialExternalNewWindow = ({
|
|
12
12
|
materialExternal
|
|
13
13
|
}) => {
|
|
14
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
14
15
|
const [isOpenedNewTab, setIsOpenedNewTab] = React.useState(false);
|
|
15
16
|
//
|
|
16
17
|
//
|
|
@@ -38,15 +39,15 @@ const MaterialExternalNewWindow = ({
|
|
|
38
39
|
role: "white",
|
|
39
40
|
size: "large",
|
|
40
41
|
bold: true
|
|
41
|
-
},
|
|
42
|
-
id:
|
|
42
|
+
}, intl$1.formatMessage({
|
|
43
|
+
id: 'external.newWindow.title'
|
|
43
44
|
})), React.createElement(blocks.Vspace, {
|
|
44
45
|
height: 0.75
|
|
45
46
|
}), React.createElement(blocks.Text, {
|
|
46
47
|
role: "white",
|
|
47
48
|
size: "small"
|
|
48
|
-
},
|
|
49
|
-
id:
|
|
49
|
+
}, intl$1.formatMessage({
|
|
50
|
+
id: 'external.newWindow.description'
|
|
50
51
|
})), React.createElement(blocks.Vspace, {
|
|
51
52
|
height: 2
|
|
52
53
|
}), React.createElement(blocks.Button, {
|
|
@@ -57,16 +58,16 @@ const MaterialExternalNewWindow = ({
|
|
|
57
58
|
customStyles: {
|
|
58
59
|
color: designTokens.base.color.navy0
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
-
id:
|
|
61
|
+
}, intl$1.formatMessage({
|
|
62
|
+
id: 'external.newWindow.button.label'
|
|
62
63
|
}))));
|
|
63
64
|
/**
|
|
64
65
|
* Open new tab external page after 5 seconds.
|
|
65
66
|
*/
|
|
66
67
|
const waitExternalPage = React.createElement(React.Fragment, null, React.createElement(blocks.Spinner, null), React.createElement(blocks.Text, {
|
|
67
68
|
role: "white"
|
|
68
|
-
},
|
|
69
|
-
id:
|
|
69
|
+
}, intl$1.formatMessage({
|
|
70
|
+
id: 'external.loader.newWindow.description'
|
|
70
71
|
})));
|
|
71
72
|
return React.createElement(React.Fragment, null, isOpenedNewTab ? newTabReOpenContentPage : waitExternalPage);
|
|
72
73
|
};
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var reactIntl = require('react-intl');
|
|
7
6
|
var blocks = require('@elice/blocks');
|
|
7
|
+
var intl = require('@elice/intl');
|
|
8
8
|
|
|
9
9
|
const MaterialExternalRedirect = ({
|
|
10
10
|
materialExternal
|
|
11
11
|
}) => {
|
|
12
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
12
13
|
//
|
|
13
14
|
// When displayType is `Redirect`, redirect page after 5 sec.
|
|
14
15
|
//
|
|
@@ -22,8 +23,8 @@ const MaterialExternalRedirect = ({
|
|
|
22
23
|
}, [materialExternal]);
|
|
23
24
|
return React.createElement(React.Fragment, null, React.createElement(blocks.Spinner, null), React.createElement(blocks.Text, {
|
|
24
25
|
role: "white"
|
|
25
|
-
},
|
|
26
|
-
id:
|
|
26
|
+
}, intl$1.formatMessage({
|
|
27
|
+
id: 'external.loader.redirect.description'
|
|
27
28
|
})));
|
|
28
29
|
};
|
|
29
30
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var messageEn = {"external.status.rejected":"It's a {_termLibraryCourse} that doesn't exist.","external.loader.redirect.description":"Redirecting to lecture {_termLibraryLecturePage} in 5 seconds.","external.loader.newWindow.description":"A new tab will open after 5 seconds.","external.newWindow.title":"{_termLibraryLecturePage} has opened in a new tab.","external.newWindow.description":"If pop-ups are blocked, Please click the button below to reopen it.","external.newWindow.button.label":"Open {_termLibraryLecturePage}"};
|
|
6
|
+
|
|
7
|
+
exports.default = messageEn;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var messageKo = {"external.status.rejected":"존재하지 않는 {_termLibraryCourse}입니다.","external.loader.redirect.description":"5초 뒤에 학습{_termLibraryLecturePage}로 이동합니다.","external.loader.newWindow.description":"5초 뒤에 새 탭이 열립니다.","external.newWindow.title":"새 탭에서 학습 {_termLibraryLecturePage}가 열렸습니다.","external.newWindow.description":"팝업이 차단되어 있으면 열리지 않을 수 있습니다. 아래 버튼을 클릭해 다시 열어주세요.","external.newWindow.button.label":"학습 {_termLibraryLecturePage} 열기"};
|
|
6
|
+
|
|
7
|
+
exports.default = messageKo;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var messageTh = {"external.status.rejected":"ไม่มีราย{_termLibraryCourse}นี้ในระบบ ","external.loader.redirect.description":"5 วินาทีหลังจากนี้จะเปลี่ยนไปยังข้อมูลการเรียนรู้ค่ะ.","external.loader.newWindow.description":"5 วินาทีหลังจากนี้จะเปิดแท็บใหม่","external.newWindow.title":"เอกสารการเรียนรู้ถูกเปิดในแท็บใหม่แล้วค่ะ.","external.newWindow.description":"หากมีการบล็อกป๊อปอัพ อาจจะไม่สามารถเปิดได้ กรุณาคลิกที่ปุ่มด้านล่างเพื่อเปิดอีกครั้งค่ะ.","external.newWindow.button.label":"เปิดข้อมูลการเรียนรู้"};
|
|
6
|
+
|
|
7
|
+
exports.default = messageTh;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
2
3
|
export interface MaterialExternalProps {
|
|
3
4
|
className?: string;
|
|
4
5
|
materialExternalId: number;
|
|
@@ -8,5 +9,5 @@ export interface MaterialExternalProps {
|
|
|
8
9
|
userId?: number;
|
|
9
10
|
locale?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export default
|
|
12
|
+
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialExternalProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import messageEn from './locales/en.json.js';
|
|
5
|
+
import messageKo from './locales/ko.json.js';
|
|
6
|
+
import messageTh from './locales/th.json.js';
|
|
6
7
|
import MaterialExternalContent from './MaterialExternalAdminContent.js';
|
|
7
8
|
import MaterialExternalContent$1 from './MaterialExternalContent.js';
|
|
8
9
|
import { StyledExternalWrap } from './MaterialExternal.styled.js';
|
|
@@ -11,16 +12,12 @@ const MaterialExternal = ({
|
|
|
11
12
|
materialExternalId,
|
|
12
13
|
userId,
|
|
13
14
|
className,
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
courseId,
|
|
16
|
+
__intl
|
|
16
17
|
}) => {
|
|
17
18
|
const prefixCls = 'em-material-external';
|
|
18
|
-
return React.createElement(StyledExternalWrap, {
|
|
19
|
+
return React.createElement(RawEliceIntlProvider, Object.assign({}, __intl), React.createElement(StyledExternalWrap, {
|
|
19
20
|
className: classnames(prefixCls, className)
|
|
20
|
-
}, React.createElement(IntlProvider, {
|
|
21
|
-
locale: locale,
|
|
22
|
-
defaultLocale: "en",
|
|
23
|
-
messages: locale in locales ? locales[locale] : en
|
|
24
21
|
}, userId ? React.createElement(MaterialExternalContent, {
|
|
25
22
|
materialExternalId: materialExternalId,
|
|
26
23
|
userId: userId
|
|
@@ -29,5 +26,6 @@ const MaterialExternal = ({
|
|
|
29
26
|
courseId: courseId
|
|
30
27
|
})));
|
|
31
28
|
};
|
|
29
|
+
var MaterialExternal$1 = new IntlComponentBuilder(MaterialExternal).add('en', messageEn).add('ko', messageKo).add('th', messageTh).build();
|
|
32
30
|
|
|
33
|
-
export { MaterialExternal as default };
|
|
31
|
+
export { MaterialExternal$1 as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
2
|
import { getOrgMaterialExternalTutorExternalUrlGet } from '@elice/api-client';
|
|
4
3
|
import { Spinner, Text } from '@elice/blocks';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import MaterialExternalIframe from './MaterialExternalIframe.js';
|
|
6
6
|
|
|
7
7
|
const MaterialExternalContent = ({
|
|
8
8
|
materialExternalId,
|
|
9
9
|
userId
|
|
10
10
|
}) => {
|
|
11
|
+
const intl = useRawEliceIntl();
|
|
11
12
|
const [externalUrl, setExternalUrl] = React.useState('');
|
|
12
13
|
const [externalGetStatus, setExternalGetStatus] = React.useState('idle');
|
|
13
14
|
React.useEffect(() => {
|
|
@@ -28,8 +29,8 @@ const MaterialExternalContent = ({
|
|
|
28
29
|
if (externalGetStatus === 'rejected' || !externalUrl) {
|
|
29
30
|
return React.createElement(Text, {
|
|
30
31
|
role: "white"
|
|
31
|
-
},
|
|
32
|
-
id:
|
|
32
|
+
}, intl.formatMessage({
|
|
33
|
+
id: 'external.status.rejected'
|
|
33
34
|
}));
|
|
34
35
|
}
|
|
35
36
|
return React.createElement(MaterialExternalIframe, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
2
|
import { getOrgMaterialExternalGet, config } from '@elice/api-client';
|
|
4
3
|
import { Spinner, Text } from '@elice/blocks';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { useMaterialFetch } from '@elice/material-shared-utils';
|
|
6
6
|
import { enums } from '@elice/types';
|
|
7
7
|
import MaterialExternalIframe from './MaterialExternalIframe.js';
|
|
@@ -12,6 +12,7 @@ const MaterialExternalContent = ({
|
|
|
12
12
|
materialExternalId,
|
|
13
13
|
courseId
|
|
14
14
|
}) => {
|
|
15
|
+
const intl = useRawEliceIntl();
|
|
15
16
|
const {
|
|
16
17
|
materialExternal,
|
|
17
18
|
status: externalGetStatus
|
|
@@ -26,8 +27,8 @@ const MaterialExternalContent = ({
|
|
|
26
27
|
if (externalGetStatus === 'rejected' || !materialExternal) {
|
|
27
28
|
return React.createElement(Text, {
|
|
28
29
|
role: "white"
|
|
29
|
-
},
|
|
30
|
-
id:
|
|
30
|
+
}, intl.formatMessage({
|
|
31
|
+
id: 'external.status.rejected'
|
|
31
32
|
}));
|
|
32
33
|
}
|
|
33
34
|
const renderByDisplayType = displayType => {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
2
|
import { SafeImage, Vspace, Text, Button, Spinner } from '@elice/blocks';
|
|
4
3
|
import { base } from '@elice/design-tokens';
|
|
4
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import calendarImage from '../../assets/calendar.png.js';
|
|
6
6
|
|
|
7
7
|
const MaterialExternalNewWindow = ({
|
|
8
8
|
materialExternal
|
|
9
9
|
}) => {
|
|
10
|
+
const intl = useRawEliceIntl();
|
|
10
11
|
const [isOpenedNewTab, setIsOpenedNewTab] = useState(false);
|
|
11
12
|
//
|
|
12
13
|
//
|
|
@@ -34,15 +35,15 @@ const MaterialExternalNewWindow = ({
|
|
|
34
35
|
role: "white",
|
|
35
36
|
size: "large",
|
|
36
37
|
bold: true
|
|
37
|
-
},
|
|
38
|
-
id:
|
|
38
|
+
}, intl.formatMessage({
|
|
39
|
+
id: 'external.newWindow.title'
|
|
39
40
|
})), React.createElement(Vspace, {
|
|
40
41
|
height: 0.75
|
|
41
42
|
}), React.createElement(Text, {
|
|
42
43
|
role: "white",
|
|
43
44
|
size: "small"
|
|
44
|
-
},
|
|
45
|
-
id:
|
|
45
|
+
}, intl.formatMessage({
|
|
46
|
+
id: 'external.newWindow.description'
|
|
46
47
|
})), React.createElement(Vspace, {
|
|
47
48
|
height: 2
|
|
48
49
|
}), React.createElement(Button, {
|
|
@@ -53,16 +54,16 @@ const MaterialExternalNewWindow = ({
|
|
|
53
54
|
customStyles: {
|
|
54
55
|
color: base.color.navy0
|
|
55
56
|
}
|
|
56
|
-
},
|
|
57
|
-
id:
|
|
57
|
+
}, intl.formatMessage({
|
|
58
|
+
id: 'external.newWindow.button.label'
|
|
58
59
|
}))));
|
|
59
60
|
/**
|
|
60
61
|
* Open new tab external page after 5 seconds.
|
|
61
62
|
*/
|
|
62
63
|
const waitExternalPage = React.createElement(React.Fragment, null, React.createElement(Spinner, null), React.createElement(Text, {
|
|
63
64
|
role: "white"
|
|
64
|
-
},
|
|
65
|
-
id:
|
|
65
|
+
}, intl.formatMessage({
|
|
66
|
+
id: 'external.loader.newWindow.description'
|
|
66
67
|
})));
|
|
67
68
|
return React.createElement(React.Fragment, null, isOpenedNewTab ? newTabReOpenContentPage : waitExternalPage);
|
|
68
69
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FormattedMessage } from 'react-intl';
|
|
3
2
|
import { Spinner, Text } from '@elice/blocks';
|
|
3
|
+
import { useRawEliceIntl } from '@elice/intl';
|
|
4
4
|
|
|
5
5
|
const MaterialExternalRedirect = ({
|
|
6
6
|
materialExternal
|
|
7
7
|
}) => {
|
|
8
|
+
const intl = useRawEliceIntl();
|
|
8
9
|
//
|
|
9
10
|
// When displayType is `Redirect`, redirect page after 5 sec.
|
|
10
11
|
//
|
|
@@ -18,8 +19,8 @@ const MaterialExternalRedirect = ({
|
|
|
18
19
|
}, [materialExternal]);
|
|
19
20
|
return React.createElement(React.Fragment, null, React.createElement(Spinner, null), React.createElement(Text, {
|
|
20
21
|
role: "white"
|
|
21
|
-
},
|
|
22
|
-
id:
|
|
22
|
+
}, intl.formatMessage({
|
|
23
|
+
id: 'external.loader.redirect.description'
|
|
23
24
|
})));
|
|
24
25
|
};
|
|
25
26
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var messageEn = {"external.status.rejected":"It's a {_termLibraryCourse} that doesn't exist.","external.loader.redirect.description":"Redirecting to lecture {_termLibraryLecturePage} in 5 seconds.","external.loader.newWindow.description":"A new tab will open after 5 seconds.","external.newWindow.title":"{_termLibraryLecturePage} has opened in a new tab.","external.newWindow.description":"If pop-ups are blocked, Please click the button below to reopen it.","external.newWindow.button.label":"Open {_termLibraryLecturePage}"};
|
|
2
|
+
|
|
3
|
+
export { messageEn as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var messageKo = {"external.status.rejected":"존재하지 않는 {_termLibraryCourse}입니다.","external.loader.redirect.description":"5초 뒤에 학습{_termLibraryLecturePage}로 이동합니다.","external.loader.newWindow.description":"5초 뒤에 새 탭이 열립니다.","external.newWindow.title":"새 탭에서 학습 {_termLibraryLecturePage}가 열렸습니다.","external.newWindow.description":"팝업이 차단되어 있으면 열리지 않을 수 있습니다. 아래 버튼을 클릭해 다시 열어주세요.","external.newWindow.button.label":"학습 {_termLibraryLecturePage} 열기"};
|
|
2
|
+
|
|
3
|
+
export { messageKo as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var messageTh = {"external.status.rejected":"ไม่มีราย{_termLibraryCourse}นี้ในระบบ ","external.loader.redirect.description":"5 วินาทีหลังจากนี้จะเปลี่ยนไปยังข้อมูลการเรียนรู้ค่ะ.","external.loader.newWindow.description":"5 วินาทีหลังจากนี้จะเปิดแท็บใหม่","external.newWindow.title":"เอกสารการเรียนรู้ถูกเปิดในแท็บใหม่แล้วค่ะ.","external.newWindow.description":"หากมีการบล็อกป๊อปอัพ อาจจะไม่สามารถเปิดได้ กรุณาคลิกที่ปุ่มด้านล่างเพื่อเปิดอีกครั้งค่ะ.","external.newWindow.button.label":"เปิดข้อมูลการเรียนรู้"};
|
|
2
|
+
|
|
3
|
+
export { messageTh as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-external",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240508.0-globalization.1",
|
|
4
4
|
"description": "User view and editing components of Elice material external",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"@elice/blocks": "^1",
|
|
30
30
|
"@elice/design-tokens": "^1",
|
|
31
31
|
"@elice/icons": "^1",
|
|
32
|
+
"@elice/intl": "*",
|
|
32
33
|
"@elice/markdown": "^1",
|
|
33
34
|
"@elice/material-shared-types": "*",
|
|
34
35
|
"@elice/material-shared-utils": "*",
|
|
35
36
|
"@elice/types": "^1",
|
|
36
37
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
37
|
-
"react-intl": "^5.0.0",
|
|
38
38
|
"react-use": "^17.0.0",
|
|
39
39
|
"styled-components": "^5.2.0"
|
|
40
40
|
},
|
|
@@ -48,17 +48,17 @@
|
|
|
48
48
|
"@elice/design-tokens": "^1.220803.0",
|
|
49
49
|
"@elice/icons": "^1.230814.0",
|
|
50
50
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
51
|
+
"@elice/intl": "0.240425.0-alpha.9",
|
|
51
52
|
"@elice/markdown": "^1.220815.0",
|
|
52
|
-
"@elice/material-shared-types": "1.
|
|
53
|
-
"@elice/material-shared-utils": "1.
|
|
53
|
+
"@elice/material-shared-types": "1.240508.0-globalization.1",
|
|
54
|
+
"@elice/material-shared-utils": "1.240508.0-globalization.1",
|
|
54
55
|
"@elice/types": "^1.240208.0",
|
|
55
56
|
"@types/classnames": "^2.3.1",
|
|
56
57
|
"@types/react": "~17.0.9",
|
|
57
58
|
"@types/styled-components": "^5.1.21",
|
|
58
59
|
"react": "^17.0.2",
|
|
59
|
-
"react-intl": "^5.20.10",
|
|
60
60
|
"react-use": "^17.2.4",
|
|
61
61
|
"styled-components": "^5.3.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "359abc2f14610a96b1c4514aedb4a7d0ad02aed3"
|
|
64
64
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const en: {
|
|
2
|
-
'external.status.rejected': string;
|
|
3
|
-
'external.loader.redirect.description': string;
|
|
4
|
-
'external.loader.newWindow.description': string;
|
|
5
|
-
'external.newWindow.title': string;
|
|
6
|
-
'external.newWindow.description': string;
|
|
7
|
-
'external.newWindow.button.label': string;
|
|
8
|
-
};
|
|
9
|
-
export declare const ko: typeof en;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const en = {
|
|
4
|
-
'external.status.rejected': "It's a subject that doesn't exist.",
|
|
5
|
-
'external.loader.redirect.description': 'Redirecting to lecture material in 5 seconds.',
|
|
6
|
-
'external.loader.newWindow.description': 'A new tab will open after 5 seconds.',
|
|
7
|
-
'external.newWindow.title': 'Material has opened in a new tab.',
|
|
8
|
-
'external.newWindow.description': 'If pop-ups are blocked, Please click the button below to reopen it.',
|
|
9
|
-
'external.newWindow.button.label': 'Open Material'
|
|
10
|
-
};
|
|
11
|
-
const ko = {
|
|
12
|
-
'external.status.rejected': '존재하지 않는 과목입니다.',
|
|
13
|
-
'external.loader.redirect.description': '5초 뒤에 학습자료로 이동합니다.',
|
|
14
|
-
'external.loader.newWindow.description': '5초 뒤에 새 탭이 열립니다.',
|
|
15
|
-
'external.newWindow.title': '새 탭에서 학습 자료가 열렸습니다.',
|
|
16
|
-
'external.newWindow.description': '팝업이 차단되어 있으면 열리지 않을 수 있습니다. 아래 버튼을 클릭해 다시 열어주세요.',
|
|
17
|
-
'external.newWindow.button.label': '학습 자료 열기'
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
exports.en = en;
|
|
21
|
-
exports.ko = ko;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const en: {
|
|
2
|
-
'external.status.rejected': string;
|
|
3
|
-
'external.loader.redirect.description': string;
|
|
4
|
-
'external.loader.newWindow.description': string;
|
|
5
|
-
'external.newWindow.title': string;
|
|
6
|
-
'external.newWindow.description': string;
|
|
7
|
-
'external.newWindow.button.label': string;
|
|
8
|
-
};
|
|
9
|
-
export declare const ko: typeof en;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const en = {
|
|
2
|
-
'external.status.rejected': "It's a subject that doesn't exist.",
|
|
3
|
-
'external.loader.redirect.description': 'Redirecting to lecture material in 5 seconds.',
|
|
4
|
-
'external.loader.newWindow.description': 'A new tab will open after 5 seconds.',
|
|
5
|
-
'external.newWindow.title': 'Material has opened in a new tab.',
|
|
6
|
-
'external.newWindow.description': 'If pop-ups are blocked, Please click the button below to reopen it.',
|
|
7
|
-
'external.newWindow.button.label': 'Open Material'
|
|
8
|
-
};
|
|
9
|
-
const ko = {
|
|
10
|
-
'external.status.rejected': '존재하지 않는 과목입니다.',
|
|
11
|
-
'external.loader.redirect.description': '5초 뒤에 학습자료로 이동합니다.',
|
|
12
|
-
'external.loader.newWindow.description': '5초 뒤에 새 탭이 열립니다.',
|
|
13
|
-
'external.newWindow.title': '새 탭에서 학습 자료가 열렸습니다.',
|
|
14
|
-
'external.newWindow.description': '팝업이 차단되어 있으면 열리지 않을 수 있습니다. 아래 버튼을 클릭해 다시 열어주세요.',
|
|
15
|
-
'external.newWindow.button.label': '학습 자료 열기'
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export { en, ko };
|