@univerjs-pro/bases-ui 0.25.0-insiders.20260608-e4336f7
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/README.md +3 -0
- package/lib/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ar-SA.js +1 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/de-DE.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/id-ID.js +1 -0
- package/lib/cjs/locale/it-IT.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/pl-PL.js +1 -0
- package/lib/cjs/locale/pt-BR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-HK.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ar-SA.js +1 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/de-DE.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/id-ID.js +1 -0
- package/lib/es/locale/it-IT.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/pl-PL.js +1 -0
- package/lib/es/locale/pt-BR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-HK.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/facade.js +1 -0
- package/lib/index.css +2533 -0
- package/lib/index.js +1 -0
- package/lib/locale/ar-SA.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/de-DE.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/id-ID.js +1 -0
- package/lib/locale/it-IT.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/pl-PL.js +1 -0
- package/lib/locale/pt-BR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-HK.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/commands/operations/activate-table.operation.d.ts +6 -0
- package/lib/types/commands/operations/activate-view.operation.d.ts +6 -0
- package/lib/types/commands/operations/editing.operation.d.ts +9 -0
- package/lib/types/commands/operations/keyboard.operation.d.ts +9 -0
- package/lib/types/commands/operations/scroll.operation.d.ts +7 -0
- package/lib/types/commands/operations/set-selection.operation.d.ts +5 -0
- package/lib/types/commands/operations/toolbar-menu.operation.d.ts +37 -0
- package/lib/types/commands/operations/zoom.operation.d.ts +6 -0
- package/lib/types/components/AddRecordButton.d.ts +6 -0
- package/lib/types/components/BaseAttachmentPreview.d.ts +9 -0
- package/lib/types/components/BaseCellEditors.d.ts +78 -0
- package/lib/types/components/BaseCollaborationStatus.d.ts +24 -0
- package/lib/types/components/BaseColorPalette.d.ts +13 -0
- package/lib/types/components/BaseConfirmDialog.d.ts +12 -0
- package/lib/types/components/BaseIcons.d.ts +19 -0
- package/lib/types/components/BaseMenus.d.ts +593 -0
- package/lib/types/components/BaseNumberInput.d.ts +14 -0
- package/lib/types/components/BaseStandaloneShell.d.ts +139 -0
- package/lib/types/components/BaseToolbar.d.ts +49 -0
- package/lib/types/components/CardCustomizePanel.d.ts +1 -0
- package/lib/types/components/FieldConfigPanel.d.ts +1 -0
- package/lib/types/components/FieldMenu.d.ts +44 -0
- package/lib/types/components/RecordDetailPanel.d.ts +88 -0
- package/lib/types/components/ViewTabs.d.ts +36 -0
- package/lib/types/components/base-formula-library.d.ts +25 -0
- package/lib/types/config/config.d.ts +46 -0
- package/lib/types/controllers/base-keyboard.shortcut.d.ts +9 -0
- package/lib/types/controllers/base-render.controller.d.ts +172 -0
- package/lib/types/controllers/base-theme.controller.d.ts +7 -0
- package/lib/types/controllers/base-ui.controller.d.ts +27 -0
- package/lib/types/controllers/menu.d.ts +3 -0
- package/lib/types/facade/f-base-rendered-view.d.ts +13 -0
- package/lib/types/facade/f-base-ui.d.ts +41 -0
- package/lib/types/facade/f-univer.d.ts +12 -0
- package/lib/types/facade/index.d.ts +3 -0
- package/lib/types/fields/editors/attachment.editor.d.ts +2 -0
- package/lib/types/fields/editors/date.editor.d.ts +2 -0
- package/lib/types/fields/editors/number.editor.d.ts +5 -0
- package/lib/types/fields/editors/person.editor.d.ts +2 -0
- package/lib/types/fields/editors/select.editor.d.ts +3 -0
- package/lib/types/fields/editors/text.editor.d.ts +2 -0
- package/lib/types/fields/field-ui-plugin.d.ts +63 -0
- package/lib/types/fields/renderers/attachment.renderer.d.ts +2 -0
- package/lib/types/fields/renderers/checkbox.renderer.d.ts +2 -0
- package/lib/types/fields/renderers/date.renderer.d.ts +2 -0
- package/lib/types/fields/renderers/number.renderer.d.ts +5 -0
- package/lib/types/fields/renderers/select.renderer.d.ts +3 -0
- package/lib/types/fields/renderers/text.renderer.d.ts +2 -0
- package/lib/types/index.d.ts +67 -0
- package/lib/types/internal.d.ts +11 -0
- package/lib/types/locale/ar-SA.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/de-DE.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +1163 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/formula/ar-SA.d.ts +1 -0
- package/lib/types/locale/formula/ca-ES.d.ts +1 -0
- package/lib/types/locale/formula/de-DE.d.ts +1 -0
- package/lib/types/locale/formula/en-US.d.ts +707 -0
- package/lib/types/locale/formula/es-ES.d.ts +1 -0
- package/lib/types/locale/formula/fa-IR.d.ts +1 -0
- package/lib/types/locale/formula/fr-FR.d.ts +1 -0
- package/lib/types/locale/formula/id-ID.d.ts +1 -0
- package/lib/types/locale/formula/it-IT.d.ts +1 -0
- package/lib/types/locale/formula/ja-JP.d.ts +1 -0
- package/lib/types/locale/formula/ko-KR.d.ts +1 -0
- package/lib/types/locale/formula/pl-PL.d.ts +1 -0
- package/lib/types/locale/formula/pt-BR.d.ts +1 -0
- package/lib/types/locale/formula/ru-RU.d.ts +1 -0
- package/lib/types/locale/formula/sk-SK.d.ts +1 -0
- package/lib/types/locale/formula/vi-VN.d.ts +1 -0
- package/lib/types/locale/formula/zh-CN.d.ts +707 -0
- package/lib/types/locale/formula/zh-HK.d.ts +1 -0
- package/lib/types/locale/formula/zh-TW.d.ts +1 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/id-ID.d.ts +3 -0
- package/lib/types/locale/it-IT.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/pl-PL.d.ts +3 -0
- package/lib/types/locale/pt-BR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-HK.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/menu/schema.d.ts +16 -0
- package/lib/types/plugin.d.ts +18 -0
- package/lib/types/render/base-canvas-render-component.d.ts +19 -0
- package/lib/types/render/base-render-manager.d.ts +17 -0
- package/lib/types/render/base-scene.d.ts +239 -0
- package/lib/types/render/base-view-render-controller.d.ts +285 -0
- package/lib/types/render/canvas-draw-command.d.ts +178 -0
- package/lib/types/render/layers/body.layer.d.ts +2 -0
- package/lib/types/render/layers/drag.layer.d.ts +2 -0
- package/lib/types/render/layers/editor-overlay.layer.d.ts +2 -0
- package/lib/types/render/layers/header.layer.d.ts +2 -0
- package/lib/types/render/layers/selection.layer.d.ts +2 -0
- package/lib/types/search/base-view-search.d.ts +13 -0
- package/lib/types/services/base-attachment-io.service.d.ts +21 -0
- package/lib/types/services/base-clipboard.service.d.ts +21 -0
- package/lib/types/services/base-drag.service.d.ts +19 -0
- package/lib/types/services/base-editor.service.d.ts +20 -0
- package/lib/types/services/base-field-ui-registry.service.d.ts +15 -0
- package/lib/types/services/base-formula-progress.service.d.ts +20 -0
- package/lib/types/services/base-layout.service.d.ts +30 -0
- package/lib/types/services/base-render.service.d.ts +10 -0
- package/lib/types/services/base-selection.service.d.ts +14 -0
- package/lib/types/services/base-ui-popup.service.d.ts +27 -0
- package/lib/types/services/base-ui-state.service.d.ts +156 -0
- package/lib/types/services/base-view-ui-registry.service.d.ts +15 -0
- package/lib/types/services/base-workbench-render.service.d.ts +15 -0
- package/lib/types/views/base-canvas-render-utils.d.ts +258 -0
- package/lib/types/views/base-container/BaseContainer.d.ts +30 -0
- package/lib/types/views/calendar/calendar-layout.d.ts +88 -0
- package/lib/types/views/calendar/calendar-render-controller.d.ts +7 -0
- package/lib/types/views/calendar/calendar-settings-panel.d.ts +1 -0
- package/lib/types/views/gallery/gallery-render-controller.d.ts +7 -0
- package/lib/types/views/gallery/gallery-settings-panel.d.ts +1 -0
- package/lib/types/views/gantt/gantt-layout.d.ts +91 -0
- package/lib/types/views/gantt/gantt-render-controller.d.ts +7 -0
- package/lib/types/views/gantt/gantt-settings-panel.d.ts +1 -0
- package/lib/types/views/grid/grid-render-controller.d.ts +7 -0
- package/lib/types/views/grid/grid-settings-panel.d.ts +1 -0
- package/lib/types/views/kanban/kanban-render-controller.d.ts +7 -0
- package/lib/types/views/kanban/kanban-settings-panel.d.ts +1 -0
- package/lib/types/views/view-ui-plugin.d.ts +26 -0
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ar-SA.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/de-DE.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/id-ID.js +1 -0
- package/lib/umd/locale/it-IT.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/pl-PL.js +1 -0
- package/lib/umd/locale/pt-BR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-HK.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +98 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MenuSchemaType } from '@univerjs/ui';
|
|
2
|
+
import { BASE_RECORD_DETAIL_PANEL } from '../commands/operations/toolbar-menu.operation';
|
|
3
|
+
export { BASE_RECORD_DETAIL_PANEL };
|
|
4
|
+
export declare const BaseMenuItemCommandId: {
|
|
5
|
+
readonly ADD_RECORD: string;
|
|
6
|
+
readonly CUSTOMIZE_FIELD: string;
|
|
7
|
+
readonly VIEW_SETTINGS: string;
|
|
8
|
+
readonly FILTER: string;
|
|
9
|
+
readonly GROUP: string;
|
|
10
|
+
readonly SORT: string;
|
|
11
|
+
readonly ROW_HEIGHT: string;
|
|
12
|
+
readonly CONDITIONAL_COLORING: string;
|
|
13
|
+
readonly ADD_FIELD: string;
|
|
14
|
+
readonly OPEN_RECORD_DETAIL: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const baseMenuSchema: MenuSchemaType;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { IUniverBaseUIConfig } from './config/config';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
export declare const BASES_UI_PLUGIN_NAME = "BASES_UI_PLUGIN";
|
|
5
|
+
export declare class UniverBasesUIPlugin extends Plugin {
|
|
6
|
+
private readonly _config;
|
|
7
|
+
protected readonly _injector: Injector;
|
|
8
|
+
private readonly _renderManagerService;
|
|
9
|
+
private readonly _commandService;
|
|
10
|
+
private readonly _configService;
|
|
11
|
+
static pluginName: string;
|
|
12
|
+
static packageName: string;
|
|
13
|
+
static version: string;
|
|
14
|
+
static type: UniverInstanceType;
|
|
15
|
+
constructor(_config: Partial<IUniverBaseUIConfig> | undefined, _injector: Injector, _renderManagerService: IRenderManagerService, _commandService: ICommandService, _configService: IConfigService);
|
|
16
|
+
onStarting(): void;
|
|
17
|
+
onReady(): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Viewport } from '@univerjs/core';
|
|
2
|
+
import type { IViewportInfo, UniverRenderingContext } from '@univerjs/engine-render';
|
|
3
|
+
import type { CanvasBaseViewRenderController } from './base-view-render-controller';
|
|
4
|
+
import { BaseObject } from '@univerjs/engine-render';
|
|
5
|
+
export interface IBaseCanvasRenderComponentOptions {
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
clip?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class BaseCanvasRenderComponent extends BaseObject {
|
|
11
|
+
private _controller;
|
|
12
|
+
private _viewport;
|
|
13
|
+
private readonly _clip;
|
|
14
|
+
constructor(key: string, _controller: CanvasBaseViewRenderController, options?: IBaseCanvasRenderComponentOptions);
|
|
15
|
+
setController(controller: CanvasBaseViewRenderController): void;
|
|
16
|
+
setViewport(viewport: Viewport | null): void;
|
|
17
|
+
render(mainCtx: UniverRenderingContext, viewportInfo?: IViewportInfo): this;
|
|
18
|
+
draw(ctx: UniverRenderingContext, _viewportInfo?: IViewportInfo): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { BaseShapeRenderModel } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import type { BaseViewProjection, ViewType } from '@univerjs/core';
|
|
3
|
+
import type { IBaseSceneHostMountOptions, IBaseSubSceneMountOptions } from './base-scene';
|
|
4
|
+
import type { BaseViewRenderController } from './base-view-render-controller';
|
|
5
|
+
import { BaseSceneHost, BaseSubScene } from './base-scene';
|
|
6
|
+
export declare class BaseRenderManager {
|
|
7
|
+
private readonly _controllers;
|
|
8
|
+
private readonly _shapeModels;
|
|
9
|
+
getOrCreate(viewId: string, viewType: ViewType): BaseViewRenderController;
|
|
10
|
+
createSubScene<TProjection extends BaseViewProjection>(options: Omit<IBaseSubSceneMountOptions<TProjection>, 'controller'> & {
|
|
11
|
+
viewType: ViewType;
|
|
12
|
+
}): BaseSubScene<TProjection>;
|
|
13
|
+
createSceneHost<TProjection extends BaseViewProjection>(options: Omit<IBaseSceneHostMountOptions<TProjection>, 'controller'> & {
|
|
14
|
+
viewType: ViewType;
|
|
15
|
+
}): BaseSceneHost<TProjection>;
|
|
16
|
+
registerShapeModel(name: string, model: BaseShapeRenderModel): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import type { BaseHitTestResult, Viewport as BaseViewport, BaseViewProjection, Rect } from '@univerjs/core';
|
|
2
|
+
import type { Scene as UniverScene, Viewport as UniverViewport } from '@univerjs/engine-render';
|
|
3
|
+
import type { CanvasBaseViewRenderController, IBaseRenderContext } from './base-view-render-controller';
|
|
4
|
+
import { Disposable } from '@univerjs/core';
|
|
5
|
+
import { SceneViewer } from '@univerjs/engine-render';
|
|
6
|
+
import { BaseCanvasRenderComponent } from './base-canvas-render-component';
|
|
7
|
+
export interface IBaseSubSceneMountOptions<TProjection extends BaseViewProjection = BaseViewProjection> {
|
|
8
|
+
unitId: string;
|
|
9
|
+
tableId: string;
|
|
10
|
+
viewId: string;
|
|
11
|
+
parentScene: UniverScene;
|
|
12
|
+
controller: CanvasBaseViewRenderController<TProjection>;
|
|
13
|
+
rect: Rect;
|
|
14
|
+
projection?: TProjection;
|
|
15
|
+
sceneKey?: string;
|
|
16
|
+
viewerKey?: string;
|
|
17
|
+
viewportKey?: string;
|
|
18
|
+
componentKey?: string;
|
|
19
|
+
zIndex?: number;
|
|
20
|
+
activeRecordId?: IBaseRenderContext['activeRecordId'];
|
|
21
|
+
scrollX?: number;
|
|
22
|
+
scrollY?: number;
|
|
23
|
+
ganttLeftPaneScrollX?: number;
|
|
24
|
+
overscanRows?: number;
|
|
25
|
+
collapsedGroupPaths?: ReadonlySet<string>;
|
|
26
|
+
gridSelection?: IBaseRenderContext['gridSelection'];
|
|
27
|
+
gridSearchMatches?: IBaseRenderContext['gridSearchMatches'];
|
|
28
|
+
gridSearchActiveMatch?: IBaseRenderContext['gridSearchActiveMatch'];
|
|
29
|
+
gridFillPreview?: IBaseRenderContext['gridFillPreview'];
|
|
30
|
+
gridColumnResizeDragX?: IBaseRenderContext['gridColumnResizeDragX'];
|
|
31
|
+
gridFreezeDragX?: IBaseRenderContext['gridFreezeDragX'];
|
|
32
|
+
gridFreezeHoverY?: IBaseRenderContext['gridFreezeHoverY'];
|
|
33
|
+
gridFieldDrag?: IBaseRenderContext['gridFieldDrag'];
|
|
34
|
+
gridHoverAddField?: IBaseRenderContext['gridHoverAddField'];
|
|
35
|
+
gridHoverAddRecordRow?: IBaseRenderContext['gridHoverAddRecordRow'];
|
|
36
|
+
gridHoverFieldId?: IBaseRenderContext['gridHoverFieldId'];
|
|
37
|
+
gridHoverFieldMenuFieldId?: IBaseRenderContext['gridHoverFieldMenuFieldId'];
|
|
38
|
+
gridHoverFieldDescriptionFieldId?: IBaseRenderContext['gridHoverFieldDescriptionFieldId'];
|
|
39
|
+
gridHoverCellRecordId?: IBaseRenderContext['gridHoverCellRecordId'];
|
|
40
|
+
gridHoverCellFieldId?: IBaseRenderContext['gridHoverCellFieldId'];
|
|
41
|
+
gridHoverLinkActionRecordId?: IBaseRenderContext['gridHoverLinkActionRecordId'];
|
|
42
|
+
gridHoverLinkActionFieldId?: IBaseRenderContext['gridHoverLinkActionFieldId'];
|
|
43
|
+
gridAttachmentDropTarget?: IBaseRenderContext['gridAttachmentDropTarget'];
|
|
44
|
+
gridHoverRowHeaderRecordId?: IBaseRenderContext['gridHoverRowHeaderRecordId'];
|
|
45
|
+
gridVirtualRows?: IBaseRenderContext['gridVirtualRows'];
|
|
46
|
+
gridHoverRecordId?: IBaseRenderContext['gridHoverRecordId'];
|
|
47
|
+
gridOpenRecordLabel?: IBaseRenderContext['gridOpenRecordLabel'];
|
|
48
|
+
gridAddRecordLabel?: IBaseRenderContext['gridAddRecordLabel'];
|
|
49
|
+
gridRecordLabel?: IBaseRenderContext['gridRecordLabel'];
|
|
50
|
+
gridRecordCountLabel?: IBaseRenderContext['gridRecordCountLabel'];
|
|
51
|
+
gridCalculateLabel?: IBaseRenderContext['gridCalculateLabel'];
|
|
52
|
+
gridAttachmentDropLabel?: IBaseRenderContext['gridAttachmentDropLabel'];
|
|
53
|
+
gridRatingHover?: IBaseRenderContext['gridRatingHover'];
|
|
54
|
+
gridRowDrag?: IBaseRenderContext['gridRowDrag'];
|
|
55
|
+
kanbanColumnScroll?: IBaseRenderContext['kanbanColumnScroll'];
|
|
56
|
+
kanbanLaneScrollbarVisibleKeys?: IBaseRenderContext['kanbanLaneScrollbarVisibleKeys'];
|
|
57
|
+
kanbanLaneScrollbarHoverKey?: IBaseRenderContext['kanbanLaneScrollbarHoverKey'];
|
|
58
|
+
kanbanLaneScrollbarDraggingKey?: IBaseRenderContext['kanbanLaneScrollbarDraggingKey'];
|
|
59
|
+
kanbanCardDrag?: IBaseRenderContext['kanbanCardDrag'];
|
|
60
|
+
kanbanHoverRecordId?: IBaseRenderContext['kanbanHoverRecordId'];
|
|
61
|
+
kanbanHoverAddRecordGroupKey?: IBaseRenderContext['kanbanHoverAddRecordGroupKey'];
|
|
62
|
+
kanbanHoverAddGroup?: IBaseRenderContext['kanbanHoverAddGroup'];
|
|
63
|
+
kanbanAddRecordLabel?: IBaseRenderContext['kanbanAddRecordLabel'];
|
|
64
|
+
kanbanMoveRecordLabel?: IBaseRenderContext['kanbanMoveRecordLabel'];
|
|
65
|
+
galleryHoverRecordId?: IBaseRenderContext['galleryHoverRecordId'];
|
|
66
|
+
galleryCardDrag?: IBaseRenderContext['galleryCardDrag'];
|
|
67
|
+
gallerySearchRecordIds?: IBaseRenderContext['gallerySearchRecordIds'];
|
|
68
|
+
gallerySearchActiveRecordId?: IBaseRenderContext['gallerySearchActiveRecordId'];
|
|
69
|
+
gridRowHeight?: IBaseRenderContext['gridRowHeight'];
|
|
70
|
+
gridFieldIndicators?: IBaseRenderContext['gridFieldIndicators'];
|
|
71
|
+
gridStatLabels?: IBaseRenderContext['gridStatLabels'];
|
|
72
|
+
conditionalColoringRules?: IBaseRenderContext['conditionalColoringRules'];
|
|
73
|
+
summaryBarHovered?: boolean;
|
|
74
|
+
scrollbar?: IBaseRenderContext['scrollbar'];
|
|
75
|
+
kanbanSearchRecordIds?: IBaseRenderContext['kanbanSearchRecordIds'];
|
|
76
|
+
kanbanSearchActiveRecordId?: IBaseRenderContext['kanbanSearchActiveRecordId'];
|
|
77
|
+
calendarAnchorDate?: IBaseRenderContext['calendarAnchorDate'];
|
|
78
|
+
calendarSearchRecordIds?: IBaseRenderContext['calendarSearchRecordIds'];
|
|
79
|
+
calendarSearchActiveRecordId?: IBaseRenderContext['calendarSearchActiveRecordId'];
|
|
80
|
+
calendarAllDayScrollY?: IBaseRenderContext['calendarAllDayScrollY'];
|
|
81
|
+
calendarHover?: IBaseRenderContext['calendarHover'];
|
|
82
|
+
calendarEventDrag?: IBaseRenderContext['calendarEventDrag'];
|
|
83
|
+
calendarKeyboardFocus?: IBaseRenderContext['calendarKeyboardFocus'];
|
|
84
|
+
calendarTodayLabel?: IBaseRenderContext['calendarTodayLabel'];
|
|
85
|
+
calendarDayLabel?: IBaseRenderContext['calendarDayLabel'];
|
|
86
|
+
calendarWeekLabel?: IBaseRenderContext['calendarWeekLabel'];
|
|
87
|
+
calendarMonthLabel?: IBaseRenderContext['calendarMonthLabel'];
|
|
88
|
+
calendarMoreLabel?: IBaseRenderContext['calendarMoreLabel'];
|
|
89
|
+
ganttSearchRecordIds?: IBaseRenderContext['ganttSearchRecordIds'];
|
|
90
|
+
ganttSearchActiveRecordId?: IBaseRenderContext['ganttSearchActiveRecordId'];
|
|
91
|
+
ganttHover?: IBaseRenderContext['ganttHover'];
|
|
92
|
+
ganttBarDrag?: IBaseRenderContext['ganttBarDrag'];
|
|
93
|
+
ganttFieldsLabel?: IBaseRenderContext['ganttFieldsLabel'];
|
|
94
|
+
ganttTodayLabel?: IBaseRenderContext['ganttTodayLabel'];
|
|
95
|
+
ganttWeekLabel?: IBaseRenderContext['ganttWeekLabel'];
|
|
96
|
+
ganttMonthLabel?: IBaseRenderContext['ganttMonthLabel'];
|
|
97
|
+
ganttQuarterLabel?: IBaseRenderContext['ganttQuarterLabel'];
|
|
98
|
+
ganttYearLabel?: IBaseRenderContext['ganttYearLabel'];
|
|
99
|
+
}
|
|
100
|
+
export interface IBaseSceneHostMountOptions<TProjection extends BaseViewProjection = BaseViewProjection> {
|
|
101
|
+
unitId: string;
|
|
102
|
+
tableId: string;
|
|
103
|
+
viewId: string;
|
|
104
|
+
parentScene: UniverScene;
|
|
105
|
+
controller: CanvasBaseViewRenderController<TProjection>;
|
|
106
|
+
rect: Rect;
|
|
107
|
+
projection?: TProjection;
|
|
108
|
+
componentKey?: string;
|
|
109
|
+
zIndex?: number;
|
|
110
|
+
activeRecordId?: IBaseRenderContext['activeRecordId'];
|
|
111
|
+
scrollX?: number;
|
|
112
|
+
scrollY?: number;
|
|
113
|
+
ganttLeftPaneScrollX?: number;
|
|
114
|
+
overscanRows?: number;
|
|
115
|
+
collapsedGroupPaths?: ReadonlySet<string>;
|
|
116
|
+
gridSelection?: IBaseRenderContext['gridSelection'];
|
|
117
|
+
gridSearchMatches?: IBaseRenderContext['gridSearchMatches'];
|
|
118
|
+
gridSearchActiveMatch?: IBaseRenderContext['gridSearchActiveMatch'];
|
|
119
|
+
gridFillPreview?: IBaseRenderContext['gridFillPreview'];
|
|
120
|
+
gridColumnResizeDragX?: IBaseRenderContext['gridColumnResizeDragX'];
|
|
121
|
+
gridFreezeDragX?: IBaseRenderContext['gridFreezeDragX'];
|
|
122
|
+
gridFreezeHoverY?: IBaseRenderContext['gridFreezeHoverY'];
|
|
123
|
+
gridFieldDrag?: IBaseRenderContext['gridFieldDrag'];
|
|
124
|
+
gridHoverAddField?: IBaseRenderContext['gridHoverAddField'];
|
|
125
|
+
gridHoverAddRecordRow?: IBaseRenderContext['gridHoverAddRecordRow'];
|
|
126
|
+
gridHoverFieldId?: IBaseRenderContext['gridHoverFieldId'];
|
|
127
|
+
gridHoverFieldMenuFieldId?: IBaseRenderContext['gridHoverFieldMenuFieldId'];
|
|
128
|
+
gridHoverFieldDescriptionFieldId?: IBaseRenderContext['gridHoverFieldDescriptionFieldId'];
|
|
129
|
+
gridHoverCellRecordId?: IBaseRenderContext['gridHoverCellRecordId'];
|
|
130
|
+
gridHoverCellFieldId?: IBaseRenderContext['gridHoverCellFieldId'];
|
|
131
|
+
gridHoverLinkActionRecordId?: IBaseRenderContext['gridHoverLinkActionRecordId'];
|
|
132
|
+
gridHoverLinkActionFieldId?: IBaseRenderContext['gridHoverLinkActionFieldId'];
|
|
133
|
+
gridAttachmentDropTarget?: IBaseRenderContext['gridAttachmentDropTarget'];
|
|
134
|
+
gridHoverRowHeaderRecordId?: IBaseRenderContext['gridHoverRowHeaderRecordId'];
|
|
135
|
+
gridVirtualRows?: IBaseRenderContext['gridVirtualRows'];
|
|
136
|
+
gridHoverRecordId?: IBaseRenderContext['gridHoverRecordId'];
|
|
137
|
+
gridOpenRecordLabel?: IBaseRenderContext['gridOpenRecordLabel'];
|
|
138
|
+
gridAddRecordLabel?: IBaseRenderContext['gridAddRecordLabel'];
|
|
139
|
+
gridRecordLabel?: IBaseRenderContext['gridRecordLabel'];
|
|
140
|
+
gridRecordCountLabel?: IBaseRenderContext['gridRecordCountLabel'];
|
|
141
|
+
gridCalculateLabel?: IBaseRenderContext['gridCalculateLabel'];
|
|
142
|
+
gridAttachmentDropLabel?: IBaseRenderContext['gridAttachmentDropLabel'];
|
|
143
|
+
gridRatingHover?: IBaseRenderContext['gridRatingHover'];
|
|
144
|
+
gridRowDrag?: IBaseRenderContext['gridRowDrag'];
|
|
145
|
+
kanbanColumnScroll?: IBaseRenderContext['kanbanColumnScroll'];
|
|
146
|
+
kanbanLaneScrollbarVisibleKeys?: IBaseRenderContext['kanbanLaneScrollbarVisibleKeys'];
|
|
147
|
+
kanbanLaneScrollbarHoverKey?: IBaseRenderContext['kanbanLaneScrollbarHoverKey'];
|
|
148
|
+
kanbanLaneScrollbarDraggingKey?: IBaseRenderContext['kanbanLaneScrollbarDraggingKey'];
|
|
149
|
+
kanbanCardDrag?: IBaseRenderContext['kanbanCardDrag'];
|
|
150
|
+
kanbanHoverRecordId?: IBaseRenderContext['kanbanHoverRecordId'];
|
|
151
|
+
kanbanHoverAddRecordGroupKey?: IBaseRenderContext['kanbanHoverAddRecordGroupKey'];
|
|
152
|
+
kanbanHoverAddGroup?: IBaseRenderContext['kanbanHoverAddGroup'];
|
|
153
|
+
kanbanAddRecordLabel?: IBaseRenderContext['kanbanAddRecordLabel'];
|
|
154
|
+
kanbanMoveRecordLabel?: IBaseRenderContext['kanbanMoveRecordLabel'];
|
|
155
|
+
galleryHoverRecordId?: IBaseRenderContext['galleryHoverRecordId'];
|
|
156
|
+
galleryCardDrag?: IBaseRenderContext['galleryCardDrag'];
|
|
157
|
+
gallerySearchRecordIds?: IBaseRenderContext['gallerySearchRecordIds'];
|
|
158
|
+
gallerySearchActiveRecordId?: IBaseRenderContext['gallerySearchActiveRecordId'];
|
|
159
|
+
gridRowHeight?: IBaseRenderContext['gridRowHeight'];
|
|
160
|
+
gridFieldIndicators?: IBaseRenderContext['gridFieldIndicators'];
|
|
161
|
+
gridStatLabels?: IBaseRenderContext['gridStatLabels'];
|
|
162
|
+
conditionalColoringRules?: IBaseRenderContext['conditionalColoringRules'];
|
|
163
|
+
summaryBarHovered?: boolean;
|
|
164
|
+
scrollbar?: IBaseRenderContext['scrollbar'];
|
|
165
|
+
kanbanSearchRecordIds?: IBaseRenderContext['kanbanSearchRecordIds'];
|
|
166
|
+
kanbanSearchActiveRecordId?: IBaseRenderContext['kanbanSearchActiveRecordId'];
|
|
167
|
+
calendarAnchorDate?: IBaseRenderContext['calendarAnchorDate'];
|
|
168
|
+
calendarSearchRecordIds?: IBaseRenderContext['calendarSearchRecordIds'];
|
|
169
|
+
calendarSearchActiveRecordId?: IBaseRenderContext['calendarSearchActiveRecordId'];
|
|
170
|
+
calendarAllDayScrollY?: IBaseRenderContext['calendarAllDayScrollY'];
|
|
171
|
+
calendarHover?: IBaseRenderContext['calendarHover'];
|
|
172
|
+
calendarEventDrag?: IBaseRenderContext['calendarEventDrag'];
|
|
173
|
+
calendarKeyboardFocus?: IBaseRenderContext['calendarKeyboardFocus'];
|
|
174
|
+
calendarTodayLabel?: IBaseRenderContext['calendarTodayLabel'];
|
|
175
|
+
calendarDayLabel?: IBaseRenderContext['calendarDayLabel'];
|
|
176
|
+
calendarWeekLabel?: IBaseRenderContext['calendarWeekLabel'];
|
|
177
|
+
calendarMonthLabel?: IBaseRenderContext['calendarMonthLabel'];
|
|
178
|
+
calendarMoreLabel?: IBaseRenderContext['calendarMoreLabel'];
|
|
179
|
+
ganttSearchRecordIds?: IBaseRenderContext['ganttSearchRecordIds'];
|
|
180
|
+
ganttSearchActiveRecordId?: IBaseRenderContext['ganttSearchActiveRecordId'];
|
|
181
|
+
ganttHover?: IBaseRenderContext['ganttHover'];
|
|
182
|
+
ganttBarDrag?: IBaseRenderContext['ganttBarDrag'];
|
|
183
|
+
ganttFieldsLabel?: IBaseRenderContext['ganttFieldsLabel'];
|
|
184
|
+
ganttTodayLabel?: IBaseRenderContext['ganttTodayLabel'];
|
|
185
|
+
ganttWeekLabel?: IBaseRenderContext['ganttWeekLabel'];
|
|
186
|
+
ganttMonthLabel?: IBaseRenderContext['ganttMonthLabel'];
|
|
187
|
+
ganttQuarterLabel?: IBaseRenderContext['ganttQuarterLabel'];
|
|
188
|
+
ganttYearLabel?: IBaseRenderContext['ganttYearLabel'];
|
|
189
|
+
}
|
|
190
|
+
export interface IBaseScene {
|
|
191
|
+
unitId: string;
|
|
192
|
+
viewport: BaseViewport;
|
|
193
|
+
}
|
|
194
|
+
export declare class BaseSceneHost<TProjection extends BaseViewProjection = BaseViewProjection> extends Disposable implements IBaseScene {
|
|
195
|
+
private readonly _options;
|
|
196
|
+
readonly unitId: string;
|
|
197
|
+
readonly tableId: string;
|
|
198
|
+
readonly viewId: string;
|
|
199
|
+
readonly component: BaseCanvasRenderComponent;
|
|
200
|
+
private _rect;
|
|
201
|
+
private _context;
|
|
202
|
+
private _projection;
|
|
203
|
+
constructor(_options: IBaseSceneHostMountOptions<TProjection>);
|
|
204
|
+
get viewport(): BaseViewport;
|
|
205
|
+
get rect(): Rect;
|
|
206
|
+
get projection(): TProjection | null;
|
|
207
|
+
updateProjection(projection: TProjection): void;
|
|
208
|
+
updateContext(patch: Partial<IBaseRenderContext>): void;
|
|
209
|
+
resize(rect: Rect): void;
|
|
210
|
+
hitTest(x: number, y: number): BaseHitTestResult | null;
|
|
211
|
+
markDirty(): void;
|
|
212
|
+
dispose(): void;
|
|
213
|
+
private _createContext;
|
|
214
|
+
}
|
|
215
|
+
export declare class BaseSubScene<TProjection extends BaseViewProjection = BaseViewProjection> extends Disposable implements IBaseScene {
|
|
216
|
+
private readonly _options;
|
|
217
|
+
readonly unitId: string;
|
|
218
|
+
readonly tableId: string;
|
|
219
|
+
readonly viewId: string;
|
|
220
|
+
readonly viewer: SceneViewer;
|
|
221
|
+
readonly scene: UniverScene;
|
|
222
|
+
readonly engineViewport: UniverViewport;
|
|
223
|
+
readonly component: BaseCanvasRenderComponent;
|
|
224
|
+
private _rect;
|
|
225
|
+
private _context;
|
|
226
|
+
private _projection;
|
|
227
|
+
private readonly _parentScene;
|
|
228
|
+
constructor(_options: IBaseSubSceneMountOptions<TProjection>);
|
|
229
|
+
get viewport(): BaseViewport;
|
|
230
|
+
get rect(): Rect;
|
|
231
|
+
get projection(): TProjection | null;
|
|
232
|
+
updateProjection(projection: TProjection): void;
|
|
233
|
+
updateContext(patch: Partial<IBaseRenderContext>): void;
|
|
234
|
+
resize(rect: Rect): void;
|
|
235
|
+
hitTest(x: number, y: number): BaseHitTestResult | null;
|
|
236
|
+
markDirty(): void;
|
|
237
|
+
dispose(): void;
|
|
238
|
+
private _createContext;
|
|
239
|
+
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import type { BaseHitTestResult, BaseViewProjection, Rect, Viewport, ViewType } from '@univerjs/core';
|
|
2
|
+
import type { ICanvasColorService } from '@univerjs/engine-render';
|
|
3
|
+
import type { CanvasDrawCommand, IBaseCanvas2DContext, IBaseCanvasHitRegion } from './canvas-draw-command';
|
|
4
|
+
export interface IBaseRenderContext {
|
|
5
|
+
unitId: string;
|
|
6
|
+
tableId: string;
|
|
7
|
+
viewId: string;
|
|
8
|
+
canvasColorService?: ICanvasColorService;
|
|
9
|
+
darkMode?: boolean;
|
|
10
|
+
viewport?: Viewport;
|
|
11
|
+
canvas?: HTMLCanvasElement;
|
|
12
|
+
activeRecordId?: string | null;
|
|
13
|
+
collapsedGroupPaths?: ReadonlySet<string>;
|
|
14
|
+
gridFillPreview?: IBaseGridFillPreviewState | null;
|
|
15
|
+
gridColumnResizeDragX?: number | null;
|
|
16
|
+
gridFreezeDragX?: number | null;
|
|
17
|
+
gridFreezeHoverY?: number | null;
|
|
18
|
+
gridFieldDrag?: IBaseGridFieldDragState | null;
|
|
19
|
+
gridHoverAddField?: boolean;
|
|
20
|
+
gridHoverAddRecordRow?: IBaseGridAddRecordHoverState | null;
|
|
21
|
+
gridHoverFieldId?: string | null;
|
|
22
|
+
gridHoverFieldMenuFieldId?: string | null;
|
|
23
|
+
gridHoverFieldDescriptionFieldId?: string | null;
|
|
24
|
+
gridHoverCellRecordId?: string | null;
|
|
25
|
+
gridHoverCellFieldId?: string | null;
|
|
26
|
+
gridHoverLinkActionRecordId?: string | null;
|
|
27
|
+
gridHoverLinkActionFieldId?: string | null;
|
|
28
|
+
gridAttachmentDropTarget?: IBaseGridAttachmentDropTargetState | null;
|
|
29
|
+
gridHoverRowHeaderRecordId?: string | null;
|
|
30
|
+
gridHoverRecordId?: string | null;
|
|
31
|
+
gridVirtualRows?: IBaseGridVirtualRowState[];
|
|
32
|
+
gridOpenRecordLabel?: string;
|
|
33
|
+
gridAddRecordLabel?: string;
|
|
34
|
+
gridRecordLabel?: string;
|
|
35
|
+
gridRecordCountLabel?: string;
|
|
36
|
+
gridCalculateLabel?: string;
|
|
37
|
+
gridAttachmentDropLabel?: string;
|
|
38
|
+
calendarTodayLabel?: string;
|
|
39
|
+
calendarDayLabel?: string;
|
|
40
|
+
calendarWeekLabel?: string;
|
|
41
|
+
calendarMonthLabel?: string;
|
|
42
|
+
calendarMoreLabel?: string;
|
|
43
|
+
ganttFieldsLabel?: string;
|
|
44
|
+
ganttTodayLabel?: string;
|
|
45
|
+
ganttWeekLabel?: string;
|
|
46
|
+
ganttMonthLabel?: string;
|
|
47
|
+
ganttQuarterLabel?: string;
|
|
48
|
+
ganttYearLabel?: string;
|
|
49
|
+
gridRatingHover?: IBaseGridRatingHoverState | null;
|
|
50
|
+
gridRowDrag?: IBaseGridRowDragState | null;
|
|
51
|
+
kanbanColumnScroll?: Record<string, number>;
|
|
52
|
+
kanbanLaneScrollbarVisibleKeys?: ReadonlySet<string>;
|
|
53
|
+
kanbanLaneScrollbarHoverKey?: string | null;
|
|
54
|
+
kanbanLaneScrollbarDraggingKey?: string | null;
|
|
55
|
+
kanbanCardDrag?: IBaseKanbanCardDragState | null;
|
|
56
|
+
kanbanHoverRecordId?: string | null;
|
|
57
|
+
kanbanHoverAddRecordGroupKey?: string | null;
|
|
58
|
+
kanbanHoverAddGroup?: boolean;
|
|
59
|
+
kanbanAddRecordLabel?: string;
|
|
60
|
+
kanbanMoveRecordLabel?: string;
|
|
61
|
+
gridRowHeight?: number;
|
|
62
|
+
gridFieldIndicators?: Record<string, BaseGridFieldIndicator[]>;
|
|
63
|
+
gridStatLabels?: Record<string, string>;
|
|
64
|
+
gridSelection?: IBaseGridSelectionState | null;
|
|
65
|
+
gridSearchMatches?: IBaseGridSearchMatchState[];
|
|
66
|
+
gridSearchActiveMatch?: IBaseGridSearchMatchState | null;
|
|
67
|
+
conditionalColoringRules?: IBaseConditionalColorRule[];
|
|
68
|
+
summaryBarHovered?: boolean;
|
|
69
|
+
scrollX?: number;
|
|
70
|
+
scrollY?: number;
|
|
71
|
+
ganttLeftPaneScrollX?: number;
|
|
72
|
+
overscanRows?: number;
|
|
73
|
+
scrollbar?: IBaseCanvasScrollbarState | null;
|
|
74
|
+
kanbanSearchRecordIds?: string[];
|
|
75
|
+
kanbanSearchActiveRecordId?: string | null;
|
|
76
|
+
galleryHoverRecordId?: string | null;
|
|
77
|
+
galleryCardDrag?: IBaseGalleryCardDragState | null;
|
|
78
|
+
gallerySearchRecordIds?: string[];
|
|
79
|
+
gallerySearchActiveRecordId?: string | null;
|
|
80
|
+
calendarAnchorDate?: number;
|
|
81
|
+
calendarSearchRecordIds?: string[];
|
|
82
|
+
calendarSearchActiveRecordId?: string | null;
|
|
83
|
+
calendarAllDayScrollY?: number;
|
|
84
|
+
calendarHover?: IBaseCalendarHoverState | null;
|
|
85
|
+
calendarEventDrag?: IBaseCalendarEventDragState | null;
|
|
86
|
+
calendarKeyboardFocus?: IBaseCalendarKeyboardFocusState | null;
|
|
87
|
+
ganttSearchRecordIds?: string[];
|
|
88
|
+
ganttSearchActiveRecordId?: string | null;
|
|
89
|
+
ganttHover?: IBaseGanttHoverState | null;
|
|
90
|
+
ganttBarDrag?: IBaseGanttBarDragState | null;
|
|
91
|
+
}
|
|
92
|
+
export type BaseCanvasLayerRole = 'background' | 'structure' | 'content' | 'interaction' | 'overlay';
|
|
93
|
+
export interface IBaseCanvasRenderLayer {
|
|
94
|
+
role: BaseCanvasLayerRole;
|
|
95
|
+
commands: CanvasDrawCommand[];
|
|
96
|
+
hitRegions?: IBaseCanvasHitRegion[];
|
|
97
|
+
}
|
|
98
|
+
export interface IBaseCanvasLayeredRenderState {
|
|
99
|
+
layers: IBaseCanvasRenderLayer[];
|
|
100
|
+
commands: CanvasDrawCommand[];
|
|
101
|
+
hitRegions: IBaseCanvasHitRegion[];
|
|
102
|
+
}
|
|
103
|
+
export declare const BASE_CANVAS_LAYER_ORDER: BaseCanvasLayerRole[];
|
|
104
|
+
export type BaseCanvasScrollbarAxis = 'x' | 'y';
|
|
105
|
+
export interface IBaseCanvasScrollbarState {
|
|
106
|
+
visible: boolean;
|
|
107
|
+
hoverAxis?: BaseCanvasScrollbarAxis | null;
|
|
108
|
+
draggingAxis?: BaseCanvasScrollbarAxis | null;
|
|
109
|
+
}
|
|
110
|
+
export interface IBaseCalendarHoverState {
|
|
111
|
+
type: string;
|
|
112
|
+
recordId?: string | null;
|
|
113
|
+
mode?: 'day' | 'week' | 'month' | null;
|
|
114
|
+
direction?: 'prev' | 'next' | null;
|
|
115
|
+
dateMs?: number | null;
|
|
116
|
+
edge?: 'start' | 'end' | null;
|
|
117
|
+
}
|
|
118
|
+
export interface IBaseCalendarEventDragState {
|
|
119
|
+
viewId: string;
|
|
120
|
+
recordId: string;
|
|
121
|
+
rect: Rect;
|
|
122
|
+
rects?: Rect[];
|
|
123
|
+
color: string;
|
|
124
|
+
title: string;
|
|
125
|
+
edge?: 'start' | 'end';
|
|
126
|
+
}
|
|
127
|
+
export interface IBaseCalendarKeyboardFocusState {
|
|
128
|
+
viewId: string;
|
|
129
|
+
start: number;
|
|
130
|
+
end: number;
|
|
131
|
+
mode: 'timed' | 'allDay' | 'month';
|
|
132
|
+
}
|
|
133
|
+
export interface IBaseGanttHoverState {
|
|
134
|
+
type: string;
|
|
135
|
+
recordId?: string | null;
|
|
136
|
+
scale?: 'week' | 'month' | 'quarter' | 'year' | null;
|
|
137
|
+
direction?: 'prev' | 'next' | null;
|
|
138
|
+
start?: number | null;
|
|
139
|
+
end?: number | null;
|
|
140
|
+
}
|
|
141
|
+
export interface IBaseGanttBarDragState {
|
|
142
|
+
viewId: string;
|
|
143
|
+
recordId: string;
|
|
144
|
+
edge?: 'start' | 'end';
|
|
145
|
+
x: number;
|
|
146
|
+
y: number;
|
|
147
|
+
start: number;
|
|
148
|
+
end: number;
|
|
149
|
+
}
|
|
150
|
+
export type BaseGridFieldIndicator = 'filter' | 'sort';
|
|
151
|
+
export type BaseConditionalColorTarget = 'cell' | 'row' | 'column';
|
|
152
|
+
export type BaseConditionalColorOperator = 'is' | 'isNot' | 'contains' | 'notContains' | 'isEmpty' | 'isNotEmpty' | 'greaterThan' | 'lessThan' | 'before' | 'after';
|
|
153
|
+
export type BaseConditionalDateMode = 'exact' | 'today' | 'tomorrow' | 'yesterday' | 'thisWeek' | 'lastWeek' | 'thisMonth' | 'lastMonth' | 'past7' | 'next7' | 'past30' | 'next30';
|
|
154
|
+
export interface IBaseConditionalColorRule {
|
|
155
|
+
id: string;
|
|
156
|
+
color: string;
|
|
157
|
+
target: BaseConditionalColorTarget;
|
|
158
|
+
fieldId: string;
|
|
159
|
+
operator: BaseConditionalColorOperator;
|
|
160
|
+
operand?: unknown;
|
|
161
|
+
dateMode?: BaseConditionalDateMode;
|
|
162
|
+
}
|
|
163
|
+
export interface IBaseGridSelectionState {
|
|
164
|
+
viewId: string;
|
|
165
|
+
mode: 'cell' | 'row' | 'column';
|
|
166
|
+
anchorRecordId: string;
|
|
167
|
+
focusRecordId: string;
|
|
168
|
+
anchorFieldId: string;
|
|
169
|
+
focusFieldId: string;
|
|
170
|
+
selectedRecordIds?: string[];
|
|
171
|
+
showBorder?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface IBaseGridSearchMatchState {
|
|
174
|
+
recordId: string;
|
|
175
|
+
fieldId: string;
|
|
176
|
+
}
|
|
177
|
+
export interface IBaseGridFillPreviewState {
|
|
178
|
+
viewId: string;
|
|
179
|
+
targetRecordId?: string;
|
|
180
|
+
}
|
|
181
|
+
export interface IBaseGridRatingHoverState {
|
|
182
|
+
viewId: string;
|
|
183
|
+
recordId: string;
|
|
184
|
+
fieldId: string;
|
|
185
|
+
value: number;
|
|
186
|
+
x: number;
|
|
187
|
+
y: number;
|
|
188
|
+
}
|
|
189
|
+
export interface IBaseGridAddRecordHoverState {
|
|
190
|
+
viewId: string;
|
|
191
|
+
y: number;
|
|
192
|
+
}
|
|
193
|
+
export interface IBaseGridRowDragState {
|
|
194
|
+
viewId: string;
|
|
195
|
+
recordId: string;
|
|
196
|
+
targetRecordId?: string;
|
|
197
|
+
before?: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface IBaseKanbanCardDragState {
|
|
200
|
+
viewId: string;
|
|
201
|
+
recordId: string;
|
|
202
|
+
sourceGroupKey: string;
|
|
203
|
+
targetGroupKey?: string;
|
|
204
|
+
x: number;
|
|
205
|
+
y: number;
|
|
206
|
+
}
|
|
207
|
+
export interface IBaseGalleryCardDragState {
|
|
208
|
+
viewId: string;
|
|
209
|
+
recordId: string;
|
|
210
|
+
x: number;
|
|
211
|
+
y: number;
|
|
212
|
+
targetRecordId?: string | null;
|
|
213
|
+
before?: boolean;
|
|
214
|
+
}
|
|
215
|
+
export interface IBaseGridAttachmentDropTargetState {
|
|
216
|
+
viewId: string;
|
|
217
|
+
recordId: string;
|
|
218
|
+
fieldId: string;
|
|
219
|
+
fileName?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface IBaseGridVirtualRowState {
|
|
222
|
+
viewId: string;
|
|
223
|
+
recordId: string;
|
|
224
|
+
values: Record<string, unknown>;
|
|
225
|
+
actualLogicalY?: number;
|
|
226
|
+
logicalY: number;
|
|
227
|
+
rowNumber: number;
|
|
228
|
+
surfaceX: number;
|
|
229
|
+
surfaceWidth: number;
|
|
230
|
+
reason: 'moved' | 'deleted';
|
|
231
|
+
warningLabel?: string;
|
|
232
|
+
}
|
|
233
|
+
export interface IBaseGridFieldDragState {
|
|
234
|
+
viewId: string;
|
|
235
|
+
fieldId: string;
|
|
236
|
+
targetFieldId?: string;
|
|
237
|
+
before?: boolean;
|
|
238
|
+
}
|
|
239
|
+
export declare abstract class BaseViewRenderController<TProjection extends BaseViewProjection = BaseViewProjection> {
|
|
240
|
+
abstract readonly viewType: ViewType | 'invalid';
|
|
241
|
+
abstract mount(ctx: IBaseRenderContext): void;
|
|
242
|
+
abstract unmount(): void;
|
|
243
|
+
abstract updateProjection(projection: TProjection): void;
|
|
244
|
+
abstract hitTest(x: number, y: number): BaseHitTestResult | null;
|
|
245
|
+
abstract invalidate(region?: Rect): void;
|
|
246
|
+
}
|
|
247
|
+
export declare class NoopBaseViewRenderController<TProjection extends BaseViewProjection = BaseViewProjection> extends BaseViewRenderController<TProjection> {
|
|
248
|
+
readonly viewType: ViewType | 'invalid';
|
|
249
|
+
private _projection;
|
|
250
|
+
private _context;
|
|
251
|
+
constructor(viewType: ViewType | 'invalid');
|
|
252
|
+
mount(ctx: IBaseRenderContext): void;
|
|
253
|
+
unmount(): void;
|
|
254
|
+
updateProjection(projection: TProjection): void;
|
|
255
|
+
getProjection(): TProjection | null;
|
|
256
|
+
hitTest(x: number, y: number): BaseHitTestResult;
|
|
257
|
+
invalidate(): void;
|
|
258
|
+
}
|
|
259
|
+
export declare abstract class CanvasBaseViewRenderController<TProjection extends BaseViewProjection = BaseViewProjection> extends BaseViewRenderController<TProjection> {
|
|
260
|
+
readonly viewType: ViewType | 'invalid';
|
|
261
|
+
private _projection;
|
|
262
|
+
private _context;
|
|
263
|
+
private _layers;
|
|
264
|
+
private _commands;
|
|
265
|
+
private _hitRegions;
|
|
266
|
+
private _canvas;
|
|
267
|
+
constructor(viewType: ViewType | 'invalid');
|
|
268
|
+
mount(ctx: IBaseRenderContext): void;
|
|
269
|
+
unmount(): void;
|
|
270
|
+
updateProjection(projection: TProjection): void;
|
|
271
|
+
invalidate(): void;
|
|
272
|
+
attachCanvas(canvas: HTMLCanvasElement): void;
|
|
273
|
+
getProjection(): TProjection | null;
|
|
274
|
+
getDrawCommands(): CanvasDrawCommand[];
|
|
275
|
+
getRenderLayers(): IBaseCanvasRenderLayer[];
|
|
276
|
+
getHitRegions(): IBaseCanvasHitRegion[];
|
|
277
|
+
paint(ctx?: IBaseCanvas2DContext): void;
|
|
278
|
+
hitTest(x: number, y: number): BaseHitTestResult;
|
|
279
|
+
protected get context(): IBaseRenderContext | null;
|
|
280
|
+
protected get viewport(): Viewport;
|
|
281
|
+
protected abstract buildRenderLayers(projection: TProjection): IBaseCanvasRenderLayer[];
|
|
282
|
+
private _rebuild;
|
|
283
|
+
}
|
|
284
|
+
export declare function createBaseCanvasLayer(role: BaseCanvasLayerRole): IBaseCanvasRenderLayer;
|
|
285
|
+
export declare function createBaseCanvasLayersFromCommands(commands: CanvasDrawCommand[], hitRegions?: IBaseCanvasHitRegion[]): IBaseCanvasRenderLayer[];
|