Skip to content

Commit

Permalink
Merge branch 'dev' into feat/add-scrollLeftTop-sheet-snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku authored Jun 7, 2024
2 parents 4d7082b + 88f2f6d commit e8f1158
Show file tree
Hide file tree
Showing 134 changed files with 2,301 additions and 1,544 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@


## [0.1.14](https://github.com/dream-num/univer/compare/v0.1.13...v0.1.14) (2024-06-07)


### Bug Fixes

* build error ([#2436](https://github.com/dream-num/univer/issues/2436)) ([d497b03](https://github.com/dream-num/univer/commit/d497b03a5b8894589401034da340fce3c8f105c3))
* **drawing:** plugin name ([#2402](https://github.com/dream-num/univer/issues/2402)) ([296f399](https://github.com/dream-num/univer/commit/296f399408e3d6d4293c43e5acf064d5717f7de9))
* fix findDOMNode deprecation issue under React 18.3.1 ([#2403](https://github.com/dream-num/univer/issues/2403)) ([41d21c3](https://github.com/dream-num/univer/commit/41d21c31ebe133a436e811ba42787b438a29f319))
* fix layer ([#2421](https://github.com/dream-num/univer/issues/2421)) ([ad7b3b5](https://github.com/dream-num/univer/commit/ad7b3b5bc15e307f9ab70bbab89b6522b655660d))
* fix list lint ([#2406](https://github.com/dream-num/univer/issues/2406)) ([eb8737c](https://github.com/dream-num/univer/commit/eb8737c972d80d9613f8b6a6af8f2dea6a95fe72))
* fix menu status is incorrect because focusedOnDrawing$ have not initial value ([#2431](https://github.com/dream-num/univer/issues/2431)) ([5b7bc17](https://github.com/dream-num/univer/commit/5b7bc17b89abf81d39a07f5873af3261a436f81e))
* fix permissions wrong reference render-engine in sheets package ([#2396](https://github.com/dream-num/univer/issues/2396)) ([10387e4](https://github.com/dream-num/univer/commit/10387e48b92ad0134f0bf17e82dd28e938b4465d))
* **formula:** export AsyncObject ([#2438](https://github.com/dream-num/univer/issues/2438)) ([08df397](https://github.com/dream-num/univer/commit/08df397e136754a89525bf2d3bb3926f300d7d2f))
* **formula:** js precision problem ([#2371](https://github.com/dream-num/univer/issues/2371)) ([d2c9eeb](https://github.com/dream-num/univer/commit/d2c9eebc19f233e8ce422c8467a66b394c5f7b2d))
* **meesage:** fix in node env, the document not exist ([#2415](https://github.com/dream-num/univer/issues/2415)) ([8657cc4](https://github.com/dream-num/univer/commit/8657cc40841c80b66ce4a9880abc6db992c40b52))
* message node env ([#2417](https://github.com/dream-num/univer/issues/2417)) ([3dd2d6a](https://github.com/dream-num/univer/commit/3dd2d6a1b6e3f1730514057c6a5e3c75a82f31ec))
* not escape when copy content ([#2354](https://github.com/dream-num/univer/issues/2354)) ([c10e4d9](https://github.com/dream-num/univer/commit/c10e4d93e3995cb799ca796856f5d09b8801364b))
* sync actions between formula editor and cell editor ([#2380](https://github.com/dream-num/univer/issues/2380)) ([bdf033c](https://github.com/dream-num/univer/commit/bdf033c2ed5bb40cb5dc3a2aac8f7d8cd7332317))
* **ui:** fix findDOMNode is deprecated warning when collapsing the toolbar ([#2413](https://github.com/dream-num/univer/issues/2413)) ([754fad2](https://github.com/dream-num/univer/commit/754fad23005fae3df58682f1a9fc81aab8181bc0))
* **ui:** fix flickering on register ui parts ([#2430](https://github.com/dream-num/univer/issues/2430)) ([2d036a3](https://github.com/dream-num/univer/commit/2d036a3bd50134906195fdd40df48e97a5bb7501))
* **ui:** fix ineffective `hidden` property in menu configurations ([#2420](https://github.com/dream-num/univer/issues/2420)) ([c2b0019](https://github.com/dream-num/univer/commit/c2b0019ef394389d103adcd5645445da38c80723))
* **ui:** fix possible race conditions for ComponentContainer ([29af7c2](https://github.com/dream-num/univer/commit/29af7c2abc3d247f422aa3d071e0ccc02615ff5e))


### Features

* add scrollLeftTop for sheet snapshot ([#2348](https://github.com/dream-num/univer/issues/2348)) ([38d8003](https://github.com/dream-num/univer/commit/38d8003af71c13c319a54dc3e7fe948984375218))
* add Tools.set method ([#2399](https://github.com/dream-num/univer/issues/2399)) ([ea8f50c](https://github.com/dream-num/univer/commit/ea8f50cb63193fd6f90e8a4e68500b809c075800))
* add workbook permission ([#2391](https://github.com/dream-num/univer/issues/2391)) ([0a9a980](https://github.com/dream-num/univer/commit/0a9a980c091060596678130b6a3039c17a08a194))
* **InsertSheetCommand:** allow using partial sheet from params as sheetconfig ([#2429](https://github.com/dream-num/univer/issues/2429)) ([ce85854](https://github.com/dream-num/univer/commit/ce858541eec01cadd18b16f395a4d5195be18e86))
* **network:** add http auth interceptor ([#2424](https://github.com/dream-num/univer/issues/2424)) ([066941a](https://github.com/dream-num/univer/commit/066941a50d9e545a7271118bc0b815c9a141626a))
* **permission-share:** support permission share ([#2416](https://github.com/dream-num/univer/issues/2416)) ([0332000](https://github.com/dream-num/univer/commit/0332000ecb5b89ee5a53c1af92530d63341b2942))
* **sheets-data-validation:** add validator service allowing developer to get status of data-validation ([#2412](https://github.com/dream-num/univer/issues/2412)) ([12d531d](https://github.com/dream-num/univer/commit/12d531dc16a64918e2e91b7ee364924ddfd978a9))
* **sheets-ui:** support drawing print ([#2418](https://github.com/dream-num/univer/issues/2418)) ([f24cace](https://github.com/dream-num/univer/commit/f24cacef51e6c49d54267a5a16df355bf05676f8))
* **ui:** enhance component container ([#2395](https://github.com/dream-num/univer/issues/2395)) ([54460f9](https://github.com/dream-num/univer/commit/54460f9a8b0f20c5be357476ae490d6367747681))


### Reverts

* Revert "feat: add scrollLeftTop for sheet snapshot (#2348)" (#2398) ([1e5c40c](https://github.com/dream-num/univer/commit/1e5c40c974246e93c06c794a104aa0f6716138e3)), closes [#2348](https://github.com/dream-num/univer/issues/2348) [#2398](https://github.com/dream-num/univer/issues/2398)

## [0.1.13](https://github.com/dream-num/univer/compare/v0.1.12...v0.1.13) (2024-06-03)


Expand Down
4 changes: 2 additions & 2 deletions common/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/shared",
"version": "0.1.13",
"version": "0.1.14",
"private": true,
"description": "Some infrastructures for univerjs",
"author": "DreamNum <developer@univer.ai>",
Expand All @@ -17,7 +17,7 @@
"./vite": "./vite/index.js"
},
"dependencies": {
"@typescript-eslint/parser": "^7.11.0",
"@typescript-eslint/parser": "^7.12.0",
"@vitejs/plugin-react": "^4.3.0",
"@vitest/coverage-istanbul": "^1.6.0",
"happy-dom": "13.3.8",
Expand Down
18 changes: 9 additions & 9 deletions common/storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/storybook",
"version": "0.1.13",
"version": "0.1.14",
"private": true,
"description": "Some infrastructures for univerjs",
"author": "DreamNum <developer@univer.ai>",
Expand All @@ -17,23 +17,23 @@
},
"dependencies": {
"@chromatic-com/storybook": "^1.5.0",
"@storybook/addon-essentials": "8.1.5",
"@storybook/addon-interactions": "8.1.5",
"@storybook/addon-links": "8.1.5",
"@storybook/addon-essentials": "8.1.6",
"@storybook/addon-interactions": "8.1.6",
"@storybook/addon-links": "8.1.6",
"@storybook/addon-styling-webpack": "^1.0.0",
"@storybook/addon-webpack5-compiler-swc": "^1.0.3",
"@storybook/blocks": "8.1.5",
"@storybook/blocks": "8.1.6",
"@storybook/icons": "^1.2.9",
"@storybook/react": "8.1.5",
"@storybook/react-webpack5": "8.1.5",
"@storybook/types": "8.1.5",
"@storybook/react": "8.1.6",
"@storybook/react-webpack5": "8.1.6",
"@storybook/types": "8.1.6",
"@univerjs/core": "workspace:*",
"@univerjs/design": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "0.15.2",
"css-loader": "^6.10.0",
"less-loader": "^12.2.0",
"storybook": "8.1.5",
"storybook": "8.1.6",
"storybook-addon-swc": "^1.2.0",
"style-loader": "^3.3.4",
"tsconfig-paths-webpack-plugin": "^4.1.0",
Expand Down
162 changes: 154 additions & 8 deletions examples/src/data/sheets/demo/default-workbook-data-demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,20 +175,43 @@ const dataValidation = [
},
];

const hyperLink = [{
row: 20,
column: 12,
id: '123',
display: 'linkTest哈哈哈哈',
payload: '#gid=sheet-0011&range=1:1',
}] as ICellHyperLink[];
const dv2 = [
{
uid: 'xxx-2',
type: DataValidationType.CHECKBOX,
ranges: [{
startRow: 1,
endRow: 2,
startColumn: 1,
endColumn: 2,
}],
},
];

const hyperLink = [
{
row: 20,
column: 8,
id: '321',
display: 'linkTest',
payload: '#gid=sheet-0011&range=1:1',
},
{
row: 20,
column: 12,
id: '123',
display: 'linkTest哈哈哈哈',
payload: '#gid=sheet-0011&range=1:1',
},
] as ICellHyperLink[];

export const DEFAULT_WORKBOOK_DATA_DEMO: IWorkbookData = {
id: 'workbook-01',
locale: LocaleType.ZH_CN,
name: 'UniverSheet Demo',
sheetOrder: [
'sheet-0011',
'dv-test',
'sheet-0001',
'sheet-0002',
'sheet-0003',
Expand Down Expand Up @@ -14082,6 +14105,10 @@ export const DEFAULT_WORKBOOK_DATA_DEMO: IWorkbookData = {
v: 345,
t: 2,
},
8: {
v: 'linkTest',
t: 1,
},
12: {
v: 'linkTest哈哈哈哈',
t: 1,
Expand Down Expand Up @@ -14202,6 +14229,45 @@ export const DEFAULT_WORKBOOK_DATA_DEMO: IWorkbookData = {
],
rightToLeft: 0,
},
'dv-test': {
name: 'dv-test',
id: 'dv-test',
tabColor: '',
hidden: 0,
rowCount: 1000,
columnCount: 20,
zoomRatio: 1,
cellData: {
5: {
1: {
v: '1',
t: 2,
},
2: {
v: '12',
t: 2,
},
},
6: {
1: {
v: '2',
t: 2,
},
},
7: {
1: {
v: '3',
t: 2,
},
},
8: {
1: {
v: '4',
t: 2,
},
},
},
},
'sheet-0010': {
name: 'sheet-0010',
id: 'sheet-0010',
Expand Down Expand Up @@ -23564,6 +23630,7 @@ export const DEFAULT_WORKBOOK_DATA_DEMO: IWorkbookData = {
name: DATA_VALIDATION_PLUGIN_NAME,
data: JSON.stringify({
'sheet-0011': dataValidation,
'dv-test': dv2,
}),
},
{
Expand All @@ -23581,7 +23648,86 @@ export const DEFAULT_WORKBOOK_DATA_DEMO: IWorkbookData = {
},
{
name: 'SHEET_THREAD_COMMENT_PLUGIN',
data: '{"sheet-0011":[{"text":{"textRuns":[],"paragraphs":[{"startIndex":3,"paragraphStyle":{}}],"sectionBreaks":[{"startIndex":4}],"dataStream":"123\\n\\r","customRanges":[]},"dT":"2024/05/17 21:16","id":"jwV0QtHwUbhG3o--iy1qa","ref":"H9","personId":"mockId","unitId":"workbook-01","subUnitId":"sheet-0011"}]}',
data: JSON.stringify({
'sheet-0011': [{ text: { textRuns: [], paragraphs: [{ startIndex: 3, paragraphStyle: {} }], sectionBreaks: [{ startIndex: 4 }], dataStream: '123\\n\\r', customRanges: [] }, dT: '2024/05/17 21:16', id: 'jwV0QtHwUbhG3o--iy1qa', ref: 'H9', personId: 'mockId', unitId: 'workbook-01', subUnitId: 'sheet-0011' }],
'dv-test': [
{
text: {
textRuns: [],
paragraphs: [{ startIndex: 3, paragraphStyle: {} }],
sectionBreaks: [{ startIndex: 4 }],
dataStream: '1\\n\\r',
customRanges: [],
},
dT: '2024/05/17 21:16',
id: '12',
ref: 'C6',
personId: 'mockId',
unitId: 'workbook-01',
subUnitId: 'sheet-0011',
},
{
text: {
textRuns: [],
paragraphs: [{ startIndex: 3, paragraphStyle: {} }],
sectionBreaks: [{ startIndex: 4 }],
dataStream: '1\\n\\r',
customRanges: [],
},
dT: '2024/05/17 21:16',
id: '1',
ref: 'B6',
personId: 'mockId',
unitId: 'workbook-01',
subUnitId: 'sheet-0011',
},
{
text: {
textRuns: [],
paragraphs: [{ startIndex: 3, paragraphStyle: {} }],
sectionBreaks: [{ startIndex: 4 }],
dataStream: '2\\n\\r',
customRanges: [],
},
dT: '2024/05/17 21:16',
id: '2',
ref: 'B7',
personId: 'mockId',
unitId: 'workbook-01',
subUnitId: 'sheet-0011',
},
{
text: {
textRuns: [],
paragraphs: [{ startIndex: 3, paragraphStyle: {} }],
sectionBreaks: [{ startIndex: 4 }],
dataStream: '3\\n\\r',
customRanges: [],
},
dT: '2024/05/17 21:16',
id: '3',
ref: 'B8',
personId: 'mockId',
unitId: 'workbook-01',
subUnitId: 'sheet-0011',
},
{
text: {
textRuns: [],
paragraphs: [{ startIndex: 3, paragraphStyle: {} }],
sectionBreaks: [{ startIndex: 4 }],
dataStream: '4\\n\\r',
customRanges: [],
},
dT: '2024/05/17 21:16',
id: '4',
ref: 'B9',
personId: 'mockId',
unitId: 'workbook-01',
subUnitId: 'sheet-0011',
},
],
}),
},
{
name: 'SHEET_DRAWING_PLUGIN',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "univer",
"type": "module",
"version": "0.1.13",
"version": "0.1.14",
"private": true,
"packageManager": "pnpm@9.0.5",
"author": "DreamNum Inc. <developer@univer.ai>",
Expand Down Expand Up @@ -45,14 +45,14 @@
"release:rc": "release-it prerelease --preRelease=rc"
},
"devDependencies": {
"@antfu/eslint-config": "^2.19.1",
"@antfu/eslint-config": "^2.20.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@eslint-react/eslint-plugin": "^1.5.14",
"@playwright/test": "^1.44.1",
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^8.0.1",
"@storybook/react": "8.1.5",
"@storybook/react": "8.1.6",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@univerjs/design": "workspace:*",
Expand All @@ -72,7 +72,7 @@
"react-dom": "18.3.1",
"release-it": "^17.3.0",
"serve": "^14.2.3",
"turbo": "^1.13.3",
"turbo": "^2.0.2",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@univerjs/core",
"version": "0.1.13",
"version": "0.1.14",
"private": false,
"description": "Core library for Univer.",
"author": "DreamNum <developer@univer.ai>",
Expand Down
12 changes: 12 additions & 0 deletions packages/core/src/shared/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,18 @@ export function isValidRange(range: IRange): boolean {
return false;
}

if (
rangeType !== RANGE_TYPE.ROW &&
rangeType !== RANGE_TYPE.COLUMN && (
Number.isNaN(startColumn) ||
Number.isNaN(startRow) ||
Number.isNaN(endColumn) ||
Number.isNaN(endRow)
)
) {
return false;
}

return true;
}

Expand Down
Loading

0 comments on commit e8f1158

Please sign in to comment.