@agile-team/mach-report 2.23.0 → 2.24.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 +9 -2
- package/dist/ExcelBindingWizard-BV12hGiK.cjs +1 -0
- package/dist/ExcelBindingWizard-Cy_lPjWV.js +1486 -0
- package/dist/ParamEditor-DenKjvKu.cjs +1 -0
- package/dist/ParamEditor-PyOqHzzw.js +750 -0
- package/dist/ReportBatchPanel-8EFtMrKk.js +351 -0
- package/dist/ReportBatchPanel-pQ6d0yqJ.cjs +1 -0
- package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
- package/dist/ReportLabelStudio-HUeo2TsU.js +784 -0
- package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
- package/dist/{ReportParamPanel-Dgmqro1Y.js → ReportParamPanel-DA-YpkvC.js} +342 -307
- package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
- package/dist/ReportPreview-_wTJnsG1.js +7120 -0
- package/dist/ReportTemplateLibrary-CjArKxRG.cjs +1 -0
- package/dist/ReportTemplateLibrary-DH8jl9IF.js +312 -0
- package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
- package/dist/RuleEditor-GDydlEHz.js +2354 -0
- package/dist/TemplateOutlinePanel-B554_qk1.cjs +1 -0
- package/dist/TemplateOutlinePanel-DjPqzU9h.js +97 -0
- package/dist/TemplateReusePanel-D0628OYc.cjs +1 -0
- package/dist/TemplateReusePanel-DtYbCN7U.js +389 -0
- package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
- package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
- package/dist/artifact-integrity.json +94 -94
- package/dist/assets-B4AJIOTB.cjs +1 -0
- package/dist/assets-D0FbszhB.js +137 -0
- package/dist/{auto-CTIJ6PnR.js → auto-BksreoKc.js} +5 -5
- package/dist/auto-C3mGqzJ8.cjs +1 -0
- package/dist/capabilities-CTwlcl8q.cjs +1 -0
- package/dist/capabilities-lqDEZSq5.js +121 -0
- package/dist/data-bar-2NLRzOCQ.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
- package/dist/designer-BNf7NWd6.js +7589 -0
- package/dist/designer-DWnZZ_ej.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -4
- package/dist/designer.d.ts +144 -4
- package/dist/designer.js +6 -6
- package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
- package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
- package/dist/dom-CxOkm_Sy.cjs +1 -0
- package/dist/{encoding-BefcaHdp.cjs → encoding-CkziAnZI.cjs} +1 -1
- package/dist/{encoding-CL6rXEkR.js → encoding-DSc9zv2F.js} +2 -2
- package/dist/{font-loader-Ga51c2VC.cjs → font-loader-D-znWNWS.cjs} +1 -1
- package/dist/{font-loader-BT5baV-o.js → font-loader-i7lZbqH_.js} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
- package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +69 -68
- package/dist/{json-snapshot-OqkPyUk5.js → json-snapshot-BJWZNryO.js} +919 -791
- package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
- package/dist/{pdf-aobetCsy.js → pdf-0_5XiTCx.js} +2499 -2492
- package/dist/{pdf-HiEeXe9H.cjs → pdf-DWuq6uxx.cjs} +31 -31
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-DeYYAL6F.js → plugin-B1ydqEmS.js} +1 -1
- package/dist/{plugin-BFANt-i8.cjs → plugin-BQBz2vLG.cjs} +1 -1
- package/dist/prefill-2p9wrpn9.cjs +1 -0
- package/dist/{prefill-Dk4C6S5R.js → prefill-Cuzh1wxf.js} +13 -13
- package/dist/prepared-CVbgO9KR.js +128 -0
- package/dist/prepared-DAwe8Il2.cjs +1 -0
- package/dist/protocol-BOri9qJL.js +105 -0
- package/dist/protocol-DD5dHSz-.cjs +1 -0
- package/dist/record-bindings-CAyM5tGg.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
- package/dist/runtime-BpSAgOw1.js +201 -0
- package/dist/runtime-Cd2UTnwe.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2710 -2418
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +47 -12
- package/dist/server.d.ts +47 -12
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-CoT7jm_6.cjs → template-catalog--yBX169M.cjs} +1 -1
- package/dist/{template-catalog--cjxzgH7.js → template-catalog-Bu7s7ReF.js} +3 -3
- package/dist/template-fragments-5EzVn7bm.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
- package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
- package/dist/template-registry-Bnh5aEYf.cjs +1 -0
- package/dist/textwrap-BPFxhpOw.cjs +4 -0
- package/dist/textwrap-CmVkhMhx.js +111 -0
- package/dist/vue/async.d.cts +104 -18
- package/dist/vue/async.d.ts +104 -18
- package/dist/vue/index.d.cts +134 -28
- package/dist/vue/index.d.ts +134 -28
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +18 -1
- package/dist/xlsx.d.ts +18 -1
- package/dist/xlsx.js +279 -272
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-D4FLind-.js +0 -1485
- package/dist/ExcelBindingWizard-D4RS5Bpg.cjs +0 -1
- package/dist/ParamEditor-C-6C9rd2.cjs +0 -1
- package/dist/ParamEditor-CASZt-Ma.js +0 -732
- package/dist/ReportBatchPanel-Bq7t8a5r.js +0 -350
- package/dist/ReportBatchPanel-YVj5IO5y.cjs +0 -1
- package/dist/ReportLabelStudio-Cqhita1b.cjs +0 -1
- package/dist/ReportLabelStudio-Dj7GXhuv.js +0 -783
- package/dist/ReportParamPanel-DZbFVmDL.cjs +0 -1
- package/dist/ReportPreview-DeWzG8jQ.js +0 -6257
- package/dist/ReportPreview-FFIryrIr.cjs +0 -6
- package/dist/ReportTemplateLibrary-BaWodmpm.cjs +0 -1
- package/dist/ReportTemplateLibrary-DdAAAD2I.js +0 -311
- package/dist/RuleEditor-D2UwQGF6.js +0 -2341
- package/dist/RuleEditor-DcT9xI1v.cjs +0 -1
- package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +0 -1
- package/dist/TemplateOutlinePanel-DrT7XN0m.js +0 -96
- package/dist/TemplateReusePanel-4eejkNqi.js +0 -388
- package/dist/TemplateReusePanel-DZMyiX5I.cjs +0 -1
- package/dist/TemplateReviewPanel-BIhNLeNw.js +0 -592
- package/dist/TemplateReviewPanel-DnYImiXu.cjs +0 -1
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-4pK9HePf.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-DhrE7jzw.js +0 -7169
- package/dist/designer-IAZu6kBX.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-1tvQNzQE.cjs +0 -2
- package/dist/prefill-DsUD5OoK.cjs +0 -1
- package/dist/prepared-DCIxhKFo.js +0 -94
- package/dist/prepared-Dv-XM3i1.cjs +0 -1
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-B9YgfQ_d.cjs +0 -1
- package/dist/protocol-DxeUKGYG.js +0 -90
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-75Y5Oq5B.js +0 -171
- package/dist/runtime-DKlGd_D4.cjs +0 -1
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-BIjtEWmq.js +0 -110
- package/dist/textwrap-Cy7o1hIR.cjs +0 -4
|
@@ -1,732 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, computed as M, openBlock as d, createElementBlock as u, Fragment as L, renderList as U, normalizeStyle as re, createElementVNode as n, toDisplayString as i, ref as T, watch as ie, getCurrentInstance as de, unref as e, normalizeClass as z, createCommentVNode as b, createTextVNode as k, withDirectives as N, mergeProps as D, vModelDynamic as G, vModelText as K, vModelCheckbox as Q, createVNode as le, vModelSelect as ne, nextTick as ue } from "vue";
|
|
2
|
-
import { u as me, h as pe, R as ce, b as ve } from "./ReportParamPanel-Dgmqro1Y.js";
|
|
3
|
-
import { _ as oe } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
-
import { validateReportParamDefinitions as be } from "@agile-team/mach-report";
|
|
5
|
-
import { P as ye, u as fe } from "./designer-DhrE7jzw.js";
|
|
6
|
-
const he = { class: "mr-param-tree" }, ge = { "aria-hidden": "true" }, _e = ["value", "aria-label", "disabled", "onInput"], Ie = ["value", "aria-label", "disabled", "onInput"], Se = ["aria-label", "disabled", "onClick"], $e = ["aria-label", "disabled", "onClick"], ke = ["disabled"], Oe = /* @__PURE__ */ se({
|
|
7
|
-
__name: "ParamTreeOptionsEditor",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: {},
|
|
10
|
-
messages: {},
|
|
11
|
-
readonly: { type: Boolean }
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:modelValue"],
|
|
14
|
-
setup(t, { emit: _ }) {
|
|
15
|
-
const $ = t, c = _, I = M(() => {
|
|
16
|
-
const R = [], O = $.modelValue.map((a, y) => ({ item: a, path: [y] }));
|
|
17
|
-
for (let a = 0; a < O.length && R.length < 1e3; a++) {
|
|
18
|
-
const y = O[a];
|
|
19
|
-
R.push(y), y.path.length < 16 && O.splice(a + 1, 0, ...(y.item.children ?? []).map((p, s) => ({ item: p, path: [...y.path, s] })));
|
|
20
|
-
}
|
|
21
|
-
return R;
|
|
22
|
-
});
|
|
23
|
-
function r(R, O, a = "") {
|
|
24
|
-
if ($.readonly) return;
|
|
25
|
-
const y = JSON.parse(JSON.stringify($.modelValue));
|
|
26
|
-
let p = y;
|
|
27
|
-
for (const E of R.slice(0, -1)) p = p[E].children;
|
|
28
|
-
const s = R[R.length - 1], x = p[s];
|
|
29
|
-
if (O === "remove") p.splice(s, 1);
|
|
30
|
-
else if (O === "add") {
|
|
31
|
-
if (I.value.length >= 1e3 || R.length >= 16) return;
|
|
32
|
-
x ? (x.children ??= []).push({ label: "", value: "" }) : y.push({ label: "", value: "" });
|
|
33
|
-
} else x && (x[O] = a);
|
|
34
|
-
c("update:modelValue", y);
|
|
35
|
-
}
|
|
36
|
-
return (R, O) => (d(), u("div", he, [
|
|
37
|
-
(d(!0), u(L, null, U(I.value, (a, y) => (d(), u("div", {
|
|
38
|
-
key: a.path.join("."),
|
|
39
|
-
class: "mr-param-tree__row",
|
|
40
|
-
style: re({ paddingLeft: `${(a.path.length - 1) * 14}px` })
|
|
41
|
-
}, [
|
|
42
|
-
n("span", ge, i(a.path.length > 1 ? "↳" : "•"), 1),
|
|
43
|
-
n("input", {
|
|
44
|
-
value: a.item.value,
|
|
45
|
-
"aria-label": `${t.messages.paramOptionValue} ${y + 1}`,
|
|
46
|
-
disabled: t.readonly,
|
|
47
|
-
onInput: (p) => r(a.path, "value", p.target.value)
|
|
48
|
-
}, null, 40, _e),
|
|
49
|
-
n("input", {
|
|
50
|
-
value: a.item.label,
|
|
51
|
-
"aria-label": `${t.messages.paramOptionLabel} ${y + 1}`,
|
|
52
|
-
disabled: t.readonly,
|
|
53
|
-
onInput: (p) => r(a.path, "label", p.target.value)
|
|
54
|
-
}, null, 40, Ie),
|
|
55
|
-
n("button", {
|
|
56
|
-
type: "button",
|
|
57
|
-
"aria-label": `${t.messages.paramChildAdd} ${y + 1}`,
|
|
58
|
-
disabled: t.readonly || a.path.length >= 16 || I.value.length >= 1e3,
|
|
59
|
-
onClick: (p) => r(a.path, "add")
|
|
60
|
-
}, "+↳", 8, Se),
|
|
61
|
-
n("button", {
|
|
62
|
-
type: "button",
|
|
63
|
-
"aria-label": `${t.messages.paramOptionRemove} ${y + 1}`,
|
|
64
|
-
disabled: t.readonly,
|
|
65
|
-
onClick: (p) => r(a.path, "remove")
|
|
66
|
-
}, "×", 8, $e)
|
|
67
|
-
], 4))), 128)),
|
|
68
|
-
n("button", {
|
|
69
|
-
type: "button",
|
|
70
|
-
disabled: t.readonly || I.value.length >= 1e3,
|
|
71
|
-
onClick: O[0] || (O[0] = (a) => r([t.modelValue.length], "add"))
|
|
72
|
-
}, "+ " + i(t.messages.paramOptionAdd), 9, ke)
|
|
73
|
-
]));
|
|
74
|
-
}
|
|
75
|
-
}), Ve = /* @__PURE__ */ oe(Oe, [["__scopeId", "data-v-fb7ced48"]]), xe = ["text", "number", "date", "month", "year", "dateRange", "select", "multiSelect", "cascader", "numberRange"], Me = { text: "string", number: "string → number", date: "YYYY-MM-DD", month: "YYYY-MM", year: "YYYY", dateRange: "YYYY-MM-DD/YYYY-MM-DD", select: "option.value", multiSelect: 'JSON ["value",…]', cascader: 'JSON ["parent","leaf"]', numberRange: "JSON [minimum,maximum]" };
|
|
76
|
-
function Re(t) {
|
|
77
|
-
if (t.startsWith("远程选项")) return ["optionsSource"];
|
|
78
|
-
if (t.startsWith("联动依赖")) return ["dependsOn"];
|
|
79
|
-
if (/^(默认值|必填参数的默认值)/.test(t)) return ["defaultValue"];
|
|
80
|
-
if (t.includes("参数名")) return ["field"];
|
|
81
|
-
if (t.includes("选项")) return ["options"];
|
|
82
|
-
if (t.startsWith("最小边界")) return ["min", "max"];
|
|
83
|
-
if (t.startsWith("最小长度")) return ["minLength", "maxLength"];
|
|
84
|
-
const _ = /^(minLength|maxLength|minItems|maxItems|min|max) /.exec(t)?.[1];
|
|
85
|
-
return _ ? [_] : ["type"];
|
|
86
|
-
}
|
|
87
|
-
function Ce(t) {
|
|
88
|
-
return JSON.parse(JSON.stringify(t));
|
|
89
|
-
}
|
|
90
|
-
function X(t) {
|
|
91
|
-
return {
|
|
92
|
-
field: t.field,
|
|
93
|
-
label: t.label ?? "",
|
|
94
|
-
type: t.type ?? "text",
|
|
95
|
-
required: t.required === !0,
|
|
96
|
-
placeholder: t.placeholder ?? "",
|
|
97
|
-
defaultEnabled: t.defaultValue !== void 0,
|
|
98
|
-
defaultValue: t.defaultValue ?? "",
|
|
99
|
-
min: t.min === void 0 ? "" : String(t.min),
|
|
100
|
-
max: t.max === void 0 ? "" : String(t.max),
|
|
101
|
-
minLength: t.minLength === void 0 ? "" : String(t.minLength),
|
|
102
|
-
maxLength: t.maxLength === void 0 ? "" : String(t.maxLength),
|
|
103
|
-
minItems: t.minItems === void 0 ? "" : String(t.minItems),
|
|
104
|
-
maxItems: t.maxItems === void 0 ? "" : String(t.maxItems),
|
|
105
|
-
options: t.options ? JSON.parse(JSON.stringify(t.options)) : [],
|
|
106
|
-
optionsMode: t.optionsSource === void 0 ? "static" : "remote",
|
|
107
|
-
optionsSource: t.optionsSource ?? "",
|
|
108
|
-
dependsOn: [...t.dependsOn ?? []]
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function De(t) {
|
|
112
|
-
const _ = { field: t.field, type: t.type };
|
|
113
|
-
t.label && (_.label = t.label), t.placeholder && (_.placeholder = t.placeholder), t.required && (_.required = !0), t.defaultEnabled && (_.defaultValue = t.defaultValue);
|
|
114
|
-
for (const $ of ["min", "max"])
|
|
115
|
-
t[$] !== "" && (_[$] = ["number", "numberRange"].includes(t.type) ? Number(t[$]) : t[$]);
|
|
116
|
-
for (const $ of ["minLength", "maxLength", "minItems", "maxItems"]) t[$] !== "" && (_[$] = Number(t[$]));
|
|
117
|
-
return ["select", "multiSelect", "cascader"].includes(t.type) && t.optionsMode === "remote" ? (_.optionsSource = t.optionsSource.trim(), t.dependsOn.length && (_.dependsOn = [...t.dependsOn])) : ["select", "multiSelect", "cascader"].includes(t.type) && (_.options = JSON.parse(JSON.stringify(t.options))), _;
|
|
118
|
-
}
|
|
119
|
-
function Le(t) {
|
|
120
|
-
const _ = () => JSON.stringify(t.document.template.params ?? []), $ = T(_()), c = T((t.document.template.params ?? []).map(X)), I = T(0), r = T(""), R = M(() => ({ ...ye, ...t.messages })), O = M(() => c.value.map(De)), a = T(JSON.stringify(c.value)), y = M(() => JSON.stringify(c.value) !== a.value), p = M(() => _() !== $.value), s = M(() => be(O.value)), x = M(() => {
|
|
121
|
-
const v = /* @__PURE__ */ new Map();
|
|
122
|
-
for (const f of s.value) {
|
|
123
|
-
const g = Number(f.path.split(".").at(-1)), S = v.get(g) ?? [];
|
|
124
|
-
S.push({ message: f.message, controls: Re(f.message) }), v.set(g, S);
|
|
125
|
-
}
|
|
126
|
-
return v;
|
|
127
|
-
}), E = M(() => x.value.keys().next().value), V = M(() => c.value[I.value]), j = M(() => s.value.filter((v) => v.path === `$.paramDefs.${I.value}`));
|
|
128
|
-
function Y(v) {
|
|
129
|
-
return (x.value.get(I.value) ?? []).filter((f) => f.controls.includes(v)).map((f) => f.message);
|
|
130
|
-
}
|
|
131
|
-
const A = M(() => {
|
|
132
|
-
const v = JSON.parse($.value).map((g) => g.field), f = O.value.map((g) => g.field);
|
|
133
|
-
return { added: f.filter((g) => g && !v.includes(g)), removed: v.filter((g) => !f.includes(g)) };
|
|
134
|
-
});
|
|
135
|
-
function P() {
|
|
136
|
-
$.value = _(), c.value = (t.document.template.params ?? []).map(X), I.value = Math.min(I.value, Math.max(0, c.value.length - 1)), a.value = JSON.stringify(c.value), r.value = "";
|
|
137
|
-
}
|
|
138
|
-
ie(_, () => {
|
|
139
|
-
y.value || P();
|
|
140
|
-
});
|
|
141
|
-
function W() {
|
|
142
|
-
if (t.readonly) return;
|
|
143
|
-
let v = c.value.length + 1;
|
|
144
|
-
for (; c.value.some((f) => f.field === `param${v}`); ) v++;
|
|
145
|
-
c.value.push(X({ field: `param${v}`, type: "text" })), I.value = c.value.length - 1;
|
|
146
|
-
}
|
|
147
|
-
function H() {
|
|
148
|
-
t.readonly || !V.value || (c.value.splice(I.value, 1), I.value = Math.min(I.value, Math.max(0, c.value.length - 1)));
|
|
149
|
-
}
|
|
150
|
-
function w(v) {
|
|
151
|
-
const f = I.value + v;
|
|
152
|
-
if (t.readonly || f < 0 || f >= c.value.length) return;
|
|
153
|
-
const g = c.value.splice(I.value, 1)[0];
|
|
154
|
-
c.value.splice(f, 0, g), I.value = f;
|
|
155
|
-
}
|
|
156
|
-
function q(v) {
|
|
157
|
-
t.readonly || !V.value || (V.value.type === "cascader" && v !== "cascader" && (V.value.options = V.value.options.map((f) => ({ label: f.label, value: f.value }))), V.value.type = v, V.value.min = "", V.value.max = "", V.value.minLength = "", V.value.maxLength = "", V.value.minItems = "", V.value.maxItems = "");
|
|
158
|
-
}
|
|
159
|
-
function C() {
|
|
160
|
-
if (t.readonly || p.value || s.value.length) return !1;
|
|
161
|
-
try {
|
|
162
|
-
return t.accept(Ce(O.value)) ? ($.value = JSON.stringify(O.value), a.value = JSON.stringify(c.value), r.value = "", !0) : (r.value = R.value.paramApplyFailed, !1);
|
|
163
|
-
} catch (v) {
|
|
164
|
-
return r.value = v instanceof Error ? v.message : String(v), !1;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
return fe({ key: () => "params", baseline: () => $.value, pending: () => y.value, reset: P, snapshot: () => JSON.stringify({ rows: c.value, selected: I.value, initial: a.value }), restore(v, f) {
|
|
168
|
-
const g = JSON.parse(v);
|
|
169
|
-
if (!Array.isArray(g.rows) || g.rows.length > 1e3 || typeof g.initial != "string") throw new Error("Invalid parameter draft");
|
|
170
|
-
c.value = g.rows.map((S) => ({ ...S, minItems: S.minItems ?? "", maxItems: S.maxItems ?? "", optionsMode: S.optionsMode ?? "static", optionsSource: S.optionsSource ?? "", dependsOn: S.dependsOn ?? [] })), I.value = Math.max(0, Math.min(g.selected, g.rows.length - 1)), a.value = g.initial, $.value = f;
|
|
171
|
-
} }), { m: R, rows: c, selected: I, current: V, definitions: O, issues: s, issuesByRow: x, firstIssueIndex: E, controlIssues: Y, currentIssues: j, changes: A, pending: y, conflicted: p, error: r, reset: P, add: W, remove: H, move: w, setType: q, apply: C };
|
|
172
|
-
}
|
|
173
|
-
const Ne = ["aria-label"], Ee = { class: "mr-param-editor__directory" }, Ue = ["aria-label"], Ye = ["aria-pressed", "aria-label", "onClick"], Ae = { class: "mr-param-editor__directory-title" }, Je = {
|
|
174
|
-
key: 0,
|
|
175
|
-
class: "mr-param-editor__error-count",
|
|
176
|
-
"aria-hidden": "true"
|
|
177
|
-
}, Te = { key: 0 }, Pe = ["disabled"], je = {
|
|
178
|
-
key: 0,
|
|
179
|
-
class: "mr-param-editor__validation",
|
|
180
|
-
role: "status"
|
|
181
|
-
}, qe = { class: "mr-param-editor__heading" }, Fe = { class: "mr-param-editor__grid" }, Be = ["aria-label", "disabled"], We = ["id"], He = ["aria-label", "disabled"], we = ["value", "aria-label", "disabled"], ze = ["value"], Ge = ["id"], Ke = ["aria-label", "disabled"], Qe = { class: "mr-param-editor__checks" }, Xe = ["disabled"], Ze = ["disabled"], ea = {
|
|
182
|
-
key: 0,
|
|
183
|
-
class: "mr-param-editor__compound-default"
|
|
184
|
-
}, aa = { class: "mr-param-editor__default-label" }, ta = { class: "mr-param-editor__range" }, la = ["value", "aria-label", "disabled"], na = ["value", "aria-label", "disabled"], sa = { key: 2 }, ia = ["aria-label", "disabled"], oa = ["value"], ra = ["value", "aria-label", "type", "min", "max", "step", "disabled"], da = ["id"], ua = ["value", "aria-label", "type", "min", "max", "step", "disabled", "onInput"], ma = ["id"], pa = ["value", "aria-label", "disabled", "onInput"], ca = ["id"], va = {
|
|
185
|
-
key: 0,
|
|
186
|
-
class: "mr-param-editor__hint"
|
|
187
|
-
}, ba = {
|
|
188
|
-
key: 1,
|
|
189
|
-
class: "mr-param-editor__options"
|
|
190
|
-
}, ya = ["aria-label", "disabled"], fa = { value: "static" }, ha = { value: "remote" }, ga = ["aria-label", "disabled"], _a = ["id"], Ia = ["value", "disabled"], Sa = ["id"], $a = { class: "mr-param-editor__hint" }, ka = {
|
|
191
|
-
key: 2,
|
|
192
|
-
class: "mr-param-editor__options"
|
|
193
|
-
}, Oa = { class: "mr-param-editor__option-head" }, Va = ["onUpdate:modelValue", "aria-label", "disabled"], xa = ["onUpdate:modelValue", "aria-label", "disabled"], Ma = ["aria-label", "disabled", "onClick"], Ra = ["id"], Ca = ["disabled"], Da = {
|
|
194
|
-
key: 3,
|
|
195
|
-
class: "mr-param-editor__options"
|
|
196
|
-
}, La = { class: "mr-param-editor__hint" }, Na = ["id"], Ea = {
|
|
197
|
-
key: 4,
|
|
198
|
-
class: "mr-param-editor__grid"
|
|
199
|
-
}, Ua = ["value", "aria-label", "disabled", "onInput"], Ya = ["id"], Aa = { class: "mr-param-editor__row-actions" }, Ja = ["disabled"], Ta = ["disabled"], Pa = ["disabled"], ja = { class: "mr-param-editor__technical" }, qa = {
|
|
200
|
-
key: 2,
|
|
201
|
-
class: "mr-param-editor__empty"
|
|
202
|
-
}, Fa = ["disabled"], Ba = {
|
|
203
|
-
key: 3,
|
|
204
|
-
class: "mr-param-editor__impact"
|
|
205
|
-
}, Wa = { key: 0 }, Ha = { key: 1 }, wa = {
|
|
206
|
-
key: 4,
|
|
207
|
-
class: "mr-param-editor__errors",
|
|
208
|
-
role: "alert"
|
|
209
|
-
}, za = ["disabled"], Ga = ["disabled"], Ka = /* @__PURE__ */ se({
|
|
210
|
-
__name: "ParamEditor",
|
|
211
|
-
props: {
|
|
212
|
-
document: {},
|
|
213
|
-
readonly: { type: Boolean },
|
|
214
|
-
messages: {},
|
|
215
|
-
loadOptions: { type: Function },
|
|
216
|
-
accept: { type: Function }
|
|
217
|
-
},
|
|
218
|
-
emits: ["dirty"],
|
|
219
|
-
setup(t, { expose: _, emit: $ }) {
|
|
220
|
-
const c = t, I = $, r = Le(c), R = me(), O = M(() => c.loadOptions ?? pe(R.value).loadParamOptions), { m: a, rows: y, selected: p, current: s, changes: x, pending: E, conflicted: V, error: j, issues: Y, issuesByRow: A } = r, P = M(() => {
|
|
221
|
-
const m = y.value.filter((o, l) => l !== p.value).map((o) => ({ field: o.field, label: o.label || o.field || a.value.paramUnnamed }));
|
|
222
|
-
for (const o of s.value?.dependsOn ?? []) m.some((l) => l.field === o) || m.push({ field: o, label: `${o} · ${a.value.paramDependencyUnavailable}` });
|
|
223
|
-
return m;
|
|
224
|
-
}), W = M(() => s.value ? [{ ...r.definitions.value[p.value], defaultValue: void 0, required: !1 }] : []), H = M(() => {
|
|
225
|
-
const m = Object.fromEntries(r.definitions.value.map((o) => [o.field, o.defaultValue ?? ""]));
|
|
226
|
-
return s.value && (m[s.value.field] = s.value.defaultValue), m;
|
|
227
|
-
});
|
|
228
|
-
function w(m) {
|
|
229
|
-
s.value && !c.readonly && (s.value.defaultValue = m[s.value.field] ?? "");
|
|
230
|
-
}
|
|
231
|
-
const q = T(), C = `mr-param-${de()?.uid ?? 0}`;
|
|
232
|
-
ie(E, (m) => I("dirty", m), { immediate: !0 });
|
|
233
|
-
function v(m) {
|
|
234
|
-
return { text: a.value.paramText, number: a.value.paramNumber, date: a.value.paramDate, month: a.value.paramMonth, year: a.value.paramYear, dateRange: a.value.paramDateRange, select: a.value.paramSelect, multiSelect: a.value.paramMultiSelect, cascader: a.value.paramCascader, numberRange: a.value.paramNumberRange }[m];
|
|
235
|
-
}
|
|
236
|
-
function f() {
|
|
237
|
-
s.value && !c.readonly && s.value.options.push({ value: "", label: "" });
|
|
238
|
-
}
|
|
239
|
-
function g(m) {
|
|
240
|
-
c.readonly || s.value?.options.splice(m, 1);
|
|
241
|
-
}
|
|
242
|
-
function S(m) {
|
|
243
|
-
const o = r.controlIssues(m).length > 0;
|
|
244
|
-
return { "aria-invalid": o ? "true" : void 0, "aria-describedby": o ? `${C}-${p.value}-${m}` : void 0 };
|
|
245
|
-
}
|
|
246
|
-
function Z(m) {
|
|
247
|
-
return m === "year" ? "number" : m === "dateRange" ? "date" : m === "numberRange" ? "number" : ["date", "month", "number"].includes(m) ? m : "text";
|
|
248
|
-
}
|
|
249
|
-
function ee(m) {
|
|
250
|
-
return m.target.value;
|
|
251
|
-
}
|
|
252
|
-
function F(m, o) {
|
|
253
|
-
s.value && !c.readonly && (s.value[m] = ee(o));
|
|
254
|
-
}
|
|
255
|
-
function B(m) {
|
|
256
|
-
return s.value?.defaultValue.split("/")[m] ?? "";
|
|
257
|
-
}
|
|
258
|
-
function ae(m, o) {
|
|
259
|
-
if (!s.value || c.readonly) return;
|
|
260
|
-
const l = [B(0), B(1)];
|
|
261
|
-
l[m] = ee(o), s.value.defaultValue = l.some(Boolean) ? l.join("/") : "";
|
|
262
|
-
}
|
|
263
|
-
async function te() {
|
|
264
|
-
const m = r.firstIssueIndex.value;
|
|
265
|
-
if (m === void 0) return;
|
|
266
|
-
p.value = m, await ue();
|
|
267
|
-
const o = q.value?.querySelector('[aria-invalid="true"]');
|
|
268
|
-
o?.focus({ preventScroll: !0 }), o?.scrollIntoView?.({ block: "nearest" });
|
|
269
|
-
}
|
|
270
|
-
return _({ pending: E, reset: r.reset, apply: r.apply, locateIssue: te }), (m, o) => (d(), u("section", {
|
|
271
|
-
class: "mr-param-editor",
|
|
272
|
-
"aria-label": e(a).paramsTool
|
|
273
|
-
}, [
|
|
274
|
-
n("aside", Ee, [
|
|
275
|
-
n("header", null, [
|
|
276
|
-
n("strong", null, i(e(a).paramsDirectory), 1),
|
|
277
|
-
n("span", null, i(e(y).length), 1)
|
|
278
|
-
]),
|
|
279
|
-
n("nav", {
|
|
280
|
-
"aria-label": e(a).paramsDirectory
|
|
281
|
-
}, [
|
|
282
|
-
(d(!0), u(L, null, U(e(y), (l, h) => (d(), u("button", {
|
|
283
|
-
key: h,
|
|
284
|
-
type: "button",
|
|
285
|
-
"aria-pressed": e(p) === h,
|
|
286
|
-
"aria-label": `${l.label || l.field || e(a).paramUnnamed}${e(A).get(h)?.length ? ` · ${e(a).paramIssueCount} ${e(A).get(h)?.length}` : ""}`,
|
|
287
|
-
class: z({ "has-errors": e(A).has(h) }),
|
|
288
|
-
onClick: (J) => p.value = h
|
|
289
|
-
}, [
|
|
290
|
-
n("span", Ae, [
|
|
291
|
-
n("strong", null, i(l.label || l.field || e(a).paramUnnamed), 1),
|
|
292
|
-
e(A).has(h) ? (d(), u("span", Je, i(e(A).get(h)?.length), 1)) : b("", !0)
|
|
293
|
-
]),
|
|
294
|
-
n("small", null, [
|
|
295
|
-
k(i(l.field) + " · " + i(v(l.type)), 1),
|
|
296
|
-
l.required ? (d(), u("span", Te, " *")) : b("", !0)
|
|
297
|
-
])
|
|
298
|
-
], 10, Ye))), 128))
|
|
299
|
-
], 8, Ue),
|
|
300
|
-
n("button", {
|
|
301
|
-
type: "button",
|
|
302
|
-
class: "mr-param-editor__add",
|
|
303
|
-
disabled: t.readonly,
|
|
304
|
-
onClick: o[0] || (o[0] = //@ts-ignore
|
|
305
|
-
(...l) => e(r).add && e(r).add(...l))
|
|
306
|
-
}, "+ " + i(e(a).paramAdd), 9, Pe),
|
|
307
|
-
n("p", null, i(e(a).paramsDescription), 1)
|
|
308
|
-
]),
|
|
309
|
-
n("div", {
|
|
310
|
-
ref_key: "main",
|
|
311
|
-
ref: q,
|
|
312
|
-
class: "mr-param-editor__main"
|
|
313
|
-
}, [
|
|
314
|
-
e(Y).length ? (d(), u("div", je, [
|
|
315
|
-
n("span", null, [
|
|
316
|
-
k(i(e(a).paramIssueCount) + " ", 1),
|
|
317
|
-
n("strong", null, i(e(Y).length), 1)
|
|
318
|
-
]),
|
|
319
|
-
n("button", {
|
|
320
|
-
type: "button",
|
|
321
|
-
onClick: te
|
|
322
|
-
}, i(e(a).paramLocateFirst), 1)
|
|
323
|
-
])) : b("", !0),
|
|
324
|
-
e(s) ? (d(), u(L, { key: 1 }, [
|
|
325
|
-
n("header", qe, [
|
|
326
|
-
n("div", null, [
|
|
327
|
-
n("strong", null, i(e(s).label || e(s).field || e(a).paramUnnamed), 1),
|
|
328
|
-
n("small", null, i(v(e(s).type)), 1)
|
|
329
|
-
]),
|
|
330
|
-
n("span", {
|
|
331
|
-
class: z({ "is-pending": e(E) || e(Y).length > 0 })
|
|
332
|
-
}, i(e(Y).length ? e(a).paramInvalid : e(E) ? e(a).paramPending : e(a).paramReady), 3)
|
|
333
|
-
]),
|
|
334
|
-
n("div", Fe, [
|
|
335
|
-
n("label", null, [
|
|
336
|
-
k(i(e(a).paramField), 1),
|
|
337
|
-
N(n("input", D({
|
|
338
|
-
"onUpdate:modelValue": o[1] || (o[1] = (l) => e(s).field = l),
|
|
339
|
-
"aria-label": e(a).paramField,
|
|
340
|
-
disabled: t.readonly,
|
|
341
|
-
autocomplete: "off"
|
|
342
|
-
}, S("field")), null, 16, Be), [
|
|
343
|
-
[G, e(s).field]
|
|
344
|
-
]),
|
|
345
|
-
e(r).controlIssues("field").length ? (d(), u("small", {
|
|
346
|
-
key: 0,
|
|
347
|
-
id: `${C}-${e(p)}-field`,
|
|
348
|
-
class: "mr-param-editor__field-error"
|
|
349
|
-
}, i(e(r).controlIssues("field").join(";")), 9, We)) : b("", !0)
|
|
350
|
-
]),
|
|
351
|
-
n("label", null, [
|
|
352
|
-
k(i(e(a).paramLabel), 1),
|
|
353
|
-
N(n("input", {
|
|
354
|
-
"onUpdate:modelValue": o[2] || (o[2] = (l) => e(s).label = l),
|
|
355
|
-
"aria-label": e(a).paramLabel,
|
|
356
|
-
disabled: t.readonly
|
|
357
|
-
}, null, 8, He), [
|
|
358
|
-
[K, e(s).label]
|
|
359
|
-
])
|
|
360
|
-
]),
|
|
361
|
-
n("label", null, [
|
|
362
|
-
k(i(e(a).paramType), 1),
|
|
363
|
-
n("select", D({
|
|
364
|
-
value: e(s).type,
|
|
365
|
-
"aria-label": e(a).paramType,
|
|
366
|
-
disabled: t.readonly
|
|
367
|
-
}, S("type"), {
|
|
368
|
-
onChange: o[3] || (o[3] = (l) => e(r).setType(l.target.value))
|
|
369
|
-
}), [
|
|
370
|
-
(d(!0), u(L, null, U(e(xe), (l) => (d(), u("option", {
|
|
371
|
-
key: l,
|
|
372
|
-
value: l
|
|
373
|
-
}, i(v(l)), 9, ze))), 128))
|
|
374
|
-
], 16, we),
|
|
375
|
-
e(r).controlIssues("type").length ? (d(), u("small", {
|
|
376
|
-
key: 0,
|
|
377
|
-
id: `${C}-${e(p)}-type`,
|
|
378
|
-
class: "mr-param-editor__field-error"
|
|
379
|
-
}, i(e(r).controlIssues("type").join(";")), 9, Ge)) : b("", !0)
|
|
380
|
-
]),
|
|
381
|
-
n("label", null, [
|
|
382
|
-
k(i(e(a).paramPlaceholder), 1),
|
|
383
|
-
N(n("input", {
|
|
384
|
-
"onUpdate:modelValue": o[4] || (o[4] = (l) => e(s).placeholder = l),
|
|
385
|
-
"aria-label": e(a).paramPlaceholder,
|
|
386
|
-
disabled: t.readonly
|
|
387
|
-
}, null, 8, Ke), [
|
|
388
|
-
[K, e(s).placeholder]
|
|
389
|
-
])
|
|
390
|
-
]),
|
|
391
|
-
n("div", Qe, [
|
|
392
|
-
n("label", null, [
|
|
393
|
-
N(n("input", {
|
|
394
|
-
"onUpdate:modelValue": o[5] || (o[5] = (l) => e(s).required = l),
|
|
395
|
-
type: "checkbox",
|
|
396
|
-
disabled: t.readonly
|
|
397
|
-
}, null, 8, Xe), [
|
|
398
|
-
[Q, e(s).required]
|
|
399
|
-
]),
|
|
400
|
-
k(i(e(a).paramRequired), 1)
|
|
401
|
-
]),
|
|
402
|
-
n("label", null, [
|
|
403
|
-
N(n("input", {
|
|
404
|
-
"onUpdate:modelValue": o[6] || (o[6] = (l) => e(s).defaultEnabled = l),
|
|
405
|
-
type: "checkbox",
|
|
406
|
-
disabled: t.readonly
|
|
407
|
-
}, null, 8, Ze), [
|
|
408
|
-
[Q, e(s).defaultEnabled]
|
|
409
|
-
]),
|
|
410
|
-
k(i(e(a).paramDefaultEnabled), 1)
|
|
411
|
-
])
|
|
412
|
-
]),
|
|
413
|
-
e(s).defaultEnabled ? (d(), u("div", {
|
|
414
|
-
key: 0,
|
|
415
|
-
class: z(["mr-param-editor__default", { "is-range": e(s).type === "dateRange" }])
|
|
416
|
-
}, [
|
|
417
|
-
["multiSelect", "cascader", "numberRange"].includes(e(s).type) ? (d(), u("div", ea, [
|
|
418
|
-
n("span", null, i(e(a).paramDefault), 1),
|
|
419
|
-
le(ce, {
|
|
420
|
-
defs: W.value,
|
|
421
|
-
"model-value": H.value,
|
|
422
|
-
messages: e(ve),
|
|
423
|
-
"load-options": O.value,
|
|
424
|
-
attempted: !1,
|
|
425
|
-
"show-title": !1,
|
|
426
|
-
"show-actions": !1,
|
|
427
|
-
disabled: t.readonly,
|
|
428
|
-
"onUpdate:modelValue": w
|
|
429
|
-
}, null, 8, ["defs", "model-value", "messages", "load-options", "disabled"])
|
|
430
|
-
])) : e(s).type === "dateRange" ? (d(), u(L, { key: 1 }, [
|
|
431
|
-
n("span", aa, i(e(a).paramDefault), 1),
|
|
432
|
-
n("div", ta, [
|
|
433
|
-
n("label", null, [
|
|
434
|
-
k(i(e(a).paramRangeStart), 1),
|
|
435
|
-
n("input", D({
|
|
436
|
-
value: B(0),
|
|
437
|
-
type: "date",
|
|
438
|
-
"aria-label": e(a).paramRangeStart,
|
|
439
|
-
disabled: t.readonly
|
|
440
|
-
}, S("defaultValue"), {
|
|
441
|
-
onInput: o[7] || (o[7] = (l) => ae(0, l))
|
|
442
|
-
}), null, 16, la)
|
|
443
|
-
]),
|
|
444
|
-
o[21] || (o[21] = n("span", { "aria-hidden": "true" }, "—", -1)),
|
|
445
|
-
n("label", null, [
|
|
446
|
-
k(i(e(a).paramRangeEnd), 1),
|
|
447
|
-
n("input", D({
|
|
448
|
-
value: B(1),
|
|
449
|
-
type: "date",
|
|
450
|
-
"aria-label": e(a).paramRangeEnd,
|
|
451
|
-
disabled: t.readonly
|
|
452
|
-
}, S("defaultValue"), {
|
|
453
|
-
onInput: o[8] || (o[8] = (l) => ae(1, l))
|
|
454
|
-
}), null, 16, na)
|
|
455
|
-
])
|
|
456
|
-
])
|
|
457
|
-
], 64)) : (d(), u("label", sa, [
|
|
458
|
-
k(i(e(a).paramDefault), 1),
|
|
459
|
-
e(s).type === "select" && e(s).optionsMode !== "remote" ? N((d(), u("select", D({
|
|
460
|
-
key: 0,
|
|
461
|
-
"onUpdate:modelValue": o[9] || (o[9] = (l) => e(s).defaultValue = l),
|
|
462
|
-
"aria-label": e(a).paramDefault,
|
|
463
|
-
disabled: t.readonly
|
|
464
|
-
}, S("defaultValue")), [
|
|
465
|
-
o[22] || (o[22] = n("option", { value: "" }, null, -1)),
|
|
466
|
-
(d(!0), u(L, null, U(e(s).options, (l, h) => (d(), u("option", {
|
|
467
|
-
key: h,
|
|
468
|
-
value: l.value
|
|
469
|
-
}, i(l.label || l.value), 9, oa))), 128))
|
|
470
|
-
], 16, ia)), [
|
|
471
|
-
[ne, e(s).defaultValue]
|
|
472
|
-
]) : (d(), u("input", D({
|
|
473
|
-
key: 1,
|
|
474
|
-
value: e(s).defaultValue,
|
|
475
|
-
"aria-label": e(a).paramDefault,
|
|
476
|
-
type: Z(e(s).type),
|
|
477
|
-
min: e(s).type === "year" ? 1 : void 0,
|
|
478
|
-
max: e(s).type === "year" ? 9999 : void 0,
|
|
479
|
-
step: e(s).type === "year" ? 1 : "any",
|
|
480
|
-
disabled: t.readonly
|
|
481
|
-
}, S("defaultValue"), {
|
|
482
|
-
onInput: o[10] || (o[10] = (l) => F("defaultValue", l))
|
|
483
|
-
}), null, 16, ra))
|
|
484
|
-
])),
|
|
485
|
-
e(r).controlIssues("defaultValue").length ? (d(), u("small", {
|
|
486
|
-
key: 3,
|
|
487
|
-
id: `${C}-${e(p)}-defaultValue`,
|
|
488
|
-
class: "mr-param-editor__field-error mr-param-editor__errors",
|
|
489
|
-
role: "alert"
|
|
490
|
-
}, i(e(r).controlIssues("defaultValue").join(";")), 9, da)) : b("", !0)
|
|
491
|
-
], 2)) : b("", !0),
|
|
492
|
-
["number", "numberRange", "date", "month", "year", "dateRange"].includes(e(s).type) ? (d(), u(L, { key: 1 }, U(["min", "max"], (l) => n("label", { key: l }, [
|
|
493
|
-
k(i(l === "min" ? e(a).paramMinimum : e(a).paramMaximum), 1),
|
|
494
|
-
n("input", D({
|
|
495
|
-
value: e(s)[l],
|
|
496
|
-
"aria-label": l === "min" ? e(a).paramMinimum : e(a).paramMaximum,
|
|
497
|
-
type: Z(e(s).type),
|
|
498
|
-
min: e(s).type === "year" ? 1 : void 0,
|
|
499
|
-
max: e(s).type === "year" ? 9999 : void 0,
|
|
500
|
-
step: e(s).type === "year" ? 1 : "any",
|
|
501
|
-
disabled: t.readonly
|
|
502
|
-
}, { ref_for: !0 }, S(l), {
|
|
503
|
-
onInput: (h) => F(l, h)
|
|
504
|
-
}), null, 16, ua),
|
|
505
|
-
e(r).controlIssues(l).length ? (d(), u("small", {
|
|
506
|
-
key: 0,
|
|
507
|
-
id: `${C}-${e(p)}-${l}`,
|
|
508
|
-
class: "mr-param-editor__field-error"
|
|
509
|
-
}, i(e(r).controlIssues(l).join(";")), 9, ma)) : b("", !0)
|
|
510
|
-
])), 64)) : b("", !0),
|
|
511
|
-
e(s).type === "text" ? (d(), u(L, { key: 2 }, U(["minLength", "maxLength"], (l) => n("label", { key: l }, [
|
|
512
|
-
k(i(l === "minLength" ? e(a).paramMinLength : e(a).paramMaxLength), 1),
|
|
513
|
-
n("input", D({
|
|
514
|
-
value: e(s)[l],
|
|
515
|
-
type: "number",
|
|
516
|
-
min: "0",
|
|
517
|
-
step: "1",
|
|
518
|
-
"aria-label": l === "minLength" ? e(a).paramMinLength : e(a).paramMaxLength,
|
|
519
|
-
disabled: t.readonly
|
|
520
|
-
}, { ref_for: !0 }, S(l), {
|
|
521
|
-
onInput: (h) => F(l, h)
|
|
522
|
-
}), null, 16, pa),
|
|
523
|
-
e(r).controlIssues(l).length ? (d(), u("small", {
|
|
524
|
-
key: 0,
|
|
525
|
-
id: `${C}-${e(p)}-${l}`,
|
|
526
|
-
class: "mr-param-editor__field-error"
|
|
527
|
-
}, i(e(r).controlIssues(l).join(";")), 9, ca)) : b("", !0)
|
|
528
|
-
])), 64)) : b("", !0)
|
|
529
|
-
]),
|
|
530
|
-
e(s).type === "dateRange" ? (d(), u("p", va, i(e(a).paramRangeHint), 1)) : b("", !0),
|
|
531
|
-
["select", "multiSelect", "cascader"].includes(e(s).type) ? (d(), u("fieldset", ba, [
|
|
532
|
-
n("legend", null, i(e(a).paramOptionsMode), 1),
|
|
533
|
-
n("label", null, [
|
|
534
|
-
k(i(e(a).paramOptionsMode), 1),
|
|
535
|
-
N(n("select", {
|
|
536
|
-
"onUpdate:modelValue": o[11] || (o[11] = (l) => e(s).optionsMode = l),
|
|
537
|
-
"aria-label": e(a).paramOptionsMode,
|
|
538
|
-
disabled: t.readonly
|
|
539
|
-
}, [
|
|
540
|
-
n("option", fa, i(e(a).paramOptionsStatic), 1),
|
|
541
|
-
n("option", ha, i(e(a).paramOptionsRemote), 1)
|
|
542
|
-
], 8, ya), [
|
|
543
|
-
[ne, e(s).optionsMode]
|
|
544
|
-
])
|
|
545
|
-
]),
|
|
546
|
-
e(s).optionsMode === "remote" ? (d(), u(L, { key: 0 }, [
|
|
547
|
-
n("label", null, [
|
|
548
|
-
k(i(e(a).paramOptionsSource), 1),
|
|
549
|
-
N(n("input", D({
|
|
550
|
-
"onUpdate:modelValue": o[12] || (o[12] = (l) => e(s).optionsSource = l),
|
|
551
|
-
"aria-label": e(a).paramOptionsSource,
|
|
552
|
-
disabled: t.readonly
|
|
553
|
-
}, S("optionsSource")), null, 16, ga), [
|
|
554
|
-
[G, e(s).optionsSource]
|
|
555
|
-
])
|
|
556
|
-
]),
|
|
557
|
-
e(r).controlIssues("optionsSource").length ? (d(), u("small", {
|
|
558
|
-
key: 0,
|
|
559
|
-
id: `${C}-${e(p)}-optionsSource`,
|
|
560
|
-
class: "mr-param-editor__field-error"
|
|
561
|
-
}, i(e(r).controlIssues("optionsSource").join(";")), 9, _a)) : b("", !0),
|
|
562
|
-
n("fieldset", D({
|
|
563
|
-
class: "mr-param-editor__dependencies",
|
|
564
|
-
tabindex: "-1"
|
|
565
|
-
}, S("dependsOn")), [
|
|
566
|
-
n("legend", null, i(e(a).paramDependencies), 1),
|
|
567
|
-
(d(!0), u(L, null, U(P.value, (l, h) => (d(), u("label", { key: h }, [
|
|
568
|
-
N(n("input", {
|
|
569
|
-
"onUpdate:modelValue": o[13] || (o[13] = (J) => e(s).dependsOn = J),
|
|
570
|
-
type: "checkbox",
|
|
571
|
-
value: l.field,
|
|
572
|
-
disabled: t.readonly
|
|
573
|
-
}, null, 8, Ia), [
|
|
574
|
-
[Q, e(s).dependsOn]
|
|
575
|
-
]),
|
|
576
|
-
k(i(l.label), 1)
|
|
577
|
-
]))), 128))
|
|
578
|
-
], 16),
|
|
579
|
-
e(r).controlIssues("dependsOn").length ? (d(), u("small", {
|
|
580
|
-
key: 1,
|
|
581
|
-
id: `${C}-${e(p)}-dependsOn`,
|
|
582
|
-
class: "mr-param-editor__field-error"
|
|
583
|
-
}, i(e(r).controlIssues("dependsOn").join(";")), 9, Sa)) : b("", !0),
|
|
584
|
-
n("p", $a, i(e(a).paramRemoteHint), 1)
|
|
585
|
-
], 64)) : b("", !0)
|
|
586
|
-
])) : b("", !0),
|
|
587
|
-
["select", "multiSelect"].includes(e(s).type) && e(s).optionsMode === "static" ? (d(), u("fieldset", ka, [
|
|
588
|
-
n("legend", null, i(e(a).paramOptions), 1),
|
|
589
|
-
n("div", Oa, [
|
|
590
|
-
n("span", null, i(e(a).paramOptionValue), 1),
|
|
591
|
-
n("span", null, i(e(a).paramOptionLabel), 1)
|
|
592
|
-
]),
|
|
593
|
-
(d(!0), u(L, null, U(e(s).options, (l, h) => (d(), u("div", {
|
|
594
|
-
key: h,
|
|
595
|
-
class: "mr-param-editor__option"
|
|
596
|
-
}, [
|
|
597
|
-
N(n("input", D({
|
|
598
|
-
"onUpdate:modelValue": (J) => l.value = J,
|
|
599
|
-
"aria-label": `${e(a).paramOptionValue} ${h + 1}`,
|
|
600
|
-
disabled: t.readonly
|
|
601
|
-
}, { ref_for: !0 }, S("options")), null, 16, Va), [
|
|
602
|
-
[G, l.value]
|
|
603
|
-
]),
|
|
604
|
-
N(n("input", {
|
|
605
|
-
"onUpdate:modelValue": (J) => l.label = J,
|
|
606
|
-
"aria-label": `${e(a).paramOptionLabel} ${h + 1}`,
|
|
607
|
-
disabled: t.readonly
|
|
608
|
-
}, null, 8, xa), [
|
|
609
|
-
[K, l.label]
|
|
610
|
-
]),
|
|
611
|
-
n("button", {
|
|
612
|
-
type: "button",
|
|
613
|
-
"aria-label": `${e(a).paramOptionRemove} ${h + 1}`,
|
|
614
|
-
disabled: t.readonly,
|
|
615
|
-
onClick: (J) => g(h)
|
|
616
|
-
}, "×", 8, Ma)
|
|
617
|
-
]))), 128)),
|
|
618
|
-
e(r).controlIssues("options").length ? (d(), u("small", {
|
|
619
|
-
key: 0,
|
|
620
|
-
id: `${C}-${e(p)}-options`,
|
|
621
|
-
class: "mr-param-editor__field-error"
|
|
622
|
-
}, i(e(r).controlIssues("options").join(";")), 9, Ra)) : b("", !0),
|
|
623
|
-
n("button", {
|
|
624
|
-
type: "button",
|
|
625
|
-
disabled: t.readonly,
|
|
626
|
-
onClick: f
|
|
627
|
-
}, "+ " + i(e(a).paramOptionAdd), 9, Ca)
|
|
628
|
-
])) : b("", !0),
|
|
629
|
-
e(s).type === "cascader" && e(s).optionsMode === "static" ? (d(), u("fieldset", Da, [
|
|
630
|
-
n("legend", null, i(e(a).paramOptions), 1),
|
|
631
|
-
n("p", La, i(e(a).paramTreeHint), 1),
|
|
632
|
-
le(Ve, {
|
|
633
|
-
modelValue: e(s).options,
|
|
634
|
-
"onUpdate:modelValue": o[14] || (o[14] = (l) => e(s).options = l),
|
|
635
|
-
messages: e(a),
|
|
636
|
-
readonly: t.readonly
|
|
637
|
-
}, null, 8, ["modelValue", "messages", "readonly"]),
|
|
638
|
-
e(r).controlIssues("options").length ? (d(), u("small", {
|
|
639
|
-
key: 0,
|
|
640
|
-
id: `${C}-${e(p)}-options`,
|
|
641
|
-
class: "mr-param-editor__field-error"
|
|
642
|
-
}, i(e(r).controlIssues("options").join(";")), 9, Na)) : b("", !0)
|
|
643
|
-
])) : b("", !0),
|
|
644
|
-
e(s).type === "multiSelect" ? (d(), u("div", Ea, [
|
|
645
|
-
(d(), u(L, null, U(["minItems", "maxItems"], (l) => n("label", { key: l }, [
|
|
646
|
-
k(i(l === "minItems" ? e(a).paramMinItems : e(a).paramMaxItems), 1),
|
|
647
|
-
n("input", D({
|
|
648
|
-
value: e(s)[l],
|
|
649
|
-
"aria-label": l === "minItems" ? e(a).paramMinItems : e(a).paramMaxItems,
|
|
650
|
-
type: "number",
|
|
651
|
-
min: "0",
|
|
652
|
-
max: "100",
|
|
653
|
-
step: "1",
|
|
654
|
-
disabled: t.readonly
|
|
655
|
-
}, { ref_for: !0 }, S(l), {
|
|
656
|
-
onInput: (h) => F(l, h)
|
|
657
|
-
}), null, 16, Ua),
|
|
658
|
-
e(r).controlIssues(l).length ? (d(), u("small", {
|
|
659
|
-
key: 0,
|
|
660
|
-
id: `${C}-${e(p)}-${l}`,
|
|
661
|
-
class: "mr-param-editor__field-error"
|
|
662
|
-
}, i(e(r).controlIssues(l).join(";")), 9, Ya)) : b("", !0)
|
|
663
|
-
])), 64))
|
|
664
|
-
])) : b("", !0),
|
|
665
|
-
n("div", Aa, [
|
|
666
|
-
n("button", {
|
|
667
|
-
type: "button",
|
|
668
|
-
disabled: t.readonly || e(p) === 0,
|
|
669
|
-
onClick: o[15] || (o[15] = (l) => e(r).move(-1))
|
|
670
|
-
}, "↑ " + i(e(a).paramMoveUp), 9, Ja),
|
|
671
|
-
n("button", {
|
|
672
|
-
type: "button",
|
|
673
|
-
disabled: t.readonly || e(p) === e(y).length - 1,
|
|
674
|
-
onClick: o[16] || (o[16] = (l) => e(r).move(1))
|
|
675
|
-
}, "↓ " + i(e(a).paramMoveDown), 9, Ta),
|
|
676
|
-
n("button", {
|
|
677
|
-
type: "button",
|
|
678
|
-
class: "is-danger",
|
|
679
|
-
disabled: t.readonly,
|
|
680
|
-
onClick: o[17] || (o[17] = //@ts-ignore
|
|
681
|
-
(...l) => e(r).remove && e(r).remove(...l))
|
|
682
|
-
}, i(e(a).paramRemove), 9, Pa)
|
|
683
|
-
]),
|
|
684
|
-
n("details", ja, [
|
|
685
|
-
n("summary", null, i(e(a).paramWire), 1),
|
|
686
|
-
n("code", null, i(e(Me)[e(s).type]), 1)
|
|
687
|
-
])
|
|
688
|
-
], 64)) : (d(), u("div", qa, [
|
|
689
|
-
n("strong", null, i(e(a).paramEmpty), 1),
|
|
690
|
-
n("p", null, i(e(a).paramEmptyHint), 1),
|
|
691
|
-
n("button", {
|
|
692
|
-
type: "button",
|
|
693
|
-
disabled: t.readonly,
|
|
694
|
-
onClick: o[18] || (o[18] = //@ts-ignore
|
|
695
|
-
(...l) => e(r).add && e(r).add(...l))
|
|
696
|
-
}, "+ " + i(e(a).paramAdd), 9, Fa)
|
|
697
|
-
])),
|
|
698
|
-
e(x).added.length || e(x).removed.length ? (d(), u("aside", Ba, [
|
|
699
|
-
n("strong", null, i(e(a).paramChanges), 1),
|
|
700
|
-
e(x).added.length ? (d(), u("p", Wa, [
|
|
701
|
-
k(i(e(a).paramAdded) + ":", 1),
|
|
702
|
-
n("code", null, i(e(x).added.join(", ")), 1)
|
|
703
|
-
])) : b("", !0),
|
|
704
|
-
e(x).removed.length ? (d(), u("p", Ha, [
|
|
705
|
-
k(i(e(a).paramRemoved) + ":", 1),
|
|
706
|
-
n("code", null, i(e(x).removed.join(", ")), 1)
|
|
707
|
-
])) : b("", !0),
|
|
708
|
-
n("small", null, i(e(a).paramRenameHint), 1)
|
|
709
|
-
])) : b("", !0),
|
|
710
|
-
e(V) || e(j) ? (d(), u("p", wa, i(e(V) ? e(a).paramConflict : e(j)), 1)) : b("", !0),
|
|
711
|
-
n("footer", null, [
|
|
712
|
-
n("button", {
|
|
713
|
-
type: "button",
|
|
714
|
-
disabled: !e(E) && !e(V),
|
|
715
|
-
onClick: o[19] || (o[19] = //@ts-ignore
|
|
716
|
-
(...l) => e(r).reset && e(r).reset(...l))
|
|
717
|
-
}, i(e(a).paramRestore), 9, za),
|
|
718
|
-
n("button", {
|
|
719
|
-
type: "button",
|
|
720
|
-
class: "is-primary",
|
|
721
|
-
disabled: t.readonly || !e(E) || e(V) || !!e(Y).length,
|
|
722
|
-
onClick: o[20] || (o[20] = //@ts-ignore
|
|
723
|
-
(...l) => e(r).apply && e(r).apply(...l))
|
|
724
|
-
}, i(e(a).paramApply), 9, Ga)
|
|
725
|
-
])
|
|
726
|
-
], 512)
|
|
727
|
-
], 8, Ne));
|
|
728
|
-
}
|
|
729
|
-
}), tt = /* @__PURE__ */ oe(Ka, [["__scopeId", "data-v-276b7ccd"]]);
|
|
730
|
-
export {
|
|
731
|
-
tt as default
|
|
732
|
-
};
|