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(docs): doc support table #2814

Merged
merged 88 commits into from
Aug 6, 2024
Merged
Changes from 1 commit
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
79823c5
feat: doc support table
Jocs Jul 18, 2024
848d9c7
fix: calculate cursor
Jocs Jul 19, 2024
4bab206
refactor: update data model
Jocs Jul 19, 2024
5cfa93a
refactor: add end index
Jocs Jul 20, 2024
72b42d6
refactor: update interface
Jocs Jul 20, 2024
eb86d0e
feat: parse table dataStream to node tree
Jocs Jul 20, 2024
28145f3
feat: udpate demo data
Jocs Jul 22, 2024
6bb801a
feat: udpate demo data
Jocs Jul 22, 2024
b48f6df
feat: layout table
Jocs Jul 22, 2024
0bd921e
feat: render table
Jocs Jul 22, 2024
6135cab
feat: paragraph in cell align
Jocs Jul 23, 2024
a023f90
feat: split table into different pages
Jocs Jul 23, 2024
6b7c3de
refactor: text range
Jocs Jul 23, 2024
5a3095c
fix: normal input in header and footer
Jocs Jul 24, 2024
633736c
refactor: section in cell
Jocs Jul 24, 2024
f3a07b7
feat: edit in table cell
Jocs Jul 24, 2024
ed94752
feat: create table confirm
Jocs Jul 24, 2024
533e203
feat: create table
Jocs Jul 24, 2024
d75a561
feat: rect range
Jocs Jul 25, 2024
84336f9
feat: rect range
Jocs Jul 26, 2024
ab0241e
refactor: tiny changes
Jocs Jul 26, 2024
4cbcdc1
refactor: text render manager
Jocs Jul 26, 2024
8bb2d6f
refactor: text render manager
Jocs Jul 27, 2024
820490d
refactor: text selection manager
Jocs Jul 27, 2024
e639ca7
refactor: insert paragraphs and sections
Jocs Jul 27, 2024
c2a57d5
refactor: insert paragraphs and sections
Jocs Jul 27, 2024
8716596
fix: cursor
Jocs Jul 27, 2024
0946420
fix: render
Jocs Jul 27, 2024
6d2ee6c
refactor: some minor changes
Jocs Jul 29, 2024
ac3f680
refactor: table skeleton cache
Jocs Jul 29, 2024
7f23e3c
feat: context menu ui
Jocs Jul 29, 2024
de2b45e
feat: insert rows
Jocs Jul 29, 2024
0d93c03
feat: insert rows
Jocs Jul 29, 2024
9f95337
feat: insert col
Jocs Jul 30, 2024
f0c88fa
feat: delete table and columns
Jocs Jul 30, 2024
0ffd531
fix: delete columns and rows
Jocs Jul 30, 2024
8417471
feat: inline format in rect range
Jocs Jul 30, 2024
f418c04
fix: delete table
Jocs Jul 31, 2024
0197674
feat: half tab
Jocs Jul 31, 2024
ea859e7
feat: minor changes
Jocs Jul 31, 2024
3915af6
feat: disable drawing in table
Jocs Jul 31, 2024
34ed7ce
fix: open confirm
Jocs Jul 31, 2024
277bc92
fix: ci
Jocs Aug 1, 2024
6489e38
fix: ci
Jocs Aug 1, 2024
5c81ad9
fix: ci
Jocs Aug 1, 2024
1c35fff
fix: ci
Jocs Aug 1, 2024
4d8c4d9
feat: move table command to doc plugin
Jocs Aug 1, 2024
3e24158
feat: cut content and move transform to univer
Jocs Aug 1, 2024
a9e8b05
feat: get cut cursor
Jocs Aug 1, 2024
715f493
fix: build ci
Jocs Aug 2, 2024
991d3b8
fix: move cursor
Jocs Aug 2, 2024
21ac3cd
feat: copy paste table
Jocs Aug 2, 2024
a0d00c1
feat: fix inline format
Jocs Aug 3, 2024
8fa64ec
fix: cursor
Jocs Aug 3, 2024
3e1e88f
fix: copy paste in doc
Jocs Aug 3, 2024
299e743
feat: rebase dev
Jocs Aug 3, 2024
74157c8
fix: clipboard
Jocs Aug 3, 2024
c774c87
fix: clipboard
Jocs Aug 3, 2024
d030bb3
fix: clipboard
Jocs Aug 3, 2024
5ce1036
fix: delete cursor
Jocs Aug 3, 2024
c56482e
fix: type
Jocs Aug 3, 2024
47885ea
fix: copy paste
Jocs Aug 3, 2024
177b3b7
fix: paragraph setting
Jocs Aug 3, 2024
c045f15
fix: handle delete shortcut
Jocs Aug 3, 2024
2ccf922
fix: insert table
Jocs Aug 5, 2024
6362b38
fix: insert table
Jocs Aug 5, 2024
b8d2142
fix: #1929 #1924
Jocs Aug 5, 2024
f36da88
fix: #1926
Jocs Aug 5, 2024
db490c2
fix: #1918
Jocs Aug 5, 2024
84891ce
fix: table selection
Jocs Aug 5, 2024
b509f8b
fix: 1915
Jocs Aug 5, 2024
21fdcd3
fix: 1917
Jocs Aug 5, 2024
3a57214
fix: 1917
Jocs Aug 5, 2024
250e5d9
fix: 1917
Jocs Aug 5, 2024
709fef3
fix: 1938
Jocs Aug 5, 2024
2398277
fix: #1941
Jocs Aug 5, 2024
e1a4806
fix: ci
Jocs Aug 6, 2024
c8336e1
fix: 1954
Jocs Aug 6, 2024
171cac8
fix: ci
Jocs Aug 6, 2024
951c9e9
fix: ci
Jocs Aug 6, 2024
f5f3766
fix: ci
Jocs Aug 6, 2024
1c08ccc
fix: ci
Jocs Aug 6, 2024
18a275d
fix: update e2e data
Jocs Aug 6, 2024
275343c
fix: ci
Jocs Aug 6, 2024
4bfc110
fix: ci
Jocs Aug 6, 2024
6888637
fix: ci
Jocs Aug 6, 2024
b6cd20b
ci: test env
wzhudev Aug 6, 2024
cce2fa5
ci: disable pixel check
wzhudev Aug 6, 2024
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
Prev Previous commit
Next Next commit
fix: 1917
  • Loading branch information
Jocs committed Aug 6, 2024
commit 3a572144440ab975a5fdcbb4edb972bdbe7e0e4c
17 changes: 8 additions & 9 deletions packages/docs/src/commands/commands/list.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,16 @@ export const ChangeListTypeCommand: ICommand<IChangeListTypeCommandParams> = {
const commandService = accessor.get(ICommandService);
const { listType } = params;
const docDataModel = univerInstanceService.getCurrentUniverDocInstance();
const activeRange = textSelectionManagerService.getActiveRange();
const activeRange = textSelectionManagerService.getActiveTextRangeWithStyle();
if (docDataModel == null || activeRange == null) {
return false;
}

const { segmentId } = activeRange;

const selections = textSelectionManagerService.getCurrentSelections() ?? [];
const selections = textSelectionManagerService.getDocRanges() ?? [];
const paragraphs = docDataModel.getSelfOrHeaderFooterModel(segmentId).getBody()?.paragraphs;
const serializedSelections = selections.map(serializeTextRange);
const serializedSelections = selections.map(serializeDocRange);

if (paragraphs == null) {
return false;
Expand Down Expand Up @@ -337,16 +337,16 @@ export const ChangeListNestingLevelCommand: ICommand<IChangeListNestingLevelComm
const univerInstanceService = accessor.get(IUniverInstanceService);
const commandService = accessor.get(ICommandService);
const docDataModel = univerInstanceService.getCurrentUniverDocInstance();
const activeRange = textSelectionManagerService.getActiveRange();
const activeRange = textSelectionManagerService.getActiveTextRangeWithStyle();
if (docDataModel == null || activeRange == null) {
return false;
}

const { segmentId } = activeRange;

const selections = textSelectionManagerService.getCurrentSelections() ?? [];
const selections = textSelectionManagerService.getDocRanges() ?? [];
const paragraphs = docDataModel.getSelfOrHeaderFooterModel(segmentId).getBody()?.paragraphs;
const serializedSelections = selections.map(serializeTextRange);
const serializedSelections = selections.map(serializeDocRange);

if (paragraphs == null) {
return false;
Expand Down Expand Up @@ -504,7 +504,6 @@ export function getParagraphsInRange(activeRange: IActiveTextRange, paragraphs:
return results;
}

<<<<<<< HEAD
export function getParagraphsRelative(activeRange: IActiveTextRange, paragraphs: IParagraph[]) {
const selectionParagraphs = getParagraphsInRange(activeRange, paragraphs);
const startIndex = paragraphs.indexOf(selectionParagraphs[0]);
Expand All @@ -529,7 +528,8 @@ export function getParagraphsRelative(activeRange: IActiveTextRange, paragraphs:
}

return selectionParagraphs;
=======
}

export function getParagraphsInRanges(ranges: IDocRange[], paragraphs: IParagraph[]) {
const results: IParagraph[] = [];

Expand All @@ -540,7 +540,6 @@ export function getParagraphsInRanges(ranges: IDocRange[], paragraphs: IParagrap
}

return results;
>>>>>>> 797d3bb28 (fix: paragraph setting)
}

export function findNearestSectionBreak(currentIndex: number, sectionBreaks: ISectionBreak[]) {
Expand Down