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