@zextras/carbonio-ui-preview 0.0.4 → 0.1.2
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/README.md +4 -4
- package/babel.config.js +13 -0
- package/package.json +11 -18
- package/src/preview/PdfPreview.tsx +1 -1
- package/src/preview/PreviewManager.tsx +1 -1
- package/src/preview/PreviewWrapper.tsx +1 -1
- package/dist/carbonio-ui-preview.es.d.ts +0 -1
- package/dist/carbonio-ui-preview.es.js +0 -30226
- package/dist/pdf.worker.js +0 -92711
package/README.md
CHANGED
|
@@ -10,10 +10,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|
|
10
10
|
Preview utility for Zextras Carbonio
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
<a href="https://github.com/zextras/carbonio-ui-
|
|
14
|
-
<img src="https://img.shields.io/github/contributors/zextras/carbonio-ui-
|
|
15
|
-
<a href="https://github.com/zextras/carbonio-ui-
|
|
16
|
-
<img src="https://img.shields.io/github/commit-activity/m/zextras/carbonio-ui-
|
|
13
|
+
<a href="https://github.com/zextras/carbonio-ui-previewer/graphs/contributors" alt="Contributors">
|
|
14
|
+
<img src="https://img.shields.io/github/contributors/zextras/carbonio-ui-previewer" /></a>
|
|
15
|
+
<a href="https://github.com/zextras/carbonio-ui-previewer/pulse" alt="Activity">
|
|
16
|
+
<img src="https://img.shields.io/github/commit-activity/m/zextras/carbonio-ui-previewer" /></a>
|
|
17
17
|
<img src="https://img.shields.io/badge/license-AGPL%203-green" alt="License AGPL 3">
|
|
18
18
|
<img src="https://img.shields.io/badge/project-carbonio-informational" alt="Project Carbonio">
|
|
19
19
|
<a href="https://twitter.com/intent/follow?screen_name=zextras">
|
package/babel.config.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SPDX-FileCopyrightText: 2021 Zextras <https://www.zextras.com>
|
|
3
|
+
*
|
|
4
|
+
* SPDX-License-Identifier: AGPL-3.0-only
|
|
5
|
+
*/
|
|
6
|
+
module.exports = {
|
|
7
|
+
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
|
|
8
|
+
plugins: [
|
|
9
|
+
'@babel/plugin-transform-runtime',
|
|
10
|
+
'@babel/plugin-proposal-class-properties',
|
|
11
|
+
'babel-plugin-styled-components'
|
|
12
|
+
]
|
|
13
|
+
};
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zextras/carbonio-ui-preview",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Preview
|
|
5
|
-
"main": "
|
|
6
|
-
"
|
|
7
|
-
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Preview utility for Zextras Carbonio",
|
|
5
|
+
"main": "src/index.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/*",
|
|
8
|
+
"babel.config.js"
|
|
9
|
+
],
|
|
8
10
|
"scripts": {
|
|
9
|
-
"build": "vite build",
|
|
10
|
-
"build:watch": "vite build --watch",
|
|
11
11
|
"_postinstall": "is-ci || husky install",
|
|
12
12
|
"prepublishOnly": "pinst --disable",
|
|
13
13
|
"postpublish": "pinst --enable",
|
|
14
14
|
"type-check": "tsc --noEmit",
|
|
15
15
|
"type-check:watch": "npm run type-check -- --watch",
|
|
16
16
|
"lint": "eslint --ext .js,.jsx,.ts,.tsx --resolve-plugins-relative-to node_modules/@zextras/carbonio-ui-configs src",
|
|
17
|
-
"test": "jest"
|
|
17
|
+
"test": "echo jest"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [],
|
|
20
20
|
"author": "Zextras SF Team <https://www.zextras.com/carbonio/>",
|
|
@@ -31,21 +31,14 @@
|
|
|
31
31
|
"eslint-plugin-notice": "^0.9.10",
|
|
32
32
|
"husky": "^5.2.0",
|
|
33
33
|
"is-ci": "3.0.1",
|
|
34
|
-
"pinst": "2.1.6"
|
|
35
|
-
"vite": "^2.9.1",
|
|
36
|
-
"vite-dts": "^1.0.4",
|
|
37
|
-
"vite-plugin-shim-react-pdf": "^1.0.5",
|
|
38
|
-
"vite-plugin-static-copy": "^0.4.4"
|
|
34
|
+
"pinst": "2.1.6"
|
|
39
35
|
},
|
|
40
36
|
"dependencies": {
|
|
41
|
-
"browserify-zlib": "^0.2.0",
|
|
42
37
|
"core-js": "3.19.1",
|
|
43
|
-
"
|
|
44
|
-
"react-pdf": "^5.7.1",
|
|
45
|
-
"vite-compatible-readable-stream": "^3.6.0"
|
|
38
|
+
"react-pdf": "^5.7.1"
|
|
46
39
|
},
|
|
47
40
|
"peerDependencies": {
|
|
48
|
-
"@zextras/carbonio-design-system": "^0.
|
|
41
|
+
"@zextras/carbonio-design-system": "^0.2.0",
|
|
49
42
|
"lodash": "^4.17.21",
|
|
50
43
|
"react": "^17.0.2",
|
|
51
44
|
"react-dom": "^17.0.2",
|
|
@@ -16,7 +16,7 @@ import findIndex from 'lodash/findIndex';
|
|
|
16
16
|
import findLastIndex from 'lodash/findLastIndex';
|
|
17
17
|
import map from 'lodash/map';
|
|
18
18
|
import type { DocumentProps } from 'react-pdf';
|
|
19
|
-
import { Document, Page } from 'react-pdf';
|
|
19
|
+
import { Document, Page } from 'react-pdf/dist/esm/entry.webpack';
|
|
20
20
|
import styled, { css, SimpleInterpolation } from 'styled-components';
|
|
21
21
|
|
|
22
22
|
import FocusWithin from './FocusWithin';
|
|
@@ -9,7 +9,7 @@ import React, { useCallback, createContext, useReducer } from 'react';
|
|
|
9
9
|
import { ImagePreviewProps } from './ImagePreview';
|
|
10
10
|
import { PdfPreviewProps } from './PdfPreview';
|
|
11
11
|
import { PreviewWrapper, PreviewWrapperProps } from './PreviewWrapper';
|
|
12
|
-
import {MakeOptional} from
|
|
12
|
+
import { MakeOptional } from '../utils';
|
|
13
13
|
|
|
14
14
|
type CreatePreviewArgType = (
|
|
15
15
|
| MakeOptional<Omit<ImagePreviewProps, 'show'>, 'onClose'>
|
|
@@ -17,4 +17,4 @@ type PreviewWrapperProps = PreviewsProps & {
|
|
|
17
17
|
const PreviewWrapper: React.VFC<PreviewWrapperProps> = ({ previewType, ...props }) =>
|
|
18
18
|
previewType === 'pdf' ? <PdfPreview {...props} /> : <ImagePreview {...props} />;
|
|
19
19
|
|
|
20
|
-
export { PreviewWrapper, PreviewWrapperProps }
|
|
20
|
+
export { PreviewWrapper, PreviewWrapperProps };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../src/index"
|