mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 19:38:16 +08:00
chore: 换一下 office-viewer 包名 (#7321)
* chore: 换一下 office-viewer 包名 * 恢复误改的文件
This commit is contained in:
parent
10ddff8199
commit
0f97e378d9
2
.github/workflows/gh-pages.yml
vendored
2
.github/workflows/gh-pages.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
- name: build gh-pages
|
||||
run: |
|
||||
npm i --legacy-peer-deps
|
||||
cd packages/ooxml-viewer
|
||||
cd packages/office-viewer
|
||||
npm i --legacy-peer-deps
|
||||
cd ../../
|
||||
npm run build --workspaces
|
||||
|
4
.github/workflows/pr-test.yml
vendored
4
.github/workflows/pr-test.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
NODE_OPTIONS: '--max-old-space-size=8192'
|
||||
run: |
|
||||
npm i --legacy-peer-deps
|
||||
cd packages/ooxml-viewer
|
||||
cd packages/office-viewer
|
||||
npm i --legacy-peer-deps
|
||||
cd ../../
|
||||
npm run build --workspace amis-formula
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
- name: test
|
||||
run: |
|
||||
npm test --workspaces
|
||||
cd packages/ooxml-viewer
|
||||
cd packages/office-viewer
|
||||
npm test
|
||||
cd ../../
|
||||
sh deploy-gh-pages.sh
|
||||
|
@ -17,7 +17,7 @@
|
||||
"path": "./packages/amis"
|
||||
},
|
||||
{
|
||||
"path": "./packages/ooxml-viewer"
|
||||
"path": "./packages/office-viewer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
10
fis-conf.js
10
fis-conf.js
@ -495,7 +495,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!markdown-it/**',
|
||||
'!markdown-it-html5-media/**',
|
||||
'!punycode/**',
|
||||
'!ooxml-viewer/**',
|
||||
'!office-viewer/**',
|
||||
'!fflate/**'
|
||||
],
|
||||
|
||||
@ -544,7 +544,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'echarts-wordcloud/**'
|
||||
],
|
||||
|
||||
'ooxml-viewer.js': ['ooxml-viewer/**', 'fflate/**'],
|
||||
'office-viewer.js': ['office-viewer/**', 'fflate/**'],
|
||||
|
||||
'rest.js': [
|
||||
'*.js',
|
||||
@ -569,7 +569,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!uc.micro/**',
|
||||
'!markdown-it/**',
|
||||
'!markdown-it-html5-media/**',
|
||||
'!ooxml-viewer/**',
|
||||
'!office-viewer/**',
|
||||
'!fflate/**'
|
||||
]
|
||||
}),
|
||||
@ -800,7 +800,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!punycode/**',
|
||||
'!amis-formula/**',
|
||||
'!fflate/**',
|
||||
'!ooxml-viewer/**',
|
||||
'!office-viewer/**',
|
||||
'!amis-core/**',
|
||||
'!amis-ui/**',
|
||||
'!amis/**'
|
||||
@ -866,7 +866,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!/examples/components/EChartsEditor/Common.tsx'
|
||||
],
|
||||
|
||||
'pkg/ooxml-viewer.js': ['ooxml-viewer/**', 'fflate/**'],
|
||||
'pkg/office-viewer.js': ['office-viewer/**', 'fflate/**'],
|
||||
|
||||
'pkg/rest.js': [
|
||||
'**.{js,jsx,ts,tsx}',
|
||||
|
@ -118,7 +118,7 @@
|
||||
"^amis\\-ui$": "<rootDir>/packages/amis-ui/src/index.tsx",
|
||||
"^amis\\-core$": "<rootDir>/packages/amis-core/src/index.tsx",
|
||||
"^amis\\-formula$": "<rootDir>/packages/amis-formula/src/index.ts",
|
||||
"^office\\-viewer$": "<rootDir>/packages/ooxml-viewer/src/index.ts",
|
||||
"^office\\-viewer$": "<rootDir>/packages/office-viewer/src/index.ts",
|
||||
"^amis$": "<rootDir>/packages/amis/src/index.tsx"
|
||||
},
|
||||
"setupFilesAfterEnv": [
|
||||
|
@ -176,7 +176,9 @@ export class OfficeViewerPlugin extends BasePlugin {
|
||||
},
|
||||
{
|
||||
title: '外观',
|
||||
className: 'p-none'
|
||||
body: getSchemaTpl('collapseGroup', [
|
||||
getSchemaTpl('style:classNames', {isFormItem: false})
|
||||
])
|
||||
}
|
||||
])
|
||||
];
|
||||
|
@ -60,7 +60,7 @@
|
||||
"mobx-state-tree": "^3.17.3",
|
||||
"moment": "^2.19.4",
|
||||
"mpegts.js": "^1.6.10",
|
||||
"ooxml-viewer": "^0.1.3",
|
||||
"office-viewer": "^0.1.3",
|
||||
"prop-types": "^15.6.1",
|
||||
"qrcode.react": "^3.1.0",
|
||||
"rc-overflow": "^1.2.4",
|
||||
@ -238,7 +238,7 @@
|
||||
"peerDependencies": {
|
||||
"amis-core": "*",
|
||||
"amis-ui": "*",
|
||||
"ooxml-viewer": "*",
|
||||
"office-viewer": "*",
|
||||
"react": ">=16.8.6",
|
||||
"react-dom": ">=16.8.6"
|
||||
},
|
||||
|
@ -119,7 +119,7 @@ function getPlugins(format = 'esm') {
|
||||
'amis-formula',
|
||||
'amis-core',
|
||||
'amis-ui',
|
||||
'ooxml-viewer'
|
||||
'office-viewer'
|
||||
].reduce(
|
||||
(prev, current) => ({
|
||||
...prev,
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
resolveVariableAndFilter,
|
||||
ScopedContext
|
||||
} from 'amis-core';
|
||||
import type {Word} from 'ooxml-viewer';
|
||||
import type {Word} from 'office-viewer';
|
||||
import {Spinner} from 'amis-ui';
|
||||
|
||||
export interface OfficeViewerSchema extends BaseSchema {
|
||||
@ -156,7 +156,7 @@ export default class OfficeViewer extends React.Component<
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
|
||||
import('ooxml-viewer').then(async (officeViewer: any) => {
|
||||
import('office-viewer').then(async (officeViewer: any) => {
|
||||
const Word = officeViewer.Word;
|
||||
const word = new Word(response.data, {
|
||||
...wordOptions,
|
||||
@ -186,7 +186,7 @@ export default class OfficeViewer extends React.Component<
|
||||
reader.onload = _e => {
|
||||
const data = reader.result as ArrayBuffer;
|
||||
|
||||
import('ooxml-viewer').then(async (officeViewer: any) => {
|
||||
import('office-viewer').then(async (officeViewer: any) => {
|
||||
const Word = officeViewer.Word;
|
||||
const word = new Word(data, {
|
||||
...wordOptions,
|
||||
@ -216,7 +216,7 @@ export default class OfficeViewer extends React.Component<
|
||||
loadingConfig
|
||||
} = this.props;
|
||||
return (
|
||||
<div ref={this.rootElement} className={cx('ooxml-viewer', className)}>
|
||||
<div ref={this.rootElement} className={cx('office-viewer', className)}>
|
||||
{/* 避免没内容时编辑器都选不了 */}
|
||||
{display !== false && !src && !name && (
|
||||
<svg width="100%" height="100" xmlns="http://www.w3.org/2000/svg">
|
||||
|
@ -14,6 +14,6 @@
|
||||
"references": [
|
||||
{"path": "../amis-core"},
|
||||
{"path": "../amis-ui"},
|
||||
{"path": "../ooxml-viewer"}
|
||||
{"path": "../office-viewer"}
|
||||
]
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user