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.

feat: core facade f-enum add ImageSourceType (#7202)

wpxp123456600eaf2b62b9
diff --git a/packages/core/src/facade/f-enum.ts b/packages/core/src/facade/f-enum.ts
index c4c8907930..aa1b9f26d2 100644
--- a/packages/core/src/facade/f-enum.ts
+++ b/packages/core/src/facade/f-enum.ts
@@ -16,7 +16,7 @@
/* eslint-disable ts/explicit-function-return-type */
-import { AbsoluteRefType, AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
+import { AbsoluteRefType, AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, ImageSourceType, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
/**
* @hideconstructor
@@ -458,4 +458,16 @@ export class FEnum {
get ThemeColorType() {
return ThemeColorType;
}
+
+ /**
+ * Image source types
+ *
+ * @example
+ * ```ts
+ * console.log(univerAPI.Enum.ImageSourceType.URL);
+ * ```
+ */
+ get ImageSourceType() {
+ return ImageSourceType;
+ }
}
diff --git a/packages/sheets-drawing/src/facade/f-enum.ts b/packages/sheets-drawing/src/facade/f-enum.ts
index 6358e40d74..a6d86c3d58 100644
--- a/packages/sheets-drawing/src/facade/f-enum.ts
+++ b/packages/sheets-drawing/src/facade/f-enum.ts
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-import { DrawingTypeEnum, ImageSourceType } from '@univerjs/core';
+import { DrawingTypeEnum } from '@univerjs/core';
import { FEnum } from '@univerjs/core/facade';
import { SheetDrawingAnchorType } from '@univerjs/sheets-drawing';
@@ -25,9 +25,6 @@ export interface IFSheetsDrawingEnumMixin {
/** Please refer to {@link DrawingTypeEnum}. */
DrawingType: typeof DrawingTypeEnum;
- /** Please refer to {@link ImageSourceType}. */
- ImageSourceType: Omit<typeof ImageSourceType, 'UUID'>;
-
/** Please refer to {@link SheetDrawingAnchorType}. */
SheetDrawingAnchorType: typeof SheetDrawingAnchorType;
}
@@ -35,8 +32,6 @@ export interface IFSheetsDrawingEnumMixin {
export class FSheetsDrawingEnumMixin extends FEnum implements IFSheetsDrawingEnumMixin {
override get DrawingType(): typeof DrawingTypeEnum { return DrawingTypeEnum; };
- override get ImageSourceType(): Omit<typeof ImageSourceType, 'UUID'> { return ImageSourceType; };
-
override get SheetDrawingAnchorType(): typeof SheetDrawingAnchorType { return SheetDrawingAnchorType; };
}