@elice/material-external 1.241007.0-aidt.8 → 1.241007.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-external/MaterialExternal.d.ts +1 -0
- package/cjs/components/material-external/MaterialExternalIframe.js +1 -4
- package/cjs/components/material-external/locales/th.json.js +1 -1
- package/es/components/material-external/MaterialExternal.d.ts +1 -0
- package/es/components/material-external/MaterialExternalIframe.js +1 -4
- package/es/components/material-external/locales/th.json.js +1 -1
- package/package.json +6 -6
|
@@ -7,6 +7,7 @@ export interface MaterialExternalProps {
|
|
|
7
7
|
courseId?: number;
|
|
8
8
|
/** studentId. only tutoring mode */
|
|
9
9
|
userId?: number;
|
|
10
|
+
locale?: string;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialExternalProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
12
13
|
export default _default;
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var intl = require('@elice/intl');
|
|
8
7
|
var MaterialExternal_styled = require('./MaterialExternal.styled.js');
|
|
9
8
|
|
|
10
9
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -14,15 +13,13 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
14
13
|
var MaterialExternalIframe = function MaterialExternalIframe(_ref) {
|
|
15
14
|
var materialExternal = _ref.materialExternal,
|
|
16
15
|
courseId = _ref.courseId;
|
|
17
|
-
var intl$1 = intl.useRawEliceIntl();
|
|
18
16
|
var materialExternalUrl = React__default.default.useMemo(function () {
|
|
19
17
|
var externalUrl = new URL(materialExternal.externalUrl);
|
|
20
18
|
externalUrl.searchParams.append('course_id', String(courseId !== null && courseId !== void 0 ? courseId : ''));
|
|
21
19
|
externalUrl.searchParams.append('material_id', String(materialExternal.id));
|
|
22
20
|
externalUrl.searchParams.append('parent_url', window.location.href);
|
|
23
|
-
externalUrl.searchParams.append('locale', intl$1.locale);
|
|
24
21
|
return externalUrl.href;
|
|
25
|
-
}, [materialExternal.externalUrl, materialExternal.id, courseId
|
|
22
|
+
}, [materialExternal.externalUrl, materialExternal.id, courseId]);
|
|
26
23
|
return jsxRuntime.jsx(MaterialExternal_styled.StyledExternalDisplay, {
|
|
27
24
|
title: materialExternal.title,
|
|
28
25
|
src: materialExternalUrl,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var th = {"external.status.rejected":"มันเป็น {_termLibraryCourse} ที่ไม่มีอยู่จริง","external.loader.redirect.description":"
|
|
5
|
+
var th = {"external.status.rejected":"มันเป็น {_termLibraryCourse} ที่ไม่มีอยู่จริง","external.loader.redirect.description":"กำลังเปลี่ยนเส้นทางไปยังหน้าเรียน {_termLibraryLecturePage} ใน 5 วินาที","external.loader.newWindow.description":"แท็บใหม่จะเปิดหลังจาก 5 วินาที","external.newWindow.title":"เปิดหน้าเรียน {_termLibraryLecturePage} ในแท็บใหม่แล้ว","external.newWindow.description":"หากหน้าต่างป๊อปอัพถูกบล็อก กรุณาคลิกที่ปุ่มด้านล่างเพื่อเปิดใหม่","external.newWindow.button.label":"เปิดหน้าเรียน {_termLibraryLecturePage}"};
|
|
6
6
|
|
|
7
7
|
exports.default = th;
|
|
@@ -7,6 +7,7 @@ export interface MaterialExternalProps {
|
|
|
7
7
|
courseId?: number;
|
|
8
8
|
/** studentId. only tutoring mode */
|
|
9
9
|
userId?: number;
|
|
10
|
+
locale?: string;
|
|
10
11
|
}
|
|
11
12
|
declare const _default: React.ForwardRefExoticComponent<import("@elice/intl").IntlComponentExtraProps & Omit<WithIntlComponentBuilderProps<MaterialExternalProps>, keyof import("@elice/intl").IntlComponentExtraProps | "__intl"> & React.RefAttributes<any>>;
|
|
12
13
|
export default _default;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { useRawEliceIntl } from '@elice/intl';
|
|
4
3
|
import { StyledExternalDisplay } from './MaterialExternal.styled.js';
|
|
5
4
|
|
|
6
5
|
var MaterialExternalIframe = function MaterialExternalIframe(_ref) {
|
|
7
6
|
var materialExternal = _ref.materialExternal,
|
|
8
7
|
courseId = _ref.courseId;
|
|
9
|
-
var intl = useRawEliceIntl();
|
|
10
8
|
var materialExternalUrl = React.useMemo(function () {
|
|
11
9
|
var externalUrl = new URL(materialExternal.externalUrl);
|
|
12
10
|
externalUrl.searchParams.append('course_id', String(courseId !== null && courseId !== void 0 ? courseId : ''));
|
|
13
11
|
externalUrl.searchParams.append('material_id', String(materialExternal.id));
|
|
14
12
|
externalUrl.searchParams.append('parent_url', window.location.href);
|
|
15
|
-
externalUrl.searchParams.append('locale', intl.locale);
|
|
16
13
|
return externalUrl.href;
|
|
17
|
-
}, [materialExternal.externalUrl, materialExternal.id, courseId
|
|
14
|
+
}, [materialExternal.externalUrl, materialExternal.id, courseId]);
|
|
18
15
|
return jsx(StyledExternalDisplay, {
|
|
19
16
|
title: materialExternal.title,
|
|
20
17
|
src: materialExternalUrl,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var th = {"external.status.rejected":"มันเป็น {_termLibraryCourse} ที่ไม่มีอยู่จริง","external.loader.redirect.description":"
|
|
1
|
+
var th = {"external.status.rejected":"มันเป็น {_termLibraryCourse} ที่ไม่มีอยู่จริง","external.loader.redirect.description":"กำลังเปลี่ยนเส้นทางไปยังหน้าเรียน {_termLibraryLecturePage} ใน 5 วินาที","external.loader.newWindow.description":"แท็บใหม่จะเปิดหลังจาก 5 วินาที","external.newWindow.title":"เปิดหน้าเรียน {_termLibraryLecturePage} ในแท็บใหม่แล้ว","external.newWindow.description":"หากหน้าต่างป๊อปอัพถูกบล็อก กรุณาคลิกที่ปุ่มด้านล่างเพื่อเปิดใหม่","external.newWindow.button.label":"เปิดหน้าเรียน {_termLibraryLecturePage}"};
|
|
2
2
|
|
|
3
3
|
export { th as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-external",
|
|
3
|
-
"version": "1.241007.0
|
|
3
|
+
"version": "1.241007.0",
|
|
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",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"@elice/design-tokens": "^1.220803.0",
|
|
47
47
|
"@elice/icons": "^1.230814.0",
|
|
48
48
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
49
|
-
"@elice/intl": "0.
|
|
50
|
-
"@elice/markdown": "1.
|
|
51
|
-
"@elice/material-shared-types": "1.241007.0
|
|
52
|
-
"@elice/material-shared-utils": "1.241007.0
|
|
53
|
-
"@elice/types": "1.
|
|
49
|
+
"@elice/intl": "0.240718.0",
|
|
50
|
+
"@elice/markdown": "^1.240124.0",
|
|
51
|
+
"@elice/material-shared-types": "1.241007.0",
|
|
52
|
+
"@elice/material-shared-utils": "1.241007.0",
|
|
53
|
+
"@elice/types": "1.240709.0",
|
|
54
54
|
"@types/classnames": "^2.3.1",
|
|
55
55
|
"@types/react": "~17.0.9",
|
|
56
56
|
"@types/styled-components": "^5.1.21",
|