@elice/material-pdf 1.251120.1 → 1.260128.0-rc.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,5 @@
1
- import React from 'react';
2
1
  import type { WithIntlComponentBuilderProps } from '@elice/intl';
2
+ import type React from 'react';
3
3
  export interface MaterialPdfProps {
4
4
  className?: string;
5
5
  materialPdfId: number;
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var intl = require('@elice/intl');
7
7
  var classnames = require('classnames');
8
- var en = require('./locales/en.json.js');
9
- var ko = require('./locales/ko.json.js');
10
8
  var MaterialPdfContent = require('./MaterialPdfContent.js');
11
9
  var MaterialPdf_styled = require('./MaterialPdf.styled.js');
10
+ var en = require('./locales/en.json.js');
11
+ var ko = require('./locales/ko.json.js');
12
12
 
13
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
14
14
 
@@ -34,6 +34,6 @@ var MaterialPdf = function MaterialPdf(_ref) {
34
34
  })
35
35
  });
36
36
  };
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();
37
+ var MaterialPdf_default = 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
38
 
39
- exports.default = MaterialPdf$1;
39
+ exports.default = MaterialPdf_default;
@@ -1 +1,4 @@
1
- export declare const StyledMaterialPdfWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const StyledMaterialPdfWrapper: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,13 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var styled = require('styled-components');
3
+ var _styled = require('@emotion/styled/base');
4
4
 
5
5
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
6
6
 
7
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
7
+ var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
8
8
 
9
- var StyledMaterialPdfWrapper = styled__default.default.div.withConfig({
10
- componentId: "sc-hovq54-0"
11
- })(["margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c;"]);
9
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10
+ var StyledMaterialPdfWrapper = /*#__PURE__*/_styled__default.default("div", {
11
+ target: "egr64h00"
12
+ })("production" === "production" ? {
13
+ name: "193oemp",
14
+ styles: "margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c"
15
+ } : {
16
+ name: "193oemp",
17
+ styles: "margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c",
18
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
19
+ });
12
20
 
13
21
  exports.StyledMaterialPdfWrapper = StyledMaterialPdfWrapper;
@@ -33,7 +33,9 @@ var MaterialPdfContent = function MaterialPdfContent(_ref) {
33
33
  materialPdfStatus = _useMaterialFetch.status;
34
34
  var isPowerPointFile = React.useMemo(function () {
35
35
  var _a, _b;
36
- if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
36
+ if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) {
37
+ return false;
38
+ }
37
39
  var _URL = new URL(materialPdf.attachment.url),
38
40
  pathname = _URL.pathname;
39
41
  var currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
@@ -41,7 +43,7 @@ var MaterialPdfContent = function MaterialPdfContent(_ref) {
41
43
  return POWERPOINT_EXTENSIONS.some(function (extension) {
42
44
  return currentFileExtension.toLowerCase().includes(extension);
43
45
  });
44
- }, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
46
+ }, [materialPdf]);
45
47
  var componentProps = React.useMemo(function () {
46
48
  var _a;
47
49
  return isPowerPointFile ? {
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import type { WithIntlComponentBuilderProps } from '@elice/intl';
2
+ import type React from 'react';
3
3
  export interface MaterialPdfProps {
4
4
  className?: string;
5
5
  materialPdfId: number;
@@ -1,10 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
3
3
  import classnames from 'classnames';
4
- import messageEn from './locales/en.json.js';
5
- import messageKo from './locales/ko.json.js';
6
4
  import MaterialPdfContent from './MaterialPdfContent.js';
7
5
  import { StyledMaterialPdfWrapper } from './MaterialPdf.styled.js';
6
+ import messageEn from './locales/en.json.js';
7
+ import messageKo from './locales/ko.json.js';
8
8
 
9
9
  var MaterialPdf = function MaterialPdf(_ref) {
10
10
  var className = _ref.className,
@@ -26,6 +26,6 @@ var MaterialPdf = function MaterialPdf(_ref) {
26
26
  })
27
27
  });
28
28
  };
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();
29
+ var MaterialPdf_default = 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$1 as default };
31
+ export { MaterialPdf_default as default };
@@ -1 +1,4 @@
1
- export declare const StyledMaterialPdfWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ export declare const StyledMaterialPdfWrapper: import("@emotion/styled").StyledComponent<{
2
+ theme?: import("@emotion/react").Theme;
3
+ as?: React.ElementType;
4
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,7 +1,15 @@
1
- import styled from 'styled-components';
1
+ import _styled from '@emotion/styled/base';
2
2
 
3
- var StyledMaterialPdfWrapper = styled.div.withConfig({
4
- componentId: "sc-hovq54-0"
5
- })(["margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c;"]);
3
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
4
+ var StyledMaterialPdfWrapper = /*#__PURE__*/_styled("div", {
5
+ target: "egr64h00"
6
+ })("production" === "production" ? {
7
+ name: "193oemp",
8
+ styles: "margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c"
9
+ } : {
10
+ name: "193oemp",
11
+ styles: "margin:0;flex:2 1;width:100%;height:100%;overflow:hidden;background-color:#22222c",
12
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
13
+ });
6
14
 
7
15
  export { StyledMaterialPdfWrapper };
@@ -25,7 +25,9 @@ var MaterialPdfContent = function MaterialPdfContent(_ref) {
25
25
  materialPdfStatus = _useMaterialFetch.status;
26
26
  var isPowerPointFile = useMemo(function () {
27
27
  var _a, _b;
28
- if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) return false;
28
+ if (!(materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url)) {
29
+ return false;
30
+ }
29
31
  var _URL = new URL(materialPdf.attachment.url),
30
32
  pathname = _URL.pathname;
31
33
  var currentFileName = (_a = pathname.split('/').pop()) !== null && _a !== void 0 ? _a : '';
@@ -33,7 +35,7 @@ var MaterialPdfContent = function MaterialPdfContent(_ref) {
33
35
  return POWERPOINT_EXTENSIONS.some(function (extension) {
34
36
  return currentFileExtension.toLowerCase().includes(extension);
35
37
  });
36
- }, [materialPdf === null || materialPdf === void 0 ? void 0 : materialPdf.attachment.url]);
38
+ }, [materialPdf]);
37
39
  var componentProps = useMemo(function () {
38
40
  var _a;
39
41
  return isPowerPointFile ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-pdf",
3
- "version": "1.251120.1",
3
+ "version": "1.260128.0-rc.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,12 +29,13 @@
29
29
  "@elice/icons": "^1",
30
30
  "@elice/intl": "^0",
31
31
  "@elice/markdown": "^1",
32
- "@elice/material-shared-types": "*",
33
- "@elice/material-shared-utils": "*",
32
+ "@elice/material-shared-types": "1.260128.0-rc.0",
33
+ "@elice/material-shared-utils": "1.260128.0-rc.0",
34
34
  "@elice/types": "^1",
35
+ "@emotion/react": "^11.10.0",
36
+ "@emotion/styled": "^11.10.0",
35
37
  "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
36
- "react-use": "^17.0.0",
37
- "styled-components": "^5.2.0"
38
+ "react-use": "^17.0.0"
38
39
  },
39
40
  "dependencies": {
40
41
  "classnames": "^2.2.0",
@@ -48,14 +49,14 @@
48
49
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
49
50
  "@elice/intl": "0.241127.0",
50
51
  "@elice/markdown": "1.241015.0",
51
- "@elice/material-shared-types": "1.251120.1",
52
- "@elice/material-shared-utils": "1.251120.1",
53
- "@elice/types": "^1.250612.0-teamleaderboard.1",
52
+ "@elice/material-shared-types": "1.260128.0-rc.0",
53
+ "@elice/material-shared-utils": "1.260128.0-rc.0",
54
+ "@elice/types": "^1.251229.0",
55
+ "@emotion/react": "^11.10.0",
56
+ "@emotion/styled": "^11.10.0",
54
57
  "@types/classnames": "^2.3.1",
55
58
  "@types/react": "~17.0.9",
56
- "@types/styled-components": "^5.1.21",
57
59
  "react": "^17.0.2",
58
- "react-use": "^17.2.4",
59
- "styled-components": "^5.3.0"
60
+ "react-use": "^17.2.4"
60
61
  }
61
62
  }