@univerjs-pro/docs-chart-ui 1.0.0-alpha.3
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 +46 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/locale/ca-ES.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/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.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-TW.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/es/locale/ca-ES.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/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.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-TW.js +1 -0
- package/lib/index.css +261 -0
- package/lib/index.js +1 -0
- package/lib/locale/ca-ES.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/ja-JP.js +1 -0
- package/lib/locale/ko-KR.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-TW.js +1 -0
- package/lib/types/commands/operations/chart-dialog.operation.d.ts +15 -0
- package/lib/types/components/DocChartDataEditor.d.ts +15 -0
- package/lib/types/components/DocChartEditPanel.d.ts +20 -0
- package/lib/types/components/DocChartEditorDialog.d.ts +9 -0
- package/lib/types/components/DocChartInlineTableEditor.d.ts +11 -0
- package/lib/types/components/DocChartInsertPanel.d.ts +11 -0
- package/lib/types/components/DocChartPreview.d.ts +10 -0
- package/lib/types/config/config.d.ts +5 -0
- package/lib/types/controllers/components.controller.d.ts +9 -0
- package/lib/types/controllers/doc-chart-clipboard.controller.d.ts +20 -0
- package/lib/types/controllers/doc-chart-drawing-edit.controller.d.ts +12 -0
- package/lib/types/controllers/doc-chart-snapshot-refresh.controller.d.ts +12 -0
- package/lib/types/controllers/doc-chart-static-render.controller.d.ts +21 -0
- package/lib/types/controllers/ui.controller.d.ts +20 -0
- package/lib/types/index.d.ts +35 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +72 -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/fr-FR.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/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/types.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-TW.d.ts +3 -0
- package/lib/types/menu/chart.menu.d.ts +12 -0
- package/lib/types/menu/schema.d.ts +2 -0
- package/lib/types/plugin.d.ts +16 -0
- package/lib/types/services/doc-chart-active-render.service.d.ts +41 -0
- package/lib/types/services/doc-chart-data-edit.service.d.ts +24 -0
- package/lib/types/services/doc-chart-host.d.ts +43 -0
- package/lib/types/services/doc-chart-insert-position.d.ts +18 -0
- package/lib/types/services/doc-chart-insert.service.d.ts +28 -0
- package/lib/types/services/doc-chart-print.service.d.ts +16 -0
- package/lib/types/services/doc-chart-render.service.d.ts +33 -0
- package/lib/types/services/doc-chart-snapshot-render.service.d.ts +57 -0
- package/lib/types/utils/ChartPanelOptions.d.ts +9 -0
- package/lib/types/views/active-chart/index.d.ts +11 -0
- package/lib/types/views/print-chart/index.d.ts +9 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ca-ES.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/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.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-TW.js +1 -0
- package/package.json +94 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { IDocChartRuntimeModel } from '@univerjs-pro/docs-chart';
|
|
2
|
+
import { DocChartModelService } from '@univerjs-pro/docs-chart';
|
|
3
|
+
import { Disposable, LocaleService } from '@univerjs/core';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { DocChartRenderService } from './doc-chart-render.service';
|
|
6
|
+
export interface IDocChartSnapshotRequest {
|
|
7
|
+
unitId: string;
|
|
8
|
+
chartId: string;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
dpr?: number;
|
|
12
|
+
mode?: 'main' | 'print' | 'export';
|
|
13
|
+
}
|
|
14
|
+
export interface IDocChartSnapshotEntry {
|
|
15
|
+
key: string;
|
|
16
|
+
status: 'pending' | 'ready' | 'error';
|
|
17
|
+
dataUrl?: string;
|
|
18
|
+
error?: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface IDocChartInvalidation {
|
|
21
|
+
unitId: string;
|
|
22
|
+
chartId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface IDocChartInvalidationOptions {
|
|
25
|
+
waitForConfig?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface IDocChartSnapshotRenderer {
|
|
28
|
+
render(request: IDocChartSnapshotRequest, runtime: IDocChartRuntimeModel): Promise<string>;
|
|
29
|
+
}
|
|
30
|
+
export declare const IDocChartSnapshotRendererService: import("@wendellhu/redi").IdentifierDecorator<IDocChartSnapshotRenderer>;
|
|
31
|
+
export declare class DocChartSnapshotRenderService extends Disposable {
|
|
32
|
+
private readonly _localeService;
|
|
33
|
+
private readonly _modelService?;
|
|
34
|
+
readonly snapshotUpdated$: Subject<IDocChartSnapshotEntry>;
|
|
35
|
+
readonly chartInvalidated$: Subject<IDocChartInvalidation>;
|
|
36
|
+
private readonly _cache;
|
|
37
|
+
private readonly _queue;
|
|
38
|
+
private readonly _configWaitKeys;
|
|
39
|
+
private _rendering;
|
|
40
|
+
private _activeDrain;
|
|
41
|
+
private readonly _renderer;
|
|
42
|
+
constructor(_localeService: LocaleService, _modelService?: DocChartModelService | undefined, renderer?: IDocChartSnapshotRenderer, renderService?: DocChartRenderService);
|
|
43
|
+
requestSnapshot(request: IDocChartSnapshotRequest): IDocChartSnapshotEntry;
|
|
44
|
+
getSnapshot(request: IDocChartSnapshotRequest): IDocChartSnapshotEntry | undefined;
|
|
45
|
+
invalidateChart(unitId: string, chartId: string, options?: IDocChartInvalidationOptions): void;
|
|
46
|
+
getCacheKey(request: IDocChartSnapshotRequest): string;
|
|
47
|
+
flushForTests(): Promise<void>;
|
|
48
|
+
dispose(): void;
|
|
49
|
+
private _createRenderService;
|
|
50
|
+
private _drainQueue;
|
|
51
|
+
private _invalidateSnapshotsForDirectionChange;
|
|
52
|
+
private _runQueue;
|
|
53
|
+
private _renderOne;
|
|
54
|
+
private _waitForRuntimeConfig;
|
|
55
|
+
private _getChartKey;
|
|
56
|
+
private _getRuntimeModel;
|
|
57
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IChartTypeOption } from '@univerjs-pro/chart-ui';
|
|
2
|
+
import type { LocaleKey } from '../locale/types';
|
|
3
|
+
import { ChartTypeBits } from '@univerjs-pro/engine-chart';
|
|
4
|
+
export interface IDocChartTypeOption extends IChartTypeOption<LocaleKey> {
|
|
5
|
+
label: LocaleKey;
|
|
6
|
+
value: ChartTypeBits;
|
|
7
|
+
}
|
|
8
|
+
export declare const DOC_CHART_TYPE_OPTIONS: IDocChartTypeOption[];
|
|
9
|
+
export declare const DOC_CHART_QUICK_TYPE_OPTIONS: IDocChartTypeOption[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export declare const DOC_ACTIVE_CHART_COMPONENT = "docs-chart-ui.active-chart";
|
|
3
|
+
export interface IDocActiveChartProps {
|
|
4
|
+
unitId: string;
|
|
5
|
+
floatDomId: string;
|
|
6
|
+
chartId: string;
|
|
7
|
+
context: {
|
|
8
|
+
root: RefObject<HTMLDivElement>;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export declare const DocActiveChart: (props: IDocActiveChartProps) => null;
|