@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/designer.js
CHANGED
|
@@ -1,4314 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { resolveGridLayout as Ie, parseReportTemplate as re, serializeReportTemplate as Se, validateReportTemplateDocument as kt } from "@agile-team/mach-report";
|
|
4
|
-
import { _ as Ce, a as me } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
-
import { r as Vt, a as jt, b as Wt, i as xt, c as Ut } from "./record-bindings-D-5jQlTj.js";
|
|
6
|
-
import { c as Kt } from "./tree-CqcQ99NM.js";
|
|
7
|
-
import { r as Ke } from "./style-CQ1PK8ZB.js";
|
|
8
|
-
function qt(t, u, o = 3) {
|
|
9
|
-
if (!t.tree) return u.slice(0, o).map((i) => t.columns.map((a) => Vt(t, a, i)));
|
|
10
|
-
if (u.length > 200) return [];
|
|
11
|
-
try {
|
|
12
|
-
return Kt(u, { ...t.tree, maxRows: Math.min(200, t.tree.maxRows ?? 200), maxAggregationVisits: Math.min(2e3, t.tree.maxAggregationVisits ?? 2e3) }, { computed: t.computed?.length ? { fields: t.computed, maxRows: 200, maxCells: 4096 } : void 0 }).entries.slice(0, o).map((a) => t.columns.map((d) => jt(t, d, a)));
|
|
13
|
-
} catch {
|
|
14
|
-
return [];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
const dt = 96 / 25.4;
|
|
18
|
-
function Ye(t) {
|
|
19
|
-
return t.kind === "list" ? Math.max(
|
|
20
|
-
16,
|
|
21
|
-
(t.headerGrid?.rowHeightsMm?.reduce(
|
|
22
|
-
(u, o) => u + o,
|
|
23
|
-
0
|
|
24
|
-
) ?? 8) + (t.rowHeightMm ?? 8) * 3
|
|
25
|
-
) : t.heightMm;
|
|
26
|
-
}
|
|
27
|
-
function ge(t) {
|
|
28
|
-
return {
|
|
29
|
-
leftMm: t.leftMm,
|
|
30
|
-
topMm: t.topMm,
|
|
31
|
-
widthMm: t.widthMm,
|
|
32
|
-
heightMm: Ye(t)
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function Pe(t, u) {
|
|
36
|
-
return u ? t.template.pages[u.pageIndex]?.components[u.componentIndex] : void 0;
|
|
37
|
-
}
|
|
38
|
-
function Jt(t, u = "detail") {
|
|
39
|
-
const o = { leftMm: 10, topMm: 10, widthMm: 60, heightMm: 10 };
|
|
40
|
-
return t === "qrcode" ? { ...o, kind: t, widthMm: 22, heightMm: 22, code: { value: "MACHREPORT", errorCorrection: "M", quietZoneModules: 4 } } : t === "barcode" ? { ...o, kind: t, widthMm: 50, heightMm: 16, code: { value: "MR20261022", symbology: "code128", quietZoneModules: 10, showText: !0 } } : t === "list" ? {
|
|
41
|
-
kind: t,
|
|
42
|
-
leftMm: 10,
|
|
43
|
-
topMm: 30,
|
|
44
|
-
widthMm: 90,
|
|
45
|
-
dataset: u,
|
|
46
|
-
columns: [
|
|
47
|
-
{ header: "字段", field: "field", widthMm: 45 },
|
|
48
|
-
{ header: "数值", field: "value", widthMm: 45 }
|
|
49
|
-
],
|
|
50
|
-
border: !0,
|
|
51
|
-
headerBackgroundColor: "#eaf2fc",
|
|
52
|
-
headerAlign: "center"
|
|
53
|
-
} : t === "text" ? {
|
|
54
|
-
...o,
|
|
55
|
-
kind: t,
|
|
56
|
-
text: "文本",
|
|
57
|
-
style: { fontSize: 12, color: "#233c5c" }
|
|
58
|
-
} : t === "rect" ? {
|
|
59
|
-
...o,
|
|
60
|
-
kind: t,
|
|
61
|
-
style: {
|
|
62
|
-
borderColor: "#cbd5e1",
|
|
63
|
-
lineWidthPt: 0.75,
|
|
64
|
-
backgroundColor: "#eff6ff"
|
|
65
|
-
}
|
|
66
|
-
} : {
|
|
67
|
-
...o,
|
|
68
|
-
kind: t,
|
|
69
|
-
widthMm: 48,
|
|
70
|
-
heightMm: 24,
|
|
71
|
-
imageData: `data:image/svg+xml;charset=utf-8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="180" height="90" viewBox="0 0 180 90"><rect width="180" height="90" rx="5" fill="#eff6ff"/><path d="m25 68 32-32 25 23 27-35 45 44" fill="none" stroke="#94b8e5" stroke-width="3"/><circle cx="45" cy="24" r="7" fill="#bfd5ef"/></svg>')}`
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
function qe(t, u, o = !1) {
|
|
75
|
-
const i = Math.max(2, Math.min(u.widthMm, t.widthMm)), a = Math.max(2, Math.min(u.heightMm, t.heightMm));
|
|
76
|
-
return {
|
|
77
|
-
leftMm: Math.max(0, Math.min(u.widthMm - i, t.leftMm)),
|
|
78
|
-
topMm: Math.max(
|
|
79
|
-
0,
|
|
80
|
-
Math.min(u.heightMm - (o ? 2 : a), t.topMm)
|
|
81
|
-
),
|
|
82
|
-
widthMm: i,
|
|
83
|
-
heightMm: a
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function Ne(t, u) {
|
|
87
|
-
const o = t.widthMm;
|
|
88
|
-
if (Object.assign(t, {
|
|
89
|
-
leftMm: u.leftMm,
|
|
90
|
-
topMm: u.topMm,
|
|
91
|
-
widthMm: u.widthMm
|
|
92
|
-
}), t.kind !== "list") t.heightMm = u.heightMm;
|
|
93
|
-
else if (o > 0 && u.widthMm !== o) {
|
|
94
|
-
const i = u.widthMm / o;
|
|
95
|
-
t.columns.forEach((a) => {
|
|
96
|
-
a.widthMm = Math.round(a.widthMm * i * 100) / 100;
|
|
97
|
-
}), t.widthMm = t.columns.reduce(
|
|
98
|
-
(a, d) => a + d.widthMm,
|
|
99
|
-
0
|
|
100
|
-
), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map(
|
|
101
|
-
(a) => a.widthMm
|
|
102
|
-
));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
function Yt(t, u, o) {
|
|
106
|
-
if (u === o || !t.columns[u] || !t.columns[o]) return !1;
|
|
107
|
-
if (t.headerGrid) {
|
|
108
|
-
if (Ie(t.headerGrid, t.widthMm, 100).cells.some(({ cell: d }) => (d.colSpan ?? 1) > 1))
|
|
109
|
-
throw new Error("请先拆分跨列合并表头,再调整列顺序,避免改变业务分组。");
|
|
110
|
-
const a = Xe(t);
|
|
111
|
-
a.forEach((d) => {
|
|
112
|
-
d.splice(o, 0, d.splice(u, 1)[0]);
|
|
113
|
-
}), t.headerGrid = Ze(
|
|
114
|
-
a,
|
|
115
|
-
t.columns.map((d) => d.widthMm),
|
|
116
|
-
t.headerGrid.rowHeightsMm ?? a.map(() => 8)
|
|
117
|
-
);
|
|
118
|
-
}
|
|
119
|
-
return t.columns.splice(o, 0, t.columns.splice(u, 1)[0]), t.headerGrid && (t.headerGrid.colWidthsMm = t.columns.map((i) => i.widthMm)), !0;
|
|
120
|
-
}
|
|
121
|
-
function Xe(t) {
|
|
122
|
-
if (!t.headerGrid)
|
|
123
|
-
return [t.columns.map((o) => ({ text: o.header }))];
|
|
124
|
-
const u = Array.from(
|
|
125
|
-
{ length: t.headerGrid.cells.length },
|
|
126
|
-
() => Array.from({ length: t.columns.length }, () => null)
|
|
127
|
-
);
|
|
128
|
-
for (const { cell: o, ri: i, ci: a } of Ie(
|
|
129
|
-
t.headerGrid,
|
|
130
|
-
t.widthMm,
|
|
131
|
-
100
|
|
132
|
-
).cells)
|
|
133
|
-
u[i][a] = o;
|
|
134
|
-
return u;
|
|
135
|
-
}
|
|
136
|
-
function Ze(t, u, o) {
|
|
137
|
-
const i = /* @__PURE__ */ new Set();
|
|
138
|
-
return { cells: t.map(
|
|
139
|
-
(d, p) => d.flatMap((M, b) => {
|
|
140
|
-
if (i.has(`${p}:${b}`)) return [];
|
|
141
|
-
if (!M) return [null];
|
|
142
|
-
for (let g = p; g < p + (M.rowSpan ?? 1); g++)
|
|
143
|
-
for (let k = b; k < b + (M.colSpan ?? 1); k++)
|
|
144
|
-
(g !== p || k !== b) && i.add(`${g}:${k}`);
|
|
145
|
-
return [M];
|
|
146
|
-
})
|
|
147
|
-
), colWidthsMm: u, rowHeightsMm: o };
|
|
148
|
-
}
|
|
149
|
-
function Xt(t) {
|
|
150
|
-
const u = Xe(t), o = t.headerGrid?.rowHeightsMm ?? u.map(() => 8);
|
|
151
|
-
u.unshift(
|
|
152
|
-
t.columns.map(() => ({
|
|
153
|
-
text: "分组",
|
|
154
|
-
style: { align: "center", backgroundColor: "#eaf2fc", bold: !0 }
|
|
155
|
-
}))
|
|
156
|
-
), t.headerGrid = Ze(
|
|
157
|
-
u,
|
|
158
|
-
t.columns.map((i) => i.widthMm),
|
|
159
|
-
[8, ...o]
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
function Zt(t, u, o, i) {
|
|
163
|
-
if (o >= i || o < 0 || i >= t.columns.length)
|
|
164
|
-
throw new Error("请选择同一行的至少两个连续表头。");
|
|
165
|
-
const a = Xe(t), d = a[u];
|
|
166
|
-
if (!d) throw new Error("表头行不存在。");
|
|
167
|
-
const p = d.slice(o, i + 1);
|
|
168
|
-
if (p.some(
|
|
169
|
-
(b) => !b || (b.colSpan ?? 1) !== 1 || (b.rowSpan ?? 1) !== 1
|
|
170
|
-
))
|
|
171
|
-
throw new Error("选择包含合并区域,请先拆分,再重新合并。");
|
|
172
|
-
const M = p[0];
|
|
173
|
-
d[o] = { ...M, colSpan: i - o + 1 };
|
|
174
|
-
for (let b = o + 1; b <= i; b++) d[b] = null;
|
|
175
|
-
t.headerGrid = Ze(
|
|
176
|
-
a,
|
|
177
|
-
t.columns.map((b) => b.widthMm),
|
|
178
|
-
t.headerGrid?.rowHeightsMm ?? [8]
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
function Qt(t, u, o) {
|
|
182
|
-
if (!t.headerGrid) return;
|
|
183
|
-
const a = Ie(t.headerGrid, t.widthMm, 100).cells.find(
|
|
184
|
-
({ ri: g, ci: k, cell: E }) => u >= g && u < g + (E.rowSpan ?? 1) && o >= k && o < k + (E.colSpan ?? 1)
|
|
185
|
-
);
|
|
186
|
-
if (!a) return;
|
|
187
|
-
const d = Xe(t), { ri: p, ci: M, cell: b } = a;
|
|
188
|
-
for (let g = p; g < p + (b.rowSpan ?? 1); g++)
|
|
189
|
-
for (let k = M; k < M + (b.colSpan ?? 1); k++) {
|
|
190
|
-
const E = {
|
|
191
|
-
...b,
|
|
192
|
-
text: g === d.length - 1 ? t.columns[k].header : b.text
|
|
193
|
-
};
|
|
194
|
-
delete E.colSpan, delete E.rowSpan, d[g][k] = E;
|
|
195
|
-
}
|
|
196
|
-
t.headerGrid = Ze(
|
|
197
|
-
d,
|
|
198
|
-
t.columns.map((g) => g.widthMm),
|
|
199
|
-
t.headerGrid.rowHeightsMm ?? d.map(() => 8)
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
function en(t) {
|
|
203
|
-
const u = q(), o = q(0.8), i = q(0), a = q(0), d = D(() => o.value * dt), p = D(() => t.document.template.pages[t.pageIndex]), M = D(() => p.value.widthMm * d.value > a.value - 40);
|
|
204
|
-
let b, g = !!t.document.template.repeat;
|
|
205
|
-
function k(s) {
|
|
206
|
-
const v = u.value;
|
|
207
|
-
if (!v || v.clientWidth <= 40 || v.clientHeight <= 40) return;
|
|
208
|
-
let y = { leftMm: 0, topMm: 0, widthMm: p.value.widthMm, heightMm: p.value.heightMm };
|
|
209
|
-
const $ = t.selection?.pageIndex === t.pageIndex ? p.value.components[t.selection.componentIndex] : void 0;
|
|
210
|
-
s === "selection" && $ && (y = ge($));
|
|
211
|
-
const R = (v.clientWidth - 40) / (y.widthMm * dt), L = (v.clientHeight - 40) / (y.heightMm * dt);
|
|
212
|
-
o.value = Math.max(0.05, Math.min(2, s === "width" ? R : Math.min(R, L))), ue(() => {
|
|
213
|
-
v.scrollLeft = y.leftMm * d.value, v.scrollTop = y.topMm * d.value;
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
function E(s) {
|
|
217
|
-
g = !1, k(s);
|
|
218
|
-
}
|
|
219
|
-
function S(s) {
|
|
220
|
-
Number.isFinite(s) && (g = !1, o.value = Math.max(0.05, Math.min(2, s)));
|
|
221
|
-
}
|
|
222
|
-
function I() {
|
|
223
|
-
const s = u.value;
|
|
224
|
-
s && (a.value = s.clientWidth, i.value = s.scrollWidth > s.clientWidth ? Math.round(s.scrollLeft / (s.scrollWidth - s.clientWidth) * 100) : 0);
|
|
225
|
-
}
|
|
226
|
-
function C(s) {
|
|
227
|
-
const v = u.value;
|
|
228
|
-
v && (v.scrollLeft = (v.scrollWidth - v.clientWidth) * s / 100), i.value = s;
|
|
229
|
-
}
|
|
230
|
-
function w() {
|
|
231
|
-
I(), g && t.document.template.repeat && k("page");
|
|
232
|
-
}
|
|
233
|
-
async function x() {
|
|
234
|
-
await ue();
|
|
235
|
-
const s = u.value, v = t.selection;
|
|
236
|
-
if (!s || v?.pageIndex !== t.pageIndex) return;
|
|
237
|
-
const y = p.value.components[v.componentIndex];
|
|
238
|
-
if (!y) return;
|
|
239
|
-
const $ = ge(y);
|
|
240
|
-
if (y.kind === "list" && t.columnIndex !== void 0 && t.columnIndex >= 0) {
|
|
241
|
-
const j = y;
|
|
242
|
-
$.leftMm += j.columns.slice(0, t.columnIndex).reduce((oe, ce) => oe + ce.widthMm, 0), $.widthMm = j.columns[t.columnIndex]?.widthMm ?? $.widthMm;
|
|
243
|
-
}
|
|
244
|
-
const R = $.leftMm * d.value, L = $.topMm * d.value, H = R + $.widthMm * d.value, V = L + $.heightMm * d.value;
|
|
245
|
-
R < s.scrollLeft ? s.scrollLeft = R : H > s.scrollLeft + s.clientWidth - 40 && (s.scrollLeft = Math.max(0, Math.min(R, H - s.clientWidth + 40))), L < s.scrollTop ? s.scrollTop = L : V > s.scrollTop + s.clientHeight - 40 && (s.scrollTop = Math.max(0, Math.min(L, V - s.clientHeight + 40))), I();
|
|
246
|
-
}
|
|
247
|
-
return ae(() => [t.selection, t.columnIndex, t.pageIndex], () => {
|
|
248
|
-
x();
|
|
249
|
-
}), ae(() => t.document.id, () => {
|
|
250
|
-
g = !!t.document.template.repeat, ue(w);
|
|
251
|
-
}), ae(() => [!!t.document.template.repeat, t.pageIndex, p.value.widthMm, p.value.heightMm], () => {
|
|
252
|
-
ue(w);
|
|
253
|
-
}), _t(() => {
|
|
254
|
-
w(), typeof ResizeObserver < "u" && u.value && (b = new ResizeObserver(w), b.observe(u.value));
|
|
255
|
-
}), De(() => b?.disconnect()), { viewport: u, zoom: o, scale: d, page: p, wide: M, fraction: i, fit: E, setZoom: S, sync: I, navigate: C };
|
|
256
|
-
}
|
|
257
|
-
function tn(t, u, o) {
|
|
258
|
-
if (t.kind === "list") return { text: t.dataset };
|
|
259
|
-
const i = t.kind === "barcode" || t.kind === "qrcode" ? t.code?.value ?? t.fallbackText ?? t.text ?? "" : t.text ?? t.fallbackText ?? "";
|
|
260
|
-
return t.binding ? nn(t, u, o) : { text: i, ...t.imageData ? { image: t.imageData } : {} };
|
|
261
|
-
}
|
|
262
|
-
function nn(t, u, o) {
|
|
263
|
-
const i = t.binding, a = u.template.repeat, d = a ? o?.[a.dataset]?.[0] : void 0;
|
|
264
|
-
if (!d) return { text: i.field, bound: !0 };
|
|
265
|
-
try {
|
|
266
|
-
const p = Wt(i, d, { dataset: a?.dataset, rowIndex: 0 });
|
|
267
|
-
return t.kind === "image" && p && !xt(p) ? { text: i.field, bound: !0, error: "image-binding" } : { text: p, bound: !0, ...t.kind === "image" && xt(p) ? { image: p } : {} };
|
|
268
|
-
} catch (p) {
|
|
269
|
-
return { text: i.field, bound: !0, error: p instanceof Error ? p.message : String(p) };
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
function Ct(t, u) {
|
|
273
|
-
const i = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1e3].find((d) => d * u >= 36) ?? Math.max(1e3, Math.ceil(t / 200));
|
|
274
|
-
return Array.from({ length: Math.min(201, Math.floor(t / i) + 1) }, (d, p) => ({ mm: p * i, position: p * i * u }));
|
|
275
|
-
}
|
|
276
|
-
const ut = [
|
|
277
|
-
{ id: "label-80-55", widthMm: 80, heightMm: 55 },
|
|
278
|
-
{ id: "label-80-50", widthMm: 80, heightMm: 50 },
|
|
279
|
-
{ id: "label-100-60", widthMm: 100, heightMm: 60 },
|
|
280
|
-
{ id: "a4", widthMm: 210, heightMm: 297 },
|
|
281
|
-
{ id: "a3", widthMm: 297, heightMm: 420 }
|
|
282
|
-
];
|
|
283
|
-
function Je(t, u, o) {
|
|
284
|
-
return typeof t.meta?.title == "string" && t.meta.title.trim() ? t.meta.title : `${o} ${u + 1}`;
|
|
285
|
-
}
|
|
286
|
-
function Et(t) {
|
|
287
|
-
return t.components.flatMap((u, o) => {
|
|
288
|
-
const i = u.kind === "list" ? u.rowHeightMm ?? Ye(u) : u.heightMm;
|
|
289
|
-
return u.leftMm < 0 || u.topMm < 0 || u.leftMm + u.widthMm > t.widthMm + 1e-3 || u.topMm + i > t.heightMm + 1e-3 ? [o] : [];
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
function an(t, u) {
|
|
293
|
-
const o = JSON.parse(JSON.stringify(t)), i = new Set(u.flatMap((p) => p.components.map((M) => M.kind === "list" ? M.id : M.nid)).filter(Boolean)), a = /* @__PURE__ */ new Map();
|
|
294
|
-
let d = 0;
|
|
295
|
-
for (const p of o.components) {
|
|
296
|
-
const M = p.kind === "list" ? p.id : p.nid;
|
|
297
|
-
if (!M) continue;
|
|
298
|
-
let b;
|
|
299
|
-
do
|
|
300
|
-
b = `page-copy-${++d}`;
|
|
301
|
-
while (i.has(b));
|
|
302
|
-
i.add(b), a.set(M, b), p.kind === "list" ? p.id = b : (p.nid = b, delete p.rkey);
|
|
303
|
-
}
|
|
304
|
-
return o.flow?.bands.forEach((p) => {
|
|
305
|
-
p.componentIds = p.componentIds.map((M) => a.get(M) ?? M);
|
|
306
|
-
}), o;
|
|
307
|
-
}
|
|
308
|
-
function ln(t, u, o) {
|
|
309
|
-
const i = t.template.pages, a = i[u];
|
|
310
|
-
if (!a) return 0;
|
|
311
|
-
if (o.type === "patch")
|
|
312
|
-
return Object.assign(a, o.patch), u;
|
|
313
|
-
if (o.type === "remove")
|
|
314
|
-
return i.length <= 1 ? u : (i.splice(u, 1), Math.min(u, i.length - 1));
|
|
315
|
-
const d = o.type === "duplicate" ? an(a, i) : JSON.parse(JSON.stringify(a));
|
|
316
|
-
return o.type === "add" && (d.components = [], delete d.flow, delete d.meta), i.splice(u + 1, 0, d), u + 1;
|
|
317
|
-
}
|
|
318
|
-
function $t(t, u, o) {
|
|
319
|
-
const i = t.filter((a) => a !== u).flatMap((a) => {
|
|
320
|
-
const d = a[o], p = o === "leftMm" ? a.widthMm : Ye(a);
|
|
321
|
-
return [d, d + p / 2, d + p];
|
|
322
|
-
});
|
|
323
|
-
return [...new Set(i)].sort((a, d) => a - d);
|
|
324
|
-
}
|
|
325
|
-
function on(t, u) {
|
|
326
|
-
if (!t.length) return;
|
|
327
|
-
let o = 0, i = t.length;
|
|
328
|
-
for (; o < i; ) {
|
|
329
|
-
const p = o + i >>> 1;
|
|
330
|
-
t[p] < u ? o = p + 1 : i = p;
|
|
331
|
-
}
|
|
332
|
-
const a = t[Math.max(0, o - 1)], d = t[Math.min(t.length - 1, o)];
|
|
333
|
-
return Math.abs(a - u) < Math.abs(d - u) ? a : d;
|
|
334
|
-
}
|
|
335
|
-
function St(t, u, o, i) {
|
|
336
|
-
let a = 1 / 0, d = {
|
|
337
|
-
value: Math.round(t * 2) / 2
|
|
338
|
-
};
|
|
339
|
-
for (const p of [0, u / 2, u]) {
|
|
340
|
-
const M = on(o, t + p);
|
|
341
|
-
if (M === void 0) continue;
|
|
342
|
-
const b = Math.abs(M - t - p);
|
|
343
|
-
b <= i && b < a && (a = b, d = { value: M - p, guide: M });
|
|
344
|
-
}
|
|
345
|
-
return d;
|
|
346
|
-
}
|
|
347
|
-
function sn(t, u, o, i) {
|
|
348
|
-
if (i) {
|
|
349
|
-
const a = Math.abs(u) >= Math.abs(o) ? u : o, d = Math.round((t.widthMm + a) * 2) / 2;
|
|
350
|
-
return { ...t, widthMm: d, heightMm: d };
|
|
351
|
-
}
|
|
352
|
-
return { ...t, widthMm: Math.round((t.widthMm + u) * 2) / 2, heightMm: Math.round((t.heightMm + o) * 2) / 2 };
|
|
353
|
-
}
|
|
354
|
-
function rn(t) {
|
|
355
|
-
let u;
|
|
356
|
-
function o(i, a, d = !1) {
|
|
357
|
-
if (t.disabled() || i.button !== 0) return;
|
|
358
|
-
i.preventDefault(), i.stopPropagation(), u?.();
|
|
359
|
-
const p = i.currentTarget.closest(
|
|
360
|
-
"[data-canvas-component]"
|
|
361
|
-
), M = ge(a), b = i.clientX, g = i.clientY;
|
|
362
|
-
let k = M, E = 0;
|
|
363
|
-
const S = t.scale.value, I = p.parentElement;
|
|
364
|
-
let C, w;
|
|
365
|
-
const x = () => {
|
|
366
|
-
for (const [V, j] of [
|
|
367
|
-
["x", C],
|
|
368
|
-
["y", w]
|
|
369
|
-
])
|
|
370
|
-
I.style.setProperty(
|
|
371
|
-
`--mr-canvas-guide-${V}-display`,
|
|
372
|
-
j === void 0 ? "none" : "block"
|
|
373
|
-
), j !== void 0 && I.style.setProperty(
|
|
374
|
-
`--mr-canvas-guide-${V}`,
|
|
375
|
-
`${j * S}px`
|
|
376
|
-
);
|
|
377
|
-
}, s = () => {
|
|
378
|
-
E = 0, x(), p.style.left = `${k.leftMm * S}px`, p.style.top = `${k.topMm * S}px`, p.style.width = `${k.widthMm * S}px`, p.style.height = `${k.heightMm * S}px`;
|
|
379
|
-
}, v = {
|
|
380
|
-
leftMm: $t(t.page().components, a, "leftMm"),
|
|
381
|
-
topMm: $t(t.page().components, a, "topMm")
|
|
382
|
-
}, y = (V) => {
|
|
383
|
-
const j = (V.clientX - b) / S, oe = (V.clientY - g) / S, ce = St(
|
|
384
|
-
M.leftMm + j,
|
|
385
|
-
M.widthMm,
|
|
386
|
-
v.leftMm,
|
|
387
|
-
5 / S
|
|
388
|
-
), r = St(
|
|
389
|
-
M.topMm + oe,
|
|
390
|
-
M.heightMm,
|
|
391
|
-
v.topMm,
|
|
392
|
-
5 / S
|
|
393
|
-
);
|
|
394
|
-
C = d ? void 0 : ce.guide, w = d ? void 0 : r.guide, k = qe(
|
|
395
|
-
d ? sn(M, j, oe, a.kind === "qrcode") : { ...M, leftMm: ce.value, topMm: r.value },
|
|
396
|
-
t.page(),
|
|
397
|
-
a.kind === "list"
|
|
398
|
-
), d && a.kind === "qrcode" && (k.widthMm = k.heightMm = Math.min(k.widthMm, k.heightMm)), E || (E = requestAnimationFrame(s));
|
|
399
|
-
}, $ = (V) => {
|
|
400
|
-
window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", L), window.removeEventListener("keydown", H), E && cancelAnimationFrame(E), k = V ? k : M, C = void 0, w = void 0, s(), u = void 0, V && JSON.stringify(k) !== JSON.stringify(M) && t.commit(k);
|
|
401
|
-
}, R = () => $(!0), L = () => $(!1), H = (V) => {
|
|
402
|
-
V.key === "Escape" && (V.preventDefault(), L());
|
|
403
|
-
};
|
|
404
|
-
window.addEventListener("pointermove", y), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", L), window.addEventListener("keydown", H), u = L;
|
|
405
|
-
}
|
|
406
|
-
return ae(t.disabled, (i) => {
|
|
407
|
-
i && u?.();
|
|
408
|
-
}), ae(t.page, () => u?.()), De(() => u?.()), { start: o };
|
|
409
|
-
}
|
|
410
|
-
const dn = {
|
|
411
|
-
title: "报表模板设计器",
|
|
412
|
-
heading: "模板设计",
|
|
413
|
-
unpublished: "未发布",
|
|
414
|
-
dirty: "有未保存修改",
|
|
415
|
-
reset: "恢复草稿",
|
|
416
|
-
saving: "正在保存…",
|
|
417
|
-
save: "保存草稿",
|
|
418
|
-
name: "模板名称",
|
|
419
|
-
description: "说明",
|
|
420
|
-
area: "明细区域",
|
|
421
|
-
page: "页",
|
|
422
|
-
header: "表头",
|
|
423
|
-
field: "业务字段",
|
|
424
|
-
width: "列宽(mm)",
|
|
425
|
-
semantic: "字段语义",
|
|
426
|
-
identifier: "编号",
|
|
427
|
-
dimension: "分类",
|
|
428
|
-
measure: "数值",
|
|
429
|
-
date: "日期",
|
|
430
|
-
text: "文本",
|
|
431
|
-
bodyAlign: "正文对齐",
|
|
432
|
-
headerAlign: "表头对齐",
|
|
433
|
-
auto: "按字段语义",
|
|
434
|
-
left: "居左",
|
|
435
|
-
center: "居中",
|
|
436
|
-
right: "居右",
|
|
437
|
-
justify: "两端对齐",
|
|
438
|
-
editable: "允许编辑",
|
|
439
|
-
json: "完整模板 JSON",
|
|
440
|
-
applyJson: "校验并应用 JSON",
|
|
441
|
-
note: "字段映射应与数据源契约一致。此编辑器维护模板属性;保存由接入方提供的版本服务处理。",
|
|
442
|
-
invalid: "请先修正模板错误,再预览或保存。"
|
|
443
|
-
}, un = {
|
|
444
|
-
paperAndPages: "纸张与版面",
|
|
445
|
-
pageDirectory: "版面目录",
|
|
446
|
-
pageName: "版面名称",
|
|
447
|
-
addPage: "新增版面",
|
|
448
|
-
duplicatePage: "复制版面",
|
|
449
|
-
removePage: "删除版面",
|
|
450
|
-
removePageConfirm: "此版面包含组件,删除后可通过撤销恢复。",
|
|
451
|
-
confirmRemovePage: "确认删除",
|
|
452
|
-
paperPreset: "纸张规格",
|
|
453
|
-
labelPaper: "标签",
|
|
454
|
-
customPaper: "自定义尺寸",
|
|
455
|
-
paperWidth: "纸宽(mm)",
|
|
456
|
-
paperHeight: "纸高(mm)",
|
|
457
|
-
pageLayout: "展示方式",
|
|
458
|
-
fixedPaper: "固定纸张",
|
|
459
|
-
completeWide: "完整宽表",
|
|
460
|
-
pageMargins: "页边距 · mm",
|
|
461
|
-
marginTop: "上边距",
|
|
462
|
-
marginRight: "右边距",
|
|
463
|
-
marginBottom: "下边距",
|
|
464
|
-
marginLeft: "左边距",
|
|
465
|
-
pageOverflow: "{count} 个组件超出纸张",
|
|
466
|
-
pageOverflowHint: "内容位置和尺寸已保留,请调整组件或纸张后核对打印预览。",
|
|
467
|
-
locateOverflow: "定位超界组件",
|
|
468
|
-
repeatRecords: "按记录生成标签",
|
|
469
|
-
repeatRecordsHint: "每条记录按版面顺序生成,支持多版与多份。",
|
|
470
|
-
recordDataset: "记录数据集",
|
|
471
|
-
recordRowKey: "记录主键字段(可选)",
|
|
472
|
-
labelCopies: "份数来源",
|
|
473
|
-
fixedCopies: "固定份数",
|
|
474
|
-
fieldCopies: "记录字段",
|
|
475
|
-
copiesPerRecord: "每条记录份数",
|
|
476
|
-
copiesField: "份数字段",
|
|
477
|
-
repeatBoundHint: "已有组件绑定此记录;移除全部字段绑定后可关闭。",
|
|
478
|
-
repeatOrderHint: "生成顺序:记录 → 份数 → 版面;预览会使用提供的真实样例。",
|
|
479
|
-
repeatNeedsFixed: "先使用固定纸张、将组件置于纸内,并移除明细表或流式区域。",
|
|
480
|
-
dataBinding: "记录绑定",
|
|
481
|
-
contentSource: "内容来源",
|
|
482
|
-
staticContent: "固定内容",
|
|
483
|
-
recordField: "记录字段",
|
|
484
|
-
bindingField: "绑定字段",
|
|
485
|
-
bindingNeedsRepeat: "先在“模板”开启按记录生成,再选择字段。",
|
|
486
|
-
bindingRecordHint: "字段随当前记录变化,空值与真实的 0 分开处理。",
|
|
487
|
-
bindingImageHint: "图片字段使用 PNG/JPEG base64 data URL;空值不显示,业务 URL 由接入方安全加载。",
|
|
488
|
-
valueFormat: "值格式",
|
|
489
|
-
naturalFormat: "原始显示",
|
|
490
|
-
numberFormat: "数值",
|
|
491
|
-
percentFormat: "百分比",
|
|
492
|
-
dateFormat: "日期",
|
|
493
|
-
decimalPlaces: "小数位",
|
|
494
|
-
datePattern: "日期格式",
|
|
495
|
-
bindingDecoration: "前后缀与空值",
|
|
496
|
-
valuePrefix: "前缀",
|
|
497
|
-
valueSuffix: "后缀",
|
|
498
|
-
emptyValueText: "空值显示",
|
|
499
|
-
insertQrcode: "二维码",
|
|
500
|
-
insertBarcode: "条形码",
|
|
501
|
-
codeSettings: "编码设置",
|
|
502
|
-
codeAdvancedSettings: "纠错、留白与使用说明",
|
|
503
|
-
codeValue: "固定编码内容",
|
|
504
|
-
codeSymbology: "条码制式",
|
|
505
|
-
codeCorrection: "二维码纠错",
|
|
506
|
-
codeQuietZone: "留白(模块)",
|
|
507
|
-
codeShowText: "显示条码文字",
|
|
508
|
-
eanContentHint: "使用完整的 8 / 13 位数字,包含有效校验位;切换制式不会改写内容。",
|
|
509
|
-
code39ContentHint: "支持大写字母、数字、空格与 - . $ / + %;内容不会自动转换。",
|
|
510
|
-
code128ContentHint: "支持可打印 ASCII 内容;中文请使用二维码。",
|
|
511
|
-
codePlaceholder: "编码区域",
|
|
512
|
-
codePreviewHint: "设计中显示内容标识;切换预览核对实际编码。",
|
|
513
|
-
boundImagePlaceholder: "记录图片",
|
|
514
|
-
rulerLabel: "毫米标尺",
|
|
515
|
-
rulerToggle: "标尺",
|
|
516
|
-
designSample: "样例",
|
|
517
|
-
repeatPage: "每页重复",
|
|
518
|
-
repeatNone: "不重复",
|
|
519
|
-
repeatHeader: "页眉",
|
|
520
|
-
repeatFooter: "页脚",
|
|
521
|
-
textFormat: "文字样式",
|
|
522
|
-
fontSize: "字号(pt)",
|
|
523
|
-
fontBold: "加粗",
|
|
524
|
-
textColor: "文字颜色",
|
|
525
|
-
backgroundColor: "背景颜色",
|
|
526
|
-
canvasGridLimited: "设计窗口仅显示前 2000 个单元格;最终预览与导出保留完整内容。",
|
|
527
|
-
design: "设计",
|
|
528
|
-
preview: "预览",
|
|
529
|
-
componentSection: "组件",
|
|
530
|
-
toolsSection: "工具",
|
|
531
|
-
component: "组件",
|
|
532
|
-
components: "组件目录",
|
|
533
|
-
canvasHint: "点击选择 · 拖动移动 · 方向键微调 · Shift 加速 · Esc 取消",
|
|
534
|
-
zoom: "缩放",
|
|
535
|
-
sampleRows: "数据预览区域",
|
|
536
|
-
treeSampleHint: "树形样例需完整且有界,请在报表预览中验证",
|
|
537
|
-
resizeComponent: "调整组件尺寸",
|
|
538
|
-
resizeColumn: "调整列宽",
|
|
539
|
-
insertComponent: "添加组件",
|
|
540
|
-
insertText: "文本",
|
|
541
|
-
insertList: "明细表",
|
|
542
|
-
insertImage: "图片",
|
|
543
|
-
insertRect: "矩形",
|
|
544
|
-
chartComponent: "图表",
|
|
545
|
-
lineComponent: "线条",
|
|
546
|
-
ellipseComponent: "椭圆",
|
|
547
|
-
removeComponent: "删除组件",
|
|
548
|
-
duplicateComponent: "复制组件",
|
|
549
|
-
forward: "向上移动层级",
|
|
550
|
-
backward: "向下移动层级",
|
|
551
|
-
positionGroup: "位置与尺寸 · mm",
|
|
552
|
-
componentContent: "组件内容",
|
|
553
|
-
componentText: "文本内容",
|
|
554
|
-
imageSource: "图片地址或 data URI",
|
|
555
|
-
imageUpload: "上传图片",
|
|
556
|
-
imageBudget: "图片不超过 4 MB,支持 PNG/JPEG/WebP/SVG",
|
|
557
|
-
leftPosition: "左侧",
|
|
558
|
-
topPosition: "顶部",
|
|
559
|
-
componentWidth: "宽度",
|
|
560
|
-
componentHeight: "高度",
|
|
561
|
-
noComponent: "在画布或目录选择组件",
|
|
562
|
-
listDataset: "数据集",
|
|
563
|
-
columnOrder: "列结构",
|
|
564
|
-
moveColumnLeft: "向前移动列",
|
|
565
|
-
moveColumnRight: "向后移动列",
|
|
566
|
-
columnVisible: "显示此列",
|
|
567
|
-
headerStructure: "多层表头",
|
|
568
|
-
addHeaderRow: "添加分组行",
|
|
569
|
-
mergeHeader: "合并所选表头",
|
|
570
|
-
splitHeader: "拆分表头",
|
|
571
|
-
headerRow: "表头行",
|
|
572
|
-
headerFirst: "开始列",
|
|
573
|
-
headerLast: "结束列",
|
|
574
|
-
flowLayout: "区域版式由 Excel 绑定向导管理;可编辑字段、格式与业务规则。",
|
|
575
|
-
paramsTool: "查询参数",
|
|
576
|
-
excelTool: "Excel 绑定",
|
|
577
|
-
rulesTool: "计算与规则",
|
|
578
|
-
reviewTool: "发布检查",
|
|
579
|
-
toolsDescription: "按需绑定数据、定义规则并验证模板。",
|
|
580
|
-
unapplied: "待应用",
|
|
581
|
-
pendingToolsLabel: "待处理配置",
|
|
582
|
-
pendingToolsHint: "应用或恢复后可保存",
|
|
583
|
-
saveReadonly: "当前为只读,无法保存",
|
|
584
|
-
saveConfirmation: "请先处理修改确认",
|
|
585
|
-
saveUnchanged: "没有需要保存的修改",
|
|
586
|
-
saveInvalid: "模板有错误,请先修正",
|
|
587
|
-
saveJsonPending: "完整 JSON 待应用",
|
|
588
|
-
returnToConfiguration: "返回配置",
|
|
589
|
-
rulesNeedList: "请先在字段区域选择明细表。",
|
|
590
|
-
undo: "撤销",
|
|
591
|
-
redo: "重做",
|
|
592
|
-
columnsSearch: "搜索列名或字段",
|
|
593
|
-
columnsSelected: "已选列",
|
|
594
|
-
selectVisible: "选择当前结果",
|
|
595
|
-
clearSelection: "清除选择",
|
|
596
|
-
noColumns: "没有匹配的列",
|
|
597
|
-
batchBody: "批量正文对齐",
|
|
598
|
-
batchHeader: "批量表头对齐",
|
|
599
|
-
chooseAlignment: "选择对齐方式",
|
|
600
|
-
discardTitle: "保留当前修改?",
|
|
601
|
-
discardDescription: "当前包含未保存的属性或尚未应用的 JSON,继续将丢弃这些修改。",
|
|
602
|
-
keepEditing: "继续编辑",
|
|
603
|
-
discard: "丢弃修改并继续",
|
|
604
|
-
jsonPending: "JSON 尚未应用。请先校验并应用,或撤销 JSON 修改后继续属性编辑与保存。",
|
|
605
|
-
fieldsSection: "字段",
|
|
606
|
-
templateSection: "模板",
|
|
607
|
-
advancedSection: "高级",
|
|
608
|
-
sectionsLabel: "模板设置分区",
|
|
609
|
-
columnDirectory: "字段目录",
|
|
610
|
-
columnProperties: "字段属性",
|
|
611
|
-
selectColumn: "选择字段",
|
|
612
|
-
clearSearch: "清除搜索",
|
|
613
|
-
fieldsCount: "个字段",
|
|
614
|
-
templateDetails: "模板信息",
|
|
615
|
-
advancedTitle: "完整配置",
|
|
616
|
-
advancedDescription: "用于批量迁移或配置复杂模板。应用前会校验;未应用的内容会受到草稿保护。",
|
|
617
|
-
templateIdentity: "模板标识",
|
|
618
|
-
templateRevision: "当前修订",
|
|
619
|
-
readonly: "只读",
|
|
620
|
-
ready: "可编辑",
|
|
621
|
-
previewTitle: "实时预览",
|
|
622
|
-
contentGroup: "内容",
|
|
623
|
-
formatGroup: "格式",
|
|
624
|
-
autoShort: "自动",
|
|
625
|
-
previousColumn: "上一字段",
|
|
626
|
-
nextColumn: "下一字段",
|
|
627
|
-
closeDirectory: "关闭字段目录",
|
|
628
|
-
technicalDetails: "标识与修订",
|
|
629
|
-
fieldPosition: "当前字段",
|
|
630
|
-
previewFieldDirectory: "定位字段"
|
|
631
|
-
}, Ee = {
|
|
632
|
-
fitWidth: "适宽",
|
|
633
|
-
fitPage: "适页",
|
|
634
|
-
fitSelection: "选区",
|
|
635
|
-
wideNavigation: "宽表导航",
|
|
636
|
-
alignSelection: "对齐选区",
|
|
637
|
-
leftEdges: "左对齐",
|
|
638
|
-
centers: "水平居中",
|
|
639
|
-
rightEdges: "右对齐",
|
|
640
|
-
topEdges: "顶对齐",
|
|
641
|
-
middles: "垂直居中",
|
|
642
|
-
bottomEdges: "底对齐",
|
|
643
|
-
horizontalSpacing: "水平等距",
|
|
644
|
-
verticalSpacing: "垂直等距",
|
|
645
|
-
lockSelection: "锁定位置",
|
|
646
|
-
unlockSelection: "解锁位置",
|
|
647
|
-
sessionLock: "位置锁定仅当前设计会话有效。",
|
|
648
|
-
toolsPending: "工具中还有未应用的配置,请先应用或恢复后再保存模板。",
|
|
649
|
-
...dn,
|
|
650
|
-
...un
|
|
651
|
-
}, cn = { class: "mr-canvas" }, mn = { class: "mr-canvas-heading" }, vn = { class: "mr-canvas-sheet-info" }, pn = ["title"], gn = ["title"], hn = { class: "mr-canvas-gesture-hint" }, fn = { class: "mr-canvas-toolbar" }, bn = { class: "mr-canvas-view-tools" }, yn = ["aria-pressed"], wn = ["disabled"], Mn = ["value", "aria-label"], kn = ["value"], xn = ["width", "aria-label"], Cn = ["transform"], $n = {
|
|
652
|
-
x: "3",
|
|
653
|
-
y: "9"
|
|
654
|
-
}, Sn = ["height"], _n = ["transform"], In = {
|
|
655
|
-
x: "3",
|
|
656
|
-
y: "10"
|
|
657
|
-
}, En = ["data-canvas-component", "aria-label", "aria-pressed", "tabindex", "onFocus", "onPointerdown", "onClick", "onKeydown"], Rn = { class: "mr-canvas-table" }, Pn = {
|
|
658
|
-
key: 1,
|
|
659
|
-
class: "mr-canvas-table-row is-header"
|
|
660
|
-
}, Tn = ["onPointerdown"], Ln = {
|
|
661
|
-
key: 2,
|
|
662
|
-
class: "mr-canvas-placeholder"
|
|
663
|
-
}, Dn = ["aria-label", "onPointerdown"], An = {
|
|
664
|
-
key: 1,
|
|
665
|
-
class: "mr-canvas-static-grid"
|
|
666
|
-
}, Hn = {
|
|
667
|
-
key: 0,
|
|
668
|
-
class: "mr-canvas-grid-limit"
|
|
669
|
-
}, Fn = ["title"], Nn = { key: 0 }, Gn = ["src"], Bn = ["title"], On = ["aria-label", "onPointerdown"], zn = {
|
|
670
|
-
key: 0,
|
|
671
|
-
class: "mr-canvas-navigator"
|
|
672
|
-
}, Vn = ["value", "aria-label"], jn = /* @__PURE__ */ xe({
|
|
673
|
-
__name: "TemplateDesignCanvas",
|
|
674
|
-
props: {
|
|
675
|
-
document: {},
|
|
676
|
-
selection: {},
|
|
677
|
-
selections: {},
|
|
678
|
-
locked: { type: Function },
|
|
679
|
-
activeColumnIndex: {},
|
|
680
|
-
pageIndex: {},
|
|
681
|
-
datasets: {},
|
|
682
|
-
disabled: { type: Boolean },
|
|
683
|
-
geometryDisabled: { type: Boolean },
|
|
684
|
-
messages: {}
|
|
685
|
-
},
|
|
686
|
-
emits: ["select", "geometry", "column", "width"],
|
|
687
|
-
setup(t, { emit: u }) {
|
|
688
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), { viewport: d, zoom: p, scale: M, page: b, wide: g, fraction: k, fit: E, setZoom: S, sync: I, navigate: C } = en({ get document() {
|
|
689
|
-
return o.document;
|
|
690
|
-
}, get pageIndex() {
|
|
691
|
-
return o.pageIndex;
|
|
692
|
-
}, get selection() {
|
|
693
|
-
return o.selection;
|
|
694
|
-
}, get columnIndex() {
|
|
695
|
-
return o.activeColumnIndex;
|
|
696
|
-
} }), w = D(() => o.disabled === !0 || o.geometryDisabled === !0 || !!b.value.flow), x = D(() => b.value.components.map((_) => _.kind === "list" ? qt(_, o.datasets?.[_.dataset] ?? [], b.value.flow || _.cardinality === "record" ? 1 : 3) : [])), s = D(() => b.value.components.map((_) => tn(_, o.document, o.datasets))), v = q(!0), y = D(() => Ct(b.value.widthMm, M.value)), $ = D(() => Ct(b.value.heightMm, M.value));
|
|
697
|
-
function R(_, P, T) {
|
|
698
|
-
return { width: `${P * M.value}px`, opacity: T ? 0.35 : 1, textAlign: _.style?.align, paddingLeft: _.indentMm ? `${_.indentMm * M.value}px` : void 0, color: _.style?.color, backgroundColor: _.style?.backgroundColor, fontWeight: _.style?.bold ? "700" : "400", fontSize: `${Ke(_.style).fontSizePx * p.value}px` };
|
|
699
|
-
}
|
|
700
|
-
function L(_) {
|
|
701
|
-
return o.locked?.({ pageIndex: o.pageIndex, componentIndex: _ }) === !0;
|
|
702
|
-
}
|
|
703
|
-
function H(_, P) {
|
|
704
|
-
i("select", { pageIndex: o.pageIndex, componentIndex: P, additive: _.ctrlKey || _.metaKey || _.shiftKey }), !_.ctrlKey && !_.metaKey && !_.shiftKey && !L(P) && V.start(_, b.value.components[P]);
|
|
705
|
-
}
|
|
706
|
-
const V = rn({
|
|
707
|
-
scale: M,
|
|
708
|
-
page: () => b.value,
|
|
709
|
-
disabled: () => w.value,
|
|
710
|
-
commit: (_) => i("geometry", _)
|
|
711
|
-
});
|
|
712
|
-
function j(_) {
|
|
713
|
-
return (o.selections ?? (o.selection ? [o.selection] : [])).some((P) => P.pageIndex === o.pageIndex && P.componentIndex === _);
|
|
714
|
-
}
|
|
715
|
-
function oe(_) {
|
|
716
|
-
const P = b.value.components[_], T = P.kind === "list" ? P.id : P.nid, W = b.value.flow?.bands.find((X) => X.componentIds.includes(T ?? "")), B = W && P.kind === "list" ? W.topMm + W.heightMm - P.topMm : Ye(P);
|
|
717
|
-
return {
|
|
718
|
-
left: `${P.leftMm * M.value}px`,
|
|
719
|
-
top: `${P.topMm * M.value}px`,
|
|
720
|
-
width: `${P.widthMm * M.value}px`,
|
|
721
|
-
height: `${B * M.value}px`
|
|
722
|
-
};
|
|
723
|
-
}
|
|
724
|
-
function ce(_, P) {
|
|
725
|
-
const T = b.value.components[P];
|
|
726
|
-
if (w.value || L(P) || !j(P)) return;
|
|
727
|
-
const W = {
|
|
728
|
-
ArrowLeft: [-1, 0],
|
|
729
|
-
ArrowRight: [1, 0],
|
|
730
|
-
ArrowUp: [0, -1],
|
|
731
|
-
ArrowDown: [0, 1]
|
|
732
|
-
}, B = W[_.key];
|
|
733
|
-
if (!B) return;
|
|
734
|
-
_.preventDefault(), _.stopPropagation();
|
|
735
|
-
const X = ge(T), te = _.shiftKey ? 5 : 0.5;
|
|
736
|
-
X.leftMm += B[0] * te, X.topMm += B[1] * te, i("geometry", X);
|
|
737
|
-
}
|
|
738
|
-
function r(_) {
|
|
739
|
-
let P = 0;
|
|
740
|
-
return _.columns.map((T) => (P += T.widthMm, P));
|
|
741
|
-
}
|
|
742
|
-
function G(_) {
|
|
743
|
-
return _.grid ? Ie(
|
|
744
|
-
_.grid,
|
|
745
|
-
_.widthMm,
|
|
746
|
-
_.heightMm
|
|
747
|
-
).cells.slice(0, 2e3) : [];
|
|
748
|
-
}
|
|
749
|
-
function z(_) {
|
|
750
|
-
return _.headerGrid ? Ie(
|
|
751
|
-
_.headerGrid,
|
|
752
|
-
_.widthMm,
|
|
753
|
-
_.headerGrid.rowHeightsMm?.reduce(
|
|
754
|
-
(P, T) => P + T,
|
|
755
|
-
0
|
|
756
|
-
) ?? _.headerGrid.cells.length * 8
|
|
757
|
-
).cells : [];
|
|
758
|
-
}
|
|
759
|
-
let O;
|
|
760
|
-
ae(
|
|
761
|
-
() => w.value,
|
|
762
|
-
(_) => {
|
|
763
|
-
_ && O?.();
|
|
764
|
-
}
|
|
765
|
-
), ae(
|
|
766
|
-
() => o.document,
|
|
767
|
-
() => O?.()
|
|
768
|
-
), De(() => O?.());
|
|
769
|
-
function Y(_, P, T) {
|
|
770
|
-
if (w.value || _.button !== 0) return;
|
|
771
|
-
_.preventDefault(), _.stopPropagation(), O?.();
|
|
772
|
-
const W = _.clientX, B = P.columns[T].widthMm;
|
|
773
|
-
let X = B;
|
|
774
|
-
const te = _.currentTarget, ee = (he) => {
|
|
775
|
-
X = Math.max(
|
|
776
|
-
2,
|
|
777
|
-
Math.round((B + (he.clientX - W) / M.value) * 2) / 2
|
|
778
|
-
), te.style.transform = `translateX(${(X - B) * M.value}px)`;
|
|
779
|
-
}, ve = () => {
|
|
780
|
-
window.removeEventListener("pointermove", ee), window.removeEventListener("pointerup", ie), window.removeEventListener("pointercancel", pe), window.removeEventListener("keydown", le), te.style.transform = "", O = void 0;
|
|
781
|
-
}, ie = () => {
|
|
782
|
-
ve(), X !== B && i("width", T, X);
|
|
783
|
-
}, pe = () => ve(), le = (he) => {
|
|
784
|
-
he.key === "Escape" && (he.preventDefault(), pe());
|
|
785
|
-
};
|
|
786
|
-
window.addEventListener("pointermove", ee), window.addEventListener("pointerup", ie), window.addEventListener("pointercancel", pe), window.addEventListener("keydown", le), O = pe;
|
|
787
|
-
}
|
|
788
|
-
return (_, P) => (m(), h("div", cn, [
|
|
789
|
-
n("div", mn, [
|
|
790
|
-
n("div", vn, [
|
|
791
|
-
n("strong", {
|
|
792
|
-
title: e(Je)(e(b), t.pageIndex, a.value.page)
|
|
793
|
-
}, l(e(Je)(e(b), t.pageIndex, a.value.page)), 9, pn),
|
|
794
|
-
n("span", null, l(e(b).widthMm) + " × " + l(e(b).heightMm) + " mm", 1),
|
|
795
|
-
t.document.template.repeat ? (m(), h("small", {
|
|
796
|
-
key: 0,
|
|
797
|
-
title: t.document.template.repeat.dataset
|
|
798
|
-
}, l(a.value.designSample) + " · " + l(t.document.template.repeat.dataset), 9, gn)) : F("", !0)
|
|
799
|
-
]),
|
|
800
|
-
n("span", hn, l(a.value.canvasHint), 1),
|
|
801
|
-
n("div", fn, [
|
|
802
|
-
n("nav", bn, [
|
|
803
|
-
n("button", {
|
|
804
|
-
type: "button",
|
|
805
|
-
"aria-pressed": v.value,
|
|
806
|
-
onClick: P[0] || (P[0] = (T) => v.value = !v.value)
|
|
807
|
-
}, l(a.value.rulerToggle), 9, yn),
|
|
808
|
-
n("button", {
|
|
809
|
-
type: "button",
|
|
810
|
-
onClick: P[1] || (P[1] = (T) => e(E)("width"))
|
|
811
|
-
}, l(a.value.fitWidth), 1),
|
|
812
|
-
n("button", {
|
|
813
|
-
type: "button",
|
|
814
|
-
onClick: P[2] || (P[2] = (T) => e(E)("page"))
|
|
815
|
-
}, l(a.value.fitPage), 1),
|
|
816
|
-
n("button", {
|
|
817
|
-
type: "button",
|
|
818
|
-
disabled: !t.selection,
|
|
819
|
-
onClick: P[3] || (P[3] = (T) => e(E)("selection"))
|
|
820
|
-
}, l(a.value.fitSelection), 9, wn)
|
|
821
|
-
]),
|
|
822
|
-
n("label", null, [
|
|
823
|
-
N(l(a.value.zoom), 1),
|
|
824
|
-
n("select", {
|
|
825
|
-
value: e(p),
|
|
826
|
-
"aria-label": a.value.zoom,
|
|
827
|
-
onChange: P[4] || (P[4] = (T) => e(S)(Number(T.target.value)))
|
|
828
|
-
}, [
|
|
829
|
-
[0.5, 0.8, 1, 1.25].includes(e(p)) ? F("", !0) : (m(), h("option", {
|
|
830
|
-
key: 0,
|
|
831
|
-
value: e(p)
|
|
832
|
-
}, l(Math.round(e(p) * 100)) + "%", 9, kn)),
|
|
833
|
-
P[7] || (P[7] = n("option", { value: 0.5 }, "50%", -1)),
|
|
834
|
-
P[8] || (P[8] = n("option", { value: 0.8 }, "80%", -1)),
|
|
835
|
-
P[9] || (P[9] = n("option", { value: 1 }, "100%", -1)),
|
|
836
|
-
P[10] || (P[10] = n("option", { value: 1.25 }, "125%", -1))
|
|
837
|
-
], 40, Mn)
|
|
838
|
-
])
|
|
839
|
-
])
|
|
840
|
-
]),
|
|
841
|
-
n("div", {
|
|
842
|
-
ref_key: "viewport",
|
|
843
|
-
ref: d,
|
|
844
|
-
class: "mr-canvas-scroll",
|
|
845
|
-
onScrollPassive: P[5] || (P[5] = //@ts-ignore
|
|
846
|
-
(...T) => e(I) && e(I)(...T))
|
|
847
|
-
}, [
|
|
848
|
-
n("div", {
|
|
849
|
-
class: "mr-canvas-paper",
|
|
850
|
-
style: ke({
|
|
851
|
-
width: `${e(b).widthMm * e(M)}px`,
|
|
852
|
-
height: `${e(b).heightMm * e(M)}px`
|
|
853
|
-
})
|
|
854
|
-
}, [
|
|
855
|
-
v.value ? (m(), h("svg", {
|
|
856
|
-
key: 0,
|
|
857
|
-
class: "mr-canvas-ruler is-horizontal",
|
|
858
|
-
width: e(b).widthMm * e(M),
|
|
859
|
-
height: "17",
|
|
860
|
-
"aria-label": a.value.rulerLabel,
|
|
861
|
-
role: "img"
|
|
862
|
-
}, [
|
|
863
|
-
(m(!0), h(J, null, Q(y.value, (T) => (m(), h("g", {
|
|
864
|
-
key: T.mm,
|
|
865
|
-
transform: `translate(${T.position}, 0)`
|
|
866
|
-
}, [
|
|
867
|
-
P[11] || (P[11] = n("line", {
|
|
868
|
-
y1: "12",
|
|
869
|
-
y2: "17"
|
|
870
|
-
}, null, -1)),
|
|
871
|
-
n("text", $n, l(T.mm), 1)
|
|
872
|
-
], 8, Cn))), 128))
|
|
873
|
-
], 8, xn)) : F("", !0),
|
|
874
|
-
v.value ? (m(), h("svg", {
|
|
875
|
-
key: 1,
|
|
876
|
-
class: "mr-canvas-ruler is-vertical",
|
|
877
|
-
width: "17",
|
|
878
|
-
height: e(b).heightMm * e(M),
|
|
879
|
-
"aria-hidden": "true"
|
|
880
|
-
}, [
|
|
881
|
-
(m(!0), h(J, null, Q($.value, (T) => (m(), h("g", {
|
|
882
|
-
key: T.mm,
|
|
883
|
-
transform: `translate(0, ${T.position})`
|
|
884
|
-
}, [
|
|
885
|
-
P[12] || (P[12] = n("line", {
|
|
886
|
-
x1: "12",
|
|
887
|
-
x2: "17"
|
|
888
|
-
}, null, -1)),
|
|
889
|
-
n("text", In, l(T.mm), 1)
|
|
890
|
-
], 8, _n))), 128))
|
|
891
|
-
], 8, Sn)) : F("", !0),
|
|
892
|
-
(m(!0), h(J, null, Q(e(b).components, (T, W) => (m(), h("div", {
|
|
893
|
-
key: W,
|
|
894
|
-
class: Re(["mr-canvas-component", { "is-selected": j(W), "is-locked": L(W) }]),
|
|
895
|
-
"data-canvas-component": W,
|
|
896
|
-
style: ke(oe(W)),
|
|
897
|
-
role: "button",
|
|
898
|
-
"aria-label": `${a.value.component} ${W + 1} ${T.kind}`,
|
|
899
|
-
"aria-pressed": j(W),
|
|
900
|
-
tabindex: j(W) ? 0 : -1,
|
|
901
|
-
onFocus: (B) => !j(W) && i("select", { pageIndex: t.pageIndex, componentIndex: W }),
|
|
902
|
-
onPointerdown: (B) => H(B, W),
|
|
903
|
-
onClick: (B) => B.detail === 0 && !j(W) && i("select", { pageIndex: t.pageIndex, componentIndex: W }),
|
|
904
|
-
onKeydown: (B) => ce(B, W)
|
|
905
|
-
}, [
|
|
906
|
-
T.kind === "list" ? (m(), h(J, { key: 0 }, [
|
|
907
|
-
n("div", Rn, [
|
|
908
|
-
T.header !== !1 && T.headerGrid ? (m(), h("div", {
|
|
909
|
-
key: 0,
|
|
910
|
-
class: "mr-canvas-merged",
|
|
911
|
-
style: ke({
|
|
912
|
-
height: `${(T.headerGrid.rowHeightsMm?.reduce((B, X) => B + X, 0) ?? T.headerGrid.cells.length * 8) * e(M)}px`
|
|
913
|
-
})
|
|
914
|
-
}, [
|
|
915
|
-
(m(!0), h(J, null, Q(z(T), (B, X) => (m(), h("div", {
|
|
916
|
-
key: X,
|
|
917
|
-
style: ke({
|
|
918
|
-
left: `${B.xMm * e(M)}px`,
|
|
919
|
-
top: `${B.yMm * e(M)}px`,
|
|
920
|
-
width: `${B.widthMm * e(M)}px`,
|
|
921
|
-
height: `${B.heightMm * e(M)}px`,
|
|
922
|
-
textAlign: B.cell.style?.align ?? "center"
|
|
923
|
-
})
|
|
924
|
-
}, l(B.cell.text), 5))), 128))
|
|
925
|
-
], 4)) : T.header !== !1 ? (m(), h("div", Pn, [
|
|
926
|
-
(m(!0), h(J, null, Q(T.columns, (B, X) => (m(), h("div", {
|
|
927
|
-
key: X,
|
|
928
|
-
style: ke(R({ text: B.header, style: e(Ut)(T, B) }, B.widthMm, B.hidden)),
|
|
929
|
-
onPointerdown: It((te) => {
|
|
930
|
-
i("select", { pageIndex: t.pageIndex, componentIndex: W }), i("column", X);
|
|
931
|
-
}, ["stop"])
|
|
932
|
-
}, l(B.header), 45, Tn))), 128))
|
|
933
|
-
])) : F("", !0),
|
|
934
|
-
(m(!0), h(J, null, Q(x.value[W], (B, X) => (m(), h("div", {
|
|
935
|
-
key: X,
|
|
936
|
-
class: "mr-canvas-table-row"
|
|
937
|
-
}, [
|
|
938
|
-
(m(!0), h(J, null, Q(T.columns, (te, ee) => (m(), h("div", {
|
|
939
|
-
key: ee,
|
|
940
|
-
style: ke(R(B[ee], te.widthMm, te.hidden))
|
|
941
|
-
}, l(B[ee].text), 5))), 128))
|
|
942
|
-
]))), 128)),
|
|
943
|
-
x.value[W]?.length ? F("", !0) : (m(), h("div", Ln, l(T.dataset) + " · " + l(T.tree && t.datasets?.[T.dataset]?.length ? a.value.treeSampleHint : a.value.sampleRows), 1))
|
|
944
|
-
]),
|
|
945
|
-
j(W) && !w.value && !L(W) ? (m(!0), h(J, { key: 0 }, Q(r(T), (B, X) => (m(), h("span", {
|
|
946
|
-
key: X,
|
|
947
|
-
class: "mr-canvas-column-handle",
|
|
948
|
-
"aria-label": `${a.value.resizeColumn} ${T.columns[X]?.header}`,
|
|
949
|
-
role: "separator",
|
|
950
|
-
"aria-orientation": "vertical",
|
|
951
|
-
style: ke({ left: `${B * e(M)}px` }),
|
|
952
|
-
onPointerdown: (te) => Y(te, T, X)
|
|
953
|
-
}, null, 44, Dn))), 128)) : F("", !0)
|
|
954
|
-
], 64)) : T.grid ? (m(), h("div", An, [
|
|
955
|
-
(m(!0), h(J, null, Q(G(T), (B, X) => (m(), h("div", {
|
|
956
|
-
key: X,
|
|
957
|
-
style: ke({
|
|
958
|
-
left: `${B.xMm * e(M)}px`,
|
|
959
|
-
top: `${B.yMm * e(M)}px`,
|
|
960
|
-
width: `${B.widthMm * e(M)}px`,
|
|
961
|
-
height: `${B.heightMm * e(M)}px`,
|
|
962
|
-
backgroundColor: B.cell.style?.backgroundColor,
|
|
963
|
-
color: B.cell.style?.color,
|
|
964
|
-
fontWeight: B.cell.style?.bold ? "700" : "400",
|
|
965
|
-
fontSize: `${e(Ke)(B.cell.style).fontSizePx * e(p)}px`,
|
|
966
|
-
textAlign: B.cell.style?.align ?? "left"
|
|
967
|
-
})
|
|
968
|
-
}, l(B.cell.text), 5))), 128)),
|
|
969
|
-
T.grid.cells.reduce((B, X) => B + X.length, 0) > 2e3 ? (m(), h("span", Hn, l(a.value.canvasGridLimited), 1)) : F("", !0)
|
|
970
|
-
])) : (T.kind === "barcode" || T.kind === "qrcode") && !s.value[W]?.image ? (m(), h("div", {
|
|
971
|
-
key: 2,
|
|
972
|
-
class: Re(["mr-canvas-code", { "is-error": s.value[W]?.error }]),
|
|
973
|
-
title: s.value[W]?.error ?? a.value.codePreviewHint
|
|
974
|
-
}, [
|
|
975
|
-
P[13] || (P[13] = n("svg", {
|
|
976
|
-
viewBox: "0 0 32 24",
|
|
977
|
-
"aria-hidden": "true"
|
|
978
|
-
}, [
|
|
979
|
-
n("rect", {
|
|
980
|
-
x: "3",
|
|
981
|
-
y: "3",
|
|
982
|
-
width: "26",
|
|
983
|
-
height: "18",
|
|
984
|
-
rx: "2"
|
|
985
|
-
}),
|
|
986
|
-
n("path", { d: "M10 8 6 12l4 4m12-8 4 4-4 4m-8 2 4-12" })
|
|
987
|
-
], -1)),
|
|
988
|
-
n("strong", null, l(T.kind === "qrcode" ? a.value.insertQrcode : (T.code?.symbology ?? "code128").toUpperCase()), 1),
|
|
989
|
-
n("span", null, l(s.value[W]?.text || a.value.codePlaceholder), 1),
|
|
990
|
-
s.value[W]?.bound ? (m(), h("small", Nn, l(T.binding?.field), 1)) : F("", !0)
|
|
991
|
-
], 10, Fn)) : s.value[W]?.image ? (m(), h("img", {
|
|
992
|
-
key: 3,
|
|
993
|
-
src: s.value[W]?.image,
|
|
994
|
-
alt: "",
|
|
995
|
-
draggable: "false"
|
|
996
|
-
}, null, 8, Gn)) : (m(), h("div", {
|
|
997
|
-
key: 4,
|
|
998
|
-
class: Re(["mr-canvas-content", { "is-binding-error": s.value[W]?.error, "is-bound-image": T.kind === "image" && T.binding }]),
|
|
999
|
-
title: s.value[W]?.error === "image-binding" ? a.value.bindingImageHint : s.value[W]?.error,
|
|
1000
|
-
style: ke({
|
|
1001
|
-
color: T.style?.color,
|
|
1002
|
-
backgroundColor: T.style?.backgroundColor,
|
|
1003
|
-
fontWeight: T.style?.bold ? "700" : "400",
|
|
1004
|
-
fontSize: `${e(Ke)(T.style).fontSizePx * e(p)}px`,
|
|
1005
|
-
textAlign: T.style?.align,
|
|
1006
|
-
justifyContent: T.style?.verticalAlign === "bottom" ? "flex-end" : T.style?.verticalAlign === "middle" ? "center" : "flex-start"
|
|
1007
|
-
})
|
|
1008
|
-
}, l(s.value[W]?.text || (T.kind === "rect" ? "" : T.kind === "image" && T.binding ? a.value.boundImagePlaceholder : "")), 15, Bn)),
|
|
1009
|
-
j(W) && !w.value && !L(W) ? (m(), h("span", {
|
|
1010
|
-
key: 5,
|
|
1011
|
-
class: "mr-canvas-resize",
|
|
1012
|
-
"aria-label": a.value.resizeComponent,
|
|
1013
|
-
role: "separator",
|
|
1014
|
-
onPointerdown: (B) => e(V).start(B, T, !0)
|
|
1015
|
-
}, null, 40, On)) : F("", !0)
|
|
1016
|
-
], 46, En))), 128))
|
|
1017
|
-
], 4)
|
|
1018
|
-
], 544),
|
|
1019
|
-
e(g) ? (m(), h("footer", zn, [
|
|
1020
|
-
n("span", null, l(a.value.wideNavigation), 1),
|
|
1021
|
-
n("input", {
|
|
1022
|
-
type: "range",
|
|
1023
|
-
min: "0",
|
|
1024
|
-
max: "100",
|
|
1025
|
-
value: e(k),
|
|
1026
|
-
"aria-label": a.value.wideNavigation,
|
|
1027
|
-
onInput: P[6] || (P[6] = (T) => e(C)(Number(T.target.value)))
|
|
1028
|
-
}, null, 40, Vn),
|
|
1029
|
-
n("span", null, l(e(k)) + "%", 1)
|
|
1030
|
-
])) : F("", !0)
|
|
1031
|
-
]));
|
|
1032
|
-
}
|
|
1033
|
-
}), Wn = /* @__PURE__ */ Ce(jn, [["__scopeId", "data-v-c512529e"]]), Un = { class: "mr-component-binding" }, Kn = ["value", "disabled"], qn = { value: "static" }, Jn = ["disabled"], Yn = {
|
|
1034
|
-
key: 0,
|
|
1035
|
-
class: "mr-binding-hint"
|
|
1036
|
-
}, Xn = ["value", "disabled"], Zn = ["value"], Qn = {
|
|
1037
|
-
key: 0,
|
|
1038
|
-
class: "mr-binding-grid"
|
|
1039
|
-
}, ea = ["value", "disabled"], ta = { value: "natural" }, na = { value: "number" }, aa = { value: "percent" }, la = { value: "date" }, oa = { key: 0 }, ia = ["value", "disabled"], sa = { key: 1 }, ra = ["value", "disabled"], da = { key: 1 }, ua = { class: "mr-binding-grid" }, ca = ["value", "disabled"], ma = ["value", "disabled"], va = ["value", "disabled"], pa = { class: "mr-binding-hint" }, ga = /* @__PURE__ */ xe({
|
|
1040
|
-
__name: "ComponentDataBinding",
|
|
1041
|
-
props: {
|
|
1042
|
-
component: {},
|
|
1043
|
-
repeat: {},
|
|
1044
|
-
schema: {},
|
|
1045
|
-
disabled: { type: Boolean },
|
|
1046
|
-
messages: {}
|
|
1047
|
-
},
|
|
1048
|
-
emits: ["change"],
|
|
1049
|
-
setup(t, { emit: u }) {
|
|
1050
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = D(() => o.component.binding), p = `mr-component-fields-${pt()?.uid ?? 0}`;
|
|
1051
|
-
function M(S) {
|
|
1052
|
-
return S.target.value;
|
|
1053
|
-
}
|
|
1054
|
-
function b(S) {
|
|
1055
|
-
!o.disabled && d.value && i("change", { ...d.value, ...S });
|
|
1056
|
-
}
|
|
1057
|
-
function g(S) {
|
|
1058
|
-
o.disabled || (M(S) === "static" ? i("change", void 0) : o.repeat && i("change", { field: o.schema?.fields[0]?.field ?? "value" }));
|
|
1059
|
-
}
|
|
1060
|
-
function k(S) {
|
|
1061
|
-
if (!d.value || o.disabled) return;
|
|
1062
|
-
const I = { ...d.value }, C = M(S);
|
|
1063
|
-
C === "natural" ? delete I.format : I.format = C === "date" ? { kind: "date", pattern: "YYYY-MM-DD" } : { kind: C, digits: 2 }, i("change", I);
|
|
1064
|
-
}
|
|
1065
|
-
function E(S) {
|
|
1066
|
-
const I = M(S), C = d.value?.format;
|
|
1067
|
-
I.trim() && C && C.kind !== "date" && b({ format: { ...C, digits: Number(I) } });
|
|
1068
|
-
}
|
|
1069
|
-
return (S, I) => (m(), h("div", Un, [
|
|
1070
|
-
n("h3", null, l(a.value.componentContent), 1),
|
|
1071
|
-
n("label", null, [
|
|
1072
|
-
N(l(a.value.contentSource), 1),
|
|
1073
|
-
n("select", {
|
|
1074
|
-
value: d.value ? "field" : "static",
|
|
1075
|
-
disabled: t.disabled,
|
|
1076
|
-
onChange: g
|
|
1077
|
-
}, [
|
|
1078
|
-
n("option", qn, l(a.value.staticContent), 1),
|
|
1079
|
-
n("option", {
|
|
1080
|
-
value: "field",
|
|
1081
|
-
disabled: !t.repeat
|
|
1082
|
-
}, l(a.value.recordField), 9, Jn)
|
|
1083
|
-
], 40, Kn)
|
|
1084
|
-
]),
|
|
1085
|
-
t.repeat ? F("", !0) : (m(), h("p", Yn, l(a.value.bindingNeedsRepeat), 1)),
|
|
1086
|
-
d.value ? (m(), h(J, { key: 1 }, [
|
|
1087
|
-
n("label", null, [
|
|
1088
|
-
N(l(a.value.bindingField), 1),
|
|
1089
|
-
n("input", {
|
|
1090
|
-
value: d.value.field,
|
|
1091
|
-
list: p,
|
|
1092
|
-
disabled: t.disabled,
|
|
1093
|
-
onChange: I[0] || (I[0] = (C) => M(C).trim() && b({ field: M(C).trim() }))
|
|
1094
|
-
}, null, 40, Xn)
|
|
1095
|
-
]),
|
|
1096
|
-
n("datalist", { id: p }, [
|
|
1097
|
-
(m(!0), h(J, null, Q(t.schema?.fields ?? [], (C) => (m(), h("option", {
|
|
1098
|
-
key: C.field,
|
|
1099
|
-
value: C.field
|
|
1100
|
-
}, l(C.label), 9, Zn))), 128))
|
|
1101
|
-
]),
|
|
1102
|
-
t.component.kind === "text" ? (m(), h("div", Qn, [
|
|
1103
|
-
n("label", null, [
|
|
1104
|
-
N(l(a.value.valueFormat), 1),
|
|
1105
|
-
n("select", {
|
|
1106
|
-
value: d.value.format?.kind ?? "natural",
|
|
1107
|
-
disabled: t.disabled,
|
|
1108
|
-
onChange: k
|
|
1109
|
-
}, [
|
|
1110
|
-
n("option", ta, l(a.value.naturalFormat), 1),
|
|
1111
|
-
n("option", na, l(a.value.numberFormat), 1),
|
|
1112
|
-
n("option", aa, l(a.value.percentFormat), 1),
|
|
1113
|
-
n("option", la, l(a.value.dateFormat), 1)
|
|
1114
|
-
], 40, ea)
|
|
1115
|
-
]),
|
|
1116
|
-
d.value.format && d.value.format.kind !== "date" ? (m(), h("label", oa, [
|
|
1117
|
-
N(l(a.value.decimalPlaces), 1),
|
|
1118
|
-
n("input", {
|
|
1119
|
-
type: "number",
|
|
1120
|
-
min: "0",
|
|
1121
|
-
max: "100",
|
|
1122
|
-
step: "1",
|
|
1123
|
-
value: d.value.format.digits ?? 2,
|
|
1124
|
-
disabled: t.disabled,
|
|
1125
|
-
onChange: E
|
|
1126
|
-
}, null, 40, ia)
|
|
1127
|
-
])) : d.value.format?.kind === "date" ? (m(), h("label", sa, [
|
|
1128
|
-
N(l(a.value.datePattern), 1),
|
|
1129
|
-
n("input", {
|
|
1130
|
-
value: d.value.format.pattern ?? "YYYY-MM-DD",
|
|
1131
|
-
disabled: t.disabled,
|
|
1132
|
-
onChange: I[1] || (I[1] = (C) => b({ format: { kind: "date", pattern: M(C) } }))
|
|
1133
|
-
}, null, 40, ra)
|
|
1134
|
-
])) : F("", !0)
|
|
1135
|
-
])) : F("", !0),
|
|
1136
|
-
t.component.kind !== "image" ? (m(), h("details", da, [
|
|
1137
|
-
n("summary", null, l(a.value.bindingDecoration), 1),
|
|
1138
|
-
n("div", ua, [
|
|
1139
|
-
n("label", null, [
|
|
1140
|
-
N(l(a.value.valuePrefix), 1),
|
|
1141
|
-
n("input", {
|
|
1142
|
-
value: d.value.prefix ?? "",
|
|
1143
|
-
disabled: t.disabled,
|
|
1144
|
-
onChange: I[2] || (I[2] = (C) => b({ prefix: M(C) }))
|
|
1145
|
-
}, null, 40, ca)
|
|
1146
|
-
]),
|
|
1147
|
-
n("label", null, [
|
|
1148
|
-
N(l(a.value.valueSuffix), 1),
|
|
1149
|
-
n("input", {
|
|
1150
|
-
value: d.value.suffix ?? "",
|
|
1151
|
-
disabled: t.disabled,
|
|
1152
|
-
onChange: I[3] || (I[3] = (C) => b({ suffix: M(C) }))
|
|
1153
|
-
}, null, 40, ma)
|
|
1154
|
-
])
|
|
1155
|
-
]),
|
|
1156
|
-
n("label", null, [
|
|
1157
|
-
N(l(a.value.emptyValueText), 1),
|
|
1158
|
-
n("input", {
|
|
1159
|
-
value: d.value.emptyText ?? "",
|
|
1160
|
-
disabled: t.disabled,
|
|
1161
|
-
onChange: I[4] || (I[4] = (C) => b({ emptyText: M(C) }))
|
|
1162
|
-
}, null, 40, va)
|
|
1163
|
-
])
|
|
1164
|
-
])) : F("", !0),
|
|
1165
|
-
n("p", pa, l(t.repeat?.dataset) + " · " + l(t.component.kind === "image" ? a.value.bindingImageHint : a.value.bindingRecordHint), 1)
|
|
1166
|
-
], 64)) : F("", !0)
|
|
1167
|
-
]));
|
|
1168
|
-
}
|
|
1169
|
-
}), ha = /* @__PURE__ */ Ce(ga, [["__scopeId", "data-v-4558f265"]]), fa = { class: "mr-code-properties" }, ba = { key: 0 }, ya = ["value", "disabled"], wa = { key: 1 }, Ma = ["value", "disabled"], ka = {
|
|
1170
|
-
key: 2,
|
|
1171
|
-
class: "mr-code-checkbox"
|
|
1172
|
-
}, xa = ["checked", "disabled"], Ca = { class: "mr-code-advanced" }, $a = { class: "mr-code-grid" }, Sa = { key: 0 }, _a = ["value", "disabled"], Ia = ["min", "value", "disabled"], Ea = { key: 0 }, Ra = /* @__PURE__ */ xe({
|
|
1173
|
-
__name: "CodeComponentInspector",
|
|
1174
|
-
props: {
|
|
1175
|
-
component: {},
|
|
1176
|
-
disabled: { type: Boolean },
|
|
1177
|
-
messages: {}
|
|
1178
|
-
},
|
|
1179
|
-
emits: ["change"],
|
|
1180
|
-
setup(t, { emit: u }) {
|
|
1181
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = D(() => o.component.kind === "qrcode" ? 4 : o.component.code?.symbology?.startsWith("ean") ? 11 : 10);
|
|
1182
|
-
function p(g) {
|
|
1183
|
-
return g.target.value;
|
|
1184
|
-
}
|
|
1185
|
-
function M(g) {
|
|
1186
|
-
o.disabled || i("change", { ...o.component.code, ...g });
|
|
1187
|
-
}
|
|
1188
|
-
function b(g) {
|
|
1189
|
-
const k = p(g);
|
|
1190
|
-
M({ symbology: k, quietZoneModules: k.startsWith("ean") ? 11 : 10 });
|
|
1191
|
-
}
|
|
1192
|
-
return (g, k) => (m(), h("div", fa, [
|
|
1193
|
-
n("h3", null, l(a.value.codeSettings), 1),
|
|
1194
|
-
t.component.binding ? F("", !0) : (m(), h("label", ba, [
|
|
1195
|
-
N(l(a.value.codeValue), 1),
|
|
1196
|
-
n("textarea", {
|
|
1197
|
-
rows: "2",
|
|
1198
|
-
value: t.component.code?.value ?? t.component.fallbackText ?? t.component.text ?? "",
|
|
1199
|
-
disabled: t.disabled,
|
|
1200
|
-
onChange: k[0] || (k[0] = (E) => M({ value: p(E) }))
|
|
1201
|
-
}, null, 40, ya)
|
|
1202
|
-
])),
|
|
1203
|
-
t.component.kind === "barcode" ? (m(), h("label", wa, [
|
|
1204
|
-
N(l(a.value.codeSymbology), 1),
|
|
1205
|
-
n("select", {
|
|
1206
|
-
value: t.component.code?.symbology ?? "code128",
|
|
1207
|
-
disabled: t.disabled,
|
|
1208
|
-
onChange: b
|
|
1209
|
-
}, [...k[4] || (k[4] = [
|
|
1210
|
-
n("option", { value: "code128" }, "Code 128", -1),
|
|
1211
|
-
n("option", { value: "code39" }, "Code 39", -1),
|
|
1212
|
-
n("option", { value: "ean13" }, "EAN-13", -1),
|
|
1213
|
-
n("option", { value: "ean8" }, "EAN-8", -1)
|
|
1214
|
-
])], 40, Ma)
|
|
1215
|
-
])) : F("", !0),
|
|
1216
|
-
t.component.kind === "barcode" ? (m(), h("label", ka, [
|
|
1217
|
-
n("input", {
|
|
1218
|
-
type: "checkbox",
|
|
1219
|
-
checked: t.component.code?.showText === !0,
|
|
1220
|
-
disabled: t.disabled,
|
|
1221
|
-
onChange: k[1] || (k[1] = (E) => M({ showText: E.target.checked }))
|
|
1222
|
-
}, null, 40, xa),
|
|
1223
|
-
N(l(a.value.codeShowText), 1)
|
|
1224
|
-
])) : F("", !0),
|
|
1225
|
-
n("details", Ca, [
|
|
1226
|
-
n("summary", null, l(a.value.codeAdvancedSettings), 1),
|
|
1227
|
-
n("div", $a, [
|
|
1228
|
-
t.component.kind === "qrcode" ? (m(), h("label", Sa, [
|
|
1229
|
-
N(l(a.value.codeCorrection), 1),
|
|
1230
|
-
n("select", {
|
|
1231
|
-
value: t.component.code?.errorCorrection ?? "M",
|
|
1232
|
-
disabled: t.disabled,
|
|
1233
|
-
onChange: k[2] || (k[2] = (E) => M({ errorCorrection: p(E) }))
|
|
1234
|
-
}, [...k[5] || (k[5] = [
|
|
1235
|
-
n("option", { value: "L" }, "L · 7%", -1),
|
|
1236
|
-
n("option", { value: "M" }, "M · 15%", -1),
|
|
1237
|
-
n("option", { value: "Q" }, "Q · 25%", -1),
|
|
1238
|
-
n("option", { value: "H" }, "H · 30%", -1)
|
|
1239
|
-
])], 40, _a)
|
|
1240
|
-
])) : F("", !0),
|
|
1241
|
-
n("label", null, [
|
|
1242
|
-
N(l(a.value.codeQuietZone), 1),
|
|
1243
|
-
n("input", {
|
|
1244
|
-
type: "number",
|
|
1245
|
-
min: d.value,
|
|
1246
|
-
max: "64",
|
|
1247
|
-
step: "1",
|
|
1248
|
-
value: t.component.code?.quietZoneModules ?? d.value,
|
|
1249
|
-
disabled: t.disabled,
|
|
1250
|
-
onChange: k[3] || (k[3] = (E) => p(E).trim() && M({ quietZoneModules: Number(p(E)) }))
|
|
1251
|
-
}, null, 40, Ia)
|
|
1252
|
-
])
|
|
1253
|
-
]),
|
|
1254
|
-
t.component.kind === "barcode" ? (m(), h("p", Ea, l(t.component.code?.symbology?.startsWith("ean") ? a.value.eanContentHint : t.component.code?.symbology === "code39" ? a.value.code39ContentHint : a.value.code128ContentHint), 1)) : F("", !0),
|
|
1255
|
-
n("p", null, l(a.value.codePreviewHint), 1)
|
|
1256
|
-
])
|
|
1257
|
-
]));
|
|
1258
|
-
}
|
|
1259
|
-
}), Pa = /* @__PURE__ */ Ce(Ra, [["__scopeId", "data-v-907fe45a"]]), Ta = ["aria-label"], La = ["data-align", "aria-label", "title", "aria-checked", "tabindex", "onClick", "onKeydown"], Da = { key: 0 }, Aa = {
|
|
1260
|
-
key: 1,
|
|
1261
|
-
viewBox: "0 0 20 20",
|
|
1262
|
-
fill: "none",
|
|
1263
|
-
"aria-hidden": "true"
|
|
1264
|
-
}, Ha = {
|
|
1265
|
-
key: 0,
|
|
1266
|
-
d: "M3 4h14M3 8h9M3 12h14M3 16h9"
|
|
1267
|
-
}, Fa = {
|
|
1268
|
-
key: 1,
|
|
1269
|
-
d: "M3 4h14M6 8h8M3 12h14M6 16h8"
|
|
1270
|
-
}, Na = {
|
|
1271
|
-
key: 2,
|
|
1272
|
-
d: "M3 4h14M8 8h9M3 12h14M8 16h9"
|
|
1273
|
-
}, Ga = {
|
|
1274
|
-
key: 3,
|
|
1275
|
-
d: "M3 4h14M3 8h14M3 12h14M3 16h14"
|
|
1276
|
-
}, Ba = /* @__PURE__ */ xe({
|
|
1277
|
-
__name: "AlignmentControl",
|
|
1278
|
-
props: {
|
|
1279
|
-
modelValue: {},
|
|
1280
|
-
label: {},
|
|
1281
|
-
labels: {},
|
|
1282
|
-
autoLabel: {},
|
|
1283
|
-
allowAuto: { type: Boolean }
|
|
1284
|
-
},
|
|
1285
|
-
emits: ["update:modelValue"],
|
|
1286
|
-
setup(t, { emit: u }) {
|
|
1287
|
-
const o = t, i = u, a = () => o.allowAuto ? ["auto", "left", "center", "right", "justify"] : ["left", "center", "right", "justify"];
|
|
1288
|
-
async function d(p, M) {
|
|
1289
|
-
if (!["ArrowLeft", "ArrowRight", "Home", "End"].includes(p.key)) return;
|
|
1290
|
-
p.preventDefault();
|
|
1291
|
-
const g = a(), k = g.indexOf(M), E = p.key === "Home" ? 0 : p.key === "End" ? g.length - 1 : (k + (p.key === "ArrowRight" ? 1 : -1) + g.length) % g.length;
|
|
1292
|
-
i("update:modelValue", g[E]);
|
|
1293
|
-
const S = p.currentTarget.parentElement;
|
|
1294
|
-
await ue(), S?.querySelector(`[data-align="${g[E]}"]`)?.focus();
|
|
1295
|
-
}
|
|
1296
|
-
return (p, M) => (m(), h("div", {
|
|
1297
|
-
class: "mr-designer-alignment",
|
|
1298
|
-
role: "radiogroup",
|
|
1299
|
-
"aria-label": t.label
|
|
1300
|
-
}, [
|
|
1301
|
-
(m(!0), h(J, null, Q(a(), (b) => (m(), h("button", {
|
|
1302
|
-
key: b,
|
|
1303
|
-
type: "button",
|
|
1304
|
-
role: "radio",
|
|
1305
|
-
"data-align": b,
|
|
1306
|
-
"aria-label": t.labels[b],
|
|
1307
|
-
title: t.labels[b],
|
|
1308
|
-
"aria-checked": t.modelValue === b,
|
|
1309
|
-
tabindex: t.modelValue === b ? 0 : -1,
|
|
1310
|
-
onClick: (g) => i("update:modelValue", b),
|
|
1311
|
-
onKeydown: (g) => d(g, b)
|
|
1312
|
-
}, [
|
|
1313
|
-
b === "auto" ? (m(), h("span", Da, l(t.autoLabel), 1)) : (m(), h("svg", Aa, [
|
|
1314
|
-
b === "left" ? (m(), h("path", Ha)) : b === "center" ? (m(), h("path", Fa)) : b === "right" ? (m(), h("path", Na)) : (m(), h("path", Ga))
|
|
1315
|
-
]))
|
|
1316
|
-
], 40, La))), 128))
|
|
1317
|
-
], 8, Ta));
|
|
1318
|
-
}
|
|
1319
|
-
}), mt = /* @__PURE__ */ Ce(Ba, [["__scopeId", "data-v-c85770c4"]]), Oa = ["disabled"], za = { class: "mr-component-content" }, Va = { key: 1 }, ja = ["value"], Wa = ["value"], Ua = { class: "mr-component-upload" }, Ka = ["aria-label"], qa = {
|
|
1320
|
-
key: 0,
|
|
1321
|
-
role: "alert"
|
|
1322
|
-
}, Ja = { key: 4 }, Ya = ["value"], Xa = {
|
|
1323
|
-
key: 0,
|
|
1324
|
-
class: "mr-component-type"
|
|
1325
|
-
}, Za = { class: "mr-component-dimensions" }, Qa = ["value"], el = ["checked"], tl = { class: "mr-component-dimensions" }, nl = ["value"], al = ["value"], ll = ["open"], ol = { class: "mr-component-dimensions" }, il = ["min", "value", "disabled", "onChange"], sl = { key: 0 }, rl = ["value", "disabled"], dl = { value: "" }, ul = { value: "header" }, cl = { value: "footer" }, ml = /* @__PURE__ */ xe({
|
|
1326
|
-
__name: "CanvasComponentInspector",
|
|
1327
|
-
props: {
|
|
1328
|
-
component: {},
|
|
1329
|
-
disabled: { type: Boolean },
|
|
1330
|
-
geometryDisabled: { type: Boolean },
|
|
1331
|
-
repeat: {},
|
|
1332
|
-
schema: {},
|
|
1333
|
-
messages: {}
|
|
1334
|
-
},
|
|
1335
|
-
emits: ["geometry", "patch"],
|
|
1336
|
-
setup(t, { emit: u }) {
|
|
1337
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = q(""), p = ["leftMm", "topMm", "widthMm", "heightMm"], M = D(() => [
|
|
1338
|
-
a.value.leftPosition,
|
|
1339
|
-
a.value.topPosition,
|
|
1340
|
-
a.value.componentWidth,
|
|
1341
|
-
a.value.componentHeight
|
|
1342
|
-
]);
|
|
1343
|
-
function b(I, C) {
|
|
1344
|
-
if (o.disabled || o.geometryDisabled) return;
|
|
1345
|
-
const w = Number(C.target.value);
|
|
1346
|
-
if (!Number.isFinite(w)) return;
|
|
1347
|
-
const x = { ...ge(o.component), [I]: w };
|
|
1348
|
-
o.component.kind === "qrcode" && (I === "widthMm" || I === "heightMm") && (x.widthMm = x.heightMm = w), i("geometry", x);
|
|
1349
|
-
}
|
|
1350
|
-
function g(I, C) {
|
|
1351
|
-
if (o.component.kind === "list") return;
|
|
1352
|
-
const w = { ...o.component.style, [I]: C };
|
|
1353
|
-
I === "fontSize" && delete w.fontSizePx, i("patch", { style: w });
|
|
1354
|
-
}
|
|
1355
|
-
const k = D(() => ({
|
|
1356
|
-
auto: a.value.auto,
|
|
1357
|
-
left: a.value.left,
|
|
1358
|
-
center: a.value.center,
|
|
1359
|
-
right: a.value.right,
|
|
1360
|
-
justify: a.value.justify
|
|
1361
|
-
}));
|
|
1362
|
-
function E(I) {
|
|
1363
|
-
return I.target.value;
|
|
1364
|
-
}
|
|
1365
|
-
async function S(I) {
|
|
1366
|
-
const C = I.target, w = C.files?.[0];
|
|
1367
|
-
if (!w) return;
|
|
1368
|
-
d.value = "";
|
|
1369
|
-
const x = o.component;
|
|
1370
|
-
try {
|
|
1371
|
-
if (w.size > 4 * 1024 * 1024 || !["image/png", "image/jpeg", "image/webp", "image/svg+xml"].includes(
|
|
1372
|
-
w.type
|
|
1373
|
-
))
|
|
1374
|
-
throw new Error(a.value.imageBudget);
|
|
1375
|
-
const s = new FileReader(), v = await new Promise((y, $) => {
|
|
1376
|
-
s.onload = () => y(String(s.result)), s.onerror = () => $(s.error), s.readAsDataURL(w);
|
|
1377
|
-
});
|
|
1378
|
-
!o.disabled && o.component === x && i("patch", { imageData: v });
|
|
1379
|
-
} catch (s) {
|
|
1380
|
-
d.value = s instanceof Error ? s.message : String(s);
|
|
1381
|
-
} finally {
|
|
1382
|
-
C.value = "";
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
return (I, C) => (m(), h("fieldset", {
|
|
1386
|
-
class: "mr-component-properties",
|
|
1387
|
-
disabled: t.disabled
|
|
1388
|
-
}, [
|
|
1389
|
-
n("div", za, [
|
|
1390
|
-
["text", "image", "barcode", "qrcode"].includes(t.component.kind) && t.component.kind !== "list" && !t.component.grid ? (m(), we(ha, {
|
|
1391
|
-
key: 0,
|
|
1392
|
-
component: t.component,
|
|
1393
|
-
repeat: t.repeat,
|
|
1394
|
-
schema: t.schema,
|
|
1395
|
-
disabled: t.disabled,
|
|
1396
|
-
messages: a.value,
|
|
1397
|
-
onChange: C[0] || (C[0] = (w) => i("patch", { binding: w, ...["barcode", "qrcode"].includes(t.component.kind) ? { imageData: void 0 } : {} }))
|
|
1398
|
-
}, null, 8, ["component", "repeat", "schema", "disabled", "messages"])) : F("", !0),
|
|
1399
|
-
t.component.kind === "text" && !t.component.binding ? (m(), h("label", Va, [
|
|
1400
|
-
N(l(a.value.componentText), 1),
|
|
1401
|
-
n("textarea", {
|
|
1402
|
-
rows: "3",
|
|
1403
|
-
value: t.component.text,
|
|
1404
|
-
onChange: C[1] || (C[1] = (w) => i("patch", { text: E(w) }))
|
|
1405
|
-
}, null, 40, ja)
|
|
1406
|
-
])) : F("", !0),
|
|
1407
|
-
t.component.kind === "image" && !t.component.binding ? (m(), h(J, { key: 2 }, [
|
|
1408
|
-
n("label", null, [
|
|
1409
|
-
N(l(a.value.imageSource), 1),
|
|
1410
|
-
n("textarea", {
|
|
1411
|
-
rows: "2",
|
|
1412
|
-
value: t.component.imageData,
|
|
1413
|
-
onChange: C[2] || (C[2] = (w) => i("patch", { imageData: E(w) }))
|
|
1414
|
-
}, null, 40, Wa)
|
|
1415
|
-
]),
|
|
1416
|
-
n("label", Ua, [
|
|
1417
|
-
N(l(a.value.imageUpload), 1),
|
|
1418
|
-
n("input", {
|
|
1419
|
-
type: "file",
|
|
1420
|
-
accept: "image/png,image/jpeg,image/webp,image/svg+xml",
|
|
1421
|
-
"aria-label": a.value.imageUpload,
|
|
1422
|
-
onChange: S
|
|
1423
|
-
}, null, 40, Ka)
|
|
1424
|
-
]),
|
|
1425
|
-
d.value ? (m(), h("p", qa, l(d.value), 1)) : F("", !0)
|
|
1426
|
-
], 64)) : F("", !0),
|
|
1427
|
-
t.component.kind === "barcode" || t.component.kind === "qrcode" ? (m(), we(Pa, {
|
|
1428
|
-
key: 3,
|
|
1429
|
-
component: t.component,
|
|
1430
|
-
disabled: t.disabled,
|
|
1431
|
-
messages: a.value,
|
|
1432
|
-
onChange: C[3] || (C[3] = (w) => i("patch", { code: w, imageData: void 0 }))
|
|
1433
|
-
}, null, 8, ["component", "disabled", "messages"])) : F("", !0),
|
|
1434
|
-
t.component.kind === "list" ? (m(), h("label", Ja, [
|
|
1435
|
-
N(l(a.value.listDataset), 1),
|
|
1436
|
-
n("input", {
|
|
1437
|
-
value: t.component.dataset,
|
|
1438
|
-
onChange: C[4] || (C[4] = (w) => i("patch", { dataset: E(w) }))
|
|
1439
|
-
}, null, 40, Ya)
|
|
1440
|
-
])) : F("", !0)
|
|
1441
|
-
]),
|
|
1442
|
-
t.component.kind === "text" ? (m(), h("div", Xa, [
|
|
1443
|
-
n("h3", null, l(a.value.textFormat), 1),
|
|
1444
|
-
n("div", Za, [
|
|
1445
|
-
n("label", null, [
|
|
1446
|
-
N(l(a.value.fontSize), 1),
|
|
1447
|
-
n("input", {
|
|
1448
|
-
type: "number",
|
|
1449
|
-
min: "1",
|
|
1450
|
-
max: "200",
|
|
1451
|
-
value: e(Ke)(t.component.style).fontSizePt,
|
|
1452
|
-
onChange: C[5] || (C[5] = (w) => g("fontSize", Number(E(w))))
|
|
1453
|
-
}, null, 40, Qa)
|
|
1454
|
-
]),
|
|
1455
|
-
n("label", null, [
|
|
1456
|
-
N(l(a.value.fontBold), 1),
|
|
1457
|
-
n("input", {
|
|
1458
|
-
type: "checkbox",
|
|
1459
|
-
checked: t.component.style?.bold === !0,
|
|
1460
|
-
onChange: C[6] || (C[6] = (w) => g("bold", w.target.checked))
|
|
1461
|
-
}, null, 40, el)
|
|
1462
|
-
])
|
|
1463
|
-
]),
|
|
1464
|
-
se(mt, {
|
|
1465
|
-
"model-value": t.component.style?.align ?? "left",
|
|
1466
|
-
label: a.value.bodyAlign,
|
|
1467
|
-
labels: k.value,
|
|
1468
|
-
"auto-label": a.value.autoShort,
|
|
1469
|
-
"onUpdate:modelValue": C[7] || (C[7] = (w) => g("align", w))
|
|
1470
|
-
}, null, 8, ["model-value", "label", "labels", "auto-label"]),
|
|
1471
|
-
n("div", tl, [
|
|
1472
|
-
n("label", null, [
|
|
1473
|
-
N(l(a.value.textColor), 1),
|
|
1474
|
-
n("input", {
|
|
1475
|
-
type: "color",
|
|
1476
|
-
value: t.component.style?.color ?? "#233c5c",
|
|
1477
|
-
onChange: C[8] || (C[8] = (w) => g("color", E(w)))
|
|
1478
|
-
}, null, 40, nl)
|
|
1479
|
-
]),
|
|
1480
|
-
n("label", null, [
|
|
1481
|
-
N(l(a.value.backgroundColor), 1),
|
|
1482
|
-
n("input", {
|
|
1483
|
-
type: "color",
|
|
1484
|
-
value: t.component.style?.backgroundColor ?? "#ffffff",
|
|
1485
|
-
onChange: C[9] || (C[9] = (w) => g("backgroundColor", E(w)))
|
|
1486
|
-
}, null, 40, al)
|
|
1487
|
-
])
|
|
1488
|
-
])
|
|
1489
|
-
])) : F("", !0),
|
|
1490
|
-
n("details", {
|
|
1491
|
-
class: "mr-component-position",
|
|
1492
|
-
open: !t.repeat
|
|
1493
|
-
}, [
|
|
1494
|
-
n("summary", null, [
|
|
1495
|
-
n("strong", null, l(a.value.positionGroup), 1),
|
|
1496
|
-
n("span", null, l(e(ge)(t.component).widthMm) + " × " + l(e(ge)(t.component).heightMm), 1)
|
|
1497
|
-
]),
|
|
1498
|
-
n("div", ol, [
|
|
1499
|
-
(m(!0), h(J, null, Q(p.filter(
|
|
1500
|
-
(w) => t.component.kind !== "list" || w !== "heightMm"
|
|
1501
|
-
), (w, x) => (m(), h("label", { key: w }, [
|
|
1502
|
-
N(l(M.value[x]), 1),
|
|
1503
|
-
n("input", {
|
|
1504
|
-
type: "number",
|
|
1505
|
-
step: "0.5",
|
|
1506
|
-
min: w === "widthMm" || w === "heightMm" ? 2 : 0,
|
|
1507
|
-
value: e(ge)(t.component)[w],
|
|
1508
|
-
disabled: t.geometryDisabled,
|
|
1509
|
-
onChange: (s) => b(w, s)
|
|
1510
|
-
}, null, 40, il)
|
|
1511
|
-
]))), 128))
|
|
1512
|
-
]),
|
|
1513
|
-
t.component.kind !== "list" && !t.repeat ? (m(), h("label", sl, [
|
|
1514
|
-
N(l(a.value.repeatPage), 1),
|
|
1515
|
-
n("select", {
|
|
1516
|
-
value: t.component.pageAnchor ?? "",
|
|
1517
|
-
disabled: t.geometryDisabled,
|
|
1518
|
-
onChange: C[10] || (C[10] = (w) => i("patch", { pageAnchor: E(w) || void 0 }))
|
|
1519
|
-
}, [
|
|
1520
|
-
n("option", dl, l(a.value.repeatNone), 1),
|
|
1521
|
-
n("option", ul, l(a.value.repeatHeader), 1),
|
|
1522
|
-
n("option", cl, l(a.value.repeatFooter), 1)
|
|
1523
|
-
], 40, rl)
|
|
1524
|
-
])) : F("", !0)
|
|
1525
|
-
], 8, ll)
|
|
1526
|
-
], 8, Oa));
|
|
1527
|
-
}
|
|
1528
|
-
}), vl = /* @__PURE__ */ Ce(ml, [["__scopeId", "data-v-435b5126"]]), pl = ["disabled"], gl = { class: "mr-page-section-heading" }, hl = ["aria-label"], fl = ["aria-pressed", "onClick"], bl = { class: "mr-page-actions" }, yl = ["disabled"], wl = {
|
|
1529
|
-
key: 0,
|
|
1530
|
-
class: "mr-page-confirm",
|
|
1531
|
-
role: "alert"
|
|
1532
|
-
}, Ml = ["value", "placeholder"], kl = ["value"], xl = ["value"], Cl = { value: "custom" }, $l = { class: "mr-page-grid" }, Sl = ["value"], _l = ["value"], Il = ["value"], El = { value: "page" }, Rl = ["disabled"], Pl = { class: "mr-page-grid" }, Tl = ["value", "onChange"], Ll = {
|
|
1533
|
-
key: 1,
|
|
1534
|
-
class: "mr-page-overflow",
|
|
1535
|
-
role: "status"
|
|
1536
|
-
}, Dl = /* @__PURE__ */ xe({
|
|
1537
|
-
__name: "TemplatePageInspector",
|
|
1538
|
-
props: {
|
|
1539
|
-
document: {},
|
|
1540
|
-
pageIndex: {},
|
|
1541
|
-
disabled: { type: Boolean },
|
|
1542
|
-
messages: {}
|
|
1543
|
-
},
|
|
1544
|
-
emits: ["select", "command", "locate"],
|
|
1545
|
-
setup(t, { emit: u }) {
|
|
1546
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = D(() => o.document.template.pages[o.pageIndex]), p = D(() => ut.find((x) => x.widthMm === d.value.widthMm && x.heightMm === d.value.heightMm)?.id ?? "custom"), M = D(() => Et(d.value)), b = q(!1);
|
|
1547
|
-
ae(() => [o.pageIndex, o.document], () => {
|
|
1548
|
-
b.value = !1;
|
|
1549
|
-
});
|
|
1550
|
-
const g = ["marginTopMm", "marginRightMm", "marginBottomMm", "marginLeftMm"], k = D(() => [a.value.marginTop, a.value.marginRight, a.value.marginBottom, a.value.marginLeft]);
|
|
1551
|
-
function E(x) {
|
|
1552
|
-
return x.target.value;
|
|
1553
|
-
}
|
|
1554
|
-
function S(x) {
|
|
1555
|
-
o.disabled || i("command", { type: "patch", patch: x });
|
|
1556
|
-
}
|
|
1557
|
-
function I(x) {
|
|
1558
|
-
const s = ut.find((v) => v.id === E(x));
|
|
1559
|
-
s && S({ widthMm: s.widthMm, heightMm: s.heightMm, layout: "page" });
|
|
1560
|
-
}
|
|
1561
|
-
function C(x, s) {
|
|
1562
|
-
const v = E(s);
|
|
1563
|
-
v.trim() && Number.isFinite(Number(v)) && S({ [x]: Number(v) });
|
|
1564
|
-
}
|
|
1565
|
-
function w() {
|
|
1566
|
-
if (!(o.disabled || o.document.template.pages.length <= 1)) {
|
|
1567
|
-
if (d.value.components.length && !b.value) {
|
|
1568
|
-
b.value = !0;
|
|
1569
|
-
return;
|
|
1570
|
-
}
|
|
1571
|
-
i("command", { type: "remove" }), b.value = !1;
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
return (x, s) => (m(), h("fieldset", {
|
|
1575
|
-
class: "mr-page-properties",
|
|
1576
|
-
disabled: t.disabled
|
|
1577
|
-
}, [
|
|
1578
|
-
n("div", gl, [
|
|
1579
|
-
n("h3", null, l(a.value.paperAndPages), 1),
|
|
1580
|
-
n("span", null, l(d.value.widthMm) + " × " + l(d.value.heightMm) + " mm", 1)
|
|
1581
|
-
]),
|
|
1582
|
-
n("div", {
|
|
1583
|
-
class: "mr-page-list",
|
|
1584
|
-
"aria-label": a.value.pageDirectory
|
|
1585
|
-
}, [
|
|
1586
|
-
(m(!0), h(J, null, Q(t.document.template.pages, (v, y) => (m(), h("button", {
|
|
1587
|
-
key: y,
|
|
1588
|
-
type: "button",
|
|
1589
|
-
"aria-pressed": t.pageIndex === y,
|
|
1590
|
-
onClick: ($) => i("select", y)
|
|
1591
|
-
}, [
|
|
1592
|
-
n("span", null, l(y + 1), 1),
|
|
1593
|
-
n("strong", null, l(e(Je)(v, y, a.value.page)), 1),
|
|
1594
|
-
n("small", null, l(v.widthMm) + " × " + l(v.heightMm), 1)
|
|
1595
|
-
], 8, fl))), 128))
|
|
1596
|
-
], 8, hl),
|
|
1597
|
-
n("div", bl, [
|
|
1598
|
-
n("button", {
|
|
1599
|
-
type: "button",
|
|
1600
|
-
onClick: s[0] || (s[0] = (v) => i("command", { type: "add" }))
|
|
1601
|
-
}, "+ " + l(a.value.addPage), 1),
|
|
1602
|
-
n("button", {
|
|
1603
|
-
type: "button",
|
|
1604
|
-
onClick: s[1] || (s[1] = (v) => i("command", { type: "duplicate" }))
|
|
1605
|
-
}, l(a.value.duplicatePage), 1),
|
|
1606
|
-
n("button", {
|
|
1607
|
-
type: "button",
|
|
1608
|
-
disabled: t.disabled || t.document.template.pages.length <= 1,
|
|
1609
|
-
onClick: w
|
|
1610
|
-
}, l(a.value.removePage), 9, yl)
|
|
1611
|
-
]),
|
|
1612
|
-
b.value ? (m(), h("div", wl, [
|
|
1613
|
-
n("span", null, l(a.value.removePageConfirm), 1),
|
|
1614
|
-
n("button", {
|
|
1615
|
-
type: "button",
|
|
1616
|
-
onClick: s[2] || (s[2] = (v) => b.value = !1)
|
|
1617
|
-
}, l(a.value.keepEditing), 1),
|
|
1618
|
-
n("button", {
|
|
1619
|
-
type: "button",
|
|
1620
|
-
onClick: w
|
|
1621
|
-
}, l(a.value.confirmRemovePage), 1)
|
|
1622
|
-
])) : F("", !0),
|
|
1623
|
-
n("label", null, [
|
|
1624
|
-
N(l(a.value.pageName), 1),
|
|
1625
|
-
n("input", {
|
|
1626
|
-
value: d.value.meta?.title ?? "",
|
|
1627
|
-
placeholder: `${a.value.page} ${t.pageIndex + 1}`,
|
|
1628
|
-
maxlength: "120",
|
|
1629
|
-
onChange: s[3] || (s[3] = (v) => S({ meta: { ...d.value.meta, title: E(v) } }))
|
|
1630
|
-
}, null, 40, Ml)
|
|
1631
|
-
]),
|
|
1632
|
-
n("label", null, [
|
|
1633
|
-
N(l(a.value.paperPreset), 1),
|
|
1634
|
-
n("select", {
|
|
1635
|
-
value: p.value,
|
|
1636
|
-
onChange: I
|
|
1637
|
-
}, [
|
|
1638
|
-
(m(!0), h(J, null, Q(e(ut), (v) => (m(), h("option", {
|
|
1639
|
-
key: v.id,
|
|
1640
|
-
value: v.id
|
|
1641
|
-
}, l(v.id.startsWith("label") ? a.value.labelPaper : v.id.toUpperCase()) + " · " + l(v.widthMm) + " × " + l(v.heightMm) + " mm", 9, xl))), 128)),
|
|
1642
|
-
n("option", Cl, l(a.value.customPaper), 1)
|
|
1643
|
-
], 40, kl)
|
|
1644
|
-
]),
|
|
1645
|
-
n("div", $l, [
|
|
1646
|
-
n("label", null, [
|
|
1647
|
-
N(l(a.value.paperWidth), 1),
|
|
1648
|
-
n("input", {
|
|
1649
|
-
type: "number",
|
|
1650
|
-
min: "1",
|
|
1651
|
-
step: "0.5",
|
|
1652
|
-
value: d.value.widthMm,
|
|
1653
|
-
onChange: s[4] || (s[4] = (v) => C("widthMm", v))
|
|
1654
|
-
}, null, 40, Sl)
|
|
1655
|
-
]),
|
|
1656
|
-
n("label", null, [
|
|
1657
|
-
N(l(a.value.paperHeight), 1),
|
|
1658
|
-
n("input", {
|
|
1659
|
-
type: "number",
|
|
1660
|
-
min: "1",
|
|
1661
|
-
max: "4999",
|
|
1662
|
-
step: "0.5",
|
|
1663
|
-
value: d.value.heightMm,
|
|
1664
|
-
onChange: s[5] || (s[5] = (v) => C("heightMm", v))
|
|
1665
|
-
}, null, 40, _l)
|
|
1666
|
-
])
|
|
1667
|
-
]),
|
|
1668
|
-
n("label", null, [
|
|
1669
|
-
N(l(a.value.pageLayout), 1),
|
|
1670
|
-
n("select", {
|
|
1671
|
-
value: d.value.layout ?? "page",
|
|
1672
|
-
onChange: s[6] || (s[6] = (v) => S({ layout: E(v) }))
|
|
1673
|
-
}, [
|
|
1674
|
-
n("option", El, l(a.value.fixedPaper), 1),
|
|
1675
|
-
n("option", {
|
|
1676
|
-
value: "wide",
|
|
1677
|
-
disabled: !!t.document.template.repeat
|
|
1678
|
-
}, l(a.value.completeWide), 9, Rl)
|
|
1679
|
-
], 40, Il)
|
|
1680
|
-
]),
|
|
1681
|
-
n("details", null, [
|
|
1682
|
-
n("summary", null, l(a.value.pageMargins), 1),
|
|
1683
|
-
n("div", Pl, [
|
|
1684
|
-
(m(), h(J, null, Q(g, (v, y) => n("label", { key: v }, [
|
|
1685
|
-
N(l(k.value[y]), 1),
|
|
1686
|
-
n("input", {
|
|
1687
|
-
type: "number",
|
|
1688
|
-
min: "0",
|
|
1689
|
-
step: "0.5",
|
|
1690
|
-
value: d.value[v] ?? 0,
|
|
1691
|
-
onChange: ($) => C(v, $)
|
|
1692
|
-
}, null, 40, Tl)
|
|
1693
|
-
])), 64))
|
|
1694
|
-
])
|
|
1695
|
-
]),
|
|
1696
|
-
M.value.length ? (m(), h("div", Ll, [
|
|
1697
|
-
n("strong", null, l(a.value.pageOverflow.replace("{count}", String(M.value.length))), 1),
|
|
1698
|
-
n("p", null, l(a.value.pageOverflowHint), 1),
|
|
1699
|
-
n("button", {
|
|
1700
|
-
type: "button",
|
|
1701
|
-
onClick: s[7] || (s[7] = (v) => i("locate", M.value[0]))
|
|
1702
|
-
}, l(a.value.locateOverflow), 1)
|
|
1703
|
-
])) : F("", !0)
|
|
1704
|
-
], 8, pl));
|
|
1705
|
-
}
|
|
1706
|
-
}), Al = /* @__PURE__ */ Ce(Dl, [["__scopeId", "data-v-da0b7ab6"]]), Hl = ["disabled"], Fl = { class: "mr-repeat-toggle" }, Nl = ["checked", "disabled"], Gl = ["value", "list"], Bl = ["id"], Ol = ["value"], zl = ["value"], Vl = ["value"], jl = { class: "mr-repeat-grid" }, Wl = ["value"], Ul = { value: "fixed" }, Kl = { value: "field" }, ql = { key: 0 }, Jl = ["value"], Yl = { key: 1 }, Xl = ["value"], Zl = { class: "mr-repeat-note" }, Ql = /* @__PURE__ */ xe({
|
|
1707
|
-
__name: "TemplateRepeatInspector",
|
|
1708
|
-
props: {
|
|
1709
|
-
document: {},
|
|
1710
|
-
datasets: {},
|
|
1711
|
-
schemas: {},
|
|
1712
|
-
disabled: { type: Boolean },
|
|
1713
|
-
messages: {}
|
|
1714
|
-
},
|
|
1715
|
-
emits: ["change"],
|
|
1716
|
-
setup(t, { emit: u }) {
|
|
1717
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = D(() => o.document.template.repeat), p = D(() => o.schemas?.[d.value?.dataset ?? ""]?.fields ?? []), M = D(() => [.../* @__PURE__ */ new Set([...o.datasets ?? [], ...Object.keys(o.schemas ?? {}), ...d.value ? [d.value.dataset] : []])]), b = D(() => o.document.template.pages.some((s) => s.components.some((v) => v.kind !== "list" && v.binding))), g = D(() => o.document.template.pages.some((s) => s.layout === "wide" || !!s.flow || s.components.some((v) => v.kind === "list") || Et(s).length > 0)), k = D(() => typeof d.value?.copies == "object" ? "field" : "fixed"), E = `mr-repeat-fields-${pt()?.uid ?? 0}`;
|
|
1718
|
-
function S(s) {
|
|
1719
|
-
return s.target.value;
|
|
1720
|
-
}
|
|
1721
|
-
function I(s) {
|
|
1722
|
-
!o.disabled && d.value && i("change", { ...d.value, ...s });
|
|
1723
|
-
}
|
|
1724
|
-
function C(s) {
|
|
1725
|
-
o.disabled || (s.target.checked ? g.value || i("change", { dataset: M.value[0] ?? "detail", copies: 1 }) : b.value || i("change", void 0));
|
|
1726
|
-
}
|
|
1727
|
-
function w(s) {
|
|
1728
|
-
if (!d.value || o.disabled) return;
|
|
1729
|
-
const v = { ...d.value }, y = S(s).trim();
|
|
1730
|
-
y ? v.rowKey = y : delete v.rowKey, i("change", v);
|
|
1731
|
-
}
|
|
1732
|
-
function x(s) {
|
|
1733
|
-
I({ copies: S(s) === "field" ? { field: p.value.find((v) => v.type === "number")?.field ?? "copies" } : 1 });
|
|
1734
|
-
}
|
|
1735
|
-
return (s, v) => (m(), h("fieldset", {
|
|
1736
|
-
class: "mr-repeat-properties",
|
|
1737
|
-
disabled: t.disabled
|
|
1738
|
-
}, [
|
|
1739
|
-
n("label", Fl, [
|
|
1740
|
-
n("span", null, [
|
|
1741
|
-
n("strong", null, l(a.value.repeatRecords), 1),
|
|
1742
|
-
n("small", null, l(g.value ? a.value.repeatNeedsFixed : a.value.repeatRecordsHint), 1)
|
|
1743
|
-
]),
|
|
1744
|
-
n("input", {
|
|
1745
|
-
type: "checkbox",
|
|
1746
|
-
checked: !!d.value,
|
|
1747
|
-
disabled: t.disabled || !!d.value && b.value || !d.value && g.value,
|
|
1748
|
-
onChange: C
|
|
1749
|
-
}, null, 40, Nl)
|
|
1750
|
-
]),
|
|
1751
|
-
d.value ? (m(), h(J, { key: 0 }, [
|
|
1752
|
-
n("label", null, [
|
|
1753
|
-
N(l(a.value.recordDataset), 1),
|
|
1754
|
-
n("input", {
|
|
1755
|
-
value: d.value.dataset,
|
|
1756
|
-
list: `${E}-datasets`,
|
|
1757
|
-
onChange: v[0] || (v[0] = (y) => S(y).trim() && I({ dataset: S(y).trim() }))
|
|
1758
|
-
}, null, 40, Gl)
|
|
1759
|
-
]),
|
|
1760
|
-
n("datalist", {
|
|
1761
|
-
id: `${E}-datasets`
|
|
1762
|
-
}, [
|
|
1763
|
-
(m(!0), h(J, null, Q(M.value, (y) => (m(), h("option", {
|
|
1764
|
-
key: y,
|
|
1765
|
-
value: y
|
|
1766
|
-
}, null, 8, Ol))), 128))
|
|
1767
|
-
], 8, Bl),
|
|
1768
|
-
n("label", null, [
|
|
1769
|
-
N(l(a.value.recordRowKey), 1),
|
|
1770
|
-
n("input", {
|
|
1771
|
-
value: d.value.rowKey ?? "",
|
|
1772
|
-
list: E,
|
|
1773
|
-
onChange: w
|
|
1774
|
-
}, null, 40, zl)
|
|
1775
|
-
]),
|
|
1776
|
-
n("datalist", { id: E }, [
|
|
1777
|
-
(m(!0), h(J, null, Q(p.value, (y) => (m(), h("option", {
|
|
1778
|
-
key: y.field,
|
|
1779
|
-
value: y.field
|
|
1780
|
-
}, l(y.label), 9, Vl))), 128))
|
|
1781
|
-
]),
|
|
1782
|
-
n("div", jl, [
|
|
1783
|
-
n("label", null, [
|
|
1784
|
-
N(l(a.value.labelCopies), 1),
|
|
1785
|
-
n("select", {
|
|
1786
|
-
value: k.value,
|
|
1787
|
-
onChange: x
|
|
1788
|
-
}, [
|
|
1789
|
-
n("option", Ul, l(a.value.fixedCopies), 1),
|
|
1790
|
-
n("option", Kl, l(a.value.fieldCopies), 1)
|
|
1791
|
-
], 40, Wl)
|
|
1792
|
-
]),
|
|
1793
|
-
k.value === "fixed" ? (m(), h("label", ql, [
|
|
1794
|
-
N(l(a.value.copiesPerRecord), 1),
|
|
1795
|
-
n("input", {
|
|
1796
|
-
type: "number",
|
|
1797
|
-
min: "1",
|
|
1798
|
-
max: "1000",
|
|
1799
|
-
step: "1",
|
|
1800
|
-
value: d.value.copies ?? 1,
|
|
1801
|
-
onChange: v[1] || (v[1] = (y) => S(y).trim() && I({ copies: Number(S(y)) }))
|
|
1802
|
-
}, null, 40, Jl)
|
|
1803
|
-
])) : (m(), h("label", Yl, [
|
|
1804
|
-
N(l(a.value.copiesField), 1),
|
|
1805
|
-
n("input", {
|
|
1806
|
-
value: typeof d.value.copies == "object" ? d.value.copies.field : "",
|
|
1807
|
-
list: E,
|
|
1808
|
-
onChange: v[2] || (v[2] = (y) => S(y).trim() && I({ copies: { field: S(y).trim() } }))
|
|
1809
|
-
}, null, 40, Xl)
|
|
1810
|
-
]))
|
|
1811
|
-
]),
|
|
1812
|
-
n("p", Zl, l(b.value ? a.value.repeatBoundHint : a.value.repeatOrderHint), 1)
|
|
1813
|
-
], 64)) : F("", !0)
|
|
1814
|
-
], 8, Hl));
|
|
1815
|
-
}
|
|
1816
|
-
}), eo = /* @__PURE__ */ Ce(Ql, [["__scopeId", "data-v-de1ee031"]]), to = { class: "mr-header-editor" }, no = ["disabled"], ao = ["value"], lo = ["value"], oo = ["value"], io = ["disabled"], so = /* @__PURE__ */ xe({
|
|
1817
|
-
__name: "HeaderStructureEditor",
|
|
1818
|
-
props: {
|
|
1819
|
-
list: {},
|
|
1820
|
-
disabled: { type: Boolean },
|
|
1821
|
-
messages: {}
|
|
1822
|
-
},
|
|
1823
|
-
emits: ["command"],
|
|
1824
|
-
setup(t, { emit: u }) {
|
|
1825
|
-
const o = t, i = u, a = D(() => ({ ...Ee, ...o.messages })), d = q(0), p = q(0), M = q(Math.min(1, o.list.columns.length - 1));
|
|
1826
|
-
return ae(
|
|
1827
|
-
() => o.list.columns.length,
|
|
1828
|
-
(b) => {
|
|
1829
|
-
p.value = Math.min(p.value, b - 1), M.value = Math.min(M.value, b - 1);
|
|
1830
|
-
}
|
|
1831
|
-
), (b, g) => (m(), h("details", to, [
|
|
1832
|
-
n("summary", null, [
|
|
1833
|
-
N(l(a.value.headerStructure), 1),
|
|
1834
|
-
n("span", null, l(t.list.headerGrid?.cells.length ?? 1) + " " + l(a.value.headerRow), 1)
|
|
1835
|
-
]),
|
|
1836
|
-
n("fieldset", { disabled: t.disabled }, [
|
|
1837
|
-
n("label", null, [
|
|
1838
|
-
N(l(a.value.headerRow), 1),
|
|
1839
|
-
fe(n("select", {
|
|
1840
|
-
"onUpdate:modelValue": g[0] || (g[0] = (k) => d.value = k)
|
|
1841
|
-
}, [
|
|
1842
|
-
(m(!0), h(J, null, Q(t.list.headerGrid?.cells.length ?? 1, (k) => (m(), h("option", {
|
|
1843
|
-
key: k,
|
|
1844
|
-
value: k - 1
|
|
1845
|
-
}, l(k), 9, ao))), 128))
|
|
1846
|
-
], 512), [
|
|
1847
|
-
[
|
|
1848
|
-
Ue,
|
|
1849
|
-
d.value,
|
|
1850
|
-
void 0,
|
|
1851
|
-
{ number: !0 }
|
|
1852
|
-
]
|
|
1853
|
-
])
|
|
1854
|
-
]),
|
|
1855
|
-
n("label", null, [
|
|
1856
|
-
N(l(a.value.headerFirst), 1),
|
|
1857
|
-
fe(n("select", {
|
|
1858
|
-
"onUpdate:modelValue": g[1] || (g[1] = (k) => p.value = k)
|
|
1859
|
-
}, [
|
|
1860
|
-
(m(!0), h(J, null, Q(t.list.columns, (k, E) => (m(), h("option", {
|
|
1861
|
-
key: E,
|
|
1862
|
-
value: E
|
|
1863
|
-
}, l(E + 1) + " · " + l(k.header), 9, lo))), 128))
|
|
1864
|
-
], 512), [
|
|
1865
|
-
[
|
|
1866
|
-
Ue,
|
|
1867
|
-
p.value,
|
|
1868
|
-
void 0,
|
|
1869
|
-
{ number: !0 }
|
|
1870
|
-
]
|
|
1871
|
-
])
|
|
1872
|
-
]),
|
|
1873
|
-
n("label", null, [
|
|
1874
|
-
N(l(a.value.headerLast), 1),
|
|
1875
|
-
fe(n("select", {
|
|
1876
|
-
"onUpdate:modelValue": g[2] || (g[2] = (k) => M.value = k)
|
|
1877
|
-
}, [
|
|
1878
|
-
(m(!0), h(J, null, Q(t.list.columns, (k, E) => (m(), h("option", {
|
|
1879
|
-
key: E,
|
|
1880
|
-
value: E
|
|
1881
|
-
}, l(E + 1) + " · " + l(k.header), 9, oo))), 128))
|
|
1882
|
-
], 512), [
|
|
1883
|
-
[
|
|
1884
|
-
Ue,
|
|
1885
|
-
M.value,
|
|
1886
|
-
void 0,
|
|
1887
|
-
{ number: !0 }
|
|
1888
|
-
]
|
|
1889
|
-
])
|
|
1890
|
-
]),
|
|
1891
|
-
n("div", null, [
|
|
1892
|
-
n("button", {
|
|
1893
|
-
type: "button",
|
|
1894
|
-
onClick: g[3] || (g[3] = (k) => i("command", { action: "add", row: d.value, first: p.value, last: M.value }))
|
|
1895
|
-
}, l(a.value.addHeaderRow), 1),
|
|
1896
|
-
n("button", {
|
|
1897
|
-
type: "button",
|
|
1898
|
-
disabled: p.value >= M.value,
|
|
1899
|
-
onClick: g[4] || (g[4] = (k) => i("command", { action: "merge", row: d.value, first: p.value, last: M.value }))
|
|
1900
|
-
}, l(a.value.mergeHeader), 9, io),
|
|
1901
|
-
n("button", {
|
|
1902
|
-
type: "button",
|
|
1903
|
-
onClick: g[5] || (g[5] = (k) => i("command", { action: "split", row: d.value, first: p.value, last: M.value }))
|
|
1904
|
-
}, l(a.value.splitHeader), 1)
|
|
1905
|
-
])
|
|
1906
|
-
], 8, no)
|
|
1907
|
-
]));
|
|
1908
|
-
}
|
|
1909
|
-
}), ro = /* @__PURE__ */ Ce(so, [["__scopeId", "data-v-acd607ef"]]), _e = (t) => `${t.pageIndex}:${t.componentIndex}`;
|
|
1910
|
-
function uo(t, u, o) {
|
|
1911
|
-
const i = q([]), a = q(/* @__PURE__ */ new Set());
|
|
1912
|
-
ae(() => t.value.id, () => {
|
|
1913
|
-
i.value = [], a.value = /* @__PURE__ */ new Set();
|
|
1914
|
-
});
|
|
1915
|
-
const d = (S) => !!S && a.value.has(_e(S));
|
|
1916
|
-
function p(S) {
|
|
1917
|
-
const I = { pageIndex: S.pageIndex, componentIndex: S.componentIndex };
|
|
1918
|
-
if (S.additive && i.value.every((C) => C.pageIndex === S.pageIndex)) {
|
|
1919
|
-
const C = i.value.some((w) => _e(w) === _e(S));
|
|
1920
|
-
i.value = C ? i.value.filter((w) => _e(w) !== _e(S)) : [...i.value, I], u.value = C ? i.value.at(-1) : I;
|
|
1921
|
-
} else
|
|
1922
|
-
i.value = [I], u.value = I;
|
|
1923
|
-
}
|
|
1924
|
-
const M = D(() => i.value.filter((S) => !d(S)));
|
|
1925
|
-
function b() {
|
|
1926
|
-
const S = new Set(a.value), I = i.value.every(d);
|
|
1927
|
-
for (const C of i.value)
|
|
1928
|
-
I ? S.delete(_e(C)) : S.add(_e(C));
|
|
1929
|
-
a.value = S;
|
|
1930
|
-
}
|
|
1931
|
-
function g(S) {
|
|
1932
|
-
M.value.length < 2 || o((I) => {
|
|
1933
|
-
const C = M.value.map(($) => Pe(I, $)).filter(Boolean), w = C.map(ge), x = Math.min(...w.map(($) => $.leftMm)), s = Math.min(...w.map(($) => $.topMm)), v = Math.max(...w.map(($) => $.leftMm + $.widthMm)), y = Math.max(...w.map(($) => $.topMm + $.heightMm));
|
|
1934
|
-
C.forEach(($, R) => {
|
|
1935
|
-
const L = w[R], H = { left: x, center: (x + v - L.widthMm) / 2, right: v - L.widthMm }, V = { top: s, middle: (s + y - L.heightMm) / 2, bottom: y - L.heightMm };
|
|
1936
|
-
S in H ? L.leftMm = H[S] : L.topMm = V[S], Ne($, L);
|
|
1937
|
-
});
|
|
1938
|
-
});
|
|
1939
|
-
}
|
|
1940
|
-
function k(S) {
|
|
1941
|
-
M.value.length < 3 || o((I) => {
|
|
1942
|
-
const C = S === "horizontal" ? "leftMm" : "topMm", w = S === "horizontal" ? "widthMm" : "heightMm", x = M.value.map((R) => ({ component: Pe(I, R), box: ge(Pe(I, R)) })).sort((R, L) => R.box[C] - L.box[C]), s = x[0].box[C], y = (Math.max(...x.map((R) => R.box[C] + R.box[w])) - s - x.reduce((R, L) => R + L.box[w], 0)) / (x.length - 1);
|
|
1943
|
-
let $ = s;
|
|
1944
|
-
for (const R of x)
|
|
1945
|
-
R.box[C] = $, Ne(R.component, R.box), $ += R.box[w] + y;
|
|
1946
|
-
});
|
|
1947
|
-
}
|
|
1948
|
-
function E(S, I, C) {
|
|
1949
|
-
function w(x) {
|
|
1950
|
-
if (x.pageIndex !== S) return x;
|
|
1951
|
-
const s = x.componentIndex;
|
|
1952
|
-
return C === void 0 ? s === I ? void 0 : { ...x, componentIndex: s > I ? s - 1 : s } : { ...x, componentIndex: s === I ? C : s === C ? I : s };
|
|
1953
|
-
}
|
|
1954
|
-
a.value = new Set([...a.value].flatMap((x) => {
|
|
1955
|
-
const [s, v] = x.split(":").map(Number), y = w({ pageIndex: s, componentIndex: v });
|
|
1956
|
-
return y ? [_e(y)] : [];
|
|
1957
|
-
})), i.value = i.value.flatMap((x) => {
|
|
1958
|
-
const s = w(x);
|
|
1959
|
-
return s ? [s] : [];
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
return { clearLocks: () => {
|
|
1963
|
-
a.value = /* @__PURE__ */ new Set();
|
|
1964
|
-
}, selections: i, locked: d, allLocked: D(() => !!i.value.length && i.value.every(d)), toggleLock: b, align: g, distribute: k, select: p, remap: E };
|
|
1965
|
-
}
|
|
1966
|
-
function co(t, u) {
|
|
1967
|
-
const o = q("preview"), i = q(), a = q(0), d = D(() => !!t.value.template.pages[i.value?.pageIndex ?? a.value]?.flow), p = uo(t, i, (w) => d.value ? !1 : u(w)), M = D(
|
|
1968
|
-
() => Pe(t.value, i.value)
|
|
1969
|
-
);
|
|
1970
|
-
ae(a, (w) => {
|
|
1971
|
-
i.value?.pageIndex !== w && (i.value = void 0, p.selections.value = []);
|
|
1972
|
-
}), ae(t, () => {
|
|
1973
|
-
M.value || (i.value = void 0), p.selections.value = p.selections.value.filter((w) => !!Pe(t.value, w)), t.value.template.pages[a.value] || (a.value = 0);
|
|
1974
|
-
});
|
|
1975
|
-
function b(w) {
|
|
1976
|
-
p.select(w), a.value = w.pageIndex;
|
|
1977
|
-
}
|
|
1978
|
-
function g(w) {
|
|
1979
|
-
const x = i.value;
|
|
1980
|
-
return !x || p.locked(x) ? !1 : u((s) => {
|
|
1981
|
-
const v = Pe(s, x);
|
|
1982
|
-
v && w(v, s);
|
|
1983
|
-
});
|
|
1984
|
-
}
|
|
1985
|
-
function k(w) {
|
|
1986
|
-
d.value || g((x, s) => {
|
|
1987
|
-
const v = s.template.pages[i.value.pageIndex];
|
|
1988
|
-
Ne(
|
|
1989
|
-
x,
|
|
1990
|
-
qe(w, v, x.kind === "list")
|
|
1991
|
-
);
|
|
1992
|
-
});
|
|
1993
|
-
}
|
|
1994
|
-
function E(w) {
|
|
1995
|
-
if (t.value.template.pages[a.value]?.flow || w === "list" && t.value.template.repeat) return;
|
|
1996
|
-
let x = -1;
|
|
1997
|
-
const s = a.value;
|
|
1998
|
-
u((v) => {
|
|
1999
|
-
const y = v.template.pages[s].components, $ = Jt(w);
|
|
2000
|
-
Ne($, qe(ge($), v.template.pages[s], $.kind === "list")), $.kind === "qrcode" && ($.widthMm = $.heightMm = Math.min($.widthMm, $.heightMm)), y.push($), x = y.length - 1;
|
|
2001
|
-
}) && b({ pageIndex: s, componentIndex: x });
|
|
2002
|
-
}
|
|
2003
|
-
function S() {
|
|
2004
|
-
if (d.value) return;
|
|
2005
|
-
const w = i.value;
|
|
2006
|
-
w && !p.locked(w) && u((x) => {
|
|
2007
|
-
x.template.pages[w.pageIndex].components.splice(
|
|
2008
|
-
w.componentIndex,
|
|
2009
|
-
1
|
|
2010
|
-
);
|
|
2011
|
-
}) && (p.remap(w.pageIndex, w.componentIndex), i.value = void 0);
|
|
2012
|
-
}
|
|
2013
|
-
function I() {
|
|
2014
|
-
if (d.value) return;
|
|
2015
|
-
const w = i.value;
|
|
2016
|
-
if (!w) return;
|
|
2017
|
-
let x = -1;
|
|
2018
|
-
u((s) => {
|
|
2019
|
-
const v = s.template.pages[w.pageIndex], y = JSON.parse(JSON.stringify(Pe(s, w))), $ = ge(y);
|
|
2020
|
-
$.leftMm += 4, $.topMm += 4, Ne(
|
|
2021
|
-
y,
|
|
2022
|
-
qe($, v, y.kind === "list")
|
|
2023
|
-
), y.kind === "list" ? delete y.id : (delete y.nid, delete y.rkey), v.components.push(y), x = v.components.length - 1;
|
|
2024
|
-
}) && b({ pageIndex: w.pageIndex, componentIndex: x });
|
|
2025
|
-
}
|
|
2026
|
-
function C(w) {
|
|
2027
|
-
if (d.value) return;
|
|
2028
|
-
const x = i.value;
|
|
2029
|
-
if (!x || p.locked(x)) return;
|
|
2030
|
-
const s = x.componentIndex + w;
|
|
2031
|
-
t.value.template.pages[x.pageIndex]?.components[s] && u((v) => {
|
|
2032
|
-
const y = v.template.pages[x.pageIndex].components;
|
|
2033
|
-
y.splice(s, 0, y.splice(x.componentIndex, 1)[0]);
|
|
2034
|
-
}) && (p.remap(x.pageIndex, x.componentIndex, s), b({ pageIndex: x.pageIndex, componentIndex: s }));
|
|
2035
|
-
}
|
|
2036
|
-
return {
|
|
2037
|
-
...p,
|
|
2038
|
-
mode: o,
|
|
2039
|
-
selection: i,
|
|
2040
|
-
pageIndex: a,
|
|
2041
|
-
active: M,
|
|
2042
|
-
geometryDisabled: d,
|
|
2043
|
-
select: b,
|
|
2044
|
-
mutate: g,
|
|
2045
|
-
geometry: k,
|
|
2046
|
-
insert: E,
|
|
2047
|
-
remove: S,
|
|
2048
|
-
duplicate: I,
|
|
2049
|
-
reorder: C
|
|
2050
|
-
};
|
|
2051
|
-
}
|
|
2052
|
-
function mo(t, u, o) {
|
|
2053
|
-
const { draft: i, lists: a, selected: d, activeList: p, blocked: M, jsonPending: b, error: g } = t, { section: k, activeIndex: E } = u, S = co(i, t.transaction), {
|
|
2054
|
-
mode: I,
|
|
2055
|
-
selection: C,
|
|
2056
|
-
pageIndex: w,
|
|
2057
|
-
active: x
|
|
2058
|
-
} = S;
|
|
2059
|
-
t.connectHistoryView({
|
|
2060
|
-
read: () => ({ pageIndex: w.value, componentIndex: C.value?.pageIndex === w.value ? C.value.componentIndex : void 0 }),
|
|
2061
|
-
restore: (G) => {
|
|
2062
|
-
w.value = Math.max(0, Math.min(i.value.template.pages.length - 1, G.pageIndex)), S.selection.value = void 0, S.selections.value = [], G.componentIndex !== void 0 && i.value.template.pages[w.value]?.components[G.componentIndex] && S.select({ pageIndex: w.value, componentIndex: G.componentIndex });
|
|
2063
|
-
}
|
|
2064
|
-
}), ae(t.historyViewRevision, () => t.captureHistoryView(), { flush: "post" });
|
|
2065
|
-
const s = q("excel"), v = q(/* @__PURE__ */ new Set());
|
|
2066
|
-
ae([k, s], () => {
|
|
2067
|
-
k.value === "tools" && (v.value = /* @__PURE__ */ new Set([...v.value, s.value]));
|
|
2068
|
-
}), ae(C, (G) => {
|
|
2069
|
-
if (!G) return;
|
|
2070
|
-
const z = a.value.findIndex(
|
|
2071
|
-
(O) => O.pageIndex === G.pageIndex && O.componentIndex === G.componentIndex
|
|
2072
|
-
);
|
|
2073
|
-
z >= 0 && (d.value = z);
|
|
2074
|
-
}), ae([E, d, I, k], () => {
|
|
2075
|
-
if (I.value !== "design" || k.value !== "fields") return;
|
|
2076
|
-
const G = a.value[d.value];
|
|
2077
|
-
G && (C.value?.pageIndex !== G.pageIndex || C.value.componentIndex !== G.componentIndex) && S.select({ pageIndex: G.pageIndex, componentIndex: G.componentIndex });
|
|
2078
|
-
});
|
|
2079
|
-
const y = D(
|
|
2080
|
-
() => t.editingReadonly.value || M.value || b.value
|
|
2081
|
-
), $ = D(
|
|
2082
|
-
() => o()?.[p.value?.dataset ?? ""]
|
|
2083
|
-
);
|
|
2084
|
-
function R(G) {
|
|
2085
|
-
I.value = G, k.value === "tools" && (k.value = G === "design" || !a.value.length ? "component" : "fields");
|
|
2086
|
-
}
|
|
2087
|
-
function L(G) {
|
|
2088
|
-
if (!i.value.template.pages[G.pageIndex]?.components[G.componentIndex])
|
|
2089
|
-
return;
|
|
2090
|
-
if (S.select(G), i.value.template.pages[G.pageIndex]?.components[G.componentIndex]?.kind === "list") {
|
|
2091
|
-
const O = a.value.findIndex(
|
|
2092
|
-
(Y) => Y.pageIndex === G.pageIndex && Y.componentIndex === G.componentIndex
|
|
2093
|
-
);
|
|
2094
|
-
O >= 0 && (d.value = O), k.value = "fields";
|
|
2095
|
-
} else k.value = "component";
|
|
2096
|
-
}
|
|
2097
|
-
function H(G) {
|
|
2098
|
-
const z = G.target;
|
|
2099
|
-
z.value && (S.insert(z.value), I.value = "design", k.value = "component", z.value = "");
|
|
2100
|
-
}
|
|
2101
|
-
function V(G) {
|
|
2102
|
-
i.value.template.pages[w.value]?.flow && ["leftMm", "topMm", "widthMm", "heightMm", "pageAnchor", "grid"].some((z) => z in G) || S.mutate((z, O) => {
|
|
2103
|
-
if (z.kind !== "list" && G.pageAnchor !== z.pageAnchor) {
|
|
2104
|
-
const _ = O.template.pages[C.value.pageIndex];
|
|
2105
|
-
G.pageAnchor === "header" && (z.topMm = _.marginTopMm ?? 0), G.pageAnchor === "footer" && (z.topMm = Math.max(
|
|
2106
|
-
0,
|
|
2107
|
-
_.heightMm - (_.marginBottomMm ?? 0) - z.heightMm
|
|
2108
|
-
));
|
|
2109
|
-
}
|
|
2110
|
-
const Y = z;
|
|
2111
|
-
for (const [_, P] of Object.entries(G))
|
|
2112
|
-
P === void 0 ? delete Y[_] : Y[_] = P;
|
|
2113
|
-
});
|
|
2114
|
-
}
|
|
2115
|
-
function j(G) {
|
|
2116
|
-
const z = a.value[d.value];
|
|
2117
|
-
z && t.transaction((O) => {
|
|
2118
|
-
O.template.pages[z.pageIndex].components[z.componentIndex] = G;
|
|
2119
|
-
});
|
|
2120
|
-
}
|
|
2121
|
-
function oe(G) {
|
|
2122
|
-
const z = p.value;
|
|
2123
|
-
if (!z || i.value.template.pages[a.value[d.value]?.pageIndex ?? -1]?.flow) return;
|
|
2124
|
-
const O = JSON.parse(JSON.stringify(z));
|
|
2125
|
-
try {
|
|
2126
|
-
Yt(O, E.value, E.value + G) && (j(O), u.activate(E.value + G));
|
|
2127
|
-
} catch (Y) {
|
|
2128
|
-
g.value = Y instanceof Error ? Y.message : String(Y);
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
function ce(G) {
|
|
2132
|
-
const z = a.value[d.value];
|
|
2133
|
-
!z || i.value.template.pages[z.pageIndex]?.flow || t.transaction((O) => {
|
|
2134
|
-
const Y = O.template.pages[z.pageIndex].components[z.componentIndex];
|
|
2135
|
-
Y?.kind === "list" && (G.action === "add" ? Xt(Y) : G.action === "merge" ? Zt(Y, G.row, G.first, G.last) : Qt(Y, G.row, G.first));
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
function r(G) {
|
|
2139
|
-
const z = /\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(G.path ?? ""), O = G.pageIndex ?? (z ? Number(z[1]) : void 0), Y = G.componentIndex ?? (z ? Number(z[2]) : void 0);
|
|
2140
|
-
if (!(O === void 0 || Y === void 0) && (I.value = "design", L({ pageIndex: O, componentIndex: Y }), G.field)) {
|
|
2141
|
-
const _ = p.value?.columns.findIndex(
|
|
2142
|
-
(P) => P.field === G.field
|
|
2143
|
-
);
|
|
2144
|
-
_ !== void 0 && _ >= 0 && u.activate(_);
|
|
2145
|
-
}
|
|
2146
|
-
}
|
|
2147
|
-
return {
|
|
2148
|
-
mode: I,
|
|
2149
|
-
setMode: R,
|
|
2150
|
-
canvasSelection: C,
|
|
2151
|
-
canvasPage: w,
|
|
2152
|
-
canvasActive: x,
|
|
2153
|
-
tool: s,
|
|
2154
|
-
visitedTools: v,
|
|
2155
|
-
editDisabled: y,
|
|
2156
|
-
dataSchema: $,
|
|
2157
|
-
chooseCanvas: L,
|
|
2158
|
-
insertComponent: H,
|
|
2159
|
-
patchCanvas: V,
|
|
2160
|
-
changeList: j,
|
|
2161
|
-
moveColumn: oe,
|
|
2162
|
-
headerCommand: ce,
|
|
2163
|
-
locateReview: r,
|
|
2164
|
-
canvas: S
|
|
2165
|
-
};
|
|
2166
|
-
}
|
|
2167
|
-
function vo(t, u, o) {
|
|
2168
|
-
if (!t.length) return;
|
|
2169
|
-
const i = Math.max(0, t.indexOf(u)), d = {
|
|
2170
|
-
ArrowDown: Math.min(i + 1, t.length - 1),
|
|
2171
|
-
ArrowUp: Math.max(i - 1, 0),
|
|
2172
|
-
Home: 0,
|
|
2173
|
-
End: t.length - 1
|
|
2174
|
-
}[o];
|
|
2175
|
-
return d === void 0 ? void 0 : t[d];
|
|
2176
|
-
}
|
|
2177
|
-
function po(t, u, o) {
|
|
2178
|
-
const i = q(!1), a = q(t.activeIndex.value), d = q(null), p = q(null), M = q(null), b = q(null);
|
|
2179
|
-
function g(v = !1) {
|
|
2180
|
-
const y = b.value, $ = y?.querySelector(
|
|
2181
|
-
`button[data-column-index="${a.value}"]`
|
|
2182
|
-
);
|
|
2183
|
-
if (!y || !$) return;
|
|
2184
|
-
v && $.focus({ preventScroll: !0 });
|
|
2185
|
-
const R = y.getBoundingClientRect(), L = $.getBoundingClientRect(), H = R.top + y.clientTop, V = H + y.clientHeight;
|
|
2186
|
-
L.top < H ? y.scrollTop += L.top - H : L.bottom > V && (y.scrollTop += L.bottom - V);
|
|
2187
|
-
}
|
|
2188
|
-
async function k(v = !1) {
|
|
2189
|
-
i.value && (i.value = !1, v && (await ue(), d.value?.focus({ preventScroll: !0 })));
|
|
2190
|
-
}
|
|
2191
|
-
async function E() {
|
|
2192
|
-
if (i.value) return k(!0);
|
|
2193
|
-
const v = o.value.map((y) => y.index);
|
|
2194
|
-
a.value = v.includes(t.activeIndex.value) ? t.activeIndex.value : v[0] ?? -1, i.value = !0, await ue(), M.value?.focus({ preventScroll: !0 }), g();
|
|
2195
|
-
}
|
|
2196
|
-
function S(v) {
|
|
2197
|
-
t.activate(v), k(!0);
|
|
2198
|
-
}
|
|
2199
|
-
function I(v) {
|
|
2200
|
-
i.value && (v.preventDefault(), v.stopPropagation(), k(!0));
|
|
2201
|
-
}
|
|
2202
|
-
async function C(v) {
|
|
2203
|
-
const y = vo(
|
|
2204
|
-
o.value.map(($) => $.index),
|
|
2205
|
-
a.value,
|
|
2206
|
-
v.key
|
|
2207
|
-
);
|
|
2208
|
-
y !== void 0 && (a.value = y, v.preventDefault(), await ue(), g(!0));
|
|
2209
|
-
}
|
|
2210
|
-
async function w(v) {
|
|
2211
|
-
if (!["ArrowDown", "ArrowUp", "Enter"].includes(v.key)) return;
|
|
2212
|
-
v.preventDefault(), v.stopPropagation();
|
|
2213
|
-
const y = o.value.map(($) => $.index);
|
|
2214
|
-
if (y.length) {
|
|
2215
|
-
if (v.key === "Enter") {
|
|
2216
|
-
y.includes(a.value) && S(a.value);
|
|
2217
|
-
return;
|
|
2218
|
-
}
|
|
2219
|
-
v.key === "ArrowUp" && (a.value = y.at(-1)), await ue(), g(!0);
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
function x(v) {
|
|
2223
|
-
const y = v.target;
|
|
2224
|
-
!i.value || p.value?.contains(y) || d.value?.contains(y) || k();
|
|
2225
|
-
}
|
|
2226
|
-
function s(v) {
|
|
2227
|
-
const y = v.relatedTarget;
|
|
2228
|
-
!y || p.value?.contains(y) || d.value?.contains(y) || k();
|
|
2229
|
-
}
|
|
2230
|
-
return ae(o, (v) => {
|
|
2231
|
-
v.some((y) => y.index === a.value) || (a.value = v[0]?.index ?? -1);
|
|
2232
|
-
}), ae(u, () => {
|
|
2233
|
-
k();
|
|
2234
|
-
}), _t(() => document.addEventListener("pointerdown", x)), De(() => document.removeEventListener("pointerdown", x)), {
|
|
2235
|
-
open: i,
|
|
2236
|
-
cursor: a,
|
|
2237
|
-
trigger: d,
|
|
2238
|
-
panel: p,
|
|
2239
|
-
search: M,
|
|
2240
|
-
list: b,
|
|
2241
|
-
toggle: E,
|
|
2242
|
-
close: k,
|
|
2243
|
-
choose: S,
|
|
2244
|
-
escape: I,
|
|
2245
|
-
navigate: C,
|
|
2246
|
-
searchKeydown: w,
|
|
2247
|
-
leave: s
|
|
2248
|
-
};
|
|
2249
|
-
}
|
|
2250
|
-
function go(t, u, o, i) {
|
|
2251
|
-
const a = q(0), d = q(""), p = q([]), M = D(
|
|
2252
|
-
() => t.value.template.pages.flatMap(
|
|
2253
|
-
(y, $) => y.components.flatMap(
|
|
2254
|
-
(R, L) => R.kind === "list" ? [{ component: R, pageIndex: $, componentIndex: L }] : []
|
|
2255
|
-
)
|
|
2256
|
-
)
|
|
2257
|
-
), b = D(
|
|
2258
|
-
() => M.value[a.value]?.component
|
|
2259
|
-
), g = D(() => {
|
|
2260
|
-
const y = b.value;
|
|
2261
|
-
if (!y) return [];
|
|
2262
|
-
const $ = y.columns.map(
|
|
2263
|
-
(R) => R.headerStyle?.align ?? R.headerAlign ?? y.headerStyle?.align ?? y.headerAlign ?? R.style?.align ?? "center"
|
|
2264
|
-
);
|
|
2265
|
-
if (y.headerGrid && u())
|
|
2266
|
-
for (const R of Ie(y.headerGrid, y.widthMm, 100).cells)
|
|
2267
|
-
for (let L = R.ci; L < R.ci + (R.cell.colSpan ?? 1); L++)
|
|
2268
|
-
$[L] = R.cell.style?.align ?? "left";
|
|
2269
|
-
return $;
|
|
2270
|
-
}), k = D(() => {
|
|
2271
|
-
const y = d.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
2272
|
-
return (b.value?.columns ?? []).flatMap(($, R) => {
|
|
2273
|
-
const L = `${$.header} ${$.field}`.toLocaleLowerCase();
|
|
2274
|
-
return y.every((H) => L.includes(H)) ? [{ column: $, index: R }] : [];
|
|
2275
|
-
});
|
|
2276
|
-
});
|
|
2277
|
-
function E(y, $) {
|
|
2278
|
-
p.value = $ ? [.../* @__PURE__ */ new Set([...p.value, y])] : p.value.filter((R) => R !== y);
|
|
2279
|
-
}
|
|
2280
|
-
function S(y) {
|
|
2281
|
-
for (const $ of k.value) E($.index, y);
|
|
2282
|
-
}
|
|
2283
|
-
function I() {
|
|
2284
|
-
p.value = [];
|
|
2285
|
-
}
|
|
2286
|
-
function C(y, $, R) {
|
|
2287
|
-
if (!o()) return;
|
|
2288
|
-
const L = M.value[a.value];
|
|
2289
|
-
if (($ === "widthMm" || $ === "hidden") && L && t.value.template.pages[L.pageIndex]?.flow) return;
|
|
2290
|
-
const H = b.value?.columns[y];
|
|
2291
|
-
H && ($ === "hidden" && R === !0 && !b.value?.columns.some(
|
|
2292
|
-
(V, j) => j !== y && !V.hidden
|
|
2293
|
-
) || (Object.assign(H, { [$]: $ === "widthMm" ? Number(R) : R }), $ === "header" && x(y, String(R)), $ === "headerAlign" && s(
|
|
2294
|
-
y,
|
|
2295
|
-
R
|
|
2296
|
-
), $ === "widthMm" && w(), i()));
|
|
2297
|
-
}
|
|
2298
|
-
function w() {
|
|
2299
|
-
const y = M.value[a.value];
|
|
2300
|
-
if (!y) return;
|
|
2301
|
-
const $ = y.component, R = t.value.template.pages[y.pageIndex], L = $.columns.map((H) => H.widthMm);
|
|
2302
|
-
$.headerGrid && ($.headerGrid.colWidthsMm = L), R.layout === "wide" && L.every((H) => Number.isFinite(H) && H > 0) && ($.widthMm = L.reduce((H, V) => H + V, 0), R.widthMm = Math.max(
|
|
2303
|
-
...R.components.map(
|
|
2304
|
-
(H) => H.leftMm + H.widthMm
|
|
2305
|
-
)
|
|
2306
|
-
) + (R.marginRightMm ?? 0));
|
|
2307
|
-
}
|
|
2308
|
-
function x(y, $) {
|
|
2309
|
-
const R = b.value;
|
|
2310
|
-
if (!R?.headerGrid) return;
|
|
2311
|
-
const H = Ie(R.headerGrid, R.widthMm, 100).cells.filter(({ ci: V, cell: j }) => V <= y && V + (j.colSpan ?? 1) > y).slice(-1)[0];
|
|
2312
|
-
H && (Object.assign(H.cell, { text: $, rawText: $, value: $ }), R.columns.slice(H.ci, H.ci + (H.cell.colSpan ?? 1)).forEach((V) => {
|
|
2313
|
-
V.header = $;
|
|
2314
|
-
}));
|
|
2315
|
-
}
|
|
2316
|
-
function s(y, $) {
|
|
2317
|
-
const R = b.value, L = R?.columns[y];
|
|
2318
|
-
if (L?.headerStyle?.align !== void 0 && (L.headerStyle = { ...L.headerStyle, align: $ }), !R?.headerGrid) return;
|
|
2319
|
-
const V = Ie(R.headerGrid, R.widthMm, 100).cells.filter(({ ci: j, cell: oe }) => j <= y && j + (oe.colSpan ?? 1) > y).slice(-1)[0];
|
|
2320
|
-
V && (V.cell.style = { ...V.cell.style, align: $ }, R.columns.slice(V.ci, V.ci + (V.cell.colSpan ?? 1)).forEach((j) => {
|
|
2321
|
-
j.headerAlign = $, j.headerStyle?.align !== void 0 && (j.headerStyle = { ...j.headerStyle, align: $ });
|
|
2322
|
-
}));
|
|
2323
|
-
}
|
|
2324
|
-
function v(y, $) {
|
|
2325
|
-
if (!(!o() || y === "headerAlign" && $ === "auto")) {
|
|
2326
|
-
for (const R of p.value) {
|
|
2327
|
-
const L = b.value?.columns[R];
|
|
2328
|
-
L && (Object.assign(L, { [y]: $ }), y === "headerAlign" && s(
|
|
2329
|
-
R,
|
|
2330
|
-
$
|
|
2331
|
-
));
|
|
2332
|
-
}
|
|
2333
|
-
i();
|
|
2334
|
-
}
|
|
2335
|
-
}
|
|
2336
|
-
return {
|
|
2337
|
-
selected: a,
|
|
2338
|
-
query: d,
|
|
2339
|
-
selectedColumns: p,
|
|
2340
|
-
lists: M,
|
|
2341
|
-
activeList: b,
|
|
2342
|
-
headerAlignments: g,
|
|
2343
|
-
visibleColumns: k,
|
|
2344
|
-
toggleColumn: E,
|
|
2345
|
-
selectVisible: S,
|
|
2346
|
-
clearSelection: I,
|
|
2347
|
-
setColumn: C,
|
|
2348
|
-
alignColumns: v
|
|
2349
|
-
};
|
|
2350
|
-
}
|
|
2351
|
-
function vt(t) {
|
|
2352
|
-
return t.kind === "snapshot" ? t.value.length * 2 : (t.removed.length + t.inserted.length) * 2 + 16;
|
|
2353
|
-
}
|
|
2354
|
-
function ho(t, u, o = !1) {
|
|
2355
|
-
const i = { kind: "snapshot", value: u };
|
|
2356
|
-
if (o) return i;
|
|
2357
|
-
let a = 0;
|
|
2358
|
-
const d = Math.min(t.length, u.length);
|
|
2359
|
-
for (; a < d && t.charCodeAt(a) === u.charCodeAt(a); ) a++;
|
|
2360
|
-
let p = t.length, M = u.length;
|
|
2361
|
-
for (; p > a && M > a && t.charCodeAt(p - 1) === u.charCodeAt(M - 1); )
|
|
2362
|
-
p--, M--;
|
|
2363
|
-
const b = { kind: "patch", start: a, removed: t.slice(a, p), inserted: u.slice(a, M) };
|
|
2364
|
-
return vt(b) < vt(i) ? b : i;
|
|
2365
|
-
}
|
|
2366
|
-
function je(t, u, o = !1) {
|
|
2367
|
-
if (u.kind === "snapshot") return u.value;
|
|
2368
|
-
const i = o ? u.inserted : u.removed, a = o ? u.removed : u.inserted;
|
|
2369
|
-
return t.slice(0, u.start) + a + t.slice(u.start + i.length);
|
|
2370
|
-
}
|
|
2371
|
-
const Fe = (t) => vt(t) + (t.view ? 64 : 0), We = (t, u) => u ? { ...t, view: { before: { ...u }, after: { ...u } } } : t;
|
|
2372
|
-
function fo(t, u = { entries: 100, bytes: 16 * 1024 * 1024 }) {
|
|
2373
|
-
if (![u.entries, u.bytes].every((x) => Number.isSafeInteger(x) && x > 0)) throw new RangeError("History budgets must be positive safe integers");
|
|
2374
|
-
const o = ct([{ kind: "snapshot", value: t }]), i = q(0), a = q(t), d = D(() => i.value > 0), p = D(() => i.value + 1 < o.value.length), M = D(() => a.value), b = D(() => o.value.reduce((x, s) => x + Fe(s), 0)), g = ct();
|
|
2375
|
-
function k(x, s) {
|
|
2376
|
-
o.value = [We({ kind: "snapshot", value: x }, s)], i.value = 0, a.value = x, g.value = s;
|
|
2377
|
-
}
|
|
2378
|
-
function E(x) {
|
|
2379
|
-
let s = x;
|
|
2380
|
-
for (; s > 0 && o.value[s].kind !== "snapshot"; ) s--;
|
|
2381
|
-
let v = "";
|
|
2382
|
-
for (; s <= x; s++) v = je(v, o.value[s]);
|
|
2383
|
-
return v;
|
|
2384
|
-
}
|
|
2385
|
-
function S(x) {
|
|
2386
|
-
let s = x.reduce((v, y) => v + Fe(y), 0);
|
|
2387
|
-
for (; x.length > 1 && (x.length > u.entries || s > u.bytes); ) {
|
|
2388
|
-
const v = x[0], y = x[1], $ = We({ kind: "snapshot", value: je(v.value, y) }, y.view?.after);
|
|
2389
|
-
s += Fe($) - Fe(v) - Fe(y), x.splice(0, 2, $);
|
|
2390
|
-
}
|
|
2391
|
-
return x;
|
|
2392
|
-
}
|
|
2393
|
-
function I(x) {
|
|
2394
|
-
if (!x) return;
|
|
2395
|
-
const s = o.value.slice(), v = s[i.value];
|
|
2396
|
-
s[i.value] = v.view ? { ...v, view: { before: v.view.before, after: { ...x } } } : We(v, x), o.value = s;
|
|
2397
|
-
}
|
|
2398
|
-
function C(x, s) {
|
|
2399
|
-
if (a.value === x) return !1;
|
|
2400
|
-
const v = o.value.slice(0, i.value + 1);
|
|
2401
|
-
return v.push(We(ho(a.value, x, v.length % 20 === 0), s)), o.value = S(v), i.value = o.value.length - 1, a.value = x, !0;
|
|
2402
|
-
}
|
|
2403
|
-
function w(x) {
|
|
2404
|
-
if (x < 0 ? !d.value : !p.value) return;
|
|
2405
|
-
const s = o.value[i.value];
|
|
2406
|
-
return g.value = x < 0 ? s.view?.before : o.value[i.value + 1]?.view?.after, x < 0 && s.kind === "patch" ? a.value = je(a.value, s, !0) : x > 0 ? a.value = je(a.value, o.value[i.value + 1]) : a.value = E(i.value - 1), i.value += x, a.value;
|
|
2407
|
-
}
|
|
2408
|
-
return { canUndo: d, canRedo: p, current: M, context: g, retainedBytes: b, reset: k, record: C, move: w, annotate: I };
|
|
2409
|
-
}
|
|
2410
|
-
function bo(t) {
|
|
2411
|
-
const u = ct(null), o = q(!1);
|
|
2412
|
-
let i, a = 0;
|
|
2413
|
-
function d(b) {
|
|
2414
|
-
i?.(b), i = void 0, u.value = null;
|
|
2415
|
-
}
|
|
2416
|
-
function p() {
|
|
2417
|
-
a++, d(!1), o.value = !1;
|
|
2418
|
-
}
|
|
2419
|
-
async function M(b) {
|
|
2420
|
-
p();
|
|
2421
|
-
const g = a, k = t();
|
|
2422
|
-
o.value = !0;
|
|
2423
|
-
try {
|
|
2424
|
-
const E = await new Promise((S, I) => {
|
|
2425
|
-
if (i = S, !k) {
|
|
2426
|
-
u.value = b;
|
|
2427
|
-
return;
|
|
2428
|
-
}
|
|
2429
|
-
Promise.resolve().then(() => a === g ? k(b) : !1).then((C) => {
|
|
2430
|
-
a === g && d(C === !0);
|
|
2431
|
-
}, (C) => {
|
|
2432
|
-
a === g && (i = void 0, u.value = null, I(C));
|
|
2433
|
-
});
|
|
2434
|
-
});
|
|
2435
|
-
return a === g && E === !0;
|
|
2436
|
-
} finally {
|
|
2437
|
-
a === g && (o.value = !1);
|
|
2438
|
-
}
|
|
2439
|
-
}
|
|
2440
|
-
return De(p), { confirmation: u, pending: o, decide: d, request: M, cancel: p };
|
|
2441
|
-
}
|
|
2442
|
-
function yo(t, u) {
|
|
2443
|
-
const o = q(re(t.modelValue)), i = q(Se(o.value)), a = q(Se(o.value)), d = q(""), p = q(!1), M = D(() => ({
|
|
2444
|
-
...Ee,
|
|
2445
|
-
...t.messages
|
|
2446
|
-
})), b = D(() => ({
|
|
2447
|
-
showExport: !1,
|
|
2448
|
-
showPrint: !1,
|
|
2449
|
-
showPdfWindow: !1,
|
|
2450
|
-
...t.preview,
|
|
2451
|
-
theme: {
|
|
2452
|
-
shellBg: "#f1f5f9",
|
|
2453
|
-
shellFg: "#334155",
|
|
2454
|
-
toolbarBg: "#ffffff",
|
|
2455
|
-
toolbarBorder: "#e2e8f0",
|
|
2456
|
-
toolbarFg: "#334155",
|
|
2457
|
-
btnFg: "#475569",
|
|
2458
|
-
btnBorder: "#cbd5e1",
|
|
2459
|
-
btnHoverBg: "#eff6ff",
|
|
2460
|
-
btnHoverFg: "#1d4ed8",
|
|
2461
|
-
btnActiveBg: "#2563eb",
|
|
2462
|
-
...t.preview?.theme
|
|
2463
|
-
}
|
|
2464
|
-
}));
|
|
2465
|
-
Bt({
|
|
2466
|
-
get defaults() {
|
|
2467
|
-
return b.value;
|
|
2468
|
-
}
|
|
2469
|
-
});
|
|
2470
|
-
let g, k = 0;
|
|
2471
|
-
const E = D(
|
|
2472
|
-
() => kt(o.value)
|
|
2473
|
-
), S = D(() => {
|
|
2474
|
-
try {
|
|
2475
|
-
return Se(o.value) !== i.value;
|
|
2476
|
-
} catch {
|
|
2477
|
-
return !0;
|
|
2478
|
-
}
|
|
2479
|
-
}), I = q(a.value), C = D(() => a.value !== I.value), w = q({}), x = q(0), s = q(0), v = D(() => Object.values(w.value).some(Boolean)), y = D(() => Object.keys(w.value).filter((A) => w.value[A]));
|
|
2480
|
-
function $(A, U) {
|
|
2481
|
-
w.value = { ...w.value, [A]: U }, x.value++;
|
|
2482
|
-
}
|
|
2483
|
-
const R = D(
|
|
2484
|
-
() => S.value || a.value !== I.value || v.value
|
|
2485
|
-
), L = () => JSON.stringify({
|
|
2486
|
-
document: o.value,
|
|
2487
|
-
json: a.value,
|
|
2488
|
-
appliedJson: I.value
|
|
2489
|
-
}), H = fo(L()), V = q(0);
|
|
2490
|
-
let j;
|
|
2491
|
-
function oe(A) {
|
|
2492
|
-
j = A, H.annotate(A.read());
|
|
2493
|
-
}
|
|
2494
|
-
function ce() {
|
|
2495
|
-
H.annotate(j?.read());
|
|
2496
|
-
}
|
|
2497
|
-
const r = bo(() => t.beforeDiscard), G = D(() => p.value || r.pending.value), z = () => !t.readonly && !G.value && !C.value, O = go(
|
|
2498
|
-
o,
|
|
2499
|
-
() => E.value.ok,
|
|
2500
|
-
z,
|
|
2501
|
-
ie
|
|
2502
|
-
), { selected: Y, lists: _, activeList: P, headerAlignments: T, setColumn: W } = O;
|
|
2503
|
-
ae(Y, () => O.clearSelection());
|
|
2504
|
-
const B = D(
|
|
2505
|
-
() => E.value.ok ? Ot({
|
|
2506
|
-
draft: {
|
|
2507
|
-
template: o.value.template,
|
|
2508
|
-
datasets: t.datasets ?? {},
|
|
2509
|
-
params: []
|
|
2510
|
-
}
|
|
2511
|
-
}) : void 0
|
|
2512
|
-
);
|
|
2513
|
-
function X() {
|
|
2514
|
-
k++, g?.abort(), g = void 0, p.value = !1;
|
|
2515
|
-
}
|
|
2516
|
-
let te = 0;
|
|
2517
|
-
async function ee(A = "replace", U) {
|
|
2518
|
-
if (!R.value) return !0;
|
|
2519
|
-
const ne = L(), be = x.value;
|
|
2520
|
-
try {
|
|
2521
|
-
return await r.request({
|
|
2522
|
-
reason: A,
|
|
2523
|
-
document: JSON.parse(
|
|
2524
|
-
JSON.stringify(o.value)
|
|
2525
|
-
),
|
|
2526
|
-
replacement: U ? re(U) : void 0,
|
|
2527
|
-
pendingLocalChanges: !0
|
|
2528
|
-
}) && ne === L() && be === x.value;
|
|
2529
|
-
} catch (Te) {
|
|
2530
|
-
return d.value = Te instanceof Error ? Te.message : String(Te), !1;
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
function ve(A) {
|
|
2534
|
-
X(), o.value = A, i.value = Se(A), a.value = i.value, I.value = a.value, d.value = "", Y.value = 0, O.clearSelection(), w.value = {}, x.value++, s.value++, H.reset(L(), j?.read());
|
|
2535
|
-
}
|
|
2536
|
-
ae(
|
|
2537
|
-
() => t.modelValue,
|
|
2538
|
-
async (A) => {
|
|
2539
|
-
let U;
|
|
2540
|
-
try {
|
|
2541
|
-
U = re(A);
|
|
2542
|
-
} catch (be) {
|
|
2543
|
-
d.value = be instanceof Error ? be.message : String(be);
|
|
2544
|
-
return;
|
|
2545
|
-
}
|
|
2546
|
-
try {
|
|
2547
|
-
if (Se(U) === Se(o.value))
|
|
2548
|
-
return;
|
|
2549
|
-
} catch {
|
|
2550
|
-
}
|
|
2551
|
-
const ne = ++te;
|
|
2552
|
-
if (X(), !await ee("replace", U)) {
|
|
2553
|
-
ne === te && E.value.ok && u("update:modelValue", re(o.value));
|
|
2554
|
-
return;
|
|
2555
|
-
}
|
|
2556
|
-
ne === te && ve(U);
|
|
2557
|
-
}
|
|
2558
|
-
), De(() => {
|
|
2559
|
-
te++, X();
|
|
2560
|
-
});
|
|
2561
|
-
function ie() {
|
|
2562
|
-
r.cancel(), d.value = "", E.value.ok && (a.value = Se(o.value), I.value = a.value, u("update:modelValue", re(o.value))), H.record(L(), j?.read()) && V.value++;
|
|
2563
|
-
}
|
|
2564
|
-
function pe(A) {
|
|
2565
|
-
if (!z()) return !1;
|
|
2566
|
-
try {
|
|
2567
|
-
const U = re(o.value);
|
|
2568
|
-
A(U);
|
|
2569
|
-
const ne = kt(U);
|
|
2570
|
-
if (!ne.ok)
|
|
2571
|
-
throw new Error(
|
|
2572
|
-
ne.errors.map((be) => `${be.path}: ${be.message}`).join(`
|
|
2573
|
-
`)
|
|
2574
|
-
);
|
|
2575
|
-
return o.value = U, ie(), !0;
|
|
2576
|
-
} catch (U) {
|
|
2577
|
-
return d.value = U instanceof Error ? U.message : String(U), !1;
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
async function le(A) {
|
|
2581
|
-
if (!z()) return !1;
|
|
2582
|
-
try {
|
|
2583
|
-
const U = re(A);
|
|
2584
|
-
return !await ee("replace", U) || !z() ? !1 : (o.value = U, Y.value = 0, O.clearSelection(), ie(), !0);
|
|
2585
|
-
} catch (U) {
|
|
2586
|
-
return d.value = U instanceof Error ? U.message : String(U), !1;
|
|
2587
|
-
}
|
|
2588
|
-
}
|
|
2589
|
-
function he(A) {
|
|
2590
|
-
z() && (o.value.name = A, ie());
|
|
2591
|
-
}
|
|
2592
|
-
function Qe(A) {
|
|
2593
|
-
z() && (o.value.description = A, ie());
|
|
2594
|
-
}
|
|
2595
|
-
function Ge() {
|
|
2596
|
-
if (!(t.readonly || G.value))
|
|
2597
|
-
try {
|
|
2598
|
-
const A = re(a.value);
|
|
2599
|
-
if (A.id !== o.value.id)
|
|
2600
|
-
throw new Error("属性编辑不允许更换模板 ID,请另存为新模板");
|
|
2601
|
-
if (A.revision !== o.value.revision)
|
|
2602
|
-
throw new Error("修订号由保存服务管理,不能在 JSON 中修改");
|
|
2603
|
-
o.value = A, Y.value = 0, O.clearSelection(), ie();
|
|
2604
|
-
} catch (A) {
|
|
2605
|
-
d.value = A instanceof Error ? A.message : String(A);
|
|
2606
|
-
}
|
|
2607
|
-
}
|
|
2608
|
-
async function et() {
|
|
2609
|
-
G.value || t.readonly || !await ee("reset") || (ve(re(i.value)), u("update:modelValue", re(o.value)));
|
|
2610
|
-
}
|
|
2611
|
-
function Be(A) {
|
|
2612
|
-
if (G.value || t.readonly) return;
|
|
2613
|
-
H.record(L(), j?.read());
|
|
2614
|
-
const U = H.move(A);
|
|
2615
|
-
if (!U) return;
|
|
2616
|
-
r.cancel();
|
|
2617
|
-
const ne = JSON.parse(U);
|
|
2618
|
-
o.value = ne.document, a.value = ne.json, I.value = ne.appliedJson, d.value = "", Y.value = 0, O.clearSelection(), H.context.value && j?.restore(H.context.value), E.value.ok && u("update:modelValue", re(o.value));
|
|
2619
|
-
}
|
|
2620
|
-
async function Oe() {
|
|
2621
|
-
if (!t.save || !z() || !E.value.ok) return;
|
|
2622
|
-
if (v.value) {
|
|
2623
|
-
d.value = M.value.toolsPending;
|
|
2624
|
-
return;
|
|
2625
|
-
}
|
|
2626
|
-
const A = ++k;
|
|
2627
|
-
g = new AbortController(), p.value = !0, d.value = "";
|
|
2628
|
-
const U = re(o.value);
|
|
2629
|
-
try {
|
|
2630
|
-
const ne = re(
|
|
2631
|
-
await t.save(U, {
|
|
2632
|
-
expectedRevision: U.revision,
|
|
2633
|
-
signal: g.signal
|
|
2634
|
-
})
|
|
2635
|
-
);
|
|
2636
|
-
if (A !== k) return;
|
|
2637
|
-
if (ne.id !== U.id)
|
|
2638
|
-
throw new Error("保存服务返回了其他模板的文档");
|
|
2639
|
-
o.value = ne, i.value = Se(ne), a.value = i.value, I.value = a.value, H.reset(L(), j?.read()), u("saved", re(ne)), u("update:modelValue", re(ne));
|
|
2640
|
-
} catch (ne) {
|
|
2641
|
-
A === k && (d.value = ne instanceof Error ? ne.message : String(ne));
|
|
2642
|
-
} finally {
|
|
2643
|
-
A === k && (p.value = !1, g = void 0);
|
|
2644
|
-
}
|
|
2645
|
-
}
|
|
2646
|
-
const tt = D(
|
|
2647
|
-
() => H.canUndo.value || L() !== H.current.value
|
|
2648
|
-
), nt = D(
|
|
2649
|
-
() => H.canRedo.value && L() === H.current.value
|
|
2650
|
-
);
|
|
2651
|
-
return {
|
|
2652
|
-
...O,
|
|
2653
|
-
editingReadonly: D(() => t.readonly === !0),
|
|
2654
|
-
connectHistoryView: oe,
|
|
2655
|
-
captureHistoryView: ce,
|
|
2656
|
-
historyViewRevision: V,
|
|
2657
|
-
transaction: pe,
|
|
2658
|
-
replaceDocument: le,
|
|
2659
|
-
originalDocument: D(() => re(i.value)),
|
|
2660
|
-
canUndo: tt,
|
|
2661
|
-
canRedo: nt,
|
|
2662
|
-
undo: () => Be(-1),
|
|
2663
|
-
redo: () => Be(1),
|
|
2664
|
-
pendingLocalChanges: R,
|
|
2665
|
-
setToolPending: $,
|
|
2666
|
-
isToolPending: (A) => w.value[A] === !0,
|
|
2667
|
-
toolEpoch: s,
|
|
2668
|
-
toolPending: v,
|
|
2669
|
-
pendingTools: y,
|
|
2670
|
-
jsonPending: C,
|
|
2671
|
-
blocked: G,
|
|
2672
|
-
confirmation: r.confirmation,
|
|
2673
|
-
decideDiscard: r.decide,
|
|
2674
|
-
guardChanges: ee,
|
|
2675
|
-
draft: o,
|
|
2676
|
-
json: a,
|
|
2677
|
-
selected: Y,
|
|
2678
|
-
error: d,
|
|
2679
|
-
saving: p,
|
|
2680
|
-
dirty: S,
|
|
2681
|
-
validation: E,
|
|
2682
|
-
lists: _,
|
|
2683
|
-
activeList: P,
|
|
2684
|
-
headerAlignments: T,
|
|
2685
|
-
previewOptions: b,
|
|
2686
|
-
fetcher: B,
|
|
2687
|
-
messages: M,
|
|
2688
|
-
setName: he,
|
|
2689
|
-
setDescription: Qe,
|
|
2690
|
-
setColumn: W,
|
|
2691
|
-
applyJson: Ge,
|
|
2692
|
-
reset: et,
|
|
2693
|
-
save: Oe
|
|
2694
|
-
};
|
|
2695
|
-
}
|
|
2696
|
-
function wo(t, u) {
|
|
2697
|
-
const o = q(u.value ? "fields" : "component"), i = () => u.value?.columns.length ? 0 : -1, a = q(i()), d = D(() => {
|
|
2698
|
-
const b = u.value?.columns[a.value];
|
|
2699
|
-
return b ? { column: b, index: a.value } : void 0;
|
|
2700
|
-
});
|
|
2701
|
-
ae(t, () => {
|
|
2702
|
-
a.value = i();
|
|
2703
|
-
}), ae(u, (b) => {
|
|
2704
|
-
b?.columns[a.value] || (a.value = i()), !b && o.value === "fields" && (o.value = "component");
|
|
2705
|
-
});
|
|
2706
|
-
function p(b) {
|
|
2707
|
-
u.value?.columns[b] && (a.value = b);
|
|
2708
|
-
}
|
|
2709
|
-
function M(b) {
|
|
2710
|
-
const g = u.value?.columns.length ?? 0;
|
|
2711
|
-
g && (a.value = Math.max(
|
|
2712
|
-
0,
|
|
2713
|
-
Math.min(g - 1, a.value + b)
|
|
2714
|
-
));
|
|
2715
|
-
}
|
|
2716
|
-
return { section: o, activeIndex: a, activeColumn: d, activate: p, stepColumn: M };
|
|
2717
|
-
}
|
|
2718
|
-
const Mo = ["aria-label", "aria-busy"], ko = { class: "mr-designer-bar" }, xo = { class: "mr-designer-heading" }, Co = ["aria-label"], $o = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], So = {
|
|
2719
|
-
key: 0,
|
|
2720
|
-
class: "mr-designer-pending-dot",
|
|
2721
|
-
"aria-hidden": "true"
|
|
2722
|
-
}, _o = ["aria-label"], Io = ["aria-pressed"], Eo = ["aria-pressed"], Ro = { class: "mr-designer-actions" }, Po = { class: "mr-designer-history" }, To = ["aria-label", "title", "disabled"], Lo = ["aria-label", "title", "disabled"], Do = ["disabled"], Ao = ["title", "aria-describedby", "disabled"], Ho = ["id"], Fo = ["id"], No = ["aria-label", "onClick"], Go = ["aria-label"], Bo = ["aria-label"], Oo = ["id", "aria-pressed", "aria-describedby", "onClick"], zo = {
|
|
2723
|
-
key: 0,
|
|
2724
|
-
class: "mr-designer-pending-dot",
|
|
2725
|
-
"aria-hidden": "true"
|
|
2726
|
-
}, Vo = { class: "mr-designer-tool-content" }, jo = {
|
|
2727
|
-
key: 3,
|
|
2728
|
-
class: "mr-designer-rule-workspace"
|
|
2729
|
-
}, Wo = { key: 0 }, Uo = ["value"], Ko = ["value"], qo = {
|
|
2730
|
-
key: 2,
|
|
2731
|
-
class: "mr-designer-note"
|
|
2732
|
-
}, Jo = {
|
|
2733
|
-
key: 1,
|
|
2734
|
-
class: "mr-designer-inspector"
|
|
2735
|
-
}, Yo = ["id", "aria-labelledby"], Xo = {
|
|
2736
|
-
key: 0,
|
|
2737
|
-
class: "mr-designer-flow-note"
|
|
2738
|
-
}, Zo = {
|
|
2739
|
-
key: 0,
|
|
2740
|
-
class: "mr-designer-area"
|
|
2741
|
-
}, Qo = ["value"], ei = ["value"], ti = { class: "mr-designer-current" }, ni = ["aria-expanded", "aria-controls"], ai = { class: "mr-designer-current-name" }, li = { class: "mr-designer-directory-entry" }, oi = { class: "mr-designer-field-position" }, ii = ["aria-label"], si = ["aria-label", "title", "disabled"], ri = ["aria-label", "title", "disabled"], di = ["disabled", "aria-label"], ui = { class: "mr-designer-property-group" }, ci = ["value"], mi = ["value", "list"], vi = ["id"], pi = ["value"], gi = { class: "mr-designer-property-group" }, hi = { class: "mr-designer-format-pair" }, fi = { class: "mr-designer-stacked" }, bi = ["value", "disabled"], yi = { class: "mr-designer-stacked" }, wi = ["value"], Mi = { value: "identifier" }, ki = { value: "dimension" }, xi = { value: "measure" }, Ci = { value: "date" }, $i = { value: "text" }, Si = { class: "mr-designer-control-row" }, _i = { class: "mr-designer-control-row" }, Ii = { class: "mr-designer-toggle" }, Ei = ["checked"], Ri = { class: "mr-designer-column-structure" }, Pi = ["aria-label", "title", "disabled"], Ti = ["aria-label", "title", "disabled"], Li = ["checked", "disabled"], Di = ["id", "aria-label"], Ai = { class: "mr-designer-directory-heading" }, Hi = ["aria-label"], Fi = { class: "mr-designer-search" }, Ni = ["aria-label", "placeholder"], Gi = ["aria-label", "title"], Bi = { class: "mr-designer-column-tools" }, Oi = ["disabled"], zi = {
|
|
2742
|
-
key: 1,
|
|
2743
|
-
role: "status"
|
|
2744
|
-
}, Vi = { key: 2 }, ji = ["aria-label"], Wi = ["aria-label", "checked", "disabled", "onChange"], Ui = ["data-column-index", "aria-pressed", "tabindex", "onClick"], Ki = { class: "mr-designer-column-number" }, qi = { class: "mr-designer-column-name" }, Ji = {
|
|
2745
|
-
key: 0,
|
|
2746
|
-
role: "status",
|
|
2747
|
-
class: "mr-designer-empty"
|
|
2748
|
-
}, Yi = {
|
|
2749
|
-
key: 0,
|
|
2750
|
-
class: "mr-designer-batch"
|
|
2751
|
-
}, Xi = ["aria-label", "disabled"], Zi = { value: "" }, Qi = { value: "auto" }, es = { value: "left" }, ts = { value: "center" }, ns = { value: "right" }, as = { value: "justify" }, ls = ["aria-label", "disabled"], os = { value: "" }, is = { value: "left" }, ss = { value: "center" }, rs = { value: "right" }, ds = { value: "justify" }, us = {
|
|
2752
|
-
key: 2,
|
|
2753
|
-
role: "status",
|
|
2754
|
-
class: "mr-designer-empty"
|
|
2755
|
-
}, cs = { class: "mr-designer-object-tools" }, ms = ["aria-label", "disabled"], vs = { value: "" }, ps = { value: "text" }, gs = ["disabled"], hs = { value: "image" }, fs = { value: "rect" }, bs = { value: "qrcode" }, ys = { value: "barcode" }, ws = ["title", "aria-label", "disabled"], Ms = ["title", "aria-label", "disabled"], ks = { key: 0 }, xs = ["value"], Cs = { class: "mr-designer-stacked" }, $s = ["value"], Ss = {
|
|
2756
|
-
value: -1,
|
|
2757
|
-
disabled: ""
|
|
2758
|
-
}, _s = ["value"], Is = {
|
|
2759
|
-
key: 1,
|
|
2760
|
-
class: "mr-designer-arrange"
|
|
2761
|
-
}, Es = ["disabled"], Rs = ["aria-label", "disabled"], Ps = { value: "" }, Ts = { value: "left" }, Ls = { value: "center" }, Ds = { value: "right" }, As = { value: "top" }, Hs = { value: "middle" }, Fs = { value: "bottom" }, Ns = ["disabled"], Gs = ["disabled"], Bs = { key: 0 }, Os = { class: "mr-designer-layer-tools" }, zs = ["disabled"], Vs = ["disabled"], js = {
|
|
2762
|
-
key: 3,
|
|
2763
|
-
class: "mr-designer-empty"
|
|
2764
|
-
}, Ws = { class: "mr-designer-stacked" }, Us = ["value", "disabled"], Ks = { class: "mr-designer-stacked" }, qs = ["value", "disabled"], Js = { class: "mr-designer-technical" }, Ys = { class: "mr-designer-identity" }, Xs = { class: "mr-designer-stacked mr-designer-json-label" }, Zs = ["aria-label", "disabled"], Qs = ["disabled"], er = {
|
|
2765
|
-
key: 5,
|
|
2766
|
-
role: "status",
|
|
2767
|
-
class: "mr-designer-note mr-designer-pending"
|
|
2768
|
-
}, tr = ["aria-label"], nr = {
|
|
2769
|
-
key: 0,
|
|
2770
|
-
role: "alert",
|
|
2771
|
-
class: "mr-designer-error"
|
|
2772
|
-
}, ar = {
|
|
2773
|
-
key: 1,
|
|
2774
|
-
role: "alert",
|
|
2775
|
-
class: "mr-designer-error"
|
|
2776
|
-
}, lr = {
|
|
2777
|
-
key: 4,
|
|
2778
|
-
class: "mr-designer-note mr-designer-invalid"
|
|
2779
|
-
}, or = /* @__PURE__ */ xe({
|
|
2780
|
-
__name: "ReportTemplateEditor",
|
|
2781
|
-
props: {
|
|
2782
|
-
modelValue: {},
|
|
2783
|
-
datasets: {},
|
|
2784
|
-
dataSchemas: {},
|
|
2785
|
-
bindingDatasets: {},
|
|
2786
|
-
bindingSession: {},
|
|
2787
|
-
readonly: { type: Boolean },
|
|
2788
|
-
messages: {},
|
|
2789
|
-
preview: {},
|
|
2790
|
-
beforeDiscard: { type: Function },
|
|
2791
|
-
save: { type: Function }
|
|
2792
|
-
},
|
|
2793
|
-
emits: ["update:modelValue", "saved", "excel-bound"],
|
|
2794
|
-
setup(t, { expose: u, emit: o }) {
|
|
2795
|
-
const i = Me(
|
|
2796
|
-
() => import("./ExcelBindingWizard-CeAf4QSE.js")
|
|
2797
|
-
), a = Me(() => import("./ParamEditor-BLaE5q5W.js")), d = Me(() => import("./RuleEditor-DzAmW5YH.js")), p = Me(
|
|
2798
|
-
() => import("./TemplateReviewPanel-BKofGrV9.js")
|
|
2799
|
-
), M = t, b = o, g = yo(M, (K, f) => {
|
|
2800
|
-
b(K === "saved" ? "saved" : "update:modelValue", f);
|
|
2801
|
-
}), {
|
|
2802
|
-
draft: k,
|
|
2803
|
-
json: E,
|
|
2804
|
-
selected: S,
|
|
2805
|
-
error: I,
|
|
2806
|
-
saving: C,
|
|
2807
|
-
pendingLocalChanges: w,
|
|
2808
|
-
jsonPending: x,
|
|
2809
|
-
blocked: s,
|
|
2810
|
-
confirmation: v,
|
|
2811
|
-
canUndo: y,
|
|
2812
|
-
canRedo: $,
|
|
2813
|
-
validation: R,
|
|
2814
|
-
lists: L,
|
|
2815
|
-
activeList: H,
|
|
2816
|
-
visibleColumns: V,
|
|
2817
|
-
query: j,
|
|
2818
|
-
selectedColumns: oe,
|
|
2819
|
-
fetcher: ce,
|
|
2820
|
-
messages: r
|
|
2821
|
-
} = g;
|
|
2822
|
-
function G(K) {
|
|
2823
|
-
return g.transaction((f) => {
|
|
2824
|
-
f.template.params = K;
|
|
2825
|
-
});
|
|
2826
|
-
}
|
|
2827
|
-
const z = wo(S, H), { section: O, activeIndex: Y, activeColumn: _ } = z, P = `mr-designer-${pt()?.uid ?? 0}`, T = D(() => [
|
|
2828
|
-
...L.value.length ? ["fields"] : [],
|
|
2829
|
-
"component",
|
|
2830
|
-
"template",
|
|
2831
|
-
"tools",
|
|
2832
|
-
"advanced"
|
|
2833
|
-
]), W = mo(
|
|
2834
|
-
g,
|
|
2835
|
-
z,
|
|
2836
|
-
() => M.dataSchemas
|
|
2837
|
-
), {
|
|
2838
|
-
mode: B,
|
|
2839
|
-
setMode: X,
|
|
2840
|
-
canvasSelection: te,
|
|
2841
|
-
canvasPage: ee,
|
|
2842
|
-
canvasActive: ve,
|
|
2843
|
-
tool: ie,
|
|
2844
|
-
visitedTools: pe,
|
|
2845
|
-
editDisabled: le,
|
|
2846
|
-
dataSchema: he,
|
|
2847
|
-
chooseCanvas: Qe,
|
|
2848
|
-
insertComponent: Ge,
|
|
2849
|
-
patchCanvas: et,
|
|
2850
|
-
changeList: Be,
|
|
2851
|
-
moveColumn: Oe,
|
|
2852
|
-
headerCommand: tt,
|
|
2853
|
-
locateReview: nt,
|
|
2854
|
-
canvas: A
|
|
2855
|
-
} = W, U = D(() => !!k.value.template.pages[ee.value]?.flow), ne = D(() => M.dataSchemas?.[k.value.template.repeat?.dataset ?? ""]), be = D(() => {
|
|
2856
|
-
const K = { text: r.value.insertText, list: r.value.insertList, image: r.value.insertImage, rect: r.value.insertRect, qrcode: r.value.insertQrcode, barcode: r.value.insertBarcode, chart: r.value.chartComponent, line: r.value.lineComponent, ellipse: r.value.ellipseComponent }, f = new Map(ne.value?.fields.map((c) => [c.field, c.label || c.field]));
|
|
2857
|
-
return k.value.template.pages[ee.value]?.components.map((c, Z) => {
|
|
2858
|
-
const ye = K[c.kind], it = (c.kind === "list" ? c.title || c.dataset : c.binding ? f.get(c.binding.field) || c.binding.field : c.text)?.replace(/\s+/g, " ").trim().slice(0, 60);
|
|
2859
|
-
return { index: Z, name: it && it !== ye ? `${ye} · ${it}` : ye };
|
|
2860
|
-
}) ?? [];
|
|
2861
|
-
});
|
|
2862
|
-
function Te(K) {
|
|
2863
|
-
let f = ee.value;
|
|
2864
|
-
g.transaction((c) => {
|
|
2865
|
-
f = ln(c, ee.value, K);
|
|
2866
|
-
}) && (K.type !== "patch" && (A.clearLocks(), A.selection.value = void 0, A.selections.value = []), ee.value = f);
|
|
2867
|
-
}
|
|
2868
|
-
const Ae = D(() => !!k.value.template.pages[L.value[S.value]?.pageIndex ?? -1]?.flow);
|
|
2869
|
-
function Rt() {
|
|
2870
|
-
O.value = "tools", ie.value = "excel";
|
|
2871
|
-
}
|
|
2872
|
-
const Le = D(() => {
|
|
2873
|
-
const K = ["excel", "rules", "params"].filter((f) => g.pendingTools.value.includes(f)).map((f) => ({ target: f, label: r.value[`${f}Tool`] }));
|
|
2874
|
-
return x.value && K.push({ target: "json", label: r.value.json }), K;
|
|
2875
|
-
}), ze = D(() => C.value ? r.value.saving : M.readonly ? r.value.saveReadonly : s.value ? r.value.saveConfirmation : Le.value.length ? Le.value.map((K) => `${K.label} · ${r.value.unapplied}`).join(";") : R.value.ok ? w.value ? "" : r.value.saveUnchanged : r.value.saveInvalid);
|
|
2876
|
-
async function Pt(K) {
|
|
2877
|
-
K === "json" ? O.value = "advanced" : (O.value = "tools", ie.value = K), await ue();
|
|
2878
|
-
const f = K === "json" ? `#${P}-panel-advanced textarea` : `#${P}-tool-${K}`;
|
|
2879
|
-
document.querySelector(f)?.focus({ preventScroll: !0 });
|
|
2880
|
-
}
|
|
2881
|
-
const Tt = D(
|
|
2882
|
-
() => C.value ? r.value.saving : M.readonly ? r.value.readonly : w.value ? r.value.dirty : r.value.ready
|
|
2883
|
-
), gt = q(null), at = q(null), de = po(z, O, V), {
|
|
2884
|
-
open: ht,
|
|
2885
|
-
cursor: Lt,
|
|
2886
|
-
trigger: Dt,
|
|
2887
|
-
panel: At,
|
|
2888
|
-
search: Ht,
|
|
2889
|
-
list: Ft
|
|
2890
|
-
} = de;
|
|
2891
|
-
ae(O, async () => {
|
|
2892
|
-
await ue(), at.value && (at.value.scrollTop = 0);
|
|
2893
|
-
});
|
|
2894
|
-
const ft = D(() => ({
|
|
2895
|
-
auto: r.value.auto,
|
|
2896
|
-
left: r.value.left,
|
|
2897
|
-
center: r.value.center,
|
|
2898
|
-
right: r.value.right,
|
|
2899
|
-
justify: r.value.justify
|
|
2900
|
-
}));
|
|
2901
|
-
let Ve = null;
|
|
2902
|
-
ae(v, async (K) => {
|
|
2903
|
-
K ? (Ve = document.activeElement, await ue(), gt.value?.focus()) : (await ue(), Ve?.isConnected && Ve.focus(), Ve = null);
|
|
2904
|
-
}), u({
|
|
2905
|
-
get pendingLocalChanges() {
|
|
2906
|
-
return w.value;
|
|
2907
|
-
},
|
|
2908
|
-
get saving() {
|
|
2909
|
-
return C.value;
|
|
2910
|
-
},
|
|
2911
|
-
get blocked() {
|
|
2912
|
-
return s.value;
|
|
2913
|
-
},
|
|
2914
|
-
guardChanges: g.guardChanges,
|
|
2915
|
-
reset: g.reset,
|
|
2916
|
-
save: g.save
|
|
2917
|
-
});
|
|
2918
|
-
async function Nt(K) {
|
|
2919
|
-
const f = { ...K.document, id: k.value.id };
|
|
2920
|
-
if (k.value.revision === void 0 ? delete f.revision : f.revision = k.value.revision, !await g.replaceDocument(f)) return !1;
|
|
2921
|
-
const c = re(g.draft.value);
|
|
2922
|
-
return b("excel-bound", { ...K, document: c, session: { ...K.session, identity: { id: c.id, name: c.name } } }), !0;
|
|
2923
|
-
}
|
|
2924
|
-
async function lt(K) {
|
|
2925
|
-
const f = L.value.findIndex((c) => c.pageIndex === K.pageIndex && c.componentIndex === K.componentIndex);
|
|
2926
|
-
f >= 0 && f !== S.value && g.isToolPending("rules") && !await g.guardChanges() || Qe(K);
|
|
2927
|
-
}
|
|
2928
|
-
async function bt(K) {
|
|
2929
|
-
const f = K.target, c = Number(f.value);
|
|
2930
|
-
if (g.isToolPending("rules") && !await g.guardChanges()) {
|
|
2931
|
-
f.value = String(S.value);
|
|
2932
|
-
return;
|
|
2933
|
-
}
|
|
2934
|
-
S.value = c;
|
|
2935
|
-
}
|
|
2936
|
-
function $e(K) {
|
|
2937
|
-
return K.target.value;
|
|
2938
|
-
}
|
|
2939
|
-
function ot(K) {
|
|
2940
|
-
return K.target.checked;
|
|
2941
|
-
}
|
|
2942
|
-
function yt(K, f) {
|
|
2943
|
-
const c = K.target;
|
|
2944
|
-
g.alignColumns(
|
|
2945
|
-
f,
|
|
2946
|
-
c.value
|
|
2947
|
-
), c.value = "";
|
|
2948
|
-
}
|
|
2949
|
-
async function Gt(K) {
|
|
2950
|
-
const c = {
|
|
2951
|
-
ArrowRight: 1,
|
|
2952
|
-
ArrowLeft: -1,
|
|
2953
|
-
Home: -T.value.length,
|
|
2954
|
-
End: T.value.length
|
|
2955
|
-
}[K.key];
|
|
2956
|
-
if (c === void 0) return;
|
|
2957
|
-
K.preventDefault();
|
|
2958
|
-
const Z = T.value.indexOf(O.value), ye = K.key === "Home" ? 0 : K.key === "End" ? T.value.length - 1 : (Z + c + T.value.length) % T.value.length;
|
|
2959
|
-
O.value = T.value[ye];
|
|
2960
|
-
const wt = K.currentTarget.parentElement;
|
|
2961
|
-
await ue(), wt?.querySelector(`#${P}-tab-${O.value}`)?.focus();
|
|
2962
|
-
}
|
|
2963
|
-
return (K, f) => (m(), h("section", {
|
|
2964
|
-
class: "mr-designer",
|
|
2965
|
-
"aria-label": e(r).title,
|
|
2966
|
-
"aria-busy": e(C)
|
|
2967
|
-
}, [
|
|
2968
|
-
n("header", ko, [
|
|
2969
|
-
n("div", xo, [
|
|
2970
|
-
se(me, {
|
|
2971
|
-
name: "columns",
|
|
2972
|
-
size: 15
|
|
2973
|
-
}),
|
|
2974
|
-
n("strong", null, l(e(r).heading), 1),
|
|
2975
|
-
n("span", {
|
|
2976
|
-
class: Re({ "mr-designer-dirty": e(w) })
|
|
2977
|
-
}, l(Tt.value), 3)
|
|
2978
|
-
]),
|
|
2979
|
-
n("nav", {
|
|
2980
|
-
class: "mr-designer-tabs",
|
|
2981
|
-
role: "tablist",
|
|
2982
|
-
"aria-label": e(r).sectionsLabel
|
|
2983
|
-
}, [
|
|
2984
|
-
(m(!0), h(J, null, Q(T.value, (c) => (m(), h("button", {
|
|
2985
|
-
id: `${P}-tab-${c}`,
|
|
2986
|
-
key: c,
|
|
2987
|
-
type: "button",
|
|
2988
|
-
role: "tab",
|
|
2989
|
-
"aria-selected": e(O) === c,
|
|
2990
|
-
"aria-controls": `${P}-panel-${c}`,
|
|
2991
|
-
tabindex: e(O) === c ? 0 : -1,
|
|
2992
|
-
onClick: (Z) => O.value = c,
|
|
2993
|
-
onKeydown: Gt
|
|
2994
|
-
}, [
|
|
2995
|
-
N(l(e(r)[`${c}Section`]) + " ", 1),
|
|
2996
|
-
c === "tools" && e(g).toolPending.value || c === "advanced" && e(x) ? (m(), h("span", So)) : F("", !0)
|
|
2997
|
-
], 40, $o))), 128))
|
|
2998
|
-
], 8, Co),
|
|
2999
|
-
n("div", {
|
|
3000
|
-
class: "mr-designer-mode",
|
|
3001
|
-
role: "group",
|
|
3002
|
-
"aria-label": e(r).design
|
|
3003
|
-
}, [
|
|
3004
|
-
n("button", {
|
|
3005
|
-
type: "button",
|
|
3006
|
-
"aria-pressed": e(B) === "design",
|
|
3007
|
-
onClick: f[0] || (f[0] = (c) => e(X)("design"))
|
|
3008
|
-
}, l(e(r).design), 9, Io),
|
|
3009
|
-
n("button", {
|
|
3010
|
-
type: "button",
|
|
3011
|
-
"aria-pressed": e(B) === "preview",
|
|
3012
|
-
onClick: f[1] || (f[1] = (c) => e(X)("preview"))
|
|
3013
|
-
}, l(e(r).preview), 9, Eo)
|
|
3014
|
-
], 8, _o),
|
|
3015
|
-
n("div", Ro, [
|
|
3016
|
-
n("div", Po, [
|
|
3017
|
-
n("button", {
|
|
3018
|
-
type: "button",
|
|
3019
|
-
class: "mr-designer-icon-button",
|
|
3020
|
-
"aria-label": e(r).undo,
|
|
3021
|
-
title: e(r).undo,
|
|
3022
|
-
disabled: t.readonly || e(s) || !e(y),
|
|
3023
|
-
onClick: f[2] || (f[2] = (c) => {
|
|
3024
|
-
e(A).clearLocks(), e(g).undo();
|
|
3025
|
-
})
|
|
3026
|
-
}, [...f[56] || (f[56] = [
|
|
3027
|
-
n("svg", {
|
|
3028
|
-
viewBox: "0 0 24 24",
|
|
3029
|
-
fill: "none",
|
|
3030
|
-
"aria-hidden": "true"
|
|
3031
|
-
}, [
|
|
3032
|
-
n("path", { d: "M4 10h10a6 6 0 0 1 0 12M4 10l5-5M4 10l5 5" })
|
|
3033
|
-
], -1)
|
|
3034
|
-
])], 8, To),
|
|
3035
|
-
n("button", {
|
|
3036
|
-
type: "button",
|
|
3037
|
-
class: "mr-designer-icon-button",
|
|
3038
|
-
"aria-label": e(r).redo,
|
|
3039
|
-
title: e(r).redo,
|
|
3040
|
-
disabled: t.readonly || e(s) || !e($),
|
|
3041
|
-
onClick: f[3] || (f[3] = (c) => {
|
|
3042
|
-
e(A).clearLocks(), e(g).redo();
|
|
3043
|
-
})
|
|
3044
|
-
}, [...f[57] || (f[57] = [
|
|
3045
|
-
n("svg", {
|
|
3046
|
-
viewBox: "0 0 24 24",
|
|
3047
|
-
fill: "none",
|
|
3048
|
-
"aria-hidden": "true"
|
|
3049
|
-
}, [
|
|
3050
|
-
n("path", { d: "M20 10H10a6 6 0 0 0 0 12m10-12-5-5m5 5-5 5" })
|
|
3051
|
-
], -1)
|
|
3052
|
-
])], 8, Lo)
|
|
3053
|
-
]),
|
|
3054
|
-
n("button", {
|
|
3055
|
-
type: "button",
|
|
3056
|
-
class: "mr-designer-reset",
|
|
3057
|
-
disabled: t.readonly || e(s) || !e(w),
|
|
3058
|
-
onClick: f[4] || (f[4] = //@ts-ignore
|
|
3059
|
-
(...c) => e(g).reset && e(g).reset(...c))
|
|
3060
|
-
}, l(e(r).reset), 9, Do),
|
|
3061
|
-
t.save ? (m(), h("button", {
|
|
3062
|
-
key: 0,
|
|
3063
|
-
type: "button",
|
|
3064
|
-
class: "mr-designer-save",
|
|
3065
|
-
title: ze.value || e(r).save,
|
|
3066
|
-
"aria-describedby": Le.value.length ? `${P}-pending` : ze.value ? `${P}-save-reason` : void 0,
|
|
3067
|
-
disabled: t.readonly || e(s) || e(x) || e(g).toolPending.value || !e(R).ok || !e(w),
|
|
3068
|
-
onClick: f[5] || (f[5] = //@ts-ignore
|
|
3069
|
-
(...c) => e(g).save && e(g).save(...c))
|
|
3070
|
-
}, [
|
|
3071
|
-
se(me, {
|
|
3072
|
-
name: "file",
|
|
3073
|
-
size: 13
|
|
3074
|
-
}),
|
|
3075
|
-
N(l(e(C) ? e(r).saving : e(r).save), 1)
|
|
3076
|
-
], 8, Ao)) : F("", !0),
|
|
3077
|
-
t.save && ze.value && !Le.value.length ? (m(), h("span", {
|
|
3078
|
-
key: 1,
|
|
3079
|
-
id: `${P}-save-reason`,
|
|
3080
|
-
class: "mr-designer-save-reason"
|
|
3081
|
-
}, l(ze.value), 9, Ho)) : F("", !0)
|
|
3082
|
-
])
|
|
3083
|
-
]),
|
|
3084
|
-
Le.value.length ? (m(), h("div", {
|
|
3085
|
-
key: 0,
|
|
3086
|
-
id: `${P}-pending`,
|
|
3087
|
-
class: "mr-designer-pending",
|
|
3088
|
-
role: "status"
|
|
3089
|
-
}, [
|
|
3090
|
-
n("span", null, l(e(r).pendingToolsLabel), 1),
|
|
3091
|
-
(m(!0), h(J, null, Q(Le.value, (c) => (m(), h("button", {
|
|
3092
|
-
key: c.target,
|
|
3093
|
-
type: "button",
|
|
3094
|
-
"aria-label": `${c.label} · ${e(r).unapplied} · ${e(r).returnToConfiguration}`,
|
|
3095
|
-
onClick: (Z) => Pt(c.target)
|
|
3096
|
-
}, [
|
|
3097
|
-
N(l(c.label), 1),
|
|
3098
|
-
n("span", null, l(e(r).unapplied) + " ↗", 1)
|
|
3099
|
-
], 8, No))), 128)),
|
|
3100
|
-
n("small", null, l(e(r).pendingToolsHint), 1)
|
|
3101
|
-
], 8, Fo)) : F("", !0),
|
|
3102
|
-
e(v) ? (m(), h("div", {
|
|
3103
|
-
key: 1,
|
|
3104
|
-
role: "alertdialog",
|
|
3105
|
-
"aria-label": e(r).discardTitle,
|
|
3106
|
-
class: "mr-designer-confirm",
|
|
3107
|
-
onKeydown: f[8] || (f[8] = st(It((c) => e(g).decideDiscard(!1), ["prevent", "stop"]), ["esc"]))
|
|
3108
|
-
}, [
|
|
3109
|
-
n("div", null, [
|
|
3110
|
-
n("strong", null, l(e(r).discardTitle), 1),
|
|
3111
|
-
n("p", null, l(e(r).discardDescription), 1)
|
|
3112
|
-
]),
|
|
3113
|
-
n("div", null, [
|
|
3114
|
-
n("button", {
|
|
3115
|
-
ref_key: "keepButton",
|
|
3116
|
-
ref: gt,
|
|
3117
|
-
type: "button",
|
|
3118
|
-
onClick: f[6] || (f[6] = (c) => e(g).decideDiscard(!1))
|
|
3119
|
-
}, l(e(r).keepEditing), 513),
|
|
3120
|
-
n("button", {
|
|
3121
|
-
type: "button",
|
|
3122
|
-
onClick: f[7] || (f[7] = (c) => e(g).decideDiscard(!0))
|
|
3123
|
-
}, l(e(r).discard), 1)
|
|
3124
|
-
])
|
|
3125
|
-
], 40, Go)) : F("", !0),
|
|
3126
|
-
n("div", {
|
|
3127
|
-
class: Re(["mr-designer-body", { "is-tools": e(O) === "tools" }])
|
|
3128
|
-
}, [
|
|
3129
|
-
e(pe).size ? fe((m(), h("div", {
|
|
3130
|
-
key: e(g).toolEpoch.value,
|
|
3131
|
-
class: "mr-designer-tools"
|
|
3132
|
-
}, [
|
|
3133
|
-
n("nav", {
|
|
3134
|
-
class: "mr-designer-tool-tabs",
|
|
3135
|
-
"aria-label": e(r).toolsSection
|
|
3136
|
-
}, [
|
|
3137
|
-
(m(), h(J, null, Q(["excel", "rules", "params", "review"], (c) => n("button", {
|
|
3138
|
-
key: c,
|
|
3139
|
-
id: `${P}-tool-${c}`,
|
|
3140
|
-
type: "button",
|
|
3141
|
-
"aria-pressed": e(ie) === c,
|
|
3142
|
-
"aria-describedby": e(g).isToolPending(c) ? `${P}-pending` : void 0,
|
|
3143
|
-
onClick: (Z) => ie.value = c
|
|
3144
|
-
}, [
|
|
3145
|
-
N(l(e(r)[`${c}Tool`]) + " ", 1),
|
|
3146
|
-
e(g).isToolPending(c) ? (m(), h("span", zo)) : F("", !0)
|
|
3147
|
-
], 8, Oo)), 64)),
|
|
3148
|
-
n("span", null, l(e(r).toolsDescription), 1)
|
|
3149
|
-
], 8, Bo),
|
|
3150
|
-
n("div", Vo, [
|
|
3151
|
-
e(pe).has("params") ? fe((m(), we(e(a), {
|
|
3152
|
-
key: 0,
|
|
3153
|
-
document: e(k),
|
|
3154
|
-
readonly: e(le),
|
|
3155
|
-
accept: G,
|
|
3156
|
-
onDirty: f[9] || (f[9] = (c) => e(g).setToolPending("params", c))
|
|
3157
|
-
}, null, 8, ["document", "readonly"])), [
|
|
3158
|
-
[He, e(ie) === "params"]
|
|
3159
|
-
]) : F("", !0),
|
|
3160
|
-
e(pe).has("excel") ? fe((m(), we(e(i), {
|
|
3161
|
-
key: 1,
|
|
3162
|
-
datasets: t.bindingDatasets ?? [],
|
|
3163
|
-
session: t.bindingSession,
|
|
3164
|
-
identity: { id: e(k).id, name: e(k).name },
|
|
3165
|
-
"lock-id": "",
|
|
3166
|
-
readonly: e(le),
|
|
3167
|
-
accept: Nt,
|
|
3168
|
-
onDirty: f[10] || (f[10] = (c) => e(g).setToolPending("excel", c))
|
|
3169
|
-
}, null, 8, ["datasets", "session", "identity", "readonly"])), [
|
|
3170
|
-
[He, e(ie) === "excel"]
|
|
3171
|
-
]) : F("", !0),
|
|
3172
|
-
e(pe).has("review") ? fe((m(), we(e(p), {
|
|
3173
|
-
key: 2,
|
|
3174
|
-
document: e(k),
|
|
3175
|
-
previous: e(g).originalDocument.value,
|
|
3176
|
-
datasets: t.datasets,
|
|
3177
|
-
"data-schemas": t.dataSchemas,
|
|
3178
|
-
onLocate: e(nt)
|
|
3179
|
-
}, null, 8, ["document", "previous", "datasets", "data-schemas", "onLocate"])), [
|
|
3180
|
-
[He, e(ie) === "review"]
|
|
3181
|
-
]) : F("", !0),
|
|
3182
|
-
e(pe).has("rules") ? fe((m(), h("div", jo, [
|
|
3183
|
-
e(L).length > 1 ? (m(), h("label", Wo, [
|
|
3184
|
-
N(l(e(r).area), 1),
|
|
3185
|
-
n("select", {
|
|
3186
|
-
value: e(S),
|
|
3187
|
-
onChange: bt
|
|
3188
|
-
}, [
|
|
3189
|
-
(m(!0), h(J, null, Q(e(L), (c, Z) => (m(), h("option", {
|
|
3190
|
-
key: Z,
|
|
3191
|
-
value: Z
|
|
3192
|
-
}, l(c.component.title || c.component.dataset), 9, Ko))), 128))
|
|
3193
|
-
], 40, Uo)
|
|
3194
|
-
])) : F("", !0),
|
|
3195
|
-
e(H) ? (m(), we(e(d), {
|
|
3196
|
-
key: 1,
|
|
3197
|
-
list: e(H),
|
|
3198
|
-
datasets: t.datasets,
|
|
3199
|
-
"dataset-schema": e(he),
|
|
3200
|
-
"dataset-schemas": t.dataSchemas,
|
|
3201
|
-
readonly: e(le),
|
|
3202
|
-
onChange: e(Be),
|
|
3203
|
-
onDirty: f[11] || (f[11] = (c) => e(g).setToolPending("rules", c))
|
|
3204
|
-
}, null, 8, ["list", "datasets", "dataset-schema", "dataset-schemas", "readonly", "onChange"])) : (m(), h("p", qo, l(e(r).rulesNeedList), 1))
|
|
3205
|
-
], 512)), [
|
|
3206
|
-
[He, e(ie) === "rules"]
|
|
3207
|
-
]) : F("", !0)
|
|
3208
|
-
])
|
|
3209
|
-
])), [
|
|
3210
|
-
[He, e(O) === "tools"]
|
|
3211
|
-
]) : F("", !0),
|
|
3212
|
-
e(O) !== "tools" ? (m(), h("aside", Jo, [
|
|
3213
|
-
n("div", {
|
|
3214
|
-
ref_key: "inspectorPanel",
|
|
3215
|
-
ref: at,
|
|
3216
|
-
id: `${P}-panel-${e(O)}`,
|
|
3217
|
-
class: Re(["mr-designer-panel", { "is-advanced": e(O) === "advanced" }]),
|
|
3218
|
-
role: "tabpanel",
|
|
3219
|
-
"aria-labelledby": `${P}-tab-${e(O)}`
|
|
3220
|
-
}, [
|
|
3221
|
-
U.value || Ae.value ? (m(), h("div", Xo, [
|
|
3222
|
-
n("small", null, l(e(r).flowLayout), 1),
|
|
3223
|
-
n("button", {
|
|
3224
|
-
type: "button",
|
|
3225
|
-
onClick: Rt
|
|
3226
|
-
}, l(e(r).excelTool) + " ↗", 1)
|
|
3227
|
-
])) : F("", !0),
|
|
3228
|
-
e(O) === "fields" ? (m(), h(J, { key: 1 }, [
|
|
3229
|
-
e(L).length > 1 ? (m(), h("label", Zo, [
|
|
3230
|
-
N(l(e(r).area), 1),
|
|
3231
|
-
n("select", {
|
|
3232
|
-
value: e(S),
|
|
3233
|
-
onChange: bt
|
|
3234
|
-
}, [
|
|
3235
|
-
(m(!0), h(J, null, Q(e(L), (c, Z) => (m(), h("option", {
|
|
3236
|
-
key: Z,
|
|
3237
|
-
value: Z
|
|
3238
|
-
}, l(c.pageIndex + 1) + " " + l(e(r).page) + " · " + l(c.component.title || c.component.dataset), 9, ei))), 128))
|
|
3239
|
-
], 40, Qo)
|
|
3240
|
-
])) : F("", !0),
|
|
3241
|
-
e(H) ? (m(), h(J, { key: 1 }, [
|
|
3242
|
-
n("div", ti, [
|
|
3243
|
-
n("button", {
|
|
3244
|
-
ref_key: "directoryTrigger",
|
|
3245
|
-
ref: Dt,
|
|
3246
|
-
type: "button",
|
|
3247
|
-
class: "mr-designer-field-trigger",
|
|
3248
|
-
"aria-expanded": e(ht),
|
|
3249
|
-
"aria-controls": `${P}-directory`,
|
|
3250
|
-
"aria-haspopup": "dialog",
|
|
3251
|
-
onClick: f[12] || (f[12] = //@ts-ignore
|
|
3252
|
-
(...c) => e(de).toggle && e(de).toggle(...c)),
|
|
3253
|
-
onKeydown: f[13] || (f[13] = st(
|
|
3254
|
-
//@ts-ignore
|
|
3255
|
-
(...c) => e(de).escape && e(de).escape(...c),
|
|
3256
|
-
["esc"]
|
|
3257
|
-
))
|
|
3258
|
-
}, [
|
|
3259
|
-
n("span", ai, [
|
|
3260
|
-
n("strong", null, l(e(_)?.column.header || e(r).noColumns), 1),
|
|
3261
|
-
n("small", null, l(e(_)?.column.field || "—"), 1)
|
|
3262
|
-
]),
|
|
3263
|
-
n("span", li, [
|
|
3264
|
-
N(l(e(r).columnDirectory) + " ", 1),
|
|
3265
|
-
n("b", null, l(e(H).columns.length), 1),
|
|
3266
|
-
se(me, {
|
|
3267
|
-
name: "chevron-down",
|
|
3268
|
-
size: 13
|
|
3269
|
-
})
|
|
3270
|
-
])
|
|
3271
|
-
], 40, ni),
|
|
3272
|
-
n("div", oi, [
|
|
3273
|
-
n("span", {
|
|
3274
|
-
"aria-label": e(r).fieldPosition
|
|
3275
|
-
}, [
|
|
3276
|
-
N(l(e(Y) >= 0 ? e(Y) + 1 : 0), 1),
|
|
3277
|
-
f[58] || (f[58] = n("i", null, "/", -1)),
|
|
3278
|
-
N(l(e(H).columns.length), 1)
|
|
3279
|
-
], 8, ii),
|
|
3280
|
-
n("button", {
|
|
3281
|
-
type: "button",
|
|
3282
|
-
class: "mr-designer-icon-button",
|
|
3283
|
-
"aria-label": e(r).previousColumn,
|
|
3284
|
-
title: e(r).previousColumn,
|
|
3285
|
-
disabled: e(Y) <= 0,
|
|
3286
|
-
onClick: f[14] || (f[14] = (c) => e(z).stepColumn(-1))
|
|
3287
|
-
}, [
|
|
3288
|
-
se(me, {
|
|
3289
|
-
name: "chevron-left",
|
|
3290
|
-
size: 14
|
|
3291
|
-
})
|
|
3292
|
-
], 8, si),
|
|
3293
|
-
n("button", {
|
|
3294
|
-
type: "button",
|
|
3295
|
-
class: "mr-designer-icon-button",
|
|
3296
|
-
"aria-label": e(r).nextColumn,
|
|
3297
|
-
title: e(r).nextColumn,
|
|
3298
|
-
disabled: e(Y) >= e(H).columns.length - 1,
|
|
3299
|
-
onClick: f[15] || (f[15] = (c) => e(z).stepColumn(1))
|
|
3300
|
-
}, [
|
|
3301
|
-
se(me, {
|
|
3302
|
-
name: "chevron-right",
|
|
3303
|
-
size: 14
|
|
3304
|
-
})
|
|
3305
|
-
], 8, ri)
|
|
3306
|
-
])
|
|
3307
|
-
]),
|
|
3308
|
-
e(_) ? (m(), h("fieldset", {
|
|
3309
|
-
key: 0,
|
|
3310
|
-
class: "mr-designer-properties",
|
|
3311
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3312
|
-
"aria-label": e(r).columnProperties
|
|
3313
|
-
}, [
|
|
3314
|
-
n("div", ui, [
|
|
3315
|
-
n("h3", null, l(e(r).contentGroup), 1),
|
|
3316
|
-
n("label", null, [
|
|
3317
|
-
N(l(e(r).header), 1),
|
|
3318
|
-
n("input", {
|
|
3319
|
-
value: e(_).column.header,
|
|
3320
|
-
onInput: f[16] || (f[16] = (c) => e(g).setColumn(
|
|
3321
|
-
e(_).index,
|
|
3322
|
-
"header",
|
|
3323
|
-
$e(c)
|
|
3324
|
-
))
|
|
3325
|
-
}, null, 40, ci)
|
|
3326
|
-
]),
|
|
3327
|
-
n("label", null, [
|
|
3328
|
-
N(l(e(r).field), 1),
|
|
3329
|
-
n("input", {
|
|
3330
|
-
value: e(_).column.field,
|
|
3331
|
-
list: e(he) ? `${P}-fields` : void 0,
|
|
3332
|
-
onChange: f[17] || (f[17] = (c) => e(g).setColumn(
|
|
3333
|
-
e(_).index,
|
|
3334
|
-
"field",
|
|
3335
|
-
$e(c)
|
|
3336
|
-
))
|
|
3337
|
-
}, null, 40, mi)
|
|
3338
|
-
]),
|
|
3339
|
-
e(he) ? (m(), h("datalist", {
|
|
3340
|
-
key: 0,
|
|
3341
|
-
id: `${P}-fields`
|
|
3342
|
-
}, [
|
|
3343
|
-
(m(!0), h(J, null, Q(e(he).fields, (c) => (m(), h("option", {
|
|
3344
|
-
key: c.field,
|
|
3345
|
-
value: c.field
|
|
3346
|
-
}, l(c.label) + " · " + l(c.type) + " " + l(c.unit), 9, pi))), 128))
|
|
3347
|
-
], 8, vi)) : F("", !0)
|
|
3348
|
-
]),
|
|
3349
|
-
n("div", gi, [
|
|
3350
|
-
n("h3", null, l(e(r).formatGroup), 1),
|
|
3351
|
-
n("div", hi, [
|
|
3352
|
-
n("label", fi, [
|
|
3353
|
-
N(l(e(r).width), 1),
|
|
3354
|
-
n("input", {
|
|
3355
|
-
type: "number",
|
|
3356
|
-
min: "0.1",
|
|
3357
|
-
step: "0.5",
|
|
3358
|
-
value: e(_).column.widthMm,
|
|
3359
|
-
disabled: Ae.value,
|
|
3360
|
-
onChange: f[18] || (f[18] = (c) => e(g).setColumn(
|
|
3361
|
-
e(_).index,
|
|
3362
|
-
"widthMm",
|
|
3363
|
-
$e(c)
|
|
3364
|
-
))
|
|
3365
|
-
}, null, 40, bi)
|
|
3366
|
-
]),
|
|
3367
|
-
n("label", yi, [
|
|
3368
|
-
N(l(e(r).semantic), 1),
|
|
3369
|
-
n("select", {
|
|
3370
|
-
value: e(_).column.semanticRole || "text",
|
|
3371
|
-
onChange: f[19] || (f[19] = (c) => e(g).setColumn(
|
|
3372
|
-
e(_).index,
|
|
3373
|
-
"semanticRole",
|
|
3374
|
-
$e(c)
|
|
3375
|
-
))
|
|
3376
|
-
}, [
|
|
3377
|
-
n("option", Mi, l(e(r).identifier), 1),
|
|
3378
|
-
n("option", ki, l(e(r).dimension), 1),
|
|
3379
|
-
n("option", xi, l(e(r).measure), 1),
|
|
3380
|
-
n("option", Ci, l(e(r).date), 1),
|
|
3381
|
-
n("option", $i, l(e(r).text), 1)
|
|
3382
|
-
], 40, wi)
|
|
3383
|
-
])
|
|
3384
|
-
]),
|
|
3385
|
-
n("div", Si, [
|
|
3386
|
-
n("span", null, l(e(r).bodyAlign), 1),
|
|
3387
|
-
se(mt, {
|
|
3388
|
-
"model-value": e(_).column.align ?? e(_).column.style?.align ?? e(H).align ?? "left",
|
|
3389
|
-
label: e(r).bodyAlign,
|
|
3390
|
-
labels: ft.value,
|
|
3391
|
-
"auto-label": e(r).autoShort,
|
|
3392
|
-
"allow-auto": "",
|
|
3393
|
-
"onUpdate:modelValue": f[20] || (f[20] = (c) => e(g).setColumn(e(_).index, "align", c))
|
|
3394
|
-
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
3395
|
-
]),
|
|
3396
|
-
n("div", _i, [
|
|
3397
|
-
n("span", null, l(e(r).headerAlign), 1),
|
|
3398
|
-
se(mt, {
|
|
3399
|
-
"model-value": e(g).headerAlignments.value[e(_).index] || "left",
|
|
3400
|
-
label: e(r).headerAlign,
|
|
3401
|
-
labels: ft.value,
|
|
3402
|
-
"auto-label": e(r).autoShort,
|
|
3403
|
-
"onUpdate:modelValue": f[21] || (f[21] = (c) => e(g).setColumn(
|
|
3404
|
-
e(_).index,
|
|
3405
|
-
"headerAlign",
|
|
3406
|
-
c
|
|
3407
|
-
))
|
|
3408
|
-
}, null, 8, ["model-value", "label", "labels", "auto-label"])
|
|
3409
|
-
])
|
|
3410
|
-
]),
|
|
3411
|
-
n("label", Ii, [
|
|
3412
|
-
N(l(e(r).editable), 1),
|
|
3413
|
-
n("input", {
|
|
3414
|
-
type: "checkbox",
|
|
3415
|
-
role: "switch",
|
|
3416
|
-
checked: e(_).column.editable === !0,
|
|
3417
|
-
onChange: f[22] || (f[22] = (c) => e(g).setColumn(
|
|
3418
|
-
e(_).index,
|
|
3419
|
-
"editable",
|
|
3420
|
-
ot(c)
|
|
3421
|
-
))
|
|
3422
|
-
}, null, 40, Ei)
|
|
3423
|
-
]),
|
|
3424
|
-
n("div", Ri, [
|
|
3425
|
-
n("span", null, l(e(r).columnOrder), 1),
|
|
3426
|
-
n("button", {
|
|
3427
|
-
type: "button",
|
|
3428
|
-
"aria-label": e(r).moveColumnLeft,
|
|
3429
|
-
title: e(r).moveColumnLeft,
|
|
3430
|
-
disabled: Ae.value || e(Y) <= 0,
|
|
3431
|
-
onClick: f[23] || (f[23] = (c) => e(Oe)(-1))
|
|
3432
|
-
}, [
|
|
3433
|
-
se(me, {
|
|
3434
|
-
name: "chevron-left",
|
|
3435
|
-
size: 13
|
|
3436
|
-
})
|
|
3437
|
-
], 8, Pi),
|
|
3438
|
-
n("button", {
|
|
3439
|
-
type: "button",
|
|
3440
|
-
"aria-label": e(r).moveColumnRight,
|
|
3441
|
-
title: e(r).moveColumnRight,
|
|
3442
|
-
disabled: Ae.value || e(Y) >= e(H).columns.length - 1,
|
|
3443
|
-
onClick: f[24] || (f[24] = (c) => e(Oe)(1))
|
|
3444
|
-
}, [
|
|
3445
|
-
se(me, {
|
|
3446
|
-
name: "chevron-right",
|
|
3447
|
-
size: 13
|
|
3448
|
-
})
|
|
3449
|
-
], 8, Ti),
|
|
3450
|
-
n("label", null, [
|
|
3451
|
-
N(l(e(r).columnVisible), 1),
|
|
3452
|
-
n("input", {
|
|
3453
|
-
type: "checkbox",
|
|
3454
|
-
checked: e(_).column.hidden !== !0,
|
|
3455
|
-
disabled: Ae.value || e(_).column.hidden !== !0 && e(H).columns.filter((c) => !c.hidden).length === 1,
|
|
3456
|
-
onChange: f[25] || (f[25] = (c) => e(g).setColumn(
|
|
3457
|
-
e(_).index,
|
|
3458
|
-
"hidden",
|
|
3459
|
-
!ot(c)
|
|
3460
|
-
))
|
|
3461
|
-
}, null, 40, Li)
|
|
3462
|
-
])
|
|
3463
|
-
])
|
|
3464
|
-
], 8, di)) : F("", !0),
|
|
3465
|
-
e(ht) ? (m(), h("div", {
|
|
3466
|
-
key: 1,
|
|
3467
|
-
id: `${P}-directory`,
|
|
3468
|
-
ref_key: "directoryPanel",
|
|
3469
|
-
ref: At,
|
|
3470
|
-
role: "dialog",
|
|
3471
|
-
"aria-label": e(r).columnDirectory,
|
|
3472
|
-
class: "mr-designer-directory",
|
|
3473
|
-
onKeydown: f[35] || (f[35] = st(
|
|
3474
|
-
//@ts-ignore
|
|
3475
|
-
(...c) => e(de).escape && e(de).escape(...c),
|
|
3476
|
-
["esc"]
|
|
3477
|
-
)),
|
|
3478
|
-
onFocusout: f[36] || (f[36] = //@ts-ignore
|
|
3479
|
-
(...c) => e(de).leave && e(de).leave(...c))
|
|
3480
|
-
}, [
|
|
3481
|
-
n("div", Ai, [
|
|
3482
|
-
n("strong", null, [
|
|
3483
|
-
N(l(e(r).columnDirectory) + " ", 1),
|
|
3484
|
-
n("span", null, l(e(H).columns.length), 1)
|
|
3485
|
-
]),
|
|
3486
|
-
n("button", {
|
|
3487
|
-
type: "button",
|
|
3488
|
-
class: "mr-designer-icon-button",
|
|
3489
|
-
"aria-label": e(r).closeDirectory,
|
|
3490
|
-
onClick: f[26] || (f[26] = (c) => e(de).close(!0))
|
|
3491
|
-
}, [
|
|
3492
|
-
se(me, {
|
|
3493
|
-
name: "close",
|
|
3494
|
-
size: 15
|
|
3495
|
-
})
|
|
3496
|
-
], 8, Hi)
|
|
3497
|
-
]),
|
|
3498
|
-
n("div", Fi, [
|
|
3499
|
-
se(me, {
|
|
3500
|
-
name: "search",
|
|
3501
|
-
size: 14
|
|
3502
|
-
}),
|
|
3503
|
-
fe(n("input", {
|
|
3504
|
-
ref_key: "directorySearch",
|
|
3505
|
-
ref: Ht,
|
|
3506
|
-
"onUpdate:modelValue": f[27] || (f[27] = (c) => rt(j) ? j.value = c : null),
|
|
3507
|
-
type: "search",
|
|
3508
|
-
"aria-label": e(r).columnsSearch,
|
|
3509
|
-
placeholder: e(r).columnsSearch,
|
|
3510
|
-
onKeydown: f[28] || (f[28] = //@ts-ignore
|
|
3511
|
-
(...c) => e(de).searchKeydown && e(de).searchKeydown(...c))
|
|
3512
|
-
}, null, 40, Ni), [
|
|
3513
|
-
[Mt, e(j)]
|
|
3514
|
-
]),
|
|
3515
|
-
e(j) ? (m(), h("button", {
|
|
3516
|
-
key: 0,
|
|
3517
|
-
type: "button",
|
|
3518
|
-
class: "mr-designer-icon-button",
|
|
3519
|
-
"aria-label": e(r).clearSearch,
|
|
3520
|
-
title: e(r).clearSearch,
|
|
3521
|
-
onClick: f[29] || (f[29] = (c) => j.value = "")
|
|
3522
|
-
}, [
|
|
3523
|
-
se(me, {
|
|
3524
|
-
name: "close",
|
|
3525
|
-
size: 13
|
|
3526
|
-
})
|
|
3527
|
-
], 8, Gi)) : F("", !0)
|
|
3528
|
-
]),
|
|
3529
|
-
n("div", Bi, [
|
|
3530
|
-
n("button", {
|
|
3531
|
-
type: "button",
|
|
3532
|
-
disabled: t.readonly || e(s) || e(x) || !e(V).length,
|
|
3533
|
-
onClick: f[30] || (f[30] = (c) => e(g).selectVisible(!0))
|
|
3534
|
-
}, l(e(r).selectVisible), 9, Oi),
|
|
3535
|
-
e(oe).length ? (m(), h("button", {
|
|
3536
|
-
key: 0,
|
|
3537
|
-
type: "button",
|
|
3538
|
-
onClick: f[31] || (f[31] = //@ts-ignore
|
|
3539
|
-
(...c) => e(g).clearSelection && e(g).clearSelection(...c))
|
|
3540
|
-
}, l(e(r).clearSelection), 1)) : F("", !0),
|
|
3541
|
-
e(oe).length ? (m(), h("span", zi, l(e(r).columnsSelected) + " " + l(e(oe).length), 1)) : (m(), h("span", Vi, l(e(V).length) + " / " + l(e(H).columns.length), 1))
|
|
3542
|
-
]),
|
|
3543
|
-
n("div", {
|
|
3544
|
-
ref_key: "columnList",
|
|
3545
|
-
ref: Ft,
|
|
3546
|
-
class: "mr-designer-column-list",
|
|
3547
|
-
"aria-label": e(r).columnDirectory,
|
|
3548
|
-
role: "group"
|
|
3549
|
-
}, [
|
|
3550
|
-
(m(!0), h(J, null, Q(e(V), ({ column: c, index: Z }) => (m(), h("div", {
|
|
3551
|
-
key: Z,
|
|
3552
|
-
class: Re(["mr-designer-column-row", { "is-active": e(Y) === Z }])
|
|
3553
|
-
}, [
|
|
3554
|
-
n("input", {
|
|
3555
|
-
type: "checkbox",
|
|
3556
|
-
"aria-label": `${e(r).selectColumn} ${c.header}`,
|
|
3557
|
-
checked: e(oe).includes(Z),
|
|
3558
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3559
|
-
onChange: (ye) => e(g).toggleColumn(Z, ot(ye))
|
|
3560
|
-
}, null, 40, Wi),
|
|
3561
|
-
n("button", {
|
|
3562
|
-
type: "button",
|
|
3563
|
-
"data-column-index": Z,
|
|
3564
|
-
"aria-pressed": e(Y) === Z,
|
|
3565
|
-
tabindex: e(Lt) === Z ? 0 : -1,
|
|
3566
|
-
onClick: (ye) => e(de).choose(Z),
|
|
3567
|
-
onKeydown: f[32] || (f[32] = //@ts-ignore
|
|
3568
|
-
(...ye) => e(de).navigate && e(de).navigate(...ye))
|
|
3569
|
-
}, [
|
|
3570
|
-
n("span", Ki, l(Z + 1), 1),
|
|
3571
|
-
n("span", qi, [
|
|
3572
|
-
n("strong", null, l(c.header), 1),
|
|
3573
|
-
n("small", null, l(c.field), 1)
|
|
3574
|
-
]),
|
|
3575
|
-
e(Y) === Z ? (m(), we(me, {
|
|
3576
|
-
key: 0,
|
|
3577
|
-
name: "chevron-right",
|
|
3578
|
-
size: 13
|
|
3579
|
-
})) : F("", !0)
|
|
3580
|
-
], 40, Ui)
|
|
3581
|
-
], 2))), 128)),
|
|
3582
|
-
e(V).length ? F("", !0) : (m(), h("p", Ji, [
|
|
3583
|
-
se(me, {
|
|
3584
|
-
name: "search",
|
|
3585
|
-
size: 20
|
|
3586
|
-
}),
|
|
3587
|
-
N(l(e(r).noColumns), 1)
|
|
3588
|
-
]))
|
|
3589
|
-
], 8, ji),
|
|
3590
|
-
e(oe).length ? (m(), h("div", Yi, [
|
|
3591
|
-
n("label", null, [
|
|
3592
|
-
N(l(e(r).batchBody), 1),
|
|
3593
|
-
n("select", {
|
|
3594
|
-
"aria-label": e(r).batchBody,
|
|
3595
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3596
|
-
onChange: f[33] || (f[33] = (c) => yt(c, "align"))
|
|
3597
|
-
}, [
|
|
3598
|
-
n("option", Zi, l(e(r).chooseAlignment), 1),
|
|
3599
|
-
n("option", Qi, l(e(r).auto), 1),
|
|
3600
|
-
n("option", es, l(e(r).left), 1),
|
|
3601
|
-
n("option", ts, l(e(r).center), 1),
|
|
3602
|
-
n("option", ns, l(e(r).right), 1),
|
|
3603
|
-
n("option", as, l(e(r).justify), 1)
|
|
3604
|
-
], 40, Xi)
|
|
3605
|
-
]),
|
|
3606
|
-
n("label", null, [
|
|
3607
|
-
N(l(e(r).batchHeader), 1),
|
|
3608
|
-
n("select", {
|
|
3609
|
-
"aria-label": e(r).batchHeader,
|
|
3610
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3611
|
-
onChange: f[34] || (f[34] = (c) => yt(c, "headerAlign"))
|
|
3612
|
-
}, [
|
|
3613
|
-
n("option", os, l(e(r).chooseAlignment), 1),
|
|
3614
|
-
n("option", is, l(e(r).left), 1),
|
|
3615
|
-
n("option", ss, l(e(r).center), 1),
|
|
3616
|
-
n("option", rs, l(e(r).right), 1),
|
|
3617
|
-
n("option", ds, l(e(r).justify), 1)
|
|
3618
|
-
], 40, ls)
|
|
3619
|
-
])
|
|
3620
|
-
])) : F("", !0)
|
|
3621
|
-
], 40, Di)) : F("", !0)
|
|
3622
|
-
], 64)) : (m(), h("p", us, l(e(r).noColumns), 1))
|
|
3623
|
-
], 64)) : e(O) === "component" ? (m(), h(J, { key: 2 }, [
|
|
3624
|
-
n("div", cs, [
|
|
3625
|
-
n("select", {
|
|
3626
|
-
"aria-label": e(r).insertComponent,
|
|
3627
|
-
disabled: e(le) || U.value,
|
|
3628
|
-
onChange: f[37] || (f[37] = //@ts-ignore
|
|
3629
|
-
(...c) => e(Ge) && e(Ge)(...c))
|
|
3630
|
-
}, [
|
|
3631
|
-
n("option", vs, l(e(r).insertComponent), 1),
|
|
3632
|
-
n("option", ps, l(e(r).insertText), 1),
|
|
3633
|
-
n("option", {
|
|
3634
|
-
value: "list",
|
|
3635
|
-
disabled: !!e(k).template.repeat
|
|
3636
|
-
}, l(e(r).insertList), 9, gs),
|
|
3637
|
-
n("option", hs, l(e(r).insertImage), 1),
|
|
3638
|
-
n("option", fs, l(e(r).insertRect), 1),
|
|
3639
|
-
n("option", bs, l(e(r).insertQrcode), 1),
|
|
3640
|
-
n("option", ys, l(e(r).insertBarcode), 1)
|
|
3641
|
-
], 40, ms),
|
|
3642
|
-
n("button", {
|
|
3643
|
-
type: "button",
|
|
3644
|
-
title: e(r).duplicateComponent,
|
|
3645
|
-
"aria-label": e(r).duplicateComponent,
|
|
3646
|
-
disabled: e(le) || U.value || !e(ve),
|
|
3647
|
-
onClick: f[38] || (f[38] = //@ts-ignore
|
|
3648
|
-
(...c) => e(A).duplicate && e(A).duplicate(...c))
|
|
3649
|
-
}, " + ", 8, ws),
|
|
3650
|
-
n("button", {
|
|
3651
|
-
type: "button",
|
|
3652
|
-
title: e(r).removeComponent,
|
|
3653
|
-
"aria-label": e(r).removeComponent,
|
|
3654
|
-
disabled: e(le) || U.value || !e(ve),
|
|
3655
|
-
onClick: f[39] || (f[39] = //@ts-ignore
|
|
3656
|
-
(...c) => e(A).remove && e(A).remove(...c))
|
|
3657
|
-
}, [
|
|
3658
|
-
se(me, {
|
|
3659
|
-
name: "close",
|
|
3660
|
-
size: 14
|
|
3661
|
-
})
|
|
3662
|
-
], 8, Ms)
|
|
3663
|
-
]),
|
|
3664
|
-
e(k).template.pages.length > 1 ? (m(), h("label", ks, [
|
|
3665
|
-
N(l(e(r).page), 1),
|
|
3666
|
-
fe(n("select", {
|
|
3667
|
-
"onUpdate:modelValue": f[40] || (f[40] = (c) => rt(ee) ? ee.value = c : null)
|
|
3668
|
-
}, [
|
|
3669
|
-
(m(!0), h(J, null, Q(e(k).template.pages, (c, Z) => (m(), h("option", {
|
|
3670
|
-
key: Z,
|
|
3671
|
-
value: Z
|
|
3672
|
-
}, l(e(Je)(c, Z, e(r).page)), 9, xs))), 128))
|
|
3673
|
-
], 512), [
|
|
3674
|
-
[
|
|
3675
|
-
Ue,
|
|
3676
|
-
e(ee),
|
|
3677
|
-
void 0,
|
|
3678
|
-
{ number: !0 }
|
|
3679
|
-
]
|
|
3680
|
-
])
|
|
3681
|
-
])) : F("", !0),
|
|
3682
|
-
n("label", Cs, [
|
|
3683
|
-
N(l(e(r).components), 1),
|
|
3684
|
-
n("select", {
|
|
3685
|
-
value: e(te) && e(te).pageIndex === e(ee) ? e(te).componentIndex : -1,
|
|
3686
|
-
onChange: f[41] || (f[41] = (c) => lt({
|
|
3687
|
-
pageIndex: e(ee),
|
|
3688
|
-
componentIndex: Number($e(c))
|
|
3689
|
-
}))
|
|
3690
|
-
}, [
|
|
3691
|
-
n("option", Ss, l(e(r).noComponent), 1),
|
|
3692
|
-
(m(!0), h(J, null, Q(be.value, (c) => (m(), h("option", {
|
|
3693
|
-
key: c.index,
|
|
3694
|
-
value: c.index
|
|
3695
|
-
}, l(c.index + 1) + " · " + l(c.name), 9, _s))), 128))
|
|
3696
|
-
], 40, $s)
|
|
3697
|
-
]),
|
|
3698
|
-
e(A).selections.value.length ? (m(), h("div", Is, [
|
|
3699
|
-
n("strong", null, l(e(A).selections.value.length) + " " + l(e(r).component), 1),
|
|
3700
|
-
n("button", {
|
|
3701
|
-
type: "button",
|
|
3702
|
-
disabled: e(le),
|
|
3703
|
-
onClick: f[42] || (f[42] = //@ts-ignore
|
|
3704
|
-
(...c) => e(A).toggleLock && e(A).toggleLock(...c))
|
|
3705
|
-
}, l(e(A).allLocked.value ? e(r).unlockSelection : e(r).lockSelection), 9, Es),
|
|
3706
|
-
n("select", {
|
|
3707
|
-
"aria-label": e(r).alignSelection,
|
|
3708
|
-
disabled: e(le) || U.value || e(A).selections.value.length < 2,
|
|
3709
|
-
onChange: f[43] || (f[43] = (c) => {
|
|
3710
|
-
e(A).align($e(c)), c.target.value = "";
|
|
3711
|
-
})
|
|
3712
|
-
}, [
|
|
3713
|
-
n("option", Ps, l(e(r).alignSelection), 1),
|
|
3714
|
-
n("option", Ts, l(e(r).leftEdges), 1),
|
|
3715
|
-
n("option", Ls, l(e(r).centers), 1),
|
|
3716
|
-
n("option", Ds, l(e(r).rightEdges), 1),
|
|
3717
|
-
n("option", As, l(e(r).topEdges), 1),
|
|
3718
|
-
n("option", Hs, l(e(r).middles), 1),
|
|
3719
|
-
n("option", Fs, l(e(r).bottomEdges), 1)
|
|
3720
|
-
], 40, Rs),
|
|
3721
|
-
n("button", {
|
|
3722
|
-
type: "button",
|
|
3723
|
-
disabled: e(le) || U.value || e(A).selections.value.length < 3,
|
|
3724
|
-
onClick: f[44] || (f[44] = (c) => e(A).distribute("horizontal"))
|
|
3725
|
-
}, l(e(r).horizontalSpacing), 9, Ns),
|
|
3726
|
-
n("button", {
|
|
3727
|
-
type: "button",
|
|
3728
|
-
disabled: e(le) || U.value || e(A).selections.value.length < 3,
|
|
3729
|
-
onClick: f[45] || (f[45] = (c) => e(A).distribute("vertical"))
|
|
3730
|
-
}, l(e(r).verticalSpacing), 9, Gs),
|
|
3731
|
-
e(A).allLocked.value ? (m(), h("small", Bs, l(e(r).sessionLock), 1)) : F("", !0)
|
|
3732
|
-
])) : F("", !0),
|
|
3733
|
-
e(ve) ? (m(), h(J, { key: 2 }, [
|
|
3734
|
-
n("div", Os, [
|
|
3735
|
-
n("button", {
|
|
3736
|
-
type: "button",
|
|
3737
|
-
disabled: e(le) || U.value || e(te)?.componentIndex === 0,
|
|
3738
|
-
onClick: f[46] || (f[46] = (c) => e(A).reorder(-1))
|
|
3739
|
-
}, l(e(r).backward), 9, zs),
|
|
3740
|
-
n("button", {
|
|
3741
|
-
type: "button",
|
|
3742
|
-
disabled: e(le) || U.value || e(te)?.componentIndex === (e(k).template.pages[e(ee)]?.components.length ?? 0) - 1,
|
|
3743
|
-
onClick: f[47] || (f[47] = (c) => e(A).reorder(1))
|
|
3744
|
-
}, l(e(r).forward), 9, Vs)
|
|
3745
|
-
]),
|
|
3746
|
-
se(vl, {
|
|
3747
|
-
component: e(ve),
|
|
3748
|
-
"geometry-disabled": U.value,
|
|
3749
|
-
disabled: e(le) || e(A).locked(e(te)),
|
|
3750
|
-
messages: e(r),
|
|
3751
|
-
repeat: e(k).template.repeat,
|
|
3752
|
-
schema: ne.value,
|
|
3753
|
-
onGeometry: e(A).geometry,
|
|
3754
|
-
onPatch: e(et)
|
|
3755
|
-
}, null, 8, ["component", "geometry-disabled", "disabled", "messages", "repeat", "schema", "onGeometry", "onPatch"]),
|
|
3756
|
-
e(ve).kind === "list" ? (m(), we(ro, {
|
|
3757
|
-
key: 0,
|
|
3758
|
-
list: e(ve),
|
|
3759
|
-
disabled: e(le) || U.value,
|
|
3760
|
-
messages: e(r),
|
|
3761
|
-
onCommand: e(tt)
|
|
3762
|
-
}, null, 8, ["list", "disabled", "messages", "onCommand"])) : F("", !0)
|
|
3763
|
-
], 64)) : (m(), h("p", js, l(e(r).noComponent), 1))
|
|
3764
|
-
], 64)) : e(O) === "template" ? (m(), h(J, { key: 3 }, [
|
|
3765
|
-
n("h3", null, l(e(r).templateDetails), 1),
|
|
3766
|
-
n("label", Ws, [
|
|
3767
|
-
N(l(e(r).name), 1),
|
|
3768
|
-
n("input", {
|
|
3769
|
-
value: e(k).name,
|
|
3770
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3771
|
-
onInput: f[48] || (f[48] = (c) => e(g).setName($e(c)))
|
|
3772
|
-
}, null, 40, Us)
|
|
3773
|
-
]),
|
|
3774
|
-
n("label", Ks, [
|
|
3775
|
-
N(l(e(r).description), 1),
|
|
3776
|
-
n("textarea", {
|
|
3777
|
-
rows: "2",
|
|
3778
|
-
value: e(k).description,
|
|
3779
|
-
disabled: t.readonly || e(s) || e(x),
|
|
3780
|
-
onInput: f[49] || (f[49] = (c) => e(g).setDescription($e(c)))
|
|
3781
|
-
}, null, 40, qs)
|
|
3782
|
-
]),
|
|
3783
|
-
se(Al, {
|
|
3784
|
-
document: e(k),
|
|
3785
|
-
"page-index": e(ee),
|
|
3786
|
-
disabled: e(le),
|
|
3787
|
-
messages: e(r),
|
|
3788
|
-
onSelect: f[50] || (f[50] = (c) => ee.value = c),
|
|
3789
|
-
onCommand: Te,
|
|
3790
|
-
onLocate: f[51] || (f[51] = (c) => {
|
|
3791
|
-
lt({ pageIndex: e(ee), componentIndex: c }), e(X)("design");
|
|
3792
|
-
})
|
|
3793
|
-
}, null, 8, ["document", "page-index", "disabled", "messages"]),
|
|
3794
|
-
se(eo, {
|
|
3795
|
-
document: e(k),
|
|
3796
|
-
datasets: Object.keys(t.datasets ?? {}),
|
|
3797
|
-
schemas: t.dataSchemas,
|
|
3798
|
-
disabled: e(le),
|
|
3799
|
-
messages: e(r),
|
|
3800
|
-
onChange: f[52] || (f[52] = (c) => {
|
|
3801
|
-
e(g).transaction((Z) => {
|
|
3802
|
-
c ? Z.template.repeat = c : delete Z.template.repeat;
|
|
3803
|
-
});
|
|
3804
|
-
})
|
|
3805
|
-
}, null, 8, ["document", "datasets", "schemas", "disabled", "messages"]),
|
|
3806
|
-
n("details", Js, [
|
|
3807
|
-
n("summary", null, l(e(r).technicalDetails), 1),
|
|
3808
|
-
n("dl", Ys, [
|
|
3809
|
-
n("dt", null, l(e(r).templateIdentity), 1),
|
|
3810
|
-
n("dd", null, l(e(k).id), 1),
|
|
3811
|
-
n("dt", null, l(e(r).templateRevision), 1),
|
|
3812
|
-
n("dd", null, l(e(k).revision || e(r).unpublished), 1)
|
|
3813
|
-
])
|
|
3814
|
-
])
|
|
3815
|
-
], 64)) : (m(), h(J, { key: 4 }, [
|
|
3816
|
-
n("h3", null, l(e(r).advancedTitle), 1),
|
|
3817
|
-
n("label", Xs, [
|
|
3818
|
-
N(l(e(r).json), 1),
|
|
3819
|
-
fe(n("textarea", {
|
|
3820
|
-
"onUpdate:modelValue": f[53] || (f[53] = (c) => rt(E) ? E.value = c : null),
|
|
3821
|
-
class: "mr-designer-json",
|
|
3822
|
-
"aria-label": e(r).json,
|
|
3823
|
-
disabled: t.readonly || e(s),
|
|
3824
|
-
spellcheck: "false"
|
|
3825
|
-
}, null, 8, Zs), [
|
|
3826
|
-
[Mt, e(E)]
|
|
3827
|
-
])
|
|
3828
|
-
]),
|
|
3829
|
-
n("button", {
|
|
3830
|
-
type: "button",
|
|
3831
|
-
class: "mr-designer-apply-json",
|
|
3832
|
-
disabled: t.readonly || e(s),
|
|
3833
|
-
onClick: f[54] || (f[54] = //@ts-ignore
|
|
3834
|
-
(...c) => e(g).applyJson && e(g).applyJson(...c))
|
|
3835
|
-
}, l(e(r).applyJson), 9, Qs)
|
|
3836
|
-
], 64)),
|
|
3837
|
-
e(x) ? (m(), h("p", er, l(e(r).jsonPending), 1)) : F("", !0)
|
|
3838
|
-
], 10, Yo)
|
|
3839
|
-
])) : F("", !0),
|
|
3840
|
-
e(O) !== "tools" ? (m(), h("div", {
|
|
3841
|
-
key: 2,
|
|
3842
|
-
class: "mr-designer-preview",
|
|
3843
|
-
"aria-label": e(r).previewTitle
|
|
3844
|
-
}, [
|
|
3845
|
-
e(I) ? (m(), h("div", nr, l(e(I)), 1)) : F("", !0),
|
|
3846
|
-
e(R).ok ? F("", !0) : (m(), h("ul", ar, [
|
|
3847
|
-
(m(!0), h(J, null, Q(e(R).errors, (c) => (m(), h("li", {
|
|
3848
|
-
key: c.path
|
|
3849
|
-
}, l(c.path) + ":" + l(c.message), 1))), 128))
|
|
3850
|
-
])),
|
|
3851
|
-
e(B) === "design" && e(R).ok ? (m(), we(Wn, {
|
|
3852
|
-
key: 2,
|
|
3853
|
-
document: e(k),
|
|
3854
|
-
selection: e(te),
|
|
3855
|
-
selections: e(A).selections.value,
|
|
3856
|
-
locked: e(A).locked,
|
|
3857
|
-
"active-column-index": e(Y),
|
|
3858
|
-
"page-index": e(ee),
|
|
3859
|
-
datasets: t.datasets,
|
|
3860
|
-
disabled: e(le) || U.value || e(g).isToolPending("rules"),
|
|
3861
|
-
messages: e(r),
|
|
3862
|
-
onSelect: lt,
|
|
3863
|
-
onGeometry: e(A).geometry,
|
|
3864
|
-
onColumn: e(z).activate,
|
|
3865
|
-
onWidth: f[55] || (f[55] = (c, Z) => e(g).setColumn(c, "widthMm", String(Z)))
|
|
3866
|
-
}, null, 8, ["document", "selection", "selections", "locked", "active-column-index", "page-index", "datasets", "disabled", "messages", "onGeometry", "onColumn"])) : e(ce) && e(R).ok ? (m(), we(e(zt), {
|
|
3867
|
-
key: 3,
|
|
3868
|
-
"report-id": "draft",
|
|
3869
|
-
fetcher: e(ce),
|
|
3870
|
-
messages: {
|
|
3871
|
-
title: e(r).previewTitle,
|
|
3872
|
-
columnDirectory: e(r).previewFieldDirectory
|
|
3873
|
-
},
|
|
3874
|
-
"show-params": !1,
|
|
3875
|
-
editable: !1,
|
|
3876
|
-
"excel-import": !1,
|
|
3877
|
-
height: "100%"
|
|
3878
|
-
}, null, 8, ["fetcher", "messages"])) : (m(), h("p", lr, l(e(r).invalid), 1))
|
|
3879
|
-
], 8, tr)) : F("", !0)
|
|
3880
|
-
], 2)
|
|
3881
|
-
], 8, Mo));
|
|
3882
|
-
}
|
|
3883
|
-
}), vr = /* @__PURE__ */ Ce(or, [["__scopeId", "data-v-db80c404"]]), pr = {
|
|
3884
|
-
stale: "输入或验收范围已变化,旧结果已失效,请重新运行检查。",
|
|
3885
|
-
scope: "上次实测范围",
|
|
3886
|
-
datasets: "个数据集",
|
|
3887
|
-
treeHint: "树形数据保留完整父子关系;20/100 作为本次总节点预算,超出请选全部或提供完整小样例。",
|
|
3888
|
-
title: "变更与验收",
|
|
3889
|
-
run: "运行检查",
|
|
3890
|
-
running: "检查中…",
|
|
3891
|
-
samples: "验收样例",
|
|
3892
|
-
none: "仅检查结构",
|
|
3893
|
-
first20: "每个数据集前 20 行",
|
|
3894
|
-
first100: "每个数据集前 100 行",
|
|
3895
|
-
all: "全部当前数据(总计 ≤1000 行)",
|
|
3896
|
-
changes: "模板变更",
|
|
3897
|
-
issues: "待处理项",
|
|
3898
|
-
results: "样例结果",
|
|
3899
|
-
noChanges: "与基线一致",
|
|
3900
|
-
noIssues: "本次检查未发现问题",
|
|
3901
|
-
empty: "选择验收样例后运行,检查字段映射、排版与输出能力。",
|
|
3902
|
-
baseline: "未提供上一版本,仅检查当前模板。",
|
|
3903
|
-
errors: "错误",
|
|
3904
|
-
warnings: "提示",
|
|
3905
|
-
locate: "定位",
|
|
3906
|
-
before: "修改前",
|
|
3907
|
-
after: "修改后",
|
|
3908
|
-
breaking: "影响兼容性",
|
|
3909
|
-
acknowledge: "已确认字段与结构变更",
|
|
3910
|
-
truncated: "变更较多,仅展示前 500 项;兼容检查仍包含全部变更。",
|
|
3911
|
-
pages: "页",
|
|
3912
|
-
rows: "行",
|
|
3913
|
-
checked: "检查结果对应本次样例,不代替服务端发布权限与全量数据校验。",
|
|
3914
|
-
categories: { metadata: "信息", structure: "结构", binding: "字段", calculation: "计算", format: "样式" },
|
|
3915
|
-
kinds: { added: "新增", removed: "删除", modified: "修改", moved: "调序" }
|
|
3916
|
-
}, gr = {
|
|
3917
|
-
tableMode: "传统整表",
|
|
3918
|
-
multiRegions: "多区域绑定",
|
|
3919
|
-
multiHint: "点击单元格选择起点,Shift 点击选择终点;每个动态区域选择一行原型。",
|
|
3920
|
-
addRegion: "创建区域",
|
|
3921
|
-
removeRegion: "删除区域",
|
|
3922
|
-
regionProperties: "当前区域",
|
|
3923
|
-
regionReady: "就绪",
|
|
3924
|
-
regionPending: "待补齐",
|
|
3925
|
-
regionError: "需修正",
|
|
3926
|
-
locateIssue: "定位并修正",
|
|
3927
|
-
nextDataset: "下一步:选择业务数据集",
|
|
3928
|
-
nextRowKey: "下一步:选择稳定业务主键",
|
|
3929
|
-
nextField: "下一步:补齐或修正逐列字段映射",
|
|
3930
|
-
nextRange: "下一步:检查原型范围及区域重叠",
|
|
3931
|
-
nextRegion: "下一步:在原始模板中选择一行并创建区域",
|
|
3932
|
-
nextHeader: "下一步:选择整行并标记表头和明细",
|
|
3933
|
-
nextFooter: "下一步:检查重复页尾范围",
|
|
3934
|
-
nextContract: "下一步:检查数据集契约和样例",
|
|
3935
|
-
dataContract: "数据集契约",
|
|
3936
|
-
inspectIssues: "查看待修正项",
|
|
3937
|
-
previousIssues: "上一组问题",
|
|
3938
|
-
nextIssues: "下一组问题",
|
|
3939
|
-
noCellSelection: "请先点击单元格,Shift 点击选择一行范围",
|
|
3940
|
-
limitRegions: "最多创建 128 个区域",
|
|
3941
|
-
applying: "正在确认模板…",
|
|
3942
|
-
regionCoordinates: "原型范围",
|
|
3943
|
-
regionMode: "填充方式",
|
|
3944
|
-
recordMode: "单记录",
|
|
3945
|
-
repeatMode: "纵向重复",
|
|
3946
|
-
recordHint: "接收零或一行数据,保留旁列静态内容;多行输入会明确报错。",
|
|
3947
|
-
repeatHint: "按数据行纵向扩展,下方内容自动顺延;旁列不能放置非空静态内容。",
|
|
3948
|
-
bindRegionHeader: "选区作为表头",
|
|
3949
|
-
noRegionHeader: "无区域表头",
|
|
3950
|
-
clearHeader: "清除区域表头",
|
|
3951
|
-
flowFooter: "重复页尾",
|
|
3952
|
-
flowFooterHint: "选择来源最后几行的完整列宽;为每页预留空间,避免明细覆盖。",
|
|
3953
|
-
bindFooter: "选区作为页尾",
|
|
3954
|
-
clearFooter: "清除重复页尾",
|
|
3955
|
-
concurrency: "业务并发字段",
|
|
3956
|
-
revisionField: "修订字段",
|
|
3957
|
-
sourceTokenField: "来源令牌字段",
|
|
3958
|
-
selectionCellLabel: "选择源单元格",
|
|
3959
|
-
searchFields: "搜索字段名称、编码或单位",
|
|
3960
|
-
fieldLimit: "候选最多显示 64 项;输入字段名筛选,已选映射始终保留。",
|
|
3961
|
-
restoreDraft: "恢复工具草稿",
|
|
3962
|
-
title: "Excel 业务绑定",
|
|
3963
|
-
intro: "保留模板版式,明确数据来源",
|
|
3964
|
-
upload: "选择 Excel 模板",
|
|
3965
|
-
replace: "更换文件",
|
|
3966
|
-
loading: "正在解析模板…",
|
|
3967
|
-
cancel: "取消解析",
|
|
3968
|
-
source: "原始模板",
|
|
3969
|
-
sourceHint: "点击行号选择,Shift 点击扩展;选择整行区域后标记用途。",
|
|
3970
|
-
sourceOnly: "来源样例仅供设计,应用时将全部替换为接口数据。",
|
|
3971
|
-
sheet: "工作表",
|
|
3972
|
-
dataset: "业务数据集",
|
|
3973
|
-
chooseDataset: "选择数据集契约",
|
|
3974
|
-
rowKey: "稳定业务主键",
|
|
3975
|
-
chooseRowKey: "选择业务主键",
|
|
3976
|
-
titleRegion: "标题",
|
|
3977
|
-
headerRegion: "多层表头",
|
|
3978
|
-
detailRegion: "样例明细",
|
|
3979
|
-
footerRegion: "静态尾页",
|
|
3980
|
-
optional: "可选",
|
|
3981
|
-
selectRegion: "标记选中行",
|
|
3982
|
-
clear: "清除",
|
|
3983
|
-
mapping: "逐列映射",
|
|
3984
|
-
coverage: "映射覆盖",
|
|
3985
|
-
physical: "Excel 列",
|
|
3986
|
-
business: "业务字段",
|
|
3987
|
-
chooseField: "选择已声明字段",
|
|
3988
|
-
selected: "已选行",
|
|
3989
|
-
previousRows: "上一组行",
|
|
3990
|
-
nextRows: "下一组行",
|
|
3991
|
-
previousColumns: "上一组列",
|
|
3992
|
-
nextColumns: "下一组列",
|
|
3993
|
-
rowStart: "预览起始行",
|
|
3994
|
-
columnStart: "预览起始列",
|
|
3995
|
-
apply: "校验并使用模板",
|
|
3996
|
-
check: "校验绑定",
|
|
3997
|
-
identity: "新模板",
|
|
3998
|
-
templateId: "模板标识",
|
|
3999
|
-
templateName: "模板名称",
|
|
4000
|
-
issues: "请先修正绑定",
|
|
4001
|
-
ready: "绑定校验通过",
|
|
4002
|
-
noSource: "导入 .xlsx,开始绑定业务数据",
|
|
4003
|
-
noContract: "请由接入方提供数据集字段契约,再配置业务绑定。",
|
|
4004
|
-
fieldType: "类型",
|
|
4005
|
-
precision: "位小数",
|
|
4006
|
-
sample: "契约样例",
|
|
4007
|
-
unnamed: "未标记",
|
|
4008
|
-
applied: "模板已生成,等待接入方确认",
|
|
4009
|
-
readonly: "当前只读",
|
|
4010
|
-
invalidFile: "请选择未加密的 .xlsx 文件",
|
|
4011
|
-
emptySelection: "请先在原始模板中选择行",
|
|
4012
|
-
footerHint: "静态尾页保留为独立页面,不随明细重复;不是每页页脚。",
|
|
4013
|
-
inspectWarning: "来源兼容性提示",
|
|
4014
|
-
session: "绑定会话可随草稿保存,再次传入即可恢复",
|
|
4015
|
-
decimals: "精确小数按原文本保留",
|
|
4016
|
-
selectionLabel: "选择源行",
|
|
4017
|
-
regionLegend: "区域用途",
|
|
4018
|
-
summary: "绑定摘要",
|
|
4019
|
-
stepSource: "选模板",
|
|
4020
|
-
stepRegions: "标区域",
|
|
4021
|
-
stepFields: "绑字段",
|
|
4022
|
-
stepValidate: "校验应用",
|
|
4023
|
-
errors: "项问题",
|
|
4024
|
-
sourceError: "模板解析失败",
|
|
4025
|
-
dimensions: "原始范围",
|
|
4026
|
-
mappedTo: "绑定到",
|
|
4027
|
-
sampleOnly: "仅契约样例",
|
|
4028
|
-
schemaOnly: "契约字段,不执行接口查询"
|
|
4029
|
-
}, hr = {
|
|
4030
|
-
restoreDraft: "恢复工具草稿",
|
|
4031
|
-
catalog: "规则与字段",
|
|
4032
|
-
searchFields: "搜索字段、类型或单位",
|
|
4033
|
-
useField: "使用此字段",
|
|
4034
|
-
shown: "显示",
|
|
4035
|
-
explanation: "计算解释",
|
|
4036
|
-
sourceValues: "源值",
|
|
4037
|
-
expression: "表达式",
|
|
4038
|
-
result: "结果",
|
|
4039
|
-
notChecked: "修改后请重新验算",
|
|
4040
|
-
nullReason: "空值依规则保留;空值传播与除零策略见计算边界。",
|
|
4041
|
-
sourceHint: "最多展示 5 条明细;分组和全量聚合以当前验算范围为准。",
|
|
4042
|
-
pending: "未应用配置",
|
|
4043
|
-
detail: "主从",
|
|
4044
|
-
matrix: "矩阵",
|
|
4045
|
-
tree: "树形",
|
|
4046
|
-
treeInput: "输入结构",
|
|
4047
|
-
treeFlat: "扁平父子表",
|
|
4048
|
-
treeNested: "嵌套子节点",
|
|
4049
|
-
treeId: "节点业务键",
|
|
4050
|
-
treeParent: "父节点键",
|
|
4051
|
-
treeChildren: "子节点数组字段",
|
|
4052
|
-
treeLabel: "层级标签列",
|
|
4053
|
-
treeIndent: "每级缩进 · mm",
|
|
4054
|
-
treeOrphan: "孤儿节点",
|
|
4055
|
-
treeAsRoot: "作为根节点",
|
|
4056
|
-
treeValues: "父级数值来源",
|
|
4057
|
-
treeSource: "保留来源值",
|
|
4058
|
-
treeLeaves: "按后代叶子聚合",
|
|
4059
|
-
treeRows: "最多节点",
|
|
4060
|
-
treeDepth: "最多层级",
|
|
4061
|
-
treeHint: "全量树展示与导出。总计只统计叶子,避免父子重复。应用将替换普通分组、主从、矩阵和行可见条件;可撤销恢复。",
|
|
4062
|
-
treeReadonly: "嵌套输入首版只读;扁平输入的结构键和派生父级聚合只读。",
|
|
4063
|
-
treeBudget: "树形样例最多 1000 个节点,请提供完整关系样例。",
|
|
4064
|
-
measureLabel: "显示名称",
|
|
4065
|
-
childDataset: "明细数据集",
|
|
4066
|
-
parentKey: "主表关联键",
|
|
4067
|
-
foreignKey: "明细外键",
|
|
4068
|
-
rowKey: "明细业务主键",
|
|
4069
|
-
noRowKey: "只读明细,不绑定编辑身份",
|
|
4070
|
-
childColumns: "明细展示字段",
|
|
4071
|
-
title: "明细标题",
|
|
4072
|
-
unmatched: "未关联明细",
|
|
4073
|
-
ignore: "显式忽略",
|
|
4074
|
-
childHeader: "展示明细表头",
|
|
4075
|
-
rowFields: "行维度",
|
|
4076
|
-
columnFields: "列维度",
|
|
4077
|
-
totals: "原始样本总计",
|
|
4078
|
-
widthSettings: "动态列宽 · mm",
|
|
4079
|
-
dimensionWidth: "维度列宽",
|
|
4080
|
-
measureWidth: "度量列宽",
|
|
4081
|
-
detailHint: "以业务键关联宿主提供的数据集。应用主从布局将替换矩阵配置。",
|
|
4082
|
-
matrixHint: "查询时按维度生成动态列。应用矩阵将替换普通分组、主从和总计;可撤销恢复。",
|
|
4083
|
-
computations: "计算",
|
|
4084
|
-
groups: "分组",
|
|
4085
|
-
conditions: "条件",
|
|
4086
|
-
target: "结果字段",
|
|
4087
|
-
newField: "新增计算字段",
|
|
4088
|
-
select: "选择字段",
|
|
4089
|
-
row: "当前行",
|
|
4090
|
-
group: "当前组",
|
|
4091
|
-
dataset: "整个数据集",
|
|
4092
|
-
scope: "计算范围",
|
|
4093
|
-
numeric: "数值模式",
|
|
4094
|
-
number: "普通数值",
|
|
4095
|
-
decimal: "精确小数",
|
|
4096
|
-
digits: "小数位",
|
|
4097
|
-
groupFields: "分组依据",
|
|
4098
|
-
field: "字段",
|
|
4099
|
-
constant: "常量",
|
|
4100
|
-
operation: "运算",
|
|
4101
|
-
aggregate: "聚合",
|
|
4102
|
-
text: "文本",
|
|
4103
|
-
boolean: "布尔",
|
|
4104
|
-
null: "空值",
|
|
4105
|
-
true: "是",
|
|
4106
|
-
false: "否",
|
|
4107
|
-
add: "相加",
|
|
4108
|
-
subtract: "相减",
|
|
4109
|
-
multiply: "相乘",
|
|
4110
|
-
divide: "相除",
|
|
4111
|
-
coalesce: "首个非空值",
|
|
4112
|
-
sum: "求和",
|
|
4113
|
-
count: "计数",
|
|
4114
|
-
avg: "平均值",
|
|
4115
|
-
min: "最小值",
|
|
4116
|
-
max: "最大值",
|
|
4117
|
-
weightedAvg: "加权平均",
|
|
4118
|
-
subtotalLabel: "小计",
|
|
4119
|
-
weight: "权重字段",
|
|
4120
|
-
argument: "参数",
|
|
4121
|
-
addArgument: "添加参数",
|
|
4122
|
-
remove: "移除",
|
|
4123
|
-
apply: "应用规则",
|
|
4124
|
-
check: "样例验算",
|
|
4125
|
-
addGroup: "添加分组",
|
|
4126
|
-
noGroups: "尚未配置分组",
|
|
4127
|
-
header: "组头模板",
|
|
4128
|
-
footer: "组尾标签",
|
|
4129
|
-
repeat: "跨页重复组头",
|
|
4130
|
-
orphan: "组头与首行保持同页",
|
|
4131
|
-
outer: "外层",
|
|
4132
|
-
inner: "内层",
|
|
4133
|
-
addAggregate: "添加聚合",
|
|
4134
|
-
measure: "度量字段",
|
|
4135
|
-
output: "输出字段",
|
|
4136
|
-
condition: "条件字段",
|
|
4137
|
-
comparison: "比较方式",
|
|
4138
|
-
threshold: "比较值",
|
|
4139
|
-
effect: "效果",
|
|
4140
|
-
style: "条件样式",
|
|
4141
|
-
cell: "单元格可见",
|
|
4142
|
-
rowVisibility: "明细行可见",
|
|
4143
|
-
color: "文字颜色",
|
|
4144
|
-
background: "背景颜色",
|
|
4145
|
-
bold: "加粗",
|
|
4146
|
-
column: "目标列",
|
|
4147
|
-
newCondition: "新增条件样式",
|
|
4148
|
-
removeCondition: "移除此规则",
|
|
4149
|
-
advanced: "计算边界",
|
|
4150
|
-
nulls: "空值处理",
|
|
4151
|
-
propagate: "保留为空",
|
|
4152
|
-
error: "报告错误",
|
|
4153
|
-
division: "除零处理",
|
|
4154
|
-
dependencies: "计算顺序",
|
|
4155
|
-
noData: "尚无样例数据",
|
|
4156
|
-
sample: "样例前 1000 行 · 仅验算,不修改来源",
|
|
4157
|
-
preview: "计算结果",
|
|
4158
|
-
existing: "已有规则",
|
|
4159
|
-
ready: "规则已通过结构校验",
|
|
4160
|
-
allRows: "全部行",
|
|
4161
|
-
noFields: "当前数据集尚无字段",
|
|
4162
|
-
resultType: "常量类型",
|
|
4163
|
-
settings: "规则设置",
|
|
4164
|
-
moveUp: "向外移动",
|
|
4165
|
-
moveDown: "向内移动",
|
|
4166
|
-
missingTarget: "请选择或填写结果字段",
|
|
4167
|
-
noSelection: "请先选择列",
|
|
4168
|
-
countHint: "留空度量字段可统计行数",
|
|
4169
|
-
decimalHint: "精确小数以文本保存,避免大数精度丢失。",
|
|
4170
|
-
readonly: "只读",
|
|
4171
|
-
formatMode: "条件规则",
|
|
4172
|
-
rule: "规则",
|
|
4173
|
-
sampleError: "验算未通过",
|
|
4174
|
-
new: "新增",
|
|
4175
|
-
enabled: "启用"
|
|
4176
|
-
}, fr = {
|
|
4177
|
-
paramsTool: "查询参数",
|
|
4178
|
-
paramsDescription: "配置一次,预览与服务端使用同一份校验规则。",
|
|
4179
|
-
paramsDirectory: "参数目录",
|
|
4180
|
-
paramAdd: "添加参数",
|
|
4181
|
-
paramEmpty: "尚未配置查询参数",
|
|
4182
|
-
paramEmptyHint: "添加日期、厂别等条件,报表预览会自动生成查询面板。",
|
|
4183
|
-
paramField: "参数标识",
|
|
4184
|
-
paramLabel: "显示名称",
|
|
4185
|
-
paramType: "控件类型",
|
|
4186
|
-
paramRequired: "必填",
|
|
4187
|
-
paramPlaceholder: "输入提示",
|
|
4188
|
-
paramDefaultEnabled: "设置默认值",
|
|
4189
|
-
paramDefault: "默认值",
|
|
4190
|
-
paramMinimum: "最小值(含边界)",
|
|
4191
|
-
paramMaximum: "最大值(含边界)",
|
|
4192
|
-
paramMinLength: "最少字符数",
|
|
4193
|
-
paramMaxLength: "最多字符数",
|
|
4194
|
-
paramOptions: "静态下拉选项",
|
|
4195
|
-
paramOptionValue: "接口值",
|
|
4196
|
-
paramOptionLabel: "显示文字",
|
|
4197
|
-
paramOptionAdd: "添加选项",
|
|
4198
|
-
paramRemove: "删除参数",
|
|
4199
|
-
paramOptionRemove: "删除选项",
|
|
4200
|
-
paramMoveUp: "上移参数",
|
|
4201
|
-
paramMoveDown: "下移参数",
|
|
4202
|
-
paramApply: "校验并应用参数",
|
|
4203
|
-
paramRestore: "恢复参数草稿",
|
|
4204
|
-
paramPending: "尚未应用",
|
|
4205
|
-
paramReady: "规则有效",
|
|
4206
|
-
paramInvalid: "规则待修正",
|
|
4207
|
-
paramIssueCount: "待修正问题",
|
|
4208
|
-
paramLocateFirst: "定位首个问题",
|
|
4209
|
-
paramUnnamed: "未命名参数",
|
|
4210
|
-
paramRangeStart: "默认开始日期",
|
|
4211
|
-
paramRangeEnd: "默认结束日期",
|
|
4212
|
-
paramConflict: "模板参数已在其他操作中变更。请先恢复参数草稿,再继续编辑。",
|
|
4213
|
-
paramApplyFailed: "参数未应用,请检查模板校验信息。",
|
|
4214
|
-
paramRenameHint: "参数标识决定接口取数键。新增、删除或改名后,请同步检查接入方的数据查询;插件不会修改外部接口。",
|
|
4215
|
-
paramChanges: "接口参数键变更",
|
|
4216
|
-
paramAdded: "新增",
|
|
4217
|
-
paramRemoved: "移除",
|
|
4218
|
-
paramWire: "接口值格式",
|
|
4219
|
-
paramNoDefault: "未设置默认值",
|
|
4220
|
-
paramRangeHint: "两端均须填写,开始日期不能晚于结束日期;边界约束作用于整个范围。",
|
|
4221
|
-
paramText: "文本",
|
|
4222
|
-
paramNumber: "数字",
|
|
4223
|
-
paramDate: "日期",
|
|
4224
|
-
paramMonth: "月份",
|
|
4225
|
-
paramYear: "年份",
|
|
4226
|
-
paramDateRange: "日期范围",
|
|
4227
|
-
paramSelect: "下拉选择"
|
|
4228
|
-
}, br = {
|
|
4229
|
-
batchTitle: "批量生成",
|
|
4230
|
-
batchDescription: "每组参数独立生成;成功结果由接入方保存,当前页面仅保留回执。",
|
|
4231
|
-
batchAdd: "添加一组",
|
|
4232
|
-
batchDuplicate: "复制参数",
|
|
4233
|
-
batchDuplicateCompleted: "复制为新任务",
|
|
4234
|
-
batchRemove: "删除参数组",
|
|
4235
|
-
batchRun: "生成待处理",
|
|
4236
|
-
batchContinue: "继续未完成",
|
|
4237
|
-
batchRunning: "正在生成",
|
|
4238
|
-
batchRetry: "仅重试失败项",
|
|
4239
|
-
batchCancel: "取消剩余任务",
|
|
4240
|
-
batchCancelling: "正在取消…",
|
|
4241
|
-
batchPending: "待生成",
|
|
4242
|
-
batchCompleted: "已完成",
|
|
4243
|
-
batchCompletedHint: "此组已生成并保留回执;需修改参数或再次生成,请复制为新任务。",
|
|
4244
|
-
batchFailed: "失败",
|
|
4245
|
-
batchCancelled: "已取消",
|
|
4246
|
-
batchCase: "参数组",
|
|
4247
|
-
batchProgress: "本轮已结束 {completed}/{total} · 失败 {failed} · 取消 {cancelled}",
|
|
4248
|
-
batchInvalid: "请修正参数错误后再生成;本次未启动任何任务。",
|
|
4249
|
-
batchEmpty: "添加一组参数开始批量生成",
|
|
4250
|
-
batchNoMatches: "当前状态没有参数组",
|
|
4251
|
-
batchFilter: "按生成状态筛选",
|
|
4252
|
-
batchAll: "全部",
|
|
4253
|
-
batchNextFailure: "下一失败项",
|
|
4254
|
-
batchNoInstance: "已完成,接入方未返回可打开的实例标识。",
|
|
4255
|
-
batchOpen: "打开报表实例",
|
|
4256
|
-
batchLimit: "当前最多支持 {count} 组参数。",
|
|
4257
|
-
batchChanged: "参数定义或执行配置已变更,已请求取消当前批次,请核对后重新生成。",
|
|
4258
|
-
batchPages: "参数组分页",
|
|
4259
|
-
batchPrevious: "上一页",
|
|
4260
|
-
batchNext: "下一页",
|
|
4261
|
-
batchPage: "第 {page}/{pages} 页 · 共 {total} 组"
|
|
4262
|
-
}, yr = {
|
|
4263
|
-
publicationChanged: "发布修订与目录不一致,请刷新目录后重新查看",
|
|
4264
|
-
continueDraft: "继续编辑草稿",
|
|
4265
|
-
viewPublished: "查看发布版",
|
|
4266
|
-
draft: "草稿",
|
|
4267
|
-
published: "已发布",
|
|
4268
|
-
draftPending: "草稿待发布",
|
|
4269
|
-
retrySearch: "重试目录查询",
|
|
4270
|
-
retryOpen: "重试打开模板",
|
|
4271
|
-
retryCopy: "重试创建副本",
|
|
4272
|
-
openingTarget: "正在打开 {name}…",
|
|
4273
|
-
creatingTarget: "正在创建 {name} 的副本…",
|
|
4274
|
-
title: "模板库",
|
|
4275
|
-
subtitle: "按业务分类查找、打开或复制模板",
|
|
4276
|
-
search: "搜索名称、编号或标签",
|
|
4277
|
-
all: "全部模板",
|
|
4278
|
-
refresh: "刷新",
|
|
4279
|
-
open: "打开设计器",
|
|
4280
|
-
copy: "复制模板",
|
|
4281
|
-
empty: "没有匹配的模板",
|
|
4282
|
-
emptyHint: "调整关键词或分类后重试",
|
|
4283
|
-
loadMore: "下一页",
|
|
4284
|
-
previous: "上一页",
|
|
4285
|
-
page: "页",
|
|
4286
|
-
loading: "正在加载…",
|
|
4287
|
-
retry: "重试",
|
|
4288
|
-
revision: "修订",
|
|
4289
|
-
copyTitle: "复制为新模板",
|
|
4290
|
-
newId: "新模板编号",
|
|
4291
|
-
newName: "新模板名称",
|
|
4292
|
-
create: "创建副本",
|
|
4293
|
-
cancel: "取消",
|
|
4294
|
-
count: "项",
|
|
4295
|
-
missing: "模板不存在或已不可访问",
|
|
4296
|
-
stale: "目录返回了重复项或无效分页游标",
|
|
4297
|
-
invalid: "模板目录响应格式无效"
|
|
4298
|
-
}, wr = Me(() => import("./TemplateReviewPanel-BKofGrV9.js")), Mr = Me(() => import("./ExcelBindingWizard-CeAf4QSE.js")), kr = Me(() => import("./RuleEditor-DzAmW5YH.js")), xr = Me(() => import("./ParamEditor-BLaE5q5W.js")), Cr = Me(() => import("./ReportBatchPanel-CW2HV9I8.js")), $r = Me(() => import("./ReportTemplateLibrary-BZB-XWjj.js"));
|
|
1
|
+
import "vue";
|
|
2
|
+
import { E as S, c as T, P as s, d as R, R as t, D as A, e as _, f as r, g as M, h as l, i as P, a as i, b as p, j as m, T as o, k as G, l as L, m as n, n as D } from "./designer-2bDlcNXQ.js";
|
|
4299
3
|
export {
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4
|
+
S as EXCEL_BINDING_MESSAGES,
|
|
5
|
+
T as ExcelBindingWizard,
|
|
6
|
+
s as PARAM_EDITOR_MESSAGES,
|
|
7
|
+
R as ParamEditor,
|
|
8
|
+
t as REPORT_BATCH_MESSAGES,
|
|
9
|
+
A as RULE_EDITOR_MESSAGES,
|
|
10
|
+
_ as ReportBatchPanel,
|
|
11
|
+
r as ReportTemplateEditor,
|
|
12
|
+
M as ReportTemplateLibrary,
|
|
13
|
+
l as RuleEditor,
|
|
14
|
+
P as TEMPLATE_EDITOR_MESSAGES,
|
|
15
|
+
i as TEMPLATE_LIBRARY_MESSAGES,
|
|
16
|
+
p as TEMPLATE_PRODUCT_MESSAGES,
|
|
17
|
+
m as TEMPLATE_RECOVERY_MESSAGES,
|
|
18
|
+
o as TEMPLATE_REVIEW_MESSAGES,
|
|
19
|
+
G as TemplateOutlinePanel,
|
|
20
|
+
L as TemplateReusePanel,
|
|
21
|
+
n as TemplateReviewPanel,
|
|
22
|
+
D as createTemplateDraftStorage
|
|
4314
23
|
};
|