realreport 1.7.2 → 1.7.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.
@@ -12,7 +12,6 @@
12
12
  -moz-user-select: none;
13
13
  -ms-user-select: none;
14
14
  user-select: none;
15
- touch-action: none;
16
15
  -ms-touch-action: none;
17
16
  -webkit-print-color-adjust: exact;
18
17
  }
@@ -29,10 +28,7 @@
29
28
 
30
29
  .rr-report-preview {
31
30
  position: absolute;
32
- padding: 1px;
33
- /** 현재 이 설정이 없으면 중간 빈 페이지가 출력된다! */
34
31
  background-color: transparent;
35
- pointer-events: none;
36
32
  }
37
33
 
38
34
  .rr-feedback-container {
@@ -383,16 +379,11 @@
383
379
 
384
380
  .rr-page-break {
385
381
  margin-bottom: 20px;
386
- /** preview page 간격 */
387
382
  border: 1px solid gray;
388
383
  box-sizing: border-box;
389
384
  box-shadow: rgba(50, 54, 57, 0.15) 0px 1px 3px 1px;
390
385
  }
391
386
 
392
- .rr-print-back {
393
- position: absolute !important;
394
- }
395
-
396
387
  @page {
397
388
  margin: 0;
398
389
  }
@@ -1,8 +1,8 @@
1
1
  /// <reference types="pdfkit" />
2
2
  /// <reference types="node" />
3
3
  /**
4
- * RealReport v1.7.2
5
- * commit 3e2393d
4
+ * RealReport v1.7.4
5
+ * commit 8931b86
6
6
 
7
7
  * Copyright (C) 2013-2023 WooriTech Inc.
8
8
  https://real-report.com
@@ -10,10 +10,10 @@
10
10
  */
11
11
 
12
12
  /**
13
- * RealReport Core v1.7.2
13
+ * RealReport Core v1.7.4
14
14
  * Copyright (C) 2013-2023 WooriTech Inc.
15
15
  * All Rights Reserved.
16
- * commit 5f0ed42cb85e4af49c799269cc92ce9139da2dcd
16
+ * commit 92946b63c6b2aff0d7e155f742427f8fa8647b35
17
17
  */
18
18
  declare const enum Cursor$1 {
19
19
  DEFAULT = "default",
@@ -138,6 +138,10 @@ declare namespace ResizeDirection {
138
138
  function isEdge(dir: ResizeDirection): boolean;
139
139
  function isIn(dir: ResizeDirection, ...dirs: ResizeDirection[]): boolean;
140
140
  }
141
+ declare enum DataDirection {
142
+ ASCENDING = "ascending",
143
+ DESCENDING = "descending"
144
+ }
141
145
  /**
142
146
  * Find options
143
147
  */
@@ -1737,6 +1741,31 @@ declare class FieldValueRuntime extends ExpressionRuntime$1 {
1737
1741
  evaluateFunc(idKey: number, param: string): any;
1738
1742
  }
1739
1743
 
1744
+ /**
1745
+ * @filename BandDataView.ts
1746
+ * @author sykim <KIMSANGYEOB>
1747
+ * @date 2023.07.13
1748
+ * @description <밴드 데이터에서 추가적인 설정을 적용 후 표현하기 위해 작성>
1749
+ */
1750
+
1751
+ interface IBandDataView {
1752
+ rowCount: number;
1753
+ sort: (field: string, direction: DataDirection) => void;
1754
+ getRowValue: (row: number, field: string) => any;
1755
+ getFieldValues: (field: string, rows?: number[]) => any[];
1756
+ }
1757
+ declare class BandDataView extends Base$1 implements IBandDataView {
1758
+ static readonly SOURCE_INDEX = "_sourceIndex";
1759
+ private _source;
1760
+ private _view;
1761
+ constructor(data: IReportData);
1762
+ get rowCount(): number;
1763
+ sort(field: string, direction: DataDirection): this;
1764
+ getRowValue(row: number, field: string): any;
1765
+ getFieldValues(field: string, rows?: number[]): any[];
1766
+ $_isValidField(field: string): boolean;
1767
+ }
1768
+
1740
1769
  interface IBandDataField {
1741
1770
  fieldName: string;
1742
1771
  dataType?: "text" | "number" | "bool" | "datetime";
@@ -1770,7 +1799,7 @@ interface IBandData extends IReportData {
1770
1799
  getFieldValues(field: string | number): any[];
1771
1800
  equalValues(row: number, fields: string[], values: any[]): boolean;
1772
1801
  equalRows(row1: number, row2: number, fields?: string[]): boolean;
1773
- groupBy(fields: string[], rows: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1802
+ groupBy(dataView: BandDataView, fields: string[], rows: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1774
1803
  }
1775
1804
  declare abstract class BandData extends ReportData$1 {
1776
1805
  protected _fields: IBandDataField[];
@@ -1793,7 +1822,7 @@ declare abstract class BandData extends ReportData$1 {
1793
1822
  addField(index: number, field: IBandDataField): boolean;
1794
1823
  removeField(field: IBandDataField): boolean;
1795
1824
  abstract getRowValue(row: number, field: string | number): any;
1796
- groupBy(fields: string[], subRows?: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1825
+ groupBy(dataView: BandDataView, fields: string[], subRows?: number[]): (number | IBandRowGroup | IBandRowGroupFooter)[];
1797
1826
  readValue(field: IBandDataField, value: any): any;
1798
1827
  readRow(row: any): any;
1799
1828
  dateToStr(field: IBandDataField, v: Date): string;
@@ -2495,8 +2524,11 @@ declare abstract class DataBand extends ReportGroupItem {
2495
2524
  static readonly PROP_DATA_BAND_END_ROW_COUNT = "endRowCount";
2496
2525
  static readonly PROP_DATA_BAND_MAX_END_ROW_COUNT = "maxEndRowCount";
2497
2526
  static readonly PROP_DATA_BAND_END_ROW_MESSAGE = "endRowMessage";
2527
+ static readonly PROP_DATA_BAND_REPEAT_HEADER = "repeatHeader";
2498
2528
  static readonly PROP_DATA_BAND_ALWAYS_HEADER = "alwaysHeader";
2499
2529
  static readonly PROP_DATA_BAND_NO_SPLIT = "noSplit";
2530
+ static readonly PROP_DATA_BAND_SORT_FIELD = "sortField";
2531
+ static readonly PROP_DATA_BAND_SORT_DIRECTION = "sortDirection";
2500
2532
  static readonly PROPINFOS: IPropInfo[];
2501
2533
  private _sectionCount;
2502
2534
  private _sectionLayout;
@@ -2513,8 +2545,11 @@ declare abstract class DataBand extends ReportGroupItem {
2513
2545
  private _repeatMastreRow;
2514
2546
  private _repeatDetailHeader;
2515
2547
  private _repeatDetailFooter;
2548
+ private _repeatHeader;
2516
2549
  private _alwaysHeader;
2517
2550
  private _noSplit;
2551
+ private _sortField;
2552
+ private _sortDirection;
2518
2553
  private _detail;
2519
2554
  private _master;
2520
2555
  private _keyFlds;
@@ -2525,11 +2560,14 @@ declare abstract class DataBand extends ReportGroupItem {
2525
2560
  rowIndex: number;
2526
2561
  detailRows: number;
2527
2562
  masterValues: any;
2563
+ isNextPagePrintRow: boolean;
2564
+ _pr: number;
2565
+ _currentPrintRow: number;
2528
2566
  private _dataObj;
2529
2567
  private _designData;
2530
2568
  private _fieldSummary;
2531
2569
  private _summaryRuntime;
2532
- _pr: number;
2570
+ private _dataView;
2533
2571
  constructor(name: string);
2534
2572
  get dataObj(): IBandData;
2535
2573
  get designData(): IBandData;
@@ -2667,6 +2705,11 @@ declare abstract class DataBand extends ReportGroupItem {
2667
2705
  */
2668
2706
  get repeatDetailFooter(): boolean;
2669
2707
  set repeatDetailFooter(value: boolean);
2708
+ /**
2709
+ * 첫번째 밴드 헤더를 출력 후 장을 넘어갈 때 반복해서 헤더를 표시한다.
2710
+ */
2711
+ get repeatHeader(): boolean;
2712
+ set repeatHeader(value: boolean);
2670
2713
  /**
2671
2714
  * true면 데이터행 없이 footer만 표시되는 경우에도 header를 표시한다.
2672
2715
  */
@@ -2677,20 +2720,31 @@ declare abstract class DataBand extends ReportGroupItem {
2677
2720
  */
2678
2721
  get noSplit(): boolean;
2679
2722
  set noSplit(value: boolean);
2723
+ get sortField(): string;
2724
+ set sortField(value: string);
2725
+ get sortDirection(): DataDirection;
2726
+ set sortDirection(value: DataDirection);
2680
2727
  /**
2681
2728
  * summary runtime
2682
2729
  */
2683
2730
  get summaryRuntime(): DataBandSummaryRuntime;
2731
+ /**
2732
+ * Data View Model
2733
+ */
2734
+ get dataView(): BandDataView;
2735
+ /**
2736
+ * current Print Row Index
2737
+ */
2738
+ get currentPrintRow(): number;
2739
+ set currentPrintRow(value: number);
2684
2740
  prepareIndices(ctx: PrintContext): void;
2685
2741
  protected abstract _doPrepareIndices(ctx: PrintContext): void;
2686
2742
  getColPoints(w: number, x?: number): number[];
2687
2743
  getColWidth(w: number): number;
2688
- getValues(ctx: PrintContext, row: number, fields: string[]): any[];
2689
- protected _selectRow(data: IBandData, row: number, idx: number): boolean;
2690
- abstract getNextDetailRows(ctx: PrintContext): number[];
2691
- protected _getNextDetailRows(ctx: PrintContext, from: number): number[];
2692
- abstract skipDetailRows(ctx: PrintContext): void;
2693
- protected _skipDetailRows(ctx: PrintContext, from: number): number;
2744
+ getValues(dataView: BandDataView, row: number, fields: string[]): any[];
2745
+ protected _selectRow(dataView: BandDataView, row: number, idx: number): boolean;
2746
+ abstract getNextDetailRows(dataView: BandDataView, from?: number): number[];
2747
+ protected _getNextDetailRows(dataView: BandDataView, from: number): number[];
2694
2748
  getRowsPerPage(): {
2695
2749
  rowsPerPage: number;
2696
2750
  breakRowsPerPage: boolean;
@@ -3056,8 +3110,7 @@ declare class TableBand extends DataBand {
3056
3110
  protected _doPreparePrint(ctx: PrintContext): void;
3057
3111
  protected _doPrepareIndices(ctx: PrintContext): void;
3058
3112
  remove(item: ReportPageItem): void;
3059
- getNextDetailRows(ctx: PrintContext): number[];
3060
- skipDetailRows(ctx: PrintContext): void;
3113
+ getNextDetailRows(dataView: BandDataView, from?: number): number[];
3061
3114
  containsInSection(item: ReportItem): boolean;
3062
3115
  }
3063
3116
 
@@ -3331,8 +3384,7 @@ declare class SimpleBand extends DataBand {
3331
3384
  protected _doPreparePrint(ctx: PrintContext): void;
3332
3385
  protected _doPrepareIndices(ctx: PrintContext): void;
3333
3386
  canRemove(item: ReportItem): boolean;
3334
- getNextDetailRows(ctx: PrintContext): number[];
3335
- skipDetailRows(ctx: PrintContext): void;
3387
+ getNextDetailRows(dataView: BandDataView, from?: number): number[];
3336
3388
  containsInSection(item: ReportItem): boolean;
3337
3389
  }
3338
3390
 
@@ -3460,7 +3512,13 @@ declare abstract class ReportItemElement<T extends ReportItem> extends ReportEle
3460
3512
  getEditText(): string;
3461
3513
  setEditText(report: Report, text: string): void;
3462
3514
  refreshPrintValues(ctx: PrintContext): void;
3463
- get printable(): boolean;
3515
+ /**
3516
+ * - ReportItem에 visibileCallback 핸들러가 정의되어 있다면 핸들러의 반환값에 의해 아이템 표시여부 결정
3517
+ * - 핸들러가 정의되어 있지 않거나 반환값이 boolean 값이 아닐경우 기존 아이템 속성의 Visible 값으로 표시여부 결정
3518
+ * @param {PrintContext} ctx - PrintContext 객체 정보
3519
+ * @returns {boolean}
3520
+ */
3521
+ isPrintable(ctx: PrintContext): boolean;
3464
3522
  protected _getModel(): T;
3465
3523
  protected _initDom(doc: Document, dom: HTMLElement): void;
3466
3524
  protected _setBindMarker(visible?: boolean, system?: boolean): void;
@@ -5175,6 +5233,7 @@ type ReportItemValueCallback = (ctx: PrintContext, item: ReportItem, row: number
5175
5233
  type ReportItemStyleCallback = (ctx: PrintContext, item: ReportItem, row: number, value: any) => {
5176
5234
  [key: string]: string | undefined;
5177
5235
  };
5236
+ type ReportItemVisibleCallback = (ctx: PrintContext, item: ReportItem, row: number, value: any) => boolean;
5178
5237
  /**
5179
5238
  * Report 구성 요소 기반 클래스.
5180
5239
  *
@@ -5194,6 +5253,7 @@ declare abstract class ReportItem extends ReportPageItem {
5194
5253
  static readonly PROP_BOTTOM = "bottom";
5195
5254
  static readonly PROP_DESIGN_BORDER = "designBorder";
5196
5255
  static readonly PROP_ON_GET_VALUE = "onGetValue";
5256
+ static readonly PROP_ON_GET_VISIBLE = "onGetVisible";
5197
5257
  static readonly PROP_STYLES = "styles";
5198
5258
  static readonly PROP_ON_GET_STYLES = "onGetStyles";
5199
5259
  static readonly PROP_VISIBLE = "visible";
@@ -5246,6 +5306,8 @@ declare abstract class ReportItem extends ReportPageItem {
5246
5306
  private _name;
5247
5307
  private _tag;
5248
5308
  private _visible;
5309
+ private _visibleCallback;
5310
+ private _onGetVisible;
5249
5311
  private _data;
5250
5312
  private _value;
5251
5313
  private _valueCallback;
@@ -5274,6 +5336,8 @@ declare abstract class ReportItem extends ReportPageItem {
5274
5336
  private _valueCallbackDelegate;
5275
5337
  private _styleCallbackFunc;
5276
5338
  private _styleCallbackDelegate;
5339
+ private _visibleCallbackFunc;
5340
+ private _visibleCallbackDelegate;
5277
5341
  private _leftDim;
5278
5342
  private _rightDim;
5279
5343
  private _topDim;
@@ -5423,6 +5487,14 @@ declare abstract class ReportItem extends ReportPageItem {
5423
5487
  /** valueCallback */
5424
5488
  get valueCallback(): ReportItemValueCallback;
5425
5489
  set valueCallback(value: ReportItemValueCallback);
5490
+ /**
5491
+ * onGetVisible
5492
+ */
5493
+ get onGetVisible(): string;
5494
+ set onGetVisible(value: string);
5495
+ /** visibleCallback */
5496
+ get visibleCallback(): ReportItemVisibleCallback;
5497
+ set visibleCallback(value: ReportItemVisibleCallback);
5426
5498
  /** styles */
5427
5499
  get styles(): Styles;
5428
5500
  set styles(value: Styles);
@@ -5572,6 +5644,7 @@ declare abstract class ReportItem extends ReportPageItem {
5572
5644
  */
5573
5645
  getPrintValue(dp: IReportDataProvider, row: number): any;
5574
5646
  getLinkValue(dp: IReportDataProvider, row: number): any;
5647
+ getDataViewValue(dv: BandDataView, row: number): any;
5575
5648
  protected _getParentData(): string;
5576
5649
  canRemoveFrom(): boolean;
5577
5650
  canAdoptDragSource(source: any): boolean;
@@ -6789,6 +6862,16 @@ declare class PrintContext extends Base$1 {
6789
6862
  saveBand(): void;
6790
6863
  restoreBand(): void;
6791
6864
  getBaseView(view: InheritableSectionElement<any>, viewType: string): InheritableSectionElement<any>;
6865
+ /**
6866
+ * - 현재 출력중인 data row를 반환
6867
+ * @returns 0부터 시작하며 현재 출력중인 band의 row index 반환
6868
+ */
6869
+ getPrintingRow(): number;
6870
+ /**
6871
+ * - 정렬 적용 후에도 onGetValue, onGetStyles 이벤트에서 사용하는 row 인자에 원본 데이터의 index를 반환하기 위해 작성
6872
+ * @returns 원본 데이터의 index 반환
6873
+ */
6874
+ getSourceIndex(): number;
6792
6875
  }
6793
6876
  type ContextValueCallback = (ctx: PrintContext) => any;
6794
6877
  declare class PageBreaker {
@@ -6845,6 +6928,7 @@ interface IReportData {
6845
6928
  getSaveType(): string;
6846
6929
  getSaveValues(): any;
6847
6930
  getValue(path: string): any;
6931
+ getValues(): any[];
6848
6932
  }
6849
6933
  interface IReportDataProvider {
6850
6934
  designTime?: boolean;
@@ -6883,6 +6967,7 @@ declare class SimpleData extends ReportData$1 implements IReportData {
6883
6967
  * TODO: array index
6884
6968
  */
6885
6969
  getValue(path?: string): any;
6970
+ getValues(): any;
6886
6971
  get sample(): any;
6887
6972
  setSample(values: any): void;
6888
6973
  getFieldNames(): string[];
@@ -6903,6 +6988,8 @@ interface IPreviewOptions {
6903
6988
  noScroll?: boolean;
6904
6989
  noIndicator?: boolean;
6905
6990
  singlePage?: boolean;
6991
+ singlePageOptions?: ISinglePageOptions;
6992
+ align?: Align;
6906
6993
  callback?: PrintPageCallback;
6907
6994
  endCallback?: PrintEndCallback;
6908
6995
  }
@@ -6913,6 +7000,9 @@ interface IPrintOptions {
6913
7000
  id?: string;
6914
7001
  previewOptions?: IPreviewOptions;
6915
7002
  }
7003
+ interface ISinglePageOptions {
7004
+ border: boolean;
7005
+ }
6916
7006
  declare class PrintContainer extends VisualContainer$1 {
6917
7007
  static readonly CLASS_NAME = "rr-report-container";
6918
7008
  static readonly PREVIEW_CLASS = "rr-report-preview";
@@ -6948,6 +7038,8 @@ declare class PrintContainer extends VisualContainer$1 {
6948
7038
  get zoom(): number;
6949
7039
  set zoom(value: number);
6950
7040
  get pages(): PrintPage[];
7041
+ get align(): Align;
7042
+ set align(value: Align);
6951
7043
  print(options: IPrintOptions): void;
6952
7044
  printSingle(options: IPrintOptions): void;
6953
7045
  printAll(options: IPrintOptions): void;
@@ -41100,25 +41192,36 @@ declare type GridReportLayout = {
41100
41192
  * 리포트 프리뷰 옵션
41101
41193
  */
41102
41194
  declare type PreviewOptions = {
41103
- /**
41104
- * 리포트간 간격 조절 옵션
41105
- */
41106
- pageGap?: number;
41107
41195
  /**
41108
41196
  * 비동기 출력 여부
41109
- * default: false;
41197
+ * @defaultValue `false`
41110
41198
  */
41111
41199
  async?: boolean;
41112
41200
  /**
41113
41201
  * 비동기 출력시 출력 페이지 마커 표시 여부
41114
- * default: false;
41202
+ * @defaultValue `false`
41115
41203
  */
41116
41204
  pageMark?: boolean;
41117
41205
  /**
41118
41206
  * 비동기 출력시 출력 페이지마다 스크롤 이동 여부
41119
- * default: true;
41207
+ * @defaultValue `true`
41120
41208
  */
41121
41209
  noScroll?: boolean;
41210
+ /**
41211
+ * 리포트 컨테이너에 페이지 정렬 설정
41212
+ * @defaultValue `Align.CENTER`
41213
+ */
41214
+ align?: Align;
41215
+ /**
41216
+ * 리포트를 한장에 여백없이 출력하는 옵션
41217
+ * @defaultValue `false`
41218
+ */
41219
+ singlePage?: boolean;
41220
+ /**
41221
+ * 싱글 페이지일 경우 관련 옵션
41222
+ * @defaultValue `{ border: true }`
41223
+ */
41224
+ singlePageOptions?: ISinglePageOptions;
41122
41225
  /**
41123
41226
  * 미리보기가 시작될때 호출되는 콜백함수
41124
41227
  */