@agile-team/mach-report 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -3
- package/dist/ExcelBindingWizard-CLT2p7P3.cjs +1 -0
- package/dist/ExcelBindingWizard-CvsWR8Ga.js +1485 -0
- package/dist/{ParamEditor-BLaE5q5W.js → ParamEditor-CflQV3eQ.js} +191 -187
- package/dist/ParamEditor-vIDzvpPV.cjs +1 -0
- package/dist/ReportBatchPanel-DkxTzBkD.cjs +1 -0
- package/dist/{ReportBatchPanel-B5ClP9tm.js → ReportBatchPanel-LqVgiqp7.js} +3 -3
- package/dist/ReportPreview-CvbqLUzM.cjs +6 -0
- package/dist/ReportPreview-D_ywJ_-H.js +4533 -0
- package/dist/{ReportTemplateLibrary-BZB-XWjj.js → ReportTemplateLibrary-MjWEtc7X.js} +1 -1
- package/dist/ReportTemplateLibrary-cQ1sqNYo.cjs +1 -0
- package/dist/RuleEditor-BaR6xUiI.cjs +1 -0
- package/dist/RuleEditor-ChuXMlei.js +2037 -0
- package/dist/TemplateOutlinePanel-BHKP89Xz.cjs +1 -0
- package/dist/TemplateOutlinePanel-Dci6aRn1.js +96 -0
- package/dist/TemplateReusePanel-B7Gmyc1z.js +388 -0
- package/dist/TemplateReusePanel-CY5eO2Sh.cjs +1 -0
- package/dist/TemplateReviewPanel-DjlX3xpt.js +592 -0
- package/dist/TemplateReviewPanel-JvZe9_4G.cjs +1 -0
- package/dist/{batch-mRqhhhjt.js → batch-DzaTNLWI.js} +23 -16
- package/dist/batch-xMkqYiTr.cjs +1 -0
- package/dist/config-0UIohTS7.cjs +1 -0
- package/dist/{config-B612mw0x.js → config-Dt9NtCPl.js} +227 -186
- package/dist/data-explanation-BktvER5B.cjs +1 -0
- package/dist/data-explanation-C_J6jYNi.js +16 -0
- package/dist/designer-Ci1LizA9.js +5020 -0
- package/dist/designer-rtmVIIdN.cjs +2 -0
- package/dist/designer.cjs +1 -2
- package/dist/designer.d.cts +306 -3
- package/dist/designer.d.ts +306 -3
- package/dist/designer.js +21 -4266
- package/dist/font-loader-DHto6Lra.js +297 -0
- package/dist/font-loader-vhCT8znW.cjs +1 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +182 -1
- package/dist/index.d.ts +182 -1
- package/dist/index.js +728 -628
- package/dist/{template-review-BzpcI-tR.js → json-snapshot-BeFT3Tso.js} +867 -637
- package/dist/json-snapshot-D1NTP2oI.cjs +2 -0
- package/dist/pdf-8UPQebOE.js +36288 -0
- package/dist/pdf-AyJGb22z.cjs +101 -0
- package/dist/pdf.cjs +1 -101
- package/dist/pdf.js +9 -36579
- package/dist/plugin-BGKf-Tqg.js +22 -0
- package/dist/{plugin-BDTU4D94.cjs → plugin-CktLH_Iy.cjs} +1 -1
- package/dist/{region-binding-workflow-CcUq8W2Q.js → region-binding-workflow-DEJbhpCv.js} +1 -1
- package/dist/server/node.d.cts +46 -11
- package/dist/server/node.d.ts +46 -11
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +294 -280
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +107 -12
- package/dist/server.d.ts +107 -12
- package/dist/server.js +713 -453
- package/dist/style.css +1 -1
- package/dist/template-bindings-BJR4k7qZ.cjs +1 -0
- package/dist/template-bindings-Daui7hLF.js +252 -0
- package/dist/template-fragments-CLkGo6To.js +187 -0
- package/dist/template-fragments-DFUpq5QM.cjs +1 -0
- package/dist/template-outline-B3xVkzSv.cjs +1 -0
- package/dist/template-outline-CFenM1PV.js +88 -0
- package/dist/{template-registry-BjE1VS6g.js → template-registry-COXDEJEM.js} +1 -1
- package/dist/{useLocalDraft-C07SYRnC.js → useLocalDraft-BnhcxXk_.js} +1 -1
- package/dist/{useLocalDraft-Yiw1wFgI.cjs → useLocalDraft-CioIfDb6.cjs} +1 -1
- package/dist/{validate-DbgEM1Hh.js → validate-CkQBWCeg.js} +3 -3
- package/dist/vue/async.d.cts +72 -2
- package/dist/vue/async.d.ts +72 -2
- package/dist/vue/index.d.cts +124 -5
- package/dist/vue/index.d.ts +124 -5
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +5 -5
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +78 -71
- package/dist/{workbook-session-BPb3TMnT.js → workbook-session-BfK1yHOO.js} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +46 -11
- package/dist/worker.d.ts +46 -11
- package/dist/worker.js +59 -55
- package/dist/xlsx.js +3 -3
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-CeAf4QSE.js +0 -1465
- package/dist/ExcelBindingWizard-y0mT-AHR.cjs +0 -1
- package/dist/ParamEditor-MBBC7lUE.cjs +0 -1
- package/dist/ReportBatchPanel-Dc-SDkYA.cjs +0 -1
- package/dist/ReportPreview-DWXROHBP.cjs +0 -6
- package/dist/ReportPreview-DiNXhQI0.js +0 -4138
- package/dist/ReportTemplateLibrary-5fk5CQBO.cjs +0 -1
- package/dist/RuleEditor-ChRzNQuF.cjs +0 -1
- package/dist/RuleEditor-DzAmW5YH.js +0 -2024
- package/dist/TemplateReviewPanel-BKofGrV9.js +0 -222
- package/dist/TemplateReviewPanel-DwtOcLue.cjs +0 -1
- package/dist/batch-Bt3Fd27Z.cjs +0 -1
- package/dist/config-BRoLo2oj.cjs +0 -1
- package/dist/plugin-Cd5G2QQn.js +0 -22
- package/dist/record-bindings-By_UKZ2g.cjs +0 -1
- package/dist/record-bindings-D-5jQlTj.js +0 -196
- package/dist/template-review-BfCC8Ng9.cjs +0 -2
|
@@ -1,2024 +0,0 @@
|
|
|
1
|
-
import { ref as G, computed as P, watch as le, defineComponent as re, openBlock as n, createElementBlock as o, createElementVNode as a, withDirectives as k, isRef as ie, vModelCheckbox as se, unref as l, createTextVNode as g, toDisplayString as t, Fragment as $, renderList as x, vModelSelect as E, vModelText as q, createCommentVNode as D, resolveComponent as Ue, normalizeClass as ve, createVNode as ge, createBlock as Fe, vShow as xe } from "vue";
|
|
2
|
-
import { i as me, v as Me, d as Se } from "./computed-Bvk0W15F.js";
|
|
3
|
-
import { u as oe } from "./useLocalDraft-C07SYRnC.js";
|
|
4
|
-
import { a as De } from "./matrix-yZsGnldA.js";
|
|
5
|
-
import { v as fe } from "./template-registry-BjE1VS6g.js";
|
|
6
|
-
import { c as Re } from "./tree-CqcQ99NM.js";
|
|
7
|
-
import { _ as ce } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
8
|
-
import { RULE_EDITOR_MESSAGES as Ee } from "./designer.js";
|
|
9
|
-
function ye(e, B = /* @__PURE__ */ new Set()) {
|
|
10
|
-
return typeof e == "string" || ("field" in e && e.field && B.add(e.field), "weightField" in e && e.weightField && B.add(e.weightField), "args" in e && e.args.forEach((M) => ye(M, B))), B;
|
|
11
|
-
}
|
|
12
|
-
function he(e, B) {
|
|
13
|
-
return typeof e == "string" ? e : "value" in e ? e.value === null ? B.null : String(e.value) : "aggregate" in e ? `${B[e.aggregate]}(${e.field ?? B.allRows})` : "field" in e ? e.field : `${B[e.op]}(${e.args.map((M) => he(M, B)).join(", ")})`;
|
|
14
|
-
}
|
|
15
|
-
function Le(e, B, M) {
|
|
16
|
-
const W = G("");
|
|
17
|
-
function w(U) {
|
|
18
|
-
const V = e.list.columns.find((T) => T.field === U)?.format;
|
|
19
|
-
return V && "digits" in V && V.digits !== void 0 ? `${V.digits} ${M.value.digits}` : void 0;
|
|
20
|
-
}
|
|
21
|
-
const v = P(() => {
|
|
22
|
-
const U = /* @__PURE__ */ new Map();
|
|
23
|
-
for (const V of e.datasetSchema?.fields ?? []) U.set(V.field, {
|
|
24
|
-
field: V.field,
|
|
25
|
-
label: V.label ?? V.field,
|
|
26
|
-
meta: [V.type, V.unit, w(V.field)].filter(Boolean).join(" · ")
|
|
27
|
-
});
|
|
28
|
-
for (const V of e.list.columns) U.has(V.field) || U.set(V.field, { field: V.field, label: V.header || V.field, meta: V.semanticRole ?? "" });
|
|
29
|
-
return [...U.values()];
|
|
30
|
-
}), s = P(() => {
|
|
31
|
-
const U = W.value.trim().toLocaleLowerCase();
|
|
32
|
-
return v.value.filter((V) => `${V.field} ${V.label} ${V.meta}`.toLocaleLowerCase().includes(U));
|
|
33
|
-
}), h = P(() => he(B.value.expression, M.value)), C = P(() => {
|
|
34
|
-
const U = [...ye(B.value.expression)];
|
|
35
|
-
return (e.datasets?.[e.list.dataset] ?? []).slice(0, 5).map((V, T) => ({
|
|
36
|
-
row: T + 1,
|
|
37
|
-
values: U.map((S) => `${S} = ${V[S] == null ? M.value.null : String(V[S])}`).join(" · ")
|
|
38
|
-
}));
|
|
39
|
-
});
|
|
40
|
-
return { query: W, matches: s, fieldWindow: P(() => s.value.slice(0, 50)), expression: h, sources: C };
|
|
41
|
-
}
|
|
42
|
-
const ee = (e) => JSON.parse(JSON.stringify(e));
|
|
43
|
-
function Te(e, B) {
|
|
44
|
-
const M = G(!1), W = G(""), w = G({
|
|
45
|
-
dataset: "",
|
|
46
|
-
parentKey: "",
|
|
47
|
-
foreignKey: "",
|
|
48
|
-
columns: []
|
|
49
|
-
}), v = G({
|
|
50
|
-
rowFields: [],
|
|
51
|
-
columnFields: [],
|
|
52
|
-
measures: []
|
|
53
|
-
}), s = G({ input: "flat", idField: "id", parentField: "parentId", labelField: "", parentValues: "source" }), h = oe(() => ({ enabled: M.value, detail: w.value, matrix: v.value, tree: s.value }));
|
|
54
|
-
let C;
|
|
55
|
-
const U = G(), V = P(() => [
|
|
56
|
-
.../* @__PURE__ */ new Set([
|
|
57
|
-
...Object.keys(e.datasets ?? {}),
|
|
58
|
-
...Object.keys(e.datasetSchemas ?? {})
|
|
59
|
-
])
|
|
60
|
-
]), T = P(
|
|
61
|
-
() => O(e.list.dataset, e.datasetSchema)
|
|
62
|
-
), S = P(() => O(w.value.dataset));
|
|
63
|
-
function O(m, N) {
|
|
64
|
-
const R = /* @__PURE__ */ new Map();
|
|
65
|
-
for (const A of (N ?? e.datasetSchemas?.[m])?.fields ?? [])
|
|
66
|
-
R.set(A.field, A.label ?? A.field);
|
|
67
|
-
const I = e.datasets?.[m]?.[0];
|
|
68
|
-
for (const A of Object.keys(I ?? {}))
|
|
69
|
-
R.has(A) || R.set(A, A);
|
|
70
|
-
if (m === e.list.dataset)
|
|
71
|
-
for (const A of e.list.columns)
|
|
72
|
-
R.has(A.field) || R.set(A.field, A.header || A.field);
|
|
73
|
-
return [...R].map(([A, p]) => ({ field: A, label: p }));
|
|
74
|
-
}
|
|
75
|
-
function J() {
|
|
76
|
-
if (C === JSON.stringify(e.list)) {
|
|
77
|
-
C = void 0;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
M.value = !!e.list[e.mode];
|
|
81
|
-
const m = V.value.find((N) => N !== e.list.dataset) ?? "";
|
|
82
|
-
w.value = ee(
|
|
83
|
-
e.list.detail ?? {
|
|
84
|
-
dataset: m,
|
|
85
|
-
parentKey: e.list.rowKey ?? e.datasetSchema?.rowKey ?? T.value[0]?.field ?? "",
|
|
86
|
-
foreignKey: "",
|
|
87
|
-
columns: [],
|
|
88
|
-
header: !0,
|
|
89
|
-
unmatched: "error"
|
|
90
|
-
}
|
|
91
|
-
), v.value = ee(
|
|
92
|
-
e.list.matrix ?? {
|
|
93
|
-
rowFields: [],
|
|
94
|
-
columnFields: [],
|
|
95
|
-
measures: [],
|
|
96
|
-
totals: !0
|
|
97
|
-
}
|
|
98
|
-
), v.value.measures = v.value.measures.map((N) => ({ ...N, numeric: N.numeric ?? "number" })), s.value = ee(e.list.tree ?? { input: "flat", idField: e.list.rowKey ?? "id", parentField: "parentId", childrenField: "children", labelField: e.list.columns[0]?.field ?? "", parentValues: "source", orphan: "error", indentMm: 3, maxRows: 1e5, maxDepth: 64 }), W.value = "", U.value = void 0, h.accept();
|
|
99
|
-
}
|
|
100
|
-
le(() => [e.mode, e.list.dataset, e.list[e.mode]], J, { immediate: !0 });
|
|
101
|
-
function F(m) {
|
|
102
|
-
w.value.dataset = m, w.value.columns = [], w.value.foreignKey = S.value[0]?.field ?? "", w.value.rowKey = e.datasetSchemas?.[m]?.rowKey;
|
|
103
|
-
}
|
|
104
|
-
function u(m, N) {
|
|
105
|
-
if (N && !w.value.columns.some((R) => R.field === m)) {
|
|
106
|
-
const R = e.datasetSchemas?.[w.value.dataset]?.fields.find((I) => I.field === m);
|
|
107
|
-
w.value.columns.push({
|
|
108
|
-
field: m,
|
|
109
|
-
header: S.value.find((I) => I.field === m)?.label ?? m,
|
|
110
|
-
widthMm: 30,
|
|
111
|
-
align: "auto",
|
|
112
|
-
semanticRole: R?.semanticRole,
|
|
113
|
-
editable: !1
|
|
114
|
-
});
|
|
115
|
-
} else N || (w.value.columns = w.value.columns.filter(
|
|
116
|
-
(R) => R.field !== m
|
|
117
|
-
));
|
|
118
|
-
}
|
|
119
|
-
function i(m, N, R) {
|
|
120
|
-
const I = v.value[m];
|
|
121
|
-
v.value[m] = R ? [.../* @__PURE__ */ new Set([...I, N])] : I.filter((A) => A !== N);
|
|
122
|
-
}
|
|
123
|
-
function r() {
|
|
124
|
-
v.value.measures = [
|
|
125
|
-
...v.value.measures,
|
|
126
|
-
{ field: T.value[0]?.field ?? "", op: "sum", numeric: "number" }
|
|
127
|
-
];
|
|
128
|
-
}
|
|
129
|
-
function b(m) {
|
|
130
|
-
v.value.measures = v.value.measures.filter(
|
|
131
|
-
(N, R) => R !== m
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
function H() {
|
|
135
|
-
s.value.aggregates = [...s.value.aggregates ?? [], { field: T.value.find((m) => m.field !== s.value.labelField && m.field !== s.value.idField)?.field ?? "", op: "sum", numeric: "number" }];
|
|
136
|
-
}
|
|
137
|
-
function Q(m) {
|
|
138
|
-
s.value.aggregates = s.value.aggregates?.filter((N, R) => R !== m);
|
|
139
|
-
}
|
|
140
|
-
function ae() {
|
|
141
|
-
W.value = "", U.value = void 0;
|
|
142
|
-
try {
|
|
143
|
-
const m = e.datasets?.[e.list.dataset] ?? [];
|
|
144
|
-
if (!m.length) throw new Error(e.messages.noData);
|
|
145
|
-
if (m.length > 1e3) throw new Error(e.messages.treeBudget);
|
|
146
|
-
const N = Re(m, { ...s.value, aggregates: s.value.parentValues === "leaf-aggregate" ? s.value.aggregates : void 0, maxRows: 1e3 }), R = e.list.columns.slice(0, 5);
|
|
147
|
-
U.value = { columns: R.map((I) => I.header), rows: N.entries.slice(0, 8).map((I) => R.map((A) => A.field === s.value.labelField ? `${" ".repeat(Math.min(6, I.depth))}${I.row[A.field] ?? ""}` : I.row[A.field])) };
|
|
148
|
-
} catch (m) {
|
|
149
|
-
W.value = m instanceof Error ? m.message : String(m);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function X(m) {
|
|
153
|
-
if (!M.value) {
|
|
154
|
-
delete m.tree;
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
m.tree = ee(s.value), m.tree.parentValues !== "leaf-aggregate" && delete m.tree.aggregates, m.rowKey = m.tree.idField, delete m.detail, delete m.matrix, delete m.groupBy, delete m.groups, delete m.rowVisibleWhen;
|
|
158
|
-
}
|
|
159
|
-
function Y() {
|
|
160
|
-
W.value = "", U.value = void 0;
|
|
161
|
-
try {
|
|
162
|
-
const m = e.datasets?.[e.list.dataset] ?? [];
|
|
163
|
-
if (!m.length) throw new Error(e.messages.noData);
|
|
164
|
-
const N = De(m.slice(0, 1e3), {
|
|
165
|
-
...v.value,
|
|
166
|
-
maxInputRows: 1e3
|
|
167
|
-
});
|
|
168
|
-
U.value = {
|
|
169
|
-
columns: N.columns.slice(0, 5).map((R) => R.header),
|
|
170
|
-
rows: N.rows.slice(0, 5).map(
|
|
171
|
-
(R) => N.columns.slice(0, 5).map((I) => R[I.field])
|
|
172
|
-
)
|
|
173
|
-
};
|
|
174
|
-
} catch (m) {
|
|
175
|
-
W.value = m instanceof Error ? m.message : String(m);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function _() {
|
|
179
|
-
if (e.readonly) return;
|
|
180
|
-
const m = ee(e.list);
|
|
181
|
-
e.mode === "tree" ? X(m) : e.mode === "detail" ? M.value ? (m.detail = ee(w.value), delete m.matrix, delete m.tree) : delete m.detail : M.value ? (m.matrix = ee(v.value), delete m.detail, delete m.tree, delete m.groups, delete m.groupBy, delete m.grandTotal) : delete m.matrix;
|
|
182
|
-
const N = fe({ pages: [{ widthMm: Math.max(1, m.leftMm + m.widthMm), heightMm: 297, components: [m] }] });
|
|
183
|
-
if (!N.ok) {
|
|
184
|
-
W.value = N.errors.slice(0, 3).map((R) => R.message).join(";");
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
e.accept && !e.accept(m) || (C = JSON.stringify(m), e.accept || B(m), h.accept());
|
|
188
|
-
}
|
|
189
|
-
return {
|
|
190
|
-
enabled: M,
|
|
191
|
-
pendingLocalChanges: h.pending,
|
|
192
|
-
detail: w,
|
|
193
|
-
matrix: v,
|
|
194
|
-
tree: s,
|
|
195
|
-
datasets: V,
|
|
196
|
-
sourceFields: T,
|
|
197
|
-
childFields: S,
|
|
198
|
-
error: W,
|
|
199
|
-
preview: U,
|
|
200
|
-
chooseDataset: F,
|
|
201
|
-
toggleChildColumn: u,
|
|
202
|
-
toggleDimension: i,
|
|
203
|
-
addMeasure: r,
|
|
204
|
-
removeMeasure: b,
|
|
205
|
-
checkMatrix: Y,
|
|
206
|
-
addTreeAggregate: H,
|
|
207
|
-
removeTreeAggregate: Q,
|
|
208
|
-
checkTree: ae,
|
|
209
|
-
apply: _
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
const Ke = { class: "mr-data-layout" }, Ne = { class: "mr-data-layout__check" }, Ae = ["disabled"], Be = { class: "mr-data-layout__hint" }, Ge = ["aria-label", "value", "disabled"], Ie = {
|
|
213
|
-
value: "",
|
|
214
|
-
disabled: ""
|
|
215
|
-
}, Oe = ["value"], We = { class: "mr-data-layout__pair" }, je = ["aria-label", "disabled"], Je = ["value"], He = ["aria-label", "disabled"], ze = {
|
|
216
|
-
value: "",
|
|
217
|
-
disabled: ""
|
|
218
|
-
}, qe = ["value"], Pe = ["aria-label", "disabled"], Ze = { value: void 0 }, Qe = ["value"], Xe = { class: "mr-data-layout__choices" }, Ye = ["checked", "disabled", "onChange"], pe = ["aria-label", "disabled"], _e = { class: "mr-data-layout__pair" }, el = ["aria-label", "disabled"], ll = { value: "error" }, al = { value: "ignore" }, tl = { class: "mr-data-layout__check" }, sl = ["disabled"], il = { class: "mr-data-layout__hint" }, dl = { class: "mr-data-layout__pair" }, nl = ["aria-label", "disabled"], ol = { value: "flat" }, ul = { value: "nested" }, rl = ["aria-label", "disabled"], ml = ["value"], cl = { class: "mr-data-layout__pair" }, bl = { key: 0 }, vl = ["aria-label", "disabled"], gl = ["value"], fl = { key: 1 }, yl = ["aria-label", "disabled"], hl = ["aria-label", "disabled"], kl = ["value"], $l = { class: "mr-data-layout__pair" }, Vl = ["aria-label", "disabled"], wl = { key: 0 }, Cl = ["aria-label", "disabled"], Ul = { value: "error" }, Fl = { value: "root" }, xl = ["aria-label", "disabled"], Ml = { value: "source" }, Sl = { value: "leaf-aggregate" }, Dl = { class: "mr-data-layout__pair" }, Rl = ["onUpdate:modelValue", "aria-label", "disabled"], El = ["value"], Ll = ["onUpdate:modelValue", "aria-label", "disabled"], Tl = ["value"], Kl = { key: 0 }, Nl = ["onUpdate:modelValue", "aria-label", "disabled"], Al = ["value"], Bl = { class: "mr-data-layout__pair" }, Gl = ["onUpdate:modelValue", "aria-label", "disabled"], Il = { value: "number" }, Ol = { value: "decimal" }, Wl = ["onUpdate:modelValue", "aria-label", "disabled"], jl = ["disabled", "onClick"], Jl = ["disabled"], Hl = { class: "mr-data-layout__pair" }, zl = ["aria-label", "disabled"], ql = ["aria-label", "disabled"], Pl = { class: "mr-data-layout__hint" }, Zl = { class: "mr-data-layout__hint" }, Ql = ["checked", "disabled", "onChange"], Xl = { class: "mr-data-layout__pair" }, Yl = ["aria-label", "onUpdate:modelValue", "disabled"], pl = ["value"], _l = ["aria-label", "onUpdate:modelValue", "disabled"], ea = ["value"], la = ["aria-label", "onUpdate:modelValue", "disabled", "placeholder"], aa = { key: 0 }, ta = ["aria-label", "onUpdate:modelValue", "disabled"], sa = ["value"], ia = { class: "mr-data-layout__pair" }, da = ["aria-label", "onUpdate:modelValue", "disabled"], na = { value: "number" }, oa = { value: "decimal" }, ua = ["aria-label", "onUpdate:modelValue", "disabled"], ra = ["disabled", "onClick"], ma = ["disabled"], ca = { class: "mr-data-layout__check" }, ba = ["disabled"], va = { class: "mr-data-layout__pair" }, ga = ["disabled"], fa = ["disabled"], ya = { class: "mr-data-layout__actions" }, ha = ["disabled"], ka = ["disabled"], $a = ["disabled"], Va = {
|
|
219
|
-
key: 3,
|
|
220
|
-
class: "mr-data-layout__preview"
|
|
221
|
-
}, wa = {
|
|
222
|
-
key: 4,
|
|
223
|
-
class: "mr-data-layout__error",
|
|
224
|
-
role: "alert"
|
|
225
|
-
}, Ca = /* @__PURE__ */ re({
|
|
226
|
-
__name: "RuleDataLayout",
|
|
227
|
-
props: {
|
|
228
|
-
list: {},
|
|
229
|
-
accept: { type: Function },
|
|
230
|
-
mode: {},
|
|
231
|
-
datasets: {},
|
|
232
|
-
datasetSchema: {},
|
|
233
|
-
datasetSchemas: {},
|
|
234
|
-
readonly: { type: Boolean },
|
|
235
|
-
messages: {}
|
|
236
|
-
},
|
|
237
|
-
emits: ["change", "dirty"],
|
|
238
|
-
setup(e, { emit: B }) {
|
|
239
|
-
const M = e, W = B, w = Te(M, (F) => W("change", F)), {
|
|
240
|
-
enabled: v,
|
|
241
|
-
detail: s,
|
|
242
|
-
matrix: h,
|
|
243
|
-
tree: C,
|
|
244
|
-
datasets: U,
|
|
245
|
-
sourceFields: V,
|
|
246
|
-
childFields: T,
|
|
247
|
-
error: S,
|
|
248
|
-
preview: O
|
|
249
|
-
} = w;
|
|
250
|
-
le([w.pendingLocalChanges, v, s, h, C], () => W("dirty", w.pendingLocalChanges.value), { immediate: !0, deep: !0, flush: "sync" });
|
|
251
|
-
const J = me();
|
|
252
|
-
return (F, u) => (n(), o("div", Ke, [
|
|
253
|
-
a("label", Ne, [
|
|
254
|
-
k(a("input", {
|
|
255
|
-
"onUpdate:modelValue": u[0] || (u[0] = (i) => ie(v) ? v.value = i : null),
|
|
256
|
-
type: "checkbox",
|
|
257
|
-
disabled: e.readonly
|
|
258
|
-
}, null, 8, Ae), [
|
|
259
|
-
[se, l(v)]
|
|
260
|
-
]),
|
|
261
|
-
g(t(e.messages.enabled) + t(e.messages[e.mode]), 1)
|
|
262
|
-
]),
|
|
263
|
-
l(v) && e.mode === "detail" ? (n(), o($, { key: 0 }, [
|
|
264
|
-
a("p", Be, t(e.messages.detailHint), 1),
|
|
265
|
-
a("label", null, [
|
|
266
|
-
g(t(e.messages.childDataset), 1),
|
|
267
|
-
a("select", {
|
|
268
|
-
"aria-label": e.messages.childDataset,
|
|
269
|
-
value: l(s).dataset,
|
|
270
|
-
disabled: e.readonly,
|
|
271
|
-
onChange: u[1] || (u[1] = (i) => l(w).chooseDataset(i.target.value))
|
|
272
|
-
}, [
|
|
273
|
-
a("option", Ie, t(e.messages.select), 1),
|
|
274
|
-
(n(!0), o($, null, x(l(U), (i) => (n(), o("option", {
|
|
275
|
-
key: i,
|
|
276
|
-
value: i
|
|
277
|
-
}, t(i), 9, Oe))), 128))
|
|
278
|
-
], 40, Ge)
|
|
279
|
-
]),
|
|
280
|
-
a("div", We, [
|
|
281
|
-
a("label", null, [
|
|
282
|
-
g(t(e.messages.parentKey), 1),
|
|
283
|
-
k(a("select", {
|
|
284
|
-
"aria-label": e.messages.parentKey,
|
|
285
|
-
"onUpdate:modelValue": u[2] || (u[2] = (i) => l(s).parentKey = i),
|
|
286
|
-
disabled: e.readonly
|
|
287
|
-
}, [
|
|
288
|
-
(n(!0), o($, null, x(l(V), (i) => (n(), o("option", {
|
|
289
|
-
key: i.field,
|
|
290
|
-
value: i.field
|
|
291
|
-
}, t(i.label), 9, Je))), 128))
|
|
292
|
-
], 8, je), [
|
|
293
|
-
[E, l(s).parentKey]
|
|
294
|
-
])
|
|
295
|
-
]),
|
|
296
|
-
a("label", null, [
|
|
297
|
-
g(t(e.messages.foreignKey), 1),
|
|
298
|
-
k(a("select", {
|
|
299
|
-
"aria-label": e.messages.foreignKey,
|
|
300
|
-
"onUpdate:modelValue": u[3] || (u[3] = (i) => l(s).foreignKey = i),
|
|
301
|
-
disabled: e.readonly
|
|
302
|
-
}, [
|
|
303
|
-
a("option", ze, t(e.messages.select), 1),
|
|
304
|
-
(n(!0), o($, null, x(l(T), (i) => (n(), o("option", {
|
|
305
|
-
key: i.field,
|
|
306
|
-
value: i.field
|
|
307
|
-
}, t(i.label), 9, qe))), 128))
|
|
308
|
-
], 8, He), [
|
|
309
|
-
[E, l(s).foreignKey]
|
|
310
|
-
])
|
|
311
|
-
])
|
|
312
|
-
]),
|
|
313
|
-
a("label", null, [
|
|
314
|
-
g(t(e.messages.rowKey), 1),
|
|
315
|
-
k(a("select", {
|
|
316
|
-
"aria-label": e.messages.rowKey,
|
|
317
|
-
"onUpdate:modelValue": u[4] || (u[4] = (i) => l(s).rowKey = i),
|
|
318
|
-
disabled: e.readonly
|
|
319
|
-
}, [
|
|
320
|
-
a("option", Ze, t(e.messages.noRowKey), 1),
|
|
321
|
-
(n(!0), o($, null, x(l(T), (i) => (n(), o("option", {
|
|
322
|
-
key: i.field,
|
|
323
|
-
value: i.field
|
|
324
|
-
}, t(i.label), 9, Qe))), 128))
|
|
325
|
-
], 8, Pe), [
|
|
326
|
-
[E, l(s).rowKey]
|
|
327
|
-
])
|
|
328
|
-
]),
|
|
329
|
-
a("fieldset", Xe, [
|
|
330
|
-
a("legend", null, t(e.messages.childColumns), 1),
|
|
331
|
-
(n(!0), o($, null, x(l(T), (i) => (n(), o("label", {
|
|
332
|
-
key: i.field
|
|
333
|
-
}, [
|
|
334
|
-
a("input", {
|
|
335
|
-
type: "checkbox",
|
|
336
|
-
checked: l(s).columns.some((r) => r.field === i.field),
|
|
337
|
-
disabled: e.readonly,
|
|
338
|
-
onChange: (r) => l(w).toggleChildColumn(
|
|
339
|
-
i.field,
|
|
340
|
-
r.target.checked
|
|
341
|
-
)
|
|
342
|
-
}, null, 40, Ye),
|
|
343
|
-
g(t(i.label), 1)
|
|
344
|
-
]))), 128))
|
|
345
|
-
]),
|
|
346
|
-
a("label", null, [
|
|
347
|
-
g(t(e.messages.title), 1),
|
|
348
|
-
k(a("input", {
|
|
349
|
-
"aria-label": e.messages.title,
|
|
350
|
-
"onUpdate:modelValue": u[5] || (u[5] = (i) => l(s).label = i),
|
|
351
|
-
disabled: e.readonly
|
|
352
|
-
}, null, 8, pe), [
|
|
353
|
-
[q, l(s).label]
|
|
354
|
-
])
|
|
355
|
-
]),
|
|
356
|
-
a("div", _e, [
|
|
357
|
-
a("label", null, [
|
|
358
|
-
g(t(e.messages.unmatched), 1),
|
|
359
|
-
k(a("select", {
|
|
360
|
-
"aria-label": e.messages.unmatched,
|
|
361
|
-
"onUpdate:modelValue": u[6] || (u[6] = (i) => l(s).unmatched = i),
|
|
362
|
-
disabled: e.readonly
|
|
363
|
-
}, [
|
|
364
|
-
a("option", ll, t(e.messages.error), 1),
|
|
365
|
-
a("option", al, t(e.messages.ignore), 1)
|
|
366
|
-
], 8, el), [
|
|
367
|
-
[E, l(s).unmatched]
|
|
368
|
-
])
|
|
369
|
-
]),
|
|
370
|
-
a("label", tl, [
|
|
371
|
-
k(a("input", {
|
|
372
|
-
"onUpdate:modelValue": u[7] || (u[7] = (i) => l(s).header = i),
|
|
373
|
-
type: "checkbox",
|
|
374
|
-
disabled: e.readonly
|
|
375
|
-
}, null, 8, sl), [
|
|
376
|
-
[se, l(s).header]
|
|
377
|
-
]),
|
|
378
|
-
g(t(e.messages.childHeader), 1)
|
|
379
|
-
])
|
|
380
|
-
])
|
|
381
|
-
], 64)) : l(v) && e.mode === "tree" ? (n(), o($, { key: 1 }, [
|
|
382
|
-
a("p", il, t(e.messages.treeHint), 1),
|
|
383
|
-
a("div", dl, [
|
|
384
|
-
a("label", null, [
|
|
385
|
-
g(t(e.messages.treeInput), 1),
|
|
386
|
-
k(a("select", {
|
|
387
|
-
"onUpdate:modelValue": u[8] || (u[8] = (i) => l(C).input = i),
|
|
388
|
-
"aria-label": e.messages.treeInput,
|
|
389
|
-
disabled: e.readonly
|
|
390
|
-
}, [
|
|
391
|
-
a("option", ol, t(e.messages.treeFlat), 1),
|
|
392
|
-
a("option", ul, t(e.messages.treeNested), 1)
|
|
393
|
-
], 8, nl), [
|
|
394
|
-
[E, l(C).input]
|
|
395
|
-
])
|
|
396
|
-
]),
|
|
397
|
-
a("label", null, [
|
|
398
|
-
g(t(e.messages.treeId), 1),
|
|
399
|
-
k(a("select", {
|
|
400
|
-
"onUpdate:modelValue": u[9] || (u[9] = (i) => l(C).idField = i),
|
|
401
|
-
"aria-label": e.messages.treeId,
|
|
402
|
-
disabled: e.readonly
|
|
403
|
-
}, [
|
|
404
|
-
(n(!0), o($, null, x(l(V), (i) => (n(), o("option", {
|
|
405
|
-
key: i.field,
|
|
406
|
-
value: i.field
|
|
407
|
-
}, t(i.label), 9, ml))), 128))
|
|
408
|
-
], 8, rl), [
|
|
409
|
-
[E, l(C).idField]
|
|
410
|
-
])
|
|
411
|
-
])
|
|
412
|
-
]),
|
|
413
|
-
a("div", cl, [
|
|
414
|
-
l(C).input === "flat" ? (n(), o("label", bl, [
|
|
415
|
-
g(t(e.messages.treeParent), 1),
|
|
416
|
-
k(a("select", {
|
|
417
|
-
"onUpdate:modelValue": u[10] || (u[10] = (i) => l(C).parentField = i),
|
|
418
|
-
"aria-label": e.messages.treeParent,
|
|
419
|
-
disabled: e.readonly
|
|
420
|
-
}, [
|
|
421
|
-
(n(!0), o($, null, x(l(V), (i) => (n(), o("option", {
|
|
422
|
-
key: i.field,
|
|
423
|
-
value: i.field
|
|
424
|
-
}, t(i.label), 9, gl))), 128))
|
|
425
|
-
], 8, vl), [
|
|
426
|
-
[E, l(C).parentField]
|
|
427
|
-
])
|
|
428
|
-
])) : (n(), o("label", fl, [
|
|
429
|
-
g(t(e.messages.treeChildren), 1),
|
|
430
|
-
k(a("input", {
|
|
431
|
-
"onUpdate:modelValue": u[11] || (u[11] = (i) => l(C).childrenField = i),
|
|
432
|
-
"aria-label": e.messages.treeChildren,
|
|
433
|
-
disabled: e.readonly,
|
|
434
|
-
placeholder: "children"
|
|
435
|
-
}, null, 8, yl), [
|
|
436
|
-
[q, l(C).childrenField]
|
|
437
|
-
])
|
|
438
|
-
])),
|
|
439
|
-
a("label", null, [
|
|
440
|
-
g(t(e.messages.treeLabel), 1),
|
|
441
|
-
k(a("select", {
|
|
442
|
-
"onUpdate:modelValue": u[12] || (u[12] = (i) => l(C).labelField = i),
|
|
443
|
-
"aria-label": e.messages.treeLabel,
|
|
444
|
-
disabled: e.readonly
|
|
445
|
-
}, [
|
|
446
|
-
(n(!0), o($, null, x(e.list.columns.filter((i) => !i.hidden), (i) => (n(), o("option", {
|
|
447
|
-
key: i.field,
|
|
448
|
-
value: i.field
|
|
449
|
-
}, t(i.header), 9, kl))), 128))
|
|
450
|
-
], 8, hl), [
|
|
451
|
-
[E, l(C).labelField]
|
|
452
|
-
])
|
|
453
|
-
])
|
|
454
|
-
]),
|
|
455
|
-
a("div", $l, [
|
|
456
|
-
a("label", null, [
|
|
457
|
-
g(t(e.messages.treeIndent), 1),
|
|
458
|
-
k(a("input", {
|
|
459
|
-
"onUpdate:modelValue": u[13] || (u[13] = (i) => l(C).indentMm = i),
|
|
460
|
-
"aria-label": e.messages.treeIndent,
|
|
461
|
-
type: "number",
|
|
462
|
-
min: "0",
|
|
463
|
-
max: "20",
|
|
464
|
-
step: "0.5",
|
|
465
|
-
disabled: e.readonly
|
|
466
|
-
}, null, 8, Vl), [
|
|
467
|
-
[
|
|
468
|
-
q,
|
|
469
|
-
l(C).indentMm,
|
|
470
|
-
void 0,
|
|
471
|
-
{ number: !0 }
|
|
472
|
-
]
|
|
473
|
-
])
|
|
474
|
-
]),
|
|
475
|
-
l(C).input === "flat" ? (n(), o("label", wl, [
|
|
476
|
-
g(t(e.messages.treeOrphan), 1),
|
|
477
|
-
k(a("select", {
|
|
478
|
-
"onUpdate:modelValue": u[14] || (u[14] = (i) => l(C).orphan = i),
|
|
479
|
-
"aria-label": e.messages.treeOrphan,
|
|
480
|
-
disabled: e.readonly
|
|
481
|
-
}, [
|
|
482
|
-
a("option", Ul, t(e.messages.error), 1),
|
|
483
|
-
a("option", Fl, t(e.messages.treeAsRoot), 1)
|
|
484
|
-
], 8, Cl), [
|
|
485
|
-
[E, l(C).orphan]
|
|
486
|
-
])
|
|
487
|
-
])) : D("", !0)
|
|
488
|
-
]),
|
|
489
|
-
a("label", null, [
|
|
490
|
-
g(t(e.messages.treeValues), 1),
|
|
491
|
-
k(a("select", {
|
|
492
|
-
"onUpdate:modelValue": u[15] || (u[15] = (i) => l(C).parentValues = i),
|
|
493
|
-
"aria-label": e.messages.treeValues,
|
|
494
|
-
disabled: e.readonly
|
|
495
|
-
}, [
|
|
496
|
-
a("option", Ml, t(e.messages.treeSource), 1),
|
|
497
|
-
a("option", Sl, t(e.messages.treeLeaves), 1)
|
|
498
|
-
], 8, xl), [
|
|
499
|
-
[E, l(C).parentValues]
|
|
500
|
-
])
|
|
501
|
-
]),
|
|
502
|
-
l(C).parentValues === "leaf-aggregate" ? (n(), o($, { key: 0 }, [
|
|
503
|
-
(n(!0), o($, null, x(l(C).aggregates, (i, r) => (n(), o("div", {
|
|
504
|
-
key: r,
|
|
505
|
-
class: "mr-data-layout__measure"
|
|
506
|
-
}, [
|
|
507
|
-
a("div", Dl, [
|
|
508
|
-
a("label", null, [
|
|
509
|
-
g(t(e.messages.measure), 1),
|
|
510
|
-
k(a("select", {
|
|
511
|
-
"onUpdate:modelValue": (b) => i.field = b,
|
|
512
|
-
"aria-label": e.messages.measure,
|
|
513
|
-
disabled: e.readonly
|
|
514
|
-
}, [
|
|
515
|
-
(n(!0), o($, null, x(l(V), (b) => (n(), o("option", {
|
|
516
|
-
key: b.field,
|
|
517
|
-
value: b.field
|
|
518
|
-
}, t(b.label), 9, El))), 128))
|
|
519
|
-
], 8, Rl), [
|
|
520
|
-
[E, i.field]
|
|
521
|
-
])
|
|
522
|
-
]),
|
|
523
|
-
a("label", null, [
|
|
524
|
-
g(t(e.messages.aggregate), 1),
|
|
525
|
-
k(a("select", {
|
|
526
|
-
"onUpdate:modelValue": (b) => i.op = b,
|
|
527
|
-
"aria-label": e.messages.aggregate,
|
|
528
|
-
disabled: e.readonly
|
|
529
|
-
}, [
|
|
530
|
-
(n(!0), o($, null, x(l(J).aggregates, (b) => (n(), o("option", {
|
|
531
|
-
key: b,
|
|
532
|
-
value: b
|
|
533
|
-
}, t(e.messages[b]), 9, Tl))), 128))
|
|
534
|
-
], 8, Ll), [
|
|
535
|
-
[E, i.op]
|
|
536
|
-
])
|
|
537
|
-
])
|
|
538
|
-
]),
|
|
539
|
-
i.op === "weightedAvg" ? (n(), o("label", Kl, [
|
|
540
|
-
g(t(e.messages.weight), 1),
|
|
541
|
-
k(a("select", {
|
|
542
|
-
"onUpdate:modelValue": (b) => i.weightField = b,
|
|
543
|
-
"aria-label": e.messages.weight,
|
|
544
|
-
disabled: e.readonly
|
|
545
|
-
}, [
|
|
546
|
-
(n(!0), o($, null, x(l(V), (b) => (n(), o("option", {
|
|
547
|
-
key: b.field,
|
|
548
|
-
value: b.field
|
|
549
|
-
}, t(b.label), 9, Al))), 128))
|
|
550
|
-
], 8, Nl), [
|
|
551
|
-
[E, i.weightField]
|
|
552
|
-
])
|
|
553
|
-
])) : D("", !0),
|
|
554
|
-
a("div", Bl, [
|
|
555
|
-
a("label", null, [
|
|
556
|
-
g(t(e.messages.numeric), 1),
|
|
557
|
-
k(a("select", {
|
|
558
|
-
"onUpdate:modelValue": (b) => i.numeric = b,
|
|
559
|
-
"aria-label": e.messages.numeric,
|
|
560
|
-
disabled: e.readonly
|
|
561
|
-
}, [
|
|
562
|
-
a("option", Il, t(e.messages.number), 1),
|
|
563
|
-
a("option", Ol, t(e.messages.decimal), 1)
|
|
564
|
-
], 8, Gl), [
|
|
565
|
-
[E, i.numeric]
|
|
566
|
-
])
|
|
567
|
-
]),
|
|
568
|
-
a("label", null, [
|
|
569
|
-
g(t(e.messages.digits), 1),
|
|
570
|
-
k(a("input", {
|
|
571
|
-
"onUpdate:modelValue": (b) => i.digits = b,
|
|
572
|
-
"aria-label": e.messages.digits,
|
|
573
|
-
type: "number",
|
|
574
|
-
min: "0",
|
|
575
|
-
max: "100",
|
|
576
|
-
disabled: e.readonly
|
|
577
|
-
}, null, 8, Wl), [
|
|
578
|
-
[
|
|
579
|
-
q,
|
|
580
|
-
i.digits,
|
|
581
|
-
void 0,
|
|
582
|
-
{ number: !0 }
|
|
583
|
-
]
|
|
584
|
-
])
|
|
585
|
-
])
|
|
586
|
-
]),
|
|
587
|
-
a("button", {
|
|
588
|
-
type: "button",
|
|
589
|
-
disabled: e.readonly,
|
|
590
|
-
onClick: (b) => l(w).removeTreeAggregate(r)
|
|
591
|
-
}, t(e.messages.remove), 9, jl)
|
|
592
|
-
]))), 128)),
|
|
593
|
-
a("button", {
|
|
594
|
-
type: "button",
|
|
595
|
-
disabled: e.readonly || (l(C).aggregates?.length ?? 0) >= 32,
|
|
596
|
-
onClick: u[16] || (u[16] = //@ts-ignore
|
|
597
|
-
(...i) => l(w).addTreeAggregate && l(w).addTreeAggregate(...i))
|
|
598
|
-
}, "+ " + t(e.messages.addAggregate), 9, Jl)
|
|
599
|
-
], 64)) : D("", !0),
|
|
600
|
-
a("details", null, [
|
|
601
|
-
a("summary", null, t(e.messages.advanced), 1),
|
|
602
|
-
a("div", Hl, [
|
|
603
|
-
a("label", null, [
|
|
604
|
-
g(t(e.messages.treeRows), 1),
|
|
605
|
-
k(a("input", {
|
|
606
|
-
"onUpdate:modelValue": u[17] || (u[17] = (i) => l(C).maxRows = i),
|
|
607
|
-
"aria-label": e.messages.treeRows,
|
|
608
|
-
type: "number",
|
|
609
|
-
min: "1",
|
|
610
|
-
max: "1000000",
|
|
611
|
-
disabled: e.readonly
|
|
612
|
-
}, null, 8, zl), [
|
|
613
|
-
[
|
|
614
|
-
q,
|
|
615
|
-
l(C).maxRows,
|
|
616
|
-
void 0,
|
|
617
|
-
{ number: !0 }
|
|
618
|
-
]
|
|
619
|
-
])
|
|
620
|
-
]),
|
|
621
|
-
a("label", null, [
|
|
622
|
-
g(t(e.messages.treeDepth), 1),
|
|
623
|
-
k(a("input", {
|
|
624
|
-
"onUpdate:modelValue": u[18] || (u[18] = (i) => l(C).maxDepth = i),
|
|
625
|
-
"aria-label": e.messages.treeDepth,
|
|
626
|
-
type: "number",
|
|
627
|
-
min: "1",
|
|
628
|
-
max: "256",
|
|
629
|
-
disabled: e.readonly
|
|
630
|
-
}, null, 8, ql), [
|
|
631
|
-
[
|
|
632
|
-
q,
|
|
633
|
-
l(C).maxDepth,
|
|
634
|
-
void 0,
|
|
635
|
-
{ number: !0 }
|
|
636
|
-
]
|
|
637
|
-
])
|
|
638
|
-
])
|
|
639
|
-
])
|
|
640
|
-
]),
|
|
641
|
-
a("p", Pl, t(e.messages.treeReadonly), 1)
|
|
642
|
-
], 64)) : l(v) ? (n(), o($, { key: 2 }, [
|
|
643
|
-
a("p", Zl, t(e.messages.matrixHint), 1),
|
|
644
|
-
(n(), o($, null, x(["rowFields", "columnFields"], (i) => a("fieldset", {
|
|
645
|
-
key: i,
|
|
646
|
-
class: "mr-data-layout__choices"
|
|
647
|
-
}, [
|
|
648
|
-
a("legend", null, t(e.messages[i]), 1),
|
|
649
|
-
(n(!0), o($, null, x(l(V), (r) => (n(), o("label", {
|
|
650
|
-
key: r.field
|
|
651
|
-
}, [
|
|
652
|
-
a("input", {
|
|
653
|
-
type: "checkbox",
|
|
654
|
-
checked: l(h)[i].includes(r.field),
|
|
655
|
-
disabled: e.readonly,
|
|
656
|
-
onChange: (b) => l(w).toggleDimension(
|
|
657
|
-
i,
|
|
658
|
-
r.field,
|
|
659
|
-
b.target.checked
|
|
660
|
-
)
|
|
661
|
-
}, null, 40, Ql),
|
|
662
|
-
g(t(r.label), 1)
|
|
663
|
-
]))), 128))
|
|
664
|
-
])), 64)),
|
|
665
|
-
(n(!0), o($, null, x(l(h).measures, (i, r) => (n(), o("div", {
|
|
666
|
-
key: r,
|
|
667
|
-
class: "mr-data-layout__measure"
|
|
668
|
-
}, [
|
|
669
|
-
a("div", Xl, [
|
|
670
|
-
a("label", null, [
|
|
671
|
-
g(t(e.messages.measure), 1),
|
|
672
|
-
k(a("select", {
|
|
673
|
-
"aria-label": e.messages.measure,
|
|
674
|
-
"onUpdate:modelValue": (b) => i.field = b,
|
|
675
|
-
disabled: e.readonly
|
|
676
|
-
}, [
|
|
677
|
-
(n(!0), o($, null, x(l(V), (b) => (n(), o("option", {
|
|
678
|
-
key: b.field,
|
|
679
|
-
value: b.field
|
|
680
|
-
}, t(b.label), 9, pl))), 128))
|
|
681
|
-
], 8, Yl), [
|
|
682
|
-
[E, i.field]
|
|
683
|
-
])
|
|
684
|
-
]),
|
|
685
|
-
a("label", null, [
|
|
686
|
-
g(t(e.messages.aggregate), 1),
|
|
687
|
-
k(a("select", {
|
|
688
|
-
"aria-label": e.messages.aggregate,
|
|
689
|
-
"onUpdate:modelValue": (b) => i.op = b,
|
|
690
|
-
disabled: e.readonly
|
|
691
|
-
}, [
|
|
692
|
-
(n(!0), o($, null, x(l(J).aggregates, (b) => (n(), o("option", {
|
|
693
|
-
key: b,
|
|
694
|
-
value: b
|
|
695
|
-
}, t(e.messages[b]), 9, ea))), 128))
|
|
696
|
-
], 8, _l), [
|
|
697
|
-
[E, i.op]
|
|
698
|
-
])
|
|
699
|
-
])
|
|
700
|
-
]),
|
|
701
|
-
a("label", null, [
|
|
702
|
-
g(t(e.messages.measureLabel), 1),
|
|
703
|
-
k(a("input", {
|
|
704
|
-
"aria-label": e.messages.measureLabel,
|
|
705
|
-
"onUpdate:modelValue": (b) => i.label = b,
|
|
706
|
-
disabled: e.readonly,
|
|
707
|
-
placeholder: i.field
|
|
708
|
-
}, null, 8, la), [
|
|
709
|
-
[q, i.label]
|
|
710
|
-
])
|
|
711
|
-
]),
|
|
712
|
-
i.op === "weightedAvg" ? (n(), o("label", aa, [
|
|
713
|
-
g(t(e.messages.weight), 1),
|
|
714
|
-
k(a("select", {
|
|
715
|
-
"aria-label": e.messages.weight,
|
|
716
|
-
"onUpdate:modelValue": (b) => i.weightField = b,
|
|
717
|
-
disabled: e.readonly
|
|
718
|
-
}, [
|
|
719
|
-
(n(!0), o($, null, x(l(V), (b) => (n(), o("option", {
|
|
720
|
-
key: b.field,
|
|
721
|
-
value: b.field
|
|
722
|
-
}, t(b.label), 9, sa))), 128))
|
|
723
|
-
], 8, ta), [
|
|
724
|
-
[E, i.weightField]
|
|
725
|
-
])
|
|
726
|
-
])) : D("", !0),
|
|
727
|
-
a("div", ia, [
|
|
728
|
-
a("label", null, [
|
|
729
|
-
g(t(e.messages.numeric), 1),
|
|
730
|
-
k(a("select", {
|
|
731
|
-
"aria-label": e.messages.numeric,
|
|
732
|
-
"onUpdate:modelValue": (b) => i.numeric = b,
|
|
733
|
-
disabled: e.readonly
|
|
734
|
-
}, [
|
|
735
|
-
a("option", na, t(e.messages.number), 1),
|
|
736
|
-
a("option", oa, t(e.messages.decimal), 1)
|
|
737
|
-
], 8, da), [
|
|
738
|
-
[E, i.numeric]
|
|
739
|
-
])
|
|
740
|
-
]),
|
|
741
|
-
a("label", null, [
|
|
742
|
-
g(t(e.messages.digits), 1),
|
|
743
|
-
k(a("input", {
|
|
744
|
-
"aria-label": e.messages.digits,
|
|
745
|
-
"onUpdate:modelValue": (b) => i.digits = b,
|
|
746
|
-
type: "number",
|
|
747
|
-
min: "0",
|
|
748
|
-
max: "100",
|
|
749
|
-
disabled: e.readonly
|
|
750
|
-
}, null, 8, ua), [
|
|
751
|
-
[
|
|
752
|
-
q,
|
|
753
|
-
i.digits,
|
|
754
|
-
void 0,
|
|
755
|
-
{ number: !0 }
|
|
756
|
-
]
|
|
757
|
-
])
|
|
758
|
-
])
|
|
759
|
-
]),
|
|
760
|
-
a("button", {
|
|
761
|
-
type: "button",
|
|
762
|
-
disabled: e.readonly,
|
|
763
|
-
onClick: (b) => l(w).removeMeasure(r)
|
|
764
|
-
}, t(e.messages.remove), 9, ra)
|
|
765
|
-
]))), 128)),
|
|
766
|
-
a("button", {
|
|
767
|
-
type: "button",
|
|
768
|
-
disabled: e.readonly || l(h).measures.length >= 32,
|
|
769
|
-
onClick: u[19] || (u[19] = //@ts-ignore
|
|
770
|
-
(...i) => l(w).addMeasure && l(w).addMeasure(...i))
|
|
771
|
-
}, " + " + t(e.messages.addAggregate), 9, ma),
|
|
772
|
-
a("label", ca, [
|
|
773
|
-
k(a("input", {
|
|
774
|
-
"onUpdate:modelValue": u[20] || (u[20] = (i) => l(h).totals = i),
|
|
775
|
-
type: "checkbox",
|
|
776
|
-
disabled: e.readonly
|
|
777
|
-
}, null, 8, ba), [
|
|
778
|
-
[se, l(h).totals]
|
|
779
|
-
]),
|
|
780
|
-
g(t(e.messages.totals), 1)
|
|
781
|
-
]),
|
|
782
|
-
a("details", null, [
|
|
783
|
-
a("summary", null, t(e.messages.widthSettings), 1),
|
|
784
|
-
a("div", va, [
|
|
785
|
-
a("label", null, [
|
|
786
|
-
g(t(e.messages.dimensionWidth), 1),
|
|
787
|
-
k(a("input", {
|
|
788
|
-
"onUpdate:modelValue": u[21] || (u[21] = (i) => l(h).rowWidthMm = i),
|
|
789
|
-
type: "number",
|
|
790
|
-
min: "1",
|
|
791
|
-
disabled: e.readonly,
|
|
792
|
-
placeholder: "40"
|
|
793
|
-
}, null, 8, ga), [
|
|
794
|
-
[
|
|
795
|
-
q,
|
|
796
|
-
l(h).rowWidthMm,
|
|
797
|
-
void 0,
|
|
798
|
-
{ number: !0 }
|
|
799
|
-
]
|
|
800
|
-
])
|
|
801
|
-
]),
|
|
802
|
-
a("label", null, [
|
|
803
|
-
g(t(e.messages.measureWidth), 1),
|
|
804
|
-
k(a("input", {
|
|
805
|
-
"onUpdate:modelValue": u[22] || (u[22] = (i) => l(h).columnWidthMm = i),
|
|
806
|
-
type: "number",
|
|
807
|
-
min: "1",
|
|
808
|
-
disabled: e.readonly,
|
|
809
|
-
placeholder: "28"
|
|
810
|
-
}, null, 8, fa), [
|
|
811
|
-
[
|
|
812
|
-
q,
|
|
813
|
-
l(h).columnWidthMm,
|
|
814
|
-
void 0,
|
|
815
|
-
{ number: !0 }
|
|
816
|
-
]
|
|
817
|
-
])
|
|
818
|
-
])
|
|
819
|
-
])
|
|
820
|
-
])
|
|
821
|
-
], 64)) : D("", !0),
|
|
822
|
-
a("div", ya, [
|
|
823
|
-
l(v) && e.mode === "matrix" ? (n(), o("button", {
|
|
824
|
-
key: 0,
|
|
825
|
-
type: "button",
|
|
826
|
-
disabled: e.readonly,
|
|
827
|
-
onClick: u[23] || (u[23] = //@ts-ignore
|
|
828
|
-
(...i) => l(w).checkMatrix && l(w).checkMatrix(...i))
|
|
829
|
-
}, t(e.messages.check), 9, ha)) : D("", !0),
|
|
830
|
-
l(v) && e.mode === "tree" ? (n(), o("button", {
|
|
831
|
-
key: 1,
|
|
832
|
-
type: "button",
|
|
833
|
-
disabled: e.readonly,
|
|
834
|
-
onClick: u[24] || (u[24] = //@ts-ignore
|
|
835
|
-
(...i) => l(w).checkTree && l(w).checkTree(...i))
|
|
836
|
-
}, t(e.messages.check), 9, ka)) : D("", !0),
|
|
837
|
-
a("button", {
|
|
838
|
-
type: "button",
|
|
839
|
-
class: "mr-data-layout__primary",
|
|
840
|
-
disabled: e.readonly,
|
|
841
|
-
onClick: u[25] || (u[25] = //@ts-ignore
|
|
842
|
-
(...i) => l(w).apply && l(w).apply(...i))
|
|
843
|
-
}, t(e.messages.apply), 9, $a)
|
|
844
|
-
]),
|
|
845
|
-
l(O) ? (n(), o("div", Va, [
|
|
846
|
-
a("p", null, t(e.messages.sample), 1),
|
|
847
|
-
a("table", null, [
|
|
848
|
-
a("thead", null, [
|
|
849
|
-
a("tr", null, [
|
|
850
|
-
(n(!0), o($, null, x(l(O).columns, (i, r) => (n(), o("th", { key: r }, t(i), 1))), 128))
|
|
851
|
-
])
|
|
852
|
-
]),
|
|
853
|
-
a("tbody", null, [
|
|
854
|
-
(n(!0), o($, null, x(l(O).rows, (i, r) => (n(), o("tr", { key: r }, [
|
|
855
|
-
(n(!0), o($, null, x(i, (b, H) => (n(), o("td", { key: H }, t(b ?? "—"), 1))), 128))
|
|
856
|
-
]))), 128))
|
|
857
|
-
])
|
|
858
|
-
])
|
|
859
|
-
])) : D("", !0),
|
|
860
|
-
l(S) ? (n(), o("p", wa, t(l(S)), 1)) : D("", !0)
|
|
861
|
-
]));
|
|
862
|
-
}
|
|
863
|
-
}), Ua = /* @__PURE__ */ ce(Ca, [["__scopeId", "data-v-e089d1c9"]]), Fa = { class: "mr-expression__row" }, xa = ["value", "disabled", "aria-label"], Ma = { value: "field" }, Sa = { value: "constant" }, Da = {
|
|
864
|
-
key: 0,
|
|
865
|
-
value: "operation"
|
|
866
|
-
}, Ra = { value: "aggregate" }, Ea = ["value", "disabled", "aria-label"], La = ["value"], Ta = ["value", "disabled", "aria-label"], Ka = ["value"], Na = ["value", "disabled", "aria-label"], Aa = ["value"], Ba = ["value", "disabled", "aria-label"], Ga = { value: "text" }, Ia = { value: "number" }, Oa = { value: "boolean" }, Wa = { value: "null" }, ja = ["value", "disabled", "aria-label"], Ja = {
|
|
867
|
-
key: 0,
|
|
868
|
-
value: ""
|
|
869
|
-
}, Ha = ["value"], za = ["value", "disabled", "aria-label"], qa = {
|
|
870
|
-
value: "",
|
|
871
|
-
disabled: ""
|
|
872
|
-
}, Pa = ["value"], Za = ["value", "disabled", "aria-label"], Qa = { value: "true" }, Xa = { value: "false" }, Ya = ["type", "value", "disabled", "aria-label"], pa = ["disabled", "aria-label", "onClick"], _a = ["disabled"], et = /* @__PURE__ */ re({
|
|
873
|
-
__name: "ReportExpressionEditor",
|
|
874
|
-
props: {
|
|
875
|
-
modelValue: {},
|
|
876
|
-
fields: {},
|
|
877
|
-
messages: {},
|
|
878
|
-
readonly: { type: Boolean },
|
|
879
|
-
depth: {}
|
|
880
|
-
},
|
|
881
|
-
emits: ["update:modelValue"],
|
|
882
|
-
setup(e, { emit: B }) {
|
|
883
|
-
const M = e, W = B, w = me(), v = P(
|
|
884
|
-
() => "aggregate" in M.modelValue ? "aggregate" : "field" in M.modelValue ? "field" : "value" in M.modelValue ? "constant" : "operation"
|
|
885
|
-
), s = G("text");
|
|
886
|
-
le(
|
|
887
|
-
() => M.modelValue,
|
|
888
|
-
(F) => {
|
|
889
|
-
"value" in F && (s.value = F.value === null ? "null" : typeof F.value == "string" ? "text" : typeof F.value);
|
|
890
|
-
},
|
|
891
|
-
{ immediate: !0 }
|
|
892
|
-
);
|
|
893
|
-
function h(F) {
|
|
894
|
-
M.readonly || W("update:modelValue", F);
|
|
895
|
-
}
|
|
896
|
-
function C(F) {
|
|
897
|
-
h(F === "aggregate" ? { aggregate: "sum", field: M.fields[0]?.field ?? "" } : F === "field" ? { field: M.fields[0]?.field ?? "" } : F === "constant" ? { value: "" } : {
|
|
898
|
-
op: "add",
|
|
899
|
-
args: [{ field: M.fields[0]?.field ?? "" }, { value: 0 }]
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
function U(F) {
|
|
903
|
-
const u = F, i = "args" in M.modelValue ? M.modelValue.args : [{ value: 0 }, { value: 0 }];
|
|
904
|
-
h({
|
|
905
|
-
op: u,
|
|
906
|
-
args: u === "divide" || u === "subtract" ? i.slice(0, 2) : i
|
|
907
|
-
});
|
|
908
|
-
}
|
|
909
|
-
function V(F, u) {
|
|
910
|
-
"args" in M.modelValue && h({
|
|
911
|
-
...M.modelValue,
|
|
912
|
-
args: M.modelValue.args.map(
|
|
913
|
-
(i, r) => r === F ? u : i
|
|
914
|
-
)
|
|
915
|
-
});
|
|
916
|
-
}
|
|
917
|
-
function T(F) {
|
|
918
|
-
if (!("args" in M.modelValue)) return;
|
|
919
|
-
const u = F === void 0 ? [...M.modelValue.args, { value: 0 }] : M.modelValue.args.filter((i, r) => r !== F);
|
|
920
|
-
h({ ...M.modelValue, args: u });
|
|
921
|
-
}
|
|
922
|
-
function S(F) {
|
|
923
|
-
s.value = F, h({
|
|
924
|
-
value: F === "null" ? null : F === "boolean" ? !1 : F === "number" ? 0 : ""
|
|
925
|
-
});
|
|
926
|
-
}
|
|
927
|
-
function O(F) {
|
|
928
|
-
s.value === "number" ? F.trim() && Number.isFinite(Number(F)) && h({ value: Number(F) }) : h({ value: F });
|
|
929
|
-
}
|
|
930
|
-
function J(F, u) {
|
|
931
|
-
if (!("aggregate" in M.modelValue)) return;
|
|
932
|
-
const i = { ...M.modelValue, [F]: u };
|
|
933
|
-
F === "aggregate" && (i.aggregate = u), F === "field" && !u && delete i.field, h(i);
|
|
934
|
-
}
|
|
935
|
-
return (F, u) => {
|
|
936
|
-
const i = Ue("ReportExpressionEditor", !0);
|
|
937
|
-
return n(), o("div", {
|
|
938
|
-
class: ve(["mr-expression", { "mr-expression--nested": (e.depth ?? 0) > 0 }])
|
|
939
|
-
}, [
|
|
940
|
-
a("div", Fa, [
|
|
941
|
-
a("select", {
|
|
942
|
-
value: v.value,
|
|
943
|
-
disabled: e.readonly,
|
|
944
|
-
"aria-label": e.messages.argument,
|
|
945
|
-
onChange: u[0] || (u[0] = (r) => C(r.target.value))
|
|
946
|
-
}, [
|
|
947
|
-
a("option", Ma, t(e.messages.field), 1),
|
|
948
|
-
a("option", Sa, t(e.messages.constant), 1),
|
|
949
|
-
(e.depth ?? 0) < 12 ? (n(), o("option", Da, t(e.messages.operation), 1)) : D("", !0),
|
|
950
|
-
a("option", Ra, t(e.messages.aggregate), 1)
|
|
951
|
-
], 40, xa),
|
|
952
|
-
"field" in e.modelValue && !("aggregate" in e.modelValue) ? (n(), o("select", {
|
|
953
|
-
key: 0,
|
|
954
|
-
value: e.modelValue.field,
|
|
955
|
-
disabled: e.readonly,
|
|
956
|
-
"aria-label": e.messages.field,
|
|
957
|
-
onChange: u[1] || (u[1] = (r) => h({ field: r.target.value }))
|
|
958
|
-
}, [
|
|
959
|
-
(n(!0), o($, null, x(e.fields, (r) => (n(), o("option", {
|
|
960
|
-
key: r.field,
|
|
961
|
-
value: r.field
|
|
962
|
-
}, t(r.label), 9, La))), 128))
|
|
963
|
-
], 40, Ea)) : "op" in e.modelValue ? (n(), o("select", {
|
|
964
|
-
key: 1,
|
|
965
|
-
value: e.modelValue.op,
|
|
966
|
-
disabled: e.readonly,
|
|
967
|
-
"aria-label": e.messages.operation,
|
|
968
|
-
onChange: u[2] || (u[2] = (r) => U(r.target.value))
|
|
969
|
-
}, [
|
|
970
|
-
(n(!0), o($, null, x(l(w).operations, (r) => (n(), o("option", {
|
|
971
|
-
key: r,
|
|
972
|
-
value: r
|
|
973
|
-
}, t(e.messages[r]), 9, Ka))), 128))
|
|
974
|
-
], 40, Ta)) : "aggregate" in e.modelValue ? (n(), o("select", {
|
|
975
|
-
key: 2,
|
|
976
|
-
value: e.modelValue.aggregate,
|
|
977
|
-
disabled: e.readonly,
|
|
978
|
-
"aria-label": e.messages.aggregate,
|
|
979
|
-
onChange: u[3] || (u[3] = (r) => J("aggregate", r.target.value))
|
|
980
|
-
}, [
|
|
981
|
-
(n(!0), o($, null, x(l(w).aggregates, (r) => (n(), o("option", {
|
|
982
|
-
key: r,
|
|
983
|
-
value: r
|
|
984
|
-
}, t(e.messages[r]), 9, Aa))), 128))
|
|
985
|
-
], 40, Na)) : (n(), o("select", {
|
|
986
|
-
key: 3,
|
|
987
|
-
value: s.value,
|
|
988
|
-
disabled: e.readonly,
|
|
989
|
-
"aria-label": e.messages.resultType,
|
|
990
|
-
onChange: u[4] || (u[4] = (r) => S(r.target.value))
|
|
991
|
-
}, [
|
|
992
|
-
a("option", Ga, t(e.messages.text), 1),
|
|
993
|
-
a("option", Ia, t(e.messages.number), 1),
|
|
994
|
-
a("option", Oa, t(e.messages.boolean), 1),
|
|
995
|
-
a("option", Wa, t(e.messages.null), 1)
|
|
996
|
-
], 40, Ba))
|
|
997
|
-
]),
|
|
998
|
-
"aggregate" in e.modelValue ? (n(), o($, { key: 0 }, [
|
|
999
|
-
a("select", {
|
|
1000
|
-
value: e.modelValue.field ?? "",
|
|
1001
|
-
disabled: e.readonly,
|
|
1002
|
-
"aria-label": e.messages.measure,
|
|
1003
|
-
onChange: u[5] || (u[5] = (r) => J("field", r.target.value))
|
|
1004
|
-
}, [
|
|
1005
|
-
e.modelValue.aggregate === "count" ? (n(), o("option", Ja, t(e.messages.allRows), 1)) : D("", !0),
|
|
1006
|
-
(n(!0), o($, null, x(e.fields, (r) => (n(), o("option", {
|
|
1007
|
-
key: r.field,
|
|
1008
|
-
value: r.field
|
|
1009
|
-
}, t(r.label), 9, Ha))), 128))
|
|
1010
|
-
], 40, ja),
|
|
1011
|
-
e.modelValue.aggregate === "weightedAvg" ? (n(), o("select", {
|
|
1012
|
-
key: 0,
|
|
1013
|
-
value: e.modelValue.weightField ?? "",
|
|
1014
|
-
disabled: e.readonly,
|
|
1015
|
-
"aria-label": e.messages.weight,
|
|
1016
|
-
onChange: u[6] || (u[6] = (r) => J(
|
|
1017
|
-
"weightField",
|
|
1018
|
-
r.target.value
|
|
1019
|
-
))
|
|
1020
|
-
}, [
|
|
1021
|
-
a("option", qa, t(e.messages.weight), 1),
|
|
1022
|
-
(n(!0), o($, null, x(e.fields, (r) => (n(), o("option", {
|
|
1023
|
-
key: r.field,
|
|
1024
|
-
value: r.field
|
|
1025
|
-
}, t(r.label), 9, Pa))), 128))
|
|
1026
|
-
], 40, za)) : D("", !0)
|
|
1027
|
-
], 64)) : "value" in e.modelValue ? (n(), o($, { key: 1 }, [
|
|
1028
|
-
s.value === "boolean" ? (n(), o("select", {
|
|
1029
|
-
key: 0,
|
|
1030
|
-
value: String(e.modelValue.value),
|
|
1031
|
-
disabled: e.readonly,
|
|
1032
|
-
"aria-label": e.messages.constant,
|
|
1033
|
-
onChange: u[7] || (u[7] = (r) => h({
|
|
1034
|
-
value: r.target.value === "true"
|
|
1035
|
-
}))
|
|
1036
|
-
}, [
|
|
1037
|
-
a("option", Qa, t(e.messages.true), 1),
|
|
1038
|
-
a("option", Xa, t(e.messages.false), 1)
|
|
1039
|
-
], 40, Za)) : s.value !== "null" ? (n(), o("input", {
|
|
1040
|
-
key: 1,
|
|
1041
|
-
type: s.value === "number" ? "number" : "text",
|
|
1042
|
-
value: e.modelValue.value ?? "",
|
|
1043
|
-
disabled: e.readonly,
|
|
1044
|
-
"aria-label": e.messages.constant,
|
|
1045
|
-
onInput: u[8] || (u[8] = (r) => O(r.target.value))
|
|
1046
|
-
}, null, 40, Ya)) : D("", !0)
|
|
1047
|
-
], 64)) : "args" in e.modelValue ? (n(), o($, { key: 2 }, [
|
|
1048
|
-
(n(!0), o($, null, x(e.modelValue.args, (r, b) => (n(), o("div", {
|
|
1049
|
-
key: b,
|
|
1050
|
-
class: "mr-expression__argument"
|
|
1051
|
-
}, [
|
|
1052
|
-
ge(i, {
|
|
1053
|
-
"model-value": r,
|
|
1054
|
-
fields: e.fields,
|
|
1055
|
-
messages: e.messages,
|
|
1056
|
-
readonly: e.readonly,
|
|
1057
|
-
depth: (e.depth ?? 0) + 1,
|
|
1058
|
-
"onUpdate:modelValue": (H) => V(b, H)
|
|
1059
|
-
}, null, 8, ["model-value", "fields", "messages", "readonly", "depth", "onUpdate:modelValue"]),
|
|
1060
|
-
e.modelValue.args.length > 2 ? (n(), o("button", {
|
|
1061
|
-
key: 0,
|
|
1062
|
-
type: "button",
|
|
1063
|
-
disabled: e.readonly,
|
|
1064
|
-
"aria-label": `${e.messages.remove} ${e.messages.argument} ${b + 1}`,
|
|
1065
|
-
onClick: (H) => T(b)
|
|
1066
|
-
}, " × ", 8, pa)) : D("", !0)
|
|
1067
|
-
]))), 128)),
|
|
1068
|
-
!["subtract", "divide"].includes(e.modelValue.op) && e.modelValue.args.length < 16 ? (n(), o("button", {
|
|
1069
|
-
key: 0,
|
|
1070
|
-
type: "button",
|
|
1071
|
-
disabled: e.readonly,
|
|
1072
|
-
onClick: u[9] || (u[9] = (r) => T())
|
|
1073
|
-
}, " + " + t(e.messages.addArgument), 9, _a)) : D("", !0)
|
|
1074
|
-
], 64)) : D("", !0)
|
|
1075
|
-
], 2);
|
|
1076
|
-
};
|
|
1077
|
-
}
|
|
1078
|
-
}), lt = /* @__PURE__ */ ce(et, [["__scopeId", "data-v-84e5c0e5"]]), z = (e) => JSON.parse(JSON.stringify(e));
|
|
1079
|
-
function at(e, B) {
|
|
1080
|
-
const M = P(() => ({
|
|
1081
|
-
...Ee,
|
|
1082
|
-
...e.messages
|
|
1083
|
-
})), W = G("computations"), w = G(""), v = G(""), s = G({
|
|
1084
|
-
field: "",
|
|
1085
|
-
expression: { field: "" },
|
|
1086
|
-
scope: "row"
|
|
1087
|
-
}), h = G([]), C = G(0), U = G(""), V = G(-1), T = G("style"), S = G({ field: "", op: ">", value: 0 }), O = G({
|
|
1088
|
-
color: "#b91c1c",
|
|
1089
|
-
backgroundColor: "#fff1f2",
|
|
1090
|
-
bold: !1
|
|
1091
|
-
}), J = G([]), F = oe(() => s.value), u = oe(() => h.value), i = oe(() => ({ when: S.value, style: O.value })), r = G(/* @__PURE__ */ new Map()), b = G(/* @__PURE__ */ new Map());
|
|
1092
|
-
let H = "", Q = !1;
|
|
1093
|
-
const ae = P(() => F.pending.value || u.pending.value || i.pending.value || r.value.size > 0 || b.value.size > 0);
|
|
1094
|
-
let X;
|
|
1095
|
-
const Y = P(() => {
|
|
1096
|
-
const f = /* @__PURE__ */ new Map();
|
|
1097
|
-
for (const y of e.datasetSchema?.fields ?? [])
|
|
1098
|
-
f.set(y.field, y.label ?? y.field);
|
|
1099
|
-
for (const y of e.list.columns)
|
|
1100
|
-
f.has(y.field) || f.set(y.field, y.header || y.field);
|
|
1101
|
-
for (const y of Object.keys(
|
|
1102
|
-
e.datasets?.[e.list.dataset]?.[0] ?? {}
|
|
1103
|
-
))
|
|
1104
|
-
f.has(y) || f.set(y, y);
|
|
1105
|
-
return [...f].map(([y, L]) => ({ field: y, label: L }));
|
|
1106
|
-
}), _ = P(() => h.value[C.value]), m = P(
|
|
1107
|
-
() => e.list.columns.find((f) => f.field === U.value)
|
|
1108
|
-
), N = P(() => Me(A()));
|
|
1109
|
-
function R() {
|
|
1110
|
-
if (X === JSON.stringify(e.list)) {
|
|
1111
|
-
X = void 0;
|
|
1112
|
-
return;
|
|
1113
|
-
}
|
|
1114
|
-
Q = !0, r.value = /* @__PURE__ */ new Map(), b.value = /* @__PURE__ */ new Map(), h.value = z(
|
|
1115
|
-
e.list.groups ?? (e.list.groupBy ? [e.list.groupBy] : [])
|
|
1116
|
-
);
|
|
1117
|
-
for (const f of h.value) for (const y of f.aggregates ?? []) y.numeric ??= "number";
|
|
1118
|
-
e.list.columns.some((f) => f.field === U.value) || (U.value = e.list.columns[0]?.field ?? ""), w.value = "", J.value = [], I(v.value), be(-1), u.accept(), Q = !1;
|
|
1119
|
-
}
|
|
1120
|
-
le(() => e.list, R, { immediate: !0 }), le(s, () => {
|
|
1121
|
-
J.value = [];
|
|
1122
|
-
}, { deep: !0 }), le(() => e.datasets, () => {
|
|
1123
|
-
J.value = [];
|
|
1124
|
-
}, { deep: !0 });
|
|
1125
|
-
function I(f) {
|
|
1126
|
-
!Q && F.pending.value && (r.value = new Map(r.value).set(v.value, z(s.value))), v.value = f, s.value = z(
|
|
1127
|
-
e.list.computed?.find((L) => L.field === f) ?? {
|
|
1128
|
-
field: "",
|
|
1129
|
-
expression: { field: Y.value[0]?.field ?? "" },
|
|
1130
|
-
scope: "row"
|
|
1131
|
-
}
|
|
1132
|
-
), s.value.numeric ??= "number", J.value = [], w.value = "", F.accept();
|
|
1133
|
-
const y = r.value.get(f);
|
|
1134
|
-
if (y) {
|
|
1135
|
-
s.value = z(y);
|
|
1136
|
-
const L = new Map(r.value);
|
|
1137
|
-
L.delete(f), r.value = L;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
function A() {
|
|
1141
|
-
return [
|
|
1142
|
-
...(e.list.computed ?? []).filter((y) => y.field !== v.value),
|
|
1143
|
-
z(s.value)
|
|
1144
|
-
];
|
|
1145
|
-
}
|
|
1146
|
-
function p(f) {
|
|
1147
|
-
if (e.readonly) return !1;
|
|
1148
|
-
const y = fe({
|
|
1149
|
-
pages: [
|
|
1150
|
-
{
|
|
1151
|
-
widthMm: Math.max(1, f.leftMm + f.widthMm),
|
|
1152
|
-
heightMm: 297,
|
|
1153
|
-
components: [f]
|
|
1154
|
-
}
|
|
1155
|
-
]
|
|
1156
|
-
});
|
|
1157
|
-
return y.ok ? (w.value = "", X = JSON.stringify(f), B(f), !0) : (w.value = y.errors.map((L) => L.message).slice(0, 3).join(";"), !1);
|
|
1158
|
-
}
|
|
1159
|
-
function ue() {
|
|
1160
|
-
if (!s.value.field.trim()) {
|
|
1161
|
-
w.value = M.value.missingTarget;
|
|
1162
|
-
return;
|
|
1163
|
-
}
|
|
1164
|
-
const f = z(e.list);
|
|
1165
|
-
if (f.computed = A(), f.columns.some((y) => y.field === s.value.field) || f.columns.push({
|
|
1166
|
-
field: s.value.field,
|
|
1167
|
-
header: s.value.field,
|
|
1168
|
-
widthMm: 30,
|
|
1169
|
-
semanticRole: "measure",
|
|
1170
|
-
align: "right",
|
|
1171
|
-
editable: !1,
|
|
1172
|
-
format: {
|
|
1173
|
-
kind: "number",
|
|
1174
|
-
...s.value.digits === void 0 ? {} : { digits: s.value.digits }
|
|
1175
|
-
}
|
|
1176
|
-
}), p(f)) {
|
|
1177
|
-
const y = new Map(r.value);
|
|
1178
|
-
y.delete(v.value), y.delete(s.value.field), r.value = y, v.value = s.value.field, F.accept();
|
|
1179
|
-
}
|
|
1180
|
-
}
|
|
1181
|
-
function de() {
|
|
1182
|
-
if (!v.value) return;
|
|
1183
|
-
const f = z(e.list);
|
|
1184
|
-
if (f.computed = (f.computed ?? []).filter(
|
|
1185
|
-
(y) => y.field !== v.value
|
|
1186
|
-
), p(f)) {
|
|
1187
|
-
const y = new Map(r.value);
|
|
1188
|
-
y.delete(v.value), r.value = y, F.accept(), I("");
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
function ne() {
|
|
1192
|
-
J.value = [], w.value = "";
|
|
1193
|
-
const f = e.datasets?.[e.list.dataset];
|
|
1194
|
-
if (!f?.length) {
|
|
1195
|
-
w.value = M.value.noData;
|
|
1196
|
-
return;
|
|
1197
|
-
}
|
|
1198
|
-
try {
|
|
1199
|
-
const y = Se(f.slice(0, 1e3), {
|
|
1200
|
-
fields: A(),
|
|
1201
|
-
maxRows: 1e3,
|
|
1202
|
-
maxCells: 2e6
|
|
1203
|
-
});
|
|
1204
|
-
J.value = y.rows.slice(0, 5).map((L, Z) => ({
|
|
1205
|
-
row: Z + 1,
|
|
1206
|
-
value: L[s.value.field]
|
|
1207
|
-
}));
|
|
1208
|
-
} catch (y) {
|
|
1209
|
-
w.value = y instanceof Error ? y.message : String(y);
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
function c(f) {
|
|
1213
|
-
s.value.expression = f;
|
|
1214
|
-
}
|
|
1215
|
-
function d(f, y) {
|
|
1216
|
-
s.value.groupBy = y ? [...s.value.groupBy ?? [], f] : (s.value.groupBy ?? []).filter((L) => L !== f);
|
|
1217
|
-
}
|
|
1218
|
-
function j() {
|
|
1219
|
-
h.value.push({
|
|
1220
|
-
field: Y.value[0]?.field ?? "",
|
|
1221
|
-
headerTemplate: "{value}",
|
|
1222
|
-
subtotalLabel: M.value.subtotalLabel,
|
|
1223
|
-
aggregates: [],
|
|
1224
|
-
keepWithNext: !0
|
|
1225
|
-
}), C.value = h.value.length - 1;
|
|
1226
|
-
}
|
|
1227
|
-
function K(f) {
|
|
1228
|
-
const y = C.value, L = y + f;
|
|
1229
|
-
L < 0 || L >= h.value.length || ([h.value[y], h.value[L]] = [
|
|
1230
|
-
h.value[L],
|
|
1231
|
-
h.value[y]
|
|
1232
|
-
], C.value = L);
|
|
1233
|
-
}
|
|
1234
|
-
function ke() {
|
|
1235
|
-
h.value.splice(C.value, 1), C.value = Math.max(
|
|
1236
|
-
0,
|
|
1237
|
-
Math.min(C.value, h.value.length - 1)
|
|
1238
|
-
);
|
|
1239
|
-
}
|
|
1240
|
-
function $e() {
|
|
1241
|
-
_.value && (_.value.aggregates ??= []).push({
|
|
1242
|
-
field: Y.value[0]?.field ?? "",
|
|
1243
|
-
op: "sum",
|
|
1244
|
-
numeric: "number"
|
|
1245
|
-
});
|
|
1246
|
-
}
|
|
1247
|
-
function Ve() {
|
|
1248
|
-
const f = z(e.list);
|
|
1249
|
-
f.groups = z(h.value), delete f.groupBy, p(f) && u.accept();
|
|
1250
|
-
}
|
|
1251
|
-
function be(f) {
|
|
1252
|
-
!Q && i.pending.value && (b.value = new Map(b.value).set(H, { when: z(S.value), style: { ...O.value } })), H = `${U.value}|${T.value}|${f}`, V.value = f;
|
|
1253
|
-
const y = T.value === "cell" ? m.value?.visibleWhen : T.value === "rowVisibility" ? e.list.rowVisibleWhen : m.value?.rules?.[f]?.when;
|
|
1254
|
-
S.value = z(y ?? { field: U.value, op: ">", value: 0 });
|
|
1255
|
-
const L = m.value?.rules?.[f]?.style;
|
|
1256
|
-
O.value = {
|
|
1257
|
-
color: String(L?.color ?? "#b91c1c"),
|
|
1258
|
-
backgroundColor: String(L?.backgroundColor ?? "#fff1f2"),
|
|
1259
|
-
bold: L?.bold === !0
|
|
1260
|
-
}, i.accept();
|
|
1261
|
-
const Z = b.value.get(H);
|
|
1262
|
-
if (Z) {
|
|
1263
|
-
S.value = z(Z.when), O.value = { ...Z.style };
|
|
1264
|
-
const te = new Map(b.value);
|
|
1265
|
-
te.delete(H), b.value = te;
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
function we(f) {
|
|
1269
|
-
const y = e.datasetSchema?.fields.find(
|
|
1270
|
-
(te) => te.field === S.value.field
|
|
1271
|
-
), L = e.datasets?.[e.list.dataset]?.find(
|
|
1272
|
-
(te) => te[S.value.field] != null
|
|
1273
|
-
)?.[S.value.field], Z = y?.type === "number" || !y && typeof L == "number";
|
|
1274
|
-
y?.type === "decimal" ? S.value.numeric = "decimal" : Z ? S.value.numeric = "number" : delete S.value.numeric, S.value.value = Z && f.trim() && Number.isFinite(Number(f)) ? Number(f) : f;
|
|
1275
|
-
}
|
|
1276
|
-
function Ce(f = !1) {
|
|
1277
|
-
const y = z(e.list), L = y.columns.find((Z) => Z.field === U.value);
|
|
1278
|
-
if (!L) {
|
|
1279
|
-
w.value = M.value.noSelection;
|
|
1280
|
-
return;
|
|
1281
|
-
}
|
|
1282
|
-
if (T.value === "rowVisibility")
|
|
1283
|
-
f ? delete y.rowVisibleWhen : y.rowVisibleWhen = z(S.value);
|
|
1284
|
-
else if (T.value === "cell")
|
|
1285
|
-
f ? delete L.visibleWhen : L.visibleWhen = z(S.value);
|
|
1286
|
-
else if (L.rules ??= [], f && V.value >= 0)
|
|
1287
|
-
L.rules.splice(V.value, 1);
|
|
1288
|
-
else {
|
|
1289
|
-
if (f) return;
|
|
1290
|
-
V.value < 0 ? L.rules.push({
|
|
1291
|
-
when: z(S.value),
|
|
1292
|
-
style: { ...O.value }
|
|
1293
|
-
}) : L.rules[V.value] = {
|
|
1294
|
-
when: z(S.value),
|
|
1295
|
-
style: { ...O.value }
|
|
1296
|
-
};
|
|
1297
|
-
}
|
|
1298
|
-
if (p(y)) {
|
|
1299
|
-
const Z = new Map(b.value);
|
|
1300
|
-
Z.delete(H), b.value = Z, i.accept();
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
return {
|
|
1304
|
-
m: M,
|
|
1305
|
-
pendingLocalChanges: ae,
|
|
1306
|
-
draftSnapshot: () => JSON.stringify({ formula: s.value, groups: h.value, when: S.value, style: O.value, computedDrafts: [...r.value], conditionDrafts: [...b.value] }),
|
|
1307
|
-
tab: W,
|
|
1308
|
-
fields: Y,
|
|
1309
|
-
formula: s,
|
|
1310
|
-
groups: h,
|
|
1311
|
-
groupIndex: C,
|
|
1312
|
-
currentGroup: _,
|
|
1313
|
-
column: U,
|
|
1314
|
-
currentColumn: m,
|
|
1315
|
-
conditionIndex: V,
|
|
1316
|
-
effect: T,
|
|
1317
|
-
when: S,
|
|
1318
|
-
style: O,
|
|
1319
|
-
error: w,
|
|
1320
|
-
preview: J,
|
|
1321
|
-
diagnostics: N,
|
|
1322
|
-
selectedComputed: v,
|
|
1323
|
-
loadComputed: I,
|
|
1324
|
-
applyComputed: ue,
|
|
1325
|
-
removeComputed: de,
|
|
1326
|
-
check: ne,
|
|
1327
|
-
setExpression: c,
|
|
1328
|
-
toggleGroupField: d,
|
|
1329
|
-
addGroup: j,
|
|
1330
|
-
moveGroup: K,
|
|
1331
|
-
removeGroup: ke,
|
|
1332
|
-
addAggregate: $e,
|
|
1333
|
-
applyGroups: Ve,
|
|
1334
|
-
loadCondition: be,
|
|
1335
|
-
setThreshold: we,
|
|
1336
|
-
applyCondition: Ce,
|
|
1337
|
-
applyLayout: p,
|
|
1338
|
-
resetDraft: () => {
|
|
1339
|
-
X = void 0, R();
|
|
1340
|
-
}
|
|
1341
|
-
};
|
|
1342
|
-
}
|
|
1343
|
-
const tt = ["aria-label"], st = { class: "mr-rule-editor__directory" }, it = ["aria-label"], dt = ["aria-selected", "onClick"], nt = { key: 0 }, ot = { key: 1 }, ut = { class: "mr-rule-editor__catalog" }, rt = ["disabled"], mt = ["aria-label"], ct = { class: "mr-rule-editor__field-list" }, bt = ["disabled", "title", "onClick"], vt = { key: 1 }, gt = {
|
|
1344
|
-
key: 0,
|
|
1345
|
-
class: "mr-rule-editor__panel"
|
|
1346
|
-
}, ft = ["aria-label", "value", "disabled"], yt = { value: "" }, ht = ["value"], kt = ["aria-label", "disabled"], $t = { class: "mr-rule-editor__pair" }, Vt = ["aria-label", "disabled"], wt = ["value"], Ct = ["aria-label", "disabled"], Ut = { value: "number" }, Ft = { value: "decimal" }, xt = {
|
|
1347
|
-
key: 0,
|
|
1348
|
-
class: "mr-rule-editor__checks"
|
|
1349
|
-
}, Mt = ["checked", "disabled", "onChange"], St = {
|
|
1350
|
-
key: 2,
|
|
1351
|
-
class: "mr-rule-editor__hint"
|
|
1352
|
-
}, Dt = { class: "mr-rule-editor__advanced" }, Rt = ["aria-label", "disabled"], Et = ["aria-label", "disabled"], Lt = { value: "propagate" }, Tt = { value: "error" }, Kt = ["aria-label", "disabled"], Nt = { value: "error" }, At = { value: "null" }, Bt = {
|
|
1353
|
-
key: 3,
|
|
1354
|
-
class: "mr-rule-editor__hint"
|
|
1355
|
-
}, Gt = {
|
|
1356
|
-
key: 4,
|
|
1357
|
-
class: "mr-rule-editor__diagnostic"
|
|
1358
|
-
}, It = { class: "mr-rule-editor__actions" }, Ot = ["disabled"], Wt = ["disabled"], jt = ["disabled"], Jt = {
|
|
1359
|
-
key: 5,
|
|
1360
|
-
class: "mr-rule-editor__error"
|
|
1361
|
-
}, Ht = {
|
|
1362
|
-
key: 1,
|
|
1363
|
-
class: "mr-rule-editor__panel"
|
|
1364
|
-
}, zt = { class: "mr-rule-editor__pair" }, qt = ["aria-label"], Pt = ["value"], Zt = {
|
|
1365
|
-
key: 0,
|
|
1366
|
-
value: 0
|
|
1367
|
-
}, Qt = ["disabled"], Xt = ["aria-label", "disabled"], Yt = ["value"], pt = { class: "mr-rule-editor__pair" }, _t = ["aria-label", "disabled"], es = ["aria-label", "disabled"], ls = { class: "mr-rule-editor__checks" }, as = ["disabled"], ts = ["disabled"], ss = { class: "mr-rule-editor__pair" }, is = ["aria-label", "onUpdate:modelValue", "disabled"], ds = ["value"], ns = ["aria-label", "onUpdate:modelValue", "disabled"], os = ["value"], us = ["aria-label", "onUpdate:modelValue", "disabled"], rs = { value: void 0 }, ms = ["value"], cs = { key: 0 }, bs = ["aria-label", "onUpdate:modelValue", "disabled"], vs = ["value"], gs = { class: "mr-rule-editor__pair" }, fs = ["onUpdate:modelValue", "disabled", "aria-label"], ys = { value: "number" }, hs = { value: "decimal" }, ks = ["disabled", "onClick"], $s = ["disabled"], Vs = { class: "mr-rule-editor__actions" }, ws = ["disabled", "aria-label"], Cs = ["disabled", "aria-label"], Us = ["disabled"], Fs = ["disabled"], xs = {
|
|
1368
|
-
key: 2,
|
|
1369
|
-
class: "mr-rule-editor__panel"
|
|
1370
|
-
}, Ms = ["aria-label", "disabled"], Ss = ["value"], Ds = ["aria-label", "disabled"], Rs = { value: "style" }, Es = { value: "cell" }, Ls = { value: "rowVisibility" }, Ts = { key: 0 }, Ks = ["aria-label", "value", "disabled"], Ns = { value: -1 }, As = ["value"], Bs = ["aria-label", "disabled"], Gs = ["value"], Is = { class: "mr-rule-editor__pair" }, Os = ["aria-label", "disabled"], Ws = ["value"], js = ["value", "disabled"], Js = { class: "mr-rule-editor__pair" }, Hs = ["disabled"], zs = ["disabled"], qs = { class: "mr-rule-editor__check" }, Ps = ["disabled"], Zs = { class: "mr-rule-editor__actions" }, Qs = ["disabled"], Xs = ["disabled"], Ys = { class: "mr-rule-editor__explanation" }, ps = { key: 0 }, _s = { class: "mr-rule-editor__results" }, ei = { key: 0 }, li = { key: 1 }, ai = {
|
|
1371
|
-
key: 1,
|
|
1372
|
-
class: "mr-rule-editor__error",
|
|
1373
|
-
role: "alert"
|
|
1374
|
-
}, ti = /* @__PURE__ */ re({
|
|
1375
|
-
__name: "RuleEditor",
|
|
1376
|
-
props: {
|
|
1377
|
-
list: {},
|
|
1378
|
-
datasets: {},
|
|
1379
|
-
datasetSchema: {},
|
|
1380
|
-
datasetSchemas: {},
|
|
1381
|
-
readonly: { type: Boolean },
|
|
1382
|
-
messages: {}
|
|
1383
|
-
},
|
|
1384
|
-
emits: ["change", "dirty"],
|
|
1385
|
-
setup(e, { expose: B, emit: M }) {
|
|
1386
|
-
const W = e, w = M, v = at(W, (ne) => w("change", ne)), {
|
|
1387
|
-
m: s,
|
|
1388
|
-
tab: h,
|
|
1389
|
-
fields: C,
|
|
1390
|
-
formula: U,
|
|
1391
|
-
groups: V,
|
|
1392
|
-
groupIndex: T,
|
|
1393
|
-
currentGroup: S,
|
|
1394
|
-
column: O,
|
|
1395
|
-
currentColumn: J,
|
|
1396
|
-
conditionIndex: F,
|
|
1397
|
-
effect: u,
|
|
1398
|
-
when: i,
|
|
1399
|
-
style: r,
|
|
1400
|
-
error: b,
|
|
1401
|
-
preview: H,
|
|
1402
|
-
diagnostics: Q,
|
|
1403
|
-
selectedComputed: ae
|
|
1404
|
-
} = v, X = G({}), Y = G(0);
|
|
1405
|
-
function _() {
|
|
1406
|
-
v.resetDraft(), X.value = {}, Y.value++;
|
|
1407
|
-
}
|
|
1408
|
-
const m = P(() => v.pendingLocalChanges.value || Object.values(X.value).some(Boolean));
|
|
1409
|
-
le([m, v.draftSnapshot, X], () => w("dirty", m.value), { immediate: !0, deep: !0, flush: "sync" }), B({ get pendingLocalChanges() {
|
|
1410
|
-
return m.value;
|
|
1411
|
-
} });
|
|
1412
|
-
const N = Le(W, v.formula, s), { query: R, matches: I, fieldWindow: A, expression: p, sources: ue } = N, de = me();
|
|
1413
|
-
return (ne, c) => (n(), o("section", {
|
|
1414
|
-
class: "mr-rule-editor",
|
|
1415
|
-
"aria-label": l(s).settings
|
|
1416
|
-
}, [
|
|
1417
|
-
a("aside", st, [
|
|
1418
|
-
a("div", {
|
|
1419
|
-
class: "mr-rule-editor__tabs",
|
|
1420
|
-
role: "tablist",
|
|
1421
|
-
"aria-label": l(s).settings
|
|
1422
|
-
}, [
|
|
1423
|
-
(n(), o($, null, x([
|
|
1424
|
-
"computations",
|
|
1425
|
-
"groups",
|
|
1426
|
-
"conditions",
|
|
1427
|
-
"detail",
|
|
1428
|
-
"matrix",
|
|
1429
|
-
"tree"
|
|
1430
|
-
], (d) => a("button", {
|
|
1431
|
-
key: d,
|
|
1432
|
-
type: "button",
|
|
1433
|
-
role: "tab",
|
|
1434
|
-
"aria-selected": l(h) === d,
|
|
1435
|
-
class: ve({ "is-active": l(h) === d }),
|
|
1436
|
-
onClick: (j) => h.value = d
|
|
1437
|
-
}, [
|
|
1438
|
-
g(t(l(s)[d]), 1),
|
|
1439
|
-
d === "computations" && e.list.computed?.length ? (n(), o("span", nt, t(e.list.computed.length), 1)) : D("", !0),
|
|
1440
|
-
d === "groups" && l(V).length ? (n(), o("span", ot, t(l(V).length), 1)) : D("", !0)
|
|
1441
|
-
], 10, dt)), 64))
|
|
1442
|
-
], 8, it),
|
|
1443
|
-
a("div", ut, [
|
|
1444
|
-
a("strong", null, t(l(s).catalog), 1),
|
|
1445
|
-
m.value ? (n(), o("button", {
|
|
1446
|
-
key: 0,
|
|
1447
|
-
type: "button",
|
|
1448
|
-
disabled: e.readonly,
|
|
1449
|
-
onClick: _
|
|
1450
|
-
}, t(l(s).restoreDraft), 9, rt)) : D("", !0),
|
|
1451
|
-
a("label", null, [
|
|
1452
|
-
g(t(l(s).searchFields), 1),
|
|
1453
|
-
k(a("input", {
|
|
1454
|
-
"onUpdate:modelValue": c[0] || (c[0] = (d) => ie(R) ? R.value = d : null),
|
|
1455
|
-
type: "search",
|
|
1456
|
-
"aria-label": l(s).searchFields
|
|
1457
|
-
}, null, 8, mt), [
|
|
1458
|
-
[q, l(R)]
|
|
1459
|
-
])
|
|
1460
|
-
]),
|
|
1461
|
-
a("div", ct, [
|
|
1462
|
-
(n(!0), o($, null, x(l(A), (d) => (n(), o("button", {
|
|
1463
|
-
key: d.field,
|
|
1464
|
-
type: "button",
|
|
1465
|
-
disabled: e.readonly || l(h) !== "computations",
|
|
1466
|
-
title: l(s).useField,
|
|
1467
|
-
onClick: (j) => l(v).setExpression({ field: d.field })
|
|
1468
|
-
}, [
|
|
1469
|
-
a("strong", null, t(d.label), 1),
|
|
1470
|
-
a("code", null, t(d.field), 1),
|
|
1471
|
-
a("small", null, t(d.meta), 1)
|
|
1472
|
-
], 8, bt))), 128))
|
|
1473
|
-
]),
|
|
1474
|
-
l(I).length > 50 ? (n(), o("small", vt, t(l(s).shown) + " 50 / " + t(l(I).length), 1)) : D("", !0)
|
|
1475
|
-
])
|
|
1476
|
-
]),
|
|
1477
|
-
l(h) === "computations" ? (n(), o("div", gt, [
|
|
1478
|
-
a("label", null, [
|
|
1479
|
-
g(t(l(s).existing), 1),
|
|
1480
|
-
a("select", {
|
|
1481
|
-
"aria-label": l(s).existing,
|
|
1482
|
-
value: l(ae),
|
|
1483
|
-
disabled: e.readonly,
|
|
1484
|
-
onChange: c[1] || (c[1] = (d) => l(v).loadComputed(d.target.value))
|
|
1485
|
-
}, [
|
|
1486
|
-
a("option", yt, "+ " + t(l(s).newField), 1),
|
|
1487
|
-
(n(!0), o($, null, x(e.list.computed, (d) => (n(), o("option", {
|
|
1488
|
-
key: d.field,
|
|
1489
|
-
value: d.field
|
|
1490
|
-
}, t(d.field), 9, ht))), 128))
|
|
1491
|
-
], 40, ft)
|
|
1492
|
-
]),
|
|
1493
|
-
a("label", null, [
|
|
1494
|
-
g(t(l(s).target), 1),
|
|
1495
|
-
k(a("input", {
|
|
1496
|
-
"aria-label": l(s).target,
|
|
1497
|
-
"onUpdate:modelValue": c[2] || (c[2] = (d) => l(U).field = d),
|
|
1498
|
-
disabled: e.readonly,
|
|
1499
|
-
autocomplete: "off"
|
|
1500
|
-
}, null, 8, kt), [
|
|
1501
|
-
[q, l(U).field]
|
|
1502
|
-
])
|
|
1503
|
-
]),
|
|
1504
|
-
a("div", $t, [
|
|
1505
|
-
a("label", null, [
|
|
1506
|
-
g(t(l(s).scope), 1),
|
|
1507
|
-
k(a("select", {
|
|
1508
|
-
"aria-label": l(s).scope,
|
|
1509
|
-
"onUpdate:modelValue": c[3] || (c[3] = (d) => l(U).scope = d),
|
|
1510
|
-
disabled: e.readonly
|
|
1511
|
-
}, [
|
|
1512
|
-
(n(!0), o($, null, x(l(de).scopes, (d) => (n(), o("option", {
|
|
1513
|
-
key: d,
|
|
1514
|
-
value: d
|
|
1515
|
-
}, t(l(s)[d]), 9, wt))), 128))
|
|
1516
|
-
], 8, Vt), [
|
|
1517
|
-
[E, l(U).scope]
|
|
1518
|
-
])
|
|
1519
|
-
]),
|
|
1520
|
-
a("label", null, [
|
|
1521
|
-
g(t(l(s).numeric), 1),
|
|
1522
|
-
k(a("select", {
|
|
1523
|
-
"aria-label": l(s).numeric,
|
|
1524
|
-
"onUpdate:modelValue": c[4] || (c[4] = (d) => l(U).numeric = d),
|
|
1525
|
-
disabled: e.readonly
|
|
1526
|
-
}, [
|
|
1527
|
-
a("option", Ut, t(l(s).number), 1),
|
|
1528
|
-
a("option", Ft, t(l(s).decimal), 1)
|
|
1529
|
-
], 8, Ct), [
|
|
1530
|
-
[E, l(U).numeric]
|
|
1531
|
-
])
|
|
1532
|
-
])
|
|
1533
|
-
]),
|
|
1534
|
-
l(U).scope === "group" ? (n(), o("fieldset", xt, [
|
|
1535
|
-
a("legend", null, t(l(s).groupFields), 1),
|
|
1536
|
-
(n(!0), o($, null, x(l(C), (d) => (n(), o("label", {
|
|
1537
|
-
key: d.field
|
|
1538
|
-
}, [
|
|
1539
|
-
a("input", {
|
|
1540
|
-
type: "checkbox",
|
|
1541
|
-
checked: l(U).groupBy?.includes(d.field),
|
|
1542
|
-
disabled: e.readonly,
|
|
1543
|
-
onChange: (j) => l(v).toggleGroupField(
|
|
1544
|
-
d.field,
|
|
1545
|
-
j.target.checked
|
|
1546
|
-
)
|
|
1547
|
-
}, null, 40, Mt),
|
|
1548
|
-
g(t(d.label), 1)
|
|
1549
|
-
]))), 128))
|
|
1550
|
-
])) : D("", !0),
|
|
1551
|
-
typeof l(U).expression != "string" ? (n(), Fe(lt, {
|
|
1552
|
-
key: 1,
|
|
1553
|
-
"model-value": l(U).expression,
|
|
1554
|
-
fields: l(C),
|
|
1555
|
-
messages: l(s),
|
|
1556
|
-
readonly: e.readonly,
|
|
1557
|
-
"onUpdate:modelValue": l(v).setExpression
|
|
1558
|
-
}, null, 8, ["model-value", "fields", "messages", "readonly", "onUpdate:modelValue"])) : (n(), o("p", St, t(l(U).expression), 1)),
|
|
1559
|
-
a("details", null, [
|
|
1560
|
-
a("summary", null, t(l(s).advanced), 1),
|
|
1561
|
-
a("div", Dt, [
|
|
1562
|
-
a("label", null, [
|
|
1563
|
-
g(t(l(s).digits), 1),
|
|
1564
|
-
k(a("input", {
|
|
1565
|
-
"aria-label": l(s).digits,
|
|
1566
|
-
"onUpdate:modelValue": c[5] || (c[5] = (d) => l(U).digits = d),
|
|
1567
|
-
type: "number",
|
|
1568
|
-
min: "0",
|
|
1569
|
-
max: "100",
|
|
1570
|
-
disabled: e.readonly
|
|
1571
|
-
}, null, 8, Rt), [
|
|
1572
|
-
[
|
|
1573
|
-
q,
|
|
1574
|
-
l(U).digits,
|
|
1575
|
-
void 0,
|
|
1576
|
-
{ number: !0 }
|
|
1577
|
-
]
|
|
1578
|
-
])
|
|
1579
|
-
]),
|
|
1580
|
-
a("label", null, [
|
|
1581
|
-
g(t(l(s).nulls), 1),
|
|
1582
|
-
k(a("select", {
|
|
1583
|
-
"aria-label": l(s).nulls,
|
|
1584
|
-
"onUpdate:modelValue": c[6] || (c[6] = (d) => l(U).nulls = d),
|
|
1585
|
-
disabled: e.readonly
|
|
1586
|
-
}, [
|
|
1587
|
-
a("option", Lt, t(l(s).propagate), 1),
|
|
1588
|
-
a("option", Tt, t(l(s).error), 1)
|
|
1589
|
-
], 8, Et), [
|
|
1590
|
-
[E, l(U).nulls]
|
|
1591
|
-
])
|
|
1592
|
-
]),
|
|
1593
|
-
a("label", null, [
|
|
1594
|
-
g(t(l(s).division), 1),
|
|
1595
|
-
k(a("select", {
|
|
1596
|
-
"aria-label": l(s).division,
|
|
1597
|
-
"onUpdate:modelValue": c[7] || (c[7] = (d) => l(U).divisionByZero = d),
|
|
1598
|
-
disabled: e.readonly
|
|
1599
|
-
}, [
|
|
1600
|
-
a("option", Nt, t(l(s).error), 1),
|
|
1601
|
-
a("option", At, t(l(s).propagate), 1)
|
|
1602
|
-
], 8, Kt), [
|
|
1603
|
-
[E, l(U).divisionByZero]
|
|
1604
|
-
])
|
|
1605
|
-
])
|
|
1606
|
-
])
|
|
1607
|
-
]),
|
|
1608
|
-
l(U).numeric === "decimal" ? (n(), o("p", Bt, t(l(s).decimalHint), 1)) : D("", !0),
|
|
1609
|
-
l(Q).valid && l(U).field ? (n(), o("div", Gt, [
|
|
1610
|
-
g(t(l(s).dependencies), 1),
|
|
1611
|
-
a("strong", null, t(l(Q).order.join(" → ")), 1)
|
|
1612
|
-
])) : D("", !0),
|
|
1613
|
-
a("div", It, [
|
|
1614
|
-
a("button", {
|
|
1615
|
-
type: "button",
|
|
1616
|
-
disabled: e.readonly,
|
|
1617
|
-
onClick: c[8] || (c[8] = //@ts-ignore
|
|
1618
|
-
(...d) => l(v).check && l(v).check(...d))
|
|
1619
|
-
}, t(l(s).check), 9, Ot),
|
|
1620
|
-
a("button", {
|
|
1621
|
-
type: "button",
|
|
1622
|
-
class: "mr-rule-editor__primary",
|
|
1623
|
-
disabled: e.readonly || !l(Q).valid,
|
|
1624
|
-
onClick: c[9] || (c[9] = //@ts-ignore
|
|
1625
|
-
(...d) => l(v).applyComputed && l(v).applyComputed(...d))
|
|
1626
|
-
}, t(l(s).apply), 9, Wt),
|
|
1627
|
-
l(ae) ? (n(), o("button", {
|
|
1628
|
-
key: 0,
|
|
1629
|
-
type: "button",
|
|
1630
|
-
disabled: e.readonly,
|
|
1631
|
-
onClick: c[10] || (c[10] = //@ts-ignore
|
|
1632
|
-
(...d) => l(v).removeComputed && l(v).removeComputed(...d))
|
|
1633
|
-
}, t(l(s).remove), 9, jt)) : D("", !0)
|
|
1634
|
-
]),
|
|
1635
|
-
!l(Q).valid && l(U).field ? (n(), o("p", Jt, t(l(Q).errors.join(";")), 1)) : D("", !0)
|
|
1636
|
-
])) : l(h) === "groups" ? (n(), o("div", Ht, [
|
|
1637
|
-
a("div", zt, [
|
|
1638
|
-
k(a("select", {
|
|
1639
|
-
"onUpdate:modelValue": c[11] || (c[11] = (d) => ie(T) ? T.value = d : null),
|
|
1640
|
-
"aria-label": l(s).groups
|
|
1641
|
-
}, [
|
|
1642
|
-
(n(!0), o($, null, x(l(V), (d, j) => (n(), o("option", {
|
|
1643
|
-
key: j,
|
|
1644
|
-
value: j
|
|
1645
|
-
}, t(j + 1) + " · " + t(d.field), 9, Pt))), 128)),
|
|
1646
|
-
l(V).length ? D("", !0) : (n(), o("option", Zt, t(l(s).noGroups), 1))
|
|
1647
|
-
], 8, qt), [
|
|
1648
|
-
[
|
|
1649
|
-
E,
|
|
1650
|
-
l(T),
|
|
1651
|
-
void 0,
|
|
1652
|
-
{ number: !0 }
|
|
1653
|
-
]
|
|
1654
|
-
]),
|
|
1655
|
-
a("button", {
|
|
1656
|
-
type: "button",
|
|
1657
|
-
disabled: e.readonly || l(V).length >= 16,
|
|
1658
|
-
onClick: c[12] || (c[12] = //@ts-ignore
|
|
1659
|
-
(...d) => l(v).addGroup && l(v).addGroup(...d))
|
|
1660
|
-
}, " + " + t(l(s).addGroup), 9, Qt)
|
|
1661
|
-
]),
|
|
1662
|
-
l(S) ? (n(), o($, { key: 0 }, [
|
|
1663
|
-
a("label", null, [
|
|
1664
|
-
g(t(l(s).field), 1),
|
|
1665
|
-
k(a("select", {
|
|
1666
|
-
"aria-label": l(s).field,
|
|
1667
|
-
"onUpdate:modelValue": c[13] || (c[13] = (d) => l(S).field = d),
|
|
1668
|
-
disabled: e.readonly
|
|
1669
|
-
}, [
|
|
1670
|
-
(n(!0), o($, null, x(l(C), (d) => (n(), o("option", {
|
|
1671
|
-
key: d.field,
|
|
1672
|
-
value: d.field
|
|
1673
|
-
}, t(d.label), 9, Yt))), 128))
|
|
1674
|
-
], 8, Xt), [
|
|
1675
|
-
[E, l(S).field]
|
|
1676
|
-
])
|
|
1677
|
-
]),
|
|
1678
|
-
a("div", pt, [
|
|
1679
|
-
a("label", null, [
|
|
1680
|
-
g(t(l(s).header), 1),
|
|
1681
|
-
k(a("input", {
|
|
1682
|
-
"aria-label": l(s).header,
|
|
1683
|
-
"onUpdate:modelValue": c[14] || (c[14] = (d) => l(S).headerTemplate = d),
|
|
1684
|
-
disabled: e.readonly,
|
|
1685
|
-
placeholder: "{value}"
|
|
1686
|
-
}, null, 8, _t), [
|
|
1687
|
-
[q, l(S).headerTemplate]
|
|
1688
|
-
])
|
|
1689
|
-
]),
|
|
1690
|
-
a("label", null, [
|
|
1691
|
-
g(t(l(s).footer), 1),
|
|
1692
|
-
k(a("input", {
|
|
1693
|
-
"aria-label": l(s).footer,
|
|
1694
|
-
"onUpdate:modelValue": c[15] || (c[15] = (d) => l(S).subtotalLabel = d),
|
|
1695
|
-
disabled: e.readonly
|
|
1696
|
-
}, null, 8, es), [
|
|
1697
|
-
[q, l(S).subtotalLabel]
|
|
1698
|
-
])
|
|
1699
|
-
])
|
|
1700
|
-
]),
|
|
1701
|
-
a("div", ls, [
|
|
1702
|
-
a("label", null, [
|
|
1703
|
-
k(a("input", {
|
|
1704
|
-
"onUpdate:modelValue": c[16] || (c[16] = (d) => l(S).keepWithNext = d),
|
|
1705
|
-
type: "checkbox",
|
|
1706
|
-
disabled: e.readonly
|
|
1707
|
-
}, null, 8, as), [
|
|
1708
|
-
[se, l(S).keepWithNext]
|
|
1709
|
-
]),
|
|
1710
|
-
g(t(l(s).orphan), 1)
|
|
1711
|
-
]),
|
|
1712
|
-
a("label", null, [
|
|
1713
|
-
k(a("input", {
|
|
1714
|
-
"onUpdate:modelValue": c[17] || (c[17] = (d) => l(S).repeatHeader = d),
|
|
1715
|
-
type: "checkbox",
|
|
1716
|
-
disabled: e.readonly
|
|
1717
|
-
}, null, 8, ts), [
|
|
1718
|
-
[se, l(S).repeatHeader]
|
|
1719
|
-
]),
|
|
1720
|
-
g(t(l(s).repeat), 1)
|
|
1721
|
-
])
|
|
1722
|
-
]),
|
|
1723
|
-
(n(!0), o($, null, x(l(S).aggregates, (d, j) => (n(), o("div", {
|
|
1724
|
-
key: j,
|
|
1725
|
-
class: "mr-rule-editor__aggregate"
|
|
1726
|
-
}, [
|
|
1727
|
-
a("div", ss, [
|
|
1728
|
-
a("label", null, [
|
|
1729
|
-
g(t(l(s).output), 1),
|
|
1730
|
-
k(a("select", {
|
|
1731
|
-
"aria-label": l(s).output,
|
|
1732
|
-
"onUpdate:modelValue": (K) => d.field = K,
|
|
1733
|
-
disabled: e.readonly
|
|
1734
|
-
}, [
|
|
1735
|
-
(n(!0), o($, null, x(l(C), (K) => (n(), o("option", {
|
|
1736
|
-
key: K.field,
|
|
1737
|
-
value: K.field
|
|
1738
|
-
}, t(K.label), 9, ds))), 128))
|
|
1739
|
-
], 8, is), [
|
|
1740
|
-
[E, d.field]
|
|
1741
|
-
])
|
|
1742
|
-
]),
|
|
1743
|
-
a("label", null, [
|
|
1744
|
-
g(t(l(s).aggregate), 1),
|
|
1745
|
-
k(a("select", {
|
|
1746
|
-
"aria-label": l(s).aggregate,
|
|
1747
|
-
"onUpdate:modelValue": (K) => d.op = K,
|
|
1748
|
-
disabled: e.readonly
|
|
1749
|
-
}, [
|
|
1750
|
-
(n(!0), o($, null, x(l(de).aggregates, (K) => (n(), o("option", {
|
|
1751
|
-
key: K,
|
|
1752
|
-
value: K
|
|
1753
|
-
}, t(l(s)[K]), 9, os))), 128))
|
|
1754
|
-
], 8, ns), [
|
|
1755
|
-
[E, d.op]
|
|
1756
|
-
])
|
|
1757
|
-
])
|
|
1758
|
-
]),
|
|
1759
|
-
a("label", null, [
|
|
1760
|
-
g(t(l(s).measure), 1),
|
|
1761
|
-
k(a("select", {
|
|
1762
|
-
"aria-label": l(s).measure,
|
|
1763
|
-
"onUpdate:modelValue": (K) => d.valueField = K,
|
|
1764
|
-
disabled: e.readonly
|
|
1765
|
-
}, [
|
|
1766
|
-
a("option", rs, t(d.field), 1),
|
|
1767
|
-
(n(!0), o($, null, x(l(C), (K) => (n(), o("option", {
|
|
1768
|
-
key: K.field,
|
|
1769
|
-
value: K.field
|
|
1770
|
-
}, t(K.label), 9, ms))), 128))
|
|
1771
|
-
], 8, us), [
|
|
1772
|
-
[E, d.valueField]
|
|
1773
|
-
])
|
|
1774
|
-
]),
|
|
1775
|
-
d.op === "weightedAvg" ? (n(), o("label", cs, [
|
|
1776
|
-
g(t(l(s).weight), 1),
|
|
1777
|
-
k(a("select", {
|
|
1778
|
-
"aria-label": l(s).weight,
|
|
1779
|
-
"onUpdate:modelValue": (K) => d.weightField = K,
|
|
1780
|
-
disabled: e.readonly
|
|
1781
|
-
}, [
|
|
1782
|
-
(n(!0), o($, null, x(l(C), (K) => (n(), o("option", {
|
|
1783
|
-
key: K.field,
|
|
1784
|
-
value: K.field
|
|
1785
|
-
}, t(K.label), 9, vs))), 128))
|
|
1786
|
-
], 8, bs), [
|
|
1787
|
-
[E, d.weightField]
|
|
1788
|
-
])
|
|
1789
|
-
])) : D("", !0),
|
|
1790
|
-
a("div", gs, [
|
|
1791
|
-
k(a("select", {
|
|
1792
|
-
"onUpdate:modelValue": (K) => d.numeric = K,
|
|
1793
|
-
disabled: e.readonly,
|
|
1794
|
-
"aria-label": l(s).numeric
|
|
1795
|
-
}, [
|
|
1796
|
-
a("option", ys, t(l(s).number), 1),
|
|
1797
|
-
a("option", hs, t(l(s).decimal), 1)
|
|
1798
|
-
], 8, fs), [
|
|
1799
|
-
[E, d.numeric]
|
|
1800
|
-
]),
|
|
1801
|
-
a("button", {
|
|
1802
|
-
type: "button",
|
|
1803
|
-
disabled: e.readonly,
|
|
1804
|
-
onClick: (K) => l(S).aggregates?.splice(j, 1)
|
|
1805
|
-
}, t(l(s).remove), 9, ks)
|
|
1806
|
-
])
|
|
1807
|
-
]))), 128)),
|
|
1808
|
-
a("button", {
|
|
1809
|
-
type: "button",
|
|
1810
|
-
disabled: e.readonly,
|
|
1811
|
-
onClick: c[18] || (c[18] = //@ts-ignore
|
|
1812
|
-
(...d) => l(v).addAggregate && l(v).addAggregate(...d))
|
|
1813
|
-
}, " + " + t(l(s).addAggregate), 9, $s),
|
|
1814
|
-
a("div", Vs, [
|
|
1815
|
-
a("button", {
|
|
1816
|
-
type: "button",
|
|
1817
|
-
disabled: e.readonly || l(T) === 0,
|
|
1818
|
-
"aria-label": l(s).moveUp,
|
|
1819
|
-
onClick: c[19] || (c[19] = (d) => l(v).moveGroup(-1))
|
|
1820
|
-
}, " ↑ " + t(l(s).outer), 9, ws),
|
|
1821
|
-
a("button", {
|
|
1822
|
-
type: "button",
|
|
1823
|
-
disabled: e.readonly || l(T) >= l(V).length - 1,
|
|
1824
|
-
"aria-label": l(s).moveDown,
|
|
1825
|
-
onClick: c[20] || (c[20] = (d) => l(v).moveGroup(1))
|
|
1826
|
-
}, " ↓ " + t(l(s).inner), 9, Cs),
|
|
1827
|
-
a("button", {
|
|
1828
|
-
type: "button",
|
|
1829
|
-
disabled: e.readonly,
|
|
1830
|
-
onClick: c[21] || (c[21] = //@ts-ignore
|
|
1831
|
-
(...d) => l(v).removeGroup && l(v).removeGroup(...d))
|
|
1832
|
-
}, t(l(s).remove), 9, Us)
|
|
1833
|
-
])
|
|
1834
|
-
], 64)) : D("", !0),
|
|
1835
|
-
a("button", {
|
|
1836
|
-
type: "button",
|
|
1837
|
-
class: "mr-rule-editor__primary",
|
|
1838
|
-
disabled: e.readonly,
|
|
1839
|
-
onClick: c[22] || (c[22] = //@ts-ignore
|
|
1840
|
-
(...d) => l(v).applyGroups && l(v).applyGroups(...d))
|
|
1841
|
-
}, t(l(s).apply), 9, Fs)
|
|
1842
|
-
])) : l(h) === "conditions" ? (n(), o("div", xs, [
|
|
1843
|
-
a("label", null, [
|
|
1844
|
-
g(t(l(s).column), 1),
|
|
1845
|
-
k(a("select", {
|
|
1846
|
-
"aria-label": l(s).column,
|
|
1847
|
-
"onUpdate:modelValue": c[23] || (c[23] = (d) => ie(O) ? O.value = d : null),
|
|
1848
|
-
disabled: e.readonly,
|
|
1849
|
-
onChange: c[24] || (c[24] = (d) => l(v).loadCondition(-1))
|
|
1850
|
-
}, [
|
|
1851
|
-
(n(!0), o($, null, x(e.list.columns, (d) => (n(), o("option", {
|
|
1852
|
-
key: d.field,
|
|
1853
|
-
value: d.field
|
|
1854
|
-
}, t(d.header || d.field), 9, Ss))), 128))
|
|
1855
|
-
], 40, Ms), [
|
|
1856
|
-
[E, l(O)]
|
|
1857
|
-
])
|
|
1858
|
-
]),
|
|
1859
|
-
a("label", null, [
|
|
1860
|
-
g(t(l(s).effect), 1),
|
|
1861
|
-
k(a("select", {
|
|
1862
|
-
"aria-label": l(s).effect,
|
|
1863
|
-
"onUpdate:modelValue": c[25] || (c[25] = (d) => ie(u) ? u.value = d : null),
|
|
1864
|
-
disabled: e.readonly,
|
|
1865
|
-
onChange: c[26] || (c[26] = (d) => l(v).loadCondition(-1))
|
|
1866
|
-
}, [
|
|
1867
|
-
a("option", Rs, t(l(s).style), 1),
|
|
1868
|
-
a("option", Es, t(l(s).cell), 1),
|
|
1869
|
-
a("option", Ls, t(l(s).rowVisibility), 1)
|
|
1870
|
-
], 40, Ds), [
|
|
1871
|
-
[E, l(u)]
|
|
1872
|
-
])
|
|
1873
|
-
]),
|
|
1874
|
-
l(u) === "style" ? (n(), o("label", Ts, [
|
|
1875
|
-
g(t(l(s).existing), 1),
|
|
1876
|
-
a("select", {
|
|
1877
|
-
"aria-label": l(s).existing,
|
|
1878
|
-
value: l(F),
|
|
1879
|
-
disabled: e.readonly,
|
|
1880
|
-
onChange: c[27] || (c[27] = (d) => l(v).loadCondition(
|
|
1881
|
-
Number(d.target.value)
|
|
1882
|
-
))
|
|
1883
|
-
}, [
|
|
1884
|
-
a("option", Ns, "+ " + t(l(s).newCondition), 1),
|
|
1885
|
-
(n(!0), o($, null, x(l(J)?.rules, (d, j) => (n(), o("option", {
|
|
1886
|
-
key: j,
|
|
1887
|
-
value: j
|
|
1888
|
-
}, t(j + 1) + " · " + t(d.when.field) + " " + t(d.when.op) + " " + t(d.when.value), 9, As))), 128))
|
|
1889
|
-
], 40, Ks)
|
|
1890
|
-
])) : D("", !0),
|
|
1891
|
-
a("label", null, [
|
|
1892
|
-
g(t(l(s).condition), 1),
|
|
1893
|
-
k(a("select", {
|
|
1894
|
-
"aria-label": l(s).condition,
|
|
1895
|
-
"onUpdate:modelValue": c[28] || (c[28] = (d) => l(i).field = d),
|
|
1896
|
-
disabled: e.readonly
|
|
1897
|
-
}, [
|
|
1898
|
-
(n(!0), o($, null, x(l(C), (d) => (n(), o("option", {
|
|
1899
|
-
key: d.field,
|
|
1900
|
-
value: d.field
|
|
1901
|
-
}, t(d.label), 9, Gs))), 128))
|
|
1902
|
-
], 8, Bs), [
|
|
1903
|
-
[E, l(i).field]
|
|
1904
|
-
])
|
|
1905
|
-
]),
|
|
1906
|
-
a("div", Is, [
|
|
1907
|
-
a("label", null, [
|
|
1908
|
-
g(t(l(s).comparison), 1),
|
|
1909
|
-
k(a("select", {
|
|
1910
|
-
"aria-label": l(s).comparison,
|
|
1911
|
-
"onUpdate:modelValue": c[29] || (c[29] = (d) => l(i).op = d),
|
|
1912
|
-
disabled: e.readonly
|
|
1913
|
-
}, [
|
|
1914
|
-
(n(), o($, null, x([">", ">=", "<", "<=", "==", "!="], (d) => a("option", {
|
|
1915
|
-
key: d,
|
|
1916
|
-
value: d
|
|
1917
|
-
}, t(d), 9, Ws)), 64))
|
|
1918
|
-
], 8, Os), [
|
|
1919
|
-
[E, l(i).op]
|
|
1920
|
-
])
|
|
1921
|
-
]),
|
|
1922
|
-
a("label", null, [
|
|
1923
|
-
g(t(l(s).threshold), 1),
|
|
1924
|
-
a("input", {
|
|
1925
|
-
value: l(i).value,
|
|
1926
|
-
disabled: e.readonly,
|
|
1927
|
-
onInput: c[30] || (c[30] = (d) => l(v).setThreshold(d.target.value))
|
|
1928
|
-
}, null, 40, js)
|
|
1929
|
-
])
|
|
1930
|
-
]),
|
|
1931
|
-
l(u) === "style" ? (n(), o($, { key: 1 }, [
|
|
1932
|
-
a("div", Js, [
|
|
1933
|
-
a("label", null, [
|
|
1934
|
-
g(t(l(s).color), 1),
|
|
1935
|
-
k(a("input", {
|
|
1936
|
-
"onUpdate:modelValue": c[31] || (c[31] = (d) => l(r).color = d),
|
|
1937
|
-
type: "color",
|
|
1938
|
-
disabled: e.readonly
|
|
1939
|
-
}, null, 8, Hs), [
|
|
1940
|
-
[q, l(r).color]
|
|
1941
|
-
])
|
|
1942
|
-
]),
|
|
1943
|
-
a("label", null, [
|
|
1944
|
-
g(t(l(s).background), 1),
|
|
1945
|
-
k(a("input", {
|
|
1946
|
-
"onUpdate:modelValue": c[32] || (c[32] = (d) => l(r).backgroundColor = d),
|
|
1947
|
-
type: "color",
|
|
1948
|
-
disabled: e.readonly
|
|
1949
|
-
}, null, 8, zs), [
|
|
1950
|
-
[q, l(r).backgroundColor]
|
|
1951
|
-
])
|
|
1952
|
-
])
|
|
1953
|
-
]),
|
|
1954
|
-
a("label", qs, [
|
|
1955
|
-
k(a("input", {
|
|
1956
|
-
"onUpdate:modelValue": c[33] || (c[33] = (d) => l(r).bold = d),
|
|
1957
|
-
type: "checkbox",
|
|
1958
|
-
disabled: e.readonly
|
|
1959
|
-
}, null, 8, Ps), [
|
|
1960
|
-
[se, l(r).bold]
|
|
1961
|
-
]),
|
|
1962
|
-
g(t(l(s).bold), 1)
|
|
1963
|
-
])
|
|
1964
|
-
], 64)) : D("", !0),
|
|
1965
|
-
a("div", Zs, [
|
|
1966
|
-
a("button", {
|
|
1967
|
-
type: "button",
|
|
1968
|
-
class: "mr-rule-editor__primary",
|
|
1969
|
-
disabled: e.readonly,
|
|
1970
|
-
onClick: c[34] || (c[34] = (d) => l(v).applyCondition())
|
|
1971
|
-
}, t(l(s).apply), 9, Qs),
|
|
1972
|
-
l(F) >= 0 || l(u) !== "style" ? (n(), o("button", {
|
|
1973
|
-
key: 0,
|
|
1974
|
-
type: "button",
|
|
1975
|
-
disabled: e.readonly,
|
|
1976
|
-
onClick: c[35] || (c[35] = (d) => l(v).applyCondition(!0))
|
|
1977
|
-
}, t(l(s).removeCondition), 9, Xs)) : D("", !0)
|
|
1978
|
-
])
|
|
1979
|
-
])) : D("", !0),
|
|
1980
|
-
(n(), o($, null, x(["detail", "matrix", "tree"], (d) => k(ge(Ua, {
|
|
1981
|
-
key: `${d}-${Y.value}`,
|
|
1982
|
-
list: e.list,
|
|
1983
|
-
mode: d,
|
|
1984
|
-
datasets: e.datasets,
|
|
1985
|
-
"dataset-schema": e.datasetSchema,
|
|
1986
|
-
"dataset-schemas": e.datasetSchemas,
|
|
1987
|
-
readonly: e.readonly,
|
|
1988
|
-
messages: l(s),
|
|
1989
|
-
accept: l(v).applyLayout,
|
|
1990
|
-
onDirty: (j) => X.value = { ...X.value, [d]: j }
|
|
1991
|
-
}, null, 8, ["list", "mode", "datasets", "dataset-schema", "dataset-schemas", "readonly", "messages", "accept", "onDirty"]), [
|
|
1992
|
-
[xe, l(h) === d]
|
|
1993
|
-
])), 64)),
|
|
1994
|
-
a("aside", Ys, [
|
|
1995
|
-
a("header", null, [
|
|
1996
|
-
a("strong", null, t(l(s).explanation), 1),
|
|
1997
|
-
m.value ? (n(), o("span", ps, t(l(s).pending), 1)) : D("", !0)
|
|
1998
|
-
]),
|
|
1999
|
-
a("p", null, t(l(s).sourceHint), 1),
|
|
2000
|
-
l(h) === "computations" ? (n(), o($, { key: 0 }, [
|
|
2001
|
-
a("h4", null, t(l(s).expression), 1),
|
|
2002
|
-
a("code", null, t(l(p)), 1),
|
|
2003
|
-
a("div", _s, [
|
|
2004
|
-
a("h4", null, t(l(s).sourceValues) + " → " + t(l(s).result), 1),
|
|
2005
|
-
(n(!0), o($, null, x(l(ue), (d) => (n(), o("div", {
|
|
2006
|
-
key: d.row,
|
|
2007
|
-
class: "mr-rule-editor__trace"
|
|
2008
|
-
}, [
|
|
2009
|
-
a("small", null, "#" + t(d.row), 1),
|
|
2010
|
-
a("code", null, t(d.values), 1),
|
|
2011
|
-
a("strong", null, t(l(H).find((j) => j.row === d.row)?.value ?? (l(H).length ? "—" : l(s).notChecked)), 1)
|
|
2012
|
-
]))), 128)),
|
|
2013
|
-
l(H).some((d) => d.value == null) ? (n(), o("p", ei, t(l(s).nullReason), 1)) : D("", !0),
|
|
2014
|
-
l(H).length ? (n(), o("p", li, t(l(s).sample), 1)) : D("", !0)
|
|
2015
|
-
])
|
|
2016
|
-
], 64)) : D("", !0),
|
|
2017
|
-
l(b) ? (n(), o("p", ai, t(l(b)), 1)) : D("", !0)
|
|
2018
|
-
])
|
|
2019
|
-
], 8, tt));
|
|
2020
|
-
}
|
|
2021
|
-
}), ci = /* @__PURE__ */ ce(ti, [["__scopeId", "data-v-26d69520"]]);
|
|
2022
|
-
export {
|
|
2023
|
-
ci as default
|
|
2024
|
-
};
|