@elice/material-lms-public-content 1.231227.0 → 1.231228.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.
|
@@ -9,32 +9,27 @@ var materialSharedUtils = require('@elice/material-shared-utils');
|
|
|
9
9
|
var types = require('@elice/types');
|
|
10
10
|
var classnames = require('classnames');
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
signal: signal
|
|
26
|
-
});
|
|
27
|
-
}, [materialLmsPublicContentId]), apiClient.config.init),
|
|
28
|
-
materialLmsPublicContent = _useMaterialFetch.materialLmsPublicContent,
|
|
29
|
-
materialLmsPublicContentStatus = _useMaterialFetch.status;
|
|
12
|
+
const MaterialLmsPublicContent = ({
|
|
13
|
+
className,
|
|
14
|
+
materialLmsPublicContentId
|
|
15
|
+
}) => {
|
|
16
|
+
const prefixCls = 'em-material-lms-public-content';
|
|
17
|
+
const {
|
|
18
|
+
materialLmsPublicContent,
|
|
19
|
+
status: materialLmsPublicContentStatus
|
|
20
|
+
} = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.LMSPublicContent, React.useCallback(signal => apiClient.getOrgMaterialLmsPublicContentGet({
|
|
21
|
+
materialLmsPublicContentId
|
|
22
|
+
}, {
|
|
23
|
+
signal
|
|
24
|
+
}), [materialLmsPublicContentId]), apiClient.config.init);
|
|
30
25
|
/**
|
|
31
26
|
*
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
const renderContent = () => {
|
|
34
29
|
if (materialLmsPublicContentStatus === 'pending') {
|
|
35
|
-
return
|
|
30
|
+
return React.createElement(blocks.Spinner, null);
|
|
36
31
|
}
|
|
37
|
-
return
|
|
32
|
+
return React.createElement("iframe", {
|
|
38
33
|
title: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.title,
|
|
39
34
|
width: "100%",
|
|
40
35
|
height: "100%",
|
|
@@ -47,13 +42,13 @@ var MaterialLmsPublicContent = function MaterialLmsPublicContent(_ref) {
|
|
|
47
42
|
//
|
|
48
43
|
//
|
|
49
44
|
//
|
|
50
|
-
return
|
|
45
|
+
return React.createElement(blocks.Flex, {
|
|
51
46
|
width: "100%",
|
|
52
47
|
height: "100%",
|
|
53
48
|
align: "center",
|
|
54
49
|
justify: "center",
|
|
55
|
-
className:
|
|
50
|
+
className: classnames(prefixCls, className)
|
|
56
51
|
}, renderContent());
|
|
57
52
|
};
|
|
58
53
|
|
|
59
|
-
exports
|
|
54
|
+
exports.default = MaterialLmsPublicContent;
|
package/cjs/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var MaterialLmsPublicContent = require('./components/material-lms-public-content/MaterialLmsPublicContent.js');
|
|
6
4
|
|
|
7
5
|
|
|
8
6
|
|
|
9
|
-
exports.MaterialLmsPublicContent = MaterialLmsPublicContent
|
|
7
|
+
exports.MaterialLmsPublicContent = MaterialLmsPublicContent.default;
|
|
@@ -5,23 +5,23 @@ import { useMaterialFetch } from '@elice/material-shared-utils';
|
|
|
5
5
|
import { enums } from '@elice/types';
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
const MaterialLmsPublicContent = ({
|
|
9
|
+
className,
|
|
10
|
+
materialLmsPublicContentId
|
|
11
|
+
}) => {
|
|
12
|
+
const prefixCls = 'em-material-lms-public-content';
|
|
13
|
+
const {
|
|
14
|
+
materialLmsPublicContent,
|
|
15
|
+
status: materialLmsPublicContentStatus
|
|
16
|
+
} = useMaterialFetch(enums.LectureMaterialType.LMSPublicContent, React.useCallback(signal => getOrgMaterialLmsPublicContentGet({
|
|
17
|
+
materialLmsPublicContentId
|
|
18
|
+
}, {
|
|
19
|
+
signal
|
|
20
|
+
}), [materialLmsPublicContentId]), config.init);
|
|
21
21
|
/**
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
const renderContent = () => {
|
|
25
25
|
if (materialLmsPublicContentStatus === 'pending') {
|
|
26
26
|
return React.createElement(Spinner, null);
|
|
27
27
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-lms-public-content",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.231228.0",
|
|
4
4
|
"description": "User view and editing components of Elice material LMS public content",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
20
|
"build": "run-p build:es build:cjs",
|
|
21
|
-
"build:es": "rollup -c ../../rollup.config.ts -f es",
|
|
22
|
-
"build:cjs": "rollup -c ../../rollup.config.ts -f cjs",
|
|
23
|
-
"watch": "rollup -c ../../rollup.config.ts -f es -w",
|
|
21
|
+
"build:es": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es",
|
|
22
|
+
"build:cjs": "rollup -c ../../rollup.config.ts --configPlugin typescript -f cjs",
|
|
23
|
+
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -w",
|
|
24
24
|
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
25
25
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
26
26
|
},
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"@elice/icons": "^1.230814.0",
|
|
50
50
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
51
51
|
"@elice/markdown": "^1.220815.0",
|
|
52
|
-
"@elice/material-shared-types": "1.
|
|
53
|
-
"@elice/material-shared-utils": "1.
|
|
52
|
+
"@elice/material-shared-types": "1.231228.0",
|
|
53
|
+
"@elice/material-shared-utils": "1.231228.0",
|
|
54
54
|
"@elice/types": "^1.230815.0",
|
|
55
55
|
"@types/classnames": "^2.3.1",
|
|
56
56
|
"@types/react": "~17.0.9",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react-use": "^17.2.4",
|
|
61
61
|
"styled-components": "^5.3.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "98c3e4d64847cdbe7985f8fd95835bb01f1d53ca"
|
|
64
64
|
}
|