Skip to content

Commit

Permalink
chore: add sheets-ui config and register sparkline (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: wpxp123456 <Wpxp1223456>
  • Loading branch information
ybzky authored Dec 26, 2024
1 parent 5d98732 commit 9c03494
Show file tree
Hide file tree
Showing 25 changed files with 1,040 additions and 914 deletions.
2 changes: 1 addition & 1 deletion common/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs-infra/shared",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": true,
"description": "Some infrastructures for univerjs",
"author": "DreamNum <[email protected]>",
Expand Down
6 changes: 3 additions & 3 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"build:demo": "node ./esbuild.config.mjs"
},
"dependencies": {
"@univerjs/core": "0.5.1",
"@univerjs/design": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"@univerjs/design": "0.5.1-nightly.202412231606",
"@univerjs/presets": "workspace:*",
"@univerjs/sheets-zen-editor": "0.5.1",
"@univerjs/sheets-zen-editor": "0.5.1-nightly.202412231606",
"clsx": "^2.1.1",
"monaco-editor": "0.52.0",
"react": "18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "univer-presets",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": true,
"packageManager": "[email protected]",
"author": "DreamNum Inc. <[email protected]>",
Expand All @@ -21,7 +21,7 @@
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^9.0.3",
"@types/fs-extra": "^11.0.4",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"eslint": "^9.16.0",
"eslint-plugin-format": "^0.1.3",
"fs-extra": "^11.2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/preset-docs-collaboration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-docs-collaboration",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,12 +68,12 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs-pro/collaboration": "0.5.1",
"@univerjs-pro/collaboration-client": "0.5.1"
"@univerjs-pro/collaboration": "0.5.1-nightly.202412231606",
"@univerjs-pro/collaboration-client": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
16 changes: 8 additions & 8 deletions packages/preset-docs-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-docs-core",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,16 +68,16 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/design": "0.5.1",
"@univerjs/docs": "0.5.1",
"@univerjs/docs-ui": "0.5.1",
"@univerjs/engine-formula": "0.5.1",
"@univerjs/engine-render": "0.5.1",
"@univerjs/ui": "0.5.1"
"@univerjs/design": "0.5.1-nightly.202412231606",
"@univerjs/docs": "0.5.1-nightly.202412231606",
"@univerjs/docs-ui": "0.5.1-nightly.202412231606",
"@univerjs/engine-formula": "0.5.1-nightly.202412231606",
"@univerjs/engine-render": "0.5.1-nightly.202412231606",
"@univerjs/ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
12 changes: 6 additions & 6 deletions packages/preset-docs-drawing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-docs-drawing",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,14 +68,14 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/docs-drawing": "0.5.1",
"@univerjs/docs-drawing-ui": "0.5.1",
"@univerjs/drawing": "0.5.1",
"@univerjs/drawing-ui": "0.5.1"
"@univerjs/docs-drawing": "0.5.1-nightly.202412231606",
"@univerjs/docs-drawing-ui": "0.5.1-nightly.202412231606",
"@univerjs/drawing": "0.5.1-nightly.202412231606",
"@univerjs/drawing-ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
8 changes: 4 additions & 4 deletions packages/preset-docs-hyper-link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-docs-hyper-link",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,12 +68,12 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/docs-hyper-link": "0.5.1",
"@univerjs/docs-hyper-link-ui": "0.5.1"
"@univerjs/docs-hyper-link": "0.5.1-nightly.202412231606",
"@univerjs/docs-hyper-link-ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
10 changes: 5 additions & 5 deletions packages/preset-docs-thread-comment/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-docs-thread-comment",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,13 +68,13 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs-pro/thread-comment-datasource": "0.5.1",
"@univerjs/docs-thread-comment-ui": "0.5.1",
"@univerjs/thread-comment-ui": "0.5.1"
"@univerjs-pro/thread-comment-datasource": "0.5.1-nightly.202412231606",
"@univerjs/docs-thread-comment-ui": "0.5.1-nightly.202412231606",
"@univerjs/thread-comment-ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
30 changes: 16 additions & 14 deletions packages/preset-sheets-advanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-sheets-advanced",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -74,22 +74,24 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs-pro/engine-formula": "0.5.1",
"@univerjs-pro/exchange-client": "0.5.1",
"@univerjs-pro/license": "0.5.1",
"@univerjs-pro/sheets-chart": "0.5.1",
"@univerjs-pro/sheets-chart-ui": "0.5.1",
"@univerjs-pro/sheets-exchange-client": "0.5.1",
"@univerjs-pro/sheets-pivot": "0.5.1",
"@univerjs-pro/sheets-pivot-ui": "0.5.1",
"@univerjs-pro/sheets-print": "0.5.1",
"@univerjs/network": "0.5.1"
"@univerjs-pro/engine-formula": "0.5.1-nightly.202412231606",
"@univerjs-pro/exchange-client": "0.5.1-nightly.202412231606",
"@univerjs-pro/license": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-chart": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-chart-ui": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-exchange-client": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-pivot": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-pivot-ui": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-print": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-sparkline": "0.5.1-nightly.202412231606",
"@univerjs-pro/sheets-sparkline-ui": "0.5.1-nightly.202412231606",
"@univerjs/network": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs-pro/engine-pivot": "0.5.1",
"@univerjs-pro/print": "0.5.1",
"@univerjs/core": "0.5.1",
"@univerjs-pro/engine-pivot": "0.5.1-nightly.202412231606",
"@univerjs-pro/print": "0.5.1-nightly.202412231606",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
4 changes: 3 additions & 1 deletion packages/preset-sheets-advanced/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './umd';

export * from '@univerjs/network';
export * from '@univerjs-pro/engine-formula';
export * from '@univerjs-pro/exchange-client';
export * from '@univerjs-pro/license';
Expand All @@ -9,4 +10,5 @@ export * from '@univerjs-pro/sheets-exchange-client';
export * from '@univerjs-pro/sheets-pivot';
export * from '@univerjs-pro/sheets-pivot-ui';
export * from '@univerjs-pro/sheets-print';
export * from '@univerjs/network';
export * from '@univerjs-pro/sheets-sparkline';
export * from '@univerjs-pro/sheets-sparkline-ui';
8 changes: 8 additions & 0 deletions packages/preset-sheets-advanced/src/umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,22 @@ import { UniverSheetsExchangeClientPlugin } from '@univerjs-pro/sheets-exchange-
import { UniverSheetsPivotTablePlugin } from '@univerjs-pro/sheets-pivot';
import { UniverSheetsPivotTableUIPlugin } from '@univerjs-pro/sheets-pivot-ui';
import { UniverSheetsPrintPlugin } from '@univerjs-pro/sheets-print';
import { UniverSheetSparklinePlugin } from '@univerjs-pro/sheets-sparkline';
import { UniverSheetSparklineUIPlugin } from '@univerjs-pro/sheets-sparkline-ui';
import { UniverNetworkPlugin } from '@univerjs/network';

import '@univerjs-pro/exchange-client/facade';
import '@univerjs-pro/sheets-pivot/facade';
import '@univerjs-pro/engine-formula/facade';
import '@univerjs-pro/sheets-print/facade';
import '@univerjs-pro/sheets-sparkline/facade';
import '@univerjs-pro/sheets-chart-ui/facade';

import '@univerjs-pro/exchange-client/lib/index.css';
import '@univerjs-pro/sheets-pivot-ui/lib/index.css';
import '@univerjs-pro/sheets-print/lib/index.css';
import '@univerjs-pro/sheets-chart-ui/lib/index.css';
import '@univerjs-pro/sheets-sparkline-ui/lib/index.css';

export interface IUniverSheetsAdvancedPresetConfig {
universerEndpoint?: string;
Expand Down Expand Up @@ -61,6 +66,9 @@ export function UniverSheetsAdvancedPreset(config: Partial<IUniverSheetsAdvanced
UniverSheetsChartPlugin,
UniverSheetsChartUIPlugin,

UniverSheetSparklinePlugin,
UniverSheetSparklineUIPlugin,

[UniverExchangeClientPlugin, {
uploadFileServerUrl: `${serverEndpoint}/universer-api/stream/file/upload`,
getTaskServerUrl: `${serverEndpoint}/universer-api/exchange/task/{taskID}`,
Expand Down
12 changes: 6 additions & 6 deletions packages/preset-sheets-collaboration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-sheets-collaboration",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,15 +68,15 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs-pro/collaboration": "0.5.1",
"@univerjs-pro/collaboration-client": "0.5.1",
"@univerjs-pro/edit-history-loader": "0.5.1",
"@univerjs-pro/edit-history-viewer": "0.5.1",
"@univerjs-pro/collaboration": "0.5.1-nightly.202412231606",
"@univerjs-pro/collaboration-client": "0.5.1-nightly.202412231606",
"@univerjs-pro/edit-history-loader": "0.5.1-nightly.202412231606",
"@univerjs-pro/edit-history-viewer": "0.5.1-nightly.202412231606",
"@univerjs/preset-sheets-advanced": "workspace:*"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
8 changes: 4 additions & 4 deletions packages/preset-sheets-conditional-formatting/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-sheets-conditional-formatting",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -68,12 +68,12 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/sheets-conditional-formatting": "0.5.1",
"@univerjs/sheets-conditional-formatting-ui": "0.5.1"
"@univerjs/sheets-conditional-formatting": "0.5.1-nightly.202412231606",
"@univerjs/sheets-conditional-formatting-ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
32 changes: 16 additions & 16 deletions packages/preset-sheets-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/preset-sheets-core",
"version": "0.5.1",
"version": "0.5.1-nightly.202412231606",
"private": false,
"description": "",
"author": "DreamNum <[email protected]>",
Expand Down Expand Up @@ -74,24 +74,24 @@
"rxjs": ">=7.0.0"
},
"dependencies": {
"@univerjs/design": "0.5.1",
"@univerjs/docs": "0.5.1",
"@univerjs/docs-ui": "0.5.1",
"@univerjs/engine-formula": "0.5.1",
"@univerjs/engine-render": "0.5.1",
"@univerjs/facade": "0.5.1",
"@univerjs/rpc": "0.5.1",
"@univerjs/sheets": "0.5.1",
"@univerjs/sheets-formula": "0.5.1",
"@univerjs/sheets-formula-ui": "0.5.1",
"@univerjs/sheets-numfmt": "0.5.1",
"@univerjs/sheets-numfmt-ui": "0.5.1",
"@univerjs/sheets-ui": "0.5.1",
"@univerjs/ui": "0.5.1"
"@univerjs/design": "0.5.1-nightly.202412231606",
"@univerjs/docs": "0.5.1-nightly.202412231606",
"@univerjs/docs-ui": "0.5.1-nightly.202412231606",
"@univerjs/engine-formula": "0.5.1-nightly.202412231606",
"@univerjs/engine-render": "0.5.1-nightly.202412231606",
"@univerjs/facade": "0.5.1-nightly.202412231606",
"@univerjs/rpc": "0.5.1-nightly.202412231606",
"@univerjs/sheets": "0.5.1-nightly.202412231606",
"@univerjs/sheets-formula": "0.5.1-nightly.202412231606",
"@univerjs/sheets-formula-ui": "0.5.1-nightly.202412231606",
"@univerjs/sheets-numfmt": "0.5.1-nightly.202412231606",
"@univerjs/sheets-numfmt-ui": "0.5.1-nightly.202412231606",
"@univerjs/sheets-ui": "0.5.1-nightly.202412231606",
"@univerjs/ui": "0.5.1-nightly.202412231606"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"@univerjs/core": "0.5.1",
"@univerjs/core": "0.5.1-nightly.202412231606",
"typescript": "^5.7.2"
}
}
5 changes: 3 additions & 2 deletions packages/preset-sheets-core/src/umd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import '@univerjs/sheets-numfmt-ui/lib/index.css';

export interface IUniverSheetsCorePresetConfig extends
Pick<IUniverUIConfig, 'container' | 'header' | 'footer' | 'toolbar' | 'menu' | 'contextMenu' | 'disableAutoFocus'>,
Pick<IUniverSheetsUIConfig, 'formulaBar'> {
Pick<IUniverSheetsUIConfig, 'formulaBar' | 'customComponents'> {

/**
* The formula configuration.
Expand All @@ -60,6 +60,7 @@ export function UniverSheetsCorePreset(config: Partial<IUniverSheetsCorePresetCo
contextMenu,
disableAutoFocus,
formula,
customComponents,
} = config;

const useWorker = !!workerSrc;
Expand All @@ -85,7 +86,7 @@ export function UniverSheetsCorePreset(config: Partial<IUniverSheetsCorePresetCo
[UniverFormulaEnginePlugin, { notExecuteFormula: useWorker, function: formula?.function }],

[UniverSheetsPlugin, { notExecuteFormula: useWorker, onlyRegisterFormulaRelatedMutations: false }],
UniverSheetsUIPlugin,
[UniverSheetsUIPlugin, { customComponents }],
UniverSheetsNumfmtPlugin,
UniverSheetsNumfmtUIPlugin,

Expand Down
Loading

0 comments on commit 9c03494

Please sign in to comment.