@agile-team/mach-report 2.16.0 → 2.17.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 +10 -6
- package/dist/{ExcelBindingWizard-CP6h2x1f.cjs → ExcelBindingWizard-Bq6FYME6.cjs} +1 -1
- package/dist/{ExcelBindingWizard-HhB3hAJE.js → ExcelBindingWizard-Co1svTsw.js} +3 -3
- package/dist/{ParamEditor-CUQLgoxa.cjs → ParamEditor-B5UZRgxv.cjs} +1 -1
- package/dist/{ParamEditor-OKesP_nO.js → ParamEditor-DNNARyeB.js} +1 -1
- package/dist/{ReportBatchPanel-cZCAMAwH.cjs → ReportBatchPanel-Ctvs2t_9.cjs} +1 -1
- package/dist/{ReportBatchPanel-ruxcbfY6.js → ReportBatchPanel-uQh06usx.js} +1 -1
- package/dist/ReportPreview-BdQawRh0.js +4879 -0
- package/dist/ReportPreview-CJC_-j2I.cjs +6 -0
- package/dist/{ReportTemplateLibrary-BDlNT8JN.cjs → ReportTemplateLibrary-CnP7_1pH.cjs} +1 -1
- package/dist/{ReportTemplateLibrary-DcwrH-63.js → ReportTemplateLibrary-TIL_Oj2l.js} +1 -1
- package/dist/RuleEditor-DkRjOLlr.js +2141 -0
- package/dist/RuleEditor-h5anGsDB.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CGrT5DFN.cjs → TemplateOutlinePanel-BlLxRrfu.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-SXCjaPKR.js → TemplateOutlinePanel-BouxsuqQ.js} +1 -1
- package/dist/{TemplateReusePanel-lHLOS9Wn.js → TemplateReusePanel-BEACLPaN.js} +2 -2
- package/dist/{TemplateReusePanel-6Z3wRFz8.cjs → TemplateReusePanel-yxsHSO40.cjs} +1 -1
- package/dist/{TemplateReviewPanel-CJ9PLc48.js → TemplateReviewPanel-B1OGRY2i.js} +1 -1
- package/dist/{TemplateReviewPanel-Dpk7sLcF.cjs → TemplateReviewPanel-D9Cx0m2N.cjs} +1 -1
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +63 -1
- package/dist/analytics.d.ts +63 -1
- package/dist/analytics.js +4 -4
- package/dist/artifact-integrity.json +86 -90
- package/dist/assets-BIMVwjQe.js +231 -0
- package/dist/assets-Dfs2ElxI.cjs +1 -0
- package/dist/{auto-YR7a4BtF.js → auto-BIOmtVhk.js} +14 -14
- package/dist/{auto-uVBjX1j5.cjs → auto-DDHflI9v.cjs} +1 -1
- package/dist/computed-BW5a8QFk.js +612 -0
- package/dist/computed-C2GD3XcE.cjs +1 -0
- package/dist/dataset-DL83majE.js +161 -0
- package/dist/dataset-IrlXbUvh.cjs +1 -0
- package/dist/{designer-BfQSahxq.js → designer-D9XAxqSc.js} +1194 -1179
- package/dist/designer-uCDo5XSK.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +125 -3
- package/dist/designer.d.ts +125 -3
- package/dist/designer.js +1 -1
- package/dist/{drill-CsdjgkRM.cjs → drill-ByN8COs_.cjs} +1 -1
- package/dist/{drill-DIGsZfyB.js → drill-CKW3Xtfa.js} +11 -11
- package/dist/{encoding-BYF9ZTl9.cjs → encoding-BFMFIc4r.cjs} +1 -1
- package/dist/{encoding-BOGq4qYL.js → encoding-DP_Eaf0A.js} +2 -2
- package/dist/{font-loader-EKLzOJxf.cjs → font-loader-7FWVlykp.cjs} +1 -1
- package/dist/{font-loader-CzI1GuBc.js → font-loader-CQZowp0I.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +173 -1
- package/dist/index.d.ts +173 -1
- package/dist/index.js +1205 -808
- package/dist/json-snapshot-D7PE1NsU.cjs +2 -0
- package/dist/{json-snapshot-D6ioHth9.js → json-snapshot-DYmEe3sO.js} +769 -692
- package/dist/matrix-JLAXlux-.js +302 -0
- package/dist/matrix-gTHpDTGm.cjs +1 -0
- package/dist/{pdf-ByVCb1i6.cjs → pdf-B8JouyYv.cjs} +47 -47
- package/dist/{pdf-DJ5S6ukC.js → pdf-l3ea86di.js} +13 -15
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +12 -0
- package/dist/pdf.d.ts +12 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-C2j5_mhx.js → plugin-BBp74CQZ.js} +1 -1
- package/dist/{plugin-Dr39GBRG.cjs → plugin-CtFX9PFG.cjs} +1 -1
- package/dist/{prepared-DqtpvRTn.js → prepared-CARicKYh.js} +1 -1
- package/dist/{prepared-DdrjLC7L.cjs → prepared-Ch1x_Gog.cjs} +1 -1
- package/dist/{protocol-BzwMP4Vw.cjs → protocol-B5A2uom4.cjs} +1 -1
- package/dist/{protocol-kt4Iy6-3.js → protocol-BaiWjq5w.js} +3 -3
- package/dist/{record-bindings-DUX1VMlR.cjs → record-bindings-B86Sur_y.cjs} +1 -1
- package/dist/{record-bindings-CZWBJ1fU.js → record-bindings-D4TuMzHs.js} +1 -1
- package/dist/{region-binding-workflow-CWNvIjkV.js → region-binding-workflow-BNasF5kz.js} +2 -2
- package/dist/{region-binding-workflow-CqSMxQ4p.cjs → region-binding-workflow-O2Cni3mF.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/runtime-DakRXui3.js +170 -0
- package/dist/runtime-dL5ygIfa.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +46 -0
- package/dist/server/node.d.ts +46 -0
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +2540 -1911
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +174 -1
- package/dist/server.d.ts +174 -1
- package/dist/server.js +787 -544
- package/dist/style.css +1 -1
- package/dist/template-catalog-Dua8h9ZA.cjs +1 -0
- package/dist/{template-catalog-BtR2JmCL.js → template-catalog-wT1fNeAP.js} +4 -4
- package/dist/{template-fragments-BVsbxs4a.cjs → template-fragments-BajTajb4.cjs} +1 -1
- package/dist/{template-fragments-By0aZC1D.js → template-fragments-DmX5XK4N.js} +1 -1
- package/dist/{template-registry-C62vpv4a.cjs → template-registry-CpysHAxy.cjs} +1 -1
- package/dist/{template-registry-Cw3vRTX2.js → template-registry-u11fPd8D.js} +5 -5
- package/dist/{tree-BX380Rr7.cjs → tree-CLpxYbKa.cjs} +1 -1
- package/dist/{tree-CjVZLRw7.js → tree-DNJorJUf.js} +1 -1
- package/dist/vue/async.d.cts +108 -2
- package/dist/vue/async.d.ts +108 -2
- package/dist/vue/index.d.cts +130 -3
- package/dist/vue/index.d.ts +130 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/{workbook-session-BeSO8PFB.js → workbook-session-B8pNW24X.js} +1 -1
- package/dist/{workbook-session-Cbts-22R.cjs → workbook-session-DN5LSA5C.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +88 -2
- package/dist/xlsx.d.ts +88 -2
- package/dist/xlsx.js +232 -230
- package/package.json +1 -1
- package/dist/ReportPreview-BcDKCLiK.js +0 -4834
- package/dist/ReportPreview-Bk9nLfO9.cjs +0 -6
- package/dist/RuleEditor-BX5S8RSF.cjs +0 -1
- package/dist/RuleEditor-CGl9XY2s.js +0 -2037
- package/dist/assets-CqIbfbTr.js +0 -126
- package/dist/assets-e4YSke8n.cjs +0 -1
- package/dist/capabilities-DDwXr_cA.js +0 -103
- package/dist/capabilities-DNLyZdNw.cjs +0 -1
- package/dist/computed-C-4C2S5h.js +0 -521
- package/dist/computed-CGV2a809.cjs +0 -1
- package/dist/dataset-BkRmwgeJ.cjs +0 -1
- package/dist/dataset-H5pFuQGU.js +0 -121
- package/dist/designer-CPPdeM5_.cjs +0 -2
- package/dist/diagnostic-notification-B9K9We3h.cjs +0 -1
- package/dist/diagnostic-notification-qGAYZdkB.js +0 -7
- package/dist/json-snapshot-DknkjvxP.cjs +0 -2
- package/dist/matrix-CGRGkn5s.js +0 -112
- package/dist/matrix-gEO7ZM_u.cjs +0 -1
- package/dist/runtime-BjKBI530.js +0 -168
- package/dist/runtime-CBFEPKEs.cjs +0 -1
- package/dist/template-catalog-C2NLdrwB.cjs +0 -1
package/dist/designer.d.cts
CHANGED
|
@@ -45,6 +45,8 @@ declare interface AssetRenderBudget {
|
|
|
45
45
|
}
|
|
46
46
|
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
47
47
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
48
|
+
/** Explicit id/version registry; unbound components continue using assetRenderers by kind. */
|
|
49
|
+
assetRegistry?: ComponentAssetRegistry;
|
|
48
50
|
assetBudget?: AssetRenderBudget;
|
|
49
51
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
50
52
|
assetFailure?: "throw" | "placeholder";
|
|
@@ -198,6 +200,10 @@ declare type ColumnFormat_3 = {
|
|
|
198
200
|
kind: "date";
|
|
199
201
|
pattern?: string;
|
|
200
202
|
};
|
|
203
|
+
declare interface ComponentAssetRegistry {
|
|
204
|
+
rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
|
|
205
|
+
hasExtension(id: string, version: string, kind: string): boolean;
|
|
206
|
+
}
|
|
201
207
|
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
202
208
|
declare interface ComponentBinding {
|
|
203
209
|
field: string;
|
|
@@ -1536,6 +1542,57 @@ declare interface MachReportToolbarOptions {
|
|
|
1536
1542
|
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
1537
1543
|
exportFormats?: ReportExportFormat[];
|
|
1538
1544
|
}
|
|
1545
|
+
declare interface MatrixAxisOptions {
|
|
1546
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1547
|
+
labels?: readonly string[];
|
|
1548
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1549
|
+
sort?: readonly MatrixDimensionOrder[];
|
|
1550
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1551
|
+
subtotals?: readonly number[];
|
|
1552
|
+
}
|
|
1553
|
+
declare interface MatrixAxisOptions_2 {
|
|
1554
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1555
|
+
labels?: readonly string[];
|
|
1556
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1557
|
+
sort?: readonly MatrixDimensionOrder_2[];
|
|
1558
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1559
|
+
subtotals?: readonly number[];
|
|
1560
|
+
}
|
|
1561
|
+
declare interface MatrixAxisOptions_3 {
|
|
1562
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1563
|
+
labels?: readonly string[];
|
|
1564
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1565
|
+
sort?: readonly MatrixDimensionOrder_3[];
|
|
1566
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1567
|
+
subtotals?: readonly number[];
|
|
1568
|
+
}
|
|
1569
|
+
declare type MatrixDimensionOrder = "source" | "asc" | "desc";
|
|
1570
|
+
declare type MatrixDimensionOrder_2 = "source" | "asc" | "desc";
|
|
1571
|
+
declare type MatrixDimensionOrder_3 = "source" | "asc" | "desc";
|
|
1572
|
+
declare interface MatrixHierarchyOptions {
|
|
1573
|
+
row?: MatrixAxisOptions;
|
|
1574
|
+
column?: MatrixAxisOptions;
|
|
1575
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1576
|
+
emptyLabel?: string;
|
|
1577
|
+
subtotalLabel?: string;
|
|
1578
|
+
totalLabel?: string;
|
|
1579
|
+
}
|
|
1580
|
+
declare interface MatrixHierarchyOptions_2 {
|
|
1581
|
+
row?: MatrixAxisOptions_2;
|
|
1582
|
+
column?: MatrixAxisOptions_2;
|
|
1583
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1584
|
+
emptyLabel?: string;
|
|
1585
|
+
subtotalLabel?: string;
|
|
1586
|
+
totalLabel?: string;
|
|
1587
|
+
}
|
|
1588
|
+
declare interface MatrixHierarchyOptions_3 {
|
|
1589
|
+
row?: MatrixAxisOptions_3;
|
|
1590
|
+
column?: MatrixAxisOptions_3;
|
|
1591
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1592
|
+
emptyLabel?: string;
|
|
1593
|
+
subtotalLabel?: string;
|
|
1594
|
+
totalLabel?: string;
|
|
1595
|
+
}
|
|
1539
1596
|
declare interface MatrixTableOptions {
|
|
1540
1597
|
rowFields: readonly string[];
|
|
1541
1598
|
columnFields: readonly string[];
|
|
@@ -1550,6 +1607,10 @@ declare interface MatrixTableOptions {
|
|
|
1550
1607
|
maxColumns?: number;
|
|
1551
1608
|
maxInputRows?: number;
|
|
1552
1609
|
maxCells?: number;
|
|
1610
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1611
|
+
hierarchy?: MatrixHierarchyOptions;
|
|
1612
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1613
|
+
maxAggregateUpdates?: number;
|
|
1553
1614
|
}
|
|
1554
1615
|
declare interface MatrixTableOptions_2 {
|
|
1555
1616
|
rowFields: readonly string[];
|
|
@@ -1565,6 +1626,10 @@ declare interface MatrixTableOptions_2 {
|
|
|
1565
1626
|
maxColumns?: number;
|
|
1566
1627
|
maxInputRows?: number;
|
|
1567
1628
|
maxCells?: number;
|
|
1629
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1630
|
+
hierarchy?: MatrixHierarchyOptions_2;
|
|
1631
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1632
|
+
maxAggregateUpdates?: number;
|
|
1568
1633
|
}
|
|
1569
1634
|
declare interface MatrixTableOptions_3 {
|
|
1570
1635
|
rowFields: readonly string[];
|
|
@@ -1580,6 +1645,10 @@ declare interface MatrixTableOptions_3 {
|
|
|
1580
1645
|
maxColumns?: number;
|
|
1581
1646
|
maxInputRows?: number;
|
|
1582
1647
|
maxCells?: number;
|
|
1648
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1649
|
+
hierarchy?: MatrixHierarchyOptions_3;
|
|
1650
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1651
|
+
maxAggregateUpdates?: number;
|
|
1583
1652
|
}
|
|
1584
1653
|
declare interface OutputDiagnostic {
|
|
1585
1654
|
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "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";
|
|
@@ -1591,6 +1660,11 @@ declare interface OutputDiagnostic {
|
|
|
1591
1660
|
componentPath?: readonly number[];
|
|
1592
1661
|
kind: string;
|
|
1593
1662
|
nid?: string;
|
|
1663
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1664
|
+
extension?: {
|
|
1665
|
+
id: string;
|
|
1666
|
+
version: string;
|
|
1667
|
+
};
|
|
1594
1668
|
message: string;
|
|
1595
1669
|
}
|
|
1596
1670
|
declare interface OutputDiagnostic_2 {
|
|
@@ -1603,6 +1677,11 @@ declare interface OutputDiagnostic_2 {
|
|
|
1603
1677
|
componentPath?: readonly number[];
|
|
1604
1678
|
kind: string;
|
|
1605
1679
|
nid?: string;
|
|
1680
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1681
|
+
extension?: {
|
|
1682
|
+
id: string;
|
|
1683
|
+
version: string;
|
|
1684
|
+
};
|
|
1606
1685
|
message: string;
|
|
1607
1686
|
}
|
|
1608
1687
|
declare interface OutputDiagnosticOptions extends OutputTaskOptions {
|
|
@@ -2438,7 +2517,19 @@ declare type ReportExpression_3 = {
|
|
|
2438
2517
|
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
2439
2518
|
args: readonly ReportExpression_3[];
|
|
2440
2519
|
};
|
|
2441
|
-
declare
|
|
2520
|
+
declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
2521
|
+
declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
2522
|
+
declare interface ReportFieldCalculation {
|
|
2523
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
2524
|
+
description: string;
|
|
2525
|
+
dependsOn: readonly string[];
|
|
2526
|
+
}
|
|
2527
|
+
declare interface ReportFieldCalculation_2 {
|
|
2528
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
2529
|
+
description: string;
|
|
2530
|
+
dependsOn: readonly string[];
|
|
2531
|
+
}
|
|
2532
|
+
declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
2442
2533
|
field: string;
|
|
2443
2534
|
label?: string;
|
|
2444
2535
|
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
@@ -2452,7 +2543,7 @@ declare interface ReportFieldContract {
|
|
|
2452
2543
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
2453
2544
|
unit?: string;
|
|
2454
2545
|
}
|
|
2455
|
-
declare interface ReportFieldContract_2 {
|
|
2546
|
+
declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
|
|
2456
2547
|
field: string;
|
|
2457
2548
|
label?: string;
|
|
2458
2549
|
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
@@ -2466,6 +2557,26 @@ declare interface ReportFieldContract_2 {
|
|
|
2466
2557
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
2467
2558
|
unit?: string;
|
|
2468
2559
|
}
|
|
2560
|
+
declare interface ReportFieldSemantics {
|
|
2561
|
+
description?: string;
|
|
2562
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
2563
|
+
missingMeaning?: string;
|
|
2564
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
2565
|
+
aggregation?: ReportFieldAggregation;
|
|
2566
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
2567
|
+
format?: ColumnFormat;
|
|
2568
|
+
calculation?: ReportFieldCalculation;
|
|
2569
|
+
}
|
|
2570
|
+
declare interface ReportFieldSemantics_2 {
|
|
2571
|
+
description?: string;
|
|
2572
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
2573
|
+
missingMeaning?: string;
|
|
2574
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
2575
|
+
aggregation?: ReportFieldAggregation_2;
|
|
2576
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
2577
|
+
format?: ColumnFormat_2;
|
|
2578
|
+
calculation?: ReportFieldCalculation_2;
|
|
2579
|
+
}
|
|
2469
2580
|
declare interface ReportFlowBand {
|
|
2470
2581
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
2471
2582
|
componentIds: string[];
|
|
@@ -2776,6 +2887,7 @@ export declare const ReportTemplateEditor: DefineComponent<TemplateEditorOptions
|
|
|
2776
2887
|
guardChanges: (reason?: TemplateEditorBeforeDiscardContext["reason"], replacement?: ReportTemplateDocument) => Promise<boolean>;
|
|
2777
2888
|
reset: () => Promise<void>;
|
|
2778
2889
|
save: () => Promise<void>;
|
|
2890
|
+
insertComponent: (component: TemplateComponent) => boolean;
|
|
2779
2891
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2780
2892
|
"update:modelValue": (document: ReportTemplateDocument) => any;
|
|
2781
2893
|
saved: (document: ReportTemplateDocument) => any;
|
|
@@ -2902,6 +3014,14 @@ export declare const RULE_EDITOR_MESSAGES: {
|
|
|
2902
3014
|
pending: string;
|
|
2903
3015
|
detail: string;
|
|
2904
3016
|
matrix: string;
|
|
3017
|
+
matrixHierarchy: string;
|
|
3018
|
+
matrixHierarchyHint: string;
|
|
3019
|
+
matrixSort: string;
|
|
3020
|
+
matrixSourceOrder: string;
|
|
3021
|
+
matrixAscending: string;
|
|
3022
|
+
matrixDescending: string;
|
|
3023
|
+
matrixPrefixSubtotal: string;
|
|
3024
|
+
matrixEmptyLabel: string;
|
|
2905
3025
|
tree: string;
|
|
2906
3026
|
treeInput: string;
|
|
2907
3027
|
treeFlat: string;
|
|
@@ -3572,6 +3692,8 @@ export declare interface TemplateEditorConflictOptions {
|
|
|
3572
3692
|
keepCopy?: (document: ReportTemplateDocument, context: TemplateCopyContext) => Promise<void>;
|
|
3573
3693
|
}
|
|
3574
3694
|
export declare interface TemplateEditorController {
|
|
3695
|
+
/** Insert a native/registered component through validation, geometry constraints and undo history. */
|
|
3696
|
+
insertComponent(component: TemplateComponent): boolean;
|
|
3575
3697
|
readonly pendingLocalChanges: boolean;
|
|
3576
3698
|
readonly saving?: boolean;
|
|
3577
3699
|
readonly blocked?: boolean;
|
|
@@ -3796,7 +3918,7 @@ declare type XlsxImageOptions = ImageMediaOptions;
|
|
|
3796
3918
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
3797
3919
|
* - 原生 richText 保留基础字形;未支持组件、段落专有排版与单元格嵌套组件计入 diagnostics / warnings
|
|
3798
3920
|
*/
|
|
3799
|
-
declare interface XlsxRenderOptions extends
|
|
3921
|
+
declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions {
|
|
3800
3922
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
3801
3923
|
sheetName?: (sheetIndex: number) => string;
|
|
3802
3924
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
package/dist/designer.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ declare interface AssetRenderBudget {
|
|
|
45
45
|
}
|
|
46
46
|
declare interface AssetRenderOptions extends OutputDiagnosticOptions, ImageMediaOptions {
|
|
47
47
|
assetRenderers?: Partial<Record<ImageComponentKind, ComponentImageRenderer>>;
|
|
48
|
+
/** Explicit id/version registry; unbound components continue using assetRenderers by kind. */
|
|
49
|
+
assetRegistry?: ComponentAssetRegistry;
|
|
48
50
|
assetBudget?: AssetRenderBudget;
|
|
49
51
|
/** Default throw prevents an incomplete export; placeholder retains the component and emits diagnostics. */
|
|
50
52
|
assetFailure?: "throw" | "placeholder";
|
|
@@ -198,6 +200,10 @@ declare type ColumnFormat_3 = {
|
|
|
198
200
|
kind: "date";
|
|
199
201
|
pattern?: string;
|
|
200
202
|
};
|
|
203
|
+
declare interface ComponentAssetRegistry {
|
|
204
|
+
rendererFor(component: Readonly<PlanComponent>): ComponentImageRenderer | undefined;
|
|
205
|
+
hasExtension(id: string, version: string, kind: string): boolean;
|
|
206
|
+
}
|
|
201
207
|
/** A literal own field of the current label record; expressions and paths are not evaluated. */
|
|
202
208
|
declare interface ComponentBinding {
|
|
203
209
|
field: string;
|
|
@@ -1536,6 +1542,57 @@ declare interface MachReportToolbarOptions {
|
|
|
1536
1542
|
/** 未传时显示全部已有出口;空数组表示不提供导出工具。 */
|
|
1537
1543
|
exportFormats?: ReportExportFormat[];
|
|
1538
1544
|
}
|
|
1545
|
+
declare interface MatrixAxisOptions {
|
|
1546
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1547
|
+
labels?: readonly string[];
|
|
1548
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1549
|
+
sort?: readonly MatrixDimensionOrder[];
|
|
1550
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1551
|
+
subtotals?: readonly number[];
|
|
1552
|
+
}
|
|
1553
|
+
declare interface MatrixAxisOptions_2 {
|
|
1554
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1555
|
+
labels?: readonly string[];
|
|
1556
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1557
|
+
sort?: readonly MatrixDimensionOrder_2[];
|
|
1558
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1559
|
+
subtotals?: readonly number[];
|
|
1560
|
+
}
|
|
1561
|
+
declare interface MatrixAxisOptions_3 {
|
|
1562
|
+
/** Display names in the same outer-to-inner order as the dimension fields. */
|
|
1563
|
+
labels?: readonly string[];
|
|
1564
|
+
/** Per-level sibling order; omitted levels retain first-seen order. */
|
|
1565
|
+
sort?: readonly MatrixDimensionOrder_3[];
|
|
1566
|
+
/** One-based prefix depths. Leaf depths are not subtotals. */
|
|
1567
|
+
subtotals?: readonly number[];
|
|
1568
|
+
}
|
|
1569
|
+
declare type MatrixDimensionOrder = "source" | "asc" | "desc";
|
|
1570
|
+
declare type MatrixDimensionOrder_2 = "source" | "asc" | "desc";
|
|
1571
|
+
declare type MatrixDimensionOrder_3 = "source" | "asc" | "desc";
|
|
1572
|
+
declare interface MatrixHierarchyOptions {
|
|
1573
|
+
row?: MatrixAxisOptions;
|
|
1574
|
+
column?: MatrixAxisOptions;
|
|
1575
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1576
|
+
emptyLabel?: string;
|
|
1577
|
+
subtotalLabel?: string;
|
|
1578
|
+
totalLabel?: string;
|
|
1579
|
+
}
|
|
1580
|
+
declare interface MatrixHierarchyOptions_2 {
|
|
1581
|
+
row?: MatrixAxisOptions_2;
|
|
1582
|
+
column?: MatrixAxisOptions_2;
|
|
1583
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1584
|
+
emptyLabel?: string;
|
|
1585
|
+
subtotalLabel?: string;
|
|
1586
|
+
totalLabel?: string;
|
|
1587
|
+
}
|
|
1588
|
+
declare interface MatrixHierarchyOptions_3 {
|
|
1589
|
+
row?: MatrixAxisOptions_3;
|
|
1590
|
+
column?: MatrixAxisOptions_3;
|
|
1591
|
+
/** Only null/missing values use this label; empty strings and zero stay distinct. */
|
|
1592
|
+
emptyLabel?: string;
|
|
1593
|
+
subtotalLabel?: string;
|
|
1594
|
+
totalLabel?: string;
|
|
1595
|
+
}
|
|
1539
1596
|
declare interface MatrixTableOptions {
|
|
1540
1597
|
rowFields: readonly string[];
|
|
1541
1598
|
columnFields: readonly string[];
|
|
@@ -1550,6 +1607,10 @@ declare interface MatrixTableOptions {
|
|
|
1550
1607
|
maxColumns?: number;
|
|
1551
1608
|
maxInputRows?: number;
|
|
1552
1609
|
maxCells?: number;
|
|
1610
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1611
|
+
hierarchy?: MatrixHierarchyOptions;
|
|
1612
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1613
|
+
maxAggregateUpdates?: number;
|
|
1553
1614
|
}
|
|
1554
1615
|
declare interface MatrixTableOptions_2 {
|
|
1555
1616
|
rowFields: readonly string[];
|
|
@@ -1565,6 +1626,10 @@ declare interface MatrixTableOptions_2 {
|
|
|
1565
1626
|
maxColumns?: number;
|
|
1566
1627
|
maxInputRows?: number;
|
|
1567
1628
|
maxCells?: number;
|
|
1629
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1630
|
+
hierarchy?: MatrixHierarchyOptions_2;
|
|
1631
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1632
|
+
maxAggregateUpdates?: number;
|
|
1568
1633
|
}
|
|
1569
1634
|
declare interface MatrixTableOptions_3 {
|
|
1570
1635
|
rowFields: readonly string[];
|
|
@@ -1580,6 +1645,10 @@ declare interface MatrixTableOptions_3 {
|
|
|
1580
1645
|
maxColumns?: number;
|
|
1581
1646
|
maxInputRows?: number;
|
|
1582
1647
|
maxCells?: number;
|
|
1648
|
+
/** Opt-in hierarchical dimensions, physical merged headers and prefix subtotals. */
|
|
1649
|
+
hierarchy?: MatrixHierarchyOptions_3;
|
|
1650
|
+
/** Hierarchical aggregate work, checked before measure reads; default 10 million updates. */
|
|
1651
|
+
maxAggregateUpdates?: number;
|
|
1583
1652
|
}
|
|
1584
1653
|
declare interface OutputDiagnostic {
|
|
1585
1654
|
code: "invalid-image-data" | "image-budget-exceeded" | "component-render-failed" | "unsupported-text" | "output-degraded" | "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";
|
|
@@ -1591,6 +1660,11 @@ declare interface OutputDiagnostic {
|
|
|
1591
1660
|
componentPath?: readonly number[];
|
|
1592
1661
|
kind: string;
|
|
1593
1662
|
nid?: string;
|
|
1663
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1664
|
+
extension?: {
|
|
1665
|
+
id: string;
|
|
1666
|
+
version: string;
|
|
1667
|
+
};
|
|
1594
1668
|
message: string;
|
|
1595
1669
|
}
|
|
1596
1670
|
declare interface OutputDiagnostic_2 {
|
|
@@ -1603,6 +1677,11 @@ declare interface OutputDiagnostic_2 {
|
|
|
1603
1677
|
componentPath?: readonly number[];
|
|
1604
1678
|
kind: string;
|
|
1605
1679
|
nid?: string;
|
|
1680
|
+
/** Declarative extension identity only; no property values or business binding data enter diagnostics. */
|
|
1681
|
+
extension?: {
|
|
1682
|
+
id: string;
|
|
1683
|
+
version: string;
|
|
1684
|
+
};
|
|
1606
1685
|
message: string;
|
|
1607
1686
|
}
|
|
1608
1687
|
declare interface OutputDiagnosticOptions extends OutputTaskOptions {
|
|
@@ -2438,7 +2517,19 @@ declare type ReportExpression_3 = {
|
|
|
2438
2517
|
op: "add" | "subtract" | "multiply" | "divide" | "coalesce";
|
|
2439
2518
|
args: readonly ReportExpression_3[];
|
|
2440
2519
|
};
|
|
2441
|
-
declare
|
|
2520
|
+
declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
2521
|
+
declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
2522
|
+
declare interface ReportFieldCalculation {
|
|
2523
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
2524
|
+
description: string;
|
|
2525
|
+
dependsOn: readonly string[];
|
|
2526
|
+
}
|
|
2527
|
+
declare interface ReportFieldCalculation_2 {
|
|
2528
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
2529
|
+
description: string;
|
|
2530
|
+
dependsOn: readonly string[];
|
|
2531
|
+
}
|
|
2532
|
+
declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
2442
2533
|
field: string;
|
|
2443
2534
|
label?: string;
|
|
2444
2535
|
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
@@ -2452,7 +2543,7 @@ declare interface ReportFieldContract {
|
|
|
2452
2543
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
2453
2544
|
unit?: string;
|
|
2454
2545
|
}
|
|
2455
|
-
declare interface ReportFieldContract_2 {
|
|
2546
|
+
declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
|
|
2456
2547
|
field: string;
|
|
2457
2548
|
label?: string;
|
|
2458
2549
|
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
@@ -2466,6 +2557,26 @@ declare interface ReportFieldContract_2 {
|
|
|
2466
2557
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
2467
2558
|
unit?: string;
|
|
2468
2559
|
}
|
|
2560
|
+
declare interface ReportFieldSemantics {
|
|
2561
|
+
description?: string;
|
|
2562
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
2563
|
+
missingMeaning?: string;
|
|
2564
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
2565
|
+
aggregation?: ReportFieldAggregation;
|
|
2566
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
2567
|
+
format?: ColumnFormat;
|
|
2568
|
+
calculation?: ReportFieldCalculation;
|
|
2569
|
+
}
|
|
2570
|
+
declare interface ReportFieldSemantics_2 {
|
|
2571
|
+
description?: string;
|
|
2572
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
2573
|
+
missingMeaning?: string;
|
|
2574
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
2575
|
+
aggregation?: ReportFieldAggregation_2;
|
|
2576
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
2577
|
+
format?: ColumnFormat_2;
|
|
2578
|
+
calculation?: ReportFieldCalculation_2;
|
|
2579
|
+
}
|
|
2469
2580
|
declare interface ReportFlowBand {
|
|
2470
2581
|
/** Exact stable component IDs. Static components use nid, lists use id. */
|
|
2471
2582
|
componentIds: string[];
|
|
@@ -2776,6 +2887,7 @@ export declare const ReportTemplateEditor: DefineComponent<TemplateEditorOptions
|
|
|
2776
2887
|
guardChanges: (reason?: TemplateEditorBeforeDiscardContext["reason"], replacement?: ReportTemplateDocument) => Promise<boolean>;
|
|
2777
2888
|
reset: () => Promise<void>;
|
|
2778
2889
|
save: () => Promise<void>;
|
|
2890
|
+
insertComponent: (component: TemplateComponent) => boolean;
|
|
2779
2891
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
2780
2892
|
"update:modelValue": (document: ReportTemplateDocument) => any;
|
|
2781
2893
|
saved: (document: ReportTemplateDocument) => any;
|
|
@@ -2902,6 +3014,14 @@ export declare const RULE_EDITOR_MESSAGES: {
|
|
|
2902
3014
|
pending: string;
|
|
2903
3015
|
detail: string;
|
|
2904
3016
|
matrix: string;
|
|
3017
|
+
matrixHierarchy: string;
|
|
3018
|
+
matrixHierarchyHint: string;
|
|
3019
|
+
matrixSort: string;
|
|
3020
|
+
matrixSourceOrder: string;
|
|
3021
|
+
matrixAscending: string;
|
|
3022
|
+
matrixDescending: string;
|
|
3023
|
+
matrixPrefixSubtotal: string;
|
|
3024
|
+
matrixEmptyLabel: string;
|
|
2905
3025
|
tree: string;
|
|
2906
3026
|
treeInput: string;
|
|
2907
3027
|
treeFlat: string;
|
|
@@ -3572,6 +3692,8 @@ export declare interface TemplateEditorConflictOptions {
|
|
|
3572
3692
|
keepCopy?: (document: ReportTemplateDocument, context: TemplateCopyContext) => Promise<void>;
|
|
3573
3693
|
}
|
|
3574
3694
|
export declare interface TemplateEditorController {
|
|
3695
|
+
/** Insert a native/registered component through validation, geometry constraints and undo history. */
|
|
3696
|
+
insertComponent(component: TemplateComponent): boolean;
|
|
3575
3697
|
readonly pendingLocalChanges: boolean;
|
|
3576
3698
|
readonly saving?: boolean;
|
|
3577
3699
|
readonly blocked?: boolean;
|
|
@@ -3796,7 +3918,7 @@ declare type XlsxImageOptions = ImageMediaOptions;
|
|
|
3796
3918
|
* 目标是"财务能直接用的对账表"而非复刻版面)
|
|
3797
3919
|
* - 原生 richText 保留基础字形;未支持组件、段落专有排版与单元格嵌套组件计入 diagnostics / warnings
|
|
3798
3920
|
*/
|
|
3799
|
-
declare interface XlsxRenderOptions extends
|
|
3921
|
+
declare interface XlsxRenderOptions extends AssetRenderOptions, XlsxImageOptions {
|
|
3800
3922
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
3801
3923
|
sheetName?: (sheetIndex: number) => string;
|
|
3802
3924
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
package/dist/designer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
import { E as S, c as T, P as s, d as R, R as t, D as A, e as _, f as r, g as M, h as l, i as P, a as i, b as p, j as m, T as o, k as G, l as L, m as n, n as D } from "./designer-
|
|
2
|
+
import { E as S, c as T, P as s, d as R, R as t, D as A, e as _, f as r, g as M, h as l, i as P, a as i, b as p, j as m, T as o, k as G, l as L, m as n, n as D } from "./designer-D9XAxqSc.js";
|
|
3
3
|
export {
|
|
4
4
|
S as EXCEL_BINDING_MESSAGES,
|
|
5
5
|
T as ExcelBindingWizard,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("./json-snapshot-
|
|
1
|
+
"use strict";const g=require("./json-snapshot-D7PE1NsU.cjs"),D=require("./grid-geometry-CZ_cYB6O.cjs");function m(e){return Number.isFinite(e)?Math.max(0,e):0}function C(e,r=0){const t=e.length,n=m(r),o=new Array(t+1);o[0]=0;for(let i=0;i<t;i++)o[i+1]=o[i]+m(e[i]??0)+n;const u=o[t];function f(i){let s=0,a=t-1,h=0;for(;s<=a;){const p=s+a>>>1;o[p]<=i?(h=p,s=p+1):a=p-1}return h}function l(i,s,a=1){if(t===0)return{start:0,end:-1,padTopPx:0,padBottomPx:0};const h=Math.floor(m(a)),p=m(s),v=f(p),x=Math.max(0,v-h),A=p+m(i);let y=v,b=t-1,I=t-1;for(;y<=b;){const w=y+b>>>1;o[w+1]<A?y=w+1:(I=w,b=w-1)}const S=Math.min(t-1,I+h);return{start:x,end:S,padTopPx:o[x],padBottomPx:Math.max(0,u-o[S+1])}}return{totalHeightPx:u,pageAt:f,offsetAt:i=>o[Math.max(0,Math.min(t,Math.floor(i)))]??0,window:l}}class c extends Error{constructor(r){super(`Report drill: ${r}`),this.code=r,this.name="ReportDrillError"}}function d(e){return typeof e=="string"&&e.trim().length>0&&e.length<=256}function j(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="boolean")return String(e);if(typeof e=="string"&&e.length>0&&e.length<=4096)return e;throw new c("missing-value")}function M(e,r){return Object.getOwnPropertyDescriptor(e,r)?.value}function R(e){if(!Array.isArray(e)||e.length>64)throw new c("config");const r=new Set;for(const t of e){if(!t||!d(t.id)||!d(t.label)||!t.target||!d(t.target.field)||r.has(t.id))throw new c("config");r.add(t.id);const n=t.target;if(n.datasetId!==void 0&&!d(n.datasetId)||n.reportScope!==void 0&&!d(n.reportScope))throw new c("config");if(n.roles!==void 0&&(!Array.isArray(n.roles)||n.roles.length>16||n.roles.some(o=>!d(o))))throw new c("config");E(t.params)}}function E(e){if(e!==void 0){if(!e||typeof e!="object"||Array.isArray(e)||Object.keys(e).length>32)throw new c("config");for(const[r,t]of Object.entries(e)){if(!d(r)||["__proto__","constructor","prototype"].includes(r)||!t||typeof t!="object")throw new c("config");if("value"in t)try{j(t.value)}catch{throw new c("config")}else if(!["value","rowKey","query","field"].includes(t.from)||(t.from==="query"||t.from==="field")&&!d(t.field))throw new c("config")}}}function O(e,r,t){const{target:n}=t,o=r.source?.datasetId??r.component.table?.source?.datasetId;return(r.source?.field??r.table?.columnKey)===n.field&&(n.datasetId===void 0||o===n.datasetId)&&(n.reportScope===void 0||e.pages[r.address.pageIndex]?.meta?.reportScope===n.reportScope)&&(n.roles?n.roles.includes(r.table?.role??""):r.table?.role!=="header")}function K(e,r,t){R(t);const n=g.getReportCellContext(e,r);return n?t.filter(o=>O(e,n,o)):[]}function q(e,r,t,n){if("value"in e)return e.value;switch(e.from){case"value":return t.value;case"rowKey":return t.source?.rowKey;case"query":return M(n,e.field);case"field":{const o=t.component.table?.columnKeys.indexOf(e.field)??-1;return o<0?void 0:g.getReportCellContext(r,{...t.address,columnIndex:o})?.value}}}function P(e,r,t,n={}){R([t]);const o=g.getReportCellContext(e,r);if(!o||!O(e,o,t))throw new c("target");const u=Object.fromEntries(Object.entries(t.params??{}).map(([i,s])=>[i,j(q(s,e,o,n))])),f=Object.entries(n);if(f.length>128||f.some(([i,s])=>!d(i)||typeof s!="string"||s.length>4096))throw new c("config");const l=e.pages[r.pageIndex]?.meta?.reportScope;return Object.freeze({actionId:t.id,params:Object.freeze(u),returnState:Object.freeze({params:Object.freeze(Object.fromEntries(f)),address:Object.freeze({...r}),...typeof l=="string"?{reportScope:l}:{},...o.source?{source:Object.freeze({sourceScope:o.source.sourceScope,datasetId:o.source.datasetId,rowKey:o.source.rowKey,field:o.source.field})}:{}})})}function z(e,r){if(!r.source)return e.pages[r.address.pageIndex]?.meta?.reportScope===r.reportScope&&g.getReportCellContext(e,r.address)?{...r.address}:null;const t=g.createReportCellResolver(e),n=g.reportCellEditKey({address:r.address,source:r.source});for(const[o,u]of e.pages.entries())if(!(r.reportScope!==void 0&&u.meta?.reportScope!==r.reportScope)){for(const[f,l]of u.components.entries())if(l.grid)for(const i of D.resolveGridLayout(l.grid,l.widthMm,l.heightMm).cells){const s={pageIndex:o,componentIndex:f,rowIndex:i.ri,columnIndex:i.ci},a=t(s);if(a?.source&&g.reportCellEditKey(a)===n)return s}}return null}exports.ReportDrillError=c;exports.createPageWindowIndex=C;exports.createReportDrillRequest=P;exports.matchReportDrillActions=K;exports.resolveReportDrillReturn=z;exports.validateReportDrillActions=R;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as w, C as j, k as K } from "./json-snapshot-DYmEe3sO.js";
|
|
2
2
|
import { r as D } from "./grid-geometry-BNptEcMm.js";
|
|
3
3
|
function m(e) {
|
|
4
4
|
return Number.isFinite(e) ? Math.max(0, e) : 0;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function k(e, t = 0) {
|
|
7
7
|
const r = e.length, n = m(t), o = new Array(r + 1);
|
|
8
8
|
o[0] = 0;
|
|
9
9
|
for (let s = 0; s < r; s++)
|
|
@@ -65,10 +65,10 @@ function R(e) {
|
|
|
65
65
|
const n = r.target;
|
|
66
66
|
if (n.datasetId !== void 0 && !f(n.datasetId) || n.reportScope !== void 0 && !f(n.reportScope)) throw new c("config");
|
|
67
67
|
if (n.roles !== void 0 && (!Array.isArray(n.roles) || n.roles.length > 16 || n.roles.some((o) => !f(o)))) throw new c("config");
|
|
68
|
-
|
|
68
|
+
z(r.params);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function z(e) {
|
|
72
72
|
if (e !== void 0) {
|
|
73
73
|
if (!e || typeof e != "object" || Array.isArray(e) || Object.keys(e).length > 32) throw new c("config");
|
|
74
74
|
for (const [t, r] of Object.entries(e)) {
|
|
@@ -87,12 +87,12 @@ function A(e, t, r) {
|
|
|
87
87
|
const { target: n } = r, o = t.source?.datasetId ?? t.component.table?.source?.datasetId;
|
|
88
88
|
return (t.source?.field ?? t.table?.columnKey) === n.field && (n.datasetId === void 0 || o === n.datasetId) && (n.reportScope === void 0 || e.pages[t.address.pageIndex]?.meta?.reportScope === n.reportScope) && (n.roles ? n.roles.includes(t.table?.role ?? "") : t.table?.role !== "header");
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function _(e, t, r) {
|
|
91
91
|
R(r);
|
|
92
92
|
const n = w(e, t);
|
|
93
93
|
return n ? r.filter((o) => A(e, n, o)) : [];
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function P(e, t, r, n) {
|
|
96
96
|
if ("value" in e) return e.value;
|
|
97
97
|
switch (e.from) {
|
|
98
98
|
case "value":
|
|
@@ -107,11 +107,11 @@ function z(e, t, r, n) {
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function B(e, t, r, n = {}) {
|
|
111
111
|
R([r]);
|
|
112
112
|
const o = w(e, t);
|
|
113
113
|
if (!o || !A(e, o, r)) throw new c("target");
|
|
114
|
-
const u = Object.fromEntries(Object.entries(r.params ?? {}).map(([s, i]) => [s, O(
|
|
114
|
+
const u = Object.fromEntries(Object.entries(r.params ?? {}).map(([s, i]) => [s, O(P(i, e, o, n))])), l = Object.entries(n);
|
|
115
115
|
if (l.length > 128 || l.some(([s, i]) => !f(s) || typeof i != "string" || i.length > 4096)) throw new c("config");
|
|
116
116
|
const a = e.pages[t.pageIndex]?.meta?.reportScope;
|
|
117
117
|
return Object.freeze({ actionId: r.id, params: Object.freeze(u), returnState: Object.freeze({
|
|
@@ -137,9 +137,9 @@ function N(e, t) {
|
|
|
137
137
|
}
|
|
138
138
|
export {
|
|
139
139
|
c as R,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
B as a,
|
|
141
|
+
k as c,
|
|
142
|
+
_ as m,
|
|
143
143
|
N as r,
|
|
144
144
|
R as v
|
|
145
145
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("./runtime-
|
|
1
|
+
"use strict";const s=require("./runtime-dL5ygIfa.cjs"),e=require("./protocol-B5A2uom4.cjs");async function a(r,t){try{if(r.operation!=="exportPrepared")throw new TypeError("内置编码 Worker 仅接受 exportPrepared");return await e.runReportWorkerRequest(s.createReportRuntime({reports:{},budget:r.budget}),r,t)}catch(o){return{protocol:e.REPORT_WORKER_PROTOCOL,id:r.id,error:e.serializeError(o)}}}function R(r=globalThis){const t=o=>{if(!e.isReportWorkerRequest(o.data))return;const i=o.data;a(i,n=>r.postMessage({protocol:e.REPORT_WORKER_PROTOCOL,id:i.id,type:"event",event:n})).then(n=>r.postMessage(n,e.reportWorkerTransferList(n)))};return r.addEventListener("message",t),()=>r.removeEventListener("message",t)}exports.serveReportEncodingWorker=R;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as n } from "./runtime-
|
|
2
|
-
import { i, a as p, r as d, R as a, s as R } from "./protocol-
|
|
1
|
+
import { c as n } from "./runtime-DakRXui3.js";
|
|
2
|
+
import { i, a as p, r as d, R as a, s as R } from "./protocol-BaiWjq5w.js";
|
|
3
3
|
async function u(r, e) {
|
|
4
4
|
try {
|
|
5
5
|
if (r.operation !== "exportPrepared") throw new TypeError("内置编码 Worker 仅接受 exportPrepared");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=new Map;let b=0,d={maxFonts:8,maxBytes:64*1024*1024,maxFontBytes:24*1024*1024};function O(){for(;f.size>d.maxFonts||b>d.maxBytes;){const t=f.keys().next().value;b-=f.get(t).byteLength,f.delete(t)}}function W(t){const e={...d,...t};if(!Object.values(e).every(n=>Number.isSafeInteger(n)&&n>0))throw new Error("字体缓存预算应为正整数字节/数量");d=e;for(const[n,a]of f)a.byteLength>d.maxFontBytes&&B(n);O()}function p(){return{fonts:f.size,bytes:b,...d}}function j(t){const e=f.get(t);return e&&(f.delete(t),f.set(t,e)),e}function B(t){const e=f.get(t);e&&(b-=e.byteLength),f.delete(t)}function q(){f.clear(),b=0}function H(t,e){B(t),!(e.byteLength>d.maxBytes||e.byteLength>d.maxFontBytes)&&(f.set(t,e),b+=e.byteLength,O())}const V="mach-report-fonts",u="fonts";function $(){return new Promise((t,e)=>{const n=indexedDB.open(V,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(u)||n.result.createObjectStore(u)},n.onsuccess=()=>t(n.result),n.onerror=()=>e(n.error)})}function M(t){if(t instanceof Uint8Array)return{bytes:t,accessedAt:0};const e=t;return e?.bytes instanceof Uint8Array&&Number.isFinite(e.accessedAt)?e:void 0}async function C(t,e){if(typeof indexedDB>"u")return t;let n;try{return n=await $(),await e(n)}catch{return t}finally{n?.close()}}function G(t){return C(null,e=>new Promise((n,a)=>{const r=e.transaction(u,"readwrite"),o=r.objectStore(u),i=o.get(t);let c=null;i.onsuccess=()=>{const s=M(i.result);s&&s.bytes.byteLength<=p().maxFontBytes?(c=s.bytes,o.put({bytes:s.bytes,accessedAt:Date.now()},t)):i.result!==void 0&&o.delete(t)},r.oncomplete=()=>n(c),r.onerror=()=>a(r.error),r.onabort=()=>a(r.error)}))}function J(t,e,n,a){const r=p(),o=e.filter(s=>s.key!==n);t.delete(n),a.byteLength<=Math.min(r.maxFontBytes,r.maxBytes)&&o.unshift({key:n,bytes:a.byteLength,accessedAt:Date.now()}),o.sort((s,h)=>h.accessedAt-s.accessedAt);let i=0,c=0;for(const s of o){if(c>=r.maxFonts||i+s.bytes>r.maxBytes||s.bytes>r.maxFontBytes){t.delete(s.key);continue}i+=s.bytes,c++,s.key===n&&t.put({bytes:a,accessedAt:s.accessedAt},n)}}function _(t,e){return C(void 0,n=>new Promise((a,r)=>{const o=n.transaction(u,"readwrite"),i=o.objectStore(u),c=i.openCursor(),s=[];c.onsuccess=()=>{const h=c.result;if(!h){J(i,s,t,e);return}const x=M(h.value);x?s.push({key:h.key,bytes:x.bytes.byteLength,accessedAt:x.accessedAt}):h.delete(),h.continue()},o.oncomplete=()=>a(),o.onerror=()=>r(o.error),o.onabort=()=>r(o.error)}))}function D(t){return C(void 0,e=>new Promise((n,a)=>{const r=e.transaction(u,"readwrite"),o=r.objectStore(u);t===void 0?o.clear():o.delete(t),r.oncomplete=()=>n(),r.onerror=()=>a(r.error),r.onabort=()=>a(r.error)}))}let L=0,S=0,v=Promise.resolve();const g=new Map;async function N(t){l.set(t,(l.get(t)??0)+1),B(t),w.delete(t);const e=g.get(t),n=(async()=>{await v,await e,await y.get(t),await D(t)})();g.set(t,n);try{await n}finally{g.get(t)===n&&g.delete(t)}}async function I(){L++,q(),w.clear(),l.clear();const t=v,e=(async()=>{await t,await Promise.all(y.values()),await D()})();v=e.catch(()=>{}),await e}const l=new Map,y=new Map,w=new Map,E=new Set;function k(){!S&&!E.size&&l.clear()}const T=new WeakMap;function K(t){const e=new TextDecoder().decode(t.subarray(0,256));return/^\s*(?:\uFEFF)?\s*<(?:!doctype\s+html|html|head|body)(?:\s|>)/i.test(e)}function R(t){if(t.byteLength===0)throw new Error("字体文件为空");if(K(t))throw new Error("字体 URL 返回 HTML 页面(可能是 SPA 路由回退),不是字体文件")}function Q(t){const e=T.get(t);if(e)return e;const n=(async()=>{const a=String.fromCharCode(...t.subarray(0,4));if(!["\0\0\0","true","OTTO","wOFF","wOF2","ttcf"].includes(a))throw new Error("文件内容不是支持的 TTF/OTF/WOFF 字体(可能返回了 JSON 或文本)");const{default:r}=await Promise.resolve().then(()=>require("./pdf-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=new Map;let b=0,d={maxFonts:8,maxBytes:64*1024*1024,maxFontBytes:24*1024*1024};function O(){for(;f.size>d.maxFonts||b>d.maxBytes;){const t=f.keys().next().value;b-=f.get(t).byteLength,f.delete(t)}}function W(t){const e={...d,...t};if(!Object.values(e).every(n=>Number.isSafeInteger(n)&&n>0))throw new Error("字体缓存预算应为正整数字节/数量");d=e;for(const[n,a]of f)a.byteLength>d.maxFontBytes&&B(n);O()}function p(){return{fonts:f.size,bytes:b,...d}}function j(t){const e=f.get(t);return e&&(f.delete(t),f.set(t,e)),e}function B(t){const e=f.get(t);e&&(b-=e.byteLength),f.delete(t)}function q(){f.clear(),b=0}function H(t,e){B(t),!(e.byteLength>d.maxBytes||e.byteLength>d.maxFontBytes)&&(f.set(t,e),b+=e.byteLength,O())}const V="mach-report-fonts",u="fonts";function $(){return new Promise((t,e)=>{const n=indexedDB.open(V,1);n.onupgradeneeded=()=>{n.result.objectStoreNames.contains(u)||n.result.createObjectStore(u)},n.onsuccess=()=>t(n.result),n.onerror=()=>e(n.error)})}function M(t){if(t instanceof Uint8Array)return{bytes:t,accessedAt:0};const e=t;return e?.bytes instanceof Uint8Array&&Number.isFinite(e.accessedAt)?e:void 0}async function C(t,e){if(typeof indexedDB>"u")return t;let n;try{return n=await $(),await e(n)}catch{return t}finally{n?.close()}}function G(t){return C(null,e=>new Promise((n,a)=>{const r=e.transaction(u,"readwrite"),o=r.objectStore(u),i=o.get(t);let c=null;i.onsuccess=()=>{const s=M(i.result);s&&s.bytes.byteLength<=p().maxFontBytes?(c=s.bytes,o.put({bytes:s.bytes,accessedAt:Date.now()},t)):i.result!==void 0&&o.delete(t)},r.oncomplete=()=>n(c),r.onerror=()=>a(r.error),r.onabort=()=>a(r.error)}))}function J(t,e,n,a){const r=p(),o=e.filter(s=>s.key!==n);t.delete(n),a.byteLength<=Math.min(r.maxFontBytes,r.maxBytes)&&o.unshift({key:n,bytes:a.byteLength,accessedAt:Date.now()}),o.sort((s,h)=>h.accessedAt-s.accessedAt);let i=0,c=0;for(const s of o){if(c>=r.maxFonts||i+s.bytes>r.maxBytes||s.bytes>r.maxFontBytes){t.delete(s.key);continue}i+=s.bytes,c++,s.key===n&&t.put({bytes:a,accessedAt:s.accessedAt},n)}}function _(t,e){return C(void 0,n=>new Promise((a,r)=>{const o=n.transaction(u,"readwrite"),i=o.objectStore(u),c=i.openCursor(),s=[];c.onsuccess=()=>{const h=c.result;if(!h){J(i,s,t,e);return}const x=M(h.value);x?s.push({key:h.key,bytes:x.bytes.byteLength,accessedAt:x.accessedAt}):h.delete(),h.continue()},o.oncomplete=()=>a(),o.onerror=()=>r(o.error),o.onabort=()=>r(o.error)}))}function D(t){return C(void 0,e=>new Promise((n,a)=>{const r=e.transaction(u,"readwrite"),o=r.objectStore(u);t===void 0?o.clear():o.delete(t),r.oncomplete=()=>n(),r.onerror=()=>a(r.error),r.onabort=()=>a(r.error)}))}let L=0,S=0,v=Promise.resolve();const g=new Map;async function N(t){l.set(t,(l.get(t)??0)+1),B(t),w.delete(t);const e=g.get(t),n=(async()=>{await v,await e,await y.get(t),await D(t)})();g.set(t,n);try{await n}finally{g.get(t)===n&&g.delete(t)}}async function I(){L++,q(),w.clear(),l.clear();const t=v,e=(async()=>{await t,await Promise.all(y.values()),await D()})();v=e.catch(()=>{}),await e}const l=new Map,y=new Map,w=new Map,E=new Set;function k(){!S&&!E.size&&l.clear()}const T=new WeakMap;function K(t){const e=new TextDecoder().decode(t.subarray(0,256));return/^\s*(?:\uFEFF)?\s*<(?:!doctype\s+html|html|head|body)(?:\s|>)/i.test(e)}function R(t){if(t.byteLength===0)throw new Error("字体文件为空");if(K(t))throw new Error("字体 URL 返回 HTML 页面(可能是 SPA 路由回退),不是字体文件")}function Q(t){const e=T.get(t);if(e)return e;const n=(async()=>{const a=String.fromCharCode(...t.subarray(0,4));if(!["\0\0\0","true","OTTO","wOFF","wOF2","ttcf"].includes(a))throw new Error("文件内容不是支持的 TTF/OTF/WOFF 字体(可能返回了 JSON 或文本)");const{default:r}=await Promise.resolve().then(()=>require("./pdf-B8JouyYv.cjs")).then(i=>i.fontkit_es),o=r.create(t);if(!Number.isFinite(o.unitsPerEm)||o.unitsPerEm<=0||!o.characterSet?.length||!o.numGlyphs)throw new Error("字体结构无效或不含可嵌入的单字体;请提供有效的 TTF/OTF/WOFF 文件")})();return T.set(t,n),n}function A(t,e,n=!1){const a=n?"字体加载超时,请检查网络或字体服务":e instanceof Error?e.message:String(e);return Object.assign(new Error(`PDF 字体 ${JSON.stringify(t)} 加载失败:${a}`),{cause:e})}function P(t,e){if(t>e)throw new Error(`字体文件超过单字体下载预算(${e}字节)`)}async function X(t,e,n){const a=Number(t.headers?.get("content-length"));try{Number.isFinite(a)&&P(a,e)}catch(r){throw t.body?.cancel(r).catch(()=>{}),r}if(!t.body){const r=new Uint8Array(await F(t.arrayBuffer(),n));return P(r.byteLength,e),r}return U(t.body,e,n)}async function U(t,e,n){const a=t.getReader(),r=[];let o=0;try{for(;;){const s=await F(a.read(),n);if(s.done)break;o+=s.value.byteLength,P(o,e),r.push(s.value)}const i=new Uint8Array(o);let c=0;for(const s of r)i.set(s,c),c+=s.byteLength;return i}catch(i){throw a.cancel(i).catch(()=>{}),i}finally{a.releaseLock()}}async function Y(t,e,n){if(t[0]!==31||t[1]!==139)return t;if(typeof DecompressionStream>"u")throw new Error("当前环境不支持 gzip 字体解压,请使用未压缩的字体 URL 或支持 DecompressionStream 的浏览器 / Node 环境");const r=new ReadableStream({start(o){o.enqueue(t),o.close()}}).pipeThrough(new DecompressionStream("gzip"));return U(r,e,n)}async function Z(t){const e=new AbortController;let n=!1;const a=setTimeout(()=>{n=!0,e.abort()},15e3);try{const r=await fetch(t,{signal:e.signal});if(!r.ok)throw new Error(`字体请求返回 HTTP ${r.status}`);if(/text\/html|application\/xhtml\+xml/i.test(r.headers?.get("content-type")??""))throw new Error("字体 URL 返回 HTML 页面(可能是 SPA 路由回退),不是字体文件");const o=p().maxFontBytes,i=await X(r,o,e.signal),c=await Y(i,o,e.signal);return R(c),{bytes:c,fromCache:!1}}catch(r){throw e.abort(),A(t,r,n)}finally{clearTimeout(a)}}async function tt(t){await v,await g.get(t);const e=await G(t);if(e)try{return R(e),{bytes:e,fromCache:!0}}catch{}return Z(t)}function et(t){const e=w.get(t);if(e)return e;const n=tt(t);w.set(t,n),E.add(n);const a=()=>{w.get(t)===n&&w.delete(t),E.delete(n),k()};return n.then(a,a),n}async function nt(t,e,n,a){if((l.get(t)??0)!==n||L!==a)return;H(t,e);const r=y.get(t);if(r){await r;return}const o=_(t,e);y.set(t,o),await o,y.get(t)===o&&y.delete(t)}function m(t){return t.reason??new DOMException("字体加载已取消","AbortError")}function F(t,e){return e?e.aborted?Promise.reject(m(e)):new Promise((n,a)=>{const r=()=>{e.removeEventListener("abort",r),a(m(e))};e.addEventListener("abort",r,{once:!0}),t.then(o=>{e.removeEventListener("abort",r),n(o)},o=>{e.removeEventListener("abort",r),a(o)})}):t}async function rt(t,e,n,a,r){try{return await F(Q(e.bytes),n.signal),e.bytes}catch(o){if(n.signal?.aborted)throw m(n.signal);if((l.get(t)??0)!==a||L!==r)throw A(t,o);if(await N(t),e.fromCache)return await z(t,n);throw A(t,o)}}async function z(t,e={}){if(e.signal?.aborted)throw m(e.signal);const n=l.get(t)??0,a=L,r=j(t);if(r&&!e.strict)return r;const o=r?void 0:et(t);S++;try{const i=r?{bytes:r,fromCache:!0}:await F(o,e.signal),c=e.strict?await rt(t,i,e,n,a):i.bytes;if(e.signal?.aborted)throw m(e.signal);return r||await F(nt(t,c,n,a),e.signal),c}catch(i){if(e.signal?.aborted)throw m(e.signal);if(e.strict)throw i;return null}finally{S--,k()}}exports.clearFontCache=I;exports.configureFontCache=W;exports.getFontCacheStats=p;exports.invalidateFontCache=N;exports.loadFontWithCache=z;
|
|
@@ -139,7 +139,7 @@ function I(t) {
|
|
|
139
139
|
const a = String.fromCharCode(...t.subarray(0, 4));
|
|
140
140
|
if (!["\0\0\0", "true", "OTTO", "wOFF", "wOF2", "ttcf"].includes(a))
|
|
141
141
|
throw new Error("文件内容不是支持的 TTF/OTF/WOFF 字体(可能返回了 JSON 或文本)");
|
|
142
|
-
const { default: r } = await import("./pdf-
|
|
142
|
+
const { default: r } = await import("./pdf-l3ea86di.js").then((i) => i.f), o = r.create(t);
|
|
143
143
|
if (!Number.isFinite(o.unitsPerEm) || o.unitsPerEm <= 0 || !o.characterSet?.length || !o.numGlyphs)
|
|
144
144
|
throw new Error("字体结构无效或不含可嵌入的单字体;请提供有效的 TTF/OTF/WOFF 文件");
|
|
145
145
|
})();
|