@zentto/report-core 0.4.0 → 1.0.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.
- package/dist/engine/conditional-format.d.ts +48 -0
- package/dist/engine/conditional-format.d.ts.map +1 -0
- package/dist/engine/conditional-format.js +167 -0
- package/dist/engine/conditional-format.js.map +1 -0
- package/dist/engine/cross-tab.d.ts +68 -0
- package/dist/engine/cross-tab.d.ts.map +1 -0
- package/dist/engine/cross-tab.js +549 -0
- package/dist/engine/cross-tab.js.map +1 -0
- package/dist/engine/expression.d.ts +46 -2
- package/dist/engine/expression.d.ts.map +1 -1
- package/dist/engine/expression.js +1415 -90
- package/dist/engine/expression.js.map +1 -1
- package/dist/engine/multi-pass-engine.d.ts +74 -0
- package/dist/engine/multi-pass-engine.d.ts.map +1 -0
- package/dist/engine/multi-pass-engine.js +1082 -0
- package/dist/engine/multi-pass-engine.js.map +1 -0
- package/dist/engine/running-totals.d.ts +74 -0
- package/dist/engine/running-totals.d.ts.map +1 -0
- package/dist/engine/running-totals.js +247 -0
- package/dist/engine/running-totals.js.map +1 -0
- package/dist/engine/subreport.d.ts +59 -0
- package/dist/engine/subreport.d.ts.map +1 -0
- package/dist/engine/subreport.js +295 -0
- package/dist/engine/subreport.js.map +1 -0
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/schema/report-schema.d.ts +346 -346
- package/dist/serialization/json.d.ts +88 -88
- package/dist/templates/page-sizes.d.ts.map +1 -1
- package/dist/templates/page-sizes.js +95 -3
- package/dist/templates/page-sizes.js.map +1 -1
- package/dist/types.d.ts +38 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
10
10
|
pageSize: {
|
|
11
11
|
width: number;
|
|
12
12
|
height: number;
|
|
13
|
-
unit: "mm" | "in" | "
|
|
13
|
+
unit: "mm" | "in" | "pt" | "px";
|
|
14
14
|
};
|
|
15
15
|
margins: {
|
|
16
16
|
left: number;
|
|
@@ -23,24 +23,25 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
23
23
|
name: string;
|
|
24
24
|
id: string;
|
|
25
25
|
fields?: {
|
|
26
|
-
type: "string" | "number" | "boolean" | "
|
|
26
|
+
type: "string" | "number" | "boolean" | "image" | "date" | "currency";
|
|
27
27
|
name: string;
|
|
28
|
-
label?: string | undefined;
|
|
29
28
|
format?: string | undefined;
|
|
29
|
+
label?: string | undefined;
|
|
30
30
|
}[] | undefined;
|
|
31
31
|
}[];
|
|
32
32
|
bands: {
|
|
33
|
-
height: number;
|
|
34
33
|
type: "reportHeader" | "pageHeader" | "groupHeader" | "columnHeader" | "detail" | "columnFooter" | "groupFooter" | "pageFooter" | "reportFooter";
|
|
34
|
+
height: number;
|
|
35
35
|
id: string;
|
|
36
36
|
elements: ({
|
|
37
|
+
type: "text";
|
|
37
38
|
width: number;
|
|
38
39
|
height: number;
|
|
39
|
-
type: "text";
|
|
40
40
|
id: string;
|
|
41
41
|
x: number;
|
|
42
42
|
y: number;
|
|
43
43
|
content: string;
|
|
44
|
+
visible?: boolean | undefined;
|
|
44
45
|
style?: {
|
|
45
46
|
fontFamily?: string | undefined;
|
|
46
47
|
fontSize?: number | undefined;
|
|
@@ -61,18 +62,19 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
61
62
|
wordWrap?: boolean | undefined;
|
|
62
63
|
lineHeight?: number | undefined;
|
|
63
64
|
} | undefined;
|
|
64
|
-
visible?: boolean | undefined;
|
|
65
65
|
visibleExpression?: string | undefined;
|
|
66
66
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
67
67
|
} | {
|
|
68
68
|
field: string;
|
|
69
|
+
type: "field";
|
|
69
70
|
width: number;
|
|
70
71
|
height: number;
|
|
71
|
-
type: "field";
|
|
72
72
|
id: string;
|
|
73
73
|
x: number;
|
|
74
74
|
y: number;
|
|
75
75
|
dataSource: string;
|
|
76
|
+
format?: string | undefined;
|
|
77
|
+
visible?: boolean | undefined;
|
|
76
78
|
style?: {
|
|
77
79
|
fontFamily?: string | undefined;
|
|
78
80
|
fontSize?: number | undefined;
|
|
@@ -93,21 +95,20 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
93
95
|
wordWrap?: boolean | undefined;
|
|
94
96
|
lineHeight?: number | undefined;
|
|
95
97
|
} | undefined;
|
|
96
|
-
format?: string | undefined;
|
|
97
|
-
visible?: boolean | undefined;
|
|
98
98
|
visibleExpression?: string | undefined;
|
|
99
99
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
100
100
|
expression?: string | undefined;
|
|
101
101
|
aggregate?: "sum" | "avg" | "count" | "min" | "max" | undefined;
|
|
102
102
|
resetOnGroup?: string | undefined;
|
|
103
103
|
} | {
|
|
104
|
+
type: "image";
|
|
104
105
|
width: number;
|
|
105
106
|
height: number;
|
|
106
|
-
type: "image";
|
|
107
107
|
id: string;
|
|
108
108
|
x: number;
|
|
109
109
|
y: number;
|
|
110
110
|
src: string;
|
|
111
|
+
visible?: boolean | undefined;
|
|
111
112
|
style?: {
|
|
112
113
|
fontFamily?: string | undefined;
|
|
113
114
|
fontSize?: number | undefined;
|
|
@@ -128,19 +129,19 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
128
129
|
wordWrap?: boolean | undefined;
|
|
129
130
|
lineHeight?: number | undefined;
|
|
130
131
|
} | undefined;
|
|
131
|
-
visible?: boolean | undefined;
|
|
132
132
|
visibleExpression?: string | undefined;
|
|
133
133
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
134
|
-
fit?: "
|
|
134
|
+
fit?: "fill" | "contain" | "cover" | "none" | undefined;
|
|
135
135
|
} | {
|
|
136
|
+
type: "line";
|
|
136
137
|
width: number;
|
|
137
138
|
height: number;
|
|
138
|
-
type: "line";
|
|
139
139
|
id: string;
|
|
140
140
|
x: number;
|
|
141
141
|
y: number;
|
|
142
142
|
x2: number;
|
|
143
143
|
y2: number;
|
|
144
|
+
visible?: boolean | undefined;
|
|
144
145
|
style?: {
|
|
145
146
|
fontFamily?: string | undefined;
|
|
146
147
|
fontSize?: number | undefined;
|
|
@@ -161,22 +162,23 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
161
162
|
wordWrap?: boolean | undefined;
|
|
162
163
|
lineHeight?: number | undefined;
|
|
163
164
|
} | undefined;
|
|
164
|
-
visible?: boolean | undefined;
|
|
165
165
|
visibleExpression?: string | undefined;
|
|
166
166
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
167
167
|
lineStyle?: {
|
|
168
|
-
width?: number | undefined;
|
|
169
168
|
color?: string | undefined;
|
|
169
|
+
width?: number | undefined;
|
|
170
170
|
style?: "solid" | "dashed" | "dotted" | undefined;
|
|
171
171
|
} | undefined;
|
|
172
172
|
} | {
|
|
173
|
+
type: "rect";
|
|
173
174
|
width: number;
|
|
174
175
|
height: number;
|
|
175
|
-
type: "rect";
|
|
176
176
|
id: string;
|
|
177
177
|
x: number;
|
|
178
178
|
y: number;
|
|
179
179
|
fill?: string | undefined;
|
|
180
|
+
visible?: boolean | undefined;
|
|
181
|
+
cornerRadius?: number | undefined;
|
|
180
182
|
style?: {
|
|
181
183
|
fontFamily?: string | undefined;
|
|
182
184
|
fontSize?: number | undefined;
|
|
@@ -197,24 +199,23 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
197
199
|
wordWrap?: boolean | undefined;
|
|
198
200
|
lineHeight?: number | undefined;
|
|
199
201
|
} | undefined;
|
|
200
|
-
visible?: boolean | undefined;
|
|
201
202
|
visibleExpression?: string | undefined;
|
|
202
203
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
203
204
|
lineStyle?: {
|
|
204
|
-
width?: number | undefined;
|
|
205
205
|
color?: string | undefined;
|
|
206
|
+
width?: number | undefined;
|
|
206
207
|
style?: "solid" | "dashed" | "dotted" | undefined;
|
|
207
208
|
} | undefined;
|
|
208
|
-
cornerRadius?: number | undefined;
|
|
209
209
|
} | {
|
|
210
|
+
type: "barcode";
|
|
211
|
+
barcodeType: "code128" | "ean13" | "code39" | "qr";
|
|
212
|
+
value: string;
|
|
210
213
|
width: number;
|
|
211
214
|
height: number;
|
|
212
|
-
value: string;
|
|
213
|
-
type: "barcode";
|
|
214
215
|
id: string;
|
|
215
216
|
x: number;
|
|
216
217
|
y: number;
|
|
217
|
-
|
|
218
|
+
visible?: boolean | undefined;
|
|
218
219
|
style?: {
|
|
219
220
|
fontFamily?: string | undefined;
|
|
220
221
|
fontSize?: number | undefined;
|
|
@@ -235,16 +236,17 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
235
236
|
wordWrap?: boolean | undefined;
|
|
236
237
|
lineHeight?: number | undefined;
|
|
237
238
|
} | undefined;
|
|
238
|
-
visible?: boolean | undefined;
|
|
239
239
|
visibleExpression?: string | undefined;
|
|
240
240
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
241
241
|
} | {
|
|
242
|
+
type: "pageNumber";
|
|
242
243
|
width: number;
|
|
243
244
|
height: number;
|
|
244
|
-
type: "pageNumber";
|
|
245
245
|
id: string;
|
|
246
246
|
x: number;
|
|
247
247
|
y: number;
|
|
248
|
+
format?: string | undefined;
|
|
249
|
+
visible?: boolean | undefined;
|
|
248
250
|
style?: {
|
|
249
251
|
fontFamily?: string | undefined;
|
|
250
252
|
fontSize?: number | undefined;
|
|
@@ -265,17 +267,16 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
265
267
|
wordWrap?: boolean | undefined;
|
|
266
268
|
lineHeight?: number | undefined;
|
|
267
269
|
} | undefined;
|
|
268
|
-
format?: string | undefined;
|
|
269
|
-
visible?: boolean | undefined;
|
|
270
270
|
visibleExpression?: string | undefined;
|
|
271
271
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
272
272
|
} | {
|
|
273
|
+
type: "totalPages";
|
|
273
274
|
width: number;
|
|
274
275
|
height: number;
|
|
275
|
-
type: "totalPages";
|
|
276
276
|
id: string;
|
|
277
277
|
x: number;
|
|
278
278
|
y: number;
|
|
279
|
+
visible?: boolean | undefined;
|
|
279
280
|
style?: {
|
|
280
281
|
fontFamily?: string | undefined;
|
|
281
282
|
fontSize?: number | undefined;
|
|
@@ -296,16 +297,17 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
296
297
|
wordWrap?: boolean | undefined;
|
|
297
298
|
lineHeight?: number | undefined;
|
|
298
299
|
} | undefined;
|
|
299
|
-
visible?: boolean | undefined;
|
|
300
300
|
visibleExpression?: string | undefined;
|
|
301
301
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
302
302
|
} | {
|
|
303
|
+
type: "currentDate";
|
|
303
304
|
width: number;
|
|
304
305
|
height: number;
|
|
305
|
-
type: "currentDate";
|
|
306
306
|
id: string;
|
|
307
307
|
x: number;
|
|
308
308
|
y: number;
|
|
309
|
+
format?: string | undefined;
|
|
310
|
+
visible?: boolean | undefined;
|
|
309
311
|
style?: {
|
|
310
312
|
fontFamily?: string | undefined;
|
|
311
313
|
fontSize?: number | undefined;
|
|
@@ -326,18 +328,28 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
326
328
|
wordWrap?: boolean | undefined;
|
|
327
329
|
lineHeight?: number | undefined;
|
|
328
330
|
} | undefined;
|
|
329
|
-
format?: string | undefined;
|
|
330
|
-
visible?: boolean | undefined;
|
|
331
331
|
visibleExpression?: string | undefined;
|
|
332
332
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
333
333
|
})[];
|
|
334
|
-
backgroundColor?: string | undefined;
|
|
335
334
|
visible?: boolean | undefined;
|
|
335
|
+
backgroundColor?: string | undefined;
|
|
336
336
|
dataSource?: string | undefined;
|
|
337
337
|
groupField?: string | undefined;
|
|
338
338
|
keepTogether?: boolean | undefined;
|
|
339
339
|
repeatOnEveryPage?: boolean | undefined;
|
|
340
340
|
}[];
|
|
341
|
+
parameters?: {
|
|
342
|
+
type: "string" | "number" | "boolean" | "date" | "select";
|
|
343
|
+
name: string;
|
|
344
|
+
label: string;
|
|
345
|
+
id: string;
|
|
346
|
+
options?: {
|
|
347
|
+
label: string;
|
|
348
|
+
value?: unknown;
|
|
349
|
+
}[] | undefined;
|
|
350
|
+
defaultValue?: unknown;
|
|
351
|
+
required?: boolean | undefined;
|
|
352
|
+
}[] | undefined;
|
|
341
353
|
description?: string | undefined;
|
|
342
354
|
orientation?: "portrait" | "landscape" | undefined;
|
|
343
355
|
groups?: {
|
|
@@ -391,18 +403,6 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
391
403
|
wordWrap?: boolean | undefined;
|
|
392
404
|
lineHeight?: number | undefined;
|
|
393
405
|
}> | undefined;
|
|
394
|
-
parameters?: {
|
|
395
|
-
type: "string" | "number" | "boolean" | "date" | "select";
|
|
396
|
-
name: string;
|
|
397
|
-
label: string;
|
|
398
|
-
id: string;
|
|
399
|
-
options?: {
|
|
400
|
-
label: string;
|
|
401
|
-
value?: unknown;
|
|
402
|
-
}[] | undefined;
|
|
403
|
-
defaultValue?: unknown;
|
|
404
|
-
required?: boolean | undefined;
|
|
405
|
-
}[] | undefined;
|
|
406
406
|
metadata?: Record<string, unknown> | undefined;
|
|
407
407
|
}> | import("zod").SafeParseError<{
|
|
408
408
|
name: string;
|
|
@@ -410,7 +410,7 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
410
410
|
pageSize: {
|
|
411
411
|
width: number;
|
|
412
412
|
height: number;
|
|
413
|
-
unit: "mm" | "in" | "
|
|
413
|
+
unit: "mm" | "in" | "pt" | "px";
|
|
414
414
|
};
|
|
415
415
|
margins: {
|
|
416
416
|
left: number;
|
|
@@ -423,24 +423,25 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
423
423
|
name: string;
|
|
424
424
|
id: string;
|
|
425
425
|
fields?: {
|
|
426
|
-
type: "string" | "number" | "boolean" | "
|
|
426
|
+
type: "string" | "number" | "boolean" | "image" | "date" | "currency";
|
|
427
427
|
name: string;
|
|
428
|
-
label?: string | undefined;
|
|
429
428
|
format?: string | undefined;
|
|
429
|
+
label?: string | undefined;
|
|
430
430
|
}[] | undefined;
|
|
431
431
|
}[];
|
|
432
432
|
bands: {
|
|
433
|
-
height: number;
|
|
434
433
|
type: "reportHeader" | "pageHeader" | "groupHeader" | "columnHeader" | "detail" | "columnFooter" | "groupFooter" | "pageFooter" | "reportFooter";
|
|
434
|
+
height: number;
|
|
435
435
|
id: string;
|
|
436
436
|
elements: ({
|
|
437
|
+
type: "text";
|
|
437
438
|
width: number;
|
|
438
439
|
height: number;
|
|
439
|
-
type: "text";
|
|
440
440
|
id: string;
|
|
441
441
|
x: number;
|
|
442
442
|
y: number;
|
|
443
443
|
content: string;
|
|
444
|
+
visible?: boolean | undefined;
|
|
444
445
|
style?: {
|
|
445
446
|
fontFamily?: string | undefined;
|
|
446
447
|
fontSize?: number | undefined;
|
|
@@ -461,18 +462,19 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
461
462
|
wordWrap?: boolean | undefined;
|
|
462
463
|
lineHeight?: number | undefined;
|
|
463
464
|
} | undefined;
|
|
464
|
-
visible?: boolean | undefined;
|
|
465
465
|
visibleExpression?: string | undefined;
|
|
466
466
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
467
467
|
} | {
|
|
468
468
|
field: string;
|
|
469
|
+
type: "field";
|
|
469
470
|
width: number;
|
|
470
471
|
height: number;
|
|
471
|
-
type: "field";
|
|
472
472
|
id: string;
|
|
473
473
|
x: number;
|
|
474
474
|
y: number;
|
|
475
475
|
dataSource: string;
|
|
476
|
+
format?: string | undefined;
|
|
477
|
+
visible?: boolean | undefined;
|
|
476
478
|
style?: {
|
|
477
479
|
fontFamily?: string | undefined;
|
|
478
480
|
fontSize?: number | undefined;
|
|
@@ -493,21 +495,20 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
493
495
|
wordWrap?: boolean | undefined;
|
|
494
496
|
lineHeight?: number | undefined;
|
|
495
497
|
} | undefined;
|
|
496
|
-
format?: string | undefined;
|
|
497
|
-
visible?: boolean | undefined;
|
|
498
498
|
visibleExpression?: string | undefined;
|
|
499
499
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
500
500
|
expression?: string | undefined;
|
|
501
501
|
aggregate?: "sum" | "avg" | "count" | "min" | "max" | undefined;
|
|
502
502
|
resetOnGroup?: string | undefined;
|
|
503
503
|
} | {
|
|
504
|
+
type: "image";
|
|
504
505
|
width: number;
|
|
505
506
|
height: number;
|
|
506
|
-
type: "image";
|
|
507
507
|
id: string;
|
|
508
508
|
x: number;
|
|
509
509
|
y: number;
|
|
510
510
|
src: string;
|
|
511
|
+
visible?: boolean | undefined;
|
|
511
512
|
style?: {
|
|
512
513
|
fontFamily?: string | undefined;
|
|
513
514
|
fontSize?: number | undefined;
|
|
@@ -528,19 +529,19 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
528
529
|
wordWrap?: boolean | undefined;
|
|
529
530
|
lineHeight?: number | undefined;
|
|
530
531
|
} | undefined;
|
|
531
|
-
visible?: boolean | undefined;
|
|
532
532
|
visibleExpression?: string | undefined;
|
|
533
533
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
534
|
-
fit?: "
|
|
534
|
+
fit?: "fill" | "contain" | "cover" | "none" | undefined;
|
|
535
535
|
} | {
|
|
536
|
+
type: "line";
|
|
536
537
|
width: number;
|
|
537
538
|
height: number;
|
|
538
|
-
type: "line";
|
|
539
539
|
id: string;
|
|
540
540
|
x: number;
|
|
541
541
|
y: number;
|
|
542
542
|
x2: number;
|
|
543
543
|
y2: number;
|
|
544
|
+
visible?: boolean | undefined;
|
|
544
545
|
style?: {
|
|
545
546
|
fontFamily?: string | undefined;
|
|
546
547
|
fontSize?: number | undefined;
|
|
@@ -561,22 +562,23 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
561
562
|
wordWrap?: boolean | undefined;
|
|
562
563
|
lineHeight?: number | undefined;
|
|
563
564
|
} | undefined;
|
|
564
|
-
visible?: boolean | undefined;
|
|
565
565
|
visibleExpression?: string | undefined;
|
|
566
566
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
567
567
|
lineStyle?: {
|
|
568
|
-
width?: number | undefined;
|
|
569
568
|
color?: string | undefined;
|
|
569
|
+
width?: number | undefined;
|
|
570
570
|
style?: "solid" | "dashed" | "dotted" | undefined;
|
|
571
571
|
} | undefined;
|
|
572
572
|
} | {
|
|
573
|
+
type: "rect";
|
|
573
574
|
width: number;
|
|
574
575
|
height: number;
|
|
575
|
-
type: "rect";
|
|
576
576
|
id: string;
|
|
577
577
|
x: number;
|
|
578
578
|
y: number;
|
|
579
579
|
fill?: string | undefined;
|
|
580
|
+
visible?: boolean | undefined;
|
|
581
|
+
cornerRadius?: number | undefined;
|
|
580
582
|
style?: {
|
|
581
583
|
fontFamily?: string | undefined;
|
|
582
584
|
fontSize?: number | undefined;
|
|
@@ -597,24 +599,23 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
597
599
|
wordWrap?: boolean | undefined;
|
|
598
600
|
lineHeight?: number | undefined;
|
|
599
601
|
} | undefined;
|
|
600
|
-
visible?: boolean | undefined;
|
|
601
602
|
visibleExpression?: string | undefined;
|
|
602
603
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
603
604
|
lineStyle?: {
|
|
604
|
-
width?: number | undefined;
|
|
605
605
|
color?: string | undefined;
|
|
606
|
+
width?: number | undefined;
|
|
606
607
|
style?: "solid" | "dashed" | "dotted" | undefined;
|
|
607
608
|
} | undefined;
|
|
608
|
-
cornerRadius?: number | undefined;
|
|
609
609
|
} | {
|
|
610
|
+
type: "barcode";
|
|
611
|
+
barcodeType: "code128" | "ean13" | "code39" | "qr";
|
|
612
|
+
value: string;
|
|
610
613
|
width: number;
|
|
611
614
|
height: number;
|
|
612
|
-
value: string;
|
|
613
|
-
type: "barcode";
|
|
614
615
|
id: string;
|
|
615
616
|
x: number;
|
|
616
617
|
y: number;
|
|
617
|
-
|
|
618
|
+
visible?: boolean | undefined;
|
|
618
619
|
style?: {
|
|
619
620
|
fontFamily?: string | undefined;
|
|
620
621
|
fontSize?: number | undefined;
|
|
@@ -635,16 +636,17 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
635
636
|
wordWrap?: boolean | undefined;
|
|
636
637
|
lineHeight?: number | undefined;
|
|
637
638
|
} | undefined;
|
|
638
|
-
visible?: boolean | undefined;
|
|
639
639
|
visibleExpression?: string | undefined;
|
|
640
640
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
641
641
|
} | {
|
|
642
|
+
type: "pageNumber";
|
|
642
643
|
width: number;
|
|
643
644
|
height: number;
|
|
644
|
-
type: "pageNumber";
|
|
645
645
|
id: string;
|
|
646
646
|
x: number;
|
|
647
647
|
y: number;
|
|
648
|
+
format?: string | undefined;
|
|
649
|
+
visible?: boolean | undefined;
|
|
648
650
|
style?: {
|
|
649
651
|
fontFamily?: string | undefined;
|
|
650
652
|
fontSize?: number | undefined;
|
|
@@ -665,17 +667,16 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
665
667
|
wordWrap?: boolean | undefined;
|
|
666
668
|
lineHeight?: number | undefined;
|
|
667
669
|
} | undefined;
|
|
668
|
-
format?: string | undefined;
|
|
669
|
-
visible?: boolean | undefined;
|
|
670
670
|
visibleExpression?: string | undefined;
|
|
671
671
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
672
672
|
} | {
|
|
673
|
+
type: "totalPages";
|
|
673
674
|
width: number;
|
|
674
675
|
height: number;
|
|
675
|
-
type: "totalPages";
|
|
676
676
|
id: string;
|
|
677
677
|
x: number;
|
|
678
678
|
y: number;
|
|
679
|
+
visible?: boolean | undefined;
|
|
679
680
|
style?: {
|
|
680
681
|
fontFamily?: string | undefined;
|
|
681
682
|
fontSize?: number | undefined;
|
|
@@ -696,16 +697,17 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
696
697
|
wordWrap?: boolean | undefined;
|
|
697
698
|
lineHeight?: number | undefined;
|
|
698
699
|
} | undefined;
|
|
699
|
-
visible?: boolean | undefined;
|
|
700
700
|
visibleExpression?: string | undefined;
|
|
701
701
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
702
702
|
} | {
|
|
703
|
+
type: "currentDate";
|
|
703
704
|
width: number;
|
|
704
705
|
height: number;
|
|
705
|
-
type: "currentDate";
|
|
706
706
|
id: string;
|
|
707
707
|
x: number;
|
|
708
708
|
y: number;
|
|
709
|
+
format?: string | undefined;
|
|
710
|
+
visible?: boolean | undefined;
|
|
709
711
|
style?: {
|
|
710
712
|
fontFamily?: string | undefined;
|
|
711
713
|
fontSize?: number | undefined;
|
|
@@ -726,18 +728,28 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
726
728
|
wordWrap?: boolean | undefined;
|
|
727
729
|
lineHeight?: number | undefined;
|
|
728
730
|
} | undefined;
|
|
729
|
-
format?: string | undefined;
|
|
730
|
-
visible?: boolean | undefined;
|
|
731
731
|
visibleExpression?: string | undefined;
|
|
732
732
|
printOn?: "all" | "first" | "last" | "odd" | "even" | undefined;
|
|
733
733
|
})[];
|
|
734
|
-
backgroundColor?: string | undefined;
|
|
735
734
|
visible?: boolean | undefined;
|
|
735
|
+
backgroundColor?: string | undefined;
|
|
736
736
|
dataSource?: string | undefined;
|
|
737
737
|
groupField?: string | undefined;
|
|
738
738
|
keepTogether?: boolean | undefined;
|
|
739
739
|
repeatOnEveryPage?: boolean | undefined;
|
|
740
740
|
}[];
|
|
741
|
+
parameters?: {
|
|
742
|
+
type: "string" | "number" | "boolean" | "date" | "select";
|
|
743
|
+
name: string;
|
|
744
|
+
label: string;
|
|
745
|
+
id: string;
|
|
746
|
+
options?: {
|
|
747
|
+
label: string;
|
|
748
|
+
value?: unknown;
|
|
749
|
+
}[] | undefined;
|
|
750
|
+
defaultValue?: unknown;
|
|
751
|
+
required?: boolean | undefined;
|
|
752
|
+
}[] | undefined;
|
|
741
753
|
description?: string | undefined;
|
|
742
754
|
orientation?: "portrait" | "landscape" | undefined;
|
|
743
755
|
groups?: {
|
|
@@ -791,18 +803,6 @@ export declare function safeJsonToLayout(json: string): import("zod").SafeParseS
|
|
|
791
803
|
wordWrap?: boolean | undefined;
|
|
792
804
|
lineHeight?: number | undefined;
|
|
793
805
|
}> | undefined;
|
|
794
|
-
parameters?: {
|
|
795
|
-
type: "string" | "number" | "boolean" | "date" | "select";
|
|
796
|
-
name: string;
|
|
797
|
-
label: string;
|
|
798
|
-
id: string;
|
|
799
|
-
options?: {
|
|
800
|
-
label: string;
|
|
801
|
-
value?: unknown;
|
|
802
|
-
}[] | undefined;
|
|
803
|
-
defaultValue?: unknown;
|
|
804
|
-
required?: boolean | undefined;
|
|
805
|
-
}[] | undefined;
|
|
806
806
|
metadata?: Record<string, unknown> | undefined;
|
|
807
807
|
}> | {
|
|
808
808
|
success: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-sizes.d.ts","sourceRoot":"","sources":["../../src/templates/page-sizes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAID,eAAO,MAAM,UAAU,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"page-sizes.d.ts","sourceRoot":"","sources":["../../src/templates/page-sizes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnD,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAID,eAAO,MAAM,UAAU,EAAE,cAAc,EA2MtC,CAAC;AAEF,mCAAmC;AACnC,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAExE;AAED,8BAA8B;AAC9B,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,GAAG,cAAc,EAAE,CAE7F"}
|
|
@@ -16,11 +16,100 @@ export const PAGE_SIZES = [
|
|
|
16
16
|
pageSize: { width: 148, height: 210, unit: 'mm' }, margins: { top: 10, right: 8, bottom: 10, left: 8 } },
|
|
17
17
|
{ id: 'a3-portrait', name: 'A3 Portrait', category: 'paper',
|
|
18
18
|
pageSize: { width: 297, height: 420, unit: 'mm' }, margins: { top: 15, right: 15, bottom: 15, left: 15 } },
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
{ id: 'a3-landscape', name: 'A3 Landscape', category: 'paper',
|
|
20
|
+
pageSize: { width: 420, height: 297, unit: 'mm' }, margins: { top: 15, right: 15, bottom: 15, left: 15 } },
|
|
21
|
+
{ id: 'a5-landscape', name: 'A5 Landscape', category: 'paper',
|
|
22
|
+
pageSize: { width: 210, height: 148, unit: 'mm' }, margins: { top: 8, right: 10, bottom: 8, left: 10 } },
|
|
23
|
+
{ id: 'a6-portrait', name: 'A6 Portrait', category: 'paper',
|
|
24
|
+
pageSize: { width: 105, height: 148, unit: 'mm' }, margins: { top: 8, right: 6, bottom: 8, left: 6 } },
|
|
25
|
+
{ id: 'a2-portrait', name: 'A2 Portrait', category: 'paper',
|
|
26
|
+
pageSize: { width: 420, height: 594, unit: 'mm' }, margins: { top: 20, right: 15, bottom: 20, left: 15 } },
|
|
27
|
+
{ id: 'a1-portrait', name: 'A1 Portrait', category: 'paper',
|
|
28
|
+
pageSize: { width: 594, height: 841, unit: 'mm' }, margins: { top: 20, right: 20, bottom: 20, left: 20 } },
|
|
29
|
+
{ id: 'a0-portrait', name: 'A0 Portrait', category: 'paper',
|
|
30
|
+
pageSize: { width: 841, height: 1189, unit: 'mm' }, margins: { top: 25, right: 25, bottom: 25, left: 25 } },
|
|
31
|
+
// B Series (ISO 216)
|
|
32
|
+
{ id: 'b4-portrait', name: 'B4 Portrait (ISO)', category: 'paper',
|
|
33
|
+
pageSize: { width: 250, height: 353, unit: 'mm' }, margins: { top: 15, right: 12, bottom: 15, left: 12 } },
|
|
34
|
+
{ id: 'b5-portrait', name: 'B5 Portrait (ISO)', category: 'paper',
|
|
35
|
+
pageSize: { width: 176, height: 250, unit: 'mm' }, margins: { top: 12, right: 10, bottom: 12, left: 10 } },
|
|
36
|
+
// JIS B Series (Japanese)
|
|
37
|
+
{ id: 'jis-b4', name: 'JIS B4', category: 'paper',
|
|
38
|
+
pageSize: { width: 257, height: 364, unit: 'mm' }, margins: { top: 15, right: 12, bottom: 15, left: 12 } },
|
|
39
|
+
{ id: 'jis-b5', name: 'JIS B5', category: 'paper',
|
|
40
|
+
pageSize: { width: 182, height: 257, unit: 'mm' }, margins: { top: 12, right: 10, bottom: 12, left: 10 } },
|
|
41
|
+
// North American
|
|
42
|
+
{ id: 'legal-landscape', name: 'Legal Landscape', category: 'paper',
|
|
43
|
+
pageSize: { width: 356, height: 216, unit: 'mm' }, margins: { top: 12, right: 15, bottom: 12, left: 15 } },
|
|
44
|
+
{ id: 'tabloid', name: 'Tabloid (11x17)', category: 'paper',
|
|
45
|
+
pageSize: { width: 279, height: 432, unit: 'mm' }, margins: { top: 15, right: 15, bottom: 15, left: 15 } },
|
|
46
|
+
{ id: 'ledger', name: 'Ledger (17x11)', category: 'paper',
|
|
47
|
+
pageSize: { width: 432, height: 279, unit: 'mm' }, margins: { top: 15, right: 15, bottom: 15, left: 15 } },
|
|
48
|
+
{ id: 'executive', name: 'Executive (7.25x10.5)', category: 'paper',
|
|
49
|
+
pageSize: { width: 184, height: 267, unit: 'mm' }, margins: { top: 12, right: 10, bottom: 12, left: 10 } },
|
|
50
|
+
{ id: 'statement', name: 'Statement (5.5x8.5)', category: 'paper',
|
|
51
|
+
pageSize: { width: 140, height: 216, unit: 'mm' }, margins: { top: 10, right: 8, bottom: 10, left: 8 } },
|
|
52
|
+
{ id: 'folio', name: 'Folio (8.5x13)', category: 'paper',
|
|
53
|
+
pageSize: { width: 216, height: 330, unit: 'mm' }, margins: { top: 15, right: 12, bottom: 15, left: 12 } },
|
|
54
|
+
{ id: 'quarto', name: 'Quarto (215x275)', category: 'paper',
|
|
55
|
+
pageSize: { width: 215, height: 275, unit: 'mm' }, margins: { top: 12, right: 10, bottom: 12, left: 10 } },
|
|
56
|
+
// Envelopes
|
|
57
|
+
{ id: 'env-10', name: 'Envelope #10 (4.125x9.5)', category: 'paper',
|
|
58
|
+
pageSize: { width: 105, height: 241, unit: 'mm' }, margins: { top: 10, right: 10, bottom: 10, left: 10 } },
|
|
59
|
+
{ id: 'env-dl', name: 'Envelope DL (110x220)', category: 'paper',
|
|
60
|
+
pageSize: { width: 110, height: 220, unit: 'mm' }, margins: { top: 10, right: 10, bottom: 10, left: 10 } },
|
|
61
|
+
{ id: 'env-c5', name: 'Envelope C5 (162x229)', category: 'paper',
|
|
62
|
+
pageSize: { width: 162, height: 229, unit: 'mm' }, margins: { top: 10, right: 10, bottom: 10, left: 10 } },
|
|
63
|
+
{ id: 'env-c4', name: 'Envelope C4 (229x324)', category: 'paper',
|
|
64
|
+
pageSize: { width: 229, height: 324, unit: 'mm' }, margins: { top: 12, right: 12, bottom: 12, left: 12 } },
|
|
65
|
+
{ id: 'env-monarch', name: 'Envelope Monarch (3.875x7.5)', category: 'paper',
|
|
66
|
+
pageSize: { width: 98, height: 191, unit: 'mm' }, margins: { top: 8, right: 8, bottom: 8, left: 8 } },
|
|
67
|
+
// Postcards
|
|
68
|
+
{ id: 'postcard-a6', name: 'Postcard A6 (105x148)', category: 'paper',
|
|
69
|
+
pageSize: { width: 105, height: 148, unit: 'mm' }, margins: { top: 5, right: 5, bottom: 5, left: 5 } },
|
|
70
|
+
{ id: 'postcard-4x6', name: 'Postcard 4x6"', category: 'paper',
|
|
71
|
+
pageSize: { width: 102, height: 152, unit: 'mm' }, margins: { top: 5, right: 5, bottom: 5, left: 5 } },
|
|
72
|
+
// Photo sizes
|
|
73
|
+
{ id: 'photo-4x6', name: 'Photo 4x6"', category: 'paper',
|
|
74
|
+
pageSize: { width: 102, height: 152, unit: 'mm' }, margins: { top: 3, right: 3, bottom: 3, left: 3 } },
|
|
75
|
+
{ id: 'photo-5x7', name: 'Photo 5x7"', category: 'paper',
|
|
76
|
+
pageSize: { width: 127, height: 178, unit: 'mm' }, margins: { top: 3, right: 3, bottom: 3, left: 3 } },
|
|
77
|
+
{ id: 'photo-8x10', name: 'Photo 8x10"', category: 'paper',
|
|
78
|
+
pageSize: { width: 203, height: 254, unit: 'mm' }, margins: { top: 5, right: 5, bottom: 5, left: 5 } },
|
|
79
|
+
// Receipt / POS / Continuous
|
|
80
|
+
{ id: 'receipt-80mm', name: 'Receipt 80mm (POS standard)', category: 'receipt',
|
|
21
81
|
pageSize: { width: 80, height: 297, unit: 'mm' }, margins: { top: 5, right: 3, bottom: 5, left: 3 } },
|
|
22
|
-
{ id: 'receipt-58mm', name: 'Receipt 58mm', category: 'receipt',
|
|
82
|
+
{ id: 'receipt-58mm', name: 'Receipt 58mm (mini POS)', category: 'receipt',
|
|
23
83
|
pageSize: { width: 58, height: 297, unit: 'mm' }, margins: { top: 3, right: 2, bottom: 3, left: 2 } },
|
|
84
|
+
{ id: 'receipt-76mm', name: 'Receipt 76mm (dot matrix)', category: 'receipt',
|
|
85
|
+
pageSize: { width: 76, height: 297, unit: 'mm' }, margins: { top: 5, right: 3, bottom: 5, left: 3 } },
|
|
86
|
+
{ id: 'receipt-44mm', name: 'Receipt 44mm (handheld)', category: 'receipt',
|
|
87
|
+
pageSize: { width: 44, height: 200, unit: 'mm' }, margins: { top: 3, right: 2, bottom: 3, left: 2 } },
|
|
88
|
+
{ id: 'receipt-112mm', name: 'Receipt 112mm (kitchen)', category: 'receipt',
|
|
89
|
+
pageSize: { width: 112, height: 297, unit: 'mm' }, margins: { top: 5, right: 5, bottom: 5, left: 5 } },
|
|
90
|
+
{ id: 'continuous-9.5x11', name: 'Continuous 9.5x11" (tractor feed)', category: 'receipt',
|
|
91
|
+
pageSize: { width: 241, height: 279, unit: 'mm' }, margins: { top: 12, right: 12, bottom: 12, left: 12 } },
|
|
92
|
+
{ id: 'continuous-14.875x11', name: 'Continuous 14.875x11" (wide)', category: 'receipt',
|
|
93
|
+
pageSize: { width: 378, height: 279, unit: 'mm' }, margins: { top: 12, right: 12, bottom: 12, left: 12 } },
|
|
94
|
+
// Media carta (half letter)
|
|
95
|
+
{ id: 'half-letter', name: 'Media Carta (5.5x8.5")', category: 'paper',
|
|
96
|
+
pageSize: { width: 140, height: 216, unit: 'mm' }, margins: { top: 10, right: 8, bottom: 10, left: 8 } },
|
|
97
|
+
{ id: 'half-letter-landscape', name: 'Media Carta Landscape (8.5x5.5")', category: 'paper',
|
|
98
|
+
pageSize: { width: 216, height: 140, unit: 'mm' }, margins: { top: 8, right: 10, bottom: 8, left: 10 } },
|
|
99
|
+
{ id: 'half-a4', name: 'Media A4 (105x297)', category: 'paper',
|
|
100
|
+
pageSize: { width: 105, height: 297, unit: 'mm' }, margins: { top: 10, right: 5, bottom: 10, left: 5 } },
|
|
101
|
+
// Impresoras de 40 columnas (dot matrix, POS narrow)
|
|
102
|
+
{ id: 'pos-40col', name: 'POS 40 columnas (57mm)', category: 'receipt',
|
|
103
|
+
pageSize: { width: 57, height: 200, unit: 'mm' }, margins: { top: 2, right: 1, bottom: 2, left: 1 } },
|
|
104
|
+
{ id: 'pos-40col-continuous', name: 'POS 40 col Continuo', category: 'receipt',
|
|
105
|
+
pageSize: { width: 57, height: 3000, unit: 'mm' }, margins: { top: 2, right: 1, bottom: 2, left: 1 } },
|
|
106
|
+
{ id: 'dot-matrix-40col', name: 'Matriz de Puntos 40 col', category: 'receipt',
|
|
107
|
+
pageSize: { width: 101, height: 140, unit: 'mm' }, margins: { top: 5, right: 3, bottom: 5, left: 3 } },
|
|
108
|
+
// Impresoras de 80 columnas (dot matrix standard)
|
|
109
|
+
{ id: 'dot-matrix-80col', name: 'Matriz de Puntos 80 col', category: 'receipt',
|
|
110
|
+
pageSize: { width: 203, height: 279, unit: 'mm' }, margins: { top: 12, right: 6, bottom: 12, left: 6 } },
|
|
111
|
+
{ id: 'dot-matrix-132col', name: 'Matriz de Puntos 132 col (wide)', category: 'receipt',
|
|
112
|
+
pageSize: { width: 378, height: 279, unit: 'mm' }, margins: { top: 12, right: 12, bottom: 12, left: 12 } },
|
|
24
113
|
// ─── Avery Label Formats ───────────────────────────────────────
|
|
25
114
|
// Avery 5160 / 8160 — Address Labels (30 per sheet)
|
|
26
115
|
{ id: 'avery-5160', name: 'Avery 5160 — Address (30/sheet)', category: 'label',
|
|
@@ -86,6 +175,9 @@ export const PAGE_SIZES = [
|
|
|
86
175
|
{ id: 'jewelry-22x10', name: 'Jewelry Tag 22x10mm', category: 'label',
|
|
87
176
|
pageSize: { width: 22, height: 10, unit: 'mm' },
|
|
88
177
|
margins: { top: 1, right: 1, bottom: 1, left: 1 } },
|
|
178
|
+
// Custom — user-defined
|
|
179
|
+
{ id: 'custom', name: 'Custom / Personalizado', category: 'custom',
|
|
180
|
+
pageSize: { width: 210, height: 297, unit: 'mm' }, margins: { top: 10, right: 10, bottom: 10, left: 10 } },
|
|
89
181
|
];
|
|
90
182
|
/** Get a page size preset by ID */
|
|
91
183
|
export function getPageSizePreset(id) {
|