@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
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
-
14
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
15
- var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
16
-
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;
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
- var renderContent = function renderContent() {
28
+ const renderContent = () => {
34
29
  if (materialLmsPublicContentStatus === 'pending') {
35
- return React__default["default"].createElement(blocks.Spinner, null);
30
+ return React.createElement(blocks.Spinner, null);
36
31
  }
37
- return React__default["default"].createElement("iframe", {
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 React__default["default"].createElement(blocks.Flex, {
45
+ return React.createElement(blocks.Flex, {
51
46
  width: "100%",
52
47
  height: "100%",
53
48
  align: "center",
54
49
  justify: "center",
55
- className: classnames__default["default"](prefixCls, className)
50
+ className: classnames(prefixCls, className)
56
51
  }, renderContent());
57
52
  };
58
53
 
59
- exports["default"] = MaterialLmsPublicContent;
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["default"];
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
- 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;
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
- var renderContent = function renderContent() {
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.231227.0",
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.231227.0",
53
- "@elice/material-shared-utils": "1.231227.0",
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": "9c84854123a8e6ae3a8d734e3bc9b944bf20d924"
63
+ "gitHead": "98c3e4d64847cdbe7985f8fd95835bb01f1d53ca"
64
64
  }