@elice/material-lms-public-content 1.240718.0-trasncript.2 → 1.240718.2
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-lms-public-content/MaterialLmsPublicContent.js +19 -26
- package/es/components/material-lms-public-content/MaterialLmsPublicContent.js +19 -21
- package/package.json +12 -9
- package/cjs/components/material-lms-public-content/index.js +0 -7
- package/es/components/material-lms-public-content/index.js +0 -1
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var apiClient = require('@elice/api-client');
|
|
8
7
|
var blocks = require('@elice/blocks');
|
|
@@ -10,32 +9,27 @@ var materialSharedUtils = require('@elice/material-shared-utils');
|
|
|
10
9
|
var types = require('@elice/types');
|
|
11
10
|
var classnames = require('classnames');
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
signal: signal
|
|
27
|
-
});
|
|
28
|
-
}, [materialLmsPublicContentId]), apiClient.config.init),
|
|
29
|
-
materialLmsPublicContent = _useMaterialFetch.materialLmsPublicContent,
|
|
30
|
-
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);
|
|
31
25
|
/**
|
|
32
26
|
*
|
|
33
27
|
*/
|
|
34
|
-
|
|
28
|
+
const renderContent = () => {
|
|
35
29
|
if (materialLmsPublicContentStatus === 'pending') {
|
|
36
|
-
return
|
|
30
|
+
return React.createElement(blocks.Spinner, null);
|
|
37
31
|
}
|
|
38
|
-
return
|
|
32
|
+
return React.createElement("iframe", {
|
|
39
33
|
title: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.title,
|
|
40
34
|
width: "100%",
|
|
41
35
|
height: "100%",
|
|
@@ -48,14 +42,13 @@ var MaterialLmsPublicContent = function MaterialLmsPublicContent(_ref) {
|
|
|
48
42
|
//
|
|
49
43
|
//
|
|
50
44
|
//
|
|
51
|
-
return
|
|
45
|
+
return React.createElement(blocks.Flex, {
|
|
52
46
|
width: "100%",
|
|
53
47
|
height: "100%",
|
|
54
48
|
align: "center",
|
|
55
49
|
justify: "center",
|
|
56
|
-
className:
|
|
57
|
-
|
|
58
|
-
});
|
|
50
|
+
className: classnames(prefixCls, className)
|
|
51
|
+
}, renderContent());
|
|
59
52
|
};
|
|
60
53
|
|
|
61
54
|
exports.default = MaterialLmsPublicContent;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { getOrgMaterialLmsPublicContentGet, config } from '@elice/api-client';
|
|
4
3
|
import { Flex, Spinner } from '@elice/blocks';
|
|
@@ -6,27 +5,27 @@ import { useMaterialFetch } from '@elice/material-shared-utils';
|
|
|
6
5
|
import { enums } from '@elice/types';
|
|
7
6
|
import classnames from 'classnames';
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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);
|
|
22
21
|
/**
|
|
23
22
|
*
|
|
24
23
|
*/
|
|
25
|
-
|
|
24
|
+
const renderContent = () => {
|
|
26
25
|
if (materialLmsPublicContentStatus === 'pending') {
|
|
27
|
-
return
|
|
26
|
+
return React.createElement(Spinner, null);
|
|
28
27
|
}
|
|
29
|
-
return
|
|
28
|
+
return React.createElement("iframe", {
|
|
30
29
|
title: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.title,
|
|
31
30
|
width: "100%",
|
|
32
31
|
height: "100%",
|
|
@@ -39,14 +38,13 @@ var MaterialLmsPublicContent = function MaterialLmsPublicContent(_ref) {
|
|
|
39
38
|
//
|
|
40
39
|
//
|
|
41
40
|
//
|
|
42
|
-
return
|
|
41
|
+
return React.createElement(Flex, {
|
|
43
42
|
width: "100%",
|
|
44
43
|
height: "100%",
|
|
45
44
|
align: "center",
|
|
46
45
|
justify: "center",
|
|
47
|
-
className: classnames(prefixCls, className)
|
|
48
|
-
|
|
49
|
-
});
|
|
46
|
+
className: classnames(prefixCls, className)
|
|
47
|
+
}, renderContent());
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
export { MaterialLmsPublicContent as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-lms-public-content",
|
|
3
|
-
"version": "1.240718.
|
|
3
|
+
"version": "1.240718.2",
|
|
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",
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
20
|
+
"build": "run-p build:es build:cjs",
|
|
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",
|
|
22
24
|
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
23
25
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
24
26
|
},
|
|
@@ -41,19 +43,20 @@
|
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@elice/api-client": "^1.240619.0",
|
|
44
|
-
"@elice/blocks": "^1.
|
|
46
|
+
"@elice/blocks": "^1.230816.0",
|
|
45
47
|
"@elice/design-tokens": "^1.220803.0",
|
|
46
48
|
"@elice/icons": "^1.230814.0",
|
|
47
49
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
48
|
-
"@elice/markdown": "^1.
|
|
49
|
-
"@elice/material-shared-types": "1.240718.
|
|
50
|
-
"@elice/material-shared-utils": "1.240718.
|
|
51
|
-
"@elice/types": "1.
|
|
50
|
+
"@elice/markdown": "^1.220815.0",
|
|
51
|
+
"@elice/material-shared-types": "1.240718.2",
|
|
52
|
+
"@elice/material-shared-utils": "1.240718.2",
|
|
53
|
+
"@elice/types": "^1.240619.0",
|
|
52
54
|
"@types/classnames": "^2.3.1",
|
|
53
55
|
"@types/react": "~17.0.9",
|
|
54
56
|
"@types/styled-components": "^5.1.21",
|
|
55
57
|
"react": "^17.0.2",
|
|
56
58
|
"react-use": "^17.2.4",
|
|
57
59
|
"styled-components": "^5.3.0"
|
|
58
|
-
}
|
|
60
|
+
},
|
|
61
|
+
"gitHead": "cd595d8015f44aa8518f22e37b7d2fb981a2b71d"
|
|
59
62
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as MaterialLmsPublicContent } from './MaterialLmsPublicContent.js';
|