@univerjs-pro/sheets-print 0.5.3 → 0.5.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 +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/types/common/const.d.ts +39 -39
- package/lib/types/common/types.d.ts +87 -1
- package/lib/types/controllers/const.d.ts +1 -1
- package/lib/types/facade/f-enum.d.ts +56 -0
- package/lib/types/facade/f-event.d.ts +169 -0
- package/lib/types/facade/f-range.d.ts +10 -0
- package/lib/types/facade/f-univer.d.ts +4 -0
- package/lib/types/facade/f-workbook.d.ts +45 -4
- package/lib/types/facade/index.d.ts +6 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +16 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getLsInfoFuncStr = "
|
|
1
|
+
export declare const getLsInfoFuncStr = "X8N7iCyN Wc7Gk4iCyN(hC7cNuc, 48dhC79ck) { iGk { 7yNui hC7cNucpNXygeGi5GGek = hC7cNuc.u4hCi('-'); 7yNui yGCLCNfcuueLc = JVKB.4eGuc(eiyd(hC7cNucpNXygeGi5GGek[S])); CX (!yGCLCNfcuueLc.8W) { yGCLCNfcuueLc.8W = B8RdcG(hC7cNucpNXygeGi5GGek[l]); } 7yNui CuMyGvcG = ik4cyX MyGvcGDhydehV7y4c !== '8NWcXCNcW' && uchX CNuieN7cyX MyGvcGDhydehV7y4c; 7yNui 7yNicai = CuMyGvcG ? uchX : zCNWyz; 7yNui RcuueLcMyGW = 7yNicai.__2eucnl__.4eGuc(hC7cNucpNXygeGi5GGek[S]); 7yNui RcuueLc = 7yNicai.__Pca__.uiGCNLCXk(RcuueLcMyGW); 7yNui uCLNei8GcMyGW = 7yNicai.__2eucnl__.4eGuc(hC7cNucpNXygeGi5GGek[Z]); 7yNui uCLNei8Gc = 7yNicai.__Pca__.uiGCNLCXk(uCLNei8GcMyGW); 7yNui uCLN3ehCW = 7yNicai.__EcGCXk__(uCLNei8Gc, RcuueLc, 48dhC79ck); 7yNui WyReCN = yGCLCNfcuueLc.WR; X8N7iCyN CuryReCNfei76CNL(ygeiicGN, yPyui) { 7yNui 4eiicGN = ygeiicGN.Gc4he7c(/^.+/, ''); 7yNui 6yui = yPyui.Gc4he7c(/^.+/, ''); 7yNui 4eiicGNgeGiu = 4eiicGN.u4hCi('.'); 7yNui 6yuigeGiu = 6yui.u4hCi('.'); CX (!4eiicGN.CN7h8Wcu('*')) { Gci8GN 4eiicGN === 6yui; } CX (4eiicGNgeGiu.hcNLi6 < S || 4eiicGNgeGiu[j] !== '*') { Gci8GN Xehuc; } 7yNui 4eiicGNV8XXCa = 4eiicGNgeGiu.uhC7c(x).byCN('.'); 7yNui 6yuiV8XXCa = 6yuigeGiu.uhC7c(-4eiicGNgeGiu.hcNLi6 + x).byCN('.'); Gci8GN 4eiicGNV8XXCa === 6yuiV8XXCa; } hci WyReCN3ehCW = (WyReCN && WyReCN.hcNLi6) ? WyReCN.uyRc((WRpicR) => CuryReCNfei76CNL(WRpicR, hy7eiCyN.6yuiNeRc)) : iG8c; CX (hy7eiCyN.6yuiNeRc === 'hy7eh6yui') { WyReCN3ehCW = iG8c; } 7yNui EehCW = uCLN3ehCW && WyReCN3ehCW; Gci8GN { EehCW, RcuueLc: yGCLCNfcuueLc, }; } 7ei76 (cGGyG) { Gci8GN { EehCW: Xehuc, RcuueLc: {}, }; }}";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { PrintAlign, PrintDirection, PrintPaperMargin, PrintPaperSize, PrintScale } from '@univerjs-pro/print';
|
|
2
|
+
import { PrintArea, PrintFreeze, PrintHeaderFooter, PrintHeaderFooterSymbol } from '@univerjs-pro/sheets-print';
|
|
3
|
+
interface ISheetPrintEnum {
|
|
4
|
+
/**
|
|
5
|
+
* Print area setting that determines which part of the spreadsheet to print
|
|
6
|
+
*/
|
|
7
|
+
PrintArea: typeof PrintArea;
|
|
8
|
+
/**
|
|
9
|
+
* Print alignment settings for content positioning
|
|
10
|
+
*/
|
|
11
|
+
PrintAlign: typeof PrintAlign;
|
|
12
|
+
/**
|
|
13
|
+
* Paper size options for printing (e.g., A4, Letter)
|
|
14
|
+
*/
|
|
15
|
+
PrintPaperSize: typeof PrintPaperSize;
|
|
16
|
+
/**
|
|
17
|
+
* Margin presets for the printed page
|
|
18
|
+
*/
|
|
19
|
+
PrintPaperMargin: typeof PrintPaperMargin;
|
|
20
|
+
/**
|
|
21
|
+
* Print scaling options to fit content to page
|
|
22
|
+
*/
|
|
23
|
+
PrintScale: typeof PrintScale;
|
|
24
|
+
/**
|
|
25
|
+
* Page orientation setting (Portrait/Landscape)
|
|
26
|
+
*/
|
|
27
|
+
PrintDirection: typeof PrintDirection;
|
|
28
|
+
/**
|
|
29
|
+
* Freeze pane settings for printing
|
|
30
|
+
*/
|
|
31
|
+
PrintFreeze: typeof PrintFreeze;
|
|
32
|
+
/**
|
|
33
|
+
* Header and footer content options
|
|
34
|
+
*/
|
|
35
|
+
PrintHeaderFooter: typeof PrintHeaderFooter;
|
|
36
|
+
/**
|
|
37
|
+
* Special symbols/placeholders available for headers and footers
|
|
38
|
+
*/
|
|
39
|
+
PrintHeaderFooterSymbol: typeof PrintHeaderFooterSymbol;
|
|
40
|
+
}
|
|
41
|
+
export declare class FSheetPrintEnum implements ISheetPrintEnum {
|
|
42
|
+
get PrintArea(): typeof PrintArea;
|
|
43
|
+
get PrintAlign(): typeof PrintAlign;
|
|
44
|
+
get PrintPaperSize(): typeof PrintPaperSize;
|
|
45
|
+
get PrintPaperMargin(): typeof PrintPaperMargin;
|
|
46
|
+
get PrintScale(): typeof PrintScale;
|
|
47
|
+
get PrintDirection(): typeof PrintDirection;
|
|
48
|
+
get PrintFreeze(): typeof PrintFreeze;
|
|
49
|
+
get PrintHeaderFooter(): typeof PrintHeaderFooter;
|
|
50
|
+
get PrintHeaderFooterSymbol(): typeof PrintHeaderFooterSymbol;
|
|
51
|
+
}
|
|
52
|
+
declare module '@univerjs/core' {
|
|
53
|
+
interface FEnum extends ISheetPrintEnum {
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { ISheetPrintLayoutConfig, ISheetPrintRenderConfig } from '@univerjs-pro/sheets-print';
|
|
2
|
+
import { FWorkbook, FWorksheet } from '@univerjs/sheets/facade';
|
|
3
|
+
import { IEventBase } from '@univerjs/core';
|
|
4
|
+
/**
|
|
5
|
+
* Event triggered when sheet print dialog is opened
|
|
6
|
+
*/
|
|
7
|
+
export interface ISheetPrintOpenEvent extends IEventBase {
|
|
8
|
+
/**
|
|
9
|
+
* The workbook instance being printed
|
|
10
|
+
*/
|
|
11
|
+
workbook: FWorkbook;
|
|
12
|
+
/**
|
|
13
|
+
* The specific worksheet being printed
|
|
14
|
+
*/
|
|
15
|
+
worksheet: FWorksheet;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Event triggered when print settings are confirmed by user
|
|
19
|
+
*/
|
|
20
|
+
export interface ISheetPrintConfrimedEvent extends IEventBase {
|
|
21
|
+
/**
|
|
22
|
+
* The final layout configuration for printing
|
|
23
|
+
*/
|
|
24
|
+
layoutConfig: ISheetPrintLayoutConfig;
|
|
25
|
+
/**
|
|
26
|
+
* The final render configuration for printing
|
|
27
|
+
*/
|
|
28
|
+
renderConfig: ISheetPrintRenderConfig;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Event triggered when print operation is canceled
|
|
32
|
+
*/
|
|
33
|
+
export interface ISheetPrintCanceledEvent extends IEventBase {
|
|
34
|
+
/**
|
|
35
|
+
* The layout configuration at time of cancellation
|
|
36
|
+
*/
|
|
37
|
+
layoutConfig: ISheetPrintLayoutConfig;
|
|
38
|
+
/**
|
|
39
|
+
* The render configuration at time of cancellation
|
|
40
|
+
*/
|
|
41
|
+
renderConfig: ISheetPrintRenderConfig;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Event triggered before sheet print dialog opens
|
|
45
|
+
*/
|
|
46
|
+
export interface IBeforeSheetPrintOpenEvent extends IEventBase {
|
|
47
|
+
/**
|
|
48
|
+
* The workbook instance being printed
|
|
49
|
+
*/
|
|
50
|
+
workbook: FWorkbook;
|
|
51
|
+
/**
|
|
52
|
+
* The specific worksheet being printed
|
|
53
|
+
*/
|
|
54
|
+
worksheet: FWorksheet;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Event triggered before print settings are confirmed
|
|
58
|
+
*/
|
|
59
|
+
export interface IBeforeSheetPrintConfirmEvent extends IEventBase {
|
|
60
|
+
/**
|
|
61
|
+
* The layout configuration to be applied
|
|
62
|
+
*/
|
|
63
|
+
layoutConfig: ISheetPrintLayoutConfig;
|
|
64
|
+
/**
|
|
65
|
+
* The render configuration to be applied
|
|
66
|
+
*/
|
|
67
|
+
renderConfig: ISheetPrintRenderConfig;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Event triggered before print operation is canceled
|
|
71
|
+
*/
|
|
72
|
+
export interface IBeforeSheetPrintCancelEvent extends IEventBase {
|
|
73
|
+
/**
|
|
74
|
+
* The layout configuration being canceled
|
|
75
|
+
*/
|
|
76
|
+
layoutConfig: ISheetPrintLayoutConfig;
|
|
77
|
+
/**
|
|
78
|
+
* The render configuration being canceled
|
|
79
|
+
*/
|
|
80
|
+
renderConfig: ISheetPrintRenderConfig;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Constants for sheet print event names
|
|
84
|
+
*/
|
|
85
|
+
export interface IFSheetPrintEventName {
|
|
86
|
+
/**
|
|
87
|
+
* Event triggered before print dialog opens
|
|
88
|
+
* @example
|
|
89
|
+
* ``` ts
|
|
90
|
+
* univerAPI.addEvent(univerAPI.event.BeforeSheetPrintOpen, (params) => {
|
|
91
|
+
* const { workbook, worksheet } = params;
|
|
92
|
+
* console.log('params', params);
|
|
93
|
+
* });
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
readonly BeforeSheetPrintOpen: 'BeforeSheetPrintOpen';
|
|
97
|
+
/**
|
|
98
|
+
* Event triggered before print settings are confirmed
|
|
99
|
+
* @example
|
|
100
|
+
* ``` ts
|
|
101
|
+
* univerAPI.addEvent(univerAPI.event.BeforeSheetPrintConfirm, (params) => {
|
|
102
|
+
* const { renderConfig, layoutConfig } = params;
|
|
103
|
+
* console.log('params', params);
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
readonly BeforeSheetPrintConfirm: 'BeforeSheetPrintConfirm';
|
|
108
|
+
/**
|
|
109
|
+
* Event triggered before print operation is canceled
|
|
110
|
+
* @example
|
|
111
|
+
* ``` ts
|
|
112
|
+
* univerAPI.addEvent(univerAPI.event.BeforeSheetPrintCanceled, (params) => {
|
|
113
|
+
* const { renderConfig, layoutConfig } = params;
|
|
114
|
+
* console.log('params', params);
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
readonly BeforeSheetPrintCanceled: 'BeforeSheetPrintCanceled';
|
|
119
|
+
/**
|
|
120
|
+
* Event triggered when print dialog opens
|
|
121
|
+
* @example
|
|
122
|
+
* ``` ts
|
|
123
|
+
* univerAPI.addEvent(univerAPI.event.SheetPrintOpen, (params) => {
|
|
124
|
+
* const { workbook, worksheet } = params;
|
|
125
|
+
* console.log('params', params);
|
|
126
|
+
* });
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
readonly SheetPrintOpen: 'SheetPrintOpen';
|
|
130
|
+
/**
|
|
131
|
+
* Event triggered when print settings are confirmed
|
|
132
|
+
* @example
|
|
133
|
+
* ``` ts
|
|
134
|
+
* univerAPI.addEvent(univerAPI.event.SheetPrintConfrimed, (params) => {
|
|
135
|
+
* const { renderConfig, layoutConfig } = params;
|
|
136
|
+
* console.log('params', params);
|
|
137
|
+
* });
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
readonly SheetPrintConfrimed: 'SheetPrintConfrimed';
|
|
141
|
+
/**
|
|
142
|
+
* Event triggered when print operation is canceled
|
|
143
|
+
* @example
|
|
144
|
+
* ``` ts
|
|
145
|
+
* univerAPI.addEvent(univerAPI.event.SheetPrintCanceled, (params) => {
|
|
146
|
+
* const { renderConfig, layoutConfig } = params;
|
|
147
|
+
* console.log('params', params);
|
|
148
|
+
* });
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
readonly SheetPrintCanceled: 'SheetPrintCanceled';
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Event configuration for sheet print events
|
|
155
|
+
*/
|
|
156
|
+
export interface ISheetPrintEventConfig {
|
|
157
|
+
BeforeSheetPrintOpen: IBeforeSheetPrintOpenEvent;
|
|
158
|
+
BeforeSheetPrintConfirm: IBeforeSheetPrintConfirmEvent;
|
|
159
|
+
BeforeSheetPrintCanceled: IBeforeSheetPrintCancelEvent;
|
|
160
|
+
SheetPrintOpen: ISheetPrintOpenEvent;
|
|
161
|
+
SheetPrintConfrimed: ISheetPrintConfrimedEvent;
|
|
162
|
+
SheetPrintCanceled: ISheetPrintCanceledEvent;
|
|
163
|
+
}
|
|
164
|
+
declare module '@univerjs/core' {
|
|
165
|
+
interface FEventName extends IFSheetPrintEventName {
|
|
166
|
+
}
|
|
167
|
+
interface IEventParamConfig extends ISheetPrintEventConfig {
|
|
168
|
+
}
|
|
169
|
+
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { FRange } from '@univerjs/sheets/facade';
|
|
2
2
|
export interface IFRangePrint {
|
|
3
|
+
/**
|
|
4
|
+
* get screenshot of this range
|
|
5
|
+
* @example
|
|
6
|
+
* ``` ts
|
|
7
|
+
* univerAPI.getActiveUniverSheet()
|
|
8
|
+
* .getActiveSheet()
|
|
9
|
+
* .getActiveRange()
|
|
10
|
+
* .getScreenshot();
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
3
13
|
getScreenshot(): string | false;
|
|
4
14
|
}
|
|
5
15
|
export declare class FRangePrint extends FRange implements IFRangePrint {
|
|
@@ -4,33 +4,74 @@ export interface IFWorkbookSheetsPrintMixin {
|
|
|
4
4
|
/**
|
|
5
5
|
* update print config, include print area, page-setting, scale, freeze, margin, and etc.
|
|
6
6
|
* @param config
|
|
7
|
+
* @example
|
|
8
|
+
* ``` ts
|
|
9
|
+
* univerAPI.getActiveWorkbook().updatePrintConfig({
|
|
10
|
+
* area: PrintArea.SHEET,
|
|
11
|
+
* subUnitIds: ['Sheet1'],
|
|
12
|
+
* id: 'Sheet1',
|
|
13
|
+
* pageSize: PrintPaperSize.A4,
|
|
14
|
+
* scale: PrintScale.FIT_PAGE,
|
|
15
|
+
* freeze: PrintFreeze.NONE,
|
|
16
|
+
* margin: {
|
|
17
|
+
* top: 0,
|
|
18
|
+
* bottom: 0,
|
|
19
|
+
* left: 0,
|
|
20
|
+
* right: 0,
|
|
21
|
+
* },
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
7
24
|
*/
|
|
8
|
-
updatePrintConfig(config: ISheetPrintLayoutConfig):
|
|
25
|
+
updatePrintConfig(config: ISheetPrintLayoutConfig): FWorkbook;
|
|
9
26
|
/**
|
|
10
27
|
* update print render config, include print header-footer setting, alignment, gridline, and etc.
|
|
11
28
|
* @param config
|
|
29
|
+
* @example
|
|
30
|
+
* ``` ts
|
|
31
|
+
* univerAPI.getActiveWorkbook().updatePrintRenderConfig({
|
|
32
|
+
* headerFooter: PrintHeaderFooter.NONE,
|
|
33
|
+
* alignment: PrintAlignment.CENTER,
|
|
34
|
+
* gridline: PrintGridline.NONE,
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
12
37
|
*/
|
|
13
|
-
updatePrintRenderConfig(config: ISheetPrintRenderConfig):
|
|
38
|
+
updatePrintRenderConfig(config: ISheetPrintRenderConfig): FWorkbook;
|
|
14
39
|
/**
|
|
15
40
|
* using current print config and render config to print
|
|
41
|
+
* @example
|
|
42
|
+
* ``` ts
|
|
43
|
+
* univerAPI.getActiveWorkbook().print();
|
|
44
|
+
* ```
|
|
16
45
|
*/
|
|
17
46
|
print(): void;
|
|
18
47
|
/**
|
|
19
48
|
* open print dialog
|
|
49
|
+
* @example
|
|
50
|
+
* ``` ts
|
|
51
|
+
* univerAPI.getActiveWorkbook().openPrintDialog();
|
|
52
|
+
* ```
|
|
20
53
|
*/
|
|
21
54
|
openPrintDialog(): void;
|
|
22
55
|
/**
|
|
23
56
|
* close print dialog
|
|
57
|
+
* @example
|
|
58
|
+
* ``` ts
|
|
59
|
+
* univerAPI.getActiveWorkbook().closePrintDialog();
|
|
60
|
+
* ```
|
|
24
61
|
*/
|
|
25
62
|
closePrintDialog(): void;
|
|
26
63
|
/**
|
|
27
64
|
* save screenshot of current range to clipboard
|
|
65
|
+
* @example
|
|
66
|
+
* ``` ts
|
|
67
|
+
* univerAPI.getActiveWorkbook().saveScreenshotToClipboard();
|
|
68
|
+
* ```
|
|
28
69
|
*/
|
|
29
70
|
saveScreenshotToClipboard(): Promise<boolean>;
|
|
30
71
|
}
|
|
31
72
|
export declare class FWorkbookSheetsPrintMixin extends FWorkbook implements IFWorkbookSheetsPrintMixin {
|
|
32
|
-
updatePrintConfig(config: ISheetPrintLayoutConfig):
|
|
33
|
-
updatePrintRenderConfig(config: ISheetPrintRenderConfig):
|
|
73
|
+
updatePrintConfig(config: ISheetPrintLayoutConfig): FWorkbook;
|
|
74
|
+
updatePrintRenderConfig(config: ISheetPrintRenderConfig): FWorkbook;
|
|
34
75
|
print(): void;
|
|
35
76
|
openPrintDialog(): void;
|
|
36
77
|
closePrintDialog(): void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import './f-workbook';
|
|
2
2
|
import './f-range';
|
|
3
|
+
import './f-event';
|
|
4
|
+
import './f-enum';
|
|
5
|
+
import './f-univer';
|
|
6
|
+
export type * from './f-enum';
|
|
7
|
+
export type * from './f-event';
|
|
3
8
|
export type * from './f-range';
|
|
9
|
+
export type * from './f-univer';
|
|
4
10
|
export type * from './f-workbook';
|
package/lib/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export { ISheetPrintManagerService } from './services/sheet-print-manager.servic
|
|
|
4
4
|
export { hasPrintFacadePermission } from './utils/util';
|
|
5
5
|
export { UniverSheetsPrintPlugin } from './plugin';
|
|
6
6
|
export { SheetPrintClientService } from './services/sheet-print.service';
|
|
7
|
+
export { PrintArea, PrintFreeze, PrintHeaderFooter, PrintHeaderFooterSymbol } from './common/types';
|
|
7
8
|
export { CancelSheetPrintOperation, ConfirmSheetPrintOperation, SheetPrintOpenOperation, SheetPrintOperation, } from './commands/operations/sheet-print.operation';
|
|
8
9
|
export { SheetScreenShotOperation } from './commands/operations/sheet-screenshot.operation';
|
|
9
10
|
export { SheetPrintManagerService } from './services/sheet-print-manager.service';
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x28bc06,_0x290912){const _0x39e449=_0xcda6,_0x4889b2=_0x28bc06();while(!![]){try{const _0x58a3df=parseInt(_0x39e449(0x122))/0x1+-parseInt(_0x39e449(0x13a))/0x2+parseInt(_0x39e449(0x12d))/0x3+parseInt(_0x39e449(0x10f))/0x4*(parseInt(_0x39e449(0x10a))/0x5)+parseInt(_0x39e449(0x114))/0x6*(parseInt(_0x39e449(0x109))/0x7)+-parseInt(_0x39e449(0x134))/0x8+parseInt(_0x39e449(0x132))/0x9*(parseInt(_0x39e449(0x143))/0xa);if(_0x58a3df===_0x290912)break;else _0x4889b2['push'](_0x4889b2['shift']());}catch(_0x605fe2){_0x4889b2['push'](_0x4889b2['shift']());}}}(_0x58fa,0x35446),function(_0x3a4cb9,_0x3caf31){const _0x49cb9b=_0xcda6;typeof exports=='object'&&typeof module<'u'?_0x3caf31(require(_0x49cb9b(0x123)),require(_0x49cb9b(0x137)),require('@univerjs/sheets/facade'),require('@univerjs-pro/print')):typeof define==_0x49cb9b(0x120)&&define[_0x49cb9b(0x128)]?define([_0x49cb9b(0x123),'@univerjs/core',_0x49cb9b(0x129),_0x49cb9b(0x107)],_0x3caf31):(_0x3a4cb9=typeof globalThis<'u'?globalThis:_0x3a4cb9||self,_0x3caf31(_0x3a4cb9['UniverProSheetsPrint'],_0x3a4cb9[_0x49cb9b(0x113)],_0x3a4cb9[_0x49cb9b(0x125)],_0x3a4cb9['UniverProPrint']));}(this,function(_0x4b85d4,_0x17a6b9,_0x1123ad,_0x19a487){'use strict';const _0x598e3d=_0xcda6;class _0xd75d93 extends _0x1123ad[_0x598e3d(0x135)]{[_0x598e3d(0x117)](_0x4c20f){const _0x3ef500=_0x598e3d;return this[_0x3ef500(0x12f)][_0x3ef500(0x11a)](_0x4b85d4[_0x3ef500(0x110)])['updateLayoutConfig'](_0x4c20f),this;}['updatePrintRenderConfig'](_0x2f7731){const _0x41a0c3=_0x598e3d;return this['_injector'][_0x41a0c3(0x11a)](_0x4b85d4[_0x41a0c3(0x110)])['updateRenderConfig'](_0x2f7731),this;}['print'](){const _0xb7c16c=_0x598e3d;return this[_0xb7c16c(0x12f)][_0xb7c16c(0x11a)](_0x17a6b9[_0xb7c16c(0x115)])[_0xb7c16c(0x111)](_0x4b85d4[_0xb7c16c(0x112)]['id']);}['openPrintDialog'](){const _0x5dc2d0=_0x598e3d;return this[_0x5dc2d0(0x12f)]['get'](_0x17a6b9['ICommandService'])[_0x5dc2d0(0x111)](_0x4b85d4[_0x5dc2d0(0x116)]['id']);}['closePrintDialog'](){const _0x393f41=_0x598e3d;return this['_injector']['get'](_0x17a6b9[_0x393f41(0x115)])[_0x393f41(0x111)](_0x4b85d4['CancelSheetPrintOperation']['id']);}async[_0x598e3d(0x127)](){const _0x456449=_0x598e3d;return _0x4b85d4[_0x456449(0x11b)](this['_injector'])?this[_0x456449(0x12f)][_0x456449(0x11a)](_0x17a6b9[_0x456449(0x115)])['executeCommand'](_0x4b85d4['SheetScreenShotOperation']['id']):!0x1;}}_0x1123ad[_0x598e3d(0x135)][_0x598e3d(0x142)](_0xd75d93);class _0x3c092f extends _0x1123ad['FRange']{[_0x598e3d(0x126)](){const _0x4020bc=_0x598e3d;return _0x4b85d4['hasPrintFacadePermission'](this['_injector'])?this[_0x4020bc(0x12f)]['get'](_0x4b85d4[_0x4020bc(0x141)])[_0x4020bc(0x108)](this[_0x4020bc(0x130)]['getUnitId'](),this['_worksheet'][_0x4020bc(0x133)](),this[_0x4020bc(0x103)]):!0x1;}}_0x1123ad['FRange'][_0x598e3d(0x142)](_0x3c092f);class _0x516908{get[_0x598e3d(0x11e)](){const _0x28756d=_0x598e3d;return _0x28756d(0x11e);}get[_0x598e3d(0x118)](){const _0x1cdc1f=_0x598e3d;return _0x1cdc1f(0x118);}get[_0x598e3d(0x13b)](){const _0x5a37ad=_0x598e3d;return _0x5a37ad(0x13b);}get[_0x598e3d(0x12a)](){const _0x34bf4c=_0x598e3d;return _0x34bf4c(0x12a);}get[_0x598e3d(0x12e)](){const _0x20056f=_0x598e3d;return _0x20056f(0x12e);}get[_0x598e3d(0x11d)](){const _0x201f9a=_0x598e3d;return _0x201f9a(0x11d);}}_0x17a6b9[_0x598e3d(0x13e)][_0x598e3d(0x142)](_0x516908);class _0x39c14b{get[_0x598e3d(0x139)](){return _0x4b85d4['PrintArea'];}get[_0x598e3d(0x13f)](){const _0x56d690=_0x598e3d;return _0x19a487[_0x56d690(0x13f)];}get[_0x598e3d(0x104)](){return _0x19a487['PrintPaperSize'];}get['PrintPaperMargin'](){const _0x32a28e=_0x598e3d;return _0x19a487[_0x32a28e(0x10b)];}get[_0x598e3d(0x131)](){const _0x10cecd=_0x598e3d;return _0x19a487[_0x10cecd(0x131)];}get[_0x598e3d(0x11f)](){return _0x19a487['PrintDirection'];}get[_0x598e3d(0x11c)](){return _0x4b85d4['PrintFreeze'];}get[_0x598e3d(0x138)](){const _0x3e75a1=_0x598e3d;return _0x4b85d4[_0x3e75a1(0x138)];}get[_0x598e3d(0x13d)](){const _0x417abe=_0x598e3d;return _0x4b85d4[_0x417abe(0x13d)];}}_0x17a6b9[_0x598e3d(0x140)][_0x598e3d(0x142)](_0x39c14b);class _0x183413 extends _0x17a6b9[_0x598e3d(0x105)]{['_initialize'](_0x3271a3){const _0x100779=_0x598e3d,_0x2ed155=_0x3271a3['get'](_0x17a6b9['ICommandService']);this[_0x100779(0x10d)](_0x2ed155[_0x100779(0x10c)](_0xe145e2=>{const _0x588578=_0x100779;switch(_0xe145e2['id']){case _0x4b85d4[_0x588578(0x116)]['id']:{if(!this['hasEventCallback'](this[_0x588578(0x124)][_0x588578(0x11e)]))return;const _0x41d93c=this[_0x588578(0x101)]();if(!_0x41d93c)return;const _0xb90493={'workbook':_0x41d93c,'worksheet':_0x41d93c[_0x588578(0x12c)]()};if(_0xb90493==null)return;if(this['fireEvent'](this['Event']['BeforeSheetPrintOpen'],_0xb90493),_0xb90493[_0x588578(0x121)])throw new _0x17a6b9[(_0x588578(0x13c))]();break;}case _0x4b85d4[_0x588578(0x112)]['id']:{if(!this['hasEventCallback'](this[_0x588578(0x124)]['BeforeSheetPrintConfirm']))return;const _0x2d027f=_0x3271a3[_0x588578(0x11a)](_0x4b85d4[_0x588578(0x110)]);if(!this[_0x588578(0x101)]())return;const _0x10be87={'layoutConfig':_0x2d027f[_0x588578(0x12b)],'renderConfig':_0x2d027f[_0x588578(0x10e)]};if(_0x10be87==null)return;if(this['fireEvent'](this[_0x588578(0x124)][_0x588578(0x118)],_0x10be87),_0x10be87[_0x588578(0x121)])throw new _0x17a6b9[(_0x588578(0x13c))]();break;}case _0x4b85d4[_0x588578(0x136)]['id']:{if(!this['hasEventCallback'](this[_0x588578(0x124)]['BeforeSheetPrintCanceled']))return;const _0x5af66d=_0x3271a3[_0x588578(0x11a)](_0x4b85d4[_0x588578(0x110)]);if(!this[_0x588578(0x101)]())return;const _0x1611c2={'layoutConfig':_0x5af66d[_0x588578(0x12b)],'renderConfig':_0x5af66d[_0x588578(0x10e)]};if(_0x1611c2==null)return;if(this[_0x588578(0x102)](this[_0x588578(0x124)]['BeforeSheetPrintCanceled'],_0x1611c2),_0x1611c2[_0x588578(0x121)])throw new _0x17a6b9[(_0x588578(0x13c))]();break;}}})),this[_0x100779(0x10d)](_0x2ed155[_0x100779(0x106)](_0x43224b=>{const _0x4fdd1e=_0x100779;switch(_0x43224b['id']){case _0x4b85d4[_0x4fdd1e(0x116)]['id']:{if(!this['hasEventCallback'](this[_0x4fdd1e(0x124)][_0x4fdd1e(0x12a)]))return;const _0x10c3cb=this[_0x4fdd1e(0x101)]();if(!_0x10c3cb)return;const _0x15cd4b={'workbook':_0x10c3cb,'worksheet':_0x10c3cb[_0x4fdd1e(0x12c)]()};if(_0x15cd4b==null)return;this['fireEvent'](this[_0x4fdd1e(0x124)][_0x4fdd1e(0x12a)],_0x15cd4b);break;}case _0x4b85d4[_0x4fdd1e(0x112)]['id']:{if(!this[_0x4fdd1e(0x119)](this['Event']['SheetPrintConfrimed']))return;const _0x149e1f=_0x3271a3[_0x4fdd1e(0x11a)](_0x4b85d4[_0x4fdd1e(0x110)]);if(!this['getActiveUniverSheet']())return;const _0x3f0b60={'layoutConfig':_0x149e1f['layoutConfig'],'renderConfig':_0x149e1f[_0x4fdd1e(0x10e)]};if(_0x3f0b60==null)return;this[_0x4fdd1e(0x102)](this[_0x4fdd1e(0x124)]['SheetPrintConfrimed'],_0x3f0b60);break;}case _0x4b85d4['CancelSheetPrintOperation']['id']:{if(!this[_0x4fdd1e(0x119)](this['Event']['SheetPrintCanceled']))return;const _0x30e71f=_0x3271a3[_0x4fdd1e(0x11a)](_0x4b85d4[_0x4fdd1e(0x110)]);if(!this['getActiveUniverSheet']())return;const _0x40fa8a={'layoutConfig':_0x30e71f['layoutConfig'],'renderConfig':_0x30e71f[_0x4fdd1e(0x10e)]};if(_0x40fa8a==null)return;this[_0x4fdd1e(0x102)](this['Event'][_0x4fdd1e(0x11d)],_0x40fa8a);break;}}}));}}_0x17a6b9[_0x598e3d(0x105)][_0x598e3d(0x142)](_0x183413);}));function _0xcda6(_0x57a9cb,_0x308b32){const _0x58fad7=_0x58fa();return _0xcda6=function(_0xcda670,_0x3a431f){_0xcda670=_0xcda670-0x101;let _0x5d2f4e=_0x58fad7[_0xcda670];return _0x5d2f4e;},_0xcda6(_0x57a9cb,_0x308b32);}function _0x58fa(){const _0x3aa299=['beforeCommandExecuted','disposeWithMe','renderConfig','4BxYJEa','ISheetPrintManagerService','syncExecuteCommand','ConfirmSheetPrintOperation','UniverCore','154650CFCKIn','ICommandService','SheetPrintOpenOperation','updatePrintConfig','BeforeSheetPrintConfirm','hasEventCallback','get','hasPrintFacadePermission','PrintFreeze','SheetPrintCanceled','BeforeSheetPrintOpen','PrintDirection','function','cancel','60038XQKLQt','@univerjs-pro/sheets-print','Event','UniverSheetsFacade','getScreenshot','saveScreenshotToClipboard','amd','@univerjs/sheets/facade','SheetPrintOpen','layoutConfig','getActiveSheet','309234oSvQYH','SheetPrintConfrimed','_injector','_workbook','PrintScale','9RBdHmO','getSheetId','2210376OoaKXa','FWorkbook','CancelSheetPrintOperation','@univerjs/core','PrintHeaderFooter','PrintArea','667628KOeDHG','BeforeSheetPrintCanceled','CanceledError','PrintHeaderFooterSymbol','FEventName','PrintAlign','FEnum','SheetPrintClientService','extend','3093880bvoSuW','getActiveUniverSheet','fireEvent','_range','PrintPaperSize','FUniver','onCommandExecuted','@univerjs-pro/print','getRangeImage','91kNxqGu','103570mGmXXQ','PrintPaperMargin'];_0x58fa=function(){return _0x3aa299;};return _0x58fa();}
|