@univerjs-pro/sheets-print 0.4.1 → 0.4.2
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 +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.css +1 -1
- package/lib/locale/en-US.json +42 -7
- package/lib/locale/fa-IR.json +37 -2
- package/lib/locale/ru-RU.json +42 -7
- package/lib/locale/vi-VN.json +42 -7
- package/lib/locale/zh-CN.json +37 -2
- package/lib/locale/zh-TW.json +42 -7
- package/lib/types/common/const.d.ts +42 -42
- package/lib/types/common/types.d.ts +27 -0
- package/lib/types/controllers/const.d.ts +1 -1
- package/lib/types/controllers/sheet-print.controller.d.ts +5 -2
- package/lib/types/locale/zh-CN.d.ts +35 -0
- package/lib/types/plugin.d.ts +2 -5
- package/lib/types/services/sheet-print-manager.service.d.ts +4 -4
- package/lib/types/services/sheet-print.service.d.ts +1 -1
- package/lib/types/utils/header-footer.d.ts +21 -0
- package/lib/types/views/components/footer-header-editor/index.d.ts +5 -0
- package/lib/types/views/components/sheet-print-canvas-view.d.ts +1 -0
- package/lib/umd/index.js +1 -1
- package/package.json +14 -13
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { IUniverSheetsPrintConfig } from './controllers/config.schema';
|
|
2
|
-
import {
|
|
3
|
-
import { IShortcutService } from '@univerjs/ui';
|
|
2
|
+
import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
4
3
|
export declare class UniverSheetsPrintPlugin extends Plugin {
|
|
5
4
|
private readonly _config;
|
|
6
5
|
readonly _injector: Injector;
|
|
7
|
-
private readonly _commandService;
|
|
8
|
-
private readonly _shortcutService;
|
|
9
6
|
private readonly _configService;
|
|
10
7
|
static pluginName: string;
|
|
11
8
|
static type: UniverInstanceType;
|
|
12
|
-
constructor(_config: Partial<IUniverSheetsPrintConfig> | undefined, _injector: Injector,
|
|
9
|
+
constructor(_config: Partial<IUniverSheetsPrintConfig> | undefined, _injector: Injector, _configService: IConfigService);
|
|
13
10
|
onReady(): void;
|
|
14
11
|
private _initTimeValid;
|
|
15
12
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
3
|
-
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
4
|
-
import { SheetPrintInterceptorService } from '@univerjs/sheets-ui';
|
|
1
|
+
import { IFreeze, IRange, IUniverInstanceService } from '@univerjs/core';
|
|
5
2
|
import { IPrintMargin } from '@univerjs-pro/print';
|
|
6
3
|
import { Observable } from 'rxjs';
|
|
7
4
|
import { ISheetPrintLayoutConfig, ISheetPrintRenderConfig } from '../common/types';
|
|
5
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
6
|
+
import { SheetsSelectionsService } from '@univerjs/sheets';
|
|
7
|
+
import { SheetPrintInterceptorService } from '@univerjs/sheets-ui';
|
|
8
8
|
export declare const DEFAULT_PRINT_LIMIT = 3;
|
|
9
9
|
export interface IPrintSheetInfo {
|
|
10
10
|
unitId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IRange, Injector } from '@univerjs/core';
|
|
2
|
-
import { ISheetPrintRenderConfig } from '../common/types';
|
|
3
2
|
import { ISheetPrintLayoutInfo, ISheetPrintManagerService } from './sheet-print-manager.service';
|
|
4
3
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
5
4
|
import { IGlobalZoneService } from '@univerjs/ui';
|
|
5
|
+
import { ISheetPrintRenderConfig } from '../common/types';
|
|
6
6
|
export declare class SheetPrintClientService {
|
|
7
7
|
private readonly _injector;
|
|
8
8
|
private readonly _globalZoneService;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LocaleService, Workbook, Worksheet } from '@univerjs/core';
|
|
2
|
+
import { default as dayjs } from 'dayjs';
|
|
3
|
+
import { PrintHeaderFooterSymbol } from '../common/types';
|
|
4
|
+
interface IHeaderFooterContext {
|
|
5
|
+
workbook: Workbook;
|
|
6
|
+
worksheet: Worksheet;
|
|
7
|
+
page: number;
|
|
8
|
+
localeService: LocaleService;
|
|
9
|
+
now: dayjs.Dayjs;
|
|
10
|
+
}
|
|
11
|
+
export declare function mapHeaderFooterSymbol(symbol: PrintHeaderFooterSymbol, ctx: IHeaderFooterContext): string;
|
|
12
|
+
export declare function getHeaderFooterText(text: string, ctx: IHeaderFooterContext): string;
|
|
13
|
+
export declare function transformHeaderFooterText(text: string, datas: {
|
|
14
|
+
id: PrintHeaderFooterSymbol;
|
|
15
|
+
display: string;
|
|
16
|
+
}[]): string;
|
|
17
|
+
export declare function parseHeaderFooterText(text: string, datas: {
|
|
18
|
+
id: PrintHeaderFooterSymbol;
|
|
19
|
+
display: string;
|
|
20
|
+
}[]): string;
|
|
21
|
+
export {};
|
|
@@ -58,6 +58,7 @@ export declare class SheetPrintCanvasView extends Disposable {
|
|
|
58
58
|
private _getTranslateOffset;
|
|
59
59
|
prepare(): void;
|
|
60
60
|
private _renderMainScene;
|
|
61
|
+
private _renderHeaderFooterByCustom;
|
|
61
62
|
private _renderHeaderFooter;
|
|
62
63
|
private _renderWaterMark;
|
|
63
64
|
render(): void;
|