@univerjs/sheets 0.2.14 → 0.3.0-alpha.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.
Files changed (26) hide show
  1. package/lib/cjs/index.js +3 -3
  2. package/lib/es/index.js +1560 -1325
  3. package/lib/types/basics/rangeMerge.d.ts +1 -1
  4. package/lib/types/basics/selection.d.ts +1 -0
  5. package/lib/types/commands/commands/__tests__/add-merge-command.spec.d.ts +16 -0
  6. package/lib/types/commands/commands/set-border-command.d.ts +9 -9
  7. package/lib/types/commands/commands/utils/selection-utils.d.ts +1 -1
  8. package/lib/types/commands/commands/utils/target-util.d.ts +1 -2
  9. package/lib/types/commands/operations/selection.operation.d.ts +2 -0
  10. package/lib/types/controllers/merge-cell.controller.d.ts +3 -3
  11. package/lib/types/index.d.ts +66 -63
  12. package/lib/types/model/range-protection-rule.model.d.ts +9 -7
  13. package/lib/types/model/range-protection.cache.d.ts +30 -0
  14. package/lib/types/services/border-style-manager.service.d.ts +1 -1
  15. package/lib/types/services/permission/permission-point/index.d.ts +32 -32
  16. package/lib/types/services/permission/range-permission/range-protection.ref-range.d.ts +9 -6
  17. package/lib/types/services/permission/range-permission/range-protection.service.d.ts +3 -1
  18. package/lib/types/services/permission/worksheet-permission/index.d.ts +1 -1
  19. package/lib/types/services/permission/worksheet-permission/utils.d.ts +2 -2
  20. package/lib/types/services/ref-range/util.d.ts +5 -5
  21. package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +4 -2
  22. package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +2 -2
  23. package/lib/types/sheets-plugin.d.ts +2 -2
  24. package/lib/umd/index.js +2 -2
  25. package/package.json +13 -13
  26. package/lib/types/commands/commands/utils/merged-cell-util.d.ts +0 -6
@@ -1,10 +1,10 @@
1
- import { ICommandInfo, IMutationInfo, IRange, Nullable, RANGE_TYPE } from '@univerjs/core';
1
+ import { RANGE_TYPE, ICommandInfo, IMutationInfo, IRange, Nullable } from '@univerjs/core';
2
+ import { IMoveRangeMutationParams } from '../../commands/mutations/move-range.mutation';
2
3
  import { IMoveColumnsMutationParams, IMoveRowsMutationParams } from '../../commands/mutations/move-rows-cols.mutation';
3
4
  import { IInsertColMutationParams, IInsertRowMutationParams, IRemoveColMutationParams, IRemoveRowsMutationParams, IRemoveSheetMutationParams } from '../../basics';
4
- import { IMoveRangeMutationParams } from '../../commands/mutations/move-range.mutation';
5
+ import { IRemoveRowColCommandInterceptParams } from '../../commands/commands/remove-row-col.command';
5
6
  import { ISheetCommandSharedParams } from '../../commands/utils/interface';
6
7
  import { SheetsSelectionsService } from '../selections/selection-manager.service';
7
- import { IRemoveRowColCommandInterceptParams } from '../../commands/commands/remove-row-col.command';
8
8
  import { EffectRefRangeParams, IDeleteRangeMoveLeftCommand, IDeleteRangeMoveUpCommand, IInsertColCommand, IInsertRangeMoveDownCommand, IInsertRangeMoveRightCommand, IInsertRowCommand, IMoveColsCommand, IMoveRangeCommand, IMoveRowsCommand, IOperator, IRemoveRowColCommand, IReorderRangeCommand } from './type';
9
9
  export declare const handleRangeTypeInput: (range: IRange) => {
10
10
  rangeType?: RANGE_TYPE;
@@ -75,10 +75,10 @@ export declare const handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterest
75
75
  selectionManagerService: SheetsSelectionsService;
76
76
  }) => IRange | null;
77
77
  type MutationsAffectRange = ISheetCommandSharedParams | IRemoveSheetMutationParams | IMoveRowsMutationParams | IMoveColumnsMutationParams | IRemoveRowsMutationParams | IRemoveColMutationParams | IInsertColMutationParams | IInsertRowMutationParams | IMoveRangeMutationParams;
78
- export declare const handleCommonDefaultRangeChangeWithEffectRefCommands: (range: IRange, commandInfo: ICommandInfo) => IRange | IRange[] | null;
78
+ export declare const handleCommonDefaultRangeChangeWithEffectRefCommands: (range: IRange, commandInfo: ICommandInfo) => IRange[];
79
79
  export declare const handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests: (range: IRange, commandInfo: ICommandInfo, deps: {
80
80
  selectionManagerService: SheetsSelectionsService;
81
- }) => IRange | IRange[] | null;
81
+ }) => IRange | IRange[];
82
82
  /**
83
83
  * This function should work as a pure function.
84
84
  *
@@ -1,7 +1,9 @@
1
- import { ICellDataForSheetInterceptor } from '@univerjs/core';
1
+ import { ICellData, ICellDataForSheetInterceptor, ICellInterceptor, Nullable } from '@univerjs/core';
2
2
  import { ISheetLocation, ISheetRowLocation } from './utils/interceptor';
3
3
  export declare const INTERCEPTOR_POINT: {
4
- CELL_CONTENT: import('@univerjs/core').IInterceptor<ICellDataForSheetInterceptor, ISheetLocation>;
4
+ CELL_CONTENT: ICellInterceptor<ICellDataForSheetInterceptor, ISheetLocation & {
5
+ rawData: Nullable<ICellData>;
6
+ }>;
5
7
  ROW_FILTERED: import('@univerjs/core').IInterceptor<boolean, ISheetRowLocation>;
6
8
  };
7
9
  export declare enum InterceptCellContentPriority {
@@ -1,4 +1,4 @@
1
- import { ICommandInfo, IDisposable, IInterceptor, IRange, IUndoRedoCommandInfosByInterceptor, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
1
+ import { Disposable, InterceptorEffectEnum, IUniverInstanceService, ICommandInfo, IDisposable, IInterceptor, IRange, IUndoRedoCommandInfosByInterceptor, Nullable } from '@univerjs/core';
2
2
  export interface IBeforeCommandInterceptor {
3
3
  priority?: number;
4
4
  performCheck(info: ICommandInfo): Promise<boolean>;
@@ -52,7 +52,7 @@ export declare class SheetInterceptorService extends Disposable {
52
52
  onCommandExecute(info: ICommandInfo): IUndoRedoCommandInfosByInterceptor;
53
53
  generateMutationsByRanges(info: IRangesInfo): IUndoRedoCommandInfosByInterceptor;
54
54
  intercept<T extends IInterceptor<any, any>>(name: T, interceptor: T): IDisposable;
55
- fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>): (initValue: Nullable<T>, initContext: C) => Nullable<T>;
55
+ fetchThroughInterceptors<T, C>(name: IInterceptor<T, C>, effect?: InterceptorEffectEnum): (initValue: Nullable<T>, initContext: C) => Nullable<T>;
56
56
  private _interceptWorkbook;
57
57
  private _disposeWorkbookInterceptor;
58
58
  private _disposeSheetInterceptor;
@@ -1,5 +1,5 @@
1
- import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
1
  import { IUniverSheetsConfig } from './controllers/config.schema';
2
+ import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
3
  export declare class UniverSheetsPlugin extends Plugin {
4
4
  private readonly _config;
5
5
  readonly _injector: Injector;
@@ -7,7 +7,7 @@ export declare class UniverSheetsPlugin extends Plugin {
7
7
  static pluginName: string;
8
8
  static type: UniverInstanceType;
9
9
  constructor(_config: Partial<IUniverSheetsConfig> | undefined, _injector: Injector, _configService: IConfigService);
10
- onRendered(): void;
11
10
  private _initConfig;
12
11
  private _initDependencies;
12
+ onStarting(_injector?: Injector): void;
13
13
  }