realreport 1.3.2 → 1.4.0

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /**
3
- * RealReport v1.3.2
4
- * commit 5eff47d
3
+ * RealReport v1.4.0
4
+ * commit 4c38e9e
5
5
 
6
6
  * Copyright (C) 2013-2022 WooriTech Inc.
7
7
  https://real-report.com
@@ -9,10 +9,10 @@
9
9
  */
10
10
 
11
11
  /**
12
- * RealReport Core v1.3.2
12
+ * RealReport Core v1.4.0
13
13
  * Copyright (C) 2013-2022 WooriTech Inc.
14
14
  * All Rights Reserved.
15
- * commit cbf0ca8d128f2128e9b9e6a82d9133d5efc364db
15
+ * commit c551053dfb365e4fac63faa8fad1fd436f2a7dd2
16
16
  */
17
17
 
18
18
 
@@ -452,6 +452,7 @@ declare class UIElement extends EventAware$1 {
452
452
  setText(text: string): void;
453
453
  hide(): void;
454
454
  show(style?: string): void;
455
+ setRotation(rotation: number): void;
455
456
  protected _addChild(child: UIElement): void;
456
457
  protected _removeChild(child: UIElement): boolean;
457
458
  protected _prepareDom(doc: Document, dom: HTMLElement): void;
@@ -594,6 +595,12 @@ declare class VisualTool$1 extends Base$1 {
594
595
  dblclick(event: MouseEvent): void;
595
596
  setFocus(target?: HTMLElement): void;
596
597
  focusLeave(event: Event): void;
598
+ dragStart(event: MouseEvent): void;
599
+ dragEnd(event: MouseEvent): void;
600
+ dragEnter(event: MouseEvent): void;
601
+ dragOver(event: MouseEvent): void;
602
+ dragLeave(event: MouseEvent): void;
603
+ dragDrop(event: MouseEvent): void;
597
604
  protected isMouseEventTarget(elt: VisualElement$1): boolean;
598
605
  protected _doActivated(previous: VisualTool$1): void;
599
606
  protected _doDeactivated(): void;
@@ -618,6 +625,12 @@ declare class VisualTool$1 extends Base$1 {
618
625
  protected _doDblClick(event: MouseEvent): void;
619
626
  protected _doSetFocus(target?: HTMLElement): void;
620
627
  protected _doFocusLeave(event: Event): void;
628
+ protected _doDragStart(event: MouseEvent): void;
629
+ protected _doDragEnd(event: MouseEvent): void;
630
+ protected _doDragEnter(event: MouseEvent): void;
631
+ protected _doDragOver(event: MouseEvent): void;
632
+ protected _doDragLeave(event: MouseEvent): void;
633
+ protected _doDragDrop(event: MouseEvent): void;
621
634
  protected _getDragTracker(request: EditRequest$1, x: number, y: number): DragTracker$1;
622
635
  protected _startDragTracker(x: number, y: number, shift: boolean, alt: boolean): void;
623
636
  protected _stopDragTracker(x: number, y: number, canceled: boolean): void;
@@ -800,9 +813,9 @@ declare abstract class VisualContainer$1 extends EventAware$1 implements VisualT
800
813
  measureCheckWidth(): number;
801
814
  measureCheckHeight(): number;
802
815
  contains(target: any): boolean;
803
- getDomPosition(elt: HTMLElement | VisualElement$1, container?: HTMLDivElement): IRect;
816
+ getDomPosition(elt: HTMLElement | VisualElement$1, rotated?: boolean): IRect;
804
817
  private $_offsetDomPosition;
805
- getBoundingRect(element: VisualElement$1, zoom?: number): Rectangle$1;
818
+ getBoundingRect(element: VisualElement$1): Rectangle$1;
806
819
  private $_setTesting;
807
820
  protected get _isTesting(): boolean;
808
821
  protected _doDisabledChanged(): void;
@@ -850,6 +863,16 @@ declare abstract class VisualContainer$1 extends EventAware$1 implements VisualT
850
863
  private _mouseEnterHandler;
851
864
  private _mouseLeaveHandler;
852
865
  private _mouseOverHandler;
866
+ /**
867
+ * - 드래그 하는동안은 MouseMove가 발생하지 않기 때문에 Start End를 제외하고 타겟을 직접 넣어준다.
868
+ * @param event
869
+ */
870
+ private _dragStartHandler;
871
+ private _dragEndHandler;
872
+ private _dragOverHandler;
873
+ private _dragEnterHandler;
874
+ private _dragLeaveHandler;
875
+ private _dragDropHandler;
853
876
  private _contextMenuHander;
854
877
  private _wheelHandler;
855
878
  private _focusHandler;
@@ -1017,6 +1040,7 @@ declare abstract class VisualElement$1 extends EventAware$1 {
1017
1040
  get scrollLeft(): number;
1018
1041
  scrollDom(x: number, y: number): void;
1019
1042
  setHint(title: string): void;
1043
+ setRotation(rotation: number): void;
1020
1044
  protected _isTesting(): boolean;
1021
1045
  protected _getElements(): VisualElement$1[];
1022
1046
  protected _createDom(doc: Document): HTMLElement;
@@ -1654,12 +1678,13 @@ interface IBandData extends IReportData {
1654
1678
  rowCount: number;
1655
1679
  getField(index: number): IBandDataField;
1656
1680
  getFields(): IBandDataField[];
1681
+ getFieldByName(fieldName: string): IBandDataField;
1657
1682
  containsField(fieldName: string): boolean;
1658
1683
  getRowValue(row: number, field: string | number): any;
1659
1684
  getFieldValues(field: string | number): any[];
1660
1685
  equalValues(row: number, fields: string[], values: any[]): boolean;
1661
1686
  equalRows(row1: number, row2: number, fields?: string[]): boolean;
1662
- groupBy(fields: string[], rowCount: number): (number | IBandRowGroup | IBandRowGroupFooter)[];
1687
+ groupBy(fields: string[], rows: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1663
1688
  }
1664
1689
  declare abstract class BandData extends ReportData$1 {
1665
1690
  protected _fields: IBandDataField[];
@@ -1682,7 +1707,7 @@ declare abstract class BandData extends ReportData$1 {
1682
1707
  addField(index: number, field: IBandDataField): boolean;
1683
1708
  removeField(field: IBandDataField): boolean;
1684
1709
  abstract getRowValue(row: number, field: string | number): any;
1685
- groupBy(fields: string[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1710
+ groupBy(fields: string[], subRows?: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1686
1711
  readValue(field: IBandDataField, value: any): any;
1687
1712
  readRow(row: any): any;
1688
1713
  dateToStr(field: IBandDataField, v: Date): string;
@@ -2401,6 +2426,9 @@ declare abstract class DataBand extends ReportGroupItem {
2401
2426
  private _keyFlds;
2402
2427
  private _masterFlds;
2403
2428
  pageNo: number;
2429
+ prevHead: boolean;
2430
+ prevIndex: number;
2431
+ rowIndex: number;
2404
2432
  detailRows: number;
2405
2433
  masterValues: any;
2406
2434
  private _dataObj;
@@ -2530,14 +2558,16 @@ declare abstract class DataBand extends ReportGroupItem {
2530
2558
  get repeatMasterRow(): boolean;
2531
2559
  set repeatMasterRow(value: boolean);
2532
2560
  /**
2533
- * 디테일이 페이지를 넘어가는 경우 디테일밴드 헤더를 출력할 지 여부.
2534
- * 디테일밴드에 지정.
2561
+ * 디테일이 페이지를 넘어가는 경우 이어지는 페이지들에 디테일밴드 header를 출력할 지 여부.
2562
+ * 디테일이 시작되는 페이지에는 이 속성과 관련 없이 출력된다.
2563
+ * 디테일밴드에 지정한다.
2535
2564
  */
2536
2565
  get repeatDetailHeader(): boolean;
2537
2566
  set repeatDetailHeader(value: boolean);
2538
2567
  /**
2539
- * 디테일이 페이지를 넘어가는 경우 디테일밴드 푸터를 출력할 지 여부.
2540
- * 디테일밴드에 지정.
2568
+ * 디테일이 페이지를 넘어가는 경우 디테일 완료 이전 페이지들에 디테일밴드 footer를 출력할 지 여부.
2569
+ * 디테일이 완료되는 페이지에는 이 속성과 관련 없이 출력된다.
2570
+ * 디테일밴드에 지정한다.
2541
2571
  */
2542
2572
  get repeatDetailFooter(): boolean;
2543
2573
  set repeatDetailFooter(value: boolean);
@@ -3291,6 +3321,7 @@ declare abstract class ReportItemElement<T extends ReportItem> extends ReportEle
3291
3321
  private _model;
3292
3322
  protected _modelChanged: boolean;
3293
3323
  private _prevStyles;
3324
+ private _rotation;
3294
3325
  constructor(doc: Document, model?: T, name?: string);
3295
3326
  protected _doDispose(): void;
3296
3327
  /** model */
@@ -3304,6 +3335,8 @@ declare abstract class ReportItemElement<T extends ReportItem> extends ReportEle
3304
3335
  get editable(): boolean;
3305
3336
  get isSpace(): boolean;
3306
3337
  get isRelativeHeight(): boolean;
3338
+ get rotation(): number;
3339
+ setRotation(value: number): void;
3307
3340
  _clearDesign(): void;
3308
3341
  getEditText(): string;
3309
3342
  setEditText(report: Report, text: string): void;
@@ -3312,6 +3345,7 @@ declare abstract class ReportItemElement<T extends ReportItem> extends ReportEle
3312
3345
  protected _initDom(doc: Document, dom: HTMLElement): void;
3313
3346
  protected _setBindMarker(visible?: boolean, system?: boolean): void;
3314
3347
  protected _doPrepareMeasure(ctx: PrintContext, dom: HTMLElement): void;
3348
+ private $_setRotation;
3315
3349
  protected _doAfterMeasure(ctx: PrintContext, dom: HTMLElement, hintWidth: number, hintHeight: number, sz: Size$1): void;
3316
3350
  findElement(modelName: string): ReportItemElement<ReportItem>;
3317
3351
  findElementOf(dom: HTMLElement): ReportItemElement<ReportItem>;
@@ -3717,6 +3751,7 @@ declare class CrosstabBand extends ReportGroupItem {
3717
3751
  _columns: ColumnCollection$1;
3718
3752
  private _rows;
3719
3753
  pageNo: number;
3754
+ rowIndex: number;
3720
3755
  constructor(name: string);
3721
3756
  /**
3722
3757
  * Cross table 생성시 사용될 원본 데이터 최대 행 수.
@@ -5148,6 +5183,7 @@ declare abstract class ReportItem extends ReportPageItem {
5148
5183
  */
5149
5184
  get rotation(): number;
5150
5185
  set rotation(value: number);
5186
+ get isRotated(): boolean;
5151
5187
  /**
5152
5188
  * onGetValue
5153
5189
  */
@@ -5953,6 +5989,7 @@ declare class PageBodyElement extends ReportElement {
5953
5989
  getLine(index: number): ReportItemView;
5954
5990
  getLines(): ReportItemView[];
5955
5991
  printAll(doc: Document, ctx: PrintContext): PageBodyOutput;
5992
+ prepareAsync(doc: Document, ctx: PrintContext): PrintLine[];
5956
5993
  itemOfDom(dom: Element): ReportItem;
5957
5994
  protected _getCssSelector(): string;
5958
5995
  get debugLabel(): string;
@@ -5964,9 +6001,9 @@ declare class PageBodyElement extends ReportElement {
5964
6001
  protected _doLayoutContent(ctx: PrintContext): void;
5965
6002
  layoutFloating(ctx: PrintContext): void;
5966
6003
  private $_buildPages;
6004
+ private $_prepareAsync;
5967
6005
  }
5968
6006
  interface PageBodyOutput {
5969
- startPage: number;
5970
6007
  pages: HTMLDivElement[][];
5971
6008
  }
5972
6009
 
@@ -5989,6 +6026,8 @@ declare class PageItemContainerElement extends BoundedContainerElement<PageItemC
5989
6026
  protected _doMeasure(ctx: PrintContext, dom: HTMLElement, hintWidth: number, hintHeight: number): Size$1;
5990
6027
  }
5991
6028
 
6029
+ declare type PrintPageCallback = (ctx: PrintContext, page: PrintPage, pageNo: number) => void;
6030
+ declare type PrintEndCallback = (ctx: PrintContext, pages: PrintPage[]) => void;
5992
6031
  /** @internal */
5993
6032
  declare class PageView extends LayerElement$1 {
5994
6033
  private _model;
@@ -6029,7 +6068,8 @@ declare class PageView extends LayerElement$1 {
6029
6068
  findElementOf(dom: HTMLElement): ReportElement;
6030
6069
  getElementOf(model: ReportPageItem): ReportElement;
6031
6070
  getAllElements(root: ReportElement, bounds: Rectangle$1): ReportItemView[];
6032
- print(doc: Document, ctx: PrintContext, y: number): PrintPage[];
6071
+ prepareAsync(doc: Document, ctx: PrintContext): PrintLine[];
6072
+ refreshPageHeader(doc: Document, ctx: PrintContext): HTMLDivElement;
6033
6073
  getSections(): ReportElement[];
6034
6074
  /**
6035
6075
  * 페이지의 한 행을 전부 차지하는가?
@@ -6103,15 +6143,15 @@ declare class ReportView extends LayerElement$1 implements IImageContainer {
6103
6143
  findElement(modelName: string): ReportElement;
6104
6144
  findElementOf(dom: HTMLElement): ReportElement;
6105
6145
  getElementOf(model: ReportPageItem): ReportElement;
6106
- getItemBoundingRect(element: VisualElement$1): Rectangle$1;
6146
+ getItemBoundingRect(element: VisualElement$1, rotated?: boolean): Rectangle$1;
6107
6147
  protected _getCssSelector(): string;
6108
6148
  protected _initDom(doc: Document, dom: HTMLElement): void;
6109
6149
  protected _createEmptyView(doc: Document): VisualElement$1;
6110
6150
  protected _layoutPageBorders(rReport: Rectangle$1, rPage: Rectangle$1): void;
6111
6151
  private $_layout;
6112
6152
  protected _afterLayout(ctx: PrintContext): void;
6113
- private $_afterRender;
6114
- private $_createElement;
6153
+ $_afterRender(ctx: PrintContext): void;
6154
+ $_createElement(item: ReportItem): ReportElement;
6115
6155
  /**
6116
6156
  * PrintContainer.$_print(...)에서 호출한다.
6117
6157
  */
@@ -6130,11 +6170,160 @@ declare class ReportView extends LayerElement$1 implements IImageContainer {
6130
6170
  protected onReportCommandStackChanged(report: Report, cmd: EditCommand$1): void;
6131
6171
  }
6132
6172
 
6173
+ /**
6174
+ * 한 줄 혹은 여러줄의 텍스트를 표시한다.
6175
+ * value 속성으로 지정된 data 위치가 타당하면 그 값을, 아니면 text 속성으로 지정한 문자열을 표시한다.
6176
+ */
6177
+ declare abstract class TextItemBase extends ReportItem {
6178
+ static readonly PROP_WRAP = "wrap";
6179
+ static readonly PROP_MULTI_LINE = "multiLine";
6180
+ static readonly PROP_BOOLEAN_FORMAT = "booleanFormat";
6181
+ static readonly PROP_NUMBER_FORMAT = "numberFormat";
6182
+ static readonly PROP_DATE_FORMAT = "dateFormat";
6183
+ static readonly PROP_TEXT_FORMAT = "textFormat";
6184
+ static readonly PROP_TEXT_PREFIX = "prefix";
6185
+ static readonly PROP_TEXT_SUFFIX = "suffix";
6186
+ static readonly PROPINFOS: IPropInfo[];
6187
+ static readonly STYLE_PROPS: string[];
6188
+ private _wrap;
6189
+ private _multiLine;
6190
+ private _booleanFormat;
6191
+ private _numberFormat;
6192
+ private _dateFormat;
6193
+ private _textFormat;
6194
+ private _prefix;
6195
+ private _suffix;
6196
+ constructor(name: string);
6197
+ /**
6198
+ * wrap
6199
+ */
6200
+ get wrap(): boolean;
6201
+ set wrap(value: boolean);
6202
+ /**
6203
+ * multiLine
6204
+ * true면 '<br>'이나 '\n', '\r\n'으로 줄을 나눠 표시한다.
6205
+ */
6206
+ get multiLine(): boolean;
6207
+ set multiLine(value: boolean);
6208
+ /**
6209
+ * booleanFormat
6210
+ */
6211
+ get booleanFormat(): string;
6212
+ set booleanFormat(value: string);
6213
+ /**
6214
+ * numberFormat
6215
+ */
6216
+ get numberFormat(): string;
6217
+ set numberFormat(value: string);
6218
+ /**
6219
+ * dateFormat
6220
+ */
6221
+ get dateFormat(): string;
6222
+ set dateFormat(value: string);
6223
+ /**
6224
+ * 세미콜론(;)으로 구분하여 왼쪽에는 String.prototype.replace의 첫 번째 매개변수,
6225
+ * 오른쪽에는 두 번째 매개변수와 같은 타입으로 지정
6226
+ * 예) Mr. 홍길동: `'([A-Za-z]*); Mr\. \$1'`,
6227
+ * 예) 사업자번호: '(\\d{3})(\\d{2})(\\d{5});$1-$2-$3'
6228
+ */
6229
+ get textFormat(): string;
6230
+ set textFormat(value: string);
6231
+ /**
6232
+ * 접두어.
6233
+ * expression을 이용해서 표현할 수도 있지만,
6234
+ * 이 속성으로 설정하면 text와 다른 스타일을 적용할 수 있다.
6235
+ */
6236
+ get prefix(): string;
6237
+ set prefix(value: string);
6238
+ /**
6239
+ * 접미어.
6240
+ * expression을 이용해서 표현할 수도 있지만,
6241
+ * 이 속성으로 설정하면 text와 다른 스타일을 적용할 수 있다.
6242
+ */
6243
+ get suffix(): string;
6244
+ set suffix(value: string);
6245
+ protected _getEditProps(): IPropInfo[];
6246
+ protected _getStyleProps(): string[];
6247
+ protected _doLoad(loader: IReportLoader, src: any): void;
6248
+ protected _doSave(target: object): void;
6249
+ protected _doApplyStyle(prop: string, value: string, target: CSSStyleDeclaration): boolean;
6250
+ canRotate(): boolean;
6251
+ canAdoptDragSource(source: any): boolean;
6252
+ adoptDragSource(source: any): IDropResult;
6253
+ canPropAdoptDragSource(prop: IPropInfo, source: any): boolean;
6254
+ adoptPropDragSource(prop: IPropInfo, source: any): IDropResult;
6255
+ getPrintValue(dp: IReportDataProvider, row: number): any;
6256
+ }
6257
+ declare type ContextValueCallback = (ctx: PrintContext) => any;
6258
+ /**
6259
+ * 고정된 텍스트나 데이터 필드의 값을 출력하는 아이템.
6260
+ */
6261
+ declare class TextItem extends TextItemBase {
6262
+ static readonly PROP_MULTI_LINE = "multiLine";
6263
+ static readonly PROP_TEXT = "text";
6264
+ static readonly PROP_ON_GET_CONTEXT_VALUE = "onGetContextValue";
6265
+ static readonly PROPINFOS: IPropInfo[];
6266
+ static readonly $_ctor: string;
6267
+ static readonly ITEM_TYPE = "Text";
6268
+ private _text;
6269
+ private _contextValueCallback;
6270
+ private _onGetContextValue;
6271
+ private _contextValueCallbackFunc;
6272
+ private _contextValueCallbackDelegate;
6273
+ constructor(name: string, text?: string);
6274
+ /**
6275
+ * text
6276
+ */
6277
+ get text(): string;
6278
+ set text(value: string);
6279
+ /**
6280
+ * onGetContextValue
6281
+ */
6282
+ get onGetContextValue(): string;
6283
+ set onGetContextValue(value: string);
6284
+ /**
6285
+ * contextValueCallback
6286
+ */
6287
+ get contextValueCallback(): ContextValueCallback;
6288
+ set contextValueCallback(value: ContextValueCallback);
6289
+ getSaveType(): string;
6290
+ get outlineLabel(): string;
6291
+ get designText(): string;
6292
+ get pathLabel(): string;
6293
+ isContextValue(): boolean;
6294
+ protected _getEditProps(): IPropInfo[];
6295
+ protected _doDefaultInit(loader: IReportLoader, parent: ReportGroupItem, hintWidth: number, hintHeight: number): void;
6296
+ protected _doLoad(loader: IReportLoader, src: any): void;
6297
+ protected _doSave(target: object): void;
6298
+ }
6299
+
6300
+ /** @internal */
6301
+ declare abstract class TextItemElementBase<T extends TextItemBase> extends ReportItemElement<T> {
6302
+ static readonly CLASS_NAME = "rr-text";
6303
+ static readonly CLASS_LIST: string;
6304
+ static readonly SPAN = "_rr_span_";
6305
+ private _span;
6306
+ protected _text: string;
6307
+ constructor(doc: Document, model: T, name: string);
6308
+ protected _doDispose(): void;
6309
+ get debugLabel(): string;
6310
+ protected _initDom(doc: Document, dom: HTMLElement): void;
6311
+ protected _doPrepareMeasure(ctx: PrintContext, dom: HTMLElement): void;
6312
+ protected _doMeasure(ctx: PrintContext, dom: HTMLElement, hintWidth: number, hintHeight: number): Size$1;
6313
+ _doLayoutContent(ctx: PrintContext): void;
6314
+ refreshPrintValues(ctx: PrintContext): void;
6315
+ isDom(dom: HTMLElement): boolean;
6316
+ protected _getText(m: TextItemBase, v: any): string;
6317
+ protected abstract _getPrintText(ctx: PrintContext, m: T): string;
6318
+ protected abstract _getDesignText(m: T, system: boolean): string;
6319
+ }
6320
+
6133
6321
  /**
6134
6322
  * Printing 관련 상태 정보 모델.
6135
6323
  */
6136
6324
  declare class PrintContext extends Base$1 {
6137
6325
  private _printing;
6326
+ private _compositePrinting;
6138
6327
  private _dp;
6139
6328
  private _desingDp;
6140
6329
  private _assets;
@@ -6146,8 +6335,11 @@ declare class PrintContext extends Base$1 {
6146
6335
  private _page;
6147
6336
  private _detailPageCount;
6148
6337
  private _detailPage;
6338
+ private _compositePageCount;
6339
+ private _compositePage;
6149
6340
  detailRows: number[];
6150
6341
  noValueCallback: boolean;
6342
+ preview: boolean;
6151
6343
  report: Report;
6152
6344
  container: HTMLDivElement;
6153
6345
  headerHeight: number;
@@ -6164,15 +6356,31 @@ declare class PrintContext extends Base$1 {
6164
6356
  row: number;
6165
6357
  index: number;
6166
6358
  contextable: boolean;
6167
- contextValues: ReportItemView[];
6359
+ contextValues: TextItemElementBase<any>[];
6168
6360
  private _userData;
6169
6361
  private _tags;
6170
6362
  private _bandSave;
6171
- constructor(printing?: boolean);
6363
+ async: boolean;
6364
+ band: DataBand | CrosstabBand;
6365
+ pages: PrintPage[];
6366
+ floatings: HTMLDivElement[];
6367
+ reportCount: number;
6368
+ reportIndex: number;
6369
+ prevPages: number;
6370
+ firstReport: PrintContext;
6371
+ nextReport: PrintContext;
6372
+ contextElements: {
6373
+ [hash: string]: TextItemElementBase<any>;
6374
+ };
6375
+ constructor(printing?: boolean, compositePrinting?: boolean);
6172
6376
  /**
6173
6377
  * printing
6174
6378
  */
6175
6379
  get printing(): boolean;
6380
+ /**
6381
+ * compositePrinting 복합 출력 여부를 반환
6382
+ */
6383
+ get compositePrinting(): boolean;
6176
6384
  /**
6177
6385
  * data provider
6178
6386
  */
@@ -6223,10 +6431,19 @@ declare class PrintContext extends Base$1 {
6223
6431
  * detail page index.
6224
6432
  */
6225
6433
  get detailPage(): number;
6434
+ /**
6435
+ * compositePage count.
6436
+ */
6437
+ get compositePageCount(): number;
6438
+ /**
6439
+ * compositePage index.
6440
+ */
6441
+ get compositePage(): number;
6226
6442
  preparePrint(report?: Report): void;
6227
- preparePage(page: number): void;
6443
+ preparePage(page: number, allPage: number): void;
6228
6444
  setDetailPage(count: number, page: number): void;
6229
6445
  finishPrint(pageCount: number): void;
6446
+ setCompositePageCount(compostePageCount: number): void;
6230
6447
  getUserData(): any;
6231
6448
  getCurrentValue(prop: string): any;
6232
6449
  setTag(tag: string, value: any): void;
@@ -6236,6 +6453,42 @@ declare class PrintContext extends Base$1 {
6236
6453
  saveBand(): void;
6237
6454
  restoreBand(): void;
6238
6455
  }
6456
+ declare class PageBreaker {
6457
+ }
6458
+ declare abstract class BandPrintInfo<T extends ReportItem> {
6459
+ band: T;
6460
+ xBand: number;
6461
+ ptsBand: number[];
6462
+ wBand: number;
6463
+ wCell: number;
6464
+ masterRow: number;
6465
+ masterValues: any;
6466
+ /**
6467
+ * rows per page.
6468
+ * NaN이 아니면 이 수 만큼만 출력하고 페이지를 넘긴다.
6469
+ */
6470
+ rpp: number;
6471
+ /**
6472
+ * end row count
6473
+ * NaN이 아니면 이 수만큼 빈 행을 추가한다.
6474
+ * endRowCount가 0보다 커서 이전 페이지에서 빈 행들을 추가했는데 다 출력하지 못한 빈 행수.
6475
+ */
6476
+ erc: number;
6477
+ detailRows: number[];
6478
+ abstract isEnded(): boolean;
6479
+ abstract getRows(): any[];
6480
+ abstract getNextPage(doc: Document, ctx: PrintContext, width: number, parent: HTMLDivElement): HTMLDivElement | null;
6481
+ setMaxCount(rows: any[], count: number): void;
6482
+ isRow(row: any): row is number;
6483
+ isBand(row: any): row is BandPrintInfo<any>;
6484
+ isGroupHeader(row: any): boolean;
6485
+ isGroupFooter(row: any): boolean;
6486
+ protected _setX(dom: HTMLElement, x: number): void;
6487
+ protected _setY(dom: HTMLElement, y: number): void;
6488
+ protected _setPos(dom: HTMLElement, x: number, y: number): void;
6489
+ protected _createPage(doc: Document, parent: HTMLDivElement): HTMLDivElement;
6490
+ }
6491
+ declare type PrintLine = HTMLElement | BandPrintInfo<any> | PageBreaker;
6239
6492
  interface IReportData {
6240
6493
  name: string;
6241
6494
  isBand: boolean;
@@ -6288,142 +6541,21 @@ declare class SimpleData extends ReportData$1 implements IReportData {
6288
6541
  getSaveValues(): any;
6289
6542
  }
6290
6543
 
6291
- /**
6292
- * 한 줄 혹은 여러줄의 텍스트를 표시한다.
6293
- * value 속성으로 지정된 data 위치가 타당하면 그 값을, 아니면 text 속성으로 지정한 문자열을 표시한다.
6294
- */
6295
- declare abstract class TextItemBase extends ReportItem {
6296
- static readonly PROP_WRAP = "wrap";
6297
- static readonly PROP_BOOLEAN_FORMAT = "booleanFormat";
6298
- static readonly PROP_NUMBER_FORMAT = "numberFormat";
6299
- static readonly PROP_DATE_FORMAT = "dateFormat";
6300
- static readonly PROP_TEXT_FORMAT = "textFormat";
6301
- static readonly PROP_TEXT_PREFIX = "prefix";
6302
- static readonly PROP_TEXT_SUFFIX = "suffix";
6303
- static readonly PROPINFOS: IPropInfo[];
6304
- static readonly STYLE_PROPS: string[];
6305
- private _wrap;
6306
- private _booleanFormat;
6307
- private _numberFormat;
6308
- private _dateFormat;
6309
- private _textFormat;
6310
- private _prefix;
6311
- private _suffix;
6312
- constructor(name: string);
6313
- /**
6314
- * wrap
6315
- */
6316
- get wrap(): boolean;
6317
- set wrap(value: boolean);
6318
- /**
6319
- * booleanFormat
6320
- */
6321
- get booleanFormat(): string;
6322
- set booleanFormat(value: string);
6323
- /**
6324
- * numberFormat
6325
- */
6326
- get numberFormat(): string;
6327
- set numberFormat(value: string);
6328
- /**
6329
- * dateFormat
6330
- */
6331
- get dateFormat(): string;
6332
- set dateFormat(value: string);
6333
- /**
6334
- * 세미콜론(;)으로 구분하여 왼쪽에는 String.prototype.replace의 첫 번째 매개변수,
6335
- * 오른쪽에는 두 번째 매개변수와 같은 타입으로 지정
6336
- * 예) Mr. 홍길동: `'([A-Za-z]*); Mr\. \$1'`,
6337
- * 예) 사업자번호: '(\\d{3})(\\d{2})(\\d{5});$1-$2-$3'
6338
- */
6339
- get textFormat(): string;
6340
- set textFormat(value: string);
6341
- /**
6342
- * 접두어.
6343
- * expression을 이용해서 표현할 수도 있지만,
6344
- * 이 속성으로 설정하면 text와 다른 스타일을 적용할 수 있다.
6345
- */
6346
- get prefix(): string;
6347
- set prefix(value: string);
6348
- /**
6349
- * 접미어.
6350
- * expression을 이용해서 표현할 수도 있지만,
6351
- * 이 속성으로 설정하면 text와 다른 스타일을 적용할 수 있다.
6352
- */
6353
- get suffix(): string;
6354
- set suffix(value: string);
6355
- protected _getEditProps(): IPropInfo[];
6356
- protected _getStyleProps(): string[];
6357
- protected _doLoad(loader: IReportLoader, src: any): void;
6358
- protected _doSave(target: object): void;
6359
- protected _doApplyStyle(prop: string, value: string, target: CSSStyleDeclaration): boolean;
6360
- canRotate(): boolean;
6361
- canAdoptDragSource(source: any): boolean;
6362
- adoptDragSource(source: any): IDropResult;
6363
- canPropAdoptDragSource(prop: IPropInfo, source: any): boolean;
6364
- adoptPropDragSource(prop: IPropInfo, source: any): IDropResult;
6365
- getPrintValue(dp: IReportDataProvider, row: number): any;
6366
- }
6367
- declare type ContextValueCallback = (ctx: PrintContext) => any;
6368
- /**
6369
- * 고정된 텍스트나 데이터 필드의 값을 출력하는 아이템.
6370
- */
6371
- declare class TextItem extends TextItemBase {
6372
- static readonly PROP_MULTI_LINE = "multiLine";
6373
- static readonly PROP_LINE_GAP = "lineGap";
6374
- static readonly PROP_TEXT = "text";
6375
- static readonly PROP_ON_GET_CONTEXT_VALUE = "onGetContextValue";
6376
- static readonly PROPINFOS: IPropInfo[];
6377
- static readonly $_ctor: string;
6378
- static readonly ITEM_TYPE = "Text";
6379
- private _multiLine;
6380
- private _lineGap;
6381
- private _text;
6382
- private _contextValueCallback;
6383
- private _onGetContextValue;
6384
- private _contextValueCallbackFunc;
6385
- private _contextValueCallbackDelegate;
6386
- constructor(name: string, text?: string);
6387
- /**
6388
- * true면 '<br>'이나 '\n', '\r\n'으로 줄을 나눠 표시한다.
6389
- */
6390
- get multiLine(): boolean;
6391
- set multiLine(value: boolean);
6392
- /**
6393
- * multiLine일 때 텍스트 라인 사이의 간격.
6394
- */
6395
- get lineGap(): number;
6396
- set lineGap(value: number);
6397
- /**
6398
- * text
6399
- */
6400
- get text(): string;
6401
- set text(value: string);
6402
- /**
6403
- * onGetContextValue
6404
- */
6405
- get onGetContextValue(): string;
6406
- set onGetContextValue(value: string);
6407
- /**
6408
- * contextValueCallback
6409
- */
6410
- get contextValueCallback(): ContextValueCallback;
6411
- set contextValueCallback(value: ContextValueCallback);
6412
- getSaveType(): string;
6413
- get outlineLabel(): string;
6414
- get designText(): string;
6415
- get pathLabel(): string;
6416
- isContextValue(): boolean;
6417
- protected _getEditProps(): IPropInfo[];
6418
- protected _doDefaultInit(loader: IReportLoader, parent: ReportGroupItem, hintWidth: number, hintHeight: number): void;
6419
- protected _doLoad(loader: IReportLoader, src: any): void;
6420
- protected _doSave(target: object): void;
6421
- }
6422
-
6423
6544
  interface IPrintReport {
6424
6545
  report: Report;
6425
6546
  data: IReportDataProvider;
6426
6547
  }
6548
+ interface IPrintOptions {
6549
+ report: Report | (Report | IPrintReport)[];
6550
+ data: IReportDataProvider;
6551
+ preview?: boolean;
6552
+ id?: string;
6553
+ async?: boolean;
6554
+ pageMark?: boolean;
6555
+ noScroll?: boolean;
6556
+ callback?: PrintPageCallback;
6557
+ endCallback?: PrintEndCallback;
6558
+ }
6427
6559
  /**
6428
6560
  */
6429
6561
  declare class PrintContainer extends VisualContainer$1 {
@@ -6445,6 +6577,7 @@ declare class PrintContainer extends VisualContainer$1 {
6445
6577
  private _pages;
6446
6578
  private _preview;
6447
6579
  private _previewId;
6580
+ private _options;
6448
6581
  constructor(containerId: string | HTMLDivElement);
6449
6582
  protected _doDispose(): void;
6450
6583
  /** pageCount */
@@ -6456,9 +6589,11 @@ declare class PrintContainer extends VisualContainer$1 {
6456
6589
  get zoom(): number;
6457
6590
  set zoom(value: number);
6458
6591
  get pages(): PrintPage[];
6459
- print(report: Report | (Report | IPrintReport)[], data: IReportDataProvider, preview: boolean, id?: string): void;
6460
- printSingle(report: Report, data: IReportDataProvider, preview: boolean, id?: string): void;
6461
- printAll(reports: (Report | IPrintReport)[], data: IReportDataProvider, preview: boolean, id?: string): void;
6592
+ print(options: IPrintOptions): void;
6593
+ printSingle(options: IPrintOptions): void;
6594
+ private $_printSingle2;
6595
+ printAll(options: IPrintOptions): void;
6596
+ private $_printAll2;
6462
6597
  isAllRendered(): boolean;
6463
6598
  getPrintHtml(): string;
6464
6599
  setStyles(styles: any): void;
@@ -6471,13 +6606,14 @@ declare class PrintContainer extends VisualContainer$1 {
6471
6606
  protected _doResized(): void;
6472
6607
  private $_showError;
6473
6608
  private $_createIndicator;
6474
- private $_print;
6475
- private $_print2;
6609
+ private $_refreshContextValues;
6610
+ private $_printAsync;
6611
+ private $_print2Async;
6476
6612
  private $_getContainer;
6477
6613
  private $_getPreviewer;
6478
6614
  private $_resetPreviewer;
6479
- private $_buildOutput;
6480
- private $_markRendered;
6615
+ private $_addPageSpace;
6616
+ private $_buildOutputAsync;
6481
6617
  private $_layoutFloatings;
6482
6618
  }
6483
6619
 
@@ -40389,6 +40525,12 @@ declare class TreeViewListener extends GridBaseListener {
40389
40525
  onTreeViewChanged(tree: TreeView$1, item: TreeItem): void;
40390
40526
  }
40391
40527
 
40528
+ declare type ErrorParams = {
40529
+ code: number;
40530
+ stop: boolean;
40531
+ msg?: string;
40532
+ };
40533
+
40392
40534
  /**
40393
40535
  * ReportViewer base class
40394
40536
  */
@@ -40397,12 +40539,25 @@ declare abstract class ReportViewBase {
40397
40539
  protected _cm: boolean;
40398
40540
  protected _container: PrintContainer | undefined;
40399
40541
  protected _currentPage: number;
40542
+ protected _containerId: string;
40400
40543
  constructor(container: string | HTMLDivElement, options?: ReportOptions);
40401
- abstract preview(): void;
40402
- abstract exportPdf(fonts: PdfFont[]): void;
40544
+ abstract preview(options: PreviewOptions): void;
40545
+ abstract exportPdf(options: PDFExportOptions): Promise<void>;
40403
40546
  abstract exportImage(imageOptions: ImageExportOptions): void;
40404
40547
  abstract exportDocument(documentOptions: DocExportOptions): void;
40405
- protected _checkPrintContainer(): void;
40548
+ /**
40549
+ * 컨테이너의 상태를 체크하기 위한 조건과 조건에 맞을 경우의 에러 처리코드를 넘겨 줍니다.
40550
+ * checker.is 가 true이면 errorParams로 error() 를 실행 합니다.
40551
+ *
40552
+ * @param checkers 에러 조건 및 error() 함수 인자
40553
+ */
40554
+ protected _checkPrintContainer(checkers?: {
40555
+ is: boolean;
40556
+ errorParams: ErrorParams;
40557
+ }[]): void;
40558
+ protected _checkPrintContainerZoom(): void;
40559
+ get containerId(): string;
40560
+ set containerId(container: string | HTMLDivElement);
40406
40561
  get version(): string;
40407
40562
  get zoom(): number;
40408
40563
  set zoom(v: number);
@@ -40439,12 +40594,12 @@ declare class ReportViewer extends ReportViewBase {
40439
40594
  /**
40440
40595
  * container에 리포트를 preview로 렌더링 합니다.
40441
40596
  */
40442
- preview(): void;
40597
+ preview(options?: PreviewOptions): void;
40443
40598
  /**
40444
- * PDF 내보내기 함수
40445
- * @param fonts
40599
+ * 리포트를 PDF파일로 다운로드 합니다.
40600
+ * @param options PDFExportOptions
40446
40601
  */
40447
- exportPdf(fonts: PdfFont[]): void;
40602
+ exportPdf(options: PDFExportOptions): Promise<void>;
40448
40603
  /**
40449
40604
  * 이미지 내보내기 함수
40450
40605
  * @param imageOptions
@@ -40485,7 +40640,7 @@ declare class GridReportViewer extends ReportViewer {
40485
40640
  /**
40486
40641
  * 컨테이너에 미리보기 랜더링
40487
40642
  */
40488
- preview(): void;
40643
+ preview(options?: PreviewOptions): void;
40489
40644
  /**
40490
40645
  * 타이틀 또는 서브 타이틀 추가
40491
40646
  * @param title GridReportTitle 객체
@@ -40526,8 +40681,8 @@ declare class ReportCompositeViewer extends ReportViewBase {
40526
40681
  * 매핑 정보
40527
40682
  * - form -> report
40528
40683
  */
40529
- preview(): void;
40530
- exportPdf(fonts: PdfFont[]): void;
40684
+ preview(options?: PreviewOptions): void;
40685
+ exportPdf(options: PDFExportOptions): Promise<void>;
40531
40686
  exportImage(imageOptions: ImageExportOptions): void;
40532
40687
  exportDocument(documentOptions: DocExportOptions): void;
40533
40688
  private _checkReportFormSet;
@@ -40556,5 +40711,52 @@ declare type GridReportLayout = {
40556
40711
  exclude?: ColumnName[];
40557
40712
  autoWidth: boolean;
40558
40713
  };
40714
+ /**
40715
+ * 리포트 프리뷰 옵션
40716
+ */
40717
+ declare type PreviewOptions = {
40718
+ /**
40719
+ * 비동기 출력 여부
40720
+ * default: false;
40721
+ */
40722
+ async?: boolean;
40723
+ /**
40724
+ * 비동기 출력시 출력 페이지 마커 표시 여부
40725
+ * default: false;
40726
+ */
40727
+ pageMark?: boolean;
40728
+ /**
40729
+ * 비동기 출력시 출력 페이지마다 스크롤 이동 여부
40730
+ * default: true;
40731
+ */
40732
+ noScroll?: boolean;
40733
+ /**
40734
+ * 미리보기가 시작될때 호출되는 콜백함수
40735
+ */
40736
+ callback?: PrintPageCallback;
40737
+ /**
40738
+ * 미리보기 끝날때 호출되는 콜백함수
40739
+ */
40740
+ endCallback?: PrintEndCallback;
40741
+ };
40742
+ /**
40743
+ * PDF내보내기시 인자로 사용되는 옵션
40744
+ */
40745
+ declare type PDFExportOptions = {
40746
+ /**
40747
+ * pdf 문서에서 사용할 폰트의 목록 입니다.
40748
+ */
40749
+ fonts: PdfFont[];
40750
+ /**
40751
+ * download할 때 사용할 filename
40752
+ * filename이 없으면 다운로드 되지 않습니다.
40753
+ */
40754
+ filename?: string;
40755
+ /**
40756
+ * 새로운 창을 열어 PDF문서를 미리보기 할 수 있습니다.
40757
+ * 지원되는 브라우저가 제한될 수 있습니다.
40758
+ */
40759
+ preview?: boolean;
40760
+ };
40559
40761
 
40560
- export { GridReportLayout, GridReportViewer, ReportCompositeViewer, ReportData, ReportDataSet, ReportForm, ReportFormSet, ReportFormSets, ReportOptions, ReportViewer };
40762
+ export { GridReportLayout, GridReportViewer, PDFExportOptions, PreviewOptions, ReportCompositeViewer, ReportData, ReportDataSet, ReportForm, ReportFormSet, ReportFormSets, ReportOptions, ReportViewer };