@univerjs/sheets-ui 0.7.0-nightly.202504291607 → 0.7.0-nightly.202504301607
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 +88 -42
- package/lib/es/index.js +7543 -7386
- package/lib/index.css +1 -1
- package/lib/index.js +7543 -7386
- package/lib/types/index.d.ts +1 -0
- package/lib/types/services/cell-alert-manager.service.d.ts +3 -1
- package/lib/types/services/cell-popup-manager.service.d.ts +29 -0
- package/lib/types/services/sheets-render.service.d.ts +4 -2
- package/lib/types/views/cell-popup/config.d.ts +16 -0
- package/lib/types/views/cell-popup/index.d.ts +7 -0
- package/lib/types/views/status-bar/CopyableStatisticItem.d.ts +4 -4
- package/lib/umd/index.js +87 -41
- package/package.json +13 -13
package/lib/types/index.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export { useKeyEventConfig } from './views/editor-container';
|
|
|
96
96
|
export { type IDropdownParam, ISheetCellDropdownManagerService, SheetCellDropdownManagerService } from './services/cell-dropdown-manager.service';
|
|
97
97
|
export { FormulaBar } from './views/formula-bar/FormulaBar';
|
|
98
98
|
export { type IPermissionDetailUserPartProps } from './views/permission/panel-detail/PermissionDetailUserPart';
|
|
99
|
+
export { CellPopupManagerService } from './services/cell-popup-manager.service';
|
|
99
100
|
export { SetWorksheetColAutoWidthCommand } from './commands/commands/set-worksheet-auto-col-width.command';
|
|
100
101
|
export { AutoClearContentCommand, AutoFillCommand } from './commands/commands/auto-fill.command';
|
|
101
102
|
export { type ISheetPasteByShortKeyParams, type ISheetPasteParams, SheetCopyCommand, SheetCutCommand, SheetPasteBesidesBorderCommand, SheetPasteColWidthCommand, SheetPasteCommand, SheetPasteFormatCommand, SheetPasteShortKeyCommand, SheetPasteValueCommand, } from './commands/commands/clipboard.command';
|
|
@@ -2,6 +2,7 @@ import { IDisposable, Disposable } from '@univerjs/core';
|
|
|
2
2
|
import { ISheetLocationBase } from '@univerjs/sheets';
|
|
3
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
4
|
import { SheetCanvasPopManagerService } from './canvas-pop-manager.service';
|
|
5
|
+
import { CellPopupManagerService } from './cell-popup-manager.service';
|
|
5
6
|
export declare enum CellAlertType {
|
|
6
7
|
INFO = 0,
|
|
7
8
|
WARNING = 1,
|
|
@@ -19,6 +20,7 @@ export interface ICellAlert {
|
|
|
19
20
|
export declare class CellAlertManagerService extends Disposable {
|
|
20
21
|
private readonly _renderManagerService;
|
|
21
22
|
private readonly _canvasPopManagerService;
|
|
23
|
+
private readonly _cellPopupManagerService;
|
|
22
24
|
private _currentAlert$;
|
|
23
25
|
private _currentAlert;
|
|
24
26
|
get currentAlert(): Map<string, {
|
|
@@ -29,7 +31,7 @@ export declare class CellAlertManagerService extends Disposable {
|
|
|
29
31
|
alert: ICellAlert;
|
|
30
32
|
dispose: IDisposable;
|
|
31
33
|
}][]>;
|
|
32
|
-
constructor(_renderManagerService: IRenderManagerService, _canvasPopManagerService: SheetCanvasPopManagerService);
|
|
34
|
+
constructor(_renderManagerService: IRenderManagerService, _canvasPopManagerService: SheetCanvasPopManagerService, _cellPopupManagerService: CellPopupManagerService);
|
|
33
35
|
showAlert(alert: ICellAlert): void;
|
|
34
36
|
removeAlert(key: string): void;
|
|
35
37
|
clearAlert(): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IDisposable, Disposable } from '@univerjs/core';
|
|
2
|
+
import { ISheetLocationBase } from '@univerjs/sheets';
|
|
3
|
+
import { ICanvasPopup, SheetCanvasPopManagerService } from './canvas-pop-manager.service';
|
|
4
|
+
export interface ICellPopup extends Omit<ICanvasPopup, 'direction' | 'offset' | 'mask'> {
|
|
5
|
+
direction?: 'horizontal' | 'vertical';
|
|
6
|
+
id?: string;
|
|
7
|
+
priority: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ICellPopupDirectionCache {
|
|
10
|
+
popups: ICellPopup[];
|
|
11
|
+
disposable: IDisposable;
|
|
12
|
+
}
|
|
13
|
+
export interface ICellPopupCache {
|
|
14
|
+
horizontal?: ICellPopupDirectionCache;
|
|
15
|
+
vertical?: ICellPopupDirectionCache;
|
|
16
|
+
}
|
|
17
|
+
export interface ICellPopupChange extends ISheetLocationBase {
|
|
18
|
+
direction: 'horizontal' | 'vertical';
|
|
19
|
+
}
|
|
20
|
+
export declare class CellPopupManagerService extends Disposable {
|
|
21
|
+
private readonly _sheetCanvasPopManagerService;
|
|
22
|
+
private readonly _cellPopupMap;
|
|
23
|
+
private readonly _change$;
|
|
24
|
+
readonly change$: import('rxjs').Observable<ICellPopupChange>;
|
|
25
|
+
constructor(_sheetCanvasPopManagerService: SheetCanvasPopManagerService);
|
|
26
|
+
private _ensureCellPopupMap;
|
|
27
|
+
showPopup(location: ISheetLocationBase, popup: ICellPopup): IDisposable;
|
|
28
|
+
getPopups(unitId: string, subUnitId: string, row: number, col: number, direction: 'horizontal' | 'vertical'): ICellPopup[];
|
|
29
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDisposable, IContextService, IUniverInstanceService, RxDisposable } from '@univerjs/core';
|
|
1
|
+
import { IDisposable, IContextService, IUniverInstanceService, RxDisposable, ThemeService } from '@univerjs/core';
|
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
3
|
/**
|
|
4
4
|
* This controller is responsible for managing units of a specific kind (UniverSheet) to be rendered on the canvas.
|
|
@@ -7,8 +7,9 @@ export declare class SheetsRenderService extends RxDisposable {
|
|
|
7
7
|
private readonly _contextService;
|
|
8
8
|
private readonly _instanceSrv;
|
|
9
9
|
private readonly _renderManagerService;
|
|
10
|
+
private readonly _themeService;
|
|
10
11
|
private _skeletonChangeMutations;
|
|
11
|
-
constructor(_contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService);
|
|
12
|
+
constructor(_contextService: IContextService, _instanceSrv: IUniverInstanceService, _renderManagerService: IRenderManagerService, _themeService: ThemeService);
|
|
12
13
|
/**
|
|
13
14
|
* Register a mutation id that will trigger the skeleton change.
|
|
14
15
|
*
|
|
@@ -21,6 +22,7 @@ export declare class SheetsRenderService extends RxDisposable {
|
|
|
21
22
|
*/
|
|
22
23
|
checkMutationShouldTriggerRerender(id: string): boolean;
|
|
23
24
|
private _init;
|
|
25
|
+
private _initDarkModeListener;
|
|
24
26
|
private _initWorkbookListener;
|
|
25
27
|
private _createRenderer;
|
|
26
28
|
private _disposeRenderer;
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export declare const CELL_POPUP_COMPONENT_KEY = "sheets.component.cell-popup";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ISheetLocationBase } from '@univerjs/sheets';
|
|
2
|
+
import { IPopup } from '@univerjs/ui';
|
|
3
|
+
export declare const CellPopup: (props: {
|
|
4
|
+
popup: IPopup<ISheetLocationBase & {
|
|
5
|
+
direction: "horizontal" | "vertical";
|
|
6
|
+
}>;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IFunctionNames } from '@univerjs/engine-formula';
|
|
2
|
-
import {
|
|
2
|
+
import { FC } from 'react';
|
|
3
3
|
export interface IStatisticItem {
|
|
4
4
|
name: IFunctionNames;
|
|
5
5
|
value: number;
|
|
@@ -7,10 +7,10 @@ export interface IStatisticItem {
|
|
|
7
7
|
disable: boolean;
|
|
8
8
|
pattern: string | null;
|
|
9
9
|
}
|
|
10
|
-
export declare const functionDisplayNames:
|
|
11
|
-
interface
|
|
10
|
+
export declare const functionDisplayNames: IFunctionNameMap;
|
|
11
|
+
interface IFunctionNameMap {
|
|
12
12
|
[key: string]: string;
|
|
13
13
|
}
|
|
14
|
-
export declare const CopyableStatisticItem:
|
|
14
|
+
export declare const CopyableStatisticItem: FC<IStatisticItem>;
|
|
15
15
|
export declare function formatNumber(item: IStatisticItem): string | 0;
|
|
16
16
|
export {};
|