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