@univerjs/sheets-ui 0.2.13 → 0.2.15

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.
@@ -12,11 +12,13 @@ export interface IScrollCommandParams {
12
12
  /**
13
13
  * This command is used to manage the scroll by relative offset
14
14
  * Usually triggered by wheel event.
15
+ * NOT same as ScrollCommand, which is usually triggered by scrollbar.
15
16
  */
16
17
  export declare const SetScrollRelativeCommand: ICommand<ISetScrollRelativeCommandParams>;
17
18
  /**
18
19
  * This command is used to manage the scroll position of the current view by specifying the cell index of the top left cell
19
- * Usually triggered by click scrollbar or moving selection range.
20
+ * Usually triggered by dragging srcollbar and click scrolltrack or moving selection range.
21
+ * NOT same as SetScrollRelativeCommand which usually trigger by wheelevent.
20
22
  */
21
23
  export declare const ScrollCommand: ICommand<IScrollCommandParams>;
22
24
  export interface IScrollToCellCommandParams {
@@ -14,7 +14,7 @@ export declare function getClearContentMutationParamForRange(worksheet: Workshee
14
14
  export declare function getCellIndexByOffsetWithMerge(offsetX: number, offsetY: number, scene: Scene, skeleton: SpreadsheetSkeleton): {
15
15
  actualRow: number;
16
16
  actualCol: number;
17
- mergeCell: IRange | undefined;
17
+ mergeCell: Nullable<IRange>;
18
18
  row: number;
19
19
  col: number;
20
20
  } | undefined;
@@ -1,4 +1,4 @@
1
- import { UniverInstanceService, Workbook, Disposable } from '@univerjs/core';
1
+ import { Disposable, UniverInstanceService, Workbook } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule, RenderManagerService } from '@univerjs/engine-render';
3
3
  import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
4
4
  export declare class CellCustomRenderController extends Disposable implements IRenderModule {
@@ -1,6 +1,6 @@
1
1
  import { Disposable, ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
2
- import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
3
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
+ import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IFormatPainterService } from '../../services/format-painter/format-painter.service';
5
5
  export declare class FormatPainterController extends Disposable {
6
6
  private readonly _commandService;
@@ -1,4 +1,4 @@
1
- import { IAccessor, IPermissionTypes, Workbook, WorkbookPermissionPointConstructor, Worksheet, IUniverInstanceService } from '@univerjs/core';
1
+ import { IUniverInstanceService, IAccessor, IPermissionTypes, Workbook, WorkbookPermissionPointConstructor, Worksheet } from '@univerjs/core';
2
2
  import { Observable } from 'rxjs';
3
3
  interface IActive {
4
4
  workbook: Workbook;
@@ -1,10 +1,10 @@
1
- import { Workbook, DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
1
+ import { DisposableCollection, IPermissionService, IUniverInstanceService, RxDisposable, Workbook } from '@univerjs/core';
2
2
  import { RangeProtectionRuleModel, SheetsSelectionsService } from '@univerjs/sheets';
3
3
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
4
+ import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
5
+ import { HeaderFreezeRenderController } from '../render-controllers/freeze.render-controller';
4
6
  import { HeaderMoveRenderController } from '../render-controllers/header-move.render-controller';
5
7
  import { HeaderResizeRenderController } from '../render-controllers/header-resize.render-controller';
6
- import { HeaderFreezeRenderController } from '../render-controllers/freeze.render-controller';
7
- import { ISheetSelectionRenderService } from '../../services/selection/base-selection-render.service';
8
8
  export declare const SHEET_PERMISSION_PASTE_PLUGIN = "SHEET_PERMISSION_PASTE_PLUGIN";
9
9
  export declare class SheetPermissionInterceptorCanvasRenderController extends RxDisposable implements IRenderModule {
10
10
  private readonly _context;
@@ -1,7 +1,7 @@
1
- import { Workbook, Disposable, ICommandService } from '@univerjs/core';
2
- import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
1
+ import { Disposable, ICommandService, Workbook } from '@univerjs/core';
3
2
  import { SheetsSelectionsService } from '@univerjs/sheets';
4
3
  import { IContextMenuService } from '@univerjs/ui';
4
+ import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
5
5
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
6
6
  /**
7
7
  * header highlight
@@ -1,4 +1,4 @@
1
- import { Workbook, Disposable, ICommandService, InterceptorManager } from '@univerjs/core';
1
+ import { Disposable, ICommandService, InterceptorManager, Workbook } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
4
4
  export declare const HEADER_RESIZE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, {
@@ -1,5 +1,5 @@
1
- import { IRange, Workbook, Disposable, ICommandService, IContextService, Injector } from '@univerjs/core';
2
- import { IRenderContext, IRenderModule, IRenderManagerService } from '@univerjs/engine-render';
1
+ import { Disposable, ICommandService, IContextService, Injector, IRange, Workbook } from '@univerjs/core';
2
+ import { IRenderManagerService, IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { SheetScrollManagerService } from '../../services/scroll-manager.service';
4
4
  import { SheetSkeletonManagerService } from '../../services/sheet-skeleton-manager.service';
5
5
  /**
@@ -18,7 +18,8 @@ export declare class SheetsScrollRenderController extends Disposable implements
18
18
  private _initCommandListener;
19
19
  private _scrollToSelectionForExpand;
20
20
  private _getFreeze;
21
- private _initScrollEventListener;
21
+ private _wheelEventListener;
22
+ private _scrollBarEventListener;
22
23
  private _initSkeletonListener;
23
24
  private _updateSceneSize;
24
25
  private _getSheetObject;
@@ -44,5 +44,4 @@ export declare class SheetRenderController extends RxDisposable implements IRend
44
44
  private _rangeToBounds;
45
45
  private _markViewportDirty;
46
46
  private _spreadsheetViewports;
47
- private _initMouseWheel;
48
47
  }
@@ -1,5 +1,5 @@
1
1
  import { Disposable, ICommandService, InterceptorManager, IUniverInstanceService } from '@univerjs/core';
2
- import { ArrayValueObject, FormulaDataModel, IFunctionService } from '@univerjs/engine-formula';
2
+ import { FormulaDataModel, IFunctionService, ArrayValueObject } from '@univerjs/engine-formula';
3
3
  import { INumfmtService, SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { IStatusBarService } from '../services/status-bar.service';
5
5
  export declare const STATUS_BAR_PERMISSION_CORRECT: import('@univerjs/core').IInterceptor<ArrayValueObject[], ArrayValueObject[]>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Copyright 2023-present DreamNum Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { ITextStyle, Nullable } from '@univerjs/core';
2
2
  import { ISheetSkeletonManagerParam } from '../../sheet-skeleton-manager.service';
3
- import { IUniverSheetCopyDataModel } from '../type';
3
+ import { IClipboardPropertyItem, IUniverSheetCopyDataModel } from '../type';
4
4
  import { IPastePlugin } from './paste-plugins/type';
5
5
  export interface IStyleRule {
6
6
  filter: string | string[] | ((node: HTMLElement) => boolean);
@@ -35,4 +35,13 @@ export declare class HtmlToUSMService {
35
35
  private _processAfterLink;
36
36
  dispose(): void;
37
37
  }
38
+ /**
39
+ * This function parses <tr> elements in the table. So it would return several things.
40
+ * @param html raw content
41
+ * @returns
42
+ */
43
+ export declare function parseTableRows(html: string): {
44
+ rowProperties: IClipboardPropertyItem[];
45
+ rowCount: number;
46
+ };
38
47
  export {};
@@ -47,9 +47,9 @@ export declare class SheetScrollManagerService implements IRenderModule {
47
47
  */
48
48
  private readonly _scrollStateMap;
49
49
  /**
50
- * a subject for current sheet scrollInfo
50
+ * a subject for current sheet scrollInfo, no limit by viewport.
51
51
  */
52
- private readonly _scrollInfo$;
52
+ private readonly _rawscrollInfo$;
53
53
  /**
54
54
  * a subject for current sheet scrollInfo ( events, ex wheel event and point events add deltaXY to rawScrollInfo$)
55
55
  */
@@ -73,7 +73,7 @@ export declare class SheetScrollManagerService implements IRenderModule {
73
73
  getScrollStateByParam(param: IScrollStateSearchParam): Readonly<Nullable<IScrollState>>;
74
74
  getCurrentScrollState(): Readonly<Nullable<IScrollState>>;
75
75
  /**
76
- * set scrollInfo by SetScrollOperation, call by scroll operation
76
+ * Set scrollInfo by SetScrollOperation, call by ScrollCommand.id.
77
77
  * @param param
78
78
  */
79
79
  setScrollInfoAndEmitEvent(param: IScrollStateWithSearchParam): void;
@@ -1,5 +1,5 @@
1
- import { IFunctionNames } from '@univerjs/engine-formula';
2
1
  import { default as React } from 'react';
2
+ import { IFunctionNames } from '@univerjs/engine-formula';
3
3
  export interface IStatisticItem {
4
4
  name: IFunctionNames;
5
5
  value: number;