Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

build: cleanup the package.json of sheets-sort

白熱1ed64c1d38b4
diff --git a/packages/drawing/package.json b/packages/drawing/package.json
index d822c04a1e..8810343de8 100644
--- a/packages/drawing/package.json
+++ b/packages/drawing/package.json
@@ -69,11 +69,8 @@
"devDependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/shared": "workspace:*",
- "@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.15.4",
"less": "^4.2.0",
- "ot-json1": "^1.0.2",
- "react": "18.3.1",
"rxjs": "^7.8.1",
"typescript": "^5.4.5",
"vite": "^5.3.1",
diff --git a/packages/facade/package.json b/packages/facade/package.json
index ba9a2f2e25..61241f345c 100644
--- a/packages/facade/package.json
+++ b/packages/facade/package.json
@@ -87,7 +87,7 @@
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.15.4",
"jest-canvas-mock": "^2.5.2",
- "jsdom": "^24.0.0",
+ "jsdom": "^24.1.0",
"rxjs": "^7.8.1",
"typescript": "^5.4.5",
"vite": "^5.3.1",
diff --git a/packages/sheets-sort-ui/package.json b/packages/sheets-sort-ui/package.json
index abe58aa8e4..8eb28efb84 100644
--- a/packages/sheets-sort-ui/package.json
+++ b/packages/sheets-sort-ui/package.json
@@ -44,7 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -64,19 +65,17 @@
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-sort": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
- "@wendellhu/redi": "^0.15.2",
- "react": "18.3.1",
- "react-dom": "18.3.1",
+ "@wendellhu/redi": "0.15.4",
+ "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
},
"dependencies": {
- "@univerjs/icons": "^0.1.56",
- "rc-virtual-list": "^3.11.5"
+ "@univerjs/icons": "^0.1.57",
+ "rc-virtual-list": "^3.14.3"
},
"devDependencies": {
"@univerjs/core": "workspace:*",
@@ -87,13 +86,27 @@
"@univerjs/sheets-sort": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
- "@wendellhu/redi": "^0.15.2",
+ "@wendellhu/redi": "^0.15.4",
"clsx": "^2.1.1",
"less": "^4.2.0",
"react": "18.3.1",
"rxjs": "^7.8.1",
"typescript": "^5.4.5",
- "vite": "^5.2.10",
- "vitest": "^1.5.2"
+ "vite": "^5.3.1",
+ "vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-sort-ui/src/index.ts b/packages/sheets-sort-ui/src/index.ts
index d1fbe4d1d9..ec02a66ee9 100644
--- a/packages/sheets-sort-ui/src/index.ts
+++ b/packages/sheets-sort-ui/src/index.ts
@@ -15,5 +15,3 @@
*/
export { UniverSheetsSortUIPlugin } from './plugin';
-export { default as enUS } from './locale/en-US';
-export { default as zhCN } from './locale/zh-CN';
diff --git a/packages/sheets-sort-ui/src/locale/en-US.ts b/packages/sheets-sort-ui/src/locale/en-US.ts
index 8236303fad..82c5ef1b8b 100644
--- a/packages/sheets-sort-ui/src/locale/en-US.ts
+++ b/packages/sheets-sort-ui/src/locale/en-US.ts
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-export default {
+import type zhCN from './zh-CN';
+
+const locale: typeof zhCN = {
'sheets-sort': {
general: {
sort: 'Sort',
@@ -44,3 +46,5 @@ export default {
},
},
};
+
+export default locale;
diff --git a/packages/sheets-sort-ui/src/locale/index.ts b/packages/sheets-sort-ui/src/locale/index.ts
deleted file mode 100644
index 1eff5fc204..0000000000
--- a/packages/sheets-sort-ui/src/locale/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Copyright 2023-present DreamNum Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export { default as enUS } from './en-US';
-export { default as zhCN } from './zh-CN';
diff --git a/packages/sheets-sort-ui/src/locale/ru-RU.ts b/packages/sheets-sort-ui/src/locale/ru-RU.ts
index 8236303fad..82c5ef1b8b 100644
--- a/packages/sheets-sort-ui/src/locale/ru-RU.ts
+++ b/packages/sheets-sort-ui/src/locale/ru-RU.ts
@@ -14,7 +14,9 @@
* limitations under the License.
*/
-export default {
+import type zhCN from './zh-CN';
+
+const locale: typeof zhCN = {
'sheets-sort': {
general: {
sort: 'Sort',
@@ -44,3 +46,5 @@ export default {
},
},
};
+
+export default locale;
diff --git a/packages/sheets-sort-ui/src/locale/zh-CN.ts b/packages/sheets-sort-ui/src/locale/zh-CN.ts
index 5fda2b4cff..835119ef92 100644
--- a/packages/sheets-sort-ui/src/locale/zh-CN.ts
+++ b/packages/sheets-sort-ui/src/locale/zh-CN.ts
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-import type enUS from './en-US';
-
-const zLocale: typeof enUS = {
+const locale = {
'sheets-sort': {
general: {
sort: '排序',
@@ -47,4 +45,4 @@ const zLocale: typeof enUS = {
},
};
-export default zLocale;
+export default locale;
diff --git a/packages/sheets-sort-ui/src/plugin.ts b/packages/sheets-sort-ui/src/plugin.ts
index d537705248..65f684a313 100644
--- a/packages/sheets-sort-ui/src/plugin.ts
+++ b/packages/sheets-sort-ui/src/plugin.ts
@@ -19,7 +19,6 @@ import type { Dependency } from '@wendellhu/redi';
import { Inject, Injector } from '@wendellhu/redi';
import { UniverSheetsSortPlugin } from '@univerjs/sheets-sort';
-import { enUS, zhCN } from './locale';
import { SheetsSortUIService } from './services/sheets-sort-ui.service';
import type { IUniverSheetsSortUIConfig } from './controllers/sheets-sort-ui.controller';
import { DefaultSheetsSortUIConfig, SheetsSortUIController } from './controllers/sheets-sort-ui.controller';
@@ -37,10 +36,6 @@ export class UniverSheetsSortUIPlugin extends Plugin {
) {
super();
- this._localeService.load({
- zhCN,
- enUS,
- });
this._config = Tools.deepMerge({}, DefaultSheetsSortUIConfig, this._config);
}
diff --git a/packages/sheets-sort/package.json b/packages/sheets-sort/package.json
index bfe2fd4458..876a874859 100644
--- a/packages/sheets-sort/package.json
+++ b/packages/sheets-sort/package.json
@@ -41,7 +41,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -62,20 +63,32 @@
"@univerjs/engine-formula": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
- "@univerjs/ui": "workspace:*",
- "@wendellhu/redi": "^0.15.2",
- "rxjs": ">=7.0.0"
- },
- "dependencies": {
+ "@wendellhu/redi": "0.15.4"
},
"devDependencies": {
"@univerjs/core": "workspace:*",
+ "@univerjs/engine-formula": "workspace:*",
"@univerjs/shared": "workspace:*",
"@univerjs/sheets": "workspace:*",
- "@wendellhu/redi": "^0.15.2",
+ "@univerjs/sheets-ui": "workspace:*",
+ "@wendellhu/redi": "^0.15.4",
"rxjs": "^7.8.1",
"typescript": "^5.4.5",
- "vite": "^5.2.10",
- "vitest": "^1.5.2"
+ "vite": "^5.3.1",
+ "vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-sort/src/commands/__tests__/create-command-test-bed.ts b/packages/sheets-sort/src/commands/__tests__/create-command-test-bed.ts
index 351aa09332..3f76aebdae 100644
--- a/packages/sheets-sort/src/commands/__tests__/create-command-test-bed.ts
+++ b/packages/sheets-sort/src/commands/__tests__/create-command-test-bed.ts
@@ -20,7 +20,7 @@ import { Inject, Injector } from '@wendellhu/redi';
import { SheetsRenderService } from '@univerjs/sheets-ui';
import { SelectionManagerService, SheetInterceptorService } from '@univerjs/sheets';
import { FormulaDataModel } from '@univerjs/engine-formula';
-import { enUS } from '../../locale';
+import enUS from '../../locale/en-US';
import { SheetsSortService } from '../../services/sheets-sort.service';
import { SheetsSortController } from '../../controllers/sheets-sort.controller';
diff --git a/packages/sheets-sort/src/locale/index.ts b/packages/sheets-sort/src/locale/index.ts
deleted file mode 100644
index 1eff5fc204..0000000000
--- a/packages/sheets-sort/src/locale/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- * Copyright 2023-present DreamNum Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-export { default as enUS } from './en-US';
-export { default as zhCN } from './zh-CN';
diff --git a/packages/sheets-sort/src/plugin.ts b/packages/sheets-sort/src/plugin.ts
index ef59b8d10b..96cf425cb0 100644
--- a/packages/sheets-sort/src/plugin.ts
+++ b/packages/sheets-sort/src/plugin.ts
@@ -14,13 +14,12 @@
* limitations under the License.
*/
-import { LocaleService, Plugin, UniverInstanceType } from '@univerjs/core';
+import { Plugin, UniverInstanceType } from '@univerjs/core';
import type { Dependency } from '@wendellhu/redi';
import { Inject, Injector } from '@wendellhu/redi';
import { SheetsSortController } from './controllers/sheets-sort.controller';
import { SheetsSortService } from './services/sheets-sort.service';
-import { enUS, zhCN } from './locale';
const NAME = 'UNIVER_SHEETS_SORT_PLUGIN';
@@ -30,8 +29,7 @@ export class UniverSheetsSortPlugin extends Plugin {
constructor(
_config: unknown,
- @Inject(Injector) protected readonly _injector: Injector,
- @Inject(LocaleService) private readonly _localeService: LocaleService
+ @Inject(Injector) protected readonly _injector: Injector
) {
super();
}
@@ -41,10 +39,5 @@ export class UniverSheetsSortPlugin extends Plugin {
[SheetsSortController],
[SheetsSortService],
] as Dependency[]).forEach((d) => injector.add(d));
-
- this._localeService.load({
- zhCN,
- enUS,
- });
}
}
diff --git a/packages/thread-comment/package.json b/packages/thread-comment/package.json
index f111ca6a72..34eb491a4f 100644
--- a/packages/thread-comment/package.json
+++ b/packages/thread-comment/package.json
@@ -70,9 +70,7 @@
},
"devDependencies": {
"@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
"@univerjs/shared": "workspace:*",
- "@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.15.4",
"rxjs": "^7.8.1",
"typescript": "^5.4.5",
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 7b6fb0e868..4f5889c627 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -69,6 +69,7 @@
"@univerjs/design": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
+ "@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.15.4",
"clsx": ">=2.0.0",
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2497f2dbb7..d93b93f6fa 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -782,18 +782,12 @@ importers:
'@univerjs/shared':
specifier: workspace:*
version: link:../../common/shared
- '@univerjs/ui':
- specifier: workspace:*
- version: link:../ui
'@wendellhu/redi':
specifier: 0.15.4
version: 0.15.4
less:
specifier: ^4.2.0
version: 4.2.0
- react:
- specifier: 18.3.1
- version: 18.3.1
rxjs:
specifier: ^7.8.1
version: 7.8.1
@@ -994,7 +988,7 @@ importers:
specifier: ^2.5.2
version: 2.5.2
jsdom:
- specifier: ^24.0.0
+ specifier: ^24.1.0
version: 24.1.0
rxjs:
specifier: ^7.8.1
@@ -1784,28 +1778,24 @@ importers:
packages/sheets-sort:
- dependencies:
- '@univerjs/engine-formula':
- specifier: workspace:*
- version: link:../engine-formula
- '@univerjs/sheets-ui':
- specifier: workspace:*
- version: link:../sheets-ui
- '@univerjs/ui':
- specifier: workspace:*
- version: link:../ui
devDependencies:
'@univerjs/core':
specifier: workspace:*
version: link:../core
+ '@univerjs/engine-formula':
+ specifier: workspace:*
+ version: link:../engine-formula
'@univerjs/shared':
specifier: workspace:*
version: link:../../common/shared
'@univerjs/sheets':
specifier: workspace:*
version: link:../sheets
+ '@univerjs/sheets-ui':
+ specifier: workspace:*
+ version: link:../sheets-ui
'@wendellhu/redi':
- specifier: ^0.15.2
+ specifier: ^0.15.4
version: 0.15.4
rxjs:
specifier: ^7.8.1
@@ -1814,10 +1804,10 @@ importers:
specifier: ^5.4.5
version: 5.4.5
vite:
- specifier: ^5.2.10
+ specifier: ^5.3.1
vitest:
- specifier: ^1.5.2
+ specifier: ^1.6.0
packages/sheets-sort-ui:
@@ -1826,14 +1816,11 @@ importers:
specifier: workspace:*
version: link:../engine-formula
'@univerjs/icons':
- specifier: ^0.1.56
+ specifier: ^0.1.57
rc-virtual-list:
- specifier: ^3.11.5
- react-dom:
- specifier: 18.3.1
- version: 18.3.1([email protected])
+ specifier: ^3.14.3
devDependencies:
'@univerjs/core':
specifier: workspace:*
@@ -1860,7 +1847,7 @@ importers:
specifier: workspace:*
version: link:../ui
'@wendellhu/redi':
- specifier: ^0.15.2
+ specifier: ^0.15.4
version: 0.15.4
clsx:
specifier: ^2.1.1
@@ -1878,10 +1865,10 @@ importers:
specifier: ^5.4.5
version: 5.4.5
vite:
- specifier: ^5.2.10
+ specifier: ^5.3.1
vitest:
- specifier: ^1.5.2
+ specifier: ^1.6.0
packages/sheets-thread-comment:
@@ -2194,15 +2181,9 @@ importers:
'@univerjs/core':
specifier: workspace:*
version: link:../core
- '@univerjs/design':
- specifier: workspace:*
- version: link:../design
'@univerjs/shared':
specifier: workspace:*
version: link:../../common/shared
- '@univerjs/ui':
- specifier: workspace:*
- version: link:../ui
'@wendellhu/redi':
specifier: 0.15.4
version: 0.15.4
@@ -2276,6 +2257,9 @@ importers:
'@univerjs/icons':
specifier: ^0.1.57
+ '@univerjs/ui':
+ specifier: workspace:*
+ version: 'link:'
localforage:
specifier: ^1.10.0
version: 1.10.0
@@ -4034,7 +4018,7 @@ packages:
resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==}
'@protobufjs/[email protected]':
- resolution: {integrity: sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=}
+ resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==}
'@protobufjs/[email protected]':
resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==}
@@ -9082,6 +9066,13 @@ packages:
react: '>=16.9.0'
react-dom: '>=16.9.0'
+ resolution: {integrity: sha512-6+6wiEhdqakNBnbRJymgMlh+90qpkgqherTRo1l1cX7mK6F9hWsazPczmP0lA+64yhC9/t+M9Dh5pjvDWimn8A==}
+ engines: {node: '>=8.x'}
+ peerDependencies:
+ react: '>=16.9.0'
+ react-dom: '>=16.9.0'
+
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
hasBin: true
@@ -18331,6 +18322,15 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
+ dependencies:
+ '@babel/runtime': 7.24.7
+ classnames: 2.5.1
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+
dependencies:
deep-extend: 0.6.0