@elice/material-pdf 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');
|
|
@@ -13,29 +15,27 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
15
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
16
|
var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
className,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}) => {
|
|
18
|
+
var MaterialPdf = function MaterialPdf(_ref) {
|
|
19
|
+
var className = _ref.className,
|
|
20
|
+
materialPdfId = _ref.materialPdfId,
|
|
21
|
+
cMapUrl = _ref.cMapUrl;
|
|
21
22
|
var _a;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
var prefixCls = 'em-material-pdf';
|
|
24
|
+
var _useMaterialFetch = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.PDF, React__default["default"].useCallback(function (signal) {
|
|
25
|
+
return apiClient.getOrgMaterialPdfGet({
|
|
26
|
+
materialPdfId: materialPdfId
|
|
27
|
+
}, {
|
|
28
|
+
signal: signal
|
|
29
|
+
});
|
|
30
|
+
}, [materialPdfId]), apiClient.config.init),
|
|
31
|
+
materialPdf = _useMaterialFetch.materialPdf,
|
|
32
|
+
materialPdfStatus = _useMaterialFetch.status;
|
|
33
|
+
//
|
|
32
34
|
//
|
|
33
35
|
//
|
|
34
|
-
|
|
35
36
|
if (materialPdfStatus === 'pending') {
|
|
36
37
|
return React__default["default"].createElement(blocks.Spinner, null);
|
|
37
38
|
}
|
|
38
|
-
|
|
39
39
|
return React__default["default"].createElement(MaterialPdf_styled.StyledMaterialPdfWrapper, {
|
|
40
40
|
className: classnames__default["default"](prefixCls, className)
|
|
41
41
|
}, React__default["default"].createElement(blocks.PdfRenderer, {
|
|
@@ -47,4 +47,4 @@ const MaterialPdf = ({
|
|
|
47
47
|
}));
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
exports["default"] = MaterialPdf;
|
|
@@ -8,7 +8,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
var StyledMaterialPdfWrapper = styled__default["default"].div.withConfig({
|
|
12
12
|
componentId: "sc-hovq54-0"
|
|
13
13
|
})(["margin:0;flex:2 1;height:100%;background-color:#22222c;"]);
|
|
14
14
|
|
package/cjs/index.js
CHANGED
|
@@ -6,29 +6,27 @@ import { enums } from '@elice/types';
|
|
|
6
6
|
import classnames from 'classnames';
|
|
7
7
|
import { StyledMaterialPdfWrapper } from './MaterialPdf.styled.js';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
className,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}) => {
|
|
9
|
+
var MaterialPdf = function MaterialPdf(_ref) {
|
|
10
|
+
var className = _ref.className,
|
|
11
|
+
materialPdfId = _ref.materialPdfId,
|
|
12
|
+
cMapUrl = _ref.cMapUrl;
|
|
14
13
|
var _a;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
var prefixCls = 'em-material-pdf';
|
|
15
|
+
var _useMaterialFetch = useMaterialFetch(enums.LectureMaterialType.PDF, React.useCallback(function (signal) {
|
|
16
|
+
return getOrgMaterialPdfGet({
|
|
17
|
+
materialPdfId: materialPdfId
|
|
18
|
+
}, {
|
|
19
|
+
signal: signal
|
|
20
|
+
});
|
|
21
|
+
}, [materialPdfId]), config.init),
|
|
22
|
+
materialPdf = _useMaterialFetch.materialPdf,
|
|
23
|
+
materialPdfStatus = _useMaterialFetch.status;
|
|
24
|
+
//
|
|
25
25
|
//
|
|
26
26
|
//
|
|
27
|
-
|
|
28
27
|
if (materialPdfStatus === 'pending') {
|
|
29
28
|
return React.createElement(Spinner, null);
|
|
30
29
|
}
|
|
31
|
-
|
|
32
30
|
return React.createElement(StyledMaterialPdfWrapper, {
|
|
33
31
|
className: classnames(prefixCls, className)
|
|
34
32
|
}, React.createElement(PdfRenderer, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-pdf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.230418.0",
|
|
4
4
|
"description": "User view and editing components of Elice material PDF",
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
57
|
-
"@elice/material-shared-utils": "1.
|
|
58
|
-
"@elice/types": "^1.
|
|
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": "
|
|
67
|
+
"gitHead": "06d5f856939bdbb6bffa9eba30f2fab56d66129b"
|
|
68
68
|
}
|