@univerjs/sheets-drawing-ui 0.21.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,27 +1,42 @@
1
1
  # @univerjs/sheets-drawing-ui
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/@univerjs/sheets-drawing-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-drawing-ui)
4
+ [![license](https://img.shields.io/npm/l/@univerjs/sheets-drawing-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-drawing-ui)
5
+ [![downloads](https://img.shields.io/npm/dm/@univerjs/sheets-drawing-ui?style=flat-square)](https://npmjs.com/package/@univerjs/sheets-drawing-ui)
6
+
7
+ `@univerjs/sheets-drawing-ui` adds the UI for creating, selecting, editing, and exporting drawing objects in Univer Sheets.
8
+
3
9
  ## Package Overview
4
10
 
5
- | Package Name | UMD Namespace | Version | License | Downloads | Contains CSS | Contains i18n locales |
6
- | --- | --- | --- | --- | --- | :---: | :---: |
7
- | `@univerjs/sheets-drawing-ui` | `UniverSheetsDrawingUi` | [![][npm-version-shield]][npm-version-link] | ![][npm-license-shield] | ![][npm-downloads-shield] | ⭕️ | ⭕️ |
11
+ | Package | UMD global | CSS | Locales | Facade entry |
12
+ | --- | --- | :---: | :---: | :---: |
13
+ | `@univerjs/sheets-drawing-ui` | `UniverSheetsDrawingUi` | Yes | Yes | Yes |
14
+
15
+ ## Installation
8
16
 
9
- ## Introduction
17
+ ```sh
18
+ pnpm add @univerjs/sheets-drawing-ui
19
+ # or
20
+ npm install @univerjs/sheets-drawing-ui
21
+ ```
22
+
23
+ Keep all `@univerjs/*` packages on the same version.
10
24
 
11
25
  ## Usage
12
26
 
13
- ### Installation
27
+ ```ts
28
+ import '@univerjs/sheets-drawing-ui/lib/index.css';
29
+ import EnUS from '@univerjs/sheets-drawing-ui/locale/en-US';
30
+ import { UniverSheetsDrawingUIPlugin } from '@univerjs/sheets-drawing-ui';
14
31
 
15
- ```shell
16
- # Using npm
17
- npm install @univerjs/sheets-drawing-ui
32
+ univer.registerPlugin(UniverSheetsDrawingUIPlugin);
18
33
 
19
- # Using pnpm
20
- pnpm add @univerjs/sheets-drawing-ui
34
+ // Merge EnUS into your Univer locale map when this package contributes UI text.
21
35
  ```
22
36
 
23
- <!-- Links -->
24
- [npm-version-shield]: https://img.shields.io/npm/v/@univerjs/sheets-drawing-ui?style=flat-square
25
- [npm-version-link]: https://npmjs.com/package/@univerjs/sheets-drawing-ui
26
- [npm-license-shield]: https://img.shields.io/npm/l/@univerjs/sheets-drawing-ui?style=flat-square
27
- [npm-downloads-shield]: https://img.shields.io/npm/dm/@univerjs/sheets-drawing-ui?style=flat-square
37
+ ## Resources
38
+
39
+ - [Documentation](https://docs.univer.ai)
40
+ - [NPM package](https://npmjs.com/package/@univerjs/sheets-drawing-ui)
41
+ - [GitHub repository](https://github.com/dream-num/univer)
42
+
package/lib/cjs/index.js CHANGED
@@ -292,7 +292,7 @@ const UngroupSheetDrawingCommand = {
292
292
  };
293
293
 
294
294
  //#endregion
295
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
295
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
296
296
  function _typeof(o) {
297
297
  "@babel/helpers - typeof";
298
298
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -303,7 +303,7 @@ function _typeof(o) {
303
303
  }
304
304
 
305
305
  //#endregion
306
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
306
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
307
307
  function toPrimitive(t, r) {
308
308
  if ("object" != _typeof(t) || !t) return t;
309
309
  var e = t[Symbol.toPrimitive];
@@ -316,14 +316,14 @@ function toPrimitive(t, r) {
316
316
  }
317
317
 
318
318
  //#endregion
319
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
319
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
320
320
  function toPropertyKey(t) {
321
321
  var i = toPrimitive(t, "string");
322
322
  return "symbol" == _typeof(i) ? i : i + "";
323
323
  }
324
324
 
325
325
  //#endregion
326
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
326
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
327
327
  function _defineProperty(e, r, t) {
328
328
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
329
329
  value: t,
@@ -334,7 +334,7 @@ function _defineProperty(e, r, t) {
334
334
  }
335
335
 
336
336
  //#endregion
337
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
337
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
338
338
  function __decorateParam(paramIndex, decorator) {
339
339
  return function(target, key) {
340
340
  decorator(target, key, paramIndex);
@@ -342,7 +342,7 @@ function __decorateParam(paramIndex, decorator) {
342
342
  }
343
343
 
344
344
  //#endregion
345
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorate.js
345
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
346
346
  function __decorate(decorators, target, key, desc) {
347
347
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
348
348
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -456,7 +456,7 @@ let SheetDrawingUpdateController = class SheetDrawingUpdateController extends _u
456
456
  const type = error.message;
457
457
  if (type === _univerjs_drawing.ImageUploadStatusType.ERROR_EXCEED_SIZE) this._messageService.show({
458
458
  type: _univerjs_design.MessageType.Error,
459
- content: this._localeService.t("update-status.exceedMaxSize", String(_univerjs_drawing.DRAWING_IMAGE_ALLOW_SIZE / (1024 * 1024)))
459
+ content: this._localeService.t("update-status.exceedMaxSize", String((0, _univerjs_drawing.getDrawingImageAllowSize)() / (1024 * 1024)))
460
460
  });
461
461
  else if (type === _univerjs_drawing.ImageUploadStatusType.ERROR_IMAGE_TYPE) this._messageService.show({
462
462
  type: _univerjs_design.MessageType.Error,
@@ -510,7 +510,7 @@ let SheetDrawingUpdateController = class SheetDrawingUpdateController extends _u
510
510
  const type = error.message;
511
511
  if (type === _univerjs_drawing.ImageUploadStatusType.ERROR_EXCEED_SIZE) this._messageService.show({
512
512
  type: _univerjs_design.MessageType.Error,
513
- content: this._localeService.t("update-status.exceedMaxSize", String(_univerjs_drawing.DRAWING_IMAGE_ALLOW_SIZE / (1024 * 1024)))
513
+ content: this._localeService.t("update-status.exceedMaxSize", String((0, _univerjs_drawing.getDrawingImageAllowSize)() / (1024 * 1024)))
514
514
  });
515
515
  else if (type === _univerjs_drawing.ImageUploadStatusType.ERROR_IMAGE_TYPE) this._messageService.show({
516
516
  type: _univerjs_design.MessageType.Error,
@@ -1230,8 +1230,8 @@ let BatchSaveImagesService = class BatchSaveImagesService extends _univerjs_core
1230
1230
  const workbook = this._univerInstanceService.getCurrentUnitForType(_univerjs_core.UniverInstanceType.UNIVER_SHEET);
1231
1231
  const extension = getFileExtension(imageInfo.source, imageInfo.imageSourceType);
1232
1232
  const parts = [];
1233
- for (const part of config.fileNameParts) if (part === FileNamePart.CELL_ADDRESS) parts.push(imageInfo.cellAddress);
1234
- else if (part === FileNamePart.COLUMN_VALUE && config.columnIndex !== void 0) {
1233
+ for (const part of config.fileNameParts) if (part === "cellAddress") parts.push(imageInfo.cellAddress);
1234
+ else if (part === "columnValue" && config.columnIndex !== void 0) {
1235
1235
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
1236
1236
  if (worksheet) {
1237
1237
  const cell = worksheet.getCellMatrix().getValue(imageInfo.row, config.columnIndex);
@@ -1252,8 +1252,8 @@ let BatchSaveImagesService = class BatchSaveImagesService extends _univerjs_core
1252
1252
  const workbook = this._univerInstanceService.getUnit(unitId, _univerjs_core.UniverInstanceType.UNIVER_SHEET);
1253
1253
  const extension = getFileExtension(imageInfo.source, imageInfo.imageSourceType);
1254
1254
  const parts = [];
1255
- for (const part of config.fileNameParts) if (part === FileNamePart.CELL_ADDRESS) parts.push(imageInfo.cellAddress);
1256
- else if (part === FileNamePart.COLUMN_VALUE && config.columnIndex !== void 0) {
1255
+ for (const part of config.fileNameParts) if (part === "cellAddress") parts.push(imageInfo.cellAddress);
1256
+ else if (part === "columnValue" && config.columnIndex !== void 0) {
1257
1257
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
1258
1258
  if (worksheet) {
1259
1259
  const cell = worksheet.getCellMatrix().getValue(imageInfo.row, config.columnIndex);
@@ -1680,7 +1680,7 @@ function UploadCellImageMenuFactory(_accessor) {
1680
1680
  //#endregion
1681
1681
  //#region package.json
1682
1682
  var name = "@univerjs/sheets-drawing-ui";
1683
- var version = "0.21.1";
1683
+ var version = "0.22.0";
1684
1684
 
1685
1685
  //#endregion
1686
1686
  //#region src/config/config.ts
@@ -2108,12 +2108,16 @@ let SheetsDrawingCopyPasteController = class SheetsDrawingCopyPasteController ex
2108
2108
  else this._clipboardInterfaceService.writeText("");
2109
2109
  dispose();
2110
2110
  }, 200);
2111
- this._copyInfo = {
2111
+ const newCopyInfo = {
2112
2112
  unitId: drawing.unitId,
2113
2113
  subUnitId: drawing.subUnitId,
2114
2114
  drawings: [drawing]
2115
2115
  };
2116
- } else this._copyInfo = this._createDrawingsCopyInfoByRange(unitId, subUnitId, range);
2116
+ this._copyInfo = newCopyInfo;
2117
+ } else {
2118
+ const newCopyInfo = this._createDrawingsCopyInfoByRange(unitId, subUnitId, range);
2119
+ this._copyInfo = newCopyInfo;
2120
+ }
2117
2121
  },
2118
2122
  onPasteCells: (pasteFrom, pasteTo, data, payload) => {
2119
2123
  if (!this._copyInfo) return {
@@ -2642,12 +2646,6 @@ SheetDrawingPermissionController = __decorate([
2642
2646
 
2643
2647
  //#endregion
2644
2648
  //#region src/services/canvas-float-dom-manager.service.ts
2645
- var ScrollDirectionResponse = /* @__PURE__ */ function(ScrollDirectionResponse) {
2646
- ScrollDirectionResponse["ALL"] = "ALL";
2647
- ScrollDirectionResponse["HORIZONTAL"] = "HORIZONTAL";
2648
- ScrollDirectionResponse["VERTICAL"] = "VERTICAL";
2649
- return ScrollDirectionResponse;
2650
- }(ScrollDirectionResponse || {});
2651
2649
  const SHEET_FLOAT_DOM_PREFIX = "univer-sheet-float-dom-";
2652
2650
  /**
2653
2651
  * Adjust dom bound size when scrolling (dom bound would shrink when scrolling if over the edge of viewMain)
@@ -2684,8 +2682,8 @@ function transformBound2DOMBound(posOfFloatObject, scene, skeleton, worksheet, f
2684
2682
  if (_univerjs_core.Tools.isDefine(boundsOfViewArea.top)) boundsOfViewArea.top = specBoundsOfViewArea.top;
2685
2683
  if (_univerjs_core.Tools.isDefine(boundsOfViewArea.left)) boundsOfViewArea.left = specBoundsOfViewArea.left;
2686
2684
  }
2687
- if (scrollDirectionResponse === ScrollDirectionResponse.HORIZONTAL) viewportScrollY = 0;
2688
- if (scrollDirectionResponse === ScrollDirectionResponse.VERTICAL) viewportScrollX = 0;
2685
+ if (scrollDirectionResponse === "HORIZONTAL") viewportScrollY = 0;
2686
+ if (scrollDirectionResponse === "VERTICAL") viewportScrollX = 0;
2689
2687
  let offsetLeft = 0;
2690
2688
  let offsetRight = 0;
2691
2689
  /**
@@ -3460,7 +3458,7 @@ let SheetCanvasFloatDomManagerService = class SheetCanvasFloatDomManagerService
3460
3458
  right: viewMain.right
3461
3459
  },
3462
3460
  domAnchor: domLayoutParam,
3463
- scrollDirectionResponse: ScrollDirectionResponse.HORIZONTAL
3461
+ scrollDirectionResponse: "HORIZONTAL"
3464
3462
  };
3465
3463
  const position$ = new rxjs.BehaviorSubject(calcSheetFloatDomPosition(domRect, renderObject.renderUnit.scene, skeleton.skeleton, target.worksheet, floatDomInfo));
3466
3464
  floatDomInfo.position$ = position$;
@@ -3851,13 +3849,6 @@ SheetDrawingPrintingController = __decorate([
3851
3849
 
3852
3850
  //#endregion
3853
3851
  //#region src/controllers/sheet-drawing-transform-affected.controller.ts
3854
- var RangeMoveUndoType = /* @__PURE__ */ function(RangeMoveUndoType) {
3855
- RangeMoveUndoType[RangeMoveUndoType["deleteLeft"] = 0] = "deleteLeft";
3856
- RangeMoveUndoType[RangeMoveUndoType["deleteUp"] = 1] = "deleteUp";
3857
- RangeMoveUndoType[RangeMoveUndoType["insertDown"] = 2] = "insertDown";
3858
- RangeMoveUndoType[RangeMoveUndoType["insertRight"] = 3] = "insertRight";
3859
- return RangeMoveUndoType;
3860
- }(RangeMoveUndoType || {});
3861
3852
  const UPDATE_COMMANDS = [
3862
3853
  _univerjs_sheets.InsertRowCommand.id,
3863
3854
  _univerjs_sheets.InsertColCommand.id,
@@ -3942,16 +3933,16 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
3942
3933
  else if (id === _univerjs_sheets.RemoveColCommand.id) return this._moveColInterceptor(params, "remove");
3943
3934
  else if (id === _univerjs_sheets.DeleteRangeMoveLeftCommand.id) {
3944
3935
  const { range } = params;
3945
- return this._getRangeMoveUndo(range, RangeMoveUndoType.deleteLeft);
3936
+ return this._getRangeMoveUndo(range, 0);
3946
3937
  } else if (id === _univerjs_sheets.DeleteRangeMoveUpCommand.id) {
3947
3938
  const { range } = params;
3948
- return this._getRangeMoveUndo(range, RangeMoveUndoType.deleteUp);
3939
+ return this._getRangeMoveUndo(range, 1);
3949
3940
  } else if (id === _univerjs_sheets.InsertRangeMoveDownCommand.id) {
3950
3941
  const { range } = params;
3951
- return this._getRangeMoveUndo(range, RangeMoveUndoType.insertDown);
3942
+ return this._getRangeMoveUndo(range, 2);
3952
3943
  } else if (id === _univerjs_sheets.InsertRangeMoveRightCommand.id) {
3953
3944
  const { range } = params;
3954
- return this._getRangeMoveUndo(range, RangeMoveUndoType.insertRight);
3945
+ return this._getRangeMoveUndo(range, 3);
3955
3946
  } else if (id === _univerjs_sheets.SetRowHiddenCommand.id || id === _univerjs_sheets.SetSpecificRowsVisibleCommand.id) {
3956
3947
  var _this$_selectionManag;
3957
3948
  const _params = params;
@@ -4125,7 +4116,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4125
4116
  let newSheetTransform = null;
4126
4117
  let newTransform = null;
4127
4118
  let axisAlignSheetTransform;
4128
- if (type === RangeMoveUndoType.deleteLeft && fromRow >= startRow && toRow <= endRow) if (fromColumn >= startColumn && toColumn <= endColumn) deleteDrawings.push({
4119
+ if (type === 0 && fromRow >= startRow && toRow <= endRow) if (fromColumn >= startColumn && toColumn <= endColumn) deleteDrawings.push({
4129
4120
  unitId,
4130
4121
  subUnitId,
4131
4122
  drawingId
@@ -4142,7 +4133,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4142
4133
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4143
4134
  axisAlignSheetTransform = (_param$axisAlignSheet = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet !== void 0 ? _param$axisAlignSheet : void 0;
4144
4135
  }
4145
- else if (type === RangeMoveUndoType.deleteUp && fromColumn >= startColumn && toColumn <= endColumn) if (fromRow >= startRow && toRow <= endRow) deleteDrawings.push({
4136
+ else if (type === 1 && fromColumn >= startColumn && toColumn <= endColumn) if (fromRow >= startRow && toRow <= endRow) deleteDrawings.push({
4146
4137
  unitId,
4147
4138
  subUnitId,
4148
4139
  drawingId
@@ -4159,7 +4150,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4159
4150
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4160
4151
  axisAlignSheetTransform = (_param$axisAlignSheet2 = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet2 !== void 0 ? _param$axisAlignSheet2 : void 0;
4161
4152
  }
4162
- else if (type === RangeMoveUndoType.insertDown) {
4153
+ else if (type === 2) {
4163
4154
  var _param$axisAlignSheet3;
4164
4155
  const param = this._expandRow(startRow, endRow, {
4165
4156
  sheetSkeletonParam,
@@ -4170,7 +4161,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4170
4161
  newSheetTransform = param === null || param === void 0 ? void 0 : param.newSheetTransform;
4171
4162
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4172
4163
  axisAlignSheetTransform = (_param$axisAlignSheet3 = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet3 !== void 0 ? _param$axisAlignSheet3 : void 0;
4173
- } else if (type === RangeMoveUndoType.insertRight) {
4164
+ } else if (type === 3) {
4174
4165
  var _param$axisAlignSheet4;
4175
4166
  const param = this._expandCol(startColumn, endColumn, {
4176
4167
  sheetSkeletonParam,
@@ -4255,7 +4246,6 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4255
4246
  break;
4256
4247
  }
4257
4248
  }
4258
- this._remainDrawingSize(transform, updateDrawings, drawing, skeleton);
4259
4249
  continue;
4260
4250
  }
4261
4251
  if (fromColumn >= startColumn && toColumn <= endColumn) continue;
@@ -4419,7 +4409,6 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4419
4409
  break;
4420
4410
  }
4421
4411
  }
4422
- this._remainDrawingSize(transform, updateDrawings, drawing, skeleton);
4423
4412
  continue;
4424
4413
  }
4425
4414
  if (fromRow >= startRow && toRow <= endRow) continue;
@@ -5416,7 +5405,7 @@ const FlipSheetDrawingCommand = {
5416
5405
  type: _univerjs_sheets_drawing.DrawingApplyType.UPDATE
5417
5406
  }
5418
5407
  };
5419
- if ((0, _univerjs_core.sequenceExecute)([updateMutation], commandService)) {
5408
+ if ((0, _univerjs_core.sequenceExecute)([updateMutation], commandService).result) {
5420
5409
  undoRedoService.pushUndoRedo({
5421
5410
  unitID: opUnitId,
5422
5411
  undoMutations: [undoUpdateMutation, {
@@ -5522,7 +5511,7 @@ function BatchSaveImagesDialog() {
5522
5511
  const localeService = (0, _univerjs_ui.useDependency)(_univerjs_core.LocaleService);
5523
5512
  const dialogService = (0, _univerjs_ui.useDependency)(_univerjs_ui.IDialogService);
5524
5513
  const batchSaveService = (0, _univerjs_ui.useDependency)(IBatchSaveImagesService);
5525
- const [fileNameParts, setFileNameParts] = (0, react.useState)([FileNamePart.CELL_ADDRESS]);
5514
+ const [fileNameParts, setFileNameParts] = (0, react.useState)(["cellAddress"]);
5526
5515
  const [saving, setSaving] = (0, react.useState)(false);
5527
5516
  const [error, setError] = (0, react.useState)(null);
5528
5517
  const images = (0, react.useMemo)(() => batchSaveService.getCellImagesInSelection(), [batchSaveService]);
@@ -5537,7 +5526,7 @@ function BatchSaveImagesDialog() {
5537
5526
  }, [dataColumns]);
5538
5527
  const [selectedColumn, setSelectedColumn] = (0, react.useState)(() => columnOptions.length > 0 ? columnOptions[0].value : "0");
5539
5528
  (0, _univerjs_sheets_ui.useHighlightRange)((0, react.useMemo)(() => {
5540
- if (!fileNameParts.includes(FileNamePart.COLUMN_VALUE) || !rowRange) return [];
5529
+ if (!fileNameParts.includes("columnValue") || !rowRange) return [];
5541
5530
  const colIndex = Number(selectedColumn);
5542
5531
  return [{
5543
5532
  startRow: rowRange.startRow,
@@ -5567,7 +5556,7 @@ function BatchSaveImagesDialog() {
5567
5556
  try {
5568
5557
  await batchSaveService.saveImages(images, {
5569
5558
  fileNameParts,
5570
- columnIndex: fileNameParts.includes(FileNamePart.COLUMN_VALUE) ? Number(selectedColumn) : void 0
5559
+ columnIndex: fileNameParts.includes("columnValue") ? Number(selectedColumn) : void 0
5571
5560
  });
5572
5561
  dialogService.close(BATCH_SAVE_IMAGES_DIALOG_ID);
5573
5562
  } catch (err) {
@@ -5584,7 +5573,7 @@ function BatchSaveImagesDialog() {
5584
5573
  dialogService,
5585
5574
  localeService
5586
5575
  ]);
5587
- const showColumnSelect = fileNameParts.includes(FileNamePart.COLUMN_VALUE);
5576
+ const showColumnSelect = fileNameParts.includes("columnValue");
5588
5577
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
5589
5578
  className: "univer-flex univer-flex-col",
5590
5579
  children: [
@@ -5602,11 +5591,11 @@ function BatchSaveImagesDialog() {
5602
5591
  onChange: handleFileNamePartsChange,
5603
5592
  direction: "vertical",
5604
5593
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Checkbox, {
5605
- value: FileNamePart.CELL_ADDRESS,
5594
+ value: "cellAddress",
5606
5595
  disabled: !hasAvailableColumns,
5607
5596
  children: localeService.t("sheetImage.save.useRowCol")
5608
5597
  }), hasAvailableColumns && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_univerjs_design.Checkbox, {
5609
- value: FileNamePart.COLUMN_VALUE,
5598
+ value: "columnValue",
5610
5599
  children: localeService.t("sheetImage.save.useColumnValue")
5611
5600
  })]
5612
5601
  })
package/lib/es/index.js CHANGED
@@ -3,7 +3,7 @@ import { ClearSheetDrawingTransformerOperation, DrawingApplyType, ISheetDrawingS
3
3
  import { CURSOR_TYPE, DRAWING_OBJECT_LAYER_INDEX, IRenderManagerService, ObjectType, Rect, SHEET_VIEWPORT_KEY, getCurrentTypeOfRenderer, getGroupState, transformObjectOutOfGroup } from "@univerjs/engine-render";
4
4
  import { Button, Checkbox, CheckboxGroup, FormLayout, MessageType, Radio, RadioGroup, Select, clsx, render, unmount } from "@univerjs/design";
5
5
  import { InnerPasteCommand, ReplaceSnapshotCommand, docDrawingPositionToTransform } from "@univerjs/docs-ui";
6
- import { DRAWING_IMAGE_ALLOW_IMAGE_LIST, DRAWING_IMAGE_ALLOW_SIZE, DRAWING_IMAGE_COUNT_LIMIT, DRAWING_IMAGE_HEIGHT_LIMIT, DRAWING_IMAGE_WIDTH_LIMIT, IDrawingManagerService, IImageIoService as IImageIoService$1, ImageSourceType as ImageSourceType$1, ImageUploadStatusType, SetDrawingSelectedOperation, UniverDrawingPlugin, getDrawingShapeKeyByDrawingSearch, getImageSize } from "@univerjs/drawing";
6
+ import { DRAWING_IMAGE_ALLOW_IMAGE_LIST, DRAWING_IMAGE_COUNT_LIMIT, DRAWING_IMAGE_HEIGHT_LIMIT, DRAWING_IMAGE_WIDTH_LIMIT, IDrawingManagerService, IImageIoService as IImageIoService$1, ImageSourceType as ImageSourceType$1, ImageUploadStatusType, SetDrawingSelectedOperation, UniverDrawingPlugin, getDrawingImageAllowSize, getDrawingShapeKeyByDrawingSearch, getImageSize } from "@univerjs/drawing";
7
7
  import { COMMAND_LISTENER_SKELETON_CHANGE, DeleteRangeMoveLeftCommand, DeleteRangeMoveUpCommand, DeltaColumnWidthCommand, DeltaRowHeightCommand, IAutoFillService, INTERCEPTOR_POINT, InsertColCommand, InsertRangeMoveDownCommand, InsertRangeMoveRightCommand, InsertRowCommand, InterceptCellContentPriority, MoveColsCommand, MoveRangeCommand, MoveRowsCommand, RangeProtectionPermissionEditPoint, RemoveColCommand, RemoveRowCommand, SetColHiddenCommand, SetColHiddenMutation, SetColVisibleMutation, SetColWidthCommand, SetFrozenMutation, SetRangeValuesCommand, SetRowHeightCommand, SetRowHiddenCommand, SetRowHiddenMutation, SetRowVisibleMutation, SetSelectionsOperation, SetSpecificColsVisibleCommand, SetSpecificRowsVisibleCommand, SetWorksheetActiveOperation, SetWorksheetColWidthMutation, SetWorksheetRowAutoHeightMutation, SetWorksheetRowHeightMutation, SetWorksheetRowIsAutoHeightMutation, SheetInterceptorService, SheetPermissionCheckController, SheetSkeletonService, SheetsSelectionsService, WorkbookEditablePermission, WorkbookViewPermission, WorksheetEditPermission, WorksheetViewPermission, attachRangeWithCoord, discreteRangeToRange, getSheetCommandTarget } from "@univerjs/sheets";
8
8
  import { COPY_TYPE, EditingRenderController, HoverManagerService, IEditorBridgeService, ISheetClipboardService, ISheetSelectionRenderService, PREDEFINED_HOOK_NAME_PASTE, SetCellEditVisibleOperation, SetScrollOperation, SetZoomRatioOperation, SheetCanvasPopManagerService, SheetPrintInterceptorService, SheetSkeletonManagerService, getCurrentRangeDisable$, useHighlightRange, virtualizeDiscreteRanges } from "@univerjs/sheets-ui";
9
9
  import { CanvasFloatDomService, ComponentManager, ContextMenuGroup, ContextMenuPosition, IClipboardInterfaceService, IContextMenuService, IDialogService, ILocalFileService, IMenuManagerService, IMessageService, IShortcutService, ISidebarService, KeyCode, MenuItemType, PrintFloatDomSingle, RibbonInsertGroup, connectInjector, getMenuHiddenObservable, useDependency } from "@univerjs/ui";
@@ -291,7 +291,7 @@ const UngroupSheetDrawingCommand = {
291
291
  };
292
292
 
293
293
  //#endregion
294
- //#region \0@oxc-project+runtime@0.124.0/helpers/typeof.js
294
+ //#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
295
295
  function _typeof(o) {
296
296
  "@babel/helpers - typeof";
297
297
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -302,7 +302,7 @@ function _typeof(o) {
302
302
  }
303
303
 
304
304
  //#endregion
305
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPrimitive.js
305
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
306
306
  function toPrimitive(t, r) {
307
307
  if ("object" != _typeof(t) || !t) return t;
308
308
  var e = t[Symbol.toPrimitive];
@@ -315,14 +315,14 @@ function toPrimitive(t, r) {
315
315
  }
316
316
 
317
317
  //#endregion
318
- //#region \0@oxc-project+runtime@0.124.0/helpers/toPropertyKey.js
318
+ //#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
319
319
  function toPropertyKey(t) {
320
320
  var i = toPrimitive(t, "string");
321
321
  return "symbol" == _typeof(i) ? i : i + "";
322
322
  }
323
323
 
324
324
  //#endregion
325
- //#region \0@oxc-project+runtime@0.124.0/helpers/defineProperty.js
325
+ //#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
326
326
  function _defineProperty(e, r, t) {
327
327
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
328
328
  value: t,
@@ -333,7 +333,7 @@ function _defineProperty(e, r, t) {
333
333
  }
334
334
 
335
335
  //#endregion
336
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorateParam.js
336
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorateParam.js
337
337
  function __decorateParam(paramIndex, decorator) {
338
338
  return function(target, key) {
339
339
  decorator(target, key, paramIndex);
@@ -341,7 +341,7 @@ function __decorateParam(paramIndex, decorator) {
341
341
  }
342
342
 
343
343
  //#endregion
344
- //#region \0@oxc-project+runtime@0.124.0/helpers/decorate.js
344
+ //#region \0@oxc-project+runtime@0.129.0/helpers/decorate.js
345
345
  function __decorate(decorators, target, key, desc) {
346
346
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
347
347
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -455,7 +455,7 @@ let SheetDrawingUpdateController = class SheetDrawingUpdateController extends Di
455
455
  const type = error.message;
456
456
  if (type === ImageUploadStatusType.ERROR_EXCEED_SIZE) this._messageService.show({
457
457
  type: MessageType.Error,
458
- content: this._localeService.t("update-status.exceedMaxSize", String(DRAWING_IMAGE_ALLOW_SIZE / (1024 * 1024)))
458
+ content: this._localeService.t("update-status.exceedMaxSize", String(getDrawingImageAllowSize() / (1024 * 1024)))
459
459
  });
460
460
  else if (type === ImageUploadStatusType.ERROR_IMAGE_TYPE) this._messageService.show({
461
461
  type: MessageType.Error,
@@ -509,7 +509,7 @@ let SheetDrawingUpdateController = class SheetDrawingUpdateController extends Di
509
509
  const type = error.message;
510
510
  if (type === ImageUploadStatusType.ERROR_EXCEED_SIZE) this._messageService.show({
511
511
  type: MessageType.Error,
512
- content: this._localeService.t("update-status.exceedMaxSize", String(DRAWING_IMAGE_ALLOW_SIZE / (1024 * 1024)))
512
+ content: this._localeService.t("update-status.exceedMaxSize", String(getDrawingImageAllowSize() / (1024 * 1024)))
513
513
  });
514
514
  else if (type === ImageUploadStatusType.ERROR_IMAGE_TYPE) this._messageService.show({
515
515
  type: MessageType.Error,
@@ -1229,8 +1229,8 @@ let BatchSaveImagesService = class BatchSaveImagesService extends Disposable {
1229
1229
  const workbook = this._univerInstanceService.getCurrentUnitForType(UniverInstanceType.UNIVER_SHEET);
1230
1230
  const extension = getFileExtension(imageInfo.source, imageInfo.imageSourceType);
1231
1231
  const parts = [];
1232
- for (const part of config.fileNameParts) if (part === FileNamePart.CELL_ADDRESS) parts.push(imageInfo.cellAddress);
1233
- else if (part === FileNamePart.COLUMN_VALUE && config.columnIndex !== void 0) {
1232
+ for (const part of config.fileNameParts) if (part === "cellAddress") parts.push(imageInfo.cellAddress);
1233
+ else if (part === "columnValue" && config.columnIndex !== void 0) {
1234
1234
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getActiveSheet();
1235
1235
  if (worksheet) {
1236
1236
  const cell = worksheet.getCellMatrix().getValue(imageInfo.row, config.columnIndex);
@@ -1251,8 +1251,8 @@ let BatchSaveImagesService = class BatchSaveImagesService extends Disposable {
1251
1251
  const workbook = this._univerInstanceService.getUnit(unitId, UniverInstanceType.UNIVER_SHEET);
1252
1252
  const extension = getFileExtension(imageInfo.source, imageInfo.imageSourceType);
1253
1253
  const parts = [];
1254
- for (const part of config.fileNameParts) if (part === FileNamePart.CELL_ADDRESS) parts.push(imageInfo.cellAddress);
1255
- else if (part === FileNamePart.COLUMN_VALUE && config.columnIndex !== void 0) {
1254
+ for (const part of config.fileNameParts) if (part === "cellAddress") parts.push(imageInfo.cellAddress);
1255
+ else if (part === "columnValue" && config.columnIndex !== void 0) {
1256
1256
  const worksheet = workbook === null || workbook === void 0 ? void 0 : workbook.getSheetBySheetId(subUnitId);
1257
1257
  if (worksheet) {
1258
1258
  const cell = worksheet.getCellMatrix().getValue(imageInfo.row, config.columnIndex);
@@ -1679,7 +1679,7 @@ function UploadCellImageMenuFactory(_accessor) {
1679
1679
  //#endregion
1680
1680
  //#region package.json
1681
1681
  var name = "@univerjs/sheets-drawing-ui";
1682
- var version = "0.21.1";
1682
+ var version = "0.22.0";
1683
1683
 
1684
1684
  //#endregion
1685
1685
  //#region src/config/config.ts
@@ -2107,12 +2107,16 @@ let SheetsDrawingCopyPasteController = class SheetsDrawingCopyPasteController ex
2107
2107
  else this._clipboardInterfaceService.writeText("");
2108
2108
  dispose();
2109
2109
  }, 200);
2110
- this._copyInfo = {
2110
+ const newCopyInfo = {
2111
2111
  unitId: drawing.unitId,
2112
2112
  subUnitId: drawing.subUnitId,
2113
2113
  drawings: [drawing]
2114
2114
  };
2115
- } else this._copyInfo = this._createDrawingsCopyInfoByRange(unitId, subUnitId, range);
2115
+ this._copyInfo = newCopyInfo;
2116
+ } else {
2117
+ const newCopyInfo = this._createDrawingsCopyInfoByRange(unitId, subUnitId, range);
2118
+ this._copyInfo = newCopyInfo;
2119
+ }
2116
2120
  },
2117
2121
  onPasteCells: (pasteFrom, pasteTo, data, payload) => {
2118
2122
  if (!this._copyInfo) return {
@@ -2641,12 +2645,6 @@ SheetDrawingPermissionController = __decorate([
2641
2645
 
2642
2646
  //#endregion
2643
2647
  //#region src/services/canvas-float-dom-manager.service.ts
2644
- var ScrollDirectionResponse = /* @__PURE__ */ function(ScrollDirectionResponse) {
2645
- ScrollDirectionResponse["ALL"] = "ALL";
2646
- ScrollDirectionResponse["HORIZONTAL"] = "HORIZONTAL";
2647
- ScrollDirectionResponse["VERTICAL"] = "VERTICAL";
2648
- return ScrollDirectionResponse;
2649
- }(ScrollDirectionResponse || {});
2650
2648
  const SHEET_FLOAT_DOM_PREFIX = "univer-sheet-float-dom-";
2651
2649
  /**
2652
2650
  * Adjust dom bound size when scrolling (dom bound would shrink when scrolling if over the edge of viewMain)
@@ -2683,8 +2681,8 @@ function transformBound2DOMBound(posOfFloatObject, scene, skeleton, worksheet, f
2683
2681
  if (Tools.isDefine(boundsOfViewArea.top)) boundsOfViewArea.top = specBoundsOfViewArea.top;
2684
2682
  if (Tools.isDefine(boundsOfViewArea.left)) boundsOfViewArea.left = specBoundsOfViewArea.left;
2685
2683
  }
2686
- if (scrollDirectionResponse === ScrollDirectionResponse.HORIZONTAL) viewportScrollY = 0;
2687
- if (scrollDirectionResponse === ScrollDirectionResponse.VERTICAL) viewportScrollX = 0;
2684
+ if (scrollDirectionResponse === "HORIZONTAL") viewportScrollY = 0;
2685
+ if (scrollDirectionResponse === "VERTICAL") viewportScrollX = 0;
2688
2686
  let offsetLeft = 0;
2689
2687
  let offsetRight = 0;
2690
2688
  /**
@@ -3459,7 +3457,7 @@ let SheetCanvasFloatDomManagerService = class SheetCanvasFloatDomManagerService
3459
3457
  right: viewMain.right
3460
3458
  },
3461
3459
  domAnchor: domLayoutParam,
3462
- scrollDirectionResponse: ScrollDirectionResponse.HORIZONTAL
3460
+ scrollDirectionResponse: "HORIZONTAL"
3463
3461
  };
3464
3462
  const position$ = new BehaviorSubject(calcSheetFloatDomPosition(domRect, renderObject.renderUnit.scene, skeleton.skeleton, target.worksheet, floatDomInfo));
3465
3463
  floatDomInfo.position$ = position$;
@@ -3850,13 +3848,6 @@ SheetDrawingPrintingController = __decorate([
3850
3848
 
3851
3849
  //#endregion
3852
3850
  //#region src/controllers/sheet-drawing-transform-affected.controller.ts
3853
- var RangeMoveUndoType = /* @__PURE__ */ function(RangeMoveUndoType) {
3854
- RangeMoveUndoType[RangeMoveUndoType["deleteLeft"] = 0] = "deleteLeft";
3855
- RangeMoveUndoType[RangeMoveUndoType["deleteUp"] = 1] = "deleteUp";
3856
- RangeMoveUndoType[RangeMoveUndoType["insertDown"] = 2] = "insertDown";
3857
- RangeMoveUndoType[RangeMoveUndoType["insertRight"] = 3] = "insertRight";
3858
- return RangeMoveUndoType;
3859
- }(RangeMoveUndoType || {});
3860
3851
  const UPDATE_COMMANDS = [
3861
3852
  InsertRowCommand.id,
3862
3853
  InsertColCommand.id,
@@ -3941,16 +3932,16 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
3941
3932
  else if (id === RemoveColCommand.id) return this._moveColInterceptor(params, "remove");
3942
3933
  else if (id === DeleteRangeMoveLeftCommand.id) {
3943
3934
  const { range } = params;
3944
- return this._getRangeMoveUndo(range, RangeMoveUndoType.deleteLeft);
3935
+ return this._getRangeMoveUndo(range, 0);
3945
3936
  } else if (id === DeleteRangeMoveUpCommand.id) {
3946
3937
  const { range } = params;
3947
- return this._getRangeMoveUndo(range, RangeMoveUndoType.deleteUp);
3938
+ return this._getRangeMoveUndo(range, 1);
3948
3939
  } else if (id === InsertRangeMoveDownCommand.id) {
3949
3940
  const { range } = params;
3950
- return this._getRangeMoveUndo(range, RangeMoveUndoType.insertDown);
3941
+ return this._getRangeMoveUndo(range, 2);
3951
3942
  } else if (id === InsertRangeMoveRightCommand.id) {
3952
3943
  const { range } = params;
3953
- return this._getRangeMoveUndo(range, RangeMoveUndoType.insertRight);
3944
+ return this._getRangeMoveUndo(range, 3);
3954
3945
  } else if (id === SetRowHiddenCommand.id || id === SetSpecificRowsVisibleCommand.id) {
3955
3946
  var _this$_selectionManag;
3956
3947
  const _params = params;
@@ -4124,7 +4115,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4124
4115
  let newSheetTransform = null;
4125
4116
  let newTransform = null;
4126
4117
  let axisAlignSheetTransform;
4127
- if (type === RangeMoveUndoType.deleteLeft && fromRow >= startRow && toRow <= endRow) if (fromColumn >= startColumn && toColumn <= endColumn) deleteDrawings.push({
4118
+ if (type === 0 && fromRow >= startRow && toRow <= endRow) if (fromColumn >= startColumn && toColumn <= endColumn) deleteDrawings.push({
4128
4119
  unitId,
4129
4120
  subUnitId,
4130
4121
  drawingId
@@ -4141,7 +4132,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4141
4132
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4142
4133
  axisAlignSheetTransform = (_param$axisAlignSheet = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet !== void 0 ? _param$axisAlignSheet : void 0;
4143
4134
  }
4144
- else if (type === RangeMoveUndoType.deleteUp && fromColumn >= startColumn && toColumn <= endColumn) if (fromRow >= startRow && toRow <= endRow) deleteDrawings.push({
4135
+ else if (type === 1 && fromColumn >= startColumn && toColumn <= endColumn) if (fromRow >= startRow && toRow <= endRow) deleteDrawings.push({
4145
4136
  unitId,
4146
4137
  subUnitId,
4147
4138
  drawingId
@@ -4158,7 +4149,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4158
4149
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4159
4150
  axisAlignSheetTransform = (_param$axisAlignSheet2 = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet2 !== void 0 ? _param$axisAlignSheet2 : void 0;
4160
4151
  }
4161
- else if (type === RangeMoveUndoType.insertDown) {
4152
+ else if (type === 2) {
4162
4153
  var _param$axisAlignSheet3;
4163
4154
  const param = this._expandRow(startRow, endRow, {
4164
4155
  sheetSkeletonParam,
@@ -4169,7 +4160,7 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4169
4160
  newSheetTransform = param === null || param === void 0 ? void 0 : param.newSheetTransform;
4170
4161
  newTransform = param === null || param === void 0 ? void 0 : param.newTransform;
4171
4162
  axisAlignSheetTransform = (_param$axisAlignSheet3 = param === null || param === void 0 ? void 0 : param.axisAlignSheetTransform) !== null && _param$axisAlignSheet3 !== void 0 ? _param$axisAlignSheet3 : void 0;
4172
- } else if (type === RangeMoveUndoType.insertRight) {
4163
+ } else if (type === 3) {
4173
4164
  var _param$axisAlignSheet4;
4174
4165
  const param = this._expandCol(startColumn, endColumn, {
4175
4166
  sheetSkeletonParam,
@@ -4254,7 +4245,6 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4254
4245
  break;
4255
4246
  }
4256
4247
  }
4257
- this._remainDrawingSize(transform, updateDrawings, drawing, skeleton);
4258
4248
  continue;
4259
4249
  }
4260
4250
  if (fromColumn >= startColumn && toColumn <= endColumn) continue;
@@ -4418,7 +4408,6 @@ let SheetDrawingTransformAffectedController = class SheetDrawingTransformAffecte
4418
4408
  break;
4419
4409
  }
4420
4410
  }
4421
- this._remainDrawingSize(transform, updateDrawings, drawing, skeleton);
4422
4411
  continue;
4423
4412
  }
4424
4413
  if (fromRow >= startRow && toRow <= endRow) continue;
@@ -5415,7 +5404,7 @@ const FlipSheetDrawingCommand = {
5415
5404
  type: DrawingApplyType.UPDATE
5416
5405
  }
5417
5406
  };
5418
- if (sequenceExecute([updateMutation], commandService)) {
5407
+ if (sequenceExecute([updateMutation], commandService).result) {
5419
5408
  undoRedoService.pushUndoRedo({
5420
5409
  unitID: opUnitId,
5421
5410
  undoMutations: [undoUpdateMutation, {
@@ -5521,7 +5510,7 @@ function BatchSaveImagesDialog() {
5521
5510
  const localeService = useDependency(LocaleService);
5522
5511
  const dialogService = useDependency(IDialogService);
5523
5512
  const batchSaveService = useDependency(IBatchSaveImagesService);
5524
- const [fileNameParts, setFileNameParts] = useState([FileNamePart.CELL_ADDRESS]);
5513
+ const [fileNameParts, setFileNameParts] = useState(["cellAddress"]);
5525
5514
  const [saving, setSaving] = useState(false);
5526
5515
  const [error, setError] = useState(null);
5527
5516
  const images = useMemo(() => batchSaveService.getCellImagesInSelection(), [batchSaveService]);
@@ -5536,7 +5525,7 @@ function BatchSaveImagesDialog() {
5536
5525
  }, [dataColumns]);
5537
5526
  const [selectedColumn, setSelectedColumn] = useState(() => columnOptions.length > 0 ? columnOptions[0].value : "0");
5538
5527
  useHighlightRange(useMemo(() => {
5539
- if (!fileNameParts.includes(FileNamePart.COLUMN_VALUE) || !rowRange) return [];
5528
+ if (!fileNameParts.includes("columnValue") || !rowRange) return [];
5540
5529
  const colIndex = Number(selectedColumn);
5541
5530
  return [{
5542
5531
  startRow: rowRange.startRow,
@@ -5566,7 +5555,7 @@ function BatchSaveImagesDialog() {
5566
5555
  try {
5567
5556
  await batchSaveService.saveImages(images, {
5568
5557
  fileNameParts,
5569
- columnIndex: fileNameParts.includes(FileNamePart.COLUMN_VALUE) ? Number(selectedColumn) : void 0
5558
+ columnIndex: fileNameParts.includes("columnValue") ? Number(selectedColumn) : void 0
5570
5559
  });
5571
5560
  dialogService.close(BATCH_SAVE_IMAGES_DIALOG_ID);
5572
5561
  } catch (err) {
@@ -5583,7 +5572,7 @@ function BatchSaveImagesDialog() {
5583
5572
  dialogService,
5584
5573
  localeService
5585
5574
  ]);
5586
- const showColumnSelect = fileNameParts.includes(FileNamePart.COLUMN_VALUE);
5575
+ const showColumnSelect = fileNameParts.includes("columnValue");
5587
5576
  return /* @__PURE__ */ jsxs("div", {
5588
5577
  className: "univer-flex univer-flex-col",
5589
5578
  children: [
@@ -5601,11 +5590,11 @@ function BatchSaveImagesDialog() {
5601
5590
  onChange: handleFileNamePartsChange,
5602
5591
  direction: "vertical",
5603
5592
  children: [/* @__PURE__ */ jsx(Checkbox, {
5604
- value: FileNamePart.CELL_ADDRESS,
5593
+ value: "cellAddress",
5605
5594
  disabled: !hasAvailableColumns,
5606
5595
  children: localeService.t("sheetImage.save.useRowCol")
5607
5596
  }), hasAvailableColumns && /* @__PURE__ */ jsx(Checkbox, {
5608
- value: FileNamePart.COLUMN_VALUE,
5597
+ value: "columnValue",
5609
5598
  children: localeService.t("sheetImage.save.useColumnValue")
5610
5599
  })]
5611
5600
  })