@elice/material-lms-public-content 1.240718.2 → 1.240719.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.
@@ -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
- 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);
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
- const renderContent = () => {
34
+ var renderContent = function renderContent() {
29
35
  if (materialLmsPublicContentStatus === 'pending') {
30
- return React.createElement(blocks.Spinner, null);
36
+ return jsxRuntime.jsx(blocks.Spinner, {});
31
37
  }
32
- return React.createElement("iframe", {
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 React.createElement(blocks.Flex, {
51
+ return jsxRuntime.jsx(blocks.Flex, {
46
52
  width: "100%",
47
53
  height: "100%",
48
54
  align: "center",
49
55
  justify: "center",
50
- className: classnames(prefixCls, className)
51
- }, renderContent());
56
+ className: classnames__default.default(prefixCls, className),
57
+ children: renderContent()
58
+ });
52
59
  };
53
60
 
54
61
  exports.default = MaterialLmsPublicContent;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var MaterialLmsPublicContent = require('./MaterialLmsPublicContent.js');
4
+
5
+
6
+
7
+ exports.MaterialLmsPublicContent = MaterialLmsPublicContent.default;
@@ -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
- 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);
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
- const renderContent = () => {
25
+ var renderContent = function renderContent() {
25
26
  if (materialLmsPublicContentStatus === 'pending') {
26
- return React.createElement(Spinner, null);
27
+ return jsx(Spinner, {});
27
28
  }
28
- return React.createElement("iframe", {
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 React.createElement(Flex, {
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
- }, renderContent());
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.2",
3
+ "version": "1.240719.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",
@@ -17,10 +17,8 @@
17
17
  "scripts": {
18
18
  "start": "run-s watch",
19
19
  "prebuild": "run-s clean",
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",
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.230816.0",
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.220815.0",
51
- "@elice/material-shared-types": "1.240718.2",
52
- "@elice/material-shared-utils": "1.240718.2",
53
- "@elice/types": "^1.240619.0",
48
+ "@elice/markdown": "^1.240124.0",
49
+ "@elice/material-shared-types": "1.240719.0",
50
+ "@elice/material-shared-utils": "1.240719.0",
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": "cd595d8015f44aa8518f22e37b7d2fb981a2b71d"
58
+ }
62
59
  }