Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore: export fix (#4590)

lumixef8dd1b6278b
diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts
index 92978f4ae9..0d76eace4e 100644
--- a/packages/core/src/index.ts
+++ b/packages/core/src/index.ts
@@ -193,6 +193,7 @@ export { DataValidationOperator } from './types/enum/data-validation-operator';
export { DataValidationRenderMode } from './types/enum/data-validation-render-mode';
export { DataValidationStatus } from './types/enum/data-validation-status';
export { DataValidationType } from './types/enum/data-validation-type';
+export { getCellCoordByIndexSimple, getCellPositionByIndexSimple, getCellWithCoordByIndexCore, SheetSkeleton } from './sheets/sheet-skeleton';
export * from './types/interfaces';
export type { ICellCustomRender, ICellRenderContext } from './types/interfaces/i-cell-custom-render';
export type { IDataValidationRule, IDataValidationRuleBase, IDataValidationRuleInfo, IDataValidationRuleOptions, ISheetDataValidationRule } from './types/interfaces/i-data-validation';
@@ -201,6 +202,5 @@ export { type BBox, type IRTreeItem, RBush, RTree } from './shared/r-tree';
export { type IUniverConfig, Univer } from './univer';
export { isNodeEnv } from './shared/tools';
export { Skeleton } from './skeleton.ts';
-export { getCellCoordByIndexSimple as getCellPositionByIndex, getCellWithCoordByIndexCore, SheetSkeleton } from './sheets/sheet-skeleton';
export type { IGetRowColByPosOptions } from './sheets/sheet-skeleton';
export type { IPosition } from './sheets/typedef.ts';
diff --git a/packages/core/src/sheets/sheet-skeleton.ts b/packages/core/src/sheets/sheet-skeleton.ts
index 8b4db1a373..11c0db7889 100644
--- a/packages/core/src/sheets/sheet-skeleton.ts
+++ b/packages/core/src/sheets/sheet-skeleton.ts
@@ -1042,9 +1042,8 @@ export class SheetSkeleton extends Skeleton {
}
/**
- * Only the coordinates of the corresponding cells in rows and columns are considered, without taking into account the merged data.
+ * Not same as getCellWithCoordByIndex, Only the coordinates of the corresponding cells in rows and columns are considered, without taking into account the merged data.
*
- * Original name: getCellPositionByIndexSimple
* @param row
* @param column
* @param rowHeightAccumulation
@@ -1081,6 +1080,23 @@ export function getCellCoordByIndexSimple(
};
}
+/**
+ * @deprecated use `getCellCoordByIndexSimple` instead.
+ * @param row
+ * @param column
+ * @param rowHeightAccumulation
+ * @param columnWidthAccumulation
+ * @returns
+ */
+export function getCellPositionByIndexSimple(
+ row: number,
+ column: number,
+ rowHeightAccumulation: number[],
+ columnWidthAccumulation: number[]
+): IPosition {
+ return getCellCoordByIndexSimple(row, column, rowHeightAccumulation, columnWidthAccumulation);
+}
+
/**
* @description Get the cell position information of the specified row and column, including the position of the cell and the merge info
* @param {number} row The row index of the cell
diff --git a/packages/engine-render/src/basics/tools.ts b/packages/engine-render/src/basics/tools.ts
index bcbb2a5223..e217fc5a3d 100644
--- a/packages/engine-render/src/basics/tools.ts
+++ b/packages/engine-render/src/basics/tools.ts
@@ -523,6 +523,7 @@ export function getCellPositionByIndex(
}
/**
+ * @deprecated use same function in @univerjs/core
* @description Get the cell position information of the specified row and column, including the position information of the cell and the merge information of the cell
* @param {number} row The row index of the cell
* @param {number} column The column index of the cell
@@ -605,7 +606,7 @@ export function getCellWithCoordByIndexCore(
}
/**
- * @deprecated please use getCellWithCoordByIndexCore instead
+ * @deprecated please use getCellWithCoordByIndexCore in @univerjs/core instead
*/
const getCellByIndexWithMergeInfo = getCellWithCoordByIndexCore;
export { getCellByIndexWithMergeInfo };