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: customize row header #2457

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: customize row header
  • Loading branch information
Евгений Крютченко committed Jun 19, 2024
commit f3e6ce47fb32a89bb0dc119f45f3cf30147b78fb
8 changes: 8 additions & 0 deletions packages/facade/src/apis/__tests__/facade.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ describe('Test FUniver', () => {
it('Function getSnapshot', () => {
const snapshot = univerAPI.getActiveWorkbook()?.getSnapshot();
expect(snapshot?.resources).toEqual([
{
data: '{}',
name: 'SHEET_WORKSHEET_PROTECTION_PLUGIN',
},
{
data: '{}',
name: 'SHEET_WORKSHEET_PROTECTION_POINT_PLUGIN',
},
{
name: 'SHEET_CONDITIONAL_FORMATTING_PLUGIN',
data: '{"sheet-0011":[{"cfId":"AEGZdW8C","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false},{"cfId":"4ICEXdJj","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false},{"cfId":"geCv018z","ranges":[{"startRow":2,"startColumn":1,"endRow":11,"endColumn":5,"startAbsoluteRefType":0,"endAbsoluteRefType":0,"rangeType":0}],"rule":{"type":"highlightCell","subType":"text","operator":"containsText","style":{"cl":{"rgb":"#2f56ef"},"bg":{"rgb":"#e8ecfc"}},"value":""},"stopIfTrue":false}]}',
Expand Down
12 changes: 10 additions & 2 deletions packages/facade/src/apis/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula';
import { FDocument } from './docs/f-document';
import { FWorkbook } from './sheets/f-workbook';
import { FSheetHooks } from './sheets/f-sheet-hooks';
import { FHooks } from './f-hooks';

export class FUniver {
/**
Expand Down Expand Up @@ -294,6 +295,8 @@ export class FUniver {
});
}

// #endregion

/**
* Execute command
* @param id Command id
Expand Down Expand Up @@ -332,6 +335,13 @@ export class FUniver {
return this._injector.createInstance(FSheetHooks);
}

/**
* Get hooks
*/
getHooks() {
return this._injector.createInstance(FHooks);
}

/**
* Get sheet render component from render by unitId and view key.
* @param unitId
Expand Down Expand Up @@ -395,6 +405,4 @@ export class FUniver {
);
}, 10);
}

// @endregion
}
You are viewing a condensed version of this merge commit. You can view the full changes here.