Skip to content

Commit

Permalink
Merge branch 'dev' into wzhudev/fix-set-range-values-type
Browse files Browse the repository at this point in the history
  • Loading branch information
wzhudev authored Mar 20, 2024
2 parents d51f2fc + c39799f commit d9df0aa
Show file tree
Hide file tree
Showing 31 changed files with 52 additions and 14 deletions.
1 change: 1 addition & 0 deletions packages/design/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/design)](https://npmjs.org/package/@univerjs/design)
[![license](https://img.shields.io/npm/l/@univerjs/design)](https://img.shields.io/npm/l/@univerjs/design)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/design/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/design)](https://npmjs.org/package/@univerjs/design)
[![license](https://img.shields.io/npm/l/@univerjs/design)](https://img.shields.io/npm/l/@univerjs/design)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/docs-ui/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/docs-ui)](https://npmjs.org/package/@univerjs/docs-ui)
[![license](https://img.shields.io/npm/l/@univerjs/docs-ui)](https://img.shields.io/npm/l/@univerjs/docs-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/docs-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/docs-ui)](https://npmjs.org/package/@univerjs/docs-ui)
[![license](https://img.shields.io/npm/l/@univerjs/docs-ui)](https://img.shields.io/npm/l/@univerjs/docs-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class ArrayValueObject extends BaseValueObject {

for (let r = startRow; r <= endRow; r++) {
for (let c = startColumn; c <= endColumn; c++) {
if (callback(valueList[r][c], r, c) === false) {
if (callback(valueList[r]?.[c], r, c) === false) {
return;
}
}
Expand Down Expand Up @@ -1366,9 +1366,6 @@ export class ArrayValueObject extends BaseValueObject {
}

const result: BaseValueObject[][] = [];
for (let r = 0; r < rowCount; r++) {
result[r] = [];
}

for (let c = 0; c < columnCount; c++) {
const value = valueList[c];
Expand Down Expand Up @@ -1417,7 +1414,11 @@ export class ArrayValueObject extends BaseValueObject {

if (rowPositions != null) {
rowPositions.forEach((row) => {
result[row][column] = BooleanValueObject.create(true);
const r = row - startRow;
if (result[r] == null) {
result[r] = [];
}
result[r][column] = BooleanValueObject.create(true);
});
// for (let r = 0; r < rowCount; r++) {
// if (rowPositions.has(r + startRow)) {
Expand Down
2 changes: 2 additions & 0 deletions packages/find-replace/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/find-replace)](https://npmjs.org/packages/@univerjs/find-replace)
[![license](https://img.shields.io/npm/l/@univerjs/find-replace)](https://img.shields.io/npm/l/@univerjs/find-replace)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
2 changes: 2 additions & 0 deletions packages/find-replace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/find-replace)](https://npmjs.org/packages/@univerjs/find-replace)
[![license](https://img.shields.io/npm/l/@univerjs/find-replace)](https://img.shields.io/npm/l/@univerjs/find-replace)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
4 changes: 4 additions & 0 deletions packages/find-replace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"url": "https://github.com/dream-num/univer/issues"
},
"keywords": ["univer"],
"sideEffects": [
"**/*.css"
],
"exports": {
".": "./src/index.ts",
"./*": "./src/*"
Expand Down Expand Up @@ -81,6 +84,7 @@
"@univerjs/shared": "workspace:*",
"@univerjs/ui": "workspace:*",
"@wendellhu/redi": "^0.13.0",
"less": "^4.2.0",
"react": "^18.2.0",
"rxjs": "^7.8.1",
"typescript": "^5.4.2",
Expand Down
1 change: 1 addition & 0 deletions packages/sheets-find-replace/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-find-replace)](https://npmjs.org/package/@univerjs/sheets-find-replace)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-find-replace)](https://img.shields.io/npm/l/@univerjs/sheets-find-replace)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-find-replace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-find-replace)](https://npmjs.org/package/@univerjs/sheets-find-replace)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-find-replace)](https://img.shields.io/npm/l/@univerjs/sheets-find-replace)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-formula/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-formula)](https://npmjs.org/package/@univerjs/sheets-formula)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-formula)](https://img.shields.io/npm/l/@univerjs/sheets-formula)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-formula/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-formula)](https://npmjs.org/package/@univerjs/sheets-formula)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-formula)](https://img.shields.io/npm/l/@univerjs/sheets-formula)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-numfmt/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-numfmt)](https://npmjs.org/package/@univerjs/sheets-numfmt)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-numfmt)](https://img.shields.io/npm/l/@univerjs/sheets-numfmt)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-numfmt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-numfmt)](https://npmjs.org/package/@univerjs/sheets-numfmt)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-numfmt)](https://img.shields.io/npm/l/@univerjs/sheets-numfmt)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-ui/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-ui)](https://npmjs.org/package/@univerjs/sheets-ui)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-ui)](https://img.shields.io/npm/l/@univerjs/sheets-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-ui)](https://npmjs.org/package/@univerjs/sheets-ui)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-ui)](https://img.shields.io/npm/l/@univerjs/sheets-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-zen-editor/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-zen-editor)](https://npmjs.org/packages/@univerjs/sheets-zen-editor)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-zen-editor)](https://img.shields.io/npm/l/@univerjs/sheets-zen-editor)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets-zen-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/sheets-zen-editor)](https://npmjs.org/packages/@univerjs/sheets-zen-editor)
[![license](https://img.shields.io/npm/l/@univerjs/sheets-zen-editor)](https://img.shields.io/npm/l/@univerjs/sheets-zen-editor)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/sheets/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/sheets)](https://npmjs.org/package/@univerjs/sheets)
[![license](https://img.shields.io/npm/l/@univerjs/sheets)](https://img.shields.io/npm/l/@univerjs/sheets)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/sheets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/sheets)](https://npmjs.org/package/@univerjs/sheets)
[![license](https://img.shields.io/npm/l/@univerjs/sheets)](https://img.shields.io/npm/l/@univerjs/sheets)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/slides-ui/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/slides-ui)](https://npmjs.org/package/@univerjs/slides-ui)
[![license](https://img.shields.io/npm/l/@univerjs/slides-ui)](https://img.shields.io/npm/l/@univerjs/slides-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/slides-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/slides-ui)](https://npmjs.org/package/@univerjs/slides-ui)
[![license](https://img.shields.io/npm/l/@univerjs/slides-ui)](https://img.shields.io/npm/l/@univerjs/slides-ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/slides/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/slides)](https://npmjs.org/package/@univerjs/slides)
[![license](https://img.shields.io/npm/l/@univerjs/slides)](https://img.shields.io/npm/l/@univerjs/slides)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/slides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![npm version](https://img.shields.io/npm/v/@univerjs/slides)](https://npmjs.org/package/@univerjs/slides)
[![license](https://img.shields.io/npm/l/@univerjs/slides)](https://img.shields.io/npm/l/@univerjs/slides)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
1 change: 1 addition & 0 deletions packages/ui/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/ui)](https://npmjs.org/package/@univerjs/ui)
[![license](https://img.shields.io/npm/l/@univerjs/ui)](https://img.shields.io/npm/l/@univerjs/ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/ui)](https://npmjs.org/package/@univerjs/ui)
[![license](https://img.shields.io/npm/l/@univerjs/ui)](https://img.shields.io/npm/l/@univerjs/ui)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/editor/TextEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export function TextEditor(props: ITextEditorProps & Omit<MyComponentProps, 'onC
if (value == null) {
return;
}
editorService.setValue(value, id);
editorService.setValueNoRefresh(value, id);
}, [value]);

function hasValue() {
Expand Down
16 changes: 9 additions & 7 deletions packages/ui/src/services/editor/editor.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ export interface IEditorService {

setValue(val: string, editorUnitId?: string): void;

setValueNoRefresh(val: string, editorUnitId?: string): void;

setRichValue(body: IDocumentBody, editorUnitId?: string): void;

getFirstEditor(): Editor;
Expand Down Expand Up @@ -493,15 +495,15 @@ export class EditorService extends Disposable implements IEditorService, IDispos
editorUnitId = this._getCurrentEditorUnitId();
}

if (val.substring(0, 1) === '=') {
this.setFormula(val, editorUnitId);
} else {
this._setValue$.next({ body: {
dataStream: val,
}, editorUnitId });
}
this.setValueNoRefresh(val, editorUnitId);

this._refreshValueChange(editorUnitId);
}

setValueNoRefresh(val: string, editorUnitId: string) {
this._setValue$.next({ body: {
dataStream: val,
}, editorUnitId });

this.resize(editorUnitId);
}
Expand Down
1 change: 1 addition & 0 deletions packages/uniscript/README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/uniscript)](https://npmjs.org/package/@univerjs/uniscript)
[![license](https://img.shields.io/npm/l/@univerjs/uniscript)](https://img.shields.io/npm/l/@univerjs/uniscript)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## 简介

Expand Down
1 change: 1 addition & 0 deletions packages/uniscript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![npm version](https://img.shields.io/npm/v/@univerjs/uniscript)](https://npmjs.org/package/@univerjs/uniscript)
[![license](https://img.shields.io/npm/l/@univerjs/uniscript)](https://img.shields.io/npm/l/@univerjs/uniscript)
![CSS Included](https://img.shields.io/badge/CSS_Included-blue?logo=CSS3)
![i18n](https://img.shields.io/badge/zh--CN%20%7C%20en--US-cornflowerblue?label=i18n)

## Introduction

Expand Down
5 changes: 4 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d9df0aa

Please sign in to comment.