@report-sdk/core (1.0.0)
Installation
@report-sdk:registry=http://chenfeng.tech:3000/api/packages/EMOS/npm/npm install @report-sdk/core@1.0.0"@report-sdk/core": "1.0.0"About this package
@report-sdk/core
CFReport 的版本化报表文档模型、校验、迁移、物理单位换算、布局和导出协议。设计、查看和导出不要求许可证;旧版离线验签函数仅为 API 兼容保留。
import { createReport, validateReport } from "@report-sdk/core";
const report = createReport({ name: "采购订单", pageCount: 2 });
const result = validateReport(report);
CFReport persists reports as versioned JSON (designer downloads use .cfr; legacy .json / .cfreport.json files remain readable). It does not read or write Stimulsoft .mrt files.
Report-level metadata and rendering preferences are stored in ReportDocument.settings. Page columns and text watermarks are stored on ReportPage, and reusable data processing rules are stored in ReportDataSource.pipeline. Existing JSON that stored a pipeline in dataSource.options.pipeline remains readable during the compatibility transition.
Designer layout operations should be applied through DesignerCommand (align-items, size-items, distribute-items, and apply-appearance) so React hosts and the built-in designer share the same immutable history behavior.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @bwip-js/generic | ^4.11.4 |
| ajv | ^8.17.1 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^24.10.1 |