@agile-team/mach-report 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -3
- package/dist/ExcelBindingWizard-CLT2p7P3.cjs +1 -0
- package/dist/ExcelBindingWizard-CvsWR8Ga.js +1485 -0
- package/dist/{ParamEditor-BLaE5q5W.js → ParamEditor-CflQV3eQ.js} +191 -187
- package/dist/ParamEditor-vIDzvpPV.cjs +1 -0
- package/dist/ReportBatchPanel-DkxTzBkD.cjs +1 -0
- package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-LqVgiqp7.js} +3 -3
- package/dist/ReportPreview-CvbqLUzM.cjs +6 -0
- package/dist/ReportPreview-D_ywJ_-H.js +4533 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-MjWEtc7X.js} +1 -1
- package/dist/ReportTemplateLibrary-cQ1sqNYo.cjs +1 -0
- package/dist/RuleEditor-BaR6xUiI.cjs +1 -0
- package/dist/RuleEditor-ChuXMlei.js +2037 -0
- package/dist/TemplateOutlinePanel-BHKP89Xz.cjs +1 -0
- package/dist/TemplateOutlinePanel-Dci6aRn1.js +96 -0
- package/dist/TemplateReusePanel-B7Gmyc1z.js +388 -0
- package/dist/TemplateReusePanel-CY5eO2Sh.cjs +1 -0
- package/dist/TemplateReviewPanel-DjlX3xpt.js +592 -0
- package/dist/TemplateReviewPanel-JvZe9_4G.cjs +1 -0
- package/dist/{batch-mRqhhhjt.js → batch-DzaTNLWI.js} +23 -16
- package/dist/batch-xMkqYiTr.cjs +1 -0
- package/dist/config-0UIohTS7.cjs +1 -0
- package/dist/{config-B612mw0x.js → config-Dt9NtCPl.js} +227 -186
- package/dist/data-explanation-BktvER5B.cjs +1 -0
- package/dist/data-explanation-C_J6jYNi.js +16 -0
- package/dist/designer-Ci1LizA9.js +5020 -0
- package/dist/designer-rtmVIIdN.cjs +2 -0
- package/dist/designer.cjs +1 -2
- package/dist/designer.d.cts +306 -3
- package/dist/designer.d.ts +306 -3
- package/dist/designer.js +21 -4266
- package/dist/font-loader-DHto6Lra.js +297 -0
- package/dist/font-loader-vhCT8znW.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +728 -628
- package/dist/{template-review-BzpcI-tR.js → json-snapshot-BeFT3Tso.js} +867 -637
- package/dist/json-snapshot-D1NTP2oI.cjs +2 -0
- package/dist/pdf-8UPQebOE.js +36288 -0
- package/dist/pdf-AyJGb22z.cjs +101 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.js +9 -36579
- package/dist/plugin-BGKf-Tqg.js +22 -0
- package/dist/{plugin-BDTU4D94.cjs → plugin-CktLH_Iy.cjs} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-DEJbhpCv.js} +1 -1
- package/dist/server/node.d.cts +46 -11
- package/dist/server/node.d.ts +46 -11
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +294 -280
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +107 -12
- package/dist/server.d.ts +107 -12
- package/dist/server.js +713 -453
- package/dist/style.css +1 -1
- package/dist/template-bindings-BJR4k7qZ.cjs +1 -0
- package/dist/template-bindings-Daui7hLF.js +252 -0
- package/dist/template-fragments-CLkGo6To.js +187 -0
- package/dist/template-fragments-DFUpq5QM.cjs +1 -0
- package/dist/template-outline-B3xVkzSv.cjs +1 -0
- package/dist/template-outline-CFenM1PV.js +88 -0
- package/dist/{template-registry-BjE1VS6g.js → template-registry-COXDEJEM.js} +1 -1
- package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/{validate-DbgEM1Hh.js → validate-CkQBWCeg.js} +3 -3
- package/dist/vue/async.d.cts +72 -2
- package/dist/vue/async.d.ts +72 -2
- package/dist/vue/index.d.cts +124 -5
- package/dist/vue/index.d.ts +124 -5
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +78 -71
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BfK1yHOO.js} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +46 -11
- package/dist/worker.d.ts +46 -11
- package/dist/worker.js +59 -55
- package/dist/xlsx.js +3 -3
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Dc-SDkYA.cjs +0 -1
- package/dist/ReportPreview-DWXROHBP.cjs +0 -6
- package/dist/ReportPreview-DiNXhQI0.js +0 -4138
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/config-BRoLo2oj.cjs +0 -1
- package/dist/plugin-Cd5G2QQn.js +0 -22
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/record-bindings-D-5jQlTj.js +0 -196
- package/dist/template-review-BfCC8Ng9.cjs +0 -2
|
@@ -0,0 +1,1485 @@
|
|
|
1
|
+
import { defineComponent as ze, ref as K, computed as S, watch as re, nextTick as Be, openBlock as c, createElementBlock as v, createElementVNode as n, createTextVNode as A, toDisplayString as l, createVNode as W, Fragment as V, renderList as U, normalizeClass as Re, createCommentVNode as D, 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-DEJbhpCv.js";
|
|
3
|
+
import { a as _ } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
+
import { E as wt, u as kt } from "./designer-Ci1LizA9.js";
|
|
5
|
+
import { u as $t } from "./useLocalDraft-BnhcxXk_.js";
|
|
6
|
+
function Ae(t, x) {
|
|
7
|
+
const f = /^\$\.datasets\[(\d+)\]/.exec(t.path)?.[1];
|
|
8
|
+
return f !== void 0 ? x[Number(f)]?.id : x.find((m) => t.path.startsWith(`$.datasets.${m.id}.samples`))?.id;
|
|
9
|
+
}
|
|
10
|
+
function Le(t, x) {
|
|
11
|
+
const f = /\.fields\[(\d+)\]/.exec(t)?.[1];
|
|
12
|
+
return f !== void 0 ? { control: "field", fieldIndex: Number(f) } : { control: t.split(".").at(-1) || x };
|
|
13
|
+
}
|
|
14
|
+
function Pe(t, x, f) {
|
|
15
|
+
const m = /^\$\.recipe\.regions\[(\d+)\]/.exec(t.path)?.[1], p = Ae(t, f), 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, f) {
|
|
22
|
+
if (t.path.startsWith("$.datasets")) {
|
|
23
|
+
const p = Ae(t, f);
|
|
24
|
+
return p === void 0 ? [] : x.regions.filter((o) => o.dataset === p).map((o) => o.id);
|
|
25
|
+
}
|
|
26
|
+
const m = Pe(t, x, f).regionId;
|
|
27
|
+
return m ? [m] : [];
|
|
28
|
+
}
|
|
29
|
+
function Ct(t, x) {
|
|
30
|
+
const f = /^\$\.recipe\.regions\.(title|header|detail|footer)$/.exec(t.path)?.[1];
|
|
31
|
+
return f ? { control: f, range: x.regions[f] } : 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, f) {
|
|
43
|
+
return x.control === "dataset" ? !f.dataset : x.control === "rowKey" ? !f.rowKey : x.control === "field" && x.fieldIndex !== void 0 ? !f.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
|
+
}, Wt = ["value", "aria-label"], _t = { 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, f = 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(f.value * 12, f.value * 12 + 12).map(($, r) => ({ field: $, index: f.value * 12 + r, physical: Ee(y + f.value * 12 + r) }));
|
|
96
|
+
}), R = S(() => Math.max(1, Math.ceil((o.value?.fields.length ?? 0) / 12))), B = S(() => {
|
|
97
|
+
const y = p.value.trim().toLocaleLowerCase(), $ = E.value?.fields ?? [], r = $.filter((T) => [T.field, T.label, T.unit].some((Z) => Z?.toLocaleLowerCase().includes(y))).slice(0, 64), M = new Set(C.value.map((T) => T.field));
|
|
98
|
+
return [...r, ...$.filter((T) => M.has(T.field) && !r.includes(T))];
|
|
99
|
+
});
|
|
100
|
+
function j(y) {
|
|
101
|
+
return y.target.value;
|
|
102
|
+
}
|
|
103
|
+
function le(y) {
|
|
104
|
+
x.controller.setActive(y), f.value = 0, p.value = "";
|
|
105
|
+
}
|
|
106
|
+
re(() => x.controller.focusTarget.value, async (y) => {
|
|
107
|
+
if (!y) return;
|
|
108
|
+
f.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 T = x.disabled && r?.matches("input,select,textarea,button") ? r.closest("label") : r;
|
|
112
|
+
T?.focus(), T?.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, T) => o.value.fields[T] ?? ""));
|
|
120
|
+
} catch {
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return (y, $) => (c(), v("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
|
+
A(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(_, {
|
|
145
|
+
name: "grid",
|
|
146
|
+
size: 13
|
|
147
|
+
}),
|
|
148
|
+
A(l(t.messages.addRegion), 1),
|
|
149
|
+
n("code", null, l(t.controller.selection.value || "—"), 1)
|
|
150
|
+
], 8, Kt),
|
|
151
|
+
n("div", Et, [
|
|
152
|
+
(c(!0), v(V, null, U(t.controller.directory.value, (r) => (c(), v("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
|
+
A(l(r.state === "ready" ? t.messages.regionReady : r.state === "pending" ? t.messages.regionPending : t.messages.regionError), 1),
|
|
169
|
+
r.issues.length ? (c(), v("span", Bt, " · " + l(r.issues.length), 1)) : D("", !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(_, {
|
|
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) ? (c(), v("section", Lt, [
|
|
191
|
+
n("h3", null, [
|
|
192
|
+
A(l(t.messages.regionProperties), 1),
|
|
193
|
+
n("code", null, l(e(o).id), 1)
|
|
194
|
+
]),
|
|
195
|
+
n("label", Pt, [
|
|
196
|
+
A(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, Wt)
|
|
203
|
+
]),
|
|
204
|
+
n("label", _t, [
|
|
205
|
+
A(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
|
+
A(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
|
+
(c(!0), v(V, null, U(t.datasets, (r) => (c(), v("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 ? (c(), v("label", Xt, [
|
|
232
|
+
A(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
|
+
(c(!0), v(V, null, U(E.value.fields.filter((r) => r.type !== "boolean"), (r) => (c(), v("option", {
|
|
241
|
+
key: r.field,
|
|
242
|
+
value: r.field
|
|
243
|
+
}, l(r.label || r.field), 9, Zt))), 128))
|
|
244
|
+
], 40, Qt)
|
|
245
|
+
])) : D("", !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 ? (c(), v("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(_, {
|
|
262
|
+
name: "close",
|
|
263
|
+
size: 11
|
|
264
|
+
})
|
|
265
|
+
], 8, nn)) : D("", !0)
|
|
266
|
+
]),
|
|
267
|
+
E.value ? (c(), v("div", an, [
|
|
268
|
+
n("label", ln, [
|
|
269
|
+
W(_, {
|
|
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 ? (c(), v("small", sn, l(t.messages.fieldLimit), 1)) : D("", !0),
|
|
283
|
+
(c(!0), v(V, null, U(C.value, (r) => (c(), v("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
|
+
(c(!0), v(V, null, U(B.value, (M) => (c(), v("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 ? (c(), v("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)) : D("", !0)
|
|
303
|
+
])
|
|
304
|
+
]))), 128))
|
|
305
|
+
])) : D("", !0),
|
|
306
|
+
R.value > 1 ? (c(), v("div", vn, [
|
|
307
|
+
n("button", {
|
|
308
|
+
type: "button",
|
|
309
|
+
disabled: f.value <= 0,
|
|
310
|
+
"aria-label": t.messages.previousColumns,
|
|
311
|
+
onClick: $[7] || ($[7] = (r) => f.value--)
|
|
312
|
+
}, [
|
|
313
|
+
W(_, {
|
|
314
|
+
name: "chevron-left",
|
|
315
|
+
size: 13
|
|
316
|
+
})
|
|
317
|
+
], 8, gn),
|
|
318
|
+
n("span", null, l(f.value + 1) + "/" + l(R.value), 1),
|
|
319
|
+
n("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
disabled: f.value + 1 >= R.value,
|
|
322
|
+
"aria-label": t.messages.nextColumns,
|
|
323
|
+
onClick: $[8] || ($[8] = (r) => f.value++)
|
|
324
|
+
}, [
|
|
325
|
+
W(_, {
|
|
326
|
+
name: "chevron-right",
|
|
327
|
+
size: 13
|
|
328
|
+
})
|
|
329
|
+
], 8, fn)
|
|
330
|
+
])) : D("", !0),
|
|
331
|
+
E.value ? (c(), v("details", bn, [
|
|
332
|
+
n("summary", null, l(t.messages.concurrency), 1),
|
|
333
|
+
(c(), v(V, null, U(["revisionField", "sourceTokenField"], (r) => n("label", {
|
|
334
|
+
key: r,
|
|
335
|
+
class: "mr-binding-label",
|
|
336
|
+
tabindex: "-1"
|
|
337
|
+
}, [
|
|
338
|
+
A(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
|
+
(c(!0), v(V, null, U(E.value.fields, (M) => (c(), v("option", {
|
|
346
|
+
key: M.field,
|
|
347
|
+
value: M.field
|
|
348
|
+
}, l(M.label || M.field), 9, yn))), 128))
|
|
349
|
+
], 40, mn)
|
|
350
|
+
])), 64))
|
|
351
|
+
])) : D("", !0)
|
|
352
|
+
])) : D("", !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 ? (c(), v("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(_, {
|
|
372
|
+
name: "close",
|
|
373
|
+
size: 11
|
|
374
|
+
})
|
|
375
|
+
], 8, xn)) : D("", !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, f, m) {
|
|
386
|
+
const p = K(Te()), o = K(""), E = K(), C = K(), R = K(), B = 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((g) => ({ ...g, fields: [] })) })), le = S(() => t.value ? rt(t.value, j.value) : []), oe = S(() => {
|
|
387
|
+
const g = ut(p.value, m()), w = [...le.value, ...g.issues];
|
|
388
|
+
return { ...g, ok: !w.length, issues: w };
|
|
389
|
+
}), y = S(() => p.value.regions.find((g) => g.id === o.value));
|
|
390
|
+
function $(g) {
|
|
391
|
+
return Pe(g, p.value, m());
|
|
392
|
+
}
|
|
393
|
+
const r = S(() => {
|
|
394
|
+
const g = /* @__PURE__ */ new Map();
|
|
395
|
+
for (const w of oe.value.issues) {
|
|
396
|
+
const P = $(w);
|
|
397
|
+
for (const b of xt(w, p.value, m())) {
|
|
398
|
+
const H = g.get(b) ?? [];
|
|
399
|
+
H.push({ issue: w, target: { ...P, regionId: b } }), g.set(b, H);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return p.value.regions.map((w) => {
|
|
403
|
+
const P = g.get(w.id) ?? [], b = P.length ? P.every((H) => Rt(H.issue, H.target, w)) ? "pending" : "error" : "ready";
|
|
404
|
+
return { region: w, state: b, issues: P };
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
function M(g = Te(x.value)) {
|
|
408
|
+
p.value = JSON.parse(JSON.stringify(g)), o.value = p.value.regions[0]?.id ?? "", C.value = void 0, R.value = void 0, E.value = void 0;
|
|
409
|
+
}
|
|
410
|
+
function T(g) {
|
|
411
|
+
g.regionId && (o.value = g.regionId);
|
|
412
|
+
const w = ye(g);
|
|
413
|
+
w && (C.value = { row: w.top, column: w.left }, R.value = { row: w.bottom, column: w.right }), E.value = { target: g, sequence: (E.value?.sequence ?? 0) + 1 };
|
|
414
|
+
}
|
|
415
|
+
function Z(g) {
|
|
416
|
+
T($(g));
|
|
417
|
+
}
|
|
418
|
+
function u(g, w, P) {
|
|
419
|
+
f.value || ((!P || !C.value) && (C.value = { row: g, column: w }), R.value = { row: g, column: w });
|
|
420
|
+
}
|
|
421
|
+
function N() {
|
|
422
|
+
if (f.value || !B.value || p.value.regions.length >= 128) return;
|
|
423
|
+
let g = 1;
|
|
424
|
+
for (; p.value.regions.some((b) => b.id === `region-${g}`); ) g++;
|
|
425
|
+
const w = `region-${g}`, P = Math.abs(R.value.column - C.value.column) + 1;
|
|
426
|
+
p.value.regions.push({ id: w, range: B.value, mode: "repeat", dataset: "", fields: Array.from({ length: P }, () => ""), rowKey: "" }), o.value = w;
|
|
427
|
+
}
|
|
428
|
+
function ne(g) {
|
|
429
|
+
f.value || (p.value.regions = p.value.regions.filter((w) => w.id !== g), o.value === g && (o.value = p.value.regions[0]?.id ?? ""));
|
|
430
|
+
}
|
|
431
|
+
function L(g) {
|
|
432
|
+
!f.value && y.value && (y.value.dataset = g, y.value.rowKey = "", y.value.fields.fill(""), delete y.value.revisionField, delete y.value.sourceTokenField);
|
|
433
|
+
}
|
|
434
|
+
function Q(g, w) {
|
|
435
|
+
if (!(f.value || !y.value)) {
|
|
436
|
+
if (g === "mode") {
|
|
437
|
+
(w === "record" || w === "repeat") && (y.value.mode = w);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
w || g === "rowKey" ? y.value[g] = w : delete y.value[g];
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
function I(g, w) {
|
|
444
|
+
!f.value && y.value && g >= 0 && g < y.value.fields.length && (y.value.fields[g] = w);
|
|
445
|
+
}
|
|
446
|
+
function J() {
|
|
447
|
+
!f.value && y.value && delete y.value.headerRange;
|
|
448
|
+
}
|
|
449
|
+
function G() {
|
|
450
|
+
!f.value && y.value && B.value && (y.value.headerRange = B.value);
|
|
451
|
+
}
|
|
452
|
+
function X() {
|
|
453
|
+
!f.value && B.value && (p.value.footerRange = B.value);
|
|
454
|
+
}
|
|
455
|
+
function O() {
|
|
456
|
+
f.value || delete p.value.footerRange;
|
|
457
|
+
}
|
|
458
|
+
function ee(g) {
|
|
459
|
+
const w = p.value.regions.find((P) => P.id === g);
|
|
460
|
+
w && T({ regionId: g, control: "range", range: w.range });
|
|
461
|
+
}
|
|
462
|
+
function te(g, w) {
|
|
463
|
+
return !!C.value && !!R.value && g >= Math.min(C.value.row, R.value.row) && g <= 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: B, validation: oe, directory: r, focusTarget: E, target: $, locate: Z, reset: M, select: u, add: N, remove: ne, dataset: L, 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 f = nt(), m = K(he()), p = K("table"), o = Rn(f, S(() => m.value.sheet), S(() => H.value), () => t.datasets), E = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), R = K({ table: [], regions: [] });
|
|
482
|
+
function B() {
|
|
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, d) {
|
|
490
|
+
return le(E.get(i) ?? he(i, d));
|
|
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 T;
|
|
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 } : {} }, B();
|
|
499
|
+
for (const d of i.cached.table) E.set(d.sheet, d);
|
|
500
|
+
for (const d of i.cached.regions) C.set(d.sheet, d);
|
|
501
|
+
R.value = i.cached;
|
|
502
|
+
}
|
|
503
|
+
const u = K(0), N = $t(() => ({ source: u.value, recipe: m.value, mode: p.value, regions: o.recipe.value, cached: R.value, identity: y.value })), ne = K([]);
|
|
504
|
+
let L;
|
|
505
|
+
function Q() {
|
|
506
|
+
L?.dispose(), L = 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), g = K(), w = K(), P = K(0), b = S(() => ({ ...wt, ...t.messages })), H = S(() => !!t.readonly || J.value || O.value), ve = S(() => !J.value && !O.value), ie = S(
|
|
509
|
+
() => f.value?.sheets.find((i) => i.name === m.value.sheet)
|
|
510
|
+
), z = 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
|
+
() => f.value && ie.value ? dt(f.value, ie.value.name, {
|
|
516
|
+
row: ee.value,
|
|
517
|
+
column: te.value
|
|
518
|
+
}) : void 0
|
|
519
|
+
), Me = S(
|
|
520
|
+
() => f.value ? ct(f.value, m.value) : []
|
|
521
|
+
), Se = S(() => {
|
|
522
|
+
if (!f.value) return { ok: !1, issues: [], mapped: 0, total: 0 };
|
|
523
|
+
const i = vt(
|
|
524
|
+
f.value,
|
|
525
|
+
m.value,
|
|
526
|
+
t.datasets
|
|
527
|
+
), d = [...Me.value, ...i.issues];
|
|
528
|
+
return { ...i, ok: d.length === 0, issues: d };
|
|
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 d = { 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), q = i.fieldIndex === void 0 ? "" : ` ${Ee(F?.left ?? i.fieldIndex + 1)}`;
|
|
535
|
+
return `${i.regionId ? `${i.regionId} · ` : ""}${d[i.control] ?? b.value.regionCoordinates}${q}`;
|
|
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, (d, 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 d = i && ye(i.target);
|
|
548
|
+
!d || !z.value || (ee.value = Math.max(z.value.top, Math.min(z.value.bottom, d.top)), te.value = Math.max(z.value.left, Math.min(z.value.right, d.left)));
|
|
549
|
+
});
|
|
550
|
+
function ke(i) {
|
|
551
|
+
if (p.value === "regions") {
|
|
552
|
+
o.locate(i);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
const d = h(i), F = ye(d);
|
|
556
|
+
F && (g.value = F.top, w.value = F.bottom), d.fieldIndex !== void 0 && (P.value = Math.floor(d.fieldIndex / 12)), fe.value = { target: d, sequence: (fe.value?.sequence ?? 0) + 1 };
|
|
557
|
+
}
|
|
558
|
+
const $e = S(
|
|
559
|
+
() => m.value.fields.slice(P.value * 12, (P.value + 1) * 12).map((i, d) => ({
|
|
560
|
+
index: P.value * 12 + d,
|
|
561
|
+
field: i,
|
|
562
|
+
physical: Ee(
|
|
563
|
+
(z.value?.left ?? 1) + P.value * 12 + d
|
|
564
|
+
)
|
|
565
|
+
}))
|
|
566
|
+
), We = S(
|
|
567
|
+
() => we.value?.fields.filter((i) => i.type !== "boolean") ?? []
|
|
568
|
+
), xe = S(
|
|
569
|
+
() => g.value !== void 0 && w.value !== void 0 ? {
|
|
570
|
+
top: Math.min(g.value, w.value),
|
|
571
|
+
bottom: Math.max(g.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 = z.value?.top ?? 1, te.value = z.value?.left ?? 1, g.value = void 0, w.value = void 0, P.value = 0, G.value = !1, X.value = !1;
|
|
580
|
+
}
|
|
581
|
+
function Fe(i) {
|
|
582
|
+
de();
|
|
583
|
+
try {
|
|
584
|
+
const d = i.version === "2.0" ? gt(i) : ft(i);
|
|
585
|
+
de(), Q(), ne.value = d.source.sheets.map((F) => ({
|
|
586
|
+
name: F.name,
|
|
587
|
+
index: F.index
|
|
588
|
+
})), f.value = d.source, B(), d.version === "2.0" ? (m.value = he(d.recipe.sheet, d.source.sheets.find((F) => F.name === d.recipe.sheet).columnCount), o.reset(d.recipe), p.value = "regions") : (m.value = d.recipe, o.reset(), p.value = "table"), y.value = { ...d.identity, ...t.lockId && t.identity ? { id: t.identity.id } : {} }, $.value = d.recipe.sheet, I.value = "", me(), u.value++, N.accept();
|
|
589
|
+
} catch (d) {
|
|
590
|
+
I.value = Ce(d);
|
|
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 _e(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 d = ++ae;
|
|
625
|
+
se = new AbortController(), J.value = !0, I.value = "";
|
|
626
|
+
let F;
|
|
627
|
+
try {
|
|
628
|
+
const { openExcelWorkbook: q } = await import("./workbook-session-BfK1yHOO.js").then((ce) => ce.w);
|
|
629
|
+
if (d !== ae || t.readonly || (F = await q(i, { ...t.importOptions, signal: se.signal }), d !== 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 = T?.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 (d !== ae || t.readonly) return;
|
|
636
|
+
Q(), L = F, F = void 0, f.value = Ke, u.value++, $.value = i.name, ne.value = ge.map((ce) => ({
|
|
637
|
+
name: ce.name,
|
|
638
|
+
index: ce.index
|
|
639
|
+
})), B(), m.value = he(
|
|
640
|
+
Ke.sheets[0].name,
|
|
641
|
+
Ke.sheets[0].columnCount
|
|
642
|
+
), o.reset(), T && (Z(T), T = void 0, r.value = !1), me();
|
|
643
|
+
} catch (q) {
|
|
644
|
+
d === ae && (I.value = Ce(q));
|
|
645
|
+
} finally {
|
|
646
|
+
F?.dispose(), d === ae && (J.value = !1, se = void 0);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
async function He(i) {
|
|
650
|
+
if (H.value || !ne.value.some((q) => q.name === i) || m.value.sheet === i)
|
|
651
|
+
return;
|
|
652
|
+
j();
|
|
653
|
+
const d = f.value?.sheets.find((q) => q.name === i);
|
|
654
|
+
if (d) {
|
|
655
|
+
m.value = oe(i, d.columnCount), o.reset(C.get(i)), I.value = "", me();
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
if (!L || L.disposed) return;
|
|
659
|
+
de();
|
|
660
|
+
const F = ++ae;
|
|
661
|
+
se = new AbortController(), J.value = !0, I.value = "";
|
|
662
|
+
try {
|
|
663
|
+
const q = await L.importTemplate({ sheets: [i], signal: se.signal });
|
|
664
|
+
if (F !== ae || t.readonly) return;
|
|
665
|
+
f.value = q, m.value = oe(i, q.sheets[0].columnCount), o.reset(C.get(i)), me();
|
|
666
|
+
} catch (q) {
|
|
667
|
+
F === ae && (I.value = Ce(q));
|
|
668
|
+
} finally {
|
|
669
|
+
F === ae && (J.value = !1, se = void 0);
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
function qe(i) {
|
|
673
|
+
H.value || (m.value.dataset = i, m.value.rowKey = "", m.value.fields.fill(""), G.value = !1, X.value = !1);
|
|
674
|
+
}
|
|
675
|
+
function Oe(i, d) {
|
|
676
|
+
H.value || !z.value || i < z.value.top || i > z.value.bottom || ((!d || g.value === void 0) && (g.value = i), w.value = i);
|
|
677
|
+
}
|
|
678
|
+
function Ve(i) {
|
|
679
|
+
if (H.value || !f.value || !xe.value) {
|
|
680
|
+
H.value || (I.value = b.value.emptySelection);
|
|
681
|
+
return;
|
|
682
|
+
}
|
|
683
|
+
m.value.regions[i] = pt(
|
|
684
|
+
f.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
|
+
H.value || (delete m.value.regions[i], G.value = !1, X.value = !1);
|
|
692
|
+
}
|
|
693
|
+
function Ue(i, d) {
|
|
694
|
+
!H.value && i >= 0 && i < m.value.fields.length && (m.value.fields[i] = d, G.value = !1, X.value = !1);
|
|
695
|
+
}
|
|
696
|
+
function je(i) {
|
|
697
|
+
H.value || (m.value.rowKey = i);
|
|
698
|
+
}
|
|
699
|
+
function Ge(i, d) {
|
|
700
|
+
!H.value && !(i === "id" && t.lockId) && (y.value[i] = d);
|
|
701
|
+
}
|
|
702
|
+
function Xe(i) {
|
|
703
|
+
for (const d of ["title", "header", "detail", "footer"]) {
|
|
704
|
+
const F = m.value.regions[d];
|
|
705
|
+
if (!F) continue;
|
|
706
|
+
const q = pe(F);
|
|
707
|
+
if (i >= q.top && i <= q.bottom) return d;
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
function Qe(i, d) {
|
|
711
|
+
z.value && (i === "row" ? ee.value = Math.max(
|
|
712
|
+
z.value.top,
|
|
713
|
+
Math.min(z.value.bottom, ee.value + d)
|
|
714
|
+
) : te.value = Math.max(
|
|
715
|
+
z.value.left,
|
|
716
|
+
Math.min(z.value.right, te.value + d)
|
|
717
|
+
));
|
|
718
|
+
}
|
|
719
|
+
function Ye() {
|
|
720
|
+
if (!t.readonly) {
|
|
721
|
+
if (t.session) {
|
|
722
|
+
Fe(t.session);
|
|
723
|
+
return;
|
|
724
|
+
}
|
|
725
|
+
T = void 0, r.value = !1, de(), Q(), f.value = void 0, ne.value = [], $.value = "", B(), m.value = he(), y.value = { id: t.identity?.id ?? "excel-template", name: t.identity?.name ?? "Excel 业务模板" }, o.reset(), p.value = "table", me(), u.value++, N.accept(), I.value = "";
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
function Ze() {
|
|
729
|
+
ve.value && (G.value = !0, I.value = "");
|
|
730
|
+
}
|
|
731
|
+
async function et() {
|
|
732
|
+
if (!(H.value || !f.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 } : {} }, d = p.value === "regions" ? bt(f.value, o.recipe.value, t.datasets, i) : mt(f.value, m.value, t.datasets, i), F = p.value === "regions" ? ht(f.value, o.recipe.value, i) : yt(f.value, m.value, i), q = { ...d, session: F }, ge = N.snapshot();
|
|
736
|
+
if (t.accept && !await t.accept(q) || t.readonly || ge !== N.snapshot() && N.pending.value) return;
|
|
737
|
+
t.accept || x(q), B(), N.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: () => N.pending.value || r.value, snapshot: () => JSON.stringify(M()), restore(i) {
|
|
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), T = d, r.value = !0;
|
|
749
|
+
} }), {
|
|
750
|
+
recoveredMapping: r,
|
|
751
|
+
imported: f,
|
|
752
|
+
mode: p,
|
|
753
|
+
regionBindings: o,
|
|
754
|
+
pendingLocalChanges: S(() => N.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: P,
|
|
766
|
+
m: b,
|
|
767
|
+
disabled: H,
|
|
768
|
+
canCheck: ve,
|
|
769
|
+
sheet: ie,
|
|
770
|
+
sourceRange: z,
|
|
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: We,
|
|
780
|
+
selection: xe,
|
|
781
|
+
cancel: de,
|
|
782
|
+
importFile: _e,
|
|
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"], Wn = ["aria-label"], _n = ["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" }, Wa = ["value"], _a = {
|
|
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: f }) {
|
|
859
|
+
const m = t, p = f, o = In(m, (h) => p("apply", h)), {
|
|
860
|
+
imported: E,
|
|
861
|
+
mode: C,
|
|
862
|
+
regionBindings: R,
|
|
863
|
+
recipe: B,
|
|
864
|
+
identity: j,
|
|
865
|
+
sourceName: le,
|
|
866
|
+
sheetChoices: oe,
|
|
867
|
+
error: y,
|
|
868
|
+
loading: $,
|
|
869
|
+
checked: r,
|
|
870
|
+
row: M,
|
|
871
|
+
column: T,
|
|
872
|
+
mappingPage: Z,
|
|
873
|
+
m: u,
|
|
874
|
+
disabled: N,
|
|
875
|
+
sheet: ne,
|
|
876
|
+
sourceRange: L,
|
|
877
|
+
dataset: Q,
|
|
878
|
+
window: I,
|
|
879
|
+
validation: J,
|
|
880
|
+
mappings: G,
|
|
881
|
+
rowKeys: X,
|
|
882
|
+
selection: O
|
|
883
|
+
} = o;
|
|
884
|
+
re([o.pendingLocalChanges, B, j], () => p("dirty", o.pendingLocalChanges.value), { immediate: !0, deep: !0, flush: "sync" });
|
|
885
|
+
const ee = K(), te = K(), g = K(0), w = S(() => Math.max(1, Math.ceil(o.issueEntries.value.length / 12))), P = S(() => o.issueEntries.value.slice(g.value * 12, (g.value + 1) * 12));
|
|
886
|
+
re(w, (h) => {
|
|
887
|
+
g.value = Math.min(g.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 = N.value ? k?.closest("label") : k;
|
|
894
|
+
Y?.focus(), Y?.scrollIntoView?.({ block: "nearest" });
|
|
895
|
+
});
|
|
896
|
+
const b = K(!1), H = ["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(B.value.fields.length / 12))
|
|
903
|
+
);
|
|
904
|
+
function z(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 || N.value || (h.preventDefault(), b.value = !0, o.chooseRow(s, h.shiftKey), C.value === "regions" && L.value && (R.select(s, L.value.left, !1), R.select(s, L.value.right, !0)), h.currentTarget.focus());
|
|
913
|
+
}
|
|
914
|
+
function Me(h, s, a) {
|
|
915
|
+
C.value !== "regions" || h.button !== 0 || N.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 || !L.value) return;
|
|
922
|
+
h.preventDefault();
|
|
923
|
+
const ke = Math.max(L.value.top, Math.min(L.value.bottom, s + Y[0])), $e = Math.max(L.value.left, Math.min(L.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(z(h));
|
|
944
|
+
!Number.isInteger(a) || !L.value || (s === "row" ? M.value = Math.max(
|
|
945
|
+
L.value.top,
|
|
946
|
+
Math.min(L.value.bottom, a)
|
|
947
|
+
) : T.value = Math.max(
|
|
948
|
+
L.value.left,
|
|
949
|
+
Math.min(L.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) => (c(), v("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 ? (c(), v("p", Sn, l(e(u).recoveredMapping), 1)) : D("", !0),
|
|
970
|
+
n("header", Kn, [
|
|
971
|
+
n("div", En, [
|
|
972
|
+
W(_, {
|
|
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($) ? (c(), v("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)) : (c(), v("button", {
|
|
995
|
+
key: 1,
|
|
996
|
+
type: "button",
|
|
997
|
+
disabled: t.readonly,
|
|
998
|
+
onClick: s[1] || (s[1] = (a) => ee.value?.click())
|
|
999
|
+
}, [
|
|
1000
|
+
W(_, {
|
|
1001
|
+
name: "upload",
|
|
1002
|
+
size: 14
|
|
1003
|
+
}),
|
|
1004
|
+
A(l(e(E) ? e(u).replace : e(u).upload), 1)
|
|
1005
|
+
], 8, Dn))
|
|
1006
|
+
]),
|
|
1007
|
+
e(y) ? (c(), v("div", Tn, l(e(y)), 1)) : D("", !0),
|
|
1008
|
+
e($) ? (c(), v("div", zn, [
|
|
1009
|
+
s[26] || (s[26] = n("span", { class: "mr-binding-loader" }, null, -1)),
|
|
1010
|
+
A(l(e(u).loading), 1)
|
|
1011
|
+
])) : e(E) ? (c(), v(V, { key: 4 }, [
|
|
1012
|
+
n("div", An, [
|
|
1013
|
+
n("label", null, [
|
|
1014
|
+
A(l(e(u).sheet), 1),
|
|
1015
|
+
n("select", {
|
|
1016
|
+
value: e(B).sheet,
|
|
1017
|
+
"aria-label": e(u).sheet,
|
|
1018
|
+
disabled: e(N),
|
|
1019
|
+
onChange: s[3] || (s[3] = (a) => e(o).chooseSheet(z(a)))
|
|
1020
|
+
}, [
|
|
1021
|
+
(c(!0), v(V, null, U(e(oe), (a) => (c(), v("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(N),
|
|
1036
|
+
onClick: s[4] || (s[4] = (a) => C.value = "table")
|
|
1037
|
+
}, l(e(u).tableMode), 9, _n),
|
|
1038
|
+
n("button", {
|
|
1039
|
+
type: "button",
|
|
1040
|
+
"aria-pressed": e(C) === "regions",
|
|
1041
|
+
disabled: e(N),
|
|
1042
|
+
onClick: s[5] || (s[5] = (a) => C.value = "regions")
|
|
1043
|
+
}, [
|
|
1044
|
+
W(_, {
|
|
1045
|
+
name: "grid",
|
|
1046
|
+
size: 12
|
|
1047
|
+
}),
|
|
1048
|
+
A(l(e(u).multiRegions), 1)
|
|
1049
|
+
], 8, Hn)
|
|
1050
|
+
], 8, Wn),
|
|
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) ? (c(), v("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
|
+
(c(!0), v(V, null, U(e(I).columns, (a) => (c(), v("th", {
|
|
1073
|
+
key: a.column,
|
|
1074
|
+
scope: "col"
|
|
1075
|
+
}, l(a.name), 1))), 128))
|
|
1076
|
+
])
|
|
1077
|
+
]),
|
|
1078
|
+
n("tbody", null, [
|
|
1079
|
+
(c(!0), v(V, null, U(e(I).rows, (a) => (c(), v("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(N),
|
|
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
|
+
(c(!0), v(V, null, U(a.cells, (k) => (c(), v("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)) : D("", !0),
|
|
1122
|
+
e(I) ? (c(), v("footer", ea, [
|
|
1123
|
+
n("span", null, [
|
|
1124
|
+
A(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(_, {
|
|
1135
|
+
name: "chevron-left",
|
|
1136
|
+
size: 13
|
|
1137
|
+
})
|
|
1138
|
+
], 8, na),
|
|
1139
|
+
n("label", null, [
|
|
1140
|
+
A(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(_, {
|
|
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(_, {
|
|
1170
|
+
name: "chevron-left",
|
|
1171
|
+
size: 13
|
|
1172
|
+
})
|
|
1173
|
+
], 8, ia),
|
|
1174
|
+
n("label", null, [
|
|
1175
|
+
A(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(T),
|
|
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(_, {
|
|
1192
|
+
name: "chevron-right",
|
|
1193
|
+
size: 13
|
|
1194
|
+
})
|
|
1195
|
+
], 8, ra)
|
|
1196
|
+
])
|
|
1197
|
+
])) : D("", !0)
|
|
1198
|
+
]),
|
|
1199
|
+
n("div", ua, [
|
|
1200
|
+
e(C) === "regions" ? (c(), ot(Cn, {
|
|
1201
|
+
key: 0,
|
|
1202
|
+
controller: e(R),
|
|
1203
|
+
datasets: t.datasets,
|
|
1204
|
+
disabled: e(N),
|
|
1205
|
+
messages: e(u)
|
|
1206
|
+
}, null, 8, ["controller", "datasets", "disabled", "messages"])) : D("", !0),
|
|
1207
|
+
Ne(n("fieldset", {
|
|
1208
|
+
disabled: e(N),
|
|
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
|
+
A(l(e(u).regionLegend), 1)
|
|
1215
|
+
]),
|
|
1216
|
+
(c(), v(V, null, U(H, (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
|
+
A(l(ve.value[a]), 1),
|
|
1224
|
+
a === "title" || a === "footer" ? (c(), v("small", ga, l(e(u).optional), 1)) : D("", !0)
|
|
1225
|
+
]),
|
|
1226
|
+
n("code", null, l(e(B).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(_, {
|
|
1237
|
+
name: "arrow-right",
|
|
1238
|
+
size: 13
|
|
1239
|
+
})
|
|
1240
|
+
], 8, fa),
|
|
1241
|
+
(a === "title" || a === "footer") && e(B).regions[a] ? (c(), v("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(_, {
|
|
1248
|
+
name: "close",
|
|
1249
|
+
size: 13
|
|
1250
|
+
})
|
|
1251
|
+
], 8, ba)) : D("", !0)
|
|
1252
|
+
], 8, va)), 64)),
|
|
1253
|
+
e(B).regions.footer ? (c(), v("p", ma, l(e(u).footerHint), 1)) : D("", !0)
|
|
1254
|
+
]),
|
|
1255
|
+
n("section", ha, [
|
|
1256
|
+
n("h3", null, [
|
|
1257
|
+
s[30] || (s[30] = n("b", null, "2", -1)),
|
|
1258
|
+
A(l(e(u).mapping), 1),
|
|
1259
|
+
n("span", null, l(e(J).mapped) + "/" + l(e(J).total), 1)
|
|
1260
|
+
]),
|
|
1261
|
+
n("label", ya, [
|
|
1262
|
+
A(l(e(u).dataset), 1),
|
|
1263
|
+
n("select", {
|
|
1264
|
+
"data-binding-control": "dataset",
|
|
1265
|
+
value: e(B).dataset,
|
|
1266
|
+
"aria-label": e(u).dataset,
|
|
1267
|
+
onChange: s[12] || (s[12] = (a) => e(o).chooseDataset(z(a)))
|
|
1268
|
+
}, [
|
|
1269
|
+
n("option", wa, l(e(u).chooseDataset), 1),
|
|
1270
|
+
(c(!0), v(V, null, U(t.datasets, (a) => (c(), v("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 ? D("", !0) : (c(), v("p", $a, l(e(u).noContract), 1)),
|
|
1277
|
+
e(Q) ? (c(), v("label", xa, [
|
|
1278
|
+
A(l(e(u).rowKey), 1),
|
|
1279
|
+
n("select", {
|
|
1280
|
+
"data-binding-control": "rowKey",
|
|
1281
|
+
value: e(B).rowKey,
|
|
1282
|
+
"aria-label": e(u).rowKey,
|
|
1283
|
+
onChange: s[13] || (s[13] = (a) => e(o).setRowKey(z(a)))
|
|
1284
|
+
}, [
|
|
1285
|
+
n("option", Ra, l(e(u).chooseRowKey), 1),
|
|
1286
|
+
(c(!0), v(V, null, U(e(X), (a) => (c(), v("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
|
+
])) : D("", !0),
|
|
1292
|
+
e(Q) ? (c(), v("div", Ma, [
|
|
1293
|
+
(c(!0), v(V, null, U(e(G), (a) => (c(), v("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, z(k))
|
|
1305
|
+
}, [
|
|
1306
|
+
n("option", Ka, l(e(u).chooseField), 1),
|
|
1307
|
+
(c(!0), v(V, null, U(e(Q).fields, (k) => (c(), v("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 ? (c(), v("small", Fa, l(fe(a.field)), 1)) : D("", !0)
|
|
1313
|
+
])
|
|
1314
|
+
]))), 128))
|
|
1315
|
+
])) : D("", !0),
|
|
1316
|
+
e(Q) && ie.value > 1 ? (c(), v("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(_, {
|
|
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(_, {
|
|
1336
|
+
name: "chevron-right",
|
|
1337
|
+
size: 13
|
|
1338
|
+
})
|
|
1339
|
+
], 8, za)
|
|
1340
|
+
])) : D("", !0)
|
|
1341
|
+
])
|
|
1342
|
+
], 8, da), [
|
|
1343
|
+
[it, e(C) === "table"]
|
|
1344
|
+
]),
|
|
1345
|
+
n("fieldset", { disabled: e(N) }, [
|
|
1346
|
+
n("section", Na, [
|
|
1347
|
+
n("h3", null, l(e(u).identity), 1),
|
|
1348
|
+
n("label", Aa, [
|
|
1349
|
+
A(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", z(a)))
|
|
1355
|
+
}, null, 40, La)
|
|
1356
|
+
]),
|
|
1357
|
+
n("label", Pa, [
|
|
1358
|
+
A(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", z(a)))
|
|
1363
|
+
}, null, 40, Wa)
|
|
1364
|
+
])
|
|
1365
|
+
])
|
|
1366
|
+
], 8, Ba)
|
|
1367
|
+
])
|
|
1368
|
+
]),
|
|
1369
|
+
e(r) && e(J).issues.length ? (c(), v("details", _a, [
|
|
1370
|
+
n("summary", null, l(e(u).issues) + " · " + l(e(J).issues.length) + " " + l(e(u).errors), 1),
|
|
1371
|
+
n("ul", null, [
|
|
1372
|
+
(c(!0), v(V, null, U(P.value, (a) => (c(), v("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(_, {
|
|
1384
|
+
name: "arrow-right",
|
|
1385
|
+
size: 12
|
|
1386
|
+
})
|
|
1387
|
+
], 8, Ha)
|
|
1388
|
+
]))), 128))
|
|
1389
|
+
]),
|
|
1390
|
+
w.value > 1 ? (c(), v("div", qa, [
|
|
1391
|
+
n("button", {
|
|
1392
|
+
type: "button",
|
|
1393
|
+
disabled: g.value === 0,
|
|
1394
|
+
"aria-label": e(u).previousIssues,
|
|
1395
|
+
onClick: s[18] || (s[18] = (a) => g.value--)
|
|
1396
|
+
}, [
|
|
1397
|
+
W(_, {
|
|
1398
|
+
name: "chevron-left",
|
|
1399
|
+
size: 12
|
|
1400
|
+
})
|
|
1401
|
+
], 8, Oa),
|
|
1402
|
+
n("span", null, l(g.value + 1) + "/" + l(w.value), 1),
|
|
1403
|
+
n("button", {
|
|
1404
|
+
type: "button",
|
|
1405
|
+
disabled: g.value + 1 >= w.value,
|
|
1406
|
+
"aria-label": e(u).nextIssues,
|
|
1407
|
+
onClick: s[19] || (s[19] = (a) => g.value++)
|
|
1408
|
+
}, [
|
|
1409
|
+
W(_, {
|
|
1410
|
+
name: "chevron-right",
|
|
1411
|
+
size: 12
|
|
1412
|
+
})
|
|
1413
|
+
], 8, Va)
|
|
1414
|
+
])) : D("", !0)
|
|
1415
|
+
])) : D("", !0),
|
|
1416
|
+
e(E).warnings.length ? (c(), v("details", Ja, [
|
|
1417
|
+
n("summary", null, l(e(u).inspectWarning) + " · " + l(e(E).warnings.length), 1),
|
|
1418
|
+
n("ul", null, [
|
|
1419
|
+
(c(!0), v(V, null, U(e(E).warnings, (a, k) => (c(), v("li", { key: k }, l(a), 1))), 128))
|
|
1420
|
+
])
|
|
1421
|
+
])) : D("", !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 ? (c(), v("button", {
|
|
1429
|
+
key: 0,
|
|
1430
|
+
type: "button",
|
|
1431
|
+
disabled: e(N),
|
|
1432
|
+
onClick: s[20] || (s[20] = //@ts-ignore
|
|
1433
|
+
(...a) => e(o).restoreDraft && e(o).restoreDraft(...a))
|
|
1434
|
+
}, l(e(u).restoreDraft), 9, Ga)) : D("", !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(N) || !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)) : (c(), v("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
|
+
};
|