@agile-team/mach-report 2.21.0 → 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.
Files changed (110) hide show
  1. package/README.md +16 -2
  2. package/dist/{ExcelBindingWizard-B2xXBOJu.cjs → ExcelBindingWizard-CW79I6Gl.cjs} +1 -1
  3. package/dist/{ExcelBindingWizard-CixTPQAL.js → ExcelBindingWizard-CZyppD7I.js} +3 -3
  4. package/dist/{ParamEditor-DhHlNxai.cjs → ParamEditor-CiYCJI0b.cjs} +1 -1
  5. package/dist/{ParamEditor-gKhvEsnr.js → ParamEditor-DQit-Gdf.js} +2 -2
  6. package/dist/{ReportBatchPanel-D-lyWKyf.js → ReportBatchPanel-DKTpV7MU.js} +2 -2
  7. package/dist/{ReportBatchPanel-BUdUfTdm.cjs → ReportBatchPanel-Db6TAfG5.cjs} +1 -1
  8. package/dist/ReportLabelStudio-B0i9ohQj.cjs +1 -0
  9. package/dist/ReportLabelStudio-BYnRqmje.js +780 -0
  10. package/dist/{ReportParamPanel-peB-KEmm.js → ReportParamPanel-BHSKVL8k.js} +231 -224
  11. package/dist/ReportParamPanel-lngONOEz.cjs +1 -0
  12. package/dist/ReportPreview-BDgKssYR.js +5887 -0
  13. package/dist/ReportPreview-Dw-4icG6.cjs +6 -0
  14. package/dist/{ReportTemplateLibrary-WZl-AK-2.js → ReportTemplateLibrary-BZuKn0YK.js} +1 -1
  15. package/dist/{ReportTemplateLibrary-Cs9WKneQ.cjs → ReportTemplateLibrary-DEXH07ND.cjs} +1 -1
  16. package/dist/{RuleEditor-DGpmjCko.js → RuleEditor-CIQn547x.js} +3 -3
  17. package/dist/{RuleEditor-Dtcq-7LO.cjs → RuleEditor-zSUmPjKa.cjs} +1 -1
  18. package/dist/{TemplateOutlinePanel-CkCh506f.cjs → TemplateOutlinePanel-B5SfGYVN.cjs} +1 -1
  19. package/dist/{TemplateOutlinePanel-cxp95OT9.js → TemplateOutlinePanel-D0PgOSQE.js} +2 -2
  20. package/dist/{TemplateReusePanel-BZ8VTtrO.js → TemplateReusePanel-BKlAEF8-.js} +2 -2
  21. package/dist/{TemplateReusePanel-CwttuSta.cjs → TemplateReusePanel-DAy_Hwqz.cjs} +1 -1
  22. package/dist/TemplateReviewPanel-CowmHaQQ.cjs +1 -0
  23. package/dist/{TemplateReviewPanel-C9cTvsRs.js → TemplateReviewPanel-div-EH_m.js} +2 -2
  24. package/dist/artifact-integrity.json +76 -76
  25. package/dist/{auto-Tq7ReIC1.cjs → auto-DcUHlKob.cjs} +1 -1
  26. package/dist/{auto-BkdGiNtr.js → auto-moShblh1.js} +4 -4
  27. package/dist/{designer-CIDHt5xz.js → designer-B7jJeAeG.js} +1500 -1455
  28. package/dist/{designer-CDqok4S5.cjs → designer-BWQVpJeN.cjs} +2 -2
  29. package/dist/designer.cjs +1 -1
  30. package/dist/designer.d.cts +149 -2
  31. package/dist/designer.d.ts +149 -2
  32. package/dist/designer.js +13 -12
  33. package/dist/{encoding-BSeUwrN7.js → encoding-DbnhbwI8.js} +2 -2
  34. package/dist/{encoding-B79hW4zq.cjs → encoding-ncQAvyOv.cjs} +1 -1
  35. package/dist/index.cjs +5 -5
  36. package/dist/index.d.cts +38 -0
  37. package/dist/index.d.ts +38 -0
  38. package/dist/index.js +299 -279
  39. package/dist/{json-snapshot-Kgn459Oj.js → json-snapshot-DvQbZlD7.js} +2 -2
  40. package/dist/{json-snapshot-I5VI84Vp.cjs → json-snapshot-nyV63AbB.cjs} +1 -1
  41. package/dist/{plugin-BaRUGORD.cjs → plugin-AcAQ2m9X.cjs} +1 -1
  42. package/dist/{plugin-D4kAxfLG.js → plugin-w5Nyt08U.js} +1 -1
  43. package/dist/{prefill-CJSazcVY.js → prefill-BXBxx5We.js} +1 -1
  44. package/dist/{prefill-Bpyn58AZ.cjs → prefill-DUvejVt1.cjs} +1 -1
  45. package/dist/prepared-YXy-fVLw.cjs +1 -0
  46. package/dist/{prepared-BwjwEzFz.js → prepared-rXCKqdHY.js} +35 -34
  47. package/dist/{protocol-C8VWF9An.cjs → protocol-C9ZaylID.cjs} +1 -1
  48. package/dist/{protocol-Bs9-ohHN.js → protocol-fjaeKkjf.js} +3 -3
  49. package/dist/{region-binding-workflow-JNowHd0A.cjs → region-binding-workflow-BiJQ7NU6.cjs} +1 -1
  50. package/dist/{region-binding-workflow-Cy4GIOUo.js → region-binding-workflow-aA8nxmkZ.js} +1 -1
  51. package/dist/report-encoding-worker.cjs +1 -1
  52. package/dist/report-encoding-worker.js +1 -1
  53. package/dist/{runtime-BDf5x1i1.js → runtime-BTtpjF3D.js} +4 -4
  54. package/dist/{runtime-DsJt1PIf.cjs → runtime-Dq0LUsyS.cjs} +1 -1
  55. package/dist/sbom.cdx.json +1 -1
  56. package/dist/server/node.d.cts +9 -0
  57. package/dist/server/node.d.ts +9 -0
  58. package/dist/server-node.cjs +5 -4
  59. package/dist/server-node.js +1838 -1760
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.d.cts +81 -0
  62. package/dist/server.d.ts +81 -0
  63. package/dist/server.js +6 -6
  64. package/dist/style.css +1 -1
  65. package/dist/template-catalog-CLAM4w7H.cjs +1 -0
  66. package/dist/{template-catalog-DFwIS9aN.js → template-catalog-JSxSqk5y.js} +3 -3
  67. package/dist/template-fragments-Ca25Jt7e.cjs +1 -0
  68. package/dist/{template-fragments-Dng-AlHk.js → template-fragments-D2JFj7Du.js} +18 -18
  69. package/dist/{template-outline-DiADphlq.js → template-outline-CDWXptuj.js} +1 -1
  70. package/dist/template-outline-K4jGhATu.cjs +1 -0
  71. package/dist/template-registry-CWnuGqyP.cjs +1 -0
  72. package/dist/{template-registry-DhBqoD7W.js → template-registry-Do1Uav2Z.js} +333 -261
  73. package/dist/template-serialization-CU4n_Miu.js +307 -0
  74. package/dist/template-serialization-CgqBo6s-.cjs +1 -0
  75. package/dist/vue/async.d.cts +97 -2
  76. package/dist/vue/async.d.ts +97 -2
  77. package/dist/vue/index.d.cts +197 -4
  78. package/dist/vue/index.d.ts +197 -4
  79. package/dist/vue-async.cjs +1 -1
  80. package/dist/vue-async.js +3 -3
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.js +75 -70
  83. package/dist/{workbook-session-NYv01LHe.cjs → workbook-session-BvEBRRMz.cjs} +1 -1
  84. package/dist/{workbook-session-oinxX3qo.js → workbook-session-f0wVlzst.js} +1 -1
  85. package/dist/workbook-sheets-CaPAulQ6.cjs +2 -0
  86. package/dist/workbook-sheets-D4M7XXBh.js +44 -0
  87. package/dist/worker.cjs +1 -1
  88. package/dist/worker.d.cts +9 -0
  89. package/dist/worker.d.ts +9 -0
  90. package/dist/worker.js +4 -4
  91. package/dist/xlsx.cjs +4 -4
  92. package/dist/xlsx.d.cts +39 -2
  93. package/dist/xlsx.d.ts +39 -2
  94. package/dist/xlsx.js +290 -270
  95. package/package.json +1 -1
  96. package/dist/ReportLabelStudio-BcjQt73a.cjs +0 -1
  97. package/dist/ReportLabelStudio-N2w6DdaZ.js +0 -764
  98. package/dist/ReportParamPanel-CVpK8mFc.cjs +0 -1
  99. package/dist/ReportPreview-BBJNlu2U.js +0 -5740
  100. package/dist/ReportPreview-nf4Dk1Jc.cjs +0 -6
  101. package/dist/TemplateReviewPanel-C2YjiaEC.cjs +0 -1
  102. package/dist/prepared-BiSz_9vN.cjs +0 -1
  103. package/dist/template-bindings-Cg5oBLFT.cjs +0 -1
  104. package/dist/template-bindings-TKnXM7ll.js +0 -62
  105. package/dist/template-catalog-D_2jdnkL.cjs +0 -1
  106. package/dist/template-fragments-DZVUBhuB.cjs +0 -1
  107. package/dist/template-outline-DWkzZXVC.cjs +0 -1
  108. package/dist/template-registry-DpLUSLwF.cjs +0 -1
  109. package/dist/template-serialization-Cc3h-miv.js +0 -247
  110. package/dist/template-serialization-D1R5oAqh.cjs +0 -1
package/dist/vue.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { createReportSource as v, ReportCellEditError as A } from "@agile-team/mach-report";
2
2
  export * from "@agile-team/mach-report";
3
- import { P as R, c as h } from "./ReportPreview-BBJNlu2U.js";
4
- import { R as Z, a as Q, _ as ee, b as re, d as te, e as ne, f as oe, g as se, h as ae, i as ie, j as ce, k as fe, l as ue, m as de, n as le, o as ge, p as pe, q as Pe, r as me, u as Ee, s as Re, t as he } from "./ReportPreview-BBJNlu2U.js";
5
- import { M as u } from "./ReportParamPanel-peB-KEmm.js";
6
- import { D as ye, a as Se, b as Te, c as ve, d as Ae, P as xe, R as Ce, S as _e, e as Ie, f as Oe, n as Me, p as De, g as ke, r as Fe, h as Le, i as be, s as Ue, t as qe, j as je, u as Ge } from "./ReportParamPanel-peB-KEmm.js";
3
+ import { P as R, c as h } from "./ReportPreview-BDgKssYR.js";
4
+ import { R as Z, a as Q, _ as ee, b as re, d as te, e as ne, f as oe, g as se, h as ae, i as ie, j as ce, k as ue, l as fe, m as le, n as de, o as ge, p as pe, q as Pe, r as me, s as Ee, t as Re, u as he, v as we, w as ye } from "./ReportPreview-BDgKssYR.js";
5
+ import { M as f } from "./ReportParamPanel-BHSKVL8k.js";
6
+ import { D as Te, a as ve, b as Ae, c as xe, d as Ce, P as _e, R as Ie, S as Me, e as Oe, f as De, n as ke, p as Fe, g as Le, r as be, h as Ue, i as qe, s as je, t as Ge, j as Ne, u as He } from "./ReportParamPanel-BHSKVL8k.js";
7
7
  import { M as x } from "./injection-keys-e85udZCp.js";
8
- import { a as He, b as We, c as ze } from "./injection-keys-e85udZCp.js";
9
- import { M as Ye, m as Ke } from "./plugin-D4kAxfLG.js";
8
+ import { a as ze, b as Ve, c as Ye } from "./injection-keys-e85udZCp.js";
9
+ import { M as $e, m as Xe } from "./plugin-w5Nyt08U.js";
10
10
  import { shallowRef as C, computed as _, inject as I } from "vue";
11
- import { x as O } from "./json-snapshot-Kgn459Oj.js";
12
- import { a as M } from "./progress-Hc2vxoCs.js";
11
+ import { x as M } from "./json-snapshot-DvQbZlD7.js";
12
+ import { a as O } from "./progress-Hc2vxoCs.js";
13
13
  function V(r) {
14
14
  const e = v(r), o = async (t) => {
15
15
  if (t.reportIds.length === 0) throw new R("缺少报表 ID");
@@ -37,6 +37,9 @@ function Y() {
37
37
  get loading() {
38
38
  return e().loading;
39
39
  },
40
+ get stale() {
41
+ return e().stale ?? !1;
42
+ },
40
43
  get hasPlan() {
41
44
  return e().hasPlan;
42
45
  },
@@ -106,7 +109,7 @@ function Y() {
106
109
  });
107
110
  function t() {
108
111
  if (!r.value)
109
- throw new u("config", "报表预览尚未挂载,请在 ready 后调用控制器");
112
+ throw new f("config", "报表预览尚未挂载,请在 ready 后调用控制器");
110
113
  return r.value;
111
114
  }
112
115
  return {
@@ -148,9 +151,9 @@ function Y() {
148
151
  await t().setParams(n, s);
149
152
  },
150
153
  async importExcel(n, s) {
151
- const d = t();
152
- if (!d.importExcel) throw new u("config", "旧自定义控制器未提供 Excel 导入");
153
- return d.importExcel(n, s);
154
+ const l = t();
155
+ if (!l.importExcel) throw new f("config", "旧自定义控制器未提供 Excel 导入");
156
+ return l.importExcel(n, s);
154
157
  },
155
158
  getPlan() {
156
159
  return t().getPlan?.() ?? null;
@@ -176,14 +179,14 @@ function P(r) {
176
179
  return !!r && typeof r == "object" && !Array.isArray(r);
177
180
  }
178
181
  function k(r) {
179
- return Array.isArray(r) && r.every((e) => P(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string") && O(e));
182
+ return Array.isArray(r) && r.every((e) => P(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string") && M(e));
180
183
  }
181
184
  function F(r, e) {
182
185
  return Array.isArray(r) && r.every((o) => P(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < e && typeof o.code == "string" && typeof o.message == "string");
183
186
  }
184
187
  function L(r, e) {
185
188
  let o;
186
- if (!P(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !k(r.diagnostics) ? o = "结构化 diagnostics" : r.conflicts !== void 0 && !F(r.conflicts, e) && (o = "有效 editIndex/code/message conflicts"), o) throw new u("edit", `ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`);
189
+ if (!P(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !k(r.diagnostics) ? o = "结构化 diagnostics" : r.conflicts !== void 0 && !F(r.conflicts, e) && (o = "有效 editIndex/code/message conflicts"), o) throw new f("edit", `ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`);
187
190
  }
188
191
  function w(r) {
189
192
  return typeof r == "function" ? r() : r;
@@ -199,17 +202,17 @@ function U(r) {
199
202
  return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
200
203
  }
201
204
  function $(r, e) {
202
- if (!r.save) throw new u("config", "ReportProvider.save 未配置,无法启用业务保存");
205
+ if (!r.save) throw new f("config", "ReportProvider.save 未配置,无法启用业务保存");
203
206
  let o = "", t, n, s = 0;
204
- function d(a, i, l) {
205
- a.conflicts?.length || i !== o || l !== s || (t = a.revision, n = a.sourceToken);
207
+ function l(a, i, d) {
208
+ a.conflicts?.length || i !== o || d !== s || (t = a.revision, n = a.sourceToken);
206
209
  }
207
210
  async function m(a, i) {
208
211
  if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
209
- const l = w(e.reportId), E = { ...w(e.params ?? {}) }, g = JSON.stringify([l, E]), S = ++s;
212
+ const d = w(e.reportId), E = { ...w(e.params ?? {}) }, g = JSON.stringify([d, E]), S = ++s;
210
213
  if (g !== o && (o = g, t = void 0, n = void 0), e.requireSource !== !1 && a.edits.some((c) => !c.source)) throw new A("missing");
211
- const f = await r.save({
212
- reportId: l,
214
+ const u = await r.save({
215
+ reportId: d,
213
216
  params: E,
214
217
  signal: i.signal,
215
218
  requestId: a.requestId,
@@ -219,11 +222,11 @@ function $(r, e) {
219
222
  sourceToken: y(e.sourceToken, a.edits, "sourceToken", n)
220
223
  });
221
224
  if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
222
- L(f, a.edits.length), f.diagnostics?.forEach((c) => M(() => e.onDiagnostic?.(c)));
223
- const p = f.diagnostics?.filter((c) => c.severity === "error");
224
- if (p?.length) throw new u("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
225
- const T = f.conflicts?.map((c) => ({ source: a.edits[c.editIndex]?.source, address: a.edits[c.editIndex]?.address, message: c.message }));
226
- return d(f, g, S), { revision: f.revision, sourceToken: f.sourceToken, conflicts: T };
225
+ L(u, a.edits.length), u.diagnostics?.forEach((c) => O(() => e.onDiagnostic?.(c)));
226
+ const p = u.diagnostics?.filter((c) => c.severity === "error");
227
+ if (p?.length) throw new f("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
228
+ const T = u.conflicts?.map((c) => ({ source: a.edits[c.editIndex]?.source, address: a.edits[c.editIndex]?.address, message: c.message }));
229
+ return l(u, g, S), { revision: u.revision, sourceToken: u.sourceToken, conflicts: T };
227
230
  }
228
231
  return {
229
232
  requireSource: e.requireSource ?? !0,
@@ -234,58 +237,60 @@ function $(r, e) {
234
237
  };
235
238
  }
236
239
  export {
237
- ye as DEFAULT_CALCULATION_MESSAGES,
238
- Se as DEFAULT_DATA_REVIEW_MESSAGES,
239
- Te as DEFAULT_MESSAGES,
240
- ve as DEFAULT_PRINT_MESSAGES,
241
- Ae as DEFAULT_THEME,
242
- He as MACH_REPORT_CONFIG_KEY,
240
+ Te as DEFAULT_CALCULATION_MESSAGES,
241
+ ve as DEFAULT_DATA_REVIEW_MESSAGES,
242
+ Ae as DEFAULT_MESSAGES,
243
+ xe as DEFAULT_PRINT_MESSAGES,
244
+ Ce as DEFAULT_THEME,
245
+ ze as MACH_REPORT_CONFIG_KEY,
243
246
  x as MACH_REPORT_CONTROLLER_KEY,
244
- We as MACH_REPORT_FETCHER_KEY,
245
- ze as MACH_REPORT_PDF_EXPORTER_KEY,
246
- u as MachReportError,
247
- Ye as MachReportPreview,
248
- xe as PARAM_OPTIONS_MESSAGES,
247
+ Ve as MACH_REPORT_FETCHER_KEY,
248
+ Ye as MACH_REPORT_PDF_EXPORTER_KEY,
249
+ f as MachReportError,
250
+ $e as MachReportPreview,
251
+ _e as PARAM_OPTIONS_MESSAGES,
249
252
  R as PlanLoadError,
250
253
  Z as REPORT_EXPORT_FORMATS,
251
254
  Q as REPORT_PREVIEW_TOOLS,
252
255
  ee as ReportDataComparisonPanel,
253
- re as ReportPagination,
254
- Ce as ReportParamPanel,
255
- te as ReportPrefillPanel,
256
- ne as ReportPreview,
257
- oe as ReportPrintResourceError,
258
- se as ReportToolbar,
259
- ae as ReportValidationPanel,
260
- _e as SILENT_LOGGER,
261
- ie as buildPrintDocument,
262
- ce as buildWordHtml,
263
- fe as createDefaultPdfExporter,
264
- ue as createFetchRequest,
256
+ re as ReportExportMenu,
257
+ te as ReportPagination,
258
+ Ie as ReportParamPanel,
259
+ ne as ReportPrefillPanel,
260
+ oe as ReportPreview,
261
+ se as ReportPrintResourceError,
262
+ ae as ReportTaskStatus,
263
+ ie as ReportToolbar,
264
+ ce as ReportValidationPanel,
265
+ Me as SILENT_LOGGER,
266
+ ue as buildPrintDocument,
267
+ fe as buildWordHtml,
268
+ le as createDefaultPdfExporter,
269
+ de as createFetchRequest,
265
270
  V as createLocalFetcher,
266
- de as createPrintCalibrationPlan,
271
+ ge as createPrintCalibrationPlan,
267
272
  $ as createProviderEditing,
268
- le as createReportStoragePreferences,
269
- Ie as defineMachReportConfig,
270
- Oe as defineMachReportPreset,
271
- ge as joinReportIds,
272
- Ke as machReportPlugin,
273
- pe as normalizeReportIds,
274
- Me as normalizeReportLoadError,
275
- Pe as preparePrintResources,
276
- De as printCalibration,
277
- me as printPlans,
278
- ke as provideMachReportConfig,
279
- Fe as resolveCalculationMessages,
280
- Le as resolveConfig,
281
- be as resolveDataReviewMessages,
282
- Ue as snapshotPrintOptions,
283
- qe as themeToCssVars,
284
- je as toErrorDetail,
273
+ pe as createReportStoragePreferences,
274
+ Oe as defineMachReportConfig,
275
+ De as defineMachReportPreset,
276
+ Pe as joinReportIds,
277
+ Xe as machReportPlugin,
278
+ me as normalizeReportIds,
279
+ ke as normalizeReportLoadError,
280
+ Ee as preparePrintResources,
281
+ Fe as printCalibration,
282
+ Re as printPlans,
283
+ Le as provideMachReportConfig,
284
+ be as resolveCalculationMessages,
285
+ Ue as resolveConfig,
286
+ qe as resolveDataReviewMessages,
287
+ je as snapshotPrintOptions,
288
+ Ge as themeToCssVars,
289
+ Ne as toErrorDetail,
285
290
  Y as useMachReport,
286
- Ge as useMachReportConfig,
287
- Ee as usePageWindow,
288
- Re as usePrintExport,
291
+ He as useMachReportConfig,
292
+ he as usePageWindow,
293
+ we as usePrintExport,
289
294
  K as useReportPreview,
290
- he as useZoom
295
+ ye as useZoom
291
296
  };