@univerjs/sheets-ui 1.0.0-alpha.2 → 1.0.0-alpha.4
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/facade.js +47 -37
- package/lib/cjs/index.js +8906 -7574
- package/lib/cjs/locale/ar-SA.js +9 -1
- package/lib/cjs/locale/ca-ES.js +9 -1
- package/lib/cjs/locale/de-DE.js +9 -1
- package/lib/cjs/locale/en-US.js +9 -1
- package/lib/cjs/locale/es-ES.js +10 -2
- package/lib/cjs/locale/fa-IR.js +9 -1
- package/lib/cjs/locale/fr-FR.js +9 -1
- package/lib/cjs/locale/id-ID.js +9 -1
- package/lib/cjs/locale/it-IT.js +9 -1
- package/lib/cjs/locale/ja-JP.js +9 -1
- package/lib/cjs/locale/ko-KR.js +9 -1
- package/lib/cjs/locale/pl-PL.js +9 -1
- package/lib/cjs/locale/pt-BR.js +9 -1
- package/lib/cjs/locale/ru-RU.js +9 -1
- package/lib/cjs/locale/sk-SK.js +9 -1
- package/lib/cjs/locale/vi-VN.js +9 -1
- package/lib/cjs/locale/zh-CN.js +9 -1
- package/lib/cjs/locale/zh-HK.js +9 -1
- package/lib/cjs/locale/zh-TW.js +9 -1
- package/lib/es/facade.js +47 -37
- package/lib/es/index.js +8894 -7559
- package/lib/es/locale/ar-SA.js +9 -1
- package/lib/es/locale/ca-ES.js +9 -1
- package/lib/es/locale/de-DE.js +9 -1
- package/lib/es/locale/en-US.js +9 -1
- package/lib/es/locale/es-ES.js +10 -2
- package/lib/es/locale/fa-IR.js +9 -1
- package/lib/es/locale/fr-FR.js +9 -1
- package/lib/es/locale/id-ID.js +9 -1
- package/lib/es/locale/it-IT.js +9 -1
- package/lib/es/locale/ja-JP.js +9 -1
- package/lib/es/locale/ko-KR.js +9 -1
- package/lib/es/locale/pl-PL.js +9 -1
- package/lib/es/locale/pt-BR.js +9 -1
- package/lib/es/locale/ru-RU.js +9 -1
- package/lib/es/locale/sk-SK.js +9 -1
- package/lib/es/locale/vi-VN.js +9 -1
- package/lib/es/locale/zh-CN.js +9 -1
- package/lib/es/locale/zh-HK.js +9 -1
- package/lib/es/locale/zh-TW.js +9 -1
- package/lib/facade.js +47 -37
- package/lib/index.css +49 -0
- package/lib/index.js +8894 -7559
- package/lib/locale/ar-SA.js +9 -1
- package/lib/locale/ca-ES.js +9 -1
- package/lib/locale/de-DE.js +9 -1
- package/lib/locale/en-US.js +9 -1
- package/lib/locale/es-ES.js +10 -2
- package/lib/locale/fa-IR.js +9 -1
- package/lib/locale/fr-FR.js +9 -1
- package/lib/locale/id-ID.js +9 -1
- package/lib/locale/it-IT.js +9 -1
- package/lib/locale/ja-JP.js +9 -1
- package/lib/locale/ko-KR.js +9 -1
- package/lib/locale/pl-PL.js +9 -1
- package/lib/locale/pt-BR.js +9 -1
- package/lib/locale/ru-RU.js +9 -1
- package/lib/locale/sk-SK.js +9 -1
- package/lib/locale/vi-VN.js +9 -1
- package/lib/locale/zh-CN.js +9 -1
- package/lib/locale/zh-HK.js +9 -1
- package/lib/locale/zh-TW.js +9 -1
- package/lib/types/commands/commands/set-scroll.command.d.ts +3 -0
- package/lib/types/{controllers/cell-alert.controller.d.ts → commands/commands/set-zoom-ratio-from-toolbar.command.d.ts} +4 -8
- package/lib/types/controllers/editor/editing.render-controller.d.ts +1 -0
- package/lib/types/controllers/editor/formula-editor.controller.d.ts +1 -0
- package/lib/types/controllers/permission/sheet-permission-render.controller.d.ts +1 -9
- package/lib/types/controllers/render-controllers/contextmenu.render-controller.d.ts +7 -2
- package/lib/types/controllers/render-controllers/editor-bridge.render-controller.d.ts +7 -1
- package/lib/types/controllers/render-controllers/header-unhide.render-controller.d.ts +0 -1
- package/lib/types/embed-tab-anchor.d.ts +23 -0
- package/lib/types/facade/f-univer.d.ts +1 -0
- package/lib/types/index.d.ts +17 -3
- package/lib/types/locale/en-US.d.ts +9 -1
- package/lib/types/menu/frozen.menu.d.ts +2 -0
- package/lib/types/menu/fullscreen.menu.d.ts +19 -0
- package/lib/types/menu/menu.d.ts +1 -0
- package/lib/types/menu/text-to-number.menu.d.ts +0 -2
- package/lib/types/menu/zoom.menu.d.ts +20 -0
- package/lib/types/services/canvas-pop-manager.service.d.ts +9 -0
- package/lib/types/services/cell-dropdown-manager.service.d.ts +1 -3
- package/lib/types/services/cell-popup-manager.service.d.ts +1 -0
- package/lib/types/services/editor/cell-editor-resize.service.d.ts +4 -1
- package/lib/types/services/editor-bridge.service.d.ts +2 -0
- package/lib/types/services/print-interceptor.service.d.ts +8 -0
- package/lib/types/services/selection/base-selection-render.service.d.ts +1 -0
- package/lib/types/services/sheet-embed-integration.service.d.ts +126 -0
- package/lib/types/services/sheet-embed-runtime.service.d.ts +26 -0
- package/lib/types/services/sheet-host-chrome-override.service.d.ts +25 -0
- package/lib/types/services/sheet-loading-render.service.d.ts +65 -0
- package/lib/types/services/sheet-skeleton-manager.service.d.ts +2 -0
- package/lib/types/views/CellPopup.d.ts +2 -2
- package/lib/types/views/border-panel/interface.d.ts +63 -2
- package/lib/types/views/defined-name/DefinedNameInput.d.ts +1 -1
- package/lib/types/views/dropdown/CascaderDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/ColorDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/DateDropdown.d.ts +2 -2
- package/lib/types/views/dropdown/ListDropDown.d.ts +2 -2
- package/lib/types/views/editor-container/EditorContainer.d.ts +7 -5
- package/lib/types/{menu/mobile-menu.d.ts → views/editor-container/EditorContainer.spec.d.ts} +1 -1
- package/lib/types/views/editor-container/focus-editor.d.ts +25 -0
- package/lib/types/views/hook.d.ts +4 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/SheetBarItem.d.ts +2 -1
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/sheet-tab-drag-sort.d.ts +1 -0
- package/lib/types/views/sheet-bar/sheet-bar-tabs/utils/slide-tab-bar.d.ts +2 -1
- package/lib/types/views/sheet-slider/SheetZoomInput.d.ts +18 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +12 -12
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +16 -16
|
@@ -129,6 +129,7 @@ export declare class BaseSelectionRenderService extends Disposable implements IS
|
|
|
129
129
|
}>;
|
|
130
130
|
protected _escapeShortcutDisposable: Nullable<IDisposable>;
|
|
131
131
|
constructor(_injector: Injector, _themeService: ThemeService, _shortcutService: IShortcutService, _sheetSkeletonManagerService: SheetSkeletonManagerService, contextService: IContextService);
|
|
132
|
+
dispose(): void;
|
|
132
133
|
/**
|
|
133
134
|
* If true, the selector will respond to the range of merged cells and automatically extend the selected range. If false, it will ignore the merged cells.
|
|
134
135
|
*/
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IDisposable, UniverInstanceType } from '@univerjs/core';
|
|
17
|
+
import type { Observable } from 'rxjs';
|
|
18
|
+
import { Subject } from 'rxjs';
|
|
19
|
+
export declare const SHEET_EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
20
|
+
export declare const SHEET_EMBED_RUNTIME_FOCUS_ROLE_ATTRIBUTE = "data-embed-runtime-focus-role";
|
|
21
|
+
export declare const EMBED_INTERACTION_BOUNDARY_OWNER_ATTRIBUTE = "data-embed-interaction-boundary-owner";
|
|
22
|
+
export declare const EMBED_RUNTIME_FOCUS_ROLE_ATTRIBUTE = "data-embed-runtime-focus-role";
|
|
23
|
+
export declare const SHEET_EMBED_FLOAT_DOM_ATTRIBUTE = "data-embed-float-dom";
|
|
24
|
+
export declare const SHEET_EMBED_ID_ATTRIBUTE = "data-embed-id";
|
|
25
|
+
export declare const SHEET_EMBED_HOST_UNIT_ID_ATTRIBUTE = "data-embed-host-unit-id";
|
|
26
|
+
export declare const SHEET_EMBED_CHILD_UNIT_ID_ATTRIBUTE = "data-embed-child-unit-id";
|
|
27
|
+
export declare const SHEET_EMBED_CHILD_TYPE_ATTRIBUTE = "data-embed-child-type";
|
|
28
|
+
export interface ISheetEmbedRuntimeDomScope {
|
|
29
|
+
embedId: string;
|
|
30
|
+
hostUnitId?: string;
|
|
31
|
+
childUnitId?: string;
|
|
32
|
+
childType?: UniverInstanceType;
|
|
33
|
+
}
|
|
34
|
+
export interface ISheetEmbedInteractionBoundaryService {
|
|
35
|
+
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
36
|
+
}
|
|
37
|
+
export declare const ISheetEmbedInteractionBoundaryService: import("@wendellhu/redi").IdentifierDecorator<ISheetEmbedInteractionBoundaryService>;
|
|
38
|
+
export interface ISheetEmbedRuntimeFocusCoordinator {
|
|
39
|
+
readonly runtimeSessionChanged$: Observable<void>;
|
|
40
|
+
acquireLease(options: {
|
|
41
|
+
embedId: string;
|
|
42
|
+
role: string;
|
|
43
|
+
owner?: string;
|
|
44
|
+
hostUnitId?: string;
|
|
45
|
+
childUnitId?: string;
|
|
46
|
+
childType?: UniverInstanceType;
|
|
47
|
+
associatedChildUnitIds?: string[];
|
|
48
|
+
}): IDisposable;
|
|
49
|
+
registerElement(options: {
|
|
50
|
+
embedId: string;
|
|
51
|
+
role: string;
|
|
52
|
+
element: HTMLElement;
|
|
53
|
+
}): IDisposable;
|
|
54
|
+
resolveRuntimeScopeByChildUnitId(childUnitId: string | undefined): ISheetEmbedRuntimeDomScope | undefined;
|
|
55
|
+
resolveActiveChildSessionRuntimeScope(): ISheetEmbedRuntimeDomScope | undefined;
|
|
56
|
+
isChildUnitInActiveSession(unitId: string | undefined): boolean;
|
|
57
|
+
isChildUnitRuntimeEvent(unitId: string | undefined, target: EventTarget | null | undefined, event?: Event): boolean;
|
|
58
|
+
}
|
|
59
|
+
export declare const ISheetEmbedRuntimeFocusCoordinator: import("@wendellhu/redi").IdentifierDecorator<ISheetEmbedRuntimeFocusCoordinator>;
|
|
60
|
+
export interface ISheetEmbedFloatingGeometryService {
|
|
61
|
+
readonly geometryInvalidated$: Observable<unknown>;
|
|
62
|
+
getRegistrationByChildUnitId(childUnitId: string): {
|
|
63
|
+
root: HTMLElement;
|
|
64
|
+
viewport?: HTMLElement | null;
|
|
65
|
+
contentRoot?: HTMLElement | null;
|
|
66
|
+
} | undefined;
|
|
67
|
+
}
|
|
68
|
+
export declare const ISheetEmbedFloatingGeometryService: import("@wendellhu/redi").IdentifierDecorator<ISheetEmbedFloatingGeometryService>;
|
|
69
|
+
export declare class EmbedInteractionBoundaryService implements ISheetEmbedInteractionBoundaryService {
|
|
70
|
+
private readonly _roots;
|
|
71
|
+
registerOwnedElement(embedId: string, element: HTMLElement): IDisposable;
|
|
72
|
+
contains(embedId: string | undefined, target: EventTarget | null | undefined): boolean;
|
|
73
|
+
private _mark;
|
|
74
|
+
}
|
|
75
|
+
export declare class EmbedRuntimeFocusCoordinator implements ISheetEmbedRuntimeFocusCoordinator {
|
|
76
|
+
private readonly _leases;
|
|
77
|
+
private readonly _elements;
|
|
78
|
+
readonly runtimeSessionChanged$: Subject<void>;
|
|
79
|
+
acquireLease(options: {
|
|
80
|
+
embedId: string;
|
|
81
|
+
role: string;
|
|
82
|
+
owner?: string;
|
|
83
|
+
childUnitId?: string;
|
|
84
|
+
hostUnitId?: string;
|
|
85
|
+
childType?: UniverInstanceType;
|
|
86
|
+
associatedChildUnitIds?: string[];
|
|
87
|
+
}): IDisposable;
|
|
88
|
+
registerElement(options: {
|
|
89
|
+
embedId: string;
|
|
90
|
+
role: string;
|
|
91
|
+
element: HTMLElement;
|
|
92
|
+
}): IDisposable;
|
|
93
|
+
containsElement(embedId: string, element: HTMLElement | null | undefined): boolean;
|
|
94
|
+
registerRuntimeScope(options: {
|
|
95
|
+
embedId: string;
|
|
96
|
+
hostUnitId?: string;
|
|
97
|
+
childUnitId?: string;
|
|
98
|
+
childType?: UniverInstanceType;
|
|
99
|
+
}): IDisposable;
|
|
100
|
+
hasChildInteractionLease(embedId: string | undefined): boolean;
|
|
101
|
+
hasHostPreservingChildFocusLeaseForHost(hostUnitId: string | undefined): boolean;
|
|
102
|
+
resolveRuntimeScopeByChildUnitId(childUnitId: string | undefined): ISheetEmbedRuntimeDomScope | undefined;
|
|
103
|
+
resolveActiveChildSessionRuntimeScope(): ISheetEmbedRuntimeDomScope | undefined;
|
|
104
|
+
isChildUnitInActiveSession(unitId: string | undefined): boolean;
|
|
105
|
+
isChildUnitRuntimeEvent(unitId: string | undefined, target: EventTarget | null | undefined): boolean;
|
|
106
|
+
}
|
|
107
|
+
export declare class EmbedFloatingGeometryService implements ISheetEmbedFloatingGeometryService {
|
|
108
|
+
private readonly _registrations;
|
|
109
|
+
private readonly _geometryInvalidated$;
|
|
110
|
+
readonly geometryInvalidated$: Observable<unknown>;
|
|
111
|
+
register(registration: {
|
|
112
|
+
embedId: string;
|
|
113
|
+
childUnitId?: string;
|
|
114
|
+
root: HTMLElement;
|
|
115
|
+
viewport?: HTMLElement | null;
|
|
116
|
+
contentRoot?: HTMLElement | null;
|
|
117
|
+
}): IDisposable;
|
|
118
|
+
getRegistrationByChildUnitId(childUnitId: string): {
|
|
119
|
+
childUnitId?: string;
|
|
120
|
+
root: HTMLElement;
|
|
121
|
+
viewport?: HTMLElement | null;
|
|
122
|
+
contentRoot?: HTMLElement | null;
|
|
123
|
+
} | undefined;
|
|
124
|
+
}
|
|
125
|
+
export declare function resolveSheetEmbedRuntimeDomScope(element: HTMLElement | null | undefined): ISheetEmbedRuntimeDomScope | undefined;
|
|
126
|
+
export declare function resolveActiveSheetEmbedRuntimeDomScope(ownerDocument?: Document): ISheetEmbedRuntimeDomScope | undefined;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IDisposable } from '@univerjs/core';
|
|
17
|
+
export interface ISheetEmbedTabMountParams {
|
|
18
|
+
hostUnitId: string;
|
|
19
|
+
hostAnchorId: string;
|
|
20
|
+
embedId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ISheetEmbedRuntimeService {
|
|
23
|
+
mountSheetTab(params: ISheetEmbedTabMountParams): IDisposable | undefined;
|
|
24
|
+
clearTab(embedId?: string): void;
|
|
25
|
+
}
|
|
26
|
+
export declare const ISheetEmbedRuntimeService: import("@wendellhu/redi").IdentifierDecorator<ISheetEmbedRuntimeService>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { Observable } from 'rxjs';
|
|
17
|
+
export interface ISheetHostChromeOverride {
|
|
18
|
+
entry?: string;
|
|
19
|
+
hostUnitId?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ISheetHostChromeOverrideService {
|
|
22
|
+
readonly override$: Observable<ISheetHostChromeOverride | null>;
|
|
23
|
+
getOverride?(): ISheetHostChromeOverride | null;
|
|
24
|
+
}
|
|
25
|
+
export declare const ISheetHostChromeOverrideService: import("@wendellhu/redi").IdentifierDecorator<ISheetHostChromeOverrideService>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { ICellData, IObjectMatrixPrimitiveType, IWorkbookData } from '@univerjs/core';
|
|
17
|
+
import { Disposable, Injector, Workbook } from '@univerjs/core';
|
|
18
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
19
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
20
|
+
import { ILayoutService } from '@univerjs/ui';
|
|
21
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
22
|
+
export interface ISheetLoadingRenderService {
|
|
23
|
+
readonly workbook$: Observable<Workbook | null>;
|
|
24
|
+
readonly loading$: Observable<boolean>;
|
|
25
|
+
readonly previewReady$: Observable<boolean>;
|
|
26
|
+
showSkeleton(workbookData: IWorkbookData, activeSheetId: string): void;
|
|
27
|
+
show(workbookData: IWorkbookData, activeSheetId: string, cellData?: IObjectMatrixPrimitiveType<ICellData>): void;
|
|
28
|
+
handoff(sourceUnitId: string, timeoutMs: number): Promise<boolean>;
|
|
29
|
+
hide(sourceUnitId: string): void;
|
|
30
|
+
}
|
|
31
|
+
export declare const ISheetLoadingRenderService: import("@wendellhu/redi").IdentifierDecorator<ISheetLoadingRenderService>;
|
|
32
|
+
/**
|
|
33
|
+
* Renders a read-only workbook shell without registering it in IUniverInstanceService.
|
|
34
|
+
* The temporary workbook is therefore invisible to formulas, RPC and collaboration.
|
|
35
|
+
*/
|
|
36
|
+
export declare class SheetLoadingRenderService extends Disposable implements ISheetLoadingRenderService {
|
|
37
|
+
private readonly _injector;
|
|
38
|
+
private readonly _layoutService;
|
|
39
|
+
private readonly _sheetInterceptorService;
|
|
40
|
+
private readonly _renderManagerService;
|
|
41
|
+
readonly workbook$: BehaviorSubject<Workbook | null>;
|
|
42
|
+
readonly loading$: BehaviorSubject<boolean>;
|
|
43
|
+
readonly previewReady$: BehaviorSubject<boolean>;
|
|
44
|
+
private _loadingRender;
|
|
45
|
+
private _finalCanvasGuard;
|
|
46
|
+
private _hiddenFinalCanvas;
|
|
47
|
+
private _finalCanvasVisibility;
|
|
48
|
+
constructor(_injector: Injector, _layoutService: ILayoutService, _sheetInterceptorService: SheetInterceptorService, _renderManagerService: IRenderManagerService);
|
|
49
|
+
showSkeleton(workbookData: IWorkbookData, activeSheetId: string): void;
|
|
50
|
+
show(workbookData: IWorkbookData, activeSheetId: string, cellData?: IObjectMatrixPrimitiveType<ICellData>): void;
|
|
51
|
+
handoff(sourceUnitId: string, timeoutMs: number): Promise<boolean>;
|
|
52
|
+
hide(sourceUnitId: string): void;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
private _createLoadingWorkbook;
|
|
55
|
+
private _createLoadingRender;
|
|
56
|
+
private _waitForFinalCanvas;
|
|
57
|
+
private _getFinalRender$;
|
|
58
|
+
private _guardFinalCanvas;
|
|
59
|
+
private _requestFinalRender;
|
|
60
|
+
private _hideFinalCanvas;
|
|
61
|
+
private _restoreFinalCanvas;
|
|
62
|
+
private _waitForNextAnimationFrame;
|
|
63
|
+
private _disposeLoadingRender;
|
|
64
|
+
private _disposeRender;
|
|
65
|
+
}
|
|
@@ -69,4 +69,6 @@ export declare class SheetSkeletonManagerService extends Disposable implements I
|
|
|
69
69
|
private _getSkeleton;
|
|
70
70
|
setColumnHeaderSize(render: Nullable<IRender>, sheetId: string, size: number): void;
|
|
71
71
|
setRowHeaderSize(render: Nullable<IRender>, sheetId: string, size: number): void;
|
|
72
|
+
private _resetSelectionsIfAvailable;
|
|
73
|
+
private _tryGetRenderDependency;
|
|
72
74
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ISheetLocationBase } from '@univerjs/sheets';
|
|
17
|
-
import type {
|
|
17
|
+
import type { IPopupWithExtraProps } from '@univerjs/ui';
|
|
18
18
|
export declare const CellPopup: (props: {
|
|
19
|
-
popup:
|
|
19
|
+
popup: IPopupWithExtraProps<ISheetLocationBase & {
|
|
20
20
|
direction: "horizontal" | "vertical";
|
|
21
21
|
}>;
|
|
22
22
|
}) => import("react").JSX.Element;
|
|
@@ -15,11 +15,72 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { IBorderInfo } from '@univerjs/sheets';
|
|
17
17
|
import type { ICustomComponentProps } from '@univerjs/ui';
|
|
18
|
+
import { BorderStyleTypes } from '@univerjs/core';
|
|
18
19
|
export declare const BORDER_PANEL_COMPONENT = "UI_PLUGIN_SHEETS_BORDER_PANEL_COMPONENT";
|
|
19
20
|
export interface IBorderPanelProps extends ICustomComponentProps<IBorderInfo> {
|
|
20
21
|
}
|
|
21
|
-
export declare const BORDER_LINE_CHILDREN: {
|
|
22
|
-
label:
|
|
22
|
+
export declare const BORDER_LINE_CHILDREN: ({
|
|
23
|
+
label: "sheets-ui.borderLine.borderTop";
|
|
23
24
|
icon: string;
|
|
24
25
|
value: string;
|
|
26
|
+
} | {
|
|
27
|
+
label: "sheets-ui.borderLine.borderBottom";
|
|
28
|
+
icon: string;
|
|
29
|
+
value: string;
|
|
30
|
+
} | {
|
|
31
|
+
label: "sheets-ui.borderLine.borderLeft";
|
|
32
|
+
icon: string;
|
|
33
|
+
value: string;
|
|
34
|
+
} | {
|
|
35
|
+
label: "sheets-ui.borderLine.borderRight";
|
|
36
|
+
icon: string;
|
|
37
|
+
value: string;
|
|
38
|
+
} | {
|
|
39
|
+
label: "sheets-ui.borderLine.borderNone";
|
|
40
|
+
icon: string;
|
|
41
|
+
value: string;
|
|
42
|
+
} | {
|
|
43
|
+
label: "sheets-ui.borderLine.borderAll";
|
|
44
|
+
icon: string;
|
|
45
|
+
value: string;
|
|
46
|
+
} | {
|
|
47
|
+
label: "sheets-ui.borderLine.borderOutside";
|
|
48
|
+
icon: string;
|
|
49
|
+
value: string;
|
|
50
|
+
} | {
|
|
51
|
+
label: "sheets-ui.borderLine.borderInside";
|
|
52
|
+
icon: string;
|
|
53
|
+
value: string;
|
|
54
|
+
} | {
|
|
55
|
+
label: "sheets-ui.borderLine.borderHorizontal";
|
|
56
|
+
icon: string;
|
|
57
|
+
value: string;
|
|
58
|
+
} | {
|
|
59
|
+
label: "sheets-ui.borderLine.borderVertical";
|
|
60
|
+
icon: string;
|
|
61
|
+
value: string;
|
|
62
|
+
} | {
|
|
63
|
+
label: "sheets-ui.borderLine.borderTlbr";
|
|
64
|
+
icon: string;
|
|
65
|
+
value: string;
|
|
66
|
+
} | {
|
|
67
|
+
label: "sheets-ui.borderLine.borderTlbcTlmr";
|
|
68
|
+
icon: string;
|
|
69
|
+
value: string;
|
|
70
|
+
} | {
|
|
71
|
+
label: "sheets-ui.borderLine.borderTlbrTlbcTlmr";
|
|
72
|
+
icon: string;
|
|
73
|
+
value: string;
|
|
74
|
+
} | {
|
|
75
|
+
label: "sheets-ui.borderLine.borderBlTr";
|
|
76
|
+
icon: string;
|
|
77
|
+
value: string;
|
|
78
|
+
} | {
|
|
79
|
+
label: "sheets-ui.borderLine.borderMltrBctr";
|
|
80
|
+
icon: string;
|
|
81
|
+
value: string;
|
|
82
|
+
})[];
|
|
83
|
+
export declare const BORDER_SIZE_CHILDREN: {
|
|
84
|
+
label: BorderStyleTypes;
|
|
85
|
+
value: BorderStyleTypes;
|
|
25
86
|
}[];
|
|
@@ -22,4 +22,4 @@ export interface IDefinedNameInputProps extends Omit<IDefinedNamesServiceParam,
|
|
|
22
22
|
cancel?: () => void;
|
|
23
23
|
id?: string;
|
|
24
24
|
}
|
|
25
|
-
export declare const DefinedNameInput: (props: IDefinedNameInputProps) => import("react").JSX.Element |
|
|
25
|
+
export declare const DefinedNameInput: (props: IDefinedNameInputProps) => import("react").JSX.Element | null;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICascaderOption } from '@univerjs/design';
|
|
17
|
-
import type {
|
|
17
|
+
import type { IPopupWithExtraProps } from '@univerjs/ui';
|
|
18
18
|
import type { IBaseDropdownProps } from './type';
|
|
19
19
|
export interface ICascaderDropdownProps {
|
|
20
20
|
options: ICascaderOption[];
|
|
@@ -22,7 +22,7 @@ export interface ICascaderDropdownProps {
|
|
|
22
22
|
onChange: (value: string[]) => void;
|
|
23
23
|
}
|
|
24
24
|
export declare function CascaderDropdown(props: {
|
|
25
|
-
popup:
|
|
25
|
+
popup: IPopupWithExtraProps<ICascaderDropdownProps & IBaseDropdownProps>;
|
|
26
26
|
}): import("react").JSX.Element;
|
|
27
27
|
export declare namespace CascaderDropdown {
|
|
28
28
|
var componentKey: string;
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { IPopupWithExtraProps } from '@univerjs/ui';
|
|
17
17
|
import type { IBaseDropdownProps } from './type';
|
|
18
18
|
export interface IColorDropdownProps {
|
|
19
19
|
defaultValue?: string;
|
|
20
20
|
onChange?: (value: string) => void;
|
|
21
21
|
}
|
|
22
22
|
export declare function ColorDropdown(props: {
|
|
23
|
-
popup:
|
|
23
|
+
popup: IPopupWithExtraProps<IColorDropdownProps & IBaseDropdownProps>;
|
|
24
24
|
}): import("react").JSX.Element;
|
|
25
25
|
export declare namespace ColorDropdown {
|
|
26
26
|
var componentKey: string;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { DateKit } from '@univerjs/core';
|
|
17
|
-
import type {
|
|
17
|
+
import type { IPopupWithExtraProps } from '@univerjs/ui';
|
|
18
18
|
import type { IBaseDropdownProps } from './type';
|
|
19
19
|
export interface IDateDropdownProps {
|
|
20
20
|
defaultValue?: DateKit;
|
|
@@ -23,7 +23,7 @@ export interface IDateDropdownProps {
|
|
|
23
23
|
showTime?: boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare function DateDropdown(props: {
|
|
26
|
-
popup:
|
|
26
|
+
popup: IPopupWithExtraProps<IDateDropdownProps & IBaseDropdownProps>;
|
|
27
27
|
}): import("react").JSX.Element;
|
|
28
28
|
export declare namespace DateDropdown {
|
|
29
29
|
var componentKey: string;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { IPopupWithExtraProps } from '@univerjs/ui';
|
|
17
17
|
import type { IBaseDropdownProps } from './type';
|
|
18
18
|
export interface IListDropdownProps {
|
|
19
19
|
multiple?: boolean;
|
|
@@ -29,7 +29,7 @@ export interface IListDropdownProps {
|
|
|
29
29
|
showSearch?: boolean;
|
|
30
30
|
}
|
|
31
31
|
export declare function ListDropDown(props: {
|
|
32
|
-
popup:
|
|
32
|
+
popup: IPopupWithExtraProps<IListDropdownProps & IBaseDropdownProps>;
|
|
33
33
|
}): import("react").JSX.Element | null;
|
|
34
34
|
export declare namespace ListDropDown {
|
|
35
35
|
var componentKey: string;
|
|
@@ -13,12 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
export declare function shouldRefocusCellEditorAfterPointerDown(options: {
|
|
17
|
+
root: HTMLElement | null | undefined;
|
|
18
|
+
target: EventTarget | null | undefined;
|
|
19
|
+
activeElement: Element | null | undefined;
|
|
20
|
+
isEditorFocusing: boolean | undefined;
|
|
21
|
+
}): boolean;
|
|
19
22
|
/**
|
|
20
23
|
* Cell editor container.
|
|
21
24
|
* @returns the rendered cell editor container.
|
|
22
25
|
*/
|
|
23
|
-
export declare
|
|
24
|
-
export {};
|
|
26
|
+
export declare function EditorContainer(): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IDisposable } from '@univerjs/core';
|
|
17
|
+
import type { ISheetEmbedInteractionBoundaryService, ISheetEmbedRuntimeFocusCoordinator } from '../../services/sheet-embed-integration.service';
|
|
18
|
+
export declare function focusSheetCellEditorElement(ownerDocument?: Document): boolean;
|
|
19
|
+
export declare function registerSheetCellEditorRuntimePortal(options: {
|
|
20
|
+
embedId: string;
|
|
21
|
+
ownerDocument?: Document;
|
|
22
|
+
interactionBoundaryService?: ISheetEmbedInteractionBoundaryService;
|
|
23
|
+
focusCoordinator?: ISheetEmbedRuntimeFocusCoordinator;
|
|
24
|
+
}): IDisposable;
|
|
25
|
+
export declare function resolveSheetCellEditorPortalRoot(ownerDocument?: Document): HTMLElement | null;
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { Workbook } from '@univerjs/core';
|
|
17
17
|
import { SheetSkeletonManagerService } from '../services/sheet-skeleton-manager.service';
|
|
18
|
+
export declare const SheetLoadingWorkbookContext: import("react").Context<Workbook | null>;
|
|
18
19
|
export declare function useActiveWorkbook(): Workbook | null;
|
|
20
|
+
export declare function useSheetLoadingWorkbook(): Workbook | null;
|
|
21
|
+
export declare function useSheetLoading(): boolean;
|
|
22
|
+
export declare function useSheetLoadingPreviewReady(): boolean;
|
|
19
23
|
export declare function useActiveWorksheet(workbook?: Workbook | null): import("@univerjs/core").Nullable<import("@univerjs/core").Worksheet>;
|
|
20
24
|
export declare function useWorkbooks(): Workbook[];
|
|
21
25
|
export declare function useSheetSkeleton(): SheetSkeletonManagerService | null | undefined;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { BooleanNumber } from '@univerjs/core';
|
|
17
|
-
import type { CSSProperties, KeyboardEventHandler, ReactNode } from 'react';
|
|
17
|
+
import type { CSSProperties, KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
18
18
|
export interface IBaseSheetBarProps {
|
|
19
19
|
label?: ReactNode;
|
|
20
20
|
children?: unknown[];
|
|
@@ -27,6 +27,7 @@ export interface IBaseSheetBarProps {
|
|
|
27
27
|
menuOverlay?: ReactNode;
|
|
28
28
|
className?: string;
|
|
29
29
|
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
|
|
30
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
30
31
|
tabIndex?: number;
|
|
31
32
|
}
|
|
32
33
|
export declare function SheetBarItem(props: IBaseSheetBarProps): import("react").JSX.Element;
|
|
@@ -24,3 +24,4 @@ export interface ISheetTabDragSortResult {
|
|
|
24
24
|
}
|
|
25
25
|
export declare function calculateSheetTabDragSort(items: ISheetTabLayoutItem[], activeIndex: number, dragOffsetX: number): ISheetTabDragSortResult;
|
|
26
26
|
export declare function reorderItems<T>(items: T[], fromIndex: number, toIndex: number): T[];
|
|
27
|
+
export declare function getSheetTabTargetOrder(sheetOrder: readonly string[], visibleSheetIds: string[], targetIndex: number): number;
|
|
@@ -25,7 +25,7 @@ export interface ISlideTabBarConfig {
|
|
|
25
25
|
onChangeName: (id: string, name: string) => void;
|
|
26
26
|
onChangeTab: (event: MouseEvent, id: string) => void;
|
|
27
27
|
onScroll: (state: IScrollState) => void;
|
|
28
|
-
onNameCheckAlert: (text: string) => boolean;
|
|
28
|
+
onNameCheckAlert: (text: string, id?: string) => boolean;
|
|
29
29
|
onNameChangeCheck: () => boolean;
|
|
30
30
|
}
|
|
31
31
|
export interface ISlideTabItemAnimate {
|
|
@@ -96,6 +96,7 @@ export declare class SlideTabBar {
|
|
|
96
96
|
protected _downAction: (e: MouseEvent) => void;
|
|
97
97
|
protected _wheelAction: (e: WheelEvent) => void;
|
|
98
98
|
protected _scrollIncremental: number;
|
|
99
|
+
protected _dragStartScrollX: number;
|
|
99
100
|
protected _compareDirection: number;
|
|
100
101
|
protected _autoScrollTime: number | null;
|
|
101
102
|
protected _slideScrollbar: SlideScrollbar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Co., Ltd.
|
|
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
|
+
import type { IZoomInputProps } from '@univerjs/ui';
|
|
17
|
+
export declare const SHEET_ZOOM_INPUT_COMPONENT = "SHEET_ZOOM_INPUT_COMPONENT";
|
|
18
|
+
export declare function SheetZoomInput(props: Omit<IZoomInputProps, 'className' | 'onChange'>): import("react").JSX.Element;
|