@agile-team/mach-report 2.21.1 → 2.22.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 +16 -2
- package/dist/{ExcelBindingWizard-Bu0LUlzl.cjs → ExcelBindingWizard-CW79I6Gl.cjs} +1 -1
- package/dist/{ExcelBindingWizard-mnAO2qOX.js → ExcelBindingWizard-CZyppD7I.js} +3 -3
- package/dist/{ParamEditor-38ZfNrPU.cjs → ParamEditor-CiYCJI0b.cjs} +1 -1
- package/dist/{ParamEditor-C8l0EC8m.js → ParamEditor-DQit-Gdf.js} +2 -2
- package/dist/{ReportBatchPanel-CfUVhvkO.js → ReportBatchPanel-DKTpV7MU.js} +2 -2
- package/dist/{ReportBatchPanel-nCC06Nfp.cjs → ReportBatchPanel-Db6TAfG5.cjs} +1 -1
- package/dist/ReportLabelStudio-B0i9ohQj.cjs +1 -0
- package/dist/ReportLabelStudio-BYnRqmje.js +780 -0
- package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-BHSKVL8k.js} +231 -224
- package/dist/ReportParamPanel-lngONOEz.cjs +1 -0
- package/dist/ReportPreview-BDgKssYR.js +5887 -0
- package/dist/ReportPreview-Dw-4icG6.cjs +6 -0
- package/dist/{ReportTemplateLibrary-B5t_EcIs.js → ReportTemplateLibrary-BZuKn0YK.js} +1 -1
- package/dist/{ReportTemplateLibrary-DVlsf72p.cjs → ReportTemplateLibrary-DEXH07ND.cjs} +1 -1
- package/dist/{RuleEditor-kT1JsZ9f.js → RuleEditor-CIQn547x.js} +3 -3
- package/dist/{RuleEditor-xFkCVlii.cjs → RuleEditor-zSUmPjKa.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-CDI6mfWx.cjs → TemplateOutlinePanel-B5SfGYVN.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-BesgGR1P.js → TemplateOutlinePanel-D0PgOSQE.js} +2 -2
- package/dist/{TemplateReusePanel-BNFU6V-W.js → TemplateReusePanel-BKlAEF8-.js} +2 -2
- package/dist/{TemplateReusePanel-BG9Or5-P.cjs → TemplateReusePanel-DAy_Hwqz.cjs} +1 -1
- package/dist/TemplateReviewPanel-CowmHaQQ.cjs +1 -0
- package/dist/{TemplateReviewPanel-CwvwyCSs.js → TemplateReviewPanel-div-EH_m.js} +2 -2
- package/dist/artifact-integrity.json +76 -76
- package/dist/{auto-Tq7ReIC1.cjs → auto-DcUHlKob.cjs} +1 -1
- package/dist/{auto-BkdGiNtr.js → auto-moShblh1.js} +4 -4
- package/dist/{designer-HQi-03R6.js → designer-B7jJeAeG.js} +1500 -1455
- package/dist/{designer-DU3yDWgs.cjs → designer-BWQVpJeN.cjs} +2 -2
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +149 -2
- package/dist/designer.d.ts +149 -2
- package/dist/designer.js +13 -12
- package/dist/{encoding-BSeUwrN7.js → encoding-DbnhbwI8.js} +2 -2
- package/dist/{encoding-B79hW4zq.cjs → encoding-ncQAvyOv.cjs} +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +38 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +299 -279
- package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-DvQbZlD7.js} +2 -2
- package/dist/{json-snapshot-I5VI84Vp.cjs → json-snapshot-nyV63AbB.cjs} +1 -1
- package/dist/{plugin-BaRUGORD.cjs → plugin-AcAQ2m9X.cjs} +1 -1
- package/dist/{plugin-D4kAxfLG.js → plugin-w5Nyt08U.js} +1 -1
- package/dist/{prefill-CJSazcVY.js → prefill-BXBxx5We.js} +1 -1
- package/dist/{prefill-Bpyn58AZ.cjs → prefill-DUvejVt1.cjs} +1 -1
- package/dist/prepared-YXy-fVLw.cjs +1 -0
- package/dist/{prepared-BwjwEzFz.js → prepared-rXCKqdHY.js} +35 -34
- package/dist/{protocol-C8VWF9An.cjs → protocol-C9ZaylID.cjs} +1 -1
- package/dist/{protocol-Bs9-ohHN.js → protocol-fjaeKkjf.js} +3 -3
- package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-BiJQ7NU6.cjs} +1 -1
- package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-aA8nxmkZ.js} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{runtime-BDf5x1i1.js → runtime-BTtpjF3D.js} +4 -4
- package/dist/{runtime-DsJt1PIf.cjs → runtime-Dq0LUsyS.cjs} +1 -1
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +9 -0
- package/dist/server/node.d.ts +9 -0
- package/dist/server-node.cjs +5 -4
- package/dist/server-node.js +1838 -1760
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +81 -0
- package/dist/server.d.ts +81 -0
- package/dist/server.js +6 -6
- package/dist/style.css +1 -1
- package/dist/template-catalog-CLAM4w7H.cjs +1 -0
- package/dist/{template-catalog-DFwIS9aN.js → template-catalog-JSxSqk5y.js} +3 -3
- package/dist/template-fragments-Ca25Jt7e.cjs +1 -0
- package/dist/{template-fragments-Dng-AlHk.js → template-fragments-D2JFj7Du.js} +18 -18
- package/dist/{template-outline-DiADphlq.js → template-outline-CDWXptuj.js} +1 -1
- package/dist/template-outline-K4jGhATu.cjs +1 -0
- package/dist/template-registry-CWnuGqyP.cjs +1 -0
- package/dist/{template-registry-DhBqoD7W.js → template-registry-Do1Uav2Z.js} +333 -261
- package/dist/template-serialization-CU4n_Miu.js +307 -0
- package/dist/template-serialization-CgqBo6s-.cjs +1 -0
- package/dist/vue/async.d.cts +97 -2
- package/dist/vue/async.d.ts +97 -2
- package/dist/vue/index.d.cts +197 -4
- package/dist/vue/index.d.ts +197 -4
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +75 -70
- package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-BvEBRRMz.cjs} +1 -1
- package/dist/{workbook-session-oinxX3qo.js → workbook-session-f0wVlzst.js} +1 -1
- package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
- package/dist/workbook-sheets-D4M7XXBh.js +44 -0
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +9 -0
- package/dist/worker.d.ts +9 -0
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +39 -2
- package/dist/xlsx.d.ts +39 -2
- package/dist/xlsx.js +290 -270
- package/package.json +1 -1
- package/dist/ReportLabelStudio-CaEvYuSK.cjs +0 -1
- package/dist/ReportLabelStudio-DQPBmh4v.js +0 -765
- package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
- package/dist/ReportPreview-BBJNlu2U.js +0 -5740
- package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
- package/dist/TemplateReviewPanel-BmBrjt6P.cjs +0 -1
- package/dist/prepared-BiSz_9vN.cjs +0 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
- package/dist/template-bindings-TKnXM7ll.js +0 -62
- package/dist/template-catalog-D_2jdnkL.cjs +0 -1
- package/dist/template-fragments-DZVUBhuB.cjs +0 -1
- package/dist/template-outline-DWkzZXVC.cjs +0 -1
- package/dist/template-registry-DpLUSLwF.cjs +0 -1
- package/dist/template-serialization-Cc3h-miv.js +0 -247
- package/dist/template-serialization-D1R5oAqh.cjs +0 -1
package/dist/vue/index.d.ts
CHANGED
|
@@ -71,6 +71,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
71
71
|
type: PropType<ReportPreferencesOptions>;
|
|
72
72
|
default: undefined;
|
|
73
73
|
};
|
|
74
|
+
refresh: {
|
|
75
|
+
type: PropType<ReportRefreshOptions>;
|
|
76
|
+
default: undefined;
|
|
77
|
+
};
|
|
74
78
|
guardChanges: {
|
|
75
79
|
type: BooleanConstructor;
|
|
76
80
|
default: undefined;
|
|
@@ -253,6 +257,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
253
257
|
type: PropType<ReportPreferencesOptions>;
|
|
254
258
|
default: undefined;
|
|
255
259
|
};
|
|
260
|
+
refresh: {
|
|
261
|
+
type: PropType<ReportRefreshOptions>;
|
|
262
|
+
default: undefined;
|
|
263
|
+
};
|
|
256
264
|
guardChanges: {
|
|
257
265
|
type: BooleanConstructor;
|
|
258
266
|
default: undefined;
|
|
@@ -358,6 +366,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
|
|
|
358
366
|
toolbar: MachReportToolbarOptions;
|
|
359
367
|
interaction: ReportInteractionOptions;
|
|
360
368
|
preferences: ReportPreferencesOptions;
|
|
369
|
+
refresh: ReportRefreshOptions;
|
|
361
370
|
guardChanges: boolean;
|
|
362
371
|
beforeDiscard: ReportBeforeDiscard;
|
|
363
372
|
messages: Partial<MachReportMessages>;
|
|
@@ -468,8 +477,30 @@ declare type __VLS_Props_6 = {
|
|
|
468
477
|
state: ReportDataComparisonState;
|
|
469
478
|
messages: ReportDataReviewMessages;
|
|
470
479
|
};
|
|
480
|
+
declare type __VLS_Props_7 = {
|
|
481
|
+
messages: MachReportMessages;
|
|
482
|
+
formats?: readonly ReportExportFormat[];
|
|
483
|
+
busy?: boolean;
|
|
484
|
+
/** 宿主附加出口仍复用菜单的焦点、键盘与忙碌行为。 */
|
|
485
|
+
actions?: readonly {
|
|
486
|
+
id: string;
|
|
487
|
+
label: string;
|
|
488
|
+
description?: string;
|
|
489
|
+
disabled?: boolean;
|
|
490
|
+
}[];
|
|
491
|
+
};
|
|
492
|
+
declare type __VLS_Props_8 = {
|
|
493
|
+
task: Readonly<ReportPreviewTask> | null;
|
|
494
|
+
messages?: MachReportMessages;
|
|
495
|
+
};
|
|
471
496
|
declare function __VLS_template(): {
|
|
472
497
|
slots: {
|
|
498
|
+
export?(_: {
|
|
499
|
+
busy: boolean;
|
|
500
|
+
exportReport: (format: string) => Promise<void>;
|
|
501
|
+
formats: ReportExportFormat[];
|
|
502
|
+
messages: MachReportMessages;
|
|
503
|
+
}): any;
|
|
473
504
|
settings?(_: {}): any;
|
|
474
505
|
default?(_: {}): any;
|
|
475
506
|
};
|
|
@@ -479,6 +510,11 @@ declare function __VLS_template_2(): {
|
|
|
479
510
|
slots: {
|
|
480
511
|
navigation?(_: {}): any;
|
|
481
512
|
'data-tools'?(_: {}): any;
|
|
513
|
+
export?(_: {
|
|
514
|
+
messages: MachReportMessages;
|
|
515
|
+
formats: readonly ReportExportFormat[];
|
|
516
|
+
busy: boolean | undefined;
|
|
517
|
+
}): any;
|
|
482
518
|
};
|
|
483
519
|
refs: {
|
|
484
520
|
searchToggleRef: HTMLButtonElement;
|
|
@@ -921,7 +957,7 @@ export declare function createProviderEditing(provider: ReportProvider, options:
|
|
|
921
957
|
export declare function createReportStoragePreferences(storage: Pick<Storage, "getItem" | "setItem" | "removeItem">): ReportPreferencesAdapter;
|
|
922
958
|
declare type Current<T> = T | (() => T);
|
|
923
959
|
declare interface DatasetContract {
|
|
924
|
-
fields: readonly
|
|
960
|
+
fields: readonly ReportFieldContract_2[];
|
|
925
961
|
rowKey?: string;
|
|
926
962
|
}
|
|
927
963
|
declare type DatasetRows = Record<string, Record<string, unknown>[]>;
|
|
@@ -1638,6 +1674,7 @@ export declare interface MachReportDefaults {
|
|
|
1638
1674
|
toolbar?: MachReportToolbarOptions;
|
|
1639
1675
|
interaction?: ReportInteractionOptions;
|
|
1640
1676
|
preferences?: ReportPreferencesOptions;
|
|
1677
|
+
refresh?: ReportRefreshOptions;
|
|
1641
1678
|
/** Protect local input and drafts before replacing a report. Default true. */
|
|
1642
1679
|
guardChanges?: boolean;
|
|
1643
1680
|
beforeDiscard?: ReportBeforeDiscard;
|
|
@@ -1717,6 +1754,7 @@ export declare type MachReportLogger = Pick<Console, "warn" | "info">;
|
|
|
1717
1754
|
*/
|
|
1718
1755
|
/** 工具栏与状态文案(默认简体中文;出海场景覆写) */
|
|
1719
1756
|
export declare interface MachReportMessages extends Partial<ReportCalculationMessages>, Partial<ReportDataReviewMessages>, ReportPrintMessages, ReportParamOptionsMessages {
|
|
1757
|
+
previousSnapshot?: string;
|
|
1720
1758
|
reviewTools?: string;
|
|
1721
1759
|
validationTitle?: string;
|
|
1722
1760
|
validationError?: string;
|
|
@@ -1938,6 +1976,8 @@ export declare interface MachReportPreviewOptions {
|
|
|
1938
1976
|
/** 只读快照,由组件的同一套状态驱动;无需通过事件另建状态。 */
|
|
1939
1977
|
export declare interface MachReportState {
|
|
1940
1978
|
readonly loading: boolean;
|
|
1979
|
+
/** A retained previous snapshot is readable while writes/output remain blocked. */
|
|
1980
|
+
readonly stale?: boolean;
|
|
1941
1981
|
readonly hasPlan: boolean;
|
|
1942
1982
|
readonly pageCount: number;
|
|
1943
1983
|
readonly currentPage: number;
|
|
@@ -1984,6 +2024,8 @@ export declare interface MachReportTheme {
|
|
|
1984
2024
|
btnActiveBg: string;
|
|
1985
2025
|
}
|
|
1986
2026
|
export declare interface MachReportToolbarOptions {
|
|
2027
|
+
/** Reasons explain host restrictions without granting capabilities. */
|
|
2028
|
+
unavailableReasons?: Partial<Record<ReportPreviewTool, string>>;
|
|
1987
2029
|
search?: boolean;
|
|
1988
2030
|
thumbnails?: boolean;
|
|
1989
2031
|
zoom?: boolean;
|
|
@@ -3071,6 +3113,13 @@ export declare interface ReportExportExecutionOptions {
|
|
|
3071
3113
|
}
|
|
3072
3114
|
/** 输出能力仍由宿主授权;工具偏好只决定当前预览实例的可见与启用状态。 */
|
|
3073
3115
|
export declare type ReportExportFormat = "html" | "pdf" | "xlsx" | "png" | "word";
|
|
3116
|
+
export declare const ReportExportMenu: DefineComponent<__VLS_Props_7, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
3117
|
+
export: (format: ReportExportFormat) => any;
|
|
3118
|
+
action: (id: string) => any;
|
|
3119
|
+
}, string, MachReportVuePublicProps, Readonly<__VLS_Props_7> & Readonly<{
|
|
3120
|
+
onExport?: ((format: ReportExportFormat) => any) | undefined;
|
|
3121
|
+
onAction?: ((id: string) => any) | undefined;
|
|
3122
|
+
}>, {}>;
|
|
3074
3123
|
export declare interface ReportExportThresholds {
|
|
3075
3124
|
cells?: number;
|
|
3076
3125
|
pages?: number;
|
|
@@ -3136,11 +3185,23 @@ declare interface ReportFetchInput extends ReportTaskMonitoring {
|
|
|
3136
3185
|
onQueryResult?: (reportId: string, result: ReportQueryResult, reportIndex?: number) => void;
|
|
3137
3186
|
}
|
|
3138
3187
|
declare type ReportFieldAggregation = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3188
|
+
declare type ReportFieldAggregation_2 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3189
|
+
declare type ReportFieldAggregation_3 = "sum" | "avg" | "min" | "max" | "count" | "none";
|
|
3139
3190
|
declare interface ReportFieldCalculation {
|
|
3140
3191
|
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
3141
3192
|
description: string;
|
|
3142
3193
|
dependsOn: readonly string[];
|
|
3143
3194
|
}
|
|
3195
|
+
declare interface ReportFieldCalculation_2 {
|
|
3196
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
3197
|
+
description: string;
|
|
3198
|
+
dependsOn: readonly string[];
|
|
3199
|
+
}
|
|
3200
|
+
declare interface ReportFieldCalculation_3 {
|
|
3201
|
+
/** Business-owned explanation, never executable JavaScript or an inferred business formula. */
|
|
3202
|
+
description: string;
|
|
3203
|
+
dependsOn: readonly string[];
|
|
3204
|
+
}
|
|
3144
3205
|
declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
3145
3206
|
field: string;
|
|
3146
3207
|
label?: string;
|
|
@@ -3155,6 +3216,34 @@ declare interface ReportFieldContract extends ReportFieldSemantics {
|
|
|
3155
3216
|
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
3156
3217
|
unit?: string;
|
|
3157
3218
|
}
|
|
3219
|
+
declare interface ReportFieldContract_2 extends ReportFieldSemantics_2 {
|
|
3220
|
+
field: string;
|
|
3221
|
+
label?: string;
|
|
3222
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
3223
|
+
required?: boolean;
|
|
3224
|
+
nullable?: boolean;
|
|
3225
|
+
enum?: readonly (string | number | boolean)[];
|
|
3226
|
+
min?: number;
|
|
3227
|
+
max?: number;
|
|
3228
|
+
minLength?: number;
|
|
3229
|
+
maxLength?: number;
|
|
3230
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
3231
|
+
unit?: string;
|
|
3232
|
+
}
|
|
3233
|
+
declare interface ReportFieldContract_3 extends ReportFieldSemantics_3 {
|
|
3234
|
+
field: string;
|
|
3235
|
+
label?: string;
|
|
3236
|
+
type: "text" | "number" | "boolean" | "date" | "decimal";
|
|
3237
|
+
required?: boolean;
|
|
3238
|
+
nullable?: boolean;
|
|
3239
|
+
enum?: readonly (string | number | boolean)[];
|
|
3240
|
+
min?: number;
|
|
3241
|
+
max?: number;
|
|
3242
|
+
minLength?: number;
|
|
3243
|
+
maxLength?: number;
|
|
3244
|
+
semanticRole?: "identifier" | "dimension" | "measure" | "date" | "text";
|
|
3245
|
+
unit?: string;
|
|
3246
|
+
}
|
|
3158
3247
|
declare interface ReportFieldSemantics {
|
|
3159
3248
|
description?: string;
|
|
3160
3249
|
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
@@ -3162,9 +3251,29 @@ declare interface ReportFieldSemantics {
|
|
|
3162
3251
|
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
3163
3252
|
aggregation?: ReportFieldAggregation;
|
|
3164
3253
|
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
3165
|
-
format?:
|
|
3254
|
+
format?: ColumnFormat_2;
|
|
3166
3255
|
calculation?: ReportFieldCalculation;
|
|
3167
3256
|
}
|
|
3257
|
+
declare interface ReportFieldSemantics_2 {
|
|
3258
|
+
description?: string;
|
|
3259
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
3260
|
+
missingMeaning?: string;
|
|
3261
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
3262
|
+
aggregation?: ReportFieldAggregation_2;
|
|
3263
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
3264
|
+
format?: ColumnFormat;
|
|
3265
|
+
calculation?: ReportFieldCalculation_2;
|
|
3266
|
+
}
|
|
3267
|
+
declare interface ReportFieldSemantics_3 {
|
|
3268
|
+
description?: string;
|
|
3269
|
+
/** Explicit meaning of null/missing; does not convert blanks into zero. */
|
|
3270
|
+
missingMeaning?: string;
|
|
3271
|
+
/** Recommended aggregation; none marks non-additive measures such as ratios. No aggregation runs implicitly. */
|
|
3272
|
+
aggregation?: ReportFieldAggregation_3;
|
|
3273
|
+
/** Shared presentation only; raw values and calculation precision remain unchanged. */
|
|
3274
|
+
format?: ColumnFormat_3;
|
|
3275
|
+
calculation?: ReportFieldCalculation_3;
|
|
3276
|
+
}
|
|
3168
3277
|
export declare interface ReportFieldTarget {
|
|
3169
3278
|
field: string;
|
|
3170
3279
|
datasetId?: string;
|
|
@@ -3422,8 +3531,8 @@ declare type ReportPredicateScalar = string | number | boolean | null;
|
|
|
3422
3531
|
declare type ReportPredicateScalar_2 = string | number | boolean | null;
|
|
3423
3532
|
declare type ReportPredicateScalar_3 = string | number | boolean | null;
|
|
3424
3533
|
export declare interface ReportPreferencesAdapter {
|
|
3425
|
-
load(key: string):
|
|
3426
|
-
save(key: string, value: Readonly<
|
|
3534
|
+
load(key: string): ReportStoredPreferences | null | Promise<ReportStoredPreferences | null>;
|
|
3535
|
+
save(key: string, value: Readonly<ReportStoredPreferences>): void | Promise<void>;
|
|
3427
3536
|
remove?(key: string): void | Promise<void>;
|
|
3428
3537
|
}
|
|
3429
3538
|
export declare interface ReportPreferencesOptions {
|
|
@@ -3553,6 +3662,17 @@ declare interface ReportQueryResult {
|
|
|
3553
3662
|
sourceToken?: string;
|
|
3554
3663
|
diagnostics?: ReportDiagnostic[];
|
|
3555
3664
|
}
|
|
3665
|
+
/** Explicit refresh policy. The key identifies template/layout revisions outside query parameters. */
|
|
3666
|
+
export declare interface ReportRefreshOptions {
|
|
3667
|
+
retainPrevious?: boolean;
|
|
3668
|
+
key?: string;
|
|
3669
|
+
/** Host API request preceding the preview reload. Blocks edits and output without discarding drafts. */
|
|
3670
|
+
pending?: boolean;
|
|
3671
|
+
/** The host retained an earlier snapshot after its own query failed or was cancelled. */
|
|
3672
|
+
stale?: boolean;
|
|
3673
|
+
/** Retry the host HTTP query when it owns the stale snapshot. The host updates its own state. */
|
|
3674
|
+
retry?(): void | Promise<void>;
|
|
3675
|
+
}
|
|
3556
3676
|
declare type ReportRegistry = Record<string, ReportDefinition>;
|
|
3557
3677
|
declare interface ReportRuntimeBudget {
|
|
3558
3678
|
maxRows?: number;
|
|
@@ -3586,6 +3706,10 @@ export declare interface ReportSection {
|
|
|
3586
3706
|
label: string;
|
|
3587
3707
|
pageIndex: number;
|
|
3588
3708
|
}
|
|
3709
|
+
export declare interface ReportStoredPreferences extends Partial<ReportPreviewPreferences> {
|
|
3710
|
+
zoomMode?: "fit" | number;
|
|
3711
|
+
wideZoomMode?: "fit" | number;
|
|
3712
|
+
}
|
|
3589
3713
|
/** 阶段事件只包含可序列化值;不表示估算百分比,也不包含业务数据。 */
|
|
3590
3714
|
declare interface ReportTaskEvent {
|
|
3591
3715
|
taskId: string;
|
|
@@ -3602,8 +3726,17 @@ declare interface ReportTaskMonitoring {
|
|
|
3602
3726
|
onEvent?: ReportTaskObserver;
|
|
3603
3727
|
}
|
|
3604
3728
|
declare type ReportTaskObserver = (event: ReportTaskEvent) => void;
|
|
3729
|
+
export declare const ReportTaskStatus: DefineComponent<__VLS_Props_8, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
3730
|
+
cancel: () => any;
|
|
3731
|
+
}, string, MachReportVuePublicProps, Readonly<__VLS_Props_8> & Readonly<{
|
|
3732
|
+
onCancel?: (() => any) | undefined;
|
|
3733
|
+
}>, {
|
|
3734
|
+
messages: MachReportMessages;
|
|
3735
|
+
}>;
|
|
3605
3736
|
declare interface ReportTemplate {
|
|
3606
3737
|
schemaVersion?: string;
|
|
3738
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3739
|
+
dataContract?: ReportTemplateDataContract;
|
|
3607
3740
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3608
3741
|
params?: ReportParamDef_2[];
|
|
3609
3742
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
@@ -3612,6 +3745,8 @@ declare interface ReportTemplate {
|
|
|
3612
3745
|
}
|
|
3613
3746
|
declare interface ReportTemplate_2 {
|
|
3614
3747
|
schemaVersion?: string;
|
|
3748
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3749
|
+
dataContract?: ReportTemplateDataContract_2;
|
|
3615
3750
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3616
3751
|
params?: ReportParamDef[];
|
|
3617
3752
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
@@ -3620,12 +3755,35 @@ declare interface ReportTemplate_2 {
|
|
|
3620
3755
|
}
|
|
3621
3756
|
declare interface ReportTemplate_3 {
|
|
3622
3757
|
schemaVersion?: string;
|
|
3758
|
+
/** Optional source identity and stable field meanings for safe stored-template reuse. */
|
|
3759
|
+
dataContract?: ReportTemplateDataContract_3;
|
|
3623
3760
|
/** 参数定义(可选;宿主也可经 ReportPreview 的 paramDefs prop 提供,prop 优先) */
|
|
3624
3761
|
params?: ReportParamDef_3[];
|
|
3625
3762
|
/** Fixed label pages repeat in record → copy → template-page order. */
|
|
3626
3763
|
repeat?: ReportTemplateRepeat_3;
|
|
3627
3764
|
pages: TemplatePage_3[];
|
|
3628
3765
|
}
|
|
3766
|
+
declare interface ReportTemplateDataContract {
|
|
3767
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3768
|
+
source?: string;
|
|
3769
|
+
datasets: Readonly<Record<string, {
|
|
3770
|
+
fields: readonly ReportTemplateFieldBinding[];
|
|
3771
|
+
}>>;
|
|
3772
|
+
}
|
|
3773
|
+
declare interface ReportTemplateDataContract_2 {
|
|
3774
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3775
|
+
source?: string;
|
|
3776
|
+
datasets: Readonly<Record<string, {
|
|
3777
|
+
fields: readonly ReportTemplateFieldBinding_2[];
|
|
3778
|
+
}>>;
|
|
3779
|
+
}
|
|
3780
|
+
declare interface ReportTemplateDataContract_3 {
|
|
3781
|
+
/** Host-owned report/domain identity, without a query date or tenant credentials. */
|
|
3782
|
+
source?: string;
|
|
3783
|
+
datasets: Readonly<Record<string, {
|
|
3784
|
+
fields: readonly ReportTemplateFieldBinding_3[];
|
|
3785
|
+
}>>;
|
|
3786
|
+
}
|
|
3629
3787
|
/** 可存入数据库/文件的纯 JSON 模板;数据、接口与鉴权仍由宿主提供。 */
|
|
3630
3788
|
declare interface ReportTemplateDocument {
|
|
3631
3789
|
schemaVersion: "1.0";
|
|
@@ -3636,6 +3794,30 @@ declare interface ReportTemplateDocument {
|
|
|
3636
3794
|
description?: string;
|
|
3637
3795
|
template: ReportTemplate_2;
|
|
3638
3796
|
}
|
|
3797
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3798
|
+
declare interface ReportTemplateFieldBinding {
|
|
3799
|
+
field: string;
|
|
3800
|
+
label?: string;
|
|
3801
|
+
semanticKey?: string;
|
|
3802
|
+
type?: ReportFieldContract["type"];
|
|
3803
|
+
unit?: string;
|
|
3804
|
+
}
|
|
3805
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3806
|
+
declare interface ReportTemplateFieldBinding_2 {
|
|
3807
|
+
field: string;
|
|
3808
|
+
label?: string;
|
|
3809
|
+
semanticKey?: string;
|
|
3810
|
+
type?: ReportFieldContract_2["type"];
|
|
3811
|
+
unit?: string;
|
|
3812
|
+
}
|
|
3813
|
+
/** Stable business meaning is independent of a column's position and editable caption. */
|
|
3814
|
+
declare interface ReportTemplateFieldBinding_3 {
|
|
3815
|
+
field: string;
|
|
3816
|
+
label?: string;
|
|
3817
|
+
semanticKey?: string;
|
|
3818
|
+
type?: ReportFieldContract_3["type"];
|
|
3819
|
+
unit?: string;
|
|
3820
|
+
}
|
|
3639
3821
|
declare type ReportTemplateLoader = (context: ReportLoadContext) => ReportTemplate_2 | Promise<ReportTemplate_2>;
|
|
3640
3822
|
declare interface ReportTemplateProvider {
|
|
3641
3823
|
list(context: {
|
|
@@ -3728,6 +3910,7 @@ export declare type ResolvedConfig = Required<Pick<MachReportDefaults, "showExpo
|
|
|
3728
3910
|
toolbar: MachReportToolbarOptions;
|
|
3729
3911
|
interaction: ReportInteractionOptions;
|
|
3730
3912
|
preferences?: ReportPreferencesOptions;
|
|
3913
|
+
refresh?: ReportRefreshOptions;
|
|
3731
3914
|
assets?: AssetRenderOptions;
|
|
3732
3915
|
guardChanges: boolean;
|
|
3733
3916
|
beforeDiscard?: ReportBeforeDiscard;
|
|
@@ -4011,6 +4194,12 @@ declare type ValueFormat = ColumnFormat;
|
|
|
4011
4194
|
declare type ValueFormat_2 = ColumnFormat_2;
|
|
4012
4195
|
/** The same declarative formatting used by list columns, before any output backend. */
|
|
4013
4196
|
declare type ValueFormat_3 = ColumnFormat_3;
|
|
4197
|
+
/** 可序列化的附加工作表在编码前写入,浏览器与 Worker 共用同一声明。 */
|
|
4198
|
+
declare interface XlsxAdditionalSheet {
|
|
4199
|
+
name: string;
|
|
4200
|
+
rows: readonly (readonly (string | number | boolean | null)[])[];
|
|
4201
|
+
columnWidths?: readonly number[];
|
|
4202
|
+
}
|
|
4014
4203
|
declare type XlsxImageOptions = ImageMediaOptions_2;
|
|
4015
4204
|
/**
|
|
4016
4205
|
* RenderPlan → xlsx 导出(B 端第二出口,对齐家族 @agile-team/mach-table-xlsx 路线):
|
|
@@ -4023,6 +4212,8 @@ declare type XlsxImageOptions = ImageMediaOptions_2;
|
|
|
4023
4212
|
declare interface XlsxRenderOptions extends AssetRenderOptions_2, XlsxImageOptions {
|
|
4024
4213
|
/** 工作表命名(连续表默认使用标题,其余默认 "Sheet1" 起序)。 */
|
|
4025
4214
|
sheetName?: (sheetIndex: number) => string;
|
|
4215
|
+
/** 可序列化命名,用于 Worker;未提供的项沿用默认名称。 */
|
|
4216
|
+
sheetNames?: readonly string[];
|
|
4026
4217
|
/** auto 默认将 wide 逻辑表合并为连续 Sheet;pages 保留逐页;continuous 要求明确的表来源。 */
|
|
4027
4218
|
sheetMode?: "auto" | "pages" | "continuous";
|
|
4028
4219
|
/** 宽表或连续表默认 raw,其余默认 text;显式配置可覆盖默认值。 */
|
|
@@ -4031,6 +4222,8 @@ declare interface XlsxRenderOptions extends AssetRenderOptions_2, XlsxImageOptio
|
|
|
4031
4222
|
maxDataBars?: number;
|
|
4032
4223
|
/** 连续表默认不限制打印纸型;显式 A3/A4/A5 仅设置打印适配,不改变 Excel 列宽。 */
|
|
4033
4224
|
paperSize?: "auto" | "a3" | "a4" | "a5";
|
|
4225
|
+
/** 在最终编码前追加说明、审计等标量工作表,可直接交给 Worker。 */
|
|
4226
|
+
additionalSheets?: readonly XlsxAdditionalSheet[];
|
|
4034
4227
|
}
|
|
4035
4228
|
export {};
|
|
4036
4229
|
|
package/dist/vue-async.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./plugin-AcAQ2m9X.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-Dw-4icG6.cjs")).then(e=>e.ReportPreview$1)}const t={install(e,o={}){r.machReportPlugin.install(e,o)}};exports.MachReportPreview=r.MachReportPreview;exports.default=t;exports.machReportAsyncPlugin=t;exports.preloadMachReport=i;
|
package/dist/vue-async.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as o } from "./plugin-
|
|
2
|
-
import { M as l } from "./plugin-
|
|
1
|
+
import { m as o } from "./plugin-w5Nyt08U.js";
|
|
2
|
+
import { M as l } from "./plugin-w5Nyt08U.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-BDgKssYR.js").then((t) => t.x);
|
|
5
5
|
}
|
|
6
6
|
const n = {
|
|
7
7
|
install(t, r = {}) {
|
package/dist/vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),n=require("./ReportPreview-Dw-4icG6.cjs"),i=require("./ReportParamPanel-lngONOEz.cjs"),p=require("./injection-keys-Db_DyLkm.cjs"),O=require("./plugin-AcAQ2m9X.cjs"),T=require("vue"),C=require("./json-snapshot-nyV63AbB.cjs"),y=require("./progress-B0ctFpKf.cjs");function v(r){const e=E.createReportSource(r),a=async t=>{if(t.reportIds.length===0)throw new n.PlanLoadError("缺少报表 ID");for(const o of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,o)||!r[o])throw new n.PlanLoadError(`本地模板 ${o} 不存在`);return e(t)};return a.getParamDefs=e.getParamDefs,a}const I=Object.freeze({loading:!1,hasPlan:!1,pageCount:0,currentPage:1,exporting:null,printing:!1,canExport:!1,canPrint:!1,error:null,pdfFont:Object.freeze({status:"unchecked",fontUrl:""})});function D(){const r=T.shallowRef(null),e=()=>r.value?.state??I,a=Object.freeze({get loading(){return e().loading},get stale(){return e().stale??!1},get hasPlan(){return e().hasPlan},get pageCount(){return e().pageCount},get currentPage(){return e().currentPage},get exporting(){return e().exporting},get printing(){return e().printing},get canExport(){return e().canExport},get canPrint(){return e().canPrint},get error(){return e().error},get pdfFont(){return e().pdfFont},get editing(){return e().editing??!1},get saving(){return e().saving??!1},get importing(){return e().importing??!1},get dirty(){return e().dirty??!1},get pendingLocalChanges(){return e().pendingLocalChanges??!1},get task(){return e().task??null},get diagnostics(){return e().diagnostics??[]},get reportIds(){return e().reportIds??[]},get params(){return e().params??{}},get canUndo(){return e().canUndo??!1},get canRedo(){return e().canRedo??!1},get changeCount(){return e().changeCount??0},get selection(){return e().selection??null}});function t(){if(!r.value)throw new i.MachReportError("config","报表预览尚未挂载,请在 ready 后调用控制器");return r.value}return{ref(o){const s=o;r.value=s&&typeof s.reload=="function"&&typeof s.print=="function"&&typeof s.exportAs=="function"&&typeof s.openPdfWindow=="function"&&typeof s.gotoPage=="function"&&typeof s.setParams=="function"?s:null},ready:T.computed(()=>r.value!==null),state:a,async checkPdfFont(){const o=t();return o.checkPdfFont?o.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){t().cancelTask?.()},async confirmDiscard(o){return await t().confirmDiscard?.(o)??!0},getOutputDiagnostics(o){return t().getOutputDiagnostics?.(o)??[]},async reload(){await t().reload()},async print(){await t().print()},async exportAs(o){await t().exportAs(o)},openPdfWindow(){t().openPdfWindow()},gotoPage(o){t().gotoPage(o)},async setParams(o,s){await t().setParams(o,s)},async importExcel(o,s){const f=t();if(!f.importExcel)throw new i.MachReportError("config","旧自定义控制器未提供 Excel 导入");return f.importExcel(o,s)},getPlan(){return t().getPlan?.()??null},getChanges(){return t().getChanges?.()??[]},getDifferences:()=>t().getDifferences?.()??[],undo:async()=>await t().undo?.()??!1,redo:async()=>await t().redo?.()??!1,restoreChanges:async()=>await t().restoreChanges?.()??!1,getSelection:()=>t().getSelection?.()??null,focusCell:async(o,s)=>await t().focusCell?.(o,s)??!1,focusField:async o=>await t().focusField?.(o)??!1,copySelection:()=>t().copySelection?.()??"",pasteSelection:async o=>await t().pasteSelection?.(o)??!1}}function L(){return T.inject(p.MACH_REPORT_CONTROLLER_KEY,null)}function h(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function x(r){return Array.isArray(r)&&r.every(e=>h(e)&&typeof e.code=="string"&&typeof e.message=="string"&&["info","warning","error"].includes(e.severity)&&(e.path===void 0||typeof e.path=="string")&&C.hasValidDataExplanation(e))}function F(r,e){return Array.isArray(r)&&r.every(a=>h(a)&&Number.isSafeInteger(a.editIndex)&&a.editIndex>=0&&a.editIndex<e&&typeof a.code=="string"&&typeof a.message=="string")}function b(r,e){let a;if(!h(r)||typeof r.revision!="string"||!r.revision.trim()?a="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?a="字符串 sourceToken":r.diagnostics!==void 0&&!x(r.diagnostics)?a="结构化 diagnostics":r.conflicts!==void 0&&!F(r.conflicts,e)&&(a="有效 editIndex/code/message conflicts"),a)throw new i.MachReportError("edit",`ReportProvider.save 必须返回${a};服务器可能已提交,请重新查询确认后再编辑`)}function m(r){return typeof r=="function"?r():r}function q(r,e){const a=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return a.size===1?[...a][0]:void 0}function A(r,e,a,t){return typeof r=="function"?r():q(e,a)??t??r}function k(r){return r.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function U(r,e){if(!r.save)throw new i.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let a="",t,o,s=0;function f(c,u,g){c.conflicts?.length||u!==a||g!==s||(t=c.revision,o=c.sourceToken)}async function S(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const g=m(e.reportId),_={...m(e.params??{})},R=JSON.stringify([g,_]),M=++s;if(R!==a&&(a=R,t=void 0,o=void 0),e.requireSource!==!1&&c.edits.some(l=>!l.source))throw new E.ReportCellEditError("missing");const d=await r.save({reportId:g,params:_,signal:u.signal,requestId:c.requestId,action:u.action,edits:n.cloneReportSnapshot(c.edits),expectedRevision:A(e.expectedRevision,c.edits,"revision",t),sourceToken:A(e.sourceToken,c.edits,"sourceToken",o)});if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");b(d,c.edits.length),d.diagnostics?.forEach(l=>y.observeOutput(()=>e.onDiagnostic?.(l)));const P=d.diagnostics?.filter(l=>l.severity==="error");if(P?.length)throw new i.MachReportError("edit",P.map(l=>l.message).join(";"),{diagnostics:P});const w=d.conflicts?.map(l=>({source:c.edits[l.editIndex]?.source,address:c.edits[l.editIndex]?.address,message:l.message}));return f(d,R,M),{revision:d.revision,sourceToken:d.sourceToken,conflicts:w}}return{requireSource:e.requireSource??!0,canEdit:e.canEdit,validate:e.validate,saveBatch:S,save:(c,u)=>S({requestId:k(u),edits:[n.cloneReportSnapshot(c)]},u)}}exports.PlanLoadError=n.PlanLoadError;exports.REPORT_EXPORT_FORMATS=n.REPORT_EXPORT_FORMATS;exports.REPORT_PREVIEW_TOOLS=n.REPORT_PREVIEW_TOOLS;exports.ReportDataComparisonPanel=n._sfc_main;exports.ReportExportMenu=n.ReportExportMenu;exports.ReportPagination=n.ReportPagination;exports.ReportPrefillPanel=n._sfc_main$1;exports.ReportPreview=n.ReportPreview;exports.ReportPrintResourceError=n.ReportPrintResourceError;exports.ReportTaskStatus=n.ReportTaskStatus;exports.ReportToolbar=n.ReportToolbar;exports.ReportValidationPanel=n.ReportValidationPanel;exports.buildPrintDocument=n.buildPrintDocument;exports.buildWordHtml=n.buildWordHtml;exports.createDefaultPdfExporter=n.createDefaultPdfExporter;exports.createFetchRequest=n.createFetchRequest;exports.createPrintCalibrationPlan=n.createPrintCalibrationPlan;exports.createReportStoragePreferences=n.createReportStoragePreferences;exports.joinReportIds=n.joinReportIds;exports.normalizeReportIds=n.normalizeReportIds;exports.preparePrintResources=n.preparePrintResources;exports.printPlans=n.printPlans;exports.usePageWindow=n.usePageWindow;exports.usePrintExport=n.usePrintExport;exports.useZoom=n.useZoom;exports.DEFAULT_CALCULATION_MESSAGES=i.DEFAULT_CALCULATION_MESSAGES;exports.DEFAULT_DATA_REVIEW_MESSAGES=i.DEFAULT_DATA_REVIEW_MESSAGES;exports.DEFAULT_MESSAGES=i.DEFAULT_MESSAGES;exports.DEFAULT_PRINT_MESSAGES=i.DEFAULT_PRINT_MESSAGES;exports.DEFAULT_THEME=i.DEFAULT_THEME;exports.MachReportError=i.MachReportError;exports.PARAM_OPTIONS_MESSAGES=i.PARAM_OPTIONS_MESSAGES;exports.ReportParamPanel=i.ReportParamPanel;exports.SILENT_LOGGER=i.SILENT_LOGGER;exports.defineMachReportConfig=i.defineMachReportConfig;exports.defineMachReportPreset=i.defineMachReportPreset;exports.normalizeReportLoadError=i.normalizeReportLoadError;exports.printCalibration=i.printCalibration;exports.provideMachReportConfig=i.provideMachReportConfig;exports.resolveCalculationMessages=i.resolveCalculationMessages;exports.resolveConfig=i.resolveConfig;exports.resolveDataReviewMessages=i.resolveDataReviewMessages;exports.snapshotPrintOptions=i.snapshotPrintOptions;exports.themeToCssVars=i.themeToCssVars;exports.toErrorDetail=i.toErrorDetail;exports.useMachReportConfig=i.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=p.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=p.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=p.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=p.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=O.MachReportPreview;exports.machReportPlugin=O.machReportPlugin;exports.createLocalFetcher=v;exports.createProviderEditing=U;exports.useMachReport=D;exports.useReportPreview=L;Object.keys(E).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>E[r]})});
|