@agile-team/mach-report 2.6.1 → 2.7.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/README.md +37 -4
- package/dist/ReportPreview-BdvoqdOd.cjs +6 -0
- package/dist/ReportPreview-COFkbeEM.js +3719 -0
- package/dist/{assets-NVA_sftu.js → assets-B9qJku3V.js} +54 -57
- package/dist/assets-RZan7EyL.cjs +1 -0
- package/dist/capabilities-joSutDF8.js +63 -0
- package/dist/capabilities-xGTpnPjJ.cjs +1 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +869 -753
- package/dist/designer.d.ts +869 -753
- package/dist/designer.js +490 -234
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +86 -3
- package/dist/index.d.ts +86 -3
- package/dist/index.js +582 -508
- package/dist/pdf.cjs +30 -30
- package/dist/pdf.d.cts +11 -3
- package/dist/pdf.d.ts +11 -3
- package/dist/pdf.js +1501 -1500
- package/dist/{plugin-BqBkn_kI.cjs → plugin-9t_ZFwhz.cjs} +1 -1
- package/dist/{plugin-Ds10VnQO.js → plugin-s8Ay8kKk.js} +1 -1
- package/dist/progress-DD964VAB.js +102 -0
- package/dist/progress-KvhwXZ1Q.cjs +1 -0
- package/dist/{report-source-B9bENO0F.js → report-source-BXHNy_AD.js} +337 -332
- package/dist/report-source-CCAvFE3t.cjs +1 -0
- package/dist/server/node.d.cts +26 -3
- package/dist/server/node.d.ts +26 -3
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +125 -92
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +28 -3
- package/dist/server.d.ts +28 -3
- package/dist/server.js +172 -164
- package/dist/style.css +1 -1
- package/dist/task-events-DQ276fn2.cjs +1 -0
- package/dist/task-events-Dpsvf_t2.js +47 -0
- package/dist/vue/async.d.cts +1507 -2083
- package/dist/vue/async.d.ts +1507 -2083
- package/dist/vue/index.d.cts +2376 -3310
- package/dist/vue/index.d.ts +2376 -3310
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +131 -107
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +26 -3
- package/dist/worker.d.ts +26 -3
- package/dist/worker.js +110 -85
- package/dist/xlsx.cjs +14 -14
- package/dist/xlsx.d.cts +11 -3
- package/dist/xlsx.d.ts +11 -3
- package/dist/xlsx.js +656 -652
- package/package.json +2 -2
- package/dist/ReportPreview-Dk-28QAi.js +0 -2946
- package/dist/ReportPreview-FSvcBLjH.cjs +0 -6
- package/dist/assets-66UBlhES.cjs +0 -1
- package/dist/capabilities-CNjIirfo.js +0 -36
- package/dist/capabilities-D4xeVYSR.cjs +0 -1
- package/dist/grid-geometry-BNptEcMm.js +0 -65
- package/dist/grid-geometry-CZ_cYB6O.cjs +0 -1
- package/dist/report-source-BbNkkBDy.cjs +0 -1
package/dist/vue/async.d.cts
CHANGED
|
@@ -1,2083 +1,1507 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { App } from 'vue';
|
|
3
|
-
import { ComponentCustomProps } from 'vue';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
kind: "
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| "
|
|
91
|
-
| "
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
declare
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
text
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
declare interface
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
/**
|
|
303
|
-
|
|
304
|
-
/**
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
/**
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
/**
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
/**
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
/**
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
type:
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
type:
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
type:
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
type:
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
/**
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
declare
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
/**
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
declare interface
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
declare
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
declare interface
|
|
1487
|
-
(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
/**
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
paddingMm?: number;
|
|
1509
|
-
}
|
|
1510
|
-
|
|
1511
|
-
declare interface PlanGrid_3 {
|
|
1512
|
-
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
1513
|
-
cells: (GridCell_3 | null)[][];
|
|
1514
|
-
colWidthsMm?: number[];
|
|
1515
|
-
rowHeightsMm?: number[];
|
|
1516
|
-
gapMm?: number;
|
|
1517
|
-
/** 单元格四边内距;旧静态网格默认 0.5mm,分页列表使用其真实测量内距。 */
|
|
1518
|
-
paddingMm?: number;
|
|
1519
|
-
}
|
|
1520
|
-
|
|
1521
|
-
declare interface PlanPage {
|
|
1522
|
-
/** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
|
|
1523
|
-
layout?: "page" | "wide";
|
|
1524
|
-
pageWidthMm: number;
|
|
1525
|
-
pageHeightMm: number;
|
|
1526
|
-
marginTopMm?: number;
|
|
1527
|
-
marginBottomMm?: number;
|
|
1528
|
-
marginLeftMm?: number;
|
|
1529
|
-
marginRightMm?: number;
|
|
1530
|
-
components: PlanComponent[];
|
|
1531
|
-
}
|
|
1532
|
-
|
|
1533
|
-
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
1534
|
-
declare interface PlanTableFragment {
|
|
1535
|
-
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
1536
|
-
id: string;
|
|
1537
|
-
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
1538
|
-
rowIndex: number;
|
|
1539
|
-
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
1540
|
-
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
1541
|
-
columnKeys: string[];
|
|
1542
|
-
layout?: "page" | "wide";
|
|
1543
|
-
title?: string;
|
|
1544
|
-
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1545
|
-
source?: Omit<ReportCellSource, "field" | "rowKey"> & { rowKey?: string | number };
|
|
1546
|
-
}
|
|
1547
|
-
|
|
1548
|
-
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
1549
|
-
declare interface PlanTableFragment_2 {
|
|
1550
|
-
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
1551
|
-
id: string;
|
|
1552
|
-
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
1553
|
-
rowIndex: number;
|
|
1554
|
-
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
1555
|
-
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
1556
|
-
columnKeys: string[];
|
|
1557
|
-
layout?: "page" | "wide";
|
|
1558
|
-
title?: string;
|
|
1559
|
-
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1560
|
-
source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
|
|
1561
|
-
rowKey?: string | number;
|
|
1562
|
-
};
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
1566
|
-
declare interface PlanTableFragment_3 {
|
|
1567
|
-
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
1568
|
-
id: string;
|
|
1569
|
-
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
1570
|
-
rowIndex: number;
|
|
1571
|
-
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
1572
|
-
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
1573
|
-
columnKeys: string[];
|
|
1574
|
-
layout?: "page" | "wide";
|
|
1575
|
-
title?: string;
|
|
1576
|
-
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
1577
|
-
source?: Omit<ReportCellSource_3, "field" | "rowKey"> & {
|
|
1578
|
-
rowKey?: string | number;
|
|
1579
|
-
};
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
1583
|
-
export declare function preloadMachReport(): Promise<unknown>;
|
|
1584
|
-
|
|
1585
|
-
declare interface RenderPlan {
|
|
1586
|
-
schemaVersion: string;
|
|
1587
|
-
pages: PlanPage[];
|
|
1588
|
-
}
|
|
1589
|
-
|
|
1590
|
-
/** 预览中的物理坐标;合并单元格使用左上角坐标。 */
|
|
1591
|
-
declare interface ReportCellAddress {
|
|
1592
|
-
pageIndex: number;
|
|
1593
|
-
componentIndex: number;
|
|
1594
|
-
rowIndex: number;
|
|
1595
|
-
columnIndex: number;
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
|
-
/** 预览中的物理坐标;合并单元格使用左上角坐标。 */
|
|
1599
|
-
declare interface ReportCellAddress_2 {
|
|
1600
|
-
pageIndex: number;
|
|
1601
|
-
componentIndex: number;
|
|
1602
|
-
rowIndex: number;
|
|
1603
|
-
columnIndex: number;
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
declare interface ReportCellContext {
|
|
1607
|
-
address: ReportCellAddress_2;
|
|
1608
|
-
cell: Readonly<GridCell_2>;
|
|
1609
|
-
component: Readonly<PlanComponent_2>;
|
|
1610
|
-
value: ReportCellValue_2;
|
|
1611
|
-
valueType: ReportCellValueType;
|
|
1612
|
-
table?: ReportCellTableIdentity_2;
|
|
1613
|
-
/** Stable business identity. Physical row indices must never be used as database keys. */
|
|
1614
|
-
source?: Readonly<ReportCellSource_2>;
|
|
1615
|
-
editable: boolean;
|
|
1616
|
-
readOnlyReason?: ReportCellReadOnlyReason;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
declare interface ReportCellEdit {
|
|
1620
|
-
address: ReportCellAddress;
|
|
1621
|
-
table?: ReportCellTableIdentity;
|
|
1622
|
-
source?: Readonly<ReportCellSource>;
|
|
1623
|
-
previousValue: ReportCellValue;
|
|
1624
|
-
previousText: string;
|
|
1625
|
-
value: ReportCellValue;
|
|
1626
|
-
text: string;
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
declare interface ReportCellEdit_2 {
|
|
1630
|
-
address: ReportCellAddress_2;
|
|
1631
|
-
table?: ReportCellTableIdentity_2;
|
|
1632
|
-
source?: Readonly<ReportCellSource_2>;
|
|
1633
|
-
previousValue: ReportCellValue_2;
|
|
1634
|
-
previousText: string;
|
|
1635
|
-
value: ReportCellValue_2;
|
|
1636
|
-
text: string;
|
|
1637
|
-
}
|
|
1638
|
-
|
|
1639
|
-
declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" | "structure";
|
|
1640
|
-
|
|
1641
|
-
declare interface ReportCellSelection {
|
|
1642
|
-
anchor: ReportCellAddress;
|
|
1643
|
-
focus: ReportCellAddress;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1647
|
-
declare interface ReportCellSource {
|
|
1648
|
-
datasetId: string;
|
|
1649
|
-
rowKey: string | number;
|
|
1650
|
-
field: string;
|
|
1651
|
-
revision?: string | number;
|
|
1652
|
-
sourceToken?: string;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1656
|
-
declare interface ReportCellSource_2 {
|
|
1657
|
-
datasetId: string;
|
|
1658
|
-
rowKey: string | number;
|
|
1659
|
-
field: string;
|
|
1660
|
-
revision?: string | number;
|
|
1661
|
-
sourceToken?: string;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1665
|
-
declare interface ReportCellSource_3 {
|
|
1666
|
-
datasetId: string;
|
|
1667
|
-
rowKey: string | number;
|
|
1668
|
-
field: string;
|
|
1669
|
-
revision?: string | number;
|
|
1670
|
-
sourceToken?: string;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
declare interface ReportCellTableIdentity {
|
|
1674
|
-
id: string;
|
|
1675
|
-
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1676
|
-
rowIndex: number;
|
|
1677
|
-
role: PlanTableFragment["role"];
|
|
1678
|
-
columnKey?: string;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
declare interface ReportCellTableIdentity_2 {
|
|
1682
|
-
id: string;
|
|
1683
|
-
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1684
|
-
rowIndex: number;
|
|
1685
|
-
role: PlanTableFragment_2["role"];
|
|
1686
|
-
columnKey?: string;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
declare type ReportCellValue = string | number | boolean | null;
|
|
1690
|
-
|
|
1691
|
-
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
1692
|
-
|
|
1693
|
-
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
1694
|
-
|
|
1695
|
-
declare interface ReportDefinition {
|
|
1696
|
-
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1697
|
-
template: ReportTemplate | ReportTemplateLoader;
|
|
1698
|
-
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
1699
|
-
datasets?: DatasetRows;
|
|
1700
|
-
load?: (context: ReportLoadContext) => DatasetRows | Promise<DatasetRows>;
|
|
1701
|
-
/** 可选统一适配器;load 存在时仍优先 load,兼容已有定义。 */
|
|
1702
|
-
provider?: ReportProvider;
|
|
1703
|
-
/** 可选业务数据契约;声明的数据集缺失或字段不合法时,在分页前给出结构化错误。 */
|
|
1704
|
-
dataSchema?: Record<string, DatasetContract>;
|
|
1705
|
-
dataValidation?: Pick<DatasetValidationOptions, "maxRows" | "maxCells" | "maxIssues">;
|
|
1706
|
-
/** 覆盖模板参数定义;动态模板应在此声明查询面板元数据,避免查询前先请求模板。 */
|
|
1707
|
-
params?: ReportParamDef[];
|
|
1708
|
-
pagination?: PaginateOptions;
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
declare interface ReportDiagnostic { code: string; message: string; path?: string; severity: "warning" | "error" | "info" }
|
|
1712
|
-
|
|
1713
|
-
declare interface ReportEditBatch {
|
|
1714
|
-
/** Idempotency identity; the server should bind it to the exact payload. */
|
|
1715
|
-
requestId: string;
|
|
1716
|
-
edits: ReportCellEdit_2[];
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
declare interface ReportEditConflict {
|
|
1720
|
-
source?: Readonly<ReportCellSource_2>;
|
|
1721
|
-
address?: ReportCellAddress_2;
|
|
1722
|
-
message: string;
|
|
1723
|
-
currentValue?: ReportCellValue_2;
|
|
1724
|
-
revision?: string | number;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
1728
|
-
declare interface ReportEditingOptions {
|
|
1729
|
-
canEdit?(context: ReportCellContext): boolean;
|
|
1730
|
-
/** Return an error message or throw to reject the edit. */
|
|
1731
|
-
validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
1732
|
-
/** Called before applying the change. A rejection leaves the current report untouched. */
|
|
1733
|
-
save?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1734
|
-
/** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
|
|
1735
|
-
saveBatch?(batch: Readonly<ReportEditBatch>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1736
|
-
/** Restrict persistence to plans that supply stable datasetId/rowKey/field metadata. */
|
|
1737
|
-
requireSource?: boolean;
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
declare interface ReportEditOperation {
|
|
1741
|
-
/** Reload, another import or unmount aborts the operation. Save adapters should forward this signal. */
|
|
1742
|
-
signal: AbortSignal;
|
|
1743
|
-
requestId?: string;
|
|
1744
|
-
action?: "edit" | "undo" | "redo" | "restore";
|
|
1745
|
-
}
|
|
1746
|
-
|
|
1747
|
-
declare interface ReportEditResult {
|
|
1748
|
-
/** A successful result may advance concurrency tokens for the affected dataset. */
|
|
1749
|
-
revision?: string | number;
|
|
1750
|
-
sourceToken?: string;
|
|
1751
|
-
/** Any conflict rejects the entire client batch. A server must also transact atomically. */
|
|
1752
|
-
conflicts?: readonly ReportEditConflict[];
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
/** 报表含表头但业务行为空时,由接入方明确声明;组件不推测业务数据。 */
|
|
1756
|
-
declare interface ReportEmptyState {
|
|
1757
|
-
title?: string;
|
|
1758
|
-
description?: string;
|
|
1759
|
-
}
|
|
1760
|
-
|
|
1761
|
-
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
1762
|
-
declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
1763
|
-
|
|
1764
|
-
/** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
|
|
1765
|
-
declare interface ReportFetcher {
|
|
1766
|
-
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
1767
|
-
getParamDefs?: (reportIds: string[]) => ReportParamDef[];
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
declare interface ReportFetchInput {
|
|
1771
|
-
reportIds: string[];
|
|
1772
|
-
params: Record<string, string>;
|
|
1773
|
-
signal?: AbortSignal;
|
|
1774
|
-
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1775
|
-
onWarning?: (message: string) => void;
|
|
1776
|
-
onQueryResult?: (reportId: string, result: ReportQueryResult) => void;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
declare interface ReportFieldContract {
|
|
1780
|
-
field: string;
|
|
1781
|
-
label?: string;
|
|
1782
|
-
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
1783
|
-
required?: boolean;
|
|
1784
|
-
nullable?: boolean;
|
|
1785
|
-
enum?: readonly (string | number | boolean)[];
|
|
1786
|
-
min?: number; max?: number;
|
|
1787
|
-
minLength?: number; maxLength?: number;
|
|
1788
|
-
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
1789
|
-
unit?: string;
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
declare interface ReportFieldTarget {
|
|
1793
|
-
field: string;
|
|
1794
|
-
datasetId?: string;
|
|
1795
|
-
rowKey?: string | number;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
declare interface ReportInteractionOptions {
|
|
1799
|
-
/** Screen-only frozen panes; exported geometry is unchanged. */
|
|
1800
|
-
freezeHeaders?: boolean;
|
|
1801
|
-
/** Leading identity columns, from 0 to 20. */
|
|
1802
|
-
frozenColumns?: number;
|
|
1803
|
-
/** Show workbook sheets / report sections when available. Default true. */
|
|
1804
|
-
navigation?: boolean;
|
|
1805
|
-
}
|
|
1806
|
-
|
|
1807
|
-
/** 取数与排版共同使用的请求上下文;取消只影响本次调用。 */
|
|
1808
|
-
declare interface ReportLoadContext {
|
|
1809
|
-
reportId: string;
|
|
1810
|
-
params: Record<string, string>;
|
|
1811
|
-
signal?: AbortSignal;
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
1815
|
-
declare interface ReportParamDef {
|
|
1816
|
-
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
1817
|
-
field: string;
|
|
1818
|
-
/** 显示名(缺省用 field) */
|
|
1819
|
-
label?: string;
|
|
1820
|
-
type?: "text" | "number" | "date" | "select";
|
|
1821
|
-
/** select 选项 */
|
|
1822
|
-
options?: Array<{ label: string; value: string }>;
|
|
1823
|
-
defaultValue?: string;
|
|
1824
|
-
required?: boolean;
|
|
1825
|
-
placeholder?: string;
|
|
1826
|
-
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1827
|
-
min?: number | string;
|
|
1828
|
-
max?: number | string;
|
|
1829
|
-
minLength?: number;
|
|
1830
|
-
maxLength?: number;
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
1834
|
-
declare interface ReportParamDef_2 {
|
|
1835
|
-
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
1836
|
-
field: string;
|
|
1837
|
-
/** 显示名(缺省用 field) */
|
|
1838
|
-
label?: string;
|
|
1839
|
-
type?: "text" | "number" | "date" | "select";
|
|
1840
|
-
/** select 选项 */
|
|
1841
|
-
options?: Array<{
|
|
1842
|
-
label: string;
|
|
1843
|
-
value: string;
|
|
1844
|
-
}>;
|
|
1845
|
-
defaultValue?: string;
|
|
1846
|
-
required?: boolean;
|
|
1847
|
-
placeholder?: string;
|
|
1848
|
-
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1849
|
-
min?: number | string;
|
|
1850
|
-
max?: number | string;
|
|
1851
|
-
minLength?: number;
|
|
1852
|
-
maxLength?: number;
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
|
-
declare interface ReportParamIssue { code: ReportParamIssueCode; path: string; field: string; message: string }
|
|
1856
|
-
|
|
1857
|
-
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1858
|
-
|
|
1859
|
-
declare interface ReportPreferencesAdapter {
|
|
1860
|
-
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
1861
|
-
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
1862
|
-
remove?(key: string): void | Promise<void>;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
declare interface ReportPreferencesOptions {
|
|
1866
|
-
/** Host-scoped key; do not share one key between unrelated users/tenants. */
|
|
1867
|
-
key: string;
|
|
1868
|
-
adapter: ReportPreferencesAdapter;
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
declare type ReportPreviewPreferences = Record<ReportPreviewTool, boolean>;
|
|
1872
|
-
|
|
1873
|
-
declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
1874
|
-
|
|
1875
|
-
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
1876
|
-
declare interface ReportProvider {
|
|
1877
|
-
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
1878
|
-
save?(input: ReportSaveInput): ReportSaveResult | Promise<ReportSaveResult>;
|
|
1879
|
-
export?(input: ReportProviderExportInput): ReportProviderExportResult | Promise<ReportProviderExportResult>;
|
|
1880
|
-
templates?: ReportTemplateProvider;
|
|
1881
|
-
}
|
|
1882
|
-
|
|
1883
|
-
declare interface ReportProviderExportInput extends ReportLoadContext { format: "pdf" | "xlsx" }
|
|
1884
|
-
|
|
1885
|
-
declare interface ReportProviderExportResult { bytes: Uint8Array; contentType: string; fileName?: string; diagnostics?: ReportDiagnostic[] }
|
|
1886
|
-
|
|
1887
|
-
declare interface ReportQueryResult {
|
|
1888
|
-
datasets: DatasetRows;
|
|
1889
|
-
revision?: string;
|
|
1890
|
-
sourceToken?: string;
|
|
1891
|
-
diagnostics?: ReportDiagnostic[];
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
1895
|
-
|
|
1896
|
-
declare interface ReportSaveInput extends ReportLoadContext {
|
|
1897
|
-
requestId: string;
|
|
1898
|
-
expectedRevision?: string;
|
|
1899
|
-
sourceToken?: string;
|
|
1900
|
-
edits: readonly ReportCellEdit[];
|
|
1901
|
-
action?: "edit" | "undo" | "redo" | "restore";
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
declare interface ReportSaveResult {
|
|
1905
|
-
revision: string;
|
|
1906
|
-
sourceToken?: string;
|
|
1907
|
-
conflicts?: Array<{ editIndex: number; code: string; message: string }>;
|
|
1908
|
-
diagnostics?: ReportDiagnostic[];
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
declare interface ReportTemplate {
|
|
1912
|
-
schemaVersion?: string;
|
|
1913
|
-
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1914
|
-
params?: ReportParamDef[];
|
|
1915
|
-
pages: TemplatePage[];
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
declare interface ReportTemplate_2 {
|
|
1919
|
-
schemaVersion?: string;
|
|
1920
|
-
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1921
|
-
params?: ReportParamDef_2[];
|
|
1922
|
-
pages: TemplatePage_2[];
|
|
1923
|
-
}
|
|
1924
|
-
|
|
1925
|
-
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
1926
|
-
declare interface ReportTemplateDocument {
|
|
1927
|
-
schemaVersion: "1.0";
|
|
1928
|
-
id: string;
|
|
1929
|
-
name: string;
|
|
1930
|
-
/** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
|
|
1931
|
-
revision?: string;
|
|
1932
|
-
description?: string;
|
|
1933
|
-
template: ReportTemplate;
|
|
1934
|
-
}
|
|
1935
|
-
|
|
1936
|
-
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1937
|
-
|
|
1938
|
-
declare interface ReportTemplateProvider {
|
|
1939
|
-
list(context: { signal?: AbortSignal }): Promise<ReportTemplateSummary[]>;
|
|
1940
|
-
get(id: string, context: { signal?: AbortSignal }): Promise<ReportTemplateDocument | undefined>;
|
|
1941
|
-
}
|
|
1942
|
-
|
|
1943
|
-
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1944
|
-
|
|
1945
|
-
declare interface RichParagraph {
|
|
1946
|
-
segments: RichSegment[];
|
|
1947
|
-
align?: ComponentStyle["align"];
|
|
1948
|
-
lineHeight?: number;
|
|
1949
|
-
spaceBeforeMm?: number;
|
|
1950
|
-
spaceAfterMm?: number;
|
|
1951
|
-
indentMm?: number;
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
declare interface RichParagraph_2 {
|
|
1955
|
-
segments: RichSegment_2[];
|
|
1956
|
-
align?: ComponentStyle_2["align"];
|
|
1957
|
-
lineHeight?: number;
|
|
1958
|
-
spaceBeforeMm?: number;
|
|
1959
|
-
spaceAfterMm?: number;
|
|
1960
|
-
indentMm?: number;
|
|
1961
|
-
}
|
|
1962
|
-
|
|
1963
|
-
declare interface RichParagraph_3 {
|
|
1964
|
-
segments: RichSegment_3[];
|
|
1965
|
-
align?: ComponentStyle_3["align"];
|
|
1966
|
-
lineHeight?: number;
|
|
1967
|
-
spaceBeforeMm?: number;
|
|
1968
|
-
spaceAfterMm?: number;
|
|
1969
|
-
indentMm?: number;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
declare interface RichSegment {
|
|
1973
|
-
kind?: "text" | "field";
|
|
1974
|
-
text?: string;
|
|
1975
|
-
field?: string;
|
|
1976
|
-
style?: ComponentStyle;
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
declare interface RichSegment_2 {
|
|
1980
|
-
kind?: "text" | "field";
|
|
1981
|
-
text?: string;
|
|
1982
|
-
field?: string;
|
|
1983
|
-
style?: ComponentStyle_2;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
declare interface RichSegment_3 {
|
|
1987
|
-
kind?: "text" | "field";
|
|
1988
|
-
text?: string;
|
|
1989
|
-
field?: string;
|
|
1990
|
-
style?: ComponentStyle_3;
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
1994
|
-
declare interface StyleRule {
|
|
1995
|
-
when: {
|
|
1996
|
-
field: string;
|
|
1997
|
-
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
1998
|
-
value: number | string;
|
|
1999
|
-
};
|
|
2000
|
-
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2001
|
-
style: Record<string, unknown>;
|
|
2002
|
-
}
|
|
2003
|
-
|
|
2004
|
-
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
2005
|
-
declare interface StyleRule_2 {
|
|
2006
|
-
when: {
|
|
2007
|
-
field: string;
|
|
2008
|
-
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
2009
|
-
value: number | string;
|
|
2010
|
-
};
|
|
2011
|
-
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
2012
|
-
style: Record<string, unknown>;
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
declare type TemplateComponent = PlanComponent | ListComponent;
|
|
2016
|
-
|
|
2017
|
-
declare type TemplateComponent_2 = PlanComponent_3 | ListComponent_2;
|
|
2018
|
-
|
|
2019
|
-
declare interface TemplatePage {
|
|
2020
|
-
widthMm: number;
|
|
2021
|
-
heightMm: number;
|
|
2022
|
-
/** 宽表保持全列自然宽度,页高只控制内部纵向分段。 */
|
|
2023
|
-
layout?: "page" | "wide";
|
|
2024
|
-
marginTopMm?: number;
|
|
2025
|
-
marginBottomMm?: number;
|
|
2026
|
-
marginLeftMm?: number;
|
|
2027
|
-
marginRightMm?: number;
|
|
2028
|
-
components: TemplateComponent[];
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
declare interface TemplatePage_2 {
|
|
2032
|
-
widthMm: number;
|
|
2033
|
-
heightMm: number;
|
|
2034
|
-
/** 宽表保持全列自然宽度,页高只控制内部纵向分段。 */
|
|
2035
|
-
layout?: "page" | "wide";
|
|
2036
|
-
marginTopMm?: number;
|
|
2037
|
-
marginBottomMm?: number;
|
|
2038
|
-
marginLeftMm?: number;
|
|
2039
|
-
marginRightMm?: number;
|
|
2040
|
-
components: TemplateComponent_2[];
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2043
|
-
/**
|
|
2044
|
-
* 文本测量与折行(分页/Canvas/PDF 共用的唯一折行真相源)。
|
|
2045
|
-
*
|
|
2046
|
-
* 测量模型可注入(TextMeasurer):
|
|
2047
|
-
* - 默认 createHeuristicMeasurer():CJK/拉丁宽度启发式(零依赖、Node 可用)
|
|
2048
|
-
* - 浏览器端可注入 createCanvasMeasurer()(真字体 metrics,消除三端折行差异)
|
|
2049
|
-
*/
|
|
2050
|
-
|
|
2051
|
-
declare interface TextMeasureOptions {
|
|
2052
|
-
fontSizePt: number;
|
|
2053
|
-
fontFamily?: string;
|
|
2054
|
-
bold?: boolean;
|
|
2055
|
-
italic?: boolean;
|
|
2056
|
-
letterSpacingPt?: number;
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
|
-
/** 宽度测量接口:返回文本在给定字号下的宽度(mm)。实现必须无副作用、可缓存。 */
|
|
2060
|
-
declare interface TextMeasurer {
|
|
2061
|
-
measureMm(text: string, options: TextMeasureOptions): number;
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
2066
|
-
* - 网格组件 → 真表格:列宽(mm→Excel 宽度)、行高(mm→pt)、colSpan/rowSpan 合并、
|
|
2067
|
-
* 加粗/对齐/底色/字号直译(resolveGridLayout 复用单真相源几何)
|
|
2068
|
-
* - 文本组件 → 合并标题行(顺序流式输出,保字号/加粗/对齐;非像素级定位,
|
|
2069
|
-
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
2070
|
-
* - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
|
|
2071
|
-
*/
|
|
2072
|
-
declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2 {
|
|
2073
|
-
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
2074
|
-
sheetName?: (sheetIndex: number) => string;
|
|
2075
|
-
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
|
2076
|
-
sheetMode?: "auto" | "pages" | "continuous";
|
|
2077
|
-
/** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
|
|
2078
|
-
valueMode?: "text" | "raw";
|
|
2079
|
-
/** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
|
|
2080
|
-
paperSize?: "auto" | "a3" | "a4" | "a5";
|
|
2081
|
-
}
|
|
2082
|
-
|
|
2083
|
-
export { }
|
|
1
|
+
import { AllowedComponentProps } from 'vue';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { ComponentCustomProps } from 'vue';
|
|
4
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
5
|
+
import { ComputedRef } from 'vue';
|
|
6
|
+
import { ExtractPropTypes } from 'vue';
|
|
7
|
+
import { PropType } from 'vue';
|
|
8
|
+
import { VNodeProps } from 'vue';
|
|
9
|
+
declare interface AssetRenderBudget {
|
|
10
|
+
/** Maximum newly rendered assets, default 1000. Existing imageData is kept unchanged. */
|
|
11
|
+
maxAssets?: number;
|
|
12
|
+
/** Maximum image payload bytes per new asset, default 32 MiB. */
|
|
13
|
+
maxImageBytes?: number;
|
|
14
|
+
/** Maximum total image payload bytes for new assets, default 128 MiB. */
|
|
15
|
+
maxTotalImageBytes?: number;
|
|
16
|
+
/** Wall-clock budget, including adapters that ignore AbortSignal. Default 30 seconds. */
|
|
17
|
+
maxDurationMs?: number;
|
|
18
|
+
}
|
|
19
|
+
declare interface AssetRenderOptions extends OutputDiagnosticOptions {
|
|
20
|
+
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
21
|
+
assetBudget?: AssetRenderBudget;
|
|
22
|
+
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
23
|
+
assetFailure?: "throw" | "placeholder";
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 列值格式化(声明式、JSON 可序列化)。
|
|
28
|
+
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
29
|
+
* 三后端(DOM/Canvas/PDF)零改动。
|
|
30
|
+
*
|
|
31
|
+
* 语义约定(v0.9 固化):
|
|
32
|
+
* - number.digits 显式给出 → 精确保留(12.5 + digits:2 → "12.50")
|
|
33
|
+
* - number.thousands 默认 false(千分位显式开启)
|
|
34
|
+
* - date 字符串按"本地时区的日历日"解析(YYYY-MM-DD / YYYY/MM/DD 直取年月日,
|
|
35
|
+
* 不经 Date 字符串构造——后者按 UTC 零点,负时区环境会少一天)
|
|
36
|
+
*/
|
|
37
|
+
declare type ColumnFormat = {
|
|
38
|
+
kind: "number";
|
|
39
|
+
thousands?: boolean;
|
|
40
|
+
digits?: number;
|
|
41
|
+
} | {
|
|
42
|
+
kind: "percent";
|
|
43
|
+
digits?: number;
|
|
44
|
+
} | {
|
|
45
|
+
kind: "date";
|
|
46
|
+
pattern?: string;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* 列值格式化(声明式、JSON 可序列化)。
|
|
50
|
+
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
51
|
+
* 三后端(DOM/Canvas/PDF)零改动。
|
|
52
|
+
*
|
|
53
|
+
* 语义约定(v0.9 固化):
|
|
54
|
+
* - number.digits 显式给出 → 精确保留(12.5 + digits:2 → "12.50")
|
|
55
|
+
* - number.thousands 默认 false(千分位显式开启)
|
|
56
|
+
* - date 字符串按"本地时区的日历日"解析(YYYY-MM-DD / YYYY/MM/DD 直取年月日,
|
|
57
|
+
* 不经 Date 字符串构造——后者按 UTC 零点,负时区环境会少一天)
|
|
58
|
+
*/
|
|
59
|
+
declare type ColumnFormat_2 = {
|
|
60
|
+
kind: "number";
|
|
61
|
+
thousands?: boolean;
|
|
62
|
+
digits?: number;
|
|
63
|
+
} | {
|
|
64
|
+
kind: "percent";
|
|
65
|
+
digits?: number;
|
|
66
|
+
} | {
|
|
67
|
+
kind: "date";
|
|
68
|
+
pattern?: string;
|
|
69
|
+
};
|
|
70
|
+
declare interface ComponentImageContext {
|
|
71
|
+
readonly component: Readonly<PlanComponent>;
|
|
72
|
+
readonly pageIndex: number;
|
|
73
|
+
readonly componentIndex: number;
|
|
74
|
+
readonly componentPath: readonly number[];
|
|
75
|
+
readonly signal: AbortSignal;
|
|
76
|
+
}
|
|
77
|
+
declare type ComponentImageRenderer = (context: ComponentImageContext) => string | Promise<string>;
|
|
78
|
+
declare type ComponentKind = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
79
|
+
declare type ComponentKind_2 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
80
|
+
declare type ComponentKind_3 = "text" | "image" | "barcode" | "qrcode" | "chart" | "line" | "rect" | "ellipse";
|
|
81
|
+
declare interface ComponentStyle {
|
|
82
|
+
fontSizePx?: number;
|
|
83
|
+
fontSize?: number;
|
|
84
|
+
fontFamily?: string;
|
|
85
|
+
bold?: boolean;
|
|
86
|
+
italic?: boolean;
|
|
87
|
+
underline?: boolean;
|
|
88
|
+
color?: string;
|
|
89
|
+
backgroundColor?: string;
|
|
90
|
+
align?: "left" | "center" | "right" | "justify";
|
|
91
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
92
|
+
lineColor?: string;
|
|
93
|
+
borderColor?: string;
|
|
94
|
+
lineWidthPt?: number;
|
|
95
|
+
borderTop?: boolean;
|
|
96
|
+
borderRight?: boolean;
|
|
97
|
+
borderBottom?: boolean;
|
|
98
|
+
borderLeft?: boolean;
|
|
99
|
+
lineHeight?: number;
|
|
100
|
+
letterSpacing?: number;
|
|
101
|
+
opacity?: number;
|
|
102
|
+
rotateDeg?: number;
|
|
103
|
+
}
|
|
104
|
+
declare interface ComponentStyle_2 {
|
|
105
|
+
fontSizePx?: number;
|
|
106
|
+
fontSize?: number;
|
|
107
|
+
fontFamily?: string;
|
|
108
|
+
bold?: boolean;
|
|
109
|
+
italic?: boolean;
|
|
110
|
+
underline?: boolean;
|
|
111
|
+
color?: string;
|
|
112
|
+
backgroundColor?: string;
|
|
113
|
+
align?: "left" | "center" | "right" | "justify";
|
|
114
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
115
|
+
lineColor?: string;
|
|
116
|
+
borderColor?: string;
|
|
117
|
+
lineWidthPt?: number;
|
|
118
|
+
borderTop?: boolean;
|
|
119
|
+
borderRight?: boolean;
|
|
120
|
+
borderBottom?: boolean;
|
|
121
|
+
borderLeft?: boolean;
|
|
122
|
+
lineHeight?: number;
|
|
123
|
+
letterSpacing?: number;
|
|
124
|
+
opacity?: number;
|
|
125
|
+
rotateDeg?: number;
|
|
126
|
+
}
|
|
127
|
+
declare interface ComponentStyle_3 {
|
|
128
|
+
fontSizePx?: number;
|
|
129
|
+
fontSize?: number;
|
|
130
|
+
fontFamily?: string;
|
|
131
|
+
bold?: boolean;
|
|
132
|
+
italic?: boolean;
|
|
133
|
+
underline?: boolean;
|
|
134
|
+
color?: string;
|
|
135
|
+
backgroundColor?: string;
|
|
136
|
+
align?: "left" | "center" | "right" | "justify";
|
|
137
|
+
verticalAlign?: "top" | "middle" | "bottom";
|
|
138
|
+
lineColor?: string;
|
|
139
|
+
borderColor?: string;
|
|
140
|
+
lineWidthPt?: number;
|
|
141
|
+
borderTop?: boolean;
|
|
142
|
+
borderRight?: boolean;
|
|
143
|
+
borderBottom?: boolean;
|
|
144
|
+
borderLeft?: boolean;
|
|
145
|
+
lineHeight?: number;
|
|
146
|
+
letterSpacing?: number;
|
|
147
|
+
opacity?: number;
|
|
148
|
+
rotateDeg?: number;
|
|
149
|
+
}
|
|
150
|
+
declare interface DatasetContract {
|
|
151
|
+
fields: readonly ReportFieldContract[];
|
|
152
|
+
rowKey?: string;
|
|
153
|
+
}
|
|
154
|
+
declare type DatasetRows = Record<string, Record<string, unknown>[]>;
|
|
155
|
+
declare interface DatasetValidationOptions {
|
|
156
|
+
path?: string;
|
|
157
|
+
maxRows?: number;
|
|
158
|
+
maxCells?: number;
|
|
159
|
+
maxIssues?: number;
|
|
160
|
+
}
|
|
161
|
+
declare interface ExcelImportedSheet {
|
|
162
|
+
name: string;
|
|
163
|
+
/** Original, one-based workbook position. */
|
|
164
|
+
index: number;
|
|
165
|
+
range: string;
|
|
166
|
+
rowCount: number;
|
|
167
|
+
columnCount: number;
|
|
168
|
+
/** Zero-based index into template.pages. */
|
|
169
|
+
pageStart: number;
|
|
170
|
+
pageCount: number;
|
|
171
|
+
}
|
|
172
|
+
/** Limits apply to the selected rectangular ranges, including their empty cells. */
|
|
173
|
+
declare interface ExcelImportLimits {
|
|
174
|
+
/** Compressed input, default 20 MiB. */
|
|
175
|
+
maxFileBytes?: number;
|
|
176
|
+
/** Declared ZIP uncompressed total, default 64 MiB. */
|
|
177
|
+
maxUncompressedBytes?: number;
|
|
178
|
+
/** Total selected cells across sheets, default 250,000; hard ceiling 1,000,000. */
|
|
179
|
+
maxCells?: number;
|
|
180
|
+
/** Rows per selected sheet, default 100,000; hard ceiling 1,048,576. */
|
|
181
|
+
maxRows?: number;
|
|
182
|
+
/** Columns per selected sheet, default 2,048; hard ceiling 16,384. */
|
|
183
|
+
maxColumns?: number;
|
|
184
|
+
/** Workbook sheets, default 32. */
|
|
185
|
+
maxSheets?: number;
|
|
186
|
+
}
|
|
187
|
+
/** Limits apply to the selected rectangular ranges, including their empty cells. */
|
|
188
|
+
declare interface ExcelImportLimits_2 {
|
|
189
|
+
/** Compressed input, default 20 MiB. */
|
|
190
|
+
maxFileBytes?: number;
|
|
191
|
+
/** Declared ZIP uncompressed total, default 64 MiB. */
|
|
192
|
+
maxUncompressedBytes?: number;
|
|
193
|
+
/** Total selected cells across sheets, default 250,000; hard ceiling 1,000,000. */
|
|
194
|
+
maxCells?: number;
|
|
195
|
+
/** Rows per selected sheet, default 100,000; hard ceiling 1,048,576. */
|
|
196
|
+
maxRows?: number;
|
|
197
|
+
/** Columns per selected sheet, default 2,048; hard ceiling 16,384. */
|
|
198
|
+
maxColumns?: number;
|
|
199
|
+
/** Workbook sheets, default 32. */
|
|
200
|
+
maxSheets?: number;
|
|
201
|
+
}
|
|
202
|
+
declare interface ExcelImportOptions extends OutputTaskOptions_2 {
|
|
203
|
+
/** Sheet names or one-based workbook positions. Default: all visible sheets. */
|
|
204
|
+
sheets?: Array<string | number>;
|
|
205
|
+
/** A1 range for every sheet, or ranges keyed by exact sheet name. */
|
|
206
|
+
range?: string | Record<string, string>;
|
|
207
|
+
/** Wide preserves natural column widths. A3/A4 scale the complete width to paper. */
|
|
208
|
+
layout?: "wide" | "a3" | "a4";
|
|
209
|
+
/** Only applies to A3/A4; default landscape. */
|
|
210
|
+
landscape?: boolean;
|
|
211
|
+
/** Vertical preview segment limit, default 80, maximum 200. Merges remain intact. */
|
|
212
|
+
maxRowsPerPage?: number;
|
|
213
|
+
/** Optional resource limits; hard ceilings prevent unbounded allocations. */
|
|
214
|
+
limits?: ExcelImportLimits;
|
|
215
|
+
}
|
|
216
|
+
declare interface ExcelImportOptions_2 extends OutputTaskOptions_3 {
|
|
217
|
+
/** Sheet names or one-based workbook positions. Default: all visible sheets. */
|
|
218
|
+
sheets?: Array<string | number>;
|
|
219
|
+
/** A1 range for every sheet, or ranges keyed by exact sheet name. */
|
|
220
|
+
range?: string | Record<string, string>;
|
|
221
|
+
/** Wide preserves natural column widths. A3/A4 scale the complete width to paper. */
|
|
222
|
+
layout?: "wide" | "a3" | "a4";
|
|
223
|
+
/** Only applies to A3/A4; default landscape. */
|
|
224
|
+
landscape?: boolean;
|
|
225
|
+
/** Vertical preview segment limit, default 80, maximum 200. Merges remain intact. */
|
|
226
|
+
maxRowsPerPage?: number;
|
|
227
|
+
/** Optional resource limits; hard ceilings prevent unbounded allocations. */
|
|
228
|
+
limits?: ExcelImportLimits_2;
|
|
229
|
+
}
|
|
230
|
+
declare interface ExcelImportResult {
|
|
231
|
+
template: ReportTemplate_2;
|
|
232
|
+
warnings: string[];
|
|
233
|
+
sheets: ExcelImportedSheet[];
|
|
234
|
+
}
|
|
235
|
+
declare interface GridCell {
|
|
236
|
+
text?: string;
|
|
237
|
+
rawText?: string;
|
|
238
|
+
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
239
|
+
value?: string | number | boolean | null;
|
|
240
|
+
/** Excel 数字格式(例如 #,##0.00 / 0.00%),不改变 text。 */
|
|
241
|
+
numberFormat?: string;
|
|
242
|
+
/** 编辑输入类型;省略时只按原始值推断,数字字符串不会被转换为数值。 */
|
|
243
|
+
valueType?: "text" | "number" | "boolean";
|
|
244
|
+
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
245
|
+
editable?: boolean;
|
|
246
|
+
source?: ReportCellSource;
|
|
247
|
+
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
248
|
+
formula?: string;
|
|
249
|
+
children?: PlanComponent[];
|
|
250
|
+
colSpan?: number;
|
|
251
|
+
rowSpan?: number;
|
|
252
|
+
style?: ComponentStyle;
|
|
253
|
+
}
|
|
254
|
+
declare interface GridCell_2 {
|
|
255
|
+
text?: string;
|
|
256
|
+
rawText?: string;
|
|
257
|
+
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
258
|
+
value?: string | number | boolean | null;
|
|
259
|
+
/** Excel 数字格式(例如 #,##0.00 / 0.00%),不改变 text。 */
|
|
260
|
+
numberFormat?: string;
|
|
261
|
+
/** 编辑输入类型;省略时只按原始值推断,数字字符串不会被转换为数值。 */
|
|
262
|
+
valueType?: "text" | "number" | "boolean";
|
|
263
|
+
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
264
|
+
editable?: boolean;
|
|
265
|
+
source?: ReportCellSource_2;
|
|
266
|
+
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
267
|
+
formula?: string;
|
|
268
|
+
children?: PlanComponent_2[];
|
|
269
|
+
colSpan?: number;
|
|
270
|
+
rowSpan?: number;
|
|
271
|
+
style?: ComponentStyle_2;
|
|
272
|
+
}
|
|
273
|
+
declare interface GridCell_3 {
|
|
274
|
+
text?: string;
|
|
275
|
+
rawText?: string;
|
|
276
|
+
/** 原始值,仅供 Excel raw 模式消费;不参与预览、分页与 PDF 绘制。 */
|
|
277
|
+
value?: string | number | boolean | null;
|
|
278
|
+
/** Excel 数字格式(例如 #,##0.00 / 0.00%),不改变 text。 */
|
|
279
|
+
numberFormat?: string;
|
|
280
|
+
/** 编辑输入类型;省略时只按原始值推断,数字字符串不会被转换为数值。 */
|
|
281
|
+
valueType?: "text" | "number" | "boolean";
|
|
282
|
+
/** 单元格级编辑控制;预览仍需显式开启 editing。 */
|
|
283
|
+
editable?: boolean;
|
|
284
|
+
source?: ReportCellSource_3;
|
|
285
|
+
/** Excel 公式保留元数据;当前引擎不计算公式,公式格始终只读。 */
|
|
286
|
+
formula?: string;
|
|
287
|
+
children?: PlanComponent_3[];
|
|
288
|
+
colSpan?: number;
|
|
289
|
+
rowSpan?: number;
|
|
290
|
+
style?: ComponentStyle_3;
|
|
291
|
+
}
|
|
292
|
+
declare type ImageComponentKind = "image" | "chart" | "barcode" | "qrcode";
|
|
293
|
+
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
294
|
+
declare type ListAlignment = NonNullable<ComponentStyle["align"]> | "auto";
|
|
295
|
+
/** auto:真实数字/显式数值格式居右,日期与布尔居中,其他内容居左。 */
|
|
296
|
+
declare type ListAlignment_2 = NonNullable<ComponentStyle_3["align"]> | "auto";
|
|
297
|
+
declare interface ListColumn {
|
|
298
|
+
header: string;
|
|
299
|
+
field: string;
|
|
300
|
+
widthMm: number;
|
|
301
|
+
style?: ComponentStyle;
|
|
302
|
+
/** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
|
|
303
|
+
align?: ListAlignment;
|
|
304
|
+
/** 独立的表头对齐,不改变内容对齐。 */
|
|
305
|
+
headerAlign?: ComponentStyle["align"];
|
|
306
|
+
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
307
|
+
headerStyle?: ComponentStyle;
|
|
308
|
+
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
309
|
+
format?: ColumnFormat;
|
|
310
|
+
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
311
|
+
rules?: StyleRule[];
|
|
312
|
+
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
313
|
+
editable?: boolean;
|
|
314
|
+
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
315
|
+
valueType?: GridCell["valueType"];
|
|
316
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
317
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
318
|
+
}
|
|
319
|
+
declare interface ListColumn_2 {
|
|
320
|
+
header: string;
|
|
321
|
+
field: string;
|
|
322
|
+
widthMm: number;
|
|
323
|
+
style?: ComponentStyle_3;
|
|
324
|
+
/** 内容对齐,优先于 style.align;数值字符串不会自动判为数字。 */
|
|
325
|
+
align?: ListAlignment_2;
|
|
326
|
+
/** 独立的表头对齐,不改变内容对齐。 */
|
|
327
|
+
headerAlign?: ComponentStyle_3["align"];
|
|
328
|
+
/** 独立的表头样式,优先于列表级表头样式。 */
|
|
329
|
+
headerStyle?: ComponentStyle_3;
|
|
330
|
+
/** 值格式化(声明式):千分位/小数位、百分比、日期 pattern */
|
|
331
|
+
format?: ColumnFormat_2;
|
|
332
|
+
/** 条件格式规则(声明式,命中合并进单元格样式;如负数红字) */
|
|
333
|
+
rules?: StyleRule_2[];
|
|
334
|
+
/** 内容列编辑控制;仍需由预览显式开启 editing,不影响表头/小计只读规则。 */
|
|
335
|
+
editable?: boolean;
|
|
336
|
+
/** 空值列或特殊数据类型可显式声明编辑输入类型。 */
|
|
337
|
+
valueType?: GridCell_3["valueType"];
|
|
338
|
+
/** 字段语义用于 auto 对齐;明确声明编号,避免把数字编号当成度量。 */
|
|
339
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
340
|
+
}
|
|
341
|
+
declare interface ListComponent {
|
|
342
|
+
kind: "list";
|
|
343
|
+
id?: string;
|
|
344
|
+
/** 宽表标记用于连续 Excel;不改变低层列表的列宽和分页算法。 */
|
|
345
|
+
layout?: "page" | "wide";
|
|
346
|
+
/** 逻辑表名称,供 Excel Sheet 命名;不额外生成标题组件。 */
|
|
347
|
+
title?: string;
|
|
348
|
+
leftMm: number;
|
|
349
|
+
topMm: number;
|
|
350
|
+
widthMm: number;
|
|
351
|
+
dataset: string;
|
|
352
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
353
|
+
rowKey?: string;
|
|
354
|
+
revisionField?: string;
|
|
355
|
+
sourceTokenField?: string;
|
|
356
|
+
columns: ListColumn[];
|
|
357
|
+
fontSizePt?: number;
|
|
358
|
+
headerBold?: boolean;
|
|
359
|
+
rowHeightMm?: number;
|
|
360
|
+
paddingMm?: number;
|
|
361
|
+
headerEveryPage?: boolean;
|
|
362
|
+
headerBackgroundColor?: string;
|
|
363
|
+
/** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
|
|
364
|
+
align?: ListAlignment;
|
|
365
|
+
/** 表头默认对齐,列配置可覆盖。 */
|
|
366
|
+
headerAlign?: ComponentStyle["align"];
|
|
367
|
+
headerStyle?: ComponentStyle;
|
|
368
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
369
|
+
headerGrid?: PlanGrid;
|
|
370
|
+
border?: boolean;
|
|
371
|
+
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
372
|
+
groupBy?: ListGroupBy;
|
|
373
|
+
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
374
|
+
grandTotal?: ListGrandTotal;
|
|
375
|
+
}
|
|
376
|
+
declare interface ListComponent_2 {
|
|
377
|
+
kind: "list";
|
|
378
|
+
id?: string;
|
|
379
|
+
/** 宽表标记用于连续 Excel;不改变低层列表的列宽和分页算法。 */
|
|
380
|
+
layout?: "page" | "wide";
|
|
381
|
+
/** 逻辑表名称,供 Excel Sheet 命名;不额外生成标题组件。 */
|
|
382
|
+
title?: string;
|
|
383
|
+
leftMm: number;
|
|
384
|
+
topMm: number;
|
|
385
|
+
widthMm: number;
|
|
386
|
+
dataset: string;
|
|
387
|
+
/** 数据集中稳定业务主键的字段名;省略时编辑仅有计划内坐标。 */
|
|
388
|
+
rowKey?: string;
|
|
389
|
+
revisionField?: string;
|
|
390
|
+
sourceTokenField?: string;
|
|
391
|
+
columns: ListColumn_2[];
|
|
392
|
+
fontSizePt?: number;
|
|
393
|
+
headerBold?: boolean;
|
|
394
|
+
rowHeightMm?: number;
|
|
395
|
+
paddingMm?: number;
|
|
396
|
+
headerEveryPage?: boolean;
|
|
397
|
+
headerBackgroundColor?: string;
|
|
398
|
+
/** 内容默认对齐,列配置可覆盖;低层模板缺省仍为 left。 */
|
|
399
|
+
align?: ListAlignment_2;
|
|
400
|
+
/** 表头默认对齐,列配置可覆盖。 */
|
|
401
|
+
headerAlign?: ComponentStyle_3["align"];
|
|
402
|
+
headerStyle?: ComponentStyle_3;
|
|
403
|
+
/** 可选多行合并表头;列宽按列表物理列对齐,供 Excel 业务模板复用。 */
|
|
404
|
+
headerGrid?: PlanGrid_3;
|
|
405
|
+
border?: boolean;
|
|
406
|
+
/** 分组小计(组头/组尾小计/组头防孤行) */
|
|
407
|
+
groupBy?: ListGroupBy_2;
|
|
408
|
+
/** 末尾总合计行(依赖 groupBy.subtotal 或显式 fields) */
|
|
409
|
+
grandTotal?: ListGrandTotal_2;
|
|
410
|
+
}
|
|
411
|
+
declare type ListGrandTotal = boolean | {
|
|
412
|
+
label?: string;
|
|
413
|
+
style?: ComponentStyle;
|
|
414
|
+
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
415
|
+
fields?: string[];
|
|
416
|
+
};
|
|
417
|
+
declare type ListGrandTotal_2 = boolean | {
|
|
418
|
+
label?: string;
|
|
419
|
+
style?: ComponentStyle_3;
|
|
420
|
+
/** 合计列(缺省沿用 groupBy.subtotal) */
|
|
421
|
+
fields?: string[];
|
|
422
|
+
};
|
|
423
|
+
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
424
|
+
declare interface ListGroupBy {
|
|
425
|
+
/** 分组字段(值变化即切组) */
|
|
426
|
+
field: string;
|
|
427
|
+
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
428
|
+
headerTemplate?: string;
|
|
429
|
+
headerStyle?: ComponentStyle;
|
|
430
|
+
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
431
|
+
subtotal?: string[];
|
|
432
|
+
subtotalStyle?: ComponentStyle;
|
|
433
|
+
subtotalLabel?: string;
|
|
434
|
+
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
435
|
+
keepWithNext?: boolean;
|
|
436
|
+
}
|
|
437
|
+
/** 分组小计配置(声明式,见 ListComponent.groupBy) */
|
|
438
|
+
declare interface ListGroupBy_2 {
|
|
439
|
+
/** 分组字段(值变化即切组) */
|
|
440
|
+
field: string;
|
|
441
|
+
/** 组头文案模板,{value} 占位(默认 "{value}") */
|
|
442
|
+
headerTemplate?: string;
|
|
443
|
+
headerStyle?: ComponentStyle_3;
|
|
444
|
+
/** 需要小计的列字段(组尾输出合计行;数值列求和,其余输出首值/留空) */
|
|
445
|
+
subtotal?: string[];
|
|
446
|
+
subtotalStyle?: ComponentStyle_3;
|
|
447
|
+
subtotalLabel?: string;
|
|
448
|
+
/** 组头防孤行(默认 true:页尾放不下"组头+首行"时整体换页) */
|
|
449
|
+
keepWithNext?: boolean;
|
|
450
|
+
}
|
|
451
|
+
declare const machReportAsyncPlugin: {
|
|
452
|
+
install(app: App, options?: MachReportPluginOptions): void;
|
|
453
|
+
};
|
|
454
|
+
export default machReportAsyncPlugin;
|
|
455
|
+
export { machReportAsyncPlugin };
|
|
456
|
+
declare interface MachReportConfig {
|
|
457
|
+
defaults: MachReportDefaults;
|
|
458
|
+
presets: Record<string, MachReportPreset>;
|
|
459
|
+
/** 默认启用的 preset 名 */
|
|
460
|
+
defaultPreset?: string;
|
|
461
|
+
}
|
|
462
|
+
/** defaults 层可配置项(全部可选,均有内置缺省) */
|
|
463
|
+
declare interface MachReportDefaults {
|
|
464
|
+
showExport?: boolean;
|
|
465
|
+
showPrint?: boolean;
|
|
466
|
+
showPdfWindow?: boolean;
|
|
467
|
+
/** 设置入口默认显示;可在其中按需启用阅读及输出工具。 */
|
|
468
|
+
showSettings?: boolean;
|
|
469
|
+
toolbar?: MachReportToolbarOptions;
|
|
470
|
+
interaction?: ReportInteractionOptions;
|
|
471
|
+
preferences?: ReportPreferencesOptions;
|
|
472
|
+
/** Protect local input and drafts before replacing a report. Default true. */
|
|
473
|
+
guardChanges?: boolean;
|
|
474
|
+
beforeDiscard?: ReportBeforeDiscard;
|
|
475
|
+
output?: ReportOutputOptions;
|
|
476
|
+
/** Prepare optional image/chart/QR/barcode adapters once for preview and all outputs. */
|
|
477
|
+
assets?: AssetRenderOptions;
|
|
478
|
+
/** 参数面板显隐(有参数定义且未显式关闭时显示;缺省 true) */
|
|
479
|
+
showParams?: boolean;
|
|
480
|
+
/** 页间距 px */
|
|
481
|
+
gapPx?: number;
|
|
482
|
+
/** PDF 导出中文字体 URL */
|
|
483
|
+
pdfFontUrl?: string;
|
|
484
|
+
theme?: Partial<MachReportTheme>;
|
|
485
|
+
messages?: Partial<MachReportMessages>;
|
|
486
|
+
/** 校验告警等内部日志通道(默认 console;静默传 { warn: () => {}, info: () => {} }) */
|
|
487
|
+
logger?: MachReportLogger;
|
|
488
|
+
preview?: MachReportPreviewOptions;
|
|
489
|
+
/** Excel 出口配置,按字段继承;不配置使用导出器默认值。 */
|
|
490
|
+
xlsx?: XlsxRenderOptions;
|
|
491
|
+
/** 默认关闭;true 为本地草稿,对象可提供权限、校验和保存回调。 */
|
|
492
|
+
editable?: boolean | ReportEditingOptions;
|
|
493
|
+
/** 默认关闭;启用后提供导入按钮。ExcelJS 仅在导入时加载。 */
|
|
494
|
+
excelImport?: boolean | ExcelImportOptions;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* 结构化错误(code 分类,宿主可按码决定 UX:重试 / 提示 / 降级)。
|
|
498
|
+
* error 事件契约保持 `(message: string)` 不变,新增第二参数 detail(可选)。
|
|
499
|
+
*/
|
|
500
|
+
declare type MachReportErrorCode = "param" | "fetch" | "validate" | "render" | "pdf" | "print" | "export" | "edit" | "import" | "config";
|
|
501
|
+
/** 日志通道(默认 console;可注入 noop 静默或上报 collector) */
|
|
502
|
+
declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
503
|
+
/**
|
|
504
|
+
* 配置中心(对齐 mach-table 的 defineMachTableConfig 体验):
|
|
505
|
+
* - 应用级:app.use(machReportPlugin, { config: defineMachReportConfig({...}) })
|
|
506
|
+
* - 路由级叠加:provideMachReportConfig(overlay)(响应式,就近覆盖)
|
|
507
|
+
* - 优先级:组件 props > 路由级叠加 > preset > defaults(props 永远最高)
|
|
508
|
+
*/
|
|
509
|
+
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
510
|
+
declare interface MachReportMessages {
|
|
511
|
+
title: string;
|
|
512
|
+
prevPage: string;
|
|
513
|
+
nextPage: string;
|
|
514
|
+
/** 页码显示模板,{cur}/{total} 占位 */
|
|
515
|
+
pageInfo: string;
|
|
516
|
+
fitWidth: string;
|
|
517
|
+
exportHtml: string;
|
|
518
|
+
exportPdf: string;
|
|
519
|
+
exportExcel: string;
|
|
520
|
+
exportImage: string;
|
|
521
|
+
exportWord: string;
|
|
522
|
+
/** 导出进行中提示,{format} 占位 */
|
|
523
|
+
exporting: string;
|
|
524
|
+
print: string;
|
|
525
|
+
pdfWindow: string;
|
|
526
|
+
loading: string;
|
|
527
|
+
empty: string;
|
|
528
|
+
/** @deprecated 未被组件消费,将在下个大版本移除(保留仅为类型兼容) */
|
|
529
|
+
errorPrefix: string;
|
|
530
|
+
retry: string;
|
|
531
|
+
/** 可选新增文案,保留旧完整文案对象兼容。 */
|
|
532
|
+
pdfFontUnavailable?: string;
|
|
533
|
+
/** 搜索框占位文案 */
|
|
534
|
+
searchPlaceholder: string;
|
|
535
|
+
/** 搜索命中计数,{cur}/{total} 占位 */
|
|
536
|
+
matchInfo: string;
|
|
537
|
+
/** 上/下一个命中 */
|
|
538
|
+
prevMatch: string;
|
|
539
|
+
nextMatch: string;
|
|
540
|
+
/** 缩略图侧栏开关 */
|
|
541
|
+
thumbnails: string;
|
|
542
|
+
/** 参数面板 */
|
|
543
|
+
paramsTitle: string;
|
|
544
|
+
query: string;
|
|
545
|
+
reset: string;
|
|
546
|
+
/** 必填缺失提示({label} 占位) */
|
|
547
|
+
paramRequired: string;
|
|
548
|
+
paramInvalid?: string;
|
|
549
|
+
paramPrompt?: string;
|
|
550
|
+
paramPromptDescription?: string;
|
|
551
|
+
paramSelectPlaceholder?: string;
|
|
552
|
+
paramTextPlaceholder?: string;
|
|
553
|
+
/** 可选搜索进度文案,旧完整 messages 对象无需新增字段。 */
|
|
554
|
+
searching?: string;
|
|
555
|
+
importExcel?: string;
|
|
556
|
+
importing?: string;
|
|
557
|
+
editCell?: string;
|
|
558
|
+
editingHint?: string;
|
|
559
|
+
saving?: string;
|
|
560
|
+
editInvalidNumber?: string;
|
|
561
|
+
editInvalidBoolean?: string;
|
|
562
|
+
editConflict?: string;
|
|
563
|
+
settings?: string;
|
|
564
|
+
settingsDisplay?: string;
|
|
565
|
+
settingsExport?: string;
|
|
566
|
+
settingsData?: string;
|
|
567
|
+
settingsUnavailable?: string;
|
|
568
|
+
settingsReset?: string;
|
|
569
|
+
settingsClose?: string;
|
|
570
|
+
search?: string;
|
|
571
|
+
closeSearch?: string;
|
|
572
|
+
prevSearchMatch?: string;
|
|
573
|
+
nextSearchMatch?: string;
|
|
574
|
+
zoom?: string;
|
|
575
|
+
settingsLocal?: string;
|
|
576
|
+
editingLocal?: string;
|
|
577
|
+
editingSaved?: string;
|
|
578
|
+
importLocal?: string;
|
|
579
|
+
emptyDescription?: string;
|
|
580
|
+
undo?: string;
|
|
581
|
+
redo?: string;
|
|
582
|
+
restoreChanges?: string;
|
|
583
|
+
changes?: string;
|
|
584
|
+
changesCount?: string;
|
|
585
|
+
changesEmpty?: string;
|
|
586
|
+
changesBefore?: string;
|
|
587
|
+
changesAfter?: string;
|
|
588
|
+
editAtomicRequired?: string;
|
|
589
|
+
clipboardLimit?: string;
|
|
590
|
+
preferencesError?: string;
|
|
591
|
+
freezeHeaders?: string;
|
|
592
|
+
frozenColumns?: string;
|
|
593
|
+
sections?: string;
|
|
594
|
+
locateField?: string;
|
|
595
|
+
locateFieldPlaceholder?: string;
|
|
596
|
+
locateFieldMissing?: string;
|
|
597
|
+
importSummary?: string;
|
|
598
|
+
importPreserved?: string;
|
|
599
|
+
importWarnings?: string;
|
|
600
|
+
importReadOnly?: string;
|
|
601
|
+
conflicts?: string;
|
|
602
|
+
editReadOnly?: string;
|
|
603
|
+
editMissing?: string;
|
|
604
|
+
editDuplicate?: string;
|
|
605
|
+
clipboardInvalid?: string;
|
|
606
|
+
editSaved?: string;
|
|
607
|
+
settingsPanes?: string;
|
|
608
|
+
columnDirectory?: string;
|
|
609
|
+
columnSearch?: string;
|
|
610
|
+
columnNoMatches?: string;
|
|
611
|
+
columnResults?: string;
|
|
612
|
+
columnGroup?: string;
|
|
613
|
+
discardTitle?: string;
|
|
614
|
+
discardDescription?: string;
|
|
615
|
+
discardKeep?: string;
|
|
616
|
+
discardProceed?: string;
|
|
617
|
+
taskQuery?: string;
|
|
618
|
+
taskValidate?: string;
|
|
619
|
+
taskLayout?: string;
|
|
620
|
+
taskAssets?: string;
|
|
621
|
+
taskEncode?: string;
|
|
622
|
+
taskDownload?: string;
|
|
623
|
+
taskPrint?: string;
|
|
624
|
+
taskCancel?: string;
|
|
625
|
+
taskCancelled?: string;
|
|
626
|
+
diagnosticsTitle?: string;
|
|
627
|
+
diagnosticsSearch?: string;
|
|
628
|
+
diagnosticsMore?: string;
|
|
629
|
+
diagnosticsLocate?: string;
|
|
630
|
+
diagnosticsLocation?: string;
|
|
631
|
+
diagnosticsStrict?: string;
|
|
632
|
+
diagnosticsDetails?: string;
|
|
633
|
+
diagnosticMissingImage?: string;
|
|
634
|
+
diagnosticUnsupported?: string;
|
|
635
|
+
diagnosticUnsupportedStyle?: string;
|
|
636
|
+
diagnosticImageFormat?: string;
|
|
637
|
+
diagnosticRichText?: string;
|
|
638
|
+
diagnosticNested?: string;
|
|
639
|
+
diagnosticImageAsync?: string;
|
|
640
|
+
diagnosticImageDecode?: string;
|
|
641
|
+
diagnosticAssetFailed?: string;
|
|
642
|
+
diagnosticAssetBudget?: string;
|
|
643
|
+
}
|
|
644
|
+
declare interface MachReportPluginOptions {
|
|
645
|
+
/** 报表数据源;也可直接传给 ReportPreview 的 fetcher prop */
|
|
646
|
+
fetcher?: PlanFetcher;
|
|
647
|
+
/** 常规业务接入:注册模板与取数,包内完成分页与参数面板;显式 fetcher 优先。 */
|
|
648
|
+
reports?: ReportRegistry;
|
|
649
|
+
/** 应用级配置中心(defaults/presets/文案/主题),见 defineMachReportConfig */
|
|
650
|
+
config?: MachReportConfig;
|
|
651
|
+
/** PDF 导出字体 URL(默认 /simhei.ttf;'' 跳过字体) */
|
|
652
|
+
pdfFontUrl?: string;
|
|
653
|
+
/** 自定义 PDF 导出器(缺省用懒加载引擎 /pdf 子路径的默认实现) */
|
|
654
|
+
pdfExporter?: PdfExporter;
|
|
655
|
+
/** 注册全局组件 <MachReportPreview>(默认 true;懒加载分片不影响首屏) */
|
|
656
|
+
globalComponent?: boolean;
|
|
657
|
+
}
|
|
658
|
+
declare type MachReportPreset = MachReportDefaults;
|
|
659
|
+
/**
|
|
660
|
+
* 全局组件(懒加载分片:首次渲染才拉取组件与引擎依赖,
|
|
661
|
+
* 与局部 import 等价——首屏敏感页面零额外成本)
|
|
662
|
+
*/
|
|
663
|
+
export declare const MachReportPreview: typeof import("@agile-team/mach-report/vue").ReportPreview;
|
|
664
|
+
/** 预览按需调优;默认已经启用正文/缩略图虚拟化及可取消的分片搜索。 */
|
|
665
|
+
declare interface MachReportPreviewOptions {
|
|
666
|
+
/** 视口前后额外保留的正文页数,默认 1,归一化到 0~10 的整数。 */
|
|
667
|
+
overscanPages?: number;
|
|
668
|
+
/** 搜索输入防抖毫秒,默认 200,归一化到 0~2000。 */
|
|
669
|
+
searchDebounceMs?: number;
|
|
670
|
+
}
|
|
671
|
+
/** 只读快照,由组件的同一套状态驱动;无需通过事件另建状态。 */
|
|
672
|
+
declare interface MachReportState {
|
|
673
|
+
readonly loading: boolean;
|
|
674
|
+
readonly hasPlan: boolean;
|
|
675
|
+
readonly pageCount: number;
|
|
676
|
+
readonly currentPage: number;
|
|
677
|
+
/** 当前导出显示名称,空闲时为 null。 */
|
|
678
|
+
readonly exporting: string | null;
|
|
679
|
+
readonly printing: boolean;
|
|
680
|
+
readonly canExport: boolean;
|
|
681
|
+
readonly canPrint: boolean;
|
|
682
|
+
readonly error: Readonly<MachReportStateError> | null;
|
|
683
|
+
readonly pdfFont: Readonly<PdfFontCheckResult>;
|
|
684
|
+
readonly editing?: boolean;
|
|
685
|
+
readonly saving?: boolean;
|
|
686
|
+
readonly importing?: boolean;
|
|
687
|
+
readonly dirty?: boolean;
|
|
688
|
+
readonly pendingLocalChanges?: boolean;
|
|
689
|
+
readonly task?: Readonly<ReportPreviewTask> | null;
|
|
690
|
+
readonly diagnostics?: readonly Readonly<ReportPreviewDiagnostic>[];
|
|
691
|
+
/** Context of the displayed API snapshot, which can differ from an unexecuted query form. */
|
|
692
|
+
readonly reportIds?: readonly string[];
|
|
693
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
694
|
+
readonly canUndo?: boolean;
|
|
695
|
+
readonly canRedo?: boolean;
|
|
696
|
+
readonly changeCount?: number;
|
|
697
|
+
readonly selection?: Readonly<ReportCellSelection> | null;
|
|
698
|
+
}
|
|
699
|
+
declare interface MachReportStateError {
|
|
700
|
+
message: string;
|
|
701
|
+
code: MachReportErrorCode;
|
|
702
|
+
cause?: unknown;
|
|
703
|
+
}
|
|
704
|
+
/** 主题变量(组件外壳注入的 --mrp-* CSS 自定义属性) */
|
|
705
|
+
declare interface MachReportTheme {
|
|
706
|
+
shellBg: string;
|
|
707
|
+
shellFg: string;
|
|
708
|
+
toolbarBg: string;
|
|
709
|
+
toolbarBorder: string;
|
|
710
|
+
toolbarFg: string;
|
|
711
|
+
btnFg: string;
|
|
712
|
+
btnBorder: string;
|
|
713
|
+
btnHoverBg: string;
|
|
714
|
+
btnHoverFg: string;
|
|
715
|
+
btnActiveBg: string;
|
|
716
|
+
}
|
|
717
|
+
declare interface MachReportToolbarOptions {
|
|
718
|
+
search?: boolean;
|
|
719
|
+
thumbnails?: boolean;
|
|
720
|
+
zoom?: boolean;
|
|
721
|
+
/** 编辑能力由 editable 授权;此项仅设置初始交互偏好,默认 true(兼容旧行为)。 */
|
|
722
|
+
editing?: boolean;
|
|
723
|
+
/** 导入能力由 excelImport 授权;此项仅设置初始交互偏好,默认 true。 */
|
|
724
|
+
excelImport?: boolean;
|
|
725
|
+
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
726
|
+
exportFormats?: ReportExportFormat[];
|
|
727
|
+
}
|
|
728
|
+
declare interface OutputDiagnostic {
|
|
729
|
+
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
730
|
+
severity: "warning";
|
|
731
|
+
format: OutputFormat;
|
|
732
|
+
pageIndex: number;
|
|
733
|
+
componentIndex: number;
|
|
734
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
735
|
+
componentPath?: readonly number[];
|
|
736
|
+
kind: string;
|
|
737
|
+
nid?: string;
|
|
738
|
+
message: string;
|
|
739
|
+
}
|
|
740
|
+
declare interface OutputDiagnostic_2 {
|
|
741
|
+
code: "missing-image" | "unsupported-component" | "unsupported-image-format" | "unsupported-style" | "rich-text-flattened" | "nested-components-omitted" | "async-image-required" | "image-decode-failed" | "asset-render-failed" | "asset-budget-exceeded";
|
|
742
|
+
severity: "warning";
|
|
743
|
+
format: OutputFormat_2;
|
|
744
|
+
pageIndex: number;
|
|
745
|
+
componentIndex: number;
|
|
746
|
+
/** Nested grid child location as repeating [rowIndex, columnIndex, childIndex] triples. */
|
|
747
|
+
componentPath?: readonly number[];
|
|
748
|
+
kind: string;
|
|
749
|
+
nid?: string;
|
|
750
|
+
message: string;
|
|
751
|
+
}
|
|
752
|
+
declare interface OutputDiagnosticOptions extends OutputTaskOptions {
|
|
753
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
754
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic) => void;
|
|
755
|
+
/** Reject known unsupported content before creating an incomplete file. Default warn. */
|
|
756
|
+
fidelity?: "warn" | "strict";
|
|
757
|
+
}
|
|
758
|
+
declare interface OutputDiagnosticOptions_2 extends OutputTaskOptions_2 {
|
|
759
|
+
/** Structured fidelity diagnostics; rendering never silently invents missing content. */
|
|
760
|
+
onDiagnostic?: (diagnostic: OutputDiagnostic_2) => void;
|
|
761
|
+
/** Reject known unsupported content before creating an incomplete file. Default warn. */
|
|
762
|
+
fidelity?: "warn" | "strict";
|
|
763
|
+
}
|
|
764
|
+
declare type OutputFormat = "dom" | "canvas" | "pdf" | "xlsx";
|
|
765
|
+
declare type OutputFormat_2 = "dom" | "canvas" | "pdf" | "xlsx";
|
|
766
|
+
/** Stage counts are exact completed units; encoding libraries may remain indeterminate. */
|
|
767
|
+
declare interface OutputTaskOptions {
|
|
768
|
+
signal?: AbortSignal;
|
|
769
|
+
onProgress?: (completed: number, total: number) => void;
|
|
770
|
+
}
|
|
771
|
+
/** Stage counts are exact completed units; encoding libraries may remain indeterminate. */
|
|
772
|
+
declare interface OutputTaskOptions_2 {
|
|
773
|
+
signal?: AbortSignal;
|
|
774
|
+
onProgress?: (completed: number, total: number) => void;
|
|
775
|
+
}
|
|
776
|
+
/** Stage counts are exact completed units; encoding libraries may remain indeterminate. */
|
|
777
|
+
declare interface OutputTaskOptions_3 {
|
|
778
|
+
signal?: AbortSignal;
|
|
779
|
+
onProgress?: (completed: number, total: number) => void;
|
|
780
|
+
}
|
|
781
|
+
declare interface PaginateOptions {
|
|
782
|
+
/** 每行额外占高(mm),压测专用钩子 */
|
|
783
|
+
mmPerRow?: number;
|
|
784
|
+
/** 文本测量器(默认启发式;浏览器端可注入 canvas 测量校准) */
|
|
785
|
+
measurer?: TextMeasurer;
|
|
786
|
+
/** 可选页数上限;在追加超限页前终止,避免先分配全部页面再检查。 */
|
|
787
|
+
maxPages?: number;
|
|
788
|
+
}
|
|
789
|
+
/** PDF 导出器:RenderPlan → PDF 字节;第二参数可上报非致命保真告警。 */
|
|
790
|
+
declare interface PdfExporter {
|
|
791
|
+
(plan: RenderPlan, onWarning?: (message: string) => void, task?: OutputTaskOptions_2 & {
|
|
792
|
+
onDiagnostic?: (entry: OutputDiagnostic) => void;
|
|
793
|
+
}): Promise<Uint8Array>;
|
|
794
|
+
/** 可选轻量字体检查;旧版自定义导出函数无需实现。取消时拒绝 AbortError。 */
|
|
795
|
+
checkFont?: (signal?: AbortSignal) => Promise<PdfFontCheckResult>;
|
|
796
|
+
}
|
|
797
|
+
declare interface PdfFontCheckResult {
|
|
798
|
+
status: PdfFontStatus;
|
|
799
|
+
fontUrl: string;
|
|
800
|
+
message?: string;
|
|
801
|
+
cause?: unknown;
|
|
802
|
+
}
|
|
803
|
+
/** available 仅表示字体资源可达;实际导出仍会校验文字能否编码。 */
|
|
804
|
+
declare type PdfFontStatus = "unchecked" | "checking" | "available" | "disabled" | "unverified" | "error";
|
|
805
|
+
declare interface PlanComponent {
|
|
806
|
+
kind: ComponentKind;
|
|
807
|
+
leftMm: number;
|
|
808
|
+
topMm: number;
|
|
809
|
+
widthMm: number;
|
|
810
|
+
heightMm: number;
|
|
811
|
+
nid?: string;
|
|
812
|
+
rkey?: string;
|
|
813
|
+
text?: string;
|
|
814
|
+
rawText?: string;
|
|
815
|
+
lines?: string[];
|
|
816
|
+
richParagraphs?: RichParagraph[];
|
|
817
|
+
imageData?: string;
|
|
818
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
819
|
+
lineDirection?: "down" | "up";
|
|
820
|
+
grid?: PlanGrid;
|
|
821
|
+
table?: PlanTableFragment;
|
|
822
|
+
style?: ComponentStyle;
|
|
823
|
+
meta?: Record<string, unknown>;
|
|
824
|
+
/** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
|
|
825
|
+
fallbackText?: string;
|
|
826
|
+
}
|
|
827
|
+
declare interface PlanComponent_2 {
|
|
828
|
+
kind: ComponentKind_2;
|
|
829
|
+
leftMm: number;
|
|
830
|
+
topMm: number;
|
|
831
|
+
widthMm: number;
|
|
832
|
+
heightMm: number;
|
|
833
|
+
nid?: string;
|
|
834
|
+
rkey?: string;
|
|
835
|
+
text?: string;
|
|
836
|
+
rawText?: string;
|
|
837
|
+
lines?: string[];
|
|
838
|
+
richParagraphs?: RichParagraph_2[];
|
|
839
|
+
imageData?: string;
|
|
840
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
841
|
+
lineDirection?: "down" | "up";
|
|
842
|
+
grid?: PlanGrid_2;
|
|
843
|
+
table?: PlanTableFragment_2;
|
|
844
|
+
style?: ComponentStyle_2;
|
|
845
|
+
meta?: Record<string, unknown>;
|
|
846
|
+
/** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
|
|
847
|
+
fallbackText?: string;
|
|
848
|
+
}
|
|
849
|
+
declare interface PlanComponent_3 {
|
|
850
|
+
kind: ComponentKind_3;
|
|
851
|
+
leftMm: number;
|
|
852
|
+
topMm: number;
|
|
853
|
+
widthMm: number;
|
|
854
|
+
heightMm: number;
|
|
855
|
+
nid?: string;
|
|
856
|
+
rkey?: string;
|
|
857
|
+
text?: string;
|
|
858
|
+
rawText?: string;
|
|
859
|
+
lines?: string[];
|
|
860
|
+
richParagraphs?: RichParagraph_3[];
|
|
861
|
+
imageData?: string;
|
|
862
|
+
/** 明确指定线段方向;省略保持历史水平线行为。 */
|
|
863
|
+
lineDirection?: "down" | "up";
|
|
864
|
+
grid?: PlanGrid_3;
|
|
865
|
+
table?: PlanTableFragment_3;
|
|
866
|
+
style?: ComponentStyle_3;
|
|
867
|
+
meta?: Record<string, unknown>;
|
|
868
|
+
/** MachReport 扩展字段:未知 kind 的兜底渲染标记 */
|
|
869
|
+
fallbackText?: string;
|
|
870
|
+
}
|
|
871
|
+
declare interface PlanFetcher {
|
|
872
|
+
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
873
|
+
getParamDefs?: ReportFetcher["getParamDefs"];
|
|
874
|
+
}
|
|
875
|
+
declare interface PlanGrid {
|
|
876
|
+
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
877
|
+
cells: (GridCell | null)[][];
|
|
878
|
+
colWidthsMm?: number[];
|
|
879
|
+
rowHeightsMm?: number[];
|
|
880
|
+
gapMm?: number;
|
|
881
|
+
/** 单元格四边内距;旧静态网格默认 0.5mm,分页列表使用其真实测量内距。 */
|
|
882
|
+
paddingMm?: number;
|
|
883
|
+
}
|
|
884
|
+
declare interface PlanGrid_2 {
|
|
885
|
+
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
886
|
+
cells: (GridCell_2 | null)[][];
|
|
887
|
+
colWidthsMm?: number[];
|
|
888
|
+
rowHeightsMm?: number[];
|
|
889
|
+
gapMm?: number;
|
|
890
|
+
/** 单元格四边内距;旧静态网格默认 0.5mm,分页列表使用其真实测量内距。 */
|
|
891
|
+
paddingMm?: number;
|
|
892
|
+
}
|
|
893
|
+
declare interface PlanGrid_3 {
|
|
894
|
+
/** 行内允许 null 空位;渲染器按空单元格处理 */
|
|
895
|
+
cells: (GridCell_3 | null)[][];
|
|
896
|
+
colWidthsMm?: number[];
|
|
897
|
+
rowHeightsMm?: number[];
|
|
898
|
+
gapMm?: number;
|
|
899
|
+
/** 单元格四边内距;旧静态网格默认 0.5mm,分页列表使用其真实测量内距。 */
|
|
900
|
+
paddingMm?: number;
|
|
901
|
+
}
|
|
902
|
+
declare interface PlanPage {
|
|
903
|
+
/** wide 表示完整自然列宽;页面仅为预览的垂直窗口分段。 */
|
|
904
|
+
layout?: "page" | "wide";
|
|
905
|
+
pageWidthMm: number;
|
|
906
|
+
pageHeightMm: number;
|
|
907
|
+
marginTopMm?: number;
|
|
908
|
+
marginBottomMm?: number;
|
|
909
|
+
marginLeftMm?: number;
|
|
910
|
+
marginRightMm?: number;
|
|
911
|
+
components: PlanComponent[];
|
|
912
|
+
}
|
|
913
|
+
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
914
|
+
declare interface PlanTableFragment {
|
|
915
|
+
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
916
|
+
id: string;
|
|
917
|
+
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
918
|
+
rowIndex: number;
|
|
919
|
+
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
920
|
+
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
921
|
+
columnKeys: string[];
|
|
922
|
+
layout?: "page" | "wide";
|
|
923
|
+
title?: string;
|
|
924
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
925
|
+
source?: Omit<ReportCellSource, "field" | "rowKey"> & {
|
|
926
|
+
rowKey?: string | number;
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
930
|
+
declare interface PlanTableFragment_2 {
|
|
931
|
+
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
932
|
+
id: string;
|
|
933
|
+
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
934
|
+
rowIndex: number;
|
|
935
|
+
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
936
|
+
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
937
|
+
columnKeys: string[];
|
|
938
|
+
layout?: "page" | "wide";
|
|
939
|
+
title?: string;
|
|
940
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
941
|
+
source?: Omit<ReportCellSource_2, "field" | "rowKey"> & {
|
|
942
|
+
rowKey?: string | number;
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
/** 列表的逻辑行来源;用于连续 Excel 重组,避免按文本猜测重复表头。 */
|
|
946
|
+
declare interface PlanTableFragment_3 {
|
|
947
|
+
/** 在整个计划中唯一的逻辑表身份;同一表的分页片段共享身份。 */
|
|
948
|
+
id: string;
|
|
949
|
+
/** 表头固定 -1;其余行(包括组头/小计/总计)从 0 连续递增。 */
|
|
950
|
+
rowIndex: number;
|
|
951
|
+
role: "header" | "body" | "group-header" | "subtotal" | "grand-total";
|
|
952
|
+
/** 按物理列顺序保存字段身份;不以表头显示文本判断列结构。 */
|
|
953
|
+
columnKeys: string[];
|
|
954
|
+
layout?: "page" | "wide";
|
|
955
|
+
title?: string;
|
|
956
|
+
/** 只有宿主声明稳定 rowKey 时生成,不能用显示顺序替代业务主键。 */
|
|
957
|
+
source?: Omit<ReportCellSource_3, "field" | "rowKey"> & {
|
|
958
|
+
rowKey?: string | number;
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
/** 预取组件分片(路由 hover / 空闲时调用,正式渲染零等待) */
|
|
962
|
+
export declare function preloadMachReport(): Promise<unknown>;
|
|
963
|
+
declare interface RenderPlan {
|
|
964
|
+
schemaVersion: string;
|
|
965
|
+
pages: PlanPage[];
|
|
966
|
+
}
|
|
967
|
+
/** Return false to keep the current report. Without a hook the preview asks inline. */
|
|
968
|
+
declare type ReportBeforeDiscard = (context: Readonly<ReportBeforeDiscardContext>) => boolean | Promise<boolean>;
|
|
969
|
+
declare interface ReportBeforeDiscardContext {
|
|
970
|
+
reason: ReportDiscardReason;
|
|
971
|
+
reportIds: readonly string[];
|
|
972
|
+
/** Local input or a local draft, never a synonym for persisted differences. */
|
|
973
|
+
pendingLocalChanges: true;
|
|
974
|
+
}
|
|
975
|
+
/** 预览中的物理坐标;合并单元格使用左上角坐标。 */
|
|
976
|
+
declare interface ReportCellAddress {
|
|
977
|
+
pageIndex: number;
|
|
978
|
+
componentIndex: number;
|
|
979
|
+
rowIndex: number;
|
|
980
|
+
columnIndex: number;
|
|
981
|
+
}
|
|
982
|
+
/** 预览中的物理坐标;合并单元格使用左上角坐标。 */
|
|
983
|
+
declare interface ReportCellAddress_2 {
|
|
984
|
+
pageIndex: number;
|
|
985
|
+
componentIndex: number;
|
|
986
|
+
rowIndex: number;
|
|
987
|
+
columnIndex: number;
|
|
988
|
+
}
|
|
989
|
+
declare interface ReportCellChoice {
|
|
990
|
+
value: Exclude<ReportCellValue_2, null>;
|
|
991
|
+
label?: string;
|
|
992
|
+
}
|
|
993
|
+
declare interface ReportCellContext {
|
|
994
|
+
address: ReportCellAddress_2;
|
|
995
|
+
cell: Readonly<GridCell_2>;
|
|
996
|
+
component: Readonly<PlanComponent_2>;
|
|
997
|
+
value: ReportCellValue_2;
|
|
998
|
+
valueType: ReportCellValueType;
|
|
999
|
+
table?: ReportCellTableIdentity_2;
|
|
1000
|
+
/** Stable business identity. Physical row indices must never be used as database keys. */
|
|
1001
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1002
|
+
editable: boolean;
|
|
1003
|
+
readOnlyReason?: ReportCellReadOnlyReason;
|
|
1004
|
+
}
|
|
1005
|
+
declare interface ReportCellEdit {
|
|
1006
|
+
address: ReportCellAddress;
|
|
1007
|
+
table?: ReportCellTableIdentity;
|
|
1008
|
+
source?: Readonly<ReportCellSource>;
|
|
1009
|
+
previousValue: ReportCellValue;
|
|
1010
|
+
previousText: string;
|
|
1011
|
+
value: ReportCellValue;
|
|
1012
|
+
text: string;
|
|
1013
|
+
}
|
|
1014
|
+
declare interface ReportCellEdit_2 {
|
|
1015
|
+
address: ReportCellAddress_2;
|
|
1016
|
+
table?: ReportCellTableIdentity_2;
|
|
1017
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1018
|
+
previousValue: ReportCellValue_2;
|
|
1019
|
+
previousText: string;
|
|
1020
|
+
value: ReportCellValue_2;
|
|
1021
|
+
text: string;
|
|
1022
|
+
}
|
|
1023
|
+
declare interface ReportCellFieldBase {
|
|
1024
|
+
/** Presentation only; it never grants write permission. */
|
|
1025
|
+
label?: string;
|
|
1026
|
+
hint?: string;
|
|
1027
|
+
unit?: string;
|
|
1028
|
+
required?: boolean;
|
|
1029
|
+
}
|
|
1030
|
+
declare type ReportCellFieldOptions = ReportCellFieldBase & ({
|
|
1031
|
+
type: "text";
|
|
1032
|
+
maxLength?: number;
|
|
1033
|
+
} | {
|
|
1034
|
+
type: "number";
|
|
1035
|
+
min?: number;
|
|
1036
|
+
max?: number;
|
|
1037
|
+
precision?: number;
|
|
1038
|
+
} | {
|
|
1039
|
+
type: "boolean";
|
|
1040
|
+
trueLabel?: string;
|
|
1041
|
+
falseLabel?: string;
|
|
1042
|
+
} | {
|
|
1043
|
+
type: "enum";
|
|
1044
|
+
options: readonly ReportCellChoice[];
|
|
1045
|
+
} | {
|
|
1046
|
+
type: "date";
|
|
1047
|
+
min?: string;
|
|
1048
|
+
max?: string;
|
|
1049
|
+
});
|
|
1050
|
+
declare type ReportCellReadOnlyReason = "cell" | "formula" | "complex" | "structure";
|
|
1051
|
+
declare interface ReportCellSelection {
|
|
1052
|
+
anchor: ReportCellAddress;
|
|
1053
|
+
focus: ReportCellAddress;
|
|
1054
|
+
}
|
|
1055
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1056
|
+
declare interface ReportCellSource {
|
|
1057
|
+
datasetId: string;
|
|
1058
|
+
rowKey: string | number;
|
|
1059
|
+
field: string;
|
|
1060
|
+
revision?: string | number;
|
|
1061
|
+
sourceToken?: string;
|
|
1062
|
+
}
|
|
1063
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1064
|
+
declare interface ReportCellSource_2 {
|
|
1065
|
+
datasetId: string;
|
|
1066
|
+
rowKey: string | number;
|
|
1067
|
+
field: string;
|
|
1068
|
+
revision?: string | number;
|
|
1069
|
+
sourceToken?: string;
|
|
1070
|
+
}
|
|
1071
|
+
/** 可持久化的业务身份与计划坐标独立;权限及并发校验仍由业务服务器执行。 */
|
|
1072
|
+
declare interface ReportCellSource_3 {
|
|
1073
|
+
datasetId: string;
|
|
1074
|
+
rowKey: string | number;
|
|
1075
|
+
field: string;
|
|
1076
|
+
revision?: string | number;
|
|
1077
|
+
sourceToken?: string;
|
|
1078
|
+
}
|
|
1079
|
+
declare interface ReportCellTableIdentity {
|
|
1080
|
+
id: string;
|
|
1081
|
+
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1082
|
+
rowIndex: number;
|
|
1083
|
+
role: PlanTableFragment["role"];
|
|
1084
|
+
columnKey?: string;
|
|
1085
|
+
}
|
|
1086
|
+
declare interface ReportCellTableIdentity_2 {
|
|
1087
|
+
id: string;
|
|
1088
|
+
/** 逻辑表行索引;跨分页的同一行保持不变。 */
|
|
1089
|
+
rowIndex: number;
|
|
1090
|
+
role: PlanTableFragment_2["role"];
|
|
1091
|
+
columnKey?: string;
|
|
1092
|
+
}
|
|
1093
|
+
declare type ReportCellValue = string | number | boolean | null;
|
|
1094
|
+
declare type ReportCellValue_2 = string | number | boolean | null;
|
|
1095
|
+
declare type ReportCellValueType = NonNullable<GridCell_2["valueType"]>;
|
|
1096
|
+
declare interface ReportDefinition {
|
|
1097
|
+
/** 静态模板或宿主提供的异步模板加载器;动态模板默认每次重新读取,不缓存版本。 */
|
|
1098
|
+
template: ReportTemplate | ReportTemplateLoader;
|
|
1099
|
+
/** 静态数据;load 存在时优先使用 load 的结果。 */
|
|
1100
|
+
datasets?: DatasetRows;
|
|
1101
|
+
load?: (context: ReportLoadContext) => DatasetRows | Promise<DatasetRows>;
|
|
1102
|
+
/** 可选统一适配器;load 存在时仍优先 load,兼容已有定义。 */
|
|
1103
|
+
provider?: ReportProvider;
|
|
1104
|
+
/** 可选业务数据契约;声明的数据集缺失或字段不合法时,在分页前给出结构化错误。 */
|
|
1105
|
+
dataSchema?: Record<string, DatasetContract>;
|
|
1106
|
+
dataValidation?: Pick<DatasetValidationOptions, "maxRows" | "maxCells" | "maxIssues">;
|
|
1107
|
+
/** 覆盖模板参数定义;动态模板应在此声明查询面板元数据,避免查询前先请求模板。 */
|
|
1108
|
+
params?: ReportParamDef[];
|
|
1109
|
+
pagination?: PaginateOptions;
|
|
1110
|
+
}
|
|
1111
|
+
declare interface ReportDiagnostic {
|
|
1112
|
+
code: string;
|
|
1113
|
+
message: string;
|
|
1114
|
+
path?: string;
|
|
1115
|
+
severity: "warning" | "error" | "info";
|
|
1116
|
+
}
|
|
1117
|
+
declare type ReportDiscardReason = "reload" | "import" | "replace" | "leave";
|
|
1118
|
+
declare interface ReportEditBatch {
|
|
1119
|
+
/** Idempotency identity; the server should bind it to the exact payload. */
|
|
1120
|
+
requestId: string;
|
|
1121
|
+
edits: ReportCellEdit_2[];
|
|
1122
|
+
}
|
|
1123
|
+
declare interface ReportEditConflict {
|
|
1124
|
+
source?: Readonly<ReportCellSource_2>;
|
|
1125
|
+
address?: ReportCellAddress_2;
|
|
1126
|
+
message: string;
|
|
1127
|
+
currentValue?: ReportCellValue_2;
|
|
1128
|
+
revision?: string | number;
|
|
1129
|
+
}
|
|
1130
|
+
/** Opt in with true for local drafts, or provide host validation and persistence. */
|
|
1131
|
+
declare interface ReportEditingOptions {
|
|
1132
|
+
/** Optional field controls, keyed by source.field / table.columnKey; a resolver supports dataset-specific rules. */
|
|
1133
|
+
fields?: Readonly<Record<string, ReportCellFieldOptions>> | ((context: ReportCellContext) => ReportCellFieldOptions | undefined);
|
|
1134
|
+
canEdit?(context: ReportCellContext): boolean;
|
|
1135
|
+
/** Return an error message or throw to reject the edit. */
|
|
1136
|
+
validate?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | string | Promise<void | string>;
|
|
1137
|
+
/** Called before applying the change. A rejection leaves the current report untouched. */
|
|
1138
|
+
save?(edit: Readonly<ReportCellEdit_2>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1139
|
+
/** Must commit all edits in one server transaction. Required for multi-cell persisted edits. */
|
|
1140
|
+
saveBatch?(batch: Readonly<ReportEditBatch>, operation: ReportEditOperation): void | ReportEditResult | Promise<void | ReportEditResult>;
|
|
1141
|
+
/** Restrict persistence to plans that supply stable datasetId/rowKey/field metadata. */
|
|
1142
|
+
requireSource?: boolean;
|
|
1143
|
+
}
|
|
1144
|
+
declare interface ReportEditOperation {
|
|
1145
|
+
/** Reload, another import or unmount aborts the operation. Save adapters should forward this signal. */
|
|
1146
|
+
signal: AbortSignal;
|
|
1147
|
+
requestId?: string;
|
|
1148
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
1149
|
+
}
|
|
1150
|
+
declare interface ReportEditResult {
|
|
1151
|
+
/** A successful result may advance concurrency tokens for the affected dataset. */
|
|
1152
|
+
revision?: string | number;
|
|
1153
|
+
sourceToken?: string;
|
|
1154
|
+
/** Any conflict rejects the entire client batch. A server must also transact atomically. */
|
|
1155
|
+
conflicts?: readonly ReportEditConflict[];
|
|
1156
|
+
}
|
|
1157
|
+
/** 报表含表头但业务行为空时,由接入方明确声明;组件不推测业务数据。 */
|
|
1158
|
+
declare interface ReportEmptyState {
|
|
1159
|
+
title?: string;
|
|
1160
|
+
description?: string;
|
|
1161
|
+
}
|
|
1162
|
+
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
1163
|
+
declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
1164
|
+
/** 保持 Promise<RenderPlan> 契约;元数据为可选,旧业务 fetcher 无需改造。 */
|
|
1165
|
+
declare interface ReportFetcher {
|
|
1166
|
+
(input: ReportFetchInput): Promise<RenderPlan>;
|
|
1167
|
+
getParamDefs?: (reportIds: string[]) => ReportParamDef[];
|
|
1168
|
+
}
|
|
1169
|
+
declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
1170
|
+
reportIds: string[];
|
|
1171
|
+
params: Record<string, string>;
|
|
1172
|
+
signal?: AbortSignal;
|
|
1173
|
+
/** 本次分页与计划告警;未提供时使用数据源配置的告警通道。 */
|
|
1174
|
+
onWarning?: (message: string) => void;
|
|
1175
|
+
onQueryResult?: (reportId: string, result: ReportQueryResult) => void;
|
|
1176
|
+
}
|
|
1177
|
+
declare interface ReportFieldContract {
|
|
1178
|
+
field: string;
|
|
1179
|
+
label?: string;
|
|
1180
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
1181
|
+
required?: boolean;
|
|
1182
|
+
nullable?: boolean;
|
|
1183
|
+
enum?: readonly (string | number | boolean)[];
|
|
1184
|
+
min?: number;
|
|
1185
|
+
max?: number;
|
|
1186
|
+
minLength?: number;
|
|
1187
|
+
maxLength?: number;
|
|
1188
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
1189
|
+
unit?: string;
|
|
1190
|
+
}
|
|
1191
|
+
declare interface ReportFieldTarget {
|
|
1192
|
+
field: string;
|
|
1193
|
+
datasetId?: string;
|
|
1194
|
+
rowKey?: string | number;
|
|
1195
|
+
tableId?: string;
|
|
1196
|
+
}
|
|
1197
|
+
declare interface ReportInteractionOptions {
|
|
1198
|
+
/** Screen-only frozen panes; exported geometry is unchanged. */
|
|
1199
|
+
freezeHeaders?: boolean;
|
|
1200
|
+
/** Leading identity columns, from 0 to 20. */
|
|
1201
|
+
frozenColumns?: number;
|
|
1202
|
+
/** Show workbook sheets / report sections when available. Default true. */
|
|
1203
|
+
navigation?: boolean;
|
|
1204
|
+
}
|
|
1205
|
+
/** 取数与排版共同使用的请求上下文;取消只影响本次调用。 */
|
|
1206
|
+
declare interface ReportLoadContext {
|
|
1207
|
+
reportId: string;
|
|
1208
|
+
params: Record<string, string>;
|
|
1209
|
+
signal?: AbortSignal;
|
|
1210
|
+
}
|
|
1211
|
+
declare interface ReportOutputOptions {
|
|
1212
|
+
/** warn preserves supported output and shows diagnostics; strict rejects known fidelity loss. */
|
|
1213
|
+
fidelity?: "warn" | "strict";
|
|
1214
|
+
}
|
|
1215
|
+
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
1216
|
+
declare interface ReportParamDef {
|
|
1217
|
+
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
1218
|
+
field: string;
|
|
1219
|
+
/** 显示名(缺省用 field) */
|
|
1220
|
+
label?: string;
|
|
1221
|
+
type?: "text" | "number" | "date" | "select";
|
|
1222
|
+
/** select 选项 */
|
|
1223
|
+
options?: Array<{
|
|
1224
|
+
label: string;
|
|
1225
|
+
value: string;
|
|
1226
|
+
}>;
|
|
1227
|
+
defaultValue?: string;
|
|
1228
|
+
required?: boolean;
|
|
1229
|
+
placeholder?: string;
|
|
1230
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1231
|
+
min?: number | string;
|
|
1232
|
+
max?: number | string;
|
|
1233
|
+
minLength?: number;
|
|
1234
|
+
maxLength?: number;
|
|
1235
|
+
}
|
|
1236
|
+
/** 报表参数定义(声明式,模板自描述参数面:渲染组件据此生成查询面板) */
|
|
1237
|
+
declare interface ReportParamDef_2 {
|
|
1238
|
+
/** 参数名(传入 params,与数据集 SQL #{field} 绑定对应) */
|
|
1239
|
+
field: string;
|
|
1240
|
+
/** 显示名(缺省用 field) */
|
|
1241
|
+
label?: string;
|
|
1242
|
+
type?: "text" | "number" | "date" | "select";
|
|
1243
|
+
/** select 选项 */
|
|
1244
|
+
options?: Array<{
|
|
1245
|
+
label: string;
|
|
1246
|
+
value: string;
|
|
1247
|
+
}>;
|
|
1248
|
+
defaultValue?: string;
|
|
1249
|
+
required?: boolean;
|
|
1250
|
+
placeholder?: string;
|
|
1251
|
+
/** 数字上下界;date 参数使用 YYYY-MM-DD 字符串(含边界)。 */
|
|
1252
|
+
min?: number | string;
|
|
1253
|
+
max?: number | string;
|
|
1254
|
+
minLength?: number;
|
|
1255
|
+
maxLength?: number;
|
|
1256
|
+
}
|
|
1257
|
+
declare interface ReportParamIssue {
|
|
1258
|
+
code: ReportParamIssueCode;
|
|
1259
|
+
path: string;
|
|
1260
|
+
field: string;
|
|
1261
|
+
message: string;
|
|
1262
|
+
}
|
|
1263
|
+
declare type ReportParamIssueCode = "definition" | "required" | "type" | "option" | "minimum" | "maximum" | "minLength" | "maxLength";
|
|
1264
|
+
declare interface ReportPreferencesAdapter {
|
|
1265
|
+
load(key: string): Partial<ReportPreviewPreferences> | null | Promise<Partial<ReportPreviewPreferences> | null>;
|
|
1266
|
+
save(key: string, value: Readonly<Partial<ReportPreviewPreferences>>): void | Promise<void>;
|
|
1267
|
+
remove?(key: string): void | Promise<void>;
|
|
1268
|
+
}
|
|
1269
|
+
declare interface ReportPreferencesOptions {
|
|
1270
|
+
/** Host-scoped key; do not share one key between unrelated users/tenants. */
|
|
1271
|
+
key: string;
|
|
1272
|
+
adapter: ReportPreferencesAdapter;
|
|
1273
|
+
}
|
|
1274
|
+
declare interface ReportPreviewDiagnostic {
|
|
1275
|
+
code: string;
|
|
1276
|
+
severity: "warning" | "error" | "info";
|
|
1277
|
+
message: string;
|
|
1278
|
+
path?: string;
|
|
1279
|
+
format?: OutputFormat;
|
|
1280
|
+
pageIndex?: number;
|
|
1281
|
+
componentIndex?: number;
|
|
1282
|
+
componentPath?: readonly number[];
|
|
1283
|
+
}
|
|
1284
|
+
declare type ReportPreviewPreferences = Record<ReportPreviewTool, boolean>;
|
|
1285
|
+
declare interface ReportPreviewTask {
|
|
1286
|
+
taskId: string;
|
|
1287
|
+
kind: "query" | "import" | "export" | "print";
|
|
1288
|
+
stage: ReportPreviewTaskStage;
|
|
1289
|
+
status: "running" | "completed" | "cancelled" | "failed";
|
|
1290
|
+
/** Counts refer to the current stage, not an invented overall percentage. */
|
|
1291
|
+
completed?: number;
|
|
1292
|
+
total?: number;
|
|
1293
|
+
cancellable: boolean;
|
|
1294
|
+
}
|
|
1295
|
+
declare type ReportPreviewTaskStage = "query" | "validate" | "layout" | "assets" | "import" | "encode" | "download" | "print";
|
|
1296
|
+
declare type ReportPreviewTool = "search" | "thumbnails" | "zoom" | ReportExportFormat | "print" | "pdfWindow" | "editing" | "import";
|
|
1297
|
+
/** 查询是唯一基础能力;权限、HTTP、数据库和事务都留在宿主适配器内。 */
|
|
1298
|
+
declare interface ReportProvider {
|
|
1299
|
+
query(context: ReportLoadContext): ReportQueryResult | Promise<ReportQueryResult>;
|
|
1300
|
+
save?(input: ReportSaveInput): ReportSaveResult | Promise<ReportSaveResult>;
|
|
1301
|
+
export?(input: ReportProviderExportInput): ReportProviderExportResult | Promise<ReportProviderExportResult>;
|
|
1302
|
+
templates?: ReportTemplateProvider;
|
|
1303
|
+
}
|
|
1304
|
+
declare interface ReportProviderExportInput extends ReportLoadContext {
|
|
1305
|
+
format: "pdf" | "xlsx";
|
|
1306
|
+
}
|
|
1307
|
+
declare interface ReportProviderExportResult {
|
|
1308
|
+
bytes: Uint8Array;
|
|
1309
|
+
contentType: string;
|
|
1310
|
+
fileName?: string;
|
|
1311
|
+
diagnostics?: ReportDiagnostic[];
|
|
1312
|
+
}
|
|
1313
|
+
declare interface ReportQueryResult {
|
|
1314
|
+
datasets: DatasetRows;
|
|
1315
|
+
revision?: string;
|
|
1316
|
+
sourceToken?: string;
|
|
1317
|
+
diagnostics?: ReportDiagnostic[];
|
|
1318
|
+
}
|
|
1319
|
+
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
1320
|
+
declare interface ReportSaveInput extends ReportLoadContext {
|
|
1321
|
+
requestId: string;
|
|
1322
|
+
expectedRevision?: string;
|
|
1323
|
+
sourceToken?: string;
|
|
1324
|
+
edits: readonly ReportCellEdit[];
|
|
1325
|
+
action?: "edit" | "undo" | "redo" | "restore";
|
|
1326
|
+
}
|
|
1327
|
+
declare interface ReportSaveResult {
|
|
1328
|
+
revision: string;
|
|
1329
|
+
sourceToken?: string;
|
|
1330
|
+
conflicts?: Array<{
|
|
1331
|
+
editIndex: number;
|
|
1332
|
+
code: string;
|
|
1333
|
+
message: string;
|
|
1334
|
+
}>;
|
|
1335
|
+
diagnostics?: ReportDiagnostic[];
|
|
1336
|
+
}
|
|
1337
|
+
/** 阶段事件只包含可序列化值;不表示估算百分比,也不包含业务数据。 */
|
|
1338
|
+
declare interface ReportTaskEvent {
|
|
1339
|
+
taskId: string;
|
|
1340
|
+
correlationId?: string;
|
|
1341
|
+
stage: "query" | "validate" | "layout" | "encode";
|
|
1342
|
+
status: "started" | "completed" | "failed";
|
|
1343
|
+
reportId?: string;
|
|
1344
|
+
completed?: number;
|
|
1345
|
+
total?: number;
|
|
1346
|
+
}
|
|
1347
|
+
declare interface ReportTaskMonitoring {
|
|
1348
|
+
taskId?: string;
|
|
1349
|
+
correlationId?: string;
|
|
1350
|
+
onEvent?: ReportTaskObserver;
|
|
1351
|
+
}
|
|
1352
|
+
declare type ReportTaskObserver = (event: ReportTaskEvent) => void;
|
|
1353
|
+
declare interface ReportTemplate {
|
|
1354
|
+
schemaVersion?: string;
|
|
1355
|
+
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1356
|
+
params?: ReportParamDef[];
|
|
1357
|
+
pages: TemplatePage[];
|
|
1358
|
+
}
|
|
1359
|
+
declare interface ReportTemplate_2 {
|
|
1360
|
+
schemaVersion?: string;
|
|
1361
|
+
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1362
|
+
params?: ReportParamDef_2[];
|
|
1363
|
+
pages: TemplatePage_2[];
|
|
1364
|
+
}
|
|
1365
|
+
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
1366
|
+
declare interface ReportTemplateDocument {
|
|
1367
|
+
schemaVersion: "1.0";
|
|
1368
|
+
id: string;
|
|
1369
|
+
name: string;
|
|
1370
|
+
/** 宿主的发布版本/乐观锁标识,不由引擎自动递增。 */
|
|
1371
|
+
revision?: string;
|
|
1372
|
+
description?: string;
|
|
1373
|
+
template: ReportTemplate;
|
|
1374
|
+
}
|
|
1375
|
+
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate | Promise<ReportTemplate>;
|
|
1376
|
+
declare interface ReportTemplateProvider {
|
|
1377
|
+
list(context: {
|
|
1378
|
+
signal?: AbortSignal;
|
|
1379
|
+
}): Promise<ReportTemplateSummary[]>;
|
|
1380
|
+
get(id: string, context: {
|
|
1381
|
+
signal?: AbortSignal;
|
|
1382
|
+
}): Promise<ReportTemplateDocument | undefined>;
|
|
1383
|
+
}
|
|
1384
|
+
declare type ReportTemplateSummary = Omit<ReportTemplateDocument, "template">;
|
|
1385
|
+
declare interface RichParagraph {
|
|
1386
|
+
segments: RichSegment[];
|
|
1387
|
+
align?: ComponentStyle["align"];
|
|
1388
|
+
lineHeight?: number;
|
|
1389
|
+
spaceBeforeMm?: number;
|
|
1390
|
+
spaceAfterMm?: number;
|
|
1391
|
+
indentMm?: number;
|
|
1392
|
+
}
|
|
1393
|
+
declare interface RichParagraph_2 {
|
|
1394
|
+
segments: RichSegment_2[];
|
|
1395
|
+
align?: ComponentStyle_2["align"];
|
|
1396
|
+
lineHeight?: number;
|
|
1397
|
+
spaceBeforeMm?: number;
|
|
1398
|
+
spaceAfterMm?: number;
|
|
1399
|
+
indentMm?: number;
|
|
1400
|
+
}
|
|
1401
|
+
declare interface RichParagraph_3 {
|
|
1402
|
+
segments: RichSegment_3[];
|
|
1403
|
+
align?: ComponentStyle_3["align"];
|
|
1404
|
+
lineHeight?: number;
|
|
1405
|
+
spaceBeforeMm?: number;
|
|
1406
|
+
spaceAfterMm?: number;
|
|
1407
|
+
indentMm?: number;
|
|
1408
|
+
}
|
|
1409
|
+
declare interface RichSegment {
|
|
1410
|
+
kind?: "text" | "field";
|
|
1411
|
+
text?: string;
|
|
1412
|
+
field?: string;
|
|
1413
|
+
style?: ComponentStyle;
|
|
1414
|
+
}
|
|
1415
|
+
declare interface RichSegment_2 {
|
|
1416
|
+
kind?: "text" | "field";
|
|
1417
|
+
text?: string;
|
|
1418
|
+
field?: string;
|
|
1419
|
+
style?: ComponentStyle_2;
|
|
1420
|
+
}
|
|
1421
|
+
declare interface RichSegment_3 {
|
|
1422
|
+
kind?: "text" | "field";
|
|
1423
|
+
text?: string;
|
|
1424
|
+
field?: string;
|
|
1425
|
+
style?: ComponentStyle_3;
|
|
1426
|
+
}
|
|
1427
|
+
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
1428
|
+
declare interface StyleRule {
|
|
1429
|
+
when: {
|
|
1430
|
+
field: string;
|
|
1431
|
+
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
1432
|
+
value: number | string;
|
|
1433
|
+
};
|
|
1434
|
+
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
1435
|
+
style: Record<string, unknown>;
|
|
1436
|
+
}
|
|
1437
|
+
/** 条件格式规则求值(声明式,见 ListColumn.rules) */
|
|
1438
|
+
declare interface StyleRule_2 {
|
|
1439
|
+
when: {
|
|
1440
|
+
field: string;
|
|
1441
|
+
op: ">" | ">=" | "<" | "<=" | "==" | "!=";
|
|
1442
|
+
value: number | string;
|
|
1443
|
+
};
|
|
1444
|
+
/** 命中时合并进单元格样式(color/bold/backgroundColor 等) */
|
|
1445
|
+
style: Record<string, unknown>;
|
|
1446
|
+
}
|
|
1447
|
+
declare type TemplateComponent = PlanComponent | ListComponent;
|
|
1448
|
+
declare type TemplateComponent_2 = PlanComponent_3 | ListComponent_2;
|
|
1449
|
+
declare interface TemplatePage {
|
|
1450
|
+
widthMm: number;
|
|
1451
|
+
heightMm: number;
|
|
1452
|
+
/** 宽表保持全列自然宽度,页高只控制内部纵向分段。 */
|
|
1453
|
+
layout?: "page" | "wide";
|
|
1454
|
+
marginTopMm?: number;
|
|
1455
|
+
marginBottomMm?: number;
|
|
1456
|
+
marginLeftMm?: number;
|
|
1457
|
+
marginRightMm?: number;
|
|
1458
|
+
components: TemplateComponent[];
|
|
1459
|
+
}
|
|
1460
|
+
declare interface TemplatePage_2 {
|
|
1461
|
+
widthMm: number;
|
|
1462
|
+
heightMm: number;
|
|
1463
|
+
/** 宽表保持全列自然宽度,页高只控制内部纵向分段。 */
|
|
1464
|
+
layout?: "page" | "wide";
|
|
1465
|
+
marginTopMm?: number;
|
|
1466
|
+
marginBottomMm?: number;
|
|
1467
|
+
marginLeftMm?: number;
|
|
1468
|
+
marginRightMm?: number;
|
|
1469
|
+
components: TemplateComponent_2[];
|
|
1470
|
+
}
|
|
1471
|
+
/**
|
|
1472
|
+
* 文本测量与折行(分页/Canvas/PDF 共用的唯一折行真相源)。
|
|
1473
|
+
*
|
|
1474
|
+
* 测量模型可注入(TextMeasurer):
|
|
1475
|
+
* - 默认 createHeuristicMeasurer():CJK/拉丁宽度启发式(零依赖、Node 可用)
|
|
1476
|
+
* - 浏览器端可注入 createCanvasMeasurer()(真字体 metrics,消除三端折行差异)
|
|
1477
|
+
*/
|
|
1478
|
+
declare interface TextMeasureOptions {
|
|
1479
|
+
fontSizePt: number;
|
|
1480
|
+
fontFamily?: string;
|
|
1481
|
+
bold?: boolean;
|
|
1482
|
+
italic?: boolean;
|
|
1483
|
+
letterSpacingPt?: number;
|
|
1484
|
+
}
|
|
1485
|
+
/** 宽度测量接口:返回文本在给定字号下的宽度(mm)。实现必须无副作用、可缓存。 */
|
|
1486
|
+
declare interface TextMeasurer {
|
|
1487
|
+
measureMm(text: string, options: TextMeasureOptions): number;
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
1491
|
+
* - 网格组件 → 真表格:列宽(mm→Excel 宽度)、行高(mm→pt)、colSpan/rowSpan 合并、
|
|
1492
|
+
* 加粗/对齐/底色/字号直译(resolveGridLayout 复用单真相源几何)
|
|
1493
|
+
* - 文本组件 → 合并标题行(顺序流式输出,保字号/加粗/对齐;非像素级定位,
|
|
1494
|
+
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
1495
|
+
* - 未支持组件、富文本专有内容与单元格嵌套组件跳过并计入 warnings
|
|
1496
|
+
*/
|
|
1497
|
+
declare interface XlsxRenderOptions extends OutputDiagnosticOptions_2 {
|
|
1498
|
+
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
1499
|
+
sheetName?: (sheetIndex: number) => string;
|
|
1500
|
+
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
|
1501
|
+
sheetMode?: "auto" | "pages" | "continuous";
|
|
1502
|
+
/** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
|
|
1503
|
+
valueMode?: "text" | "raw";
|
|
1504
|
+
/** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
|
|
1505
|
+
paperSize?: "auto" | "a3" | "a4" | "a5";
|
|
1506
|
+
}
|
|
1507
|
+
export {};
|