@agile-team/mach-report 2.23.0 → 2.24.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 +9 -2
- package/dist/ExcelBindingWizard-BV12hGiK.cjs +1 -0
- package/dist/ExcelBindingWizard-Cy_lPjWV.js +1486 -0
- package/dist/ParamEditor-DenKjvKu.cjs +1 -0
- package/dist/ParamEditor-PyOqHzzw.js +750 -0
- package/dist/ReportBatchPanel-8EFtMrKk.js +351 -0
- package/dist/ReportBatchPanel-pQ6d0yqJ.cjs +1 -0
- package/dist/ReportLabelStudio-B_KF3Zc_.cjs +1 -0
- package/dist/ReportLabelStudio-HUeo2TsU.js +784 -0
- package/dist/ReportParamPanel-8xR85nz-.cjs +1 -0
- package/dist/{ReportParamPanel-Dgmqro1Y.js → ReportParamPanel-DA-YpkvC.js} +342 -307
- package/dist/ReportPreview-CyUXJSVX.cjs +6 -0
- package/dist/ReportPreview-_wTJnsG1.js +7120 -0
- package/dist/ReportTemplateLibrary-CjArKxRG.cjs +1 -0
- package/dist/ReportTemplateLibrary-DH8jl9IF.js +312 -0
- package/dist/RuleEditor-Bmj98oC4.cjs +1 -0
- package/dist/RuleEditor-GDydlEHz.js +2354 -0
- package/dist/TemplateOutlinePanel-B554_qk1.cjs +1 -0
- package/dist/TemplateOutlinePanel-DjPqzU9h.js +97 -0
- package/dist/TemplateReusePanel-D0628OYc.cjs +1 -0
- package/dist/TemplateReusePanel-DtYbCN7U.js +389 -0
- package/dist/TemplateReviewPanel-CSwvCz3f.cjs +1 -0
- package/dist/TemplateReviewPanel-D_FR4ISq.js +602 -0
- package/dist/artifact-integrity.json +94 -94
- package/dist/assets-B4AJIOTB.cjs +1 -0
- package/dist/assets-D0FbszhB.js +137 -0
- package/dist/{auto-CTIJ6PnR.js → auto-BksreoKc.js} +5 -5
- package/dist/auto-C3mGqzJ8.cjs +1 -0
- package/dist/capabilities-CTwlcl8q.cjs +1 -0
- package/dist/capabilities-lqDEZSq5.js +121 -0
- package/dist/data-bar-2NLRzOCQ.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-BnGtnJ82.js} +1 -1
- package/dist/designer-BNf7NWd6.js +7589 -0
- package/dist/designer-DWnZZ_ej.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +144 -4
- package/dist/designer.d.ts +144 -4
- package/dist/designer.js +6 -6
- package/dist/diagnostic-collector-1sqd7DQP.js +355 -0
- package/dist/diagnostic-collector-D3rlvxm3.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-C90cTM6Y.js} +4 -4
- package/dist/dom-CxOkm_Sy.cjs +1 -0
- package/dist/{encoding-BefcaHdp.cjs → encoding-CkziAnZI.cjs} +1 -1
- package/dist/{encoding-CL6rXEkR.js → encoding-DSc9zv2F.js} +2 -2
- package/dist/{font-loader-Ga51c2VC.cjs → font-loader-D-znWNWS.cjs} +1 -1
- package/dist/{font-loader-BT5baV-o.js → font-loader-i7lZbqH_.js} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-BPiV1WHe.js} +1 -1
- package/dist/grid-strokes-DYf-6DMl.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +46 -7
- package/dist/index.d.ts +46 -7
- package/dist/index.js +69 -68
- package/dist/{json-snapshot-OqkPyUk5.js → json-snapshot-BJWZNryO.js} +919 -791
- package/dist/json-snapshot-C7QZrRBf.cjs +2 -0
- package/dist/{pdf-aobetCsy.js → pdf-0_5XiTCx.js} +2499 -2492
- package/dist/{pdf-HiEeXe9H.cjs → pdf-DWuq6uxx.cjs} +31 -31
- package/dist/pdf.cjs +1 -1
- package/dist/pdf.d.cts +18 -0
- package/dist/pdf.d.ts +18 -0
- package/dist/pdf.js +2 -2
- package/dist/{plugin-DeYYAL6F.js → plugin-B1ydqEmS.js} +1 -1
- package/dist/{plugin-BFANt-i8.cjs → plugin-BQBz2vLG.cjs} +1 -1
- package/dist/prefill-2p9wrpn9.cjs +1 -0
- package/dist/{prefill-Dk4C6S5R.js → prefill-Cuzh1wxf.js} +13 -13
- package/dist/prepared-CVbgO9KR.js +128 -0
- package/dist/prepared-DAwe8Il2.cjs +1 -0
- package/dist/protocol-BOri9qJL.js +105 -0
- package/dist/protocol-DD5dHSz-.cjs +1 -0
- package/dist/record-bindings-CAyM5tGg.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-fhav-NLG.js} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-Cm4mqhih.js} +2 -2
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-DWCUgjZl.cjs} +1 -1
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/rich-text-layout-X9YOz1JD.cjs +3 -0
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-YJHtCWQI.js} +1 -1
- package/dist/runtime-BpSAgOw1.js +201 -0
- package/dist/runtime-Cd2UTnwe.cjs +1 -0
- package/dist/sbom.cdx.json +1 -1
- package/dist/server/node.d.cts +55 -7
- package/dist/server/node.d.ts +55 -7
- package/dist/server-node.cjs +5 -5
- package/dist/server-node.js +2710 -2418
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +47 -12
- package/dist/server.d.ts +47 -12
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-CoT7jm_6.cjs → template-catalog--yBX169M.cjs} +1 -1
- package/dist/{template-catalog--cjxzgH7.js → template-catalog-Bu7s7ReF.js} +3 -3
- package/dist/template-fragments-5EzVn7bm.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-Di2vDFnx.js} +2 -2
- package/dist/{template-registry-O0hNIOfB.js → template-registry-BCBF2b8j.js} +10 -10
- package/dist/template-registry-Bnh5aEYf.cjs +1 -0
- package/dist/textwrap-BPFxhpOw.cjs +4 -0
- package/dist/textwrap-CmVkhMhx.js +111 -0
- package/dist/vue/async.d.cts +104 -18
- package/dist/vue/async.d.ts +104 -18
- package/dist/vue/index.d.cts +134 -28
- package/dist/vue/index.d.ts +134 -28
- package/dist/vue-async.cjs +1 -1
- package/dist/vue-async.js +3 -3
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +192 -162
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-B6P_-5a4.js} +2 -2
- package/dist/{workbook-session-C6-SrnCT.cjs → workbook-session-BnPK3T58.cjs} +1 -1
- package/dist/worker.cjs +1 -1
- package/dist/worker.d.cts +55 -7
- package/dist/worker.d.ts +55 -7
- package/dist/worker.js +4 -4
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +18 -1
- package/dist/xlsx.d.ts +18 -1
- package/dist/xlsx.js +279 -272
- package/package.json +1 -1
- package/dist/ExcelBindingWizard-D4FLind-.js +0 -1485
- package/dist/ExcelBindingWizard-D4RS5Bpg.cjs +0 -1
- package/dist/ParamEditor-C-6C9rd2.cjs +0 -1
- package/dist/ParamEditor-CASZt-Ma.js +0 -732
- package/dist/ReportBatchPanel-Bq7t8a5r.js +0 -350
- package/dist/ReportBatchPanel-YVj5IO5y.cjs +0 -1
- package/dist/ReportLabelStudio-Cqhita1b.cjs +0 -1
- package/dist/ReportLabelStudio-Dj7GXhuv.js +0 -783
- package/dist/ReportParamPanel-DZbFVmDL.cjs +0 -1
- package/dist/ReportPreview-DeWzG8jQ.js +0 -6257
- package/dist/ReportPreview-FFIryrIr.cjs +0 -6
- package/dist/ReportTemplateLibrary-BaWodmpm.cjs +0 -1
- package/dist/ReportTemplateLibrary-DdAAAD2I.js +0 -311
- package/dist/RuleEditor-D2UwQGF6.js +0 -2341
- package/dist/RuleEditor-DcT9xI1v.cjs +0 -1
- package/dist/TemplateOutlinePanel-CUHFFiNM.cjs +0 -1
- package/dist/TemplateOutlinePanel-DrT7XN0m.js +0 -96
- package/dist/TemplateReusePanel-4eejkNqi.js +0 -388
- package/dist/TemplateReusePanel-DZMyiX5I.cjs +0 -1
- package/dist/TemplateReviewPanel-BIhNLeNw.js +0 -592
- package/dist/TemplateReviewPanel-DnYImiXu.cjs +0 -1
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-4pK9HePf.cjs +0 -1
- package/dist/capabilities-DiBj4Qgl.cjs +0 -1
- package/dist/capabilities-pg7j7VLT.js +0 -106
- package/dist/data-bar-CeZuFmYl.cjs +0 -1
- package/dist/designer-DhrE7jzw.js +0 -7169
- package/dist/designer-IAZu6kBX.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-1tvQNzQE.cjs +0 -2
- package/dist/prefill-DsUD5OoK.cjs +0 -1
- package/dist/prepared-DCIxhKFo.js +0 -94
- package/dist/prepared-Dv-XM3i1.cjs +0 -1
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-B9YgfQ_d.cjs +0 -1
- package/dist/protocol-DxeUKGYG.js +0 -90
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-75Y5Oq5B.js +0 -171
- package/dist/runtime-DKlGd_D4.cjs +0 -1
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-BIjtEWmq.js +0 -110
- package/dist/textwrap-Cy7o1hIR.cjs +0 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ref as k, watch as I, nextTick as V, onMounted as
|
|
1
|
+
import { ref as k, watch as I, nextTick as V, onMounted as be, onBeforeUnmount as re, inject as se, computed as S, provide as ye, shallowRef as he, defineComponent as _, openBlock as f, createElementBlock as g, Fragment as U, renderList as H, unref as w, createElementVNode as L, toDisplayString as O, createTextVNode as G, createCommentVNode as D, normalizeClass as Y, createVNode as W, withModifiers as we, createBlock as ne, withKeys as K } from "vue";
|
|
2
2
|
import { a as Q } from "./injection-keys-e85udZCp.js";
|
|
3
|
-
import { ReportParamValidationError as
|
|
4
|
-
import { w as
|
|
3
|
+
import { ReportParamValidationError as Se, ReportSourceError as Ee, validateReportParams as oe, parseReportCascaderPath as Ce, formatReportCascaderPath as Re, parseReportParamSelection as Pe, formatReportParamSelection as Oe } from "@agile-team/mach-report";
|
|
4
|
+
import { w as Ae } from "./diagnostic-collector-1sqd7DQP.js";
|
|
5
5
|
import { _ as ee, a as X } from "./_plugin-vue_export-helper-8SL1F89S.js";
|
|
6
|
-
const
|
|
6
|
+
const xe = {
|
|
7
7
|
printPrepareTimeout: "打印资源准备超时,请检查字体与图片后重试。",
|
|
8
8
|
printImageFailed: "第 {index} 张图片未能加载,已停止打印,避免输出缺失内容。",
|
|
9
9
|
printFontFailed: "打印字体 {family} 未能加载,请检查字体资源后重试。",
|
|
@@ -19,28 +19,71 @@ function Oa(e) {
|
|
|
19
19
|
if (![t, l].every((n) => Number.isFinite(n) && Math.abs(n) <= 20)) throw new RangeError("Print calibration must be within ±20 mm");
|
|
20
20
|
return { x: t, y: l };
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Aa(e = {}) {
|
|
23
23
|
if (e.fonts && (!Array.isArray(e.fonts) || e.fonts.length > 8)) throw new RangeError("At most eight print font faces are allowed");
|
|
24
24
|
return { ...e, ...e.fonts ? { fonts: e.fonts.map((t) => ({ ...t })) } : {}, ...e.calibration ? { calibration: { ...e.calibration } } : {} };
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
class B extends Error {
|
|
27
|
+
constructor(t, l, n) {
|
|
28
|
+
super(l), this.name = "MachReportError", this.code = t, this.cause = n;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function xa(e) {
|
|
32
|
+
return e instanceof B ? { code: e.code, cause: e.cause } : { code: "render", cause: e };
|
|
33
|
+
}
|
|
34
|
+
function ka(e) {
|
|
35
|
+
if (e instanceof B) return e;
|
|
36
|
+
if (e instanceof Se) return new B("param", e.message, e);
|
|
37
|
+
if (e instanceof Ee) return new B(e.code, e.message, e.cause);
|
|
38
|
+
if (e instanceof Error) {
|
|
39
|
+
const t = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, l = e.code;
|
|
40
|
+
if (typeof l == "string" && Object.prototype.hasOwnProperty.call(t, l)) return new B(t[l], e.message, e);
|
|
41
|
+
}
|
|
42
|
+
return new B("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
43
|
+
}
|
|
44
|
+
function ke(e = {}) {
|
|
45
|
+
const t = k(!1), l = k(null), n = k(null), r = k(null);
|
|
28
46
|
function c(d = !1) {
|
|
29
47
|
t.value = !1, d && V(() => n.value?.focus());
|
|
30
48
|
}
|
|
31
|
-
function
|
|
49
|
+
function m(d) {
|
|
32
50
|
d.target instanceof Node && !l.value?.contains(d.target) && c();
|
|
33
51
|
}
|
|
34
52
|
function s(d) {
|
|
35
53
|
d.key !== "Escape" || !t.value || d.isComposing || (d.preventDefault(), d.stopPropagation(), c(!0));
|
|
36
54
|
}
|
|
37
55
|
return I(t, (d) => {
|
|
38
|
-
!d || e.focusOnOpen === !1 || V(() => (
|
|
39
|
-
}),
|
|
40
|
-
document.addEventListener("pointerdown",
|
|
41
|
-
}),
|
|
42
|
-
document.removeEventListener("pointerdown",
|
|
43
|
-
}), { opened: t, root: l, trigger: n, panel:
|
|
56
|
+
!d || e.focusOnOpen === !1 || V(() => (r.value?.querySelector("input") ?? r.value?.querySelector("button:not(:disabled)"))?.focus());
|
|
57
|
+
}), be(() => {
|
|
58
|
+
document.addEventListener("pointerdown", m), document.addEventListener("focusin", m);
|
|
59
|
+
}), re(() => {
|
|
60
|
+
document.removeEventListener("pointerdown", m), document.removeEventListener("focusin", m);
|
|
61
|
+
}), { opened: t, root: l, trigger: n, panel: r, close: c, onKeydown: s };
|
|
62
|
+
}
|
|
63
|
+
const de = {
|
|
64
|
+
conflictReviewTitle: "核对保存冲突",
|
|
65
|
+
conflictReviewDescription: "已保留本地修改。对照最新查询,选择需保留的值,再统一校验并提交。",
|
|
66
|
+
conflictReviewRefresh: "读取最新数据",
|
|
67
|
+
conflictReviewLoading: "正在读取最新数据…",
|
|
68
|
+
conflictReviewApply: "校验并提交选择",
|
|
69
|
+
conflictReviewOriginal: "修改前",
|
|
70
|
+
conflictReviewLocal: "保留我的修改",
|
|
71
|
+
conflictReviewServer: "使用最新数据",
|
|
72
|
+
conflictReviewChoose: "请选择要保留的值",
|
|
73
|
+
conflictReviewMissing: "该业务字段已不在最新结果中",
|
|
74
|
+
conflictReviewAmbiguous: "同一业务字段的多个显示值不一致",
|
|
75
|
+
conflictReviewReadonly: "该字段现已只读",
|
|
76
|
+
conflictReviewUnavailable: "当前预览缺少可重新查询的来源,请由宿主核对后重新加载。",
|
|
77
|
+
conflictReviewCount: "共 {count} 项 · 待选择 {pending} 项",
|
|
78
|
+
conflictReviewSearch: "搜索字段、数据集或业务键",
|
|
79
|
+
conflictReviewEmpty: "没有匹配的待核对项",
|
|
80
|
+
conflictReviewStale: "当前查询已变化,请重新读取最新数据后核对。",
|
|
81
|
+
conflictReviewRetained: "修改仍已保留,可重新读取核对或关闭后继续编辑。"
|
|
82
|
+
};
|
|
83
|
+
function Ma(e) {
|
|
84
|
+
const t = { ...de };
|
|
85
|
+
for (const l of Object.keys(t)) typeof e[l] == "string" && (t[l] = e[l]);
|
|
86
|
+
return t;
|
|
44
87
|
}
|
|
45
88
|
const ae = {
|
|
46
89
|
paramOptionsLoading: "正在搜索选项…",
|
|
@@ -51,7 +94,7 @@ const ae = {
|
|
|
51
94
|
paramOptionsClear: "清除选择",
|
|
52
95
|
paramNumberRangeStart: "最小值",
|
|
53
96
|
paramNumberRangeEnd: "最大值"
|
|
54
|
-
},
|
|
97
|
+
}, ue = {
|
|
55
98
|
prefillTitle: "安全预填",
|
|
56
99
|
prefillHint: "按业务主键匹配白名单字段,先核对差异再整批应用;默认只补空白。",
|
|
57
100
|
prefillCurrent: "当前值",
|
|
@@ -90,10 +133,10 @@ const ae = {
|
|
|
90
133
|
reviewNext: "下一页",
|
|
91
134
|
reviewPage: "差异分页"
|
|
92
135
|
};
|
|
93
|
-
function
|
|
94
|
-
return { ...
|
|
136
|
+
function Fa(e) {
|
|
137
|
+
return { ...ue, ...Object.fromEntries(Object.entries(e).filter(([, t]) => t !== void 0)) };
|
|
95
138
|
}
|
|
96
|
-
const
|
|
139
|
+
const ce = {
|
|
97
140
|
calculationTitle: "选区计算",
|
|
98
141
|
calculationLocal: "仅本地分析,不写回实绩、不重算原公式。请选取同一单位与量纲的数值。",
|
|
99
142
|
calculationHint: "点击起点,Shift + 点击终点或方向键扩选。",
|
|
@@ -130,18 +173,19 @@ const ue = {
|
|
|
130
173
|
calculationErrorOverflow: "结果超出有效数值范围。",
|
|
131
174
|
calculationErrorPrecision: "数值超出安全精度,或展示小数位不是 0 至 12 的整数。"
|
|
132
175
|
};
|
|
133
|
-
function
|
|
134
|
-
const t = { ...
|
|
176
|
+
function $a(e) {
|
|
177
|
+
const t = { ...ce };
|
|
135
178
|
for (const l of Object.keys(t)) {
|
|
136
179
|
const n = e[l];
|
|
137
180
|
typeof n == "string" && (t[l] = n);
|
|
138
181
|
}
|
|
139
182
|
return t;
|
|
140
183
|
}
|
|
141
|
-
const
|
|
184
|
+
const Me = {
|
|
185
|
+
...de,
|
|
142
186
|
previousSnapshot: "当前保留上次成功结果,刷新成功后恢复编辑和输出。",
|
|
143
187
|
...ae,
|
|
144
|
-
...
|
|
188
|
+
...ue,
|
|
145
189
|
reviewTools: "数据工具",
|
|
146
190
|
validationTitle: "数据校验",
|
|
147
191
|
validationError: "错误",
|
|
@@ -149,12 +193,13 @@ const ke = {
|
|
|
149
193
|
validationDataset: "全表",
|
|
150
194
|
validationRow: "行",
|
|
151
195
|
validationMore: "请缩小范围查看更多问题",
|
|
196
|
+
validationFailureSummary: "发现 {count} 项校验问题,请在数据校验中核对。",
|
|
152
197
|
drillActions: "查看关联",
|
|
153
198
|
drillOpening: "正在打开…",
|
|
154
199
|
drillMissingValue: "当前单元格缺少关联参数",
|
|
155
200
|
drillFailed: "关联内容打开失败,请重试",
|
|
156
|
-
...
|
|
157
|
-
...
|
|
201
|
+
...xe,
|
|
202
|
+
...ce,
|
|
158
203
|
exportMenu: "导出",
|
|
159
204
|
exportMenuDescription: "选择文件格式",
|
|
160
205
|
clearSearch: "清除搜索",
|
|
@@ -309,6 +354,8 @@ const ke = {
|
|
|
309
354
|
taskCancelled: "任务已取消,可重新操作。",
|
|
310
355
|
diagnosticsSearch: "搜索提示、错误码或位置",
|
|
311
356
|
diagnosticsMore: "共 {count} 条匹配,当前展示前 100 条;请搜索缩小范围。",
|
|
357
|
+
diagnosticsOmitted: "另有 {count} 条,当前展示有界定位样本。",
|
|
358
|
+
diagnosticsShowMore: "显示更多定位样本",
|
|
312
359
|
diagnosticsTitle: "输出兼容性提示",
|
|
313
360
|
diagnosticsLocate: "定位",
|
|
314
361
|
diagnosticsLocation: "第 {page} 页 · 组件 {component}",
|
|
@@ -324,7 +371,8 @@ const ke = {
|
|
|
324
371
|
diagnosticImageDecode: "图片加载失败,请检查资源后重试。",
|
|
325
372
|
diagnosticAssetFailed: "图表或图片生成失败,请重试或联系管理员。",
|
|
326
373
|
diagnosticAssetBudget: "图片资源超出处理范围,请减少资源或缩小报表范围。"
|
|
327
|
-
},
|
|
374
|
+
}, Fe = {
|
|
375
|
+
colorScheme: "light",
|
|
328
376
|
emptyAccent: "#79a7e8",
|
|
329
377
|
shellBg: "#f4f7fc",
|
|
330
378
|
shellFg: "#334155",
|
|
@@ -335,15 +383,19 @@ const ke = {
|
|
|
335
383
|
btnBorder: "#dbe3ef",
|
|
336
384
|
btnHoverBg: "#edf3ff",
|
|
337
385
|
btnHoverFg: "#315fba",
|
|
338
|
-
btnActiveBg: "#3569d4"
|
|
386
|
+
btnActiveBg: "#3569d4",
|
|
387
|
+
btnActiveFg: "#ffffff",
|
|
388
|
+
errorFg: "#b91c1c",
|
|
389
|
+
warningFg: "#92400e",
|
|
390
|
+
successFg: "#047857"
|
|
339
391
|
};
|
|
340
392
|
function $e(e = {}) {
|
|
341
393
|
return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
|
|
342
394
|
}
|
|
343
|
-
function
|
|
395
|
+
function Da(e) {
|
|
344
396
|
return e;
|
|
345
397
|
}
|
|
346
|
-
const
|
|
398
|
+
const q = {
|
|
347
399
|
showExport: !0,
|
|
348
400
|
showPrint: !0,
|
|
349
401
|
showPdfWindow: !0,
|
|
@@ -352,14 +404,14 @@ const T = {
|
|
|
352
404
|
gapPx: 18,
|
|
353
405
|
pdfFontUrl: "/simhei.ttf",
|
|
354
406
|
logger: console
|
|
355
|
-
},
|
|
407
|
+
}, Ia = { warn: () => {
|
|
356
408
|
}, info: () => {
|
|
357
409
|
} };
|
|
358
|
-
function
|
|
410
|
+
function De(e, t) {
|
|
359
411
|
if (!(!e && !t))
|
|
360
412
|
return { ...e, ...t, calibration: { ...e?.calibration, ...t?.calibration } };
|
|
361
413
|
}
|
|
362
|
-
function
|
|
414
|
+
function Ie(e = {}, t = {}) {
|
|
363
415
|
const l = { ...e, ...t };
|
|
364
416
|
return (e.unavailableReasons || t.unavailableReasons) && (l.unavailableReasons = { ...e.unavailableReasons, ...t.unavailableReasons }), l;
|
|
365
417
|
}
|
|
@@ -371,24 +423,24 @@ function j(e, t) {
|
|
|
371
423
|
messages: { ...e?.messages, ...t?.messages },
|
|
372
424
|
preview: { ...e?.preview, ...t?.preview },
|
|
373
425
|
xlsx: { ...e?.xlsx, ...t?.xlsx },
|
|
374
|
-
toolbar:
|
|
426
|
+
toolbar: Ie(e?.toolbar, t?.toolbar),
|
|
375
427
|
interaction: { ...e?.interaction, ...t?.interaction },
|
|
376
428
|
refresh: { ...e?.refresh, ...t?.refresh },
|
|
377
429
|
output: { ...e?.output, ...t?.output },
|
|
378
|
-
printOptions:
|
|
430
|
+
printOptions: De(e?.printOptions, t?.printOptions)
|
|
379
431
|
};
|
|
380
432
|
}
|
|
381
|
-
function
|
|
433
|
+
function Le(e) {
|
|
382
434
|
return {
|
|
383
|
-
showExport: e.showExport ??
|
|
384
|
-
showPrint: e.showPrint ??
|
|
385
|
-
showPdfWindow: e.showPdfWindow ??
|
|
386
|
-
showSettings: e.showSettings ??
|
|
387
|
-
showParams: e.showParams ??
|
|
388
|
-
gapPx: e.gapPx ??
|
|
435
|
+
showExport: e.showExport ?? q.showExport,
|
|
436
|
+
showPrint: e.showPrint ?? q.showPrint,
|
|
437
|
+
showPdfWindow: e.showPdfWindow ?? q.showPdfWindow,
|
|
438
|
+
showSettings: e.showSettings ?? q.showSettings,
|
|
439
|
+
showParams: e.showParams ?? q.showParams,
|
|
440
|
+
gapPx: e.gapPx ?? q.gapPx
|
|
389
441
|
};
|
|
390
442
|
}
|
|
391
|
-
function
|
|
443
|
+
function La(e, t) {
|
|
392
444
|
const l = t ? e?.presets?.[t] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, n = j(e?.defaults, l);
|
|
393
445
|
return {
|
|
394
446
|
drill: n.drill,
|
|
@@ -396,14 +448,14 @@ function $a(e, t) {
|
|
|
396
448
|
dataComparison: n.dataComparison,
|
|
397
449
|
exportExecution: n.exportExecution,
|
|
398
450
|
loadParamOptions: n.loadParamOptions,
|
|
399
|
-
...
|
|
400
|
-
pdfFontUrl: n.pdfFontUrl ??
|
|
401
|
-
theme: { ...
|
|
402
|
-
messages: { ...
|
|
403
|
-
logger: n.logger ??
|
|
451
|
+
...Le(n),
|
|
452
|
+
pdfFontUrl: n.pdfFontUrl ?? q.pdfFontUrl,
|
|
453
|
+
theme: { ...Fe, ...n.theme },
|
|
454
|
+
messages: { ...Me, ...n.messages },
|
|
455
|
+
logger: n.logger ?? q.logger,
|
|
404
456
|
preview: {
|
|
405
|
-
overscanPages:
|
|
406
|
-
searchDebounceMs:
|
|
457
|
+
overscanPages: ie(n.preview?.overscanPages, 1, 10, !0),
|
|
458
|
+
searchDebounceMs: ie(n.preview?.searchDebounceMs, 200, 2e3)
|
|
407
459
|
},
|
|
408
460
|
xlsx: { ...n.xlsx },
|
|
409
461
|
editable: n.editable ?? !1,
|
|
@@ -419,63 +471,45 @@ function $a(e, t) {
|
|
|
419
471
|
printOptions: n.printOptions
|
|
420
472
|
};
|
|
421
473
|
}
|
|
422
|
-
function
|
|
474
|
+
function ie(e, t, l, n = !1) {
|
|
423
475
|
if (e == null || !Number.isFinite(e)) return t;
|
|
424
|
-
const
|
|
425
|
-
return n ? Math.floor(
|
|
476
|
+
const r = Math.max(0, Math.min(l, e));
|
|
477
|
+
return n ? Math.floor(r) : r;
|
|
426
478
|
}
|
|
427
|
-
function
|
|
479
|
+
function Ta(e) {
|
|
428
480
|
const t = {};
|
|
429
|
-
return e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), t;
|
|
481
|
+
return e.colorScheme != null && (t["--mrp-color-scheme"] = e.colorScheme), e.emptyAccent != null && (t["--mrp-empty-accent"] = e.emptyAccent), e.shellBg != null && (t["--mrp-shell-bg"] = e.shellBg), e.shellFg != null && (t["--mrp-shell-fg"] = e.shellFg), e.toolbarBg != null && (t["--mrp-toolbar-bg"] = e.toolbarBg), e.toolbarBorder != null && (t["--mrp-toolbar-border"] = e.toolbarBorder), e.toolbarFg != null && (t["--mrp-toolbar-fg"] = e.toolbarFg), e.btnFg != null && (t["--mrp-btn-fg"] = e.btnFg), e.btnBorder != null && (t["--mrp-btn-border"] = e.btnBorder), e.btnHoverBg != null && (t["--mrp-btn-hover-bg"] = e.btnHoverBg), e.btnHoverFg != null && (t["--mrp-btn-hover-fg"] = e.btnHoverFg), e.btnActiveBg != null && (t["--mrp-btn-active-bg"] = e.btnActiveBg), e.btnActiveFg != null && (t["--mrp-btn-active-fg"] = e.btnActiveFg), e.errorFg != null && (t["--mrp-error-fg"] = e.errorFg), e.warningFg != null && (t["--mrp-warning-fg"] = e.warningFg), e.successFg != null && (t["--mrp-success-fg"] = e.successFg), t;
|
|
430
482
|
}
|
|
431
|
-
function
|
|
432
|
-
const t = se(Q, null), l =
|
|
433
|
-
const n = t?.value ?? null,
|
|
434
|
-
if (!n) return
|
|
435
|
-
const c = { ...n.presets, ...
|
|
436
|
-
for (const
|
|
437
|
-
c[
|
|
438
|
-
j(n.presets[
|
|
439
|
-
|
|
483
|
+
function qa(e) {
|
|
484
|
+
const t = se(Q, null), l = S(() => {
|
|
485
|
+
const n = t?.value ?? null, r = "defaults" in e || "presets" in e || "defaultPreset" in e ? $e(e) : { defaults: e, presets: {} };
|
|
486
|
+
if (!n) return r;
|
|
487
|
+
const c = { ...n.presets, ...r.presets };
|
|
488
|
+
for (const m of Object.keys(c))
|
|
489
|
+
c[m] = j(
|
|
490
|
+
j(n.presets[m], r.defaults),
|
|
491
|
+
r.presets[m]
|
|
440
492
|
);
|
|
441
493
|
return {
|
|
442
|
-
defaults: j(n.defaults,
|
|
494
|
+
defaults: j(n.defaults, r.defaults),
|
|
443
495
|
presets: c,
|
|
444
|
-
defaultPreset:
|
|
496
|
+
defaultPreset: r.defaultPreset ?? n.defaultPreset
|
|
445
497
|
};
|
|
446
498
|
});
|
|
447
|
-
|
|
499
|
+
ye(Q, l);
|
|
448
500
|
}
|
|
449
|
-
function
|
|
450
|
-
return se(Q,
|
|
501
|
+
function Na() {
|
|
502
|
+
return se(Q, S(() => null));
|
|
451
503
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
504
|
+
let Te = 0;
|
|
505
|
+
function qe() {
|
|
506
|
+
return `mrp-params-${++Te}`;
|
|
456
507
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
function La(e) {
|
|
461
|
-
if (e instanceof B) return e;
|
|
462
|
-
if (e instanceof we) return new B("param", e.message, e);
|
|
463
|
-
if (e instanceof Ee) return new B(e.code, e.message, e.cause);
|
|
464
|
-
if (e instanceof Error) {
|
|
465
|
-
const t = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, l = e.code;
|
|
466
|
-
if (typeof l == "string" && Object.prototype.hasOwnProperty.call(t, l)) return new B(t[l], e.message, e);
|
|
467
|
-
}
|
|
468
|
-
return new B("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
469
|
-
}
|
|
470
|
-
let qe = 0;
|
|
471
|
-
function Le() {
|
|
472
|
-
return `mrp-params-${++qe}`;
|
|
473
|
-
}
|
|
474
|
-
function ce(e, t, l) {
|
|
475
|
-
const n = (Array.isArray(t) ? t.find((i) => i?.field === e.field)?.label : void 0) ?? e.field;
|
|
508
|
+
function fe(e, t, l) {
|
|
509
|
+
const n = (Array.isArray(t) ? t.find((r) => r?.field === e.field)?.label : void 0) ?? e.field;
|
|
476
510
|
return e.code === "required" ? l.paramRequired.replace("{label}", n) : (l.paramInvalid ?? "{label}:{message}").replace("{label}", n).replace("{message}", e.message);
|
|
477
511
|
}
|
|
478
|
-
function
|
|
512
|
+
function Ba(e) {
|
|
479
513
|
const t = k({}), l = k(!1);
|
|
480
514
|
function n() {
|
|
481
515
|
const s = {};
|
|
@@ -484,75 +518,75 @@ function Ta(e) {
|
|
|
484
518
|
t.value = s, l.value = !1;
|
|
485
519
|
}
|
|
486
520
|
n(), I(e.defs, n), I(e.reportIds, n), I(() => JSON.stringify(e.params()), n);
|
|
487
|
-
const
|
|
488
|
-
function
|
|
489
|
-
const s =
|
|
521
|
+
const r = S(() => oe(e.defs.value, { ...e.params(), ...t.value })), c = S(() => !l.value && r.value.issues.length > 0 && r.value.issues.every((s) => s.code === "required"));
|
|
522
|
+
function m() {
|
|
523
|
+
const s = r.value;
|
|
490
524
|
if (!s.ok) {
|
|
491
525
|
const y = s.issues[0];
|
|
492
|
-
return { quiet: c.value, error: new B(y.code === "definition" ? "config" : "param",
|
|
526
|
+
return { quiet: c.value, error: new B(y.code === "definition" ? "config" : "param", fe(y, e.defs.value, e.messages()), { issues: s.issues }) };
|
|
493
527
|
}
|
|
494
|
-
const d = { ...s.values },
|
|
495
|
-
for (const [y, u] of Object.entries(d)) u === "" && !
|
|
528
|
+
const d = { ...s.values }, x = new Set(e.defs.value.filter((y) => y.defaultValue !== void 0).map((y) => y.field));
|
|
529
|
+
for (const [y, u] of Object.entries(d)) u === "" && !x.has(y) && delete d[y];
|
|
496
530
|
return { params: d, quiet: !1 };
|
|
497
531
|
}
|
|
498
|
-
return { values: t, attempted: l, validation:
|
|
532
|
+
return { values: t, attempted: l, validation: r, pendingRequired: c, reset: n, query: m };
|
|
499
533
|
}
|
|
500
|
-
const Z = 100,
|
|
501
|
-
function
|
|
534
|
+
const Z = 100, Ne = 32, Be = 6e4, Ue = 15e3;
|
|
535
|
+
function He(e) {
|
|
502
536
|
let t = 0;
|
|
503
537
|
const l = /* @__PURE__ */ new Set();
|
|
504
|
-
function n(
|
|
505
|
-
if (!Array.isArray(
|
|
506
|
-
const
|
|
507
|
-
return Object.freeze(
|
|
508
|
-
if (++t > Z || !s || l.has(s) || typeof s.value != "string" || !s.value || s.value.length > 1024 || typeof s.label != "string" || s.label.length > 1024 ||
|
|
509
|
-
return l.add(s),
|
|
538
|
+
function n(r, c) {
|
|
539
|
+
if (!Array.isArray(r) || c > 16 || r.length > Z) throw new Error("Invalid option response");
|
|
540
|
+
const m = /* @__PURE__ */ new Set();
|
|
541
|
+
return Object.freeze(r.map((s) => {
|
|
542
|
+
if (++t > Z || !s || l.has(s) || typeof s.value != "string" || !s.value || s.value.length > 1024 || typeof s.label != "string" || s.label.length > 1024 || m.has(s.value)) throw new Error("Invalid option response");
|
|
543
|
+
return l.add(s), m.add(s.value), Object.freeze({ label: s.label, value: s.value, ...s.children === void 0 ? {} : { children: n(s.children, c + 1) } });
|
|
510
544
|
}));
|
|
511
545
|
}
|
|
512
546
|
return n(e, 1);
|
|
513
547
|
}
|
|
514
|
-
function
|
|
515
|
-
const t = k(""), l =
|
|
516
|
-
let
|
|
548
|
+
function pe(e) {
|
|
549
|
+
const t = k(""), l = he([]), n = k(!1), r = k(!1), c = S(() => Object.fromEntries((Array.isArray(e.def().dependsOn) ? e.def().dependsOn : []).map((A) => [A, e.values()[A] ?? ""]))), m = S(() => Object.values(c.value).some((A) => !A.trim())), s = S(() => !e.loader()), d = /* @__PURE__ */ new Map();
|
|
550
|
+
let x, y, u = 0;
|
|
517
551
|
function h() {
|
|
518
|
-
u++,
|
|
552
|
+
u++, x?.abort(), x = void 0, clearTimeout(y), n.value = !1;
|
|
519
553
|
}
|
|
520
554
|
async function b() {
|
|
521
|
-
h(),
|
|
522
|
-
const
|
|
523
|
-
if (!
|
|
524
|
-
const
|
|
525
|
-
if (p && Date.now() - p.at <
|
|
526
|
-
d.delete(
|
|
555
|
+
h(), r.value = !1;
|
|
556
|
+
const A = e.loader(), M = e.def();
|
|
557
|
+
if (!A || !M.optionsSource || m.value || e.disabled() || !e.opened()) return;
|
|
558
|
+
const $ = { source: M.optionsSource, field: M.field, query: t.value.trim().slice(0, 256), params: Object.freeze({ ...c.value }), limit: Z }, i = JSON.stringify($), p = d.get(i);
|
|
559
|
+
if (p && Date.now() - p.at < Be) {
|
|
560
|
+
d.delete(i), d.set(i, p), l.value = p.options;
|
|
527
561
|
return;
|
|
528
562
|
}
|
|
529
563
|
const a = u, o = new AbortController();
|
|
530
|
-
|
|
531
|
-
const
|
|
564
|
+
x = o, n.value = !0;
|
|
565
|
+
const E = setTimeout(() => o.abort(), Ue);
|
|
532
566
|
try {
|
|
533
|
-
const
|
|
567
|
+
const P = He(await Ae(A(Object.freeze({ ...$, signal: o.signal })), o.signal));
|
|
534
568
|
if (a !== u) return;
|
|
535
|
-
for (l.value =
|
|
569
|
+
for (l.value = P, d.delete(i), d.set(i, { at: Date.now(), options: P }); d.size > Ne; ) d.delete(d.keys().next().value);
|
|
536
570
|
} catch {
|
|
537
|
-
a === u && (
|
|
571
|
+
a === u && (r.value = !0);
|
|
538
572
|
} finally {
|
|
539
|
-
clearTimeout(
|
|
573
|
+
clearTimeout(E), a === u && (n.value = !1, x = void 0);
|
|
540
574
|
}
|
|
541
575
|
}
|
|
542
|
-
function
|
|
543
|
-
h(), l.value = [],
|
|
576
|
+
function R() {
|
|
577
|
+
h(), l.value = [], r.value = !1, y = setTimeout(() => {
|
|
544
578
|
b();
|
|
545
579
|
}, 180);
|
|
546
580
|
}
|
|
547
|
-
return I(t,
|
|
548
|
-
d.clear(), t.value = "", h(), l.value = [],
|
|
581
|
+
return I(t, R, { flush: "sync" }), I([() => e.def().field, () => e.def().type, () => e.def().optionsSource, () => JSON.stringify(c.value), e.loader], () => {
|
|
582
|
+
d.clear(), t.value = "", h(), l.value = [], r.value = !1, e.opened() && b();
|
|
549
583
|
}, { flush: "sync" }), I([e.opened, e.disabled], () => {
|
|
550
584
|
!e.opened() || e.disabled() ? h() : b();
|
|
551
|
-
}, { immediate: !0 }),
|
|
585
|
+
}, { immediate: !0 }), re(() => {
|
|
552
586
|
h(), d.clear();
|
|
553
|
-
}), { query: t, options: l, loading: n, failed:
|
|
587
|
+
}), { query: t, options: l, loading: n, failed: r, waiting: m, missingLoader: s, request: b, cancel: h };
|
|
554
588
|
}
|
|
555
|
-
const
|
|
589
|
+
const Ve = ["aria-labelledby"], je = ["value", "disabled", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onChange"], Ge = { value: "" }, ze = ["value"], Je = ["id"], We = /* @__PURE__ */ _({
|
|
556
590
|
__name: "ReportCascaderParam",
|
|
557
591
|
props: {
|
|
558
592
|
def: {},
|
|
@@ -566,8 +600,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
566
600
|
},
|
|
567
601
|
emits: ["change"],
|
|
568
602
|
setup(e, { emit: t }) {
|
|
569
|
-
const l = e, n = t,
|
|
570
|
-
const y =
|
|
603
|
+
const l = e, n = t, r = pe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => !0, disabled: () => l.disabled === !0 }), c = S(() => {
|
|
604
|
+
const y = Ce(l.value);
|
|
571
605
|
if (y) return y;
|
|
572
606
|
try {
|
|
573
607
|
const u = JSON.parse(l.value);
|
|
@@ -575,65 +609,65 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
575
609
|
} catch {
|
|
576
610
|
return [];
|
|
577
611
|
}
|
|
578
|
-
}),
|
|
612
|
+
}), m = S(() => ({ ...ae, ...l.messages })), s = S(() => {
|
|
579
613
|
const y = [];
|
|
580
|
-
let u = l.def.optionsSource ?
|
|
614
|
+
let u = l.def.optionsSource ? r.options.value : l.def.options ?? [];
|
|
581
615
|
for (let h = 0; h < 16 && u.length; h++)
|
|
582
616
|
y.push(u), u = u.find((b) => b.value === c.value[h])?.children ?? [];
|
|
583
617
|
return y;
|
|
584
|
-
}), d =
|
|
585
|
-
function
|
|
618
|
+
}), d = S(() => l.def.optionsSource ? r.waiting.value ? m.value.paramOptionsDependencies : r.missingLoader.value ? m.value.paramOptionsMissingLoader : r.failed.value ? m.value.paramOptionsFailed : r.loading.value ? m.value.paramOptionsLoading : s.value.length ? "" : m.value.paramOptionsEmpty : "");
|
|
619
|
+
function x(y, u) {
|
|
586
620
|
if (l.disabled) return;
|
|
587
621
|
const h = c.value.slice(0, y);
|
|
588
622
|
u && h.push(u);
|
|
589
|
-
const b = u ? s.value[y]?.find((
|
|
590
|
-
n("change", h.length ? b?.length ? JSON.stringify([...h, null]) :
|
|
623
|
+
const b = u ? s.value[y]?.find((R) => R.value === u)?.children : s.value[y];
|
|
624
|
+
n("change", h.length ? b?.length ? JSON.stringify([...h, null]) : Re(h) : "");
|
|
591
625
|
}
|
|
592
|
-
return (y, u) => (f(),
|
|
626
|
+
return (y, u) => (f(), g("div", {
|
|
593
627
|
class: "mrp-cascader",
|
|
594
628
|
role: "group",
|
|
595
629
|
"aria-labelledby": `${e.id}-label`
|
|
596
630
|
}, [
|
|
597
|
-
(f(!0),
|
|
631
|
+
(f(!0), g(U, null, H(s.value, (h, b) => (f(), g("select", {
|
|
598
632
|
key: b,
|
|
599
633
|
class: "mrp-param-input",
|
|
600
634
|
value: c.value[b] ?? "",
|
|
601
|
-
disabled: e.disabled || w(
|
|
635
|
+
disabled: e.disabled || w(r).loading.value,
|
|
602
636
|
"aria-label": `${e.def.label ?? e.def.field} · ${b + 1}`,
|
|
603
637
|
"aria-invalid": e.invalid || void 0,
|
|
604
638
|
"aria-describedby": e.invalid ? `${e.id}-error` : d.value ? `${e.id}-status` : void 0,
|
|
605
639
|
"aria-required": e.def.required || void 0,
|
|
606
|
-
onChange: (
|
|
640
|
+
onChange: (R) => x(b, R.target.value)
|
|
607
641
|
}, [
|
|
608
|
-
|
|
609
|
-
(f(!0),
|
|
610
|
-
key:
|
|
611
|
-
value:
|
|
612
|
-
},
|
|
613
|
-
], 40,
|
|
614
|
-
d.value ? (f(),
|
|
642
|
+
L("option", Ge, O(e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field)), 1),
|
|
643
|
+
(f(!0), g(U, null, H(h, (R) => (f(), g("option", {
|
|
644
|
+
key: R.value,
|
|
645
|
+
value: R.value
|
|
646
|
+
}, O(R.label), 9, ze))), 128))
|
|
647
|
+
], 40, je))), 128)),
|
|
648
|
+
d.value ? (f(), g("small", {
|
|
615
649
|
key: 0,
|
|
616
650
|
id: `${e.id}-status`,
|
|
617
651
|
role: "status"
|
|
618
652
|
}, [
|
|
619
|
-
G(
|
|
620
|
-
w(
|
|
653
|
+
G(O(d.value), 1),
|
|
654
|
+
w(r).failed.value ? (f(), g("button", {
|
|
621
655
|
key: 0,
|
|
622
656
|
type: "button",
|
|
623
657
|
onClick: u[0] || (u[0] = //@ts-ignore
|
|
624
|
-
(...h) => w(
|
|
625
|
-
},
|
|
626
|
-
], 8,
|
|
627
|
-
], 8,
|
|
658
|
+
(...h) => w(r).request && w(r).request(...h))
|
|
659
|
+
}, O(e.messages.retry), 1)) : D("", !0)
|
|
660
|
+
], 8, Je)) : D("", !0)
|
|
661
|
+
], 8, Ve));
|
|
628
662
|
}
|
|
629
|
-
}),
|
|
663
|
+
}), Ke = /* @__PURE__ */ ee(We, [["__scopeId", "data-v-734dde49"]]), Xe = ["id", "value", "aria-labelledby", "aria-invalid", "aria-required", "aria-describedby", "aria-expanded", "aria-controls", "aria-activedescendant", "disabled", "placeholder"], Ye = ["aria-label", "disabled"], Qe = ["aria-label", "disabled"], Ze = ["id"], _e = ["id", "aria-label", "aria-busy", "aria-multiselectable"], ea = ["id", "aria-selected", "disabled", "onPointermove", "onClick"], aa = {
|
|
630
664
|
key: 0,
|
|
631
665
|
"aria-hidden": "true",
|
|
632
666
|
class: "mrp-option-check"
|
|
633
|
-
},
|
|
667
|
+
}, ta = { key: 0 }, la = {
|
|
634
668
|
key: 0,
|
|
635
669
|
role: "status"
|
|
636
|
-
},
|
|
670
|
+
}, na = /* @__PURE__ */ _({
|
|
637
671
|
__name: "ReportRemoteParamSelect",
|
|
638
672
|
props: {
|
|
639
673
|
def: {},
|
|
@@ -647,41 +681,41 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
647
681
|
},
|
|
648
682
|
emits: ["change"],
|
|
649
683
|
setup(e, { emit: t }) {
|
|
650
|
-
const l = e, n = t,
|
|
684
|
+
const l = e, n = t, r = ke({ focusOnOpen: !1 }), { root: c, panel: m, opened: s } = r, d = pe({ def: () => l.def, values: () => l.values, loader: () => l.loadOptions, opened: () => s.value, disabled: () => l.disabled === !0 }), { query: x, options: y, loading: u, failed: h, waiting: b, missingLoader: R } = d, A = S(() => ({ ...ae, ...l.messages })), M = S(() => l.def.type === "multiSelect"), $ = S(() => M.value ? Pe(l.value) ?? [] : [l.value]), i = S(() => l.def.optionsSource ? y.value : (l.def.options ?? []).filter((v) => `${v.label} ${v.value}`.toLocaleLowerCase().includes(x.value.toLocaleLowerCase())).slice(0, 100)), p = /* @__PURE__ */ new Map(), a = S(() => M.value ? $.value.map((v) => p.get(v) ?? l.def.options?.find((C) => C.value === v)?.label ?? v).join("、") : E.value || l.value), o = k(0), E = k(""), P = k(), N = S(() => `${l.id}-options`), T = S(() => b.value ? A.value.paramOptionsDependencies : l.def.optionsSource && R.value ? A.value.paramOptionsMissingLoader : h.value ? A.value.paramOptionsFailed : u.value ? A.value.paramOptionsLoading : i.value.length ? "" : A.value.paramOptionsEmpty);
|
|
651
685
|
I(() => l.value, () => {
|
|
652
|
-
|
|
653
|
-
}), I(
|
|
686
|
+
E.value = "";
|
|
687
|
+
}), I(i, () => {
|
|
654
688
|
o.value = 0;
|
|
655
689
|
}), I(() => [l.def.field, l.def.optionsSource, JSON.stringify(l.def.options)], () => {
|
|
656
|
-
p.clear(),
|
|
690
|
+
p.clear(), E.value = "";
|
|
657
691
|
}), I(s, (v) => {
|
|
658
|
-
v && V(() =>
|
|
692
|
+
v && V(() => P.value?.focus());
|
|
659
693
|
});
|
|
660
694
|
function te(v) {
|
|
661
695
|
if (!(l.disabled || b.value || u.value || h.value)) {
|
|
662
696
|
p.set(v.value, v.label);
|
|
663
|
-
for (const C of p.keys()) C !== v.value &&
|
|
697
|
+
for (const C of p.keys()) C !== v.value && !$.value.includes(C) && p.delete(C);
|
|
664
698
|
if (M.value) {
|
|
665
|
-
const C =
|
|
699
|
+
const C = $.value.includes(v.value) ? $.value.filter((F) => F !== v.value) : [...$.value, v.value];
|
|
666
700
|
if (C.length > Math.min(l.def.maxItems ?? 100, 100)) return;
|
|
667
701
|
n("change", C.length ? Oe(C) : "");
|
|
668
702
|
} else
|
|
669
|
-
n("change", v.value),
|
|
703
|
+
n("change", v.value), r.close();
|
|
670
704
|
V(() => {
|
|
671
|
-
|
|
705
|
+
E.value = v.label, P.value?.focus();
|
|
672
706
|
});
|
|
673
707
|
}
|
|
674
708
|
}
|
|
675
709
|
function le(v) {
|
|
676
|
-
v.isComposing || (s.value = !0,
|
|
710
|
+
v.isComposing || (s.value = !0, x.value = v.target.value);
|
|
677
711
|
}
|
|
678
712
|
function z() {
|
|
679
|
-
!l.disabled && !b.value && (!l.def.optionsSource || !
|
|
713
|
+
!l.disabled && !b.value && (!l.def.optionsSource || !R.value) && (x.value = "", s.value = !0);
|
|
680
714
|
}
|
|
681
|
-
function
|
|
715
|
+
function ve(v) {
|
|
682
716
|
if (!(v.isComposing || v.keyCode === 229)) {
|
|
683
717
|
if (v.key === "Escape") {
|
|
684
|
-
s.value && (v.preventDefault(), v.stopPropagation(),
|
|
718
|
+
s.value && (v.preventDefault(), v.stopPropagation(), r.close());
|
|
685
719
|
return;
|
|
686
720
|
}
|
|
687
721
|
if (["ArrowUp", "ArrowDown", "Enter"].includes(v.key)) {
|
|
@@ -690,139 +724,139 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
690
724
|
return;
|
|
691
725
|
}
|
|
692
726
|
if (v.key === "Enter") {
|
|
693
|
-
const C =
|
|
727
|
+
const C = i.value[o.value];
|
|
694
728
|
C && te(C);
|
|
695
729
|
return;
|
|
696
730
|
}
|
|
697
|
-
|
|
731
|
+
i.value.length && (o.value = (o.value + (v.key === "ArrowDown" ? 1 : -1) + i.value.length) % i.value.length, V(() => m.value?.querySelector(`[id="${N.value}-${o.value}"]`)?.scrollIntoView?.({ block: "nearest" })));
|
|
698
732
|
}
|
|
699
733
|
}
|
|
700
734
|
}
|
|
701
|
-
function
|
|
702
|
-
l.disabled || (n("change", ""),
|
|
735
|
+
function ge() {
|
|
736
|
+
l.disabled || (n("change", ""), E.value = "", r.close());
|
|
703
737
|
}
|
|
704
|
-
return (v, C) => (f(),
|
|
738
|
+
return (v, C) => (f(), g("div", {
|
|
705
739
|
ref_key: "root",
|
|
706
740
|
ref: c,
|
|
707
741
|
class: "mrp-remote-param"
|
|
708
742
|
}, [
|
|
709
|
-
|
|
743
|
+
L("div", {
|
|
710
744
|
class: Y(["mrp-remote-control", { "is-invalid": e.invalid }])
|
|
711
745
|
}, [
|
|
712
746
|
W(X, {
|
|
713
747
|
name: "search",
|
|
714
748
|
size: 14
|
|
715
749
|
}),
|
|
716
|
-
|
|
750
|
+
L("input", {
|
|
717
751
|
id: e.id,
|
|
718
752
|
ref_key: "input",
|
|
719
|
-
ref:
|
|
753
|
+
ref: P,
|
|
720
754
|
type: "text",
|
|
721
755
|
role: "combobox",
|
|
722
756
|
autocomplete: "off",
|
|
723
|
-
value: w(s) ? w(
|
|
757
|
+
value: w(s) ? w(x) : a.value,
|
|
724
758
|
maxlength: 256,
|
|
725
759
|
"aria-labelledby": `${e.id}-label`,
|
|
726
760
|
"aria-invalid": e.invalid || void 0,
|
|
727
761
|
"aria-required": e.def.required || void 0,
|
|
728
|
-
"aria-describedby": e.invalid ? `${e.id}-error` : w(b) || e.def.optionsSource && w(
|
|
762
|
+
"aria-describedby": e.invalid ? `${e.id}-error` : w(b) || e.def.optionsSource && w(R) ? `${e.id}-remote-status` : void 0,
|
|
729
763
|
"aria-autocomplete": "list",
|
|
730
764
|
"aria-expanded": w(s),
|
|
731
765
|
"aria-controls": w(s) ? N.value : void 0,
|
|
732
|
-
"aria-activedescendant": w(s) &&
|
|
733
|
-
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(
|
|
766
|
+
"aria-activedescendant": w(s) && i.value.length ? `${N.value}-${o.value}` : void 0,
|
|
767
|
+
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(R),
|
|
734
768
|
placeholder: e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field),
|
|
735
769
|
onClick: z,
|
|
736
770
|
onInput: le,
|
|
737
771
|
onCompositionend: le,
|
|
738
|
-
onKeydown:
|
|
739
|
-
}, null, 40,
|
|
740
|
-
e.value ? (f(),
|
|
772
|
+
onKeydown: ve
|
|
773
|
+
}, null, 40, Xe),
|
|
774
|
+
e.value ? (f(), g("button", {
|
|
741
775
|
key: 0,
|
|
742
776
|
type: "button",
|
|
743
|
-
"aria-label":
|
|
777
|
+
"aria-label": A.value.paramOptionsClear,
|
|
744
778
|
disabled: e.disabled,
|
|
745
|
-
onClick:
|
|
779
|
+
onClick: ge
|
|
746
780
|
}, [
|
|
747
781
|
W(X, {
|
|
748
782
|
name: "close",
|
|
749
783
|
size: 12
|
|
750
784
|
})
|
|
751
|
-
], 8,
|
|
785
|
+
], 8, Ye)) : (f(), g("button", {
|
|
752
786
|
key: 1,
|
|
753
787
|
type: "button",
|
|
754
788
|
"aria-label": e.def.label ?? e.def.field,
|
|
755
|
-
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(
|
|
756
|
-
onClick: C[0] || (C[0] = (
|
|
789
|
+
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(R),
|
|
790
|
+
onClick: C[0] || (C[0] = (F) => w(s) ? w(r).close() : z())
|
|
757
791
|
}, [
|
|
758
792
|
W(X, {
|
|
759
793
|
name: "chevron-down",
|
|
760
794
|
size: 12
|
|
761
795
|
})
|
|
762
|
-
], 8,
|
|
796
|
+
], 8, Qe))
|
|
763
797
|
], 2),
|
|
764
|
-
w(b) || e.def.optionsSource && w(
|
|
798
|
+
w(b) || e.def.optionsSource && w(R) ? (f(), g("small", {
|
|
765
799
|
key: 0,
|
|
766
800
|
id: `${e.id}-remote-status`,
|
|
767
801
|
role: "status"
|
|
768
|
-
},
|
|
769
|
-
w(s) ? (f(),
|
|
802
|
+
}, O(T.value), 9, Ze)) : D("", !0),
|
|
803
|
+
w(s) ? (f(), g("div", {
|
|
770
804
|
key: 1,
|
|
771
805
|
ref_key: "panel",
|
|
772
|
-
ref:
|
|
806
|
+
ref: m,
|
|
773
807
|
class: "mrp-remote-options"
|
|
774
808
|
}, [
|
|
775
|
-
|
|
809
|
+
L("div", {
|
|
776
810
|
id: N.value,
|
|
777
811
|
role: "listbox",
|
|
778
812
|
"aria-label": e.def.label ?? e.def.field,
|
|
779
813
|
"aria-busy": w(u),
|
|
780
814
|
"aria-multiselectable": M.value || void 0
|
|
781
815
|
}, [
|
|
782
|
-
(f(!0),
|
|
816
|
+
(f(!0), g(U, null, H(i.value, (F, J) => (f(), g("button", {
|
|
783
817
|
id: `${N.value}-${J}`,
|
|
784
|
-
key:
|
|
818
|
+
key: F.value,
|
|
785
819
|
type: "button",
|
|
786
820
|
role: "option",
|
|
787
821
|
tabindex: "-1",
|
|
788
|
-
"aria-selected":
|
|
822
|
+
"aria-selected": $.value.includes(F.value),
|
|
789
823
|
class: Y({ active: J === o.value }),
|
|
790
824
|
disabled: w(u),
|
|
791
825
|
onPointermove: (me) => o.value = J,
|
|
792
|
-
onMousedown: C[1] || (C[1] =
|
|
826
|
+
onMousedown: C[1] || (C[1] = we(() => {
|
|
793
827
|
}, ["prevent"])),
|
|
794
|
-
onClick: (me) => te(
|
|
828
|
+
onClick: (me) => te(F)
|
|
795
829
|
}, [
|
|
796
|
-
|
|
797
|
-
M.value ? (f(),
|
|
798
|
-
G(
|
|
830
|
+
L("span", null, [
|
|
831
|
+
M.value ? (f(), g("span", aa, O($.value.includes(F.value) ? "✓" : ""), 1)) : D("", !0),
|
|
832
|
+
G(O(F.label), 1)
|
|
799
833
|
]),
|
|
800
|
-
|
|
801
|
-
], 42,
|
|
802
|
-
], 8,
|
|
803
|
-
|
|
804
|
-
G(
|
|
805
|
-
w(h) ? (f(),
|
|
834
|
+
F.label !== F.value ? (f(), g("small", ta, O(F.value), 1)) : D("", !0)
|
|
835
|
+
], 42, ea))), 128))
|
|
836
|
+
], 8, _e),
|
|
837
|
+
T.value ? (f(), g("p", la, [
|
|
838
|
+
G(O(T.value), 1),
|
|
839
|
+
w(h) ? (f(), g("button", {
|
|
806
840
|
key: 0,
|
|
807
841
|
type: "button",
|
|
808
842
|
onClick: C[2] || (C[2] = //@ts-ignore
|
|
809
|
-
(
|
|
810
|
-
},
|
|
843
|
+
(...F) => w(d).request && w(d).request(...F))
|
|
844
|
+
}, O(e.messages.retry), 1)) : D("", !0)
|
|
811
845
|
])) : D("", !0)
|
|
812
846
|
], 512)) : D("", !0)
|
|
813
847
|
], 512));
|
|
814
848
|
}
|
|
815
|
-
}),
|
|
849
|
+
}), ia = /* @__PURE__ */ ee(na, [["__scopeId", "data-v-6ad41cf4"]]), ra = {
|
|
816
850
|
key: 0,
|
|
817
851
|
class: "mrp-params-title"
|
|
818
|
-
},
|
|
852
|
+
}, sa = { class: "mrp-params-grid" }, oa = ["id"], da = {
|
|
819
853
|
key: 0,
|
|
820
854
|
class: "mrp-param-star",
|
|
821
855
|
"aria-hidden": "true"
|
|
822
|
-
},
|
|
856
|
+
}, ua = ["value", "disabled", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onChange"], ca = ["disabled", "hidden"], fa = ["value"], pa = ["aria-labelledby"], va = ["type", "step", "value", "disabled", "min", "max", "aria-label", "aria-invalid", "aria-describedby", "aria-required", "onInput"], ga = ["type", "inputmode", "maxlength", "placeholder", "value", "disabled", "min", "max", "step", "aria-labelledby", "aria-invalid", "aria-describedby", "aria-required", "onInput"], ma = ["id"], ba = {
|
|
823
857
|
key: 1,
|
|
824
858
|
class: "mrp-params-actions"
|
|
825
|
-
},
|
|
859
|
+
}, ya = ["disabled"], ha = ["disabled"], wa = /* @__PURE__ */ _({
|
|
826
860
|
__name: "ReportParamPanel",
|
|
827
861
|
props: {
|
|
828
862
|
defs: {},
|
|
@@ -837,83 +871,83 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
837
871
|
},
|
|
838
872
|
emits: ["update:modelValue", "query", "reset"],
|
|
839
873
|
setup(e, { expose: t, emit: l }) {
|
|
840
|
-
const n = e,
|
|
874
|
+
const n = e, r = l, c = k({ ...n.modelValue }), m = k(null), s = qe();
|
|
841
875
|
I(
|
|
842
876
|
() => n.modelValue,
|
|
843
|
-
(
|
|
844
|
-
c.value = { ...
|
|
877
|
+
(i) => {
|
|
878
|
+
c.value = { ...i };
|
|
845
879
|
}
|
|
846
880
|
);
|
|
847
|
-
const d =
|
|
848
|
-
() => (Array.isArray(n.defs) ? n.defs : []).filter((
|
|
849
|
-
def:
|
|
881
|
+
const d = S(() => n.issues ?? oe(n.defs, c.value).issues), x = S(
|
|
882
|
+
() => (Array.isArray(n.defs) ? n.defs : []).filter((i) => i && typeof i.field == "string").map((i, p) => ({
|
|
883
|
+
def: i,
|
|
850
884
|
id: `${s}-${p}`,
|
|
851
|
-
label:
|
|
852
|
-
value: c.value[
|
|
853
|
-
error: n.attempted ? d.value.find((a) => a.field ===
|
|
885
|
+
label: i.label ?? i.field,
|
|
886
|
+
value: c.value[i.field] ?? "",
|
|
887
|
+
error: n.attempted ? d.value.find((a) => a.field === i.field) : void 0
|
|
854
888
|
}))
|
|
855
|
-
), y =
|
|
856
|
-
const
|
|
889
|
+
), y = S(() => {
|
|
890
|
+
const i = /* @__PURE__ */ new Map();
|
|
857
891
|
for (const p of n.defs) for (const a of Array.isArray(p.dependsOn) ? p.dependsOn : []) {
|
|
858
|
-
const o =
|
|
859
|
-
o.push(p.field),
|
|
892
|
+
const o = i.get(a) ?? [];
|
|
893
|
+
o.push(p.field), i.set(a, o);
|
|
860
894
|
}
|
|
861
|
-
return
|
|
895
|
+
return i;
|
|
862
896
|
});
|
|
863
|
-
function u(
|
|
864
|
-
if (n.disabled || c.value[
|
|
865
|
-
c.value = { ...c.value, [
|
|
866
|
-
const a = /* @__PURE__ */ new Set([
|
|
867
|
-
for (let
|
|
868
|
-
a.has(
|
|
869
|
-
|
|
897
|
+
function u(i, p) {
|
|
898
|
+
if (n.disabled || c.value[i] === p) return;
|
|
899
|
+
c.value = { ...c.value, [i]: p };
|
|
900
|
+
const a = /* @__PURE__ */ new Set([i]), o = [i];
|
|
901
|
+
for (let E = 0; E < o.length; E++) for (const P of y.value.get(o[E]) ?? [])
|
|
902
|
+
a.has(P) || (c.value[P] = "", a.add(P), o.push(P));
|
|
903
|
+
r("update:modelValue", { ...c.value });
|
|
870
904
|
}
|
|
871
|
-
function h(
|
|
872
|
-
return
|
|
905
|
+
function h(i) {
|
|
906
|
+
return i.type === "number" ? "number" : i.type === "date" || i.type === "month" ? i.type : "text";
|
|
873
907
|
}
|
|
874
|
-
function b(
|
|
875
|
-
if (!a) return
|
|
908
|
+
function b(i, p, a = !1) {
|
|
909
|
+
if (!a) return i.split("/")[p] ?? "";
|
|
876
910
|
try {
|
|
877
|
-
const o = JSON.parse(
|
|
911
|
+
const o = JSON.parse(i);
|
|
878
912
|
return Array.isArray(o) && (typeof o[p] == "number" || typeof o[p] == "string") ? String(o[p]) : "";
|
|
879
913
|
} catch {
|
|
880
914
|
return "";
|
|
881
915
|
}
|
|
882
916
|
}
|
|
883
|
-
function
|
|
884
|
-
return a ? !!b(
|
|
917
|
+
function R(i, p, a) {
|
|
918
|
+
return a ? !!b(i, 0) != !!b(i, 1) ? !b(i, p) || void 0 : !0 : void 0;
|
|
885
919
|
}
|
|
886
|
-
function
|
|
887
|
-
const o =
|
|
888
|
-
|
|
889
|
-
const N = o ? JSON.stringify(
|
|
890
|
-
u(
|
|
920
|
+
function A(i, p, a) {
|
|
921
|
+
const o = i.type === "numberRange", E = c.value[i.field] ?? "", P = [b(E, 0, o), b(E, 1, o)];
|
|
922
|
+
P[p] = a;
|
|
923
|
+
const N = o ? JSON.stringify(P.map((T) => T === "" ? null : Number(T))) : P.join("/");
|
|
924
|
+
u(i.field, P.every((T) => !T) ? "" : N);
|
|
891
925
|
}
|
|
892
|
-
function M(
|
|
893
|
-
|
|
926
|
+
function M(i) {
|
|
927
|
+
i.isComposing || r("query");
|
|
894
928
|
}
|
|
895
|
-
function
|
|
896
|
-
|
|
929
|
+
function $() {
|
|
930
|
+
m.value?.querySelector('[aria-invalid="true"]')?.focus();
|
|
897
931
|
}
|
|
898
|
-
return t({ focusInvalid:
|
|
932
|
+
return t({ focusInvalid: $ }), (i, p) => (f(), g("div", {
|
|
899
933
|
ref_key: "root",
|
|
900
|
-
ref:
|
|
934
|
+
ref: m,
|
|
901
935
|
class: "mrp-params"
|
|
902
936
|
}, [
|
|
903
|
-
e.showTitle !== !1 ? (f(),
|
|
904
|
-
|
|
905
|
-
(f(!0),
|
|
937
|
+
e.showTitle !== !1 ? (f(), g("span", ra, O(e.messages.paramsTitle), 1)) : D("", !0),
|
|
938
|
+
L("div", sa, [
|
|
939
|
+
(f(!0), g(U, null, H(x.value, (a) => (f(), g("label", {
|
|
906
940
|
key: a.id,
|
|
907
941
|
class: Y(["mrp-param", { "mrp-param-missing": !!a.error }])
|
|
908
942
|
}, [
|
|
909
|
-
|
|
943
|
+
L("span", {
|
|
910
944
|
id: `${a.id}-label`,
|
|
911
945
|
class: "mrp-param-label"
|
|
912
946
|
}, [
|
|
913
|
-
G(
|
|
914
|
-
a.def.required ? (f(),
|
|
915
|
-
], 8,
|
|
916
|
-
a.def.type === "cascader" ? (f(), ne(
|
|
947
|
+
G(O(a.label), 1),
|
|
948
|
+
a.def.required ? (f(), g("i", da, "*")) : D("", !0)
|
|
949
|
+
], 8, oa),
|
|
950
|
+
a.def.type === "cascader" ? (f(), ne(Ke, {
|
|
917
951
|
key: 0,
|
|
918
952
|
id: a.id,
|
|
919
953
|
def: a.def,
|
|
@@ -924,7 +958,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
924
958
|
disabled: e.disabled,
|
|
925
959
|
invalid: !!a.error,
|
|
926
960
|
onChange: (o) => u(a.def.field, o)
|
|
927
|
-
}, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : a.def.optionsSource || a.def.type === "multiSelect" ? (f(), ne(
|
|
961
|
+
}, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : a.def.optionsSource || a.def.type === "multiSelect" ? (f(), ne(ia, {
|
|
928
962
|
key: 1,
|
|
929
963
|
id: a.id,
|
|
930
964
|
def: a.def,
|
|
@@ -935,7 +969,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
935
969
|
disabled: e.disabled,
|
|
936
970
|
invalid: !!a.error,
|
|
937
971
|
onChange: (o) => u(a.def.field, o)
|
|
938
|
-
}, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : (a.def.type ?? "text") === "select" ? (f(),
|
|
972
|
+
}, null, 8, ["id", "def", "value", "values", "load-options", "messages", "disabled", "invalid", "onChange"])) : (a.def.type ?? "text") === "select" ? (f(), g("select", {
|
|
939
973
|
key: 2,
|
|
940
974
|
class: "mrp-param-input",
|
|
941
975
|
value: a.value,
|
|
@@ -947,38 +981,38 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
947
981
|
onChange: (o) => u(a.def.field, o.target.value),
|
|
948
982
|
onKeydown: K(M, ["enter"])
|
|
949
983
|
}, [
|
|
950
|
-
|
|
984
|
+
L("option", {
|
|
951
985
|
value: "",
|
|
952
986
|
disabled: a.def.required,
|
|
953
987
|
hidden: a.def.required
|
|
954
|
-
},
|
|
955
|
-
(f(!0),
|
|
988
|
+
}, O(a.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", a.label)), 9, ca),
|
|
989
|
+
(f(!0), g(U, null, H(a.def.options ?? [], (o) => (f(), g("option", {
|
|
956
990
|
key: o.value,
|
|
957
991
|
value: o.value
|
|
958
|
-
},
|
|
959
|
-
], 40,
|
|
992
|
+
}, O(o.label), 9, fa))), 128))
|
|
993
|
+
], 40, ua)) : a.def.type === "dateRange" || a.def.type === "numberRange" ? (f(), g("div", {
|
|
960
994
|
key: 3,
|
|
961
995
|
class: "mrp-param-range",
|
|
962
996
|
role: "group",
|
|
963
997
|
"aria-labelledby": `${a.id}-label`
|
|
964
998
|
}, [
|
|
965
|
-
(f(!0),
|
|
966
|
-
key:
|
|
999
|
+
(f(!0), g(U, null, H(a.def.type === "numberRange" ? [e.messages.paramNumberRangeStart ?? "最小值", e.messages.paramNumberRangeEnd ?? "最大值"] : [e.messages.paramRangeStart ?? "开始日期", e.messages.paramRangeEnd ?? "结束日期"], (o, E) => (f(), g("input", {
|
|
1000
|
+
key: E,
|
|
967
1001
|
class: "mrp-param-input",
|
|
968
1002
|
type: a.def.type === "numberRange" ? "number" : "date",
|
|
969
1003
|
step: a.def.type === "numberRange" ? "any" : void 0,
|
|
970
|
-
value: b(a.value,
|
|
1004
|
+
value: b(a.value, E, a.def.type === "numberRange"),
|
|
971
1005
|
disabled: e.disabled,
|
|
972
1006
|
min: a.def.min,
|
|
973
1007
|
max: a.def.max,
|
|
974
1008
|
"aria-label": `${a.label} · ${o}`,
|
|
975
|
-
"aria-invalid": a.def.type === "numberRange" ? !!a.error || void 0 :
|
|
1009
|
+
"aria-invalid": a.def.type === "numberRange" ? !!a.error || void 0 : R(a.value, E, a.error),
|
|
976
1010
|
"aria-describedby": a.error ? `${a.id}-error` : void 0,
|
|
977
1011
|
"aria-required": a.def.required || void 0,
|
|
978
|
-
onInput: (
|
|
1012
|
+
onInput: (P) => A(a.def, E, P.target.value),
|
|
979
1013
|
onKeydown: K(M, ["enter"])
|
|
980
|
-
}, null, 40,
|
|
981
|
-
], 8,
|
|
1014
|
+
}, null, 40, va))), 128))
|
|
1015
|
+
], 8, pa)) : (f(), g("input", {
|
|
982
1016
|
key: 4,
|
|
983
1017
|
class: "mrp-param-input",
|
|
984
1018
|
type: h(a.def),
|
|
@@ -996,54 +1030,55 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
996
1030
|
"aria-required": a.def.required || void 0,
|
|
997
1031
|
onInput: (o) => u(a.def.field, o.target.value),
|
|
998
1032
|
onKeydown: K(M, ["enter"])
|
|
999
|
-
}, null, 40,
|
|
1000
|
-
a.error ? (f(),
|
|
1033
|
+
}, null, 40, ga)),
|
|
1034
|
+
a.error ? (f(), g("small", {
|
|
1001
1035
|
key: 5,
|
|
1002
1036
|
id: `${a.id}-error`,
|
|
1003
1037
|
class: "mrp-param-error",
|
|
1004
1038
|
role: "status"
|
|
1005
|
-
},
|
|
1039
|
+
}, O(w(fe)(a.error, e.defs, e.messages)), 9, ma)) : D("", !0)
|
|
1006
1040
|
], 2))), 128))
|
|
1007
1041
|
]),
|
|
1008
|
-
e.showActions !== !1 ? (f(),
|
|
1009
|
-
|
|
1042
|
+
e.showActions !== !1 ? (f(), g("div", ba, [
|
|
1043
|
+
L("button", {
|
|
1010
1044
|
class: "mrp-nav mrp-param-query",
|
|
1011
1045
|
type: "button",
|
|
1012
1046
|
disabled: e.disabled,
|
|
1013
|
-
onClick: p[0] || (p[0] = (a) =>
|
|
1014
|
-
},
|
|
1015
|
-
|
|
1047
|
+
onClick: p[0] || (p[0] = (a) => i.$emit("query"))
|
|
1048
|
+
}, O(e.messages.query), 9, ya),
|
|
1049
|
+
L("button", {
|
|
1016
1050
|
class: "mrp-nav",
|
|
1017
1051
|
type: "button",
|
|
1018
1052
|
disabled: e.disabled,
|
|
1019
|
-
onClick: p[1] || (p[1] = (a) =>
|
|
1020
|
-
},
|
|
1053
|
+
onClick: p[1] || (p[1] = (a) => i.$emit("reset"))
|
|
1054
|
+
}, O(e.messages.reset), 9, ha)
|
|
1021
1055
|
])) : D("", !0)
|
|
1022
1056
|
], 512));
|
|
1023
1057
|
}
|
|
1024
|
-
}),
|
|
1058
|
+
}), Ua = /* @__PURE__ */ ee(wa, [["__scopeId", "data-v-bad4d7de"]]);
|
|
1025
1059
|
export {
|
|
1026
|
-
|
|
1060
|
+
ce as D,
|
|
1027
1061
|
B as M,
|
|
1028
1062
|
ae as P,
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1063
|
+
Ua as R,
|
|
1064
|
+
Ia as S,
|
|
1065
|
+
ue as a,
|
|
1066
|
+
Me as b,
|
|
1067
|
+
xe as c,
|
|
1068
|
+
Fe as d,
|
|
1035
1069
|
$e as e,
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1070
|
+
Da as f,
|
|
1071
|
+
qa as g,
|
|
1072
|
+
La as h,
|
|
1073
|
+
Fa as i,
|
|
1074
|
+
xa as j,
|
|
1075
|
+
ke as k,
|
|
1076
|
+
Ma as l,
|
|
1077
|
+
Ba as m,
|
|
1078
|
+
ka as n,
|
|
1044
1079
|
Oa as p,
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1080
|
+
$a as r,
|
|
1081
|
+
Aa as s,
|
|
1082
|
+
Ta as t,
|
|
1083
|
+
Na as u
|
|
1049
1084
|
};
|