@univerjs/sheets 0.5.0 → 0.5.1

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.
@@ -0,0 +1,17 @@
1
+ const e = {
2
+ sheets: {
3
+ tabs: {
4
+ sheetCopy: "(Copie{0})",
5
+ sheet: "Feuille"
6
+ },
7
+ info: {
8
+ overlappingSelections: "Impossible d'utiliser cette commande sur des sélections qui se chevauchent",
9
+ acrossMergedCell: "À travers une cellule fusionnée",
10
+ partOfCell: "Seule une partie d'une cellule fusionnée est sélectionnée",
11
+ hideSheet: "Aucune feuille visible après avoir masqué celle-ci"
12
+ }
13
+ }
14
+ };
15
+ export {
16
+ e as default
17
+ };
@@ -58,6 +58,6 @@ export declare function createRangeIteratorWithSkipFilteredRows(sheet: Worksheet
58
58
  * @param endColumn
59
59
  * @param isRow
60
60
  * @param styleRowOrColumn
61
- * @returns
62
61
  */
63
62
  export declare function copyRangeStyles(worksheet: Worksheet, startRow: number, endRow: number, startColumn: number, endColumn: number, isRow: boolean, styleRowOrColumn: number): IObjectMatrixPrimitiveType<ICellData>;
63
+ export declare function copyRangeStylesWithoutBorder(worksheet: Worksheet, startRow: number, endRow: number, startColumn: number, endColumn: number, isRow: boolean, styleRowOrColumn: number): IObjectMatrixPrimitiveType<ICellData>;
@@ -2,6 +2,7 @@ import { Dependency, IWorkbookData, Workbook, Injector, Univer } from '@univerjs
2
2
  export interface ITestBed {
3
3
  univer: Univer;
4
4
  get: Injector['get'];
5
+ has: Injector['has'];
5
6
  sheet: Workbook;
6
7
  }
7
8
  export declare function createCommandTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[]): ITestBed;
@@ -1,3 +1,3 @@
1
1
  import { IAccessor } from '@univerjs/core';
2
- import { SheetsSelectionsService } from '../../services/selections/selection-manager.service';
2
+ import { SheetsSelectionsService } from '../../services/selections/selection.service';
3
3
  export declare function getSelectionsService(accessor: IAccessor): SheetsSelectionsService;
@@ -1,5 +1,5 @@
1
1
  import { DependencyOverride } from '@univerjs/core';
2
- export declare const PLUGIN_CONFIG_KEY = "sheets.config";
2
+ export declare const SHEETS_PLUGIN_CONFIG_KEY = "sheets.config";
3
3
  export declare const configSymbol: unique symbol;
4
4
  export interface IUniverSheetsConfig {
5
5
  notExecuteFormula?: boolean;
@@ -1,9 +1,9 @@
1
- import { Dimension, Disposable, DisposableCollection, ICommandService, Injector, InterceptorManager, IUniverInstanceService, IRange } from '@univerjs/core';
2
- import { RefRangeService } from '../services/ref-range/ref-range.service';
3
- import { SheetsSelectionsService } from '../services/selections/selection-manager.service';
4
- import { SheetInterceptorService } from '../services/sheet-interceptor/sheet-interceptor.service';
1
+ import { IRange, Dimension, Disposable, DisposableCollection, ICommandService, Injector, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
5
2
  import { IRemoveWorksheetMergeMutationParams } from '../basics/interfaces/mutation-interface';
6
3
  import { EffectRefRangeParams } from '../services/ref-range/type';
4
+ import { RefRangeService } from '../services/ref-range/ref-range.service';
5
+ import { SheetsSelectionsService } from '../services/selections/selection.service';
6
+ import { SheetInterceptorService } from '../services/sheet-interceptor/sheet-interceptor.service';
7
7
  /**
8
8
  * calculates the selection based on the merged cell type
9
9
  * @param {IRange[]} selection
@@ -0,0 +1,3 @@
1
+ import { default as enUS } from './en-US';
2
+ declare const locale: typeof enUS;
3
+ export default locale;
@@ -13,6 +13,6 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export { WorksheetPermissionService } from './worksheet-permission.service';
17
16
  export { WorksheetProtectionPointModel } from './worksheet-permission-point.model';
18
17
  export { WorksheetProtectionRuleModel } from './worksheet-permission-rule.model';
18
+ export { WorksheetPermissionService } from './worksheet-permission.service';
@@ -1,6 +1,6 @@
1
1
  import { IDisposable, IMutationInfo, IRange, Nullable, Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
2
2
  import { EffectRefRangeParams } from './type';
3
- import { SheetsSelectionsService } from '../selections/selection-manager.service';
3
+ import { SheetsSelectionsService } from '../selections/selection.service';
4
4
  import { SheetInterceptorService } from '../sheet-interceptor/sheet-interceptor.service';
5
5
  type RefRangCallback = (params: EffectRefRangeParams) => {
6
6
  redos: IMutationInfo[];
@@ -6,7 +6,7 @@ import { ISheetCommandSharedParams } from '../../commands/utils/interface';
6
6
  import { EffectRefRangeParams, IDeleteRangeMoveLeftCommand, IDeleteRangeMoveUpCommand, IInsertColCommand, IInsertRangeMoveDownCommand, IInsertRangeMoveRightCommand, IInsertRowCommand, IMoveColsCommand, IMoveRangeCommand, IMoveRowsCommand, IOperator, IRemoveRowColCommand, IReorderRangeCommand } from './type';
7
7
  import { IMoveRangeMutationParams } from '../../commands/mutations/move-range.mutation';
8
8
  import { IMoveColumnsMutationParams, IMoveRowsMutationParams } from '../../commands/mutations/move-rows-cols.mutation';
9
- import { SheetsSelectionsService } from '../selections/selection-manager.service';
9
+ import { SheetsSelectionsService } from '../selections/selection.service';
10
10
  export declare const handleRangeTypeInput: (range: IRange) => {
11
11
  rangeType?: RANGE_TYPE;
12
12
  startAbsoluteRefType?: import('@univerjs/core').AbsoluteRefType;
@@ -15,5 +15,5 @@
15
15
  */
16
16
  export { IRefSelectionsService, RefSelectionsService } from './ref-selections.service';
17
17
  export { WorkbookSelectionModel } from './selection-data-model';
18
- export { DISABLE_NORMAL_SELECTIONS, SheetsSelectionsService } from './selection-manager.service';
18
+ export { DISABLE_NORMAL_SELECTIONS, SheetsSelectionsService } from './selection.service';
19
19
  export { type ISelectionManagerSearchParam, SelectionMoveType } from './type';
@@ -1,5 +1,5 @@
1
1
  import { IUniverInstanceService } from '@univerjs/core';
2
- import { SheetsSelectionsService } from './selection-manager.service';
2
+ import { SheetsSelectionsService } from './selection.service';
3
3
  /**
4
4
  * Ref selections service reuses code of `SelectionManagerService`. And it only contains ref selections
5
5
  * when user is editing formula.
@@ -8,5 +8,6 @@ export declare const INTERCEPTOR_POINT: {
8
8
  };
9
9
  export declare enum InterceptCellContentPriority {
10
10
  DATA_VALIDATION = 9,
11
- NUMFMT = 10
11
+ NUMFMT = 10,
12
+ CELL_IMAGE = 11
12
13
  }
@@ -32,6 +32,7 @@ export declare class SheetInterceptorService extends Disposable {
32
32
  private _commandInterceptors;
33
33
  private _rangeInterceptors;
34
34
  private _beforeCommandInterceptor;
35
+ private _afterCommandInterceptors;
35
36
  private readonly _workbookDisposables;
36
37
  private readonly _worksheetDisposables;
37
38
  readonly writeCellInterceptor: InterceptorManager<{
@@ -57,6 +58,8 @@ export declare class SheetInterceptorService extends Disposable {
57
58
  * @returns
58
59
  */
59
60
  onCommandExecute(info: ICommandInfo): IUndoRedoCommandInfosByInterceptor;
61
+ interceptAfterCommand(interceptor: ICommandInterceptor): IDisposable;
62
+ afterCommandExecute(info: ICommandInfo): IUndoRedoCommandInfosByInterceptor;
60
63
  /**
61
64
  * Add a listener function to a specific command to deteminte if the command can execute mutations. It should be
62
65
  * called in controllers.