@univerjs-pro/sheets-print 0.2.13 → 0.2.15

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/index.css CHANGED
@@ -1 +1 @@
1
- .univer-sheets-print{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;overflow:hidden}.univer-sheets-print-limit{margin:var(--margin-base) auto;text-align:center}.univer-sheets-print-header{display:flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:64px;padding-right:var(--padding-lg);padding-left:var(--padding-lg);background:rgb(var(--color-white));border-bottom:1px solid rgb(var(--border-color))}.univer-sheets-print-header-left{margin-left:var(--margin-xs);font-size:var(--font-size-lg);font-weight:500;font-style:normal;line-height:normal;color:rgb(var(--color-black))}.univer-sheets-print-header-right{position:relative}.univer-sheets-print-header-right :first-child{margin-right:var(--margin-xs)}.univer-sheets-print-content{overflow:hidden;display:flex;flex-direction:column;flex:1 1 0;flex-direction:row;box-sizing:border-box}.univer-sheets-print-content-preview{position:relative;overflow:hidden;flex:1 1 0;box-sizing:border-box;display:flex;flex-direction:column}.univer-sheets-print-content-preview-list{flex:1 1 0;overflow:auto;scrollbar-color:#73737366 transparent;scrollbar-gutter:stable;scrollbar-width:thin}.univer-sheets-print-content-preview-page{position:relative;flex:0 0 auto;margin:28px auto 0;background-color:rgb(var(--color-white));box-shadow:var(--box-shadow-lg)}.univer-sheets-print-content-preview-control{position:absolute;right:var(--margin-base);bottom:var(--margin-base);z-index:100}.univer-sheets-print-content-preview-control-item{cursor:pointer;z-index:100;display:flex;align-items:center;justify-content:center;width:32px;height:32px;margin-top:var(--margin-xs);background-color:rgb(var(--color-white));border-radius:50%;box-shadow:var(--box-shadow-base)}.univer-sheets-print-content-setting{flex:0 0 auto;box-sizing:border-box;width:312px;height:100%;background:rgb(var(--color-white))}.univer-sheets-print-content-setting-form{padding:16px}
1
+ .univer-sheets-print{display:flex;flex-direction:column;box-sizing:border-box;width:100%;height:100%;overflow:hidden;position:relative}.univer-sheets-print-mask{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;z-index:1010;pointer-events:none}.univer-sheets-print-limit{margin:var(--margin-base) auto;text-align:center}.univer-sheets-print-header{display:flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:border-box;width:100%;height:64px;padding-right:var(--padding-lg);padding-left:var(--padding-lg);background:rgb(var(--color-white));border-bottom:1px solid rgb(var(--border-color))}.univer-sheets-print-header-left{margin-left:var(--margin-xs);font-size:var(--font-size-lg);font-weight:500;font-style:normal;line-height:normal;color:rgb(var(--color-black))}.univer-sheets-print-header-right{position:relative}.univer-sheets-print-header-right :first-child{margin-right:var(--margin-xs)}.univer-sheets-print-content{overflow:hidden;display:flex;flex-direction:column;flex:1 1 0;flex-direction:row;box-sizing:border-box}.univer-sheets-print-content-preview{position:relative;overflow:hidden;flex:1 1 0;box-sizing:border-box;display:flex;flex-direction:column}.univer-sheets-print-content-preview-list{flex:1 1 0;overflow:auto;scrollbar-color:#73737366 transparent;scrollbar-gutter:stable;scrollbar-width:thin}.univer-sheets-print-content-preview-page{position:relative;flex:0 0 auto;margin:28px auto 0;background-color:rgb(var(--color-white));box-shadow:var(--box-shadow-lg)}.univer-sheets-print-content-preview-control{position:absolute;right:var(--margin-base);bottom:var(--margin-base);z-index:100}.univer-sheets-print-content-preview-control-item{cursor:pointer;z-index:100;display:flex;align-items:center;justify-content:center;width:32px;height:32px;margin-top:var(--margin-xs);background-color:rgb(var(--color-white));border-radius:50%;box-shadow:var(--box-shadow-base)}.univer-sheets-print-content-setting{flex:0 0 auto;box-sizing:border-box;width:312px;height:100%;background:rgb(var(--color-white))}.univer-sheets-print-content-setting-form{padding:16px}
@@ -4,7 +4,8 @@
4
4
  "total": "Total: ",
5
5
  "pages": "pages",
6
6
  "cancel": "CANCEL",
7
- "next": "NEXT"
7
+ "next": "NEXT",
8
+ "printing": "Printing, please do not close the page"
8
9
  },
9
10
  "menu": "Print",
10
11
  "title": "Print",
@@ -4,7 +4,8 @@
4
4
  "total": "Total: ",
5
5
  "pages": "pages",
6
6
  "cancel": "CANCEL",
7
- "next": "NEXT"
7
+ "next": "NEXT",
8
+ "printing": "Printing, please do not close the page"
8
9
  },
9
10
  "menu": "Print",
10
11
  "title": "Print",
@@ -4,7 +4,8 @@
4
4
  "total": "Total: ",
5
5
  "pages": "pages",
6
6
  "cancel": "CANCEL",
7
- "next": "NEXT"
7
+ "next": "NEXT",
8
+ "printing": "Printing, please do not close the page"
8
9
  },
9
10
  "menu": "Print",
10
11
  "title": "Print",
@@ -4,7 +4,8 @@
4
4
  "total": "打印页数:",
5
5
  "pages": "页",
6
6
  "cancel": "取消",
7
- "next": "下一步"
7
+ "next": "下一步",
8
+ "printing": "正在打印,请勿关闭页面"
8
9
  },
9
10
  "menu": "打印",
10
11
  "title": "打印设置",
@@ -4,7 +4,8 @@
4
4
  "total": "Total: ",
5
5
  "pages": "pages",
6
6
  "cancel": "CANCEL",
7
- "next": "NEXT"
7
+ "next": "NEXT",
8
+ "printing": "Printing, please do not close the page"
8
9
  },
9
10
  "menu": "Print",
10
11
  "title": "Print",
@@ -1,4 +1,10 @@
1
1
  import { ICommand } from '@univerjs/core';
2
+ import { ISheetPrintLayoutConfig, ISheetPrintRenderConfig } from '../../common/types';
2
3
  export declare const SheetPrintOpenOperation: ICommand;
3
4
  export declare const CancelSheetPrintOperation: ICommand;
4
5
  export declare const ConfirmSheetPrintOperation: ICommand;
6
+ export interface ISheetPrintOperationParams {
7
+ layoutConfig: ISheetPrintLayoutConfig;
8
+ renderConfig: ISheetPrintRenderConfig;
9
+ }
10
+ export declare const SheetPrintOperation: ICommand<ISheetPrintOperationParams>;
@@ -1,3 +1,4 @@
1
+ import { IRange } from '@univerjs/core';
1
2
  import { PrintAlign, PrintDirection, PrintPaperMargin, PrintPaperSize, PrintScale } from '@univerjs-pro/print';
2
3
  export declare enum PrintArea {
3
4
  CurrentSheet = "CurrentSheet",
@@ -17,7 +18,10 @@ export declare enum PrintFreeze {
17
18
  }
18
19
  export interface ISheetPrintLayoutConfig {
19
20
  area: PrintArea;
20
- subUnitIds: string[];
21
+ subUnitIds: (string | {
22
+ id: string;
23
+ range: IRange;
24
+ })[];
21
25
  paperSize: PrintPaperSize;
22
26
  direction: PrintDirection;
23
27
  scale: PrintScale;
@@ -1,3 +1,4 @@
1
+ export { CancelSheetPrintOperation, ConfirmSheetPrintOperation, SheetPrintOpenOperation, SheetPrintOperation, } from './commands/operations/sheet-print.operation';
2
+ export { SheetScreenShotOperation } from './commands/operations/sheet-screenshot.operation';
1
3
  export { UniverSheetsPrintPlugin } from './plugin';
2
4
  export { QUOTAS_URL_KEY } from './services/sheet-print-license.service';
3
- export { SheetPrintOpenOperation, CancelSheetPrintOperation, ConfirmSheetPrintOperation, } from './commands/operations/sheet-print.operation';
@@ -5,6 +5,7 @@ declare const locales: {
5
5
  pages: string;
6
6
  cancel: string;
7
7
  next: string;
8
+ printing: string;
8
9
  };
9
10
  menu: string;
10
11
  title: string;
@@ -1,9 +1,9 @@
1
- import { IFreeze, IRange, IUniverInstanceService } from '@univerjs/core';
1
+ import { IUniverInstanceService, IFreeze, IRange } from '@univerjs/core';
2
2
  import { IRenderManagerService } from '@univerjs/engine-render';
3
3
  import { SheetsSelectionsService } from '@univerjs/sheets';
4
4
  import { SheetPrintInterceptorService } from '@univerjs/sheets-ui';
5
- import { Observable } from 'rxjs';
6
5
  import { IPrintMargin } from '@univerjs-pro/print';
6
+ import { Observable } from 'rxjs';
7
7
  import { ISheetPrintLayoutConfig, ISheetPrintRenderConfig } from '../common/types';
8
8
  export interface IPrintSheetInfo {
9
9
  unitId: string;
@@ -39,9 +39,11 @@ export interface ISheetPrintLayoutInfo {
39
39
  export interface ISheetPrintManagerService {
40
40
  layoutConfig$: Observable<ISheetPrintLayoutConfig>;
41
41
  updateLayoutConfig(config: Partial<ISheetPrintLayoutConfig>): void;
42
+ replaceLayoutConfig(config: ISheetPrintLayoutConfig): void;
42
43
  get layoutConfig(): ISheetPrintLayoutConfig;
43
44
  renderConfig$: Observable<ISheetPrintRenderConfig>;
44
45
  updateRenderConfig(config: Partial<ISheetPrintRenderConfig>): void;
46
+ replaceRenderConfig(config: ISheetPrintRenderConfig): void;
45
47
  get renderConfig(): ISheetPrintRenderConfig;
46
48
  layoutInfos$: Observable<ISheetPrintLayoutInfo[]>;
47
49
  get layoutInfos(): ISheetPrintLayoutInfo[];
@@ -84,7 +86,9 @@ export declare class SheetPrintManagerService implements ISheetPrintManagerServi
84
86
  };
85
87
  get paperMargin(): IPrintMargin;
86
88
  updateLayoutConfig(config: Partial<ISheetPrintLayoutConfig>): void;
89
+ replaceLayoutConfig(config: ISheetPrintLayoutConfig): void;
87
90
  updateRenderConfig(config: Partial<ISheetPrintRenderConfig>): void;
91
+ replaceRenderConfig(config: ISheetPrintRenderConfig): void;
88
92
  reLayout(): void;
89
93
  reset(): void;
90
94
  private _calculate;
@@ -1,7 +1,7 @@
1
1
  import { IAccessor, IFreeze, IRange, Disposable } from '@univerjs/core';
2
- import { Engine } from '@univerjs/engine-render';
3
2
  import { IPrintMargin } from '@univerjs-pro/print';
4
3
  import { ISheetPrintRenderConfig } from '../../common/types';
4
+ import { Engine } from '@univerjs/engine-render';
5
5
  export interface IPrintSheetPageInfo {
6
6
  unitId: string;
7
7
  subUnitId: string;