@univerjs/sheets-ui 0.2.7 → 0.2.9
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 +6 -6
- package/lib/es/index.js +930 -750
- package/lib/index.css +1 -1
- package/lib/types/basics/editor/get-editor-object.d.ts +0 -1
- package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +0 -1
- package/lib/types/commands/commands/__tests__/create-selection-command-test-bed.d.ts +0 -1
- package/lib/types/commands/commands/add-worksheet-merge.command.d.ts +0 -1
- package/lib/types/commands/commands/auto-fill.command.d.ts +0 -1
- package/lib/types/commands/commands/clipboard.command.d.ts +0 -1
- package/lib/types/commands/commands/delete-range-move-left-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/delete-range-move-up-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/hide-row-col-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/inline-format.command.d.ts +0 -1
- package/lib/types/commands/commands/insert-range-move-down-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/insert-range-move-right-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/range-protection.command.d.ts +0 -1
- package/lib/types/commands/commands/refill.command.d.ts +0 -1
- package/lib/types/commands/commands/remove-row-col-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/remove-sheet-confirm.command.d.ts +0 -1
- package/lib/types/commands/commands/set-format-painter.command.d.ts +0 -1
- package/lib/types/commands/commands/set-frozen.command.d.ts +0 -1
- package/lib/types/commands/commands/set-scroll.command.d.ts +0 -1
- package/lib/types/commands/commands/set-selection.command.d.ts +0 -1
- package/lib/types/commands/commands/set-zoom-ratio.command.d.ts +0 -1
- package/lib/types/commands/commands/unhide.command.d.ts +0 -1
- package/lib/types/commands/commands/utils/selection-utils.d.ts +0 -1
- package/lib/types/commands/commands/worksheet-protection.command.d.ts +0 -1
- package/lib/types/commands/operations/activate-cell-edit.operation.d.ts +0 -1
- package/lib/types/commands/operations/cell-edit.operation.d.ts +0 -1
- package/lib/types/commands/operations/rename-sheet.operation.d.ts +0 -1
- package/lib/types/commands/operations/scroll-to-range.operation.d.ts +0 -1
- package/lib/types/commands/operations/scroll.operation.d.ts +0 -1
- package/lib/types/commands/operations/set-format-painter.operation.d.ts +0 -1
- package/lib/types/commands/operations/set-zoom-ratio.operation.d.ts +0 -1
- package/lib/types/commands/operations/sheet-permission-open-dialog.operation.d.ts +0 -1
- package/lib/types/commands/operations/sheet-permission-open-panel.operation.d.ts +0 -1
- package/lib/types/commands/operations/sidebar-defined-name.operation.d.ts +0 -1
- package/lib/types/common/utils.d.ts +0 -1
- package/lib/types/components/border-panel/BorderPanel.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/BorderLine.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDot.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashDotDot.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDashed.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderDotted.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderHair.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMedium.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDot.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashDotDot.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderMediumDashed.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThick.d.ts +0 -1
- package/lib/types/components/border-panel/border-line/icons/BorderThin.d.ts +0 -1
- package/lib/types/components/border-panel/interface.d.ts +0 -1
- package/lib/types/components/hook.d.ts +0 -1
- package/lib/types/components/menu-item-input/MenuItemInput.d.ts +0 -1
- package/lib/types/components/menu-item-input/interface.d.ts +0 -1
- package/lib/types/{basics/const → consts}/permission.d.ts +0 -1
- package/lib/types/{basics/const → consts}/ui-name.d.ts +2 -1
- package/lib/types/controllers/active-worksheet/active-worksheet.controller.d.ts +0 -1
- package/lib/types/controllers/auto-fill.controller.d.ts +0 -1
- package/lib/types/controllers/auto-height.controller.d.ts +0 -1
- package/lib/types/controllers/cell-alert.controller.d.ts +0 -1
- package/lib/types/controllers/cell-custom-render.controller.d.ts +0 -1
- package/lib/types/controllers/clipboard/clipboard.controller.d.ts +0 -1
- package/lib/types/controllers/clipboard/utils.d.ts +0 -1
- package/lib/types/controllers/defined-name/defined-name.controller.d.ts +0 -1
- package/lib/types/controllers/drag-render.controller.d.ts +0 -1
- package/lib/types/controllers/editor/__tests__/create-test-bed.d.ts +0 -1
- package/lib/types/controllers/editor/__tests__/mock-function.service.d.ts +0 -1
- package/lib/types/controllers/editor/editing.render-controller.d.ts +0 -1
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +0 -1
- package/lib/types/controllers/force-string-alert-render.controller.d.ts +0 -1
- package/lib/types/controllers/force-string-render.controller.d.ts +0 -1
- package/lib/types/controllers/format-painter/format-painter.controller.d.ts +0 -1
- package/lib/types/controllers/hover-render.controller.d.ts +0 -1
- package/lib/types/controllers/mark-selection.controller.d.ts +0 -1
- package/lib/types/controllers/menu/__tests__/create-menu-test-bed.d.ts +0 -1
- package/lib/types/controllers/menu/border.menu.d.ts +0 -1
- package/lib/types/controllers/menu/clear.menu.d.ts +0 -1
- package/lib/types/controllers/menu/delete.menu.d.ts +0 -1
- package/lib/types/controllers/menu/insert.menu.d.ts +0 -1
- package/lib/types/controllers/menu/menu-util.d.ts +0 -1
- package/lib/types/controllers/menu/menu.d.ts +2 -2
- package/lib/types/controllers/menu/merge.menu.d.ts +0 -1
- package/lib/types/controllers/menu/permission-menu-util.d.ts +0 -1
- package/lib/types/controllers/menu/permission.menu.d.ts +0 -1
- package/lib/types/controllers/menu/sheet.menu.d.ts +0 -1
- package/lib/types/controllers/mobile/mobile-sheet-ui.controller.d.ts +0 -1
- package/lib/types/controllers/move-range.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-init.controller.d.ts +5 -3
- package/lib/types/controllers/permission/sheet-permission-interceptor-base.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-canvas-render.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-clipboard.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-interceptor-formula-render.controller.d.ts +0 -1
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/format-painter.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/freeze.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/header-menu.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/header-move.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/header-resize.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/header-unhide.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/mobile/mobile-contextmenu.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/mobile/mobile-scroll.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/scroll.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/sheet.render-controller.d.ts +1 -2
- package/lib/types/controllers/render-controllers/skeleton.render-controller.d.ts +0 -1
- package/lib/types/controllers/render-controllers/zoom.render-controller.d.ts +4 -1
- package/lib/types/controllers/sheet-ui.controller.d.ts +0 -1
- package/lib/types/controllers/shortcuts/editor.shortcut.d.ts +0 -1
- package/lib/types/controllers/shortcuts/operation.shortcut.d.ts +0 -1
- package/lib/types/controllers/shortcuts/selection.shortcut.d.ts +0 -1
- package/lib/types/controllers/shortcuts/style.shortcut.d.ts +0 -1
- package/lib/types/controllers/shortcuts/utils.d.ts +0 -1
- package/lib/types/controllers/shortcuts/value.shortcut.d.ts +0 -1
- package/lib/types/controllers/shortcuts/view.shortcut.d.ts +0 -1
- package/lib/types/controllers/status-bar.controller.d.ts +0 -1
- package/lib/types/controllers/utils/char-tools.d.ts +0 -1
- package/lib/types/controllers/utils/component-tools.d.ts +0 -1
- package/lib/types/controllers/utils/range-tools.d.ts +0 -1
- package/lib/types/controllers/utils/selections-tools.d.ts +0 -1
- package/lib/types/hooks/useHighlightRange.d.ts +0 -1
- package/lib/types/index.d.ts +2 -1
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/mobile-sheets-ui-plugin.d.ts +0 -1
- package/lib/types/services/auto-fill/auto-fill.service.d.ts +0 -1
- package/lib/types/services/auto-fill/rules.d.ts +0 -1
- package/lib/types/services/auto-fill/tools.d.ts +0 -1
- package/lib/types/services/auto-fill/type.d.ts +0 -1
- package/lib/types/services/canvas-pop-manager.service.d.ts +1 -2
- package/lib/types/services/cell-alert-manager.service.d.ts +0 -1
- package/lib/types/services/clipboard/__tests__/clipboard-test-bed.d.ts +0 -1
- package/lib/types/services/clipboard/clipboard.service.d.ts +0 -1
- package/lib/types/services/clipboard/copy-content-cache.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/converter.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/parse-node-style.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/paste-plugins/plugin-lark.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/paste-plugins/plugin-univer.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/paste-plugins/plugin-word.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/paste-plugins/type.d.ts +0 -1
- package/lib/types/services/clipboard/html-to-usm/utils.d.ts +0 -1
- package/lib/types/services/clipboard/type.d.ts +0 -1
- package/lib/types/services/clipboard/usm-to-html/convertor.d.ts +0 -1
- package/lib/types/services/clipboard/utils.d.ts +0 -1
- package/lib/types/services/drag-manager.service.d.ts +0 -1
- package/lib/types/services/editor/cell-editor-manager.service.d.ts +0 -1
- package/lib/types/services/editor/formula-editor-manager.service.d.ts +0 -1
- package/lib/types/services/editor-bridge.service.d.ts +0 -1
- package/lib/types/services/format-painter/format-painter.service.d.ts +0 -1
- package/lib/types/services/hover-manager.service.d.ts +0 -1
- package/lib/types/services/mark-selection/mark-selection.service.d.ts +0 -1
- package/lib/types/services/permission/sheet-permission-panel.model.d.ts +9 -1
- package/lib/types/services/permission/sheet-permission-user-list.service.d.ts +1 -1
- package/lib/types/services/permission/worksheet-permission-render.service.d.ts +0 -1
- package/lib/types/services/print-interceptor.service.d.ts +0 -1
- package/lib/types/services/scroll-manager.service.d.ts +0 -1
- package/lib/types/services/selection/base-selection-render.service.d.ts +38 -39
- package/lib/types/services/selection/const.d.ts +0 -1
- package/lib/types/services/selection/mobile-selection-render.service.d.ts +3 -5
- package/lib/types/services/selection/mobile-selection-shape.d.ts +1 -2
- package/lib/types/services/selection/selection-render-model.d.ts +7 -4
- package/lib/types/services/selection/selection-render.service.d.ts +3 -7
- package/lib/types/services/selection/selection-shape-extension.d.ts +13 -4
- package/lib/types/services/selection/selection-shape.d.ts +22 -18
- package/lib/types/services/selection/util.d.ts +0 -1
- package/lib/types/services/sheet-bar/sheet-bar.service.d.ts +0 -1
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +0 -1
- package/lib/types/services/sheets-render.service.d.ts +0 -1
- package/lib/types/services/shortcut-experience.service.d.ts +0 -1
- package/lib/types/services/status-bar.service.d.ts +0 -1
- package/lib/types/services/utils/selection-util.d.ts +0 -1
- package/lib/types/sheets-ui-plugin.d.ts +1 -2
- package/lib/types/views/cell-alert/CellAlertPopup.d.ts +0 -1
- package/lib/types/views/count-bar/CountBar.d.ts +0 -1
- package/lib/types/views/count-bar/ZoomSlider.d.ts +0 -1
- package/lib/types/views/defined-name/DefinedName.d.ts +0 -1
- package/lib/types/views/defined-name/DefinedNameContainer.d.ts +0 -1
- package/lib/types/views/defined-name/DefinedNameInput.d.ts +0 -1
- package/lib/types/views/defined-name/DefinedNameOverlay.d.ts +0 -1
- package/lib/types/views/editor-container/EditorContainer.d.ts +0 -1
- package/lib/types/views/formula-bar/FormulaBar.d.ts +0 -1
- package/lib/types/views/header-menu-shape.d.ts +0 -1
- package/lib/types/views/header-resize-shape.d.ts +0 -1
- package/lib/types/views/header-unhide-shape.d.ts +0 -1
- package/lib/types/views/mobile/sheet-bar/MobileSheetBar.d.ts +0 -1
- package/lib/types/views/operate-container/AutoFillPopupMenu.d.ts +0 -1
- package/lib/types/views/operate-container/OperateContainer.d.ts +0 -1
- package/lib/types/views/permission/error-msg-dialog/index.d.ts +0 -1
- package/lib/types/views/permission/extensions/range-protection.render.d.ts +0 -1
- package/lib/types/views/permission/extensions/worksheet-permission.render.d.ts +0 -1
- package/lib/types/views/permission/footer/index.d.ts +0 -1
- package/lib/types/views/permission/footer/permission-detail-footer.d.ts +0 -1
- package/lib/types/views/permission/footer/permission-list-footer.d.ts +0 -1
- package/lib/types/views/permission/panel/index.d.ts +1 -2
- package/lib/types/views/permission/panel-detail/index.d.ts +0 -1
- package/lib/types/views/permission/panel-list/index.d.ts +0 -1
- package/lib/types/views/permission/permission-dialog/index.d.ts +0 -1
- package/lib/types/views/permission/spin/index.d.ts +0 -1
- package/lib/types/views/permission/user-dialog/index.d.ts +0 -1
- package/lib/types/views/sheet-bar/SheetBar.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-button/SheetBarButton.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-menu/SheetBarMenu.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarTabs.d.ts +0 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +0 -1
- package/lib/types/views/sheet-container/SheetContainer.d.ts +0 -1
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +0 -1
- package/lib/types/views/status-bar/StatusBar.d.ts +0 -1
- package/lib/umd/index.js +6 -6
- package/package.json +19 -21
- package/lib/types/basics/const/index.d.ts +0 -17
- package/lib/types/basics/index.d.ts +0 -16
- /package/lib/types/{basics/const → consts}/plugin-name.d.ts +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IParagraph, IParagraphStyle, Nullable } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export default function parseToDom(rawHtml: string): HTMLBodyElement;
|
|
4
3
|
export declare function getParagraphStyle(el: HTMLElement): Nullable<IParagraphStyle>;
|
|
5
4
|
export declare function generateParagraphs(dataStream: string, prevParagraph?: IParagraph): IParagraph[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IDragEvent, IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { IHoverCellPosition } from './hover-manager.service';
|
|
4
|
-
|
|
5
4
|
export interface IDragCellPosition extends IHoverCellPosition {
|
|
6
5
|
dataTransfer: DataTransfer;
|
|
7
6
|
}
|
|
@@ -3,7 +3,6 @@ import { Engine, IDocumentLayoutObject, Scene, DeviceInputEventType, IRenderMana
|
|
|
3
3
|
import { ISheetLocation, SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IEditorService, KeyCode } from '@univerjs/ui';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
-
|
|
7
6
|
export interface IEditorBridgeServiceVisibleParam {
|
|
8
7
|
visible: boolean;
|
|
9
8
|
eventType: DeviceInputEventType;
|
|
@@ -2,7 +2,6 @@ import { IMutationInfo, IRange, IStyleData, Disposable, ICommandService, ILogSer
|
|
|
2
2
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { IMarkSelectionService } from '../mark-selection/mark-selection.service';
|
|
5
|
-
|
|
6
5
|
export interface IFormatPainterService {
|
|
7
6
|
status$: Observable<FormatPainterStatus>;
|
|
8
7
|
addHook(hooks: IFormatPainterHook): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IPosition, Nullable, Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { ISheetLocation } from '@univerjs/sheets';
|
|
3
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
-
|
|
5
4
|
export interface IHoverCellPosition {
|
|
6
5
|
position: IPosition;
|
|
7
6
|
location: ISheetLocation;
|
|
@@ -2,7 +2,6 @@ import { Disposable, IUniverInstanceService, ThemeService } from '@univerjs/core
|
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { SelectionControl } from '../selection/selection-shape';
|
|
5
|
-
|
|
6
5
|
export interface IMarkSelectionService {
|
|
7
6
|
addShape(selection: ISelectionWithStyle, exits?: string[], zIndex?: number): string | null;
|
|
8
7
|
removeShape(id: string): void;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { IRange, Nullable } from '@univerjs/core';
|
|
2
2
|
import { IRangeProtectionRule, IWorksheetProtectionRule } from '@univerjs/sheets';
|
|
3
|
-
|
|
4
3
|
export declare enum viewState {
|
|
5
4
|
othersCanView = "othersCanView",
|
|
6
5
|
noOneElseCanView = "noOneElseCanView"
|
|
7
6
|
}
|
|
7
|
+
export declare enum editState {
|
|
8
|
+
designedUserCanEdit = "designedUserCanEdit",
|
|
9
|
+
onlyMe = "onlyMe"
|
|
10
|
+
}
|
|
8
11
|
type IPermissionPanelBaseRule = IRangeProtectionRule | IWorksheetProtectionRule;
|
|
9
12
|
export type IPermissionPanelRule = IPermissionPanelBaseRule & {
|
|
10
13
|
viewStatus?: viewState;
|
|
14
|
+
editStatus?: editState;
|
|
11
15
|
ranges: IRange[];
|
|
12
16
|
};
|
|
13
17
|
export declare class SheetPermissionPanelModel {
|
|
@@ -15,12 +19,16 @@ export declare class SheetPermissionPanelModel {
|
|
|
15
19
|
private _rule$;
|
|
16
20
|
private _oldRule;
|
|
17
21
|
private _rangeErrorMsg$;
|
|
22
|
+
private _visible;
|
|
23
|
+
setVisible(v: boolean): void;
|
|
24
|
+
getVisible(): boolean;
|
|
18
25
|
rangeErrorMsg$: import('rxjs').Observable<string>;
|
|
19
26
|
setRangeErrorMsg(msg: string): void;
|
|
20
27
|
rule$: import('rxjs').Observable<IPermissionPanelRule>;
|
|
21
28
|
get rule(): IPermissionPanelRule;
|
|
22
29
|
setRule(ruleObj: Partial<IPermissionPanelRule>): void;
|
|
23
30
|
resetRule(): void;
|
|
31
|
+
reset(): void;
|
|
24
32
|
get oldRule(): Nullable<IPermissionPanelRule>;
|
|
25
33
|
setOldRule(ruleObj: Nullable<IPermissionPanelRule>): void;
|
|
26
34
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ICollaborator } from '@univerjs/protocol';
|
|
2
|
-
|
|
3
2
|
export declare class SheetPermissionUserManagerService {
|
|
4
3
|
private _userList;
|
|
5
4
|
private _oldCollaboratorList;
|
|
@@ -11,6 +10,7 @@ export declare class SheetPermissionUserManagerService {
|
|
|
11
10
|
get allUserList(): ICollaborator[];
|
|
12
11
|
setAllUserList(userList: ICollaborator[]): void;
|
|
13
12
|
setUserList(userList: ICollaborator[]): void;
|
|
13
|
+
reset(): void;
|
|
14
14
|
get oldCollaboratorList(): ICollaborator[];
|
|
15
15
|
setOldCollaboratorList(userList: ICollaborator[]): void;
|
|
16
16
|
get selectUserList(): ICollaborator[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export declare class WorksheetProtectionRenderService extends Disposable {
|
|
5
4
|
private _renderManagerService;
|
|
6
5
|
private _univerInstanceService;
|
|
@@ -2,7 +2,6 @@ import { Nullable, Workbook } from '@univerjs/core';
|
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
3
|
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
4
4
|
import { SheetSkeletonManagerService } from './sheet-skeleton-manager.service';
|
|
5
|
-
|
|
6
5
|
export interface IScrollState {
|
|
7
6
|
/**
|
|
8
7
|
* offsetX from startRow, coordinate same as viewport, not scrollbar
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { IInterceptor, Injector, IRange, IRangeWithCoord, ISelectionCell, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, ThemeService, Disposable, InterceptorManager, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
-
import { IMouseEvent, IPointerEvent,
|
|
2
|
+
import { IMouseEvent, IPointerEvent, IRenderModule, Scene, SpreadsheetSkeleton, Viewport, ScrollTimer, ScrollTimerType } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle, ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
5
|
import { Observable, Subscription, BehaviorSubject, Subject } from 'rxjs';
|
|
6
|
+
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
6
7
|
import { SelectionControl } from './selection-shape';
|
|
7
|
-
|
|
8
8
|
export interface IControlFillConfig {
|
|
9
9
|
oldRange: IRange;
|
|
10
10
|
newRange: IRange;
|
|
@@ -43,7 +43,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
43
43
|
protected readonly _injector: Injector;
|
|
44
44
|
protected readonly _themeService: ThemeService;
|
|
45
45
|
protected readonly _shortcutService: IShortcutService;
|
|
46
|
-
protected readonly
|
|
46
|
+
protected readonly _sheetSkeletonManagerService: SheetSkeletonManagerService;
|
|
47
47
|
private _downObserver;
|
|
48
48
|
protected _scenePointerMoveSub: Nullable<Subscription>;
|
|
49
49
|
protected _scenePointerUpSub: Nullable<Subscription>;
|
|
@@ -71,11 +71,6 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
71
71
|
protected _skipLastEnabled: boolean;
|
|
72
72
|
protected _singleSelectionEnabled: boolean;
|
|
73
73
|
protected readonly _selectionMoveEnd$: BehaviorSubject<ISelectionWithCoordAndStyle[]>;
|
|
74
|
-
/**
|
|
75
|
-
* trigger when selection move end(pointerup)
|
|
76
|
-
* and then update selection model in selectionManagerService
|
|
77
|
-
* selectionMoveEnd$ ---> _updateSelections --> selectionOperation@selectionManagerService.setSelections
|
|
78
|
-
*/
|
|
79
74
|
readonly selectionMoveEnd$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
80
75
|
protected readonly _selectionMoving$: Subject<ISelectionWithCoordAndStyle[]>;
|
|
81
76
|
readonly selectionMoving$: Observable<ISelectionWithCoordAndStyle[]>;
|
|
@@ -93,50 +88,35 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
93
88
|
scene: Scene;
|
|
94
89
|
}>;
|
|
95
90
|
}>;
|
|
96
|
-
constructor(_injector: Injector, _themeService: ThemeService, _shortcutService: IShortcutService,
|
|
91
|
+
constructor(_injector: Injector, _themeService: ThemeService, _shortcutService: IShortcutService, _sheetSkeletonManagerService: SheetSkeletonManagerService);
|
|
97
92
|
private _initMoving;
|
|
98
|
-
protected
|
|
99
|
-
|
|
93
|
+
protected _setSelectionStyle(style: ISelectionStyle): void;
|
|
94
|
+
/**
|
|
95
|
+
* Reset this._selectionStyle to default normal selection style
|
|
96
|
+
*/
|
|
97
|
+
protected _resetSelectionStyle(): void;
|
|
100
98
|
/** @deprecated This should not be provided by the selection render service. */
|
|
101
99
|
getViewPort(): Viewport;
|
|
102
100
|
setSingleSelectionEnabled(enabled?: boolean): void;
|
|
103
101
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* in PC:init & pointerup would call this function.
|
|
107
|
-
*
|
|
108
|
-
* init
|
|
109
|
-
* selectionController@_initSkeletonChangeListener --> selectionManagerService.add --> selectionManagerService._selectionMoveEnd$ --> this.addControlToCurrentByRangeData
|
|
110
|
-
*
|
|
111
|
-
* selectionMoveEnd$ --> this.addSelectionControlBySelectionData
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* pointer
|
|
116
|
-
* engine@_pointerDownEvent --> spreadsheet?.onPointerDownObserve --> eventTrigger --> scene@disableEvent() --> then scene.input-manager currentObject is always scene until scene@enableEvent.
|
|
117
|
-
* engine@_pointerUpEvent --> scene.input-manager@_onPointerUp --> this._selectionMoveEnd$ --> _selectionManagerService.selectionMoveEnd$ --> this.addControlToCurrentByRangeData
|
|
118
|
-
*
|
|
119
|
-
* but in mobile, we do not call disableEvent() in eventTrigger,
|
|
120
|
-
* so pointerup --> scene.input-manager currentObject is spreadsheet --> this.eventTrigger
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* columnHeader pointerup$ --> selectionMoveEnd$ --> selectionManagerService@setSelections -->
|
|
124
|
-
* selectionManagerService@_emitOnEnd -->
|
|
125
|
-
* _workbookSelections.selectionMoveEnd$ --> _addSelectionControlBySelectionData
|
|
126
|
-
*
|
|
127
|
-
* @param selectionData
|
|
102
|
+
* Add a selection in spreadsheet, create a new SelectionControl and then update this control by range derives from selection.
|
|
103
|
+
* @param {ISelectionWithCoordAndStyle} selection
|
|
128
104
|
*/
|
|
129
105
|
protected _addSelectionControlBySelectionData(selection: ISelectionWithCoordAndStyle): void;
|
|
130
106
|
newSelectionControl(scene: Scene, _rangeType: RANGE_TYPE): SelectionControl;
|
|
131
107
|
/**
|
|
132
108
|
* Update the corresponding selectionControl based on selectionsData.
|
|
133
|
-
* selectionData[i]
|
|
109
|
+
* selectionData[i] syncs selectionControls[i]
|
|
134
110
|
* @param selections
|
|
135
111
|
*/
|
|
136
112
|
updateControlForCurrentByRangeData(selections: ISelectionWithCoordAndStyle[]): void;
|
|
137
113
|
refreshSelectionMoveStart(): void;
|
|
138
114
|
protected _changeRuntime(skeleton: SpreadsheetSkeleton, scene: Scene, viewport?: Viewport): void;
|
|
139
115
|
getSkeleton(): SpreadsheetSkeleton;
|
|
116
|
+
/**
|
|
117
|
+
* Generate selectionData from this._selectionControls.model .
|
|
118
|
+
* @returns {ISelectionWithCoordAndStyle[]} {range, primary, style}[]
|
|
119
|
+
*/
|
|
140
120
|
getSelectionDataWithStyle(): ISelectionWithCoordAndStyle[];
|
|
141
121
|
getSelectionControls(): SelectionControl[];
|
|
142
122
|
protected _clearSelectionControls(): void;
|
|
@@ -164,7 +144,16 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
164
144
|
* @param _zIndex Stacking order of the selection object
|
|
165
145
|
* @param rangeType Determines whether the selection is made normally according to the range or by rows and columns
|
|
166
146
|
*/
|
|
167
|
-
protected _onPointerDown(evt: IPointerEvent | IMouseEvent, _zIndex?: number, rangeType?: RANGE_TYPE, viewport?: Viewport, scrollTimerType?: ScrollTimerType):
|
|
147
|
+
protected _onPointerDown(evt: IPointerEvent | IMouseEvent, _zIndex?: number, rangeType?: RANGE_TYPE, viewport?: Viewport, scrollTimerType?: ScrollTimerType): void;
|
|
148
|
+
/**
|
|
149
|
+
* Init pointer move listener, bind in each pointer down, unbind in each pointer up
|
|
150
|
+
* @param viewportMain
|
|
151
|
+
* @param activeSelectionControl
|
|
152
|
+
* @param rangeType
|
|
153
|
+
* @param scrollTimerType
|
|
154
|
+
* @param moveStartPosX
|
|
155
|
+
* @param moveStartPosY
|
|
156
|
+
*/
|
|
168
157
|
protected _setupPointerMoveListener(viewportMain: Nullable<Viewport>, activeSelectionControl: SelectionControl, rangeType: RANGE_TYPE, scrollTimerType: ScrollTimerType | undefined, moveStartPosX: number, moveStartPosY: number): void;
|
|
169
158
|
/** @deprecated Use the function `attachSelectionWithCoord` instead`. */
|
|
170
159
|
attachSelectionWithCoord(selectionWithStyle: ISelectionWithStyle): ISelectionWithCoordAndStyle;
|
|
@@ -174,8 +163,14 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
174
163
|
/**
|
|
175
164
|
* When mousedown and mouseup need to go to the coordination and undo stack, when mousemove does not need to go to the coordination and undo stack
|
|
176
165
|
*/
|
|
177
|
-
protected
|
|
178
|
-
|
|
166
|
+
protected _movingHandler(offsetX: number, offsetY: number, activeSelectionControl: Nullable<SelectionControl>, rangeType: RANGE_TYPE): false | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Update the selection control by range.
|
|
169
|
+
* @param control
|
|
170
|
+
* @param newSelectionRange
|
|
171
|
+
* @param highlight
|
|
172
|
+
*/
|
|
173
|
+
protected _updateSelectionControlByRange(control: SelectionControl, newSelectionRange: IRangeWithCoord, highlight: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
179
174
|
protected _clearUpdatingListeners(): void;
|
|
180
175
|
protected _addEndingListeners(): void;
|
|
181
176
|
protected _getCellRangeByCursorPosition(offsetX: number, offsetY: number, scaleX: number, scaleY: number, scrollXY: {
|
|
@@ -184,6 +179,10 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
184
179
|
}): Nullable<ISelectionWithCoord>;
|
|
185
180
|
protected _checkClearPreviousControls(evt: IPointerEvent | IMouseEvent): void;
|
|
186
181
|
private _performSelectionByTwoCells;
|
|
182
|
+
/**
|
|
183
|
+
* Reset all this.selectionControls by selectionsData.
|
|
184
|
+
* @param selectionsData
|
|
185
|
+
*/
|
|
187
186
|
protected _refreshSelectionControl(selectionsData: readonly ISelectionWithStyle[]): void;
|
|
188
187
|
}
|
|
189
188
|
export declare function getAllSelection(skeleton: SpreadsheetSkeleton): ISelectionWithStyle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
2
|
-
|
|
3
2
|
export declare const RANGE_MOVE_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, null>;
|
|
4
3
|
export declare const RANGE_FILL_PERMISSION_CHECK: import('@univerjs/core').IInterceptor<boolean, {
|
|
5
4
|
x: number;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Workbook, ICommandService, IContextService, ILogService, Injector, RANGE_TYPE, ThemeService } from '@univerjs/core';
|
|
2
|
-
import { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewport
|
|
2
|
+
import { IMouseEvent, IPointerEvent, IRenderContext, IRenderModule, Scene, Viewport } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
5
|
import { SheetScrollManagerService } from '../scroll-manager.service';
|
|
6
6
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
7
7
|
import { BaseSelectionRenderService } from './base-selection-render.service';
|
|
8
8
|
import { MobileSelectionControl } from './mobile-selection-shape';
|
|
9
|
-
|
|
10
9
|
declare enum ExpandingControl {
|
|
11
10
|
BOTTOM_RIGHT = "bottom-right",
|
|
12
11
|
TOP_LEFT = "top-left",
|
|
@@ -20,14 +19,13 @@ export declare class MobileSheetsSelectionRenderService extends BaseSelectionRen
|
|
|
20
19
|
private readonly _logService;
|
|
21
20
|
private readonly _commandService;
|
|
22
21
|
private readonly _contextService;
|
|
23
|
-
private readonly _sheetSkeletonManagerService;
|
|
24
22
|
private readonly _scrollManagerService;
|
|
25
23
|
private readonly _workbookSelections;
|
|
26
24
|
private _renderDisposable;
|
|
27
25
|
_expandingSelection: boolean;
|
|
28
26
|
protected _selectionControls: MobileSelectionControl[];
|
|
29
27
|
expandingControlMode: ExpandingControl;
|
|
30
|
-
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService,
|
|
28
|
+
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, selectionManagerService: SheetsSelectionsService, sheetSkeletonManagerService: SheetSkeletonManagerService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService, _scrollManagerService: SheetScrollManagerService);
|
|
31
29
|
private _init;
|
|
32
30
|
private _initSkeletonChangeListener;
|
|
33
31
|
private _initSelectionChangeListener;
|
|
@@ -66,7 +64,7 @@ export declare class MobileSheetsSelectionRenderService extends BaseSelectionRen
|
|
|
66
64
|
*
|
|
67
65
|
* In Mobile version, new selection is determined by cursor cell and current of activeSelectionControl.model
|
|
68
66
|
*/
|
|
69
|
-
protected
|
|
67
|
+
protected _movingHandler(offsetX: number, offsetY: number, activeSelectionControl: MobileSelectionControl, rangeType: RANGE_TYPE): false | undefined;
|
|
70
68
|
private _updateControlPointWhenScrolling;
|
|
71
69
|
}
|
|
72
70
|
export {};
|
|
@@ -2,7 +2,6 @@ import { IRangeWithCoord, Nullable, ThemeService, RANGE_TYPE } from '@univerjs/c
|
|
|
2
2
|
import { IRectProps, Scene, Rect } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionStyle } from '@univerjs/sheets';
|
|
4
4
|
import { SelectionControl } from './selection-shape';
|
|
5
|
-
|
|
6
5
|
export declare class MobileSelectionControl extends SelectionControl {
|
|
7
6
|
protected _scene: Scene;
|
|
8
7
|
protected _zIndex: number;
|
|
@@ -35,7 +34,7 @@ export declare class MobileSelectionControl extends SelectionControl {
|
|
|
35
34
|
set rangeType(value: RANGE_TYPE);
|
|
36
35
|
dispose(): void;
|
|
37
36
|
updateRange(range: IRangeWithCoord): void;
|
|
38
|
-
protected
|
|
37
|
+
protected _updateControlStyleAndLayout(style: Nullable<ISelectionStyle>, rowHeaderWidth: number, columnHeaderHeight: number): void;
|
|
39
38
|
getViewportMainScrollInfo(): {
|
|
40
39
|
viewportScrollX: number;
|
|
41
40
|
viewportScrollY: number;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IRangeWithCoord, ISelectionCellWithMergeInfo, ISelectionWithCoord, Nullable, RANGE_TYPE } from '@univerjs/core';
|
|
2
|
-
|
|
3
2
|
export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
4
3
|
private _startColumn;
|
|
5
4
|
private _startRow;
|
|
@@ -10,9 +9,7 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
|
10
9
|
private _endX;
|
|
11
10
|
private _endY;
|
|
12
11
|
/**
|
|
13
|
-
* highlight cell of selection
|
|
14
|
-
* when there is no merge info
|
|
15
|
-
* top left cell of current selection (or bottomLeft of current selection)
|
|
12
|
+
* The highlight cell of a selection. aka: current cell
|
|
16
13
|
*/
|
|
17
14
|
private _primary;
|
|
18
15
|
private _rangeType;
|
|
@@ -41,6 +38,12 @@ export declare class SelectionRenderModel implements IRangeWithCoord {
|
|
|
41
38
|
setRangeType(rangeType: RANGE_TYPE): void;
|
|
42
39
|
getValue(): ISelectionWithCoord;
|
|
43
40
|
setValue(newSelectionRange: IRangeWithCoord, currentCell: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
41
|
+
/**
|
|
42
|
+
* Set primary cell.
|
|
43
|
+
*
|
|
44
|
+
* TODO @lumixraku there are 3 concepts for same thing, primary and current and highlight, primary is better cuz selectionModel is using primary.
|
|
45
|
+
* @param currentCell
|
|
46
|
+
*/
|
|
44
47
|
setCurrentCell(currentCell: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
45
48
|
clearCurrentCell(): void;
|
|
46
49
|
}
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
import { Workbook, ICommandService, IContextService, ILogService, Injector, ThemeService } from '@univerjs/core';
|
|
2
|
-
import { IRenderContext, IRenderModule
|
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
4
|
import { IShortcutService } from '@univerjs/ui';
|
|
5
5
|
import { SheetSkeletonManagerService } from '../sheet-skeleton-manager.service';
|
|
6
6
|
import { BaseSelectionRenderService } from './base-selection-render.service';
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* This services controls rendering of normal selections in a render unit.
|
|
10
9
|
* The normal selections would also be used by Auto Fill and Copy features.
|
|
11
10
|
*/
|
|
12
11
|
export declare class SheetSelectionRenderService extends BaseSelectionRenderService implements IRenderModule {
|
|
13
12
|
private readonly _context;
|
|
14
|
-
private readonly _selectionManagerService;
|
|
15
13
|
private readonly _logService;
|
|
16
14
|
private readonly _commandService;
|
|
17
15
|
private readonly _contextService;
|
|
18
|
-
private readonly _sheetSkeletonManagerService;
|
|
19
16
|
private readonly _workbookSelections;
|
|
20
17
|
private _renderDisposable;
|
|
21
|
-
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService,
|
|
18
|
+
constructor(_context: IRenderContext<Workbook>, injector: Injector, themeService: ThemeService, shortcutService: IShortcutService, selectionManagerService: SheetsSelectionsService, sheetSkeletonManagerService: SheetSkeletonManagerService, _logService: ILogService, _commandService: ICommandService, _contextService: IContextService);
|
|
22
19
|
private _init;
|
|
23
20
|
private _initEventListeners;
|
|
24
21
|
private _initThemeChangeListener;
|
|
@@ -26,8 +23,7 @@ export declare class SheetSelectionRenderService extends BaseSelectionRenderServ
|
|
|
26
23
|
private _initSelectionChangeListener;
|
|
27
24
|
private _initUserActionSyncListener;
|
|
28
25
|
/**
|
|
29
|
-
*
|
|
30
|
-
* selectionMoveEnd$ ---> _updateSelections --> selectionOperation@selectionManagerService.setSelections
|
|
26
|
+
* Update selectionData to current sheet.
|
|
31
27
|
* @param selectionDataWithStyleList
|
|
32
28
|
* @param type
|
|
33
29
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Injector, IRangeWithCoord, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { Scene, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
3
|
import { SelectionControl } from './selection-shape';
|
|
4
|
-
|
|
5
4
|
export interface ISelectionShapeTargetSelection {
|
|
6
5
|
originControl: SelectionControl;
|
|
7
6
|
targetSelection: IRangeWithCoord;
|
|
@@ -42,15 +41,25 @@ export declare class SelectionShapeExtension {
|
|
|
42
41
|
private _clearObserverEvent;
|
|
43
42
|
private _initialControl;
|
|
44
43
|
private _controlMoving;
|
|
44
|
+
/**
|
|
45
|
+
* Drag move whole selectionControl when cusor turns to crosshair. Not for dragging 8 control points.
|
|
46
|
+
* @param evt
|
|
47
|
+
*/
|
|
45
48
|
private _controlEvent;
|
|
46
49
|
private _initialWidget;
|
|
47
|
-
private _widgetMoving;
|
|
48
50
|
/**
|
|
49
|
-
* Events for 8 control point
|
|
51
|
+
* Pointer down Events for 8 control point.
|
|
50
52
|
* @param evt
|
|
51
53
|
* @param cursor
|
|
52
54
|
*/
|
|
53
|
-
private
|
|
55
|
+
private _widgetPointerDownEvent;
|
|
56
|
+
/**
|
|
57
|
+
* Pointer move Events for 8 control point.
|
|
58
|
+
* @param moveOffsetX
|
|
59
|
+
* @param moveOffsetY
|
|
60
|
+
* @param cursor
|
|
61
|
+
*/
|
|
62
|
+
private _widgetMoving;
|
|
54
63
|
private _initialFill;
|
|
55
64
|
private _fillMoving;
|
|
56
65
|
private _fillEvent;
|
|
@@ -3,7 +3,6 @@ import { IRectProps, Scene, Group, Rect } from '@univerjs/engine-render';
|
|
|
3
3
|
import { ISelectionStyle, ISelectionWidgetConfig, ISelectionWithCoordAndStyle } from '@univerjs/sheets';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { SelectionRenderModel } from './selection-render-model';
|
|
6
|
-
|
|
7
6
|
export declare enum SELECTION_MANAGER_KEY {
|
|
8
7
|
Selection = "__SpreadsheetSelectionShape__",
|
|
9
8
|
top = "__SpreadsheetSelectionTopControl__",
|
|
@@ -39,7 +38,7 @@ export declare enum SELECTION_MANAGER_KEY {
|
|
|
39
38
|
bottomRightWidget = "__SpreadSheetSelectionBottomRightWidget__"
|
|
40
39
|
}
|
|
41
40
|
/**
|
|
42
|
-
* The main selection canvas component
|
|
41
|
+
* The main selection canvas component, includes leftControl,rightControl,topControl,bottomControl,backgroundControlTop,backgroundControlMiddleLeft,backgroundControlMiddleRight,backgroundControlBottom,fillControl
|
|
43
42
|
*/
|
|
44
43
|
export declare class SelectionControl extends Disposable {
|
|
45
44
|
protected _scene: Scene;
|
|
@@ -74,12 +73,17 @@ export declare class SelectionControl extends Disposable {
|
|
|
74
73
|
private _bottomRightWidget;
|
|
75
74
|
private _dashRect;
|
|
76
75
|
protected _selectionModel: SelectionRenderModel;
|
|
77
|
-
|
|
76
|
+
private _defaultStyle;
|
|
77
|
+
private _currentStyle;
|
|
78
78
|
protected _rowHeaderWidth: number;
|
|
79
79
|
protected _columnHeaderHeight: number;
|
|
80
80
|
protected _widgetRects: Rect[];
|
|
81
81
|
private _dispose$;
|
|
82
82
|
readonly dispose$: import('rxjs').Observable<SelectionControl>;
|
|
83
|
+
/**
|
|
84
|
+
* eventSource: selectionShapeExtension selectionMoving$.next,
|
|
85
|
+
* Observer: prompt.controller
|
|
86
|
+
*/
|
|
83
87
|
readonly selectionMoving$: Subject<IRangeWithCoord>;
|
|
84
88
|
readonly selectionMoved$: Subject<IRangeWithCoord>;
|
|
85
89
|
readonly selectionScaling$: Subject<IRangeWithCoord>;
|
|
@@ -87,8 +91,6 @@ export declare class SelectionControl extends Disposable {
|
|
|
87
91
|
readonly selectionFilling$: Subject<Nullable<IRangeWithCoord>>;
|
|
88
92
|
private readonly _selectionFilled$;
|
|
89
93
|
readonly selectionFilled$: import('rxjs').Observable<Nullable<IRangeWithCoord>>;
|
|
90
|
-
private _defaultStyle;
|
|
91
|
-
private _currentStyle;
|
|
92
94
|
private _isHelperSelection;
|
|
93
95
|
constructor(_scene: Scene, _zIndex: number, _isHeaderHighlight: boolean, _themeService: ThemeService);
|
|
94
96
|
get zIndex(): number;
|
|
@@ -115,8 +117,6 @@ export declare class SelectionControl extends Disposable {
|
|
|
115
117
|
get bottomCenterWidget(): Rect<IRectProps>;
|
|
116
118
|
get bottomRightWidget(): Rect<IRectProps>;
|
|
117
119
|
get themeService(): ThemeService;
|
|
118
|
-
get selectionStyle(): Nullable<ISelectionStyle>;
|
|
119
|
-
set selectionStyle(style: Nullable<ISelectionStyle>);
|
|
120
120
|
get selectionModel(): SelectionRenderModel;
|
|
121
121
|
set selectionModel(model: SelectionRenderModel);
|
|
122
122
|
get defaultStyle(): ISelectionStyle;
|
|
@@ -131,18 +131,27 @@ export declare class SelectionControl extends Disposable {
|
|
|
131
131
|
set columnHeaderHeight(height: number);
|
|
132
132
|
setEvent(state: boolean): void;
|
|
133
133
|
refreshSelectionFilled(val: IRangeWithCoord): void;
|
|
134
|
+
/**
|
|
135
|
+
* invoked when update selection style & range change, invoked by updateStyle, updateRange, update
|
|
136
|
+
*/
|
|
137
|
+
protected _updateControlStyleAndLayout(selectionStyle: Nullable<ISelectionStyle>, rowHeaderWidth: number, columnHeaderHeight: number): void;
|
|
134
138
|
updateStyle(style: ISelectionStyle): void;
|
|
135
|
-
updateRange(range: IRangeWithCoord): void;
|
|
139
|
+
updateRange(range: IRangeWithCoord, primaryCell: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
136
140
|
/**
|
|
137
|
-
* update
|
|
138
|
-
*
|
|
141
|
+
* update selection model with new range & primary cell(aka: highlight/current), also update row/col selection size & style.
|
|
142
|
+
*
|
|
143
|
+
* @param newSelectionRange
|
|
139
144
|
* @param rowHeaderWidth
|
|
140
145
|
* @param columnHeaderHeight
|
|
141
146
|
* @param style
|
|
142
|
-
* @param
|
|
147
|
+
* @param primaryCell primary cell
|
|
148
|
+
*/
|
|
149
|
+
update(newSelectionRange: IRangeWithCoord, rowHeaderWidth?: number, columnHeaderHeight?: number, style?: Nullable<ISelectionStyle>, primaryCell?: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
150
|
+
/**
|
|
151
|
+
* update primary range
|
|
152
|
+
* @param primaryCell model.current (aka: highlight)
|
|
143
153
|
*/
|
|
144
|
-
|
|
145
|
-
updateCurrCell(highlight?: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
154
|
+
updateCurrCell(primaryCell?: Nullable<ISelectionCellWithMergeInfo>): void;
|
|
146
155
|
clearHighlight(): void;
|
|
147
156
|
getScene(): Scene;
|
|
148
157
|
dispose(): void;
|
|
@@ -154,11 +163,6 @@ export declare class SelectionControl extends Disposable {
|
|
|
154
163
|
getRange(): IRangeWithCoord;
|
|
155
164
|
enableHelperSelection(): void;
|
|
156
165
|
disableHelperSelection(): void;
|
|
157
|
-
updateStyleId(id: string): void;
|
|
158
|
-
/**
|
|
159
|
-
* invoked when update selection style & range change
|
|
160
|
-
*/
|
|
161
|
-
protected _updateControl(style: Nullable<ISelectionStyle>, rowHeaderWidth: number, columnHeaderHeight: number): void;
|
|
162
166
|
private _initialize;
|
|
163
167
|
private _initialTitle;
|
|
164
168
|
private _initialWidget;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ISelectionCell, ISelectionCellWithMergeInfo } from '@univerjs/core';
|
|
2
2
|
import { SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
3
|
import { ISelectionWithCoordAndStyle, ISelectionWithStyle } from '@univerjs/sheets';
|
|
4
|
-
|
|
5
4
|
export declare function attachSelectionWithCoord(selection: ISelectionWithStyle, skeleton: SpreadsheetSkeleton): ISelectionWithCoordAndStyle;
|
|
6
5
|
export declare function attachPrimaryWithCoord(primary: ISelectionCell, skeleton: SpreadsheetSkeleton): ISelectionCellWithMergeInfo;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IRange, IRangeWithCoord, Nullable, Workbook, Disposable, Injector } from '@univerjs/core';
|
|
2
2
|
import { IRenderContext, IRenderModule, SpreadsheetSkeleton } from '@univerjs/engine-render';
|
|
3
|
-
|
|
4
3
|
export interface ISheetSkeletonManagerParam {
|
|
5
4
|
unitId?: string;
|
|
6
5
|
sheetId: string;
|