Skip to content

Commit

Permalink
chore: fix types and update codeowners (#200)
Browse files Browse the repository at this point in the history
* chore: fix types and update codeowners

* fix: fix import path

* fix: remove useless clipboard service

* fix: type errors
  • Loading branch information
wzhudev committed Sep 27, 2023
1 parent bfeba4f commit 90fc548
Show file tree
Hide file tree
Showing 76 changed files with 78 additions and 3,188 deletions.
21 changes: 19 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
packages/base-sheets/src/commands/commands/set-selections.command.ts @wzhudev
packages/ui-plugin-sheets/src/controller/shortcuts/selection.shortcut.ts @wzhudev
# core
packages/core @DR-Univer @wzhudev

# rendering
packages/base-render @DR-Univer @wzhudev

# business cores
packages/base-docs @wzhudev @DR-Univer @Jocs
packages/base-sheets @wzhudev @DR-Univer
packages/base-slides @wzhudev @DR-Univer @jikkai

# ui
packages/base-ui @jikkai @wzhudev
packages/ui-plugin-docs @jikkai @wzhudev
packages/ui-plugin-sheets @jikkai @wzhudev
packages/ui-plugin-slides @jikkai @wzhudev

# documents
docs/graphs.tldr @wzhudev

# sheet-plugins TBD
12 changes: 10 additions & 2 deletions packages/base-docs/src/View/Render/Views/DocsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ export class DocsView extends BaseView {

scrollToCenter() {
const { docsLeft, docsTop } = this._documents.calculatePagePosition();
const pages = this._documentSkeleton.getSkeletonData().pages;
const pages = this._documentSkeleton.getSkeletonData()?.pages;

if (!pages) {
return;
}

for (let i = 0; i < pages.length; i++) {
const page = pages[i];
for (const k of page.skeDrawings.keys()) {
Expand Down Expand Up @@ -134,7 +139,10 @@ export class DocsView extends BaseView {
// }
// documents.calculatePagePosition();

const pages = documentSkeleton.getSkeletonData().pages;
const pages = documentSkeleton.getSkeletonData()?.pages;
if (!pages) {
throw new Error();
}

const { pageMarginLeft, pageMarginTop, docsLeft, docsTop } = documents.calculatePagePosition();

Expand Down
6 changes: 6 additions & 0 deletions packages/base-sheets/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export { NORMAL_SELECTION_PLUGIN_NAME, SelectionManagerService } from './service

// #region commands

export { type IInsertColMutationParams, type IInsertRowMutationParams } from './Basics/Interfaces/MutationInterface';
export {
AddWorksheetMergeAllCommand,
AddWorksheetMergeCommand,
Expand Down Expand Up @@ -100,12 +101,17 @@ export { SetRangeValuesMutation } from './commands/mutations/set-range-values.mu
export { SetTabColorMutation } from './commands/mutations/set-tab-color.mutation';
export { SetWorksheetActivateMutation } from './commands/mutations/set-worksheet-activate.mutation';
export {
type ISetWorksheetColWidthMutationParams,
SetWorksheetColWidthMutation,
SetWorksheetColWidthMutationFactory,
} from './commands/mutations/set-worksheet-col-width.mutation';
export { SetWorksheetHideMutation } from './commands/mutations/set-worksheet-hide.mutation';
export { SetWorksheetNameMutation } from './commands/mutations/set-worksheet-name.mutation';
export { SetWorksheetOrderMutation } from './commands/mutations/set-worksheet-order.mutation';
export {
type ISetWorksheetRowHeightMutationParams,
SetWorksheetRowHeightMutation,
} from './commands/mutations/set-worksheet-row-height.mutation';
export { SetSelectionsOperation } from './commands/operations/selection.operation';
export * from './Locale';

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 90fc548

Please sign in to comment.