@agile-team/mach-report 2.23.1 → 2.25.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 +10 -4
- package/dist/{ExcelBindingWizard-BrTmdo7f.cjs → ExcelBindingWizard-BgJG-T6k.cjs} +1 -1
- package/dist/{ExcelBindingWizard-CcDMLO8Q.js → ExcelBindingWizard-NQ_v396s.js} +3 -3
- package/dist/ParamEditor-DEP38mBp.cjs +1 -0
- package/dist/ParamEditor-Z-3yodp5.js +750 -0
- package/dist/{ReportBatchPanel-CHxBtG9R.cjs → ReportBatchPanel-D33LjMrA.cjs} +1 -1
- package/dist/{ReportBatchPanel-CJB67WNd.js → ReportBatchPanel-DG8FV-5X.js} +2 -2
- package/dist/{ReportLabelStudio-Tplc1TLJ.js → ReportLabelStudio-BZp23_hA.js} +68 -68
- package/dist/ReportLabelStudio-Bz-xAayk.cjs +1 -0
- package/dist/ReportParamPanel-B27IGJjk.cjs +1 -0
- package/dist/{ReportParamPanel-GI43aGa0.js → ReportParamPanel-DGXzBzl2.js} +328 -298
- package/dist/ReportPreview-CilFAS9U.js +7170 -0
- package/dist/ReportPreview-dOOzPts2.cjs +6 -0
- package/dist/{ReportTemplateLibrary-KqX4E2sN.js → ReportTemplateLibrary-DpSGgvFa.js} +28 -28
- package/dist/{ReportTemplateLibrary-BFQIX0sg.cjs → ReportTemplateLibrary-uG1gENaW.cjs} +1 -1
- package/dist/{RuleEditor-OPX1awrH.js → RuleEditor-BONALh1Q.js} +846 -835
- package/dist/RuleEditor-bLXiRcxL.cjs +1 -0
- package/dist/{TemplateOutlinePanel-CVYKVLv_.cjs → TemplateOutlinePanel-C3nfHuaR.cjs} +1 -1
- package/dist/{TemplateOutlinePanel-DQS-eOs6.js → TemplateOutlinePanel-JGBKeF3e.js} +10 -10
- package/dist/{TemplateReusePanel-CY6O93Zk.cjs → TemplateReusePanel-BKhgp6kg.cjs} +1 -1
- package/dist/{TemplateReusePanel-DKXiFTyB.js → TemplateReusePanel-DXQUO6nQ.js} +2 -2
- package/dist/TemplateReviewPanel-5RWFUUEf.cjs +1 -0
- package/dist/TemplateReviewPanel-DhL7Hapy.js +602 -0
- package/dist/analytics.d.cts +1 -1
- package/dist/analytics.d.ts +1 -1
- package/dist/artifact-integrity.json +98 -98
- package/dist/assets-BYdpkTIt.cjs +1 -0
- package/dist/assets-C4MIvzQ4.js +137 -0
- package/dist/auto-D-eDZa_V.cjs +1 -0
- package/dist/{auto-BB99S802.js → auto-umW_ozwr.js} +10 -10
- package/dist/capabilities-CN_kSVjO.js +121 -0
- package/dist/capabilities-D4nfhcvB.cjs +1 -0
- package/dist/cell-style-B6Qffrx8.js +37 -0
- package/dist/cell-style-y_uh1pZp.cjs +1 -0
- package/dist/{data-bar-IkI6VvMQ.js → data-bar-Bfh54sT4.js} +1 -1
- package/dist/data-bar-DzceAVeR.cjs +1 -0
- package/dist/designer-CCyj5WYS.js +7595 -0
- package/dist/designer-Cj7fn4Hh.cjs +2 -0
- package/dist/designer.cjs +1 -1
- package/dist/designer.d.cts +143 -10
- package/dist/designer.d.ts +143 -10
- package/dist/designer.js +5 -5
- package/dist/diagnostic-collector-gB07PHy2.js +392 -0
- package/dist/diagnostic-collector-wASg6Fzs.cjs +1 -0
- package/dist/dom-CXWMmwh-.cjs +1 -0
- package/dist/{dom-JWrchIre.js → dom-DxdCMLzs.js} +185 -185
- package/dist/{encoding-CEd-dq9A.js → encoding-CEkBtlUP.js} +2 -2
- package/dist/{encoding-7lquyj0w.cjs → encoding-Cipno7dq.cjs} +1 -1
- package/dist/{font-loader-CNWXomuV.js → font-loader-D4NLIKJL.js} +1 -1
- package/dist/{font-loader-D8pI87fL.cjs → font-loader-p_SyTvqt.cjs} +1 -1
- package/dist/{grid-strokes-EoY66L2f.js → grid-strokes-DkZEZvcI.js} +1 -1
- package/dist/grid-strokes-RFMR91jn.cjs +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +48 -9
- package/dist/index.d.ts +48 -9
- package/dist/index.js +137 -136
- package/dist/json-snapshot-DQdkA_At.cjs +2 -0
- package/dist/{json-snapshot-BRnzKudk.js → json-snapshot-x0JpllWL.js} +919 -791
- package/dist/{pdf-DpMkW72B.cjs → pdf-C060D5UY.cjs} +31 -31
- package/dist/{pdf-CJToa81Z.js → pdf-DU8HelKd.js} +2499 -2492
- 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-BWTp-X7b.cjs → plugin-B_k23hut.cjs} +1 -1
- package/dist/{plugin-_BkUVc2z.js → plugin-CttO46hc.js} +1 -1
- package/dist/{prefill-CWGdnqQd.js → prefill-BkF9Fw_p.js} +13 -13
- package/dist/prefill-BvkuwooY.cjs +1 -0
- package/dist/prepared-CSywIEAZ.cjs +1 -0
- package/dist/prepared-Cyuh61fJ.js +128 -0
- package/dist/protocol-BwbJNVZl.cjs +1 -0
- package/dist/protocol-DwtxjXzO.js +96 -0
- package/dist/record-bindings-B7djSjNs.cjs +1 -0
- package/dist/{record-bindings-DatJZv_e.js → record-bindings-Cv7lFiof.js} +47 -47
- package/dist/{region-binding-workflow-l7NGfagJ.cjs → region-binding-workflow-COD8nISZ.cjs} +1 -1
- package/dist/{region-binding-workflow-DjrXuR1q.js → region-binding-workflow-D8I4QWRh.js} +2 -2
- package/dist/report-encoding-worker.cjs +1 -1
- package/dist/report-encoding-worker.js +1 -1
- package/dist/{rich-text-layout-Ciwa6D2o.js → rich-text-layout-Ch_N0Ubu.js} +1 -1
- package/dist/rich-text-layout-yJGuThtC.cjs +3 -0
- package/dist/runtime-BE30icyB.js +227 -0
- package/dist/runtime-DRSuy_SQ.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 +2742 -2417
- package/dist/server.cjs +1 -1
- package/dist/server.d.cts +51 -16
- package/dist/server.d.ts +51 -16
- package/dist/server.js +8 -8
- package/dist/style.css +1 -1
- package/dist/{template-catalog-DtrtT1FY.cjs → template-catalog-C0riwrx7.cjs} +1 -1
- package/dist/{template-catalog-CRuZL3pi.js → template-catalog-D_gl93va.js} +3 -3
- package/dist/template-fragments-CgzPdFKB.cjs +1 -0
- package/dist/{template-fragments-CPpGpQoz.js → template-fragments-D94ZZmPc.js} +2 -2
- package/dist/template-registry-BMScUmM4.cjs +1 -0
- package/dist/{template-registry-O0hNIOfB.js → template-registry-DZOtRY7t.js} +19 -19
- package/dist/{textwrap-D4ZksyMK.js → textwrap-BywMBMXM.js} +1 -1
- package/dist/textwrap-LhJkHWb1.cjs +4 -0
- package/dist/vue/async.d.cts +101 -22
- package/dist/vue/async.d.ts +101 -22
- package/dist/vue/index.d.cts +133 -34
- package/dist/vue/index.d.ts +133 -34
- 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-C6-SrnCT.cjs → workbook-session-DR2j6Hxm.cjs} +3 -3
- package/dist/{workbook-session-C9ZmCBwY.js → workbook-session-SzfILBJJ.js} +106 -107
- 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/node.d.cts +30 -1
- package/dist/xlsx/node.d.ts +30 -1
- package/dist/xlsx-node.cjs +42 -42
- package/dist/xlsx-node.js +3908 -3889
- package/dist/xlsx.cjs +4 -4
- package/dist/xlsx.d.cts +20 -3
- package/dist/xlsx.d.ts +20 -3
- package/dist/xlsx.js +302 -295
- package/package.json +1 -1
- package/dist/ParamEditor-BGjovFUe.js +0 -737
- package/dist/ParamEditor-CeNp4_zQ.cjs +0 -1
- package/dist/ReportLabelStudio-g8PkqJWn.cjs +0 -1
- package/dist/ReportParamPanel-C7fZTllk.cjs +0 -1
- package/dist/ReportPreview-BoGBGyRr.cjs +0 -6
- package/dist/ReportPreview-QLONCyci.js +0 -6257
- package/dist/RuleEditor-BZUP9yvL.cjs +0 -1
- package/dist/TemplateReviewPanel-DbeNC8Ms.cjs +0 -1
- package/dist/TemplateReviewPanel-Dijwm9YE.js +0 -593
- package/dist/assets-D2gHc4Mz.cjs +0 -1
- package/dist/assets-T_gDeFaz.js +0 -132
- package/dist/auto-BrPWo7Xm.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-BZoVWTgl.js +0 -7172
- package/dist/designer-zS2uKJmY.cjs +0 -2
- package/dist/dom-ChE5D-L-.cjs +0 -1
- package/dist/grid-strokes-Be24LGuV.cjs +0 -1
- package/dist/json-snapshot-DNiIbpOr.cjs +0 -2
- package/dist/prefill-PaAy6wLk.cjs +0 -1
- package/dist/prepared-CJy_qk7d.js +0 -94
- package/dist/prepared-D0yCSxSO.cjs +0 -1
- package/dist/progress-BXzlVbIp.js +0 -29
- package/dist/progress-ByiOxUD3.js +0 -250
- package/dist/progress-DJBd9Rb9.cjs +0 -1
- package/dist/progress-WomPRP3B.cjs +0 -1
- package/dist/protocol-BG16rz6D.js +0 -90
- package/dist/protocol-wzhl1Fim.cjs +0 -1
- package/dist/record-bindings-MBxbeBsi.cjs +0 -1
- package/dist/rich-text-layout-DK7A_a5r.cjs +0 -3
- package/dist/runtime-DYMOS_gz.cjs +0 -1
- package/dist/runtime-PiCax9zQ.js +0 -171
- package/dist/template-fragments-GVjpew_q.cjs +0 -1
- package/dist/template-registry-DI59PXVK.cjs +0 -1
- package/dist/textwrap-DEHqAjKZ.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-gB07PHy2.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,7 @@ const ke = {
|
|
|
324
371
|
diagnosticImageDecode: "图片加载失败,请检查资源后重试。",
|
|
325
372
|
diagnosticAssetFailed: "图表或图片生成失败,请重试或联系管理员。",
|
|
326
373
|
diagnosticAssetBudget: "图片资源超出处理范围,请减少资源或缩小报表范围。"
|
|
327
|
-
},
|
|
374
|
+
}, Fe = {
|
|
328
375
|
colorScheme: "light",
|
|
329
376
|
emptyAccent: "#79a7e8",
|
|
330
377
|
shellBg: "#f4f7fc",
|
|
@@ -342,13 +389,13 @@ const ke = {
|
|
|
342
389
|
warningFg: "#92400e",
|
|
343
390
|
successFg: "#047857"
|
|
344
391
|
};
|
|
345
|
-
function
|
|
392
|
+
function $e(e = {}) {
|
|
346
393
|
return { ...e, defaults: e.defaults ?? {}, presets: e.presets ?? {} };
|
|
347
394
|
}
|
|
348
|
-
function
|
|
395
|
+
function Da(e) {
|
|
349
396
|
return e;
|
|
350
397
|
}
|
|
351
|
-
const
|
|
398
|
+
const q = {
|
|
352
399
|
showExport: !0,
|
|
353
400
|
showPrint: !0,
|
|
354
401
|
showPdfWindow: !0,
|
|
@@ -357,14 +404,14 @@ const T = {
|
|
|
357
404
|
gapPx: 18,
|
|
358
405
|
pdfFontUrl: "/simhei.ttf",
|
|
359
406
|
logger: console
|
|
360
|
-
},
|
|
407
|
+
}, Ia = { warn: () => {
|
|
361
408
|
}, info: () => {
|
|
362
409
|
} };
|
|
363
|
-
function
|
|
410
|
+
function De(e, t) {
|
|
364
411
|
if (!(!e && !t))
|
|
365
412
|
return { ...e, ...t, calibration: { ...e?.calibration, ...t?.calibration } };
|
|
366
413
|
}
|
|
367
|
-
function
|
|
414
|
+
function Ie(e = {}, t = {}) {
|
|
368
415
|
const l = { ...e, ...t };
|
|
369
416
|
return (e.unavailableReasons || t.unavailableReasons) && (l.unavailableReasons = { ...e.unavailableReasons, ...t.unavailableReasons }), l;
|
|
370
417
|
}
|
|
@@ -376,24 +423,24 @@ function j(e, t) {
|
|
|
376
423
|
messages: { ...e?.messages, ...t?.messages },
|
|
377
424
|
preview: { ...e?.preview, ...t?.preview },
|
|
378
425
|
xlsx: { ...e?.xlsx, ...t?.xlsx },
|
|
379
|
-
toolbar:
|
|
426
|
+
toolbar: Ie(e?.toolbar, t?.toolbar),
|
|
380
427
|
interaction: { ...e?.interaction, ...t?.interaction },
|
|
381
428
|
refresh: { ...e?.refresh, ...t?.refresh },
|
|
382
429
|
output: { ...e?.output, ...t?.output },
|
|
383
|
-
printOptions:
|
|
430
|
+
printOptions: De(e?.printOptions, t?.printOptions)
|
|
384
431
|
};
|
|
385
432
|
}
|
|
386
|
-
function
|
|
433
|
+
function Le(e) {
|
|
387
434
|
return {
|
|
388
|
-
showExport: e.showExport ??
|
|
389
|
-
showPrint: e.showPrint ??
|
|
390
|
-
showPdfWindow: e.showPdfWindow ??
|
|
391
|
-
showSettings: e.showSettings ??
|
|
392
|
-
showParams: e.showParams ??
|
|
393
|
-
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
|
|
394
441
|
};
|
|
395
442
|
}
|
|
396
|
-
function
|
|
443
|
+
function La(e, t) {
|
|
397
444
|
const l = t ? e?.presets?.[t] : e?.defaultPreset ? e?.presets?.[e.defaultPreset] : void 0, n = j(e?.defaults, l);
|
|
398
445
|
return {
|
|
399
446
|
drill: n.drill,
|
|
@@ -401,14 +448,14 @@ function Fa(e, t) {
|
|
|
401
448
|
dataComparison: n.dataComparison,
|
|
402
449
|
exportExecution: n.exportExecution,
|
|
403
450
|
loadParamOptions: n.loadParamOptions,
|
|
404
|
-
...
|
|
405
|
-
pdfFontUrl: n.pdfFontUrl ??
|
|
406
|
-
theme: { ...
|
|
407
|
-
messages: { ...
|
|
408
|
-
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,
|
|
409
456
|
preview: {
|
|
410
|
-
overscanPages:
|
|
411
|
-
searchDebounceMs:
|
|
457
|
+
overscanPages: ie(n.preview?.overscanPages, 1, 10, !0),
|
|
458
|
+
searchDebounceMs: ie(n.preview?.searchDebounceMs, 200, 2e3)
|
|
412
459
|
},
|
|
413
460
|
xlsx: { ...n.xlsx },
|
|
414
461
|
editable: n.editable ?? !1,
|
|
@@ -424,63 +471,45 @@ function Fa(e, t) {
|
|
|
424
471
|
printOptions: n.printOptions
|
|
425
472
|
};
|
|
426
473
|
}
|
|
427
|
-
function
|
|
474
|
+
function ie(e, t, l, n = !1) {
|
|
428
475
|
if (e == null || !Number.isFinite(e)) return t;
|
|
429
|
-
const
|
|
430
|
-
return n ? Math.floor(
|
|
476
|
+
const r = Math.max(0, Math.min(l, e));
|
|
477
|
+
return n ? Math.floor(r) : r;
|
|
431
478
|
}
|
|
432
|
-
function
|
|
479
|
+
function Ta(e) {
|
|
433
480
|
const t = {};
|
|
434
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;
|
|
435
482
|
}
|
|
436
|
-
function
|
|
437
|
-
const t = se(Q, null), l =
|
|
438
|
-
const n = t?.value ?? null,
|
|
439
|
-
if (!n) return
|
|
440
|
-
const c = { ...n.presets, ...
|
|
441
|
-
for (const
|
|
442
|
-
c[
|
|
443
|
-
j(n.presets[
|
|
444
|
-
|
|
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]
|
|
445
492
|
);
|
|
446
493
|
return {
|
|
447
|
-
defaults: j(n.defaults,
|
|
494
|
+
defaults: j(n.defaults, r.defaults),
|
|
448
495
|
presets: c,
|
|
449
|
-
defaultPreset:
|
|
496
|
+
defaultPreset: r.defaultPreset ?? n.defaultPreset
|
|
450
497
|
};
|
|
451
498
|
});
|
|
452
|
-
|
|
499
|
+
ye(Q, l);
|
|
453
500
|
}
|
|
454
|
-
function
|
|
455
|
-
return se(Q,
|
|
501
|
+
function Na() {
|
|
502
|
+
return se(Q, S(() => null));
|
|
456
503
|
}
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
504
|
+
let Te = 0;
|
|
505
|
+
function qe() {
|
|
506
|
+
return `mrp-params-${++Te}`;
|
|
461
507
|
}
|
|
462
|
-
function
|
|
463
|
-
|
|
464
|
-
}
|
|
465
|
-
function La(e) {
|
|
466
|
-
if (e instanceof B) return e;
|
|
467
|
-
if (e instanceof we) return new B("param", e.message, e);
|
|
468
|
-
if (e instanceof Ee) return new B(e.code, e.message, e.cause);
|
|
469
|
-
if (e instanceof Error) {
|
|
470
|
-
const t = { params: "param", config: "config", validate: "validate", fetch: "fetch" }, l = e.code;
|
|
471
|
-
if (typeof l == "string" && Object.prototype.hasOwnProperty.call(t, l)) return new B(t[l], e.message, e);
|
|
472
|
-
}
|
|
473
|
-
return new B("fetch", e instanceof Error ? e.message : "预览加载失败", e);
|
|
474
|
-
}
|
|
475
|
-
let qe = 0;
|
|
476
|
-
function Le() {
|
|
477
|
-
return `mrp-params-${++qe}`;
|
|
478
|
-
}
|
|
479
|
-
function ce(e, t, l) {
|
|
480
|
-
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;
|
|
481
510
|
return e.code === "required" ? l.paramRequired.replace("{label}", n) : (l.paramInvalid ?? "{label}:{message}").replace("{label}", n).replace("{message}", e.message);
|
|
482
511
|
}
|
|
483
|
-
function
|
|
512
|
+
function Ba(e) {
|
|
484
513
|
const t = k({}), l = k(!1);
|
|
485
514
|
function n() {
|
|
486
515
|
const s = {};
|
|
@@ -489,75 +518,75 @@ function Ta(e) {
|
|
|
489
518
|
t.value = s, l.value = !1;
|
|
490
519
|
}
|
|
491
520
|
n(), I(e.defs, n), I(e.reportIds, n), I(() => JSON.stringify(e.params()), n);
|
|
492
|
-
const
|
|
493
|
-
function
|
|
494
|
-
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;
|
|
495
524
|
if (!s.ok) {
|
|
496
525
|
const y = s.issues[0];
|
|
497
|
-
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 }) };
|
|
498
527
|
}
|
|
499
|
-
const d = { ...s.values },
|
|
500
|
-
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];
|
|
501
530
|
return { params: d, quiet: !1 };
|
|
502
531
|
}
|
|
503
|
-
return { values: t, attempted: l, validation:
|
|
532
|
+
return { values: t, attempted: l, validation: r, pendingRequired: c, reset: n, query: m };
|
|
504
533
|
}
|
|
505
|
-
const Z = 100,
|
|
506
|
-
function
|
|
534
|
+
const Z = 100, Ne = 32, Be = 6e4, Ue = 15e3;
|
|
535
|
+
function He(e) {
|
|
507
536
|
let t = 0;
|
|
508
537
|
const l = /* @__PURE__ */ new Set();
|
|
509
|
-
function n(
|
|
510
|
-
if (!Array.isArray(
|
|
511
|
-
const
|
|
512
|
-
return Object.freeze(
|
|
513
|
-
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 ||
|
|
514
|
-
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) } });
|
|
515
544
|
}));
|
|
516
545
|
}
|
|
517
546
|
return n(e, 1);
|
|
518
547
|
}
|
|
519
|
-
function
|
|
520
|
-
const t = k(""), l =
|
|
521
|
-
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;
|
|
522
551
|
function h() {
|
|
523
|
-
u++,
|
|
552
|
+
u++, x?.abort(), x = void 0, clearTimeout(y), n.value = !1;
|
|
524
553
|
}
|
|
525
554
|
async function b() {
|
|
526
|
-
h(),
|
|
555
|
+
h(), r.value = !1;
|
|
527
556
|
const A = e.loader(), M = e.def();
|
|
528
|
-
if (!A || !M.optionsSource ||
|
|
529
|
-
const $ = { source: M.optionsSource, field: M.field, query: t.value.trim().slice(0, 256), params: Object.freeze({ ...c.value }), limit: Z },
|
|
530
|
-
if (p && Date.now() - p.at <
|
|
531
|
-
d.delete(
|
|
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;
|
|
532
561
|
return;
|
|
533
562
|
}
|
|
534
563
|
const a = u, o = new AbortController();
|
|
535
|
-
|
|
536
|
-
const
|
|
564
|
+
x = o, n.value = !0;
|
|
565
|
+
const E = setTimeout(() => o.abort(), Ue);
|
|
537
566
|
try {
|
|
538
|
-
const
|
|
567
|
+
const P = He(await Ae(A(Object.freeze({ ...$, signal: o.signal })), o.signal));
|
|
539
568
|
if (a !== u) return;
|
|
540
|
-
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);
|
|
541
570
|
} catch {
|
|
542
|
-
a === u && (
|
|
571
|
+
a === u && (r.value = !0);
|
|
543
572
|
} finally {
|
|
544
|
-
clearTimeout(
|
|
573
|
+
clearTimeout(E), a === u && (n.value = !1, x = void 0);
|
|
545
574
|
}
|
|
546
575
|
}
|
|
547
|
-
function
|
|
548
|
-
h(), l.value = [],
|
|
576
|
+
function R() {
|
|
577
|
+
h(), l.value = [], r.value = !1, y = setTimeout(() => {
|
|
549
578
|
b();
|
|
550
579
|
}, 180);
|
|
551
580
|
}
|
|
552
|
-
return I(t,
|
|
553
|
-
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();
|
|
554
583
|
}, { flush: "sync" }), I([e.opened, e.disabled], () => {
|
|
555
584
|
!e.opened() || e.disabled() ? h() : b();
|
|
556
|
-
}, { immediate: !0 }),
|
|
585
|
+
}, { immediate: !0 }), re(() => {
|
|
557
586
|
h(), d.clear();
|
|
558
|
-
}), { query: t, options: l, loading: n, failed:
|
|
587
|
+
}), { query: t, options: l, loading: n, failed: r, waiting: m, missingLoader: s, request: b, cancel: h };
|
|
559
588
|
}
|
|
560
|
-
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__ */ _({
|
|
561
590
|
__name: "ReportCascaderParam",
|
|
562
591
|
props: {
|
|
563
592
|
def: {},
|
|
@@ -571,8 +600,8 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
571
600
|
},
|
|
572
601
|
emits: ["change"],
|
|
573
602
|
setup(e, { emit: t }) {
|
|
574
|
-
const l = e, n = t,
|
|
575
|
-
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);
|
|
576
605
|
if (y) return y;
|
|
577
606
|
try {
|
|
578
607
|
const u = JSON.parse(l.value);
|
|
@@ -580,65 +609,65 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
580
609
|
} catch {
|
|
581
610
|
return [];
|
|
582
611
|
}
|
|
583
|
-
}),
|
|
612
|
+
}), m = S(() => ({ ...ae, ...l.messages })), s = S(() => {
|
|
584
613
|
const y = [];
|
|
585
|
-
let u = l.def.optionsSource ?
|
|
614
|
+
let u = l.def.optionsSource ? r.options.value : l.def.options ?? [];
|
|
586
615
|
for (let h = 0; h < 16 && u.length; h++)
|
|
587
616
|
y.push(u), u = u.find((b) => b.value === c.value[h])?.children ?? [];
|
|
588
617
|
return y;
|
|
589
|
-
}), d =
|
|
590
|
-
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) {
|
|
591
620
|
if (l.disabled) return;
|
|
592
621
|
const h = c.value.slice(0, y);
|
|
593
622
|
u && h.push(u);
|
|
594
|
-
const b = u ? s.value[y]?.find((
|
|
595
|
-
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) : "");
|
|
596
625
|
}
|
|
597
|
-
return (y, u) => (f(),
|
|
626
|
+
return (y, u) => (f(), g("div", {
|
|
598
627
|
class: "mrp-cascader",
|
|
599
628
|
role: "group",
|
|
600
629
|
"aria-labelledby": `${e.id}-label`
|
|
601
630
|
}, [
|
|
602
|
-
(f(!0),
|
|
631
|
+
(f(!0), g(U, null, H(s.value, (h, b) => (f(), g("select", {
|
|
603
632
|
key: b,
|
|
604
633
|
class: "mrp-param-input",
|
|
605
634
|
value: c.value[b] ?? "",
|
|
606
|
-
disabled: e.disabled || w(
|
|
635
|
+
disabled: e.disabled || w(r).loading.value,
|
|
607
636
|
"aria-label": `${e.def.label ?? e.def.field} · ${b + 1}`,
|
|
608
637
|
"aria-invalid": e.invalid || void 0,
|
|
609
638
|
"aria-describedby": e.invalid ? `${e.id}-error` : d.value ? `${e.id}-status` : void 0,
|
|
610
639
|
"aria-required": e.def.required || void 0,
|
|
611
|
-
onChange: (
|
|
640
|
+
onChange: (R) => x(b, R.target.value)
|
|
612
641
|
}, [
|
|
613
|
-
|
|
614
|
-
(f(!0),
|
|
615
|
-
key:
|
|
616
|
-
value:
|
|
617
|
-
},
|
|
618
|
-
], 40,
|
|
619
|
-
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", {
|
|
620
649
|
key: 0,
|
|
621
650
|
id: `${e.id}-status`,
|
|
622
651
|
role: "status"
|
|
623
652
|
}, [
|
|
624
|
-
G(
|
|
625
|
-
w(
|
|
653
|
+
G(O(d.value), 1),
|
|
654
|
+
w(r).failed.value ? (f(), g("button", {
|
|
626
655
|
key: 0,
|
|
627
656
|
type: "button",
|
|
628
657
|
onClick: u[0] || (u[0] = //@ts-ignore
|
|
629
|
-
(...h) => w(
|
|
630
|
-
},
|
|
631
|
-
], 8,
|
|
632
|
-
], 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));
|
|
633
662
|
}
|
|
634
|
-
}),
|
|
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 = {
|
|
635
664
|
key: 0,
|
|
636
665
|
"aria-hidden": "true",
|
|
637
666
|
class: "mrp-option-check"
|
|
638
|
-
},
|
|
667
|
+
}, ta = { key: 0 }, la = {
|
|
639
668
|
key: 0,
|
|
640
669
|
role: "status"
|
|
641
|
-
},
|
|
670
|
+
}, na = /* @__PURE__ */ _({
|
|
642
671
|
__name: "ReportRemoteParamSelect",
|
|
643
672
|
props: {
|
|
644
673
|
def: {},
|
|
@@ -652,15 +681,15 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
652
681
|
},
|
|
653
682
|
emits: ["change"],
|
|
654
683
|
setup(e, { emit: t }) {
|
|
655
|
-
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);
|
|
656
685
|
I(() => l.value, () => {
|
|
657
|
-
|
|
658
|
-
}), I(
|
|
686
|
+
E.value = "";
|
|
687
|
+
}), I(i, () => {
|
|
659
688
|
o.value = 0;
|
|
660
689
|
}), I(() => [l.def.field, l.def.optionsSource, JSON.stringify(l.def.options)], () => {
|
|
661
|
-
p.clear(),
|
|
690
|
+
p.clear(), E.value = "";
|
|
662
691
|
}), I(s, (v) => {
|
|
663
|
-
v && V(() =>
|
|
692
|
+
v && V(() => P.value?.focus());
|
|
664
693
|
});
|
|
665
694
|
function te(v) {
|
|
666
695
|
if (!(l.disabled || b.value || u.value || h.value)) {
|
|
@@ -671,22 +700,22 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
671
700
|
if (C.length > Math.min(l.def.maxItems ?? 100, 100)) return;
|
|
672
701
|
n("change", C.length ? Oe(C) : "");
|
|
673
702
|
} else
|
|
674
|
-
n("change", v.value),
|
|
703
|
+
n("change", v.value), r.close();
|
|
675
704
|
V(() => {
|
|
676
|
-
|
|
705
|
+
E.value = v.label, P.value?.focus();
|
|
677
706
|
});
|
|
678
707
|
}
|
|
679
708
|
}
|
|
680
709
|
function le(v) {
|
|
681
|
-
v.isComposing || (s.value = !0,
|
|
710
|
+
v.isComposing || (s.value = !0, x.value = v.target.value);
|
|
682
711
|
}
|
|
683
712
|
function z() {
|
|
684
|
-
!l.disabled && !b.value && (!l.def.optionsSource || !
|
|
713
|
+
!l.disabled && !b.value && (!l.def.optionsSource || !R.value) && (x.value = "", s.value = !0);
|
|
685
714
|
}
|
|
686
|
-
function
|
|
715
|
+
function ve(v) {
|
|
687
716
|
if (!(v.isComposing || v.keyCode === 229)) {
|
|
688
717
|
if (v.key === "Escape") {
|
|
689
|
-
s.value && (v.preventDefault(), v.stopPropagation(),
|
|
718
|
+
s.value && (v.preventDefault(), v.stopPropagation(), r.close());
|
|
690
719
|
return;
|
|
691
720
|
}
|
|
692
721
|
if (["ArrowUp", "ArrowDown", "Enter"].includes(v.key)) {
|
|
@@ -695,96 +724,96 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
695
724
|
return;
|
|
696
725
|
}
|
|
697
726
|
if (v.key === "Enter") {
|
|
698
|
-
const C =
|
|
727
|
+
const C = i.value[o.value];
|
|
699
728
|
C && te(C);
|
|
700
729
|
return;
|
|
701
730
|
}
|
|
702
|
-
|
|
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" })));
|
|
703
732
|
}
|
|
704
733
|
}
|
|
705
734
|
}
|
|
706
|
-
function
|
|
707
|
-
l.disabled || (n("change", ""),
|
|
735
|
+
function ge() {
|
|
736
|
+
l.disabled || (n("change", ""), E.value = "", r.close());
|
|
708
737
|
}
|
|
709
|
-
return (v, C) => (f(),
|
|
738
|
+
return (v, C) => (f(), g("div", {
|
|
710
739
|
ref_key: "root",
|
|
711
740
|
ref: c,
|
|
712
741
|
class: "mrp-remote-param"
|
|
713
742
|
}, [
|
|
714
|
-
|
|
743
|
+
L("div", {
|
|
715
744
|
class: Y(["mrp-remote-control", { "is-invalid": e.invalid }])
|
|
716
745
|
}, [
|
|
717
746
|
W(X, {
|
|
718
747
|
name: "search",
|
|
719
748
|
size: 14
|
|
720
749
|
}),
|
|
721
|
-
|
|
750
|
+
L("input", {
|
|
722
751
|
id: e.id,
|
|
723
752
|
ref_key: "input",
|
|
724
|
-
ref:
|
|
753
|
+
ref: P,
|
|
725
754
|
type: "text",
|
|
726
755
|
role: "combobox",
|
|
727
756
|
autocomplete: "off",
|
|
728
|
-
value: w(s) ? w(
|
|
757
|
+
value: w(s) ? w(x) : a.value,
|
|
729
758
|
maxlength: 256,
|
|
730
759
|
"aria-labelledby": `${e.id}-label`,
|
|
731
760
|
"aria-invalid": e.invalid || void 0,
|
|
732
761
|
"aria-required": e.def.required || void 0,
|
|
733
|
-
"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,
|
|
734
763
|
"aria-autocomplete": "list",
|
|
735
764
|
"aria-expanded": w(s),
|
|
736
765
|
"aria-controls": w(s) ? N.value : void 0,
|
|
737
|
-
"aria-activedescendant": w(s) &&
|
|
738
|
-
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),
|
|
739
768
|
placeholder: e.def.placeholder ?? (e.messages.paramSelectPlaceholder ?? "请选择{label}").replace("{label}", e.def.label ?? e.def.field),
|
|
740
769
|
onClick: z,
|
|
741
770
|
onInput: le,
|
|
742
771
|
onCompositionend: le,
|
|
743
|
-
onKeydown:
|
|
744
|
-
}, null, 40,
|
|
745
|
-
e.value ? (f(),
|
|
772
|
+
onKeydown: ve
|
|
773
|
+
}, null, 40, Xe),
|
|
774
|
+
e.value ? (f(), g("button", {
|
|
746
775
|
key: 0,
|
|
747
776
|
type: "button",
|
|
748
777
|
"aria-label": A.value.paramOptionsClear,
|
|
749
778
|
disabled: e.disabled,
|
|
750
|
-
onClick:
|
|
779
|
+
onClick: ge
|
|
751
780
|
}, [
|
|
752
781
|
W(X, {
|
|
753
782
|
name: "close",
|
|
754
783
|
size: 12
|
|
755
784
|
})
|
|
756
|
-
], 8,
|
|
785
|
+
], 8, Ye)) : (f(), g("button", {
|
|
757
786
|
key: 1,
|
|
758
787
|
type: "button",
|
|
759
788
|
"aria-label": e.def.label ?? e.def.field,
|
|
760
|
-
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(
|
|
761
|
-
onClick: C[0] || (C[0] = (F) => w(s) ? w(
|
|
789
|
+
disabled: e.disabled || w(b) || !!e.def.optionsSource && w(R),
|
|
790
|
+
onClick: C[0] || (C[0] = (F) => w(s) ? w(r).close() : z())
|
|
762
791
|
}, [
|
|
763
792
|
W(X, {
|
|
764
793
|
name: "chevron-down",
|
|
765
794
|
size: 12
|
|
766
795
|
})
|
|
767
|
-
], 8,
|
|
796
|
+
], 8, Qe))
|
|
768
797
|
], 2),
|
|
769
|
-
w(b) || e.def.optionsSource && w(
|
|
798
|
+
w(b) || e.def.optionsSource && w(R) ? (f(), g("small", {
|
|
770
799
|
key: 0,
|
|
771
800
|
id: `${e.id}-remote-status`,
|
|
772
801
|
role: "status"
|
|
773
|
-
},
|
|
774
|
-
w(s) ? (f(),
|
|
802
|
+
}, O(T.value), 9, Ze)) : D("", !0),
|
|
803
|
+
w(s) ? (f(), g("div", {
|
|
775
804
|
key: 1,
|
|
776
805
|
ref_key: "panel",
|
|
777
|
-
ref:
|
|
806
|
+
ref: m,
|
|
778
807
|
class: "mrp-remote-options"
|
|
779
808
|
}, [
|
|
780
|
-
|
|
809
|
+
L("div", {
|
|
781
810
|
id: N.value,
|
|
782
811
|
role: "listbox",
|
|
783
812
|
"aria-label": e.def.label ?? e.def.field,
|
|
784
813
|
"aria-busy": w(u),
|
|
785
814
|
"aria-multiselectable": M.value || void 0
|
|
786
815
|
}, [
|
|
787
|
-
(f(!0),
|
|
816
|
+
(f(!0), g(U, null, H(i.value, (F, J) => (f(), g("button", {
|
|
788
817
|
id: `${N.value}-${J}`,
|
|
789
818
|
key: F.value,
|
|
790
819
|
type: "button",
|
|
@@ -794,40 +823,40 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
794
823
|
class: Y({ active: J === o.value }),
|
|
795
824
|
disabled: w(u),
|
|
796
825
|
onPointermove: (me) => o.value = J,
|
|
797
|
-
onMousedown: C[1] || (C[1] =
|
|
826
|
+
onMousedown: C[1] || (C[1] = we(() => {
|
|
798
827
|
}, ["prevent"])),
|
|
799
828
|
onClick: (me) => te(F)
|
|
800
829
|
}, [
|
|
801
|
-
|
|
802
|
-
M.value ? (f(),
|
|
803
|
-
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)
|
|
804
833
|
]),
|
|
805
|
-
F.label !== F.value ? (f(),
|
|
806
|
-
], 42,
|
|
807
|
-
], 8,
|
|
808
|
-
|
|
809
|
-
G(
|
|
810
|
-
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", {
|
|
811
840
|
key: 0,
|
|
812
841
|
type: "button",
|
|
813
842
|
onClick: C[2] || (C[2] = //@ts-ignore
|
|
814
843
|
(...F) => w(d).request && w(d).request(...F))
|
|
815
|
-
},
|
|
844
|
+
}, O(e.messages.retry), 1)) : D("", !0)
|
|
816
845
|
])) : D("", !0)
|
|
817
846
|
], 512)) : D("", !0)
|
|
818
847
|
], 512));
|
|
819
848
|
}
|
|
820
|
-
}),
|
|
849
|
+
}), ia = /* @__PURE__ */ ee(na, [["__scopeId", "data-v-6ad41cf4"]]), ra = {
|
|
821
850
|
key: 0,
|
|
822
851
|
class: "mrp-params-title"
|
|
823
|
-
},
|
|
852
|
+
}, sa = { class: "mrp-params-grid" }, oa = ["id"], da = {
|
|
824
853
|
key: 0,
|
|
825
854
|
class: "mrp-param-star",
|
|
826
855
|
"aria-hidden": "true"
|
|
827
|
-
},
|
|
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 = {
|
|
828
857
|
key: 1,
|
|
829
858
|
class: "mrp-params-actions"
|
|
830
|
-
},
|
|
859
|
+
}, ya = ["disabled"], ha = ["disabled"], wa = /* @__PURE__ */ _({
|
|
831
860
|
__name: "ReportParamPanel",
|
|
832
861
|
props: {
|
|
833
862
|
defs: {},
|
|
@@ -842,83 +871,83 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
842
871
|
},
|
|
843
872
|
emits: ["update:modelValue", "query", "reset"],
|
|
844
873
|
setup(e, { expose: t, emit: l }) {
|
|
845
|
-
const n = e,
|
|
874
|
+
const n = e, r = l, c = k({ ...n.modelValue }), m = k(null), s = qe();
|
|
846
875
|
I(
|
|
847
876
|
() => n.modelValue,
|
|
848
|
-
(
|
|
849
|
-
c.value = { ...
|
|
877
|
+
(i) => {
|
|
878
|
+
c.value = { ...i };
|
|
850
879
|
}
|
|
851
880
|
);
|
|
852
|
-
const d =
|
|
853
|
-
() => (Array.isArray(n.defs) ? n.defs : []).filter((
|
|
854
|
-
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,
|
|
855
884
|
id: `${s}-${p}`,
|
|
856
|
-
label:
|
|
857
|
-
value: c.value[
|
|
858
|
-
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
|
|
859
888
|
}))
|
|
860
|
-
), y =
|
|
861
|
-
const
|
|
889
|
+
), y = S(() => {
|
|
890
|
+
const i = /* @__PURE__ */ new Map();
|
|
862
891
|
for (const p of n.defs) for (const a of Array.isArray(p.dependsOn) ? p.dependsOn : []) {
|
|
863
|
-
const o =
|
|
864
|
-
o.push(p.field),
|
|
892
|
+
const o = i.get(a) ?? [];
|
|
893
|
+
o.push(p.field), i.set(a, o);
|
|
865
894
|
}
|
|
866
|
-
return
|
|
895
|
+
return i;
|
|
867
896
|
});
|
|
868
|
-
function u(
|
|
869
|
-
if (n.disabled || c.value[
|
|
870
|
-
c.value = { ...c.value, [
|
|
871
|
-
const a = /* @__PURE__ */ new Set([
|
|
872
|
-
for (let
|
|
873
|
-
a.has(
|
|
874
|
-
|
|
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 });
|
|
875
904
|
}
|
|
876
|
-
function h(
|
|
877
|
-
return
|
|
905
|
+
function h(i) {
|
|
906
|
+
return i.type === "number" ? "number" : i.type === "date" || i.type === "month" ? i.type : "text";
|
|
878
907
|
}
|
|
879
|
-
function b(
|
|
880
|
-
if (!a) return
|
|
908
|
+
function b(i, p, a = !1) {
|
|
909
|
+
if (!a) return i.split("/")[p] ?? "";
|
|
881
910
|
try {
|
|
882
|
-
const o = JSON.parse(
|
|
911
|
+
const o = JSON.parse(i);
|
|
883
912
|
return Array.isArray(o) && (typeof o[p] == "number" || typeof o[p] == "string") ? String(o[p]) : "";
|
|
884
913
|
} catch {
|
|
885
914
|
return "";
|
|
886
915
|
}
|
|
887
916
|
}
|
|
888
|
-
function
|
|
889
|
-
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;
|
|
890
919
|
}
|
|
891
|
-
function A(
|
|
892
|
-
const o =
|
|
893
|
-
|
|
894
|
-
const N = o ? JSON.stringify(
|
|
895
|
-
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);
|
|
896
925
|
}
|
|
897
|
-
function M(
|
|
898
|
-
|
|
926
|
+
function M(i) {
|
|
927
|
+
i.isComposing || r("query");
|
|
899
928
|
}
|
|
900
929
|
function $() {
|
|
901
|
-
|
|
930
|
+
m.value?.querySelector('[aria-invalid="true"]')?.focus();
|
|
902
931
|
}
|
|
903
|
-
return t({ focusInvalid: $ }), (
|
|
932
|
+
return t({ focusInvalid: $ }), (i, p) => (f(), g("div", {
|
|
904
933
|
ref_key: "root",
|
|
905
|
-
ref:
|
|
934
|
+
ref: m,
|
|
906
935
|
class: "mrp-params"
|
|
907
936
|
}, [
|
|
908
|
-
e.showTitle !== !1 ? (f(),
|
|
909
|
-
|
|
910
|
-
(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", {
|
|
911
940
|
key: a.id,
|
|
912
941
|
class: Y(["mrp-param", { "mrp-param-missing": !!a.error }])
|
|
913
942
|
}, [
|
|
914
|
-
|
|
943
|
+
L("span", {
|
|
915
944
|
id: `${a.id}-label`,
|
|
916
945
|
class: "mrp-param-label"
|
|
917
946
|
}, [
|
|
918
|
-
G(
|
|
919
|
-
a.def.required ? (f(),
|
|
920
|
-
], 8,
|
|
921
|
-
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, {
|
|
922
951
|
key: 0,
|
|
923
952
|
id: a.id,
|
|
924
953
|
def: a.def,
|
|
@@ -929,7 +958,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
929
958
|
disabled: e.disabled,
|
|
930
959
|
invalid: !!a.error,
|
|
931
960
|
onChange: (o) => u(a.def.field, o)
|
|
932
|
-
}, 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, {
|
|
933
962
|
key: 1,
|
|
934
963
|
id: a.id,
|
|
935
964
|
def: a.def,
|
|
@@ -940,7 +969,7 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
940
969
|
disabled: e.disabled,
|
|
941
970
|
invalid: !!a.error,
|
|
942
971
|
onChange: (o) => u(a.def.field, o)
|
|
943
|
-
}, 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", {
|
|
944
973
|
key: 2,
|
|
945
974
|
class: "mrp-param-input",
|
|
946
975
|
value: a.value,
|
|
@@ -952,38 +981,38 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
952
981
|
onChange: (o) => u(a.def.field, o.target.value),
|
|
953
982
|
onKeydown: K(M, ["enter"])
|
|
954
983
|
}, [
|
|
955
|
-
|
|
984
|
+
L("option", {
|
|
956
985
|
value: "",
|
|
957
986
|
disabled: a.def.required,
|
|
958
987
|
hidden: a.def.required
|
|
959
|
-
},
|
|
960
|
-
(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", {
|
|
961
990
|
key: o.value,
|
|
962
991
|
value: o.value
|
|
963
|
-
},
|
|
964
|
-
], 40,
|
|
992
|
+
}, O(o.label), 9, fa))), 128))
|
|
993
|
+
], 40, ua)) : a.def.type === "dateRange" || a.def.type === "numberRange" ? (f(), g("div", {
|
|
965
994
|
key: 3,
|
|
966
995
|
class: "mrp-param-range",
|
|
967
996
|
role: "group",
|
|
968
997
|
"aria-labelledby": `${a.id}-label`
|
|
969
998
|
}, [
|
|
970
|
-
(f(!0),
|
|
971
|
-
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,
|
|
972
1001
|
class: "mrp-param-input",
|
|
973
1002
|
type: a.def.type === "numberRange" ? "number" : "date",
|
|
974
1003
|
step: a.def.type === "numberRange" ? "any" : void 0,
|
|
975
|
-
value: b(a.value,
|
|
1004
|
+
value: b(a.value, E, a.def.type === "numberRange"),
|
|
976
1005
|
disabled: e.disabled,
|
|
977
1006
|
min: a.def.min,
|
|
978
1007
|
max: a.def.max,
|
|
979
1008
|
"aria-label": `${a.label} · ${o}`,
|
|
980
|
-
"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),
|
|
981
1010
|
"aria-describedby": a.error ? `${a.id}-error` : void 0,
|
|
982
1011
|
"aria-required": a.def.required || void 0,
|
|
983
|
-
onInput: (
|
|
1012
|
+
onInput: (P) => A(a.def, E, P.target.value),
|
|
984
1013
|
onKeydown: K(M, ["enter"])
|
|
985
|
-
}, null, 40,
|
|
986
|
-
], 8,
|
|
1014
|
+
}, null, 40, va))), 128))
|
|
1015
|
+
], 8, pa)) : (f(), g("input", {
|
|
987
1016
|
key: 4,
|
|
988
1017
|
class: "mrp-param-input",
|
|
989
1018
|
type: h(a.def),
|
|
@@ -1001,54 +1030,55 @@ const He = ["aria-labelledby"], Ve = ["value", "disabled", "aria-label", "aria-i
|
|
|
1001
1030
|
"aria-required": a.def.required || void 0,
|
|
1002
1031
|
onInput: (o) => u(a.def.field, o.target.value),
|
|
1003
1032
|
onKeydown: K(M, ["enter"])
|
|
1004
|
-
}, null, 40,
|
|
1005
|
-
a.error ? (f(),
|
|
1033
|
+
}, null, 40, ga)),
|
|
1034
|
+
a.error ? (f(), g("small", {
|
|
1006
1035
|
key: 5,
|
|
1007
1036
|
id: `${a.id}-error`,
|
|
1008
1037
|
class: "mrp-param-error",
|
|
1009
1038
|
role: "status"
|
|
1010
|
-
},
|
|
1039
|
+
}, O(w(fe)(a.error, e.defs, e.messages)), 9, ma)) : D("", !0)
|
|
1011
1040
|
], 2))), 128))
|
|
1012
1041
|
]),
|
|
1013
|
-
e.showActions !== !1 ? (f(),
|
|
1014
|
-
|
|
1042
|
+
e.showActions !== !1 ? (f(), g("div", ba, [
|
|
1043
|
+
L("button", {
|
|
1015
1044
|
class: "mrp-nav mrp-param-query",
|
|
1016
1045
|
type: "button",
|
|
1017
1046
|
disabled: e.disabled,
|
|
1018
|
-
onClick: p[0] || (p[0] = (a) =>
|
|
1019
|
-
},
|
|
1020
|
-
|
|
1047
|
+
onClick: p[0] || (p[0] = (a) => i.$emit("query"))
|
|
1048
|
+
}, O(e.messages.query), 9, ya),
|
|
1049
|
+
L("button", {
|
|
1021
1050
|
class: "mrp-nav",
|
|
1022
1051
|
type: "button",
|
|
1023
1052
|
disabled: e.disabled,
|
|
1024
|
-
onClick: p[1] || (p[1] = (a) =>
|
|
1025
|
-
},
|
|
1053
|
+
onClick: p[1] || (p[1] = (a) => i.$emit("reset"))
|
|
1054
|
+
}, O(e.messages.reset), 9, ha)
|
|
1026
1055
|
])) : D("", !0)
|
|
1027
1056
|
], 512));
|
|
1028
1057
|
}
|
|
1029
|
-
}),
|
|
1058
|
+
}), Ua = /* @__PURE__ */ ee(wa, [["__scopeId", "data-v-bad4d7de"]]);
|
|
1030
1059
|
export {
|
|
1031
|
-
|
|
1060
|
+
ce as D,
|
|
1032
1061
|
B as M,
|
|
1033
1062
|
ae as P,
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1063
|
+
Ua as R,
|
|
1064
|
+
Ia as S,
|
|
1065
|
+
ue as a,
|
|
1066
|
+
Me as b,
|
|
1067
|
+
xe as c,
|
|
1068
|
+
Fe as d,
|
|
1069
|
+
$e as e,
|
|
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,
|
|
1049
1079
|
Oa as p,
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1080
|
+
$a as r,
|
|
1081
|
+
Aa as s,
|
|
1082
|
+
Ta as t,
|
|
1083
|
+
Na as u
|
|
1054
1084
|
};
|