@reportman/engine 0.0.0-stage → 0.1.0-alpha.1

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.
Files changed (244) hide show
  1. package/LICENSE +373 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/data/columns.d.ts +50 -0
  4. package/dist/data/columns.d.ts.map +1 -0
  5. package/dist/data/columns.js +385 -0
  6. package/dist/data/columns.js.map +1 -0
  7. package/dist/data/databaseinfo.d.ts +41 -0
  8. package/dist/data/databaseinfo.d.ts.map +1 -0
  9. package/dist/data/databaseinfo.js +145 -0
  10. package/dist/data/databaseinfo.js.map +1 -0
  11. package/dist/data/datainfo.d.ts +82 -0
  12. package/dist/data/datainfo.d.ts.map +1 -0
  13. package/dist/data/datainfo.js +449 -0
  14. package/dist/data/datainfo.js.map +1 -0
  15. package/dist/data/errors.d.ts +8 -0
  16. package/dist/data/errors.d.ts.map +1 -0
  17. package/dist/data/errors.js +14 -0
  18. package/dist/data/errors.js.map +1 -0
  19. package/dist/data/host.d.ts +132 -0
  20. package/dist/data/host.d.ts.map +1 -0
  21. package/dist/data/host.js +108 -0
  22. package/dist/data/host.js.map +1 -0
  23. package/dist/data/op.d.ts +21 -0
  24. package/dist/data/op.d.ts.map +1 -0
  25. package/dist/data/op.js +97 -0
  26. package/dist/data/op.js.map +1 -0
  27. package/dist/data/reportdataset.d.ts +116 -0
  28. package/dist/data/reportdataset.d.ts.map +1 -0
  29. package/dist/data/reportdataset.js +396 -0
  30. package/dist/data/reportdataset.js.map +1 -0
  31. package/dist/data/transfer.d.ts +46 -0
  32. package/dist/data/transfer.d.ts.map +1 -0
  33. package/dist/data/transfer.js +100 -0
  34. package/dist/data/transfer.js.map +1 -0
  35. package/dist/data/union.d.ts +88 -0
  36. package/dist/data/union.d.ts.map +1 -0
  37. package/dist/data/union.js +733 -0
  38. package/dist/data/union.js.map +1 -0
  39. package/dist/eval/chinesetables.d.ts +5 -0
  40. package/dist/eval/chinesetables.d.ts.map +1 -0
  41. package/dist/eval/chinesetables.js +8 -0
  42. package/dist/eval/chinesetables.js.map +1 -0
  43. package/dist/eval/evaluator.d.ts +100 -0
  44. package/dist/eval/evaluator.d.ts.map +1 -0
  45. package/dist/eval/evaluator.js +667 -0
  46. package/dist/eval/evaluator.js.map +1 -0
  47. package/dist/eval/exception.d.ts +9 -0
  48. package/dist/eval/exception.d.ts.map +1 -0
  49. package/dist/eval/exception.js +15 -0
  50. package/dist/eval/exception.js.map +1 -0
  51. package/dist/eval/fields.d.ts +60 -0
  52. package/dist/eval/fields.d.ts.map +1 -0
  53. package/dist/eval/fields.js +104 -0
  54. package/dist/eval/fields.js.map +1 -0
  55. package/dist/eval/functions.d.ts +27 -0
  56. package/dist/eval/functions.d.ts.map +1 -0
  57. package/dist/eval/functions.js +810 -0
  58. package/dist/eval/functions.js.map +1 -0
  59. package/dist/eval/identifiers.d.ts +100 -0
  60. package/dist/eval/identifiers.d.ts.map +1 -0
  61. package/dist/eval/identifiers.js +195 -0
  62. package/dist/eval/identifiers.js.map +1 -0
  63. package/dist/eval/parser.d.ts +47 -0
  64. package/dist/eval/parser.d.ts.map +1 -0
  65. package/dist/eval/parser.js +336 -0
  66. package/dist/eval/parser.js.map +1 -0
  67. package/dist/index.d.ts +52 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +42 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/params/param.d.ts +92 -0
  72. package/dist/params/param.d.ts.map +1 -0
  73. package/dist/params/param.js +358 -0
  74. package/dist/params/param.js.map +1 -0
  75. package/dist/params/parameters.d.ts +87 -0
  76. package/dist/params/parameters.d.ts.map +1 -0
  77. package/dist/params/parameters.js +499 -0
  78. package/dist/params/parameters.js.map +1 -0
  79. package/dist/report/barcode/barcodeitem.d.ts +76 -0
  80. package/dist/report/barcode/barcodeitem.d.ts.map +1 -0
  81. package/dist/report/barcode/barcodeitem.js +864 -0
  82. package/dist/report/barcode/barcodeitem.js.map +1 -0
  83. package/dist/report/barcode/code128.d.ts +18 -0
  84. package/dist/report/barcode/code128.d.ts.map +1 -0
  85. package/dist/report/barcode/code128.js +187 -0
  86. package/dist/report/barcode/code128.js.map +1 -0
  87. package/dist/report/barcode/netutil.d.ts +30 -0
  88. package/dist/report/barcode/netutil.d.ts.map +1 -0
  89. package/dist/report/barcode/netutil.js +65 -0
  90. package/dist/report/barcode/netutil.js.map +1 -0
  91. package/dist/report/barcode/pdf417.d.ts +17 -0
  92. package/dist/report/barcode/pdf417.d.ts.map +1 -0
  93. package/dist/report/barcode/pdf417.js +782 -0
  94. package/dist/report/barcode/pdf417.js.map +1 -0
  95. package/dist/report/barcode/pdf417tables.d.ts +11 -0
  96. package/dist/report/barcode/pdf417tables.d.ts.map +1 -0
  97. package/dist/report/barcode/pdf417tables.js +880 -0
  98. package/dist/report/barcode/pdf417tables.js.map +1 -0
  99. package/dist/report/barcode/qrcode.d.ts +14 -0
  100. package/dist/report/barcode/qrcode.d.ts.map +1 -0
  101. package/dist/report/barcode/qrcode.js +214 -0
  102. package/dist/report/barcode/qrcode.js.map +1 -0
  103. package/dist/report/barcode/zxingwidth.d.ts +4 -0
  104. package/dist/report/barcode/zxingwidth.d.ts.map +1 -0
  105. package/dist/report/barcode/zxingwidth.js +247 -0
  106. package/dist/report/barcode/zxingwidth.js.map +1 -0
  107. package/dist/report/chart/chartidens.d.ts +70 -0
  108. package/dist/report/chart/chartidens.d.ts.map +1 -0
  109. package/dist/report/chart/chartidens.js +162 -0
  110. package/dist/report/chart/chartidens.js.map +1 -0
  111. package/dist/report/chart/chartitem.d.ts +110 -0
  112. package/dist/report/chart/chartitem.d.ts.map +1 -0
  113. package/dist/report/chart/chartitem.js +403 -0
  114. package/dist/report/chart/chartitem.js.map +1 -0
  115. package/dist/report/chart/series.d.ts +65 -0
  116. package/dist/report/chart/series.d.ts.map +1 -0
  117. package/dist/report/chart/series.js +74 -0
  118. package/dist/report/chart/series.js.map +1 -0
  119. package/dist/report/chart/vectorchart.d.ts +18 -0
  120. package/dist/report/chart/vectorchart.d.ts.map +1 -0
  121. package/dist/report/chart/vectorchart.js +356 -0
  122. package/dist/report/chart/vectorchart.js.map +1 -0
  123. package/dist/report/convert.d.ts +4 -0
  124. package/dist/report/convert.d.ts.map +1 -0
  125. package/dist/report/convert.js +162 -0
  126. package/dist/report/convert.js.map +1 -0
  127. package/dist/report/errors.d.ts +13 -0
  128. package/dist/report/errors.d.ts.map +1 -0
  129. package/dist/report/errors.js +20 -0
  130. package/dist/report/errors.js.map +1 -0
  131. package/dist/report/identifiers.d.ts +91 -0
  132. package/dist/report/identifiers.d.ts.map +1 -0
  133. package/dist/report/identifiers.js +404 -0
  134. package/dist/report/identifiers.js.map +1 -0
  135. package/dist/report/imageitem.d.ts +66 -0
  136. package/dist/report/imageitem.d.ts.map +1 -0
  137. package/dist/report/imageitem.js +190 -0
  138. package/dist/report/imageitem.js.map +1 -0
  139. package/dist/report/items.d.ts +219 -0
  140. package/dist/report/items.d.ts.map +1 -0
  141. package/dist/report/items.js +1015 -0
  142. package/dist/report/items.js.map +1 -0
  143. package/dist/report/report.d.ts +221 -0
  144. package/dist/report/report.d.ts.map +1 -0
  145. package/dist/report/report.js +1968 -0
  146. package/dist/report/report.js.map +1 -0
  147. package/dist/report/run.d.ts +87 -0
  148. package/dist/report/run.d.ts.map +1 -0
  149. package/dist/report/run.js +121 -0
  150. package/dist/report/run.js.map +1 -0
  151. package/dist/report/section.d.ts +86 -0
  152. package/dist/report/section.d.ts.map +1 -0
  153. package/dist/report/section.js +325 -0
  154. package/dist/report/section.js.map +1 -0
  155. package/dist/report/subreport.d.ts +49 -0
  156. package/dist/report/subreport.d.ts.map +1 -0
  157. package/dist/report/subreport.js +220 -0
  158. package/dist/report/subreport.js.map +1 -0
  159. package/dist/util/base64.d.ts +9 -0
  160. package/dist/util/base64.d.ts.map +1 -0
  161. package/dist/util/base64.js +60 -0
  162. package/dist/util/base64.js.map +1 -0
  163. package/dist/util/chars.d.ts +45 -0
  164. package/dist/util/chars.d.ts.map +1 -0
  165. package/dist/util/chars.js +194 -0
  166. package/dist/util/chars.js.map +1 -0
  167. package/dist/util/compositeformat.d.ts +3 -0
  168. package/dist/util/compositeformat.d.ts.map +1 -0
  169. package/dist/util/compositeformat.js +99 -0
  170. package/dist/util/compositeformat.js.map +1 -0
  171. package/dist/util/culture.d.ts +84 -0
  172. package/dist/util/culture.d.ts.map +1 -0
  173. package/dist/util/culture.js +59 -0
  174. package/dist/util/culture.js.map +1 -0
  175. package/dist/util/cultures.generated.d.ts +3 -0
  176. package/dist/util/cultures.generated.d.ts.map +1 -0
  177. package/dist/util/cultures.generated.js +1043 -0
  178. package/dist/util/cultures.generated.js.map +1 -0
  179. package/dist/util/dateformat.d.ts +21 -0
  180. package/dist/util/dateformat.d.ts.map +1 -0
  181. package/dist/util/dateformat.js +439 -0
  182. package/dist/util/dateformat.js.map +1 -0
  183. package/dist/util/dateparse.d.ts +12 -0
  184. package/dist/util/dateparse.d.ts.map +1 -0
  185. package/dist/util/dateparse.js +1212 -0
  186. package/dist/util/dateparse.js.map +1 -0
  187. package/dist/util/datetime.d.ts +70 -0
  188. package/dist/util/datetime.d.ts.map +1 -0
  189. package/dist/util/datetime.js +265 -0
  190. package/dist/util/datetime.js.map +1 -0
  191. package/dist/util/decimal.d.ts +54 -0
  192. package/dist/util/decimal.d.ts.map +1 -0
  193. package/dist/util/decimal.js +365 -0
  194. package/dist/util/decimal.js.map +1 -0
  195. package/dist/util/delphitext.d.ts +40 -0
  196. package/dist/util/delphitext.d.ts.map +1 -0
  197. package/dist/util/delphitext.js +408 -0
  198. package/dist/util/delphitext.js.map +1 -0
  199. package/dist/util/doubleutil.d.ts +30 -0
  200. package/dist/util/doubleutil.d.ts.map +1 -0
  201. package/dist/util/doubleutil.js +651 -0
  202. package/dist/util/doubleutil.js.map +1 -0
  203. package/dist/util/inflate.d.ts +7 -0
  204. package/dist/util/inflate.d.ts.map +1 -0
  205. package/dist/util/inflate.js +256 -0
  206. package/dist/util/inflate.js.map +1 -0
  207. package/dist/util/netexception.d.ts +59 -0
  208. package/dist/util/netexception.d.ts.map +1 -0
  209. package/dist/util/netexception.js +94 -0
  210. package/dist/util/netexception.js.map +1 -0
  211. package/dist/util/numberformat.d.ts +14 -0
  212. package/dist/util/numberformat.d.ts.map +1 -0
  213. package/dist/util/numberformat.js +828 -0
  214. package/dist/util/numberformat.js.map +1 -0
  215. package/dist/util/numberparse.d.ts +49 -0
  216. package/dist/util/numberparse.d.ts.map +1 -0
  217. package/dist/util/numberparse.js +568 -0
  218. package/dist/util/numberparse.js.map +1 -0
  219. package/dist/util/reportmanres.en.generated.d.ts +2 -0
  220. package/dist/util/reportmanres.en.generated.d.ts.map +1 -0
  221. package/dist/util/reportmanres.en.generated.js +2082 -0
  222. package/dist/util/reportmanres.en.generated.js.map +1 -0
  223. package/dist/util/reportmanres.es.generated.d.ts +2 -0
  224. package/dist/util/reportmanres.es.generated.d.ts.map +1 -0
  225. package/dist/util/reportmanres.es.generated.js +2082 -0
  226. package/dist/util/reportmanres.es.generated.js.map +1 -0
  227. package/dist/util/translator.d.ts +29 -0
  228. package/dist/util/translator.d.ts.map +1 -0
  229. package/dist/util/translator.js +79 -0
  230. package/dist/util/translator.js.map +1 -0
  231. package/dist/variant/coercion.d.ts +9 -0
  232. package/dist/variant/coercion.d.ts.map +1 -0
  233. package/dist/variant/coercion.js +298 -0
  234. package/dist/variant/coercion.js.map +1 -0
  235. package/dist/variant/context.d.ts +25 -0
  236. package/dist/variant/context.d.ts.map +1 -0
  237. package/dist/variant/context.js +22 -0
  238. package/dist/variant/context.js.map +1 -0
  239. package/dist/variant/variant.d.ts +193 -0
  240. package/dist/variant/variant.d.ts.map +1 -0
  241. package/dist/variant/variant.js +1229 -0
  242. package/dist/variant/variant.js.map +1 -0
  243. package/package.json +35 -4
  244. package/README.md +0 -3
@@ -0,0 +1,325 @@
1
+ // Port of the runtime part of Reportman.Reporting.Section: a section measures and prints its
2
+ // items, grows and shrinks with them (AutoExpand, AutoContract), keeps the value of its group and
3
+ // the page count references of GROUPPAGECOUNT.
4
+ import { messageOf } from '../util/netexception.js';
5
+ import { Variant } from '../variant/variant.js';
6
+ import { ReportException } from './errors.js';
7
+ import { ExpressionItem, PrintItem, PrintItemAlign, pt, SubReportEvent, } from './items.js';
8
+ import { ImageStreamSource, printSectionBackground } from './imageitem.js';
9
+ /** SectionType. */
10
+ export var SectionType;
11
+ (function (SectionType) {
12
+ SectionType[SectionType["PageHeader"] = 0] = "PageHeader";
13
+ SectionType[SectionType["GroupHeader"] = 1] = "GroupHeader";
14
+ SectionType[SectionType["Detail"] = 2] = "Detail";
15
+ SectionType[SectionType["GroupFooter"] = 3] = "GroupFooter";
16
+ SectionType[SectionType["PageFooter"] = 4] = "PageFooter";
17
+ })(SectionType || (SectionType = {}));
18
+ /** SkipType. */
19
+ export var SkipType;
20
+ (function (SkipType) {
21
+ SkipType[SkipType["Default"] = 0] = "Default";
22
+ SkipType[SkipType["Before"] = 1] = "Before";
23
+ SkipType[SkipType["After"] = 2] = "After";
24
+ })(SkipType || (SkipType = {}));
25
+ /** BackStyleType. */
26
+ export var BackStyleType;
27
+ (function (BackStyleType) {
28
+ BackStyleType[BackStyleType["Design"] = 0] = "Design";
29
+ BackStyleType[BackStyleType["Preview"] = 1] = "Preview";
30
+ BackStyleType[BackStyleType["Print"] = 2] = "Print";
31
+ })(BackStyleType || (BackStyleType = {}));
32
+ const INT_MAX = 2147483647;
33
+ export class SectionRuntime extends PrintItem {
34
+ model;
35
+ changeExpression;
36
+ changeBool;
37
+ pageRepeat;
38
+ skipPage;
39
+ beginPageExpression;
40
+ skipType;
41
+ skipToPageExpre;
42
+ skipRelativeH;
43
+ skipRelativeV;
44
+ skipExpreH;
45
+ skipExpreV;
46
+ alignBottom;
47
+ autoExpand;
48
+ autoContract;
49
+ horzDesp;
50
+ vertDesp;
51
+ /** The child subreport, printed after the section. */
52
+ childSubReport = null;
53
+ forcePrint;
54
+ iniNumPage;
55
+ global;
56
+ dpires;
57
+ backStyle;
58
+ sectionType;
59
+ groupName;
60
+ backExpression;
61
+ /** The value of the group expression for the current group. */
62
+ groupValue = Variant.null;
63
+ fPageGroupCountList = [];
64
+ /** The image draw style of the background (ImageDrawStyleType). */
65
+ drawStyle;
66
+ sharedImage;
67
+ /** The background image (embedded or given by the background expression). */
68
+ background;
69
+ /** While processing, the first page of the group. */
70
+ firstPage = 0;
71
+ /** The subreport the section belongs to (null when the report does not name it, as in C#). */
72
+ subReport = null;
73
+ components = [];
74
+ constructor(report, model) {
75
+ super(report, model);
76
+ this.model = model;
77
+ this.changeExpression = model.changeExpression;
78
+ this.changeBool = model.changeBool;
79
+ this.pageRepeat = model.pageRepeat;
80
+ this.skipPage = model.skipPage;
81
+ this.beginPageExpression = model.beginPageExpression;
82
+ this.skipType = model.skipType;
83
+ this.skipToPageExpre = model.skipToPageExpre;
84
+ this.skipRelativeH = model.skipRelativeH;
85
+ this.skipRelativeV = model.skipRelativeV;
86
+ this.skipExpreH = model.skipExpreH;
87
+ this.skipExpreV = model.skipExpreV;
88
+ this.alignBottom = model.alignBottom;
89
+ this.autoExpand = model.autoExpand;
90
+ this.autoContract = model.autoContract;
91
+ this.horzDesp = model.horzDesp;
92
+ this.vertDesp = model.vertDesp;
93
+ this.forcePrint = model.forcePrint;
94
+ this.iniNumPage = model.iniNumPage;
95
+ this.global = model.global;
96
+ this.dpires = model.dpires;
97
+ this.backStyle = model.backStyle;
98
+ this.sectionType = model.sectionType;
99
+ this.groupName = model.groupName;
100
+ this.backExpression = model.backExpression;
101
+ this.drawStyle = model.drawStyle;
102
+ this.sharedImage = model.sharedImage;
103
+ this.background = new ImageStreamSource(report, model.streamBase64);
104
+ }
105
+ clearPageCountList() {
106
+ this.fPageGroupCountList.length = 0;
107
+ }
108
+ /** UpdatePageCounts: GROUPPAGECOUNT gets the pages of the group. */
109
+ updatePageCounts() {
110
+ const meta = this.report.metaFile;
111
+ meta.updateTotalPagesPCount(this.fPageGroupCountList, meta.pages.currentCount - this.firstPage, this.report.integerFormatter);
112
+ }
113
+ subReportChanged(newstate, newgroup) {
114
+ super.subReportChanged(newstate, newgroup);
115
+ if (newstate === SubReportEvent.Start) {
116
+ this.firstPage = 0;
117
+ this.background.reset();
118
+ }
119
+ }
120
+ /** EvaluateBeginPage: the section must begin a page. */
121
+ evaluateBeginPage() {
122
+ if (this.beginPageExpression.length === 0)
123
+ return false;
124
+ const ev = this.report.evaluator;
125
+ ev.expression = this.beginPageExpression;
126
+ try {
127
+ ev.evaluate();
128
+ return ev.result.toBool(ev.context);
129
+ }
130
+ catch (e) {
131
+ throw new ReportException(messageOf(e) + '\n' + this.name + ' Prop:BeginPageExpression', this.name, 'BeginPageExpression');
132
+ }
133
+ }
134
+ hasPartial() {
135
+ for (const c of this.components)
136
+ if (c instanceof ExpressionItem && c.isPartial)
137
+ return true;
138
+ return false;
139
+ }
140
+ getExtension(adriver, maxExtent, forcePartial) {
141
+ let newextent = pt(this.width, this.height);
142
+ const aresult = super.getExtension(adriver, maxExtent, forcePartial);
143
+ const doPartialPrint = this.hasPartial();
144
+ let minsize;
145
+ let currentsize;
146
+ if (this.autoContract) {
147
+ minsize = 0;
148
+ currentsize = 0;
149
+ }
150
+ else {
151
+ minsize = aresult.y;
152
+ currentsize = aresult.y;
153
+ }
154
+ // C# parity: without AutoExpand the limit is the width of the section
155
+ const maxsize = this.autoExpand ? INT_MAX : aresult.x;
156
+ if (!this.autoExpand && !this.autoContract) {
157
+ aresult.y = currentsize;
158
+ this.lastExtent = { ...aresult };
159
+ for (const acompo of this.components) {
160
+ if (acompo.align !== PrintItemAlign.None)
161
+ acompo.getExtension(adriver, { ...newextent }, forcePartial);
162
+ }
163
+ return aresult;
164
+ }
165
+ for (const acompo of this.components) {
166
+ if (acompo.evaluatePrintCondition()) {
167
+ if (doPartialPrint) {
168
+ if (acompo instanceof ExpressionItem && acompo.isPartial) {
169
+ newextent = { ...maxExtent };
170
+ newextent.y = newextent.y - acompo.posY;
171
+ const compsize = acompo.getExtension(adriver, newextent, forcePartial);
172
+ if (compsize.y > 0) {
173
+ const newsize = acompo.align === PrintItemAlign.Bottom || acompo.align === PrintItemAlign.Right ? compsize.y : acompo.posY + compsize.y;
174
+ if (newsize < maxsize && newsize > currentsize)
175
+ currentsize = newsize;
176
+ }
177
+ }
178
+ }
179
+ else {
180
+ newextent = { ...maxExtent };
181
+ newextent.y = newextent.y - acompo.posY;
182
+ const compsize = acompo.getExtension(adriver, newextent, forcePartial);
183
+ if (compsize.y > 0) {
184
+ const newsize = acompo.align === PrintItemAlign.Bottom || acompo.align === PrintItemAlign.Right ? compsize.y : acompo.posY + compsize.y;
185
+ if (newsize < maxsize && newsize > currentsize)
186
+ currentsize = newsize;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ if (currentsize < minsize)
192
+ currentsize = minsize;
193
+ aresult.y = currentsize;
194
+ this.lastExtent = { ...aresult };
195
+ return aresult;
196
+ }
197
+ /**
198
+ * GetStream: the background image (the embedded one, decompressed, or the one the background
199
+ * expression gives); null when there is none.
200
+ */
201
+ getStream() {
202
+ return this.background.getStream(this.backExpression, this.sharedImage);
203
+ }
204
+ doPrint(adriver, aposx, aposy, newwidth, newheight, metafile, maxExtent, partialPrint) {
205
+ super.doPrint(adriver, aposx, aposy, newwidth, newheight, metafile, maxExtent, partialPrint);
206
+ // Draw the background if needed
207
+ if (this.backStyle !== BackStyleType.Design) {
208
+ const astream = this.getStream();
209
+ // C# parity: a section with a background style and no background image prints no items
210
+ if (astream === null)
211
+ return;
212
+ if (astream.length > 0)
213
+ printSectionBackground(this.background, astream, metafile, aposx, aposy, this.printWidth, this.printHeight, this.drawStyle, this.dpires, this.backStyle === BackStyleType.Preview, this.sharedImage);
214
+ }
215
+ const doPartialPrint = this.hasPartial();
216
+ // C# parity: compe keeps the last expression item seen, also by the loop above
217
+ let compe = null;
218
+ for (const c of this.components) {
219
+ if (c instanceof ExpressionItem) {
220
+ compe = c;
221
+ if (c.isPartial)
222
+ break;
223
+ }
224
+ }
225
+ partialPrint.value = false;
226
+ for (const compo of this.components) {
227
+ let nwidth = -1;
228
+ let nheight = -1;
229
+ let newposx;
230
+ let newposy;
231
+ switch (compo.align) {
232
+ case PrintItemAlign.Bottom:
233
+ newposx = aposx + compo.posX;
234
+ newposy = aposy + this.lastExtent.y - compo.lastExtent.y;
235
+ break;
236
+ case PrintItemAlign.Right:
237
+ newposx = aposx + this.lastExtent.x - compo.lastExtent.x;
238
+ newposy = aposy + compo.posY;
239
+ break;
240
+ case PrintItemAlign.BottomRight:
241
+ newposx = aposx + compo.posX;
242
+ newposy = aposy + this.lastExtent.y - compo.lastExtent.y;
243
+ break;
244
+ case PrintItemAlign.LeftRight:
245
+ newposx = aposx;
246
+ newposy = aposy + compo.posY;
247
+ nwidth = this.lastExtent.x;
248
+ break;
249
+ case PrintItemAlign.TopBottom:
250
+ newposx = aposx + compo.posX;
251
+ newposy = aposy + compo.posY;
252
+ nheight = this.lastExtent.y;
253
+ break;
254
+ case PrintItemAlign.AllClient:
255
+ newposx = aposx;
256
+ newposy = aposy;
257
+ nwidth = this.lastExtent.x;
258
+ nheight = this.lastExtent.y;
259
+ break;
260
+ default:
261
+ newposx = aposx + compo.posX;
262
+ newposy = aposy + compo.posY;
263
+ break;
264
+ }
265
+ const componentExtent = { ...maxExtent };
266
+ componentExtent.y = componentExtent.y - compo.posY;
267
+ if (doPartialPrint) {
268
+ let compoprinted = false;
269
+ if (compo instanceof ExpressionItem) {
270
+ compe = compo;
271
+ if (compe.isPartial) {
272
+ const intPartialPrint = { value: false };
273
+ compo.print(adriver, newposx, newposy, nwidth, nheight, metafile, componentExtent, intPartialPrint);
274
+ if (intPartialPrint.value)
275
+ partialPrint.value = true;
276
+ compoprinted = true;
277
+ }
278
+ }
279
+ if (!compoprinted && compo.partialFlag && !partialPrint.value) {
280
+ const intPartialPrint = { value: false };
281
+ compo.partialFlag = false;
282
+ compo.print(adriver, newposx, newposy, nwidth, nheight, metafile, componentExtent, intPartialPrint);
283
+ }
284
+ if (compe === null && (compo.align === PrintItemAlign.TopBottom || compo.align === PrintItemAlign.AllClient)) {
285
+ const dummypartial = { value: false };
286
+ compo.print(adriver, newposx, newposy, nwidth, nheight, metafile, componentExtent, dummypartial);
287
+ }
288
+ }
289
+ else {
290
+ compo.partialFlag = false;
291
+ // Evaluates print condition of each comonent
292
+ if (compo.evaluatePrintCondition()) {
293
+ const intPartialPrint = { value: false };
294
+ // For aligned to bottom elements, the partial print will force to align bottom at the
295
+ // last section of the partial print
296
+ if (partialPrint.value && (compo.align === PrintItemAlign.Bottom || compo.align === PrintItemAlign.BottomRight))
297
+ compo.partialFlag = true;
298
+ else
299
+ compo.print(adriver, newposx, newposy, nwidth, nheight, metafile, componentExtent, intPartialPrint);
300
+ if (intPartialPrint.value)
301
+ partialPrint.value = true;
302
+ if (compo instanceof ExpressionItem) {
303
+ compe = compo;
304
+ if (compe.isGroupPageCount && compe.lastMetaIndex > 0)
305
+ this.addPageGroupCountItem(metafile.currentPage, compe.lastMetaIndex, compe.displayFormat);
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ addPageGroupCountItem(apageindex, aobjectindex, adisplayformat) {
312
+ const subrep = this.subReport;
313
+ if (subrep === null)
314
+ throw new Error('Object reference not set to an instance of an object.');
315
+ const index = subrep.groupIndex(this.groupName);
316
+ if (index > 0) {
317
+ subrep.sections[subrep.firstDetail - index].fPageGroupCountList.push({
318
+ pageIndex: apageindex,
319
+ objectIndex: aobjectindex,
320
+ displayFormat: adisplayformat,
321
+ });
322
+ }
323
+ }
324
+ }
325
+ //# sourceMappingURL=section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/report/section.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,kGAAkG;AAClG,+CAA+C;AAI/C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CA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Ac,EAAE,CAAC;wBACpC,KAAK,GAAG,KAAK,CAAC;wBACd,IAAI,KAAK,CAAC,gBAAgB,IAAI,KAAK,CAAC,aAAa,GAAG,CAAC;4BACnD,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;oBAC/F,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAEO,qBAAqB,CAAC,UAAkB,EAAE,YAAoB,EAAE,cAAsB;QAC5F,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;QAC9B,IAAI,MAAM,KAAK,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC9F,MAAM,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAChD,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACd,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,WAAW,GAAG,KAAK,CAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC;gBACpE,SAAS,EAAE,UAAU;gBACrB,WAAW,EAAE,YAAY;gBACzB,aAAa,EAAE,cAAc;aAC9B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,49 @@
1
+ import type { SubReport as SubReportModel } from '@reportman/lib';
2
+ import { SubReportEvent } from './items.js';
3
+ import type { ReportRuntime } from './report.js';
4
+ import { type SectionRuntime, SectionType } from './section.js';
5
+ export declare class SubReportRuntime {
6
+ readonly model: SubReportModel;
7
+ readonly report: ReportRuntime;
8
+ readonly name: string;
9
+ /** The current record is the last one. */
10
+ lastRecord: boolean;
11
+ /** The group that is breaking (0 when none). */
12
+ currentGroupIndex: number;
13
+ readonly sections: SectionRuntime[];
14
+ alias: string;
15
+ /** The subreport is a child (C# keeps a reference, only tested for null). */
16
+ parentSubReport: SubReportRuntime | null;
17
+ parentSection: SectionRuntime | null;
18
+ printOnlyIfDataAvailable: boolean;
19
+ reOpenOnPrint: boolean;
20
+ currentGroupName: string;
21
+ constructor(report: ReportRuntime, model: SubReportModel);
22
+ /** SubReportChanged: updates the group values and page counts and tells every section and item. */
23
+ subReportChanged(aevent: SubReportEvent, newgroup: string): void;
24
+ private sectionAt;
25
+ get firstPageHeader(): number;
26
+ get lastPageHeader(): number;
27
+ /** NumberOfSectionsOfType: the sections of a type from the first one of that type on. */
28
+ numberOfSectionsOfType(atype: SectionType): number;
29
+ /** GroupIndex: the group number of a group header by name (-1 when none). */
30
+ groupIndex(groupname: string): number;
31
+ get pageHeaderCount(): number;
32
+ get pageFooterCount(): number;
33
+ get firstPageFooter(): number;
34
+ get lastPageFooter(): number;
35
+ get firstDetail(): number;
36
+ get detailCount(): number;
37
+ get lastDetail(): number;
38
+ get groupCount(): number;
39
+ firstSectionThatIs(atype: SectionType): number;
40
+ lastSectionThatIs(atype: SectionType): number;
41
+ /** InitGroups: a group change for each group from groupindex down to the detail. */
42
+ initGroups(groupindex: number): void;
43
+ /** IsDataAvailable: the subreport has data to print. */
44
+ isDataAvailable(): boolean;
45
+ /** GroupChanged: the outermost group that breaks with the current record (0 when none). */
46
+ groupChanged(): number;
47
+ private fillGroupValues;
48
+ }
49
+ //# sourceMappingURL=subreport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subreport.d.ts","sourceRoot":"","sources":["../../src/report/subreport.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAIlE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,KAAK,cAAc,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,qBAAa,gBAAgB;IAC3B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,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AAI;IASpC,wDAAwD;IACxD,eAAe,IAAI,OAAO;IAW1B,2FAA2F;IAC3F,YAAY,IAAI,MAAM;IA6BtB,OAAO,CAAC,eAAe;CAkBxB"}
@@ -0,0 +1,220 @@
1
+ // Port of the runtime part of Reportman.Reporting.SubReport: the sections of a subreport, its
2
+ // groups (group breaks, group values) and the events it sends to its sections and items.
3
+ import { messageOf, UnNamedException } from '../util/netexception.js';
4
+ import { Variant } from '../variant/variant.js';
5
+ import { ReportException } from './errors.js';
6
+ import { SubReportEvent } from './items.js';
7
+ import { SectionType } from './section.js';
8
+ export class SubReportRuntime {
9
+ model;
10
+ report;
11
+ name;
12
+ /** The current record is the last one. */
13
+ lastRecord = false;
14
+ /** The group that is breaking (0 when none). */
15
+ currentGroupIndex = 0;
16
+ sections = [];
17
+ alias;
18
+ /** The subreport is a child (C# keeps a reference, only tested for null). */
19
+ parentSubReport = null;
20
+ parentSection = null;
21
+ printOnlyIfDataAvailable;
22
+ reOpenOnPrint;
23
+ currentGroupName = '';
24
+ constructor(report, model) {
25
+ this.report = report;
26
+ this.model = model;
27
+ this.name = model.name;
28
+ this.alias = model.alias;
29
+ this.printOnlyIfDataAvailable = model.printOnlyIfDataAvailable;
30
+ this.reOpenOnPrint = model.reOpenOnPrint;
31
+ }
32
+ /** SubReportChanged: updates the group values and page counts and tells every section and item. */
33
+ subReportChanged(aevent, newgroup) {
34
+ const newstate = aevent;
35
+ if (newstate === SubReportEvent.Start || newstate === SubReportEvent.SubReportStart) {
36
+ this.fillGroupValues();
37
+ for (const sec of this.sections)
38
+ sec.clearPageCountList();
39
+ }
40
+ else {
41
+ let index = -1;
42
+ if (newstate === SubReportEvent.GroupChange)
43
+ index = this.groupIndex(newgroup);
44
+ else if (newstate === SubReportEvent.SubReportEnd)
45
+ index = this.groupCount;
46
+ if (index > 0) {
47
+ const ffirstdetail = this.firstDetail;
48
+ const flastdetail = this.lastDetail;
49
+ while (index > 0) {
50
+ this.sectionAt(ffirstdetail - index).updatePageCounts();
51
+ this.sectionAt(ffirstdetail - index).clearPageCountList();
52
+ this.sectionAt(flastdetail + index).updatePageCounts();
53
+ // C# parity: the list cleared is the one of the section after the first detail
54
+ this.sectionAt(ffirstdetail + index).clearPageCountList();
55
+ index--;
56
+ }
57
+ }
58
+ }
59
+ for (const sec of this.sections) {
60
+ sec.subReportChanged(newstate, newgroup);
61
+ for (const compo of sec.components)
62
+ compo.subReportChanged(newstate, newgroup);
63
+ }
64
+ }
65
+ sectionAt(index) {
66
+ const s = this.sections[index];
67
+ if (s === undefined)
68
+ throw new RangeError('Index was out of range. Must be non-negative and less than the size of the collection.');
69
+ return s;
70
+ }
71
+ get firstPageHeader() {
72
+ return this.firstSectionThatIs(SectionType.PageHeader);
73
+ }
74
+ get lastPageHeader() {
75
+ return this.lastSectionThatIs(SectionType.PageHeader);
76
+ }
77
+ /** NumberOfSectionsOfType: the sections of a type from the first one of that type on. */
78
+ numberOfSectionsOfType(atype) {
79
+ let index = this.firstSectionThatIs(atype);
80
+ let count = 0;
81
+ if (index >= 0) {
82
+ while (index < this.sections.length) {
83
+ if (this.sections[index].sectionType === atype)
84
+ count++;
85
+ index++;
86
+ }
87
+ }
88
+ return count;
89
+ }
90
+ /** GroupIndex: the group number of a group header by name (-1 when none). */
91
+ groupIndex(groupname) {
92
+ let index = this.firstSectionThatIs(SectionType.GroupHeader);
93
+ let aresult = -1;
94
+ if (index >= 0) {
95
+ while (index < this.sections.length) {
96
+ if (this.sections[index].sectionType !== SectionType.GroupHeader)
97
+ break;
98
+ if (this.sections[index].groupName === groupname) {
99
+ aresult = this.firstDetail - index;
100
+ break;
101
+ }
102
+ index++;
103
+ }
104
+ }
105
+ return aresult;
106
+ }
107
+ get pageHeaderCount() {
108
+ return this.numberOfSectionsOfType(SectionType.PageHeader);
109
+ }
110
+ get pageFooterCount() {
111
+ return this.numberOfSectionsOfType(SectionType.PageFooter);
112
+ }
113
+ get firstPageFooter() {
114
+ return this.firstSectionThatIs(SectionType.PageFooter);
115
+ }
116
+ get lastPageFooter() {
117
+ return this.lastSectionThatIs(SectionType.PageFooter);
118
+ }
119
+ get firstDetail() {
120
+ return this.firstSectionThatIs(SectionType.Detail);
121
+ }
122
+ get detailCount() {
123
+ if (this.sections.length === 0)
124
+ return 0;
125
+ return this.lastSectionThatIs(SectionType.Detail) - this.firstSectionThatIs(SectionType.Detail) + 1;
126
+ }
127
+ get lastDetail() {
128
+ return this.lastSectionThatIs(SectionType.Detail);
129
+ }
130
+ get groupCount() {
131
+ return this.numberOfSectionsOfType(SectionType.GroupHeader);
132
+ }
133
+ firstSectionThatIs(atype) {
134
+ for (let i = 0; i < this.sections.length; i++)
135
+ if (this.sections[i].sectionType === atype)
136
+ return i;
137
+ return -1;
138
+ }
139
+ lastSectionThatIs(atype) {
140
+ let aresult = -1;
141
+ for (let i = 0; i < this.sections.length; i++)
142
+ if (this.sections[i].sectionType === atype)
143
+ aresult = i;
144
+ return aresult;
145
+ }
146
+ /** InitGroups: a group change for each group from groupindex down to the detail. */
147
+ initGroups(groupindex) {
148
+ const afirstdetail = this.firstDetail;
149
+ let i = afirstdetail - groupindex;
150
+ while (i < afirstdetail) {
151
+ this.subReportChanged(SubReportEvent.GroupChange, this.sectionAt(i).groupName);
152
+ i++;
153
+ }
154
+ }
155
+ /** IsDataAvailable: the subreport has data to print. */
156
+ isDataAvailable() {
157
+ if (this.alias.length === 0)
158
+ return true;
159
+ if (!this.printOnlyIfDataAvailable)
160
+ return true;
161
+ let aresult = false;
162
+ const index = this.report.dataInfoIndexOf(this.alias);
163
+ if (index < 0)
164
+ throw new UnNamedException('Data alias not found' + this.alias);
165
+ const data = this.report.dataInfos[index].data;
166
+ if (data.active && !data.eof)
167
+ aresult = true;
168
+ return aresult;
169
+ }
170
+ /** GroupChanged: the outermost group that breaks with the current record (0 when none). */
171
+ groupChanged() {
172
+ const agroupcount = this.groupCount;
173
+ let acount = agroupcount;
174
+ const afirstdetail = this.firstDetail;
175
+ let i = afirstdetail - agroupcount;
176
+ const ev = this.report.evaluator;
177
+ let aresult = 0;
178
+ while (i < afirstdetail) {
179
+ const sec = this.sectionAt(i);
180
+ ev.expression = sec.changeExpression;
181
+ ev.evaluate();
182
+ if (sec.changeBool) {
183
+ if (ev.result.toBool(ev.context)) {
184
+ aresult = acount;
185
+ this.fillGroupValues();
186
+ break;
187
+ }
188
+ }
189
+ else if (Variant.notEquals(ev.result, sec.groupValue, ev.context)) {
190
+ aresult = acount;
191
+ this.fillGroupValues();
192
+ break;
193
+ }
194
+ i++;
195
+ acount--;
196
+ }
197
+ this.currentGroupIndex = aresult;
198
+ return aresult;
199
+ }
200
+ fillGroupValues() {
201
+ this.currentGroupName = '';
202
+ this.currentGroupIndex = 0;
203
+ const indexdetail = this.firstDetail;
204
+ const ev = this.report.evaluator;
205
+ for (let i = 0; i < indexdetail; i++) {
206
+ const sec = this.sectionAt(i);
207
+ try {
208
+ if (sec.sectionType === SectionType.GroupHeader) {
209
+ ev.expression = sec.changeExpression;
210
+ ev.evaluate();
211
+ sec.groupValue = ev.result;
212
+ }
213
+ }
214
+ catch (e) {
215
+ throw new ReportException(messageOf(e), this.name, 'GroupChange');
216
+ }
217
+ }
218
+ }
219
+ }
220
+ //# sourceMappingURL=subreport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subreport.js","sourceRoot":"","sources":["../../src/report/subreport.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,yFAAyF;AAGzF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAuB,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhE,MAAM,OAAO,gBAAgB;IAClB,KAAK,CAAiB;IACtB,MAAM,CAAgB;IACtB,IAAI,CAAS;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MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC9B,IAAI,CAAC;gBACH,IAAI,GAAG,CAAC,WAAW,KAAK,WAAW,CAAC,WAAW,EAAE,CAAC;oBAChD,EAAE,CAAC,UAAU,GAAG,GAAG,CAAC,gBAAgB,CAAC;oBACrC,EAAE,CAAC,QAAQ,EAAE,CAAC;oBACd,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,MAAM,CAAC;gBAC7B,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,IAAI,eAAe,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;YACpE,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Convert.FromBase64String: white space (space, tab, CR, LF) is ignored anywhere, the rest must be
3
+ * groups of four characters with at most two '=' of padding at the end; anything else is the
4
+ * FormatException of .NET. The unused bits of the last group are ignored.
5
+ */
6
+ export declare function fromBase64String(s: string): Uint8Array;
7
+ /** Convert.ToBase64String. */
8
+ export declare function toBase64String(bytes: Uint8Array): string;
9
+ //# sourceMappingURL=base64.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/util/base64.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CA2BtD;AAED,8BAA8B;AAC9B,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAYxD"}