From de6fd45ceb815d216fe43ee662a98afc4c26e8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Thu, 23 Jan 2025 16:41:19 +0800 Subject: [PATCH] fix: add ignore comments for facade --- packages/core/src/facade/f-event.ts | 1 + packages/docs-ui/src/facade/f-univer.ts | 3 + .../engine-formula/src/facade/f-univer.ts | 3 + packages/network/src/facade/f-univer.ts | 4 +- .../src/facade/f-range.ts | 3 + .../src/facade/f-workbook.ts | 3 + .../src/facade/f-worksheet.ts | 3 + .../src/facade/f-data-validation.ts | 104 +++++++++--------- .../src/facade/f-univer.ts | 32 +++--- packages/sheets-filter/src/facade/f-enum.ts | 3 + packages/sheets-filter/src/facade/f-event.ts | 3 + packages/sheets-filter/src/facade/f-range.ts | 3 + .../sheets-formula/src/facade/f-formula.ts | 3 + .../sheets-formula/src/facade/f-univer.ts | 6 + .../sheets-hyper-link/src/facade/f-event.ts | 6 + .../sheets-hyper-link/src/facade/f-range.ts | 3 + .../src/facade/f-workbook.ts | 3 + .../src/facade/f-worksheet.ts | 3 + packages/sheets-numfmt/src/facade/f-range.ts | 3 + .../sheets-numfmt/src/facade/f-workbook.ts | 3 + packages/sheets-sort/src/facade/f-event.ts | 3 + packages/sheets-sort/src/facade/f-range.ts | 3 + .../src/facade/f-thread-comment.ts | 1 + packages/sheets-ui/src/facade/f-event.ts | 70 ++++++------ packages/sheets-ui/src/facade/f-permission.ts | 3 + packages/sheets-ui/src/facade/f-range.ts | 3 + .../sheets-ui/src/facade/f-sheet-hooks.ts | 3 + packages/sheets-ui/src/facade/f-univer.ts | 3 + packages/sheets/src/facade/f-enum.ts | 3 + packages/sheets/src/facade/f-event.ts | 83 +++++++------- packages/sheets/src/facade/f-univer.ts | 3 + .../src/views/components/popup/RectPopup.tsx | 2 +- 32 files changed, 232 insertions(+), 143 deletions(-) diff --git a/packages/core/src/facade/f-event.ts b/packages/core/src/facade/f-event.ts index d530df9830bc..397254371fe3 100644 --- a/packages/core/src/facade/f-event.ts +++ b/packages/core/src/facade/f-event.ts @@ -23,6 +23,7 @@ import type { FDoc } from './f-doc'; /** * Base interface for all event parameters * @interface IEventBase + * @ignore */ export interface IEventBase { /** Flag to cancel the event if supported */ diff --git a/packages/docs-ui/src/facade/f-univer.ts b/packages/docs-ui/src/facade/f-univer.ts index 7cc5bacff360..6ef7bff565d7 100644 --- a/packages/docs-ui/src/facade/f-univer.ts +++ b/packages/docs-ui/src/facade/f-univer.ts @@ -18,6 +18,9 @@ import type { DocumentDataModel, IDocumentData } from '@univerjs/core'; import { FUniver, UniverInstanceType } from '@univerjs/core'; import { FDocument } from './f-document'; +/** + * @ignore + */ export interface IFUniverDocsUIMixin { /** * Create a new document and get the API handler of that document. diff --git a/packages/engine-formula/src/facade/f-univer.ts b/packages/engine-formula/src/facade/f-univer.ts index 924bc4d30ca4..56a1b12d8732 100644 --- a/packages/engine-formula/src/facade/f-univer.ts +++ b/packages/engine-formula/src/facade/f-univer.ts @@ -17,6 +17,9 @@ import { FUniver } from '@univerjs/core'; import { FFormula } from './f-formula'; +/** + * @ignore + */ export interface IFUniverEngineFormulaMixin { getFormula(): FFormula; } diff --git a/packages/network/src/facade/f-univer.ts b/packages/network/src/facade/f-univer.ts index 5fa04149451e..3c4b60db5fa5 100644 --- a/packages/network/src/facade/f-univer.ts +++ b/packages/network/src/facade/f-univer.ts @@ -17,7 +17,9 @@ import { FUniver } from '@univerjs/core'; import { FNetwork } from './f-network'; -/** @ignore */ +/** + * @ignore + */ interface IFUniverNetworkMixin { /** * Get the network API of Univer, with the help of which you can send HTTP requests. diff --git a/packages/sheets-conditional-formatting/src/facade/f-range.ts b/packages/sheets-conditional-formatting/src/facade/f-range.ts index 9fad516431dc..2db320617466 100644 --- a/packages/sheets-conditional-formatting/src/facade/f-range.ts +++ b/packages/sheets-conditional-formatting/src/facade/f-range.ts @@ -34,6 +34,9 @@ import { import { FRange } from '@univerjs/sheets/facade'; import { FConditionalFormattingBuilder } from './conditional-formatting-builder'; +/** + * @ignore + */ export interface IFRangeConditionalFormattingMixin { /** diff --git a/packages/sheets-conditional-formatting/src/facade/f-workbook.ts b/packages/sheets-conditional-formatting/src/facade/f-workbook.ts index 971881ae4d4f..23d9c4f2b91a 100644 --- a/packages/sheets-conditional-formatting/src/facade/f-workbook.ts +++ b/packages/sheets-conditional-formatting/src/facade/f-workbook.ts @@ -17,6 +17,9 @@ import { ColorBuilder } from '@univerjs/core'; import { FWorkbook } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFWorkbookConditionalFormattingMixin { /** * @deprecated use `univerAPI.newColor()` as instead. diff --git a/packages/sheets-conditional-formatting/src/facade/f-worksheet.ts b/packages/sheets-conditional-formatting/src/facade/f-worksheet.ts index d90c9c5db037..3dc48f4231ee 100644 --- a/packages/sheets-conditional-formatting/src/facade/f-worksheet.ts +++ b/packages/sheets-conditional-formatting/src/facade/f-worksheet.ts @@ -32,6 +32,9 @@ import { import { FWorksheet } from '@univerjs/sheets/facade'; import { FConditionalFormattingBuilder } from './conditional-formatting-builder'; +/** + * @ignore + */ export interface IFWorksheetConditionalFormattingMixin { /** diff --git a/packages/sheets-data-validation/src/facade/f-data-validation.ts b/packages/sheets-data-validation/src/facade/f-data-validation.ts index c605a9094e85..f0b426d7d384 100644 --- a/packages/sheets-data-validation/src/facade/f-data-validation.ts +++ b/packages/sheets-data-validation/src/facade/f-data-validation.ts @@ -42,10 +42,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const allowsInvalid = dataValidation.getAllowInvalid(); * ``` */ @@ -59,10 +59,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const type = dataValidation.getCriteriaType(); * ``` */ @@ -76,10 +76,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const [operator, formula1, formula2] = dataValidation.getCriteriaValues(); * ``` */ @@ -93,10 +93,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const helpText = dataValidation.getHelpText(); * ``` */ @@ -110,10 +110,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const builder = dataValidation.copy(); * const newRule = builder.setAllowInvalid(true).build(); * ``` @@ -128,10 +128,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const isApplied = dataValidation.getApplied(); * ``` */ @@ -155,10 +155,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const ranges = dataValidation.getRanges(); * ``` */ @@ -177,10 +177,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const unitId = dataValidation.getUnitId(); * ``` */ @@ -194,10 +194,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const sheetId = dataValidation.getSheetId(); * ``` */ @@ -214,10 +214,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * dataValidation.setCriteria( * DataValidationType.DECIMAL, * [DataValidationOperator.BETWEEN, '1', '10'], @@ -262,10 +262,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * dataValidation.setOptions({ * allowBlank: true, * showErrorMessage: true, @@ -302,10 +302,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const range = FRange.create('Sheet1', 'A1:B10'); * dataValidation.setRanges([range]); * ``` @@ -335,10 +335,10 @@ export class FDataValidation { * @example * ```typescript * const dataValidation = univerAPI - * .getActiveWorkbook() - * .getActiveWorksheet() - * .getActiveRange() - * .getDataValidation(); + * .getActiveWorkbook() + * .getActiveWorksheet() + * .getActiveRange() + * .getDataValidation(); * const isDeleted = dataValidation.delete(); * ``` */ diff --git a/packages/sheets-data-validation/src/facade/f-univer.ts b/packages/sheets-data-validation/src/facade/f-univer.ts index 3be8e843f1a1..8e6703dbb9cc 100644 --- a/packages/sheets-data-validation/src/facade/f-univer.ts +++ b/packages/sheets-data-validation/src/facade/f-univer.ts @@ -25,14 +25,7 @@ import { FDataValidationBuilder } from './f-data-validation-builder'; /** * @ignore */ -export class FUnvierDataValidationMixin extends FUniver { - /** - * @deprecated use `univerAPI.newDataValidation()` as instead. - */ - static override newDataValidation(): FDataValidationBuilder { - return new FDataValidationBuilder(); - } - +export interface IFUnvierDataValidationMixin { /** * Creates a new instance of FDataValidationBuilder * @returns {FDataValidationBuilder} A new instance of the FDataValidationBuilder class @@ -42,7 +35,19 @@ export class FUnvierDataValidationMixin extends FUniver { * cell.setDataValidation(rule.requireValueInRange(range)); * ``` */ - newDataValidation(): FDataValidationBuilder { + newDataValidation(): FDataValidationBuilder; +} + +export class FUnvierDataValidationMixin extends FUniver implements IFUnvierDataValidationMixin { + /** + * @deprecated use `univerAPI.newDataValidation()` as instead. + * @returns {FDataValidationBuilder} A new instance of the FDataValidationBuilder class + */ + static newDataValidation(): FDataValidationBuilder { + return new FDataValidationBuilder(); + } + + override newDataValidation(): FDataValidationBuilder { return new FDataValidationBuilder(); } @@ -245,11 +250,6 @@ export class FUnvierDataValidationMixin extends FUniver { FUniver.extend(FUnvierDataValidationMixin); declare module '@univerjs/core' { - /** - * @ignore - */ - // eslint-disable-next-line ts/no-namespace - namespace FUniver { - function newDataValidation(): FDataValidationBuilder; - } + // eslint-disable-next-line ts/naming-convention + interface FUniver extends IFUnvierDataValidationMixin {} } diff --git a/packages/sheets-filter/src/facade/f-enum.ts b/packages/sheets-filter/src/facade/f-enum.ts index 1680aff72fdb..e29f867efd17 100644 --- a/packages/sheets-filter/src/facade/f-enum.ts +++ b/packages/sheets-filter/src/facade/f-enum.ts @@ -17,6 +17,9 @@ import { FEnum } from '@univerjs/core'; import { CustomFilterOperator } from '@univerjs/sheets-filter'; +/** + * @ignore + */ export interface IFSheetsFilterEnumMixin { /** Please refer to {@link CustomFilterOperator}. */ CustomFilterOperator: typeof CustomFilterOperator; diff --git a/packages/sheets-filter/src/facade/f-event.ts b/packages/sheets-filter/src/facade/f-event.ts index 6850de6c659d..c15844207c77 100644 --- a/packages/sheets-filter/src/facade/f-event.ts +++ b/packages/sheets-filter/src/facade/f-event.ts @@ -21,6 +21,9 @@ import { FEventName, FUniver, ICommandService } from '@univerjs/core'; import { ClearSheetsFilterCriteriaCommand, SetSheetsFilterCriteriaCommand } from '@univerjs/sheets-filter'; import { FSheetEventName } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFSheetFilterEventMixin { /** * This event will be emitted when the filter criteria on a column is changed. diff --git a/packages/sheets-filter/src/facade/f-range.ts b/packages/sheets-filter/src/facade/f-range.ts index 906e3a239820..d7218b0fd8b9 100644 --- a/packages/sheets-filter/src/facade/f-range.ts +++ b/packages/sheets-filter/src/facade/f-range.ts @@ -22,6 +22,9 @@ import { FFilter } from './f-filter'; // TODO: add jsdoc comments for the following API +/** + * @ignore + */ export interface IFRangeFilter { /** * Create a filter for the current range. If the worksheet already has a filter, this method would return `null`. diff --git a/packages/sheets-formula/src/facade/f-formula.ts b/packages/sheets-formula/src/facade/f-formula.ts index a3ad7a4ce260..604800099ea9 100644 --- a/packages/sheets-formula/src/facade/f-formula.ts +++ b/packages/sheets-formula/src/facade/f-formula.ts @@ -23,6 +23,9 @@ import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula'; import { FFormula } from '@univerjs/engine-formula/facade'; import { IRegisterFunctionService, PLUGIN_CONFIG_KEY_BASE, RegisterFunctionService } from '@univerjs/sheets-formula'; +/** + * @ignore + */ export interface IFFormulaSheetsMixin { /** * Update the calculation mode of the formula. diff --git a/packages/sheets-formula/src/facade/f-univer.ts b/packages/sheets-formula/src/facade/f-univer.ts index 1aae40ff01bf..d9c0196d8d73 100644 --- a/packages/sheets-formula/src/facade/f-univer.ts +++ b/packages/sheets-formula/src/facade/f-univer.ts @@ -19,6 +19,9 @@ import { debounce, FUniver } from '@univerjs/core'; import { SetFormulaCalculationStartMutation } from '@univerjs/engine-formula'; import { type IRegisterFunctionParams, IRegisterFunctionService, RegisterFunctionService } from '@univerjs/sheets-formula'; +/** + * @ignore + */ export interface IFUniverSheetsFormulaMixin { /** * Register a function to the spreadsheet. @@ -29,6 +32,9 @@ export interface IFUniverSheetsFormulaMixin { registerFunction(config: IRegisterFunctionParams): IDisposable; } +/** + * @ignore + */ export class FUniverSheetsFormulaMixin extends FUniver implements IFUniverSheetsFormulaMixin { /** * RegisterFunction may be executed multiple times, triggering multiple formula forced refreshes. diff --git a/packages/sheets-hyper-link/src/facade/f-event.ts b/packages/sheets-hyper-link/src/facade/f-event.ts index 0f002e45d5ed..ec0305697230 100644 --- a/packages/sheets-hyper-link/src/facade/f-event.ts +++ b/packages/sheets-hyper-link/src/facade/f-event.ts @@ -18,9 +18,13 @@ import type { ICellLinkContent, ISheetHyperLink } from '@univerjs/sheets-hyper-l import type { FWorkbook, FWorksheet } from '@univerjs/sheets/facade'; import { FEventName, type IEventBase } from '@univerjs/core'; +/** + * @ignore + */ interface IFSheetLinkEvent { /** * Event triggered before adding a link + * * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetLinkAdd, (params) => { @@ -32,6 +36,7 @@ interface IFSheetLinkEvent { readonly BeforeSheetLinkAdd: 'BeforeSheetLinkAdd'; /** * Event triggered before canceling a link + * * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetLinkCancel, (params) => { @@ -43,6 +48,7 @@ interface IFSheetLinkEvent { readonly BeforeSheetLinkCancel: 'BeforeSheetLinkCancel'; /** * Event triggered before updating a link + * * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetLinkUpdate, (params) => { diff --git a/packages/sheets-hyper-link/src/facade/f-range.ts b/packages/sheets-hyper-link/src/facade/f-range.ts index 4a49662eb5bd..c272554388df 100644 --- a/packages/sheets-hyper-link/src/facade/f-range.ts +++ b/packages/sheets-hyper-link/src/facade/f-range.ts @@ -27,6 +27,9 @@ export interface ICellHyperLink { label: string; } +/** + * @ignore + */ export interface IFRangeHyperlinkMixin { /** * @deprecated use `range.setRichTextValueForCell(univerAPI.newRichText().insertLink(label, url))` instead diff --git a/packages/sheets-hyper-link/src/facade/f-workbook.ts b/packages/sheets-hyper-link/src/facade/f-workbook.ts index 9eed858a217c..de63109b2fc7 100644 --- a/packages/sheets-hyper-link/src/facade/f-workbook.ts +++ b/packages/sheets-hyper-link/src/facade/f-workbook.ts @@ -35,6 +35,9 @@ export class SheetHyperLinkBuilder { } } +/** + * @ignore + */ export interface IFWorkbookHyperlinkMixin { /** * @deprecated use `getUrl` method in `FRange` or `FWorksheet` instead. diff --git a/packages/sheets-hyper-link/src/facade/f-worksheet.ts b/packages/sheets-hyper-link/src/facade/f-worksheet.ts index 925afeda64ec..7ba25d8f9e70 100644 --- a/packages/sheets-hyper-link/src/facade/f-worksheet.ts +++ b/packages/sheets-hyper-link/src/facade/f-worksheet.ts @@ -17,6 +17,9 @@ import { SheetsHyperLinkParserService } from '@univerjs/sheets-hyper-link'; import { FWorksheet } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFWorksheetHyperlinkMixin { /** * Get the url of this sheet diff --git a/packages/sheets-numfmt/src/facade/f-range.ts b/packages/sheets-numfmt/src/facade/f-range.ts index c1b882e28f28..85f565b4b841 100644 --- a/packages/sheets-numfmt/src/facade/f-range.ts +++ b/packages/sheets-numfmt/src/facade/f-range.ts @@ -18,6 +18,9 @@ import type { ISetNumfmtCommandParams } from '@univerjs/sheets-numfmt'; import { SetNumfmtCommand } from '@univerjs/sheets-numfmt'; import { FRange } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFRangeSheetsNumfmtMixin { // TODO@wzhudev: should separate numfmt package to two diff --git a/packages/sheets-numfmt/src/facade/f-workbook.ts b/packages/sheets-numfmt/src/facade/f-workbook.ts index 8fb6cf17b1ac..0ecc514119ea 100644 --- a/packages/sheets-numfmt/src/facade/f-workbook.ts +++ b/packages/sheets-numfmt/src/facade/f-workbook.ts @@ -18,6 +18,9 @@ import type { INumfmtLocalTag } from '@univerjs/core'; import { SheetsNumfmtCellContentController } from '@univerjs/sheets-numfmt'; import { FWorkbook } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFWorkbookNumfmtMixin { /** diff --git a/packages/sheets-sort/src/facade/f-event.ts b/packages/sheets-sort/src/facade/f-event.ts index 20f4b4eccad4..0cf8944359af 100644 --- a/packages/sheets-sort/src/facade/f-event.ts +++ b/packages/sheets-sort/src/facade/f-event.ts @@ -20,6 +20,9 @@ import { FEventName, FUniver, ICommandService } from '@univerjs/core'; import { type ISortRangeCommandParams, SortRangeCommand, SortType } from '@univerjs/sheets-sort'; import { FSheetEventName } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFSheetSortEventMixin { /** * This event will be emitted when a range on a worksheet is sorted. diff --git a/packages/sheets-sort/src/facade/f-range.ts b/packages/sheets-sort/src/facade/f-range.ts index 58911bad2a2f..2c861c7c2d9c 100644 --- a/packages/sheets-sort/src/facade/f-range.ts +++ b/packages/sheets-sort/src/facade/f-range.ts @@ -20,6 +20,9 @@ import { FRange } from '@univerjs/sheets/facade'; export type SortColumnSpec = { column: number; ascending: boolean } | number; +/** + * @ignore + */ export interface IFRangeSort { /** * Sorts the cells in the given range, by column(s) and order specified. diff --git a/packages/sheets-thread-comment/src/facade/f-thread-comment.ts b/packages/sheets-thread-comment/src/facade/f-thread-comment.ts index c0ff11c06753..6c61079c2bda 100644 --- a/packages/sheets-thread-comment/src/facade/f-thread-comment.ts +++ b/packages/sheets-thread-comment/src/facade/f-thread-comment.ts @@ -24,6 +24,7 @@ import { AddCommentCommand, DeleteCommentCommand, DeleteCommentTreeCommand, getD /** * An readonly class that represents a comment. + * @ignore */ export class FTheadCommentItem { protected _comment: IThreadComment = { diff --git a/packages/sheets-ui/src/facade/f-event.ts b/packages/sheets-ui/src/facade/f-event.ts index 3b721f48f676..ad2717ce61e3 100644 --- a/packages/sheets-ui/src/facade/f-event.ts +++ b/packages/sheets-ui/src/facade/f-event.ts @@ -150,6 +150,9 @@ export const CellFEventName = { SelectionChanged: 'SelectionChanged', } as const; +/** + * @ignore + */ export interface IFSheetsUIEventNameMixin { /** * Trigger this event before the clipboard content changes. @@ -184,10 +187,10 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeClipboardPaste, (param) => { - * const {text, html} = param; - * console.log('debugger', text, html); - * // if want to cancel the clipboard paste - * param.cancel = true; + * const {text, html} = param; + * console.log('debugger', text, html); + * // if want to cancel the clipboard paste + * param.cancel = true; * }) * ``` */ @@ -198,8 +201,8 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.ClipboardPasted, (param) => { - * const {text, html} = param; - * console.log('debugger', text, html); // {text: '...', html: '...'} + * const {text, html} = param; + * console.log('debugger', text, html); // {text: '...', html: '...'} * }) * ``` */ @@ -211,7 +214,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetEditStart, (params) => { - * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; + * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; * }); * ``` */ @@ -222,7 +225,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetEditStarted, (params) => { - * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; + * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; * }); * ``` */ @@ -233,7 +236,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetEditChanging, (params) => { - * const { worksheet, workbook, row, column, value, isZenEditor } = params; + * const { worksheet, workbook, row, column, value, isZenEditor } = params; * }); * ``` */ @@ -244,7 +247,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => { - * const { worksheet, workbook, row, column, value, eventType, keycode, isZenEditor } = params; + * const { worksheet, workbook, row, column, value, eventType, keycode, isZenEditor } = params; * }); * ``` */ @@ -255,7 +258,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetEditEnded, (params) => { - * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; + * const { worksheet, workbook, row, column, eventType, keycode, isZenEditor } = params; * }); * ``` */ @@ -266,7 +269,7 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.CellClicked, (params)=> { + * univerAPI.addEvent(univerAPI.Event.CellClicked, (params) => { * const { worksheet, workbook, row, column, value, isZenEditor } = params; * }); * ``` @@ -277,8 +280,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params)=> { - * const { worksheet, workbook, row, column } = params; + * univerAPI.addEvent(univerAPI.Event.CellPointerDown, (params) => { + * const { worksheet, workbook, row, column } = params; * }); * ``` */ @@ -289,8 +292,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params)=> { - * const { worksheet, workbook, row, column } = params; + * univerAPI.addEvent(univerAPI.Event.CellPointerUp, (params) => { + * const { worksheet, workbook, row, column } = params; * }); * ``` */ @@ -301,8 +304,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.CellHover, (params)=> { - * const { worksheet, workbook, row, column } = params; + * univerAPI.addEvent(univerAPI.Event.CellHover, (params) => { + * const { worksheet, workbook, row, column } = params; * }); * ``` */ @@ -312,8 +315,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params)=> { - * const { worksheet, workbook, row, column } = params; + * univerAPI.addEvent(univerAPI.Event.CellPointerMove, (params) => { + * const { worksheet, workbook, row, column } = params; * }); * ``` */ @@ -420,8 +423,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.DragOver, (params)=> { - * const { worksheet, workbook, row, column } = params; + * univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.DragOver, (params) => { + * const { worksheet, workbook, row, column } = params; * }); * ``` */ @@ -432,7 +435,7 @@ export interface IFSheetsUIEventNameMixin { * @see {@link ICellEventParam} * @example * ```ts - * univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.Drop, (params)=> { + * univerAPI.getActiveWorkbook().addEvent(univerAPI.Event.Drop, (params) => { * const { worksheet, workbook, row, column } = params; * }); * ``` @@ -444,8 +447,8 @@ export interface IFSheetsUIEventNameMixin { * @see {@link IScrollEventParam} * @example * ```ts - * univerAPI.addEvent(univerAPI.Event.Scroll, (params)=> { - * const { worksheet, workbook, scrollX, scrollY } = params; + * univerAPI.addEvent(univerAPI.Event.Scroll, (params) => { + * const { worksheet, workbook, scrollX, scrollY } = params; * }); * ``` */ @@ -457,7 +460,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SelectionChanged, (p)=> { - * const { worksheet, workbook, selections } = p; + * const { worksheet, workbook, selections } = p; * }); * ``` */ @@ -469,7 +472,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SelectionMoveStart, (p)=> { - * const { worksheet, workbook, selections } = p; + * const { worksheet, workbook, selections } = p; * }); * ``` */ @@ -481,7 +484,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SelectionMoving, (p)=> { - * const { worksheet, workbook, selections } = p; + * const { worksheet, workbook, selections } = p; * }); * ``` */ @@ -493,7 +496,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SelectionMoveEnd, (p)=> { - * const { worksheet, workbook, selections } = p; + * const { worksheet, workbook, selections } = p; * }); * ``` */ @@ -505,7 +508,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetZoomChanged, (p)=> { - * const { worksheet, workbook, zoom } = p; + * const { worksheet, workbook, zoom } = p; * }); * ``` */ @@ -517,7 +520,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetZoomChange, (p)=> { - * const { worksheet, workbook, zoom } = p; + * const { worksheet, workbook, zoom } = p; * }); * ``` */ @@ -529,7 +532,7 @@ export interface IFSheetsUIEventNameMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetSkeletonChanged, (p)=> { - * const { worksheet, workbook } = p; + * const { worksheet, workbook } = p; * }); * ``` */ @@ -659,6 +662,9 @@ export class FSheetsUIEventName extends FEventName implements IFSheetsUIEventNam } } +/** + * @ignore + */ export interface ISheetUIEventBase extends IEventBase { /** * The workbook instance currently being operated on. {@link FWorkbook} diff --git a/packages/sheets-ui/src/facade/f-permission.ts b/packages/sheets-ui/src/facade/f-permission.ts index dc44be1ca6fc..02b3cec309f9 100644 --- a/packages/sheets-ui/src/facade/f-permission.ts +++ b/packages/sheets-ui/src/facade/f-permission.ts @@ -16,6 +16,9 @@ import { FPermission } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFPermissionSheetsUIMixin { /** * Set visibility of unauthorized pop-up window diff --git a/packages/sheets-ui/src/facade/f-range.ts b/packages/sheets-ui/src/facade/f-range.ts index 33c067a7d6d7..a2ab27da9502 100644 --- a/packages/sheets-ui/src/facade/f-range.ts +++ b/packages/sheets-ui/src/facade/f-range.ts @@ -39,6 +39,9 @@ export interface IFComponentKey { export interface IFCanvasPopup extends Omit, IFComponentKey { } +/** + * @ignore + */ interface IFRangeSheetsUIMixin { /** * Return this cell information, including whether it is merged and cell coordinates diff --git a/packages/sheets-ui/src/facade/f-sheet-hooks.ts b/packages/sheets-ui/src/facade/f-sheet-hooks.ts index 3d92f0051cdc..783cfdbceda5 100644 --- a/packages/sheets-ui/src/facade/f-sheet-hooks.ts +++ b/packages/sheets-ui/src/facade/f-sheet-hooks.ts @@ -21,6 +21,9 @@ import { InterceptCellContentPriority, INTERCEPTOR_POINT, SheetInterceptorServic import { DragManagerService, HoverManagerService, SetCellEditVisibleOperation } from '@univerjs/sheets-ui'; import { FSheetHooks } from '@univerjs/sheets/facade'; +/** + * @ignore + */ export interface IFSheetHooksUIMixin { /** * The onCellPointerMove event is fired when a pointer changes coordinates. diff --git a/packages/sheets-ui/src/facade/f-univer.ts b/packages/sheets-ui/src/facade/f-univer.ts index a37433a52679..aa14c1279d6c 100644 --- a/packages/sheets-ui/src/facade/f-univer.ts +++ b/packages/sheets-ui/src/facade/f-univer.ts @@ -39,6 +39,9 @@ import { FSheetHooks } from '@univerjs/sheets/facade'; import { CopyCommand, CutCommand, HTML_CLIPBOARD_MIME_TYPE, IClipboardInterfaceService, KeyCode, PasteCommand, PLAIN_TEXT_CLIPBOARD_MIME_TYPE, supportClipboardAPI } from '@univerjs/ui'; import { combineLatest, filter } from 'rxjs'; +/** + * @ignore + */ export interface IFUniverSheetsUIMixin { /** * Customize the column header of the spreadsheet. diff --git a/packages/sheets/src/facade/f-enum.ts b/packages/sheets/src/facade/f-enum.ts index 6e6ffcf33519..ba439251bbdc 100644 --- a/packages/sheets/src/facade/f-enum.ts +++ b/packages/sheets/src/facade/f-enum.ts @@ -17,6 +17,9 @@ import { FEnum } from '@univerjs/core'; import { SheetSkeletonChangeType, SheetValueChangeType } from '@univerjs/sheets'; +/** + * @ignore + */ export interface IFSheetsEnum { /** * Sheet value change command types. These commands affect the content or style of cells. diff --git a/packages/sheets/src/facade/f-event.ts b/packages/sheets/src/facade/f-event.ts index 4620d3bb0bda..a22580a12de1 100644 --- a/packages/sheets/src/facade/f-event.ts +++ b/packages/sheets/src/facade/f-event.ts @@ -24,6 +24,7 @@ import { FEventName } from '@univerjs/core'; /** * Interface for sheet-related events * Provides event names for sheet creation, workbook creation, and gridline changes + * @ignore */ export interface IFSheetEventMixin { /** @@ -31,10 +32,10 @@ export interface IFSheetEventMixin { * @see {@link ISheetCreatedEventParams} * @example * ```ts - univerAPI.addEvent(univerAPI.Event.SheetCreated, (params) => { - const { workbook, worksheet } = params; - console.log('sheet created', params); - }); + * univerAPI.addEvent(univerAPI.Event.SheetCreated, (params) => { + * const { workbook, worksheet } = params; + * console.log('sheet created', params); + * }); * ``` */ get SheetCreated(): 'SheetCreated' ; @@ -44,8 +45,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetCreate, (params) => { - * const { workbook, index, sheet } = params; - * console.log('before sheet create', params); + * const { workbook, index, sheet } = params; + * console.log('before sheet create', params); * }); * ``` */ @@ -56,8 +57,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.ActiveSheetChanged, (params) => { - * const { workbook, activeSheet, oldActiveSheet } = params; - * console.log('before active sheet changed', params); + * const { workbook, activeSheet, oldActiveSheet } = params; + * console.log('before active sheet changed', params); * }); * ``` */ @@ -68,8 +69,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.ActiveSheetChanged, (params) => { - * const { workbook, activeSheet } = params; - * console.log('after active sheet changed', params); + * const { workbook, activeSheet } = params; + * console.log('after active sheet changed', params); * }); * ``` */ @@ -80,8 +81,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetDelete, (params) => { - * const { workbook, worksheetId } = params; - * console.log('before sheet delete', params); + * const { workbook, worksheetId } = params; + * console.log('before sheet delete', params); * }); * ``` */ @@ -92,8 +93,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetDelete, (params) => { - * const { workbook, worksheet } = params; - * console.log('before sheet delete', params); + * const { workbook, worksheet } = params; + * console.log('before sheet delete', params); * }); * ``` */ @@ -104,8 +105,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetMoved, (params) => { - * const { workbook, worksheet, newIndex } = params; - * console.log('sheet moved', params); + * const { workbook, worksheet, newIndex } = params; + * console.log('sheet moved', params); * }); * ``` */ @@ -116,8 +117,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetMove, (params) => { - * const { workbook, worksheet, newIndex, oldIndex } = params; - * console.log('before sheet move', params); + * const { workbook, worksheet, newIndex, oldIndex } = params; + * console.log('before sheet move', params); * }); * ``` */ @@ -128,8 +129,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetNameChanged, (params) => { - * const { workbook, worksheet, newName } = params; - * console.log('sheet name changed', params); + * const { workbook, worksheet, newName } = params; + * console.log('sheet name changed', params); * }); * ``` */ @@ -140,8 +141,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetNameChange, (params) => { - * const { workbook, worksheet, newName, oldName } = params; - * console.log('before sheet name changed', params); + * const { workbook, worksheet, newName, oldName } = params; + * console.log('before sheet name changed', params); * }); * ``` */ @@ -152,8 +153,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetTabColorChanged, (params) => { - * const { workbook, worksheet, color } = params; - * console.log('sheet tab color changed', params); + * const { workbook, worksheet, color } = params; + * console.log('sheet tab color changed', params); * }); * ``` */ @@ -164,8 +165,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetTabColorChange, (params) => { - * const { workbook, worksheet, color, oldColor } = params; - * console.log('before sheet tab color changed', params); + * const { workbook, worksheet, color, oldColor } = params; + * console.log('before sheet tab color changed', params); * }); * ``` */ @@ -176,8 +177,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetHideChanged, (params) => { - * const { workbook, worksheet } = params; - * console.log('sheet hide changed', params); + * const { workbook, worksheet } = params; + * console.log('sheet hide changed', params); * }); * ``` */ @@ -188,8 +189,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeSheetHideChange, (params) => { - * const { workbook, worksheet, hide } = params; - * console.log('before sheet hide changed', params); + * const { workbook, worksheet, hide } = params; + * console.log('before sheet hide changed', params); * }); * ``` */ @@ -200,8 +201,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.WorkbookCreated, (params) => { - * const { unitId, type, workbook, unit } = params; - * console.log('workbook created', params); + * const { unitId, type, workbook, unit } = params; + * console.log('workbook created', params); * }); * ``` */ @@ -212,8 +213,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.WorkbookDisposed, (params) => { - * const { unitId, unitType, snapshot } = params; - * console.log('unit disposed', params); + * const { unitId, unitType, snapshot } = params; + * console.log('unit disposed', params); * }); * ``` */ @@ -225,8 +226,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.GridlineChanged, (params) => { - * const { workbook, worksheet, enabled, color } = params; - * console.log('gridline changed', params); + * const { workbook, worksheet, enabled, color } = params; + * console.log('gridline changed', params); * }); * ``` */ @@ -238,8 +239,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeGridlineEnableChange, (params) => { - * const { workbook, worksheet, enabled } = params; - * console.log('gridline changed', params); + * const { workbook, worksheet, enabled } = params; + * console.log('gridline changed', params); * }); * ``` */ @@ -251,8 +252,8 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.BeforeGridlineColorChange, (params) => { - * const { workbook, worksheet, color } = params; - * console.log('gridline changed', params); + * const { workbook, worksheet, color } = params; + * console.log('gridline changed', params); * }); * ``` */ @@ -263,7 +264,7 @@ export interface IFSheetEventMixin { * @example * ```ts * univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (p)=> { - * const { workbook, effectedRanges, payload } = p; + * const { workbook, effectedRanges, payload } = p; * }); * ``` */ diff --git a/packages/sheets/src/facade/f-univer.ts b/packages/sheets/src/facade/f-univer.ts index b150bceca5c0..07ddc281c40b 100644 --- a/packages/sheets/src/facade/f-univer.ts +++ b/packages/sheets/src/facade/f-univer.ts @@ -25,6 +25,9 @@ import { FDefinedNameBuilder } from './f-defined-name'; import { FPermission } from './f-permission'; import { FWorkbook } from './f-workbook'; +/** + * @ignore + */ export interface IFUniverSheetsMixin { /** * @deprecated use `univerAPI.createWorkbook` instead. diff --git a/packages/ui/src/views/components/popup/RectPopup.tsx b/packages/ui/src/views/components/popup/RectPopup.tsx index 608d8b6229f0..29b3eb2d239e 100644 --- a/packages/ui/src/views/components/popup/RectPopup.tsx +++ b/packages/ui/src/views/components/popup/RectPopup.tsx @@ -119,7 +119,7 @@ function RectPopup(props: IRectPopupProps) { left: -9999, }); const excludeRectsRef = excludeRects; - const anchorRectRef = useRef(undefined); + const anchorRectRef = useRef(); useEffect(() => { const anchorRectSub = anchorRect$.subscribe((anchorRect) => {