@agile-team/mach-report 2.14.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 +16 -11
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/{ExcelBindingWizard-CvsWR8Ga.js → ExcelBindingWizard-BKH1nGNS.js} +3 -3
- package/dist/{ExcelBindingWizard-CLT2p7P3.cjs → ExcelBindingWizard-Bs43BGNp.cjs} +1 -1
- package/dist/ParamEditor-Da4akw6V.cjs +1 -0
- package/dist/ParamEditor-DoAhzJsm.js +594 -0
- package/dist/{ReportBatchPanel-LqVgiqp7.js → ReportBatchPanel-BMf6boMA.js} +39 -39
- package/dist/{ReportBatchPanel-DkxTzBkD.cjs → ReportBatchPanel-wP9m9Pj1.cjs} +1 -1
- package/dist/ReportPreview-ChV19HBp.js +4619 -0
- package/dist/ReportPreview-DbLvvOUT.cjs +6 -0
- package/dist/{ReportTemplateLibrary-MjWEtc7X.js → ReportTemplateLibrary-C9wutIiT.js} +1 -1
- package/dist/{ReportTemplateLibrary-cQ1sqNYo.cjs → ReportTemplateLibrary-Sxr3eD0J.cjs} +1 -1
- package/dist/{RuleEditor-ChuXMlei.js → RuleEditor-C_Clasvd.js} +5 -5
- package/dist/{RuleEditor-BaR6xUiI.cjs → RuleEditor-XhGHK8DE.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-Dci6aRn1.js → TemplateOutlinePanel-D6Bkny59.js} +2 -2
- package/dist/{TemplateOutlinePanel-BHKP89Xz.cjs → TemplateOutlinePanel-JTSR53vJ.cjs} +1 -1
- package/dist/{TemplateReusePanel-CY5eO2Sh.cjs → TemplateReusePanel-Kx35S0Ql.cjs} +1 -1
- package/dist/{TemplateReusePanel-B7Gmyc1z.js → TemplateReusePanel-rVuK1kTz.js} +2 -2
- package/dist/{TemplateReviewPanel-DjlX3xpt.js → TemplateReviewPanel-B0ar9_zf.js} +2 -2
- package/dist/{TemplateReviewPanel-JvZe9_4G.cjs → TemplateReviewPanel-Dn6X9UmY.cjs} +1 -1
- 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 -1
- package/dist/designer.d.cts +144 -16
- package/dist/designer.d.ts +144 -16
- package/dist/designer.js +1 -1
- package/dist/drill-ByJviLXS.js +145 -0
- package/dist/drill-DYTxuL3A.cjs +1 -0
- package/dist/{font-loader-vhCT8znW.cjs → font-loader-B_UkxpzC.cjs} +1 -1
- package/dist/{font-loader-DHto6Lra.js → font-loader-Q3bQjmrI.js} +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +785 -820
- 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-8UPQebOE.js → pdf-BwNyeGpt.js} +4385 -4321
- package/dist/{pdf-AyJGb22z.cjs → pdf-CvvrjPQg.cjs} +51 -49
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -3
- package/dist/pdf.d.ts +18 -3
- package/dist/pdf.js +2 -2
- package/dist/{plugin-BGKf-Tqg.js → plugin-Ca_XZG3l.js} +2 -2
- package/dist/{plugin-CktLH_Iy.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-By_UKZ2g.cjs +1 -0
- package/dist/record-bindings-Do_b3h4V.js +196 -0
- package/dist/{region-binding-workflow-DEJbhpCv.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 +20 -1
- package/dist/server/node.d.ts +20 -1
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +247 -237
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +772 -4
- package/dist/server.d.ts +772 -4
- package/dist/server.js +885 -645
- 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-CLkGo6To.js → template-fragments-BGbQLGlV.js} +21 -21
- package/dist/{template-fragments-DFUpq5QM.cjs → template-fragments-DcKeiylI.cjs} +1 -1
- package/dist/{template-outline-B3xVkzSv.cjs → template-outline-BwRV_eRo.cjs} +1 -1
- package/dist/{template-outline-CFenM1PV.js → template-outline-cnWfT_LK.js} +3 -3
- package/dist/{template-registry-COXDEJEM.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/vue/async.d.cts +123 -14
- package/dist/vue/async.d.ts +123 -14
- package/dist/vue/index.d.cts +158 -22
- package/dist/vue/index.d.ts +158 -22
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +80 -78
- package/dist/{workbook-session-DNa2RHNG.cjs → workbook-session-Bjv1YCRK.cjs} +18 -18
- package/dist/{workbook-session-BfK1yHOO.js → workbook-session-BvToI-Fd.js} +5440 -5288
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +20 -1
- package/dist/worker.d.ts +20 -1
- package/dist/worker.js +33 -32
- 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/ParamEditor-CflQV3eQ.js +0 -526
- package/dist/ParamEditor-vIDzvpPV.cjs +0 -1
- package/dist/ReportPreview-CvbqLUzM.cjs +0 -6
- package/dist/ReportPreview-D_ywJ_-H.js +0 -4533
- package/dist/assets-C2U-e-Sz.cjs +0 -4
- package/dist/assets-Q0wUwNrV.js +0 -217
- package/dist/batch-DzaTNLWI.js +0 -371
- package/dist/batch-xMkqYiTr.cjs +0 -1
- package/dist/capabilities-CK_7hizc.js +0 -63
- package/dist/capabilities-CsZ-pNHR.cjs +0 -1
- package/dist/config-0UIohTS7.cjs +0 -1
- package/dist/config-Dt9NtCPl.js +0 -566
- package/dist/data-explanation-BktvER5B.cjs +0 -1
- package/dist/data-explanation-C_J6jYNi.js +0 -16
- package/dist/designer-Ci1LizA9.js +0 -5020
- package/dist/designer-rtmVIIdN.cjs +0 -2
- package/dist/json-snapshot-BeFT3Tso.js +0 -1952
- package/dist/json-snapshot-D1NTP2oI.cjs +0 -2
- 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/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-bindings-BJR4k7qZ.cjs +0 -1
- package/dist/template-bindings-Daui7hLF.js +0 -252
- package/dist/template-registry-D3SjENi6.cjs +0 -1
- package/dist/validate-BJ5HIWY8.cjs +0 -1
- package/dist/validate-CkQBWCeg.js +0 -163
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
import { ref as T, computed as R, watch as Z, defineComponent as ee, getCurrentInstance as ae, openBlock as d, createElementBlock as u, unref as e, createElementVNode as n, toDisplayString as o, Fragment as C, renderList as A, normalizeClass as W, createCommentVNode as h, createTextVNode as k, withDirectives as V, mergeProps as I, vModelDynamic as H, vModelText as z, vModelCheckbox as G, vModelSelect as X, nextTick as te } from "vue";
|
|
2
|
+
import { validateReportParamDefinitions as le } from "@agile-team/mach-report";
|
|
3
|
+
import { P as ne, u as oe } from "./designer-2bDlcNXQ.js";
|
|
4
|
+
import { _ as re } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
const ie = ["text", "number", "date", "month", "year", "dateRange", "select"], se = { text: "string", number: "string → number", date: "YYYY-MM-DD", month: "YYYY-MM", year: "YYYY", dateRange: "YYYY-MM-DD/YYYY-MM-DD", select: "option.value" };
|
|
6
|
+
function de(a) {
|
|
7
|
+
if (a.startsWith("远程选项")) return ["optionsSource"];
|
|
8
|
+
if (a.startsWith("联动依赖")) return ["dependsOn"];
|
|
9
|
+
if (/^(默认值|必填参数的默认值)/.test(a)) return ["defaultValue"];
|
|
10
|
+
if (a.includes("参数名")) return ["field"];
|
|
11
|
+
if (a.includes("选项")) return ["options"];
|
|
12
|
+
if (a.startsWith("最小边界")) return ["min", "max"];
|
|
13
|
+
if (a.startsWith("最小长度")) return ["minLength", "maxLength"];
|
|
14
|
+
const b = /^(minLength|maxLength|min|max) /.exec(a)?.[1];
|
|
15
|
+
return b ? [b] : ["type"];
|
|
16
|
+
}
|
|
17
|
+
function ue(a) {
|
|
18
|
+
return JSON.parse(JSON.stringify(a));
|
|
19
|
+
}
|
|
20
|
+
function K(a) {
|
|
21
|
+
return {
|
|
22
|
+
field: a.field,
|
|
23
|
+
label: a.label ?? "",
|
|
24
|
+
type: a.type ?? "text",
|
|
25
|
+
required: a.required === !0,
|
|
26
|
+
placeholder: a.placeholder ?? "",
|
|
27
|
+
defaultEnabled: a.defaultValue !== void 0,
|
|
28
|
+
defaultValue: a.defaultValue ?? "",
|
|
29
|
+
min: a.min === void 0 ? "" : String(a.min),
|
|
30
|
+
max: a.max === void 0 ? "" : String(a.max),
|
|
31
|
+
minLength: a.minLength === void 0 ? "" : String(a.minLength),
|
|
32
|
+
maxLength: a.maxLength === void 0 ? "" : String(a.maxLength),
|
|
33
|
+
options: a.options ? a.options.map((b) => ({ ...b })) : [],
|
|
34
|
+
optionsMode: a.optionsSource === void 0 ? "static" : "remote",
|
|
35
|
+
optionsSource: a.optionsSource ?? "",
|
|
36
|
+
dependsOn: [...a.dependsOn ?? []]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function me(a) {
|
|
40
|
+
const b = { field: a.field, type: a.type };
|
|
41
|
+
a.label && (b.label = a.label), a.placeholder && (b.placeholder = a.placeholder), a.required && (b.required = !0), a.defaultEnabled && (b.defaultValue = a.defaultValue);
|
|
42
|
+
for (const _ of ["min", "max"])
|
|
43
|
+
a[_] !== "" && (b[_] = a.type === "number" ? Number(a[_]) : a[_]);
|
|
44
|
+
for (const _ of ["minLength", "maxLength"]) a[_] !== "" && (b[_] = Number(a[_]));
|
|
45
|
+
return a.type === "select" && a.optionsMode === "remote" ? (b.optionsSource = a.optionsSource.trim(), a.dependsOn.length && (b.dependsOn = [...a.dependsOn])) : a.type === "select" && (b.options = a.options.map((_) => ({ ..._ }))), b;
|
|
46
|
+
}
|
|
47
|
+
function pe(a) {
|
|
48
|
+
const b = () => JSON.stringify(a.document.template.params ?? []), _ = T(b()), c = T((a.document.template.params ?? []).map(K)), M = T(0), s = T(""), l = R(() => ({ ...ne, ...a.messages })), D = R(() => c.value.map(me)), g = T(JSON.stringify(c.value)), i = R(() => JSON.stringify(c.value) !== g.value), E = R(() => b() !== _.value), $ = R(() => le(D.value)), Y = R(() => {
|
|
49
|
+
const p = /* @__PURE__ */ new Map();
|
|
50
|
+
for (const v of $.value) {
|
|
51
|
+
const y = Number(v.path.split(".").at(-1)), L = p.get(y) ?? [];
|
|
52
|
+
L.push({ message: v.message, controls: de(v.message) }), p.set(y, L);
|
|
53
|
+
}
|
|
54
|
+
return p;
|
|
55
|
+
}), j = R(() => Y.value.keys().next().value), O = R(() => c.value[M.value]), U = R(() => $.value.filter((p) => p.path === `$.paramDefs.${M.value}`));
|
|
56
|
+
function w(p) {
|
|
57
|
+
return (Y.value.get(M.value) ?? []).filter((v) => v.controls.includes(p)).map((v) => v.message);
|
|
58
|
+
}
|
|
59
|
+
const J = R(() => {
|
|
60
|
+
const p = JSON.parse(_.value).map((y) => y.field), v = D.value.map((y) => y.field);
|
|
61
|
+
return { added: v.filter((y) => y && !p.includes(y)), removed: p.filter((y) => !v.includes(y)) };
|
|
62
|
+
});
|
|
63
|
+
function x() {
|
|
64
|
+
_.value = b(), c.value = (a.document.template.params ?? []).map(K), M.value = Math.min(M.value, Math.max(0, c.value.length - 1)), g.value = JSON.stringify(c.value), s.value = "";
|
|
65
|
+
}
|
|
66
|
+
Z(b, () => {
|
|
67
|
+
i.value || x();
|
|
68
|
+
});
|
|
69
|
+
function P() {
|
|
70
|
+
if (a.readonly) return;
|
|
71
|
+
let p = c.value.length + 1;
|
|
72
|
+
for (; c.value.some((v) => v.field === `param${p}`); ) p++;
|
|
73
|
+
c.value.push(K({ field: `param${p}`, type: "text" })), M.value = c.value.length - 1;
|
|
74
|
+
}
|
|
75
|
+
function F() {
|
|
76
|
+
a.readonly || !O.value || (c.value.splice(M.value, 1), M.value = Math.min(M.value, Math.max(0, c.value.length - 1)));
|
|
77
|
+
}
|
|
78
|
+
function B(p) {
|
|
79
|
+
const v = M.value + p;
|
|
80
|
+
if (a.readonly || v < 0 || v >= c.value.length) return;
|
|
81
|
+
const y = c.value.splice(M.value, 1)[0];
|
|
82
|
+
c.value.splice(v, 0, y), M.value = v;
|
|
83
|
+
}
|
|
84
|
+
function S(p) {
|
|
85
|
+
a.readonly || !O.value || (O.value.type = p, O.value.min = "", O.value.max = "", O.value.minLength = "", O.value.maxLength = "");
|
|
86
|
+
}
|
|
87
|
+
function q() {
|
|
88
|
+
if (a.readonly || E.value || $.value.length) return !1;
|
|
89
|
+
try {
|
|
90
|
+
return a.accept(ue(D.value)) ? (_.value = JSON.stringify(D.value), g.value = JSON.stringify(c.value), s.value = "", !0) : (s.value = l.value.paramApplyFailed, !1);
|
|
91
|
+
} catch (p) {
|
|
92
|
+
return s.value = p instanceof Error ? p.message : String(p), !1;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return oe({ key: () => "params", baseline: () => _.value, pending: () => i.value, snapshot: () => JSON.stringify({ rows: c.value, selected: M.value, initial: g.value }), restore(p, v) {
|
|
96
|
+
const y = JSON.parse(p);
|
|
97
|
+
if (!Array.isArray(y.rows) || y.rows.length > 1e3 || typeof y.initial != "string") throw new Error("Invalid parameter draft");
|
|
98
|
+
c.value = y.rows.map((L) => ({ ...L, optionsMode: L.optionsMode ?? "static", optionsSource: L.optionsSource ?? "", dependsOn: L.dependsOn ?? [] })), M.value = Math.max(0, Math.min(y.selected, y.rows.length - 1)), g.value = y.initial, _.value = v;
|
|
99
|
+
} }), { m: l, rows: c, selected: M, current: O, definitions: D, issues: $, issuesByRow: Y, firstIssueIndex: j, controlIssues: w, currentIssues: U, changes: J, pending: i, conflicted: E, error: s, reset: x, add: P, remove: F, move: B, setType: S, apply: q };
|
|
100
|
+
}
|
|
101
|
+
const ce = ["aria-label"], ye = { class: "mr-param-editor__directory" }, ve = ["aria-label"], be = ["aria-pressed", "aria-label", "onClick"], fe = { class: "mr-param-editor__directory-title" }, he = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "mr-param-editor__error-count",
|
|
104
|
+
"aria-hidden": "true"
|
|
105
|
+
}, ge = { key: 0 }, _e = ["disabled"], ke = {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: "mr-param-editor__validation",
|
|
108
|
+
role: "status"
|
|
109
|
+
}, Me = { class: "mr-param-editor__heading" }, Oe = { class: "mr-param-editor__grid" }, Se = ["aria-label", "disabled"], xe = ["id"], $e = ["aria-label", "disabled"], Ve = ["value", "aria-label", "disabled"], Ie = ["value"], Re = ["id"], De = ["aria-label", "disabled"], Le = { class: "mr-param-editor__checks" }, Ce = ["disabled"], Ee = ["disabled"], Ye = { class: "mr-param-editor__default-label" }, Ue = { class: "mr-param-editor__range" }, Ne = ["value", "aria-label", "disabled"], Ae = ["value", "aria-label", "disabled"], Te = { key: 1 }, Pe = ["aria-label", "disabled"], je = ["value"], Je = ["value", "aria-label", "type", "min", "max", "step", "disabled"], qe = ["id"], we = ["value", "aria-label", "type", "min", "max", "step", "disabled", "onInput"], Fe = ["id"], Be = ["value", "aria-label", "disabled", "onInput"], We = ["id"], He = {
|
|
110
|
+
key: 0,
|
|
111
|
+
class: "mr-param-editor__hint"
|
|
112
|
+
}, ze = {
|
|
113
|
+
key: 1,
|
|
114
|
+
class: "mr-param-editor__options"
|
|
115
|
+
}, Ge = ["aria-label", "disabled"], Ke = { value: "static" }, Qe = { value: "remote" }, Xe = ["aria-label", "disabled"], Ze = ["id"], ea = ["value", "disabled"], aa = ["id"], ta = { class: "mr-param-editor__hint" }, la = {
|
|
116
|
+
key: 2,
|
|
117
|
+
class: "mr-param-editor__options"
|
|
118
|
+
}, na = { class: "mr-param-editor__option-head" }, oa = ["onUpdate:modelValue", "aria-label", "disabled"], ra = ["onUpdate:modelValue", "aria-label", "disabled"], ia = ["aria-label", "disabled", "onClick"], sa = ["id"], da = ["disabled"], ua = { class: "mr-param-editor__row-actions" }, ma = ["disabled"], pa = ["disabled"], ca = ["disabled"], ya = { class: "mr-param-editor__technical" }, va = {
|
|
119
|
+
key: 2,
|
|
120
|
+
class: "mr-param-editor__empty"
|
|
121
|
+
}, ba = ["disabled"], fa = {
|
|
122
|
+
key: 3,
|
|
123
|
+
class: "mr-param-editor__impact"
|
|
124
|
+
}, ha = { key: 0 }, ga = { key: 1 }, _a = {
|
|
125
|
+
key: 4,
|
|
126
|
+
class: "mr-param-editor__errors",
|
|
127
|
+
role: "alert"
|
|
128
|
+
}, ka = ["disabled"], Ma = ["disabled"], Oa = /* @__PURE__ */ ee({
|
|
129
|
+
__name: "ParamEditor",
|
|
130
|
+
props: {
|
|
131
|
+
document: {},
|
|
132
|
+
readonly: { type: Boolean },
|
|
133
|
+
messages: {},
|
|
134
|
+
accept: { type: Function }
|
|
135
|
+
},
|
|
136
|
+
emits: ["dirty"],
|
|
137
|
+
setup(a, { expose: b, emit: _ }) {
|
|
138
|
+
const c = a, M = _, s = pe(c), { m: l, rows: D, selected: g, current: i, changes: E, pending: $, conflicted: Y, error: j, issues: O, issuesByRow: U } = s, w = R(() => {
|
|
139
|
+
const m = D.value.filter((r, t) => t !== g.value).map((r) => ({ field: r.field, label: r.label || r.field || l.value.paramUnnamed }));
|
|
140
|
+
for (const r of i.value?.dependsOn ?? []) m.some((t) => t.field === r) || m.push({ field: r, label: `${r} · ${l.value.paramDependencyUnavailable}` });
|
|
141
|
+
return m;
|
|
142
|
+
}), J = T(), x = `mr-param-${ae()?.uid ?? 0}`;
|
|
143
|
+
Z($, (m) => M("dirty", m), { immediate: !0 });
|
|
144
|
+
function P(m) {
|
|
145
|
+
return { text: l.value.paramText, number: l.value.paramNumber, date: l.value.paramDate, month: l.value.paramMonth, year: l.value.paramYear, dateRange: l.value.paramDateRange, select: l.value.paramSelect }[m];
|
|
146
|
+
}
|
|
147
|
+
function F() {
|
|
148
|
+
i.value && !c.readonly && i.value.options.push({ value: "", label: "" });
|
|
149
|
+
}
|
|
150
|
+
function B(m) {
|
|
151
|
+
c.readonly || i.value?.options.splice(m, 1);
|
|
152
|
+
}
|
|
153
|
+
function S(m) {
|
|
154
|
+
const r = s.controlIssues(m).length > 0;
|
|
155
|
+
return { "aria-invalid": r ? "true" : void 0, "aria-describedby": r ? `${x}-${g.value}-${m}` : void 0 };
|
|
156
|
+
}
|
|
157
|
+
function q(m) {
|
|
158
|
+
return m === "year" ? "number" : m === "dateRange" ? "date" : ["date", "month", "number"].includes(m) ? m : "text";
|
|
159
|
+
}
|
|
160
|
+
function p(m) {
|
|
161
|
+
return m.target.value;
|
|
162
|
+
}
|
|
163
|
+
function v(m, r) {
|
|
164
|
+
i.value && !c.readonly && (i.value[m] = p(r));
|
|
165
|
+
}
|
|
166
|
+
function y(m) {
|
|
167
|
+
return i.value?.defaultValue.split("/")[m] ?? "";
|
|
168
|
+
}
|
|
169
|
+
function L(m, r) {
|
|
170
|
+
if (!i.value || c.readonly) return;
|
|
171
|
+
const t = [y(0), y(1)];
|
|
172
|
+
t[m] = p(r), i.value.defaultValue = t.some(Boolean) ? t.join("/") : "";
|
|
173
|
+
}
|
|
174
|
+
async function Q() {
|
|
175
|
+
const m = s.firstIssueIndex.value;
|
|
176
|
+
if (m === void 0) return;
|
|
177
|
+
g.value = m, await te();
|
|
178
|
+
const r = J.value?.querySelector('[aria-invalid="true"]');
|
|
179
|
+
r?.focus({ preventScroll: !0 }), r?.scrollIntoView?.({ block: "nearest" });
|
|
180
|
+
}
|
|
181
|
+
return b({ pending: $, reset: s.reset, apply: s.apply, locateIssue: Q }), (m, r) => (d(), u("section", {
|
|
182
|
+
class: "mr-param-editor",
|
|
183
|
+
"aria-label": e(l).paramsTool
|
|
184
|
+
}, [
|
|
185
|
+
n("aside", ye, [
|
|
186
|
+
n("header", null, [
|
|
187
|
+
n("strong", null, o(e(l).paramsDirectory), 1),
|
|
188
|
+
n("span", null, o(e(D).length), 1)
|
|
189
|
+
]),
|
|
190
|
+
n("nav", {
|
|
191
|
+
"aria-label": e(l).paramsDirectory
|
|
192
|
+
}, [
|
|
193
|
+
(d(!0), u(C, null, A(e(D), (t, f) => (d(), u("button", {
|
|
194
|
+
key: f,
|
|
195
|
+
type: "button",
|
|
196
|
+
"aria-pressed": e(g) === f,
|
|
197
|
+
"aria-label": `${t.label || t.field || e(l).paramUnnamed}${e(U).get(f)?.length ? ` · ${e(l).paramIssueCount} ${e(U).get(f)?.length}` : ""}`,
|
|
198
|
+
class: W({ "has-errors": e(U).has(f) }),
|
|
199
|
+
onClick: (N) => g.value = f
|
|
200
|
+
}, [
|
|
201
|
+
n("span", fe, [
|
|
202
|
+
n("strong", null, o(t.label || t.field || e(l).paramUnnamed), 1),
|
|
203
|
+
e(U).has(f) ? (d(), u("span", he, o(e(U).get(f)?.length), 1)) : h("", !0)
|
|
204
|
+
]),
|
|
205
|
+
n("small", null, [
|
|
206
|
+
k(o(t.field) + " · " + o(P(t.type)), 1),
|
|
207
|
+
t.required ? (d(), u("span", ge, " *")) : h("", !0)
|
|
208
|
+
])
|
|
209
|
+
], 10, be))), 128))
|
|
210
|
+
], 8, ve),
|
|
211
|
+
n("button", {
|
|
212
|
+
type: "button",
|
|
213
|
+
class: "mr-param-editor__add",
|
|
214
|
+
disabled: a.readonly,
|
|
215
|
+
onClick: r[0] || (r[0] = //@ts-ignore
|
|
216
|
+
(...t) => e(s).add && e(s).add(...t))
|
|
217
|
+
}, "+ " + o(e(l).paramAdd), 9, _e),
|
|
218
|
+
n("p", null, o(e(l).paramsDescription), 1)
|
|
219
|
+
]),
|
|
220
|
+
n("div", {
|
|
221
|
+
ref_key: "main",
|
|
222
|
+
ref: J,
|
|
223
|
+
class: "mr-param-editor__main"
|
|
224
|
+
}, [
|
|
225
|
+
e(O).length ? (d(), u("div", ke, [
|
|
226
|
+
n("span", null, [
|
|
227
|
+
k(o(e(l).paramIssueCount) + " ", 1),
|
|
228
|
+
n("strong", null, o(e(O).length), 1)
|
|
229
|
+
]),
|
|
230
|
+
n("button", {
|
|
231
|
+
type: "button",
|
|
232
|
+
onClick: Q
|
|
233
|
+
}, o(e(l).paramLocateFirst), 1)
|
|
234
|
+
])) : h("", !0),
|
|
235
|
+
e(i) ? (d(), u(C, { key: 1 }, [
|
|
236
|
+
n("header", Me, [
|
|
237
|
+
n("div", null, [
|
|
238
|
+
n("strong", null, o(e(i).label || e(i).field || e(l).paramUnnamed), 1),
|
|
239
|
+
n("small", null, o(P(e(i).type)), 1)
|
|
240
|
+
]),
|
|
241
|
+
n("span", {
|
|
242
|
+
class: W({ "is-pending": e($) || e(O).length > 0 })
|
|
243
|
+
}, o(e(O).length ? e(l).paramInvalid : e($) ? e(l).paramPending : e(l).paramReady), 3)
|
|
244
|
+
]),
|
|
245
|
+
n("div", Oe, [
|
|
246
|
+
n("label", null, [
|
|
247
|
+
k(o(e(l).paramField), 1),
|
|
248
|
+
V(n("input", I({
|
|
249
|
+
"onUpdate:modelValue": r[1] || (r[1] = (t) => e(i).field = t),
|
|
250
|
+
"aria-label": e(l).paramField,
|
|
251
|
+
disabled: a.readonly,
|
|
252
|
+
autocomplete: "off"
|
|
253
|
+
}, S("field")), null, 16, Se), [
|
|
254
|
+
[H, e(i).field]
|
|
255
|
+
]),
|
|
256
|
+
e(s).controlIssues("field").length ? (d(), u("small", {
|
|
257
|
+
key: 0,
|
|
258
|
+
id: `${x}-${e(g)}-field`,
|
|
259
|
+
class: "mr-param-editor__field-error"
|
|
260
|
+
}, o(e(s).controlIssues("field").join(";")), 9, xe)) : h("", !0)
|
|
261
|
+
]),
|
|
262
|
+
n("label", null, [
|
|
263
|
+
k(o(e(l).paramLabel), 1),
|
|
264
|
+
V(n("input", {
|
|
265
|
+
"onUpdate:modelValue": r[2] || (r[2] = (t) => e(i).label = t),
|
|
266
|
+
"aria-label": e(l).paramLabel,
|
|
267
|
+
disabled: a.readonly
|
|
268
|
+
}, null, 8, $e), [
|
|
269
|
+
[z, e(i).label]
|
|
270
|
+
])
|
|
271
|
+
]),
|
|
272
|
+
n("label", null, [
|
|
273
|
+
k(o(e(l).paramType), 1),
|
|
274
|
+
n("select", I({
|
|
275
|
+
value: e(i).type,
|
|
276
|
+
"aria-label": e(l).paramType,
|
|
277
|
+
disabled: a.readonly
|
|
278
|
+
}, S("type"), {
|
|
279
|
+
onChange: r[3] || (r[3] = (t) => e(s).setType(t.target.value))
|
|
280
|
+
}), [
|
|
281
|
+
(d(!0), u(C, null, A(e(ie), (t) => (d(), u("option", {
|
|
282
|
+
key: t,
|
|
283
|
+
value: t
|
|
284
|
+
}, o(P(t)), 9, Ie))), 128))
|
|
285
|
+
], 16, Ve),
|
|
286
|
+
e(s).controlIssues("type").length ? (d(), u("small", {
|
|
287
|
+
key: 0,
|
|
288
|
+
id: `${x}-${e(g)}-type`,
|
|
289
|
+
class: "mr-param-editor__field-error"
|
|
290
|
+
}, o(e(s).controlIssues("type").join(";")), 9, Re)) : h("", !0)
|
|
291
|
+
]),
|
|
292
|
+
n("label", null, [
|
|
293
|
+
k(o(e(l).paramPlaceholder), 1),
|
|
294
|
+
V(n("input", {
|
|
295
|
+
"onUpdate:modelValue": r[4] || (r[4] = (t) => e(i).placeholder = t),
|
|
296
|
+
"aria-label": e(l).paramPlaceholder,
|
|
297
|
+
disabled: a.readonly
|
|
298
|
+
}, null, 8, De), [
|
|
299
|
+
[z, e(i).placeholder]
|
|
300
|
+
])
|
|
301
|
+
]),
|
|
302
|
+
n("div", Le, [
|
|
303
|
+
n("label", null, [
|
|
304
|
+
V(n("input", {
|
|
305
|
+
"onUpdate:modelValue": r[5] || (r[5] = (t) => e(i).required = t),
|
|
306
|
+
type: "checkbox",
|
|
307
|
+
disabled: a.readonly
|
|
308
|
+
}, null, 8, Ce), [
|
|
309
|
+
[G, e(i).required]
|
|
310
|
+
]),
|
|
311
|
+
k(o(e(l).paramRequired), 1)
|
|
312
|
+
]),
|
|
313
|
+
n("label", null, [
|
|
314
|
+
V(n("input", {
|
|
315
|
+
"onUpdate:modelValue": r[6] || (r[6] = (t) => e(i).defaultEnabled = t),
|
|
316
|
+
type: "checkbox",
|
|
317
|
+
disabled: a.readonly
|
|
318
|
+
}, null, 8, Ee), [
|
|
319
|
+
[G, e(i).defaultEnabled]
|
|
320
|
+
]),
|
|
321
|
+
k(o(e(l).paramDefaultEnabled), 1)
|
|
322
|
+
])
|
|
323
|
+
]),
|
|
324
|
+
e(i).defaultEnabled ? (d(), u("div", {
|
|
325
|
+
key: 0,
|
|
326
|
+
class: W(["mr-param-editor__default", { "is-range": e(i).type === "dateRange" }])
|
|
327
|
+
}, [
|
|
328
|
+
e(i).type === "dateRange" ? (d(), u(C, { key: 0 }, [
|
|
329
|
+
n("span", Ye, o(e(l).paramDefault), 1),
|
|
330
|
+
n("div", Ue, [
|
|
331
|
+
n("label", null, [
|
|
332
|
+
k(o(e(l).paramRangeStart), 1),
|
|
333
|
+
n("input", I({
|
|
334
|
+
value: y(0),
|
|
335
|
+
type: "date",
|
|
336
|
+
"aria-label": e(l).paramRangeStart,
|
|
337
|
+
disabled: a.readonly
|
|
338
|
+
}, S("defaultValue"), {
|
|
339
|
+
onInput: r[7] || (r[7] = (t) => L(0, t))
|
|
340
|
+
}), null, 16, Ne)
|
|
341
|
+
]),
|
|
342
|
+
r[20] || (r[20] = n("span", { "aria-hidden": "true" }, "—", -1)),
|
|
343
|
+
n("label", null, [
|
|
344
|
+
k(o(e(l).paramRangeEnd), 1),
|
|
345
|
+
n("input", I({
|
|
346
|
+
value: y(1),
|
|
347
|
+
type: "date",
|
|
348
|
+
"aria-label": e(l).paramRangeEnd,
|
|
349
|
+
disabled: a.readonly
|
|
350
|
+
}, S("defaultValue"), {
|
|
351
|
+
onInput: r[8] || (r[8] = (t) => L(1, t))
|
|
352
|
+
}), null, 16, Ae)
|
|
353
|
+
])
|
|
354
|
+
])
|
|
355
|
+
], 64)) : (d(), u("label", Te, [
|
|
356
|
+
k(o(e(l).paramDefault), 1),
|
|
357
|
+
e(i).type === "select" && e(i).optionsMode !== "remote" ? V((d(), u("select", I({
|
|
358
|
+
key: 0,
|
|
359
|
+
"onUpdate:modelValue": r[9] || (r[9] = (t) => e(i).defaultValue = t),
|
|
360
|
+
"aria-label": e(l).paramDefault,
|
|
361
|
+
disabled: a.readonly
|
|
362
|
+
}, S("defaultValue")), [
|
|
363
|
+
r[21] || (r[21] = n("option", { value: "" }, null, -1)),
|
|
364
|
+
(d(!0), u(C, null, A(e(i).options, (t, f) => (d(), u("option", {
|
|
365
|
+
key: f,
|
|
366
|
+
value: t.value
|
|
367
|
+
}, o(t.label || t.value), 9, je))), 128))
|
|
368
|
+
], 16, Pe)), [
|
|
369
|
+
[X, e(i).defaultValue]
|
|
370
|
+
]) : (d(), u("input", I({
|
|
371
|
+
key: 1,
|
|
372
|
+
value: e(i).defaultValue,
|
|
373
|
+
"aria-label": e(l).paramDefault,
|
|
374
|
+
type: q(e(i).type),
|
|
375
|
+
min: e(i).type === "year" ? 1 : void 0,
|
|
376
|
+
max: e(i).type === "year" ? 9999 : void 0,
|
|
377
|
+
step: e(i).type === "year" ? 1 : "any",
|
|
378
|
+
disabled: a.readonly
|
|
379
|
+
}, S("defaultValue"), {
|
|
380
|
+
onInput: r[10] || (r[10] = (t) => v("defaultValue", t))
|
|
381
|
+
}), null, 16, Je))
|
|
382
|
+
])),
|
|
383
|
+
e(s).controlIssues("defaultValue").length ? (d(), u("small", {
|
|
384
|
+
key: 2,
|
|
385
|
+
id: `${x}-${e(g)}-defaultValue`,
|
|
386
|
+
class: "mr-param-editor__field-error mr-param-editor__errors",
|
|
387
|
+
role: "alert"
|
|
388
|
+
}, o(e(s).controlIssues("defaultValue").join(";")), 9, qe)) : h("", !0)
|
|
389
|
+
], 2)) : h("", !0),
|
|
390
|
+
["number", "date", "month", "year", "dateRange"].includes(e(i).type) ? (d(), u(C, { key: 1 }, A(["min", "max"], (t) => n("label", { key: t }, [
|
|
391
|
+
k(o(t === "min" ? e(l).paramMinimum : e(l).paramMaximum), 1),
|
|
392
|
+
n("input", I({
|
|
393
|
+
value: e(i)[t],
|
|
394
|
+
"aria-label": t === "min" ? e(l).paramMinimum : e(l).paramMaximum,
|
|
395
|
+
type: q(e(i).type),
|
|
396
|
+
min: e(i).type === "year" ? 1 : void 0,
|
|
397
|
+
max: e(i).type === "year" ? 9999 : void 0,
|
|
398
|
+
step: e(i).type === "year" ? 1 : "any",
|
|
399
|
+
disabled: a.readonly
|
|
400
|
+
}, { ref_for: !0 }, S(t), {
|
|
401
|
+
onInput: (f) => v(t, f)
|
|
402
|
+
}), null, 16, we),
|
|
403
|
+
e(s).controlIssues(t).length ? (d(), u("small", {
|
|
404
|
+
key: 0,
|
|
405
|
+
id: `${x}-${e(g)}-${t}`,
|
|
406
|
+
class: "mr-param-editor__field-error"
|
|
407
|
+
}, o(e(s).controlIssues(t).join(";")), 9, Fe)) : h("", !0)
|
|
408
|
+
])), 64)) : h("", !0),
|
|
409
|
+
e(i).type === "text" ? (d(), u(C, { key: 2 }, A(["minLength", "maxLength"], (t) => n("label", { key: t }, [
|
|
410
|
+
k(o(t === "minLength" ? e(l).paramMinLength : e(l).paramMaxLength), 1),
|
|
411
|
+
n("input", I({
|
|
412
|
+
value: e(i)[t],
|
|
413
|
+
type: "number",
|
|
414
|
+
min: "0",
|
|
415
|
+
step: "1",
|
|
416
|
+
"aria-label": t === "minLength" ? e(l).paramMinLength : e(l).paramMaxLength,
|
|
417
|
+
disabled: a.readonly
|
|
418
|
+
}, { ref_for: !0 }, S(t), {
|
|
419
|
+
onInput: (f) => v(t, f)
|
|
420
|
+
}), null, 16, Be),
|
|
421
|
+
e(s).controlIssues(t).length ? (d(), u("small", {
|
|
422
|
+
key: 0,
|
|
423
|
+
id: `${x}-${e(g)}-${t}`,
|
|
424
|
+
class: "mr-param-editor__field-error"
|
|
425
|
+
}, o(e(s).controlIssues(t).join(";")), 9, We)) : h("", !0)
|
|
426
|
+
])), 64)) : h("", !0)
|
|
427
|
+
]),
|
|
428
|
+
e(i).type === "dateRange" ? (d(), u("p", He, o(e(l).paramRangeHint), 1)) : h("", !0),
|
|
429
|
+
e(i).type === "select" ? (d(), u("fieldset", ze, [
|
|
430
|
+
n("legend", null, o(e(l).paramOptionsMode), 1),
|
|
431
|
+
n("label", null, [
|
|
432
|
+
k(o(e(l).paramOptionsMode), 1),
|
|
433
|
+
V(n("select", {
|
|
434
|
+
"onUpdate:modelValue": r[11] || (r[11] = (t) => e(i).optionsMode = t),
|
|
435
|
+
"aria-label": e(l).paramOptionsMode,
|
|
436
|
+
disabled: a.readonly
|
|
437
|
+
}, [
|
|
438
|
+
n("option", Ke, o(e(l).paramOptionsStatic), 1),
|
|
439
|
+
n("option", Qe, o(e(l).paramOptionsRemote), 1)
|
|
440
|
+
], 8, Ge), [
|
|
441
|
+
[X, e(i).optionsMode]
|
|
442
|
+
])
|
|
443
|
+
]),
|
|
444
|
+
e(i).optionsMode === "remote" ? (d(), u(C, { key: 0 }, [
|
|
445
|
+
n("label", null, [
|
|
446
|
+
k(o(e(l).paramOptionsSource), 1),
|
|
447
|
+
V(n("input", I({
|
|
448
|
+
"onUpdate:modelValue": r[12] || (r[12] = (t) => e(i).optionsSource = t),
|
|
449
|
+
"aria-label": e(l).paramOptionsSource,
|
|
450
|
+
disabled: a.readonly
|
|
451
|
+
}, S("optionsSource")), null, 16, Xe), [
|
|
452
|
+
[H, e(i).optionsSource]
|
|
453
|
+
])
|
|
454
|
+
]),
|
|
455
|
+
e(s).controlIssues("optionsSource").length ? (d(), u("small", {
|
|
456
|
+
key: 0,
|
|
457
|
+
id: `${x}-${e(g)}-optionsSource`,
|
|
458
|
+
class: "mr-param-editor__field-error"
|
|
459
|
+
}, o(e(s).controlIssues("optionsSource").join(";")), 9, Ze)) : h("", !0),
|
|
460
|
+
n("fieldset", I({
|
|
461
|
+
class: "mr-param-editor__dependencies",
|
|
462
|
+
tabindex: "-1"
|
|
463
|
+
}, S("dependsOn")), [
|
|
464
|
+
n("legend", null, o(e(l).paramDependencies), 1),
|
|
465
|
+
(d(!0), u(C, null, A(w.value, (t, f) => (d(), u("label", { key: f }, [
|
|
466
|
+
V(n("input", {
|
|
467
|
+
"onUpdate:modelValue": r[13] || (r[13] = (N) => e(i).dependsOn = N),
|
|
468
|
+
type: "checkbox",
|
|
469
|
+
value: t.field,
|
|
470
|
+
disabled: a.readonly
|
|
471
|
+
}, null, 8, ea), [
|
|
472
|
+
[G, e(i).dependsOn]
|
|
473
|
+
]),
|
|
474
|
+
k(o(t.label), 1)
|
|
475
|
+
]))), 128))
|
|
476
|
+
], 16),
|
|
477
|
+
e(s).controlIssues("dependsOn").length ? (d(), u("small", {
|
|
478
|
+
key: 1,
|
|
479
|
+
id: `${x}-${e(g)}-dependsOn`,
|
|
480
|
+
class: "mr-param-editor__field-error"
|
|
481
|
+
}, o(e(s).controlIssues("dependsOn").join(";")), 9, aa)) : h("", !0),
|
|
482
|
+
n("p", ta, o(e(l).paramRemoteHint), 1)
|
|
483
|
+
], 64)) : h("", !0)
|
|
484
|
+
])) : h("", !0),
|
|
485
|
+
e(i).type === "select" && e(i).optionsMode === "static" ? (d(), u("fieldset", la, [
|
|
486
|
+
n("legend", null, o(e(l).paramOptions), 1),
|
|
487
|
+
n("div", na, [
|
|
488
|
+
n("span", null, o(e(l).paramOptionValue), 1),
|
|
489
|
+
n("span", null, o(e(l).paramOptionLabel), 1)
|
|
490
|
+
]),
|
|
491
|
+
(d(!0), u(C, null, A(e(i).options, (t, f) => (d(), u("div", {
|
|
492
|
+
key: f,
|
|
493
|
+
class: "mr-param-editor__option"
|
|
494
|
+
}, [
|
|
495
|
+
V(n("input", I({
|
|
496
|
+
"onUpdate:modelValue": (N) => t.value = N,
|
|
497
|
+
"aria-label": `${e(l).paramOptionValue} ${f + 1}`,
|
|
498
|
+
disabled: a.readonly
|
|
499
|
+
}, { ref_for: !0 }, S("options")), null, 16, oa), [
|
|
500
|
+
[H, t.value]
|
|
501
|
+
]),
|
|
502
|
+
V(n("input", {
|
|
503
|
+
"onUpdate:modelValue": (N) => t.label = N,
|
|
504
|
+
"aria-label": `${e(l).paramOptionLabel} ${f + 1}`,
|
|
505
|
+
disabled: a.readonly
|
|
506
|
+
}, null, 8, ra), [
|
|
507
|
+
[z, t.label]
|
|
508
|
+
]),
|
|
509
|
+
n("button", {
|
|
510
|
+
type: "button",
|
|
511
|
+
"aria-label": `${e(l).paramOptionRemove} ${f + 1}`,
|
|
512
|
+
disabled: a.readonly,
|
|
513
|
+
onClick: (N) => B(f)
|
|
514
|
+
}, "×", 8, ia)
|
|
515
|
+
]))), 128)),
|
|
516
|
+
e(s).controlIssues("options").length ? (d(), u("small", {
|
|
517
|
+
key: 0,
|
|
518
|
+
id: `${x}-${e(g)}-options`,
|
|
519
|
+
class: "mr-param-editor__field-error"
|
|
520
|
+
}, o(e(s).controlIssues("options").join(";")), 9, sa)) : h("", !0),
|
|
521
|
+
n("button", {
|
|
522
|
+
type: "button",
|
|
523
|
+
disabled: a.readonly,
|
|
524
|
+
onClick: F
|
|
525
|
+
}, "+ " + o(e(l).paramOptionAdd), 9, da)
|
|
526
|
+
])) : h("", !0),
|
|
527
|
+
n("div", ua, [
|
|
528
|
+
n("button", {
|
|
529
|
+
type: "button",
|
|
530
|
+
disabled: a.readonly || e(g) === 0,
|
|
531
|
+
onClick: r[14] || (r[14] = (t) => e(s).move(-1))
|
|
532
|
+
}, "↑ " + o(e(l).paramMoveUp), 9, ma),
|
|
533
|
+
n("button", {
|
|
534
|
+
type: "button",
|
|
535
|
+
disabled: a.readonly || e(g) === e(D).length - 1,
|
|
536
|
+
onClick: r[15] || (r[15] = (t) => e(s).move(1))
|
|
537
|
+
}, "↓ " + o(e(l).paramMoveDown), 9, pa),
|
|
538
|
+
n("button", {
|
|
539
|
+
type: "button",
|
|
540
|
+
class: "is-danger",
|
|
541
|
+
disabled: a.readonly,
|
|
542
|
+
onClick: r[16] || (r[16] = //@ts-ignore
|
|
543
|
+
(...t) => e(s).remove && e(s).remove(...t))
|
|
544
|
+
}, o(e(l).paramRemove), 9, ca)
|
|
545
|
+
]),
|
|
546
|
+
n("details", ya, [
|
|
547
|
+
n("summary", null, o(e(l).paramWire), 1),
|
|
548
|
+
n("code", null, o(e(se)[e(i).type]), 1)
|
|
549
|
+
])
|
|
550
|
+
], 64)) : (d(), u("div", va, [
|
|
551
|
+
n("strong", null, o(e(l).paramEmpty), 1),
|
|
552
|
+
n("p", null, o(e(l).paramEmptyHint), 1),
|
|
553
|
+
n("button", {
|
|
554
|
+
type: "button",
|
|
555
|
+
disabled: a.readonly,
|
|
556
|
+
onClick: r[17] || (r[17] = //@ts-ignore
|
|
557
|
+
(...t) => e(s).add && e(s).add(...t))
|
|
558
|
+
}, "+ " + o(e(l).paramAdd), 9, ba)
|
|
559
|
+
])),
|
|
560
|
+
e(E).added.length || e(E).removed.length ? (d(), u("aside", fa, [
|
|
561
|
+
n("strong", null, o(e(l).paramChanges), 1),
|
|
562
|
+
e(E).added.length ? (d(), u("p", ha, [
|
|
563
|
+
k(o(e(l).paramAdded) + ":", 1),
|
|
564
|
+
n("code", null, o(e(E).added.join(", ")), 1)
|
|
565
|
+
])) : h("", !0),
|
|
566
|
+
e(E).removed.length ? (d(), u("p", ga, [
|
|
567
|
+
k(o(e(l).paramRemoved) + ":", 1),
|
|
568
|
+
n("code", null, o(e(E).removed.join(", ")), 1)
|
|
569
|
+
])) : h("", !0),
|
|
570
|
+
n("small", null, o(e(l).paramRenameHint), 1)
|
|
571
|
+
])) : h("", !0),
|
|
572
|
+
e(Y) || e(j) ? (d(), u("p", _a, o(e(Y) ? e(l).paramConflict : e(j)), 1)) : h("", !0),
|
|
573
|
+
n("footer", null, [
|
|
574
|
+
n("button", {
|
|
575
|
+
type: "button",
|
|
576
|
+
disabled: !e($) && !e(Y),
|
|
577
|
+
onClick: r[18] || (r[18] = //@ts-ignore
|
|
578
|
+
(...t) => e(s).reset && e(s).reset(...t))
|
|
579
|
+
}, o(e(l).paramRestore), 9, ka),
|
|
580
|
+
n("button", {
|
|
581
|
+
type: "button",
|
|
582
|
+
class: "is-primary",
|
|
583
|
+
disabled: a.readonly || !e($) || e(Y) || !!e(O).length,
|
|
584
|
+
onClick: r[19] || (r[19] = //@ts-ignore
|
|
585
|
+
(...t) => e(s).apply && e(s).apply(...t))
|
|
586
|
+
}, o(e(l).paramApply), 9, Ma)
|
|
587
|
+
])
|
|
588
|
+
], 512)
|
|
589
|
+
], 8, ce));
|
|
590
|
+
}
|
|
591
|
+
}), Ia = /* @__PURE__ */ re(Oa, [["__scopeId", "data-v-b005b287"]]);
|
|
592
|
+
export {
|
|
593
|
+
Ia as default
|
|
594
|
+
};
|