@elice/material-lms-public-content 1.230328.0 → 1.230418.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.
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
3
5
  var React = require('react');
4
6
  var apiClient = require('@elice/api-client');
5
7
  var blocks = require('@elice/blocks');
@@ -12,28 +14,26 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
14
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
13
15
  var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
14
16
 
15
- const MaterialLmsPublicContent = ({
16
- className,
17
- materialLmsPublicContentId
18
- }) => {
19
- const prefixCls = 'em-material-lms-public-content';
20
- const {
21
- materialLmsPublicContent,
22
- status: materialLmsPublicContentStatus
23
- } = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.LMSPublicContent, React__default["default"].useCallback(signal => apiClient.getOrgMaterialLmsPublicContentGet({
24
- materialLmsPublicContentId
25
- }, {
26
- signal
27
- }), [materialLmsPublicContentId]), apiClient.config.init);
17
+ var MaterialLmsPublicContent = function MaterialLmsPublicContent(_ref) {
18
+ var className = _ref.className,
19
+ materialLmsPublicContentId = _ref.materialLmsPublicContentId;
20
+ var prefixCls = 'em-material-lms-public-content';
21
+ var _useMaterialFetch = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.LMSPublicContent, React__default["default"].useCallback(function (signal) {
22
+ return apiClient.getOrgMaterialLmsPublicContentGet({
23
+ materialLmsPublicContentId: materialLmsPublicContentId
24
+ }, {
25
+ signal: signal
26
+ });
27
+ }, [materialLmsPublicContentId]), apiClient.config.init),
28
+ materialLmsPublicContent = _useMaterialFetch.materialLmsPublicContent,
29
+ materialLmsPublicContentStatus = _useMaterialFetch.status;
28
30
  /**
29
31
  *
30
32
  */
31
-
32
- const renderContent = () => {
33
+ var renderContent = function renderContent() {
33
34
  if (materialLmsPublicContentStatus === 'pending') {
34
35
  return React__default["default"].createElement(blocks.Spinner, null);
35
36
  }
36
-
37
37
  return React__default["default"].createElement("iframe", {
38
38
  title: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.title,
39
39
  width: "100%",
@@ -43,11 +43,10 @@ const MaterialLmsPublicContent = ({
43
43
  },
44
44
  src: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.url
45
45
  });
46
- }; //
46
+ };
47
+ //
47
48
  //
48
49
  //
49
-
50
-
51
50
  return React__default["default"].createElement(blocks.Flex, {
52
51
  width: "100%",
53
52
  height: "100%",
@@ -57,4 +56,4 @@ const MaterialLmsPublicContent = ({
57
56
  }, renderContent());
58
57
  };
59
58
 
60
- module.exports = MaterialLmsPublicContent;
59
+ exports["default"] = MaterialLmsPublicContent;
package/cjs/index.js CHANGED
@@ -6,4 +6,4 @@ var MaterialLmsPublicContent = require('./components/material-lms-public-content
6
6
 
7
7
 
8
8
 
9
- exports.MaterialLmsPublicContent = MaterialLmsPublicContent;
9
+ exports.MaterialLmsPublicContent = MaterialLmsPublicContent["default"];
@@ -5,28 +5,26 @@ import { useMaterialFetch } from '@elice/material-shared-utils';
5
5
  import { enums } from '@elice/types';
6
6
  import classnames from 'classnames';
7
7
 
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);
8
+ var MaterialLmsPublicContent = function MaterialLmsPublicContent(_ref) {
9
+ var className = _ref.className,
10
+ materialLmsPublicContentId = _ref.materialLmsPublicContentId;
11
+ var prefixCls = 'em-material-lms-public-content';
12
+ var _useMaterialFetch = useMaterialFetch(enums.LectureMaterialType.LMSPublicContent, React.useCallback(function (signal) {
13
+ return getOrgMaterialLmsPublicContentGet({
14
+ materialLmsPublicContentId: materialLmsPublicContentId
15
+ }, {
16
+ signal: signal
17
+ });
18
+ }, [materialLmsPublicContentId]), config.init),
19
+ materialLmsPublicContent = _useMaterialFetch.materialLmsPublicContent,
20
+ materialLmsPublicContentStatus = _useMaterialFetch.status;
21
21
  /**
22
22
  *
23
23
  */
24
-
25
- const renderContent = () => {
24
+ var renderContent = function renderContent() {
26
25
  if (materialLmsPublicContentStatus === 'pending') {
27
26
  return React.createElement(Spinner, null);
28
27
  }
29
-
30
28
  return React.createElement("iframe", {
31
29
  title: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.title,
32
30
  width: "100%",
@@ -36,11 +34,10 @@ const MaterialLmsPublicContent = ({
36
34
  },
37
35
  src: materialLmsPublicContent === null || materialLmsPublicContent === void 0 ? void 0 : materialLmsPublicContent.url
38
36
  });
39
- }; //
37
+ };
38
+ //
40
39
  //
41
40
  //
42
-
43
-
44
41
  return React.createElement(Flex, {
45
42
  width: "100%",
46
43
  height: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-lms-public-content",
3
- "version": "1.230328.0",
3
+ "version": "1.230418.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",
@@ -29,14 +29,14 @@
29
29
  "clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
30
30
  },
31
31
  "peerDependencies": {
32
- "@elice/api-client": "1.230306.1",
32
+ "@elice/api-client": "^1.230413.0",
33
33
  "@elice/blocks": "^1.220803.0",
34
34
  "@elice/design-tokens": "^1.220803.0",
35
35
  "@elice/icons": "^1.220803.0",
36
36
  "@elice/markdown": "^1.220803.0",
37
37
  "@elice/material-shared-types": "*",
38
38
  "@elice/material-shared-utils": "*",
39
- "@elice/types": "^1.230306.0",
39
+ "@elice/types": "^1.230417.0",
40
40
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
41
41
  "react-intl": "^5.0.0",
42
42
  "react-use": "^17.0.0",
@@ -47,15 +47,15 @@
47
47
  "tslib": "^2.3.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@elice/api-client": "1.230306.1",
50
+ "@elice/api-client": "^1.230413.0",
51
51
  "@elice/blocks": "^1.220803.0",
52
52
  "@elice/design-tokens": "^1.220803.0",
53
53
  "@elice/icons": "^1.220803.0",
54
54
  "@elice/icons-legacy": "npm:@elice/icons@0.220803.1",
55
55
  "@elice/markdown": "^1.220803.0",
56
- "@elice/material-shared-types": "1.230328.0",
57
- "@elice/material-shared-utils": "1.230328.0",
58
- "@elice/types": "^1.230306.0",
56
+ "@elice/material-shared-types": "1.230418.0",
57
+ "@elice/material-shared-utils": "1.230418.0",
58
+ "@elice/types": "^1.230417.0",
59
59
  "@types/classnames": "^2.3.1",
60
60
  "@types/react": "~17.0.9",
61
61
  "@types/styled-components": "^5.1.21",
@@ -64,5 +64,5 @@
64
64
  "react-use": "^17.2.4",
65
65
  "styled-components": "^5.3.0"
66
66
  },
67
- "gitHead": "c24abeffe609385031a77c725bf6e92e47e94b56"
67
+ "gitHead": "06d5f856939bdbb6bffa9eba30f2fab56d66129b"
68
68
  }