bw-pro-table 0.0.4 → 0.0.5
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/dist/bw-pro-table.js
CHANGED
|
@@ -4421,20 +4421,24 @@ var $s = ({ value: e, column: t }) => {
|
|
|
4421
4421
|
color: "#ff4d4f",
|
|
4422
4422
|
fontSize: "16px"
|
|
4423
4423
|
} });
|
|
4424
|
-
}, ec =
|
|
4425
|
-
|
|
4426
|
-
|
|
4424
|
+
}, ec = ({ value: e, column: t }) => {
|
|
4425
|
+
if (na.has(e) || e === "") return t.emptyText ?? "-";
|
|
4426
|
+
let n = t.dateTimeFormat ?? t.dateFormat ?? "YYYY-MM-DD HH:mm:ss", r = qe(e);
|
|
4427
|
+
return r.isValid() ? r.format(n) : t.emptyText ?? "-";
|
|
4428
|
+
}, tc = !1;
|
|
4429
|
+
function nc() {
|
|
4430
|
+
tc ||= (ja("text", Fa), ja("number", La), ja("date", Ra), ja("tag", za), ja("enum", za), ja("image", Ba), ja("link", Ls), ja("progress", Rs), ja("avatar", Bs), ja("action", Vs), ja("index", Hs), ja("currency", Ws), ja("boolean", $s), ja("dateTime", ec), !0);
|
|
4427
4431
|
}
|
|
4428
|
-
var
|
|
4429
|
-
function
|
|
4430
|
-
return
|
|
4432
|
+
var rc = nc;
|
|
4433
|
+
function ic(e) {
|
|
4434
|
+
return nc(), Ma(e);
|
|
4431
4435
|
}
|
|
4432
|
-
function
|
|
4433
|
-
|
|
4436
|
+
function ac() {
|
|
4437
|
+
tc = !1, Pa();
|
|
4434
4438
|
}
|
|
4435
4439
|
//#endregion
|
|
4436
4440
|
//#region BwProTableColumnSearch.vue?vue&type=script&setup=true&lang.ts
|
|
4437
|
-
var
|
|
4441
|
+
var oc = { class: "bw-pro-table-column-search" }, sc = { class: "bw-pro-table-column-search-input" }, cc = { class: "bw-pro-table-column-search-actions" }, lc = /*@__PURE__*/ d({
|
|
4438
4442
|
__name: "BwProTableColumnSearch",
|
|
4439
4443
|
props: {
|
|
4440
4444
|
dataIndex: {},
|
|
@@ -4472,7 +4476,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4472
4476
|
}
|
|
4473
4477
|
return (e, t) => {
|
|
4474
4478
|
let n = A("a-input"), r = A("a-button"), i = A("a-space");
|
|
4475
|
-
return O(), o("div",
|
|
4479
|
+
return O(), o("div", oc, [s("div", sc, [u(n, {
|
|
4476
4480
|
value: d.value,
|
|
4477
4481
|
"onUpdate:value": t[0] ||= (e) => d.value = e,
|
|
4478
4482
|
placeholder: f.value,
|
|
@@ -4482,7 +4486,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4482
4486
|
}, {
|
|
4483
4487
|
prefix: N(() => [u(M(He))]),
|
|
4484
4488
|
_: 1
|
|
4485
|
-
}, 8, ["value", "placeholder"])]), s("div",
|
|
4489
|
+
}, 8, ["value", "placeholder"])]), s("div", cc, [u(i, null, {
|
|
4486
4490
|
default: N(() => [u(r, {
|
|
4487
4491
|
type: "primary",
|
|
4488
4492
|
size: "small",
|
|
@@ -4501,11 +4505,11 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4501
4505
|
})])]);
|
|
4502
4506
|
};
|
|
4503
4507
|
}
|
|
4504
|
-
}),
|
|
4508
|
+
}), uc = (e, t) => {
|
|
4505
4509
|
let n = e.__vccOpts || e;
|
|
4506
4510
|
for (let [e, r] of t) n[e] = r;
|
|
4507
4511
|
return n;
|
|
4508
|
-
},
|
|
4512
|
+
}, dc = /*#__PURE__*/ uc(lc, [["__scopeId", "data-v-06f12966"]]), fc = ["draggable"], pc = /* @__PURE__ */ d({
|
|
4509
4513
|
__name: "drag-icon",
|
|
4510
4514
|
props: { draggable: {
|
|
4511
4515
|
type: Boolean,
|
|
@@ -4540,18 +4544,18 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4540
4544
|
stroke: "none"
|
|
4541
4545
|
},
|
|
4542
4546
|
d: "M 5 4.003906 C 5 3.449219 5.449219 3 6.003906 3 C 6.558594 3 7.007812 3.449219 7.007812 4.003906 C 7.007812 4.558594 6.558594 5.007812 6.003906 5.007812 C 5.449219 5.007812 5 4.558594 5 4.003906 Z M 5 8.25 C 5 7.695312 5.449219 7.246094 6.003906 7.246094 C 6.558594 7.246094 7.007812 7.695312 7.007812 8.25 C 7.007812 8.804688 6.558594 9.253906 6.003906 9.253906 C 5.449219 9.253906 5 8.804688 5 8.25 Z M 5 12.496094 C 5 11.941406 5.449219 11.492188 6.003906 11.492188 C 6.558594 11.492188 7.007812 11.941406 7.007812 12.496094 C 7.007812 13.050781 6.558594 13.5 6.003906 13.5 C 5.449219 13.5 5 13.050781 5 12.496094 Z M 9.554688 4.003906 C 9.554688 3.449219 10.003906 3 10.558594 3 C 11.113281 3 11.5625 3.449219 11.5625 4.003906 C 11.5625 4.558594 11.113281 5.007812 10.558594 5.007812 C 10.003906 5.007812 9.554688 4.558594 9.554688 4.003906 Z M 9.554688 8.25 C 9.554688 7.695312 10.003906 7.246094 10.558594 7.246094 C 11.113281 7.246094 11.5625 7.695312 11.5625 8.25 C 11.5625 8.804688 11.113281 9.253906 10.558594 9.253906 C 10.003906 9.253906 9.554688 8.804688 9.554688 8.25 Z M 9.554688 12.496094 C 9.554688 11.941406 10.003906 11.492188 10.558594 11.492188 C 11.113281 11.492188 11.5625 11.941406 11.5625 12.496094 C 11.5625 13.050781 11.113281 13.5 10.558594 13.5 C 10.003906 13.5 9.554688 13.050781 9.554688 12.496094 Z M 9.554688 12.496094 "
|
|
4543
|
-
})])], -1)]], 44,
|
|
4547
|
+
})])], -1)]], 44, fc));
|
|
4544
4548
|
}
|
|
4545
|
-
}),
|
|
4549
|
+
}), mc = {
|
|
4546
4550
|
class: "bw-pro-table-core",
|
|
4547
4551
|
"data-bw-table-core": ""
|
|
4548
|
-
},
|
|
4552
|
+
}, hc = {
|
|
4549
4553
|
key: 0,
|
|
4550
4554
|
class: "bw-pro-table-header-cell"
|
|
4551
|
-
},
|
|
4555
|
+
}, gc = { class: "bw-pro-table-header-left" }, _c = {
|
|
4552
4556
|
key: 1,
|
|
4553
4557
|
class: "bw-pro-table-header-cell"
|
|
4554
|
-
},
|
|
4558
|
+
}, vc = { class: "bw-pro-table-header-left" }, yc = { class: "bw-pro-table-header-title" }, bc = /*#__PURE__*/ uc(/* @__PURE__ */ d({
|
|
4555
4559
|
inheritAttrs: !1,
|
|
4556
4560
|
__name: "BwProTableCore",
|
|
4557
4561
|
props: {
|
|
@@ -4683,7 +4687,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4683
4687
|
});
|
|
4684
4688
|
if (we(l) && c !== "index" && c !== "action") return Ee(Te(t));
|
|
4685
4689
|
if (c) {
|
|
4686
|
-
let e =
|
|
4690
|
+
let e = ic(c);
|
|
4687
4691
|
if (e) return Ee(e({
|
|
4688
4692
|
value: l,
|
|
4689
4693
|
record: n,
|
|
@@ -4811,7 +4815,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4811
4815
|
"onUpdate:open": (t) => Ve(t, e),
|
|
4812
4816
|
overlayStyle: { minWidth: "220px" }
|
|
4813
4817
|
}, {
|
|
4814
|
-
content: () => h(
|
|
4818
|
+
content: () => h(dc, {
|
|
4815
4819
|
dataIndex: e.dataIndex,
|
|
4816
4820
|
placeholder: t.placeholder,
|
|
4817
4821
|
searchText: t.searchText,
|
|
@@ -4827,7 +4831,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4827
4831
|
}
|
|
4828
4832
|
return t({ retry: () => f("retry") }), (t, n) => {
|
|
4829
4833
|
let r = A("a-button"), p = A("a-result"), h = A("a-tooltip"), g = A("a-table");
|
|
4830
|
-
return O(), o("div",
|
|
4834
|
+
return O(), o("div", mc, [e.errorMessage ? (O(), i(p, {
|
|
4831
4835
|
key: 0,
|
|
4832
4836
|
status: "error",
|
|
4833
4837
|
title: e.errorMessage
|
|
@@ -4847,15 +4851,15 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4847
4851
|
"row-key": d.rowKey
|
|
4848
4852
|
}), c({
|
|
4849
4853
|
bodyCell: N((e) => [t.$slots.bodyCell ? re(t.$slots, "bodyCell", S(y({ key: 0 }, e)), void 0, !0) : (O(), i(ie(De(e)), { key: 1 }))]),
|
|
4850
|
-
headerCell: N(({ column: e }) => [t.$slots.headerCell ? (O(), o("span",
|
|
4851
|
-
se.value && te(e) ? (O(), i(
|
|
4854
|
+
headerCell: N(({ column: e }) => [t.$slots.headerCell ? (O(), o("span", hc, [s("span", gc, [re(t.$slots, "headerCell", { column: e }, void 0, !0)]), (O(), i(ie(We(e))))])) : (O(), o("span", _c, [s("span", vc, [
|
|
4855
|
+
se.value && te(e) ? (O(), i(pc, {
|
|
4852
4856
|
key: 0,
|
|
4853
4857
|
draggable: !0,
|
|
4854
4858
|
class: x(["bw-pro-table-header-drag-icon", { "bw-pro-table-header-drag-icon--active": E.value === e.dataIndex }]),
|
|
4855
4859
|
onDragstart: (t) => le(t, e),
|
|
4856
4860
|
onDragend: ue
|
|
4857
4861
|
}, null, 8, ["class", "onDragstart"])) : a("", !0),
|
|
4858
|
-
s("span",
|
|
4862
|
+
s("span", yc, j(e.title), 1),
|
|
4859
4863
|
e.description ? (O(), i(h, {
|
|
4860
4864
|
key: 1,
|
|
4861
4865
|
title: e.description
|
|
@@ -4876,7 +4880,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4876
4880
|
]))]);
|
|
4877
4881
|
};
|
|
4878
4882
|
}
|
|
4879
|
-
}), [["__scopeId", "data-v-406475b2"]]),
|
|
4883
|
+
}), [["__scopeId", "data-v-406475b2"]]), xc = ["innerHTML"], Sc = /* @__PURE__ */ d({
|
|
4880
4884
|
__name: "BwProTableBatchEditModal",
|
|
4881
4885
|
props: {
|
|
4882
4886
|
visible: { type: Boolean },
|
|
@@ -4928,7 +4932,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4928
4932
|
color: "#666"
|
|
4929
4933
|
},
|
|
4930
4934
|
innerHTML: M(f).edit.selectedData.replace("{count}", String(e.selectedCount))
|
|
4931
|
-
}, null, 8,
|
|
4935
|
+
}, null, 8, xc), u(C, {
|
|
4932
4936
|
ref_key: "formRef",
|
|
4933
4937
|
ref: c,
|
|
4934
4938
|
"label-col": { span: 6 },
|
|
@@ -4996,10 +5000,10 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
4996
5000
|
}, 8, ["title", "open"]);
|
|
4997
5001
|
};
|
|
4998
5002
|
}
|
|
4999
|
-
}),
|
|
5003
|
+
}), Cc = {
|
|
5000
5004
|
key: 0,
|
|
5001
5005
|
class: "bw-pro-table-search"
|
|
5002
|
-
},
|
|
5006
|
+
}, wc = { class: "bw-pro-table-search-actions" }, Tc = /*#__PURE__*/ uc(/* @__PURE__ */ d({
|
|
5003
5007
|
__name: "BwProTableSearch",
|
|
5004
5008
|
props: {
|
|
5005
5009
|
columns: { default: () => [] },
|
|
@@ -5040,7 +5044,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5040
5044
|
}
|
|
5041
5045
|
return n({ resetForm: re }), (e, n) => {
|
|
5042
5046
|
let r = A("a-input"), c = A("a-select"), d = A("a-input-number"), f = A("a-date-picker"), h = A("a-form-item"), E = A("a-form"), te = A("a-button"), k = A("a-space");
|
|
5043
|
-
return w.value.length > 0 ? (O(), o("div",
|
|
5047
|
+
return w.value.length > 0 ? (O(), o("div", Cc, [s("div", {
|
|
5044
5048
|
class: "bw-search-form",
|
|
5045
5049
|
"data-bw-search": "",
|
|
5046
5050
|
style: C({ "--bw-search-label-width": M(v) + "px" })
|
|
@@ -5118,10 +5122,21 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5118
5122
|
"value",
|
|
5119
5123
|
"onUpdate:value",
|
|
5120
5124
|
"placeholder"
|
|
5121
|
-
])) : (O(), i(
|
|
5125
|
+
])) : e.valueType === "dateTime" ? (O(), i(f, {
|
|
5122
5126
|
key: 6,
|
|
5123
5127
|
value: S[e.dataIndex],
|
|
5124
5128
|
"onUpdate:value": (t) => S[e.dataIndex] = t,
|
|
5129
|
+
placeholder: M(p).search.selectPlaceholderWithTitle.replace("{title}", e.title),
|
|
5130
|
+
"show-time": "",
|
|
5131
|
+
style: { width: "100%" }
|
|
5132
|
+
}, null, 8, [
|
|
5133
|
+
"value",
|
|
5134
|
+
"onUpdate:value",
|
|
5135
|
+
"placeholder"
|
|
5136
|
+
])) : (O(), i(r, {
|
|
5137
|
+
key: 7,
|
|
5138
|
+
value: S[e.dataIndex],
|
|
5139
|
+
"onUpdate:value": (t) => S[e.dataIndex] = t,
|
|
5125
5140
|
placeholder: M(p).search.inputPlaceholder.replace("{title}", e.title),
|
|
5126
5141
|
"allow-clear": "",
|
|
5127
5142
|
style: { width: "100%" }
|
|
@@ -5133,7 +5148,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5133
5148
|
_: 2
|
|
5134
5149
|
}, 1032, ["label", "name"]))), 128))]),
|
|
5135
5150
|
_: 1
|
|
5136
|
-
}, 8, ["colon"])], 4), s("div",
|
|
5151
|
+
}, 8, ["colon"])], 4), s("div", wc, [u(k, null, {
|
|
5137
5152
|
default: N(() => [
|
|
5138
5153
|
u(te, {
|
|
5139
5154
|
type: "primary",
|
|
@@ -5161,7 +5176,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5161
5176
|
})])])) : a("", !0);
|
|
5162
5177
|
};
|
|
5163
5178
|
}
|
|
5164
|
-
}), [["__scopeId", "data-v-
|
|
5179
|
+
}), [["__scopeId", "data-v-fa05fbb4"]]), Ec = { class: "bw-pro-table-column-setting-panel" }, Dc = { class: "bw-pro-table-column-setting-header" }, Oc = { class: "bw-pro-table-column-setting-body" }, kc = ["onDragover", "onDrop"], Ac = /*#__PURE__*/ uc(/* @__PURE__ */ d({
|
|
5165
5180
|
__name: "BwProTableColumnSetting",
|
|
5166
5181
|
props: {
|
|
5167
5182
|
columns: {},
|
|
@@ -5217,14 +5232,14 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5217
5232
|
});
|
|
5218
5233
|
return (e, n) => {
|
|
5219
5234
|
let r = A("a-button"), i = A("a-checkbox");
|
|
5220
|
-
return O(), o("div",
|
|
5235
|
+
return O(), o("div", Ec, [s("div", Dc, [s("span", null, j(M(a).columnSetting.title), 1), u(r, {
|
|
5221
5236
|
type: "link",
|
|
5222
5237
|
size: "small",
|
|
5223
5238
|
onClick: g
|
|
5224
5239
|
}, {
|
|
5225
5240
|
default: N(() => [l(j(M(a).columnSetting.reset), 1)]),
|
|
5226
5241
|
_: 1
|
|
5227
|
-
})]), s("div",
|
|
5242
|
+
})]), s("div", Oc, [(O(!0), o(t, null, ne(d.value, (e, t) => (O(), o("div", {
|
|
5228
5243
|
key: e.key,
|
|
5229
5244
|
class: x(["bw-pro-table-column-setting-item", {
|
|
5230
5245
|
"bw-pro-table-column-setting-item--dragging": f.value === t,
|
|
@@ -5233,7 +5248,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5233
5248
|
onDragover: (e) => y(t, e),
|
|
5234
5249
|
onDragleave: b,
|
|
5235
5250
|
onDrop: (e) => S(t)
|
|
5236
|
-
}, [u(
|
|
5251
|
+
}, [u(pc, {
|
|
5237
5252
|
draggable: "",
|
|
5238
5253
|
class: x(["bw-pro-table-column-drag-icon", { "bw-pro-table-column-drag-icon--active": f.value === t }]),
|
|
5239
5254
|
onDragstart: (e) => _(t, e),
|
|
@@ -5244,16 +5259,16 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5244
5259
|
}, {
|
|
5245
5260
|
default: N(() => [l(j(C.value[e.key] ?? e.key), 1)]),
|
|
5246
5261
|
_: 2
|
|
5247
|
-
}, 1032, ["checked", "onChange"])], 42,
|
|
5262
|
+
}, 1032, ["checked", "onChange"])], 42, kc))), 128))])]);
|
|
5248
5263
|
};
|
|
5249
5264
|
}
|
|
5250
|
-
}), [["__scopeId", "data-v-7e735b2d"]]),
|
|
5265
|
+
}), [["__scopeId", "data-v-7e735b2d"]]), jc = { class: "bw-pro-table-toolbar" }, Mc = { class: "bw-pro-table-toolbar-container" }, Nc = { class: "bw-pro-table-toolbar-left" }, Pc = {
|
|
5251
5266
|
key: 0,
|
|
5252
5267
|
class: "bw-pro-table-toolbar-title"
|
|
5253
|
-
},
|
|
5268
|
+
}, Fc = { class: "bw-pro-table-toolbar-right" }, Ic = {
|
|
5254
5269
|
key: 0,
|
|
5255
5270
|
class: "bw-pro-table-toolbar-selection-alert"
|
|
5256
|
-
},
|
|
5271
|
+
}, Lc = { class: "bw-pro-table-toolbar-selection-count" }, Rc = /*#__PURE__*/ uc(/* @__PURE__ */ d({
|
|
5257
5272
|
__name: "BwProTableToolbar",
|
|
5258
5273
|
props: {
|
|
5259
5274
|
title: {},
|
|
@@ -5315,7 +5330,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5315
5330
|
}
|
|
5316
5331
|
return (t, _) => {
|
|
5317
5332
|
let v = A("a-switch"), y = A("a-tooltip"), b = A("a-button"), x = A("a-menu-item"), S = A("a-menu"), C = A("a-dropdown"), w = A("a-popover"), T = A("a-space");
|
|
5318
|
-
return O(), o("div",
|
|
5333
|
+
return O(), o("div", jc, [s("div", Mc, [s("div", Nc, [e.title ? (O(), o("span", Pc, j(e.title), 1)) : a("", !0), re(t.$slots, "extra", {}, void 0, !0)]), s("div", Fc, [re(t.$slots, "extra-right", {}, void 0, !0), u(T, null, {
|
|
5319
5334
|
default: N(() => [
|
|
5320
5335
|
e.toolbarConfig.bordered === !1 ? a("", !0) : (O(), i(y, {
|
|
5321
5336
|
key: 0,
|
|
@@ -5407,7 +5422,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5407
5422
|
"overlay-style": { padding: 0 },
|
|
5408
5423
|
"overlay-class-name": "bw-pro-table-column-popover"
|
|
5409
5424
|
}, {
|
|
5410
|
-
content: N(() => [u(
|
|
5425
|
+
content: N(() => [u(Ac, {
|
|
5411
5426
|
columns: e.columns,
|
|
5412
5427
|
"persisted-columns": e.columnState,
|
|
5413
5428
|
onChange: p,
|
|
@@ -5500,7 +5515,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5500
5515
|
}, 8, ["title"])) : a("", !0)
|
|
5501
5516
|
]),
|
|
5502
5517
|
_: 1
|
|
5503
|
-
})])]), e.selectionCount && e.selectionCount > 0 ? (O(), o("div",
|
|
5518
|
+
})])]), e.selectionCount && e.selectionCount > 0 ? (O(), o("div", Ic, [s("span", Lc, j(M(c).toolbar.selected.replace("{count}", String(e.selectionCount))), 1), u(b, {
|
|
5504
5519
|
type: "link",
|
|
5505
5520
|
size: "small",
|
|
5506
5521
|
onClick: _[6] ||= (e) => r("clear-selection")
|
|
@@ -5510,28 +5525,28 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5510
5525
|
})])) : a("", !0)]);
|
|
5511
5526
|
};
|
|
5512
5527
|
}
|
|
5513
|
-
}), [["__scopeId", "data-v-
|
|
5528
|
+
}), [["__scopeId", "data-v-6eb60d31"]]), zc = { style: {
|
|
5514
5529
|
"margin-bottom": "16px",
|
|
5515
5530
|
display: "flex",
|
|
5516
5531
|
"justify-content": "space-between",
|
|
5517
5532
|
"align-items": "center"
|
|
5518
|
-
} },
|
|
5533
|
+
} }, Bc = { style: {
|
|
5519
5534
|
margin: "0",
|
|
5520
5535
|
"padding-left": "16px"
|
|
5521
|
-
} },
|
|
5536
|
+
} }, Vc = {
|
|
5522
5537
|
key: 1,
|
|
5523
5538
|
style: { "margin-bottom": "16px" }
|
|
5524
|
-
},
|
|
5539
|
+
}, Hc = { style: {
|
|
5525
5540
|
"font-weight": "500",
|
|
5526
5541
|
"margin-bottom": "8px"
|
|
5527
|
-
} },
|
|
5542
|
+
} }, Uc = { style: {
|
|
5528
5543
|
display: "flex",
|
|
5529
5544
|
"flex-wrap": "wrap",
|
|
5530
5545
|
gap: "8px"
|
|
5531
|
-
} },
|
|
5546
|
+
} }, Wc = ["title"], Gc = { key: 2 }, Kc = { style: {
|
|
5532
5547
|
"font-weight": "500",
|
|
5533
5548
|
"margin-bottom": "8px"
|
|
5534
|
-
} },
|
|
5549
|
+
} }, qc = /* @__PURE__ */ d({
|
|
5535
5550
|
__name: "BwProTableImportModal",
|
|
5536
5551
|
props: {
|
|
5537
5552
|
visible: { type: Boolean },
|
|
@@ -5584,7 +5599,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5584
5599
|
onCancel: g
|
|
5585
5600
|
}, {
|
|
5586
5601
|
default: N(() => [
|
|
5587
|
-
s("div",
|
|
5602
|
+
s("div", zc, [u(_, null, {
|
|
5588
5603
|
default: N(() => [u(c, { onClick: r[0] ||= (e) => d("select-file") }, {
|
|
5589
5604
|
icon: N(() => [u(M(Ke))]),
|
|
5590
5605
|
default: N(() => [l(" " + j(M(f).import.selectFile), 1)]),
|
|
@@ -5602,10 +5617,10 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5602
5617
|
"show-arrow": "",
|
|
5603
5618
|
style: { "margin-bottom": "16px" }
|
|
5604
5619
|
}, {
|
|
5605
|
-
message: N(() => [s("ul",
|
|
5620
|
+
message: N(() => [s("ul", Bc, [(O(!0), o(t, null, ne(e.validateErrors, (e, t) => (O(), o("li", { key: t }, j(e), 1))), 128))])]),
|
|
5606
5621
|
_: 1
|
|
5607
5622
|
})) : a("", !0),
|
|
5608
|
-
e.previewColumns.length > 0 ? (O(), o("div",
|
|
5623
|
+
e.previewColumns.length > 0 ? (O(), o("div", Vc, [s("div", Hc, j(M(f).import.columnMapping), 1), s("div", Uc, [(O(!0), o(t, null, ne(e.previewColumns, (t, n) => (O(), o("div", {
|
|
5609
5624
|
key: n,
|
|
5610
5625
|
style: {
|
|
5611
5626
|
display: "flex",
|
|
@@ -5623,7 +5638,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5623
5638
|
"text-overflow": "ellipsis"
|
|
5624
5639
|
},
|
|
5625
5640
|
title: t
|
|
5626
|
-
}, j(t), 9,
|
|
5641
|
+
}, j(t), 9, Wc),
|
|
5627
5642
|
r[3] ||= s("span", { style: { "flex-shrink": "0" } }, "→", -1),
|
|
5628
5643
|
u(y, {
|
|
5629
5644
|
value: e.columnMapping[`col_${n}`],
|
|
@@ -5642,7 +5657,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5642
5657
|
"onChange"
|
|
5643
5658
|
])
|
|
5644
5659
|
]))), 128))])])) : a("", !0),
|
|
5645
|
-
e.previewData.length > 0 ? (O(), o("div",
|
|
5660
|
+
e.previewData.length > 0 ? (O(), o("div", Gc, [s("div", Kc, j(M(f).import.preview), 1), u(b, {
|
|
5646
5661
|
columns: p.value,
|
|
5647
5662
|
"data-source": e.previewData,
|
|
5648
5663
|
pagination: !1,
|
|
@@ -5663,7 +5678,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
5663
5678
|
]);
|
|
5664
5679
|
};
|
|
5665
5680
|
}
|
|
5666
|
-
}),
|
|
5681
|
+
}), Jc = ["data-table-id"], Yc = /*#__PURE__*/ uc(/* @__PURE__ */ d({
|
|
5667
5682
|
inheritAttrs: !1,
|
|
5668
5683
|
__name: "BwProTable",
|
|
5669
5684
|
props: {
|
|
@@ -6271,7 +6286,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6271
6286
|
"data-table-id": s.tableId
|
|
6272
6287
|
}, [u(M(fe), { "get-popup-container": Qe.value }, {
|
|
6273
6288
|
default: N(() => [
|
|
6274
|
-
re(e.$slots, "search", {}, () => [s.search === !1 ? a("", !0) : (O(), i(
|
|
6289
|
+
re(e.$slots, "search", {}, () => [s.search === !1 ? a("", !0) : (O(), i(Tc, {
|
|
6275
6290
|
key: 0,
|
|
6276
6291
|
ref_key: "searchRef",
|
|
6277
6292
|
ref: Xe,
|
|
@@ -6280,7 +6295,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6280
6295
|
onSearch: It,
|
|
6281
6296
|
onReset: Lt
|
|
6282
6297
|
}, null, 8, ["columns", "search-config"]))], !0),
|
|
6283
|
-
re(e.$slots, "toolbar", {}, () => [s.toolbar === !1 ? a("", !0) : (O(), i(
|
|
6298
|
+
re(e.$slots, "toolbar", {}, () => [s.toolbar === !1 ? a("", !0) : (O(), i(Rc, {
|
|
6284
6299
|
key: 0,
|
|
6285
6300
|
title: s.title,
|
|
6286
6301
|
"toolbar-config": I.value,
|
|
@@ -6329,7 +6344,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6329
6344
|
"exporting",
|
|
6330
6345
|
"importing"
|
|
6331
6346
|
]))], !0),
|
|
6332
|
-
u(
|
|
6347
|
+
u(bc, y(e.$attrs, {
|
|
6333
6348
|
bordered: Je.value,
|
|
6334
6349
|
columns: K.value,
|
|
6335
6350
|
"data-source": _.value,
|
|
@@ -6365,7 +6380,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6365
6380
|
"row-key",
|
|
6366
6381
|
"row-selection"
|
|
6367
6382
|
]),
|
|
6368
|
-
u(
|
|
6383
|
+
u(Sc, {
|
|
6369
6384
|
visible: M(Ce),
|
|
6370
6385
|
"onUpdate:visible": t[0] ||= (e) => v(Ce) ? Ce.value = e : null,
|
|
6371
6386
|
columns: s.columns,
|
|
@@ -6378,7 +6393,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6378
6393
|
"selected-count",
|
|
6379
6394
|
"row-key"
|
|
6380
6395
|
]),
|
|
6381
|
-
u(
|
|
6396
|
+
u(qc, {
|
|
6382
6397
|
visible: M(Ne),
|
|
6383
6398
|
"onUpdate:visible": t[1] ||= (e) => v(Ne) ? Ne.value = e : null,
|
|
6384
6399
|
importing: M(Ae),
|
|
@@ -6404,12 +6419,12 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
|
|
|
6404
6419
|
])
|
|
6405
6420
|
]),
|
|
6406
6421
|
_: 3
|
|
6407
|
-
}, 8, ["get-popup-container"])], 8,
|
|
6422
|
+
}, 8, ["get-popup-container"])], 8, Jc));
|
|
6408
6423
|
}
|
|
6409
6424
|
}), [["__scopeId", "data-v-ce85e68e"]]);
|
|
6410
6425
|
//#endregion
|
|
6411
6426
|
//#region composables/useQueryParams.ts
|
|
6412
|
-
function
|
|
6427
|
+
function Xc(e = {}) {
|
|
6413
6428
|
let { initialPageSize: t = 10, debounceDelay: n = 300 } = e, i = k(1), a = k(t), o = k(), s = k(null), c = k({}), l = k({}), u = r(() => ({
|
|
6414
6429
|
current: i.value,
|
|
6415
6430
|
pageSize: a.value,
|
|
@@ -6450,7 +6465,7 @@ function Yc(e = {}) {
|
|
|
6450
6465
|
}
|
|
6451
6466
|
//#endregion
|
|
6452
6467
|
//#region composables/useBwRowSelection.ts
|
|
6453
|
-
function
|
|
6468
|
+
function Zc(e) {
|
|
6454
6469
|
let { dataSource: t, rowKey: n = "id", maxSelect: i = 0, type: a = "checkbox" } = e, o = k([]), s = k(/* @__PURE__ */ new Map()), c = r(() => Array.from(s.value.values())), l = r(() => o.value.length > 0), u = r(() => o.value.length), d = r(() => {
|
|
6455
6470
|
let e = t.value?.length ?? 0;
|
|
6456
6471
|
return e === 0 ? !1 : o.value.length >= e;
|
|
@@ -6499,7 +6514,7 @@ function Xc(e) {
|
|
|
6499
6514
|
}
|
|
6500
6515
|
//#endregion
|
|
6501
6516
|
//#region composables/useContextMenu.ts
|
|
6502
|
-
function
|
|
6517
|
+
function Qc(e = {}) {
|
|
6503
6518
|
let t = ma(e.locale), { config: n } = e, r = k({
|
|
6504
6519
|
visible: !1,
|
|
6505
6520
|
type: "row",
|
|
@@ -6657,7 +6672,7 @@ function Zc(e = {}) {
|
|
|
6657
6672
|
}
|
|
6658
6673
|
//#endregion
|
|
6659
6674
|
//#region composables/useDragSort.ts
|
|
6660
|
-
function
|
|
6675
|
+
function $c(e) {
|
|
6661
6676
|
let { dataSource: t, columns: n, dragConfig: r, onRowDragEnd: i } = e, a = k(!1), o = k(null);
|
|
6662
6677
|
function s(e) {
|
|
6663
6678
|
r?.value?.rowDraggable !== !1 && (a.value = !0, o.value = {
|
|
@@ -6695,7 +6710,7 @@ function Qc(e) {
|
|
|
6695
6710
|
}
|
|
6696
6711
|
//#endregion
|
|
6697
6712
|
//#region composables/useBwKeyboard.ts
|
|
6698
|
-
function
|
|
6713
|
+
function el(e) {
|
|
6699
6714
|
if (window.isSecureContext && navigator.clipboard?.writeText) return navigator.clipboard.writeText(e);
|
|
6700
6715
|
try {
|
|
6701
6716
|
let t = document.createElement("textarea");
|
|
@@ -6704,8 +6719,8 @@ function $c(e) {
|
|
|
6704
6719
|
return Promise.reject(/* @__PURE__ */ Error("Clipboard write not available"));
|
|
6705
6720
|
}
|
|
6706
6721
|
}
|
|
6707
|
-
var { UP:
|
|
6708
|
-
function
|
|
6722
|
+
var { UP: tl, DOWN: nl, LEFT: rl, RIGHT: il, TAB: al, ENTER: ol, ESCAPE: sl, SPACE: cl, DELETE: ll } = ua;
|
|
6723
|
+
function ul(e) {
|
|
6709
6724
|
let t = k(typeof e.dataLength == "number" ? e.dataLength : 0), n = k(e.columnCount ?? 0), r = k(null), i = k(null), a = k(!1), o = k(null), s = k(null), c = k(null), l = k(null), u = k(null);
|
|
6710
6725
|
function d(e, t) {
|
|
6711
6726
|
r.value = {
|
|
@@ -6721,38 +6736,38 @@ function ll(e) {
|
|
|
6721
6736
|
if (!p) return;
|
|
6722
6737
|
let m = typeof e.dataLength == "number" ? e.dataLength : t.value, h = n.value || 1, g = o.ctrlKey || o.metaKey;
|
|
6723
6738
|
switch (o.key) {
|
|
6724
|
-
case
|
|
6739
|
+
case tl:
|
|
6725
6740
|
o.preventDefault(), p.rowIndex > 0 && d(p.rowIndex - 1, p.colIndex);
|
|
6726
6741
|
break;
|
|
6727
|
-
case
|
|
6742
|
+
case nl:
|
|
6728
6743
|
o.preventDefault(), p.rowIndex < m - 1 && d(p.rowIndex + 1, p.colIndex);
|
|
6729
6744
|
break;
|
|
6730
|
-
case
|
|
6745
|
+
case rl:
|
|
6731
6746
|
o.preventDefault(), p.colIndex > 0 && d(p.rowIndex, p.colIndex - 1);
|
|
6732
6747
|
break;
|
|
6733
|
-
case
|
|
6748
|
+
case il:
|
|
6734
6749
|
o.preventDefault(), p.colIndex < h - 1 && d(p.rowIndex, p.colIndex + 1);
|
|
6735
6750
|
break;
|
|
6736
|
-
case
|
|
6751
|
+
case al:
|
|
6737
6752
|
o.preventDefault(), o.shiftKey ? p.colIndex > 0 ? d(p.rowIndex, p.colIndex - 1) : p.rowIndex > 0 && d(p.rowIndex - 1, h - 1) : p.colIndex < h - 1 ? d(p.rowIndex, p.colIndex + 1) : p.rowIndex < m - 1 && d(p.rowIndex + 1, 0);
|
|
6738
6753
|
break;
|
|
6739
|
-
case
|
|
6754
|
+
case ol:
|
|
6740
6755
|
o.preventDefault(), a.value ? s.value?.(p.rowIndex, p.colIndex) : u.value?.(p.rowIndex);
|
|
6741
6756
|
break;
|
|
6742
|
-
case
|
|
6757
|
+
case sl:
|
|
6743
6758
|
o.preventDefault(), a.value && c.value?.();
|
|
6744
6759
|
break;
|
|
6745
|
-
case
|
|
6760
|
+
case cl:
|
|
6746
6761
|
o.preventDefault();
|
|
6747
6762
|
break;
|
|
6748
|
-
case
|
|
6763
|
+
case ll:
|
|
6749
6764
|
o.preventDefault(), l.value?.(p.rowIndex);
|
|
6750
6765
|
break;
|
|
6751
6766
|
default:
|
|
6752
6767
|
if (g && o.key === "c") {
|
|
6753
6768
|
o.preventDefault();
|
|
6754
6769
|
let e = window.getSelection()?.toString();
|
|
6755
|
-
e &&
|
|
6770
|
+
e && el(e).catch(() => {});
|
|
6756
6771
|
}
|
|
6757
6772
|
g && o.key === "v" && (o.preventDefault(), window.isSecureContext && navigator.clipboard?.readText && navigator.clipboard.readText().then((e) => {
|
|
6758
6773
|
i.value = e;
|
|
@@ -6775,7 +6790,7 @@ function ll(e) {
|
|
|
6775
6790
|
}
|
|
6776
6791
|
//#endregion
|
|
6777
6792
|
//#region composables/useTableView.ts
|
|
6778
|
-
function
|
|
6793
|
+
function dl(e) {
|
|
6779
6794
|
let t = ma(e.locale), { tableId: n } = e, r = `bw-pro-table:${n}:views`, i = k([]), a = k(null), o = k(!1), s = k(null);
|
|
6780
6795
|
function c() {
|
|
6781
6796
|
try {
|
|
@@ -6863,7 +6878,7 @@ function ul(e) {
|
|
|
6863
6878
|
}
|
|
6864
6879
|
//#endregion
|
|
6865
6880
|
//#region composables/useBwPermission.ts
|
|
6866
|
-
function
|
|
6881
|
+
function fl(e) {
|
|
6867
6882
|
let { columns: t, permissions: n } = e, i = r(() => n?.value ?? []), a = r(() => {
|
|
6868
6883
|
let e = t.value ?? [];
|
|
6869
6884
|
return i.value.length === 0 ? e : e.map((e) => {
|
|
@@ -6907,7 +6922,7 @@ function dl(e) {
|
|
|
6907
6922
|
}
|
|
6908
6923
|
//#endregion
|
|
6909
6924
|
//#region composables/useColumnHeaderSearch.ts
|
|
6910
|
-
function
|
|
6925
|
+
function pl(e) {
|
|
6911
6926
|
let { columns: t } = e, n = k({});
|
|
6912
6927
|
function i(e, t) {
|
|
6913
6928
|
n.value = {
|
|
@@ -6944,4 +6959,4 @@ function fl(e) {
|
|
|
6944
6959
|
};
|
|
6945
6960
|
}
|
|
6946
6961
|
//#endregion
|
|
6947
|
-
export { ka as BW_PRO_TABLE_KEY, pa as BW_PRO_TABLE_LOCALE_KEY,
|
|
6962
|
+
export { ka as BW_PRO_TABLE_KEY, pa as BW_PRO_TABLE_LOCALE_KEY, Yc as BwProTable, sa as DEFAULT_DATE_FORMAT, ta as DEFAULT_EMPTY_TEXT, $i as DEFAULT_PAGE_SIZE, Na as defineColumnType, nc as ensureRenderers, ic as getRendererSafe, rc as initBuiltinRenderers, ha as mergeLocale, ac as resetRenderers, ul as useBwKeyboard, fl as useBwPermission, va as useBwRowEdit, Zc as useBwRowSelection, pl as useColumnHeaderSearch, Qc as useContextMenu, $c as useDragSort, Ta as useExportExcel, Oa as useImportExcel, ma as useLocale, Sa as usePersistence, Xc as useQueryParams, dl as useTableView, fa as zhCN };
|