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