@univerjs/sheets-drawing-ui 1.0.0-alpha.7 → 1.0.0-beta.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/lib/cjs/facade.js +6 -10
- package/lib/cjs/index.js +195 -201
- package/lib/cjs/locale/vi-VN.js +5 -5
- package/lib/es/facade.js +6 -10
- package/lib/es/index.js +199 -205
- package/lib/es/locale/vi-VN.js +5 -5
- package/lib/facade.js +6 -10
- package/lib/index.js +199 -205
- package/lib/locale/vi-VN.js +5 -5
- package/lib/types/services/batch-save-images.service.d.ts +1 -11
- package/lib/types/services/canvas-float-dom-manager.service.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/vi-VN.js +1 -1
- package/package.json +15 -15
package/lib/cjs/locale/vi-VN.js
CHANGED
|
@@ -50,11 +50,11 @@ const locale = { "sheets-drawing-ui": {
|
|
|
50
50
|
permission: { dialog: { editErr: "Phạm vi này đã được bảo vệ, hiện không có quyền chỉnh sửa. Nếu cần chỉnh sửa, vui lòng liên hệ với người tạo." } },
|
|
51
51
|
shortcut: {
|
|
52
52
|
"drawing-view": "Chế độ xem bản vẽ",
|
|
53
|
-
"drawing-move-down": "
|
|
54
|
-
"drawing-move-up": "
|
|
55
|
-
"drawing-move-left": "
|
|
56
|
-
"drawing-move-right": "
|
|
57
|
-
"drawing-delete": "
|
|
53
|
+
"drawing-move-down": "Di chuyển hình vẽ xuống",
|
|
54
|
+
"drawing-move-up": "Di chuyển hình vẽ lên",
|
|
55
|
+
"drawing-move-left": "Di chuyển hình vẽ sang trái",
|
|
56
|
+
"drawing-move-right": "Di chuyển hình vẽ sang phải",
|
|
57
|
+
"drawing-delete": "Xóa hình vẽ"
|
|
58
58
|
}
|
|
59
59
|
} };
|
|
60
60
|
|
package/lib/es/facade.js
CHANGED
|
@@ -74,7 +74,6 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
74
74
|
}).filter((dom) => dom != null);
|
|
75
75
|
}
|
|
76
76
|
updateFloatDom(id, config) {
|
|
77
|
-
var _transformToDrawingPo, _transformToAxisAlign;
|
|
78
77
|
const sheetSkeletonService = this._injector.get(SheetSkeletonService);
|
|
79
78
|
const info = this._injector.get(SheetCanvasFloatDomManagerService).getFloatDomInfo(id);
|
|
80
79
|
if (!info) return this;
|
|
@@ -91,12 +90,12 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
91
90
|
componentKey: config.componentKey || drawingParm.componentKey,
|
|
92
91
|
allowTransform: config.allowTransform !== void 0 ? config.allowTransform : drawingParm.allowTransform,
|
|
93
92
|
data: config.data || drawingParm.data,
|
|
94
|
-
sheetTransform: config.position ?
|
|
93
|
+
sheetTransform: config.position ? transformToDrawingPosition(config.position, skeleton) ?? drawingParm.sheetTransform : drawingParm.sheetTransform,
|
|
95
94
|
transform: {
|
|
96
95
|
...drawingParm.transform,
|
|
97
96
|
...config.position
|
|
98
97
|
},
|
|
99
|
-
axisAlignSheetTransform: config.position ?
|
|
98
|
+
axisAlignSheetTransform: config.position ? transformToAxisAlignPosition(config.position, skeleton) ?? drawingParm.sheetTransform : drawingParm.sheetTransform
|
|
100
99
|
};
|
|
101
100
|
if (!this._commandService.syncExecuteCommand(SetSheetDrawingCommand.id, {
|
|
102
101
|
unitId,
|
|
@@ -111,7 +110,6 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
111
110
|
const sheetSkeletonService = this._injector.get(SheetSkeletonService);
|
|
112
111
|
const drawings = [];
|
|
113
112
|
for (const update of updates) {
|
|
114
|
-
var _transformToDrawingPo2, _transformToAxisAlign2;
|
|
115
113
|
const info = floatDomService.getFloatDomInfo(update.id);
|
|
116
114
|
if (!info) continue;
|
|
117
115
|
const { unitId, subUnitId } = info;
|
|
@@ -128,12 +126,12 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
128
126
|
componentKey: update.config.componentKey || drawingParm.componentKey,
|
|
129
127
|
allowTransform: update.config.allowTransform !== void 0 ? update.config.allowTransform : drawingParm.allowTransform,
|
|
130
128
|
data: update.config.data || drawingParm.data,
|
|
131
|
-
sheetTransform: update.config.position ?
|
|
129
|
+
sheetTransform: update.config.position ? transformToDrawingPosition(update.config.position, skeleton) ?? drawingParm.sheetTransform : drawingParm.sheetTransform,
|
|
132
130
|
transform: {
|
|
133
131
|
...drawingParm.transform,
|
|
134
132
|
...update.config.position
|
|
135
133
|
},
|
|
136
|
-
axisAlignSheetTransform: update.config.position ?
|
|
134
|
+
axisAlignSheetTransform: update.config.position ? transformToAxisAlignPosition(update.config.position, skeleton) ?? drawingParm.sheetTransform : drawingParm.sheetTransform
|
|
137
135
|
};
|
|
138
136
|
drawings.push(newParam);
|
|
139
137
|
}
|
|
@@ -222,7 +220,6 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
222
220
|
return null;
|
|
223
221
|
}
|
|
224
222
|
async saveCellImagesAsync(options, ranges) {
|
|
225
|
-
var _options$useCellAddre;
|
|
226
223
|
const batchSaveService = this._injector.get(IBatchSaveImagesService);
|
|
227
224
|
const unitId = this._fWorkbook.getId();
|
|
228
225
|
const subUnitId = this.getSheetId();
|
|
@@ -237,7 +234,7 @@ var FWorksheetDrawingUIMixin = class extends FWorksheet {
|
|
|
237
234
|
return false;
|
|
238
235
|
}
|
|
239
236
|
const fileNameParts = [];
|
|
240
|
-
const useCellAddress = (
|
|
237
|
+
const useCellAddress = (options === null || options === void 0 ? void 0 : options.useCellAddress) ?? true;
|
|
241
238
|
const useColumnIndex = options === null || options === void 0 ? void 0 : options.useColumnIndex;
|
|
242
239
|
if (useCellAddress) fileNameParts.push(FileNamePart.CELL_ADDRESS);
|
|
243
240
|
if (useColumnIndex !== void 0) fileNameParts.push(FileNamePart.COLUMN_VALUE);
|
|
@@ -421,7 +418,6 @@ var FRangeSheetsDrawingUIMixin = class extends FRange {
|
|
|
421
418
|
else return controller.insertCellImageByFile(file, location);
|
|
422
419
|
}
|
|
423
420
|
async saveCellImagesAsync(options) {
|
|
424
|
-
var _options$useCellAddre;
|
|
425
421
|
const batchSaveService = this._injector.get(IBatchSaveImagesService);
|
|
426
422
|
const unitId = this._workbook.getUnitId();
|
|
427
423
|
const subUnitId = this._worksheet.getSheetId();
|
|
@@ -436,7 +432,7 @@ var FRangeSheetsDrawingUIMixin = class extends FRange {
|
|
|
436
432
|
return false;
|
|
437
433
|
}
|
|
438
434
|
const fileNameParts = [];
|
|
439
|
-
const useCellAddress = (
|
|
435
|
+
const useCellAddress = (options === null || options === void 0 ? void 0 : options.useCellAddress) ?? true;
|
|
440
436
|
const useColumnIndex = options === null || options === void 0 ? void 0 : options.useColumnIndex;
|
|
441
437
|
if (useCellAddress) fileNameParts.push(FileNamePart.CELL_ADDRESS);
|
|
442
438
|
if (useColumnIndex !== void 0) fileNameParts.push(FileNamePart.COLUMN_VALUE);
|