@elice/material-lms-public-content 1.240718.0-trasncript.2 → 1.240718.1

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,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
- 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;
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
- var renderContent = function renderContent() {
28
+ const renderContent = () => {
35
29
  if (materialLmsPublicContentStatus === 'pending') {
36
- return jsxRuntime.jsx(blocks.Spinner, {});
30
+ return React.createElement(blocks.Spinner, null);
37
31
  }
38
- return jsxRuntime.jsx("iframe", {
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 jsxRuntime.jsx(blocks.Flex, {
45
+ return React.createElement(blocks.Flex, {
52
46
  width: "100%",
53
47
  height: "100%",
54
48
  align: "center",
55
49
  justify: "center",
56
- className: classnames__default.default(prefixCls, className),
57
- children: renderContent()
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
- 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;
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
- var renderContent = function renderContent() {
24
+ const renderContent = () => {
26
25
  if (materialLmsPublicContentStatus === 'pending') {
27
- return jsx(Spinner, {});
26
+ return React.createElement(Spinner, null);
28
27
  }
29
- return jsx("iframe", {
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 jsx(Flex, {
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
- children: renderContent()
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.0-trasncript.2",
3
+ "version": "1.240718.1",
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": "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",
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.240529.0",
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.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",
50
+ "@elice/markdown": "^1.220815.0",
51
+ "@elice/material-shared-types": "1.240718.1",
52
+ "@elice/material-shared-utils": "1.240718.1",
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": "c1b2b8f98c5eed547941a327188a09f6ed21f6e4"
59
62
  }
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var MaterialLmsPublicContent = require('./MaterialLmsPublicContent.js');
4
-
5
-
6
-
7
- exports.MaterialLmsPublicContent = MaterialLmsPublicContent.default;
@@ -1 +0,0 @@
1
- export { default as MaterialLmsPublicContent } from './MaterialLmsPublicContent.js';