rj-grid 0.2.1 → 0.2.3
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 +328 -98
- package/dist/rj-grid.js +812 -388
- package/dist/style.css +147 -2
- package/dist/types/src/RjContextMenu.vue.d.ts +2 -2
- package/dist/types/src/RjGrid.vue.d.ts +23 -0
- package/dist/types/src/RjOptionSelect.vue.d.ts +49 -0
- package/dist/types/src/nlq.d.ts +10 -2
- package/dist/types/src/optionsSource.d.ts +24 -1
- package/dist/types/src/types.d.ts +6 -1
- package/dist/types/src/useColumnState.d.ts +1 -0
- package/package.json +4 -1
package/dist/rj-grid.js
CHANGED
|
@@ -204,21 +204,6 @@ function parseNumericInput(raw) {
|
|
|
204
204
|
const n = Number(s);
|
|
205
205
|
return isFinite(n) ? sign * n : null;
|
|
206
206
|
}
|
|
207
|
-
function rankOptions(options, query) {
|
|
208
|
-
const q = (query || "").trim().toLowerCase();
|
|
209
|
-
if (!q)
|
|
210
|
-
return options;
|
|
211
|
-
const starts = [];
|
|
212
|
-
const contains = [];
|
|
213
|
-
for (const o of options) {
|
|
214
|
-
const label = String(o.label ?? o.value ?? "").toLowerCase();
|
|
215
|
-
if (label.startsWith(q))
|
|
216
|
-
starts.push(o);
|
|
217
|
-
else if (label.includes(q))
|
|
218
|
-
contains.push(o);
|
|
219
|
-
}
|
|
220
|
-
return [...starts, ...contains];
|
|
221
|
-
}
|
|
222
207
|
let zhCollator;
|
|
223
208
|
function getZhCollator() {
|
|
224
209
|
if (zhCollator !== void 0)
|
|
@@ -579,6 +564,9 @@ function useColumnState(sourceColumns) {
|
|
|
579
564
|
widthMap.set(colIdOf(c), clampWidth(Math.round(cur[i] * factor), c));
|
|
580
565
|
});
|
|
581
566
|
}
|
|
567
|
+
function clearWidths() {
|
|
568
|
+
widthMap.clear();
|
|
569
|
+
}
|
|
582
570
|
function moveColumn(dragId, targetId) {
|
|
583
571
|
if (dragId === targetId)
|
|
584
572
|
return;
|
|
@@ -652,6 +640,7 @@ function useColumnState(sourceColumns) {
|
|
|
652
640
|
setAutoWidth,
|
|
653
641
|
hasSizedWidth,
|
|
654
642
|
sizeToFit,
|
|
643
|
+
clearWidths,
|
|
655
644
|
moveColumn,
|
|
656
645
|
togglePin,
|
|
657
646
|
toggleHide,
|
|
@@ -785,7 +774,8 @@ function withCarrierOptions(fields, carrier) {
|
|
|
785
774
|
return {
|
|
786
775
|
...f,
|
|
787
776
|
kind: "select",
|
|
788
|
-
|
|
777
|
+
// 直接透传载体列表(可能为树,带 children),供查询栏下拉按层级渲染 + 搜索
|
|
778
|
+
options: hit.list
|
|
789
779
|
};
|
|
790
780
|
});
|
|
791
781
|
}
|
|
@@ -4072,6 +4062,7 @@ const zhCN = {
|
|
|
4072
4062
|
expServerNoPdf: "后端导出不含 PDF(浏览器打印属前端渲染),已改用前端范围",
|
|
4073
4063
|
expServerMissing: "未接入后端导出:请设置 serverExport 回调",
|
|
4074
4064
|
expFailed: "导出失败",
|
|
4065
|
+
printCap: "数据量较大:仅打印前 {n} 行(共 {total} 行)。请缩小范围或走后端导出获取全量",
|
|
4075
4066
|
resetState: "重置列状态",
|
|
4076
4067
|
groupBanner: "⬇ 将列标题拖到此处进行行分组(或点面板“分组”页签)",
|
|
4077
4068
|
// 加载 / 空态
|
|
@@ -4236,6 +4227,7 @@ const zhCN = {
|
|
|
4236
4227
|
querySearch: "查询",
|
|
4237
4228
|
queryReset: "重置",
|
|
4238
4229
|
querySaveView: "存为视图",
|
|
4230
|
+
queryRemove: "移除该条件",
|
|
4239
4231
|
queryInput: "请输入",
|
|
4240
4232
|
// 行编辑弹窗与内置确认框(查询栏操作按钮)
|
|
4241
4233
|
rowFormTitle: "编辑行",
|
|
@@ -4308,6 +4300,7 @@ const enUS = {
|
|
|
4308
4300
|
expServerNoPdf: "Server export has no PDF (browser printing is front-end); fell back to a front-end range",
|
|
4309
4301
|
expServerMissing: "No server export wired up: provide a serverExport callback",
|
|
4310
4302
|
expFailed: "Export failed",
|
|
4303
|
+
printCap: "Large data set: printing the first {n} of {total} rows only. Narrow the range or use Server export for the full set",
|
|
4311
4304
|
resetState: "Reset column state",
|
|
4312
4305
|
groupBanner: "⬇ Drag column headers here to group rows (or Panel → Group)",
|
|
4313
4306
|
loading: "Loading…",
|
|
@@ -4458,6 +4451,7 @@ const enUS = {
|
|
|
4458
4451
|
querySearch: "Search",
|
|
4459
4452
|
queryReset: "Reset",
|
|
4460
4453
|
querySaveView: "Save as view",
|
|
4454
|
+
queryRemove: "Remove this condition",
|
|
4461
4455
|
queryInput: "Enter",
|
|
4462
4456
|
// Row edit dialog & built-in confirm (query bar action buttons)
|
|
4463
4457
|
rowFormTitle: "Edit Row",
|
|
@@ -4552,32 +4546,88 @@ function pickLabel(item, labelKey, value) {
|
|
|
4552
4546
|
return String(value);
|
|
4553
4547
|
}
|
|
4554
4548
|
function normalizeOptions(raw, shape = {}) {
|
|
4555
|
-
const out = [];
|
|
4556
4549
|
if (!Array.isArray(raw))
|
|
4557
|
-
return
|
|
4550
|
+
return [];
|
|
4558
4551
|
const ck = shape.childrenKey ?? "children";
|
|
4559
4552
|
const walk = (arr) => {
|
|
4553
|
+
const res = [];
|
|
4560
4554
|
for (const it of arr) {
|
|
4561
4555
|
if (it == null || typeof it !== "object") {
|
|
4562
4556
|
if (it !== null && it !== void 0)
|
|
4563
|
-
|
|
4557
|
+
res.push({ label: String(it), value: it });
|
|
4564
4558
|
continue;
|
|
4565
4559
|
}
|
|
4566
4560
|
const item = it;
|
|
4561
|
+
let opt;
|
|
4567
4562
|
if (shape.map) {
|
|
4568
|
-
|
|
4563
|
+
opt = shape.map(item);
|
|
4569
4564
|
} else {
|
|
4570
4565
|
const value = pickValue(item, shape.valueKey);
|
|
4571
4566
|
const label = pickLabel(item, shape.labelKey, value);
|
|
4572
|
-
|
|
4567
|
+
opt = { label, value };
|
|
4573
4568
|
}
|
|
4574
|
-
|
|
4575
|
-
|
|
4569
|
+
const kids = Array.isArray(item[ck]) ? walk(item[ck]) : void 0;
|
|
4570
|
+
if (kids && kids.length)
|
|
4571
|
+
opt.children = kids;
|
|
4572
|
+
res.push(opt);
|
|
4573
|
+
}
|
|
4574
|
+
return res;
|
|
4575
|
+
};
|
|
4576
|
+
return walk(raw);
|
|
4577
|
+
}
|
|
4578
|
+
function flattenOptions(options) {
|
|
4579
|
+
const out = [];
|
|
4580
|
+
const walk = (arr) => {
|
|
4581
|
+
for (const o of arr || []) {
|
|
4582
|
+
out.push({ label: o.label, value: o.value });
|
|
4583
|
+
if (o.children && o.children.length)
|
|
4584
|
+
walk(o.children);
|
|
4576
4585
|
}
|
|
4577
4586
|
};
|
|
4578
|
-
walk(
|
|
4587
|
+
walk(options || []);
|
|
4579
4588
|
return out;
|
|
4580
4589
|
}
|
|
4590
|
+
function filterOptionTree(options, query) {
|
|
4591
|
+
const q = (query || "").trim().toLowerCase();
|
|
4592
|
+
if (!q)
|
|
4593
|
+
return options;
|
|
4594
|
+
const walk = (arr) => {
|
|
4595
|
+
const res = [];
|
|
4596
|
+
for (const o of arr || []) {
|
|
4597
|
+
const kids = o.children && o.children.length ? walk(o.children) : [];
|
|
4598
|
+
const self = String(o.label ?? o.value ?? "").toLowerCase().includes(q);
|
|
4599
|
+
if (self)
|
|
4600
|
+
res.push({ ...o });
|
|
4601
|
+
else if (kids.length)
|
|
4602
|
+
res.push({ label: o.label, value: o.value, children: kids });
|
|
4603
|
+
}
|
|
4604
|
+
return res;
|
|
4605
|
+
};
|
|
4606
|
+
return walk(options);
|
|
4607
|
+
}
|
|
4608
|
+
function flattenTreeForRender(options, expanded) {
|
|
4609
|
+
const rows = [];
|
|
4610
|
+
const walk = (arr, depth) => {
|
|
4611
|
+
for (const o of arr || []) {
|
|
4612
|
+
const hasChildren = !!(o.children && o.children.length);
|
|
4613
|
+
const exp = hasChildren && expanded.has(String(o.value));
|
|
4614
|
+
rows.push({ option: o, depth, hasChildren, expanded: exp });
|
|
4615
|
+
if (hasChildren && exp)
|
|
4616
|
+
walk(o.children, depth + 1);
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
walk(options || [], 0);
|
|
4620
|
+
return rows;
|
|
4621
|
+
}
|
|
4622
|
+
function collectParentKeys(options, acc = /* @__PURE__ */ new Set()) {
|
|
4623
|
+
for (const o of options || []) {
|
|
4624
|
+
if (o.children && o.children.length) {
|
|
4625
|
+
acc.add(String(o.value));
|
|
4626
|
+
collectParentKeys(o.children, acc);
|
|
4627
|
+
}
|
|
4628
|
+
}
|
|
4629
|
+
return acc;
|
|
4630
|
+
}
|
|
4581
4631
|
async function resolveOptions(source, dict, loaders) {
|
|
4582
4632
|
var _a, _b, _c;
|
|
4583
4633
|
try {
|
|
@@ -4837,7 +4887,9 @@ function parseNLQ(text, columns) {
|
|
|
4837
4887
|
return { ...empty, message: "empty" };
|
|
4838
4888
|
const result = { ok: false, filters: [], clauses: [] };
|
|
4839
4889
|
let buf = raw;
|
|
4840
|
-
const lim = buf.match(
|
|
4890
|
+
const lim = buf.match(
|
|
4891
|
+
/(?:前|取|返回|最多|top|first|limit|show(?:\s+me)?|give\s+me)\s*(?:the\s+)?(\d+)\s*(?:行|条|个|名|件|rows?|records?|items?|results?)?/i
|
|
4892
|
+
);
|
|
4841
4893
|
if (lim) {
|
|
4842
4894
|
result.limit = parseInt(lim[1], 10);
|
|
4843
4895
|
buf = blank(buf, lim.index, lim[0].length);
|
|
@@ -4861,6 +4913,7 @@ function parseNLQ(text, columns) {
|
|
|
4861
4913
|
if (col) {
|
|
4862
4914
|
result.groupBy = col.field || col.title || col.colId;
|
|
4863
4915
|
result.groupColId = col.colId;
|
|
4916
|
+
result.groupTitle = col.title || col.field || col.colId;
|
|
4864
4917
|
buf = blank(buf, g.start, g.len);
|
|
4865
4918
|
}
|
|
4866
4919
|
}
|
|
@@ -4869,14 +4922,21 @@ function parseNLQ(text, columns) {
|
|
|
4869
4922
|
/sort\s*by\s+([^,,、;;]+)/i,
|
|
4870
4923
|
/([^,,、;;\s]+?)(?:升序|降序|倒序|从大到小|从小到大)/i,
|
|
4871
4924
|
// 比较级:X最高/最低/最大/最小/最贵/最便宜/最多/最少(可带尾随「的」一并消费,避免泄漏进相邻筛选值)
|
|
4872
|
-
/([^,,、;;\s]+?)最(?:高|低|大|小|贵|便宜|多|少)的?/i
|
|
4925
|
+
/([^,,、;;\s]+?)最(?:高|低|大|小|贵|便宜|多|少)的?/i,
|
|
4926
|
+
// 英文比较级(后缀式):X highest / X most expensive / X cheapest(不含裸 most/least,以免吞掉 at most/at least)
|
|
4927
|
+
/([a-z][a-z ]*?)\s+(?:the\s+)?(?:highest|lowest|largest|biggest|smallest|most expensive|least expensive|cheapest)\b/i,
|
|
4928
|
+
// 英文比较级(前缀式):highest X / cheapest X
|
|
4929
|
+
/\b(?:highest|lowest|largest|biggest|smallest|most expensive|cheapest|least expensive)\s+(?:the\s+)?([a-z][a-z ]*?)(?=$|[,,、;;.]|\s+(?:and|by|of)\b)/i
|
|
4873
4930
|
]);
|
|
4874
4931
|
if (s) {
|
|
4875
4932
|
const col = resolveColumn(s.name, columns);
|
|
4876
4933
|
if (col) {
|
|
4877
4934
|
const dirWord = (s.word || "").toLowerCase();
|
|
4878
|
-
const desc = /降序|倒序|从大到小|desc
|
|
4935
|
+
const desc = /降序|倒序|从大到小|desc|最高|最大|最贵|最多|highest|largest|biggest|most expensive/.test(
|
|
4936
|
+
dirWord
|
|
4937
|
+
);
|
|
4879
4938
|
result.sort = { field: col.field || col.colId, dir: desc ? "desc" : "asc" };
|
|
4939
|
+
result.sortTitle = col.title || col.field || col.colId;
|
|
4880
4940
|
buf = blank(buf, s.start, s.len);
|
|
4881
4941
|
}
|
|
4882
4942
|
}
|
|
@@ -5112,21 +5172,72 @@ function mergeClauses(clauses, columns) {
|
|
|
5112
5172
|
}
|
|
5113
5173
|
return out;
|
|
5114
5174
|
}
|
|
5115
|
-
|
|
5175
|
+
const OP_LABEL = {
|
|
5176
|
+
zh: {
|
|
5177
|
+
eq: "=",
|
|
5178
|
+
ne: "≠",
|
|
5179
|
+
gt: ">",
|
|
5180
|
+
gte: "≥",
|
|
5181
|
+
lt: "<",
|
|
5182
|
+
lte: "≤",
|
|
5183
|
+
contains: "包含",
|
|
5184
|
+
notContains: "不包含",
|
|
5185
|
+
startsWith: "开头是",
|
|
5186
|
+
endsWith: "结尾为",
|
|
5187
|
+
blank: "为空",
|
|
5188
|
+
notBlank: "非空",
|
|
5189
|
+
in: "属于",
|
|
5190
|
+
notIn: "不属于",
|
|
5191
|
+
inRange: "介于"
|
|
5192
|
+
},
|
|
5193
|
+
en: {
|
|
5194
|
+
eq: "=",
|
|
5195
|
+
ne: "≠",
|
|
5196
|
+
gt: ">",
|
|
5197
|
+
gte: "≥",
|
|
5198
|
+
lt: "<",
|
|
5199
|
+
lte: "≤",
|
|
5200
|
+
contains: "contains",
|
|
5201
|
+
notContains: "not contains",
|
|
5202
|
+
startsWith: "starts with",
|
|
5203
|
+
endsWith: "ends with",
|
|
5204
|
+
blank: "is empty",
|
|
5205
|
+
notBlank: "is not empty",
|
|
5206
|
+
in: "is",
|
|
5207
|
+
notIn: "not",
|
|
5208
|
+
inRange: "between"
|
|
5209
|
+
}
|
|
5210
|
+
};
|
|
5211
|
+
function explainNLQ(r, lang = "zh") {
|
|
5212
|
+
const en = lang === "en";
|
|
5213
|
+
const labels = OP_LABEL[lang];
|
|
5116
5214
|
const parts = [];
|
|
5117
5215
|
for (const c of r.clauses) {
|
|
5118
|
-
const
|
|
5119
|
-
|
|
5216
|
+
const opLabel = labels[c.op] || c.op;
|
|
5217
|
+
const name = c.title || c.field || c.colId;
|
|
5218
|
+
let val;
|
|
5219
|
+
if (c.op === "blank" || c.op === "notBlank")
|
|
5220
|
+
val = "";
|
|
5221
|
+
else if (c.value2 != null)
|
|
5222
|
+
val = `${c.value1}~${c.value2}`;
|
|
5223
|
+
else if (Array.isArray(c.value1))
|
|
5224
|
+
val = c.value1.join(en ? " / " : "、");
|
|
5225
|
+
else
|
|
5226
|
+
val = String(c.value1 ?? "");
|
|
5227
|
+
const glue = en || /^[=<>≤≥≠]/.test(opLabel) ? " " : "";
|
|
5228
|
+
parts.push(`${name} ${opLabel}${glue}${val}`.trim());
|
|
5120
5229
|
}
|
|
5121
5230
|
if (r.sort)
|
|
5122
|
-
parts.push(
|
|
5231
|
+
parts.push(
|
|
5232
|
+
en ? `sort by ${r.sortTitle || r.sort.field} ${r.sort.dir}` : `按${r.sortTitle || r.sort.field} ${r.sort.dir === "desc" ? "降序" : "升序"}`
|
|
5233
|
+
);
|
|
5123
5234
|
if (r.groupBy)
|
|
5124
|
-
parts.push(`group ${r.groupBy}`);
|
|
5235
|
+
parts.push(en ? `group by ${r.groupTitle || r.groupBy}` : `按${r.groupTitle || r.groupBy}分组`);
|
|
5125
5236
|
if (r.limit)
|
|
5126
|
-
parts.push(`top ${r.limit}`);
|
|
5237
|
+
parts.push(en ? `top ${r.limit}` : `前${r.limit}`);
|
|
5127
5238
|
if (r.search)
|
|
5128
|
-
parts.push(`search "${r.search}"`);
|
|
5129
|
-
return parts.join("
|
|
5239
|
+
parts.push(en ? `search "${r.search}"` : `搜索“${r.search}”`);
|
|
5240
|
+
return parts.join(" · ");
|
|
5130
5241
|
}
|
|
5131
5242
|
const csvCell = (v) => {
|
|
5132
5243
|
if (v == null)
|
|
@@ -6013,14 +6124,14 @@ defineComponent({
|
|
|
6013
6124
|
};
|
|
6014
6125
|
}
|
|
6015
6126
|
});
|
|
6016
|
-
const _hoisted_1$
|
|
6017
|
-
const _hoisted_2$
|
|
6018
|
-
const _hoisted_3$
|
|
6019
|
-
const _hoisted_4$
|
|
6020
|
-
const _hoisted_5$
|
|
6021
|
-
const _hoisted_6$
|
|
6022
|
-
const _hoisted_7$
|
|
6023
|
-
const _sfc_main$
|
|
6127
|
+
const _hoisted_1$i = ["aria-sort", "draggable", "onClick", "onDragstart", "onDragover", "onDrop"];
|
|
6128
|
+
const _hoisted_2$i = ["title"];
|
|
6129
|
+
const _hoisted_3$f = { class: "rj-hcell-icons" };
|
|
6130
|
+
const _hoisted_4$e = ["title", "onClick"];
|
|
6131
|
+
const _hoisted_5$e = ["title", "onClick"];
|
|
6132
|
+
const _hoisted_6$e = ["onMousedown", "onDblclick"];
|
|
6133
|
+
const _hoisted_7$d = ["value", "placeholder", "onCompositionend", "onInput"];
|
|
6134
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
6024
6135
|
...{ name: "RjHeader" },
|
|
6025
6136
|
__name: "RjHeader",
|
|
6026
6137
|
props: {
|
|
@@ -6223,8 +6334,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6223
6334
|
}, null, 8, ["slots", "name", "params"])) : (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
6224
6335
|
createTextVNode(toDisplayString(cell.col.title || cell.colId), 1)
|
|
6225
6336
|
], 64))
|
|
6226
|
-
], 8, _hoisted_2$
|
|
6227
|
-
createElementVNode("span", _hoisted_3$
|
|
6337
|
+
], 8, _hoisted_2$i),
|
|
6338
|
+
createElementVNode("span", _hoisted_3$f, [
|
|
6228
6339
|
cellSortable(cell) ? (openBlock(), createElementBlock("span", {
|
|
6229
6340
|
key: 0,
|
|
6230
6341
|
class: normalizeClass(["rj-sort-icon", { "is-active": !!sortDir(cell) }])
|
|
@@ -6234,13 +6345,13 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6234
6345
|
class: normalizeClass(["rj-filter-icon", { "is-active": filterActive(cell) }]),
|
|
6235
6346
|
title: unref(t)("filter"),
|
|
6236
6347
|
onClick: withModifiers(($event) => _ctx.$emit("open-filter", cell, $event), ["stop"])
|
|
6237
|
-
}, toDisplayString(unref(icons).filter), 11, _hoisted_4$
|
|
6348
|
+
}, toDisplayString(unref(icons).filter), 11, _hoisted_4$e)) : createCommentVNode("", true),
|
|
6238
6349
|
!cell.isGroup && !cell.col.suppressMenu ? (openBlock(), createElementBlock("span", {
|
|
6239
6350
|
key: 2,
|
|
6240
6351
|
class: "rj-menu-btn",
|
|
6241
6352
|
title: unref(t)("colMenu"),
|
|
6242
6353
|
onClick: withModifiers(($event) => _ctx.$emit("header-menu", cell, $event), ["stop"])
|
|
6243
|
-
}, toDisplayString(unref(icons).columnMenu), 9, _hoisted_5$
|
|
6354
|
+
}, toDisplayString(unref(icons).columnMenu), 9, _hoisted_5$e)) : createCommentVNode("", true)
|
|
6244
6355
|
]),
|
|
6245
6356
|
!cell.isGroup && _ctx.reorderable ? (openBlock(), createElementBlock("span", {
|
|
6246
6357
|
key: 0,
|
|
@@ -6249,8 +6360,8 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6249
6360
|
}, ["stop"])),
|
|
6250
6361
|
onMousedown: withModifiers(($event) => startResize(cell, $event), ["stop", "prevent"]),
|
|
6251
6362
|
onDblclick: withModifiers(($event) => autoWidth(cell), ["stop"])
|
|
6252
|
-
}, null, 40, _hoisted_6$
|
|
6253
|
-
], 46, _hoisted_1$
|
|
6363
|
+
}, null, 40, _hoisted_6$e)) : createCommentVNode("", true)
|
|
6364
|
+
], 46, _hoisted_1$i);
|
|
6254
6365
|
}), 128))
|
|
6255
6366
|
], 4);
|
|
6256
6367
|
}), 128)),
|
|
@@ -6280,7 +6391,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6280
6391
|
onCompositionstart: _cache[7] || (_cache[7] = ($event) => composing.value = true),
|
|
6281
6392
|
onCompositionend: ($event) => onFloatCompositionEnd(leaf.colId, $event),
|
|
6282
6393
|
onInput: ($event) => onFloatInputGuarded(leaf.colId, $event.target.value)
|
|
6283
|
-
}, null, 40, _hoisted_7$
|
|
6394
|
+
}, null, 40, _hoisted_7$d)) : createCommentVNode("", true)
|
|
6284
6395
|
], 4);
|
|
6285
6396
|
}), 128))
|
|
6286
6397
|
], 4)) : createCommentVNode("", true)
|
|
@@ -6288,26 +6399,32 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
6288
6399
|
};
|
|
6289
6400
|
}
|
|
6290
6401
|
});
|
|
6291
|
-
const _hoisted_1$
|
|
6402
|
+
const _hoisted_1$h = {
|
|
6292
6403
|
key: 1,
|
|
6293
6404
|
class: "rj-editor-select"
|
|
6294
6405
|
};
|
|
6295
|
-
const _hoisted_2$
|
|
6296
|
-
const _hoisted_3$
|
|
6297
|
-
const _hoisted_4$
|
|
6406
|
+
const _hoisted_2$h = ["placeholder", "aria-expanded"];
|
|
6407
|
+
const _hoisted_3$e = ["onMouseenter", "onClick"];
|
|
6408
|
+
const _hoisted_4$d = ["onClick"];
|
|
6409
|
+
const _hoisted_5$d = {
|
|
6410
|
+
key: 1,
|
|
6411
|
+
class: "rj-option-caret is-leaf"
|
|
6412
|
+
};
|
|
6413
|
+
const _hoisted_6$d = { class: "rj-option-label" };
|
|
6414
|
+
const _hoisted_7$c = {
|
|
6298
6415
|
key: 0,
|
|
6299
6416
|
class: "rj-editor-option",
|
|
6300
6417
|
style: { "color": "#999" }
|
|
6301
6418
|
};
|
|
6302
|
-
const
|
|
6303
|
-
const
|
|
6304
|
-
const
|
|
6305
|
-
const
|
|
6306
|
-
const
|
|
6419
|
+
const _hoisted_8$b = ["rows", "placeholder"];
|
|
6420
|
+
const _hoisted_9$8 = ["checked"];
|
|
6421
|
+
const _hoisted_10$8 = ["placeholder"];
|
|
6422
|
+
const _hoisted_11$8 = ["placeholder"];
|
|
6423
|
+
const _hoisted_12$8 = {
|
|
6307
6424
|
key: 7,
|
|
6308
6425
|
class: "rj-editor-error"
|
|
6309
6426
|
};
|
|
6310
|
-
const _sfc_main$
|
|
6427
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
6311
6428
|
...{ name: "RjEditor" },
|
|
6312
6429
|
__name: "RjEditor",
|
|
6313
6430
|
props: {
|
|
@@ -6372,11 +6489,32 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6372
6489
|
return optionsAccessor.list(props.column) || [];
|
|
6373
6490
|
return Array.isArray(o) ? o : [];
|
|
6374
6491
|
});
|
|
6375
|
-
const
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6492
|
+
const expanded = ref(/* @__PURE__ */ new Set());
|
|
6493
|
+
watch(
|
|
6494
|
+
options,
|
|
6495
|
+
(opts) => {
|
|
6496
|
+
expanded.value = collectParentKeys(opts);
|
|
6497
|
+
},
|
|
6498
|
+
{ immediate: true }
|
|
6499
|
+
);
|
|
6500
|
+
const filteredTree = computed(
|
|
6501
|
+
() => isSelectLike.value ? filterOptionTree(options.value, query.value) : options.value
|
|
6502
|
+
);
|
|
6503
|
+
const visibleRows = computed(() => {
|
|
6504
|
+
const q = (query.value || "").trim();
|
|
6505
|
+
const tree = filteredTree.value;
|
|
6506
|
+
const exp = isSelectLike.value && q ? collectParentKeys(tree) : expanded.value;
|
|
6507
|
+
return flattenTreeForRender(tree, exp);
|
|
6379
6508
|
});
|
|
6509
|
+
function toggleExpand(opt) {
|
|
6510
|
+
const k = String(opt.value);
|
|
6511
|
+
const next = new Set(expanded.value);
|
|
6512
|
+
if (next.has(k))
|
|
6513
|
+
next.delete(k);
|
|
6514
|
+
else
|
|
6515
|
+
next.add(k);
|
|
6516
|
+
expanded.value = next;
|
|
6517
|
+
}
|
|
6380
6518
|
const open = ref(false);
|
|
6381
6519
|
const error = ref(null);
|
|
6382
6520
|
const inputRef = ref();
|
|
@@ -6397,23 +6535,23 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6397
6535
|
return;
|
|
6398
6536
|
open.value = true;
|
|
6399
6537
|
query.value = "";
|
|
6400
|
-
const i =
|
|
6401
|
-
activeIdx.value = i >= 0 ? i :
|
|
6538
|
+
const i = visibleRows.value.findIndex((r) => r.option.value === model.value);
|
|
6539
|
+
activeIdx.value = i >= 0 ? i : visibleRows.value.length ? 0 : -1;
|
|
6402
6540
|
scrollToActive();
|
|
6403
6541
|
}
|
|
6404
6542
|
function move(dir) {
|
|
6405
6543
|
if (!open.value)
|
|
6406
6544
|
return openList();
|
|
6407
|
-
const len =
|
|
6545
|
+
const len = visibleRows.value.length;
|
|
6408
6546
|
if (!len)
|
|
6409
6547
|
return;
|
|
6410
6548
|
activeIdx.value = Math.min(len - 1, Math.max(0, activeIdx.value + dir));
|
|
6411
6549
|
scrollToActive();
|
|
6412
6550
|
}
|
|
6413
6551
|
function confirmPick() {
|
|
6414
|
-
const
|
|
6415
|
-
if (open.value &&
|
|
6416
|
-
pick(
|
|
6552
|
+
const row = visibleRows.value[activeIdx.value];
|
|
6553
|
+
if (open.value && row)
|
|
6554
|
+
pick(row.option);
|
|
6417
6555
|
else
|
|
6418
6556
|
pickText();
|
|
6419
6557
|
}
|
|
@@ -6424,12 +6562,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6424
6562
|
commit(opt.value);
|
|
6425
6563
|
}
|
|
6426
6564
|
function pickText() {
|
|
6427
|
-
const exact = options.value.find((o) => String(o.label) === text.value);
|
|
6565
|
+
const exact = flattenOptions(options.value).find((o) => String(o.label) === text.value);
|
|
6428
6566
|
if (exact)
|
|
6429
6567
|
return pick(exact);
|
|
6430
|
-
const first =
|
|
6568
|
+
const first = visibleRows.value[0];
|
|
6431
6569
|
if (first && text.value.trim())
|
|
6432
|
-
return pick(first);
|
|
6570
|
+
return pick(first.option);
|
|
6433
6571
|
commit(text.value);
|
|
6434
6572
|
}
|
|
6435
6573
|
function onSelectBlur() {
|
|
@@ -6476,7 +6614,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6476
6614
|
});
|
|
6477
6615
|
watch(query, () => {
|
|
6478
6616
|
if (isSelectLike.value && open.value)
|
|
6479
|
-
activeIdx.value =
|
|
6617
|
+
activeIdx.value = visibleRows.value.length ? 0 : -1;
|
|
6480
6618
|
});
|
|
6481
6619
|
return (_ctx, _cache) => {
|
|
6482
6620
|
var _a;
|
|
@@ -6492,7 +6630,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6492
6630
|
column: _ctx.column,
|
|
6493
6631
|
onCommit: commit,
|
|
6494
6632
|
onCancel: cancel
|
|
6495
|
-
}, null, 40, ["value", "row", "column"])) : editorType.value === "select" || editorType.value === "richSelect" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6633
|
+
}, null, 40, ["value", "row", "column"])) : editorType.value === "select" || editorType.value === "richSelect" ? (openBlock(), createElementBlock("div", _hoisted_1$h, [
|
|
6496
6634
|
withDirectives(createElementVNode("input", {
|
|
6497
6635
|
ref_key: "inputRef",
|
|
6498
6636
|
ref: inputRef,
|
|
@@ -6510,25 +6648,33 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6510
6648
|
_cache[5] || (_cache[5] = withKeys(withModifiers(($event) => confirmPick(), ["prevent"]), ["enter"])),
|
|
6511
6649
|
_cache[6] || (_cache[6] = withKeys(withModifiers(($event) => cancel(), ["prevent"]), ["esc"]))
|
|
6512
6650
|
]
|
|
6513
|
-
}, null, 40, _hoisted_2$
|
|
6651
|
+
}, null, 40, _hoisted_2$h), [
|
|
6514
6652
|
[vModelText, text.value]
|
|
6515
6653
|
]),
|
|
6516
6654
|
withDirectives(createElementVNode("div", {
|
|
6517
6655
|
ref_key: "listRef",
|
|
6518
6656
|
ref: listRef,
|
|
6519
|
-
class: "rj-editor-dropdown",
|
|
6657
|
+
class: "rj-editor-dropdown rj-option-tree",
|
|
6520
6658
|
onMousedown: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
6521
6659
|
}, ["prevent"]))
|
|
6522
6660
|
}, [
|
|
6523
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
6661
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (node, i) => {
|
|
6524
6662
|
return openBlock(), createElementBlock("div", {
|
|
6525
|
-
key: String(
|
|
6526
|
-
class: normalizeClass(["rj-editor-option", { "is-active": i === activeIdx.value, "is-selected":
|
|
6663
|
+
key: String(node.option.value) + ":" + i,
|
|
6664
|
+
class: normalizeClass(["rj-editor-option rj-option-row", { "is-active": i === activeIdx.value, "is-selected": node.option.value === model.value }]),
|
|
6665
|
+
style: normalizeStyle({ paddingLeft: 8 + node.depth * 16 + "px" }),
|
|
6527
6666
|
onMouseenter: ($event) => activeIdx.value = i,
|
|
6528
|
-
onClick: ($event) => pick(
|
|
6529
|
-
},
|
|
6667
|
+
onClick: ($event) => pick(node.option)
|
|
6668
|
+
}, [
|
|
6669
|
+
node.hasChildren ? (openBlock(), createElementBlock("span", {
|
|
6670
|
+
key: 0,
|
|
6671
|
+
class: "rj-option-caret",
|
|
6672
|
+
onClick: withModifiers(($event) => toggleExpand(node.option), ["stop"])
|
|
6673
|
+
}, toDisplayString(node.expanded ? "▾" : "▸"), 9, _hoisted_4$d)) : (openBlock(), createElementBlock("span", _hoisted_5$d)),
|
|
6674
|
+
createElementVNode("span", _hoisted_6$d, toDisplayString(node.option.label), 1)
|
|
6675
|
+
], 46, _hoisted_3$e);
|
|
6530
6676
|
}), 128)),
|
|
6531
|
-
!
|
|
6677
|
+
!visibleRows.value.length ? (openBlock(), createElementBlock("div", _hoisted_7$c, toDisplayString(unref(t)("noMatches")), 1)) : createCommentVNode("", true)
|
|
6532
6678
|
], 544), [
|
|
6533
6679
|
[vShow, open.value]
|
|
6534
6680
|
])
|
|
@@ -6545,7 +6691,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6545
6691
|
_cache[10] || (_cache[10] = withKeys(withModifiers(($event) => commit(text.value), ["ctrl", "prevent"]), ["enter"]))
|
|
6546
6692
|
],
|
|
6547
6693
|
onBlur: _cache[11] || (_cache[11] = ($event) => commit(text.value))
|
|
6548
|
-
}, null, 40,
|
|
6694
|
+
}, null, 40, _hoisted_8$b)), [
|
|
6549
6695
|
[vModelText, text.value]
|
|
6550
6696
|
]) : editorType.value === "checkbox" ? (openBlock(), createElementBlock("input", {
|
|
6551
6697
|
key: 3,
|
|
@@ -6554,7 +6700,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6554
6700
|
type: "checkbox",
|
|
6555
6701
|
checked: !!model.value,
|
|
6556
6702
|
onChange: _cache[12] || (_cache[12] = ($event) => commit($event.target.checked))
|
|
6557
|
-
}, null, 40,
|
|
6703
|
+
}, null, 40, _hoisted_9$8)) : editorType.value === "date" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
6558
6704
|
key: 4,
|
|
6559
6705
|
ref_key: "inputRef",
|
|
6560
6706
|
ref: inputRef,
|
|
@@ -6578,7 +6724,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6578
6724
|
_cache[18] || (_cache[18] = withKeys(withModifiers(($event) => cancel(), ["prevent"]), ["esc"]))
|
|
6579
6725
|
],
|
|
6580
6726
|
onBlur: _cache[19] || (_cache[19] = ($event) => commit(text.value))
|
|
6581
|
-
}), null, 16,
|
|
6727
|
+
}), null, 16, _hoisted_10$8)), [
|
|
6582
6728
|
[vModelText, text.value]
|
|
6583
6729
|
]) : withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
6584
6730
|
key: 6,
|
|
@@ -6593,20 +6739,20 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
6593
6739
|
_cache[22] || (_cache[22] = withKeys(withModifiers(($event) => cancel(), ["prevent"]), ["esc"]))
|
|
6594
6740
|
],
|
|
6595
6741
|
onBlur: _cache[23] || (_cache[23] = ($event) => commit(text.value))
|
|
6596
|
-
}), null, 16,
|
|
6742
|
+
}), null, 16, _hoisted_11$8)), [
|
|
6597
6743
|
[vModelText, text.value]
|
|
6598
6744
|
]),
|
|
6599
|
-
error.value ? (openBlock(), createElementBlock("div",
|
|
6745
|
+
error.value ? (openBlock(), createElementBlock("div", _hoisted_12$8, toDisplayString(error.value), 1)) : createCommentVNode("", true)
|
|
6600
6746
|
], 32);
|
|
6601
6747
|
};
|
|
6602
6748
|
}
|
|
6603
6749
|
});
|
|
6604
|
-
const _hoisted_1$
|
|
6605
|
-
const _hoisted_2$
|
|
6750
|
+
const _hoisted_1$g = ["src", "alt", "loading", "onClick"];
|
|
6751
|
+
const _hoisted_2$g = {
|
|
6606
6752
|
key: 1,
|
|
6607
6753
|
class: "rj-cell-inner rj-cell-img-fallback"
|
|
6608
6754
|
};
|
|
6609
|
-
const _sfc_main$
|
|
6755
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
6610
6756
|
...{ name: "RjImgList" },
|
|
6611
6757
|
__name: "RjImgList",
|
|
6612
6758
|
props: {
|
|
@@ -6638,14 +6784,14 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
6638
6784
|
draggable: "false",
|
|
6639
6785
|
onError: _cache[0] || (_cache[0] = ($event) => failed.value = true),
|
|
6640
6786
|
onClick: withModifiers(($event) => _ctx.$emit("preview", u), ["stop"])
|
|
6641
|
-
}, null, 46, _hoisted_1$
|
|
6642
|
-
}), 128)) : (openBlock(), createElementBlock("span", _hoisted_2$
|
|
6787
|
+
}, null, 46, _hoisted_1$g);
|
|
6788
|
+
}), 128)) : (openBlock(), createElementBlock("span", _hoisted_2$g, toDisplayString(_ctx.fallback), 1));
|
|
6643
6789
|
};
|
|
6644
6790
|
}
|
|
6645
6791
|
});
|
|
6646
|
-
const _hoisted_1$
|
|
6647
|
-
const _hoisted_2$
|
|
6648
|
-
const _sfc_main$
|
|
6792
|
+
const _hoisted_1$f = { class: "rj-sparkline" };
|
|
6793
|
+
const _hoisted_2$f = ["width", "height"];
|
|
6794
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
6649
6795
|
...{ name: "RjSparkline" },
|
|
6650
6796
|
__name: "RjSparkline",
|
|
6651
6797
|
props: {
|
|
@@ -6744,33 +6890,33 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
6744
6890
|
);
|
|
6745
6891
|
onMounted(draw);
|
|
6746
6892
|
return (_ctx, _cache) => {
|
|
6747
|
-
return openBlock(), createElementBlock("span", _hoisted_1$
|
|
6893
|
+
return openBlock(), createElementBlock("span", _hoisted_1$f, [
|
|
6748
6894
|
createElementVNode("canvas", {
|
|
6749
6895
|
ref_key: "cv",
|
|
6750
6896
|
ref: cv,
|
|
6751
6897
|
width: _ctx.w * unref(dpr),
|
|
6752
6898
|
height: _ctx.h * unref(dpr),
|
|
6753
6899
|
style: normalizeStyle(`width:${_ctx.w}px;height:${_ctx.h}px`)
|
|
6754
|
-
}, null, 12, _hoisted_2$
|
|
6900
|
+
}, null, 12, _hoisted_2$f)
|
|
6755
6901
|
]);
|
|
6756
6902
|
};
|
|
6757
6903
|
}
|
|
6758
6904
|
});
|
|
6759
|
-
const _hoisted_1$
|
|
6760
|
-
const _hoisted_2$
|
|
6905
|
+
const _hoisted_1$e = ["data-r", "data-c", "role", "aria-colindex", "aria-selected", "title"];
|
|
6906
|
+
const _hoisted_2$e = {
|
|
6761
6907
|
key: 1,
|
|
6762
6908
|
class: "rj-expand-icon",
|
|
6763
6909
|
style: { "opacity": "0" }
|
|
6764
6910
|
};
|
|
6765
|
-
const _hoisted_3$
|
|
6766
|
-
const _hoisted_4$
|
|
6767
|
-
const _hoisted_5$
|
|
6911
|
+
const _hoisted_3$d = { class: "rj-cell-inner" };
|
|
6912
|
+
const _hoisted_4$c = { style: { "color": "var(--rj-text-secondary)", "margin-left": "6px" } };
|
|
6913
|
+
const _hoisted_5$c = {
|
|
6768
6914
|
key: 2,
|
|
6769
6915
|
style: { "width": "18px", "display": "inline-block", "flex-shrink": "0" }
|
|
6770
6916
|
};
|
|
6771
|
-
const _hoisted_6$
|
|
6772
|
-
const _hoisted_7$
|
|
6773
|
-
const _sfc_main$
|
|
6917
|
+
const _hoisted_6$c = ["innerHTML"];
|
|
6918
|
+
const _hoisted_7$b = ["innerHTML"];
|
|
6919
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
6774
6920
|
...{ name: "RjCell", inheritAttrs: false },
|
|
6775
6921
|
__name: "RjCell",
|
|
6776
6922
|
props: {
|
|
@@ -6986,7 +7132,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
6986
7132
|
"aria-selected": _ctx.checked || void 0,
|
|
6987
7133
|
title: tooltipText.value
|
|
6988
7134
|
}, [
|
|
6989
|
-
_ctx.editing ? (openBlock(), createBlock(_sfc_main$
|
|
7135
|
+
_ctx.editing ? (openBlock(), createBlock(_sfc_main$h, {
|
|
6990
7136
|
key: 0,
|
|
6991
7137
|
column: _ctx.leaf.col,
|
|
6992
7138
|
row: _ctx.drow.data,
|
|
@@ -7017,8 +7163,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7017
7163
|
key: 0,
|
|
7018
7164
|
class: "rj-expand-icon",
|
|
7019
7165
|
onClick: _cache[4] || (_cache[4] = withModifiers(($event) => _ctx.$emit("toggle-expand", _ctx.drow.key), ["stop"]))
|
|
7020
|
-
}, toDisplayString(_ctx.drow.expanded ? unref(icons).collapse : unref(icons).expand), 1)) : !isPivot.value ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
7021
|
-
createElementVNode("span", _hoisted_3$
|
|
7166
|
+
}, toDisplayString(_ctx.drow.expanded ? unref(icons).collapse : unref(icons).expand), 1)) : !isPivot.value ? (openBlock(), createElementBlock("span", _hoisted_2$e, toDisplayString(unref(icons).collapse), 1)) : createCommentVNode("", true),
|
|
7167
|
+
createElementVNode("span", _hoisted_3$d, [
|
|
7022
7168
|
_ctx.drow.isFooter ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7023
7169
|
createTextVNode(toDisplayString(unref(t)("subtotal")), 1)
|
|
7024
7170
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -7030,7 +7176,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7030
7176
|
}, null, 8, ["slots", "name", "params"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7031
7177
|
createTextVNode(toDisplayString(groupLabel.value), 1)
|
|
7032
7178
|
], 64)),
|
|
7033
|
-
createElementVNode("span", _hoisted_4$
|
|
7179
|
+
createElementVNode("span", _hoisted_4$c, "(" + toDisplayString(_ctx.drow.data.__count) + ")", 1)
|
|
7034
7180
|
], 64))
|
|
7035
7181
|
])
|
|
7036
7182
|
], 64)) : _ctx.isAnchor ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
@@ -7046,13 +7192,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7046
7192
|
key: 1,
|
|
7047
7193
|
class: "rj-expand-icon",
|
|
7048
7194
|
onClick: _cache[6] || (_cache[6] = withModifiers(($event) => _ctx.$emit("toggle-detail", _ctx.drow.key), ["stop"]))
|
|
7049
|
-
}, toDisplayString(_ctx.detailOpen ? unref(icons).collapse : unref(icons).expand), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$
|
|
7050
|
-
imgUrls.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
7195
|
+
}, toDisplayString(_ctx.detailOpen ? unref(icons).collapse : unref(icons).expand), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$c)),
|
|
7196
|
+
imgUrls.value.length ? (openBlock(), createBlock(_sfc_main$g, mergeProps({ key: 3 }, imgBind.value, { onPreview: onImgPreview }), null, 16)) : (openBlock(), createElementBlock("span", {
|
|
7051
7197
|
key: 4,
|
|
7052
7198
|
class: normalizeClass(["rj-cell-inner", { wrap: _ctx.leaf.col.wrapText }]),
|
|
7053
7199
|
innerHTML: richContent.value
|
|
7054
|
-
}, null, 10, _hoisted_6$
|
|
7055
|
-
], 64)) : imgUrls.value.length ? (openBlock(), createBlock(_sfc_main$
|
|
7200
|
+
}, null, 10, _hoisted_6$c))
|
|
7201
|
+
], 64)) : imgUrls.value.length ? (openBlock(), createBlock(_sfc_main$g, mergeProps({ key: 5 }, imgBind.value, { onPreview: onImgPreview }), null, 16)) : sparkData.value ? (openBlock(), createBlock(_sfc_main$f, {
|
|
7056
7202
|
key: 6,
|
|
7057
7203
|
data: sparkData.value,
|
|
7058
7204
|
style: normalizeStyle(((_b = _ctx.leaf.col.sparkline) == null ? void 0 : _b.style) || "bar"),
|
|
@@ -7061,22 +7207,22 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
7061
7207
|
key: 7,
|
|
7062
7208
|
class: normalizeClass(["rj-cell-inner", { wrap: _ctx.leaf.col.wrapText }]),
|
|
7063
7209
|
innerHTML: richContent.value
|
|
7064
|
-
}, null, 10, _hoisted_7$
|
|
7065
|
-
], 14, _hoisted_1$
|
|
7210
|
+
}, null, 10, _hoisted_7$b))
|
|
7211
|
+
], 14, _hoisted_1$e);
|
|
7066
7212
|
};
|
|
7067
7213
|
}
|
|
7068
7214
|
});
|
|
7069
|
-
const _hoisted_1$
|
|
7215
|
+
const _hoisted_1$d = {
|
|
7070
7216
|
class: "rj-popup-row",
|
|
7071
7217
|
style: { "justify-content": "space-between", "font-size": "12px", "margin-bottom": "4px" }
|
|
7072
7218
|
};
|
|
7073
|
-
const _hoisted_2$
|
|
7074
|
-
const _hoisted_3$
|
|
7075
|
-
const _hoisted_4$
|
|
7076
|
-
const _hoisted_5$
|
|
7077
|
-
const _hoisted_6$
|
|
7078
|
-
const _hoisted_7$
|
|
7079
|
-
const _hoisted_8$
|
|
7219
|
+
const _hoisted_2$d = { class: "rj-check-item" };
|
|
7220
|
+
const _hoisted_3$c = ["checked"];
|
|
7221
|
+
const _hoisted_4$b = ["title"];
|
|
7222
|
+
const _hoisted_5$b = ["placeholder"];
|
|
7223
|
+
const _hoisted_6$b = { class: "rj-check-list" };
|
|
7224
|
+
const _hoisted_7$a = ["value"];
|
|
7225
|
+
const _hoisted_8$a = {
|
|
7080
7226
|
key: 0,
|
|
7081
7227
|
style: { "padding": "6px", "color": "#999" }
|
|
7082
7228
|
};
|
|
@@ -7088,8 +7234,8 @@ const _hoisted_13$6 = ["onUpdate:modelValue", "type"];
|
|
|
7088
7234
|
const _hoisted_14$6 = ["onUpdate:modelValue", "type"];
|
|
7089
7235
|
const _hoisted_15$5 = ["title", "onClick"];
|
|
7090
7236
|
const _hoisted_16$5 = { class: "rj-popup-row" };
|
|
7091
|
-
const _hoisted_17$
|
|
7092
|
-
const _sfc_main$
|
|
7237
|
+
const _hoisted_17$4 = { class: "rj-popup-footer" };
|
|
7238
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
7093
7239
|
...{ name: "RjFilterMenu" },
|
|
7094
7240
|
__name: "RjFilterMenu",
|
|
7095
7241
|
props: {
|
|
@@ -7178,13 +7324,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7178
7324
|
}, ["stop"]))
|
|
7179
7325
|
}, [
|
|
7180
7326
|
_ctx.filterType === "select" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7181
|
-
createElementVNode("div", _hoisted_1$
|
|
7182
|
-
createElementVNode("label", _hoisted_2$
|
|
7327
|
+
createElementVNode("div", _hoisted_1$d, [
|
|
7328
|
+
createElementVNode("label", _hoisted_2$d, [
|
|
7183
7329
|
createElementVNode("input", {
|
|
7184
7330
|
type: "checkbox",
|
|
7185
7331
|
checked: allChecked.value,
|
|
7186
7332
|
onChange: _cache[0] || (_cache[0] = ($event) => toggleAll())
|
|
7187
|
-
}, null, 40, _hoisted_3$
|
|
7333
|
+
}, null, 40, _hoisted_3$c),
|
|
7188
7334
|
createTextVNode(" " + toDisplayString(unref(t)("selectAll")), 1)
|
|
7189
7335
|
]),
|
|
7190
7336
|
createElementVNode("label", {
|
|
@@ -7198,17 +7344,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7198
7344
|
[vModelCheckbox, exclude.value]
|
|
7199
7345
|
]),
|
|
7200
7346
|
createTextVNode(" " + toDisplayString(unref(t)("excludeSelected")), 1)
|
|
7201
|
-
], 8, _hoisted_4$
|
|
7347
|
+
], 8, _hoisted_4$b)
|
|
7202
7348
|
]),
|
|
7203
7349
|
withDirectives(createElementVNode("input", {
|
|
7204
7350
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => search.value = $event),
|
|
7205
7351
|
class: "rj-input",
|
|
7206
7352
|
style: { "width": "100%", "margin-bottom": "6px" },
|
|
7207
7353
|
placeholder: unref(t)("searchOptions")
|
|
7208
|
-
}, null, 8, _hoisted_5$
|
|
7354
|
+
}, null, 8, _hoisted_5$b), [
|
|
7209
7355
|
[vModelText, search.value]
|
|
7210
7356
|
]),
|
|
7211
|
-
createElementVNode("div", _hoisted_6$
|
|
7357
|
+
createElementVNode("div", _hoisted_6$b, [
|
|
7212
7358
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (opt) => {
|
|
7213
7359
|
return openBlock(), createElementBlock("label", {
|
|
7214
7360
|
key: String(opt),
|
|
@@ -7218,13 +7364,13 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7218
7364
|
type: "checkbox",
|
|
7219
7365
|
value: opt,
|
|
7220
7366
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => values.value = $event)
|
|
7221
|
-
}, null, 8, _hoisted_7$
|
|
7367
|
+
}, null, 8, _hoisted_7$a), [
|
|
7222
7368
|
[vModelCheckbox, values.value]
|
|
7223
7369
|
]),
|
|
7224
7370
|
createElementVNode("span", null, toDisplayString(displayOf(opt)), 1)
|
|
7225
7371
|
]);
|
|
7226
7372
|
}), 128)),
|
|
7227
|
-
!filteredOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
7373
|
+
!filteredOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_8$a, toDisplayString(unref(t)("noOptions")), 1)) : createCommentVNode("", true)
|
|
7228
7374
|
])
|
|
7229
7375
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
7230
7376
|
createElementVNode("div", _hoisted_9$7, [
|
|
@@ -7294,7 +7440,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7294
7440
|
}, toDisplayString(unref(t)("addCondition")), 1)
|
|
7295
7441
|
])
|
|
7296
7442
|
], 64)),
|
|
7297
|
-
createElementVNode("div", _hoisted_17$
|
|
7443
|
+
createElementVNode("div", _hoisted_17$4, [
|
|
7298
7444
|
createElementVNode("button", {
|
|
7299
7445
|
class: "rj-btn",
|
|
7300
7446
|
onClick: _cache[7] || (_cache[7] = ($event) => _ctx.$emit("clear"))
|
|
@@ -7312,22 +7458,22 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
7312
7458
|
};
|
|
7313
7459
|
}
|
|
7314
7460
|
});
|
|
7315
|
-
const _hoisted_1$
|
|
7316
|
-
const _hoisted_2$
|
|
7317
|
-
const _hoisted_3$
|
|
7318
|
-
const _hoisted_4$
|
|
7461
|
+
const _hoisted_1$c = { class: "rj-adv-head" };
|
|
7462
|
+
const _hoisted_2$c = { class: "rj-radio-tabs" };
|
|
7463
|
+
const _hoisted_3$b = ["title"];
|
|
7464
|
+
const _hoisted_4$a = {
|
|
7319
7465
|
key: 1,
|
|
7320
7466
|
class: "rj-adv-cond"
|
|
7321
7467
|
};
|
|
7322
|
-
const _hoisted_5$
|
|
7323
|
-
const _hoisted_6$
|
|
7324
|
-
const _hoisted_7$
|
|
7325
|
-
const _hoisted_8$
|
|
7468
|
+
const _hoisted_5$a = ["value", "onChange"];
|
|
7469
|
+
const _hoisted_6$a = ["value"];
|
|
7470
|
+
const _hoisted_7$9 = ["onUpdate:modelValue", "onChange"];
|
|
7471
|
+
const _hoisted_8$9 = ["value"];
|
|
7326
7472
|
const _hoisted_9$6 = ["onUpdate:modelValue", "type"];
|
|
7327
7473
|
const _hoisted_10$6 = ["onUpdate:modelValue", "type"];
|
|
7328
7474
|
const _hoisted_11$6 = ["title", "onClick"];
|
|
7329
7475
|
const _hoisted_12$6 = { class: "rj-adv-actions" };
|
|
7330
|
-
const _sfc_main$
|
|
7476
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
7331
7477
|
...{ name: "RjAdvGroup" },
|
|
7332
7478
|
__name: "RjAdvGroup",
|
|
7333
7479
|
props: {
|
|
@@ -7400,8 +7546,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7400
7546
|
return openBlock(), createElementBlock("div", {
|
|
7401
7547
|
class: normalizeClass(["rj-adv-group", { "is-nested": _ctx.depth > 0 }])
|
|
7402
7548
|
}, [
|
|
7403
|
-
createElementVNode("div", _hoisted_1$
|
|
7404
|
-
createElementVNode("div", _hoisted_2$
|
|
7549
|
+
createElementVNode("div", _hoisted_1$c, [
|
|
7550
|
+
createElementVNode("div", _hoisted_2$c, [
|
|
7405
7551
|
createElementVNode("span", {
|
|
7406
7552
|
class: normalizeClass({ "is-active": _ctx.group.operator === "and" }),
|
|
7407
7553
|
onClick: _cache[0] || (_cache[0] = ($event) => setOp("and"))
|
|
@@ -7416,7 +7562,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7416
7562
|
class: "rj-adv-remove",
|
|
7417
7563
|
title: unref(t)("advDelGroup"),
|
|
7418
7564
|
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("remove"))
|
|
7419
|
-
}, "✕", 8, _hoisted_3$
|
|
7565
|
+
}, "✕", 8, _hoisted_3$b)) : createCommentVNode("", true)
|
|
7420
7566
|
]),
|
|
7421
7567
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.group.items, (item, i) => {
|
|
7422
7568
|
return openBlock(), createElementBlock("div", {
|
|
@@ -7429,7 +7575,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7429
7575
|
columns: _ctx.columns,
|
|
7430
7576
|
depth: _ctx.depth + 1,
|
|
7431
7577
|
onRemove: ($event) => removeAt(i)
|
|
7432
|
-
}, null, 8, ["group", "columns", "depth", "onRemove"])) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
7578
|
+
}, null, 8, ["group", "columns", "depth", "onRemove"])) : (openBlock(), createElementBlock("div", _hoisted_4$a, [
|
|
7433
7579
|
createElementVNode("select", {
|
|
7434
7580
|
class: "rj-input",
|
|
7435
7581
|
value: ac(item).colId,
|
|
@@ -7439,9 +7585,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7439
7585
|
return openBlock(), createElementBlock("option", {
|
|
7440
7586
|
key: c.colId,
|
|
7441
7587
|
value: c.colId
|
|
7442
|
-
}, toDisplayString(c.title || c.colId), 9, _hoisted_6$
|
|
7588
|
+
}, toDisplayString(c.title || c.colId), 9, _hoisted_6$a);
|
|
7443
7589
|
}), 128))
|
|
7444
|
-
], 40, _hoisted_5$
|
|
7590
|
+
], 40, _hoisted_5$a),
|
|
7445
7591
|
withDirectives(createElementVNode("select", {
|
|
7446
7592
|
"onUpdate:modelValue": ($event) => ac(item).condition.op = $event,
|
|
7447
7593
|
class: "rj-input",
|
|
@@ -7452,9 +7598,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7452
7598
|
return openBlock(), createElementBlock("option", {
|
|
7453
7599
|
key: op.value,
|
|
7454
7600
|
value: op.value
|
|
7455
|
-
}, toDisplayString(opLabel(op)), 9, _hoisted_8$
|
|
7601
|
+
}, toDisplayString(opLabel(op)), 9, _hoisted_8$9);
|
|
7456
7602
|
}), 128))
|
|
7457
|
-
], 40, _hoisted_7$
|
|
7603
|
+
], 40, _hoisted_7$9), [
|
|
7458
7604
|
[vModelSelect, ac(item).condition.op]
|
|
7459
7605
|
]),
|
|
7460
7606
|
!noValue(ac(item).condition.op) ? withDirectives((openBlock(), createElementBlock("input", {
|
|
@@ -7496,9 +7642,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
7496
7642
|
};
|
|
7497
7643
|
}
|
|
7498
7644
|
});
|
|
7499
|
-
const _hoisted_1$
|
|
7500
|
-
const _hoisted_2$
|
|
7501
|
-
const _sfc_main$
|
|
7645
|
+
const _hoisted_1$b = { class: "rj-adv-title" };
|
|
7646
|
+
const _hoisted_2$b = { class: "rj-popup-footer" };
|
|
7647
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
7502
7648
|
...{ name: "RjAdvancedFilterDialog" },
|
|
7503
7649
|
__name: "RjAdvancedFilterDialog",
|
|
7504
7650
|
props: {
|
|
@@ -7556,19 +7702,19 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
7556
7702
|
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
7557
7703
|
}, ["stop"]))
|
|
7558
7704
|
}, [
|
|
7559
|
-
createElementVNode("div", _hoisted_1$
|
|
7705
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
7560
7706
|
createTextVNode(toDisplayString(unref(t)("advFilterTitle")) + " ", 1),
|
|
7561
7707
|
createElementVNode("span", {
|
|
7562
7708
|
class: "rj-adv-remove",
|
|
7563
7709
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
7564
7710
|
}, "✕")
|
|
7565
7711
|
]),
|
|
7566
|
-
createVNode(_sfc_main$
|
|
7712
|
+
createVNode(_sfc_main$c, {
|
|
7567
7713
|
group: tree,
|
|
7568
7714
|
columns: _ctx.columns,
|
|
7569
7715
|
depth: 0
|
|
7570
7716
|
}, null, 8, ["group", "columns"]),
|
|
7571
|
-
createElementVNode("div", _hoisted_2$
|
|
7717
|
+
createElementVNode("div", _hoisted_2$b, [
|
|
7572
7718
|
createElementVNode("button", {
|
|
7573
7719
|
class: "rj-btn",
|
|
7574
7720
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("clear"))
|
|
@@ -7582,27 +7728,27 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
7582
7728
|
};
|
|
7583
7729
|
}
|
|
7584
7730
|
});
|
|
7585
|
-
const _hoisted_1$
|
|
7731
|
+
const _hoisted_1$a = {
|
|
7586
7732
|
key: 0,
|
|
7587
7733
|
class: "rj-menu-divider"
|
|
7588
7734
|
};
|
|
7589
|
-
const _hoisted_2$
|
|
7590
|
-
const _hoisted_3$
|
|
7591
|
-
const _hoisted_4$
|
|
7735
|
+
const _hoisted_2$a = ["onMouseenter", "onClick"];
|
|
7736
|
+
const _hoisted_3$a = { class: "rj-menu-item-label" };
|
|
7737
|
+
const _hoisted_4$9 = {
|
|
7592
7738
|
key: 0,
|
|
7593
7739
|
class: "rj-menu-sub-arrow"
|
|
7594
7740
|
};
|
|
7595
|
-
const _hoisted_5$
|
|
7741
|
+
const _hoisted_5$9 = {
|
|
7596
7742
|
key: 1,
|
|
7597
7743
|
class: "rj-menu rj-menu-sub"
|
|
7598
7744
|
};
|
|
7599
|
-
const _hoisted_6$
|
|
7745
|
+
const _hoisted_6$9 = {
|
|
7600
7746
|
key: 0,
|
|
7601
7747
|
class: "rj-menu-divider"
|
|
7602
7748
|
};
|
|
7603
|
-
const _hoisted_7$
|
|
7604
|
-
const _hoisted_8$
|
|
7605
|
-
const _sfc_main$
|
|
7749
|
+
const _hoisted_7$8 = ["onClick"];
|
|
7750
|
+
const _hoisted_8$8 = { class: "rj-menu-item-label" };
|
|
7751
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
7606
7752
|
...{ name: "RjContextMenu" },
|
|
7607
7753
|
__name: "RjContextMenu",
|
|
7608
7754
|
props: {
|
|
@@ -7617,7 +7763,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
7617
7763
|
onMounted(() => {
|
|
7618
7764
|
const el = menuRef.value;
|
|
7619
7765
|
if (el)
|
|
7620
|
-
emit("reposition", el.offsetHeight);
|
|
7766
|
+
emit("reposition", el.offsetHeight, el.offsetWidth);
|
|
7621
7767
|
});
|
|
7622
7768
|
const hoverIdx = ref(-1);
|
|
7623
7769
|
function onClick(item) {
|
|
@@ -7638,7 +7784,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
7638
7784
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item, i) => {
|
|
7639
7785
|
var _a, _b, _c, _d;
|
|
7640
7786
|
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
7641
|
-
item.isSeparator ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7787
|
+
item.isSeparator ? (openBlock(), createElementBlock("div", _hoisted_1$a)) : (openBlock(), createElementBlock("div", {
|
|
7642
7788
|
key: 1,
|
|
7643
7789
|
class: normalizeClass(["rj-menu-item", { "is-disabled": (_a = item.disabled) == null ? void 0 : _a.call(item), "has-sub": (_b = item.children) == null ? void 0 : _b.length }]),
|
|
7644
7790
|
onMouseenter: ($event) => {
|
|
@@ -7647,42 +7793,42 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
7647
7793
|
},
|
|
7648
7794
|
onClick: ($event) => onClick(item)
|
|
7649
7795
|
}, [
|
|
7650
|
-
createElementVNode("span", _hoisted_3$
|
|
7651
|
-
((_c = item.children) == null ? void 0 : _c.length) ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
7652
|
-
((_d = item.children) == null ? void 0 : _d.length) && hoverIdx.value === i ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
7796
|
+
createElementVNode("span", _hoisted_3$a, toDisplayString(item.name), 1),
|
|
7797
|
+
((_c = item.children) == null ? void 0 : _c.length) ? (openBlock(), createElementBlock("span", _hoisted_4$9, "▸")) : createCommentVNode("", true),
|
|
7798
|
+
((_d = item.children) == null ? void 0 : _d.length) && hoverIdx.value === i ? (openBlock(), createElementBlock("div", _hoisted_5$9, [
|
|
7653
7799
|
(openBlock(true), createElementBlock(Fragment, null, renderList(item.children, (sub) => {
|
|
7654
7800
|
var _a2;
|
|
7655
7801
|
return openBlock(), createElementBlock(Fragment, {
|
|
7656
7802
|
key: sub.name || String(sub.isSeparator)
|
|
7657
7803
|
}, [
|
|
7658
|
-
sub.isSeparator ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
7804
|
+
sub.isSeparator ? (openBlock(), createElementBlock("div", _hoisted_6$9)) : (openBlock(), createElementBlock("div", {
|
|
7659
7805
|
key: 1,
|
|
7660
7806
|
class: normalizeClass(["rj-menu-item", { "is-disabled": (_a2 = sub.disabled) == null ? void 0 : _a2.call(sub) }]),
|
|
7661
7807
|
onClick: withModifiers(($event) => onClick(sub), ["stop"])
|
|
7662
7808
|
}, [
|
|
7663
|
-
createElementVNode("span", _hoisted_8$
|
|
7664
|
-
], 10, _hoisted_7$
|
|
7809
|
+
createElementVNode("span", _hoisted_8$8, toDisplayString(sub.name), 1)
|
|
7810
|
+
], 10, _hoisted_7$8))
|
|
7665
7811
|
], 64);
|
|
7666
7812
|
}), 128))
|
|
7667
7813
|
])) : createCommentVNode("", true)
|
|
7668
|
-
], 42, _hoisted_2$
|
|
7814
|
+
], 42, _hoisted_2$a))
|
|
7669
7815
|
], 64);
|
|
7670
7816
|
}), 128))
|
|
7671
7817
|
], 4);
|
|
7672
7818
|
};
|
|
7673
7819
|
}
|
|
7674
7820
|
});
|
|
7675
|
-
const _hoisted_1$
|
|
7676
|
-
const _hoisted_2$
|
|
7677
|
-
const _hoisted_3$
|
|
7678
|
-
const _hoisted_4$
|
|
7679
|
-
const _hoisted_5$
|
|
7680
|
-
const _hoisted_6$
|
|
7681
|
-
const _hoisted_7$
|
|
7821
|
+
const _hoisted_1$9 = { class: "rj-colmenu-tabs" };
|
|
7822
|
+
const _hoisted_2$9 = ["onClick"];
|
|
7823
|
+
const _hoisted_3$9 = { class: "rj-colmenu-tab-ic" };
|
|
7824
|
+
const _hoisted_4$8 = { class: "rj-colmenu-body" };
|
|
7825
|
+
const _hoisted_5$8 = { class: "rj-colmenu-title" };
|
|
7826
|
+
const _hoisted_6$8 = { class: "rj-colmenu-ic" };
|
|
7827
|
+
const _hoisted_7$7 = {
|
|
7682
7828
|
key: 0,
|
|
7683
7829
|
class: "rj-colmenu-cur"
|
|
7684
7830
|
};
|
|
7685
|
-
const _hoisted_8$
|
|
7831
|
+
const _hoisted_8$7 = { class: "rj-colmenu-ic" };
|
|
7686
7832
|
const _hoisted_9$5 = {
|
|
7687
7833
|
key: 0,
|
|
7688
7834
|
class: "rj-colmenu-cur"
|
|
@@ -7700,11 +7846,11 @@ const _hoisted_16$4 = {
|
|
|
7700
7846
|
key: 0,
|
|
7701
7847
|
class: "rj-colmenu-cur"
|
|
7702
7848
|
};
|
|
7703
|
-
const _hoisted_17$
|
|
7704
|
-
const _hoisted_18$
|
|
7705
|
-
const _hoisted_19$
|
|
7706
|
-
const _hoisted_20$
|
|
7707
|
-
const _hoisted_21$
|
|
7849
|
+
const _hoisted_17$3 = { class: "rj-colmenu-ic" };
|
|
7850
|
+
const _hoisted_18$3 = { class: "rj-colmenu-title" };
|
|
7851
|
+
const _hoisted_19$2 = { class: "rj-colmenu-draghint" };
|
|
7852
|
+
const _hoisted_20$2 = { class: "rj-colmenu-list" };
|
|
7853
|
+
const _hoisted_21$2 = ["onDragstart", "onDragover", "onDragleave", "onDrop"];
|
|
7708
7854
|
const _hoisted_22$2 = {
|
|
7709
7855
|
class: "rj-colmenu-grip",
|
|
7710
7856
|
title: ""
|
|
@@ -7712,7 +7858,7 @@ const _hoisted_22$2 = {
|
|
|
7712
7858
|
const _hoisted_23$2 = ["title", "onClick"];
|
|
7713
7859
|
const _hoisted_24$2 = ["title", "onClick"];
|
|
7714
7860
|
const _hoisted_25$2 = { class: "rj-colmenu-foot" };
|
|
7715
|
-
const _sfc_main$
|
|
7861
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
7716
7862
|
...{ name: "RjColumnMenu" },
|
|
7717
7863
|
__name: "RjColumnMenu",
|
|
7718
7864
|
props: {
|
|
@@ -7801,35 +7947,35 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7801
7947
|
onMousedown: _cache[16] || (_cache[16] = withModifiers(() => {
|
|
7802
7948
|
}, ["stop"]))
|
|
7803
7949
|
}, [
|
|
7804
|
-
createElementVNode("div", _hoisted_1$
|
|
7950
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
7805
7951
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(visibleTabs), (tb) => {
|
|
7806
7952
|
return openBlock(), createElementBlock("div", {
|
|
7807
7953
|
key: tb.k,
|
|
7808
7954
|
class: normalizeClass(["rj-colmenu-tab", { "is-active": tab.value === tb.k }]),
|
|
7809
7955
|
onClick: ($event) => tab.value = tb.k
|
|
7810
7956
|
}, [
|
|
7811
|
-
createElementVNode("span", _hoisted_3$
|
|
7957
|
+
createElementVNode("span", _hoisted_3$9, toDisplayString(tb.icon), 1),
|
|
7812
7958
|
createTextVNode(toDisplayString(tb.label), 1)
|
|
7813
|
-
], 10, _hoisted_2$
|
|
7959
|
+
], 10, _hoisted_2$9);
|
|
7814
7960
|
}), 128))
|
|
7815
7961
|
]),
|
|
7816
|
-
createElementVNode("div", _hoisted_4$
|
|
7962
|
+
createElementVNode("div", _hoisted_4$8, [
|
|
7817
7963
|
tab.value === "general" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7818
|
-
createElementVNode("div", _hoisted_5$
|
|
7964
|
+
createElementVNode("div", _hoisted_5$8, toDisplayString(_ctx.col.title || _ctx.colId), 1),
|
|
7819
7965
|
_ctx.canSort ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
7820
7966
|
createElementVNode("div", {
|
|
7821
7967
|
class: "rj-colmenu-item",
|
|
7822
7968
|
onClick: _cache[0] || (_cache[0] = ($event) => pick(() => _ctx.$emit("sort", "asc")))
|
|
7823
7969
|
}, [
|
|
7824
|
-
createElementVNode("span", _hoisted_6$
|
|
7970
|
+
createElementVNode("span", _hoisted_6$8, toDisplayString(unref(icons).sortAscending), 1),
|
|
7825
7971
|
createTextVNode(toDisplayString(unref(t)("sortAsc")) + " ", 1),
|
|
7826
|
-
_ctx.sortDir === "asc" ? (openBlock(), createElementBlock("span", _hoisted_7$
|
|
7972
|
+
_ctx.sortDir === "asc" ? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(unref(icons).checked), 1)) : createCommentVNode("", true)
|
|
7827
7973
|
]),
|
|
7828
7974
|
createElementVNode("div", {
|
|
7829
7975
|
class: "rj-colmenu-item",
|
|
7830
7976
|
onClick: _cache[1] || (_cache[1] = ($event) => pick(() => _ctx.$emit("sort", "desc")))
|
|
7831
7977
|
}, [
|
|
7832
|
-
createElementVNode("span", _hoisted_8$
|
|
7978
|
+
createElementVNode("span", _hoisted_8$7, toDisplayString(unref(icons).sortDescending), 1),
|
|
7833
7979
|
createTextVNode(toDisplayString(unref(t)("sortDesc")) + " ", 1),
|
|
7834
7980
|
_ctx.sortDir === "desc" ? (openBlock(), createElementBlock("span", _hoisted_9$5, toDisplayString(unref(icons).checked), 1)) : createCommentVNode("", true)
|
|
7835
7981
|
]),
|
|
@@ -7878,7 +8024,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7878
8024
|
class: "rj-colmenu-item",
|
|
7879
8025
|
onClick: _cache[8] || (_cache[8] = ($event) => pick(() => _ctx.$emit("hide")))
|
|
7880
8026
|
}, [
|
|
7881
|
-
createElementVNode("span", _hoisted_17$
|
|
8027
|
+
createElementVNode("span", _hoisted_17$3, toDisplayString(unref(icons).hidden), 1),
|
|
7882
8028
|
createTextVNode(toDisplayString(unref(t)("hideColumn")), 1)
|
|
7883
8029
|
]),
|
|
7884
8030
|
_ctx.canGroup ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
@@ -7888,7 +8034,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7888
8034
|
onClick: _cache[9] || (_cache[9] = ($event) => pick(() => _ctx.$emit("group")))
|
|
7889
8035
|
}, toDisplayString(unref(t)("groupBy")), 1)
|
|
7890
8036
|
], 64)) : createCommentVNode("", true)
|
|
7891
|
-
], 64)) : tab.value === "filter" ? (openBlock(), createBlock(_sfc_main$
|
|
8037
|
+
], 64)) : tab.value === "filter" ? (openBlock(), createBlock(_sfc_main$d, {
|
|
7892
8038
|
key: 1,
|
|
7893
8039
|
inline: "",
|
|
7894
8040
|
column: _ctx.col,
|
|
@@ -7899,9 +8045,9 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7899
8045
|
onClear: _cache[11] || (_cache[11] = ($event) => _ctx.$emit("clear-filter")),
|
|
7900
8046
|
onAdvanced: _cache[12] || (_cache[12] = ($event) => _ctx.$emit("advanced"))
|
|
7901
8047
|
}, null, 8, ["column", "filter-type", "model", "unique-values"])) : tab.value === "columns" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
7902
|
-
createElementVNode("div", _hoisted_18$
|
|
7903
|
-
createElementVNode("div", _hoisted_19$
|
|
7904
|
-
createElementVNode("div", _hoisted_20$
|
|
8048
|
+
createElementVNode("div", _hoisted_18$3, toDisplayString(unref(t)("columnsCount", { n: _ctx.columns.length })), 1),
|
|
8049
|
+
createElementVNode("div", _hoisted_19$2, toDisplayString(unref(t)("colDragHint")), 1),
|
|
8050
|
+
createElementVNode("div", _hoisted_20$2, [
|
|
7905
8051
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (c) => {
|
|
7906
8052
|
return openBlock(), createElementBlock("div", {
|
|
7907
8053
|
key: c.colId,
|
|
@@ -7935,7 +8081,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7935
8081
|
title: c.pinned === "left" ? unref(t)("pinnedLeft") + " · " + unref(t)("unpin") : c.pinned === "right" ? unref(t)("pinnedRight") + " · " + unref(t)("unpin") : unref(t)("pinColumn"),
|
|
7936
8082
|
onClick: ($event) => toggleColPin(c)
|
|
7937
8083
|
}, toDisplayString(unref(icons).pin), 11, _hoisted_24$2)
|
|
7938
|
-
], 42, _hoisted_21$
|
|
8084
|
+
], 42, _hoisted_21$2);
|
|
7939
8085
|
}), 128))
|
|
7940
8086
|
]),
|
|
7941
8087
|
createElementVNode("div", _hoisted_25$2, [
|
|
@@ -7952,14 +8098,14 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
7952
8098
|
};
|
|
7953
8099
|
}
|
|
7954
8100
|
});
|
|
7955
|
-
const _hoisted_1$
|
|
7956
|
-
const _hoisted_2$
|
|
7957
|
-
const _hoisted_3$
|
|
7958
|
-
const _hoisted_4$
|
|
7959
|
-
const _hoisted_5$
|
|
7960
|
-
const _hoisted_6$
|
|
7961
|
-
const _hoisted_7$
|
|
7962
|
-
const _hoisted_8$
|
|
8101
|
+
const _hoisted_1$8 = { class: "rj-panel" };
|
|
8102
|
+
const _hoisted_2$8 = { class: "rj-panel-tabs" };
|
|
8103
|
+
const _hoisted_3$8 = ["onClick"];
|
|
8104
|
+
const _hoisted_4$7 = { class: "rj-panel-body" };
|
|
8105
|
+
const _hoisted_5$7 = { class: "rj-panel-section" };
|
|
8106
|
+
const _hoisted_6$7 = ["onDragstart", "onDragover", "onDrop"];
|
|
8107
|
+
const _hoisted_7$6 = { class: "rj-panel-item-ops" };
|
|
8108
|
+
const _hoisted_8$6 = {
|
|
7963
8109
|
key: 0,
|
|
7964
8110
|
class: "rj-panel-pin-tag"
|
|
7965
8111
|
};
|
|
@@ -7974,11 +8120,11 @@ const _hoisted_16$3 = {
|
|
|
7974
8120
|
class: "rj-panel-section",
|
|
7975
8121
|
style: { "margin-top": "10px" }
|
|
7976
8122
|
};
|
|
7977
|
-
const _hoisted_17$
|
|
7978
|
-
const _hoisted_18$
|
|
7979
|
-
const _hoisted_19$
|
|
7980
|
-
const _hoisted_20$
|
|
7981
|
-
const _hoisted_21$
|
|
8123
|
+
const _hoisted_17$2 = ["onClick"];
|
|
8124
|
+
const _hoisted_18$2 = { class: "rj-panel-item-title" };
|
|
8125
|
+
const _hoisted_19$1 = { class: "rj-popup-row" };
|
|
8126
|
+
const _hoisted_20$1 = { style: { "display": "flex", "align-items": "center", "gap": "6px", "cursor": "pointer" } };
|
|
8127
|
+
const _hoisted_21$1 = ["checked"];
|
|
7982
8128
|
const _hoisted_22$1 = { class: "rj-panel-section" };
|
|
7983
8129
|
const _hoisted_23$1 = ["onClick"];
|
|
7984
8130
|
const _hoisted_24$1 = ["checked"];
|
|
@@ -8010,7 +8156,7 @@ const _hoisted_39$1 = {
|
|
|
8010
8156
|
class: "rj-panel-section"
|
|
8011
8157
|
};
|
|
8012
8158
|
const _hoisted_40$1 = { class: "rj-panel-item-title" };
|
|
8013
|
-
const _sfc_main$
|
|
8159
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
8014
8160
|
...{ name: "RjToolPanel" },
|
|
8015
8161
|
__name: "RjToolPanel",
|
|
8016
8162
|
props: {
|
|
@@ -8107,19 +8253,19 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8107
8253
|
}
|
|
8108
8254
|
return (_ctx, _cache) => {
|
|
8109
8255
|
var _a, _b;
|
|
8110
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
8111
|
-
createElementVNode("div", _hoisted_2$
|
|
8256
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
8257
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
8112
8258
|
(openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tb) => {
|
|
8113
8259
|
return openBlock(), createElementBlock("div", {
|
|
8114
8260
|
key: tb.k,
|
|
8115
8261
|
class: normalizeClass(["rj-panel-tab", { "is-active": tab.value === tb.k }]),
|
|
8116
8262
|
onClick: ($event) => tab.value = tb.k
|
|
8117
|
-
}, toDisplayString(tb.label), 11, _hoisted_3$
|
|
8263
|
+
}, toDisplayString(tb.label), 11, _hoisted_3$8);
|
|
8118
8264
|
}), 128))
|
|
8119
8265
|
]),
|
|
8120
|
-
createElementVNode("div", _hoisted_4$
|
|
8266
|
+
createElementVNode("div", _hoisted_4$7, [
|
|
8121
8267
|
tab.value === "cols" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
8122
|
-
createElementVNode("div", _hoisted_5$
|
|
8268
|
+
createElementVNode("div", _hoisted_5$7, toDisplayString(unref(t)("panelColsHint")), 1),
|
|
8123
8269
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.leafList, (c) => {
|
|
8124
8270
|
return openBlock(), createElementBlock("div", {
|
|
8125
8271
|
key: c.colId,
|
|
@@ -8133,8 +8279,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8133
8279
|
style: normalizeStyle({ opacity: c.hidden ? 0.4 : 1 }),
|
|
8134
8280
|
class: "rj-panel-item-title"
|
|
8135
8281
|
}, toDisplayString(c.title || c.colId), 5),
|
|
8136
|
-
createElementVNode("span", _hoisted_7$
|
|
8137
|
-
c.pinned ? (openBlock(), createElementBlock("span", _hoisted_8$
|
|
8282
|
+
createElementVNode("span", _hoisted_7$6, [
|
|
8283
|
+
c.pinned ? (openBlock(), createElementBlock("span", _hoisted_8$6, toDisplayString(c.pinned === "right" ? unref(t)("pinTagRight") : unref(t)("pinTagLeft")), 1)) : createCommentVNode("", true),
|
|
8138
8284
|
createElementVNode("span", {
|
|
8139
8285
|
class: normalizeClass(["rj-panel-pin", { "is-on": !!c.pinned }]),
|
|
8140
8286
|
title: c.pinned === "left" ? unref(t)("pinnedLeft") + " · " + unref(t)("unpin") : c.pinned === "right" ? unref(t)("pinnedRight") + " · " + unref(t)("unpin") : unref(t)("pinColumn"),
|
|
@@ -8145,7 +8291,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8145
8291
|
onClick: withModifiers(($event) => _ctx.$emit("toggle-hide", c.colId), ["stop"])
|
|
8146
8292
|
}, toDisplayString(c.hidden ? unref(icons).hidden : unref(icons).visible), 9, _hoisted_10$4)
|
|
8147
8293
|
])
|
|
8148
|
-
], 42, _hoisted_6$
|
|
8294
|
+
], 42, _hoisted_6$7);
|
|
8149
8295
|
}), 128))
|
|
8150
8296
|
], 64)) : tab.value === "group" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
8151
8297
|
createElementVNode("div", _hoisted_11$4, toDisplayString(unref(t)("groupHere")), 1),
|
|
@@ -8183,18 +8329,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8183
8329
|
style: { "cursor": "pointer" },
|
|
8184
8330
|
onClick: ($event) => _ctx.$emit("group-add", dimKey(c))
|
|
8185
8331
|
}, [
|
|
8186
|
-
createElementVNode("span", _hoisted_18$
|
|
8187
|
-
], 8, _hoisted_17$
|
|
8332
|
+
createElementVNode("span", _hoisted_18$2, toDisplayString(unref(icons).add) + " " + toDisplayString(c.title || c.colId), 1)
|
|
8333
|
+
], 8, _hoisted_17$2);
|
|
8188
8334
|
}), 128))
|
|
8189
8335
|
], 64)) : createCommentVNode("", true)
|
|
8190
8336
|
], 64)) : tab.value === "pivot" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
8191
|
-
createElementVNode("div", _hoisted_19$
|
|
8192
|
-
createElementVNode("label", _hoisted_20$
|
|
8337
|
+
createElementVNode("div", _hoisted_19$1, [
|
|
8338
|
+
createElementVNode("label", _hoisted_20$1, [
|
|
8193
8339
|
createElementVNode("input", {
|
|
8194
8340
|
type: "checkbox",
|
|
8195
8341
|
checked: _ctx.pivot.active,
|
|
8196
8342
|
onChange: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("pivot-enable", $event.target.checked))
|
|
8197
|
-
}, null, 40, _hoisted_21$
|
|
8343
|
+
}, null, 40, _hoisted_21$1),
|
|
8198
8344
|
createTextVNode(" " + toDisplayString(unref(t)("enablePivot")), 1)
|
|
8199
8345
|
])
|
|
8200
8346
|
]),
|
|
@@ -8276,18 +8422,18 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
8276
8422
|
};
|
|
8277
8423
|
}
|
|
8278
8424
|
});
|
|
8279
|
-
const _hoisted_1$
|
|
8425
|
+
const _hoisted_1$7 = {
|
|
8280
8426
|
class: "rj-pager-opt rj-pager-total",
|
|
8281
8427
|
style: { "color": "var(--rj-text-secondary)" }
|
|
8282
8428
|
};
|
|
8283
|
-
const _hoisted_2$
|
|
8284
|
-
const _hoisted_3$
|
|
8285
|
-
const _hoisted_4$
|
|
8286
|
-
const _hoisted_5$
|
|
8287
|
-
const _hoisted_6$
|
|
8288
|
-
const _hoisted_7$
|
|
8289
|
-
const _hoisted_8$
|
|
8290
|
-
const _sfc_main$
|
|
8429
|
+
const _hoisted_2$7 = ["value"];
|
|
8430
|
+
const _hoisted_3$7 = ["value"];
|
|
8431
|
+
const _hoisted_4$6 = { class: "rj-pager-nav" };
|
|
8432
|
+
const _hoisted_5$6 = ["disabled"];
|
|
8433
|
+
const _hoisted_6$6 = ["disabled"];
|
|
8434
|
+
const _hoisted_7$5 = ["disabled"];
|
|
8435
|
+
const _hoisted_8$5 = ["disabled"];
|
|
8436
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
8291
8437
|
...{ name: "RjPager" },
|
|
8292
8438
|
__name: "RjPager",
|
|
8293
8439
|
props: {
|
|
@@ -8305,7 +8451,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
8305
8451
|
return openBlock(), createElementBlock("div", {
|
|
8306
8452
|
class: normalizeClass(["rj-pager", _ctx.variant === "top" ? "rj-pager-top" : "rj-pager-bottom"])
|
|
8307
8453
|
}, [
|
|
8308
|
-
createElementVNode("span", _hoisted_1$
|
|
8454
|
+
createElementVNode("span", _hoisted_1$7, toDisplayString(unref(t)("pagerTotal", { n: _ctx.total })), 1),
|
|
8309
8455
|
createElementVNode("select", {
|
|
8310
8456
|
class: "rj-input rj-pager-opt rj-pager-size",
|
|
8311
8457
|
value: _ctx.pageSize,
|
|
@@ -8315,44 +8461,44 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
8315
8461
|
return createElementVNode("option", {
|
|
8316
8462
|
key: s,
|
|
8317
8463
|
value: s
|
|
8318
|
-
}, toDisplayString(unref(t)("perPage", { n: s })), 9, _hoisted_3$
|
|
8464
|
+
}, toDisplayString(unref(t)("perPage", { n: s })), 9, _hoisted_3$7);
|
|
8319
8465
|
}), 64))
|
|
8320
|
-
], 40, _hoisted_2$
|
|
8321
|
-
createElementVNode("div", _hoisted_4$
|
|
8466
|
+
], 40, _hoisted_2$7),
|
|
8467
|
+
createElementVNode("div", _hoisted_4$6, [
|
|
8322
8468
|
createElementVNode("button", {
|
|
8323
8469
|
class: "rj-btn",
|
|
8324
8470
|
disabled: _ctx.page <= 1,
|
|
8325
8471
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:page", 1))
|
|
8326
|
-
}, toDisplayString(unref(t)("first")), 9, _hoisted_5$
|
|
8472
|
+
}, toDisplayString(unref(t)("first")), 9, _hoisted_5$6),
|
|
8327
8473
|
createElementVNode("button", {
|
|
8328
8474
|
class: "rj-btn",
|
|
8329
8475
|
disabled: _ctx.page <= 1,
|
|
8330
8476
|
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("update:page", _ctx.page - 1))
|
|
8331
|
-
}, toDisplayString(unref(t)("prev")), 9, _hoisted_6$
|
|
8477
|
+
}, toDisplayString(unref(t)("prev")), 9, _hoisted_6$6),
|
|
8332
8478
|
createElementVNode("span", null, toDisplayString(_ctx.page) + " / " + toDisplayString(pages.value || 1), 1),
|
|
8333
8479
|
createElementVNode("button", {
|
|
8334
8480
|
class: "rj-btn",
|
|
8335
8481
|
disabled: _ctx.page >= pages.value,
|
|
8336
8482
|
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("update:page", _ctx.page + 1))
|
|
8337
|
-
}, toDisplayString(unref(t)("next")), 9, _hoisted_7$
|
|
8483
|
+
}, toDisplayString(unref(t)("next")), 9, _hoisted_7$5),
|
|
8338
8484
|
createElementVNode("button", {
|
|
8339
8485
|
class: "rj-btn",
|
|
8340
8486
|
disabled: _ctx.page >= pages.value,
|
|
8341
8487
|
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("update:page", pages.value))
|
|
8342
|
-
}, toDisplayString(unref(t)("last")), 9, _hoisted_8$
|
|
8488
|
+
}, toDisplayString(unref(t)("last")), 9, _hoisted_8$5)
|
|
8343
8489
|
])
|
|
8344
8490
|
], 2);
|
|
8345
8491
|
};
|
|
8346
8492
|
}
|
|
8347
8493
|
});
|
|
8348
|
-
const _hoisted_1$
|
|
8349
|
-
const _hoisted_2$
|
|
8350
|
-
const _hoisted_3$
|
|
8351
|
-
const _hoisted_4$
|
|
8352
|
-
const _hoisted_5$
|
|
8353
|
-
const _hoisted_6$
|
|
8354
|
-
const _hoisted_7$
|
|
8355
|
-
const _hoisted_8$
|
|
8494
|
+
const _hoisted_1$6 = { class: "rj-chart-dialog" };
|
|
8495
|
+
const _hoisted_2$6 = { class: "rj-chart-header" };
|
|
8496
|
+
const _hoisted_3$6 = { class: "rj-chart-body" };
|
|
8497
|
+
const _hoisted_4$5 = { style: { "display": "flex", "gap": "8px", "flex-wrap": "wrap", "align-items": "center" } };
|
|
8498
|
+
const _hoisted_5$5 = { class: "rj-radio-tabs" };
|
|
8499
|
+
const _hoisted_6$5 = ["onClick"];
|
|
8500
|
+
const _hoisted_7$4 = { value: "" };
|
|
8501
|
+
const _hoisted_8$4 = ["value"];
|
|
8356
8502
|
const _hoisted_9$3 = { value: "" };
|
|
8357
8503
|
const _hoisted_10$3 = ["value"];
|
|
8358
8504
|
const _hoisted_11$3 = ["value"];
|
|
@@ -8362,7 +8508,7 @@ const _hoisted_14$3 = {
|
|
|
8362
8508
|
key: 0,
|
|
8363
8509
|
class: "rj-chart-warn"
|
|
8364
8510
|
};
|
|
8365
|
-
const _sfc_main$
|
|
8511
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
8366
8512
|
...{ name: "RjChartDialog" },
|
|
8367
8513
|
__name: "RjChartDialog",
|
|
8368
8514
|
props: {
|
|
@@ -8534,23 +8680,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
8534
8680
|
class: "rj-chart-mask",
|
|
8535
8681
|
onClick: _cache[5] || (_cache[5] = withModifiers(($event) => _ctx.$emit("close"), ["self"]))
|
|
8536
8682
|
}, [
|
|
8537
|
-
createElementVNode("div", _hoisted_1$
|
|
8538
|
-
createElementVNode("div", _hoisted_2$
|
|
8683
|
+
createElementVNode("div", _hoisted_1$6, [
|
|
8684
|
+
createElementVNode("div", _hoisted_2$6, [
|
|
8539
8685
|
createTextVNode(toDisplayString(unref(t)("chartTitle")) + " ", 1),
|
|
8540
8686
|
createElementVNode("span", {
|
|
8541
8687
|
class: "rj-chart-close",
|
|
8542
8688
|
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
|
|
8543
8689
|
}, toDisplayString(unref(icons).remove), 1)
|
|
8544
8690
|
]),
|
|
8545
|
-
createElementVNode("div", _hoisted_3$
|
|
8546
|
-
createElementVNode("div", _hoisted_4$
|
|
8547
|
-
createElementVNode("div", _hoisted_5$
|
|
8691
|
+
createElementVNode("div", _hoisted_3$6, [
|
|
8692
|
+
createElementVNode("div", _hoisted_4$5, [
|
|
8693
|
+
createElementVNode("div", _hoisted_5$5, [
|
|
8548
8694
|
(openBlock(), createElementBlock(Fragment, null, renderList(TYPE_KEYS, (tt) => {
|
|
8549
8695
|
return createElementVNode("span", {
|
|
8550
8696
|
key: tt.k,
|
|
8551
8697
|
class: normalizeClass({ "is-active": chartType.value === tt.k }),
|
|
8552
8698
|
onClick: ($event) => chartType.value = tt.k
|
|
8553
|
-
}, toDisplayString(unref(t)(tt.labelKey)), 11, _hoisted_6$
|
|
8699
|
+
}, toDisplayString(unref(t)(tt.labelKey)), 11, _hoisted_6$5);
|
|
8554
8700
|
}), 64))
|
|
8555
8701
|
]),
|
|
8556
8702
|
withDirectives(createElementVNode("select", {
|
|
@@ -8558,12 +8704,12 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
8558
8704
|
class: "rj-input",
|
|
8559
8705
|
style: { "padding": "0 4px" }
|
|
8560
8706
|
}, [
|
|
8561
|
-
createElementVNode("option", _hoisted_7$
|
|
8707
|
+
createElementVNode("option", _hoisted_7$4, toDisplayString(unref(t)("chartPickX")), 1),
|
|
8562
8708
|
(openBlock(true), createElementBlock(Fragment, null, renderList(dimCols.value, (c) => {
|
|
8563
8709
|
return openBlock(), createElementBlock("option", {
|
|
8564
8710
|
key: c.field,
|
|
8565
8711
|
value: c.field
|
|
8566
|
-
}, toDisplayString(c.title || c.field), 9, _hoisted_8$
|
|
8712
|
+
}, toDisplayString(c.title || c.field), 9, _hoisted_8$4);
|
|
8567
8713
|
}), 128))
|
|
8568
8714
|
], 512), [
|
|
8569
8715
|
[vModelSelect, xCat.value]
|
|
@@ -8728,41 +8874,251 @@ function queryActionConfirm(action, rows) {
|
|
|
8728
8874
|
return "";
|
|
8729
8875
|
return typeof action.confirm === "function" ? action.confirm(rows) : action.confirm;
|
|
8730
8876
|
}
|
|
8877
|
+
const _hoisted_1$5 = { class: "rj-opt-text" };
|
|
8878
|
+
const _hoisted_2$5 = ["placeholder"];
|
|
8879
|
+
const _hoisted_3$5 = ["onMouseenter", "onClick"];
|
|
8880
|
+
const _hoisted_4$4 = ["onClick"];
|
|
8881
|
+
const _hoisted_5$4 = {
|
|
8882
|
+
key: 1,
|
|
8883
|
+
class: "rj-option-caret is-leaf"
|
|
8884
|
+
};
|
|
8885
|
+
const _hoisted_6$4 = ["checked", "onChange"];
|
|
8886
|
+
const _hoisted_7$3 = { class: "rj-option-label" };
|
|
8887
|
+
const _hoisted_8$3 = {
|
|
8888
|
+
key: 0,
|
|
8889
|
+
class: "rj-opt-empty"
|
|
8890
|
+
};
|
|
8891
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
8892
|
+
...{ name: "RjOptionSelect" },
|
|
8893
|
+
__name: "RjOptionSelect",
|
|
8894
|
+
props: {
|
|
8895
|
+
options: { default: () => [] },
|
|
8896
|
+
modelValue: { default: void 0 },
|
|
8897
|
+
multiple: { type: Boolean, default: false },
|
|
8898
|
+
placeholder: { default: "" }
|
|
8899
|
+
},
|
|
8900
|
+
emits: ["update:modelValue"],
|
|
8901
|
+
setup(__props, { emit: __emit }) {
|
|
8902
|
+
const props = __props;
|
|
8903
|
+
const emit = __emit;
|
|
8904
|
+
const t = inject(RJ_LOCALE_KEY, defaultTranslate);
|
|
8905
|
+
const rootRef = ref();
|
|
8906
|
+
const searchRef = ref();
|
|
8907
|
+
const listRef = ref();
|
|
8908
|
+
const open = ref(false);
|
|
8909
|
+
const query = ref("");
|
|
8910
|
+
const activeIdx = ref(-1);
|
|
8911
|
+
const expanded = ref(new Set(collectParentKeys(props.options)));
|
|
8912
|
+
watch(
|
|
8913
|
+
() => props.options,
|
|
8914
|
+
(opts) => {
|
|
8915
|
+
expanded.value = collectParentKeys(opts);
|
|
8916
|
+
}
|
|
8917
|
+
);
|
|
8918
|
+
const filteredTree = computed(() => filterOptionTree(props.options, query.value));
|
|
8919
|
+
const visibleRows = computed(() => {
|
|
8920
|
+
const q = (query.value || "").trim();
|
|
8921
|
+
const tree = filteredTree.value;
|
|
8922
|
+
const exp = q ? collectParentKeys(tree) : expanded.value;
|
|
8923
|
+
return flattenTreeForRender(tree, exp);
|
|
8924
|
+
});
|
|
8925
|
+
const flat = computed(() => flattenOptions(props.options));
|
|
8926
|
+
function labelOf(value) {
|
|
8927
|
+
const hit = flat.value.find((o) => String(o.value) === String(value));
|
|
8928
|
+
return hit ? String(hit.label) : String(value ?? "");
|
|
8929
|
+
}
|
|
8930
|
+
const chosen = computed(
|
|
8931
|
+
() => props.multiple ? Array.isArray(props.modelValue) ? props.modelValue : [] : props.modelValue == null || props.modelValue === "" ? [] : [props.modelValue]
|
|
8932
|
+
);
|
|
8933
|
+
const displayText = computed(() => {
|
|
8934
|
+
if (!chosen.value.length)
|
|
8935
|
+
return "";
|
|
8936
|
+
if (props.multiple)
|
|
8937
|
+
return chosen.value.map((v) => labelOf(v)).join("、");
|
|
8938
|
+
return labelOf(chosen.value[0]);
|
|
8939
|
+
});
|
|
8940
|
+
function isChosen(value) {
|
|
8941
|
+
return chosen.value.some((v) => String(v) === String(value));
|
|
8942
|
+
}
|
|
8943
|
+
function toggle() {
|
|
8944
|
+
if (open.value)
|
|
8945
|
+
close();
|
|
8946
|
+
else
|
|
8947
|
+
openList();
|
|
8948
|
+
}
|
|
8949
|
+
function openList() {
|
|
8950
|
+
open.value = true;
|
|
8951
|
+
query.value = "";
|
|
8952
|
+
activeIdx.value = visibleRows.value.length ? 0 : -1;
|
|
8953
|
+
nextTick(() => {
|
|
8954
|
+
var _a;
|
|
8955
|
+
return (_a = searchRef.value) == null ? void 0 : _a.focus();
|
|
8956
|
+
});
|
|
8957
|
+
document.addEventListener("mousedown", onDocDown);
|
|
8958
|
+
}
|
|
8959
|
+
function close() {
|
|
8960
|
+
open.value = false;
|
|
8961
|
+
document.removeEventListener("mousedown", onDocDown);
|
|
8962
|
+
}
|
|
8963
|
+
function onDocDown(e) {
|
|
8964
|
+
if (rootRef.value && !rootRef.value.contains(e.target))
|
|
8965
|
+
close();
|
|
8966
|
+
}
|
|
8967
|
+
function toggleExpand(opt) {
|
|
8968
|
+
const k = String(opt.value);
|
|
8969
|
+
const next = new Set(expanded.value);
|
|
8970
|
+
if (next.has(k))
|
|
8971
|
+
next.delete(k);
|
|
8972
|
+
else
|
|
8973
|
+
next.add(k);
|
|
8974
|
+
expanded.value = next;
|
|
8975
|
+
}
|
|
8976
|
+
function move(dir) {
|
|
8977
|
+
const len = visibleRows.value.length;
|
|
8978
|
+
if (!len)
|
|
8979
|
+
return;
|
|
8980
|
+
activeIdx.value = Math.min(len - 1, Math.max(0, activeIdx.value + dir));
|
|
8981
|
+
nextTick(() => {
|
|
8982
|
+
var _a, _b, _c;
|
|
8983
|
+
const el = (_b = (_a = listRef.value) == null ? void 0 : _a.children) == null ? void 0 : _b[activeIdx.value];
|
|
8984
|
+
(_c = el == null ? void 0 : el.scrollIntoView) == null ? void 0 : _c.call(el, { block: "nearest" });
|
|
8985
|
+
});
|
|
8986
|
+
}
|
|
8987
|
+
function emitValue(v) {
|
|
8988
|
+
emit("update:modelValue", v);
|
|
8989
|
+
}
|
|
8990
|
+
function pickSingle(opt) {
|
|
8991
|
+
emitValue(opt.value);
|
|
8992
|
+
close();
|
|
8993
|
+
}
|
|
8994
|
+
function toggleValue(opt) {
|
|
8995
|
+
const cur = chosen.value.slice();
|
|
8996
|
+
const i = cur.findIndex((v) => String(v) === String(opt.value));
|
|
8997
|
+
if (i >= 0)
|
|
8998
|
+
cur.splice(i, 1);
|
|
8999
|
+
else
|
|
9000
|
+
cur.push(opt.value);
|
|
9001
|
+
emitValue(cur);
|
|
9002
|
+
}
|
|
9003
|
+
function onRowClick(row) {
|
|
9004
|
+
if (props.multiple)
|
|
9005
|
+
toggleValue(row.option);
|
|
9006
|
+
else
|
|
9007
|
+
pickSingle(row.option);
|
|
9008
|
+
}
|
|
9009
|
+
function confirmActive() {
|
|
9010
|
+
const row = visibleRows.value[activeIdx.value];
|
|
9011
|
+
if (row)
|
|
9012
|
+
onRowClick(row);
|
|
9013
|
+
}
|
|
9014
|
+
onBeforeUnmount(() => document.removeEventListener("mousedown", onDocDown));
|
|
9015
|
+
return (_ctx, _cache) => {
|
|
9016
|
+
return openBlock(), createElementBlock("div", {
|
|
9017
|
+
ref_key: "rootRef",
|
|
9018
|
+
ref: rootRef,
|
|
9019
|
+
class: normalizeClass(["rj-opt-select", { "is-open": open.value }])
|
|
9020
|
+
}, [
|
|
9021
|
+
createElementVNode("button", {
|
|
9022
|
+
type: "button",
|
|
9023
|
+
class: normalizeClass(["rj-opt-trigger", { "is-placeholder": !displayText.value }]),
|
|
9024
|
+
onClick: _cache[0] || (_cache[0] = ($event) => toggle())
|
|
9025
|
+
}, [
|
|
9026
|
+
createElementVNode("span", _hoisted_1$5, toDisplayString(displayText.value || _ctx.placeholder), 1),
|
|
9027
|
+
_cache[8] || (_cache[8] = createElementVNode("span", {
|
|
9028
|
+
class: "rj-opt-arrow",
|
|
9029
|
+
"aria-hidden": "true"
|
|
9030
|
+
}, "▾", -1))
|
|
9031
|
+
], 2),
|
|
9032
|
+
withDirectives(createElementVNode("div", {
|
|
9033
|
+
class: "rj-opt-panel",
|
|
9034
|
+
onMousedown: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
9035
|
+
}, ["stop"]))
|
|
9036
|
+
}, [
|
|
9037
|
+
withDirectives(createElementVNode("input", {
|
|
9038
|
+
ref_key: "searchRef",
|
|
9039
|
+
ref: searchRef,
|
|
9040
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => query.value = $event),
|
|
9041
|
+
class: "rj-opt-search",
|
|
9042
|
+
type: "text",
|
|
9043
|
+
placeholder: unref(t)("searchOptions"),
|
|
9044
|
+
onKeydown: [
|
|
9045
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => move(1), ["prevent"]), ["down"])),
|
|
9046
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => move(-1), ["prevent"]), ["up"])),
|
|
9047
|
+
_cache[4] || (_cache[4] = withKeys(withModifiers(($event) => confirmActive(), ["prevent"]), ["enter"])),
|
|
9048
|
+
_cache[5] || (_cache[5] = withKeys(withModifiers(($event) => close(), ["prevent"]), ["esc"]))
|
|
9049
|
+
]
|
|
9050
|
+
}, null, 40, _hoisted_2$5), [
|
|
9051
|
+
[vModelText, query.value]
|
|
9052
|
+
]),
|
|
9053
|
+
createElementVNode("div", {
|
|
9054
|
+
ref_key: "listRef",
|
|
9055
|
+
ref: listRef,
|
|
9056
|
+
class: "rj-opt-list rj-option-tree"
|
|
9057
|
+
}, [
|
|
9058
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleRows.value, (row, i) => {
|
|
9059
|
+
return openBlock(), createElementBlock("div", {
|
|
9060
|
+
key: String(row.option.value) + ":" + i,
|
|
9061
|
+
class: normalizeClass(["rj-opt-row", { "is-active": i === activeIdx.value, "is-selected": isChosen(row.option.value) }]),
|
|
9062
|
+
style: normalizeStyle({ paddingLeft: 8 + row.depth * 16 + "px" }),
|
|
9063
|
+
onMouseenter: ($event) => activeIdx.value = i,
|
|
9064
|
+
onClick: ($event) => onRowClick(row)
|
|
9065
|
+
}, [
|
|
9066
|
+
row.hasChildren ? (openBlock(), createElementBlock("span", {
|
|
9067
|
+
key: 0,
|
|
9068
|
+
class: "rj-option-caret",
|
|
9069
|
+
onClick: withModifiers(($event) => toggleExpand(row.option), ["stop"])
|
|
9070
|
+
}, toDisplayString(row.expanded ? "▾" : "▸"), 9, _hoisted_4$4)) : (openBlock(), createElementBlock("span", _hoisted_5$4)),
|
|
9071
|
+
_ctx.multiple ? (openBlock(), createElementBlock("input", {
|
|
9072
|
+
key: 2,
|
|
9073
|
+
type: "checkbox",
|
|
9074
|
+
class: "rj-opt-check",
|
|
9075
|
+
checked: isChosen(row.option.value),
|
|
9076
|
+
onClick: _cache[6] || (_cache[6] = withModifiers(() => {
|
|
9077
|
+
}, ["stop"])),
|
|
9078
|
+
onChange: ($event) => toggleValue(row.option)
|
|
9079
|
+
}, null, 40, _hoisted_6$4)) : createCommentVNode("", true),
|
|
9080
|
+
createElementVNode("span", _hoisted_7$3, toDisplayString(row.option.label), 1)
|
|
9081
|
+
], 46, _hoisted_3$5);
|
|
9082
|
+
}), 128)),
|
|
9083
|
+
!visibleRows.value.length ? (openBlock(), createElementBlock("div", _hoisted_8$3, toDisplayString(unref(t)("noOptions")), 1)) : createCommentVNode("", true)
|
|
9084
|
+
], 512)
|
|
9085
|
+
], 544), [
|
|
9086
|
+
[vShow, open.value]
|
|
9087
|
+
])
|
|
9088
|
+
], 2);
|
|
9089
|
+
};
|
|
9090
|
+
}
|
|
9091
|
+
});
|
|
8731
9092
|
const _hoisted_1$4 = { class: "rj-query-bar" };
|
|
8732
9093
|
const _hoisted_2$4 = { class: "rj-query-label" };
|
|
8733
9094
|
const _hoisted_3$4 = ["value", "onChange"];
|
|
8734
9095
|
const _hoisted_4$3 = ["value"];
|
|
8735
|
-
const _hoisted_5$3 = ["value", "
|
|
8736
|
-
const _hoisted_6$3 = ["value"];
|
|
8737
|
-
const _hoisted_7$2 = ["
|
|
8738
|
-
const _hoisted_8$2 = {
|
|
8739
|
-
const _hoisted_9$2 = ["value"];
|
|
8740
|
-
const _hoisted_10$2 = ["value", "placeholder", "onInput"];
|
|
8741
|
-
const _hoisted_11$2 = ["value", "placeholder", "onInput"];
|
|
8742
|
-
const _hoisted_12$2 = ["onClick"];
|
|
8743
|
-
const _hoisted_13$2 = {
|
|
9096
|
+
const _hoisted_5$3 = ["value", "placeholder", "onInput"];
|
|
9097
|
+
const _hoisted_6$3 = ["value", "placeholder", "onInput"];
|
|
9098
|
+
const _hoisted_7$2 = ["title", "onClick"];
|
|
9099
|
+
const _hoisted_8$2 = {
|
|
8744
9100
|
value: "",
|
|
8745
9101
|
disabled: ""
|
|
8746
9102
|
};
|
|
8747
|
-
const
|
|
8748
|
-
const
|
|
9103
|
+
const _hoisted_9$2 = ["value"];
|
|
9104
|
+
const _hoisted_10$2 = {
|
|
8749
9105
|
key: 0,
|
|
8750
9106
|
value: "",
|
|
8751
9107
|
disabled: ""
|
|
8752
9108
|
};
|
|
8753
|
-
const
|
|
8754
|
-
const
|
|
8755
|
-
const
|
|
9109
|
+
const _hoisted_11$2 = { class: "rj-query-actions" };
|
|
9110
|
+
const _hoisted_12$2 = { class: "rj-query-core" };
|
|
9111
|
+
const _hoisted_13$2 = {
|
|
8756
9112
|
key: 0,
|
|
8757
9113
|
class: "rj-query-sep",
|
|
8758
9114
|
"aria-hidden": "true"
|
|
8759
9115
|
};
|
|
8760
|
-
const
|
|
9116
|
+
const _hoisted_14$2 = {
|
|
8761
9117
|
key: 1,
|
|
8762
9118
|
class: "rj-query-action-btns"
|
|
8763
9119
|
};
|
|
8764
|
-
const
|
|
8765
|
-
const
|
|
9120
|
+
const _hoisted_15$2 = ["disabled", "onClick"];
|
|
9121
|
+
const _hoisted_16$2 = {
|
|
8766
9122
|
key: 2,
|
|
8767
9123
|
class: "rj-query-slot-btns"
|
|
8768
9124
|
};
|
|
@@ -8872,12 +9228,19 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8872
9228
|
c[key] = readVal(ev, numeric);
|
|
8873
9229
|
emitList(list.value.slice());
|
|
8874
9230
|
}
|
|
8875
|
-
function
|
|
8876
|
-
const
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
c.value =
|
|
9231
|
+
function labelOf(field, value) {
|
|
9232
|
+
const hit = flattenOptions(optionsOf(field)).find((o) => String(o.value) === String(value));
|
|
9233
|
+
return hit ? String(hit.label) : String(value ?? "");
|
|
9234
|
+
}
|
|
9235
|
+
function setSingle(c, v) {
|
|
9236
|
+
c.value = v;
|
|
9237
|
+
c.valueText = v == null || v === "" ? "" : labelOf(c.field, v);
|
|
9238
|
+
emitList(list.value.slice());
|
|
9239
|
+
}
|
|
9240
|
+
function setMulti(c, v) {
|
|
9241
|
+
const arr = Array.isArray(v) ? v : [];
|
|
9242
|
+
c.value = arr;
|
|
9243
|
+
c.valueText = arr.map((x) => labelOf(c.field, x)).join("、");
|
|
8881
9244
|
emitList(list.value.slice());
|
|
8882
9245
|
}
|
|
8883
9246
|
function onOp(c, ev) {
|
|
@@ -8931,33 +9294,22 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8931
9294
|
placeholder: unref(t)("queryTo"),
|
|
8932
9295
|
onInput: ($event) => setVal(c, "value2", $event)
|
|
8933
9296
|
}, null, 40, ["type", "value", "placeholder", "onInput"]))
|
|
8934
|
-
], 64)) : c.operator === "in" ? (openBlock(),
|
|
9297
|
+
], 64)) : c.operator === "in" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
8935
9298
|
key: 1,
|
|
8936
|
-
class: "rj-query-
|
|
9299
|
+
class: "rj-query-select",
|
|
8937
9300
|
multiple: "",
|
|
8938
|
-
|
|
8939
|
-
|
|
8940
|
-
|
|
8941
|
-
(
|
|
8942
|
-
|
|
8943
|
-
key: String(o.value),
|
|
8944
|
-
value: o.value
|
|
8945
|
-
}, toDisplayString(o.label), 9, _hoisted_6$3);
|
|
8946
|
-
}), 128))
|
|
8947
|
-
], 40, _hoisted_5$3)) : kindOf(c.field) === "select" ? (openBlock(), createElementBlock("select", {
|
|
9301
|
+
options: optionsOf(c.field),
|
|
9302
|
+
"model-value": Array.isArray(c.value) ? c.value : [],
|
|
9303
|
+
placeholder: unref(t)("querySelect"),
|
|
9304
|
+
"onUpdate:modelValue": ($event) => setMulti(c, $event)
|
|
9305
|
+
}, null, 8, ["options", "model-value", "placeholder", "onUpdate:modelValue"])) : kindOf(c.field) === "select" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
8948
9306
|
key: 2,
|
|
8949
|
-
class: "rj-query-
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8953
|
-
|
|
8954
|
-
|
|
8955
|
-
return openBlock(), createElementBlock("option", {
|
|
8956
|
-
key: String(o.value),
|
|
8957
|
-
value: o.value
|
|
8958
|
-
}, toDisplayString(o.label), 9, _hoisted_9$2);
|
|
8959
|
-
}), 128))
|
|
8960
|
-
], 40, _hoisted_7$2)) : kindOf(c.field) === "number" ? (openBlock(), createElementBlock("input", {
|
|
9307
|
+
class: "rj-query-select",
|
|
9308
|
+
options: optionsOf(c.field),
|
|
9309
|
+
"model-value": c.value,
|
|
9310
|
+
placeholder: unref(t)("querySelect"),
|
|
9311
|
+
"onUpdate:modelValue": ($event) => setSingle(c, $event)
|
|
9312
|
+
}, null, 8, ["options", "model-value", "placeholder", "onUpdate:modelValue"])) : kindOf(c.field) === "number" ? (openBlock(), createElementBlock("input", {
|
|
8961
9313
|
key: 3,
|
|
8962
9314
|
class: "rj-query-val",
|
|
8963
9315
|
type: "number",
|
|
@@ -8965,7 +9317,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8965
9317
|
placeholder: unref(t)("queryInput"),
|
|
8966
9318
|
onInput: ($event) => setVal(c, "value", $event),
|
|
8967
9319
|
onKeyup: _cache[0] || (_cache[0] = withKeys(($event) => emit("search"), ["enter"]))
|
|
8968
|
-
}, null, 40,
|
|
9320
|
+
}, null, 40, _hoisted_5$3)) : (openBlock(), createElementBlock("input", {
|
|
8969
9321
|
key: 4,
|
|
8970
9322
|
class: "rj-query-val",
|
|
8971
9323
|
type: "text",
|
|
@@ -8973,12 +9325,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8973
9325
|
placeholder: unref(t)("queryInput"),
|
|
8974
9326
|
onInput: ($event) => setVal(c, "value", $event),
|
|
8975
9327
|
onKeyup: _cache[1] || (_cache[1] = withKeys(($event) => emit("search"), ["enter"]))
|
|
8976
|
-
}, null, 40,
|
|
9328
|
+
}, null, 40, _hoisted_6$3)),
|
|
8977
9329
|
createElementVNode("span", {
|
|
8978
9330
|
class: "rj-query-del",
|
|
8979
|
-
title: "
|
|
9331
|
+
title: unref(t)("queryRemove"),
|
|
8980
9332
|
onClick: ($event) => remove(i)
|
|
8981
|
-
}, "✕", 8,
|
|
9333
|
+
}, "✕", 8, _hoisted_7$2)
|
|
8982
9334
|
]);
|
|
8983
9335
|
}), 128)),
|
|
8984
9336
|
createElementVNode("select", {
|
|
@@ -8986,17 +9338,17 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
8986
9338
|
value: "",
|
|
8987
9339
|
onChange: _cache[2] || (_cache[2] = ($event) => add($event))
|
|
8988
9340
|
}, [
|
|
8989
|
-
createElementVNode("option",
|
|
9341
|
+
createElementVNode("option", _hoisted_8$2, "+ " + toDisplayString(unref(t)("queryAddField")), 1),
|
|
8990
9342
|
(openBlock(true), createElementBlock(Fragment, null, renderList(available.value, (f) => {
|
|
8991
9343
|
return openBlock(), createElementBlock("option", {
|
|
8992
9344
|
key: f.field,
|
|
8993
9345
|
value: f.field
|
|
8994
|
-
}, toDisplayString(f.title) + "(" + toDisplayString(kindText(f.kind)) + ") ", 9,
|
|
9346
|
+
}, toDisplayString(f.title) + "(" + toDisplayString(kindText(f.kind)) + ") ", 9, _hoisted_9$2);
|
|
8995
9347
|
}), 128)),
|
|
8996
|
-
!available.value.length ? (openBlock(), createElementBlock("option",
|
|
9348
|
+
!available.value.length ? (openBlock(), createElementBlock("option", _hoisted_10$2, toDisplayString(unref(t)("queryAllAdded")), 1)) : createCommentVNode("", true)
|
|
8997
9349
|
], 32),
|
|
8998
|
-
createElementVNode("span",
|
|
8999
|
-
createElementVNode("span",
|
|
9350
|
+
createElementVNode("span", _hoisted_11$2, [
|
|
9351
|
+
createElementVNode("span", _hoisted_12$2, [
|
|
9000
9352
|
createElementVNode("button", {
|
|
9001
9353
|
class: "rj-btn rj-btn-primary",
|
|
9002
9354
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("search"))
|
|
@@ -9006,8 +9358,8 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9006
9358
|
onClick: clearAll
|
|
9007
9359
|
}, toDisplayString(unref(t)("queryReset")), 1)
|
|
9008
9360
|
]),
|
|
9009
|
-
hasActions.value ? (openBlock(), createElementBlock("span",
|
|
9010
|
-
actionList.value.length ? (openBlock(), createElementBlock("span",
|
|
9361
|
+
hasActions.value ? (openBlock(), createElementBlock("span", _hoisted_13$2)) : createCommentVNode("", true),
|
|
9362
|
+
actionList.value.length ? (openBlock(), createElementBlock("span", _hoisted_14$2, [
|
|
9011
9363
|
(openBlock(true), createElementBlock(Fragment, null, renderList(actionList.value, (a, i) => {
|
|
9012
9364
|
return openBlock(), createElementBlock("button", {
|
|
9013
9365
|
key: i,
|
|
@@ -9019,10 +9371,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
9019
9371
|
createTextVNode(toDisplayString(a.icon), 1)
|
|
9020
9372
|
], 64)) : createCommentVNode("", true),
|
|
9021
9373
|
createTextVNode(toDisplayString(a.name), 1)
|
|
9022
|
-
], 10,
|
|
9374
|
+
], 10, _hoisted_15$2);
|
|
9023
9375
|
}), 128))
|
|
9024
9376
|
])) : createCommentVNode("", true),
|
|
9025
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("span",
|
|
9377
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("span", _hoisted_16$2, [
|
|
9026
9378
|
renderSlot(_ctx.$slots, "actions", { rows: selRows.value })
|
|
9027
9379
|
])) : createCommentVNode("", true)
|
|
9028
9380
|
])
|
|
@@ -9566,6 +9918,7 @@ function buildPrintHtml(input, opts = {}) {
|
|
|
9566
9918
|
const headBg = o.headerDark ? "#4472c4" : "#eef1f6";
|
|
9567
9919
|
const headColor = o.headerDark ? "#ffffff" : "#1f2329";
|
|
9568
9920
|
const zebraRule = o.zebra ? "tbody tr:nth-child(even) td{background:#f7f9fc}" : "";
|
|
9921
|
+
const rowBreakRule = input.matrix.length > 300 ? "tr { break-inside: auto; page-break-inside: auto; }" : "tr { page-break-inside: avoid; break-inside: avoid; }";
|
|
9569
9922
|
const style = `
|
|
9570
9923
|
@page { ${pageBox} margin: ${o.margins}mm; }
|
|
9571
9924
|
${o.pageNumbers ? `@page { @bottom-center { content: ${pageContentCss(o.pageNumberText)}; font-size: 10px; color: #999; } }` : ""}
|
|
@@ -9577,7 +9930,7 @@ body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", Arial, sans-se
|
|
|
9577
9930
|
.rj-print-sub { font-size: 12px; color: #666; margin: 0 0 10px; }
|
|
9578
9931
|
table { border-collapse: collapse; width: 100%; table-layout: ${o.scaleToFit ? "auto" : "fixed"}; font-size: 12px; }
|
|
9579
9932
|
thead { display: table-header-group; }
|
|
9580
|
-
|
|
9933
|
+
${rowBreakRule}
|
|
9581
9934
|
th, td { border: ${border}; padding: 4px 8px; text-align: left; vertical-align: top; word-break: break-word; }
|
|
9582
9935
|
thead th { background: ${headBg}; color: ${headColor}; font-weight: 600; text-align: center; }
|
|
9583
9936
|
${zebraRule}
|
|
@@ -9665,19 +10018,19 @@ const _hoisted_7 = {
|
|
|
9665
10018
|
};
|
|
9666
10019
|
const _hoisted_8 = { key: 0 };
|
|
9667
10020
|
const _hoisted_9 = ["onClick"];
|
|
9668
|
-
const _hoisted_10 = ["
|
|
9669
|
-
const _hoisted_11 = ["
|
|
9670
|
-
const _hoisted_12 = ["
|
|
9671
|
-
const _hoisted_13 = ["
|
|
10021
|
+
const _hoisted_10 = ["data-tip", "aria-label"];
|
|
10022
|
+
const _hoisted_11 = ["data-tip", "aria-label"];
|
|
10023
|
+
const _hoisted_12 = ["data-tip", "aria-label"];
|
|
10024
|
+
const _hoisted_13 = ["data-tip", "aria-label"];
|
|
9672
10025
|
const _hoisted_14 = {
|
|
9673
10026
|
key: 5,
|
|
9674
10027
|
class: "rj-export-group"
|
|
9675
10028
|
};
|
|
9676
|
-
const _hoisted_15 = ["
|
|
9677
|
-
const _hoisted_16 = ["
|
|
9678
|
-
const _hoisted_17 = ["
|
|
9679
|
-
const _hoisted_18 = ["
|
|
9680
|
-
const _hoisted_19 = ["
|
|
10029
|
+
const _hoisted_15 = ["data-tip"];
|
|
10030
|
+
const _hoisted_16 = ["data-tip"];
|
|
10031
|
+
const _hoisted_17 = ["data-tip"];
|
|
10032
|
+
const _hoisted_18 = ["data-tip"];
|
|
10033
|
+
const _hoisted_19 = ["data-tip", "aria-label"];
|
|
9681
10034
|
const _hoisted_20 = { style: { "display": "flex", "flex": "1", "min-height": "0" } };
|
|
9682
10035
|
const _hoisted_21 = ["role"];
|
|
9683
10036
|
const _hoisted_22 = ["aria-rowindex", "aria-selected", "data-rk"];
|
|
@@ -9829,6 +10182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9829
10182
|
exportRange: { default: "auto" },
|
|
9830
10183
|
serverExport: {},
|
|
9831
10184
|
exportFileName: {},
|
|
10185
|
+
printMaxRows: { default: 1e3 },
|
|
9832
10186
|
exportRawValues: { type: Boolean },
|
|
9833
10187
|
statusBar: { type: Boolean, default: true },
|
|
9834
10188
|
statusAggregations: { default: () => ["sum", "avg", "count", "min", "max"] },
|
|
@@ -9880,7 +10234,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9880
10234
|
if (!list || !list.length)
|
|
9881
10235
|
continue;
|
|
9882
10236
|
const labelMap = /* @__PURE__ */ new Map();
|
|
9883
|
-
for (const o of list)
|
|
10237
|
+
for (const o of flattenOptions(list))
|
|
9884
10238
|
labelMap.set(String(o.value), String(o.label));
|
|
9885
10239
|
m.set(colIdOf(col), { list, labelMap });
|
|
9886
10240
|
}
|
|
@@ -10225,6 +10579,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10225
10579
|
const quickPop = ref(null);
|
|
10226
10580
|
const quickInputRef = ref();
|
|
10227
10581
|
function toggleQuickPop(ev) {
|
|
10582
|
+
tip.value = null;
|
|
10228
10583
|
if (quickPop.value) {
|
|
10229
10584
|
quickPop.value = null;
|
|
10230
10585
|
return;
|
|
@@ -10789,7 +11144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
10789
11144
|
if (type === "select") {
|
|
10790
11145
|
const optList = colOptionList(col);
|
|
10791
11146
|
if (optList && optList.length) {
|
|
10792
|
-
unique = optList.map((o) => String(o.value));
|
|
11147
|
+
unique = flattenOptions(optList).map((o) => String(o.value));
|
|
10793
11148
|
} else {
|
|
10794
11149
|
unique = Array.from(
|
|
10795
11150
|
new Set(
|
|
@@ -12307,25 +12662,50 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12307
12662
|
}));
|
|
12308
12663
|
});
|
|
12309
12664
|
const menu = ref(null);
|
|
12310
|
-
|
|
12665
|
+
const tip = ref(null);
|
|
12666
|
+
function onTipOver(e) {
|
|
12667
|
+
var _a2, _b;
|
|
12668
|
+
const host = e.currentTarget;
|
|
12669
|
+
const el = (_b = (_a2 = e.target) == null ? void 0 : _a2.closest) == null ? void 0 : _b.call(_a2, "[data-tip]");
|
|
12670
|
+
if (!el || !host.contains(el))
|
|
12671
|
+
return;
|
|
12672
|
+
const r = el.getBoundingClientRect();
|
|
12673
|
+
tip.value = { text: el.getAttribute("data-tip") || "", x: r.right, y: r.bottom + 6 };
|
|
12674
|
+
}
|
|
12675
|
+
function onTipOut(e) {
|
|
12676
|
+
var _a2, _b;
|
|
12677
|
+
const el = (_b = (_a2 = e.target) == null ? void 0 : _a2.closest) == null ? void 0 : _b.call(_a2, "[data-tip]");
|
|
12678
|
+
const to = e.relatedTarget;
|
|
12679
|
+
if (el && to && el.contains(to))
|
|
12680
|
+
return;
|
|
12681
|
+
tip.value = null;
|
|
12682
|
+
}
|
|
12683
|
+
function openMenuAt(x, y, items, above, estW = 220) {
|
|
12311
12684
|
if (!items.length)
|
|
12312
12685
|
return;
|
|
12686
|
+
tip.value = null;
|
|
12313
12687
|
const est = items.length * 28 + 16;
|
|
12314
12688
|
const bottom = window.innerHeight - 8;
|
|
12689
|
+
const xc = Math.max(8, Math.min(x, window.innerWidth - estW - 8));
|
|
12315
12690
|
if (y + est <= bottom) {
|
|
12316
|
-
menu.value = { items, x, y, limit: bottom };
|
|
12691
|
+
menu.value = { items, x: xc, y, limit: bottom };
|
|
12317
12692
|
return;
|
|
12318
12693
|
}
|
|
12319
12694
|
const lim = (above ?? y) - 6;
|
|
12320
|
-
menu.value = { items, x, y: Math.max(8, (above ?? y) - est - 8), limit: lim };
|
|
12695
|
+
menu.value = { items, x: xc, y: Math.max(8, (above ?? y) - est - 8), limit: lim };
|
|
12321
12696
|
}
|
|
12322
|
-
function onMenuReposition(h2) {
|
|
12697
|
+
function onMenuReposition(h2, w) {
|
|
12323
12698
|
const m = menu.value;
|
|
12324
12699
|
if (!m)
|
|
12325
12700
|
return;
|
|
12326
12701
|
const lim = m.limit ?? window.innerHeight - 8;
|
|
12702
|
+
const next = { ...m };
|
|
12327
12703
|
if (m.y + h2 > lim)
|
|
12328
|
-
|
|
12704
|
+
next.y = Math.max(8, lim - h2);
|
|
12705
|
+
if (w && m.x + w > window.innerWidth - 8)
|
|
12706
|
+
next.x = Math.max(8, window.innerWidth - 8 - w);
|
|
12707
|
+
if (next.y !== m.y || next.x !== m.x)
|
|
12708
|
+
menu.value = next;
|
|
12329
12709
|
}
|
|
12330
12710
|
function onMenuSelect(item) {
|
|
12331
12711
|
var _a2;
|
|
@@ -12363,7 +12743,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12363
12743
|
if (type === "select") {
|
|
12364
12744
|
const optList = colOptionList(col);
|
|
12365
12745
|
if (optList && optList.length) {
|
|
12366
|
-
unique = optList.map((o) => String(o.value));
|
|
12746
|
+
unique = flattenOptions(optList).map((o) => String(o.value));
|
|
12367
12747
|
} else {
|
|
12368
12748
|
unique = Array.from(
|
|
12369
12749
|
new Set(
|
|
@@ -12607,7 +12987,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12607
12987
|
{ isSeparator: true },
|
|
12608
12988
|
{ name: t("scopeServer"), action: () => callServerExport(fmt) }
|
|
12609
12989
|
);
|
|
12610
|
-
|
|
12990
|
+
const el = ev.currentTarget;
|
|
12991
|
+
const r = el.getBoundingClientRect();
|
|
12992
|
+
openMenuAt(r.left, r.bottom + 6, items, r.top);
|
|
12611
12993
|
}
|
|
12612
12994
|
function runFormat(fmt, scope) {
|
|
12613
12995
|
if (fmt === "print")
|
|
@@ -12727,7 +13109,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12727
13109
|
return v.join(" ");
|
|
12728
13110
|
return displayOf(col, v, row, 0);
|
|
12729
13111
|
}
|
|
12730
|
-
function buildPrintInput(params) {
|
|
13112
|
+
function buildPrintInput(params, limit = 0) {
|
|
12731
13113
|
const cols = exportColumnsOf(params);
|
|
12732
13114
|
const columns = cols.map((c) => {
|
|
12733
13115
|
var _a2;
|
|
@@ -12739,26 +13121,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12739
13121
|
});
|
|
12740
13122
|
const matrix = [];
|
|
12741
13123
|
const rowStyles = [];
|
|
13124
|
+
const capped = limit > 0;
|
|
13125
|
+
const full = () => capped && matrix.length >= limit;
|
|
12742
13126
|
const pushRow = (d, kind) => {
|
|
12743
13127
|
matrix.push(cols.map((c) => printTextOf(c, d.data)));
|
|
12744
13128
|
rowStyles.push(kind);
|
|
12745
13129
|
};
|
|
12746
13130
|
const scope = scopeOf(params);
|
|
12747
13131
|
if (scope === "view") {
|
|
12748
|
-
rowModel.processed.value.displayRows
|
|
13132
|
+
for (const d of rowModel.processed.value.displayRows) {
|
|
13133
|
+
if (full())
|
|
13134
|
+
break;
|
|
12749
13135
|
if (d.type === "group" && !d.isFooter)
|
|
12750
13136
|
pushRow(d, 1);
|
|
12751
13137
|
else if (d.type === "row")
|
|
12752
13138
|
pushRow(d, 0);
|
|
12753
|
-
}
|
|
13139
|
+
}
|
|
12754
13140
|
} else {
|
|
12755
|
-
pickExportRows(scope, exportRowSource(), false)
|
|
13141
|
+
for (const r of pickExportRows(scope, exportRowSource(), false)) {
|
|
13142
|
+
if (full())
|
|
13143
|
+
break;
|
|
12756
13144
|
matrix.push(cols.map((c) => printTextOf(c, r)));
|
|
12757
13145
|
rowStyles.push(0);
|
|
12758
|
-
}
|
|
13146
|
+
}
|
|
12759
13147
|
}
|
|
12760
13148
|
const srow = rowModel.summaryRow.value;
|
|
12761
|
-
if (scope === "view" && props.showSummary && srow) {
|
|
13149
|
+
if (scope === "view" && props.showSummary && srow && !full()) {
|
|
12762
13150
|
matrix.push(
|
|
12763
13151
|
cols.map((c) => {
|
|
12764
13152
|
const raw = srow[colIdOf(c)] ?? cellRawValue(c, srow);
|
|
@@ -12796,8 +13184,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12796
13184
|
warnIfLoadedOnly(scopeOf(params));
|
|
12797
13185
|
withExportBusy(() => runPrint(params));
|
|
12798
13186
|
}
|
|
13187
|
+
function printRowEstimate(scope) {
|
|
13188
|
+
if (scope === "view")
|
|
13189
|
+
return rowModel.processed.value.displayRows.reduce(
|
|
13190
|
+
(n, d) => n + (d.type === "row" || d.type === "group" && !d.isFooter ? 1 : 0),
|
|
13191
|
+
0
|
|
13192
|
+
);
|
|
13193
|
+
return pickExportRows(scope, exportRowSource(), false).length;
|
|
13194
|
+
}
|
|
12799
13195
|
function runPrint(params) {
|
|
12800
|
-
|
|
13196
|
+
const cap = props.printMaxRows;
|
|
13197
|
+
const total = printRowEstimate(scopeOf(params));
|
|
13198
|
+
const limit = cap > 0 && total > cap ? cap : 0;
|
|
13199
|
+
const input = buildPrintInput(params, limit);
|
|
13200
|
+
if (limit)
|
|
13201
|
+
showToast(t("printCap", { n: cap, total }));
|
|
13202
|
+
printHtml(input, printOpts(params));
|
|
12801
13203
|
}
|
|
12802
13204
|
const rowGroupPayload = computed(() => {
|
|
12803
13205
|
void aggRev.value;
|
|
@@ -12993,7 +13395,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
12993
13395
|
strictOptions = true;
|
|
12994
13396
|
} else if (resolvedOpts && resolvedOpts.length) {
|
|
12995
13397
|
filterType = "select";
|
|
12996
|
-
options = resolvedOpts.map((o) => String(o.label ?? o.value));
|
|
13398
|
+
options = flattenOptions(resolvedOpts).map((o) => String(o.label ?? o.value));
|
|
12997
13399
|
strictOptions = true;
|
|
12998
13400
|
} else if (filterType === "select") {
|
|
12999
13401
|
const set = /* @__PURE__ */ new Set();
|
|
@@ -13292,6 +13694,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13292
13694
|
scheduleSave();
|
|
13293
13695
|
dispatchEvent("columnEverythingChanged", {});
|
|
13294
13696
|
},
|
|
13697
|
+
/** 清除宽度覆盖:把列宽还原到列定义/内容自适应默认值(配合 autoSizeAll 做「自适应↔还原」切换) */
|
|
13698
|
+
resetColumnWidths: () => {
|
|
13699
|
+
colState.clearWidths();
|
|
13700
|
+
applyDefaultAutoWidths();
|
|
13701
|
+
scheduleSave();
|
|
13702
|
+
dispatchEvent("columnEverythingChanged", {});
|
|
13703
|
+
},
|
|
13295
13704
|
// 主题 / i18n(运行时切换)
|
|
13296
13705
|
setTheme: (params) => {
|
|
13297
13706
|
themeState.value = { ...params };
|
|
@@ -13461,7 +13870,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13461
13870
|
selection.size ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(t("selRows", { n: selection.size })), 1)) : createCommentVNode("", true)
|
|
13462
13871
|
]),
|
|
13463
13872
|
createElementVNode("div", _hoisted_5, [
|
|
13464
|
-
pagerAtTop.value ? (openBlock(), createBlock(_sfc_main$
|
|
13873
|
+
pagerAtTop.value ? (openBlock(), createBlock(_sfc_main$7, {
|
|
13465
13874
|
key: 0,
|
|
13466
13875
|
class: "rj-pager-inline",
|
|
13467
13876
|
variant: "top",
|
|
@@ -13533,18 +13942,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13533
13942
|
onDragover: _cache[21] || (_cache[21] = withModifiers(() => {
|
|
13534
13943
|
}, ["stop"])),
|
|
13535
13944
|
onDrop: _cache[22] || (_cache[22] = withModifiers(() => {
|
|
13536
|
-
}, ["stop"]))
|
|
13945
|
+
}, ["stop"])),
|
|
13946
|
+
onPointerover: onTipOver,
|
|
13947
|
+
onPointerout: onTipOut,
|
|
13948
|
+
onFocusin: onTipOver,
|
|
13949
|
+
onFocusout: onTipOut
|
|
13537
13950
|
}, [
|
|
13538
13951
|
_ctx.quickFilterEnabled ? (openBlock(), createElementBlock("button", {
|
|
13539
13952
|
key: 0,
|
|
13540
13953
|
class: normalizeClass(["rj-btn rj-tool-btn rj-quick-btn", { "is-active": !!unref(rowModel).quickFilter.value }]),
|
|
13541
|
-
|
|
13954
|
+
"data-tip": t("quickBtn"),
|
|
13955
|
+
"aria-label": t("quickBtn"),
|
|
13542
13956
|
onClick: _cache[9] || (_cache[9] = ($event) => toggleQuickPop($event))
|
|
13543
13957
|
}, "🔍", 10, _hoisted_10)) : createCommentVNode("", true),
|
|
13544
13958
|
_ctx.viewable ? (openBlock(), createElementBlock("button", {
|
|
13545
13959
|
key: 1,
|
|
13546
13960
|
class: normalizeClass(["rj-btn rj-tool-btn rj-view-btn", { "is-active": !!currentViewId.value }]),
|
|
13547
|
-
|
|
13961
|
+
"data-tip": t("viewBtn"),
|
|
13962
|
+
"aria-label": t("viewBtn"),
|
|
13548
13963
|
onClick: _cache[10] || (_cache[10] = ($event) => openViewMenu($event))
|
|
13549
13964
|
}, "◈", 10, _hoisted_11)) : createCommentVNode("", true),
|
|
13550
13965
|
showExpandCollapse.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
@@ -13564,12 +13979,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13564
13979
|
}, toDisplayString(t("chart")), 1)) : createCommentVNode("", true),
|
|
13565
13980
|
createElementVNode("button", {
|
|
13566
13981
|
class: "rj-btn",
|
|
13567
|
-
|
|
13982
|
+
"data-tip": t("density") + " · " + DENSITY_LABELS.value[densityIdx.value],
|
|
13983
|
+
"aria-label": t("density"),
|
|
13568
13984
|
onClick: _cache[14] || (_cache[14] = ($event) => densityIdx.value = (densityIdx.value + 1) % 3)
|
|
13569
13985
|
}, toDisplayString(["▤", "☰", "▥"][densityIdx.value]), 9, _hoisted_12),
|
|
13570
13986
|
createElementVNode("button", {
|
|
13571
13987
|
class: "rj-btn",
|
|
13572
|
-
|
|
13988
|
+
"data-tip": dark.value ? t("toLight") : t("toDark"),
|
|
13989
|
+
"aria-label": dark.value ? t("toLight") : t("toDark"),
|
|
13573
13990
|
onClick: _cache[15] || (_cache[15] = ($event) => toggleDark())
|
|
13574
13991
|
}, toDisplayString(dark.value ? "☀" : "🌙"), 9, _hoisted_13),
|
|
13575
13992
|
_ctx.toolPanel ? (openBlock(), createElementBlock("button", {
|
|
@@ -13580,29 +13997,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13580
13997
|
_ctx.exportable ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
13581
13998
|
createElementVNode("button", {
|
|
13582
13999
|
class: "rj-btn rj-btn-export rj-export-btn",
|
|
13583
|
-
|
|
14000
|
+
"data-tip": t("printTip"),
|
|
13584
14001
|
onClick: _cache[17] || (_cache[17] = ($event) => openRangeMenu($event, "print"))
|
|
13585
14002
|
}, toDisplayString(t("printBtn")), 9, _hoisted_15),
|
|
13586
14003
|
createElementVNode("button", {
|
|
13587
14004
|
class: "rj-btn rj-btn-export rj-export-btn",
|
|
13588
|
-
|
|
14005
|
+
"data-tip": t("csvTip"),
|
|
13589
14006
|
onClick: _cache[18] || (_cache[18] = ($event) => openRangeMenu($event, "csv"))
|
|
13590
14007
|
}, " CSV ", 8, _hoisted_16),
|
|
13591
14008
|
createElementVNode("button", {
|
|
13592
14009
|
class: "rj-btn rj-btn-export rj-export-btn",
|
|
13593
|
-
|
|
14010
|
+
"data-tip": t("pdfTip"),
|
|
13594
14011
|
onClick: _cache[19] || (_cache[19] = ($event) => openRangeMenu($event, "pdf"))
|
|
13595
14012
|
}, " PDF ", 8, _hoisted_17),
|
|
13596
14013
|
createElementVNode("button", {
|
|
13597
14014
|
class: "rj-btn rj-btn-export rj-export-btn",
|
|
13598
|
-
|
|
14015
|
+
"data-tip": t("excelTip"),
|
|
13599
14016
|
onClick: _cache[20] || (_cache[20] = ($event) => openRangeMenu($event, "excel"))
|
|
13600
14017
|
}, " Excel ", 8, _hoisted_18)
|
|
13601
14018
|
])) : createCommentVNode("", true),
|
|
13602
14019
|
_ctx.stateKey ? (openBlock(), createElementBlock("button", {
|
|
13603
14020
|
key: 6,
|
|
13604
14021
|
class: "rj-btn",
|
|
13605
|
-
|
|
14022
|
+
"data-tip": t("resetState"),
|
|
14023
|
+
"aria-label": t("resetState"),
|
|
13606
14024
|
onClick: resetState
|
|
13607
14025
|
}, "↺", 8, _hoisted_19)) : createCommentVNode("", true)
|
|
13608
14026
|
], 32)) : createCommentVNode("", true)
|
|
@@ -13616,7 +14034,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13616
14034
|
class: "rj-header",
|
|
13617
14035
|
style: normalizeStyle({ height: headerTotalHeight.value + frowH.value + "px" })
|
|
13618
14036
|
}, [
|
|
13619
|
-
createVNode(_sfc_main$
|
|
14037
|
+
createVNode(_sfc_main$i, {
|
|
13620
14038
|
"level-cells": levelCells.value,
|
|
13621
14039
|
"total-width": layout.value.totalWidth,
|
|
13622
14040
|
"scroll-left": scrollLeft.value,
|
|
@@ -13646,7 +14064,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13646
14064
|
style: normalizeStyle(headerClipStyle("left")),
|
|
13647
14065
|
"aria-hidden": "true"
|
|
13648
14066
|
}, [
|
|
13649
|
-
createVNode(_sfc_main$
|
|
14067
|
+
createVNode(_sfc_main$i, {
|
|
13650
14068
|
"level-cells": levelCells.value,
|
|
13651
14069
|
"total-width": layout.value.totalWidth,
|
|
13652
14070
|
"scroll-left": 0,
|
|
@@ -13675,7 +14093,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13675
14093
|
style: normalizeStyle(headerClipStyle("right")),
|
|
13676
14094
|
"aria-hidden": "true"
|
|
13677
14095
|
}, [
|
|
13678
|
-
createVNode(_sfc_main$
|
|
14096
|
+
createVNode(_sfc_main$i, {
|
|
13679
14097
|
"level-cells": levelCells.value,
|
|
13680
14098
|
"total-width": layout.value.totalWidth,
|
|
13681
14099
|
"scroll-left": Math.max(layout.value.totalWidth - layout.value.rightWidth, 0),
|
|
@@ -13738,7 +14156,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13738
14156
|
[vShow, isHoverRow(vr.row)]
|
|
13739
14157
|
]),
|
|
13740
14158
|
vr.row.type === "row" || vr.row.type === "group" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(cellsOf(vr.row, vr.i, windowLeaves.value), (cell) => {
|
|
13741
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14159
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
13742
14160
|
key: cell.leaf.colId,
|
|
13743
14161
|
ref_for: true
|
|
13744
14162
|
}, cellProps(cell, vr), {
|
|
@@ -13826,7 +14244,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13826
14244
|
[vShow, isHoverRow(vr.row)]
|
|
13827
14245
|
]),
|
|
13828
14246
|
vr.row.type === "row" || vr.row.type === "group" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(cellsOf(vr.row, vr.i, layout.value.leftLeaves), (cell) => {
|
|
13829
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14247
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
13830
14248
|
key: cell.leaf.colId,
|
|
13831
14249
|
ref_for: true
|
|
13832
14250
|
}, cellProps(cell, vr, "left"), {
|
|
@@ -13878,7 +14296,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13878
14296
|
[vShow, isHoverRow(vr.row)]
|
|
13879
14297
|
]),
|
|
13880
14298
|
vr.row.type === "row" || vr.row.type === "group" ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(cellsOf(vr.row, vr.i, layout.value.rightLeaves), (cell) => {
|
|
13881
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14299
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
13882
14300
|
key: cell.leaf.colId,
|
|
13883
14301
|
ref_for: true
|
|
13884
14302
|
}, cellProps(cell, vr, "right"), {
|
|
@@ -13958,7 +14376,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13958
14376
|
})
|
|
13959
14377
|
}, [
|
|
13960
14378
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pinCells(prow), (cell) => {
|
|
13961
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14379
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
13962
14380
|
key: cell.leaf.colId,
|
|
13963
14381
|
ref_for: true
|
|
13964
14382
|
}, cellProps(cell, { row: pinnedAsDisplay(prow), i: -1 }), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -13981,7 +14399,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13981
14399
|
})
|
|
13982
14400
|
}, [
|
|
13983
14401
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pinCellsSide(prow, side.leaves), (cell) => {
|
|
13984
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14402
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
13985
14403
|
key: cell.leaf.colId,
|
|
13986
14404
|
ref_for: true
|
|
13987
14405
|
}, cellProps(cell, { row: pinnedAsDisplay(prow), i: -1 }), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -14003,7 +14421,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14003
14421
|
})
|
|
14004
14422
|
}, [
|
|
14005
14423
|
(openBlock(true), createElementBlock(Fragment, null, renderList(gridCols.value, (leaf) => {
|
|
14006
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14424
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
14007
14425
|
key: leaf.colId,
|
|
14008
14426
|
ref_for: true
|
|
14009
14427
|
}, pinRowCellProps(leaf, unref(rowModel).summaryRow.value, true), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -14026,7 +14444,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14026
14444
|
})
|
|
14027
14445
|
}, [
|
|
14028
14446
|
(openBlock(true), createElementBlock(Fragment, null, renderList(side.leaves, (leaf) => {
|
|
14029
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14447
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
14030
14448
|
key: leaf.colId,
|
|
14031
14449
|
ref_for: true
|
|
14032
14450
|
}, pinRowCellProps(leaf, unref(rowModel).summaryRow.value, true), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -14051,7 +14469,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14051
14469
|
})
|
|
14052
14470
|
}, [
|
|
14053
14471
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pinCells(prow), (cell) => {
|
|
14054
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14472
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
14055
14473
|
key: cell.leaf.colId,
|
|
14056
14474
|
ref_for: true
|
|
14057
14475
|
}, cellProps(cell, { row: pinnedAsDisplay(prow), i: -1 }), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -14074,7 +14492,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14074
14492
|
})
|
|
14075
14493
|
}, [
|
|
14076
14494
|
(openBlock(true), createElementBlock(Fragment, null, renderList(pinCellsSide(prow, side.leaves), (cell) => {
|
|
14077
|
-
return openBlock(), createBlock(_sfc_main$
|
|
14495
|
+
return openBlock(), createBlock(_sfc_main$e, mergeProps({
|
|
14078
14496
|
key: cell.leaf.colId,
|
|
14079
14497
|
ref_for: true
|
|
14080
14498
|
}, cellProps(cell, { row: pinnedAsDisplay(prow), i: -1 }), { "grid-slots": _ctx.$slots }), null, 16, ["grid-slots"]);
|
|
@@ -14086,7 +14504,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14086
14504
|
}), 128)),
|
|
14087
14505
|
_ctx.dataMode === "infinite" && unref(rowModel).loadingMore.value ? (openBlock(), createElementBlock("div", _hoisted_38, toDisplayString(t("loadMore")), 1)) : createCommentVNode("", true)
|
|
14088
14506
|
], 8, _hoisted_21),
|
|
14089
|
-
_ctx.toolPanel && panelOpen.value ? (openBlock(), createBlock(_sfc_main$
|
|
14507
|
+
_ctx.toolPanel && panelOpen.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
14090
14508
|
key: 0,
|
|
14091
14509
|
"leaf-list": panelLeaves.value,
|
|
14092
14510
|
"pivot-leaf-list": panelCandidateLeaves.value,
|
|
@@ -14111,7 +14529,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14111
14529
|
}, null, 8, ["leaf-list", "pivot-leaf-list", "pivot-value-default", "grouped-fields", "pivot", "filters", "quick-filter"])) : createCommentVNode("", true)
|
|
14112
14530
|
]),
|
|
14113
14531
|
pagerAtBottom.value ? (openBlock(), createElementBlock("div", _hoisted_39, [
|
|
14114
|
-
createVNode(_sfc_main$
|
|
14532
|
+
createVNode(_sfc_main$7, {
|
|
14115
14533
|
page: pagerPage.value,
|
|
14116
14534
|
"onUpdate:page": _cache[41] || (_cache[41] = ($event) => pagerPage.value = $event),
|
|
14117
14535
|
"page-size": pagerSize.value,
|
|
@@ -14147,7 +14565,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14147
14565
|
rangeStats.value.perCol.length > 6 ? (openBlock(), createElementBlock("span", _hoisted_48, toDisplayString(t("moreCols", { n: rangeStats.value.perCol.length - 6 })), 1)) : createCommentVNode("", true)
|
|
14148
14566
|
])) : createCommentVNode("", true)
|
|
14149
14567
|
])) : createCommentVNode("", true),
|
|
14150
|
-
filterMenu.value ? (openBlock(), createBlock(_sfc_main$
|
|
14568
|
+
filterMenu.value ? (openBlock(), createBlock(_sfc_main$d, {
|
|
14151
14569
|
key: 6,
|
|
14152
14570
|
column: filterMenu.value.col,
|
|
14153
14571
|
"filter-type": filterMenu.value.type,
|
|
@@ -14159,7 +14577,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14159
14577
|
onClear: clearFilterMenu,
|
|
14160
14578
|
onAdvanced: openAdvancedFilter
|
|
14161
14579
|
}, null, 8, ["column", "filter-type", "model", "x", "y", "unique-values"])) : createCommentVNode("", true),
|
|
14162
|
-
advDialog.value ? (openBlock(), createBlock(_sfc_main$
|
|
14580
|
+
advDialog.value ? (openBlock(), createBlock(_sfc_main$b, {
|
|
14163
14581
|
key: 7,
|
|
14164
14582
|
model: unref(rowModel).advancedFilter.value,
|
|
14165
14583
|
columns: advFilterColumns.value,
|
|
@@ -14169,16 +14587,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14169
14587
|
onClear: clearAdvancedFilter,
|
|
14170
14588
|
onClose: _cache[43] || (_cache[43] = ($event) => advDialog.value = null)
|
|
14171
14589
|
}, null, 8, ["model", "columns", "x", "y"])) : createCommentVNode("", true),
|
|
14172
|
-
|
|
14590
|
+
tip.value ? (openBlock(), createElementBlock("div", {
|
|
14173
14591
|
key: 8,
|
|
14592
|
+
class: "rj-tip",
|
|
14593
|
+
role: "tooltip",
|
|
14594
|
+
style: normalizeStyle({ left: tip.value.x + "px", top: tip.value.y + "px" })
|
|
14595
|
+
}, toDisplayString(tip.value.text), 5)) : createCommentVNode("", true),
|
|
14596
|
+
menu.value ? (openBlock(), createBlock(_sfc_main$a, {
|
|
14597
|
+
key: 9,
|
|
14174
14598
|
items: menu.value.items,
|
|
14175
14599
|
x: menu.value.x,
|
|
14176
14600
|
y: menu.value.y,
|
|
14177
14601
|
onSelect: onMenuSelect,
|
|
14178
14602
|
onReposition: onMenuReposition
|
|
14179
14603
|
}, null, 8, ["items", "x", "y"])) : createCommentVNode("", true),
|
|
14180
|
-
colMenu.value ? (openBlock(), createBlock(_sfc_main$
|
|
14181
|
-
key:
|
|
14604
|
+
colMenu.value ? (openBlock(), createBlock(_sfc_main$9, {
|
|
14605
|
+
key: 10,
|
|
14182
14606
|
col: colMenu.value.col,
|
|
14183
14607
|
"col-id": colMenu.value.colId,
|
|
14184
14608
|
x: colMenu.value.x,
|
|
@@ -14205,14 +14629,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14205
14629
|
onToggleColPin: colMenuToggleColPin,
|
|
14206
14630
|
onColDrop
|
|
14207
14631
|
}, null, 8, ["col", "col-id", "x", "y", "can-sort", "can-filter", "can-group", "sort-dir", "pinned", "filter-type", "filter-model", "unique-values", "columns"])) : createCommentVNode("", true),
|
|
14208
|
-
chartOpen.value ? (openBlock(), createBlock(_sfc_main$
|
|
14209
|
-
key:
|
|
14632
|
+
chartOpen.value ? (openBlock(), createBlock(_sfc_main$6, {
|
|
14633
|
+
key: 11,
|
|
14210
14634
|
columns: pipelineCols.value,
|
|
14211
14635
|
rows: chartRows.value,
|
|
14212
14636
|
onClose: _cache[44] || (_cache[44] = ($event) => chartOpen.value = false)
|
|
14213
14637
|
}, null, 8, ["columns", "rows"])) : createCommentVNode("", true),
|
|
14214
14638
|
rowFormDlg.value ? (openBlock(), createBlock(_sfc_main$3, {
|
|
14215
|
-
key:
|
|
14639
|
+
key: 12,
|
|
14216
14640
|
fields: rowFormDlg.value.fields,
|
|
14217
14641
|
rows: rowFormDlg.value.rows,
|
|
14218
14642
|
mode: rowFormDlg.value.mode,
|
|
@@ -14222,13 +14646,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14222
14646
|
onClose: _cache[45] || (_cache[45] = ($event) => rowFormDlg.value = null)
|
|
14223
14647
|
}, null, 8, ["fields", "rows", "mode", "title", "width"])) : createCommentVNode("", true),
|
|
14224
14648
|
confirmDlg.value ? (openBlock(), createBlock(_sfc_main$2, {
|
|
14225
|
-
key:
|
|
14649
|
+
key: 13,
|
|
14226
14650
|
message: confirmDlg.value.message,
|
|
14227
14651
|
onOk: onConfirmOk,
|
|
14228
14652
|
onCancel: _cache[46] || (_cache[46] = ($event) => confirmDlg.value = null)
|
|
14229
14653
|
}, null, 8, ["message"])) : createCommentVNode("", true),
|
|
14230
14654
|
dragGhost.value ? (openBlock(), createElementBlock("div", {
|
|
14231
|
-
key:
|
|
14655
|
+
key: 14,
|
|
14232
14656
|
ref_key: "dragGhostRef",
|
|
14233
14657
|
ref: dragGhostRef,
|
|
14234
14658
|
class: "rj-drag-ghost",
|
|
@@ -14249,7 +14673,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14249
14673
|
!dragGhost.value.cells.length ? (openBlock(), createElementBlock("span", _hoisted_51, toDisplayString(t("dragRow")), 1)) : createCommentVNode("", true)
|
|
14250
14674
|
], 4)) : createCommentVNode("", true),
|
|
14251
14675
|
imgPreview.value ? (openBlock(), createElementBlock("div", {
|
|
14252
|
-
key:
|
|
14676
|
+
key: 15,
|
|
14253
14677
|
class: "rj-img-viewer",
|
|
14254
14678
|
role: "dialog",
|
|
14255
14679
|
"aria-modal": "true",
|