@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/facade.js
CHANGED
|
@@ -74,7 +74,6 @@ var FWorksheetDrawingUIMixin = class extends _univerjs_sheets_facade.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(_univerjs_sheets.SheetSkeletonService);
|
|
79
78
|
const info = this._injector.get(_univerjs_sheets_drawing_ui.SheetCanvasFloatDomManagerService).getFloatDomInfo(id);
|
|
80
79
|
if (!info) return this;
|
|
@@ -91,12 +90,12 @@ var FWorksheetDrawingUIMixin = class extends _univerjs_sheets_facade.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 ? (0, _univerjs_sheets_drawing.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 ? (0, _univerjs_sheets_drawing.transformToAxisAlignPosition)(config.position, skeleton) ?? drawingParm.sheetTransform : drawingParm.sheetTransform
|
|
100
99
|
};
|
|
101
100
|
if (!this._commandService.syncExecuteCommand(_univerjs_sheets_drawing.SetSheetDrawingCommand.id, {
|
|
102
101
|
unitId,
|
|
@@ -111,7 +110,6 @@ var FWorksheetDrawingUIMixin = class extends _univerjs_sheets_facade.FWorksheet
|
|
|
111
110
|
const sheetSkeletonService = this._injector.get(_univerjs_sheets.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 _univerjs_sheets_facade.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 ? (0, _univerjs_sheets_drawing.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 ? (0, _univerjs_sheets_drawing.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 _univerjs_sheets_facade.FWorksheet
|
|
|
222
220
|
return null;
|
|
223
221
|
}
|
|
224
222
|
async saveCellImagesAsync(options, ranges) {
|
|
225
|
-
var _options$useCellAddre;
|
|
226
223
|
const batchSaveService = this._injector.get(_univerjs_sheets_drawing_ui.IBatchSaveImagesService);
|
|
227
224
|
const unitId = this._fWorkbook.getId();
|
|
228
225
|
const subUnitId = this.getSheetId();
|
|
@@ -237,7 +234,7 @@ var FWorksheetDrawingUIMixin = class extends _univerjs_sheets_facade.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(_univerjs_sheets_drawing_ui.FileNamePart.CELL_ADDRESS);
|
|
243
240
|
if (useColumnIndex !== void 0) fileNameParts.push(_univerjs_sheets_drawing_ui.FileNamePart.COLUMN_VALUE);
|
|
@@ -421,7 +418,6 @@ var FRangeSheetsDrawingUIMixin = class extends _univerjs_sheets_facade.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(_univerjs_sheets_drawing_ui.IBatchSaveImagesService);
|
|
426
422
|
const unitId = this._workbook.getUnitId();
|
|
427
423
|
const subUnitId = this._worksheet.getSheetId();
|
|
@@ -436,7 +432,7 @@ var FRangeSheetsDrawingUIMixin = class extends _univerjs_sheets_facade.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(_univerjs_sheets_drawing_ui.FileNamePart.CELL_ADDRESS);
|
|
442
438
|
if (useColumnIndex !== void 0) fileNameParts.push(_univerjs_sheets_drawing_ui.FileNamePart.COLUMN_VALUE);
|