@agile-team/mach-report 2.8.4 → 2.9.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 -9
- package/dist/ExcelBindingWizard-DiaxvWpQ.cjs +1 -0
- package/dist/ExcelBindingWizard-RLJIXKKG.js +816 -0
- package/dist/{ReportPreview-DTWiCH5a.js → ReportPreview-B5ZNEasW.js} +22 -21
- package/dist/ReportPreview-DRtVPUYo.cjs +6 -0
- package/dist/RuleEditor-N4qnMZ-Z.cjs +1 -0
- package/dist/RuleEditor-ynnUEK0s.js +1575 -0
- package/dist/TemplateReviewPanel-C_Lmzis6.cjs +1 -0
- package/dist/TemplateReviewPanel-Cn32OY4_.js +173 -0
- package/dist/analytics.cjs +1 -1
- package/dist/analytics.d.cts +188 -5
- package/dist/analytics.d.ts +188 -5
- package/dist/analytics.js +68 -202
- package/dist/{assets-B9qJku3V.js → assets-DDsfEi8R.js} +3 -3
- package/dist/{assets-RZan7EyL.cjs → assets-ahTRUXRk.cjs} +1 -1
- package/dist/binding-preview-B5834rml.cjs +2 -0
- package/dist/binding-preview-ChXjN5L5.js +649 -0
- package/dist/{capabilities-joSutDF8.js → capabilities-Cm9hZ3uV.js} +5 -5
- package/dist/{capabilities-xGTpnPjJ.cjs → capabilities-DYzWL7KS.cjs} +1 -1
- package/dist/dataset-BkRmwgeJ.cjs +1 -0
- package/dist/dataset-H5pFuQGU.js +121 -0
- package/dist/defaults-DXhiM1ZD.js +10 -0
- package/dist/defaults-xhmcLLrf.cjs +1 -0
- package/dist/designer.cjs +2 -1
- package/dist/designer.d.cts +1373 -6
- package/dist/designer.d.ts +1373 -6
- package/dist/designer.js +2495 -767
- package/dist/grid-geometry-BNptEcMm.js +65 -0
- package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
- package/dist/import-template-CNMLJSQw.js +23030 -0
- package/dist/import-template-CpxunKVp.cjs +29 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +202 -3
- package/dist/index.d.ts +202 -3
- package/dist/index.js +554 -535
- package/dist/matrix-CNPDJxED.js +745 -0
- package/dist/matrix-Div9Ilh3.cjs +1 -0
- package/dist/pdf.cjs +46 -46
- package/dist/pdf.d.cts +2 -0
- package/dist/pdf.d.ts +2 -0
- package/dist/pdf.js +17 -16
- package/dist/{plugin-CQmJXNcA.js → plugin-BWwIgZXV.js} +1 -1
- package/dist/{plugin-DSFu51Ua.cjs → plugin-Dg-J1Rbm.cjs} +1 -1
- package/dist/progress-7OSZbFok.js +39 -0
- package/dist/progress-BnLiS5eH.cjs +1 -0
- package/dist/render-plan-7xpGrCEl.cjs +1 -0
- package/dist/render-plan-Ck6koX9L.js +13 -0
- package/dist/server/node.d.cts +62 -0
- package/dist/server/node.d.ts +62 -0
- package/dist/server-node.cjs +1 -1
- package/dist/server-node.js +373 -145
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +311 -0
- package/dist/server.d.ts +311 -0
- package/dist/server.js +590 -186
- package/dist/{style-Dv5o_x6b.js → style-CQ1PK8ZB.js} +5 -5
- package/dist/style-UgIJSA1F.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/template-registry-CHMYZ7SD.cjs +1 -0
- package/dist/template-registry-R61AMCr0.js +433 -0
- package/dist/template-review-hvWWQFsi.js +1027 -0
- package/dist/template-review-jEcOfmGr.cjs +1 -0
- package/dist/textwrap-CWHyzkBH.cjs +4 -0
- package/dist/{textwrap-DOl04hCQ.js → textwrap-DE1kgcJB.js} +1 -1
- package/dist/{validate-DfHPD8wX.cjs → validate-BDiMqkJC.cjs} +1 -1
- package/dist/{validate-S6CgIm5d.js → validate-DWPF7icl.js} +13 -13
- package/dist/vue/async.d.cts +186 -0
- package/dist/vue/async.d.ts +186 -0
- package/dist/vue/index.d.cts +271 -3
- package/dist/vue/index.d.ts +271 -3
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +4 -4
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +2 -0
- package/dist/worker.d.ts +2 -0
- package/dist/worker.js +1 -1
- package/dist/xlsx.cjs +2 -30
- package/dist/xlsx.d.cts +268 -0
- package/dist/xlsx.d.ts +268 -0
- package/dist/xlsx.js +220 -23440
- package/package.json +1 -1
- package/dist/ReportPreview-DjGeWHY-.cjs +0 -6
- package/dist/progress-DD964VAB.js +0 -102
- package/dist/progress-KvhwXZ1Q.cjs +0 -1
- package/dist/render-plan-CckPEQyf.cjs +0 -1
- package/dist/render-plan-uzZYYSy1.js +0 -19
- package/dist/report-source-BXHNy_AD.js +0 -755
- package/dist/report-source-CCAvFE3t.cjs +0 -1
- package/dist/style-CpwiOPyB.cjs +0 -1
- package/dist/template-registry-DWExx0gU.cjs +0 -1
- package/dist/template-registry-NpOakidD.js +0 -354
- package/dist/textwrap-CnGsEum6.cjs +0 -4
|
@@ -0,0 +1,1575 @@
|
|
|
1
|
+
import { ref as A, computed as Z, watch as Y, defineComponent as _, openBlock as o, createElementBlock as n, createElementVNode as a, withDirectives as $, isRef as Q, vModelCheckbox as q, unref as l, createTextVNode as h, toDisplayString as t, Fragment as k, renderList as w, vModelSelect as D, vModelText as H, createCommentVNode as R, resolveComponent as me, normalizeClass as te, createVNode as ce, createBlock as ae } from "vue";
|
|
2
|
+
import { g as be, l as p, v as ve, d as ge } from "./matrix-CNPDJxED.js";
|
|
3
|
+
import { _ as ee } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
4
|
+
import { v as ye } from "./template-registry-R61AMCr0.js";
|
|
5
|
+
import { RULE_EDITOR_MESSAGES as fe } from "./designer.js";
|
|
6
|
+
const P = (e) => JSON.parse(JSON.stringify(e));
|
|
7
|
+
function he(e, J) {
|
|
8
|
+
const x = A(!1), O = A(""), c = A({
|
|
9
|
+
dataset: "",
|
|
10
|
+
parentKey: "",
|
|
11
|
+
foreignKey: "",
|
|
12
|
+
columns: []
|
|
13
|
+
}), i = A({
|
|
14
|
+
rowFields: [],
|
|
15
|
+
columnFields: [],
|
|
16
|
+
measures: []
|
|
17
|
+
}), v = A(), y = Z(() => [
|
|
18
|
+
.../* @__PURE__ */ new Set([
|
|
19
|
+
...Object.keys(e.datasets ?? {}),
|
|
20
|
+
...Object.keys(e.datasetSchemas ?? {})
|
|
21
|
+
])
|
|
22
|
+
]), C = Z(
|
|
23
|
+
() => N(e.list.dataset, e.datasetSchema)
|
|
24
|
+
), G = Z(() => N(c.value.dataset));
|
|
25
|
+
function N(g, M) {
|
|
26
|
+
const F = /* @__PURE__ */ new Map();
|
|
27
|
+
for (const T of (M ?? e.datasetSchemas?.[g])?.fields ?? [])
|
|
28
|
+
F.set(T.field, T.label ?? T.field);
|
|
29
|
+
const B = e.datasets?.[g]?.[0];
|
|
30
|
+
for (const T of Object.keys(B ?? {}))
|
|
31
|
+
F.has(T) || F.set(T, T);
|
|
32
|
+
if (g === e.list.dataset)
|
|
33
|
+
for (const T of e.list.columns)
|
|
34
|
+
F.has(T.field) || F.set(T.field, T.header || T.field);
|
|
35
|
+
return [...F].map(([T, m]) => ({ field: T, label: m }));
|
|
36
|
+
}
|
|
37
|
+
function S() {
|
|
38
|
+
x.value = e.mode === "detail" ? !!e.list.detail : !!e.list.matrix;
|
|
39
|
+
const g = y.value.find((M) => M !== e.list.dataset) ?? "";
|
|
40
|
+
c.value = P(
|
|
41
|
+
e.list.detail ?? {
|
|
42
|
+
dataset: g,
|
|
43
|
+
parentKey: e.list.rowKey ?? e.datasetSchema?.rowKey ?? C.value[0]?.field ?? "",
|
|
44
|
+
foreignKey: "",
|
|
45
|
+
columns: [],
|
|
46
|
+
header: !0,
|
|
47
|
+
unmatched: "error"
|
|
48
|
+
}
|
|
49
|
+
), i.value = P(
|
|
50
|
+
e.list.matrix ?? {
|
|
51
|
+
rowFields: [],
|
|
52
|
+
columnFields: [],
|
|
53
|
+
measures: [],
|
|
54
|
+
totals: !0
|
|
55
|
+
}
|
|
56
|
+
), O.value = "", v.value = void 0;
|
|
57
|
+
}
|
|
58
|
+
Y(() => [e.list, e.mode], S, { immediate: !0 });
|
|
59
|
+
function K(g) {
|
|
60
|
+
c.value.dataset = g, c.value.columns = [], c.value.foreignKey = G.value[0]?.field ?? "", c.value.rowKey = e.datasetSchemas?.[g]?.rowKey;
|
|
61
|
+
}
|
|
62
|
+
function j(g, M) {
|
|
63
|
+
if (M && !c.value.columns.some((F) => F.field === g)) {
|
|
64
|
+
const F = e.datasetSchemas?.[c.value.dataset]?.fields.find((B) => B.field === g);
|
|
65
|
+
c.value.columns.push({
|
|
66
|
+
field: g,
|
|
67
|
+
header: G.value.find((B) => B.field === g)?.label ?? g,
|
|
68
|
+
widthMm: 30,
|
|
69
|
+
align: "auto",
|
|
70
|
+
semanticRole: F?.semanticRole,
|
|
71
|
+
editable: !1
|
|
72
|
+
});
|
|
73
|
+
} else M || (c.value.columns = c.value.columns.filter(
|
|
74
|
+
(F) => F.field !== g
|
|
75
|
+
));
|
|
76
|
+
}
|
|
77
|
+
function L(g, M, F) {
|
|
78
|
+
const B = i.value[g];
|
|
79
|
+
i.value[g] = F ? [.../* @__PURE__ */ new Set([...B, M])] : B.filter((T) => T !== M);
|
|
80
|
+
}
|
|
81
|
+
function r() {
|
|
82
|
+
i.value.measures = [
|
|
83
|
+
...i.value.measures,
|
|
84
|
+
{ field: C.value[0]?.field ?? "", op: "sum" }
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
function s(g) {
|
|
88
|
+
i.value.measures = i.value.measures.filter(
|
|
89
|
+
(M, F) => F !== g
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function V() {
|
|
93
|
+
O.value = "", v.value = void 0;
|
|
94
|
+
try {
|
|
95
|
+
const g = e.datasets?.[e.list.dataset] ?? [];
|
|
96
|
+
if (!g.length) throw new Error(e.messages.noData);
|
|
97
|
+
const M = be(g.slice(0, 1e3), {
|
|
98
|
+
...i.value,
|
|
99
|
+
maxInputRows: 1e3
|
|
100
|
+
});
|
|
101
|
+
v.value = {
|
|
102
|
+
columns: M.columns.slice(0, 5).map((F) => F.header),
|
|
103
|
+
rows: M.rows.slice(0, 5).map(
|
|
104
|
+
(F) => M.columns.slice(0, 5).map((B) => F[B.field])
|
|
105
|
+
)
|
|
106
|
+
};
|
|
107
|
+
} catch (g) {
|
|
108
|
+
O.value = g instanceof Error ? g.message : String(g);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function u() {
|
|
112
|
+
if (e.readonly) return;
|
|
113
|
+
const g = P(e.list);
|
|
114
|
+
e.mode === "detail" ? x.value ? (g.detail = P(c.value), delete g.matrix) : delete g.detail : x.value ? (g.matrix = P(i.value), delete g.detail, delete g.groups, delete g.groupBy, delete g.grandTotal) : delete g.matrix, J(g);
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
enabled: x,
|
|
118
|
+
detail: c,
|
|
119
|
+
matrix: i,
|
|
120
|
+
datasets: y,
|
|
121
|
+
sourceFields: C,
|
|
122
|
+
childFields: G,
|
|
123
|
+
error: O,
|
|
124
|
+
preview: v,
|
|
125
|
+
chooseDataset: K,
|
|
126
|
+
toggleChildColumn: j,
|
|
127
|
+
toggleDimension: L,
|
|
128
|
+
addMeasure: r,
|
|
129
|
+
removeMeasure: s,
|
|
130
|
+
checkMatrix: V,
|
|
131
|
+
apply: u
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const ke = { class: "mr-data-layout" }, Ve = { class: "mr-data-layout__check" }, $e = ["disabled"], Ce = { class: "mr-data-layout__hint" }, we = ["aria-label", "value", "disabled"], xe = {
|
|
135
|
+
value: "",
|
|
136
|
+
disabled: ""
|
|
137
|
+
}, Ue = ["value"], Se = { class: "mr-data-layout__pair" }, Me = ["aria-label", "disabled"], Fe = ["value"], Ee = ["aria-label", "disabled"], Re = {
|
|
138
|
+
value: "",
|
|
139
|
+
disabled: ""
|
|
140
|
+
}, Ke = ["value"], Ge = ["aria-label", "disabled"], De = { value: void 0 }, Ne = ["value"], Te = { class: "mr-data-layout__choices" }, Be = ["checked", "disabled", "onChange"], Ae = ["aria-label", "disabled"], Le = { class: "mr-data-layout__pair" }, We = ["aria-label", "disabled"], Ie = { value: "error" }, Oe = { value: "ignore" }, je = { class: "mr-data-layout__check" }, He = ["disabled"], Je = { class: "mr-data-layout__hint" }, Ze = ["checked", "disabled", "onChange"], ze = { class: "mr-data-layout__pair" }, qe = ["aria-label", "onUpdate:modelValue", "disabled"], Pe = ["value"], Qe = ["aria-label", "onUpdate:modelValue", "disabled"], Xe = ["value"], Ye = ["aria-label", "onUpdate:modelValue", "disabled", "placeholder"], _e = { key: 0 }, pe = ["aria-label", "onUpdate:modelValue", "disabled"], el = ["value"], ll = { class: "mr-data-layout__pair" }, al = ["aria-label", "onUpdate:modelValue", "disabled"], tl = { value: "number" }, dl = { value: "decimal" }, sl = ["aria-label", "onUpdate:modelValue", "disabled"], il = ["disabled", "onClick"], ol = ["disabled"], nl = { class: "mr-data-layout__check" }, ul = ["disabled"], rl = { class: "mr-data-layout__pair" }, ml = ["disabled"], cl = ["disabled"], bl = { class: "mr-data-layout__actions" }, vl = ["disabled"], gl = ["disabled"], yl = {
|
|
141
|
+
key: 2,
|
|
142
|
+
class: "mr-data-layout__preview"
|
|
143
|
+
}, fl = {
|
|
144
|
+
key: 3,
|
|
145
|
+
class: "mr-data-layout__error",
|
|
146
|
+
role: "alert"
|
|
147
|
+
}, hl = /* @__PURE__ */ _({
|
|
148
|
+
__name: "RuleDataLayout",
|
|
149
|
+
props: {
|
|
150
|
+
list: {},
|
|
151
|
+
mode: {},
|
|
152
|
+
datasets: {},
|
|
153
|
+
datasetSchema: {},
|
|
154
|
+
datasetSchemas: {},
|
|
155
|
+
readonly: { type: Boolean },
|
|
156
|
+
messages: {}
|
|
157
|
+
},
|
|
158
|
+
emits: ["change"],
|
|
159
|
+
setup(e, { emit: J }) {
|
|
160
|
+
const x = e, O = J, c = he(x, (L) => O("change", L)), {
|
|
161
|
+
enabled: i,
|
|
162
|
+
detail: v,
|
|
163
|
+
matrix: y,
|
|
164
|
+
datasets: C,
|
|
165
|
+
sourceFields: G,
|
|
166
|
+
childFields: N,
|
|
167
|
+
error: S,
|
|
168
|
+
preview: K
|
|
169
|
+
} = c, j = p();
|
|
170
|
+
return (L, r) => (o(), n("div", ke, [
|
|
171
|
+
a("label", Ve, [
|
|
172
|
+
$(a("input", {
|
|
173
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => Q(i) ? i.value = s : null),
|
|
174
|
+
type: "checkbox",
|
|
175
|
+
disabled: e.readonly
|
|
176
|
+
}, null, 8, $e), [
|
|
177
|
+
[q, l(i)]
|
|
178
|
+
]),
|
|
179
|
+
h(t(e.messages.enabled) + t(e.mode === "detail" ? e.messages.detail : e.messages.matrix), 1)
|
|
180
|
+
]),
|
|
181
|
+
l(i) && e.mode === "detail" ? (o(), n(k, { key: 0 }, [
|
|
182
|
+
a("p", Ce, t(e.messages.detailHint), 1),
|
|
183
|
+
a("label", null, [
|
|
184
|
+
h(t(e.messages.childDataset), 1),
|
|
185
|
+
a("select", {
|
|
186
|
+
"aria-label": e.messages.childDataset,
|
|
187
|
+
value: l(v).dataset,
|
|
188
|
+
disabled: e.readonly,
|
|
189
|
+
onChange: r[1] || (r[1] = (s) => l(c).chooseDataset(s.target.value))
|
|
190
|
+
}, [
|
|
191
|
+
a("option", xe, t(e.messages.select), 1),
|
|
192
|
+
(o(!0), n(k, null, w(l(C), (s) => (o(), n("option", {
|
|
193
|
+
key: s,
|
|
194
|
+
value: s
|
|
195
|
+
}, t(s), 9, Ue))), 128))
|
|
196
|
+
], 40, we)
|
|
197
|
+
]),
|
|
198
|
+
a("div", Se, [
|
|
199
|
+
a("label", null, [
|
|
200
|
+
h(t(e.messages.parentKey), 1),
|
|
201
|
+
$(a("select", {
|
|
202
|
+
"aria-label": e.messages.parentKey,
|
|
203
|
+
"onUpdate:modelValue": r[2] || (r[2] = (s) => l(v).parentKey = s),
|
|
204
|
+
disabled: e.readonly
|
|
205
|
+
}, [
|
|
206
|
+
(o(!0), n(k, null, w(l(G), (s) => (o(), n("option", {
|
|
207
|
+
key: s.field,
|
|
208
|
+
value: s.field
|
|
209
|
+
}, t(s.label), 9, Fe))), 128))
|
|
210
|
+
], 8, Me), [
|
|
211
|
+
[D, l(v).parentKey]
|
|
212
|
+
])
|
|
213
|
+
]),
|
|
214
|
+
a("label", null, [
|
|
215
|
+
h(t(e.messages.foreignKey), 1),
|
|
216
|
+
$(a("select", {
|
|
217
|
+
"aria-label": e.messages.foreignKey,
|
|
218
|
+
"onUpdate:modelValue": r[3] || (r[3] = (s) => l(v).foreignKey = s),
|
|
219
|
+
disabled: e.readonly
|
|
220
|
+
}, [
|
|
221
|
+
a("option", Re, t(e.messages.select), 1),
|
|
222
|
+
(o(!0), n(k, null, w(l(N), (s) => (o(), n("option", {
|
|
223
|
+
key: s.field,
|
|
224
|
+
value: s.field
|
|
225
|
+
}, t(s.label), 9, Ke))), 128))
|
|
226
|
+
], 8, Ee), [
|
|
227
|
+
[D, l(v).foreignKey]
|
|
228
|
+
])
|
|
229
|
+
])
|
|
230
|
+
]),
|
|
231
|
+
a("label", null, [
|
|
232
|
+
h(t(e.messages.rowKey), 1),
|
|
233
|
+
$(a("select", {
|
|
234
|
+
"aria-label": e.messages.rowKey,
|
|
235
|
+
"onUpdate:modelValue": r[4] || (r[4] = (s) => l(v).rowKey = s),
|
|
236
|
+
disabled: e.readonly
|
|
237
|
+
}, [
|
|
238
|
+
a("option", De, t(e.messages.noRowKey), 1),
|
|
239
|
+
(o(!0), n(k, null, w(l(N), (s) => (o(), n("option", {
|
|
240
|
+
key: s.field,
|
|
241
|
+
value: s.field
|
|
242
|
+
}, t(s.label), 9, Ne))), 128))
|
|
243
|
+
], 8, Ge), [
|
|
244
|
+
[D, l(v).rowKey]
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
a("fieldset", Te, [
|
|
248
|
+
a("legend", null, t(e.messages.childColumns), 1),
|
|
249
|
+
(o(!0), n(k, null, w(l(N), (s) => (o(), n("label", {
|
|
250
|
+
key: s.field
|
|
251
|
+
}, [
|
|
252
|
+
a("input", {
|
|
253
|
+
type: "checkbox",
|
|
254
|
+
checked: l(v).columns.some((V) => V.field === s.field),
|
|
255
|
+
disabled: e.readonly,
|
|
256
|
+
onChange: (V) => l(c).toggleChildColumn(
|
|
257
|
+
s.field,
|
|
258
|
+
V.target.checked
|
|
259
|
+
)
|
|
260
|
+
}, null, 40, Be),
|
|
261
|
+
h(t(s.label), 1)
|
|
262
|
+
]))), 128))
|
|
263
|
+
]),
|
|
264
|
+
a("label", null, [
|
|
265
|
+
h(t(e.messages.title), 1),
|
|
266
|
+
$(a("input", {
|
|
267
|
+
"aria-label": e.messages.title,
|
|
268
|
+
"onUpdate:modelValue": r[5] || (r[5] = (s) => l(v).label = s),
|
|
269
|
+
disabled: e.readonly
|
|
270
|
+
}, null, 8, Ae), [
|
|
271
|
+
[H, l(v).label]
|
|
272
|
+
])
|
|
273
|
+
]),
|
|
274
|
+
a("div", Le, [
|
|
275
|
+
a("label", null, [
|
|
276
|
+
h(t(e.messages.unmatched), 1),
|
|
277
|
+
$(a("select", {
|
|
278
|
+
"aria-label": e.messages.unmatched,
|
|
279
|
+
"onUpdate:modelValue": r[6] || (r[6] = (s) => l(v).unmatched = s),
|
|
280
|
+
disabled: e.readonly
|
|
281
|
+
}, [
|
|
282
|
+
a("option", Ie, t(e.messages.error), 1),
|
|
283
|
+
a("option", Oe, t(e.messages.ignore), 1)
|
|
284
|
+
], 8, We), [
|
|
285
|
+
[D, l(v).unmatched]
|
|
286
|
+
])
|
|
287
|
+
]),
|
|
288
|
+
a("label", je, [
|
|
289
|
+
$(a("input", {
|
|
290
|
+
"onUpdate:modelValue": r[7] || (r[7] = (s) => l(v).header = s),
|
|
291
|
+
type: "checkbox",
|
|
292
|
+
disabled: e.readonly
|
|
293
|
+
}, null, 8, He), [
|
|
294
|
+
[q, l(v).header]
|
|
295
|
+
]),
|
|
296
|
+
h(t(e.messages.childHeader), 1)
|
|
297
|
+
])
|
|
298
|
+
])
|
|
299
|
+
], 64)) : l(i) ? (o(), n(k, { key: 1 }, [
|
|
300
|
+
a("p", Je, t(e.messages.matrixHint), 1),
|
|
301
|
+
(o(), n(k, null, w(["rowFields", "columnFields"], (s) => a("fieldset", {
|
|
302
|
+
key: s,
|
|
303
|
+
class: "mr-data-layout__choices"
|
|
304
|
+
}, [
|
|
305
|
+
a("legend", null, t(e.messages[s]), 1),
|
|
306
|
+
(o(!0), n(k, null, w(l(G), (V) => (o(), n("label", {
|
|
307
|
+
key: V.field
|
|
308
|
+
}, [
|
|
309
|
+
a("input", {
|
|
310
|
+
type: "checkbox",
|
|
311
|
+
checked: l(y)[s].includes(V.field),
|
|
312
|
+
disabled: e.readonly,
|
|
313
|
+
onChange: (u) => l(c).toggleDimension(
|
|
314
|
+
s,
|
|
315
|
+
V.field,
|
|
316
|
+
u.target.checked
|
|
317
|
+
)
|
|
318
|
+
}, null, 40, Ze),
|
|
319
|
+
h(t(V.label), 1)
|
|
320
|
+
]))), 128))
|
|
321
|
+
])), 64)),
|
|
322
|
+
(o(!0), n(k, null, w(l(y).measures, (s, V) => (o(), n("div", {
|
|
323
|
+
key: V,
|
|
324
|
+
class: "mr-data-layout__measure"
|
|
325
|
+
}, [
|
|
326
|
+
a("div", ze, [
|
|
327
|
+
a("label", null, [
|
|
328
|
+
h(t(e.messages.measure), 1),
|
|
329
|
+
$(a("select", {
|
|
330
|
+
"aria-label": e.messages.measure,
|
|
331
|
+
"onUpdate:modelValue": (u) => s.field = u,
|
|
332
|
+
disabled: e.readonly
|
|
333
|
+
}, [
|
|
334
|
+
(o(!0), n(k, null, w(l(G), (u) => (o(), n("option", {
|
|
335
|
+
key: u.field,
|
|
336
|
+
value: u.field
|
|
337
|
+
}, t(u.label), 9, Pe))), 128))
|
|
338
|
+
], 8, qe), [
|
|
339
|
+
[D, s.field]
|
|
340
|
+
])
|
|
341
|
+
]),
|
|
342
|
+
a("label", null, [
|
|
343
|
+
h(t(e.messages.aggregate), 1),
|
|
344
|
+
$(a("select", {
|
|
345
|
+
"aria-label": e.messages.aggregate,
|
|
346
|
+
"onUpdate:modelValue": (u) => s.op = u,
|
|
347
|
+
disabled: e.readonly
|
|
348
|
+
}, [
|
|
349
|
+
(o(!0), n(k, null, w(l(j).aggregates, (u) => (o(), n("option", {
|
|
350
|
+
key: u,
|
|
351
|
+
value: u
|
|
352
|
+
}, t(e.messages[u]), 9, Xe))), 128))
|
|
353
|
+
], 8, Qe), [
|
|
354
|
+
[D, s.op]
|
|
355
|
+
])
|
|
356
|
+
])
|
|
357
|
+
]),
|
|
358
|
+
a("label", null, [
|
|
359
|
+
h(t(e.messages.measureLabel), 1),
|
|
360
|
+
$(a("input", {
|
|
361
|
+
"aria-label": e.messages.measureLabel,
|
|
362
|
+
"onUpdate:modelValue": (u) => s.label = u,
|
|
363
|
+
disabled: e.readonly,
|
|
364
|
+
placeholder: s.field
|
|
365
|
+
}, null, 8, Ye), [
|
|
366
|
+
[H, s.label]
|
|
367
|
+
])
|
|
368
|
+
]),
|
|
369
|
+
s.op === "weightedAvg" ? (o(), n("label", _e, [
|
|
370
|
+
h(t(e.messages.weight), 1),
|
|
371
|
+
$(a("select", {
|
|
372
|
+
"aria-label": e.messages.weight,
|
|
373
|
+
"onUpdate:modelValue": (u) => s.weightField = u,
|
|
374
|
+
disabled: e.readonly
|
|
375
|
+
}, [
|
|
376
|
+
(o(!0), n(k, null, w(l(G), (u) => (o(), n("option", {
|
|
377
|
+
key: u.field,
|
|
378
|
+
value: u.field
|
|
379
|
+
}, t(u.label), 9, el))), 128))
|
|
380
|
+
], 8, pe), [
|
|
381
|
+
[D, s.weightField]
|
|
382
|
+
])
|
|
383
|
+
])) : R("", !0),
|
|
384
|
+
a("div", ll, [
|
|
385
|
+
a("label", null, [
|
|
386
|
+
h(t(e.messages.numeric), 1),
|
|
387
|
+
$(a("select", {
|
|
388
|
+
"aria-label": e.messages.numeric,
|
|
389
|
+
"onUpdate:modelValue": (u) => s.numeric = u,
|
|
390
|
+
disabled: e.readonly
|
|
391
|
+
}, [
|
|
392
|
+
a("option", tl, t(e.messages.number), 1),
|
|
393
|
+
a("option", dl, t(e.messages.decimal), 1)
|
|
394
|
+
], 8, al), [
|
|
395
|
+
[D, s.numeric]
|
|
396
|
+
])
|
|
397
|
+
]),
|
|
398
|
+
a("label", null, [
|
|
399
|
+
h(t(e.messages.digits), 1),
|
|
400
|
+
$(a("input", {
|
|
401
|
+
"aria-label": e.messages.digits,
|
|
402
|
+
"onUpdate:modelValue": (u) => s.digits = u,
|
|
403
|
+
type: "number",
|
|
404
|
+
min: "0",
|
|
405
|
+
max: "100",
|
|
406
|
+
disabled: e.readonly
|
|
407
|
+
}, null, 8, sl), [
|
|
408
|
+
[
|
|
409
|
+
H,
|
|
410
|
+
s.digits,
|
|
411
|
+
void 0,
|
|
412
|
+
{ number: !0 }
|
|
413
|
+
]
|
|
414
|
+
])
|
|
415
|
+
])
|
|
416
|
+
]),
|
|
417
|
+
a("button", {
|
|
418
|
+
type: "button",
|
|
419
|
+
disabled: e.readonly,
|
|
420
|
+
onClick: (u) => l(c).removeMeasure(V)
|
|
421
|
+
}, t(e.messages.remove), 9, il)
|
|
422
|
+
]))), 128)),
|
|
423
|
+
a("button", {
|
|
424
|
+
type: "button",
|
|
425
|
+
disabled: e.readonly || l(y).measures.length >= 32,
|
|
426
|
+
onClick: r[8] || (r[8] = //@ts-ignore
|
|
427
|
+
(...s) => l(c).addMeasure && l(c).addMeasure(...s))
|
|
428
|
+
}, " + " + t(e.messages.addAggregate), 9, ol),
|
|
429
|
+
a("label", nl, [
|
|
430
|
+
$(a("input", {
|
|
431
|
+
"onUpdate:modelValue": r[9] || (r[9] = (s) => l(y).totals = s),
|
|
432
|
+
type: "checkbox",
|
|
433
|
+
disabled: e.readonly
|
|
434
|
+
}, null, 8, ul), [
|
|
435
|
+
[q, l(y).totals]
|
|
436
|
+
]),
|
|
437
|
+
h(t(e.messages.totals), 1)
|
|
438
|
+
]),
|
|
439
|
+
a("details", null, [
|
|
440
|
+
a("summary", null, t(e.messages.widthSettings), 1),
|
|
441
|
+
a("div", rl, [
|
|
442
|
+
a("label", null, [
|
|
443
|
+
h(t(e.messages.dimensionWidth), 1),
|
|
444
|
+
$(a("input", {
|
|
445
|
+
"onUpdate:modelValue": r[10] || (r[10] = (s) => l(y).rowWidthMm = s),
|
|
446
|
+
type: "number",
|
|
447
|
+
min: "1",
|
|
448
|
+
disabled: e.readonly,
|
|
449
|
+
placeholder: "40"
|
|
450
|
+
}, null, 8, ml), [
|
|
451
|
+
[
|
|
452
|
+
H,
|
|
453
|
+
l(y).rowWidthMm,
|
|
454
|
+
void 0,
|
|
455
|
+
{ number: !0 }
|
|
456
|
+
]
|
|
457
|
+
])
|
|
458
|
+
]),
|
|
459
|
+
a("label", null, [
|
|
460
|
+
h(t(e.messages.measureWidth), 1),
|
|
461
|
+
$(a("input", {
|
|
462
|
+
"onUpdate:modelValue": r[11] || (r[11] = (s) => l(y).columnWidthMm = s),
|
|
463
|
+
type: "number",
|
|
464
|
+
min: "1",
|
|
465
|
+
disabled: e.readonly,
|
|
466
|
+
placeholder: "28"
|
|
467
|
+
}, null, 8, cl), [
|
|
468
|
+
[
|
|
469
|
+
H,
|
|
470
|
+
l(y).columnWidthMm,
|
|
471
|
+
void 0,
|
|
472
|
+
{ number: !0 }
|
|
473
|
+
]
|
|
474
|
+
])
|
|
475
|
+
])
|
|
476
|
+
])
|
|
477
|
+
])
|
|
478
|
+
], 64)) : R("", !0),
|
|
479
|
+
a("div", bl, [
|
|
480
|
+
l(i) && e.mode === "matrix" ? (o(), n("button", {
|
|
481
|
+
key: 0,
|
|
482
|
+
type: "button",
|
|
483
|
+
disabled: e.readonly,
|
|
484
|
+
onClick: r[12] || (r[12] = //@ts-ignore
|
|
485
|
+
(...s) => l(c).checkMatrix && l(c).checkMatrix(...s))
|
|
486
|
+
}, t(e.messages.check), 9, vl)) : R("", !0),
|
|
487
|
+
a("button", {
|
|
488
|
+
type: "button",
|
|
489
|
+
class: "mr-data-layout__primary",
|
|
490
|
+
disabled: e.readonly,
|
|
491
|
+
onClick: r[13] || (r[13] = //@ts-ignore
|
|
492
|
+
(...s) => l(c).apply && l(c).apply(...s))
|
|
493
|
+
}, t(e.messages.apply), 9, gl)
|
|
494
|
+
]),
|
|
495
|
+
l(K) ? (o(), n("div", yl, [
|
|
496
|
+
a("p", null, t(e.messages.sample), 1),
|
|
497
|
+
a("table", null, [
|
|
498
|
+
a("thead", null, [
|
|
499
|
+
a("tr", null, [
|
|
500
|
+
(o(!0), n(k, null, w(l(K).columns, (s, V) => (o(), n("th", { key: V }, t(s), 1))), 128))
|
|
501
|
+
])
|
|
502
|
+
]),
|
|
503
|
+
a("tbody", null, [
|
|
504
|
+
(o(!0), n(k, null, w(l(K).rows, (s, V) => (o(), n("tr", { key: V }, [
|
|
505
|
+
(o(!0), n(k, null, w(s, (u, g) => (o(), n("td", { key: g }, t(u ?? "—"), 1))), 128))
|
|
506
|
+
]))), 128))
|
|
507
|
+
])
|
|
508
|
+
])
|
|
509
|
+
])) : R("", !0),
|
|
510
|
+
l(S) ? (o(), n("p", fl, t(l(S)), 1)) : R("", !0)
|
|
511
|
+
]));
|
|
512
|
+
}
|
|
513
|
+
}), kl = /* @__PURE__ */ ee(hl, [["__scopeId", "data-v-57e89011"]]), Vl = { class: "mr-expression__row" }, $l = ["value", "disabled", "aria-label"], Cl = { value: "field" }, wl = { value: "constant" }, xl = {
|
|
514
|
+
key: 0,
|
|
515
|
+
value: "operation"
|
|
516
|
+
}, Ul = { value: "aggregate" }, Sl = ["value", "disabled", "aria-label"], Ml = ["value"], Fl = ["value", "disabled", "aria-label"], El = ["value"], Rl = ["value", "disabled", "aria-label"], Kl = ["value"], Gl = ["value", "disabled", "aria-label"], Dl = { value: "text" }, Nl = { value: "number" }, Tl = { value: "boolean" }, Bl = { value: "null" }, Al = ["value", "disabled", "aria-label"], Ll = {
|
|
517
|
+
key: 0,
|
|
518
|
+
value: ""
|
|
519
|
+
}, Wl = ["value"], Il = ["value", "disabled", "aria-label"], Ol = {
|
|
520
|
+
value: "",
|
|
521
|
+
disabled: ""
|
|
522
|
+
}, jl = ["value"], Hl = ["value", "disabled", "aria-label"], Jl = { value: "true" }, Zl = { value: "false" }, zl = ["type", "value", "disabled", "aria-label"], ql = ["disabled", "aria-label", "onClick"], Pl = ["disabled"], Ql = /* @__PURE__ */ _({
|
|
523
|
+
__name: "ReportExpressionEditor",
|
|
524
|
+
props: {
|
|
525
|
+
modelValue: {},
|
|
526
|
+
fields: {},
|
|
527
|
+
messages: {},
|
|
528
|
+
readonly: { type: Boolean },
|
|
529
|
+
depth: {}
|
|
530
|
+
},
|
|
531
|
+
emits: ["update:modelValue"],
|
|
532
|
+
setup(e, { emit: J }) {
|
|
533
|
+
const x = e, O = J, c = p(), i = Z(
|
|
534
|
+
() => "aggregate" in x.modelValue ? "aggregate" : "field" in x.modelValue ? "field" : "value" in x.modelValue ? "constant" : "operation"
|
|
535
|
+
), v = A("text");
|
|
536
|
+
Y(
|
|
537
|
+
() => x.modelValue,
|
|
538
|
+
(r) => {
|
|
539
|
+
"value" in r && (v.value = r.value === null ? "null" : typeof r.value == "string" ? "text" : typeof r.value);
|
|
540
|
+
},
|
|
541
|
+
{ immediate: !0 }
|
|
542
|
+
);
|
|
543
|
+
function y(r) {
|
|
544
|
+
x.readonly || O("update:modelValue", r);
|
|
545
|
+
}
|
|
546
|
+
function C(r) {
|
|
547
|
+
y(r === "aggregate" ? { aggregate: "sum", field: x.fields[0]?.field ?? "" } : r === "field" ? { field: x.fields[0]?.field ?? "" } : r === "constant" ? { value: "" } : {
|
|
548
|
+
op: "add",
|
|
549
|
+
args: [{ field: x.fields[0]?.field ?? "" }, { value: 0 }]
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
function G(r) {
|
|
553
|
+
const s = r, V = "args" in x.modelValue ? x.modelValue.args : [{ value: 0 }, { value: 0 }];
|
|
554
|
+
y({
|
|
555
|
+
op: s,
|
|
556
|
+
args: s === "divide" || s === "subtract" ? V.slice(0, 2) : V
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
function N(r, s) {
|
|
560
|
+
"args" in x.modelValue && y({
|
|
561
|
+
...x.modelValue,
|
|
562
|
+
args: x.modelValue.args.map(
|
|
563
|
+
(V, u) => u === r ? s : V
|
|
564
|
+
)
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
function S(r) {
|
|
568
|
+
if (!("args" in x.modelValue)) return;
|
|
569
|
+
const s = r === void 0 ? [...x.modelValue.args, { value: 0 }] : x.modelValue.args.filter((V, u) => u !== r);
|
|
570
|
+
y({ ...x.modelValue, args: s });
|
|
571
|
+
}
|
|
572
|
+
function K(r) {
|
|
573
|
+
v.value = r, y({
|
|
574
|
+
value: r === "null" ? null : r === "boolean" ? !1 : r === "number" ? 0 : ""
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
function j(r) {
|
|
578
|
+
v.value === "number" ? r.trim() && Number.isFinite(Number(r)) && y({ value: Number(r) }) : y({ value: r });
|
|
579
|
+
}
|
|
580
|
+
function L(r, s) {
|
|
581
|
+
if (!("aggregate" in x.modelValue)) return;
|
|
582
|
+
const V = { ...x.modelValue, [r]: s };
|
|
583
|
+
r === "aggregate" && (V.aggregate = s), r === "field" && !s && delete V.field, y(V);
|
|
584
|
+
}
|
|
585
|
+
return (r, s) => {
|
|
586
|
+
const V = me("ReportExpressionEditor", !0);
|
|
587
|
+
return o(), n("div", {
|
|
588
|
+
class: te(["mr-expression", { "mr-expression--nested": (e.depth ?? 0) > 0 }])
|
|
589
|
+
}, [
|
|
590
|
+
a("div", Vl, [
|
|
591
|
+
a("select", {
|
|
592
|
+
value: i.value,
|
|
593
|
+
disabled: e.readonly,
|
|
594
|
+
"aria-label": e.messages.argument,
|
|
595
|
+
onChange: s[0] || (s[0] = (u) => C(u.target.value))
|
|
596
|
+
}, [
|
|
597
|
+
a("option", Cl, t(e.messages.field), 1),
|
|
598
|
+
a("option", wl, t(e.messages.constant), 1),
|
|
599
|
+
(e.depth ?? 0) < 12 ? (o(), n("option", xl, t(e.messages.operation), 1)) : R("", !0),
|
|
600
|
+
a("option", Ul, t(e.messages.aggregate), 1)
|
|
601
|
+
], 40, $l),
|
|
602
|
+
"field" in e.modelValue && !("aggregate" in e.modelValue) ? (o(), n("select", {
|
|
603
|
+
key: 0,
|
|
604
|
+
value: e.modelValue.field,
|
|
605
|
+
disabled: e.readonly,
|
|
606
|
+
"aria-label": e.messages.field,
|
|
607
|
+
onChange: s[1] || (s[1] = (u) => y({ field: u.target.value }))
|
|
608
|
+
}, [
|
|
609
|
+
(o(!0), n(k, null, w(e.fields, (u) => (o(), n("option", {
|
|
610
|
+
key: u.field,
|
|
611
|
+
value: u.field
|
|
612
|
+
}, t(u.label), 9, Ml))), 128))
|
|
613
|
+
], 40, Sl)) : "op" in e.modelValue ? (o(), n("select", {
|
|
614
|
+
key: 1,
|
|
615
|
+
value: e.modelValue.op,
|
|
616
|
+
disabled: e.readonly,
|
|
617
|
+
"aria-label": e.messages.operation,
|
|
618
|
+
onChange: s[2] || (s[2] = (u) => G(u.target.value))
|
|
619
|
+
}, [
|
|
620
|
+
(o(!0), n(k, null, w(l(c).operations, (u) => (o(), n("option", {
|
|
621
|
+
key: u,
|
|
622
|
+
value: u
|
|
623
|
+
}, t(e.messages[u]), 9, El))), 128))
|
|
624
|
+
], 40, Fl)) : "aggregate" in e.modelValue ? (o(), n("select", {
|
|
625
|
+
key: 2,
|
|
626
|
+
value: e.modelValue.aggregate,
|
|
627
|
+
disabled: e.readonly,
|
|
628
|
+
"aria-label": e.messages.aggregate,
|
|
629
|
+
onChange: s[3] || (s[3] = (u) => L("aggregate", u.target.value))
|
|
630
|
+
}, [
|
|
631
|
+
(o(!0), n(k, null, w(l(c).aggregates, (u) => (o(), n("option", {
|
|
632
|
+
key: u,
|
|
633
|
+
value: u
|
|
634
|
+
}, t(e.messages[u]), 9, Kl))), 128))
|
|
635
|
+
], 40, Rl)) : (o(), n("select", {
|
|
636
|
+
key: 3,
|
|
637
|
+
value: v.value,
|
|
638
|
+
disabled: e.readonly,
|
|
639
|
+
"aria-label": e.messages.resultType,
|
|
640
|
+
onChange: s[4] || (s[4] = (u) => K(u.target.value))
|
|
641
|
+
}, [
|
|
642
|
+
a("option", Dl, t(e.messages.text), 1),
|
|
643
|
+
a("option", Nl, t(e.messages.number), 1),
|
|
644
|
+
a("option", Tl, t(e.messages.boolean), 1),
|
|
645
|
+
a("option", Bl, t(e.messages.null), 1)
|
|
646
|
+
], 40, Gl))
|
|
647
|
+
]),
|
|
648
|
+
"aggregate" in e.modelValue ? (o(), n(k, { key: 0 }, [
|
|
649
|
+
a("select", {
|
|
650
|
+
value: e.modelValue.field ?? "",
|
|
651
|
+
disabled: e.readonly,
|
|
652
|
+
"aria-label": e.messages.measure,
|
|
653
|
+
onChange: s[5] || (s[5] = (u) => L("field", u.target.value))
|
|
654
|
+
}, [
|
|
655
|
+
e.modelValue.aggregate === "count" ? (o(), n("option", Ll, t(e.messages.allRows), 1)) : R("", !0),
|
|
656
|
+
(o(!0), n(k, null, w(e.fields, (u) => (o(), n("option", {
|
|
657
|
+
key: u.field,
|
|
658
|
+
value: u.field
|
|
659
|
+
}, t(u.label), 9, Wl))), 128))
|
|
660
|
+
], 40, Al),
|
|
661
|
+
e.modelValue.aggregate === "weightedAvg" ? (o(), n("select", {
|
|
662
|
+
key: 0,
|
|
663
|
+
value: e.modelValue.weightField ?? "",
|
|
664
|
+
disabled: e.readonly,
|
|
665
|
+
"aria-label": e.messages.weight,
|
|
666
|
+
onChange: s[6] || (s[6] = (u) => L(
|
|
667
|
+
"weightField",
|
|
668
|
+
u.target.value
|
|
669
|
+
))
|
|
670
|
+
}, [
|
|
671
|
+
a("option", Ol, t(e.messages.weight), 1),
|
|
672
|
+
(o(!0), n(k, null, w(e.fields, (u) => (o(), n("option", {
|
|
673
|
+
key: u.field,
|
|
674
|
+
value: u.field
|
|
675
|
+
}, t(u.label), 9, jl))), 128))
|
|
676
|
+
], 40, Il)) : R("", !0)
|
|
677
|
+
], 64)) : "value" in e.modelValue ? (o(), n(k, { key: 1 }, [
|
|
678
|
+
v.value === "boolean" ? (o(), n("select", {
|
|
679
|
+
key: 0,
|
|
680
|
+
value: String(e.modelValue.value),
|
|
681
|
+
disabled: e.readonly,
|
|
682
|
+
"aria-label": e.messages.constant,
|
|
683
|
+
onChange: s[7] || (s[7] = (u) => y({
|
|
684
|
+
value: u.target.value === "true"
|
|
685
|
+
}))
|
|
686
|
+
}, [
|
|
687
|
+
a("option", Jl, t(e.messages.true), 1),
|
|
688
|
+
a("option", Zl, t(e.messages.false), 1)
|
|
689
|
+
], 40, Hl)) : v.value !== "null" ? (o(), n("input", {
|
|
690
|
+
key: 1,
|
|
691
|
+
type: v.value === "number" ? "number" : "text",
|
|
692
|
+
value: e.modelValue.value ?? "",
|
|
693
|
+
disabled: e.readonly,
|
|
694
|
+
"aria-label": e.messages.constant,
|
|
695
|
+
onInput: s[8] || (s[8] = (u) => j(u.target.value))
|
|
696
|
+
}, null, 40, zl)) : R("", !0)
|
|
697
|
+
], 64)) : "args" in e.modelValue ? (o(), n(k, { key: 2 }, [
|
|
698
|
+
(o(!0), n(k, null, w(e.modelValue.args, (u, g) => (o(), n("div", {
|
|
699
|
+
key: g,
|
|
700
|
+
class: "mr-expression__argument"
|
|
701
|
+
}, [
|
|
702
|
+
ce(V, {
|
|
703
|
+
"model-value": u,
|
|
704
|
+
fields: e.fields,
|
|
705
|
+
messages: e.messages,
|
|
706
|
+
readonly: e.readonly,
|
|
707
|
+
depth: (e.depth ?? 0) + 1,
|
|
708
|
+
"onUpdate:modelValue": (M) => N(g, M)
|
|
709
|
+
}, null, 8, ["model-value", "fields", "messages", "readonly", "depth", "onUpdate:modelValue"]),
|
|
710
|
+
e.modelValue.args.length > 2 ? (o(), n("button", {
|
|
711
|
+
key: 0,
|
|
712
|
+
type: "button",
|
|
713
|
+
disabled: e.readonly,
|
|
714
|
+
"aria-label": `${e.messages.remove} ${e.messages.argument} ${g + 1}`,
|
|
715
|
+
onClick: (M) => S(g)
|
|
716
|
+
}, " × ", 8, ql)) : R("", !0)
|
|
717
|
+
]))), 128)),
|
|
718
|
+
!["subtract", "divide"].includes(e.modelValue.op) && e.modelValue.args.length < 16 ? (o(), n("button", {
|
|
719
|
+
key: 0,
|
|
720
|
+
type: "button",
|
|
721
|
+
disabled: e.readonly,
|
|
722
|
+
onClick: s[9] || (s[9] = (u) => S())
|
|
723
|
+
}, " + " + t(e.messages.addArgument), 9, Pl)) : R("", !0)
|
|
724
|
+
], 64)) : R("", !0)
|
|
725
|
+
], 2);
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
}), Xl = /* @__PURE__ */ ee(Ql, [["__scopeId", "data-v-84e5c0e5"]]), I = (e) => JSON.parse(JSON.stringify(e));
|
|
729
|
+
function Yl(e, J) {
|
|
730
|
+
const x = Z(() => ({
|
|
731
|
+
...fe,
|
|
732
|
+
...e.messages
|
|
733
|
+
})), O = A("computations"), c = A(""), i = A(""), v = A({
|
|
734
|
+
field: "",
|
|
735
|
+
expression: { field: "" },
|
|
736
|
+
scope: "row"
|
|
737
|
+
}), y = A([]), C = A(0), G = A(""), N = A(-1), S = A("style"), K = A({ field: "", op: ">", value: 0 }), j = A({
|
|
738
|
+
color: "#b91c1c",
|
|
739
|
+
backgroundColor: "#fff1f2",
|
|
740
|
+
bold: !1
|
|
741
|
+
}), L = A([]), r = Z(() => {
|
|
742
|
+
const b = /* @__PURE__ */ new Map();
|
|
743
|
+
for (const f of e.datasetSchema?.fields ?? [])
|
|
744
|
+
b.set(f.field, f.label ?? f.field);
|
|
745
|
+
for (const f of e.list.columns)
|
|
746
|
+
b.has(f.field) || b.set(f.field, f.header || f.field);
|
|
747
|
+
for (const f of Object.keys(
|
|
748
|
+
e.datasets?.[e.list.dataset]?.[0] ?? {}
|
|
749
|
+
))
|
|
750
|
+
b.has(f) || b.set(f, f);
|
|
751
|
+
return [...b].map(([f, E]) => ({ field: f, label: E }));
|
|
752
|
+
}), s = Z(() => y.value[C.value]), V = Z(
|
|
753
|
+
() => e.list.columns.find((b) => b.field === G.value)
|
|
754
|
+
), u = Z(() => ve(F()));
|
|
755
|
+
function g() {
|
|
756
|
+
y.value = I(
|
|
757
|
+
e.list.groups ?? (e.list.groupBy ? [e.list.groupBy] : [])
|
|
758
|
+
), e.list.columns.some((b) => b.field === G.value) || (G.value = e.list.columns[0]?.field ?? ""), c.value = "", L.value = [], M(i.value), le(-1);
|
|
759
|
+
}
|
|
760
|
+
Y(() => e.list, g, { immediate: !0 });
|
|
761
|
+
function M(b) {
|
|
762
|
+
i.value = b, v.value = I(
|
|
763
|
+
e.list.computed?.find((f) => f.field === b) ?? {
|
|
764
|
+
field: "",
|
|
765
|
+
expression: { field: r.value[0]?.field ?? "" },
|
|
766
|
+
scope: "row"
|
|
767
|
+
}
|
|
768
|
+
), L.value = [], c.value = "";
|
|
769
|
+
}
|
|
770
|
+
function F() {
|
|
771
|
+
return [
|
|
772
|
+
...(e.list.computed ?? []).filter((f) => f.field !== i.value),
|
|
773
|
+
I(v.value)
|
|
774
|
+
];
|
|
775
|
+
}
|
|
776
|
+
function B(b) {
|
|
777
|
+
if (e.readonly) return !1;
|
|
778
|
+
const f = ye({
|
|
779
|
+
pages: [
|
|
780
|
+
{
|
|
781
|
+
widthMm: Math.max(1, b.leftMm + b.widthMm),
|
|
782
|
+
heightMm: 297,
|
|
783
|
+
components: [b]
|
|
784
|
+
}
|
|
785
|
+
]
|
|
786
|
+
});
|
|
787
|
+
return f.ok ? (c.value = "", J(b), !0) : (c.value = f.errors.map((E) => E.message).slice(0, 3).join(";"), !1);
|
|
788
|
+
}
|
|
789
|
+
function T() {
|
|
790
|
+
if (!v.value.field.trim()) {
|
|
791
|
+
c.value = x.value.missingTarget;
|
|
792
|
+
return;
|
|
793
|
+
}
|
|
794
|
+
const b = I(e.list);
|
|
795
|
+
b.computed = F(), b.columns.some((f) => f.field === v.value.field) || b.columns.push({
|
|
796
|
+
field: v.value.field,
|
|
797
|
+
header: v.value.field,
|
|
798
|
+
widthMm: 30,
|
|
799
|
+
semanticRole: "measure",
|
|
800
|
+
align: "right",
|
|
801
|
+
editable: !1,
|
|
802
|
+
format: {
|
|
803
|
+
kind: "number",
|
|
804
|
+
...v.value.digits === void 0 ? {} : { digits: v.value.digits }
|
|
805
|
+
}
|
|
806
|
+
}), B(b) && (i.value = v.value.field);
|
|
807
|
+
}
|
|
808
|
+
function m() {
|
|
809
|
+
if (!i.value) return;
|
|
810
|
+
const b = I(e.list);
|
|
811
|
+
b.computed = (b.computed ?? []).filter(
|
|
812
|
+
(f) => f.field !== i.value
|
|
813
|
+
), B(b) && M("");
|
|
814
|
+
}
|
|
815
|
+
function d() {
|
|
816
|
+
L.value = [], c.value = "";
|
|
817
|
+
const b = e.datasets?.[e.list.dataset];
|
|
818
|
+
if (!b?.length) {
|
|
819
|
+
c.value = x.value.noData;
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
try {
|
|
823
|
+
const f = ge(b.slice(0, 1e3), {
|
|
824
|
+
fields: F(),
|
|
825
|
+
maxRows: 1e3,
|
|
826
|
+
maxCells: 2e6
|
|
827
|
+
});
|
|
828
|
+
L.value = f.rows.slice(0, 5).map((E, z) => ({
|
|
829
|
+
row: z + 1,
|
|
830
|
+
value: E[v.value.field]
|
|
831
|
+
}));
|
|
832
|
+
} catch (f) {
|
|
833
|
+
c.value = f instanceof Error ? f.message : String(f);
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
function W(b) {
|
|
837
|
+
v.value.expression = b;
|
|
838
|
+
}
|
|
839
|
+
function U(b, f) {
|
|
840
|
+
v.value.groupBy = f ? [...v.value.groupBy ?? [], b] : (v.value.groupBy ?? []).filter((E) => E !== b);
|
|
841
|
+
}
|
|
842
|
+
function de() {
|
|
843
|
+
y.value.push({
|
|
844
|
+
field: r.value[0]?.field ?? "",
|
|
845
|
+
headerTemplate: "{value}",
|
|
846
|
+
subtotalLabel: x.value.subtotalLabel,
|
|
847
|
+
aggregates: [],
|
|
848
|
+
keepWithNext: !0
|
|
849
|
+
}), C.value = y.value.length - 1;
|
|
850
|
+
}
|
|
851
|
+
function se(b) {
|
|
852
|
+
const f = C.value, E = f + b;
|
|
853
|
+
E < 0 || E >= y.value.length || ([y.value[f], y.value[E]] = [
|
|
854
|
+
y.value[E],
|
|
855
|
+
y.value[f]
|
|
856
|
+
], C.value = E);
|
|
857
|
+
}
|
|
858
|
+
function ie() {
|
|
859
|
+
y.value.splice(C.value, 1), C.value = Math.max(
|
|
860
|
+
0,
|
|
861
|
+
Math.min(C.value, y.value.length - 1)
|
|
862
|
+
);
|
|
863
|
+
}
|
|
864
|
+
function oe() {
|
|
865
|
+
s.value && (s.value.aggregates ??= []).push({
|
|
866
|
+
field: r.value[0]?.field ?? "",
|
|
867
|
+
op: "sum"
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
function ne() {
|
|
871
|
+
const b = I(e.list);
|
|
872
|
+
b.groups = I(y.value), delete b.groupBy, B(b);
|
|
873
|
+
}
|
|
874
|
+
function le(b) {
|
|
875
|
+
N.value = b;
|
|
876
|
+
const f = S.value === "cell" ? V.value?.visibleWhen : S.value === "rowVisibility" ? e.list.rowVisibleWhen : V.value?.rules?.[b]?.when;
|
|
877
|
+
K.value = I(f ?? { field: G.value, op: ">", value: 0 });
|
|
878
|
+
const E = V.value?.rules?.[b]?.style;
|
|
879
|
+
j.value = {
|
|
880
|
+
color: String(E?.color ?? "#b91c1c"),
|
|
881
|
+
backgroundColor: String(E?.backgroundColor ?? "#fff1f2"),
|
|
882
|
+
bold: E?.bold === !0
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
function ue(b) {
|
|
886
|
+
const f = e.datasetSchema?.fields.find(
|
|
887
|
+
(X) => X.field === K.value.field
|
|
888
|
+
), E = e.datasets?.[e.list.dataset]?.find(
|
|
889
|
+
(X) => X[K.value.field] != null
|
|
890
|
+
)?.[K.value.field], z = f?.type === "number" || !f && typeof E == "number";
|
|
891
|
+
f?.type === "decimal" ? K.value.numeric = "decimal" : z ? K.value.numeric = "number" : delete K.value.numeric, K.value.value = z && b.trim() && Number.isFinite(Number(b)) ? Number(b) : b;
|
|
892
|
+
}
|
|
893
|
+
function re(b = !1) {
|
|
894
|
+
const f = I(e.list), E = f.columns.find((z) => z.field === G.value);
|
|
895
|
+
if (!E) {
|
|
896
|
+
c.value = x.value.noSelection;
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
if (S.value === "rowVisibility")
|
|
900
|
+
b ? delete f.rowVisibleWhen : f.rowVisibleWhen = I(K.value);
|
|
901
|
+
else if (S.value === "cell")
|
|
902
|
+
b ? delete E.visibleWhen : E.visibleWhen = I(K.value);
|
|
903
|
+
else if (E.rules ??= [], b && N.value >= 0)
|
|
904
|
+
E.rules.splice(N.value, 1);
|
|
905
|
+
else {
|
|
906
|
+
if (b) return;
|
|
907
|
+
N.value < 0 ? E.rules.push({
|
|
908
|
+
when: I(K.value),
|
|
909
|
+
style: { ...j.value }
|
|
910
|
+
}) : E.rules[N.value] = {
|
|
911
|
+
when: I(K.value),
|
|
912
|
+
style: { ...j.value }
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
B(f);
|
|
916
|
+
}
|
|
917
|
+
return {
|
|
918
|
+
m: x,
|
|
919
|
+
tab: O,
|
|
920
|
+
fields: r,
|
|
921
|
+
formula: v,
|
|
922
|
+
groups: y,
|
|
923
|
+
groupIndex: C,
|
|
924
|
+
currentGroup: s,
|
|
925
|
+
column: G,
|
|
926
|
+
currentColumn: V,
|
|
927
|
+
conditionIndex: N,
|
|
928
|
+
effect: S,
|
|
929
|
+
when: K,
|
|
930
|
+
style: j,
|
|
931
|
+
error: c,
|
|
932
|
+
preview: L,
|
|
933
|
+
diagnostics: u,
|
|
934
|
+
selectedComputed: i,
|
|
935
|
+
loadComputed: M,
|
|
936
|
+
applyComputed: T,
|
|
937
|
+
removeComputed: m,
|
|
938
|
+
check: d,
|
|
939
|
+
setExpression: W,
|
|
940
|
+
toggleGroupField: U,
|
|
941
|
+
addGroup: de,
|
|
942
|
+
moveGroup: se,
|
|
943
|
+
removeGroup: ie,
|
|
944
|
+
addAggregate: oe,
|
|
945
|
+
applyGroups: ne,
|
|
946
|
+
loadCondition: le,
|
|
947
|
+
setThreshold: ue,
|
|
948
|
+
applyCondition: re,
|
|
949
|
+
applyLayout: B
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
const _l = ["aria-label"], pl = ["aria-label"], ea = ["aria-selected", "onClick"], la = { key: 0 }, aa = { key: 1 }, ta = {
|
|
953
|
+
key: 0,
|
|
954
|
+
class: "mr-rule-editor__panel"
|
|
955
|
+
}, da = ["aria-label", "value", "disabled"], sa = { value: "" }, ia = ["value"], oa = ["aria-label", "disabled"], na = { class: "mr-rule-editor__pair" }, ua = ["aria-label", "disabled"], ra = ["value"], ma = ["aria-label", "disabled"], ca = { value: "number" }, ba = { value: "decimal" }, va = {
|
|
956
|
+
key: 0,
|
|
957
|
+
class: "mr-rule-editor__checks"
|
|
958
|
+
}, ga = ["checked", "disabled", "onChange"], ya = {
|
|
959
|
+
key: 2,
|
|
960
|
+
class: "mr-rule-editor__hint"
|
|
961
|
+
}, fa = { class: "mr-rule-editor__advanced" }, ha = ["aria-label", "disabled"], ka = ["aria-label", "disabled"], Va = { value: "propagate" }, $a = { value: "error" }, Ca = ["aria-label", "disabled"], wa = { value: "error" }, xa = { value: "null" }, Ua = {
|
|
962
|
+
key: 3,
|
|
963
|
+
class: "mr-rule-editor__hint"
|
|
964
|
+
}, Sa = {
|
|
965
|
+
key: 4,
|
|
966
|
+
class: "mr-rule-editor__diagnostic"
|
|
967
|
+
}, Ma = { class: "mr-rule-editor__actions" }, Fa = ["disabled"], Ea = ["disabled"], Ra = ["disabled"], Ka = {
|
|
968
|
+
key: 5,
|
|
969
|
+
class: "mr-rule-editor__results"
|
|
970
|
+
}, Ga = {
|
|
971
|
+
key: 6,
|
|
972
|
+
class: "mr-rule-editor__error"
|
|
973
|
+
}, Da = {
|
|
974
|
+
key: 1,
|
|
975
|
+
class: "mr-rule-editor__panel"
|
|
976
|
+
}, Na = { class: "mr-rule-editor__pair" }, Ta = ["aria-label"], Ba = ["value"], Aa = {
|
|
977
|
+
key: 0,
|
|
978
|
+
value: 0
|
|
979
|
+
}, La = ["disabled"], Wa = ["aria-label", "disabled"], Ia = ["value"], Oa = { class: "mr-rule-editor__pair" }, ja = ["aria-label", "disabled"], Ha = ["aria-label", "disabled"], Ja = { class: "mr-rule-editor__checks" }, Za = ["disabled"], za = ["disabled"], qa = { class: "mr-rule-editor__pair" }, Pa = ["aria-label", "onUpdate:modelValue", "disabled"], Qa = ["value"], Xa = ["aria-label", "onUpdate:modelValue", "disabled"], Ya = ["value"], _a = ["aria-label", "onUpdate:modelValue", "disabled"], pa = { value: void 0 }, et = ["value"], lt = { key: 0 }, at = ["aria-label", "onUpdate:modelValue", "disabled"], tt = ["value"], dt = { class: "mr-rule-editor__pair" }, st = ["onUpdate:modelValue", "disabled", "aria-label"], it = { value: "number" }, ot = { value: "decimal" }, nt = ["disabled", "onClick"], ut = ["disabled"], rt = { class: "mr-rule-editor__actions" }, mt = ["disabled", "aria-label"], ct = ["disabled", "aria-label"], bt = ["disabled"], vt = ["disabled"], gt = {
|
|
980
|
+
key: 2,
|
|
981
|
+
class: "mr-rule-editor__panel"
|
|
982
|
+
}, yt = ["aria-label", "disabled"], ft = ["value"], ht = ["aria-label", "disabled"], kt = { value: "style" }, Vt = { value: "cell" }, $t = { value: "rowVisibility" }, Ct = { key: 0 }, wt = ["aria-label", "value", "disabled"], xt = { value: -1 }, Ut = ["value"], St = ["aria-label", "disabled"], Mt = ["value"], Ft = { class: "mr-rule-editor__pair" }, Et = ["aria-label", "disabled"], Rt = ["value"], Kt = ["value", "disabled"], Gt = { class: "mr-rule-editor__pair" }, Dt = ["disabled"], Nt = ["disabled"], Tt = { class: "mr-rule-editor__check" }, Bt = ["disabled"], At = { class: "mr-rule-editor__actions" }, Lt = ["disabled"], Wt = ["disabled"], It = {
|
|
983
|
+
key: 4,
|
|
984
|
+
class: "mr-rule-editor__error",
|
|
985
|
+
role: "alert"
|
|
986
|
+
}, Ot = /* @__PURE__ */ _({
|
|
987
|
+
__name: "RuleEditor",
|
|
988
|
+
props: {
|
|
989
|
+
list: {},
|
|
990
|
+
datasets: {},
|
|
991
|
+
datasetSchema: {},
|
|
992
|
+
datasetSchemas: {},
|
|
993
|
+
readonly: { type: Boolean },
|
|
994
|
+
messages: {}
|
|
995
|
+
},
|
|
996
|
+
emits: ["change"],
|
|
997
|
+
setup(e, { emit: J }) {
|
|
998
|
+
const x = e, O = J, c = Yl(x, (T) => O("change", T)), {
|
|
999
|
+
m: i,
|
|
1000
|
+
tab: v,
|
|
1001
|
+
fields: y,
|
|
1002
|
+
formula: C,
|
|
1003
|
+
groups: G,
|
|
1004
|
+
groupIndex: N,
|
|
1005
|
+
currentGroup: S,
|
|
1006
|
+
column: K,
|
|
1007
|
+
currentColumn: j,
|
|
1008
|
+
conditionIndex: L,
|
|
1009
|
+
effect: r,
|
|
1010
|
+
when: s,
|
|
1011
|
+
style: V,
|
|
1012
|
+
error: u,
|
|
1013
|
+
preview: g,
|
|
1014
|
+
diagnostics: M,
|
|
1015
|
+
selectedComputed: F
|
|
1016
|
+
} = c, B = p();
|
|
1017
|
+
return (T, m) => (o(), n("section", {
|
|
1018
|
+
class: "mr-rule-editor",
|
|
1019
|
+
"aria-label": l(i).settings
|
|
1020
|
+
}, [
|
|
1021
|
+
a("div", {
|
|
1022
|
+
class: "mr-rule-editor__tabs",
|
|
1023
|
+
role: "tablist",
|
|
1024
|
+
"aria-label": l(i).settings
|
|
1025
|
+
}, [
|
|
1026
|
+
(o(), n(k, null, w([
|
|
1027
|
+
"computations",
|
|
1028
|
+
"groups",
|
|
1029
|
+
"conditions",
|
|
1030
|
+
"detail",
|
|
1031
|
+
"matrix"
|
|
1032
|
+
], (d) => a("button", {
|
|
1033
|
+
key: d,
|
|
1034
|
+
type: "button",
|
|
1035
|
+
role: "tab",
|
|
1036
|
+
"aria-selected": l(v) === d,
|
|
1037
|
+
class: te({ "is-active": l(v) === d }),
|
|
1038
|
+
onClick: (W) => v.value = d
|
|
1039
|
+
}, [
|
|
1040
|
+
h(t(l(i)[d]), 1),
|
|
1041
|
+
d === "computations" && e.list.computed?.length ? (o(), n("span", la, t(e.list.computed.length), 1)) : R("", !0),
|
|
1042
|
+
d === "groups" && l(G).length ? (o(), n("span", aa, t(l(G).length), 1)) : R("", !0)
|
|
1043
|
+
], 10, ea)), 64))
|
|
1044
|
+
], 8, pl),
|
|
1045
|
+
l(v) === "computations" ? (o(), n("div", ta, [
|
|
1046
|
+
a("label", null, [
|
|
1047
|
+
h(t(l(i).existing), 1),
|
|
1048
|
+
a("select", {
|
|
1049
|
+
"aria-label": l(i).existing,
|
|
1050
|
+
value: l(F),
|
|
1051
|
+
disabled: e.readonly,
|
|
1052
|
+
onChange: m[0] || (m[0] = (d) => l(c).loadComputed(d.target.value))
|
|
1053
|
+
}, [
|
|
1054
|
+
a("option", sa, "+ " + t(l(i).newField), 1),
|
|
1055
|
+
(o(!0), n(k, null, w(e.list.computed, (d) => (o(), n("option", {
|
|
1056
|
+
key: d.field,
|
|
1057
|
+
value: d.field
|
|
1058
|
+
}, t(d.field), 9, ia))), 128))
|
|
1059
|
+
], 40, da)
|
|
1060
|
+
]),
|
|
1061
|
+
a("label", null, [
|
|
1062
|
+
h(t(l(i).target), 1),
|
|
1063
|
+
$(a("input", {
|
|
1064
|
+
"aria-label": l(i).target,
|
|
1065
|
+
"onUpdate:modelValue": m[1] || (m[1] = (d) => l(C).field = d),
|
|
1066
|
+
disabled: e.readonly,
|
|
1067
|
+
autocomplete: "off"
|
|
1068
|
+
}, null, 8, oa), [
|
|
1069
|
+
[H, l(C).field]
|
|
1070
|
+
])
|
|
1071
|
+
]),
|
|
1072
|
+
a("div", na, [
|
|
1073
|
+
a("label", null, [
|
|
1074
|
+
h(t(l(i).scope), 1),
|
|
1075
|
+
$(a("select", {
|
|
1076
|
+
"aria-label": l(i).scope,
|
|
1077
|
+
"onUpdate:modelValue": m[2] || (m[2] = (d) => l(C).scope = d),
|
|
1078
|
+
disabled: e.readonly
|
|
1079
|
+
}, [
|
|
1080
|
+
(o(!0), n(k, null, w(l(B).scopes, (d) => (o(), n("option", {
|
|
1081
|
+
key: d,
|
|
1082
|
+
value: d
|
|
1083
|
+
}, t(l(i)[d]), 9, ra))), 128))
|
|
1084
|
+
], 8, ua), [
|
|
1085
|
+
[D, l(C).scope]
|
|
1086
|
+
])
|
|
1087
|
+
]),
|
|
1088
|
+
a("label", null, [
|
|
1089
|
+
h(t(l(i).numeric), 1),
|
|
1090
|
+
$(a("select", {
|
|
1091
|
+
"aria-label": l(i).numeric,
|
|
1092
|
+
"onUpdate:modelValue": m[3] || (m[3] = (d) => l(C).numeric = d),
|
|
1093
|
+
disabled: e.readonly
|
|
1094
|
+
}, [
|
|
1095
|
+
a("option", ca, t(l(i).number), 1),
|
|
1096
|
+
a("option", ba, t(l(i).decimal), 1)
|
|
1097
|
+
], 8, ma), [
|
|
1098
|
+
[D, l(C).numeric]
|
|
1099
|
+
])
|
|
1100
|
+
])
|
|
1101
|
+
]),
|
|
1102
|
+
l(C).scope === "group" ? (o(), n("fieldset", va, [
|
|
1103
|
+
a("legend", null, t(l(i).groupFields), 1),
|
|
1104
|
+
(o(!0), n(k, null, w(l(y), (d) => (o(), n("label", {
|
|
1105
|
+
key: d.field
|
|
1106
|
+
}, [
|
|
1107
|
+
a("input", {
|
|
1108
|
+
type: "checkbox",
|
|
1109
|
+
checked: l(C).groupBy?.includes(d.field),
|
|
1110
|
+
disabled: e.readonly,
|
|
1111
|
+
onChange: (W) => l(c).toggleGroupField(
|
|
1112
|
+
d.field,
|
|
1113
|
+
W.target.checked
|
|
1114
|
+
)
|
|
1115
|
+
}, null, 40, ga),
|
|
1116
|
+
h(t(d.label), 1)
|
|
1117
|
+
]))), 128))
|
|
1118
|
+
])) : R("", !0),
|
|
1119
|
+
typeof l(C).expression != "string" ? (o(), ae(Xl, {
|
|
1120
|
+
key: 1,
|
|
1121
|
+
"model-value": l(C).expression,
|
|
1122
|
+
fields: l(y),
|
|
1123
|
+
messages: l(i),
|
|
1124
|
+
readonly: e.readonly,
|
|
1125
|
+
"onUpdate:modelValue": l(c).setExpression
|
|
1126
|
+
}, null, 8, ["model-value", "fields", "messages", "readonly", "onUpdate:modelValue"])) : (o(), n("p", ya, t(l(C).expression), 1)),
|
|
1127
|
+
a("details", null, [
|
|
1128
|
+
a("summary", null, t(l(i).advanced), 1),
|
|
1129
|
+
a("div", fa, [
|
|
1130
|
+
a("label", null, [
|
|
1131
|
+
h(t(l(i).digits), 1),
|
|
1132
|
+
$(a("input", {
|
|
1133
|
+
"aria-label": l(i).digits,
|
|
1134
|
+
"onUpdate:modelValue": m[4] || (m[4] = (d) => l(C).digits = d),
|
|
1135
|
+
type: "number",
|
|
1136
|
+
min: "0",
|
|
1137
|
+
max: "100",
|
|
1138
|
+
disabled: e.readonly
|
|
1139
|
+
}, null, 8, ha), [
|
|
1140
|
+
[
|
|
1141
|
+
H,
|
|
1142
|
+
l(C).digits,
|
|
1143
|
+
void 0,
|
|
1144
|
+
{ number: !0 }
|
|
1145
|
+
]
|
|
1146
|
+
])
|
|
1147
|
+
]),
|
|
1148
|
+
a("label", null, [
|
|
1149
|
+
h(t(l(i).nulls), 1),
|
|
1150
|
+
$(a("select", {
|
|
1151
|
+
"aria-label": l(i).nulls,
|
|
1152
|
+
"onUpdate:modelValue": m[5] || (m[5] = (d) => l(C).nulls = d),
|
|
1153
|
+
disabled: e.readonly
|
|
1154
|
+
}, [
|
|
1155
|
+
a("option", Va, t(l(i).propagate), 1),
|
|
1156
|
+
a("option", $a, t(l(i).error), 1)
|
|
1157
|
+
], 8, ka), [
|
|
1158
|
+
[D, l(C).nulls]
|
|
1159
|
+
])
|
|
1160
|
+
]),
|
|
1161
|
+
a("label", null, [
|
|
1162
|
+
h(t(l(i).division), 1),
|
|
1163
|
+
$(a("select", {
|
|
1164
|
+
"aria-label": l(i).division,
|
|
1165
|
+
"onUpdate:modelValue": m[6] || (m[6] = (d) => l(C).divisionByZero = d),
|
|
1166
|
+
disabled: e.readonly
|
|
1167
|
+
}, [
|
|
1168
|
+
a("option", wa, t(l(i).error), 1),
|
|
1169
|
+
a("option", xa, t(l(i).propagate), 1)
|
|
1170
|
+
], 8, Ca), [
|
|
1171
|
+
[D, l(C).divisionByZero]
|
|
1172
|
+
])
|
|
1173
|
+
])
|
|
1174
|
+
])
|
|
1175
|
+
]),
|
|
1176
|
+
l(C).numeric === "decimal" ? (o(), n("p", Ua, t(l(i).decimalHint), 1)) : R("", !0),
|
|
1177
|
+
l(M).valid && l(C).field ? (o(), n("div", Sa, [
|
|
1178
|
+
h(t(l(i).dependencies), 1),
|
|
1179
|
+
a("strong", null, t(l(M).order.join(" → ")), 1)
|
|
1180
|
+
])) : R("", !0),
|
|
1181
|
+
a("div", Ma, [
|
|
1182
|
+
a("button", {
|
|
1183
|
+
type: "button",
|
|
1184
|
+
disabled: e.readonly,
|
|
1185
|
+
onClick: m[7] || (m[7] = //@ts-ignore
|
|
1186
|
+
(...d) => l(c).check && l(c).check(...d))
|
|
1187
|
+
}, t(l(i).check), 9, Fa),
|
|
1188
|
+
a("button", {
|
|
1189
|
+
type: "button",
|
|
1190
|
+
class: "mr-rule-editor__primary",
|
|
1191
|
+
disabled: e.readonly || !l(M).valid,
|
|
1192
|
+
onClick: m[8] || (m[8] = //@ts-ignore
|
|
1193
|
+
(...d) => l(c).applyComputed && l(c).applyComputed(...d))
|
|
1194
|
+
}, t(l(i).apply), 9, Ea),
|
|
1195
|
+
l(F) ? (o(), n("button", {
|
|
1196
|
+
key: 0,
|
|
1197
|
+
type: "button",
|
|
1198
|
+
disabled: e.readonly,
|
|
1199
|
+
onClick: m[9] || (m[9] = //@ts-ignore
|
|
1200
|
+
(...d) => l(c).removeComputed && l(c).removeComputed(...d))
|
|
1201
|
+
}, t(l(i).remove), 9, Ra)) : R("", !0)
|
|
1202
|
+
]),
|
|
1203
|
+
l(g).length ? (o(), n("div", Ka, [
|
|
1204
|
+
a("p", null, t(l(i).sample), 1),
|
|
1205
|
+
a("dl", null, [
|
|
1206
|
+
(o(!0), n(k, null, w(l(g), (d) => (o(), n(k, {
|
|
1207
|
+
key: d.row
|
|
1208
|
+
}, [
|
|
1209
|
+
a("dt", null, t(d.row), 1),
|
|
1210
|
+
a("dd", null, t(d.value ?? "—"), 1)
|
|
1211
|
+
], 64))), 128))
|
|
1212
|
+
])
|
|
1213
|
+
])) : R("", !0),
|
|
1214
|
+
!l(M).valid && l(C).field ? (o(), n("p", Ga, t(l(M).errors.join(";")), 1)) : R("", !0)
|
|
1215
|
+
])) : l(v) === "groups" ? (o(), n("div", Da, [
|
|
1216
|
+
a("div", Na, [
|
|
1217
|
+
$(a("select", {
|
|
1218
|
+
"onUpdate:modelValue": m[10] || (m[10] = (d) => Q(N) ? N.value = d : null),
|
|
1219
|
+
"aria-label": l(i).groups
|
|
1220
|
+
}, [
|
|
1221
|
+
(o(!0), n(k, null, w(l(G), (d, W) => (o(), n("option", {
|
|
1222
|
+
key: W,
|
|
1223
|
+
value: W
|
|
1224
|
+
}, t(W + 1) + " · " + t(d.field), 9, Ba))), 128)),
|
|
1225
|
+
l(G).length ? R("", !0) : (o(), n("option", Aa, t(l(i).noGroups), 1))
|
|
1226
|
+
], 8, Ta), [
|
|
1227
|
+
[
|
|
1228
|
+
D,
|
|
1229
|
+
l(N),
|
|
1230
|
+
void 0,
|
|
1231
|
+
{ number: !0 }
|
|
1232
|
+
]
|
|
1233
|
+
]),
|
|
1234
|
+
a("button", {
|
|
1235
|
+
type: "button",
|
|
1236
|
+
disabled: e.readonly || l(G).length >= 16,
|
|
1237
|
+
onClick: m[11] || (m[11] = //@ts-ignore
|
|
1238
|
+
(...d) => l(c).addGroup && l(c).addGroup(...d))
|
|
1239
|
+
}, " + " + t(l(i).addGroup), 9, La)
|
|
1240
|
+
]),
|
|
1241
|
+
l(S) ? (o(), n(k, { key: 0 }, [
|
|
1242
|
+
a("label", null, [
|
|
1243
|
+
h(t(l(i).field), 1),
|
|
1244
|
+
$(a("select", {
|
|
1245
|
+
"aria-label": l(i).field,
|
|
1246
|
+
"onUpdate:modelValue": m[12] || (m[12] = (d) => l(S).field = d),
|
|
1247
|
+
disabled: e.readonly
|
|
1248
|
+
}, [
|
|
1249
|
+
(o(!0), n(k, null, w(l(y), (d) => (o(), n("option", {
|
|
1250
|
+
key: d.field,
|
|
1251
|
+
value: d.field
|
|
1252
|
+
}, t(d.label), 9, Ia))), 128))
|
|
1253
|
+
], 8, Wa), [
|
|
1254
|
+
[D, l(S).field]
|
|
1255
|
+
])
|
|
1256
|
+
]),
|
|
1257
|
+
a("div", Oa, [
|
|
1258
|
+
a("label", null, [
|
|
1259
|
+
h(t(l(i).header), 1),
|
|
1260
|
+
$(a("input", {
|
|
1261
|
+
"aria-label": l(i).header,
|
|
1262
|
+
"onUpdate:modelValue": m[13] || (m[13] = (d) => l(S).headerTemplate = d),
|
|
1263
|
+
disabled: e.readonly,
|
|
1264
|
+
placeholder: "{value}"
|
|
1265
|
+
}, null, 8, ja), [
|
|
1266
|
+
[H, l(S).headerTemplate]
|
|
1267
|
+
])
|
|
1268
|
+
]),
|
|
1269
|
+
a("label", null, [
|
|
1270
|
+
h(t(l(i).footer), 1),
|
|
1271
|
+
$(a("input", {
|
|
1272
|
+
"aria-label": l(i).footer,
|
|
1273
|
+
"onUpdate:modelValue": m[14] || (m[14] = (d) => l(S).subtotalLabel = d),
|
|
1274
|
+
disabled: e.readonly
|
|
1275
|
+
}, null, 8, Ha), [
|
|
1276
|
+
[H, l(S).subtotalLabel]
|
|
1277
|
+
])
|
|
1278
|
+
])
|
|
1279
|
+
]),
|
|
1280
|
+
a("div", Ja, [
|
|
1281
|
+
a("label", null, [
|
|
1282
|
+
$(a("input", {
|
|
1283
|
+
"onUpdate:modelValue": m[15] || (m[15] = (d) => l(S).keepWithNext = d),
|
|
1284
|
+
type: "checkbox",
|
|
1285
|
+
disabled: e.readonly
|
|
1286
|
+
}, null, 8, Za), [
|
|
1287
|
+
[q, l(S).keepWithNext]
|
|
1288
|
+
]),
|
|
1289
|
+
h(t(l(i).orphan), 1)
|
|
1290
|
+
]),
|
|
1291
|
+
a("label", null, [
|
|
1292
|
+
$(a("input", {
|
|
1293
|
+
"onUpdate:modelValue": m[16] || (m[16] = (d) => l(S).repeatHeader = d),
|
|
1294
|
+
type: "checkbox",
|
|
1295
|
+
disabled: e.readonly
|
|
1296
|
+
}, null, 8, za), [
|
|
1297
|
+
[q, l(S).repeatHeader]
|
|
1298
|
+
]),
|
|
1299
|
+
h(t(l(i).repeat), 1)
|
|
1300
|
+
])
|
|
1301
|
+
]),
|
|
1302
|
+
(o(!0), n(k, null, w(l(S).aggregates, (d, W) => (o(), n("div", {
|
|
1303
|
+
key: W,
|
|
1304
|
+
class: "mr-rule-editor__aggregate"
|
|
1305
|
+
}, [
|
|
1306
|
+
a("div", qa, [
|
|
1307
|
+
a("label", null, [
|
|
1308
|
+
h(t(l(i).output), 1),
|
|
1309
|
+
$(a("select", {
|
|
1310
|
+
"aria-label": l(i).output,
|
|
1311
|
+
"onUpdate:modelValue": (U) => d.field = U,
|
|
1312
|
+
disabled: e.readonly
|
|
1313
|
+
}, [
|
|
1314
|
+
(o(!0), n(k, null, w(l(y), (U) => (o(), n("option", {
|
|
1315
|
+
key: U.field,
|
|
1316
|
+
value: U.field
|
|
1317
|
+
}, t(U.label), 9, Qa))), 128))
|
|
1318
|
+
], 8, Pa), [
|
|
1319
|
+
[D, d.field]
|
|
1320
|
+
])
|
|
1321
|
+
]),
|
|
1322
|
+
a("label", null, [
|
|
1323
|
+
h(t(l(i).aggregate), 1),
|
|
1324
|
+
$(a("select", {
|
|
1325
|
+
"aria-label": l(i).aggregate,
|
|
1326
|
+
"onUpdate:modelValue": (U) => d.op = U,
|
|
1327
|
+
disabled: e.readonly
|
|
1328
|
+
}, [
|
|
1329
|
+
(o(!0), n(k, null, w(l(B).aggregates, (U) => (o(), n("option", {
|
|
1330
|
+
key: U,
|
|
1331
|
+
value: U
|
|
1332
|
+
}, t(l(i)[U]), 9, Ya))), 128))
|
|
1333
|
+
], 8, Xa), [
|
|
1334
|
+
[D, d.op]
|
|
1335
|
+
])
|
|
1336
|
+
])
|
|
1337
|
+
]),
|
|
1338
|
+
a("label", null, [
|
|
1339
|
+
h(t(l(i).measure), 1),
|
|
1340
|
+
$(a("select", {
|
|
1341
|
+
"aria-label": l(i).measure,
|
|
1342
|
+
"onUpdate:modelValue": (U) => d.valueField = U,
|
|
1343
|
+
disabled: e.readonly
|
|
1344
|
+
}, [
|
|
1345
|
+
a("option", pa, t(d.field), 1),
|
|
1346
|
+
(o(!0), n(k, null, w(l(y), (U) => (o(), n("option", {
|
|
1347
|
+
key: U.field,
|
|
1348
|
+
value: U.field
|
|
1349
|
+
}, t(U.label), 9, et))), 128))
|
|
1350
|
+
], 8, _a), [
|
|
1351
|
+
[D, d.valueField]
|
|
1352
|
+
])
|
|
1353
|
+
]),
|
|
1354
|
+
d.op === "weightedAvg" ? (o(), n("label", lt, [
|
|
1355
|
+
h(t(l(i).weight), 1),
|
|
1356
|
+
$(a("select", {
|
|
1357
|
+
"aria-label": l(i).weight,
|
|
1358
|
+
"onUpdate:modelValue": (U) => d.weightField = U,
|
|
1359
|
+
disabled: e.readonly
|
|
1360
|
+
}, [
|
|
1361
|
+
(o(!0), n(k, null, w(l(y), (U) => (o(), n("option", {
|
|
1362
|
+
key: U.field,
|
|
1363
|
+
value: U.field
|
|
1364
|
+
}, t(U.label), 9, tt))), 128))
|
|
1365
|
+
], 8, at), [
|
|
1366
|
+
[D, d.weightField]
|
|
1367
|
+
])
|
|
1368
|
+
])) : R("", !0),
|
|
1369
|
+
a("div", dt, [
|
|
1370
|
+
$(a("select", {
|
|
1371
|
+
"onUpdate:modelValue": (U) => d.numeric = U,
|
|
1372
|
+
disabled: e.readonly,
|
|
1373
|
+
"aria-label": l(i).numeric
|
|
1374
|
+
}, [
|
|
1375
|
+
a("option", it, t(l(i).number), 1),
|
|
1376
|
+
a("option", ot, t(l(i).decimal), 1)
|
|
1377
|
+
], 8, st), [
|
|
1378
|
+
[D, d.numeric]
|
|
1379
|
+
]),
|
|
1380
|
+
a("button", {
|
|
1381
|
+
type: "button",
|
|
1382
|
+
disabled: e.readonly,
|
|
1383
|
+
onClick: (U) => l(S).aggregates?.splice(W, 1)
|
|
1384
|
+
}, t(l(i).remove), 9, nt)
|
|
1385
|
+
])
|
|
1386
|
+
]))), 128)),
|
|
1387
|
+
a("button", {
|
|
1388
|
+
type: "button",
|
|
1389
|
+
disabled: e.readonly,
|
|
1390
|
+
onClick: m[17] || (m[17] = //@ts-ignore
|
|
1391
|
+
(...d) => l(c).addAggregate && l(c).addAggregate(...d))
|
|
1392
|
+
}, " + " + t(l(i).addAggregate), 9, ut),
|
|
1393
|
+
a("div", rt, [
|
|
1394
|
+
a("button", {
|
|
1395
|
+
type: "button",
|
|
1396
|
+
disabled: e.readonly || l(N) === 0,
|
|
1397
|
+
"aria-label": l(i).moveUp,
|
|
1398
|
+
onClick: m[18] || (m[18] = (d) => l(c).moveGroup(-1))
|
|
1399
|
+
}, " ↑ " + t(l(i).outer), 9, mt),
|
|
1400
|
+
a("button", {
|
|
1401
|
+
type: "button",
|
|
1402
|
+
disabled: e.readonly || l(N) >= l(G).length - 1,
|
|
1403
|
+
"aria-label": l(i).moveDown,
|
|
1404
|
+
onClick: m[19] || (m[19] = (d) => l(c).moveGroup(1))
|
|
1405
|
+
}, " ↓ " + t(l(i).inner), 9, ct),
|
|
1406
|
+
a("button", {
|
|
1407
|
+
type: "button",
|
|
1408
|
+
disabled: e.readonly,
|
|
1409
|
+
onClick: m[20] || (m[20] = //@ts-ignore
|
|
1410
|
+
(...d) => l(c).removeGroup && l(c).removeGroup(...d))
|
|
1411
|
+
}, t(l(i).remove), 9, bt)
|
|
1412
|
+
])
|
|
1413
|
+
], 64)) : R("", !0),
|
|
1414
|
+
a("button", {
|
|
1415
|
+
type: "button",
|
|
1416
|
+
class: "mr-rule-editor__primary",
|
|
1417
|
+
disabled: e.readonly,
|
|
1418
|
+
onClick: m[21] || (m[21] = //@ts-ignore
|
|
1419
|
+
(...d) => l(c).applyGroups && l(c).applyGroups(...d))
|
|
1420
|
+
}, t(l(i).apply), 9, vt)
|
|
1421
|
+
])) : l(v) === "conditions" ? (o(), n("div", gt, [
|
|
1422
|
+
a("label", null, [
|
|
1423
|
+
h(t(l(i).column), 1),
|
|
1424
|
+
$(a("select", {
|
|
1425
|
+
"aria-label": l(i).column,
|
|
1426
|
+
"onUpdate:modelValue": m[22] || (m[22] = (d) => Q(K) ? K.value = d : null),
|
|
1427
|
+
disabled: e.readonly,
|
|
1428
|
+
onChange: m[23] || (m[23] = (d) => l(c).loadCondition(-1))
|
|
1429
|
+
}, [
|
|
1430
|
+
(o(!0), n(k, null, w(e.list.columns, (d) => (o(), n("option", {
|
|
1431
|
+
key: d.field,
|
|
1432
|
+
value: d.field
|
|
1433
|
+
}, t(d.header || d.field), 9, ft))), 128))
|
|
1434
|
+
], 40, yt), [
|
|
1435
|
+
[D, l(K)]
|
|
1436
|
+
])
|
|
1437
|
+
]),
|
|
1438
|
+
a("label", null, [
|
|
1439
|
+
h(t(l(i).effect), 1),
|
|
1440
|
+
$(a("select", {
|
|
1441
|
+
"aria-label": l(i).effect,
|
|
1442
|
+
"onUpdate:modelValue": m[24] || (m[24] = (d) => Q(r) ? r.value = d : null),
|
|
1443
|
+
disabled: e.readonly,
|
|
1444
|
+
onChange: m[25] || (m[25] = (d) => l(c).loadCondition(-1))
|
|
1445
|
+
}, [
|
|
1446
|
+
a("option", kt, t(l(i).style), 1),
|
|
1447
|
+
a("option", Vt, t(l(i).cell), 1),
|
|
1448
|
+
a("option", $t, t(l(i).rowVisibility), 1)
|
|
1449
|
+
], 40, ht), [
|
|
1450
|
+
[D, l(r)]
|
|
1451
|
+
])
|
|
1452
|
+
]),
|
|
1453
|
+
l(r) === "style" ? (o(), n("label", Ct, [
|
|
1454
|
+
h(t(l(i).existing), 1),
|
|
1455
|
+
a("select", {
|
|
1456
|
+
"aria-label": l(i).existing,
|
|
1457
|
+
value: l(L),
|
|
1458
|
+
disabled: e.readonly,
|
|
1459
|
+
onChange: m[26] || (m[26] = (d) => l(c).loadCondition(
|
|
1460
|
+
Number(d.target.value)
|
|
1461
|
+
))
|
|
1462
|
+
}, [
|
|
1463
|
+
a("option", xt, "+ " + t(l(i).newCondition), 1),
|
|
1464
|
+
(o(!0), n(k, null, w(l(j)?.rules, (d, W) => (o(), n("option", {
|
|
1465
|
+
key: W,
|
|
1466
|
+
value: W
|
|
1467
|
+
}, t(W + 1) + " · " + t(d.when.field) + " " + t(d.when.op) + " " + t(d.when.value), 9, Ut))), 128))
|
|
1468
|
+
], 40, wt)
|
|
1469
|
+
])) : R("", !0),
|
|
1470
|
+
a("label", null, [
|
|
1471
|
+
h(t(l(i).condition), 1),
|
|
1472
|
+
$(a("select", {
|
|
1473
|
+
"aria-label": l(i).condition,
|
|
1474
|
+
"onUpdate:modelValue": m[27] || (m[27] = (d) => l(s).field = d),
|
|
1475
|
+
disabled: e.readonly
|
|
1476
|
+
}, [
|
|
1477
|
+
(o(!0), n(k, null, w(l(y), (d) => (o(), n("option", {
|
|
1478
|
+
key: d.field,
|
|
1479
|
+
value: d.field
|
|
1480
|
+
}, t(d.label), 9, Mt))), 128))
|
|
1481
|
+
], 8, St), [
|
|
1482
|
+
[D, l(s).field]
|
|
1483
|
+
])
|
|
1484
|
+
]),
|
|
1485
|
+
a("div", Ft, [
|
|
1486
|
+
a("label", null, [
|
|
1487
|
+
h(t(l(i).comparison), 1),
|
|
1488
|
+
$(a("select", {
|
|
1489
|
+
"aria-label": l(i).comparison,
|
|
1490
|
+
"onUpdate:modelValue": m[28] || (m[28] = (d) => l(s).op = d),
|
|
1491
|
+
disabled: e.readonly
|
|
1492
|
+
}, [
|
|
1493
|
+
(o(), n(k, null, w([">", ">=", "<", "<=", "==", "!="], (d) => a("option", {
|
|
1494
|
+
key: d,
|
|
1495
|
+
value: d
|
|
1496
|
+
}, t(d), 9, Rt)), 64))
|
|
1497
|
+
], 8, Et), [
|
|
1498
|
+
[D, l(s).op]
|
|
1499
|
+
])
|
|
1500
|
+
]),
|
|
1501
|
+
a("label", null, [
|
|
1502
|
+
h(t(l(i).threshold), 1),
|
|
1503
|
+
a("input", {
|
|
1504
|
+
value: l(s).value,
|
|
1505
|
+
disabled: e.readonly,
|
|
1506
|
+
onInput: m[29] || (m[29] = (d) => l(c).setThreshold(d.target.value))
|
|
1507
|
+
}, null, 40, Kt)
|
|
1508
|
+
])
|
|
1509
|
+
]),
|
|
1510
|
+
l(r) === "style" ? (o(), n(k, { key: 1 }, [
|
|
1511
|
+
a("div", Gt, [
|
|
1512
|
+
a("label", null, [
|
|
1513
|
+
h(t(l(i).color), 1),
|
|
1514
|
+
$(a("input", {
|
|
1515
|
+
"onUpdate:modelValue": m[30] || (m[30] = (d) => l(V).color = d),
|
|
1516
|
+
type: "color",
|
|
1517
|
+
disabled: e.readonly
|
|
1518
|
+
}, null, 8, Dt), [
|
|
1519
|
+
[H, l(V).color]
|
|
1520
|
+
])
|
|
1521
|
+
]),
|
|
1522
|
+
a("label", null, [
|
|
1523
|
+
h(t(l(i).background), 1),
|
|
1524
|
+
$(a("input", {
|
|
1525
|
+
"onUpdate:modelValue": m[31] || (m[31] = (d) => l(V).backgroundColor = d),
|
|
1526
|
+
type: "color",
|
|
1527
|
+
disabled: e.readonly
|
|
1528
|
+
}, null, 8, Nt), [
|
|
1529
|
+
[H, l(V).backgroundColor]
|
|
1530
|
+
])
|
|
1531
|
+
])
|
|
1532
|
+
]),
|
|
1533
|
+
a("label", Tt, [
|
|
1534
|
+
$(a("input", {
|
|
1535
|
+
"onUpdate:modelValue": m[32] || (m[32] = (d) => l(V).bold = d),
|
|
1536
|
+
type: "checkbox",
|
|
1537
|
+
disabled: e.readonly
|
|
1538
|
+
}, null, 8, Bt), [
|
|
1539
|
+
[q, l(V).bold]
|
|
1540
|
+
]),
|
|
1541
|
+
h(t(l(i).bold), 1)
|
|
1542
|
+
])
|
|
1543
|
+
], 64)) : R("", !0),
|
|
1544
|
+
a("div", At, [
|
|
1545
|
+
a("button", {
|
|
1546
|
+
type: "button",
|
|
1547
|
+
class: "mr-rule-editor__primary",
|
|
1548
|
+
disabled: e.readonly,
|
|
1549
|
+
onClick: m[33] || (m[33] = (d) => l(c).applyCondition())
|
|
1550
|
+
}, t(l(i).apply), 9, Lt),
|
|
1551
|
+
l(L) >= 0 || l(r) !== "style" ? (o(), n("button", {
|
|
1552
|
+
key: 0,
|
|
1553
|
+
type: "button",
|
|
1554
|
+
disabled: e.readonly,
|
|
1555
|
+
onClick: m[34] || (m[34] = (d) => l(c).applyCondition(!0))
|
|
1556
|
+
}, t(l(i).removeCondition), 9, Wt)) : R("", !0)
|
|
1557
|
+
])
|
|
1558
|
+
])) : (o(), ae(kl, {
|
|
1559
|
+
key: 3,
|
|
1560
|
+
list: e.list,
|
|
1561
|
+
mode: l(v) === "detail" ? "detail" : "matrix",
|
|
1562
|
+
datasets: e.datasets,
|
|
1563
|
+
"dataset-schema": e.datasetSchema,
|
|
1564
|
+
"dataset-schemas": e.datasetSchemas,
|
|
1565
|
+
readonly: e.readonly,
|
|
1566
|
+
messages: l(i),
|
|
1567
|
+
onChange: l(c).applyLayout
|
|
1568
|
+
}, null, 8, ["list", "mode", "datasets", "dataset-schema", "dataset-schemas", "readonly", "messages", "onChange"])),
|
|
1569
|
+
l(u) ? (o(), n("p", It, t(l(u)), 1)) : R("", !0)
|
|
1570
|
+
], 8, _l));
|
|
1571
|
+
}
|
|
1572
|
+
}), qt = /* @__PURE__ */ ee(Ot, [["__scopeId", "data-v-d08a101e"]]);
|
|
1573
|
+
export {
|
|
1574
|
+
qt as default
|
|
1575
|
+
};
|