@agile-team/mach-report 2.17.0 → 2.18.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 +18 -9
- package/dist/{ExcelBindingWizard-Bq6FYME6.cjs → ExcelBindingWizard-Czn3C2yE.cjs} +1 -1
- package/dist/{ExcelBindingWizard-Co1svTsw.js → ExcelBindingWizard-DMGZj6I6.js} +3 -3
- package/dist/ParamEditor-KzDQvbHY.js +732 -0
- package/dist/ParamEditor-oDfD8LgE.cjs +1 -0
- package/dist/{ReportBatchPanel-uQh06usx.js → ReportBatchPanel-BJK7PvZ4.js} +39 -39
- package/dist/ReportBatchPanel-DnmNRssu.cjs +1 -0
- package/dist/ReportParamPanel-mQkeN70Q.js +1020 -0
- package/dist/ReportParamPanel-sOANVRz-.cjs +1 -0
- package/dist/ReportPreview-BxWWTUL5.js +5583 -0
- package/dist/ReportPreview-Yf99omi3.cjs +6 -0
- package/dist/{ReportTemplateLibrary-TIL_Oj2l.js → ReportTemplateLibrary-BFjB08Wu.js} +1 -1
- package/dist/{ReportTemplateLibrary-CnP7_1pH.cjs → ReportTemplateLibrary-BO42QnWd.cjs} +1 -1
- package/dist/RuleEditor-CqxT1a-W.js +2337 -0
- package/dist/RuleEditor-D7YWigD9.cjs +1 -0
- package/dist/{TemplateOutlinePanel-BlLxRrfu.cjs → TemplateOutlinePanel-B0XX350V.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-BouxsuqQ.js → TemplateOutlinePanel-zG0DrsIB.js} +2 -2
- package/dist/{TemplateReusePanel-yxsHSO40.cjs → TemplateReusePanel-BD0HSKp_.cjs} +1 -1
- package/dist/{TemplateReusePanel-BEACLPaN.js → TemplateReusePanel-Czwe5GbC.js} +2 -2
- package/dist/{TemplateReviewPanel-D9Cx0m2N.cjs → TemplateReviewPanel-CA5sdffM.cjs} +1 -1
- package/dist/{TemplateReviewPanel-B1OGRY2i.js → TemplateReviewPanel-NhmQI65C.js} +2 -2
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +100 -41
- package/dist/analytics.d.ts +100 -41
- package/dist/analytics.js +76 -141
- package/dist/artifact-integrity.json +108 -102
- package/dist/assets-2eC3mOcV.js +232 -0
- package/dist/assets-B0Hxn4l6.cjs +1 -0
- package/dist/{auto-DDHflI9v.cjs → auto-B0EZFIK1.cjs} +1 -1
- package/dist/{auto-BIOmtVhk.js → auto-BlchZ1b8.js} +19 -19
- package/dist/{batch-WzDIXJAt.js → batch-DGCt44XM.js} +1 -1
- package/dist/{batch-z6Aw5GEY.cjs → batch-DYcokH4v.cjs} +1 -1
- package/dist/charts-Dlv8j2AG.js +141 -0
- package/dist/charts-aCtoswXq.cjs +1 -0
- package/dist/codes.cjs +9 -9
- package/dist/codes.d.cts +54 -0
- package/dist/codes.d.ts +54 -0
- package/dist/codes.js +12097 -13668
- package/dist/column-visual-BpgQVWwT.js +238 -0
- package/dist/column-visual-CtYxnBCP.cjs +1 -0
- package/dist/component-tree-6TV7W6Yj.cjs +1 -0
- package/dist/component-tree-CvW4lzpv.js +67 -0
- package/dist/computed-4TnxzgIh.cjs +1 -0
- package/dist/computed-C8NRZQss.js +739 -0
- package/dist/data-bar-Ce38juRZ.cjs +1 -0
- package/dist/data-bar-PtjXhMgN.js +9 -0
- package/dist/designer--TKECSEc.cjs +2 -0
- package/dist/designer-d6hJS41w.js +5683 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +710 -42
- package/dist/designer.d.ts +710 -42
- package/dist/designer.js +23 -20
- package/dist/{encoding-BFMFIc4r.cjs → encoding-B--eZpp1.cjs} +1 -1
- package/dist/{encoding-DP_Eaf0A.js → encoding-mctOLocI.js} +2 -2
- package/dist/{font-loader-7FWVlykp.cjs → font-loader-DBBJ5KE9.cjs} +1 -1
- package/dist/{font-loader-CQZowp0I.js → font-loader-DW8tIaNp.js} +1 -1
- package/dist/index-CPh6tqge.js +1575 -0
- package/dist/index-CUNw7dL9.cjs +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +361 -15
- package/dist/index.d.ts +361 -15
- package/dist/index.js +876 -835
- package/dist/json-snapshot-By4ZVVUt.js +1967 -0
- package/dist/json-snapshot-jiXff4lc.cjs +2 -0
- package/dist/matrix-0hywp0-F.cjs +1 -0
- package/dist/matrix-Dy-tyY7E.js +381 -0
- package/dist/param-validation-C-8sRJLq.cjs +1 -0
- package/dist/param-validation-CnDEd2l-.js +333 -0
- package/dist/{pdf-l3ea86di.js → pdf-CKROKygt.js} +1851 -1849
- package/dist/{pdf-B8JouyYv.cjs → pdf-DqyxJ96U.cjs} +46 -46
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +54 -0
- package/dist/pdf.d.ts +54 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BBp74CQZ.js → plugin-ByjF2kiV.js} +5 -5
- package/dist/{plugin-CtFX9PFG.cjs → plugin-DM1M2wlI.cjs} +1 -1
- package/dist/prefill-B8H9qwE4.js +371 -0
- package/dist/prefill-D7EswyTI.cjs +1 -0
- package/dist/{prepared-CARicKYh.js → prepared-BE-4jfX5.js} +2 -2
- package/dist/{prepared-Ch1x_Gog.cjs → prepared-CGVphji3.cjs} +1 -1
- package/dist/{protocol-B5A2uom4.cjs → protocol-ByRVzzQG.cjs} +1 -1
- package/dist/{protocol-BaiWjq5w.js → protocol-Cr81vFSQ.js} +3 -3
- package/dist/{record-bindings-D4TuMzHs.js → record-bindings-DEJtmo3p.js} +67 -107
- package/dist/record-bindings-ehjnCDHt.cjs +1 -0
- package/dist/{region-binding-workflow-BNasF5kz.js → region-binding-workflow-CBg0l_tj.js} +1 -1
- package/dist/{region-binding-workflow-O2Cni3mF.cjs → region-binding-workflow-D05tOYn3.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{report-params-B1RzkhJj.js → report-params-D9tBuM9B.js} +1 -1
- package/dist/{report-params-WDGrA4oP.cjs → report-params-VTg8MoCp.cjs} +1 -1
- package/dist/runtime-CDA6d263.cjs +1 -0
- package/dist/runtime-CEMvybO7.js +170 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +75 -7
- package/dist/server/node.d.ts +75 -7
- package/dist/server-node.cjs +4 -4
- package/dist/server-node.js +2692 -1990
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +243 -28
- package/dist/server.d.ts +243 -28
- package/dist/server.js +28 -28
- package/dist/sha256-BDQ1Qk7A.js +158 -0
- package/dist/sha256-DgZAKXqI.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-Cg5oBLFT.cjs +1 -0
- package/dist/template-bindings-TKnXM7ll.js +62 -0
- package/dist/{template-catalog-wT1fNeAP.js → template-catalog-CmbWOJqy.js} +16 -16
- package/dist/{template-catalog-Dua8h9ZA.cjs → template-catalog-Utu4GP09.cjs} +1 -1
- package/dist/{template-fragments-BajTajb4.cjs → template-fragments-C_zSHJAa.cjs} +1 -1
- package/dist/{template-fragments-DmX5XK4N.js → template-fragments-DWgo9tlZ.js} +2 -2
- package/dist/{template-outline-BwRV_eRo.cjs → template-outline-DWkzZXVC.cjs} +1 -1
- package/dist/{template-outline-cnWfT_LK.js → template-outline-DiADphlq.js} +1 -1
- package/dist/{template-registry-u11fPd8D.js → template-registry-BIhIHOab.js} +319 -314
- package/dist/template-registry-DzWswQI5.cjs +1 -0
- package/dist/vue/async.d.cts +528 -33
- package/dist/vue/async.d.ts +528 -33
- package/dist/vue/index.d.cts +616 -64
- package/dist/vue/index.d.ts +616 -64
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +94 -89
- package/dist/{workbook-session-DN5LSA5C.cjs → workbook-session-B94EwVa_.cjs} +1 -1
- package/dist/{workbook-session-B8pNW24X.js → workbook-session-BoScoOg-.js} +2 -2
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +75 -7
- package/dist/worker.d.ts +75 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +120 -13
- package/dist/xlsx.d.ts +120 -13
- package/dist/xlsx.js +313 -279
- package/package.json +1 -1
- package/dist/ParamEditor-B5UZRgxv.cjs +0 -1
- package/dist/ParamEditor-DNNARyeB.js +0 -594
- package/dist/ReportBatchPanel-Ctvs2t_9.cjs +0 -1
- package/dist/ReportPreview-BdQawRh0.js +0 -4879
- package/dist/ReportPreview-CJC_-j2I.cjs +0 -6
- package/dist/RuleEditor-DkRjOLlr.js +0 -2141
- package/dist/RuleEditor-h5anGsDB.cjs +0 -1
- package/dist/assets-BIMVwjQe.js +0 -231
- package/dist/assets-Dfs2ElxI.cjs +0 -1
- package/dist/component-tree-Ca6YYfHq.js +0 -61
- package/dist/component-tree-DkGLEfZC.cjs +0 -1
- package/dist/computed-BW5a8QFk.js +0 -612
- package/dist/computed-C2GD3XcE.cjs +0 -1
- package/dist/config-Dg_o8e7m.cjs +0 -1
- package/dist/config-XQ4qrQ7Q.js +0 -844
- package/dist/designer-D9XAxqSc.js +0 -5178
- package/dist/designer-uCDo5XSK.cjs +0 -2
- package/dist/drill-ByN8COs_.cjs +0 -1
- package/dist/drill-CKW3Xtfa.js +0 -145
- package/dist/json-snapshot-D7PE1NsU.cjs +0 -2
- package/dist/json-snapshot-DYmEe3sO.js +0 -1779
- package/dist/matrix-JLAXlux-.js +0 -302
- package/dist/matrix-gTHpDTGm.cjs +0 -1
- package/dist/param-validation-C3HlcLLO.cjs +0 -1
- package/dist/param-validation-Do7Eg8Zv.js +0 -181
- package/dist/record-bindings-B86Sur_y.cjs +0 -1
- package/dist/runtime-DakRXui3.js +0 -170
- package/dist/runtime-dL5ygIfa.cjs +0 -1
- package/dist/sha256-BshdOkCC.cjs +0 -1
- package/dist/sha256-DTG-Gq8i.js +0 -157
- package/dist/template-bindings-C2SpvsMU.js +0 -58
- package/dist/template-bindings-CEtWyiLX.cjs +0 -1
- package/dist/template-registry-CpysHAxy.cjs +0 -1
- package/dist/tree-CLpxYbKa.cjs +0 -1
- package/dist/tree-DNJorJUf.js +0 -172
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-DM1M2wlI.cjs");function i(){return Promise.resolve().then(()=>require("./ReportPreview-Yf99omi3.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-ByjF2kiV.js";
|
|
2
|
+
import { M as l } from "./plugin-ByjF2kiV.js";
|
|
3
3
|
function a() {
|
|
4
|
-
return import("./ReportPreview-
|
|
4
|
+
return import("./ReportPreview-BxWWTUL5.js").then((t) => t.v);
|
|
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"),i=require("./ReportPreview-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("@agile-team/mach-report"),i=require("./ReportPreview-Yf99omi3.cjs"),a=require("./ReportParamPanel-sOANVRz-.cjs"),f=require("./injection-keys-Db_DyLkm.cjs"),O=require("./plugin-DM1M2wlI.cjs"),T=require("vue"),C=require("./json-snapshot-jiXff4lc.cjs"),y=require("./progress-B0ctFpKf.cjs");function v(r){const e=E.createReportSource(r),n=async t=>{if(t.reportIds.length===0)throw new i.PlanLoadError("缺少报表 ID");for(const o of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,o)||!r[o])throw new i.PlanLoadError(`本地模板 ${o} 不存在`);return e(t)};return n.getParamDefs=e.getParamDefs,n}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,n=Object.freeze({get loading(){return e().loading},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 a.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:n,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 g=t();if(!g.importExcel)throw new a.MachReportError("config","旧自定义控制器未提供 Excel 导入");return g.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(f.MACH_REPORT_CONTROLLER_KEY,null)}function h(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function F(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 x(r,e){return Array.isArray(r)&&r.every(n=>h(n)&&Number.isSafeInteger(n.editIndex)&&n.editIndex>=0&&n.editIndex<e&&typeof n.code=="string"&&typeof n.message=="string")}function b(r,e){let n;if(!h(r)||typeof r.revision!="string"||!r.revision.trim()?n="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?n="字符串 sourceToken":r.diagnostics!==void 0&&!F(r.diagnostics)?n="结构化 diagnostics":r.conflicts!==void 0&&!x(r.conflicts,e)&&(n="有效 editIndex/code/message conflicts"),n)throw new a.MachReportError("edit",`ReportProvider.save 必须返回${n};服务器可能已提交,请重新查询确认后再编辑`)}function m(r){return typeof r=="function"?r():r}function q(r,e){const n=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return n.size===1?[...n][0]:void 0}function A(r,e,n,t){return typeof r=="function"?r():q(e,n)??t??r}function U(r){return r.requestId??globalThis.crypto?.randomUUID?.()??`mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}function G(r,e){if(!r.save)throw new a.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let n="",t,o,s=0;function g(c,u,p){c.conflicts?.length||u!==n||p!==s||(t=c.revision,o=c.sourceToken)}async function _(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const p=m(e.reportId),S={...m(e.params??{})},R=JSON.stringify([p,S]),M=++s;if(R!==n&&(n=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:p,params:S,signal:u.signal,requestId:c.requestId,action:u.action,edits:i.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 a.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 g(d,R,M),{revision:d.revision,sourceToken:d.sourceToken,conflicts:w}}return{requireSource:e.requireSource??!0,canEdit:e.canEdit,validate:e.validate,saveBatch:_,save:(c,u)=>_({requestId:U(u),edits:[i.cloneReportSnapshot(c)]},u)}}exports.PlanLoadError=i.PlanLoadError;exports.REPORT_EXPORT_FORMATS=i.REPORT_EXPORT_FORMATS;exports.REPORT_PREVIEW_TOOLS=i.REPORT_PREVIEW_TOOLS;exports.ReportDataComparisonPanel=i._sfc_main;exports.ReportPagination=i.ReportPagination;exports.ReportPrefillPanel=i._sfc_main$1;exports.ReportPreview=i.ReportPreview;exports.ReportPrintResourceError=i.ReportPrintResourceError;exports.ReportToolbar=i.ReportToolbar;exports.ReportValidationPanel=i.ReportValidationPanel;exports.buildPrintDocument=i.buildPrintDocument;exports.buildWordHtml=i.buildWordHtml;exports.createDefaultPdfExporter=i.createDefaultPdfExporter;exports.createFetchRequest=i.createFetchRequest;exports.createPrintCalibrationPlan=i.createPrintCalibrationPlan;exports.createReportStoragePreferences=i.createReportStoragePreferences;exports.joinReportIds=i.joinReportIds;exports.normalizeReportIds=i.normalizeReportIds;exports.preparePrintResources=i.preparePrintResources;exports.printPlans=i.printPlans;exports.usePageWindow=i.usePageWindow;exports.usePrintExport=i.usePrintExport;exports.useZoom=i.useZoom;exports.DEFAULT_CALCULATION_MESSAGES=a.DEFAULT_CALCULATION_MESSAGES;exports.DEFAULT_DATA_REVIEW_MESSAGES=a.DEFAULT_DATA_REVIEW_MESSAGES;exports.DEFAULT_MESSAGES=a.DEFAULT_MESSAGES;exports.DEFAULT_PRINT_MESSAGES=a.DEFAULT_PRINT_MESSAGES;exports.DEFAULT_THEME=a.DEFAULT_THEME;exports.MachReportError=a.MachReportError;exports.PARAM_OPTIONS_MESSAGES=a.PARAM_OPTIONS_MESSAGES;exports.ReportParamPanel=a.ReportParamPanel;exports.SILENT_LOGGER=a.SILENT_LOGGER;exports.defineMachReportConfig=a.defineMachReportConfig;exports.defineMachReportPreset=a.defineMachReportPreset;exports.normalizeReportLoadError=a.normalizeReportLoadError;exports.printCalibration=a.printCalibration;exports.provideMachReportConfig=a.provideMachReportConfig;exports.resolveCalculationMessages=a.resolveCalculationMessages;exports.resolveConfig=a.resolveConfig;exports.resolveDataReviewMessages=a.resolveDataReviewMessages;exports.snapshotPrintOptions=a.snapshotPrintOptions;exports.themeToCssVars=a.themeToCssVars;exports.toErrorDetail=a.toErrorDetail;exports.useMachReportConfig=a.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=f.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=f.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=f.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=f.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=O.MachReportPreview;exports.machReportPlugin=O.machReportPlugin;exports.createLocalFetcher=v;exports.createProviderEditing=G;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]})});
|
package/dist/vue.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createReportSource as v, ReportCellEditError as
|
|
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-
|
|
4
|
-
import { R as Z, a as Q,
|
|
5
|
-
import { M as
|
|
6
|
-
import { D as
|
|
7
|
-
import { M as
|
|
8
|
-
import { a as
|
|
9
|
-
import { M as
|
|
10
|
-
import { shallowRef as
|
|
11
|
-
import {
|
|
12
|
-
import { a as
|
|
13
|
-
function
|
|
3
|
+
import { P as R, c as h } from "./ReportPreview-BxWWTUL5.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-BxWWTUL5.js";
|
|
5
|
+
import { M as u } from "./ReportParamPanel-mQkeN70Q.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-mQkeN70Q.js";
|
|
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-ByjF2kiV.js";
|
|
10
|
+
import { shallowRef as C, computed as _, inject as I } from "vue";
|
|
11
|
+
import { x as O } from "./json-snapshot-By4ZVVUt.js";
|
|
12
|
+
import { a as M } from "./progress-Hc2vxoCs.js";
|
|
13
|
+
function V(r) {
|
|
14
14
|
const e = v(r), o = async (t) => {
|
|
15
15
|
if (t.reportIds.length === 0) throw new R("缺少报表 ID");
|
|
16
16
|
for (const n of t.reportIds)
|
|
@@ -32,8 +32,8 @@ const D = Object.freeze({
|
|
|
32
32
|
error: null,
|
|
33
33
|
pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
|
|
34
34
|
});
|
|
35
|
-
function
|
|
36
|
-
const r =
|
|
35
|
+
function Y() {
|
|
36
|
+
const r = C(null), e = () => r.value?.state ?? D, o = Object.freeze({
|
|
37
37
|
get loading() {
|
|
38
38
|
return e().loading;
|
|
39
39
|
},
|
|
@@ -106,7 +106,7 @@ function K() {
|
|
|
106
106
|
});
|
|
107
107
|
function t() {
|
|
108
108
|
if (!r.value)
|
|
109
|
-
throw new
|
|
109
|
+
throw new u("config", "报表预览尚未挂载,请在 ready 后调用控制器");
|
|
110
110
|
return r.value;
|
|
111
111
|
}
|
|
112
112
|
return {
|
|
@@ -114,7 +114,7 @@ function K() {
|
|
|
114
114
|
const s = n;
|
|
115
115
|
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;
|
|
116
116
|
},
|
|
117
|
-
ready:
|
|
117
|
+
ready: _(() => r.value !== null),
|
|
118
118
|
state: o,
|
|
119
119
|
async checkPdfFont() {
|
|
120
120
|
const n = t();
|
|
@@ -149,7 +149,7 @@ function K() {
|
|
|
149
149
|
},
|
|
150
150
|
async importExcel(n, s) {
|
|
151
151
|
const d = t();
|
|
152
|
-
if (!d.importExcel) throw new
|
|
152
|
+
if (!d.importExcel) throw new u("config", "旧自定义控制器未提供 Excel 导入");
|
|
153
153
|
return d.importExcel(n, s);
|
|
154
154
|
},
|
|
155
155
|
getPlan() {
|
|
@@ -169,47 +169,47 @@ function K() {
|
|
|
169
169
|
pasteSelection: async (n) => await t().pasteSelection?.(n) ?? !1
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
return I(
|
|
172
|
+
function K() {
|
|
173
|
+
return I(x, null);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function P(r) {
|
|
176
176
|
return !!r && typeof r == "object" && !Array.isArray(r);
|
|
177
177
|
}
|
|
178
178
|
function k(r) {
|
|
179
|
-
return Array.isArray(r) && r.every((e) =>
|
|
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));
|
|
180
180
|
}
|
|
181
181
|
function F(r, e) {
|
|
182
|
-
return Array.isArray(r) && r.every((o) =>
|
|
182
|
+
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
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function L(r, e) {
|
|
185
185
|
let o;
|
|
186
|
-
if (!
|
|
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};服务器可能已提交,请重新查询确认后再编辑`);
|
|
187
187
|
}
|
|
188
188
|
function w(r) {
|
|
189
189
|
return typeof r == "function" ? r() : r;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function b(r, e) {
|
|
192
192
|
const o = new Set(r.flatMap((t) => t.source?.[e] === void 0 ? [] : [String(t.source[e])]));
|
|
193
193
|
return o.size === 1 ? [...o][0] : void 0;
|
|
194
194
|
}
|
|
195
195
|
function y(r, e, o, t) {
|
|
196
|
-
return typeof r == "function" ? r() :
|
|
196
|
+
return typeof r == "function" ? r() : b(e, o) ?? t ?? r;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function U(r) {
|
|
199
199
|
return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
if (!r.save) throw new
|
|
201
|
+
function $(r, e) {
|
|
202
|
+
if (!r.save) throw new u("config", "ReportProvider.save 未配置,无法启用业务保存");
|
|
203
203
|
let o = "", t, n, s = 0;
|
|
204
|
-
function d(a, i,
|
|
205
|
-
a.conflicts?.length || i !== o ||
|
|
204
|
+
function d(a, i, l) {
|
|
205
|
+
a.conflicts?.length || i !== o || l !== s || (t = a.revision, n = a.sourceToken);
|
|
206
206
|
}
|
|
207
|
-
async function
|
|
207
|
+
async function m(a, i) {
|
|
208
208
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
212
|
-
reportId:
|
|
209
|
+
const l = w(e.reportId), E = { ...w(e.params ?? {}) }, g = JSON.stringify([l, E]), S = ++s;
|
|
210
|
+
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,
|
|
213
213
|
params: E,
|
|
214
214
|
signal: i.signal,
|
|
215
215
|
requestId: a.requestId,
|
|
@@ -219,68 +219,73 @@ function V(r, e) {
|
|
|
219
219
|
sourceToken: y(e.sourceToken, a.edits, "sourceToken", n)
|
|
220
220
|
});
|
|
221
221
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
222
|
-
|
|
223
|
-
const p =
|
|
224
|
-
if (p?.length) throw new
|
|
225
|
-
const T =
|
|
226
|
-
return d(
|
|
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 };
|
|
227
227
|
}
|
|
228
228
|
return {
|
|
229
229
|
requireSource: e.requireSource ?? !0,
|
|
230
230
|
canEdit: e.canEdit,
|
|
231
231
|
validate: e.validate,
|
|
232
|
-
saveBatch:
|
|
233
|
-
save: (a, i) =>
|
|
232
|
+
saveBatch: m,
|
|
233
|
+
save: (a, i) => m({ requestId: U(i), edits: [h(a)] }, i)
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
export {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
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,
|
|
243
|
+
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,
|
|
248
249
|
R as PlanLoadError,
|
|
249
250
|
Z as REPORT_EXPORT_FORMATS,
|
|
250
251
|
Q as REPORT_PREVIEW_TOOLS,
|
|
251
|
-
ee as
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
te as
|
|
255
|
-
ne as
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
ie as
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
252
|
+
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,
|
|
265
|
+
V as createLocalFetcher,
|
|
266
|
+
de as createPrintCalibrationPlan,
|
|
267
|
+
$ 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,
|
|
285
|
+
Y as useMachReport,
|
|
286
|
+
Ge as useMachReportConfig,
|
|
287
|
+
Ee as usePageWindow,
|
|
288
|
+
Re as usePrintExport,
|
|
289
|
+
K as useReportPreview,
|
|
290
|
+
he as useZoom
|
|
286
291
|
};
|