@univerjs/sheets 1.0.0-alpha.6 → 1.0.0-alpha.7
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/index.js
CHANGED
|
@@ -11847,6 +11847,8 @@ let AutoFillService = class AutoFillService extends _univerjs_core.Disposable {
|
|
|
11847
11847
|
var _this$menu$find;
|
|
11848
11848
|
if (source.startColumn === selection.startColumn && source.startRow === selection.startRow && source.endColumn === selection.endColumn && source.endRow === selection.endRow) return false;
|
|
11849
11849
|
if (selection.endColumn < source.endColumn && selection.endColumn > source.startColumn) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11850
|
+
unitId,
|
|
11851
|
+
subUnitId,
|
|
11850
11852
|
clearRange: {
|
|
11851
11853
|
startRow: selection.startRow,
|
|
11852
11854
|
endRow: selection.endRow,
|
|
@@ -11856,6 +11858,8 @@ let AutoFillService = class AutoFillService extends _univerjs_core.Disposable {
|
|
|
11856
11858
|
selectionRange: selection
|
|
11857
11859
|
});
|
|
11858
11860
|
if (selection.endRow < source.endRow && selection.endRow > source.startRow) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11861
|
+
unitId,
|
|
11862
|
+
subUnitId,
|
|
11859
11863
|
clearRange: {
|
|
11860
11864
|
startRow: selection.endRow + 1,
|
|
11861
11865
|
endRow: source.endRow,
|
|
@@ -11885,8 +11889,8 @@ let AutoFillService = class AutoFillService extends _univerjs_core.Disposable {
|
|
|
11885
11889
|
target.startColumn = source.endColumn + 1;
|
|
11886
11890
|
} else return false;
|
|
11887
11891
|
this.direction = direction;
|
|
11888
|
-
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor));
|
|
11889
|
-
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor));
|
|
11892
|
+
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor, unitId, subUnitId));
|
|
11893
|
+
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor, unitId, subUnitId));
|
|
11890
11894
|
if (!autoFillSource || !autoFillTarget) return false;
|
|
11891
11895
|
this.autoFillLocation = {
|
|
11892
11896
|
source: autoFillSource,
|
|
@@ -12242,7 +12246,7 @@ const AutoClearContentCommand = {
|
|
|
12242
12246
|
id: "sheet.command.auto-clear-content",
|
|
12243
12247
|
type: _univerjs_core.CommandType.COMMAND,
|
|
12244
12248
|
handler: async (accessor, params) => {
|
|
12245
|
-
const target = getSheetCommandTarget(accessor.get(_univerjs_core.IUniverInstanceService));
|
|
12249
|
+
const target = getSheetCommandTarget(accessor.get(_univerjs_core.IUniverInstanceService), params);
|
|
12246
12250
|
if (!target) return false;
|
|
12247
12251
|
const commandService = accessor.get(_univerjs_core.ICommandService);
|
|
12248
12252
|
const undoRedoService = accessor.get(_univerjs_core.IUndoRedoService);
|
|
@@ -19385,7 +19389,7 @@ RangeProtectionCache = __decorate([
|
|
|
19385
19389
|
//#endregion
|
|
19386
19390
|
//#region package.json
|
|
19387
19391
|
var name = "@univerjs/sheets";
|
|
19388
|
-
var version = "1.0.0-alpha.
|
|
19392
|
+
var version = "1.0.0-alpha.7";
|
|
19389
19393
|
|
|
19390
19394
|
//#endregion
|
|
19391
19395
|
//#region src/controllers/active-worksheet.controller.ts
|
package/lib/es/index.js
CHANGED
|
@@ -11846,6 +11846,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11846
11846
|
var _this$menu$find;
|
|
11847
11847
|
if (source.startColumn === selection.startColumn && source.startRow === selection.startRow && source.endColumn === selection.endColumn && source.endRow === selection.endRow) return false;
|
|
11848
11848
|
if (selection.endColumn < source.endColumn && selection.endColumn > source.startColumn) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11849
|
+
unitId,
|
|
11850
|
+
subUnitId,
|
|
11849
11851
|
clearRange: {
|
|
11850
11852
|
startRow: selection.startRow,
|
|
11851
11853
|
endRow: selection.endRow,
|
|
@@ -11855,6 +11857,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11855
11857
|
selectionRange: selection
|
|
11856
11858
|
});
|
|
11857
11859
|
if (selection.endRow < source.endRow && selection.endRow > source.startRow) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11860
|
+
unitId,
|
|
11861
|
+
subUnitId,
|
|
11858
11862
|
clearRange: {
|
|
11859
11863
|
startRow: selection.endRow + 1,
|
|
11860
11864
|
endRow: source.endRow,
|
|
@@ -11884,8 +11888,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11884
11888
|
target.startColumn = source.endColumn + 1;
|
|
11885
11889
|
} else return false;
|
|
11886
11890
|
this.direction = direction;
|
|
11887
|
-
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor));
|
|
11888
|
-
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor));
|
|
11891
|
+
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor, unitId, subUnitId));
|
|
11892
|
+
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor, unitId, subUnitId));
|
|
11889
11893
|
if (!autoFillSource || !autoFillTarget) return false;
|
|
11890
11894
|
this.autoFillLocation = {
|
|
11891
11895
|
source: autoFillSource,
|
|
@@ -12241,7 +12245,7 @@ const AutoClearContentCommand = {
|
|
|
12241
12245
|
id: "sheet.command.auto-clear-content",
|
|
12242
12246
|
type: CommandType.COMMAND,
|
|
12243
12247
|
handler: async (accessor, params) => {
|
|
12244
|
-
const target = getSheetCommandTarget(accessor.get(IUniverInstanceService));
|
|
12248
|
+
const target = getSheetCommandTarget(accessor.get(IUniverInstanceService), params);
|
|
12245
12249
|
if (!target) return false;
|
|
12246
12250
|
const commandService = accessor.get(ICommandService);
|
|
12247
12251
|
const undoRedoService = accessor.get(IUndoRedoService);
|
|
@@ -19384,7 +19388,7 @@ RangeProtectionCache = __decorate([
|
|
|
19384
19388
|
//#endregion
|
|
19385
19389
|
//#region package.json
|
|
19386
19390
|
var name = "@univerjs/sheets";
|
|
19387
|
-
var version = "1.0.0-alpha.
|
|
19391
|
+
var version = "1.0.0-alpha.7";
|
|
19388
19392
|
|
|
19389
19393
|
//#endregion
|
|
19390
19394
|
//#region src/controllers/active-worksheet.controller.ts
|
package/lib/index.js
CHANGED
|
@@ -11846,6 +11846,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11846
11846
|
var _this$menu$find;
|
|
11847
11847
|
if (source.startColumn === selection.startColumn && source.startRow === selection.startRow && source.endColumn === selection.endColumn && source.endRow === selection.endRow) return false;
|
|
11848
11848
|
if (selection.endColumn < source.endColumn && selection.endColumn > source.startColumn) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11849
|
+
unitId,
|
|
11850
|
+
subUnitId,
|
|
11849
11851
|
clearRange: {
|
|
11850
11852
|
startRow: selection.startRow,
|
|
11851
11853
|
endRow: selection.endRow,
|
|
@@ -11855,6 +11857,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11855
11857
|
selectionRange: selection
|
|
11856
11858
|
});
|
|
11857
11859
|
if (selection.endRow < source.endRow && selection.endRow > source.startRow) return this._commandService.executeCommand(AutoClearContentCommand.id, {
|
|
11860
|
+
unitId,
|
|
11861
|
+
subUnitId,
|
|
11858
11862
|
clearRange: {
|
|
11859
11863
|
startRow: selection.endRow + 1,
|
|
11860
11864
|
endRow: source.endRow,
|
|
@@ -11884,8 +11888,8 @@ let AutoFillService = class AutoFillService extends Disposable {
|
|
|
11884
11888
|
target.startColumn = source.endColumn + 1;
|
|
11885
11889
|
} else return false;
|
|
11886
11890
|
this.direction = direction;
|
|
11887
|
-
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor));
|
|
11888
|
-
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor));
|
|
11891
|
+
const autoFillSource = this._injector.invoke((accessor) => rangeToDiscreteRange(source, accessor, unitId, subUnitId));
|
|
11892
|
+
const autoFillTarget = this._injector.invoke((accessor) => rangeToDiscreteRange(target, accessor, unitId, subUnitId));
|
|
11889
11893
|
if (!autoFillSource || !autoFillTarget) return false;
|
|
11890
11894
|
this.autoFillLocation = {
|
|
11891
11895
|
source: autoFillSource,
|
|
@@ -12241,7 +12245,7 @@ const AutoClearContentCommand = {
|
|
|
12241
12245
|
id: "sheet.command.auto-clear-content",
|
|
12242
12246
|
type: CommandType.COMMAND,
|
|
12243
12247
|
handler: async (accessor, params) => {
|
|
12244
|
-
const target = getSheetCommandTarget(accessor.get(IUniverInstanceService));
|
|
12248
|
+
const target = getSheetCommandTarget(accessor.get(IUniverInstanceService), params);
|
|
12245
12249
|
if (!target) return false;
|
|
12246
12250
|
const commandService = accessor.get(ICommandService);
|
|
12247
12251
|
const undoRedoService = accessor.get(IUndoRedoService);
|
|
@@ -19384,7 +19388,7 @@ RangeProtectionCache = __decorate([
|
|
|
19384
19388
|
//#endregion
|
|
19385
19389
|
//#region package.json
|
|
19386
19390
|
var name = "@univerjs/sheets";
|
|
19387
|
-
var version = "1.0.0-alpha.
|
|
19391
|
+
var version = "1.0.0-alpha.7";
|
|
19388
19392
|
|
|
19389
19393
|
//#endregion
|
|
19390
19394
|
//#region src/controllers/active-worksheet.controller.ts
|
|
@@ -14,18 +14,17 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICommand, IRange } from '@univerjs/core';
|
|
17
|
+
import type { ISheetCommandSharedParams } from '../utils/interface';
|
|
17
18
|
import { AUTO_FILL_APPLY_TYPE } from '../../services/auto-fill/type';
|
|
18
|
-
export interface IAutoFillCommandParams {
|
|
19
|
+
export interface IAutoFillCommandParams extends Partial<ISheetCommandSharedParams> {
|
|
19
20
|
sourceRange: IRange;
|
|
20
21
|
targetRange: IRange;
|
|
21
|
-
unitId?: string;
|
|
22
|
-
subUnitId?: string;
|
|
23
22
|
applyType?: AUTO_FILL_APPLY_TYPE;
|
|
24
23
|
}
|
|
25
24
|
export declare const AutoFillCommand: ICommand;
|
|
26
25
|
export declare const SheetCopyDownCommand: ICommand;
|
|
27
26
|
export declare const SheetCopyRightCommand: ICommand;
|
|
28
|
-
export interface IAutoClearContentCommand {
|
|
27
|
+
export interface IAutoClearContentCommand extends ISheetCommandSharedParams {
|
|
29
28
|
clearRange: IRange;
|
|
30
29
|
selectionRange: IRange;
|
|
31
30
|
}
|