@agile-team/mach-report 2.22.0 → 2.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -6
- package/dist/ExcelBindingWizard-BrTmdo7f.cjs +1 -0
- package/dist/ExcelBindingWizard-CcDMLO8Q.js +1486 -0
- package/dist/ParamEditor-BGjovFUe.js +737 -0
- package/dist/ParamEditor-CeNp4_zQ.cjs +1 -0
- package/dist/ReportBatchPanel-CHxBtG9R.cjs +1 -0
- package/dist/ReportBatchPanel-CJB67WNd.js +351 -0
- package/dist/ReportLabelStudio-Tplc1TLJ.js +784 -0
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +1 -0
- package/dist/ReportParamPanel-C7fZTllk.cjs +1 -0
- package/dist/{ReportParamPanel-BHSKVL8k.js → ReportParamPanel-GI43aGa0.js} +146 -127
- package/dist/ReportPreview-BoGBGyRr.cjs +6 -0
- package/dist/ReportPreview-QLONCyci.js +6257 -0
- package/dist/ReportTemplateLibrary-BFQIX0sg.cjs +1 -0
- package/dist/ReportTemplateLibrary-KqX4E2sN.js +312 -0
- package/dist/RuleEditor-BZUP9yvL.cjs +1 -0
- package/dist/RuleEditor-OPX1awrH.js +2342 -0
- package/dist/TemplateOutlinePanel-CVYKVLv_.cjs +1 -0
- package/dist/TemplateOutlinePanel-DQS-eOs6.js +97 -0
- package/dist/TemplateReusePanel-CY6O93Zk.cjs +1 -0
- package/dist/TemplateReusePanel-DKXiFTyB.js +389 -0
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +1 -0
- package/dist/TemplateReviewPanel-Dijwm9YE.js +593 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.js +26 -26
- package/dist/artifact-integrity.json +106 -104
- package/dist/assets-D2gHc4Mz.cjs +1 -0
- package/dist/assets-T_gDeFaz.js +132 -0
- package/dist/auto-BB99S802.js +257 -0
- package/dist/auto-BrPWo7Xm.cjs +1 -0
- package/dist/capabilities-DiBj4Qgl.cjs +1 -0
- package/dist/capabilities-pg7j7VLT.js +106 -0
- package/dist/charts-Cjw5AYkg.cjs +1 -0
- package/dist/{charts-Dlv8j2AG.js → charts-CxJZ0XaY.js} +1 -1
- package/dist/computed-DK6BruFz.cjs +1 -0
- package/dist/{computed-C8NRZQss.js → computed-f3pOqWLX.js} +381 -301
- package/dist/data-bar-CeZuFmYl.cjs +1 -0
- package/dist/{data-bar-8baGYEZ9.js → data-bar-IkI6VvMQ.js} +1 -1
- package/dist/designer-BZoVWTgl.js +7172 -0
- package/dist/designer-zS2uKJmY.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +105 -45
- package/dist/designer.d.ts +105 -45
- package/dist/designer.js +4 -4
- package/dist/dom-ChE5D-L-.cjs +1 -0
- package/dist/dom-JWrchIre.js +452 -0
- package/dist/dom-cell-address-DLD1mkTB.cjs +1 -0
- package/dist/dom-cell-address-Fn-8nk7D.js +11 -0
- package/dist/{encoding-ncQAvyOv.cjs → encoding-7lquyj0w.cjs} +1 -1
- package/dist/{encoding-DbnhbwI8.js → encoding-CEd-dq9A.js} +2 -2
- package/dist/{font-loader-Di0lQKFf.js → font-loader-CNWXomuV.js} +1 -1
- package/dist/{font-loader-BB372_XN.cjs → font-loader-D8pI87fL.cjs} +1 -1
- package/dist/grid-strokes-Be24LGuV.cjs +1 -0
- package/dist/grid-strokes-EoY66L2f.js +53 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +944 -1259
- package/dist/{json-snapshot-DvQbZlD7.js → json-snapshot-BRnzKudk.js} +763 -776
- package/dist/json-snapshot-DNiIbpOr.cjs +2 -0
- package/dist/matrix-B8QWbsGM.cjs +1 -0
- package/dist/matrix-C6e_r_vp.js +302 -0
- package/dist/{pdf-DmlnL5eB.js → pdf-CJToa81Z.js} +20 -20
- package/dist/{pdf-CARdBcuw.cjs → pdf-DpMkW72B.cjs} +42 -42
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.js +2 -2
- package/dist/{plugin-AcAQ2m9X.cjs → plugin-BWTp-X7b.cjs} +1 -1
- package/dist/{plugin-w5Nyt08U.js → plugin-_BkUVc2z.js} +1 -1
- package/dist/{prefill-BXBxx5We.js → prefill-CWGdnqQd.js} +21 -21
- package/dist/prefill-PaAy6wLk.cjs +1 -0
- package/dist/prepared-CJy_qk7d.js +94 -0
- package/dist/prepared-D0yCSxSO.cjs +1 -0
- package/dist/progress-ByiOxUD3.js +250 -0
- package/dist/progress-WomPRP3B.cjs +1 -0
- package/dist/{protocol-fjaeKkjf.js → protocol-BG16rz6D.js} +3 -3
- package/dist/{protocol-C9ZaylID.cjs → protocol-wzhl1Fim.cjs} +1 -1
- package/dist/record-bindings-DatJZv_e.js +200 -0
- package/dist/record-bindings-MBxbeBsi.cjs +1 -0
- package/dist/{region-binding-workflow-aA8nxmkZ.js → region-binding-workflow-DjrXuR1q.js} +2 -2
- package/dist/{region-binding-workflow-BiJQ7NU6.cjs → region-binding-workflow-l7NGfagJ.cjs} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-Ciwa6D2o.js +52 -0
- package/dist/rich-text-layout-DK7A_a5r.cjs +3 -0
- package/dist/runtime-DYMOS_gz.cjs +1 -0
- package/dist/{runtime-BTtpjF3D.js → runtime-PiCax9zQ.js} +52 -51
- package/dist/sbom.cdx.json +1 -1
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +1676 -1619
- package/dist/server.cjs +1 -1
- package/dist/server.js +24 -24
- package/dist/style.css +1 -1
- package/dist/{template-catalog-JSxSqk5y.js → template-catalog-CRuZL3pi.js} +17 -17
- package/dist/template-catalog-DtrtT1FY.cjs +1 -0
- package/dist/{template-fragments-D2JFj7Du.js → template-fragments-CPpGpQoz.js} +12 -12
- package/dist/template-fragments-GVjpew_q.cjs +1 -0
- package/dist/template-registry-DI59PXVK.cjs +1 -0
- package/dist/{template-registry-Do1Uav2Z.js → template-registry-O0hNIOfB.js} +17 -17
- package/dist/{template-serialization-CU4n_Miu.js → template-serialization-CWmHq7lX.js} +1 -1
- package/dist/{template-serialization-CgqBo6s-.cjs → template-serialization-CqQY4zDg.cjs} +1 -1
- package/dist/textwrap-D4ZksyMK.js +111 -0
- package/dist/textwrap-DEHqAjKZ.cjs +4 -0
- package/dist/vue/async.d.cts +31 -0
- package/dist/vue/async.d.ts +31 -0
- package/dist/vue/index.d.cts +32 -1
- package/dist/vue/index.d.ts +32 -1
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +52 -47
- package/dist/{workbook-session-BvEBRRMz.cjs → workbook-session-C6-SrnCT.cjs} +4 -4
- package/dist/{workbook-session-f0wVlzst.js → workbook-session-C9ZmCBwY.js} +15 -16
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.js +184 -179
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CW79I6Gl.cjs +0 -1
- package/dist/ExcelBindingWizard-CZyppD7I.js +0 -1485
- package/dist/ParamEditor-CiYCJI0b.cjs +0 -1
- package/dist/ParamEditor-DQit-Gdf.js +0 -732
- package/dist/ReportBatchPanel-DKTpV7MU.js +0 -350
- package/dist/ReportBatchPanel-Db6TAfG5.cjs +0 -1
- package/dist/ReportLabelStudio-B0i9ohQj.cjs +0 -1
- package/dist/ReportLabelStudio-BYnRqmje.js +0 -780
- package/dist/ReportParamPanel-lngONOEz.cjs +0 -1
- package/dist/ReportPreview-BDgKssYR.js +0 -5887
- package/dist/ReportPreview-Dw-4icG6.cjs +0 -6
- package/dist/ReportTemplateLibrary-BZuKn0YK.js +0 -311
- package/dist/ReportTemplateLibrary-DEXH07ND.cjs +0 -1
- package/dist/RuleEditor-CIQn547x.js +0 -2341
- package/dist/RuleEditor-zSUmPjKa.cjs +0 -1
- package/dist/TemplateOutlinePanel-B5SfGYVN.cjs +0 -1
- package/dist/TemplateOutlinePanel-D0PgOSQE.js +0 -96
- package/dist/TemplateReusePanel-BKlAEF8-.js +0 -388
- package/dist/TemplateReusePanel-DAy_Hwqz.cjs +0 -1
- package/dist/TemplateReviewPanel-CowmHaQQ.cjs +0 -1
- package/dist/TemplateReviewPanel-div-EH_m.js +0 -592
- package/dist/assets-CxHunY_9.js +0 -232
- package/dist/assets-vbjAGgk8.cjs +0 -1
- package/dist/auto-DcUHlKob.cjs +0 -1
- package/dist/auto-moShblh1.js +0 -240
- package/dist/charts-aCtoswXq.cjs +0 -1
- package/dist/component-tree-1_QCiQJX.js +0 -67
- package/dist/component-tree-BjZIp6w9.cjs +0 -1
- package/dist/computed-4TnxzgIh.cjs +0 -1
- package/dist/data-bar-YltqGTaC.cjs +0 -1
- package/dist/designer-B7jJeAeG.js +0 -6914
- package/dist/designer-BWQVpJeN.cjs +0 -2
- package/dist/grid-geometry-D3SJgWFv.js +0 -136
- package/dist/grid-geometry-D8ReblRV.cjs +0 -1
- package/dist/json-snapshot-nyV63AbB.cjs +0 -2
- package/dist/matrix-0hywp0-F.cjs +0 -1
- package/dist/matrix-Dy-tyY7E.js +0 -381
- package/dist/prefill-DUvejVt1.cjs +0 -1
- package/dist/prepared-YXy-fVLw.cjs +0 -1
- package/dist/prepared-rXCKqdHY.js +0 -88
- package/dist/progress-B0ctFpKf.cjs +0 -1
- package/dist/progress-Hc2vxoCs.js +0 -52
- package/dist/record-bindings-Ct1HkPrc.cjs +0 -1
- package/dist/record-bindings-VZGS-Qd8.js +0 -155
- package/dist/rich-text-layout-K48VHUoW.cjs +0 -3
- package/dist/rich-text-layout-wxBhnAS7.js +0 -102
- package/dist/runtime-Dq0LUsyS.cjs +0 -1
- package/dist/template-catalog-CLAM4w7H.cjs +0 -1
- package/dist/template-fragments-Ca25Jt7e.cjs +0 -1
- package/dist/template-outline-CDWXptuj.js +0 -88
- package/dist/template-outline-K4jGhATu.cjs +0 -1
- package/dist/template-registry-CWnuGqyP.cjs +0 -1
- package/dist/textwrap-CkGjRFT3.js +0 -110
- package/dist/textwrap-OTOUMr4f.cjs +0 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./designer-zS2uKJmY.cjs"),m=require("./dom-ChE5D-L-.cjs"),E=require("./_plugin-vue_export-helper-BLmdZLlg.cjs"),S=["aria-label"],V={class:"sr-only"},B=["placeholder"],N={class:"mr-outline-layout"},D={class:"mr-outline-tree"},f=["onClick"],C={class:"mr-outline-kind"},b={key:0},T={key:0,class:"mr-product-note"},$={key:0},L=["onClick"],x=e.defineComponent({__name:"TemplateOutlinePanel",props:{document:{},selection:{},messages:{}},emits:["locate"],setup(p,{emit:v}){const g=d.useDesignerTheme(),r=p,u=v,l=e.computed(()=>({...d.TEMPLATE_PRODUCT_MESSAGES,...r.messages})),c=e.ref(""),s=e.ref(100),a=e.ref(),k=e.computed(()=>m.collectTemplateOutline(r.document.template)),i=e.computed(()=>{const n=c.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);return k.value.filter(o=>n.every(t=>`${o.title} ${o.dataset??""} ${o.path}`.toLocaleLowerCase().includes(t)))}),_=e.computed(()=>a.value?m.inspectTemplateFieldUsage(r.document.template,a.value.dataset,a.value.field):[]);function y(n){u("locate",n),n.dataset&&n.field&&(a.value={dataset:n.dataset,field:n.field})}return(n,o)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-product-panel mr-outline",style:e.normalizeStyle(e.unref(g)),"aria-label":l.value.outline},[e.createElementVNode("header",null,[e.createElementVNode("div",null,[e.createElementVNode("strong",null,e.toDisplayString(l.value.outline),1),e.createElementVNode("small",null,e.toDisplayString(i.value.length)+" "+e.toDisplayString(l.value.count),1)]),e.createElementVNode("label",null,[e.createElementVNode("span",V,e.toDisplayString(l.value.search),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[0]||(o[0]=t=>c.value=t),type:"search",placeholder:l.value.search,onInput:o[1]||(o[1]=t=>s.value=100)},null,40,B),[[e.vModelText,c.value]])])]),e.createElementVNode("div",N,[e.createElementVNode("ol",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value.slice(0,s.value),t=>(e.openBlock(),e.createElementBlock("li",{key:t.path,style:e.normalizeStyle({"--depth":t.depth})},[e.createElementVNode("button",{type:"button",onClick:h=>y(t)},[e.createElementVNode("span",C,e.toDisplayString(l.value[t.kind]),1),e.createElementVNode("strong",null,e.toDisplayString(t.title),1),t.dataset?(e.openBlock(),e.createElementBlock("small",b,e.toDisplayString(t.dataset),1)):e.createCommentVNode("",!0)],8,f)],4))),128)),i.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",T,e.toDisplayString(l.value.noMatches),1))]),a.value?(e.openBlock(),e.createElementBlock("aside",$,[e.createElementVNode("h3",null,e.toDisplayString(l.value.usages)+" · "+e.toDisplayString(a.value.field),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value.slice(0,100),t=>(e.openBlock(),e.createElementBlock("button",{key:t.path,type:"button",class:"mr-outline-reference",onClick:h=>u("locate",t)},[e.createElementVNode("span",null,e.toDisplayString(t.pageIndex===void 0?l.value.binding:`${l.value.page} ${t.pageIndex+1}`)+" · "+e.toDisplayString(l.value[t.kind==="display"?"field":t.kind]),1),e.createElementVNode("code",null,e.toDisplayString(t.path),1)],8,L))),128))])):e.createCommentVNode("",!0)]),i.value.length>s.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mr-product-more",onClick:o[2]||(o[2]=t=>s.value+=100)},e.toDisplayString(l.value.more)+" · "+e.toDisplayString(i.value.length-s.value),1)):e.createCommentVNode("",!0)],12,S))}}),q=E._export_sfc(x,[["__scopeId","data-v-36454962"]]);exports.default=q;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { defineComponent as L, computed as r, ref as _, openBlock as o, createElementBlock as n, normalizeStyle as g, unref as S, createElementVNode as t, toDisplayString as l, withDirectives as D, vModelText as I, Fragment as f, renderList as k, createCommentVNode as m } from "vue";
|
|
2
|
+
import { u as M, c as O } from "./designer-BZoVWTgl.js";
|
|
3
|
+
import { a as P, i as w } from "./dom-JWrchIre.js";
|
|
4
|
+
import { _ as B } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
const U = ["aria-label"], V = { class: "sr-only" }, A = ["placeholder"], F = { class: "mr-outline-layout" }, N = { class: "mr-outline-tree" }, q = ["onClick"], z = { class: "mr-outline-kind" }, G = { key: 0 }, R = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "mr-product-note"
|
|
8
|
+
}, j = { key: 0 }, H = ["onClick"], J = /* @__PURE__ */ L({
|
|
9
|
+
__name: "TemplateOutlinePanel",
|
|
10
|
+
props: {
|
|
11
|
+
document: {},
|
|
12
|
+
selection: {},
|
|
13
|
+
messages: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["locate"],
|
|
16
|
+
setup(y, { emit: b }) {
|
|
17
|
+
const C = M(), p = y, h = b, a = r(() => ({ ...O, ...p.messages })), v = _(""), d = _(100), i = _(), T = r(() => P(p.document.template)), c = r(() => {
|
|
18
|
+
const u = v.value.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean);
|
|
19
|
+
return T.value.filter(
|
|
20
|
+
(s) => u.every(
|
|
21
|
+
(e) => `${s.title} ${s.dataset ?? ""} ${s.path}`.toLocaleLowerCase().includes(e)
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
}), $ = r(
|
|
25
|
+
() => i.value ? w(
|
|
26
|
+
p.document.template,
|
|
27
|
+
i.value.dataset,
|
|
28
|
+
i.value.field
|
|
29
|
+
) : []
|
|
30
|
+
);
|
|
31
|
+
function x(u) {
|
|
32
|
+
h("locate", u), u.dataset && u.field && (i.value = { dataset: u.dataset, field: u.field });
|
|
33
|
+
}
|
|
34
|
+
return (u, s) => (o(), n("section", {
|
|
35
|
+
class: "mr-product-panel mr-outline",
|
|
36
|
+
style: g(S(C)),
|
|
37
|
+
"aria-label": a.value.outline
|
|
38
|
+
}, [
|
|
39
|
+
t("header", null, [
|
|
40
|
+
t("div", null, [
|
|
41
|
+
t("strong", null, l(a.value.outline), 1),
|
|
42
|
+
t("small", null, l(c.value.length) + " " + l(a.value.count), 1)
|
|
43
|
+
]),
|
|
44
|
+
t("label", null, [
|
|
45
|
+
t("span", V, l(a.value.search), 1),
|
|
46
|
+
D(t("input", {
|
|
47
|
+
"onUpdate:modelValue": s[0] || (s[0] = (e) => v.value = e),
|
|
48
|
+
type: "search",
|
|
49
|
+
placeholder: a.value.search,
|
|
50
|
+
onInput: s[1] || (s[1] = (e) => d.value = 100)
|
|
51
|
+
}, null, 40, A), [
|
|
52
|
+
[I, v.value]
|
|
53
|
+
])
|
|
54
|
+
])
|
|
55
|
+
]),
|
|
56
|
+
t("div", F, [
|
|
57
|
+
t("ol", N, [
|
|
58
|
+
(o(!0), n(f, null, k(c.value.slice(0, d.value), (e) => (o(), n("li", {
|
|
59
|
+
key: e.path,
|
|
60
|
+
style: g({ "--depth": e.depth })
|
|
61
|
+
}, [
|
|
62
|
+
t("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: (E) => x(e)
|
|
65
|
+
}, [
|
|
66
|
+
t("span", z, l(a.value[e.kind]), 1),
|
|
67
|
+
t("strong", null, l(e.title), 1),
|
|
68
|
+
e.dataset ? (o(), n("small", G, l(e.dataset), 1)) : m("", !0)
|
|
69
|
+
], 8, q)
|
|
70
|
+
], 4))), 128)),
|
|
71
|
+
c.value.length ? m("", !0) : (o(), n("li", R, l(a.value.noMatches), 1))
|
|
72
|
+
]),
|
|
73
|
+
i.value ? (o(), n("aside", j, [
|
|
74
|
+
t("h3", null, l(a.value.usages) + " · " + l(i.value.field), 1),
|
|
75
|
+
(o(!0), n(f, null, k($.value.slice(0, 100), (e) => (o(), n("button", {
|
|
76
|
+
key: e.path,
|
|
77
|
+
type: "button",
|
|
78
|
+
class: "mr-outline-reference",
|
|
79
|
+
onClick: (E) => h("locate", e)
|
|
80
|
+
}, [
|
|
81
|
+
t("span", null, l(e.pageIndex === void 0 ? a.value.binding : `${a.value.page} ${e.pageIndex + 1}`) + " · " + l(a.value[e.kind === "display" ? "field" : e.kind]), 1),
|
|
82
|
+
t("code", null, l(e.path), 1)
|
|
83
|
+
], 8, H))), 128))
|
|
84
|
+
])) : m("", !0)
|
|
85
|
+
]),
|
|
86
|
+
c.value.length > d.value ? (o(), n("button", {
|
|
87
|
+
key: 0,
|
|
88
|
+
type: "button",
|
|
89
|
+
class: "mr-product-more",
|
|
90
|
+
onClick: s[2] || (s[2] = (e) => d.value += 100)
|
|
91
|
+
}, l(a.value.more) + " · " + l(c.value.length - d.value), 1)) : m("", !0)
|
|
92
|
+
], 12, U));
|
|
93
|
+
}
|
|
94
|
+
}), Y = /* @__PURE__ */ B(J, [["__scopeId", "data-v-36454962"]]);
|
|
95
|
+
export {
|
|
96
|
+
Y as default
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),x=require("./template-fragments-GVjpew_q.cjs"),T=require("./designer-zS2uKJmY.cjs"),w=require("./_plugin-vue_export-helper-BLmdZLlg.cjs");function F(t,I){const d=e.computed(()=>({...T.TEMPLATE_PRODUCT_MESSAGES,...t.messages})),b=e.ref([]),p=e.ref(""),a=e.ref("body"),f=e.ref(""),g=e.ref(""),V=e.ref(),k=e.ref({}),u=e.computed(()=>[...t.fragments??[],...b.value]);e.watch(u,l=>{l.some(r=>r.id===p.value)||(p.value=l[0]?.id??"")},{immediate:!0});const s=e.computed(()=>u.value.find(l=>l.id===p.value)??u.value[0]),c=e.computed(()=>{try{return s.value?x.inspectTemplateFragmentBindings(s.value):[]}catch(l){return[{dataset:"",fields:[],error:String(l)}]}});e.watch(s,()=>{k.value={datasets:Object.fromEntries(c.value.map(l=>[l.dataset,t.document.template.repeat?.dataset??l.dataset])),fields:Object.fromEntries(c.value.map(l=>[l.dataset,Object.fromEntries(l.fields.map(r=>[r,r]))]))}},{immediate:!0});const i=e.computed(()=>t.selection?.pageIndex===t.pageIndex?t.document.template.pages[t.pageIndex]?.components[t.selection.componentIndex]:void 0),y=e.computed(()=>i.value?.meta?.fragment),N=e.computed(()=>y.value&&s.value?.id===y.value.id&&s.value.revision!==y.value.revision),E=e.computed(()=>t.styles?.length?t.styles:[{id:"title",name:d.value.styleText,style:{fontSize:18,bold:!0,color:"#183b65"}},{id:"heading",name:d.value.styleHeading,target:"header",style:{fontSize:10,bold:!0,color:"#21466e",backgroundColor:"#eaf2fb",align:"center",verticalAlign:"middle"}},{id:"body",name:d.value.styleBody,style:{fontSize:10,color:"#334155",bold:!1}},{id:"number",name:d.value.styleNumber,style:{fontSize:10,align:"right",color:"#334155"}},{id:"note",name:d.value.styleNote,style:{fontSize:8,color:"#64748b",bold:!1}}]),S=e.computed(()=>E.value.find(l=>l.id===a.value)??E.value[0]);e.watch(E,l=>{l.some(r=>r.id===a.value)||(a.value=l[0]?.id??"")},{immediate:!0});function m(l){if(!t.disabled){g.value="";try{l()}catch(r){g.value=r instanceof Error?r.message:String(r)}}}function B(){m(()=>{if(!t.selection||!i.value)throw new Error(d.value.select);if(!f.value.trim())throw new Error(d.value.nameRequired);let l=b.value.length+1;const r=new Set(u.value.map(n=>n.id));for(;r.has(`session-fragment-${l}`);)l++;const o=`session-fragment-${l}`;b.value.push(x.captureTemplateFragment(t.document,t.pageIndex,[t.selection.componentIndex],{id:o,name:f.value.trim(),revision:"1"})),p.value=o,f.value=""})}function D(l=!1){m(()=>{if(!s.value)return;const r=x.insertTemplateFragment(t.document,s.value,{pageIndex:t.pageIndex,bindings:k.value,...l?{replaceInstance:y.value?.instance}:{}});t.accept(o=>{o.template=r.document.template})&&I({pageIndex:t.pageIndex,componentIndex:r.componentIndices[0]})})}function h(l=S.value){m(()=>{if(!t.selection||!i.value)return;const r=x.applyReportDocumentStyle(t.document,t.pageIndex,[t.selection.componentIndex],l);t.accept(o=>{o.template=r.template})})}function _(){i.value&&(V.value=JSON.parse(JSON.stringify(i.value.kind==="list"?i.value.columns[0]?.style??{}:i.value.style??{})))}return{m:d,local:b,name:f,fragmentId:p,fragments:u,fragment:s,bindings:k,required:c,active:i,instance:y,canUpdate:N,error:g,styles:E,styleId:a,style:S,clipboard:V,capture:B,insert:D,apply:h,copyStyle:_}}const R=["aria-label"],U={key:0,role:"alert",class:"mr-reuse-error"},z={class:"mr-reuse-layout"},$={key:0,class:"mr-product-note"},q=["value"],M={class:"mr-product-note"},O={key:0},A={key:0,class:"mr-reuse-bindings"},L={key:0,role:"alert"},P=["onUpdate:modelValue","disabled"],j=["onUpdate:modelValue","aria-label","disabled"],H={class:"mr-reuse-actions"},J=["disabled"],G=["disabled"],W={key:1,class:"mr-product-note"},K={class:"mr-reuse-bindings"},Q=["disabled"],X=["disabled"],Y={class:"mr-product-note"},Z=["value"],ee={key:0,class:"mr-product-note"},te={class:"mr-reuse-actions"},ne=["disabled"],le=["disabled"],ae=["disabled"],oe=e.defineComponent({__name:"TemplateReusePanel",props:{document:{},pageIndex:{},selection:{},fragments:{},styles:{},disabled:{type:Boolean},messages:{},accept:{type:Function}},emits:["select"],setup(t,{emit:I}){const d=T.useDesignerTheme(),b=t,p=I,{m:a,name:f,fragmentId:g,fragments:V,fragment:k,bindings:u,required:s,active:c,instance:i,canUpdate:y,error:N,styles:E,styleId:S,style:m,clipboard:B,capture:D,insert:h,apply:_,copyStyle:l}=F(b,r=>p("select",r));return(r,o)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-product-panel",style:e.normalizeStyle(e.unref(d)),"aria-label":e.unref(a).reuse},[e.createElementVNode("header",null,[e.createElementVNode("strong",null,e.toDisplayString(e.unref(a).reuse),1),e.createElementVNode("small",null,e.toDisplayString(e.unref(a).preserve),1)]),e.unref(N)?(e.openBlock(),e.createElementBlock("p",U,e.toDisplayString(e.unref(N)),1)):e.createCommentVNode("",!0),e.createElementVNode("div",z,[e.createElementVNode("section",null,[e.createElementVNode("h3",null,e.toDisplayString(e.unref(a).fragments),1),e.unref(V).length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(e.unref(a).fragments),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[0]||(o[0]=n=>e.isRef(g)?g.value=n:null)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),n=>(e.openBlock(),e.createElementBlock("option",{key:n.id,value:n.id},e.toDisplayString(n.name)+" · "+e.toDisplayString(n.revision),9,q))),128))],512),[[e.vModelSelect,e.unref(g)]])]),e.createElementVNode("p",M,[e.createTextVNode(e.toDisplayString(e.unref(a).revision)+" "+e.toDisplayString(e.unref(k)?.revision),1),e.unref(i)?(e.openBlock(),e.createElementBlock("span",O," · "+e.toDisplayString(e.unref(a).instance)+" "+e.toDisplayString(e.unref(i).revision),1)):e.createCommentVNode("",!0)]),e.unref(s).length?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("h3",null,e.toDisplayString(e.unref(a).bindings),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.dataset},["error"in n?(e.openBlock(),e.createElementBlock("p",L,e.toDisplayString(n.error),1)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(e.unref(a).dataset)+" · "+e.toDisplayString(n.dataset),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":v=>e.unref(u).datasets[n.dataset]=v,disabled:t.disabled},null,8,P),[[e.vModelText,e.unref(u).datasets[n.dataset]]])]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.fields,v=>(e.openBlock(),e.createElementBlock("label",{key:v},[e.createTextVNode(e.toDisplayString(v),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":C=>e.unref(u).fields[n.dataset][v]=C,"aria-label":`${e.unref(a).target} ${v}`,disabled:t.disabled},null,8,j),[[e.vModelText,e.unref(u).fields[n.dataset][v]]])]))),128))],64))],64))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",H,[e.createElementVNode("button",{type:"button",class:"mr-reuse-primary",disabled:t.disabled||!e.unref(k),onClick:o[1]||(o[1]=n=>e.unref(h)())},e.toDisplayString(e.unref(a).insert),9,J),e.unref(y)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",disabled:t.disabled,onClick:o[2]||(o[2]=n=>e.unref(h)(!0))},e.toDisplayString(e.unref(a).update),9,G)):e.createCommentVNode("",!0)]),e.unref(y)?(e.openBlock(),e.createElementBlock("p",W,e.toDisplayString(e.unref(a).newRevision),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("p",$,e.toDisplayString(e.unref(a).noFragments),1)),e.createElementVNode("div",K,[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(e.unref(a).fragmentName),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[3]||(o[3]=n=>e.isRef(f)?f.value=n:null),disabled:t.disabled||!e.unref(c)},null,8,Q),[[e.vModelText,e.unref(f)]])]),e.createElementVNode("button",{type:"button",disabled:t.disabled||!e.unref(c)||!e.unref(f).trim(),onClick:o[4]||(o[4]=(...n)=>e.unref(D)&&e.unref(D)(...n))},e.toDisplayString(e.unref(a).capture),9,X)])]),e.createElementVNode("section",null,[e.createElementVNode("h3",null,e.toDisplayString(e.unref(a).styles),1),e.createElementVNode("p",Y,e.toDisplayString(e.unref(a).noStyles),1),e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(e.unref(a).role),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":o[5]||(o[5]=n=>e.isRef(S)?S.value=n:null)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(E),n=>(e.openBlock(),e.createElementBlock("option",{key:n.id,value:n.id},e.toDisplayString(n.name),9,Z))),128))],512),[[e.vModelSelect,e.unref(S)]])]),e.createElementVNode("div",{class:"mr-reuse-swatch",style:e.normalizeStyle({color:e.unref(m).style.color,backgroundColor:e.unref(m).style.backgroundColor,fontSize:`${e.unref(m).style.fontSize??10}pt`,fontWeight:e.unref(m).style.bold?600:400,textAlign:e.unref(m).style.align})},e.toDisplayString(e.unref(m).name)+" · Aa 0123 ",5),e.unref(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("p",ee,e.toDisplayString(e.unref(a).select),1)),e.createElementVNode("div",te,[e.createElementVNode("button",{type:"button",class:"mr-reuse-primary",disabled:t.disabled||!e.unref(c),onClick:o[6]||(o[6]=n=>e.unref(_)())},e.toDisplayString(e.unref(a).apply),9,ne),e.createElementVNode("button",{type:"button",disabled:!e.unref(c),onClick:o[7]||(o[7]=(...n)=>e.unref(l)&&e.unref(l)(...n))},e.toDisplayString(e.unref(a).copy),9,le),e.createElementVNode("button",{type:"button",disabled:t.disabled||!e.unref(c)||!e.unref(B),onClick:o[8]||(o[8]=n=>e.unref(_)({id:"clipboard",name:e.unref(a).paste,style:e.unref(B)}))},e.toDisplayString(e.unref(a).paste),9,ae)])])])],12,R))}}),re=w._export_sfc(oe,[["__scopeId","data-v-fea18a0c"]]);exports.default=re;
|
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
import { computed as p, ref as x, watch as q, defineComponent as G, openBlock as r, createElementBlock as u, unref as e, normalizeStyle as j, createElementVNode as o, toDisplayString as l, createCommentVNode as U, Fragment as I, createTextVNode as V, withDirectives as z, isRef as M, renderList as B, vModelSelect as J, vModelText as P } from "vue";
|
|
2
|
+
import { b as H, c as W, i as K, a as Q } from "./template-fragments-CPpGpQoz.js";
|
|
3
|
+
import { c as X, u as Y } from "./designer-BZoVWTgl.js";
|
|
4
|
+
import { _ as Z } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
5
|
+
function ee(t, D) {
|
|
6
|
+
const v = p(() => ({
|
|
7
|
+
...X,
|
|
8
|
+
...t.messages
|
|
9
|
+
})), T = x([]), _ = x(""), s = x("body"), g = x(""), k = x(""), $ = x(), C = x({}), b = p(() => [
|
|
10
|
+
...t.fragments ?? [],
|
|
11
|
+
...T.value
|
|
12
|
+
]);
|
|
13
|
+
q(
|
|
14
|
+
b,
|
|
15
|
+
(a) => {
|
|
16
|
+
a.some((d) => d.id === _.value) || (_.value = a[0]?.id ?? "");
|
|
17
|
+
},
|
|
18
|
+
{ immediate: !0 }
|
|
19
|
+
);
|
|
20
|
+
const c = p(
|
|
21
|
+
() => b.value.find((a) => a.id === _.value) ?? b.value[0]
|
|
22
|
+
), y = p(() => {
|
|
23
|
+
try {
|
|
24
|
+
return c.value ? H(c.value) : [];
|
|
25
|
+
} catch (a) {
|
|
26
|
+
return [{ dataset: "", fields: [], error: String(a) }];
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
q(
|
|
30
|
+
c,
|
|
31
|
+
() => {
|
|
32
|
+
C.value = {
|
|
33
|
+
datasets: Object.fromEntries(
|
|
34
|
+
y.value.map((a) => [
|
|
35
|
+
a.dataset,
|
|
36
|
+
t.document.template.repeat?.dataset ?? a.dataset
|
|
37
|
+
])
|
|
38
|
+
),
|
|
39
|
+
fields: Object.fromEntries(
|
|
40
|
+
y.value.map((a) => [
|
|
41
|
+
a.dataset,
|
|
42
|
+
Object.fromEntries(a.fields.map((d) => [d, d]))
|
|
43
|
+
])
|
|
44
|
+
)
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
{ immediate: !0 }
|
|
48
|
+
);
|
|
49
|
+
const m = p(
|
|
50
|
+
() => t.selection?.pageIndex === t.pageIndex ? t.document.template.pages[t.pageIndex]?.components[t.selection.componentIndex] : void 0
|
|
51
|
+
), h = p(
|
|
52
|
+
() => m.value?.meta?.fragment
|
|
53
|
+
), N = p(
|
|
54
|
+
() => h.value && c.value?.id === h.value.id && c.value.revision !== h.value.revision
|
|
55
|
+
), E = p(
|
|
56
|
+
() => t.styles?.length ? t.styles : [
|
|
57
|
+
{
|
|
58
|
+
id: "title",
|
|
59
|
+
name: v.value.styleText,
|
|
60
|
+
style: { fontSize: 18, bold: !0, color: "#183b65" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "heading",
|
|
64
|
+
name: v.value.styleHeading,
|
|
65
|
+
target: "header",
|
|
66
|
+
style: {
|
|
67
|
+
fontSize: 10,
|
|
68
|
+
bold: !0,
|
|
69
|
+
color: "#21466e",
|
|
70
|
+
backgroundColor: "#eaf2fb",
|
|
71
|
+
align: "center",
|
|
72
|
+
verticalAlign: "middle"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "body",
|
|
77
|
+
name: v.value.styleBody,
|
|
78
|
+
style: { fontSize: 10, color: "#334155", bold: !1 }
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "number",
|
|
82
|
+
name: v.value.styleNumber,
|
|
83
|
+
style: { fontSize: 10, align: "right", color: "#334155" }
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "note",
|
|
87
|
+
name: v.value.styleNote,
|
|
88
|
+
style: { fontSize: 8, color: "#64748b", bold: !1 }
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
), w = p(
|
|
92
|
+
() => E.value.find((a) => a.id === s.value) ?? E.value[0]
|
|
93
|
+
);
|
|
94
|
+
q(
|
|
95
|
+
E,
|
|
96
|
+
(a) => {
|
|
97
|
+
a.some((d) => d.id === s.value) || (s.value = a[0]?.id ?? "");
|
|
98
|
+
},
|
|
99
|
+
{ immediate: !0 }
|
|
100
|
+
);
|
|
101
|
+
function f(a) {
|
|
102
|
+
if (!t.disabled) {
|
|
103
|
+
k.value = "";
|
|
104
|
+
try {
|
|
105
|
+
a();
|
|
106
|
+
} catch (d) {
|
|
107
|
+
k.value = d instanceof Error ? d.message : String(d);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function R() {
|
|
112
|
+
f(() => {
|
|
113
|
+
if (!t.selection || !m.value) throw new Error(v.value.select);
|
|
114
|
+
if (!g.value.trim()) throw new Error(v.value.nameRequired);
|
|
115
|
+
let a = T.value.length + 1;
|
|
116
|
+
const d = new Set(b.value.map((n) => n.id));
|
|
117
|
+
for (; d.has(`session-fragment-${a}`); ) a++;
|
|
118
|
+
const i = `session-fragment-${a}`;
|
|
119
|
+
T.value.push(
|
|
120
|
+
W(
|
|
121
|
+
t.document,
|
|
122
|
+
t.pageIndex,
|
|
123
|
+
[t.selection.componentIndex],
|
|
124
|
+
{ id: i, name: g.value.trim(), revision: "1" }
|
|
125
|
+
)
|
|
126
|
+
), _.value = i, g.value = "";
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
function F(a = !1) {
|
|
130
|
+
f(() => {
|
|
131
|
+
if (!c.value) return;
|
|
132
|
+
const d = K(t.document, c.value, {
|
|
133
|
+
pageIndex: t.pageIndex,
|
|
134
|
+
bindings: C.value,
|
|
135
|
+
...a ? { replaceInstance: h.value?.instance } : {}
|
|
136
|
+
});
|
|
137
|
+
t.accept((i) => {
|
|
138
|
+
i.template = d.document.template;
|
|
139
|
+
}) && D({
|
|
140
|
+
pageIndex: t.pageIndex,
|
|
141
|
+
componentIndex: d.componentIndices[0]
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function O(a = w.value) {
|
|
146
|
+
f(() => {
|
|
147
|
+
if (!t.selection || !m.value) return;
|
|
148
|
+
const d = Q(
|
|
149
|
+
t.document,
|
|
150
|
+
t.pageIndex,
|
|
151
|
+
[t.selection.componentIndex],
|
|
152
|
+
a
|
|
153
|
+
);
|
|
154
|
+
t.accept((i) => {
|
|
155
|
+
i.template = d.template;
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function A() {
|
|
160
|
+
m.value && ($.value = JSON.parse(
|
|
161
|
+
JSON.stringify(
|
|
162
|
+
m.value.kind === "list" ? m.value.columns[0]?.style ?? {} : m.value.style ?? {}
|
|
163
|
+
)
|
|
164
|
+
));
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
m: v,
|
|
168
|
+
local: T,
|
|
169
|
+
name: g,
|
|
170
|
+
fragmentId: _,
|
|
171
|
+
fragments: b,
|
|
172
|
+
fragment: c,
|
|
173
|
+
bindings: C,
|
|
174
|
+
required: y,
|
|
175
|
+
active: m,
|
|
176
|
+
instance: h,
|
|
177
|
+
canUpdate: N,
|
|
178
|
+
error: k,
|
|
179
|
+
styles: E,
|
|
180
|
+
styleId: s,
|
|
181
|
+
style: w,
|
|
182
|
+
clipboard: $,
|
|
183
|
+
capture: R,
|
|
184
|
+
insert: F,
|
|
185
|
+
apply: O,
|
|
186
|
+
copyStyle: A
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
const te = ["aria-label"], ne = {
|
|
190
|
+
key: 0,
|
|
191
|
+
role: "alert",
|
|
192
|
+
class: "mr-reuse-error"
|
|
193
|
+
}, le = { class: "mr-reuse-layout" }, ae = {
|
|
194
|
+
key: 0,
|
|
195
|
+
class: "mr-product-note"
|
|
196
|
+
}, se = ["value"], oe = { class: "mr-product-note" }, ie = { key: 0 }, de = {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "mr-reuse-bindings"
|
|
199
|
+
}, re = {
|
|
200
|
+
key: 0,
|
|
201
|
+
role: "alert"
|
|
202
|
+
}, ue = ["onUpdate:modelValue", "disabled"], ce = ["onUpdate:modelValue", "aria-label", "disabled"], me = { class: "mr-reuse-actions" }, ve = ["disabled"], be = ["disabled"], ye = {
|
|
203
|
+
key: 1,
|
|
204
|
+
class: "mr-product-note"
|
|
205
|
+
}, fe = { class: "mr-reuse-bindings" }, ge = ["disabled"], pe = ["disabled"], he = { class: "mr-product-note" }, _e = ["value"], ke = {
|
|
206
|
+
key: 0,
|
|
207
|
+
class: "mr-product-note"
|
|
208
|
+
}, Se = { class: "mr-reuse-actions" }, xe = ["disabled"], Ie = ["disabled"], Te = ["disabled"], Ce = /* @__PURE__ */ G({
|
|
209
|
+
__name: "TemplateReusePanel",
|
|
210
|
+
props: {
|
|
211
|
+
document: {},
|
|
212
|
+
pageIndex: {},
|
|
213
|
+
selection: {},
|
|
214
|
+
fragments: {},
|
|
215
|
+
styles: {},
|
|
216
|
+
disabled: { type: Boolean },
|
|
217
|
+
messages: {},
|
|
218
|
+
accept: { type: Function }
|
|
219
|
+
},
|
|
220
|
+
emits: ["select"],
|
|
221
|
+
setup(t, { emit: D }) {
|
|
222
|
+
const v = Y(), T = t, _ = D, {
|
|
223
|
+
m: s,
|
|
224
|
+
name: g,
|
|
225
|
+
fragmentId: k,
|
|
226
|
+
fragments: $,
|
|
227
|
+
fragment: C,
|
|
228
|
+
bindings: b,
|
|
229
|
+
required: c,
|
|
230
|
+
active: y,
|
|
231
|
+
instance: m,
|
|
232
|
+
canUpdate: h,
|
|
233
|
+
error: N,
|
|
234
|
+
styles: E,
|
|
235
|
+
styleId: w,
|
|
236
|
+
style: f,
|
|
237
|
+
clipboard: R,
|
|
238
|
+
capture: F,
|
|
239
|
+
insert: O,
|
|
240
|
+
apply: A,
|
|
241
|
+
copyStyle: a
|
|
242
|
+
} = ee(T, (d) => _("select", d));
|
|
243
|
+
return (d, i) => (r(), u("section", {
|
|
244
|
+
class: "mr-product-panel",
|
|
245
|
+
style: j(e(v)),
|
|
246
|
+
"aria-label": e(s).reuse
|
|
247
|
+
}, [
|
|
248
|
+
o("header", null, [
|
|
249
|
+
o("strong", null, l(e(s).reuse), 1),
|
|
250
|
+
o("small", null, l(e(s).preserve), 1)
|
|
251
|
+
]),
|
|
252
|
+
e(N) ? (r(), u("p", ne, l(e(N)), 1)) : U("", !0),
|
|
253
|
+
o("div", le, [
|
|
254
|
+
o("section", null, [
|
|
255
|
+
o("h3", null, l(e(s).fragments), 1),
|
|
256
|
+
e($).length ? (r(), u(I, { key: 1 }, [
|
|
257
|
+
o("label", null, [
|
|
258
|
+
V(l(e(s).fragments), 1),
|
|
259
|
+
z(o("select", {
|
|
260
|
+
"onUpdate:modelValue": i[0] || (i[0] = (n) => M(k) ? k.value = n : null)
|
|
261
|
+
}, [
|
|
262
|
+
(r(!0), u(I, null, B(e($), (n) => (r(), u("option", {
|
|
263
|
+
key: n.id,
|
|
264
|
+
value: n.id
|
|
265
|
+
}, l(n.name) + " · " + l(n.revision), 9, se))), 128))
|
|
266
|
+
], 512), [
|
|
267
|
+
[J, e(k)]
|
|
268
|
+
])
|
|
269
|
+
]),
|
|
270
|
+
o("p", oe, [
|
|
271
|
+
V(l(e(s).revision) + " " + l(e(C)?.revision), 1),
|
|
272
|
+
e(m) ? (r(), u("span", ie, " · " + l(e(s).instance) + " " + l(e(m).revision), 1)) : U("", !0)
|
|
273
|
+
]),
|
|
274
|
+
e(c).length ? (r(), u("div", de, [
|
|
275
|
+
o("h3", null, l(e(s).bindings), 1),
|
|
276
|
+
(r(!0), u(I, null, B(e(c), (n) => (r(), u(I, {
|
|
277
|
+
key: n.dataset
|
|
278
|
+
}, [
|
|
279
|
+
"error" in n ? (r(), u("p", re, l(n.error), 1)) : (r(), u(I, { key: 1 }, [
|
|
280
|
+
o("label", null, [
|
|
281
|
+
V(l(e(s).dataset) + " · " + l(n.dataset), 1),
|
|
282
|
+
z(o("input", {
|
|
283
|
+
"onUpdate:modelValue": (S) => e(b).datasets[n.dataset] = S,
|
|
284
|
+
disabled: t.disabled
|
|
285
|
+
}, null, 8, ue), [
|
|
286
|
+
[P, e(b).datasets[n.dataset]]
|
|
287
|
+
])
|
|
288
|
+
]),
|
|
289
|
+
(r(!0), u(I, null, B(n.fields, (S) => (r(), u("label", { key: S }, [
|
|
290
|
+
V(l(S), 1),
|
|
291
|
+
z(o("input", {
|
|
292
|
+
"onUpdate:modelValue": (L) => e(b).fields[n.dataset][S] = L,
|
|
293
|
+
"aria-label": `${e(s).target} ${S}`,
|
|
294
|
+
disabled: t.disabled
|
|
295
|
+
}, null, 8, ce), [
|
|
296
|
+
[P, e(b).fields[n.dataset][S]]
|
|
297
|
+
])
|
|
298
|
+
]))), 128))
|
|
299
|
+
], 64))
|
|
300
|
+
], 64))), 128))
|
|
301
|
+
])) : U("", !0),
|
|
302
|
+
o("div", me, [
|
|
303
|
+
o("button", {
|
|
304
|
+
type: "button",
|
|
305
|
+
class: "mr-reuse-primary",
|
|
306
|
+
disabled: t.disabled || !e(C),
|
|
307
|
+
onClick: i[1] || (i[1] = (n) => e(O)())
|
|
308
|
+
}, l(e(s).insert), 9, ve),
|
|
309
|
+
e(h) ? (r(), u("button", {
|
|
310
|
+
key: 0,
|
|
311
|
+
type: "button",
|
|
312
|
+
disabled: t.disabled,
|
|
313
|
+
onClick: i[2] || (i[2] = (n) => e(O)(!0))
|
|
314
|
+
}, l(e(s).update), 9, be)) : U("", !0)
|
|
315
|
+
]),
|
|
316
|
+
e(h) ? (r(), u("p", ye, l(e(s).newRevision), 1)) : U("", !0)
|
|
317
|
+
], 64)) : (r(), u("p", ae, l(e(s).noFragments), 1)),
|
|
318
|
+
o("div", fe, [
|
|
319
|
+
o("label", null, [
|
|
320
|
+
V(l(e(s).fragmentName), 1),
|
|
321
|
+
z(o("input", {
|
|
322
|
+
"onUpdate:modelValue": i[3] || (i[3] = (n) => M(g) ? g.value = n : null),
|
|
323
|
+
disabled: t.disabled || !e(y)
|
|
324
|
+
}, null, 8, ge), [
|
|
325
|
+
[P, e(g)]
|
|
326
|
+
])
|
|
327
|
+
]),
|
|
328
|
+
o("button", {
|
|
329
|
+
type: "button",
|
|
330
|
+
disabled: t.disabled || !e(y) || !e(g).trim(),
|
|
331
|
+
onClick: i[4] || (i[4] = //@ts-ignore
|
|
332
|
+
(...n) => e(F) && e(F)(...n))
|
|
333
|
+
}, l(e(s).capture), 9, pe)
|
|
334
|
+
])
|
|
335
|
+
]),
|
|
336
|
+
o("section", null, [
|
|
337
|
+
o("h3", null, l(e(s).styles), 1),
|
|
338
|
+
o("p", he, l(e(s).noStyles), 1),
|
|
339
|
+
o("label", null, [
|
|
340
|
+
V(l(e(s).role), 1),
|
|
341
|
+
z(o("select", {
|
|
342
|
+
"onUpdate:modelValue": i[5] || (i[5] = (n) => M(w) ? w.value = n : null)
|
|
343
|
+
}, [
|
|
344
|
+
(r(!0), u(I, null, B(e(E), (n) => (r(), u("option", {
|
|
345
|
+
key: n.id,
|
|
346
|
+
value: n.id
|
|
347
|
+
}, l(n.name), 9, _e))), 128))
|
|
348
|
+
], 512), [
|
|
349
|
+
[J, e(w)]
|
|
350
|
+
])
|
|
351
|
+
]),
|
|
352
|
+
o("div", {
|
|
353
|
+
class: "mr-reuse-swatch",
|
|
354
|
+
style: j({
|
|
355
|
+
color: e(f).style.color,
|
|
356
|
+
backgroundColor: e(f).style.backgroundColor,
|
|
357
|
+
fontSize: `${e(f).style.fontSize ?? 10}pt`,
|
|
358
|
+
fontWeight: e(f).style.bold ? 600 : 400,
|
|
359
|
+
textAlign: e(f).style.align
|
|
360
|
+
})
|
|
361
|
+
}, l(e(f).name) + " · Aa 0123 ", 5),
|
|
362
|
+
e(y) ? U("", !0) : (r(), u("p", ke, l(e(s).select), 1)),
|
|
363
|
+
o("div", Se, [
|
|
364
|
+
o("button", {
|
|
365
|
+
type: "button",
|
|
366
|
+
class: "mr-reuse-primary",
|
|
367
|
+
disabled: t.disabled || !e(y),
|
|
368
|
+
onClick: i[6] || (i[6] = (n) => e(A)())
|
|
369
|
+
}, l(e(s).apply), 9, xe),
|
|
370
|
+
o("button", {
|
|
371
|
+
type: "button",
|
|
372
|
+
disabled: !e(y),
|
|
373
|
+
onClick: i[7] || (i[7] = //@ts-ignore
|
|
374
|
+
(...n) => e(a) && e(a)(...n))
|
|
375
|
+
}, l(e(s).copy), 9, Ie),
|
|
376
|
+
o("button", {
|
|
377
|
+
type: "button",
|
|
378
|
+
disabled: t.disabled || !e(y) || !e(R),
|
|
379
|
+
onClick: i[8] || (i[8] = (n) => e(A)({ id: "clipboard", name: e(s).paste, style: e(R) }))
|
|
380
|
+
}, l(e(s).paste), 9, Te)
|
|
381
|
+
])
|
|
382
|
+
])
|
|
383
|
+
])
|
|
384
|
+
], 12, te));
|
|
385
|
+
}
|
|
386
|
+
}), $e = /* @__PURE__ */ Z(Ce, [["__scopeId", "data-v-fea18a0c"]]);
|
|
387
|
+
export {
|
|
388
|
+
$e as default
|
|
389
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),$=require("@agile-team/mach-report"),j=require("./designer-zS2uKJmY.cjs"),P=require("@agile-team/mach-report/vue"),z=require("./template-serialization-CqQY4zDg.cjs"),q=require("./_plugin-vue_export-helper-BLmdZLlg.cjs");function I(r,i=()=>r.fixtures){const a=e.shallowRef(),n=e.shallowRef([]),o=e.ref("20"),t=e.ref(!1),d=e.ref(!1),c=e.ref(!1),y=e.ref(""),v=e.shallowRef(),s=e.ref(!1),V=e.shallowRef(),x=e.computed(()=>new Set(r.document.template.pages.flatMap(u=>u.components).flatMap(u=>u.kind==="list"&&u.tree?[u.dataset]:[]))),f=e.computed(()=>x.value.size>0);let h=0,g;function p(){h++,g?.abort(),g=void 0,d.value=!1,s.value=!1,v.value=void 0,c.value=!!a.value,y.value=""}for(const u of[()=>r.document,()=>r.previous])e.watch(u,()=>{t.value=!1,p()},{deep:!0,flush:"sync"});for(const u of[()=>r.datasets,()=>r.dataSchemas,()=>r.formats,i])e.watch(u,p,{deep:!0,flush:"sync"});e.watch([o,t],p,{flush:"sync"}),e.onBeforeUnmount(()=>{h++,g?.abort()});const N=e.computed(()=>a.value?.issues.filter(u=>u.severity==="error").length??0);function F(){g?.abort(),g=new AbortController;const u=++h,D=g;d.value=!0,y.value="",s.value=!1,v.value=void 0,w(u,D)}async function w(u,D){try{const k=Number(o.value),R=Object.fromEntries(Object.entries(r.datasets??{}).map(([E,C])=>[E,k<0||x.value.has(E)?C:C.slice(0,k)])),T=i(),b=T?.length?[...T]:k===0?[]:[{name:o.value,datasets:R}],_=await $.reviewReportTemplateAsync(r.document,{previous:r.previous,dataSchemas:r.dataSchemas,formats:r.formats,allowBreakingChanges:t.value,...!T?.length&&f.value&&k>0?{maxSampleRows:k}:{},fixtures:b,signal:D.signal,onProgress:E=>{u===h&&(v.value=E)}});if(u!==h)return;a.value=_,c.value=!1,n.value=b,V.value={requested:o.value,rows:_.samples.reduce((E,C)=>E+C.rows,0),datasets:new Set(b.flatMap(E=>Object.keys(E.datasets))).size,formats:[...r.formats??[]]}}catch(k){u===h&&!D.signal.aborted&&(y.value=k instanceof Error?k.message:String(k))}finally{u===h&&(d.value=!1,g=void 0)}}function O(){h++,g?.abort(),g=void 0,d.value=!1,s.value=!0,v.value=void 0}return{report:a,sampleSize:o,acknowledged:t,running:d,stale:c,failure:y,checkedScope:V,checkedFixtures:n,hasTree:f,errors:N,run:F,cancel:O,progress:v,cancelled:s}}function U(r){const i=Object.getPrototypeOf(r);if(i!==Object.prototype&&i!==Array.prototype&&i!==null)throw new Error("Sample data must contain plain JSON objects");if(Object.getOwnPropertySymbols(r).length)throw new Error("Sample data must not contain symbols");if(Array.isArray(r)&&Object.keys(r).length!==r.length)throw new Error("Sample arrays must not contain holes or extra properties")}function H(r){let i=0,a=0;const n=new Set;function o(t,d){if(++i>1e5||d>32)throw new RangeError("Sample data exceeds the capture budget");if(typeof t=="string"){if(a+=t.length,a>2e6)throw new RangeError("Sample text exceeds the capture budget");return t}if(t===null||typeof t=="boolean"||typeof t=="number"&&Number.isFinite(t))return t;if(!t||typeof t!="object")throw new Error("Sample data must contain plain JSON values");const c=e.toRaw(t);if(n.has(c))throw new Error("Sample data must not contain cycles");U(c),n.add(c);const y=Array.isArray(c)?[]:Object.create(null);for(const v of Object.keys(c)){const s=Object.getOwnPropertyDescriptor(c,v);if(s.get||s.set||["__proto__","constructor","prototype"].includes(v))throw new Error("Sample data must not contain getters or unsafe keys");y[v]=o(s.value,d+1)}return n.delete(c),y}return o(r,0)}function W(r,i=()=>j.TEMPLATE_REVIEW_MESSAGES){const a=e.ref([]),n=e.ref(""),o=e.ref(!1),t=e.ref(""),d=e.ref({}),c=e.computed(()=>[...r.fixtures??[],...a.value]);function y(){t.value="";try{if(!o.value)throw new Error(i().sampleConsentMissing);if(!n.value.trim())throw new Error(i().sampleNameMissing);if(c.value.length>=20)throw new Error(i().sampleLimit);if(c.value.some(V=>V.name===n.value.trim()))throw new Error(i().sampleNameDuplicate);const s=H(r.datasets??{});if(Object.values(s).reduce((V,x)=>V+x.length,0)>1e3)throw new Error(i().sampleRowsLimit);a.value.push({name:n.value.trim(),datasets:s,...Object.keys(d.value).length?{params:{...d.value}}:{}}),n.value="",o.value=!1}catch(s){t.value=s instanceof Error?s.message:String(s)}}function v(s){a.value.splice(s,1)}return{fixtures:a,name:n,consent:o,failure:t,params:d,suite:c,capture:y,remove:v}}function A(r,i){const a=$.paginateTemplate(r.template,i.datasets,{maxPages:100,maxCells:25e4}),n=[...new Set(z.collectTemplateDatasetBindings(r.template).flatMap(o=>o.fields.map(t=>`${o.dataset}.${t.field}`)))];return{pages:a.plan.pages.length,dimensions:[...new Set(a.plan.pages.map(o=>`${o.pageWidthMm} × ${o.pageHeightMm} mm`))],fields:n,fetcher:async()=>a.plan}}function G(r,i,a){const n=A(r,i),o=a?A(a,i):void 0,t=new Set(o?.fields),d=new Set(n.fields);return{current:n,previous:o,addedFields:n.fields.filter(c=>!t.has(c)),removedFields:o?.fields.filter(c=>!d.has(c))??[]}}const J=["aria-label"],K={key:0,role:"alert"},Q={class:"mr-fixture-previews"},X={key:0},Y=e.defineComponent({__name:"TemplateFixtureComparison",props:{document:{},previous:{},fixture:{},messages:{}},setup(r){const i=r,a=e.computed(()=>({...j.TEMPLATE_REVIEW_MESSAGES,...i.messages})),n=e.computed(()=>{try{return{result:G(i.document,i.fixture,i.previous)}}catch(o){return{error:o instanceof Error?o.message:String(o)}}});return(o,t)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-fixture-comparison","aria-label":a.value.compare},[n.value.error?(e.openBlock(),e.createElementBlock("p",K,e.toDisplayString(n.value.error),1)):e.createCommentVNode("",!0),n.value.result?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("dl",null,[e.createElementVNode("dt",null,e.toDisplayString(a.value.pages),1),e.createElementVNode("dd",null,e.toDisplayString(n.value.result.previous?.pages??"—")+" → "+e.toDisplayString(n.value.result.current.pages),1),e.createElementVNode("dt",null,e.toDisplayString(a.value.dimensions),1),e.createElementVNode("dd",null,e.toDisplayString(n.value.result.previous?.dimensions.join(" / ")??"—")+" → "+e.toDisplayString(n.value.result.current.dimensions.join(" / ")),1),e.createElementVNode("dt",null,e.toDisplayString(a.value.fieldsAdded),1),e.createElementVNode("dd",null,e.toDisplayString(n.value.result.addedFields.join("、")||"—"),1),e.createElementVNode("dt",null,e.toDisplayString(a.value.fieldsRemoved),1),e.createElementVNode("dd",null,e.toDisplayString(n.value.result.removedFields.join("、")||"—"),1)]),e.createElementVNode("div",Q,[n.value.result.previous?(e.openBlock(),e.createElementBlock("article",X,[e.createElementVNode("h4",null,e.toDisplayString(a.value.baselinePreview),1),e.createVNode(e.unref(P.ReportPreview),{"report-id":"baseline",fetcher:n.value.result.previous.fetcher,"show-params":!1,"show-export":!1,"show-print":!1,"show-pdf-window":!1,editable:!1,"excel-import":!1,height:"400px"},null,8,["fetcher"])])):e.createCommentVNode("",!0),e.createElementVNode("article",null,[e.createElementVNode("h4",null,e.toDisplayString(a.value.draftPreview),1),e.createVNode(e.unref(P.ReportPreview),{"report-id":"draft",fetcher:n.value.result.current.fetcher,"show-params":!1,"show-export":!1,"show-print":!1,"show-pdf-window":!1,editable:!1,"excel-import":!1,height:"400px"},null,8,["fetcher"])])])],64)):e.createCommentVNode("",!0)],8,J))}}),Z=q._export_sfc(Y,[["__scopeId","data-v-6409d556"]]),ee=["aria-label","aria-busy"],te={key:0,role:"status"},le=["disabled"],re={key:0,class:"mr-review-stale",role:"status"},ne={class:"mr-review-controls"},oe=["aria-label","disabled"],ae={value:"0"},se={value:"20"},ie={value:"100"},ce={value:"-1"},ue={key:0,class:"mr-review-note"},de={class:"mr-review-fixtures"},me={class:"mr-review-note"},pe={key:0},fe=["disabled","onClick"],ve={class:"mr-review-fixture-form"},ge=["placeholder","disabled"],ye={key:0},he=["onUpdate:modelValue","placeholder","disabled"],ke={class:"mr-review-consent"},Ee=["disabled"],Se=["disabled"],we={key:1,role:"alert",class:"is-error"},Ve={key:1,class:"mr-review-note"},Ne={key:2,class:"is-error",role:"alert"},De={key:3,class:"mr-review-stale",role:"status"},_e={key:4,class:"mr-review-note"},be={key:0,class:"mr-review-summary",role:"status"},Be={key:0,class:"mr-review-note"},xe={key:1,class:"mr-review-note"},Ce={key:2,class:"mr-review-list"},Te={key:0},Fe=["onClick"],Re={key:3,class:"mr-review-note"},Me={key:4,class:"mr-review-ack"},je={key:0,class:"mr-review-note"},Oe={key:1,class:"mr-review-list"},Pe=["onClick"],Ae={key:0,class:"mr-review-scope"},$e={key:0},qe=["disabled","onClick"],Le={class:"mr-review-note"},ze=e.defineComponent({__name:"TemplateReviewPanel",props:{document:{},previous:{},datasets:{},dataSchemas:{},formats:{},fixtures:{},messages:{}},emits:["locate"],setup(r,{emit:i}){const a=j.useDesignerTheme(),n=r,o=i,t=e.computed(()=>({...j.TEMPLATE_REVIEW_MESSAGES,...n.messages})),{name:d,consent:c,failure:y,params:v,suite:s,capture:V,remove:x}=W(n,()=>t.value),{report:f,sampleSize:h,acknowledged:g,running:p,stale:N,failure:F,checkedScope:w,checkedFixtures:O,hasTree:u,errors:D,run:k,cancel:R,cancelled:T,progress:b}=I(n,()=>s.value),_=e.ref(),E=e.computed(()=>O.value.find(B=>B.name===_.value));e.watch(N,B=>{B&&(_.value=void 0)});function C(B){const m=/\.pages\[(\d+)\]\.components\[(\d+)\]/.exec(B);o("locate",{path:B,...m?{pageIndex:Number(m[1]),componentIndex:Number(m[2])}:{}})}return(B,m)=>(e.openBlock(),e.createElementBlock("section",{class:"mr-template-review",style:e.normalizeStyle(e.unref(a)),"aria-label":t.value.title,"aria-busy":e.unref(p)},[e.createElementVNode("header",null,[e.createElementVNode("strong",null,e.toDisplayString(t.value.title),1),e.unref(p)&&e.unref(b)?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(e.unref(b).completed)+" / "+e.toDisplayString(e.unref(b).total)+" "+e.toDisplayString(t.value.progress),1)):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",onClick:m[0]||(m[0]=(...l)=>e.unref(R)&&e.unref(R)(...l))},e.toDisplayString(t.value.cancel),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",disabled:e.unref(p),onClick:m[1]||(m[1]=(...l)=>e.unref(k)&&e.unref(k)(...l))},e.toDisplayString(e.unref(p)?t.value.running:t.value.run),9,le)]),e.unref(T)?(e.openBlock(),e.createElementBlock("p",re,e.toDisplayString(t.value.cancelled),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ne,[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(t.value.samples),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":m[2]||(m[2]=l=>e.isRef(h)?h.value=l:null),"aria-label":t.value.samples,disabled:e.unref(p)||!!e.unref(s).length},[e.createElementVNode("option",ae,e.toDisplayString(t.value.none),1),e.createElementVNode("option",se,e.toDisplayString(t.value.first20),1),e.createElementVNode("option",ie,e.toDisplayString(t.value.first100),1),e.createElementVNode("option",ce,e.toDisplayString(t.value.all),1)],8,oe),[[e.vModelSelect,e.unref(h)]])]),e.unref(s).length?(e.openBlock(),e.createElementBlock("span",ue,e.toDisplayString(t.value.namedFixtures)+" · "+e.toDisplayString(e.unref(s).length),1)):e.createCommentVNode("",!0)]),e.createElementVNode("details",de,[e.createElementVNode("summary",null,[e.createTextVNode(e.toDisplayString(t.value.namedFixtures)+" ",1),e.createElementVNode("small",null,e.toDisplayString(e.unref(s).length)+" / 20",1)]),e.createElementVNode("p",me,e.toDisplayString(t.value.fixtureHint),1),e.unref(s).length?(e.openBlock(),e.createElementBlock("ul",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(s),(l,S)=>(e.openBlock(),e.createElementBlock("li",{key:l.name},[e.createElementVNode("strong",null,e.toDisplayString(l.name),1),e.createElementVNode("span",null,e.toDisplayString(Object.values(l.datasets).reduce((M,L)=>M+L.length,0))+" "+e.toDisplayString(t.value.rows),1),S>=(r.fixtures?.length??0)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",disabled:e.unref(p),onClick:M=>e.unref(x)(S-(r.fixtures?.length??0))},e.toDisplayString(t.value.remove),9,fe)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",ve,[e.createElementVNode("label",null,[e.createTextVNode(e.toDisplayString(t.value.fixtureName),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[3]||(m[3]=l=>e.isRef(d)?d.value=l:null),placeholder:t.value.fixturePlaceholder,disabled:e.unref(p)},null,8,ge),[[e.vModelText,e.unref(d)]])]),r.document.template.params?.length?(e.openBlock(),e.createElementBlock("details",ye,[e.createElementVNode("summary",null,e.toDisplayString(t.value.parameters),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.document.template.params,l=>(e.openBlock(),e.createElementBlock("label",{key:l.field},[e.createTextVNode(e.toDisplayString(l.label??l.field),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":S=>e.unref(v)[l.field]=S,placeholder:l.defaultValue,disabled:e.unref(p)},null,8,he),[[e.vModelText,e.unref(v)[l.field]]])]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("label",ke,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[4]||(m[4]=l=>e.isRef(c)?c.value=l:null),type:"checkbox",disabled:e.unref(p)},null,8,Ee),[[e.vModelCheckbox,e.unref(c)]]),e.createTextVNode(e.toDisplayString(t.value.deidentified),1)]),e.createElementVNode("button",{type:"button",disabled:e.unref(p)||!e.unref(c)||!e.unref(d).trim()||e.unref(s).length>=20,onClick:m[5]||(m[5]=(...l)=>e.unref(V)&&e.unref(V)(...l))},e.toDisplayString(t.value.capture),9,Se),e.unref(y)?(e.openBlock(),e.createElementBlock("p",we,e.toDisplayString(e.unref(y)),1)):e.createCommentVNode("",!0)])]),e.unref(u)?(e.openBlock(),e.createElementBlock("p",Ve,e.toDisplayString(t.value.treeHint),1)):e.createCommentVNode("",!0),e.unref(F)?(e.openBlock(),e.createElementBlock("p",Ne,e.toDisplayString(e.unref(F)),1)):e.createCommentVNode("",!0),e.unref(N)?(e.openBlock(),e.createElementBlock("p",De,e.toDisplayString(t.value.stale),1)):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.unref(N)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("span",{class:e.normalizeClass({"is-error":e.unref(D)})},e.toDisplayString(e.unref(D))+" "+e.toDisplayString(t.value.errors),3),e.createElementVNode("span",null,e.toDisplayString(e.unref(f).issues.length-e.unref(D))+" "+e.toDisplayString(t.value.warnings),1)])),e.createElementVNode("section",null,[e.createElementVNode("h3",null,[e.createTextVNode(e.toDisplayString(t.value.changes)+" ",1),e.createElementVNode("small",null,e.toDisplayString(e.unref(f).changes?.totalChanges??0),1)]),r.previous?e.unref(f).changes?.totalChanges?(e.openBlock(),e.createElementBlock("ol",Ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).changes?.changes,(l,S)=>(e.openBlock(),e.createElementBlock("li",{key:S},[e.createElementVNode("div",null,[e.createElementVNode("span",null,e.toDisplayString(t.value.categories[l.category])+" · "+e.toDisplayString(t.value.kinds[l.kind]),1),l.breaking?(e.openBlock(),e.createElementBlock("b",Te,e.toDisplayString(t.value.breaking),1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",onClick:M=>C(l.path)},e.toDisplayString(t.value.locate),9,Fe)]),e.createElementVNode("code",null,e.toDisplayString(l.path),1),e.createElementVNode("dl",null,[l.before!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("dt",null,e.toDisplayString(t.value.before),1),e.createElementVNode("dd",null,e.toDisplayString(l.before),1)],64)):e.createCommentVNode("",!0),l.after!==void 0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("dt",null,e.toDisplayString(t.value.after),1),e.createElementVNode("dd",null,e.toDisplayString(l.after),1)],64)):e.createCommentVNode("",!0)])]))),128))])):(e.openBlock(),e.createElementBlock("p",xe,e.toDisplayString(t.value.noChanges),1)):(e.openBlock(),e.createElementBlock("p",Be,e.toDisplayString(t.value.baseline),1)),e.unref(f).changes?.truncated?(e.openBlock(),e.createElementBlock("p",Re,e.toDisplayString(t.value.truncated),1)):e.createCommentVNode("",!0),e.unref(f).changes?.breakingChanges?(e.openBlock(),e.createElementBlock("label",Me,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[6]||(m[6]=l=>e.isRef(g)?g.value=l:null),type:"checkbox"},null,512),[[e.vModelCheckbox,e.unref(g)]]),e.createTextVNode(e.toDisplayString(t.value.acknowledge),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("section",null,[e.createElementVNode("h3",null,e.toDisplayString(t.value.issues),1),e.unref(f).issues.length?(e.openBlock(),e.createElementBlock("ol",Oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).issues,(l,S)=>(e.openBlock(),e.createElementBlock("li",{key:S},[e.createElementVNode("div",null,[e.createElementVNode("span",{class:e.normalizeClass({"is-error":l.severity==="error"})},e.toDisplayString(l.severity==="error"?t.value.errors:t.value.warnings),3),e.createElementVNode("button",{type:"button",onClick:M=>o("locate",l)},e.toDisplayString(t.value.locate),9,Pe)]),e.createElementVNode("p",null,e.toDisplayString(l.message),1),e.createElementVNode("code",null,e.toDisplayString(l.path),1)]))),128))])):(e.openBlock(),e.createElementBlock("p",je,e.toDisplayString(t.value.noIssues),1))]),e.unref(f).samples.length?(e.openBlock(),e.createElementBlock("section",{key:1,class:e.normalizeClass({"is-stale":e.unref(N)})},[e.createElementVNode("h3",null,e.toDisplayString(t.value.results),1),e.unref(w)?(e.openBlock(),e.createElementBlock("p",Ae,[e.createTextVNode(e.toDisplayString(t.value.scope)+" · "+e.toDisplayString(e.unref(s).length?t.value.namedFixtures:e.unref(w).requested==="-1"?t.value.all:e.unref(w).requested==="0"?t.value.none:e.unref(w).requested+" "+t.value.rows)+" · "+e.toDisplayString(e.unref(w).datasets)+" "+e.toDisplayString(t.value.datasets)+" · "+e.toDisplayString(e.unref(w).rows)+" "+e.toDisplayString(t.value.rows),1),e.unref(w).formats.length?(e.openBlock(),e.createElementBlock("span",$e," · "+e.toDisplayString(e.unref(w).formats.join(" / ")),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f).samples,l=>(e.openBlock(),e.createElementBlock("div",{key:l.name,class:"mr-review-sample"},[e.createElementVNode("p",null,[e.createElementVNode("strong",null,e.toDisplayString(l.name),1),e.createTextVNode(" · "+e.toDisplayString(l.rows)+" "+e.toDisplayString(t.value.rows)+" · "+e.toDisplayString(l.pages)+" "+e.toDisplayString(t.value.pages)+" · "+e.toDisplayString(e.unref(f).issues.filter(S=>S.fixture===l.name).length)+" "+e.toDisplayString(t.value.issues),1)]),e.createElementVNode("button",{type:"button",disabled:e.unref(N)||e.unref(p),onClick:S=>_.value=_.value===l.name?void 0:l.name},e.toDisplayString(_.value===l.name?t.value.closeCompare:t.value.compare),9,qe)]))),128))],2)):e.createCommentVNode("",!0),E.value&&!e.unref(N)?(e.openBlock(),e.createBlock(Z,{key:2,document:r.document,previous:r.previous,fixture:E.value,messages:r.messages},null,8,["document","previous","fixture","messages"])):e.createCommentVNode("",!0),e.createElementVNode("p",Le,e.toDisplayString(t.value.checked),1)],64)):(e.openBlock(),e.createElementBlock("p",_e,e.toDisplayString(t.value.empty),1))],12,ee))}}),Ie=q._export_sfc(ze,[["__scopeId","data-v-87b76c26"]]);exports.default=Ie;
|