Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update the version to 0.4.2 & remove wasm #95

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
@univerjs-pro:registry="https://verdaccio.univer.work/"
@univerjs:registry="https://verdaccio.univer.work/"
94 changes: 49 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,53 +26,57 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@univerjs-pro/collaboration": "^0.2.14",
"@univerjs-pro/exchange-client": "^0.2.14",
"@univerjs/core": "^0.2.14",
"@univerjs/data-validation": "^0.2.14",
"@univerjs/design": "^0.2.14",
"@univerjs/docs": "^0.2.14",
"@univerjs/docs-drawing": "^0.2.14",
"@univerjs/docs-drawing-ui": "^0.2.14",
"@univerjs/docs-hyper-link": "^0.2.14",
"@univerjs/docs-hyper-link-ui": "^0.2.14",
"@univerjs/docs-thread-comment-ui": "^0.2.14",
"@univerjs/docs-ui": "^0.2.14",
"@univerjs/drawing": "^0.2.14",
"@univerjs/drawing-ui": "^0.2.14",
"@univerjs/engine-formula": "^0.2.14",
"@univerjs/engine-numfmt": "^0.2.14",
"@univerjs/engine-render": "^0.2.14",
"@univerjs/facade": "^0.2.14",
"@univerjs/find-replace": "^0.2.14",
"@univerjs-pro/collaboration": "^0.4.2",
"@univerjs-pro/exchange-client": "^0.4.2",
"@univerjs/core": "^0.4.2",
"@univerjs/data-validation": "^0.4.2",
"@univerjs/design": "^0.4.2",
"@univerjs/docs": "^0.4.2",
"@univerjs/docs-drawing": "^0.4.2",
"@univerjs/docs-drawing-ui": "^0.4.2",
"@univerjs/docs-hyper-link": "^0.4.2",
"@univerjs/docs-hyper-link-ui": "^0.4.2",
"@univerjs/docs-thread-comment-ui": "^0.4.2",
"@univerjs/docs-ui": "^0.4.2",
"@univerjs/drawing": "^0.4.2",
"@univerjs/drawing-ui": "^0.4.2",
"@univerjs/engine-formula": "^0.4.2",
"@univerjs/engine-numfmt": "^0.4.2",
"@univerjs/engine-render": "^0.4.2",
"@univerjs/facade": "^0.4.2",
"@univerjs/find-replace": "^0.4.2",
"@univerjs/icons": "^0.1.78",
"@univerjs/network": "^0.2.14",
"@univerjs/network": "^0.4.2",
"@univerjs/protocol": "^0.1.38",
"@univerjs/rpc": "^0.2.14",
"@univerjs/sheets": "^0.2.14",
"@univerjs/sheets-conditional-formatting": "^0.2.14",
"@univerjs/sheets-conditional-formatting-ui": "^0.2.14",
"@univerjs/sheets-crosshair-highlight": "^0.2.14",
"@univerjs/sheets-data-validation": "^0.2.14",
"@univerjs/sheets-drawing": "^0.2.14",
"@univerjs/sheets-drawing-ui": "^0.2.14",
"@univerjs/sheets-filter": "^0.2.14",
"@univerjs/sheets-filter-ui": "^0.2.14",
"@univerjs/sheets-find-replace": "^0.2.14",
"@univerjs/sheets-formula": "^0.2.14",
"@univerjs/sheets-hyper-link": "^0.2.14",
"@univerjs/sheets-hyper-link-ui": "^0.2.14",
"@univerjs/sheets-numfmt": "^0.2.14",
"@univerjs/sheets-sort": "^0.2.14",
"@univerjs/sheets-sort-ui": "^0.2.14",
"@univerjs/sheets-thread-comment": "^0.2.14",
"@univerjs/sheets-thread-comment-base": "^0.2.14",
"@univerjs/sheets-ui": "^0.2.14",
"@univerjs/sheets-zen-editor": "^0.2.14",
"@univerjs/telemetry": "^0.2.14",
"@univerjs/thread-comment": "^0.2.14",
"@univerjs/thread-comment-ui": "^0.2.14",
"@univerjs/ui": "^0.2.14",
"@univerjs/rpc": "^0.4.2",
"@univerjs/sheets": "^0.4.2",
"@univerjs/sheets-conditional-formatting": "^0.4.2",
"@univerjs/sheets-conditional-formatting-ui": "^0.4.2",
"@univerjs/sheets-crosshair-highlight": "^0.4.2",
"@univerjs/sheets-data-validation": "^0.4.2",
"@univerjs/sheets-data-validation-ui": "^0.4.2",
"@univerjs/sheets-drawing": "^0.4.2",
"@univerjs/sheets-drawing-ui": "^0.4.2",
"@univerjs/sheets-filter": "^0.4.2",
"@univerjs/sheets-filter-ui": "^0.4.2",
"@univerjs/sheets-find-replace": "^0.4.2",
"@univerjs/sheets-formula": "^0.4.2",
"@univerjs/sheets-formula-ui": "^0.4.2",
"@univerjs/sheets-hyper-link": "^0.4.2",
"@univerjs/sheets-hyper-link-ui": "^0.4.2",
"@univerjs/sheets-numfmt": "^0.4.2",
"@univerjs/sheets-sort": "^0.4.2",
"@univerjs/sheets-sort-ui": "^0.4.2",
"@univerjs/sheets-thread-comment": "^0.4.2",
"@univerjs/sheets-thread-comment-base": "^0.4.2",
"@univerjs/sheets-ui": "^0.4.2",
"@univerjs/sheets-zen-editor": "^0.4.2",
"@univerjs/telemetry": "^0.4.2",
"@univerjs/thread-comment": "^0.4.2",
"@univerjs/thread-comment-ui": "^0.4.2",
"@univerjs/ui": "^0.4.2",
"@univerjs/uniscript": "^0.4.2",
"@univerjs/watermark": "^0.4.2",
"defu": "^6.1.4",
"jszip": "^3.10.1",
"rxjs": "^7.8.1",
Expand Down
1,749 changes: 892 additions & 857 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

15 changes: 0 additions & 15 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ import { addIcon, Plugin } from 'obsidian'
import { ChooseTypeModal } from './modals/chooseType'
import { SettingTab } from './modals/settingTab'
import { univerIconSvg } from './utils/common'
import { injectWasm } from './utils/wasm'
import { Type as UDocType, UDocView } from './views/udoc'
import { Type as USheetType, USheetView } from './views/usheet'
import { Type as XlsxType, XlsxTypeView } from './views/xlsx'
import './style/univer.css'

export type ViewType = typeof USheetType | typeof UDocType
export default class UniverPlugin extends Plugin {
settings: UniverPluginSettings
async onload() {
await this.loadSettings()
await injectWasm()

addIcon('univer', univerIconSvg)

Expand All @@ -42,14 +39,6 @@ export default class UniverPlugin extends Plugin {
},
})

this.addCommand({
id: 'univer-xlsx',
name: 'Create Univer Xlsx',
callback: () => {
createNewFile(this.app, 'xlsx')
},
})

// add the setting tab
this.addSettingTab(new SettingTab(this.app, this))
// register view
Expand All @@ -58,16 +47,12 @@ export default class UniverPlugin extends Plugin {

this.registerView(UDocType, leaf => new UDocView(leaf, this.settings))
this.registerExtensions(['udoc'], UDocType)

this.registerView(XlsxType, leaf => new XlsxTypeView(leaf, this.settings))
this.registerExtensions(['xlsx', 'xls', 'xlsm'], XlsxType)
}

async loadSettings() {
const loadedSettings = await this.loadData()
this.settings = defu(loadedSettings, {
language: 'EN',
isSupportXlsx: true,
})
}

Expand Down
Empty file removed src/mock/exchange.wasm
Empty file.
Empty file removed src/mock/wasm_exec.js
Empty file.
20 changes: 2 additions & 18 deletions src/modals/chooseType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ interface ModalText {
title: string
docBtn: string
sheetBtn: string
excelBtn: string
}

export class ChooseTypeModal extends Modal {
Expand All @@ -34,11 +33,6 @@ export class ChooseTypeModal extends Modal {
cls: 'univer-mdal-btn',
})

const excelBtn = btnContainer.createEl('button', {
text: 'Excel',
cls: 'univer-mdal-btn',
})

docBtn.onclick = () => {
createNewFile(this.app, 'udoc')
this.close()
Expand All @@ -48,11 +42,6 @@ export class ChooseTypeModal extends Modal {
createNewFile(this.app, 'usheet')
this.close()
}

excelBtn.onclick = () => {
createNewFile(this.app, 'xlsx')
this.close()
}
}

onClose(): void {
Expand All @@ -66,39 +55,34 @@ export class ChooseTypeModal extends Modal {
title: 'Выберите тип создаваемого файла',
docBtn: 'Univer Документ',
sheetBtn: 'Univer Таблица',
excelBtn: 'Excel',
}
}
else if (this.settings.language === 'ZH') {
return {
title: '请选择您要创建的文件类型',
docBtn: 'Univer 文档',
sheetBtn: 'Univer 表格',
excelBtn: 'Excel',
}
}
else if (this.settings.language === 'TW') {
return {
title: '請選擇要建立的文件類型',
docBtn: 'Univer 文檔',
sheetBtn: 'Univer 表格',
excelBtn: 'Excel',
}
}
else if (this.settings.language === 'VN') {
return {
title: 'Vui lòng chọn loại tệp bạn muốn tạo',
docBtn: 'Univer Tài liệu',
sheetBtn: 'Univer Bảng',
excelBtn: 'Excel',
}
}
else {
return {
title: 'Please choose the type of file you want to create',
docBtn: 'Univer Doc',
title: 'Choose the type of file you want to create',
docBtn: 'Univer Document',
sheetBtn: 'Univer Sheet',
excelBtn: 'Excel',
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions src/modals/settingTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,5 @@ export class SettingTab extends PluginSettingTab {
await this.plugin.saveSettings()
})
})
new Setting(containerEl)
.setName('support xlsx file type')
.setDesc('choose whether to support xlsx file type and its import and export')
.addToggle((toggle) => {
toggle
.setValue(this.plugin.settings.isSupportXlsx)
.onChange(async (value: boolean) => {
this.plugin.settings.isSupportXlsx = value
await this.plugin.saveSettings()
})
})
}
}
44 changes: 0 additions & 44 deletions src/plugins/ExchangePlugin.ts

This file was deleted.

47 changes: 0 additions & 47 deletions src/plugins/commands/exchange.operation.ts

This file was deleted.

43 changes: 0 additions & 43 deletions src/plugins/controllers/exchange.controller.ts

This file was deleted.

Loading
Loading