@agile-team/mach-report 2.23.0 → 2.23.1

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 (100) hide show
  1. package/README.md +3 -2
  2. package/dist/ExcelBindingWizard-BrTmdo7f.cjs +1 -0
  3. package/dist/ExcelBindingWizard-CcDMLO8Q.js +1486 -0
  4. package/dist/ParamEditor-BGjovFUe.js +737 -0
  5. package/dist/ParamEditor-CeNp4_zQ.cjs +1 -0
  6. package/dist/ReportBatchPanel-CHxBtG9R.cjs +1 -0
  7. package/dist/ReportBatchPanel-CJB67WNd.js +351 -0
  8. package/dist/ReportLabelStudio-Tplc1TLJ.js +784 -0
  9. package/dist/ReportLabelStudio-g8PkqJWn.cjs +1 -0
  10. package/dist/ReportParamPanel-C7fZTllk.cjs +1 -0
  11. package/dist/{ReportParamPanel-Dgmqro1Y.js → ReportParamPanel-GI43aGa0.js} +61 -56
  12. package/dist/{ReportPreview-FFIryrIr.cjs → ReportPreview-BoGBGyRr.cjs} +2 -2
  13. package/dist/{ReportPreview-DeWzG8jQ.js → ReportPreview-QLONCyci.js} +8 -8
  14. package/dist/ReportTemplateLibrary-BFQIX0sg.cjs +1 -0
  15. package/dist/ReportTemplateLibrary-KqX4E2sN.js +312 -0
  16. package/dist/RuleEditor-BZUP9yvL.cjs +1 -0
  17. package/dist/RuleEditor-OPX1awrH.js +2342 -0
  18. package/dist/TemplateOutlinePanel-CVYKVLv_.cjs +1 -0
  19. package/dist/TemplateOutlinePanel-DQS-eOs6.js +97 -0
  20. package/dist/TemplateReusePanel-CY6O93Zk.cjs +1 -0
  21. package/dist/TemplateReusePanel-DKXiFTyB.js +389 -0
  22. package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +1 -0
  23. package/dist/TemplateReviewPanel-Dijwm9YE.js +593 -0
  24. package/dist/artifact-integrity.json +68 -68
  25. package/dist/{auto-CTIJ6PnR.js → auto-BB99S802.js} +4 -4
  26. package/dist/{auto-4pK9HePf.cjs → auto-BrPWo7Xm.cjs} +1 -1
  27. package/dist/designer-BZoVWTgl.js +7172 -0
  28. package/dist/designer-zS2uKJmY.cjs +2 -0
  29. package/dist/designer.cjs +1 -1
  30. package/dist/designer.d.cts +7 -0
  31. package/dist/designer.d.ts +7 -0
  32. package/dist/designer.js +2 -2
  33. package/dist/{encoding-BefcaHdp.cjs → encoding-7lquyj0w.cjs} +1 -1
  34. package/dist/{encoding-CL6rXEkR.js → encoding-CEd-dq9A.js} +2 -2
  35. package/dist/{font-loader-BT5baV-o.js → font-loader-CNWXomuV.js} +1 -1
  36. package/dist/{font-loader-Ga51c2VC.cjs → font-loader-D8pI87fL.cjs} +1 -1
  37. package/dist/index.cjs +1 -1
  38. package/dist/index.js +7 -7
  39. package/dist/{json-snapshot-OqkPyUk5.js → json-snapshot-BRnzKudk.js} +1 -1
  40. package/dist/{json-snapshot-1tvQNzQE.cjs → json-snapshot-DNiIbpOr.cjs} +1 -1
  41. package/dist/{pdf-aobetCsy.js → pdf-CJToa81Z.js} +2 -2
  42. package/dist/{pdf-HiEeXe9H.cjs → pdf-DpMkW72B.cjs} +1 -1
  43. package/dist/pdf.cjs +1 -1
  44. package/dist/pdf.js +2 -2
  45. package/dist/{plugin-BFANt-i8.cjs → plugin-BWTp-X7b.cjs} +1 -1
  46. package/dist/{plugin-DeYYAL6F.js → plugin-_BkUVc2z.js} +1 -1
  47. package/dist/{prefill-Dk4C6S5R.js → prefill-CWGdnqQd.js} +1 -1
  48. package/dist/{prefill-DsUD5OoK.cjs → prefill-PaAy6wLk.cjs} +1 -1
  49. package/dist/{prepared-DCIxhKFo.js → prepared-CJy_qk7d.js} +1 -1
  50. package/dist/{prepared-Dv-XM3i1.cjs → prepared-D0yCSxSO.cjs} +1 -1
  51. package/dist/{protocol-DxeUKGYG.js → protocol-BG16rz6D.js} +2 -2
  52. package/dist/{protocol-B9YgfQ_d.cjs → protocol-wzhl1Fim.cjs} +1 -1
  53. package/dist/report-encoding-worker.cjs +1 -1
  54. package/dist/report-encoding-worker.js +1 -1
  55. package/dist/{runtime-DKlGd_D4.cjs → runtime-DYMOS_gz.cjs} +1 -1
  56. package/dist/{runtime-75Y5Oq5B.js → runtime-PiCax9zQ.js} +2 -2
  57. package/dist/sbom.cdx.json +1 -1
  58. package/dist/server-node.cjs +4 -4
  59. package/dist/server-node.js +737 -736
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.js +5 -5
  62. package/dist/style.css +1 -1
  63. package/dist/{template-catalog--cjxzgH7.js → template-catalog-CRuZL3pi.js} +1 -1
  64. package/dist/{template-catalog-CoT7jm_6.cjs → template-catalog-DtrtT1FY.cjs} +1 -1
  65. package/dist/textwrap-D4ZksyMK.js +111 -0
  66. package/dist/textwrap-DEHqAjKZ.cjs +4 -0
  67. package/dist/vue/async.d.cts +7 -0
  68. package/dist/vue/async.d.ts +7 -0
  69. package/dist/vue/index.d.cts +7 -0
  70. package/dist/vue/index.d.ts +7 -0
  71. package/dist/vue-async.cjs +1 -1
  72. package/dist/vue-async.js +3 -3
  73. package/dist/vue.cjs +1 -1
  74. package/dist/vue.js +6 -6
  75. package/dist/worker.cjs +1 -1
  76. package/dist/worker.js +4 -4
  77. package/package.json +1 -1
  78. package/dist/ExcelBindingWizard-D4FLind-.js +0 -1485
  79. package/dist/ExcelBindingWizard-D4RS5Bpg.cjs +0 -1
  80. package/dist/ParamEditor-C-6C9rd2.cjs +0 -1
  81. package/dist/ParamEditor-CASZt-Ma.js +0 -732
  82. package/dist/ReportBatchPanel-Bq7t8a5r.js +0 -350
  83. package/dist/ReportBatchPanel-YVj5IO5y.cjs +0 -1
  84. package/dist/ReportLabelStudio-Cqhita1b.cjs +0 -1
  85. package/dist/ReportLabelStudio-Dj7GXhuv.js +0 -783
  86. package/dist/ReportParamPanel-DZbFVmDL.cjs +0 -1
  87. package/dist/ReportTemplateLibrary-BaWodmpm.cjs +0 -1
  88. package/dist/ReportTemplateLibrary-DdAAAD2I.js +0 -311
  89. package/dist/RuleEditor-D2UwQGF6.js +0 -2341
  90. package/dist/RuleEditor-DcT9xI1v.cjs +0 -1
  91. package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +0 -1
  92. package/dist/TemplateOutlinePanel-DrT7XN0m.js +0 -96
  93. package/dist/TemplateReusePanel-4eejkNqi.js +0 -388
  94. package/dist/TemplateReusePanel-DZMyiX5I.cjs +0 -1
  95. package/dist/TemplateReviewPanel-BIhNLeNw.js +0 -592
  96. package/dist/TemplateReviewPanel-DnYImiXu.cjs +0 -1
  97. package/dist/designer-DhrE7jzw.js +0 -7169
  98. package/dist/designer-IAZu6kBX.cjs +0 -2
  99. package/dist/textwrap-BIjtEWmq.js +0 -110
  100. package/dist/textwrap-Cy7o1hIR.cjs +0 -4
@@ -1,1485 +0,0 @@
1
- import { defineComponent as ze, ref as K, computed as S, watch as re, nextTick as Be, openBlock as d, createElementBlock as c, createElementVNode as n, createTextVNode as L, toDisplayString as l, createVNode as W, Fragment as V, renderList as U, normalizeClass as Re, createCommentVNode as T, unref as e, withDirectives as Ne, vModelText as tt, shallowRef as nt, onBeforeUnmount as at, normalizeStyle as lt, createBlock as ot, vShow as it } from "vue";
2
- import { o as pe, q as Ee, f as st, n as rt, m as ut, h as dt, k as ct, v as vt, i as gt, p as ft, d as bt, c as mt, e as ht, a as yt, g as pt } from "./region-binding-workflow-DjrXuR1q.js";
3
- import { a as H } from "./_plugin-vue_export-helper-8SL1F89S.js";
4
- import { E as wt, u as kt } from "./designer-DhrE7jzw.js";
5
- import { u as $t } from "./useLocalDraft-BnhcxXk_.js";
6
- function Ae(t, x) {
7
- const g = /^\$\.datasets\[(\d+)\]/.exec(t.path)?.[1];
8
- return g !== void 0 ? x[Number(g)]?.id : x.find((m) => t.path.startsWith(`$.datasets.${m.id}.samples`))?.id;
9
- }
10
- function Le(t, x) {
11
- const g = /\.fields\[(\d+)\]/.exec(t)?.[1];
12
- return g !== void 0 ? { control: "field", fieldIndex: Number(g) } : { control: t.split(".").at(-1) || x };
13
- }
14
- function Pe(t, x, g) {
15
- const m = /^\$\.recipe\.regions\[(\d+)\]/.exec(t.path)?.[1], p = Ae(t, g), o = m === void 0 ? x.regions.find((R) => R.dataset === p) : x.regions[Number(m)];
16
- if (!o) return { control: t.path.endsWith("footerRange") ? "footer" : "regions", ...x.footerRange ? { range: x.footerRange } : {} };
17
- if (t.path.startsWith("$.datasets")) return { regionId: o.id, range: o.range, control: t.code === "row-key" ? "rowKey" : "contract" };
18
- const E = Le(t.path, "range"), C = t.code === "row-key" ? "rowKey" : E.control.startsWith("regions[") ? "range" : E.control;
19
- return { ...E, control: C, regionId: o.id, range: o.range };
20
- }
21
- function xt(t, x, g) {
22
- if (t.path.startsWith("$.datasets")) {
23
- const p = Ae(t, g);
24
- return p === void 0 ? [] : x.regions.filter((o) => o.dataset === p).map((o) => o.id);
25
- }
26
- const m = Pe(t, x, g).regionId;
27
- return m ? [m] : [];
28
- }
29
- function Ct(t, x) {
30
- const g = /^\$\.recipe\.regions\.(title|header|detail|footer)$/.exec(t.path)?.[1];
31
- return g ? { control: g, range: x.regions[g] } : t.path.startsWith("$.datasets") ? { control: t.code === "row-key" ? "rowKey" : "contract", range: x.regions.detail } : { ...Le(t.path, "detail"), range: x.regions.detail };
32
- }
33
- function ye(t) {
34
- if (t.range)
35
- try {
36
- const x = pe(t.range);
37
- return t.fieldIndex !== void 0 && (x.left = x.right = x.left + t.fieldIndex), x;
38
- } catch {
39
- return;
40
- }
41
- }
42
- function Rt(t, x, g) {
43
- return x.control === "dataset" ? !g.dataset : x.control === "rowKey" ? !g.rowKey : x.control === "field" && x.fieldIndex !== void 0 ? !g.fields[x.fieldIndex] : !1;
44
- }
45
- const It = ["aria-label"], Mt = { class: "mr-binding-group" }, St = { class: "mr-binding-note" }, Kt = ["title", "disabled"], Et = {
46
- class: "mr-binding-region-list",
47
- role: "list",
48
- tabindex: "-1",
49
- "data-binding-control": "regions"
50
- }, Ft = ["data-state"], Dt = ["aria-pressed", "onClick"], Tt = ["title"], zt = { class: "mr-binding-region-state" }, Bt = { key: 0 }, Nt = ["aria-label", "disabled", "onClick"], At = ["disabled"], Lt = {
51
- key: 0,
52
- class: "mr-binding-group"
53
- }, Pt = {
54
- class: "mr-binding-label",
55
- tabindex: "-1"
56
- }, _t = ["value", "aria-label"], Wt = { class: "mr-binding-label" }, Ht = ["value", "aria-label"], qt = { value: "record" }, Ot = { value: "repeat" }, Vt = { class: "mr-binding-note" }, Jt = {
57
- class: "mr-binding-label",
58
- tabindex: "-1"
59
- }, Ut = ["value", "aria-label"], jt = { value: "" }, Gt = ["value"], Xt = {
60
- key: 0,
61
- class: "mr-binding-label",
62
- tabindex: "-1"
63
- }, Qt = ["value", "aria-label"], Yt = { value: "" }, Zt = ["value"], en = { class: "mr-binding-region-tools" }, tn = ["disabled"], nn = ["aria-label"], an = {
64
- key: 1,
65
- class: "mr-binding-mappings"
66
- }, ln = { class: "mr-binding-field-search" }, on = ["placeholder", "aria-label"], sn = {
67
- key: 0,
68
- class: "mr-binding-note"
69
- }, rn = ["data-binding-control", "value", "onChange", "aria-label"], un = { value: "" }, dn = ["value"], cn = { key: 0 }, vn = {
70
- key: 2,
71
- class: "mr-binding-map-pages"
72
- }, gn = ["disabled", "aria-label"], fn = ["disabled", "aria-label"], bn = {
73
- key: 3,
74
- class: "mr-binding-concurrency"
75
- }, mn = ["data-binding-control", "value", "onChange"], hn = { value: "" }, yn = ["value"], pn = {
76
- class: "mr-binding-group",
77
- tabindex: "-1",
78
- "data-binding-control": "footer"
79
- }, wn = { class: "mr-binding-note" }, kn = { class: "mr-binding-region-tools" }, $n = ["disabled"], xn = ["aria-label"], Cn = /* @__PURE__ */ ze({
80
- __name: "ExcelRegionBindingPanel",
81
- props: {
82
- controller: {},
83
- datasets: {},
84
- disabled: { type: Boolean },
85
- messages: {}
86
- },
87
- setup(t) {
88
- const x = t, g = K(0), m = K(), p = K(""), o = x.controller.active, E = S(() => x.datasets.find((y) => y.id === o.value?.dataset)), C = S(() => {
89
- if (!o.value) return [];
90
- let y = 1;
91
- try {
92
- y = pe(o.value.range).left;
93
- } catch {
94
- }
95
- return o.value.fields.slice(g.value * 12, g.value * 12 + 12).map(($, r) => ({ field: $, index: g.value * 12 + r, physical: Ee(y + g.value * 12 + r) }));
96
- }), R = S(() => Math.max(1, Math.ceil((o.value?.fields.length ?? 0) / 12))), N = S(() => {
97
- const y = p.value.trim().toLocaleLowerCase(), $ = E.value?.fields ?? [], r = $.filter((z) => [z.field, z.label, z.unit].some((Z) => Z?.toLocaleLowerCase().includes(y))).slice(0, 64), M = new Set(C.value.map((z) => z.field));
98
- return [...r, ...$.filter((z) => M.has(z.field) && !r.includes(z))];
99
- });
100
- function j(y) {
101
- return y.target.value;
102
- }
103
- function le(y) {
104
- x.controller.setActive(y), g.value = 0, p.value = "";
105
- }
106
- re(() => x.controller.focusTarget.value, async (y) => {
107
- if (!y) return;
108
- g.value = Math.floor((y.target.fieldIndex ?? 0) / 12), p.value = "", await Be();
109
- const $ = y.target.control === "field" ? `field-${y.target.fieldIndex}` : y.target.control === "contract" ? "dataset" : y.target.control, r = m.value?.querySelector(`[data-binding-control="${$}"]`), M = r?.closest("details");
110
- M && (M.open = !0);
111
- const z = x.disabled && r?.matches("input,select,textarea,button") ? r.closest("label") : r;
112
- z?.focus(), z?.scrollIntoView?.({ block: "nearest" });
113
- });
114
- function oe(y) {
115
- if (!(!o.value || x.disabled)) {
116
- o.value.range = j(y);
117
- try {
118
- const $ = pe(o.value.range), r = $.right - $.left + 1;
119
- r <= 2048 && (o.value.fields = Array.from({ length: r }, (M, z) => o.value.fields[z] ?? ""));
120
- } catch {
121
- }
122
- }
123
- }
124
- return (y, $) => (d(), c("section", {
125
- ref_key: "panel",
126
- ref: m,
127
- class: "mr-binding-multi",
128
- "aria-label": t.messages.multiRegions
129
- }, [
130
- n("div", Mt, [
131
- n("h3", null, [
132
- L(l(t.messages.multiRegions), 1),
133
- n("span", null, l(t.controller.recipe.value.regions.length) + "/128", 1)
134
- ]),
135
- n("p", St, l(t.messages.multiHint), 1),
136
- n("button", {
137
- type: "button",
138
- class: "mr-binding-add-region",
139
- title: t.controller.recipe.value.regions.length >= 128 ? t.messages.limitRegions : t.controller.selection.value ? t.messages.addRegion : t.messages.noCellSelection,
140
- disabled: t.disabled || !t.controller.selection.value || t.controller.recipe.value.regions.length >= 128,
141
- onClick: $[0] || ($[0] = //@ts-ignore
142
- (...r) => t.controller.add && t.controller.add(...r))
143
- }, [
144
- W(H, {
145
- name: "grid",
146
- size: 13
147
- }),
148
- L(l(t.messages.addRegion), 1),
149
- n("code", null, l(t.controller.selection.value || "—"), 1)
150
- ], 8, Kt),
151
- n("div", Et, [
152
- (d(!0), c(V, null, U(t.controller.directory.value, (r) => (d(), c("div", {
153
- key: r.region.id,
154
- class: Re(["mr-binding-region-entry", { "is-active": r.region.id === t.controller.activeId.value }]),
155
- "data-state": r.state
156
- }, [
157
- n("button", {
158
- type: "button",
159
- "aria-pressed": r.region.id === t.controller.activeId.value,
160
- onClick: (M) => le(r.region.id)
161
- }, [
162
- n("strong", {
163
- title: r.region.id
164
- }, l(r.region.id), 9, Tt),
165
- n("code", null, l(r.region.range), 1),
166
- n("small", null, l(r.region.mode === "record" ? t.messages.recordMode : t.messages.repeatMode) + " · " + l(r.region.dataset || t.messages.chooseDataset), 1),
167
- n("span", zt, [
168
- L(l(r.state === "ready" ? t.messages.regionReady : r.state === "pending" ? t.messages.regionPending : t.messages.regionError), 1),
169
- r.issues.length ? (d(), c("span", Bt, " · " + l(r.issues.length), 1)) : T("", !0)
170
- ])
171
- ], 8, Dt),
172
- n("button", {
173
- type: "button",
174
- "aria-label": `${t.messages.removeRegion} ${r.region.id}`,
175
- disabled: t.disabled,
176
- onClick: (M) => t.controller.remove(r.region.id)
177
- }, [
178
- W(H, {
179
- name: "close",
180
- size: 12
181
- })
182
- ], 8, Nt)
183
- ], 10, Ft))), 128))
184
- ])
185
- ]),
186
- n("fieldset", {
187
- disabled: t.disabled,
188
- class: "mr-binding-region-editor"
189
- }, [
190
- e(o) ? (d(), c("section", Lt, [
191
- n("h3", null, [
192
- L(l(t.messages.regionProperties), 1),
193
- n("code", null, l(e(o).id), 1)
194
- ]),
195
- n("label", Pt, [
196
- L(l(t.messages.regionCoordinates), 1),
197
- n("input", {
198
- "data-binding-control": "range",
199
- value: e(o).range,
200
- "aria-label": t.messages.regionCoordinates,
201
- onChange: oe
202
- }, null, 40, _t)
203
- ]),
204
- n("label", Wt, [
205
- L(l(t.messages.regionMode), 1),
206
- n("select", {
207
- value: e(o).mode,
208
- "aria-label": t.messages.regionMode,
209
- onChange: $[1] || ($[1] = (r) => t.controller.property("mode", j(r)))
210
- }, [
211
- n("option", qt, l(t.messages.recordMode), 1),
212
- n("option", Ot, l(t.messages.repeatMode), 1)
213
- ], 40, Ht)
214
- ]),
215
- n("p", Vt, l(e(o).mode === "record" ? t.messages.recordHint : t.messages.repeatHint), 1),
216
- n("label", Jt, [
217
- L(l(t.messages.dataset), 1),
218
- n("select", {
219
- "data-binding-control": "dataset",
220
- value: e(o).dataset,
221
- "aria-label": t.messages.dataset,
222
- onChange: $[2] || ($[2] = (r) => t.controller.dataset(j(r)))
223
- }, [
224
- n("option", jt, l(t.messages.chooseDataset), 1),
225
- (d(!0), c(V, null, U(t.datasets, (r) => (d(), c("option", {
226
- key: r.id,
227
- value: r.id
228
- }, l(r.label || r.id), 9, Gt))), 128))
229
- ], 40, Ut)
230
- ]),
231
- E.value ? (d(), c("label", Xt, [
232
- L(l(t.messages.rowKey), 1),
233
- n("select", {
234
- "data-binding-control": "rowKey",
235
- value: e(o).rowKey,
236
- "aria-label": t.messages.rowKey,
237
- onChange: $[3] || ($[3] = (r) => t.controller.property("rowKey", j(r)))
238
- }, [
239
- n("option", Yt, l(t.messages.chooseRowKey), 1),
240
- (d(!0), c(V, null, U(E.value.fields.filter((r) => r.type !== "boolean"), (r) => (d(), c("option", {
241
- key: r.field,
242
- value: r.field
243
- }, l(r.label || r.field), 9, Zt))), 128))
244
- ], 40, Qt)
245
- ])) : T("", !0),
246
- n("div", en, [
247
- n("button", {
248
- type: "button",
249
- disabled: !t.controller.selection.value,
250
- onClick: $[4] || ($[4] = //@ts-ignore
251
- (...r) => t.controller.header && t.controller.header(...r))
252
- }, l(t.messages.bindRegionHeader), 9, tn),
253
- n("code", null, l(e(o).headerRange || t.messages.noRegionHeader), 1),
254
- e(o).headerRange ? (d(), c("button", {
255
- key: 0,
256
- type: "button",
257
- "aria-label": t.messages.clearHeader,
258
- onClick: $[5] || ($[5] = //@ts-ignore
259
- (...r) => t.controller.clearHeader && t.controller.clearHeader(...r))
260
- }, [
261
- W(H, {
262
- name: "close",
263
- size: 11
264
- })
265
- ], 8, nn)) : T("", !0)
266
- ]),
267
- E.value ? (d(), c("div", an, [
268
- n("label", ln, [
269
- W(H, {
270
- name: "search",
271
- size: 13
272
- }),
273
- Ne(n("input", {
274
- "onUpdate:modelValue": $[6] || ($[6] = (r) => p.value = r),
275
- type: "search",
276
- placeholder: t.messages.searchFields,
277
- "aria-label": t.messages.searchFields
278
- }, null, 8, on), [
279
- [tt, p.value]
280
- ])
281
- ]),
282
- E.value.fields.length > 64 ? (d(), c("small", sn, l(t.messages.fieldLimit), 1)) : T("", !0),
283
- (d(!0), c(V, null, U(C.value, (r) => (d(), c("label", {
284
- key: r.index,
285
- class: "mr-binding-map",
286
- tabindex: "-1"
287
- }, [
288
- n("span", null, l(r.physical), 1),
289
- n("div", null, [
290
- n("select", {
291
- "data-binding-control": `field-${r.index}`,
292
- value: e(o).fields[r.index],
293
- onChange: (M) => t.controller.mapping(r.index, j(M)),
294
- "aria-label": `${t.messages.physical} ${r.physical} · ${t.messages.business}`
295
- }, [
296
- n("option", un, l(t.messages.chooseField), 1),
297
- (d(!0), c(V, null, U(N.value, (M) => (d(), c("option", {
298
- key: M.field,
299
- value: M.field
300
- }, l(M.label || M.field) + " · " + l(M.field), 9, dn))), 128))
301
- ], 40, rn),
302
- r.field ? (d(), c("small", cn, l(E.value.fields.find((M) => M.field === r.field)?.type) + " · " + l(E.value.fields.find((M) => M.field === r.field)?.unit || "—"), 1)) : T("", !0)
303
- ])
304
- ]))), 128))
305
- ])) : T("", !0),
306
- R.value > 1 ? (d(), c("div", vn, [
307
- n("button", {
308
- type: "button",
309
- disabled: g.value <= 0,
310
- "aria-label": t.messages.previousColumns,
311
- onClick: $[7] || ($[7] = (r) => g.value--)
312
- }, [
313
- W(H, {
314
- name: "chevron-left",
315
- size: 13
316
- })
317
- ], 8, gn),
318
- n("span", null, l(g.value + 1) + "/" + l(R.value), 1),
319
- n("button", {
320
- type: "button",
321
- disabled: g.value + 1 >= R.value,
322
- "aria-label": t.messages.nextColumns,
323
- onClick: $[8] || ($[8] = (r) => g.value++)
324
- }, [
325
- W(H, {
326
- name: "chevron-right",
327
- size: 13
328
- })
329
- ], 8, fn)
330
- ])) : T("", !0),
331
- E.value ? (d(), c("details", bn, [
332
- n("summary", null, l(t.messages.concurrency), 1),
333
- (d(), c(V, null, U(["revisionField", "sourceTokenField"], (r) => n("label", {
334
- key: r,
335
- class: "mr-binding-label",
336
- tabindex: "-1"
337
- }, [
338
- L(l(r === "revisionField" ? t.messages.revisionField : t.messages.sourceTokenField), 1),
339
- n("select", {
340
- "data-binding-control": r,
341
- value: e(o)[r] || "",
342
- onChange: (M) => t.controller.property(r, j(M))
343
- }, [
344
- n("option", hn, l(t.messages.optional), 1),
345
- (d(!0), c(V, null, U(E.value.fields, (M) => (d(), c("option", {
346
- key: M.field,
347
- value: M.field
348
- }, l(M.label || M.field), 9, yn))), 128))
349
- ], 40, mn)
350
- ])), 64))
351
- ])) : T("", !0)
352
- ])) : T("", !0),
353
- n("section", pn, [
354
- n("h3", null, l(t.messages.flowFooter), 1),
355
- n("p", wn, l(t.messages.flowFooterHint), 1),
356
- n("div", kn, [
357
- n("button", {
358
- type: "button",
359
- disabled: !t.controller.selection.value,
360
- onClick: $[9] || ($[9] = //@ts-ignore
361
- (...r) => t.controller.footer && t.controller.footer(...r))
362
- }, l(t.messages.bindFooter), 9, $n),
363
- n("code", null, l(t.controller.recipe.value.footerRange || "—"), 1),
364
- t.controller.recipe.value.footerRange ? (d(), c("button", {
365
- key: 0,
366
- type: "button",
367
- "aria-label": t.messages.clearFooter,
368
- onClick: $[10] || ($[10] = //@ts-ignore
369
- (...r) => t.controller.clearFooter && t.controller.clearFooter(...r))
370
- }, [
371
- W(H, {
372
- name: "close",
373
- size: 11
374
- })
375
- ], 8, xn)) : T("", !0)
376
- ])
377
- ])
378
- ], 8, At)
379
- ], 8, It));
380
- }
381
- });
382
- function Te(t = "") {
383
- return { version: "2.0", sheet: t, regions: [] };
384
- }
385
- function Rn(t, x, g, m) {
386
- const p = K(Te()), o = K(""), E = K(), C = K(), R = K(), N = S(() => !t.value || !C.value || !R.value ? "" : st(t.value, x.value, C.value, R.value)), j = S(() => ({ ...p.value, regions: p.value.regions.map((v) => ({ ...v, fields: [] })) })), le = S(() => t.value ? rt(t.value, j.value) : []), oe = S(() => {
387
- const v = ut(p.value, m()), w = [...le.value, ...v.issues];
388
- return { ...v, ok: !w.length, issues: w };
389
- }), y = S(() => p.value.regions.find((v) => v.id === o.value));
390
- function $(v) {
391
- return Pe(v, p.value, m());
392
- }
393
- const r = S(() => {
394
- const v = /* @__PURE__ */ new Map();
395
- for (const w of oe.value.issues) {
396
- const _ = $(w);
397
- for (const b of xt(w, p.value, m())) {
398
- const q = v.get(b) ?? [];
399
- q.push({ issue: w, target: { ..._, regionId: b } }), v.set(b, q);
400
- }
401
- }
402
- return p.value.regions.map((w) => {
403
- const _ = v.get(w.id) ?? [], b = _.length ? _.every((q) => Rt(q.issue, q.target, w)) ? "pending" : "error" : "ready";
404
- return { region: w, state: b, issues: _ };
405
- });
406
- });
407
- function M(v = Te(x.value)) {
408
- p.value = JSON.parse(JSON.stringify(v)), o.value = p.value.regions[0]?.id ?? "", C.value = void 0, R.value = void 0, E.value = void 0;
409
- }
410
- function z(v) {
411
- v.regionId && (o.value = v.regionId);
412
- const w = ye(v);
413
- w && (C.value = { row: w.top, column: w.left }, R.value = { row: w.bottom, column: w.right }), E.value = { target: v, sequence: (E.value?.sequence ?? 0) + 1 };
414
- }
415
- function Z(v) {
416
- z($(v));
417
- }
418
- function u(v, w, _) {
419
- g.value || ((!_ || !C.value) && (C.value = { row: v, column: w }), R.value = { row: v, column: w });
420
- }
421
- function A() {
422
- if (g.value || !N.value || p.value.regions.length >= 128) return;
423
- let v = 1;
424
- for (; p.value.regions.some((b) => b.id === `region-${v}`); ) v++;
425
- const w = `region-${v}`, _ = Math.abs(R.value.column - C.value.column) + 1;
426
- p.value.regions.push({ id: w, range: N.value, mode: "repeat", dataset: "", fields: Array.from({ length: _ }, () => ""), rowKey: "" }), o.value = w;
427
- }
428
- function ne(v) {
429
- g.value || (p.value.regions = p.value.regions.filter((w) => w.id !== v), o.value === v && (o.value = p.value.regions[0]?.id ?? ""));
430
- }
431
- function P(v) {
432
- !g.value && y.value && (y.value.dataset = v, y.value.rowKey = "", y.value.fields.fill(""), delete y.value.revisionField, delete y.value.sourceTokenField);
433
- }
434
- function Q(v, w) {
435
- if (!(g.value || !y.value)) {
436
- if (v === "mode") {
437
- (w === "record" || w === "repeat") && (y.value.mode = w);
438
- return;
439
- }
440
- w || v === "rowKey" ? y.value[v] = w : delete y.value[v];
441
- }
442
- }
443
- function I(v, w) {
444
- !g.value && y.value && v >= 0 && v < y.value.fields.length && (y.value.fields[v] = w);
445
- }
446
- function J() {
447
- !g.value && y.value && delete y.value.headerRange;
448
- }
449
- function G() {
450
- !g.value && y.value && N.value && (y.value.headerRange = N.value);
451
- }
452
- function X() {
453
- !g.value && N.value && (p.value.footerRange = N.value);
454
- }
455
- function O() {
456
- g.value || delete p.value.footerRange;
457
- }
458
- function ee(v) {
459
- const w = p.value.regions.find((_) => _.id === v);
460
- w && z({ regionId: v, control: "range", range: w.range });
461
- }
462
- function te(v, w) {
463
- return !!C.value && !!R.value && v >= Math.min(C.value.row, R.value.row) && v <= Math.max(C.value.row, R.value.row) && w >= Math.min(C.value.column, R.value.column) && w <= Math.max(C.value.column, R.value.column);
464
- }
465
- return { recipe: p, activeId: o, active: y, selection: N, validation: oe, directory: r, focusTarget: E, target: $, locate: Z, reset: M, select: u, add: A, remove: ne, dataset: P, property: Q, mapping: I, header: G, clearHeader: J, footer: X, clearFooter: O, setActive: ee, selected: te };
466
- }
467
- function he(t = "", x = 0) {
468
- return {
469
- version: "1.0",
470
- sheet: t,
471
- dataset: "",
472
- regions: { header: "", detail: "" },
473
- fields: Array.from({ length: x }, () => ""),
474
- rowKey: ""
475
- };
476
- }
477
- function Ce(t) {
478
- return t instanceof Error ? t.message : String(t);
479
- }
480
- function In(t, x) {
481
- const g = nt(), m = K(he()), p = K("table"), o = Rn(g, S(() => m.value.sheet), S(() => q.value), () => t.datasets), E = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), R = K({ table: [], regions: [] });
482
- function N() {
483
- E.clear(), C.clear(), R.value = { table: [], regions: [] };
484
- }
485
- function j() {
486
- m.value.sheet && (E.set(m.value.sheet, le(m.value)), C.set(m.value.sheet, JSON.parse(JSON.stringify(o.recipe.value))), R.value = { table: [...E.values()], regions: [...C.values()] });
487
- }
488
- const le = (i) => JSON.parse(JSON.stringify(i));
489
- function oe(i, f) {
490
- return le(E.get(i) ?? he(i, f));
491
- }
492
- const y = K({
493
- id: t.identity?.id ?? "excel-template",
494
- name: t.identity?.name ?? "Excel 业务模板"
495
- }), $ = K(""), r = K(!1), M = () => ({ recipe: m.value, regions: o.recipe.value, mode: p.value, cached: R.value, identity: y.value });
496
- let z;
497
- function Z(i) {
498
- m.value = le(i.recipe), o.reset(i.regions), p.value = i.mode, y.value = { ...i.identity, ...t.lockId && t.identity ? { id: t.identity.id } : {} }, N();
499
- for (const f of i.cached.table) E.set(f.sheet, f);
500
- for (const f of i.cached.regions) C.set(f.sheet, f);
501
- R.value = i.cached;
502
- }
503
- const u = K(0), A = $t(() => ({ source: u.value, recipe: m.value, mode: p.value, regions: o.recipe.value, cached: R.value, identity: y.value })), ne = K([]);
504
- let P;
505
- function Q() {
506
- P?.dispose(), P = void 0;
507
- }
508
- const I = K(""), J = K(!1), G = K(!1), X = K(!1), O = K(!1), ee = K(1), te = K(1), v = K(), w = K(), _ = K(0), b = S(() => ({ ...wt, ...t.messages })), q = S(() => !!t.readonly || J.value || O.value), ve = S(() => !J.value && !O.value), ie = S(
509
- () => g.value?.sheets.find((i) => i.name === m.value.sheet)
510
- ), B = S(
511
- () => ie.value ? pe(ie.value.range) : void 0
512
- ), we = S(
513
- () => t.datasets.find((i) => i.id === m.value.dataset)
514
- ), Ie = S(
515
- () => g.value && ie.value ? dt(g.value, ie.value.name, {
516
- row: ee.value,
517
- column: te.value
518
- }) : void 0
519
- ), Me = S(
520
- () => g.value ? ct(g.value, m.value) : []
521
- ), Se = S(() => {
522
- if (!g.value) return { ok: !1, issues: [], mapped: 0, total: 0 };
523
- const i = vt(
524
- g.value,
525
- m.value,
526
- t.datasets
527
- ), f = [...Me.value, ...i.issues];
528
- return { ...i, ok: f.length === 0, issues: f };
529
- }), ue = S(() => p.value === "regions" ? o.validation.value : Se.value), fe = K(), be = S(() => p.value === "regions" ? o.focusTarget.value : fe.value);
530
- function h(i) {
531
- return p.value === "regions" ? o.target(i) : Ct(i, m.value);
532
- }
533
- function s(i) {
534
- const f = { dataset: b.value.dataset, contract: b.value.dataContract, rowKey: b.value.rowKey, range: b.value.regionCoordinates, field: b.value.mapping, fields: b.value.mapping, footer: b.value.flowFooter, header: b.value.headerRegion, detail: b.value.detailRegion, title: b.value.titleRegion, sheet: b.value.sheet, regions: p.value === "regions" ? b.value.multiRegions : b.value.regionLegend, revisionField: b.value.revisionField, sourceTokenField: b.value.sourceTokenField }, F = ye(i), D = i.fieldIndex === void 0 ? "" : ` ${Ee(F?.left ?? i.fieldIndex + 1)}`;
535
- return `${i.regionId ? `${i.regionId} · ` : ""}${f[i.control] ?? b.value.regionCoordinates}${D}`;
536
- }
537
- const a = S(() => ue.value.issues.map((i) => ({
538
- issue: i,
539
- label: s(h(i)),
540
- message: i.message.replace(/\$\.recipe\.regions\[(\d+)\]/g, (f, F) => o.recipe.value.regions[Number(F)]?.id ?? b.value.regionProperties)
541
- })));
542
- function k(i) {
543
- return i ? { dataset: b.value.nextDataset, rowKey: b.value.nextRowKey, field: b.value.nextField, fields: b.value.nextField, range: b.value.nextRange, regions: b.value.nextRegion, footer: b.value.nextFooter, header: b.value.nextHeader, detail: b.value.nextHeader, title: b.value.nextHeader }[i.control] ?? b.value.nextContract : p.value === "regions" ? b.value.nextRegion : b.value.nextHeader;
544
- }
545
- const Y = S(() => t.readonly ? b.value.readonly : J.value ? b.value.loading : O.value ? b.value.applying : X.value ? b.value.applied : ue.value.ok ? b.value.ready : k(ue.value.issues[0] ? h(ue.value.issues[0]) : void 0));
546
- re(be, (i) => {
547
- const f = i && ye(i.target);
548
- !f || !B.value || (ee.value = Math.max(B.value.top, Math.min(B.value.bottom, f.top)), te.value = Math.max(B.value.left, Math.min(B.value.right, f.left)));
549
- });
550
- function ke(i) {
551
- if (p.value === "regions") {
552
- o.locate(i);
553
- return;
554
- }
555
- const f = h(i), F = ye(f);
556
- F && (v.value = F.top, w.value = F.bottom), f.fieldIndex !== void 0 && (_.value = Math.floor(f.fieldIndex / 12)), fe.value = { target: f, sequence: (fe.value?.sequence ?? 0) + 1 };
557
- }
558
- const $e = S(
559
- () => m.value.fields.slice(_.value * 12, (_.value + 1) * 12).map((i, f) => ({
560
- index: _.value * 12 + f,
561
- field: i,
562
- physical: Ee(
563
- (B.value?.left ?? 1) + _.value * 12 + f
564
- )
565
- }))
566
- ), _e = S(
567
- () => we.value?.fields.filter((i) => i.type !== "boolean") ?? []
568
- ), xe = S(
569
- () => v.value !== void 0 && w.value !== void 0 ? {
570
- top: Math.min(v.value, w.value),
571
- bottom: Math.max(v.value, w.value)
572
- } : void 0
573
- );
574
- let se, ae = 0;
575
- function de() {
576
- ae++, se?.abort(), se = void 0, J.value = !1;
577
- }
578
- function me() {
579
- ee.value = B.value?.top ?? 1, te.value = B.value?.left ?? 1, v.value = void 0, w.value = void 0, _.value = 0, G.value = !1, X.value = !1;
580
- }
581
- function Fe(i) {
582
- de();
583
- try {
584
- const f = i.version === "2.0" ? gt(i) : ft(i);
585
- de(), Q(), ne.value = f.source.sheets.map((F) => ({
586
- name: F.name,
587
- index: F.index
588
- })), g.value = f.source, N(), f.version === "2.0" ? (m.value = he(f.recipe.sheet, f.source.sheets.find((F) => F.name === f.recipe.sheet).columnCount), o.reset(f.recipe), p.value = "regions") : (m.value = f.recipe, o.reset(), p.value = "table"), y.value = { ...f.identity, ...t.lockId && t.identity ? { id: t.identity.id } : {} }, $.value = f.recipe.sheet, I.value = "", me(), u.value++, A.accept();
589
- } catch (f) {
590
- I.value = Ce(f);
591
- }
592
- }
593
- re(
594
- () => t.session,
595
- (i) => {
596
- i && Fe(i);
597
- },
598
- { immediate: !0 }
599
- ), re(
600
- () => t.readonly,
601
- (i) => {
602
- i && (de(), Q());
603
- }
604
- ), re(
605
- [m, y, p, o.recipe],
606
- () => {
607
- G.value = !1, X.value = !1;
608
- },
609
- { deep: !0, flush: "sync" }
610
- ), re(
611
- () => t.datasets,
612
- () => {
613
- G.value = !1, X.value = !1;
614
- }
615
- ), at(() => {
616
- de(), Q();
617
- });
618
- async function We(i) {
619
- if (t.readonly) return;
620
- if (de(), !/\.xlsx$/i.test(i.name)) {
621
- I.value = b.value.invalidFile;
622
- return;
623
- }
624
- const f = ++ae;
625
- se = new AbortController(), J.value = !0, I.value = "";
626
- let F;
627
- try {
628
- const { openExcelWorkbook: D } = await import("./workbook-session-C9ZmCBwY.js").then((ce) => ce.w);
629
- if (f !== ae || t.readonly || (F = await D(i, { ...t.importOptions, signal: se.signal }), f !== ae || t.readonly)) return;
630
- const ge = F.inspect().sheets.filter((ce) => ce.visible);
631
- if (!ge.length) throw new Error("Excel 中没有可导入的可见工作表");
632
- const De = z?.recipe.sheet || ge[0].name;
633
- if (!ge.some((ce) => ce.name === De)) throw new Error(b.value.recoveredSheetMissing);
634
- const Ke = await F.importTemplate({ sheets: [De], signal: se.signal });
635
- if (f !== ae || t.readonly) return;
636
- Q(), P = F, F = void 0, g.value = Ke, u.value++, $.value = i.name, ne.value = ge.map((ce) => ({
637
- name: ce.name,
638
- index: ce.index
639
- })), N(), m.value = he(
640
- Ke.sheets[0].name,
641
- Ke.sheets[0].columnCount
642
- ), o.reset(), z && (Z(z), z = void 0, r.value = !1), me();
643
- } catch (D) {
644
- f === ae && (I.value = Ce(D));
645
- } finally {
646
- F?.dispose(), f === ae && (J.value = !1, se = void 0);
647
- }
648
- }
649
- async function He(i) {
650
- if (q.value || !ne.value.some((D) => D.name === i) || m.value.sheet === i)
651
- return;
652
- j();
653
- const f = g.value?.sheets.find((D) => D.name === i);
654
- if (f) {
655
- m.value = oe(i, f.columnCount), o.reset(C.get(i)), I.value = "", me();
656
- return;
657
- }
658
- if (!P || P.disposed) return;
659
- de();
660
- const F = ++ae;
661
- se = new AbortController(), J.value = !0, I.value = "";
662
- try {
663
- const D = await P.importTemplate({ sheets: [i], signal: se.signal });
664
- if (F !== ae || t.readonly) return;
665
- g.value = D, m.value = oe(i, D.sheets[0].columnCount), o.reset(C.get(i)), me();
666
- } catch (D) {
667
- F === ae && (I.value = Ce(D));
668
- } finally {
669
- F === ae && (J.value = !1, se = void 0);
670
- }
671
- }
672
- function qe(i) {
673
- q.value || (m.value.dataset = i, m.value.rowKey = "", m.value.fields.fill(""), G.value = !1, X.value = !1);
674
- }
675
- function Oe(i, f) {
676
- q.value || !B.value || i < B.value.top || i > B.value.bottom || ((!f || v.value === void 0) && (v.value = i), w.value = i);
677
- }
678
- function Ve(i) {
679
- if (q.value || !g.value || !xe.value) {
680
- q.value || (I.value = b.value.emptySelection);
681
- return;
682
- }
683
- m.value.regions[i] = pt(
684
- g.value,
685
- m.value.sheet,
686
- xe.value.top,
687
- xe.value.bottom
688
- ), G.value = !1, X.value = !1, I.value = "";
689
- }
690
- function Je(i) {
691
- q.value || (delete m.value.regions[i], G.value = !1, X.value = !1);
692
- }
693
- function Ue(i, f) {
694
- !q.value && i >= 0 && i < m.value.fields.length && (m.value.fields[i] = f, G.value = !1, X.value = !1);
695
- }
696
- function je(i) {
697
- q.value || (m.value.rowKey = i);
698
- }
699
- function Ge(i, f) {
700
- !q.value && !(i === "id" && t.lockId) && (y.value[i] = f);
701
- }
702
- function Xe(i) {
703
- for (const f of ["title", "header", "detail", "footer"]) {
704
- const F = m.value.regions[f];
705
- if (!F) continue;
706
- const D = pe(F);
707
- if (i >= D.top && i <= D.bottom) return f;
708
- }
709
- }
710
- function Qe(i, f) {
711
- B.value && (i === "row" ? ee.value = Math.max(
712
- B.value.top,
713
- Math.min(B.value.bottom, ee.value + f)
714
- ) : te.value = Math.max(
715
- B.value.left,
716
- Math.min(B.value.right, te.value + f)
717
- ));
718
- }
719
- function Ye() {
720
- if (!t.readonly) {
721
- if (t.session) {
722
- Fe(t.session);
723
- return;
724
- }
725
- z = void 0, r.value = !1, de(), Q(), g.value = void 0, ne.value = [], $.value = "", N(), m.value = he(), y.value = { id: t.identity?.id ?? "excel-template", name: t.identity?.name ?? "Excel 业务模板" }, o.reset(), p.value = "table", me(), u.value++, A.accept(), I.value = "";
726
- }
727
- }
728
- function Ze() {
729
- ve.value && (G.value = !0, I.value = "");
730
- }
731
- async function et() {
732
- if (!(q.value || !g.value || r.value) && (G.value = !0, I.value = "", !!ue.value.ok)) {
733
- O.value = !0;
734
- try {
735
- const i = { ...y.value, ...t.lockId && t.identity ? { id: t.identity.id } : {} }, f = p.value === "regions" ? bt(g.value, o.recipe.value, t.datasets, i) : mt(g.value, m.value, t.datasets, i), F = p.value === "regions" ? ht(g.value, o.recipe.value, i) : yt(g.value, m.value, i), D = { ...f, session: F }, ge = A.snapshot();
736
- if (t.accept && !await t.accept(D) || t.readonly || ge !== A.snapshot() && A.pending.value) return;
737
- t.accept || x(D), N(), A.accept(), X.value = !0;
738
- } catch (i) {
739
- I.value = Ce(i);
740
- } finally {
741
- O.value = !1;
742
- }
743
- }
744
- }
745
- return kt({ key: () => "excel", baseline: () => "declarations-only", pending: () => A.pending.value || r.value, snapshot: () => JSON.stringify(M()), restore(i, f, F) {
746
- const D = JSON.parse(i);
747
- if (!D.recipe || !D.regions || !Array.isArray(D.cached?.table) || !Array.isArray(D.cached?.regions)) throw new Error("Invalid Excel mapping draft");
748
- Z(D), r.value = F?.pending !== !1, z = r.value ? D : void 0, r.value || A.accept();
749
- } }), {
750
- recoveredMapping: r,
751
- imported: g,
752
- mode: p,
753
- regionBindings: o,
754
- pendingLocalChanges: S(() => A.pending.value || r.value),
755
- recipe: m,
756
- identity: y,
757
- sourceName: $,
758
- sheetChoices: ne,
759
- error: I,
760
- loading: J,
761
- checked: G,
762
- applied: X,
763
- row: ee,
764
- column: te,
765
- mappingPage: _,
766
- m: b,
767
- disabled: q,
768
- canCheck: ve,
769
- sheet: ie,
770
- sourceRange: B,
771
- dataset: we,
772
- window: Ie,
773
- validation: ue,
774
- focusTarget: be,
775
- issueEntries: a,
776
- guidance: Y,
777
- locateIssue: ke,
778
- mappings: $e,
779
- rowKeys: _e,
780
- selection: xe,
781
- cancel: de,
782
- importFile: We,
783
- chooseSheet: He,
784
- chooseDataset: qe,
785
- chooseRow: Oe,
786
- markRegion: Ve,
787
- clearRegion: Je,
788
- setMapping: Ue,
789
- setRowKey: je,
790
- setIdentity: Ge,
791
- regionAt: Xe,
792
- moveWindow: Qe,
793
- check: Ze,
794
- restoreDraft: Ye,
795
- apply: et
796
- };
797
- }
798
- const Mn = ["aria-label", "aria-busy"], Sn = {
799
- key: 0,
800
- role: "status",
801
- class: "mr-binding-recovery"
802
- }, Kn = { class: "mr-binding-bar" }, En = { class: "mr-binding-heading" }, Fn = ["aria-label", "disabled"], Dn = ["disabled"], Tn = {
803
- key: 1,
804
- class: "mr-binding-error",
805
- role: "alert"
806
- }, zn = {
807
- key: 2,
808
- class: "mr-binding-placeholder",
809
- role: "status"
810
- }, Bn = {
811
- key: 3,
812
- class: "mr-binding-placeholder"
813
- }, Nn = ["disabled"], An = { class: "mr-binding-sourcebar" }, Ln = ["value", "aria-label", "disabled"], Pn = ["value"], _n = ["aria-label"], Wn = ["aria-pressed", "disabled"], Hn = ["aria-pressed", "disabled"], qn = { class: "mr-binding-range" }, On = { class: "mr-binding-sample-note" }, Vn = { class: "mr-binding-layout" }, Jn = { class: "mr-binding-source" }, Un = { class: "mr-binding-grid-heading" }, jn = ["aria-label"], Gn = { class: "mr-binding-grid" }, Xn = ["data-region"], Qn = { scope: "row" }, Yn = ["data-source-row", "aria-label", "aria-pressed", "disabled", "onPointerdown", "onPointerenter", "onKeydown"], Zn = ["rowspan", "colspan", "title", "data-source-cell", "tabindex", "aria-label", "aria-selected", "onPointerdown", "onPointerenter", "onKeydown"], ea = {
814
- key: 1,
815
- class: "mr-binding-grid-footer"
816
- }, ta = { class: "mr-binding-window" }, na = ["aria-label", "disabled"], aa = ["min", "max", "value", "aria-label"], la = ["aria-label", "disabled"], oa = { class: "mr-binding-window" }, ia = ["aria-label", "disabled"], sa = ["min", "max", "value", "aria-label"], ra = ["aria-label", "disabled"], ua = { class: "mr-binding-inspector" }, da = ["disabled"], ca = { class: "mr-binding-group" }, va = ["data-role"], ga = { key: 0 }, fa = ["aria-label", "data-binding-control", "title", "disabled", "onClick"], ba = ["aria-label", "onClick"], ma = {
817
- key: 0,
818
- class: "mr-binding-note"
819
- }, ha = { class: "mr-binding-group" }, ya = {
820
- class: "mr-binding-label",
821
- tabindex: "-1"
822
- }, pa = ["value", "aria-label"], wa = { value: "" }, ka = ["value"], $a = {
823
- key: 0,
824
- class: "mr-binding-note"
825
- }, xa = {
826
- key: 1,
827
- class: "mr-binding-label",
828
- tabindex: "-1"
829
- }, Ca = ["value", "aria-label"], Ra = { value: "" }, Ia = ["value"], Ma = {
830
- key: 2,
831
- class: "mr-binding-mappings"
832
- }, Sa = ["data-binding-control", "aria-label", "value", "onChange"], Ka = { value: "" }, Ea = ["value"], Fa = { key: 0 }, Da = {
833
- key: 3,
834
- class: "mr-binding-map-pages"
835
- }, Ta = ["disabled", "aria-label"], za = ["disabled", "aria-label"], Ba = ["disabled"], Na = { class: "mr-binding-group" }, Aa = { class: "mr-binding-label" }, La = ["value", "readonly"], Pa = { class: "mr-binding-label" }, _a = ["value"], Wa = {
836
- key: 0,
837
- class: "mr-binding-issues",
838
- open: ""
839
- }, Ha = ["aria-label", "onClick"], qa = {
840
- key: 0,
841
- class: "mr-binding-issue-pages"
842
- }, Oa = ["disabled", "aria-label"], Va = ["disabled", "aria-label"], Ja = {
843
- key: 1,
844
- class: "mr-binding-warnings"
845
- }, Ua = { class: "mr-binding-actions" }, ja = ["title"], Ga = ["disabled"], Xa = ["disabled"], Qa = ["disabled", "title"], al = /* @__PURE__ */ ze({
846
- __name: "ExcelBindingWizard",
847
- props: {
848
- datasets: {},
849
- accept: { type: Function },
850
- session: {},
851
- identity: {},
852
- lockId: { type: Boolean },
853
- readonly: { type: Boolean },
854
- importOptions: {},
855
- messages: {}
856
- },
857
- emits: ["apply", "dirty"],
858
- setup(t, { expose: x, emit: g }) {
859
- const m = t, p = g, o = In(m, (h) => p("apply", h)), {
860
- imported: E,
861
- mode: C,
862
- regionBindings: R,
863
- recipe: N,
864
- identity: j,
865
- sourceName: le,
866
- sheetChoices: oe,
867
- error: y,
868
- loading: $,
869
- checked: r,
870
- row: M,
871
- column: z,
872
- mappingPage: Z,
873
- m: u,
874
- disabled: A,
875
- sheet: ne,
876
- sourceRange: P,
877
- dataset: Q,
878
- window: I,
879
- validation: J,
880
- mappings: G,
881
- rowKeys: X,
882
- selection: O
883
- } = o;
884
- re([o.pendingLocalChanges, N, j], () => p("dirty", o.pendingLocalChanges.value), { immediate: !0, deep: !0, flush: "sync" });
885
- const ee = K(), te = K(), v = K(0), w = S(() => Math.max(1, Math.ceil(o.issueEntries.value.length / 12))), _ = S(() => o.issueEntries.value.slice(v.value * 12, (v.value + 1) * 12));
886
- re(w, (h) => {
887
- v.value = Math.min(v.value, h - 1);
888
- }), re(o.focusTarget, async (h) => {
889
- if (!h) return;
890
- await Be();
891
- const s = ye(h.target);
892
- if (s && te.value?.querySelector(`td[data-source-cell="${s.top}:${s.left}"]`)?.scrollIntoView?.({ block: "nearest", inline: "nearest" }), C.value === "regions") return;
893
- const a = h.target.control === "field" ? `field-${h.target.fieldIndex}` : h.target.control === "contract" ? "dataset" : h.target.control, k = te.value?.querySelector(`.mr-binding-table-editor [data-binding-control="${a}"]`), Y = A.value ? k?.closest("label") : k;
894
- Y?.focus(), Y?.scrollIntoView?.({ block: "nearest" });
895
- });
896
- const b = K(!1), q = ["title", "header", "detail", "footer"], ve = S(() => ({
897
- title: u.value.titleRegion,
898
- header: u.value.headerRegion,
899
- detail: u.value.detailRegion,
900
- footer: u.value.footerRegion
901
- })), ie = S(
902
- () => Math.max(1, Math.ceil(N.value.fields.length / 12))
903
- );
904
- function B(h) {
905
- return h.target.value;
906
- }
907
- function we(h) {
908
- const s = h.target, a = s.files?.[0];
909
- a && o.importFile(a), s.value = "";
910
- }
911
- function Ie(h, s) {
912
- h.button !== 0 || A.value || (h.preventDefault(), b.value = !0, o.chooseRow(s, h.shiftKey), C.value === "regions" && P.value && (R.select(s, P.value.left, !1), R.select(s, P.value.right, !0)), h.currentTarget.focus());
913
- }
914
- function Me(h, s, a) {
915
- C.value !== "regions" || h.button !== 0 || A.value || (h.preventDefault(), b.value = !0, R.select(s, a, h.shiftKey), h.currentTarget.focus());
916
- }
917
- function Se(h, s, a) {
918
- if (C.value !== "regions") return;
919
- (h.key === " " || h.key === "Enter") && (h.preventDefault(), R.select(s, a, h.shiftKey));
920
- const Y = { ArrowUp: [-1, 0], ArrowDown: [1, 0], ArrowLeft: [0, -1], ArrowRight: [0, 1] }[h.key];
921
- if (!Y || !P.value) return;
922
- h.preventDefault();
923
- const ke = Math.max(P.value.top, Math.min(P.value.bottom, s + Y[0])), $e = Math.max(P.value.left, Math.min(P.value.right, a + Y[1]));
924
- h.shiftKey && R.select(ke, $e, !0), h.currentTarget.closest("table")?.querySelector(`td[data-source-cell="${ke}:${$e}"]`)?.focus();
925
- }
926
- function ue(h, s) {
927
- if ((h.key === " " || h.key === "Enter") && (h.preventDefault(), o.chooseRow(s, h.shiftKey)), h.key === "ArrowDown" || h.key === "ArrowUp") {
928
- h.preventDefault();
929
- const a = s + (h.key === "ArrowDown" ? 1 : -1);
930
- h.shiftKey && o.chooseRow(a, !0), h.currentTarget.closest("table")?.querySelector(`button[data-source-row="${a}"]`)?.focus();
931
- }
932
- }
933
- function fe(h) {
934
- const s = Q.value?.fields.find((a) => a.field === h);
935
- return s ? [
936
- s.type,
937
- s.unit,
938
- s.digits === void 0 ? void 0 : `${s.digits}${u.value.precision}`,
939
- s.sample === void 0 ? void 0 : `${u.value.sample}: ${String(s.sample)}`
940
- ].filter((a) => a !== void 0 && a !== "").join(" · ") : "";
941
- }
942
- function be(h, s) {
943
- const a = Number(B(h));
944
- !Number.isInteger(a) || !P.value || (s === "row" ? M.value = Math.max(
945
- P.value.top,
946
- Math.min(P.value.bottom, a)
947
- ) : z.value = Math.max(
948
- P.value.left,
949
- Math.min(P.value.right, a)
950
- ));
951
- }
952
- return x({
953
- get pendingLocalChanges() {
954
- return o.pendingLocalChanges.value;
955
- },
956
- importFile: o.importFile,
957
- apply: o.apply,
958
- cancel: o.cancel
959
- }), (h, s) => (d(), c("section", {
960
- ref_key: "element",
961
- ref: te,
962
- class: "mr-binding",
963
- "aria-label": e(u).title,
964
- "aria-busy": e($),
965
- onPointerup: s[23] || (s[23] = (a) => b.value = !1),
966
- onPointercancel: s[24] || (s[24] = (a) => b.value = !1),
967
- onPointerleave: s[25] || (s[25] = (a) => b.value = !1)
968
- }, [
969
- e(o).recoveredMapping.value ? (d(), c("p", Sn, l(e(u).recoveredMapping), 1)) : T("", !0),
970
- n("header", Kn, [
971
- n("div", En, [
972
- W(H, {
973
- name: "file",
974
- size: 17
975
- }),
976
- n("strong", null, l(e(u).title), 1),
977
- n("span", null, l(e(le) || e(u).intro), 1)
978
- ]),
979
- n("input", {
980
- ref_key: "input",
981
- ref: ee,
982
- type: "file",
983
- accept: ".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
984
- "aria-label": e(u).upload,
985
- class: "mr-binding-file",
986
- disabled: t.readonly,
987
- onChange: we
988
- }, null, 40, Fn),
989
- e($) ? (d(), c("button", {
990
- key: 0,
991
- type: "button",
992
- onClick: s[0] || (s[0] = //@ts-ignore
993
- (...a) => e(o).cancel && e(o).cancel(...a))
994
- }, l(e(u).cancel), 1)) : (d(), c("button", {
995
- key: 1,
996
- type: "button",
997
- disabled: t.readonly,
998
- onClick: s[1] || (s[1] = (a) => ee.value?.click())
999
- }, [
1000
- W(H, {
1001
- name: "upload",
1002
- size: 14
1003
- }),
1004
- L(l(e(E) ? e(u).replace : e(u).upload), 1)
1005
- ], 8, Dn))
1006
- ]),
1007
- e(y) ? (d(), c("div", Tn, l(e(y)), 1)) : T("", !0),
1008
- e($) ? (d(), c("div", zn, [
1009
- s[26] || (s[26] = n("span", { class: "mr-binding-loader" }, null, -1)),
1010
- L(l(e(u).loading), 1)
1011
- ])) : e(E) ? (d(), c(V, { key: 4 }, [
1012
- n("div", An, [
1013
- n("label", null, [
1014
- L(l(e(u).sheet), 1),
1015
- n("select", {
1016
- value: e(N).sheet,
1017
- "aria-label": e(u).sheet,
1018
- disabled: e(A),
1019
- onChange: s[3] || (s[3] = (a) => e(o).chooseSheet(B(a)))
1020
- }, [
1021
- (d(!0), c(V, null, U(e(oe), (a) => (d(), c("option", {
1022
- key: a.name,
1023
- value: a.name
1024
- }, l(a.name), 9, Pn))), 128))
1025
- ], 40, Ln)
1026
- ]),
1027
- n("div", {
1028
- class: "mr-binding-mode",
1029
- role: "group",
1030
- "aria-label": e(u).regionMode
1031
- }, [
1032
- n("button", {
1033
- type: "button",
1034
- "aria-pressed": e(C) === "table",
1035
- disabled: e(A),
1036
- onClick: s[4] || (s[4] = (a) => C.value = "table")
1037
- }, l(e(u).tableMode), 9, Wn),
1038
- n("button", {
1039
- type: "button",
1040
- "aria-pressed": e(C) === "regions",
1041
- disabled: e(A),
1042
- onClick: s[5] || (s[5] = (a) => C.value = "regions")
1043
- }, [
1044
- W(H, {
1045
- name: "grid",
1046
- size: 12
1047
- }),
1048
- L(l(e(u).multiRegions), 1)
1049
- ], 8, Hn)
1050
- ], 8, _n),
1051
- n("span", qn, l(e(ne)?.range) + " · " + l(e(ne)?.rowCount) + " × " + l(e(ne)?.columnCount), 1),
1052
- n("span", On, l(e(u).sourceOnly), 1)
1053
- ]),
1054
- n("div", Vn, [
1055
- n("div", Jn, [
1056
- n("div", Un, [
1057
- n("strong", null, l(e(u).source), 1),
1058
- n("span", null, l(e(C) === "regions" ? e(u).multiHint : e(u).sourceHint), 1)
1059
- ]),
1060
- e(I) ? (d(), c("div", {
1061
- key: 0,
1062
- class: "mr-binding-grid-scroll",
1063
- "aria-label": e(u).source
1064
- }, [
1065
- n("table", Gn, [
1066
- n("thead", null, [
1067
- n("tr", null, [
1068
- s[28] || (s[28] = n("th", {
1069
- class: "mr-binding-corner",
1070
- "aria-label": "#"
1071
- }, "#", -1)),
1072
- (d(!0), c(V, null, U(e(I).columns, (a) => (d(), c("th", {
1073
- key: a.column,
1074
- scope: "col"
1075
- }, l(a.name), 1))), 128))
1076
- ])
1077
- ]),
1078
- n("tbody", null, [
1079
- (d(!0), c(V, null, U(e(I).rows, (a) => (d(), c("tr", {
1080
- key: a.row,
1081
- "data-region": e(o).regionAt(a.row),
1082
- class: Re({
1083
- "is-selected": e(O) && a.row >= e(O).top && a.row <= e(O).bottom
1084
- })
1085
- }, [
1086
- n("th", Qn, [
1087
- n("button", {
1088
- type: "button",
1089
- "data-source-row": a.row,
1090
- "aria-label": `${e(u).selectionLabel} ${a.row}`,
1091
- "aria-pressed": !!e(O) && a.row >= e(O).top && a.row <= e(O).bottom,
1092
- disabled: e(A),
1093
- onPointerdown: (k) => Ie(k, a.row),
1094
- onPointerenter: (k) => b.value && e(o).chooseRow(a.row, !0),
1095
- onKeydown: (k) => ue(k, a.row)
1096
- }, l(a.row), 41, Yn)
1097
- ]),
1098
- (d(!0), c(V, null, U(a.cells, (k) => (d(), c("td", {
1099
- key: k.column,
1100
- rowspan: k.rowSpan,
1101
- colspan: k.colSpan,
1102
- title: `${k.address} · ${k.text}`,
1103
- "data-source-cell": `${k.row}:${k.column}`,
1104
- tabindex: e(C) === "regions" ? 0 : void 0,
1105
- "aria-label": e(C) === "regions" ? `${e(u).selectionCellLabel} ${k.address}` : void 0,
1106
- "aria-selected": e(C) === "regions" ? e(R).selected(k.row, k.column) : void 0,
1107
- class: Re({ "is-continued": k.continued, "is-cell-selected": e(C) === "regions" && e(R).selected(k.row, k.column) }),
1108
- onPointerdown: (Y) => Me(Y, k.row, k.column),
1109
- onPointerenter: (Y) => e(C) === "regions" && b.value && e(R).select(k.row, k.column, !0),
1110
- onKeydown: (Y) => Se(Y, k.row, k.column),
1111
- style: lt({
1112
- textAlign: k.style?.align,
1113
- fontWeight: k.style?.bold ? "600" : void 0
1114
- })
1115
- }, [
1116
- n("span", null, l(k.text), 1)
1117
- ], 46, Zn))), 128))
1118
- ], 10, Xn))), 128))
1119
- ])
1120
- ])
1121
- ], 8, jn)) : T("", !0),
1122
- e(I) ? (d(), c("footer", ea, [
1123
- n("span", null, [
1124
- L(l(e(u).selected) + " ", 1),
1125
- n("strong", null, l(e(C) === "regions" ? e(R).selection.value || "—" : e(O) ? `${e(O).top}–${e(O).bottom}` : "—"), 1)
1126
- ]),
1127
- n("div", ta, [
1128
- n("button", {
1129
- type: "button",
1130
- "aria-label": e(u).previousRows,
1131
- disabled: e(I).top <= e(I).source.top,
1132
- onClick: s[6] || (s[6] = (a) => e(o).moveWindow("row", -24))
1133
- }, [
1134
- W(H, {
1135
- name: "chevron-left",
1136
- size: 13
1137
- })
1138
- ], 8, na),
1139
- n("label", null, [
1140
- L(l(e(u).rowStart), 1),
1141
- n("input", {
1142
- type: "number",
1143
- min: e(I).source.top,
1144
- max: e(I).source.bottom,
1145
- value: e(M),
1146
- "aria-label": e(u).rowStart,
1147
- onChange: s[7] || (s[7] = (a) => be(a, "row"))
1148
- }, null, 40, aa)
1149
- ]),
1150
- n("button", {
1151
- type: "button",
1152
- "aria-label": e(u).nextRows,
1153
- disabled: e(I).bottom >= e(I).source.bottom,
1154
- onClick: s[8] || (s[8] = (a) => e(o).moveWindow("row", 24))
1155
- }, [
1156
- W(H, {
1157
- name: "chevron-right",
1158
- size: 13
1159
- })
1160
- ], 8, la)
1161
- ]),
1162
- n("div", oa, [
1163
- n("button", {
1164
- type: "button",
1165
- "aria-label": e(u).previousColumns,
1166
- disabled: e(I).left <= e(I).source.left,
1167
- onClick: s[9] || (s[9] = (a) => e(o).moveWindow("column", -12))
1168
- }, [
1169
- W(H, {
1170
- name: "chevron-left",
1171
- size: 13
1172
- })
1173
- ], 8, ia),
1174
- n("label", null, [
1175
- L(l(e(u).columnStart), 1),
1176
- n("input", {
1177
- type: "number",
1178
- min: e(I).source.left,
1179
- max: e(I).source.right,
1180
- value: e(z),
1181
- "aria-label": e(u).columnStart,
1182
- onChange: s[10] || (s[10] = (a) => be(a, "column"))
1183
- }, null, 40, sa)
1184
- ]),
1185
- n("button", {
1186
- type: "button",
1187
- "aria-label": e(u).nextColumns,
1188
- disabled: e(I).right >= e(I).source.right,
1189
- onClick: s[11] || (s[11] = (a) => e(o).moveWindow("column", 12))
1190
- }, [
1191
- W(H, {
1192
- name: "chevron-right",
1193
- size: 13
1194
- })
1195
- ], 8, ra)
1196
- ])
1197
- ])) : T("", !0)
1198
- ]),
1199
- n("div", ua, [
1200
- e(C) === "regions" ? (d(), ot(Cn, {
1201
- key: 0,
1202
- controller: e(R),
1203
- datasets: t.datasets,
1204
- disabled: e(A),
1205
- messages: e(u)
1206
- }, null, 8, ["controller", "datasets", "disabled", "messages"])) : T("", !0),
1207
- Ne(n("fieldset", {
1208
- disabled: e(A),
1209
- class: "mr-binding-table-editor"
1210
- }, [
1211
- n("section", ca, [
1212
- n("h3", null, [
1213
- s[29] || (s[29] = n("b", null, "1", -1)),
1214
- L(l(e(u).regionLegend), 1)
1215
- ]),
1216
- (d(), c(V, null, U(q, (a) => n("div", {
1217
- key: a,
1218
- class: "mr-binding-region",
1219
- "data-role": a
1220
- }, [
1221
- n("div", null, [
1222
- n("strong", null, [
1223
- L(l(ve.value[a]), 1),
1224
- a === "title" || a === "footer" ? (d(), c("small", ga, l(e(u).optional), 1)) : T("", !0)
1225
- ]),
1226
- n("code", null, l(e(N).regions[a] || e(u).unnamed), 1)
1227
- ]),
1228
- n("button", {
1229
- type: "button",
1230
- "aria-label": `${e(u).selectRegion} · ${ve.value[a]}`,
1231
- "data-binding-control": a,
1232
- title: e(O) ? `${e(u).selectRegion} · ${ve.value[a]}` : e(u).emptySelection,
1233
- disabled: !e(O),
1234
- onClick: (k) => e(o).markRegion(a)
1235
- }, [
1236
- W(H, {
1237
- name: "arrow-right",
1238
- size: 13
1239
- })
1240
- ], 8, fa),
1241
- (a === "title" || a === "footer") && e(N).regions[a] ? (d(), c("button", {
1242
- key: 0,
1243
- type: "button",
1244
- "aria-label": `${e(u).clear} · ${ve.value[a]}`,
1245
- onClick: (k) => e(o).clearRegion(a)
1246
- }, [
1247
- W(H, {
1248
- name: "close",
1249
- size: 13
1250
- })
1251
- ], 8, ba)) : T("", !0)
1252
- ], 8, va)), 64)),
1253
- e(N).regions.footer ? (d(), c("p", ma, l(e(u).footerHint), 1)) : T("", !0)
1254
- ]),
1255
- n("section", ha, [
1256
- n("h3", null, [
1257
- s[30] || (s[30] = n("b", null, "2", -1)),
1258
- L(l(e(u).mapping), 1),
1259
- n("span", null, l(e(J).mapped) + "/" + l(e(J).total), 1)
1260
- ]),
1261
- n("label", ya, [
1262
- L(l(e(u).dataset), 1),
1263
- n("select", {
1264
- "data-binding-control": "dataset",
1265
- value: e(N).dataset,
1266
- "aria-label": e(u).dataset,
1267
- onChange: s[12] || (s[12] = (a) => e(o).chooseDataset(B(a)))
1268
- }, [
1269
- n("option", wa, l(e(u).chooseDataset), 1),
1270
- (d(!0), c(V, null, U(t.datasets, (a) => (d(), c("option", {
1271
- key: a.id,
1272
- value: a.id
1273
- }, l(a.label || a.id), 9, ka))), 128))
1274
- ], 40, pa)
1275
- ]),
1276
- t.datasets.length ? T("", !0) : (d(), c("p", $a, l(e(u).noContract), 1)),
1277
- e(Q) ? (d(), c("label", xa, [
1278
- L(l(e(u).rowKey), 1),
1279
- n("select", {
1280
- "data-binding-control": "rowKey",
1281
- value: e(N).rowKey,
1282
- "aria-label": e(u).rowKey,
1283
- onChange: s[13] || (s[13] = (a) => e(o).setRowKey(B(a)))
1284
- }, [
1285
- n("option", Ra, l(e(u).chooseRowKey), 1),
1286
- (d(!0), c(V, null, U(e(X), (a) => (d(), c("option", {
1287
- key: a.field,
1288
- value: a.field
1289
- }, l(a.label || a.field) + " · " + l(a.field), 9, Ia))), 128))
1290
- ], 40, Ca)
1291
- ])) : T("", !0),
1292
- e(Q) ? (d(), c("div", Ma, [
1293
- (d(!0), c(V, null, U(e(G), (a) => (d(), c("label", {
1294
- key: a.index,
1295
- class: "mr-binding-map",
1296
- tabindex: "-1"
1297
- }, [
1298
- n("span", null, l(a.physical), 1),
1299
- n("div", null, [
1300
- n("select", {
1301
- "data-binding-control": `field-${a.index}`,
1302
- "aria-label": `${e(u).physical} ${a.physical} · ${e(u).business}`,
1303
- value: a.field,
1304
- onChange: (k) => e(o).setMapping(a.index, B(k))
1305
- }, [
1306
- n("option", Ka, l(e(u).chooseField), 1),
1307
- (d(!0), c(V, null, U(e(Q).fields, (k) => (d(), c("option", {
1308
- key: k.field,
1309
- value: k.field
1310
- }, l(k.label || k.field) + " · " + l(k.field), 9, Ea))), 128))
1311
- ], 40, Sa),
1312
- a.field ? (d(), c("small", Fa, l(fe(a.field)), 1)) : T("", !0)
1313
- ])
1314
- ]))), 128))
1315
- ])) : T("", !0),
1316
- e(Q) && ie.value > 1 ? (d(), c("div", Da, [
1317
- n("button", {
1318
- type: "button",
1319
- disabled: e(Z) <= 0,
1320
- "aria-label": e(u).previousColumns,
1321
- onClick: s[14] || (s[14] = (a) => Z.value--)
1322
- }, [
1323
- W(H, {
1324
- name: "chevron-left",
1325
- size: 13
1326
- })
1327
- ], 8, Ta),
1328
- n("span", null, l(e(Z) + 1) + " / " + l(ie.value), 1),
1329
- n("button", {
1330
- type: "button",
1331
- disabled: e(Z) + 1 >= ie.value,
1332
- "aria-label": e(u).nextColumns,
1333
- onClick: s[15] || (s[15] = (a) => Z.value++)
1334
- }, [
1335
- W(H, {
1336
- name: "chevron-right",
1337
- size: 13
1338
- })
1339
- ], 8, za)
1340
- ])) : T("", !0)
1341
- ])
1342
- ], 8, da), [
1343
- [it, e(C) === "table"]
1344
- ]),
1345
- n("fieldset", { disabled: e(A) }, [
1346
- n("section", Na, [
1347
- n("h3", null, l(e(u).identity), 1),
1348
- n("label", Aa, [
1349
- L(l(e(u).templateId), 1),
1350
- n("input", {
1351
- value: t.lockId ? m.identity?.id ?? e(j).id : e(j).id,
1352
- autocomplete: "off",
1353
- readonly: t.lockId,
1354
- onInput: s[16] || (s[16] = (a) => e(o).setIdentity("id", B(a)))
1355
- }, null, 40, La)
1356
- ]),
1357
- n("label", Pa, [
1358
- L(l(e(u).templateName), 1),
1359
- n("input", {
1360
- value: e(j).name,
1361
- autocomplete: "off",
1362
- onInput: s[17] || (s[17] = (a) => e(o).setIdentity("name", B(a)))
1363
- }, null, 40, _a)
1364
- ])
1365
- ])
1366
- ], 8, Ba)
1367
- ])
1368
- ]),
1369
- e(r) && e(J).issues.length ? (d(), c("details", Wa, [
1370
- n("summary", null, l(e(u).issues) + " · " + l(e(J).issues.length) + " " + l(e(u).errors), 1),
1371
- n("ul", null, [
1372
- (d(!0), c(V, null, U(_.value, (a) => (d(), c("li", {
1373
- key: `${a.issue.path}:${a.issue.message}`
1374
- }, [
1375
- n("button", {
1376
- type: "button",
1377
- class: "mr-binding-issue-link",
1378
- "aria-label": `${e(u).locateIssue} · ${a.label}`,
1379
- onClick: (k) => e(o).locateIssue(a.issue)
1380
- }, [
1381
- n("strong", null, l(a.label), 1),
1382
- n("span", null, l(a.message), 1),
1383
- W(H, {
1384
- name: "arrow-right",
1385
- size: 12
1386
- })
1387
- ], 8, Ha)
1388
- ]))), 128))
1389
- ]),
1390
- w.value > 1 ? (d(), c("div", qa, [
1391
- n("button", {
1392
- type: "button",
1393
- disabled: v.value === 0,
1394
- "aria-label": e(u).previousIssues,
1395
- onClick: s[18] || (s[18] = (a) => v.value--)
1396
- }, [
1397
- W(H, {
1398
- name: "chevron-left",
1399
- size: 12
1400
- })
1401
- ], 8, Oa),
1402
- n("span", null, l(v.value + 1) + "/" + l(w.value), 1),
1403
- n("button", {
1404
- type: "button",
1405
- disabled: v.value + 1 >= w.value,
1406
- "aria-label": e(u).nextIssues,
1407
- onClick: s[19] || (s[19] = (a) => v.value++)
1408
- }, [
1409
- W(H, {
1410
- name: "chevron-right",
1411
- size: 12
1412
- })
1413
- ], 8, Va)
1414
- ])) : T("", !0)
1415
- ])) : T("", !0),
1416
- e(E).warnings.length ? (d(), c("details", Ja, [
1417
- n("summary", null, l(e(u).inspectWarning) + " · " + l(e(E).warnings.length), 1),
1418
- n("ul", null, [
1419
- (d(!0), c(V, null, U(e(E).warnings, (a, k) => (d(), c("li", { key: k }, l(a), 1))), 128))
1420
- ])
1421
- ])) : T("", !0),
1422
- n("footer", Ua, [
1423
- n("span", {
1424
- class: Re({ "is-ready": e(J).ok }),
1425
- role: "status",
1426
- title: e(o).guidance.value
1427
- }, l(e(o).guidance.value), 11, ja),
1428
- e(o).pendingLocalChanges.value ? (d(), c("button", {
1429
- key: 0,
1430
- type: "button",
1431
- disabled: e(A),
1432
- onClick: s[20] || (s[20] = //@ts-ignore
1433
- (...a) => e(o).restoreDraft && e(o).restoreDraft(...a))
1434
- }, l(e(u).restoreDraft), 9, Ga)) : T("", !0),
1435
- n("button", {
1436
- type: "button",
1437
- disabled: !e(o).canCheck.value,
1438
- onClick: s[21] || (s[21] = //@ts-ignore
1439
- (...a) => e(o).check && e(o).check(...a))
1440
- }, l(e(u).check), 9, Xa),
1441
- n("button", {
1442
- type: "button",
1443
- class: "mr-binding-primary",
1444
- disabled: e(A) || !e(J).ok,
1445
- title: e(o).guidance.value,
1446
- onClick: s[22] || (s[22] = //@ts-ignore
1447
- (...a) => e(o).apply && e(o).apply(...a))
1448
- }, l(e(u).apply), 9, Qa)
1449
- ])
1450
- ], 64)) : (d(), c("div", Bn, [
1451
- s[27] || (s[27] = n("svg", {
1452
- viewBox: "0 0 80 80",
1453
- fill: "none",
1454
- "aria-hidden": "true"
1455
- }, [
1456
- n("rect", {
1457
- x: "15",
1458
- y: "10",
1459
- width: "50",
1460
- height: "60",
1461
- rx: "8",
1462
- fill: "#eff6ff",
1463
- stroke: "#bfdbfe"
1464
- }),
1465
- n("path", {
1466
- d: "M25 25h30M25 35h30M25 45h30M35 25v30M45 25v30M25 55h30",
1467
- stroke: "#93c5fd",
1468
- "stroke-width": "1.5"
1469
- })
1470
- ], -1)),
1471
- n("strong", null, l(e(u).noSource), 1),
1472
- n("span", null, l(e(u).sourceOnly), 1),
1473
- n("button", {
1474
- type: "button",
1475
- class: "mr-binding-primary",
1476
- disabled: t.readonly,
1477
- onClick: s[2] || (s[2] = (a) => ee.value?.click())
1478
- }, l(e(u).upload), 9, Nn)
1479
- ]))
1480
- ], 40, Mn));
1481
- }
1482
- });
1483
- export {
1484
- al as default
1485
- };