@agile-team/mach-report 2.11.1 → 2.12.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 +15 -6
- package/THIRD_PARTY_NOTICES.md +270 -0
- package/dist/{ExcelBindingWizard-LWX6G1A2.js → ExcelBindingWizard-CeAf4QSE.js} +2 -2
- package/dist/{ExcelBindingWizard-a4kslPHF.cjs → ExcelBindingWizard-y0mT-AHR.cjs} +1 -1
- package/dist/{RuleEditor-C2QsOHOs.cjs → RuleEditor-ChRzNQuF.cjs} +1 -1
- package/dist/{RuleEditor-D9wQHrkf.js → RuleEditor-DzAmW5YH.js} +1 -1
- package/dist/analytics.d.cts +28 -0
- package/dist/analytics.d.ts +28 -0
- package/dist/assets-C2U-e-Sz.cjs +4 -0
- package/dist/assets-Q0wUwNrV.js +217 -0
- package/dist/code-options-BKXXY7NI.js +18 -0
- package/dist/code-options-BUTChiZZ.cjs +1 -0
- package/dist/codes.cjs +9 -0
- package/dist/codes.d.cts +223 -0
- package/dist/codes.d.ts +223 -0
- package/dist/codes.js +26917 -0
- package/dist/designer.cjs +2 -2
- package/dist/designer.d.cts +267 -0
- package/dist/designer.d.ts +267 -0
- package/dist/designer.js +2737 -1941
- package/dist/grid-strokes-Cr7DwUux.cjs +1 -0
- package/dist/grid-strokes-DyyG1q_o.js +53 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +80 -1
- package/dist/index.d.ts +80 -1
- package/dist/index.js +404 -374
- package/dist/pdf.cjs +76 -59
- package/dist/pdf.d.cts +51 -0
- package/dist/pdf.d.ts +51 -0
- package/dist/pdf.js +32193 -32102
- package/dist/record-bindings-By_UKZ2g.cjs +1 -0
- package/dist/{list-cell-ClFra1zS.js → record-bindings-D-5jQlTj.js} +67 -44
- package/dist/{region-binding-workflow-DhQvu1co.cjs → region-binding-workflow-BzfbxRiR.cjs} +1 -1
- package/dist/{region-binding-workflow-CXDmt9Bs.js → region-binding-workflow-CcUq8W2Q.js} +1 -1
- package/dist/server/node.d.cts +52 -1
- package/dist/server/node.d.ts +52 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +239 -210
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +95 -3
- package/dist/server.d.ts +95 -3
- package/dist/server.js +456 -433
- package/dist/style.css +1 -1
- package/dist/{template-registry-WNXdkiET.js → template-registry-BjE1VS6g.js} +221 -157
- package/dist/template-registry-D3SjENi6.cjs +1 -0
- package/dist/template-review-BfCC8Ng9.cjs +2 -0
- package/dist/{template-review-BdcXSYbx.js → template-review-BzpcI-tR.js} +772 -666
- package/dist/validate-BJ5HIWY8.cjs +1 -0
- package/dist/validate-DbgEM1Hh.js +163 -0
- package/dist/vue/async.d.cts +121 -2
- package/dist/vue/async.d.ts +121 -2
- package/dist/vue/index.d.cts +114 -6
- package/dist/vue/index.d.ts +114 -6
- package/dist/{workbook-session-BKOTwcoq.js → workbook-session-BPb3TMnT.js} +1 -1
- package/dist/{workbook-session-CLYLhZWu.cjs → workbook-session-DNa2RHNG.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +52 -1
- package/dist/worker.d.ts +52 -1
- package/dist/worker.js +2 -2
- package/dist/xlsx.cjs +1 -1
- package/dist/xlsx.d.cts +40 -0
- package/dist/xlsx.d.ts +40 -0
- package/dist/xlsx.js +3 -3
- package/package.json +16 -3
- package/dist/assets-Bu6UohJx.cjs +0 -1
- package/dist/assets-DegqDNqY.js +0 -160
- package/dist/list-cell-BuYn4tGF.cjs +0 -1
- package/dist/template-registry-ukBGlm8N.cjs +0 -1
- package/dist/template-review-BXp2oyqg.cjs +0 -1
- package/dist/textwrap-CWHyzkBH.cjs +0 -4
- package/dist/textwrap-DE1kgcJB.js +0 -110
- package/dist/validate-7s0yn6ii.js +0 -148
- package/dist/validate-DsRiNw8h.cjs +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,18 @@ export declare function cloneReportTemplate(document: ReportTemplateDocument, id
|
|
|
113
113
|
name: string;
|
|
114
114
|
}): ReportTemplateDocument;
|
|
115
115
|
|
|
116
|
+
/** Serializable symbol settings. Encoders remain in the optional /codes entry. */
|
|
117
|
+
export declare interface CodeOptions {
|
|
118
|
+
/** Explicit content, including an empty value, takes precedence over legacy fallbackText. */
|
|
119
|
+
value?: string;
|
|
120
|
+
symbology?: "code128" | "code39" | "ean13" | "ean8";
|
|
121
|
+
errorCorrection?: "L" | "M" | "Q" | "H";
|
|
122
|
+
/** White modules around a symbol: QR >=4, linear >=10, EAN >=11. */
|
|
123
|
+
quietZoneModules?: number;
|
|
124
|
+
/** Human-readable content below a linear barcode. */
|
|
125
|
+
showText?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
116
128
|
/**
|
|
117
129
|
* 列值格式化(声明式、JSON 可序列化)。
|
|
118
130
|
* 在 paginate 的 cellText 出口统一消费:格式化发生在进 RenderPlan 之前,
|
|
@@ -139,6 +151,20 @@ export declare type ColumnFormat = {
|
|
|
139
151
|
/** 同一字段契约生成列语义和表头,业务侧无需复制另一份字段清单。 */
|
|
140
152
|
export declare function columnsFromContract(contract: DatasetContract, overrides?: Record<string, Partial<TableTemplateColumn>>): TableTemplateColumn[];
|
|
141
153
|
|
|
154
|
+
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
155
|
+
export declare interface ComponentBinding {
|
|
156
|
+
field: string;
|
|
157
|
+
format?: ValueFormat;
|
|
158
|
+
prefix?: string;
|
|
159
|
+
suffix?: string;
|
|
160
|
+
emptyText?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export declare interface ComponentBindingContext {
|
|
164
|
+
dataset?: string;
|
|
165
|
+
rowIndex?: number;
|
|
166
|
+
}
|
|
167
|
+
|
|
142
168
|
export declare interface ComponentImageContext {
|
|
143
169
|
readonly component: Readonly<PlanComponent>;
|
|
144
170
|
readonly pageIndex: number;
|
|
@@ -219,6 +245,9 @@ export declare function createCanvasPager(plan: RenderPlan, options?: CanvasPage
|
|
|
219
245
|
/** 兼容旧 API:默认启发式测量 */
|
|
220
246
|
export declare function createHeuristicMeasurer(): TextMeasurer;
|
|
221
247
|
|
|
248
|
+
/** One declaration covers record binding, fixed paper size, copies and ordered multi-face labels. */
|
|
249
|
+
export declare function createLabelTemplate(options: LabelTemplateOptions): ReportTemplate;
|
|
250
|
+
|
|
222
251
|
/** Local catalog reference; an enterprise host supplies the same search/get contract with server filtering. */
|
|
223
252
|
export declare function createLocalTemplateCatalog(input: LocalTemplateCatalogItem[]): ReportTemplateCatalogProvider;
|
|
224
253
|
|
|
@@ -323,6 +352,9 @@ export declare const DEFAULT_FONT_FAMILY = "\"Microsoft YaHei\", sans-serif";
|
|
|
323
352
|
/** 默认字号(pt) */
|
|
324
353
|
export declare const DEFAULT_FONT_PT = 10.5;
|
|
325
354
|
|
|
355
|
+
/** Labels are bounded even when a host omits its normal report page budget. */
|
|
356
|
+
export declare const DEFAULT_LABEL_PAGE_LIMIT = 10000;
|
|
357
|
+
|
|
326
358
|
/** 默认描边色 */
|
|
327
359
|
export declare const DEFAULT_STROKE_COLOR = "#333333";
|
|
328
360
|
|
|
@@ -480,6 +512,18 @@ export declare function isReportYear(value: string): boolean;
|
|
|
480
512
|
|
|
481
513
|
export declare function isRichText(comp: PlanComponent): boolean;
|
|
482
514
|
|
|
515
|
+
export declare interface LabelTemplateOptions extends ReportTemplateRepeat {
|
|
516
|
+
widthMm?: number;
|
|
517
|
+
heightMm?: number;
|
|
518
|
+
params?: ReportParamDef[];
|
|
519
|
+
/** A single face. Mutually exclusive with pages. */
|
|
520
|
+
components?: TemplateComponent[];
|
|
521
|
+
pages?: LabelTemplatePage[];
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/** Each face inherits the label size; declare several faces for front/back or companion labels. */
|
|
525
|
+
export declare type LabelTemplatePage = Pick<TemplatePage, "components" | "meta"> & Partial<Pick<TemplatePage, "widthMm" | "heightMm">>;
|
|
526
|
+
|
|
483
527
|
/** 默认行高倍数(基线距 = 字号 × 该系数) */
|
|
484
528
|
export declare const LINE_HEIGHT = 1.35;
|
|
485
529
|
|
|
@@ -798,6 +842,10 @@ export declare function parseReportDateRange(value: string): ReportDateRange | u
|
|
|
798
842
|
export declare function parseReportTemplate(input: unknown): ReportTemplateDocument;
|
|
799
843
|
|
|
800
844
|
export declare interface PlanComponent {
|
|
845
|
+
/** Optional QR/barcode encoding configuration; no encoder is loaded by the core. */
|
|
846
|
+
code?: CodeOptions;
|
|
847
|
+
/** Template-only binding; resolved and removed before constructing the output plan. */
|
|
848
|
+
binding?: ComponentBinding;
|
|
801
849
|
/** Template page furniture repeats per page and reserves its vertical band. */
|
|
802
850
|
pageAnchor?: "header" | "footer";
|
|
803
851
|
kind: ComponentKind;
|
|
@@ -923,6 +971,14 @@ export declare function renderPlanToImages(plan: RenderPlan, options?: ImageRend
|
|
|
923
971
|
/** 模板存储文档版本;与渲染计划版本独立演进。 */
|
|
924
972
|
export declare const REPORT_TEMPLATE_DOCUMENT_VERSION = "1.0";
|
|
925
973
|
|
|
974
|
+
export declare class ReportBindingError extends Error {
|
|
975
|
+
readonly path: string;
|
|
976
|
+
readonly rowIndex?: number | undefined;
|
|
977
|
+
readonly field?: string | undefined;
|
|
978
|
+
readonly code = "report-binding";
|
|
979
|
+
constructor(path: string, message: string, rowIndex?: number | undefined, field?: string | undefined);
|
|
980
|
+
}
|
|
981
|
+
|
|
926
982
|
export declare class ReportCalculationError extends Error {
|
|
927
983
|
readonly code: ReportCalculationErrorCode;
|
|
928
984
|
constructor(code: ReportCalculationErrorCode);
|
|
@@ -1334,7 +1390,7 @@ export declare class ReportSourceError extends Error {
|
|
|
1334
1390
|
export declare interface ReportTaskEvent {
|
|
1335
1391
|
taskId: string;
|
|
1336
1392
|
correlationId?: string;
|
|
1337
|
-
stage: "query" | "validate" | "layout" | "encode";
|
|
1393
|
+
stage: "query" | "validate" | "layout" | "assets" | "encode";
|
|
1338
1394
|
status: "started" | "completed" | "failed";
|
|
1339
1395
|
reportId?: string;
|
|
1340
1396
|
completed?: number;
|
|
@@ -1353,6 +1409,8 @@ export declare interface ReportTemplate {
|
|
|
1353
1409
|
schemaVersion?: string;
|
|
1354
1410
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
1355
1411
|
params?: ReportParamDef[];
|
|
1412
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
1413
|
+
repeat?: ReportTemplateRepeat;
|
|
1356
1414
|
pages: TemplatePage[];
|
|
1357
1415
|
}
|
|
1358
1416
|
|
|
@@ -1476,6 +1534,16 @@ export declare interface ReportTemplateRegistry {
|
|
|
1476
1534
|
remove(id: string): boolean;
|
|
1477
1535
|
}
|
|
1478
1536
|
|
|
1537
|
+
/** Every record emits its copies, each containing all template pages in their original order. */
|
|
1538
|
+
export declare interface ReportTemplateRepeat {
|
|
1539
|
+
dataset: string;
|
|
1540
|
+
rowKey?: string;
|
|
1541
|
+
/** Whole copies per record, 1..1000. The field value must be a number, never a numeric string. */
|
|
1542
|
+
copies?: number | {
|
|
1543
|
+
field: string;
|
|
1544
|
+
};
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1479
1547
|
export declare interface ReportTemplateReview {
|
|
1480
1548
|
ok: boolean;
|
|
1481
1549
|
changes?: ReportTemplateDiff;
|
|
@@ -1497,6 +1565,8 @@ export declare interface ReportTemplateReviewIssue {
|
|
|
1497
1565
|
pageIndex?: number;
|
|
1498
1566
|
componentIndex?: number;
|
|
1499
1567
|
field?: string;
|
|
1568
|
+
/** Original structured output finding, retained for trusted publication resource handling. */
|
|
1569
|
+
diagnostic?: OutputDiagnostic;
|
|
1500
1570
|
}
|
|
1501
1571
|
|
|
1502
1572
|
export declare interface ReportTemplateReviewOptions {
|
|
@@ -1547,6 +1617,9 @@ export declare interface ReportTemplateVersion {
|
|
|
1547
1617
|
*/
|
|
1548
1618
|
export declare function resolveBoxBorders(style: Pick<ComponentStyle, "borderTop" | "borderRight" | "borderBottom" | "borderLeft"> | undefined): BoxBorders;
|
|
1549
1619
|
|
|
1620
|
+
/** The shared binding semantics for actual pagination and designer samples; never evaluates code. */
|
|
1621
|
+
export declare function resolveComponentBinding(binding: ComponentBinding, row: Record<string, unknown>, context?: ComponentBindingContext): string;
|
|
1622
|
+
|
|
1550
1623
|
/** 解析后的字号(px 值已按 dpi 换算;pt 值供 PDF 使用) */
|
|
1551
1624
|
export declare interface ResolvedFontSize {
|
|
1552
1625
|
fontSizePt: number;
|
|
@@ -1680,6 +1753,9 @@ export declare class TemplateBuilder {
|
|
|
1680
1753
|
readonly pages: TemplatePage[];
|
|
1681
1754
|
private pending;
|
|
1682
1755
|
private templateParams;
|
|
1756
|
+
private templateRepeat;
|
|
1757
|
+
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
1758
|
+
repeat(options: ReportTemplateRepeat): this;
|
|
1683
1759
|
/**
|
|
1684
1760
|
* 声明报表参数(链式,可放在 .page() 前后任意位置):
|
|
1685
1761
|
* 渲染组件据此自动生成查询面板(也可由 paramDefs prop 提供,prop 优先)。
|
|
@@ -1841,6 +1917,9 @@ export declare interface ValidationResult {
|
|
|
1841
1917
|
warnings: ValidationError[];
|
|
1842
1918
|
}
|
|
1843
1919
|
|
|
1920
|
+
/** The same declarative formatting used by list columns, before any output backend. */
|
|
1921
|
+
export declare type ValueFormat = ColumnFormat;
|
|
1922
|
+
|
|
1844
1923
|
/**
|
|
1845
1924
|
* 文本折行:
|
|
1846
1925
|
* - CJK 字符任意位置可断(与既有行为一致)
|