@agile-team/mach-report 2.9.1 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/README.md +11 -7
  2. package/dist/ExcelBindingWizard-CjIiVox-.cjs +1 -0
  3. package/dist/ExcelBindingWizard-Dxm-K5HL.js +1240 -0
  4. package/dist/ParamEditor-D-Hf5xfO.cjs +1 -0
  5. package/dist/ParamEditor-DRGxzxeO.js +381 -0
  6. package/dist/ReportBatchPanel-BYgg0EDB.cjs +1 -0
  7. package/dist/ReportBatchPanel-Bby5yLzU.js +287 -0
  8. package/dist/ReportPreview-DWXROHBP.cjs +6 -0
  9. package/dist/ReportPreview-DiNXhQI0.js +4138 -0
  10. package/dist/ReportTemplateLibrary-C6CO7YCT.cjs +1 -0
  11. package/dist/ReportTemplateLibrary-DfzDXRvr.js +260 -0
  12. package/dist/RuleEditor-C2QsOHOs.cjs +1 -0
  13. package/dist/RuleEditor-D9wQHrkf.js +2024 -0
  14. package/dist/TemplateReviewPanel-BKofGrV9.js +222 -0
  15. package/dist/TemplateReviewPanel-DwtOcLue.cjs +1 -0
  16. package/dist/analytics.cjs +1 -1
  17. package/dist/analytics.d.cts +4 -0
  18. package/dist/analytics.d.ts +4 -0
  19. package/dist/analytics.js +40 -39
  20. package/dist/{assets-ahTRUXRk.cjs → assets-Bu6UohJx.cjs} +1 -1
  21. package/dist/{assets-DDsfEi8R.js → assets-DegqDNqY.js} +1 -1
  22. package/dist/batch-Bt3Fd27Z.cjs +1 -0
  23. package/dist/batch-mRqhhhjt.js +364 -0
  24. package/dist/{capabilities-Cm9hZ3uV.js → capabilities-CK_7hizc.js} +16 -16
  25. package/dist/capabilities-CsZ-pNHR.cjs +1 -0
  26. package/dist/computed-Bvk0W15F.js +521 -0
  27. package/dist/computed-CGV2a809.cjs +1 -0
  28. package/dist/config-B612mw0x.js +525 -0
  29. package/dist/config-BRoLo2oj.cjs +1 -0
  30. package/dist/designer.cjs +2 -2
  31. package/dist/designer.d.cts +695 -50
  32. package/dist/designer.d.ts +695 -50
  33. package/dist/designer.js +2213 -1748
  34. package/dist/index.cjs +8 -8
  35. package/dist/index.d.cts +205 -6
  36. package/dist/index.d.ts +205 -6
  37. package/dist/index.js +808 -1033
  38. package/dist/injection-keys-Db_DyLkm.cjs +1 -0
  39. package/dist/injection-keys-e85udZCp.js +7 -0
  40. package/dist/list-cell-BuYn4tGF.cjs +1 -0
  41. package/dist/list-cell-ClFra1zS.js +173 -0
  42. package/dist/matrix-DVyWiYsd.cjs +1 -0
  43. package/dist/matrix-yZsGnldA.js +227 -0
  44. package/dist/param-validation-BlHHXs6u.js +153 -0
  45. package/dist/param-validation-DCK039V1.cjs +1 -0
  46. package/dist/pdf.cjs +49 -49
  47. package/dist/pdf.d.cts +31 -1
  48. package/dist/pdf.d.ts +31 -1
  49. package/dist/pdf.js +4797 -4650
  50. package/dist/plugin-BDTU4D94.cjs +1 -0
  51. package/dist/plugin-Cd5G2QQn.js +22 -0
  52. package/dist/region-binding-workflow-CXDmt9Bs.js +977 -0
  53. package/dist/region-binding-workflow-DhQvu1co.cjs +3 -0
  54. package/dist/{report-params-B_VCihAh.js → report-params-B44imUd4.js} +1 -1
  55. package/dist/{report-params-CjWrjPl6.cjs → report-params-SJfhKgaX.cjs} +1 -1
  56. package/dist/server/node.d.cts +48 -5
  57. package/dist/server/node.d.ts +48 -5
  58. package/dist/server-node.cjs +1 -1
  59. package/dist/server-node.js +503 -317
  60. package/dist/server.cjs +1 -1
  61. package/dist/server.d.cts +252 -4
  62. package/dist/server.d.ts +252 -4
  63. package/dist/server.js +567 -469
  64. package/dist/style.css +1 -1
  65. package/dist/template-registry-WNXdkiET.js +506 -0
  66. package/dist/template-registry-ukBGlm8N.cjs +1 -0
  67. package/dist/template-review-BXp2oyqg.cjs +1 -0
  68. package/dist/template-review-BdcXSYbx.js +1616 -0
  69. package/dist/tree-BX380Rr7.cjs +1 -0
  70. package/dist/tree-CqcQ99NM.js +172 -0
  71. package/dist/useLocalDraft-C07SYRnC.js +11 -0
  72. package/dist/useLocalDraft-Yiw1wFgI.cjs +1 -0
  73. package/dist/{validate-DWPF7icl.js → validate-7s0yn6ii.js} +26 -26
  74. package/dist/validate-DsRiNw8h.cjs +1 -0
  75. package/dist/vue/async.d.cts +118 -6
  76. package/dist/vue/async.d.ts +118 -6
  77. package/dist/vue/index.d.cts +177 -11
  78. package/dist/vue/index.d.ts +177 -11
  79. package/dist/vue-async.cjs +1 -1
  80. package/dist/vue-async.js +5 -5
  81. package/dist/vue.cjs +1 -1
  82. package/dist/vue.js +116 -113
  83. package/dist/{import-template-CNMLJSQw.js → workbook-session-BKOTwcoq.js} +4290 -4227
  84. package/dist/{import-template-CpxunKVp.cjs → workbook-session-CLYLhZWu.cjs} +17 -17
  85. package/dist/worker.cjs +1 -1
  86. package/dist/worker.d.cts +9 -2
  87. package/dist/worker.d.ts +9 -2
  88. package/dist/worker.js +1 -1
  89. package/dist/xlsx.cjs +4 -2
  90. package/dist/xlsx.d.cts +159 -3
  91. package/dist/xlsx.d.ts +159 -3
  92. package/dist/xlsx.js +354 -192
  93. package/package.json +1 -1
  94. package/dist/ExcelBindingWizard-DiaxvWpQ.cjs +0 -1
  95. package/dist/ExcelBindingWizard-RLJIXKKG.js +0 -816
  96. package/dist/ReportPreview-B5ZNEasW.js +0 -4439
  97. package/dist/ReportPreview-DRtVPUYo.cjs +0 -6
  98. package/dist/RuleEditor-CskN5Fr3.cjs +0 -1
  99. package/dist/RuleEditor-CtJFzKuY.js +0 -1578
  100. package/dist/TemplateReviewPanel-C_Lmzis6.cjs +0 -1
  101. package/dist/TemplateReviewPanel-Cn32OY4_.js +0 -173
  102. package/dist/binding-preview-B5834rml.cjs +0 -2
  103. package/dist/binding-preview-ChXjN5L5.js +0 -649
  104. package/dist/capabilities-DYzWL7KS.cjs +0 -1
  105. package/dist/matrix-CNPDJxED.js +0 -745
  106. package/dist/matrix-Div9Ilh3.cjs +0 -1
  107. package/dist/param-validation-BWNjLcN0.js +0 -116
  108. package/dist/param-validation-CiTxFeZ8.cjs +0 -1
  109. package/dist/plugin-BWwIgZXV.js +0 -25
  110. package/dist/plugin-Dg-J1Rbm.cjs +0 -1
  111. package/dist/template-registry-CHMYZ7SD.cjs +0 -1
  112. package/dist/template-registry-R61AMCr0.js +0 -433
  113. package/dist/template-review-hvWWQFsi.js +0 -1027
  114. package/dist/template-review-jEcOfmGr.cjs +0 -1
  115. package/dist/validate-BDiMqkJC.cjs +0 -1
@@ -1,816 +0,0 @@
1
- import { shallowRef as pe, ref as C, computed as M, watch as le, onBeforeUnmount as he, defineComponent as ye, openBlock as r, createElementBlock as u, unref as e, createElementVNode as n, createVNode as W, toDisplayString as o, createTextVNode as x, createCommentVNode as $, Fragment as K, renderList as D, normalizeClass as me, normalizeStyle as we, withDirectives as be, vModelSelect as _e, vModelText as ke } from "vue";
2
- import { a as A, _ as xe } from "./_plugin-vue_export-helper-8SL1F89S.js";
3
- import { h as fe, g as Ce, f as $e, v as Re, i as Ee, p as Me, c as Se, a as ze, e as Be } from "./binding-preview-ChXjN5L5.js";
4
- import { EXCEL_BINDING_MESSAGES as Ie } from "./designer.js";
5
- function ae(s = "", Y = 0) {
6
- return {
7
- version: "1.0",
8
- sheet: s,
9
- dataset: "",
10
- regions: { header: "", detail: "" },
11
- fields: Array.from({ length: Y }, () => ""),
12
- rowKey: ""
13
- };
14
- }
15
- function oe(s) {
16
- return s instanceof Error ? s.message : String(s);
17
- }
18
- function Ke(s, Y) {
19
- const g = pe(), b = C(ae()), X = C({
20
- id: s.identity?.id ?? "excel-template",
21
- name: s.identity?.name ?? "Excel 业务模板"
22
- }), v = C(""), N = C([]);
23
- let R;
24
- const f = C(""), P = C(!1), S = C(!1), z = C(!1), F = C(1), H = C(1), L = C(), U = C(), O = C(0), T = M(() => ({ ...Ie, ...s.messages })), a = M(() => !!s.readonly || P.value), B = M(
25
- () => g.value?.sheets.find((i) => i.name === b.value.sheet)
26
- ), y = M(
27
- () => B.value ? fe(B.value.range) : void 0
28
- ), j = M(
29
- () => s.datasets.find((i) => i.id === b.value.dataset)
30
- ), q = M(
31
- () => g.value && B.value ? Ce(g.value, B.value.name, {
32
- row: F.value,
33
- column: H.value
34
- }) : void 0
35
- ), p = M(
36
- () => g.value ? $e(g.value, b.value) : []
37
- ), _ = M(() => {
38
- if (!g.value) return { ok: !1, issues: [], mapped: 0, total: 0 };
39
- const i = Re(
40
- g.value,
41
- b.value,
42
- s.datasets
43
- ), d = [...p.value, ...i.issues];
44
- return { ...i, ok: d.length === 0, issues: d };
45
- }), ie = M(
46
- () => b.value.fields.slice(O.value * 12, (O.value + 1) * 12).map((i, d) => ({
47
- index: O.value * 12 + d,
48
- field: i,
49
- physical: Ee(
50
- (y.value?.left ?? 1) + O.value * 12 + d
51
- )
52
- }))
53
- ), se = M(
54
- () => j.value?.fields.filter((i) => i.type !== "boolean") ?? []
55
- ), k = M(
56
- () => L.value !== void 0 && U.value !== void 0 ? {
57
- top: Math.min(L.value, U.value),
58
- bottom: Math.max(L.value, U.value)
59
- } : void 0
60
- );
61
- let E, h = 0;
62
- function V() {
63
- h++, E?.abort(), E = void 0, P.value = !1;
64
- }
65
- function G() {
66
- F.value = y.value?.top ?? 1, H.value = y.value?.left ?? 1, L.value = void 0, U.value = void 0, O.value = 0, S.value = !1, z.value = !1;
67
- }
68
- function Z(i) {
69
- V();
70
- try {
71
- const d = Me(i);
72
- V(), R = void 0, N.value = d.source.sheets.map((w) => ({
73
- name: w.name,
74
- index: w.index
75
- })), g.value = d.source, b.value = d.recipe, X.value = { ...d.identity, ...s.lockId && s.identity ? { id: s.identity.id } : {} }, v.value = d.recipe.sheet, f.value = "", G();
76
- } catch (d) {
77
- f.value = oe(d);
78
- }
79
- }
80
- le(
81
- () => s.session,
82
- (i) => {
83
- i && Z(i);
84
- },
85
- { immediate: !0 }
86
- ), le(
87
- () => s.readonly,
88
- (i) => {
89
- i && V();
90
- }
91
- ), le(
92
- [b, X],
93
- () => {
94
- S.value = !1, z.value = !1;
95
- },
96
- { deep: !0, flush: "sync" }
97
- ), le(
98
- () => s.datasets,
99
- () => {
100
- S.value = !1, z.value = !1;
101
- }
102
- ), he(V);
103
- async function J(i) {
104
- if (s.readonly) return;
105
- if (V(), !/\.xlsx$/i.test(i.name)) {
106
- f.value = T.value.invalidFile;
107
- return;
108
- }
109
- const d = ++h;
110
- E = new AbortController(), P.value = !0, f.value = "";
111
- try {
112
- const { inspectExcelWorkbook: w, importExcelTemplate: I } = await import("./import-template-CNMLJSQw.js").then((Q) => Q.b);
113
- if (d !== h || s.readonly) return;
114
- const ne = await w(i, {
115
- ...s.importOptions,
116
- signal: E.signal
117
- });
118
- if (d !== h || s.readonly) return;
119
- const ee = ne.sheets.filter((Q) => Q.visible);
120
- if (!ee.length) throw new Error("Excel 中没有可导入的可见工作表");
121
- const ve = await I(i, {
122
- ...s.importOptions,
123
- sheets: [ee[0].name],
124
- signal: E.signal
125
- });
126
- if (d !== h || s.readonly) return;
127
- g.value = ve, v.value = i.name, R = i, N.value = ee.map((Q) => ({
128
- name: Q.name,
129
- index: Q.index
130
- })), b.value = ae(
131
- ve.sheets[0].name,
132
- ve.sheets[0].columnCount
133
- ), G();
134
- } catch (w) {
135
- d === h && (f.value = oe(w));
136
- } finally {
137
- d === h && (P.value = !1, E = void 0);
138
- }
139
- }
140
- async function re(i) {
141
- if (a.value || !N.value.some((I) => I.name === i))
142
- return;
143
- const d = g.value?.sheets.find((I) => I.name === i);
144
- if (d) {
145
- b.value = ae(i, d.columnCount), f.value = "", G();
146
- return;
147
- }
148
- if (!R) return;
149
- V();
150
- const w = ++h;
151
- E = new AbortController(), P.value = !0, f.value = "";
152
- try {
153
- const { importExcelTemplate: I } = await import("./import-template-CNMLJSQw.js").then((ee) => ee.b);
154
- if (w !== h || s.readonly) return;
155
- const ne = await I(R, {
156
- ...s.importOptions,
157
- sheets: [i],
158
- signal: E.signal
159
- });
160
- if (w !== h || s.readonly) return;
161
- g.value = ne, b.value = ae(i, ne.sheets[0].columnCount), G();
162
- } catch (I) {
163
- w === h && (f.value = oe(I));
164
- } finally {
165
- w === h && (P.value = !1, E = void 0);
166
- }
167
- }
168
- function ue(i) {
169
- a.value || (b.value.dataset = i, b.value.rowKey = "", b.value.fields.fill(""), S.value = !1, z.value = !1);
170
- }
171
- function de(i, d) {
172
- a.value || !y.value || i < y.value.top || i > y.value.bottom || ((!d || L.value === void 0) && (L.value = i), U.value = i);
173
- }
174
- function ce(i) {
175
- if (a.value || !g.value || !k.value) {
176
- a.value || (f.value = T.value.emptySelection);
177
- return;
178
- }
179
- b.value.regions[i] = Be(
180
- g.value,
181
- b.value.sheet,
182
- k.value.top,
183
- k.value.bottom
184
- ), S.value = !1, z.value = !1, f.value = "";
185
- }
186
- function te(i) {
187
- a.value || (delete b.value.regions[i], S.value = !1, z.value = !1);
188
- }
189
- function m(i, d) {
190
- !a.value && i >= 0 && i < b.value.fields.length && (b.value.fields[i] = d, S.value = !1, z.value = !1);
191
- }
192
- function l(i) {
193
- for (const d of ["title", "header", "detail", "footer"]) {
194
- const w = b.value.regions[d];
195
- if (!w) continue;
196
- const I = fe(w);
197
- if (i >= I.top && i <= I.bottom) return d;
198
- }
199
- }
200
- function t(i, d) {
201
- y.value && (i === "row" ? F.value = Math.max(
202
- y.value.top,
203
- Math.min(y.value.bottom, F.value + d)
204
- ) : H.value = Math.max(
205
- y.value.left,
206
- Math.min(y.value.right, H.value + d)
207
- ));
208
- }
209
- function c() {
210
- S.value = !0, f.value = "";
211
- }
212
- function ge() {
213
- if (!(a.value || !g.value) && (S.value = !0, f.value = "", !!_.value.ok))
214
- try {
215
- const i = { ...X.value, ...s.lockId && s.identity ? { id: s.identity.id } : {} }, d = Se(
216
- g.value,
217
- b.value,
218
- s.datasets,
219
- i
220
- ), w = ze(
221
- g.value,
222
- b.value,
223
- i
224
- );
225
- Y({ ...d, session: w }), z.value = !0;
226
- } catch (i) {
227
- f.value = oe(i);
228
- }
229
- }
230
- return {
231
- imported: g,
232
- recipe: b,
233
- identity: X,
234
- sourceName: v,
235
- sheetChoices: N,
236
- error: f,
237
- loading: P,
238
- checked: S,
239
- applied: z,
240
- row: F,
241
- column: H,
242
- mappingPage: O,
243
- m: T,
244
- disabled: a,
245
- sheet: B,
246
- sourceRange: y,
247
- dataset: j,
248
- window: q,
249
- validation: _,
250
- mappings: ie,
251
- rowKeys: se,
252
- selection: k,
253
- cancel: V,
254
- importFile: J,
255
- chooseSheet: re,
256
- chooseDataset: ue,
257
- chooseRow: de,
258
- markRegion: ce,
259
- clearRegion: te,
260
- setMapping: m,
261
- regionAt: l,
262
- moveWindow: t,
263
- check: c,
264
- apply: ge
265
- };
266
- }
267
- const De = ["aria-label", "aria-busy"], Ne = { class: "mr-binding-bar" }, We = { class: "mr-binding-heading" }, Ae = ["aria-label", "disabled"], Pe = ["disabled"], Fe = {
268
- key: 0,
269
- class: "mr-binding-error",
270
- role: "alert"
271
- }, Oe = {
272
- key: 1,
273
- class: "mr-binding-placeholder",
274
- role: "status"
275
- }, Te = {
276
- key: 2,
277
- class: "mr-binding-placeholder"
278
- }, Ve = ["disabled"], Le = { class: "mr-binding-sourcebar" }, Ue = ["value", "aria-label", "disabled"], je = ["value"], Ge = { class: "mr-binding-range" }, He = { class: "mr-binding-sample-note" }, qe = { class: "mr-binding-layout" }, Xe = { class: "mr-binding-source" }, Je = { class: "mr-binding-grid-heading" }, Qe = ["aria-label"], Ye = { class: "mr-binding-grid" }, Ze = ["data-region"], et = { scope: "row" }, tt = ["data-source-row", "aria-label", "aria-pressed", "disabled", "onPointerdown", "onPointerenter", "onKeydown"], nt = ["rowspan", "colspan", "title"], lt = {
279
- key: 1,
280
- class: "mr-binding-grid-footer"
281
- }, at = { class: "mr-binding-window" }, ot = ["aria-label", "disabled"], it = ["min", "max", "value"], st = ["aria-label", "disabled"], rt = { class: "mr-binding-window" }, ut = ["aria-label", "disabled"], dt = ["min", "max", "value"], ct = ["aria-label", "disabled"], vt = { class: "mr-binding-inspector" }, mt = ["disabled"], bt = { class: "mr-binding-group" }, ft = ["data-role"], gt = { key: 0 }, pt = ["aria-label", "disabled", "onClick"], ht = ["aria-label", "onClick"], yt = {
282
- key: 0,
283
- class: "mr-binding-note"
284
- }, wt = { class: "mr-binding-group" }, _t = { class: "mr-binding-label" }, kt = ["value", "aria-label"], xt = { value: "" }, Ct = ["value"], $t = {
285
- key: 0,
286
- class: "mr-binding-note"
287
- }, Rt = {
288
- key: 1,
289
- class: "mr-binding-label"
290
- }, Et = ["aria-label"], Mt = { value: "" }, St = ["value"], zt = {
291
- key: 2,
292
- class: "mr-binding-mappings"
293
- }, Bt = ["aria-label", "value", "onChange"], It = { value: "" }, Kt = ["value"], Dt = { key: 0 }, Nt = {
294
- key: 3,
295
- class: "mr-binding-map-pages"
296
- }, Wt = ["disabled", "aria-label"], At = ["disabled", "aria-label"], Pt = { class: "mr-binding-group" }, Ft = { class: "mr-binding-label" }, Ot = ["value", "readonly"], Tt = { class: "mr-binding-label" }, Vt = {
297
- key: 0,
298
- class: "mr-binding-issues",
299
- role: "alert"
300
- }, Lt = { key: 0 }, Ut = {
301
- key: 1,
302
- class: "mr-binding-warnings"
303
- }, jt = { class: "mr-binding-actions" }, Gt = ["disabled"], Ht = ["disabled"], qt = /* @__PURE__ */ ye({
304
- __name: "ExcelBindingWizard",
305
- props: {
306
- datasets: {},
307
- session: {},
308
- identity: {},
309
- lockId: { type: Boolean },
310
- readonly: { type: Boolean },
311
- importOptions: {},
312
- messages: {}
313
- },
314
- emits: ["apply"],
315
- setup(s, { expose: Y, emit: g }) {
316
- const b = s, X = g, v = Ke(b, (m) => X("apply", m)), {
317
- imported: N,
318
- recipe: R,
319
- identity: f,
320
- sourceName: P,
321
- sheetChoices: S,
322
- error: z,
323
- loading: F,
324
- checked: H,
325
- applied: L,
326
- row: U,
327
- column: O,
328
- mappingPage: T,
329
- m: a,
330
- disabled: B,
331
- sheet: y,
332
- sourceRange: j,
333
- dataset: q,
334
- window: p,
335
- validation: _,
336
- mappings: ie,
337
- rowKeys: se,
338
- selection: k
339
- } = v, E = C(), h = C(!1), V = ["title", "header", "detail", "footer"], G = M(() => ({
340
- title: a.value.titleRegion,
341
- header: a.value.headerRegion,
342
- detail: a.value.detailRegion,
343
- footer: a.value.footerRegion
344
- })), Z = M(
345
- () => Math.max(1, Math.ceil(R.value.fields.length / 12))
346
- );
347
- function J(m) {
348
- return m.target.value;
349
- }
350
- function re(m) {
351
- const l = m.target, t = l.files?.[0];
352
- t && v.importFile(t), l.value = "";
353
- }
354
- function ue(m, l) {
355
- m.button !== 0 || B.value || (m.preventDefault(), h.value = !0, v.chooseRow(l, m.shiftKey), m.currentTarget.focus());
356
- }
357
- function de(m, l) {
358
- if ((m.key === " " || m.key === "Enter") && (m.preventDefault(), v.chooseRow(l, m.shiftKey)), m.key === "ArrowDown" || m.key === "ArrowUp") {
359
- m.preventDefault();
360
- const t = l + (m.key === "ArrowDown" ? 1 : -1);
361
- m.shiftKey && v.chooseRow(t, !0), m.currentTarget.closest("table")?.querySelector(`button[data-source-row="${t}"]`)?.focus();
362
- }
363
- }
364
- function ce(m) {
365
- const l = q.value?.fields.find((t) => t.field === m);
366
- return l ? [
367
- l.type,
368
- l.unit,
369
- l.digits === void 0 ? void 0 : `${l.digits}${a.value.precision}`,
370
- l.sample === void 0 ? void 0 : `${a.value.sample}: ${String(l.sample)}`
371
- ].filter((t) => t !== void 0 && t !== "").join(" · ") : "";
372
- }
373
- function te(m, l) {
374
- const t = Number(J(m));
375
- !Number.isInteger(t) || !j.value || (l === "row" ? U.value = Math.max(
376
- j.value.top,
377
- Math.min(j.value.bottom, t)
378
- ) : O.value = Math.max(
379
- j.value.left,
380
- Math.min(j.value.right, t)
381
- ));
382
- }
383
- return Y({
384
- importFile: v.importFile,
385
- apply: v.apply,
386
- cancel: v.cancel
387
- }), (m, l) => (r(), u("section", {
388
- class: "mr-binding",
389
- "aria-label": e(a).title,
390
- "aria-busy": e(F),
391
- onPointerup: l[18] || (l[18] = (t) => h.value = !1),
392
- onPointercancel: l[19] || (l[19] = (t) => h.value = !1),
393
- onPointerleave: l[20] || (l[20] = (t) => h.value = !1)
394
- }, [
395
- n("header", Ne, [
396
- n("div", We, [
397
- W(A, {
398
- name: "file",
399
- size: 17
400
- }),
401
- n("strong", null, o(e(a).title), 1),
402
- n("span", null, o(e(P) || e(a).intro), 1)
403
- ]),
404
- n("input", {
405
- ref_key: "input",
406
- ref: E,
407
- type: "file",
408
- accept: ".xlsx,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
409
- "aria-label": e(a).upload,
410
- class: "mr-binding-file",
411
- disabled: s.readonly,
412
- onChange: re
413
- }, null, 40, Ae),
414
- e(F) ? (r(), u("button", {
415
- key: 0,
416
- type: "button",
417
- onClick: l[0] || (l[0] = //@ts-ignore
418
- (...t) => e(v).cancel && e(v).cancel(...t))
419
- }, o(e(a).cancel), 1)) : (r(), u("button", {
420
- key: 1,
421
- type: "button",
422
- disabled: s.readonly,
423
- onClick: l[1] || (l[1] = (t) => E.value?.click())
424
- }, [
425
- W(A, {
426
- name: "upload",
427
- size: 14
428
- }),
429
- x(o(e(N) ? e(a).replace : e(a).upload), 1)
430
- ], 8, Pe))
431
- ]),
432
- e(z) ? (r(), u("div", Fe, o(e(z)), 1)) : $("", !0),
433
- e(F) ? (r(), u("div", Oe, [
434
- l[21] || (l[21] = n("span", { class: "mr-binding-loader" }, null, -1)),
435
- x(o(e(a).loading), 1)
436
- ])) : e(N) ? (r(), u(K, { key: 3 }, [
437
- n("div", Le, [
438
- n("label", null, [
439
- x(o(e(a).sheet), 1),
440
- n("select", {
441
- value: e(R).sheet,
442
- "aria-label": e(a).sheet,
443
- disabled: e(B),
444
- onChange: l[3] || (l[3] = (t) => e(v).chooseSheet(J(t)))
445
- }, [
446
- (r(!0), u(K, null, D(e(S), (t) => (r(), u("option", {
447
- key: t.name,
448
- value: t.name
449
- }, o(t.name), 9, je))), 128))
450
- ], 40, Ue)
451
- ]),
452
- n("span", Ge, o(e(y)?.range) + " · " + o(e(y)?.rowCount) + " × " + o(e(y)?.columnCount), 1),
453
- n("span", He, o(e(a).sourceOnly), 1)
454
- ]),
455
- n("div", qe, [
456
- n("div", Xe, [
457
- n("div", Je, [
458
- n("strong", null, o(e(a).source), 1),
459
- n("span", null, o(e(a).sourceHint), 1)
460
- ]),
461
- e(p) ? (r(), u("div", {
462
- key: 0,
463
- class: "mr-binding-grid-scroll",
464
- "aria-label": e(a).source
465
- }, [
466
- n("table", Ye, [
467
- n("thead", null, [
468
- n("tr", null, [
469
- l[23] || (l[23] = n("th", {
470
- class: "mr-binding-corner",
471
- "aria-label": "#"
472
- }, "#", -1)),
473
- (r(!0), u(K, null, D(e(p).columns, (t) => (r(), u("th", {
474
- key: t.column,
475
- scope: "col"
476
- }, o(t.name), 1))), 128))
477
- ])
478
- ]),
479
- n("tbody", null, [
480
- (r(!0), u(K, null, D(e(p).rows, (t) => (r(), u("tr", {
481
- key: t.row,
482
- "data-region": e(v).regionAt(t.row),
483
- class: me({
484
- "is-selected": e(k) && t.row >= e(k).top && t.row <= e(k).bottom
485
- })
486
- }, [
487
- n("th", et, [
488
- n("button", {
489
- type: "button",
490
- "data-source-row": t.row,
491
- "aria-label": `${e(a).selectionLabel} ${t.row}`,
492
- "aria-pressed": !!e(k) && t.row >= e(k).top && t.row <= e(k).bottom,
493
- disabled: e(B),
494
- onPointerdown: (c) => ue(c, t.row),
495
- onPointerenter: (c) => h.value && e(v).chooseRow(t.row, !0),
496
- onKeydown: (c) => de(c, t.row)
497
- }, o(t.row), 41, tt)
498
- ]),
499
- (r(!0), u(K, null, D(t.cells, (c) => (r(), u("td", {
500
- key: c.column,
501
- rowspan: c.rowSpan,
502
- colspan: c.colSpan,
503
- title: `${c.address} · ${c.text}`,
504
- class: me({ "is-continued": c.continued }),
505
- style: we({
506
- textAlign: c.style?.align,
507
- fontWeight: c.style?.bold ? "600" : void 0
508
- })
509
- }, [
510
- n("span", null, o(c.text), 1)
511
- ], 14, nt))), 128))
512
- ], 10, Ze))), 128))
513
- ])
514
- ])
515
- ], 8, Qe)) : $("", !0),
516
- e(p) ? (r(), u("footer", lt, [
517
- n("span", null, [
518
- x(o(e(a).selected) + " ", 1),
519
- n("strong", null, o(e(k) ? `${e(k).top}–${e(k).bottom}` : "—"), 1)
520
- ]),
521
- n("div", at, [
522
- n("button", {
523
- type: "button",
524
- "aria-label": e(a).previousRows,
525
- disabled: e(p).top <= e(p).source.top,
526
- onClick: l[4] || (l[4] = (t) => e(v).moveWindow("row", -24))
527
- }, [
528
- W(A, {
529
- name: "chevron-left",
530
- size: 13
531
- })
532
- ], 8, ot),
533
- n("label", null, [
534
- x(o(e(a).rowStart), 1),
535
- n("input", {
536
- type: "number",
537
- min: e(p).source.top,
538
- max: e(p).source.bottom,
539
- value: e(U),
540
- onChange: l[5] || (l[5] = (t) => te(t, "row"))
541
- }, null, 40, it)
542
- ]),
543
- n("button", {
544
- type: "button",
545
- "aria-label": e(a).nextRows,
546
- disabled: e(p).bottom >= e(p).source.bottom,
547
- onClick: l[6] || (l[6] = (t) => e(v).moveWindow("row", 24))
548
- }, [
549
- W(A, {
550
- name: "chevron-right",
551
- size: 13
552
- })
553
- ], 8, st)
554
- ]),
555
- n("div", rt, [
556
- n("button", {
557
- type: "button",
558
- "aria-label": e(a).previousColumns,
559
- disabled: e(p).left <= e(p).source.left,
560
- onClick: l[7] || (l[7] = (t) => e(v).moveWindow("column", -12))
561
- }, [
562
- W(A, {
563
- name: "chevron-left",
564
- size: 13
565
- })
566
- ], 8, ut),
567
- n("label", null, [
568
- x(o(e(a).columnStart), 1),
569
- n("input", {
570
- type: "number",
571
- min: e(p).source.left,
572
- max: e(p).source.right,
573
- value: e(O),
574
- onChange: l[8] || (l[8] = (t) => te(t, "column"))
575
- }, null, 40, dt)
576
- ]),
577
- n("button", {
578
- type: "button",
579
- "aria-label": e(a).nextColumns,
580
- disabled: e(p).right >= e(p).source.right,
581
- onClick: l[9] || (l[9] = (t) => e(v).moveWindow("column", 12))
582
- }, [
583
- W(A, {
584
- name: "chevron-right",
585
- size: 13
586
- })
587
- ], 8, ct)
588
- ])
589
- ])) : $("", !0)
590
- ]),
591
- n("div", vt, [
592
- n("fieldset", { disabled: e(B) }, [
593
- n("section", bt, [
594
- n("h3", null, [
595
- l[24] || (l[24] = n("b", null, "1", -1)),
596
- x(o(e(a).regionLegend), 1)
597
- ]),
598
- (r(), u(K, null, D(V, (t) => n("div", {
599
- key: t,
600
- class: "mr-binding-region",
601
- "data-role": t
602
- }, [
603
- n("div", null, [
604
- n("strong", null, [
605
- x(o(G.value[t]), 1),
606
- t === "title" || t === "footer" ? (r(), u("small", gt, o(e(a).optional), 1)) : $("", !0)
607
- ]),
608
- n("code", null, o(e(R).regions[t] || e(a).unnamed), 1)
609
- ]),
610
- n("button", {
611
- type: "button",
612
- "aria-label": `${e(a).selectRegion} · ${G.value[t]}`,
613
- disabled: !e(k),
614
- onClick: (c) => e(v).markRegion(t)
615
- }, [
616
- W(A, {
617
- name: "arrow-right",
618
- size: 13
619
- })
620
- ], 8, pt),
621
- (t === "title" || t === "footer") && e(R).regions[t] ? (r(), u("button", {
622
- key: 0,
623
- type: "button",
624
- "aria-label": `${e(a).clear} · ${G.value[t]}`,
625
- onClick: (c) => e(v).clearRegion(t)
626
- }, [
627
- W(A, {
628
- name: "close",
629
- size: 13
630
- })
631
- ], 8, ht)) : $("", !0)
632
- ], 8, ft)), 64)),
633
- e(R).regions.footer ? (r(), u("p", yt, o(e(a).footerHint), 1)) : $("", !0)
634
- ]),
635
- n("section", wt, [
636
- n("h3", null, [
637
- l[25] || (l[25] = n("b", null, "2", -1)),
638
- x(o(e(a).mapping), 1),
639
- n("span", null, o(e(_).mapped) + "/" + o(e(_).total), 1)
640
- ]),
641
- n("label", _t, [
642
- x(o(e(a).dataset), 1),
643
- n("select", {
644
- value: e(R).dataset,
645
- "aria-label": e(a).dataset,
646
- onChange: l[10] || (l[10] = (t) => e(v).chooseDataset(J(t)))
647
- }, [
648
- n("option", xt, o(e(a).chooseDataset), 1),
649
- (r(!0), u(K, null, D(s.datasets, (t) => (r(), u("option", {
650
- key: t.id,
651
- value: t.id
652
- }, o(t.label || t.id), 9, Ct))), 128))
653
- ], 40, kt)
654
- ]),
655
- s.datasets.length ? $("", !0) : (r(), u("p", $t, o(e(a).noContract), 1)),
656
- e(q) ? (r(), u("label", Rt, [
657
- x(o(e(a).rowKey), 1),
658
- be(n("select", {
659
- "onUpdate:modelValue": l[11] || (l[11] = (t) => e(R).rowKey = t),
660
- "aria-label": e(a).rowKey
661
- }, [
662
- n("option", Mt, o(e(a).chooseRowKey), 1),
663
- (r(!0), u(K, null, D(e(se), (t) => (r(), u("option", {
664
- key: t.field,
665
- value: t.field
666
- }, o(t.label || t.field) + " · " + o(t.field), 9, St))), 128))
667
- ], 8, Et), [
668
- [_e, e(R).rowKey]
669
- ])
670
- ])) : $("", !0),
671
- e(q) ? (r(), u("div", zt, [
672
- (r(!0), u(K, null, D(e(ie), (t) => (r(), u("label", {
673
- key: t.index,
674
- class: "mr-binding-map"
675
- }, [
676
- n("span", null, o(t.physical), 1),
677
- n("div", null, [
678
- n("select", {
679
- "aria-label": `${e(a).physical} ${t.physical} · ${e(a).business}`,
680
- value: t.field,
681
- onChange: (c) => e(v).setMapping(t.index, J(c))
682
- }, [
683
- n("option", It, o(e(a).chooseField), 1),
684
- (r(!0), u(K, null, D(e(q).fields, (c) => (r(), u("option", {
685
- key: c.field,
686
- value: c.field
687
- }, o(c.label || c.field) + " · " + o(c.field), 9, Kt))), 128))
688
- ], 40, Bt),
689
- t.field ? (r(), u("small", Dt, o(ce(t.field)), 1)) : $("", !0)
690
- ])
691
- ]))), 128))
692
- ])) : $("", !0),
693
- e(q) && Z.value > 1 ? (r(), u("div", Nt, [
694
- n("button", {
695
- type: "button",
696
- disabled: e(T) <= 0,
697
- "aria-label": e(a).previousColumns,
698
- onClick: l[12] || (l[12] = (t) => T.value--)
699
- }, [
700
- W(A, {
701
- name: "chevron-left",
702
- size: 13
703
- })
704
- ], 8, Wt),
705
- n("span", null, o(e(T) + 1) + " / " + o(Z.value), 1),
706
- n("button", {
707
- type: "button",
708
- disabled: e(T) + 1 >= Z.value,
709
- "aria-label": e(a).nextColumns,
710
- onClick: l[13] || (l[13] = (t) => T.value++)
711
- }, [
712
- W(A, {
713
- name: "chevron-right",
714
- size: 13
715
- })
716
- ], 8, At)
717
- ])) : $("", !0)
718
- ]),
719
- n("section", Pt, [
720
- n("h3", null, [
721
- l[26] || (l[26] = n("b", null, "3", -1)),
722
- x(o(e(a).identity), 1)
723
- ]),
724
- n("label", Ft, [
725
- x(o(e(a).templateId), 1),
726
- n("input", {
727
- value: s.lockId ? b.identity?.id ?? e(f).id : e(f).id,
728
- autocomplete: "off",
729
- readonly: s.lockId,
730
- onInput: l[14] || (l[14] = (t) => e(f).id = t.target.value)
731
- }, null, 40, Ot)
732
- ]),
733
- n("label", Tt, [
734
- x(o(e(a).templateName), 1),
735
- be(n("input", {
736
- "onUpdate:modelValue": l[15] || (l[15] = (t) => e(f).name = t),
737
- autocomplete: "off"
738
- }, null, 512), [
739
- [ke, e(f).name]
740
- ])
741
- ])
742
- ])
743
- ], 8, mt)
744
- ])
745
- ]),
746
- e(H) && e(_).issues.length ? (r(), u("div", Vt, [
747
- n("strong", null, o(e(a).issues) + " · " + o(e(_).issues.length) + " " + o(e(a).errors), 1),
748
- n("ul", null, [
749
- (r(!0), u(K, null, D(e(_).issues.slice(0, 12), (t, c) => (r(), u("li", { key: c }, [
750
- n("code", null, o(t.path), 1),
751
- x(o(t.message), 1)
752
- ]))), 128))
753
- ]),
754
- e(_).issues.length > 12 ? (r(), u("span", Lt, "+ " + o(e(_).issues.length - 12), 1)) : $("", !0)
755
- ])) : $("", !0),
756
- e(N).warnings.length ? (r(), u("details", Ut, [
757
- n("summary", null, o(e(a).inspectWarning) + " · " + o(e(N).warnings.length), 1),
758
- n("ul", null, [
759
- (r(!0), u(K, null, D(e(N).warnings, (t, c) => (r(), u("li", { key: c }, o(t), 1))), 128))
760
- ])
761
- ])) : $("", !0),
762
- n("footer", jt, [
763
- n("span", {
764
- class: me({ "is-ready": e(_).ok }),
765
- role: "status"
766
- }, o(s.readonly ? e(a).readonly : e(L) ? e(a).applied : e(_).ok ? e(a).ready : `${e(a).coverage} ${e(_).mapped}/${e(_).total}`), 3),
767
- n("button", {
768
- type: "button",
769
- disabled: e(B),
770
- onClick: l[16] || (l[16] = //@ts-ignore
771
- (...t) => e(v).check && e(v).check(...t))
772
- }, o(e(a).check), 9, Gt),
773
- n("button", {
774
- type: "button",
775
- class: "mr-binding-primary",
776
- disabled: e(B) || !e(_).ok,
777
- onClick: l[17] || (l[17] = //@ts-ignore
778
- (...t) => e(v).apply && e(v).apply(...t))
779
- }, o(e(a).apply), 9, Ht)
780
- ])
781
- ], 64)) : (r(), u("div", Te, [
782
- l[22] || (l[22] = n("svg", {
783
- viewBox: "0 0 80 80",
784
- fill: "none",
785
- "aria-hidden": "true"
786
- }, [
787
- n("rect", {
788
- x: "15",
789
- y: "10",
790
- width: "50",
791
- height: "60",
792
- rx: "8",
793
- fill: "#eff6ff",
794
- stroke: "#bfdbfe"
795
- }),
796
- n("path", {
797
- d: "M25 25h30M25 35h30M25 45h30M35 25v30M45 25v30M25 55h30",
798
- stroke: "#93c5fd",
799
- "stroke-width": "1.5"
800
- })
801
- ], -1)),
802
- n("strong", null, o(e(a).noSource), 1),
803
- n("span", null, o(e(a).sourceOnly), 1),
804
- n("button", {
805
- type: "button",
806
- class: "mr-binding-primary",
807
- disabled: s.readonly,
808
- onClick: l[2] || (l[2] = (t) => E.value?.click())
809
- }, o(e(a).upload), 9, Ve)
810
- ]))
811
- ], 40, De));
812
- }
813
- }), Zt = /* @__PURE__ */ xe(qt, [["__scopeId", "data-v-acb94ca7"]]);
814
- export {
815
- Zt as default
816
- };