Skip to content

Commit

Permalink
Revert "feat: 支持PDF预览" (baidu#9694)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Feb 29, 2024
1 parent b1252fe commit eccd5c7
Show file tree
Hide file tree
Showing 16 changed files with 5 additions and 486 deletions.
54 changes: 0 additions & 54 deletions docs/zh-CN/components/pdf-viewer.md

This file was deleted.

7 changes: 0 additions & 7 deletions examples/components/Components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -987,13 +987,6 @@ export const components = [
import('../../docs/zh-CN/components/office-viewer.md').then(wrapDoc)
)
},
{
label: 'PDFViewer 渲染',
path: '/zh-CN/components/pdf-viewer',
component: React.lazy(() =>
import('../../docs/zh-CN/components/pdf-viewer.md').then(wrapDoc)
)
},
{
label: 'Progress 进度条',
path: '/zh-CN/components/progress',
Expand Down
8 changes: 0 additions & 8 deletions examples/components/Example.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ import Tab3Schema from './Tabs/Tab3';
import Loading from './Loading';
import CodeSchema from './Code';
import OfficeViewer from './OfficeViewer';
import PdfViewer from './PdfViewer';
import InputTableEvent from './EventAction/cmpt-event-action/InputTableEvent';
import WizardPage from './WizardPage';

Expand Down Expand Up @@ -913,13 +912,6 @@ export const examples = [
component: makeSchemaRenderer(OfficeViewer)
},

{
label: 'Pdf 预览',
icon: 'fa fa-file-pdf',
path: '/examples/pdf-viewer',
component: makeSchemaRenderer(PdfViewer)
},

{
label: '多 loading',
icon: 'fa fa-spinner',
Expand Down
23 changes: 0 additions & 23 deletions examples/components/PdfViewer.jsx

This file was deleted.

Binary file removed examples/static/simple.pdf
Binary file not shown.
9 changes: 1 addition & 8 deletions fis-conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ fis.match('/examples/mod.js', {
isMod: false
});

fis.match('{markdown-it,moment-timezone,pdfjs-dist}/**', {
fis.match('{markdown-it,moment-timezone}/**', {
preprocessor: fis.plugin('js-require-file')
});

Expand Down Expand Up @@ -503,7 +503,6 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!amis-ui/lib/components/RichText.js',
'!amis-ui/lib/components/Tinymce.js',
'!amis-ui/lib/components/ColorPicker.js',
'!amis-ui/lib/components/PdfViewer.js',
'!react-color/**',
'!material-colors/**',
'!reactcss/**',
Expand Down Expand Up @@ -563,11 +562,6 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'tinycolor2/**'
],

'pdf-viewer.js': [
'amis-ui/lib/components/PdfViewer.js',
'pdfjs-dist/build/pdf.worker.min.js'
],

'cropperjs.js': ['cropperjs/**', 'react-cropper/**'],

'barcode.js': ['src/components/BarCode.tsx', 'jsbarcode/**'],
Expand All @@ -590,7 +584,6 @@ if (fis.project.currentMedia() === 'publish-sdk') {
'!mpegts.js/**',
'!hls.js/**',
'!froala-editor/**',
'!pdfjs-dist/**',

'!amis-ui/lib/components/RichText.js',
'!zrender/**',
Expand Down
3 changes: 1 addition & 2 deletions packages/amis-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
"react-intersection-observer": "9.5.2",
"react-json-view": "1.21.3",
"react-overlays": "5.1.1",
"react-pdf": "^7.7.1",
"react-textarea-autosize": "8.3.3",
"react-transition-group": "4.4.2",
"react-visibility-sensor": "5.1.1",
Expand Down Expand Up @@ -144,4 +143,4 @@
]
},
"gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4"
}
}
3 changes: 1 addition & 2 deletions packages/amis-ui/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ const input = [
'./src/components/Markdown.tsx',
'./src/components/Tinymce.tsx',
'./src/components/RichText.tsx',
'./src/components/CityDB.ts',
'./src/components/PdfViewer.tsx'
'./src/components/CityDB.ts'
];

/** 获取子包编译后的入口路径,需要使用相对路径 */
Expand Down
45 changes: 0 additions & 45 deletions packages/amis-ui/scss/components/_pdf_viewer.scss

This file was deleted.

1 change: 0 additions & 1 deletion packages/amis-ui/scss/themes/_common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,5 @@
@import '../components/debug';
@import '../components/menu';
@import '../components/overflow-tpl';
@import '../components/pdf_viewer';

@import '../components/print';
143 changes: 0 additions & 143 deletions packages/amis-ui/src/components/PdfViewer.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/amis-ui/src/components/TimelineItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {localeable, LocaleProps} from 'amis-core';
import {themeable, ThemeProps} from 'amis-core';
import {Icon} from './icons';

import type {IconCheckedSchema} from '../index';
import type {IconCheckedSchema} from 'amis-ui';

export interface TimelineItemProps {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/amis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,4 @@
"react-dom": ">=16.8.6"
},
"gitHead": "37d23b4a8eb1c663bc38e8dd9040889ea1526ec4"
}
}
1 change: 0 additions & 1 deletion packages/amis/src/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ export type SchemaType =
| 'input-formula'
| 'diff-editor'
| 'office-viewer'
| 'pdf-viewer'

// editor 系列
| 'editor'
Expand Down

0 comments on commit eccd5c7

Please sign in to comment.