@elice/material-pdf 1.240306.0-runboxtutoring.0 → 1.240306.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.
- package/cjs/components/material-pdf/MaterialPdf.d.ts +2 -3
- package/cjs/components/material-pdf/MaterialPdf.js +21 -26
- package/cjs/components/material-pdf/MaterialPdf.styled.js +2 -6
- package/cjs/components/material-pdf/MaterialPdfContent.js +37 -66
- package/cjs/components/material-pdf/locales.d.ts +7 -0
- package/cjs/components/material-pdf/locales.js +17 -0
- package/es/components/material-pdf/MaterialPdf.d.ts +2 -3
- package/es/components/material-pdf/MaterialPdf.js +22 -22
- package/es/components/material-pdf/MaterialPdf.styled.js +2 -2
- package/es/components/material-pdf/MaterialPdfContent.js +39 -64
- package/es/components/material-pdf/locales.d.ts +7 -0
- package/es/components/material-pdf/locales.js +14 -0
- package/package.json +15 -12
- package/cjs/components/material-pdf/index.js +0 -7
- package/cjs/components/material-pdf/locales/en.json.js +0 -7
- package/cjs/components/material-pdf/locales/index.d.ts +0 -4
- package/cjs/components/material-pdf/locales/index.js +0 -13
- package/cjs/components/material-pdf/locales/ja.json.js +0 -7
- package/cjs/components/material-pdf/locales/ko.json.js +0 -7
- package/cjs/components/material-pdf/locales/th.json.js +0 -7
- package/es/components/material-pdf/index.js +0 -1
- package/es/components/material-pdf/locales/en.json.js +0 -3
- package/es/components/material-pdf/locales/index.d.ts +0 -4
- package/es/components/material-pdf/locales/index.js +0 -4
- package/es/components/material-pdf/locales/ja.json.js +0 -3
- package/es/components/material-pdf/locales/ko.json.js +0 -3
- package/es/components/material-pdf/locales/th.json.js +0 -3
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
2
|
export interface MaterialPdfProps {
|
|
4
3
|
className?: string;
|
|
5
4
|
materialPdfId: number;
|
|
6
5
|
cMapUrl?: string;
|
|
7
6
|
locale?: string;
|
|
8
7
|
}
|
|
9
|
-
declare const
|
|
10
|
-
export default
|
|
8
|
+
declare const MaterialPdf: React.FC<MaterialPdfProps>;
|
|
9
|
+
export default MaterialPdf;
|
|
@@ -2,38 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactIntl = require('react-intl');
|
|
7
7
|
var classnames = require('classnames');
|
|
8
|
-
var
|
|
9
|
-
var ko = require('./locales/ko.json.js');
|
|
8
|
+
var locales = require('./locales.js');
|
|
10
9
|
var MaterialPdfContent = require('./MaterialPdfContent.js');
|
|
11
10
|
var MaterialPdf_styled = require('./MaterialPdf.styled.js');
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cMapUrl = _ref.cMapUrl,
|
|
21
|
-
__intl = _ref.__intl;
|
|
22
|
-
var prefixCls = 'em-material-pdf';
|
|
12
|
+
const MaterialPdf = ({
|
|
13
|
+
className,
|
|
14
|
+
materialPdfId,
|
|
15
|
+
cMapUrl,
|
|
16
|
+
locale = 'en'
|
|
17
|
+
}) => {
|
|
18
|
+
const prefixCls = 'em-material-pdf';
|
|
23
19
|
//
|
|
24
20
|
//
|
|
25
21
|
//
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
22
|
+
return React.createElement(MaterialPdf_styled.StyledMaterialPdfWrapper, {
|
|
23
|
+
className: classnames(prefixCls, className)
|
|
24
|
+
}, React.createElement(reactIntl.IntlProvider, {
|
|
25
|
+
locale: locale,
|
|
26
|
+
defaultLocale: "en",
|
|
27
|
+
messages: locale in locales ? locales[locale] : locales.en
|
|
28
|
+
}, React.createElement(MaterialPdfContent.default, {
|
|
29
|
+
materialPdfId: materialPdfId,
|
|
30
|
+
cMapUrl: cMapUrl
|
|
31
|
+
})));
|
|
36
32
|
};
|
|
37
|
-
var MaterialPdf$1 = new intl.IntlComponentBuilder(MaterialPdf).add('en', en.default).add('ko', ko.default).addAsync('th', Promise.resolve().then(function () { return require('./locales/th.json.js'); })).addAsync('ja', Promise.resolve().then(function () { return require('./locales/ja.json.js'); })).build();
|
|
38
33
|
|
|
39
|
-
exports.default = MaterialPdf
|
|
34
|
+
exports.default = MaterialPdf;
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
8
|
-
|
|
9
|
-
var StyledMaterialPdfWrapper = styled__default.default.div.withConfig({
|
|
5
|
+
const StyledMaterialPdfWrapper = styled.div.withConfig({
|
|
10
6
|
componentId: "sc-hovq54-0"
|
|
11
|
-
})(["margin:0;flex:2 1;
|
|
7
|
+
})(["margin:0;flex:2 1;height:100%;background-color:#22222c;"]);
|
|
12
8
|
|
|
13
9
|
exports.StyledMaterialPdfWrapper = StyledMaterialPdfWrapper;
|
|
@@ -2,83 +2,54 @@
|
|
|
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');
|
|
6
|
+
var reactIntl = require('react-intl');
|
|
7
7
|
var apiClient = require('@elice/api-client');
|
|
8
8
|
var blocks = require('@elice/blocks');
|
|
9
|
-
var intl = require('@elice/intl');
|
|
10
9
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
11
10
|
var types = require('@elice/types');
|
|
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
|
-
|
|
17
12
|
//
|
|
18
13
|
//
|
|
19
14
|
//
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var isPowerPointFile = React.useMemo(function () {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
|
|
37
|
-
var _URL = new URL(materialPdf.attachment.url),
|
|
38
|
-
pathname = _URL.pathname;
|
|
39
|
-
var currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
40
|
-
var currentFileExtension = (_b = currentFileName.split('.').pop()) !== null && _b !== void 0 ? _b : '';
|
|
41
|
-
return POWERPOINT_EXTENSIONS.some(function (extension) {
|
|
42
|
-
return currentFileExtension.toLowerCase().includes(extension);
|
|
43
|
-
});
|
|
44
|
-
}, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
|
|
45
|
-
var componentProps = React.useMemo(function () {
|
|
46
|
-
var _a;
|
|
47
|
-
return isPowerPointFile ? {
|
|
48
|
-
type: 'powerpoint',
|
|
49
|
-
src: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
50
|
-
i18n: {
|
|
51
|
-
error: intl$1.formatMessage({
|
|
52
|
-
id: 'pdf.status.error'
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
} : {
|
|
56
|
-
type: 'pdf',
|
|
57
|
-
key: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
58
|
-
file: (_a = materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) !== null && _a !== void 0 ? _a : '',
|
|
59
|
-
title: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title,
|
|
60
|
-
cMapUrl: cMapUrl,
|
|
61
|
-
hasError: !(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) || materialPdfStatus === 'rejected',
|
|
62
|
-
i18n: {
|
|
63
|
-
fullscreen: intl$1.formatMessage({
|
|
64
|
-
id: 'pdf.fullScreen'
|
|
65
|
-
}),
|
|
66
|
-
download: intl$1.formatMessage({
|
|
67
|
-
id: 'pdf.download'
|
|
68
|
-
}),
|
|
69
|
-
loading: intl$1.formatMessage({
|
|
70
|
-
id: 'pdf.status.loading'
|
|
71
|
-
}),
|
|
72
|
-
error: intl$1.formatMessage({
|
|
73
|
-
id: 'pdf.status.error'
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
}, [cMapUrl, intl$1, isPowerPointFile, materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url, materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title, materialPdfStatus]);
|
|
15
|
+
const MaterialPdfContent = ({
|
|
16
|
+
materialPdfId,
|
|
17
|
+
cMapUrl
|
|
18
|
+
}) => {
|
|
19
|
+
var _a;
|
|
20
|
+
const intl = reactIntl.useIntl();
|
|
21
|
+
const {
|
|
22
|
+
materialPdf,
|
|
23
|
+
status: materialPdfStatus
|
|
24
|
+
} = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.PDF, React.useCallback(signal => apiClient.getOrgMaterialPdfGet({
|
|
25
|
+
materialPdfId
|
|
26
|
+
}, {
|
|
27
|
+
signal
|
|
28
|
+
}), [materialPdfId]), apiClient.config.init);
|
|
78
29
|
if (materialPdfStatus === 'pending') {
|
|
79
|
-
return
|
|
30
|
+
return React.createElement(blocks.Spinner, null);
|
|
80
31
|
}
|
|
81
|
-
return
|
|
32
|
+
return React.createElement(blocks.PdfRenderer, {
|
|
33
|
+
key: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
34
|
+
file: (_a = materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) !== null && _a !== void 0 ? _a : '',
|
|
35
|
+
title: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title,
|
|
36
|
+
cMapUrl: cMapUrl,
|
|
37
|
+
hasError: !(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) || materialPdfStatus === 'rejected',
|
|
38
|
+
i18n: {
|
|
39
|
+
fullscreen: intl.formatMessage({
|
|
40
|
+
id: 'pdf.fullScreen'
|
|
41
|
+
}),
|
|
42
|
+
download: intl.formatMessage({
|
|
43
|
+
id: 'pdf.download'
|
|
44
|
+
}),
|
|
45
|
+
loading: intl.formatMessage({
|
|
46
|
+
id: 'pdf.status.loading'
|
|
47
|
+
}),
|
|
48
|
+
error: intl.formatMessage({
|
|
49
|
+
id: 'pdf.status.error'
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
});
|
|
82
53
|
};
|
|
83
54
|
|
|
84
55
|
exports.default = MaterialPdfContent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const en = {
|
|
4
|
+
'pdf.status.loading': 'Loading File...',
|
|
5
|
+
'pdf.status.error': 'Error occurred while loading file.',
|
|
6
|
+
'pdf.fullScreen': 'Full Screen',
|
|
7
|
+
'pdf.download': 'File download'
|
|
8
|
+
};
|
|
9
|
+
const ko = {
|
|
10
|
+
'pdf.status.loading': '수업 자료 로딩 중...',
|
|
11
|
+
'pdf.status.error': '수업 자료를 가져오는 중 문제가 발생하였습니다.',
|
|
12
|
+
'pdf.fullScreen': '화면 맞춤',
|
|
13
|
+
'pdf.download': '수업 자료 다운로드'
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.en = en;
|
|
17
|
+
exports.ko = ko;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
2
|
export interface MaterialPdfProps {
|
|
4
3
|
className?: string;
|
|
5
4
|
materialPdfId: number;
|
|
6
5
|
cMapUrl?: string;
|
|
7
6
|
locale?: string;
|
|
8
7
|
}
|
|
9
|
-
declare const
|
|
10
|
-
export default
|
|
8
|
+
declare const MaterialPdf: React.FC<MaterialPdfProps>;
|
|
9
|
+
export default MaterialPdf;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IntlProvider } from 'react-intl';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import * as locales from './locales.js';
|
|
5
|
+
import { en } from './locales.js';
|
|
6
6
|
import MaterialPdfContent from './MaterialPdfContent.js';
|
|
7
7
|
import { StyledMaterialPdfWrapper } from './MaterialPdf.styled.js';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const MaterialPdf = ({
|
|
10
|
+
className,
|
|
11
|
+
materialPdfId,
|
|
12
|
+
cMapUrl,
|
|
13
|
+
locale = 'en'
|
|
14
|
+
}) => {
|
|
15
|
+
const prefixCls = 'em-material-pdf';
|
|
15
16
|
//
|
|
16
17
|
//
|
|
17
18
|
//
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
19
|
+
return React.createElement(StyledMaterialPdfWrapper, {
|
|
20
|
+
className: classnames(prefixCls, className)
|
|
21
|
+
}, React.createElement(IntlProvider, {
|
|
22
|
+
locale: locale,
|
|
23
|
+
defaultLocale: "en",
|
|
24
|
+
messages: locale in locales ? locales[locale] : en
|
|
25
|
+
}, React.createElement(MaterialPdfContent, {
|
|
26
|
+
materialPdfId: materialPdfId,
|
|
27
|
+
cMapUrl: cMapUrl
|
|
28
|
+
})));
|
|
28
29
|
};
|
|
29
|
-
var MaterialPdf$1 = new IntlComponentBuilder(MaterialPdf).add('en', messageEn).add('ko', messageKo).addAsync('th', import('./locales/th.json.js')).addAsync('ja', import('./locales/ja.json.js')).build();
|
|
30
30
|
|
|
31
|
-
export { MaterialPdf
|
|
31
|
+
export { MaterialPdf as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const StyledMaterialPdfWrapper = styled.div.withConfig({
|
|
4
4
|
componentId: "sc-hovq54-0"
|
|
5
|
-
})(["margin:0;flex:2 1;
|
|
5
|
+
})(["margin:0;flex:2 1;height:100%;background-color:#22222c;"]);
|
|
6
6
|
|
|
7
7
|
export { StyledMaterialPdfWrapper };
|
|
@@ -1,76 +1,51 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
3
|
import { getOrgMaterialPdfGet, config } from '@elice/api-client';
|
|
4
|
-
import { Spinner,
|
|
5
|
-
import { useRawEliceIntl } from '@elice/intl';
|
|
4
|
+
import { Spinner, PdfRenderer } from '@elice/blocks';
|
|
6
5
|
import { useMaterialFetch } from '@elice/material-shared-utils';
|
|
7
6
|
import { enums } from '@elice/types';
|
|
8
7
|
|
|
9
8
|
//
|
|
10
9
|
//
|
|
11
10
|
//
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
var isPowerPointFile = useMemo(function () {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
|
|
29
|
-
var _URL = new URL(materialPdf.attachment.url),
|
|
30
|
-
pathname = _URL.pathname;
|
|
31
|
-
var currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
32
|
-
var currentFileExtension = (_b = currentFileName.split('.').pop()) !== null && _b !== void 0 ? _b : '';
|
|
33
|
-
return POWERPOINT_EXTENSIONS.some(function (extension) {
|
|
34
|
-
return currentFileExtension.toLowerCase().includes(extension);
|
|
35
|
-
});
|
|
36
|
-
}, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
|
|
37
|
-
var componentProps = useMemo(function () {
|
|
38
|
-
var _a;
|
|
39
|
-
return isPowerPointFile ? {
|
|
40
|
-
type: 'powerpoint',
|
|
41
|
-
src: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
42
|
-
i18n: {
|
|
43
|
-
error: intl.formatMessage({
|
|
44
|
-
id: 'pdf.status.error'
|
|
45
|
-
})
|
|
46
|
-
}
|
|
47
|
-
} : {
|
|
48
|
-
type: 'pdf',
|
|
49
|
-
key: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
50
|
-
file: (_a = materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) !== null && _a !== void 0 ? _a : '',
|
|
51
|
-
title: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title,
|
|
52
|
-
cMapUrl: cMapUrl,
|
|
53
|
-
hasError: !(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) || materialPdfStatus === 'rejected',
|
|
54
|
-
i18n: {
|
|
55
|
-
fullscreen: intl.formatMessage({
|
|
56
|
-
id: 'pdf.fullScreen'
|
|
57
|
-
}),
|
|
58
|
-
download: intl.formatMessage({
|
|
59
|
-
id: 'pdf.download'
|
|
60
|
-
}),
|
|
61
|
-
loading: intl.formatMessage({
|
|
62
|
-
id: 'pdf.status.loading'
|
|
63
|
-
}),
|
|
64
|
-
error: intl.formatMessage({
|
|
65
|
-
id: 'pdf.status.error'
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}, [cMapUrl, intl, isPowerPointFile, materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url, materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title, materialPdfStatus]);
|
|
11
|
+
const MaterialPdfContent = ({
|
|
12
|
+
materialPdfId,
|
|
13
|
+
cMapUrl
|
|
14
|
+
}) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const intl = useIntl();
|
|
17
|
+
const {
|
|
18
|
+
materialPdf,
|
|
19
|
+
status: materialPdfStatus
|
|
20
|
+
} = useMaterialFetch(enums.LectureMaterialType.PDF, React.useCallback(signal => getOrgMaterialPdfGet({
|
|
21
|
+
materialPdfId
|
|
22
|
+
}, {
|
|
23
|
+
signal
|
|
24
|
+
}), [materialPdfId]), config.init);
|
|
70
25
|
if (materialPdfStatus === 'pending') {
|
|
71
|
-
return
|
|
26
|
+
return React.createElement(Spinner, null);
|
|
72
27
|
}
|
|
73
|
-
return
|
|
28
|
+
return React.createElement(PdfRenderer, {
|
|
29
|
+
key: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url,
|
|
30
|
+
file: (_a = materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) !== null && _a !== void 0 ? _a : '',
|
|
31
|
+
title: materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.title,
|
|
32
|
+
cMapUrl: cMapUrl,
|
|
33
|
+
hasError: !(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url) || materialPdfStatus === 'rejected',
|
|
34
|
+
i18n: {
|
|
35
|
+
fullscreen: intl.formatMessage({
|
|
36
|
+
id: 'pdf.fullScreen'
|
|
37
|
+
}),
|
|
38
|
+
download: intl.formatMessage({
|
|
39
|
+
id: 'pdf.download'
|
|
40
|
+
}),
|
|
41
|
+
loading: intl.formatMessage({
|
|
42
|
+
id: 'pdf.status.loading'
|
|
43
|
+
}),
|
|
44
|
+
error: intl.formatMessage({
|
|
45
|
+
id: 'pdf.status.error'
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
});
|
|
74
49
|
};
|
|
75
50
|
|
|
76
51
|
export { MaterialPdfContent as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const en = {
|
|
2
|
+
'pdf.status.loading': 'Loading File...',
|
|
3
|
+
'pdf.status.error': 'Error occurred while loading file.',
|
|
4
|
+
'pdf.fullScreen': 'Full Screen',
|
|
5
|
+
'pdf.download': 'File download'
|
|
6
|
+
};
|
|
7
|
+
const ko = {
|
|
8
|
+
'pdf.status.loading': '수업 자료 로딩 중...',
|
|
9
|
+
'pdf.status.error': '수업 자료를 가져오는 중 문제가 발생하였습니다.',
|
|
10
|
+
'pdf.fullScreen': '화면 맞춤',
|
|
11
|
+
'pdf.download': '수업 자료 다운로드'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { en, ko };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-pdf",
|
|
3
|
-
"version": "1.240306.0
|
|
3
|
+
"version": "1.240306.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",
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
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
|
},
|
|
@@ -27,12 +29,12 @@
|
|
|
27
29
|
"@elice/blocks": "^1",
|
|
28
30
|
"@elice/design-tokens": "^1",
|
|
29
31
|
"@elice/icons": "^1",
|
|
30
|
-
"@elice/intl": "^0",
|
|
31
32
|
"@elice/markdown": "^1",
|
|
32
33
|
"@elice/material-shared-types": "*",
|
|
33
34
|
"@elice/material-shared-utils": "*",
|
|
34
35
|
"@elice/types": "^1",
|
|
35
36
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
37
|
+
"react-intl": "^5.0.0",
|
|
36
38
|
"react-use": "^17.0.0",
|
|
37
39
|
"styled-components": "^5.2.0"
|
|
38
40
|
},
|
|
@@ -41,21 +43,22 @@
|
|
|
41
43
|
"tslib": "^2.6.1"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
|
-
"@elice/api-client": "^1.
|
|
45
|
-
"@elice/blocks": "1.
|
|
46
|
+
"@elice/api-client": "^1.230815.0",
|
|
47
|
+
"@elice/blocks": "^1.230816.0",
|
|
46
48
|
"@elice/design-tokens": "^1.220803.0",
|
|
47
49
|
"@elice/icons": "^1.230814.0",
|
|
48
50
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
49
|
-
"@elice/
|
|
50
|
-
"@elice/
|
|
51
|
-
"@elice/material-shared-
|
|
52
|
-
"@elice/
|
|
53
|
-
"@elice/types": "1.241220.0",
|
|
51
|
+
"@elice/markdown": "^1.220815.0",
|
|
52
|
+
"@elice/material-shared-types": "1.240306.0",
|
|
53
|
+
"@elice/material-shared-utils": "1.240306.0",
|
|
54
|
+
"@elice/types": "^1.240208.0",
|
|
54
55
|
"@types/classnames": "^2.3.1",
|
|
55
56
|
"@types/react": "~17.0.9",
|
|
56
57
|
"@types/styled-components": "^5.1.21",
|
|
57
58
|
"react": "^17.0.2",
|
|
59
|
+
"react-intl": "^5.20.10",
|
|
58
60
|
"react-use": "^17.2.4",
|
|
59
61
|
"styled-components": "^5.3.0"
|
|
60
|
-
}
|
|
62
|
+
},
|
|
63
|
+
"gitHead": "c60a4ee0a90459f286596540aa4ac53240c21f7c"
|
|
61
64
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var messageEn = {"pdf.status.loading":"Loading File...","pdf.status.error":"Error occurred while loading file.","pdf.fullScreen":"Full Screen","pdf.download":"File download"};
|
|
6
|
-
|
|
7
|
-
exports.default = messageEn;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var en = require('./en.json.js');
|
|
4
|
-
var ko = require('./ko.json.js');
|
|
5
|
-
var th = require('./th.json.js');
|
|
6
|
-
var ja = require('./ja.json.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.messageEn = en.default;
|
|
11
|
-
exports.messageKo = ko.default;
|
|
12
|
-
exports.messageTh = th.default;
|
|
13
|
-
exports.messageJa = ja.default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var messageKo = {"pdf.status.loading":"{_termLibraryLecture} {_termLibraryLecturePage} 로딩 중...","pdf.status.error":"{_termLibraryLecture} {_termLibraryLecturePage}를 가져오는 중 문제가 발생하였습니다.","pdf.fullScreen":"화면 맞춤","pdf.download":"{_termLibraryLecture} {_termLibraryLecturePage} 다운로드"};
|
|
6
|
-
|
|
7
|
-
exports.default = messageKo;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var th = {"pdf.status.loading":"{_termLibraryLecture} {_termLibraryLecturePage} กำลังโหลด...","pdf.status.error":"เกิดข้อผิดพลาดในการดึงข้อมูล {_termLibraryLecture} {_termLibraryLecturePage}","pdf.fullScreen":"เต็มหน้าจอ","pdf.download":"ดาวน์โหลด {_termLibraryLecture} {_termLibraryLecturePage}"};
|
|
6
|
-
|
|
7
|
-
exports.default = th;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as MaterialPdf } from './MaterialPdf.js';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var messageKo = {"pdf.status.loading":"{_termLibraryLecture} {_termLibraryLecturePage} 로딩 중...","pdf.status.error":"{_termLibraryLecture} {_termLibraryLecturePage}를 가져오는 중 문제가 발생하였습니다.","pdf.fullScreen":"화면 맞춤","pdf.download":"{_termLibraryLecture} {_termLibraryLecturePage} 다운로드"};
|
|
2
|
-
|
|
3
|
-
export { messageKo as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var th = {"pdf.status.loading":"{_termLibraryLecture} {_termLibraryLecturePage} กำลังโหลด...","pdf.status.error":"เกิดข้อผิดพลาดในการดึงข้อมูล {_termLibraryLecture} {_termLibraryLecturePage}","pdf.fullScreen":"เต็มหน้าจอ","pdf.download":"ดาวน์โหลด {_termLibraryLecture} {_termLibraryLecturePage}"};
|
|
2
|
-
|
|
3
|
-
export { th as default };
|