@elice/material-pdf 1.240524.0-ppsx.2 → 1.240612.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.
|
@@ -27,9 +27,14 @@ const MaterialPdfContent = ({
|
|
|
27
27
|
signal
|
|
28
28
|
}), [materialPdfId]), apiClient.config.init);
|
|
29
29
|
const isPowerPointFile = React.useMemo(() => {
|
|
30
|
+
var _a, _b;
|
|
30
31
|
if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
|
|
31
|
-
const
|
|
32
|
-
|
|
32
|
+
const {
|
|
33
|
+
pathname
|
|
34
|
+
} = new URL(materialPdf.attachment.url);
|
|
35
|
+
const currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
36
|
+
const currentFileExtension = (_b = currentFileName.split('.').pop()) !== null && _b !== void 0 ? _b : '';
|
|
37
|
+
return POWERPOINT_EXTENSIONS.some(extension => currentFileExtension.toLowerCase().includes(extension));
|
|
33
38
|
}, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
|
|
34
39
|
const componentProps = React.useMemo(() => {
|
|
35
40
|
var _a;
|
|
@@ -23,9 +23,14 @@ const MaterialPdfContent = ({
|
|
|
23
23
|
signal
|
|
24
24
|
}), [materialPdfId]), config.init);
|
|
25
25
|
const isPowerPointFile = useMemo(() => {
|
|
26
|
+
var _a, _b;
|
|
26
27
|
if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
|
|
27
|
-
const
|
|
28
|
-
|
|
28
|
+
const {
|
|
29
|
+
pathname
|
|
30
|
+
} = new URL(materialPdf.attachment.url);
|
|
31
|
+
const currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
32
|
+
const currentFileExtension = (_b = currentFileName.split('.').pop()) !== null && _b !== void 0 ? _b : '';
|
|
33
|
+
return POWERPOINT_EXTENSIONS.some(extension => currentFileExtension.toLowerCase().includes(extension));
|
|
29
34
|
}, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
|
|
30
35
|
const componentProps = useMemo(() => {
|
|
31
36
|
var _a;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-pdf",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240612.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",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@elice/api-client": "^1.230815.0",
|
|
47
|
-
"@elice/blocks": "1.
|
|
47
|
+
"@elice/blocks": "1.240529.0",
|
|
48
48
|
"@elice/design-tokens": "^1.220803.0",
|
|
49
49
|
"@elice/icons": "^1.230814.0",
|
|
50
50
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
51
51
|
"@elice/intl": "0.240425.0-rc.2",
|
|
52
52
|
"@elice/markdown": "^1.220815.0",
|
|
53
|
-
"@elice/material-shared-types": "1.
|
|
54
|
-
"@elice/material-shared-utils": "1.
|
|
53
|
+
"@elice/material-shared-types": "1.240612.0",
|
|
54
|
+
"@elice/material-shared-utils": "1.240612.0",
|
|
55
55
|
"@elice/types": "^1.240208.0",
|
|
56
56
|
"@types/classnames": "^2.3.1",
|
|
57
57
|
"@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": "
|
|
63
|
+
"gitHead": "daade4b7db7cef4b9f134988c8165dbd68a6fc82"
|
|
64
64
|
}
|