@agile-team/mach-report 2.13.0 → 2.15.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 +20 -7
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/ExcelBindingWizard-BKH1nGNS.js +1485 -0
- package/dist/ExcelBindingWizard-Bs43BGNp.cjs +1 -0
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-CW2HV9I8.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/ReportBatchPanel-wP9m9Pj1.cjs +1 -0
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/ReportTemplateLibrary-Sxr3eD0J.cjs +1 -0
- package/dist/RuleEditor-C_Clasvd.js +2037 -0
- package/dist/RuleEditor-XhGHK8DE.cjs +1 -0
- package/dist/TemplateOutlinePanel-D6Bkny59.js +96 -0
- package/dist/TemplateOutlinePanel-JTSR53vJ.cjs +1 -0
- package/dist/TemplateReusePanel-Kx35S0Ql.cjs +1 -0
- package/dist/TemplateReusePanel-rVuK1kTz.js +388 -0
- package/dist/TemplateReviewPanel-B0ar9_zf.js +592 -0
- package/dist/TemplateReviewPanel-Dn6X9UmY.cjs +1 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +3 -1
- package/dist/analytics.d.ts +3 -1
- package/dist/analytics.js +154 -60
- package/dist/artifact-integrity.json +135 -0
- package/dist/assets-B9ImAi6_.cjs +1 -0
- package/dist/assets-DEaz4qsp.js +124 -0
- package/dist/batch-BaP6pWDE.cjs +1 -0
- package/dist/batch-BfZHN1do.js +220 -0
- package/dist/batch-CGyt-b2W.js +273 -0
- package/dist/batch-CLpELXBl.cjs +1 -0
- package/dist/capabilities-CAh2Nrue.cjs +1 -0
- package/dist/capabilities-DskCHs3V.js +69 -0
- package/dist/codes.d.cts +2 -0
- package/dist/codes.d.ts +2 -0
- package/dist/{computed-Bvk0W15F.js → computed-C-4C2S5h.js} +3 -3
- package/dist/config-BVsJXSqS.js +842 -0
- package/dist/config-D10us76d.cjs +1 -0
- package/dist/data-explanation-B8MZRYVS.js +16 -0
- package/dist/data-explanation-DE55G30w.cjs +1 -0
- package/dist/designer-2bDlcNXQ.js +5136 -0
- package/dist/designer-BT7XCdbW.cjs +2 -0
- package/dist/designer.cjs +1 -2
- package/dist/designer.d.cts +432 -17
- package/dist/designer.d.ts +432 -17
- package/dist/designer.js +21 -4312
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/font-loader-B_UkxpzC.cjs +1 -0
- package/dist/font-loader-Q3bQjmrI.js +297 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +239 -5
- package/dist/index.d.ts +239 -5
- package/dist/index.js +939 -893
- package/dist/json-snapshot-DFb2eWkf.js +1416 -0
- package/dist/json-snapshot-WWSGlaHG.cjs +2 -0
- package/dist/licenses/_bwip-js_generic-4.11.4.txt +24 -0
- package/dist/licenses/_fast-csv_format-4.3.5.txt +22 -0
- package/dist/licenses/_fast-csv_parse-4.3.6.txt +22 -0
- package/dist/licenses/_pdf-lib_fontkit-1.1.1.txt +326 -0
- package/dist/licenses/_pdf-lib_standard-fonts-1.0.0.txt +22 -0
- package/dist/licenses/_pdf-lib_upng-1.0.1.txt +22 -0
- package/dist/licenses/_types_node-14.18.63.txt +22 -0
- package/dist/licenses/_types_pako-2.0.3.txt +22 -0
- package/dist/licenses/_types_pegjs-0.10.6.txt +22 -0
- package/dist/licenses/archiver-5.3.2.txt +23 -0
- package/dist/licenses/archiver-utils-2.1.0.txt +23 -0
- package/dist/licenses/archiver-utils-3.0.4.txt +23 -0
- package/dist/licenses/async-3.2.6.txt +20 -0
- package/dist/licenses/balanced-match-1.0.2.txt +22 -0
- package/dist/licenses/base64-js-1.5.1.txt +22 -0
- package/dist/licenses/big-integer-1.6.52.txt +25 -0
- package/dist/licenses/binary-0.3.0.txt +178 -0
- package/dist/licenses/bl-4.1.0.txt +14 -0
- package/dist/licenses/bluebird-3.4.7.txt +22 -0
- package/dist/licenses/brace-expansion-1.1.21.txt +22 -0
- package/dist/licenses/brace-expansion-2.1.7.txt +22 -0
- package/dist/licenses/buffer-5.7.1.txt +22 -0
- package/dist/licenses/buffer-crc32-0.2.13.txt +20 -0
- package/dist/licenses/buffer-indexof-polyfill-1.0.2.txt +23 -0
- package/dist/licenses/buffers-0.1.1.txt +140 -0
- package/dist/licenses/chainsaw-0.1.0.txt +184 -0
- package/dist/licenses/compress-commons-4.1.2.txt +23 -0
- package/dist/licenses/concat-map-0.0.1.txt +19 -0
- package/dist/licenses/core-util-is-1.0.3.txt +20 -0
- package/dist/licenses/crc-32-1.2.2.txt +202 -0
- package/dist/licenses/crc32-stream-4.0.3.txt +23 -0
- package/dist/licenses/dayjs-1.11.23.txt +22 -0
- package/dist/licenses/duplexer2-0.1.4.txt +27 -0
- package/dist/licenses/end-of-stream-1.4.5.txt +22 -0
- package/dist/licenses/exceljs-4.4.0.txt +23 -0
- package/dist/licenses/fast-csv-4.3.6.txt +22 -0
- package/dist/licenses/fast-png-6.4.0.txt +22 -0
- package/dist/licenses/fs-constants-1.0.0.txt +22 -0
- package/dist/licenses/fs.realpath-1.0.0.txt +44 -0
- package/dist/licenses/fstream-1.0.12.txt +16 -0
- package/dist/licenses/glob-7.2.3.txt +22 -0
- package/dist/licenses/graceful-fs-4.2.11.txt +16 -0
- package/dist/licenses/ieee754-1.2.1.txt +12 -0
- package/dist/licenses/immediate-3.0.6.txt +21 -0
- package/dist/licenses/inflight-1.0.6.txt +16 -0
- package/dist/licenses/inherits-2.0.4.txt +17 -0
- package/dist/licenses/iobuffer-5.4.0.txt +23 -0
- package/dist/licenses/isarray-1.0.0.txt +61 -0
- package/dist/licenses/jszip-3.10.2.txt +652 -0
- package/dist/licenses/lazystream-1.0.1.txt +24 -0
- package/dist/licenses/lie-3.3.0.txt +8 -0
- package/dist/licenses/listenercount-1.0.1.txt +6 -0
- package/dist/licenses/lodash.defaults-4.2.0.txt +48 -0
- package/dist/licenses/lodash.difference-4.5.0.txt +48 -0
- package/dist/licenses/lodash.escaperegexp-4.1.2.txt +48 -0
- package/dist/licenses/lodash.flatten-4.4.0.txt +48 -0
- package/dist/licenses/lodash.groupby-4.6.0.txt +48 -0
- package/dist/licenses/lodash.isboolean-3.0.3.txt +23 -0
- package/dist/licenses/lodash.isequal-4.5.0.txt +48 -0
- package/dist/licenses/lodash.isfunction-3.0.9.txt +48 -0
- package/dist/licenses/lodash.isnil-4.0.0.txt +23 -0
- package/dist/licenses/lodash.isplainobject-4.0.6.txt +48 -0
- package/dist/licenses/lodash.isundefined-3.0.1.txt +23 -0
- package/dist/licenses/lodash.union-4.6.0.txt +48 -0
- package/dist/licenses/lodash.uniq-4.5.0.txt +48 -0
- package/dist/licenses/minimatch-3.1.5.txt +16 -0
- package/dist/licenses/minimatch-5.1.9.txt +16 -0
- package/dist/licenses/minimist-1.2.8.txt +19 -0
- package/dist/licenses/mkdirp-0.5.6.txt +22 -0
- package/dist/licenses/node-sql-parser-5.4.0.txt +202 -0
- package/dist/licenses/normalize-path-3.0.0.txt +22 -0
- package/dist/licenses/once-1.4.0.txt +16 -0
- package/dist/licenses/pako-1.0.11.txt +22 -0
- package/dist/licenses/pako-2.2.0.txt +22 -0
- package/dist/licenses/path-is-absolute-1.0.1.txt +22 -0
- package/dist/licenses/pdf-lib-1.17.1.txt +22 -0
- package/dist/licenses/process-nextick-args-2.0.1.txt +20 -0
- package/dist/licenses/readable-stream-2.3.8.txt +48 -0
- package/dist/licenses/readable-stream-3.6.2.txt +48 -0
- package/dist/licenses/readdir-glob-1.1.3.txt +202 -0
- package/dist/licenses/rimraf-2.7.1.txt +16 -0
- package/dist/licenses/safe-buffer-5.1.2.txt +22 -0
- package/dist/licenses/safe-buffer-5.2.1.txt +22 -0
- package/dist/licenses/saxes-5.0.1.txt +397 -0
- package/dist/licenses/setimmediate-1.0.5.txt +21 -0
- package/dist/licenses/string_decoder-1.1.1.txt +49 -0
- package/dist/licenses/string_decoder-1.3.0.txt +49 -0
- package/dist/licenses/tar-stream-2.2.0.txt +22 -0
- package/dist/licenses/tmp-0.2.7.txt +22 -0
- package/dist/licenses/traverse-0.3.9.txt +25 -0
- package/dist/licenses/tslib-1.14.1.txt +13 -0
- package/dist/licenses/unzipper-0.10.14.txt +26 -0
- package/dist/licenses/util-deprecate-1.0.2.txt +25 -0
- package/dist/licenses/uuid-11.1.1.txt +10 -0
- package/dist/licenses/wrappy-1.0.2.txt +16 -0
- package/dist/licenses/xmlchars-2.2.0.txt +19 -0
- package/dist/licenses/zip-stream-4.1.1.txt +23 -0
- package/dist/matrix-CGRGkn5s.js +112 -0
- package/dist/matrix-gEO7ZM_u.cjs +1 -0
- package/dist/media-B7vnpD8k.cjs +1 -0
- package/dist/media-Y90dHK9z.js +70 -0
- package/dist/param-validation-C3HlcLLO.cjs +1 -0
- package/dist/param-validation-Do7Eg8Zv.js +181 -0
- package/dist/pdf-BwNyeGpt.js +36352 -0
- package/dist/pdf-CvvrjPQg.cjs +103 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +9 -36579
- package/dist/plugin-Ca_XZG3l.js +22 -0
- package/dist/{plugin-DzS6pxTA.cjs → plugin-DHO7X8z2.cjs} +1 -1
- package/dist/prepared-CFy9B75C.cjs +1 -0
- package/dist/prepared-ajM-H-9B.js +69 -0
- package/dist/progress-B0ctFpKf.cjs +1 -0
- package/dist/progress-D-OTpEav.js +52 -0
- package/dist/{record-bindings-D-5jQlTj.js → record-bindings-Do_b3h4V.js} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-BMhK_TjP.js} +1 -1
- package/dist/{region-binding-workflow-BzfbxRiR.cjs → region-binding-workflow-DIYJdCUr.cjs} +1 -1
- package/dist/{report-params-B44imUd4.js → report-params-B1RzkhJj.js} +1 -1
- package/dist/{report-params-SJfhKgaX.cjs → report-params-WDGrA4oP.cjs} +1 -1
- package/dist/sbom.cdx.json +3982 -0
- package/dist/server/node.d.cts +66 -12
- package/dist/server/node.d.ts +66 -12
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +405 -381
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +878 -15
- package/dist/server.d.ts +878 -15
- package/dist/server.js +1034 -534
- package/dist/sha256-ArEYjaTI.cjs +1 -0
- package/dist/sha256-DPEuJ3nh.js +155 -0
- package/dist/style.css +1 -1
- package/dist/template-bindings-C2SpvsMU.js +58 -0
- package/dist/template-bindings-CEtWyiLX.cjs +1 -0
- package/dist/template-catalog-FJE_c9Qe.cjs +1 -0
- package/dist/template-catalog-j2B1MJlL.js +414 -0
- package/dist/template-fragments-BGbQLGlV.js +187 -0
- package/dist/template-fragments-DcKeiylI.cjs +1 -0
- package/dist/template-outline-BwRV_eRo.cjs +1 -0
- package/dist/template-outline-cnWfT_LK.js +88 -0
- package/dist/{template-registry-BjE1VS6g.js → template-registry-BtaKPELV.js} +364 -201
- package/dist/template-registry-Co1zPq5e.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/textwrap-DE1kgcJB.js +110 -0
- package/dist/{tree-CqcQ99NM.js → tree-CjVZLRw7.js} +1 -1
- package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/vue/async.d.cts +190 -15
- package/dist/vue/async.d.ts +190 -15
- package/dist/vue/index.d.cts +274 -24
- package/dist/vue/index.d.ts +274 -24
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +90 -81
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +66 -12
- package/dist/worker.d.ts +66 -12
- package/dist/worker.js +61 -56
- package/dist/xlsx-node.cjs +34 -34
- package/dist/xlsx-node.js +878 -870
- package/dist/xlsx.cjs +3 -4
- package/dist/xlsx.d.cts +22 -10
- package/dist/xlsx.d.ts +22 -10
- package/dist/xlsx.js +261 -253
- package/package.json +2 -2
- package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-BLaE5q5W.js +0 -522
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Fp1ePFag.cjs +0 -1
- package/dist/ReportPreview-BN6fk7Wz.cjs +0 -6
- package/dist/ReportPreview-D2Jkyh1U.js +0 -4243
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/batch-mRqhhhjt.js +0 -364
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-Bb7RiIO5.cjs +0 -1
- package/dist/config-XVwG87IA.js +0 -529
- package/dist/matrix-DVyWiYsd.cjs +0 -1
- package/dist/matrix-yZsGnldA.js +0 -227
- package/dist/page-window-index-CIuT4BAv.js +0 -43
- package/dist/page-window-index-DEjnM6IB.cjs +0 -1
- package/dist/param-validation-BlHHXs6u.js +0 -153
- package/dist/param-validation-DCK039V1.cjs +0 -1
- package/dist/plugin-D4wizDXB.js +0 -22
- package/dist/progress-7OSZbFok.js +0 -39
- package/dist/progress-BnLiS5eH.cjs +0 -1
- package/dist/task-events-DQ276fn2.cjs +0 -1
- package/dist/task-events-Dpsvf_t2.js +0 -47
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/template-review-DGwWOoCv.cjs +0 -2
- package/dist/template-review-PgEe_Wr9.js +0 -1742
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-DbgEM1Hh.js +0 -163
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-DbLvvOUT.cjs"),a=require("./config-D10us76d.cjs"),g=require("./injection-keys-Db_DyLkm.cjs"),y=require("./plugin-DHO7X8z2.cjs"),h=require("vue"),M=require("./data-explanation-DE55G30w.cjs"),A=require("./progress-B0ctFpKf.cjs");function v(r){const e=E.createReportSource(r),o=async t=>{if(t.reportIds.length===0)throw new i.PlanLoadError("缺少报表 ID");for(const n of t.reportIds)if(!Object.prototype.hasOwnProperty.call(r,n)||!r[n])throw new i.PlanLoadError(`本地模板 ${n} 不存在`);return e(t)};return o.getParamDefs=e.getParamDefs,o}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 L(){const r=h.shallowRef(null),e=()=>r.value?.state??I,o=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(n){const s=n;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:h.computed(()=>r.value!==null),state:o,async checkPdfFont(){const n=t();return n.checkPdfFont?n.checkPdfFont():{status:"unverified",fontUrl:"",message:"旧自定义控制器未提供字体检查,请由宿主确认字体配置"}},cancelTask(){t().cancelTask?.()},async confirmDiscard(n){return await t().confirmDiscard?.(n)??!0},getOutputDiagnostics(n){return t().getOutputDiagnostics?.(n)??[]},async reload(){await t().reload()},async print(){await t().print()},async exportAs(n){await t().exportAs(n)},openPdfWindow(){t().openPdfWindow()},gotoPage(n){t().gotoPage(n)},async setParams(n,s){await t().setParams(n,s)},async importExcel(n,s){const f=t();if(!f.importExcel)throw new a.MachReportError("config","旧自定义控制器未提供 Excel 导入");return f.importExcel(n,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(n,s)=>await t().focusCell?.(n,s)??!1,focusField:async n=>await t().focusField?.(n)??!1,copySelection:()=>t().copySelection?.()??"",pasteSelection:async n=>await t().pasteSelection?.(n)??!1}}function D(){return h.inject(g.MACH_REPORT_CONTROLLER_KEY,null)}function T(r){return!!r&&typeof r=="object"&&!Array.isArray(r)}function x(r){return Array.isArray(r)&&r.every(e=>T(e)&&typeof e.code=="string"&&typeof e.message=="string"&&["info","warning","error"].includes(e.severity)&&(e.path===void 0||typeof e.path=="string")&&M.hasValidDataExplanation(e))}function F(r,e){return Array.isArray(r)&&r.every(o=>T(o)&&Number.isSafeInteger(o.editIndex)&&o.editIndex>=0&&o.editIndex<e&&typeof o.code=="string"&&typeof o.message=="string")}function b(r,e){let o;if(!T(r)||typeof r.revision!="string"||!r.revision.trim()?o="非空 revision(请先在适配器解包业务响应)":r.sourceToken!==void 0&&typeof r.sourceToken!="string"?o="字符串 sourceToken":r.diagnostics!==void 0&&!x(r.diagnostics)?o="结构化 diagnostics":r.conflicts!==void 0&&!F(r.conflicts,e)&&(o="有效 editIndex/code/message conflicts"),o)throw new a.MachReportError("edit",`ReportProvider.save 必须返回${o};服务器可能已提交,请重新查询确认后再编辑`)}function O(r){return typeof r=="function"?r():r}function q(r,e){const o=new Set(r.flatMap(t=>t.source?.[e]===void 0?[]:[String(t.source[e])]));return o.size===1?[...o][0]:void 0}function _(r,e,o,t){return typeof r=="function"?r():q(e,o)??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 a.MachReportError("config","ReportProvider.save 未配置,无法启用业务保存");let o="",t,n,s=0;function f(c,u,p){c.conflicts?.length||u!==o||p!==s||(t=c.revision,n=c.sourceToken)}async function S(c,u){if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");const p=O(e.reportId),m={...O(e.params??{})},R=JSON.stringify([p,m]),C=++s;if(R!==o&&(o=R,t=void 0,n=void 0),e.requireSource!==!1&&c.edits.some(l=>!l.source))throw new E.ReportCellEditError("missing");const d=await r.save({reportId:p,params:m,signal:u.signal,requestId:c.requestId,action:u.action,edits:i.cloneReportSnapshot(c.edits),expectedRevision:_(e.expectedRevision,c.edits,"revision",t),sourceToken:_(e.sourceToken,c.edits,"sourceToken",n)});if(u.signal.aborted)throw u.signal.reason??new DOMException("Aborted","AbortError");b(d,c.edits.length),d.diagnostics?.forEach(l=>A.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 f(d,R,C),{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:[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.ReportPagination=i.ReportPagination;exports.ReportPreview=i.ReportPreview;exports.ReportPrintResourceError=i.ReportPrintResourceError;exports.ReportToolbar=i.ReportToolbar;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_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.snapshotPrintOptions=a.snapshotPrintOptions;exports.themeToCssVars=a.themeToCssVars;exports.toErrorDetail=a.toErrorDetail;exports.useMachReportConfig=a.useMachReportConfig;exports.MACH_REPORT_CONFIG_KEY=g.MACH_REPORT_CONFIG_KEY;exports.MACH_REPORT_CONTROLLER_KEY=g.MACH_REPORT_CONTROLLER_KEY;exports.MACH_REPORT_FETCHER_KEY=g.MACH_REPORT_FETCHER_KEY;exports.MACH_REPORT_PDF_EXPORTER_KEY=g.MACH_REPORT_PDF_EXPORTER_KEY;exports.MachReportPreview=y.MachReportPreview;exports.machReportPlugin=y.machReportPlugin;exports.createLocalFetcher=v;exports.createProviderEditing=U;exports.useMachReport=L;exports.useReportPreview=D;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,15 +1,17 @@
|
|
|
1
|
-
import { createReportSource as
|
|
1
|
+
import { createReportSource as v, ReportCellEditError as x } from "@agile-team/mach-report";
|
|
2
2
|
export * from "@agile-team/mach-report";
|
|
3
|
-
import { P as R, c as
|
|
4
|
-
import { R as
|
|
5
|
-
import { M as
|
|
6
|
-
import { D as
|
|
3
|
+
import { P as R, c as h } from "./ReportPreview-ChV19HBp.js";
|
|
4
|
+
import { R as Z, a as Q, b as ee, d as re, e as te, f as ne, g as oe, h as se, i as ae, j as ie, k as ce, l as ue, m as fe, n as de, p as ge, o as le, u as pe, q as me, r as Pe } from "./ReportPreview-ChV19HBp.js";
|
|
5
|
+
import { M as f } from "./config-BVsJXSqS.js";
|
|
6
|
+
import { D as Re, a as he, b as we, c as ye, P as Se, R as Te, S as ve, d as xe, e as Ce, n as Ae, p as Oe, f as Ie, r as Me, g as _e, s as De, t as ke, h as Fe, u as be } from "./config-BVsJXSqS.js";
|
|
7
7
|
import { M as C } from "./injection-keys-e85udZCp.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { M as
|
|
10
|
-
import { shallowRef as
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
import { a as qe, b as Ue, c as je } from "./injection-keys-e85udZCp.js";
|
|
9
|
+
import { M as Ne, m as He } from "./plugin-Ca_XZG3l.js";
|
|
10
|
+
import { shallowRef as A, computed as O, inject as I } from "vue";
|
|
11
|
+
import { h as M } from "./data-explanation-B8MZRYVS.js";
|
|
12
|
+
import { b as _ } from "./progress-D-OTpEav.js";
|
|
13
|
+
function Y(r) {
|
|
14
|
+
const e = v(r), o = async (t) => {
|
|
13
15
|
if (t.reportIds.length === 0) throw new R("缺少报表 ID");
|
|
14
16
|
for (const n of t.reportIds)
|
|
15
17
|
if (!Object.prototype.hasOwnProperty.call(r, n) || !r[n])
|
|
@@ -18,7 +20,7 @@ function z(r) {
|
|
|
18
20
|
};
|
|
19
21
|
return o.getParamDefs = e.getParamDefs, o;
|
|
20
22
|
}
|
|
21
|
-
const
|
|
23
|
+
const D = Object.freeze({
|
|
22
24
|
loading: !1,
|
|
23
25
|
hasPlan: !1,
|
|
24
26
|
pageCount: 0,
|
|
@@ -30,8 +32,8 @@ const M = Object.freeze({
|
|
|
30
32
|
error: null,
|
|
31
33
|
pdfFont: Object.freeze({ status: "unchecked", fontUrl: "" })
|
|
32
34
|
});
|
|
33
|
-
function
|
|
34
|
-
const r =
|
|
35
|
+
function K() {
|
|
36
|
+
const r = A(null), e = () => r.value?.state ?? D, o = Object.freeze({
|
|
35
37
|
get loading() {
|
|
36
38
|
return e().loading;
|
|
37
39
|
},
|
|
@@ -104,7 +106,7 @@ function G() {
|
|
|
104
106
|
});
|
|
105
107
|
function t() {
|
|
106
108
|
if (!r.value)
|
|
107
|
-
throw new
|
|
109
|
+
throw new f("config", "报表预览尚未挂载,请在 ready 后调用控制器");
|
|
108
110
|
return r.value;
|
|
109
111
|
}
|
|
110
112
|
return {
|
|
@@ -112,7 +114,7 @@ function G() {
|
|
|
112
114
|
const s = n;
|
|
113
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;
|
|
114
116
|
},
|
|
115
|
-
ready:
|
|
117
|
+
ready: O(() => r.value !== null),
|
|
116
118
|
state: o,
|
|
117
119
|
async checkPdfFont() {
|
|
118
120
|
const n = t();
|
|
@@ -147,7 +149,7 @@ function G() {
|
|
|
147
149
|
},
|
|
148
150
|
async importExcel(n, s) {
|
|
149
151
|
const d = t();
|
|
150
|
-
if (!d.importExcel) throw new
|
|
152
|
+
if (!d.importExcel) throw new f("config", "旧自定义控制器未提供 Excel 导入");
|
|
151
153
|
return d.importExcel(n, s);
|
|
152
154
|
},
|
|
153
155
|
getPlan() {
|
|
@@ -167,111 +169,118 @@ function G() {
|
|
|
167
169
|
pasteSelection: async (n) => await t().pasteSelection?.(n) ?? !1
|
|
168
170
|
};
|
|
169
171
|
}
|
|
170
|
-
function
|
|
171
|
-
return
|
|
172
|
+
function $() {
|
|
173
|
+
return I(C, null);
|
|
172
174
|
}
|
|
173
175
|
function m(r) {
|
|
174
176
|
return !!r && typeof r == "object" && !Array.isArray(r);
|
|
175
177
|
}
|
|
176
|
-
function
|
|
177
|
-
return Array.isArray(r) && r.every((e) => m(e) && typeof e.code == "string" && typeof e.message == "string" && ["info", "warning", "error"].includes(e.severity) && (e.path === void 0 || typeof e.path == "string"));
|
|
178
|
+
function k(r) {
|
|
179
|
+
return Array.isArray(r) && r.every((e) => m(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));
|
|
178
180
|
}
|
|
179
|
-
function
|
|
181
|
+
function F(r, e) {
|
|
180
182
|
return Array.isArray(r) && r.every((o) => m(o) && Number.isSafeInteger(o.editIndex) && o.editIndex >= 0 && o.editIndex < e && typeof o.code == "string" && typeof o.message == "string");
|
|
181
183
|
}
|
|
182
|
-
function
|
|
184
|
+
function b(r, e) {
|
|
183
185
|
let o;
|
|
184
|
-
if (!m(r) || typeof r.revision != "string" || !r.revision.trim() ? o = "非空 revision(请先在适配器解包业务响应)" : r.sourceToken !== void 0 && typeof r.sourceToken != "string" ? o = "字符串 sourceToken" : r.diagnostics !== void 0 && !
|
|
186
|
+
if (!m(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};服务器可能已提交,请重新查询确认后再编辑`);
|
|
185
187
|
}
|
|
186
|
-
function
|
|
188
|
+
function w(r) {
|
|
187
189
|
return typeof r == "function" ? r() : r;
|
|
188
190
|
}
|
|
189
|
-
function
|
|
191
|
+
function L(r, e) {
|
|
190
192
|
const o = new Set(r.flatMap((t) => t.source?.[e] === void 0 ? [] : [String(t.source[e])]));
|
|
191
193
|
return o.size === 1 ? [...o][0] : void 0;
|
|
192
194
|
}
|
|
193
|
-
function
|
|
194
|
-
return typeof r == "function" ? r() :
|
|
195
|
+
function y(r, e, o, t) {
|
|
196
|
+
return typeof r == "function" ? r() : L(e, o) ?? t ?? r;
|
|
195
197
|
}
|
|
196
|
-
function
|
|
198
|
+
function q(r) {
|
|
197
199
|
return r.requestId ?? globalThis.crypto?.randomUUID?.() ?? `mr-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
198
200
|
}
|
|
199
|
-
function
|
|
200
|
-
if (!r.save) throw new
|
|
201
|
+
function V(r, e) {
|
|
202
|
+
if (!r.save) throw new f("config", "ReportProvider.save 未配置,无法启用业务保存");
|
|
201
203
|
let o = "", t, n, s = 0;
|
|
202
204
|
function d(a, i, g) {
|
|
203
205
|
a.conflicts?.length || i !== o || g !== s || (t = a.revision, n = a.sourceToken);
|
|
204
206
|
}
|
|
205
207
|
async function P(a, i) {
|
|
206
208
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
207
|
-
const g =
|
|
209
|
+
const g = w(e.reportId), E = { ...w(e.params ?? {}) }, l = JSON.stringify([g, E]), S = ++s;
|
|
208
210
|
if (l !== o && (o = l, t = void 0, n = void 0), e.requireSource !== !1 && a.edits.some((c) => !c.source)) throw new x("missing");
|
|
209
|
-
const
|
|
211
|
+
const u = await r.save({
|
|
210
212
|
reportId: g,
|
|
211
213
|
params: E,
|
|
212
214
|
signal: i.signal,
|
|
213
215
|
requestId: a.requestId,
|
|
214
216
|
action: i.action,
|
|
215
|
-
edits:
|
|
216
|
-
expectedRevision:
|
|
217
|
-
sourceToken:
|
|
217
|
+
edits: h(a.edits),
|
|
218
|
+
expectedRevision: y(e.expectedRevision, a.edits, "revision", t),
|
|
219
|
+
sourceToken: y(e.sourceToken, a.edits, "sourceToken", n)
|
|
218
220
|
});
|
|
219
221
|
if (i.signal.aborted) throw i.signal.reason ?? new DOMException("Aborted", "AbortError");
|
|
220
|
-
|
|
221
|
-
const p =
|
|
222
|
-
if (p?.length) throw new
|
|
223
|
-
const
|
|
224
|
-
return d(
|
|
222
|
+
b(u, a.edits.length), u.diagnostics?.forEach((c) => _(() => e.onDiagnostic?.(c)));
|
|
223
|
+
const p = u.diagnostics?.filter((c) => c.severity === "error");
|
|
224
|
+
if (p?.length) throw new f("edit", p.map((c) => c.message).join(";"), { diagnostics: p });
|
|
225
|
+
const T = u.conflicts?.map((c) => ({ source: a.edits[c.editIndex]?.source, address: a.edits[c.editIndex]?.address, message: c.message }));
|
|
226
|
+
return d(u, l, S), { revision: u.revision, sourceToken: u.sourceToken, conflicts: T };
|
|
225
227
|
}
|
|
226
228
|
return {
|
|
227
229
|
requireSource: e.requireSource ?? !0,
|
|
228
230
|
canEdit: e.canEdit,
|
|
229
231
|
validate: e.validate,
|
|
230
232
|
saveBatch: P,
|
|
231
|
-
save: (a, i) => P({ requestId:
|
|
233
|
+
save: (a, i) => P({ requestId: q(i), edits: [h(a)] }, i)
|
|
232
234
|
};
|
|
233
235
|
}
|
|
234
236
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
Re as DEFAULT_CALCULATION_MESSAGES,
|
|
238
|
+
he as DEFAULT_MESSAGES,
|
|
239
|
+
we as DEFAULT_PRINT_MESSAGES,
|
|
240
|
+
ye as DEFAULT_THEME,
|
|
241
|
+
qe as MACH_REPORT_CONFIG_KEY,
|
|
239
242
|
C as MACH_REPORT_CONTROLLER_KEY,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
Ue as MACH_REPORT_FETCHER_KEY,
|
|
244
|
+
je as MACH_REPORT_PDF_EXPORTER_KEY,
|
|
245
|
+
f as MachReportError,
|
|
246
|
+
Ne as MachReportPreview,
|
|
247
|
+
Se as PARAM_OPTIONS_MESSAGES,
|
|
244
248
|
R as PlanLoadError,
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
249
|
+
Z as REPORT_EXPORT_FORMATS,
|
|
250
|
+
Q as REPORT_PREVIEW_TOOLS,
|
|
251
|
+
ee as ReportPagination,
|
|
252
|
+
Te as ReportParamPanel,
|
|
253
|
+
re as ReportPreview,
|
|
254
|
+
te as ReportPrintResourceError,
|
|
255
|
+
ne as ReportToolbar,
|
|
256
|
+
ve as SILENT_LOGGER,
|
|
257
|
+
oe as buildPrintDocument,
|
|
258
|
+
se as buildWordHtml,
|
|
259
|
+
ae as createDefaultPdfExporter,
|
|
260
|
+
ie as createFetchRequest,
|
|
261
|
+
Y as createLocalFetcher,
|
|
262
|
+
ce as createPrintCalibrationPlan,
|
|
263
|
+
V as createProviderEditing,
|
|
264
|
+
ue as createReportStoragePreferences,
|
|
265
|
+
xe as defineMachReportConfig,
|
|
266
|
+
Ce as defineMachReportPreset,
|
|
267
|
+
fe as joinReportIds,
|
|
268
|
+
He as machReportPlugin,
|
|
269
|
+
de as normalizeReportIds,
|
|
270
|
+
Ae as normalizeReportLoadError,
|
|
271
|
+
ge as preparePrintResources,
|
|
272
|
+
Oe as printCalibration,
|
|
273
|
+
le as printPlans,
|
|
274
|
+
Ie as provideMachReportConfig,
|
|
275
|
+
Me as resolveCalculationMessages,
|
|
276
|
+
_e as resolveConfig,
|
|
277
|
+
De as snapshotPrintOptions,
|
|
278
|
+
ke as themeToCssVars,
|
|
279
|
+
Fe as toErrorDetail,
|
|
280
|
+
K as useMachReport,
|
|
281
|
+
be as useMachReportConfig,
|
|
282
|
+
pe as usePageWindow,
|
|
283
|
+
me as usePrintExport,
|
|
284
|
+
$ as useReportPreview,
|
|
285
|
+
Pe as useZoom
|
|
277
286
|
};
|