bw-pro-table 0.0.3 → 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.
@@ -4421,20 +4421,24 @@ var $s = ({ value: e, column: t }) => {
4421
4421
  color: "#ff4d4f",
4422
4422
  fontSize: "16px"
4423
4423
  } });
4424
- }, ec = !1;
4425
- function tc() {
4426
- ec ||= (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), !0);
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 nc = tc;
4429
- function rc(e) {
4430
- return tc(), Ma(e);
4432
+ var rc = nc;
4433
+ function ic(e) {
4434
+ return nc(), Ma(e);
4431
4435
  }
4432
- function ic() {
4433
- ec = !1, Pa();
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 ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-column-search-input" }, sc = { class: "bw-pro-table-column-search-actions" }, cc = /*@__PURE__*/ d({
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", ac, [s("div", oc, [u(n, {
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", sc, [u(i, null, {
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
- }), lc = (e, t) => {
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
- }, uc = /*#__PURE__*/ lc(cc, [["__scopeId", "data-v-06f12966"]]), dc = ["draggable"], fc = /* @__PURE__ */ d({
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, dc));
4547
+ })])], -1)]], 44, fc));
4544
4548
  }
4545
- }), pc = {
4549
+ }), mc = {
4546
4550
  class: "bw-pro-table-core",
4547
4551
  "data-bw-table-core": ""
4548
- }, mc = {
4552
+ }, hc = {
4549
4553
  key: 0,
4550
4554
  class: "bw-pro-table-header-cell"
4551
- }, hc = { class: "bw-pro-table-header-left" }, gc = {
4555
+ }, gc = { class: "bw-pro-table-header-left" }, _c = {
4552
4556
  key: 1,
4553
4557
  class: "bw-pro-table-header-cell"
4554
- }, _c = { class: "bw-pro-table-header-left" }, vc = { class: "bw-pro-table-header-title" }, yc = /*#__PURE__*/ lc(/* @__PURE__ */ d({
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 = rc(c);
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(uc, {
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", pc, [e.errorMessage ? (O(), i(p, {
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", mc, [s("span", hc, [re(t.$slots, "headerCell", { column: e }, void 0, !0)]), (O(), i(ie(We(e))))])) : (O(), o("span", gc, [s("span", _c, [
4851
- se.value && te(e) ? (O(), i(fc, {
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", vc, j(e.title), 1),
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"]]), bc = ["innerHTML"], xc = /* @__PURE__ */ d({
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, bc), u(C, {
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
- }), Sc = {
5003
+ }), Cc = {
5000
5004
  key: 0,
5001
5005
  class: "bw-pro-table-search"
5002
- }, Cc = { class: "bw-pro-table-search-actions" }, wc = /*#__PURE__*/ lc(/* @__PURE__ */ d({
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", Sc, [s("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(r, {
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", Cc, [u(k, null, {
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-8bc76b31"]]), Tc = { class: "bw-pro-table-column-setting-panel" }, Ec = { class: "bw-pro-table-column-setting-header" }, Dc = { class: "bw-pro-table-column-setting-body" }, Oc = ["onDragover", "onDrop"], kc = /*#__PURE__*/ lc(/* @__PURE__ */ d({
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", Tc, [s("div", Ec, [s("span", null, j(M(a).columnSetting.title), 1), u(r, {
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", Dc, [(O(!0), o(t, null, ne(d.value, (e, t) => (O(), o("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(fc, {
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, Oc))), 128))])]);
5262
+ }, 1032, ["checked", "onChange"])], 42, kc))), 128))])]);
5248
5263
  };
5249
5264
  }
5250
- }), [["__scopeId", "data-v-7e735b2d"]]), Ac = { class: "bw-pro-table-toolbar" }, jc = { class: "bw-pro-table-toolbar-container" }, Mc = { class: "bw-pro-table-toolbar-left" }, Nc = {
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
- }, Pc = { class: "bw-pro-table-toolbar-right" }, Fc = {
5268
+ }, Fc = { class: "bw-pro-table-toolbar-right" }, Ic = {
5254
5269
  key: 0,
5255
5270
  class: "bw-pro-table-toolbar-selection-alert"
5256
- }, Ic = { class: "bw-pro-table-toolbar-selection-count" }, Lc = /*#__PURE__*/ lc(/* @__PURE__ */ d({
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", Ac, [s("div", jc, [s("div", Mc, [e.title ? (O(), o("span", Nc, j(e.title), 1)) : a("", !0), re(t.$slots, "extra", {}, void 0, !0)]), s("div", Pc, [re(t.$slots, "extra-right", {}, void 0, !0), u(T, null, {
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(kc, {
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", Fc, [s("span", Ic, j(M(c).toolbar.selected.replace("{count}", String(e.selectionCount))), 1), u(b, {
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-db6f1492"]]), Rc = { style: {
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
- } }, zc = { style: {
5533
+ } }, Bc = { style: {
5519
5534
  margin: "0",
5520
5535
  "padding-left": "16px"
5521
- } }, Bc = {
5536
+ } }, Vc = {
5522
5537
  key: 1,
5523
5538
  style: { "margin-bottom": "16px" }
5524
- }, Vc = { style: {
5539
+ }, Hc = { style: {
5525
5540
  "font-weight": "500",
5526
5541
  "margin-bottom": "8px"
5527
- } }, Hc = { style: {
5542
+ } }, Uc = { style: {
5528
5543
  display: "flex",
5529
5544
  "flex-wrap": "wrap",
5530
5545
  gap: "8px"
5531
- } }, Uc = ["title"], Wc = { key: 2 }, Gc = { style: {
5546
+ } }, Wc = ["title"], Gc = { key: 2 }, Kc = { style: {
5532
5547
  "font-weight": "500",
5533
5548
  "margin-bottom": "8px"
5534
- } }, Kc = /* @__PURE__ */ d({
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", Rc, [u(_, null, {
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", zc, [(O(!0), o(t, null, ne(e.validateErrors, (e, t) => (O(), o("li", { key: t }, j(e), 1))), 128))])]),
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", Bc, [s("div", Vc, j(M(f).import.columnMapping), 1), s("div", Hc, [(O(!0), o(t, null, ne(e.previewColumns, (t, n) => (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, Uc),
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", Wc, [s("div", Gc, j(M(f).import.preview), 1), u(b, {
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
- }), qc = ["data-table-id"], Jc = /*#__PURE__*/ lc(/* @__PURE__ */ d({
5681
+ }), Jc = ["data-table-id"], Yc = /*#__PURE__*/ uc(/* @__PURE__ */ d({
5667
5682
  inheritAttrs: !1,
5668
5683
  __name: "BwProTable",
5669
5684
  props: {
@@ -6148,7 +6163,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6148
6163
  let n = [];
6149
6164
  return (Z.value ? X.value.has(e[p.value]) : Qt.value.has(e[p.value])) && n.push("bw-pro-table-row-selected"), Ye.value && t % 2 == 0 && n.push("bw-pro-table-row-striped"), typeof s.rowClassName == "function" && n.push(s.rowClassName(e, t)), n.join(" ");
6150
6165
  }
6151
- return ee(ka, {
6166
+ ee(ka, {
6152
6167
  tableId: r(() => s.tableId),
6153
6168
  dataSource: _,
6154
6169
  total: b,
@@ -6226,7 +6241,17 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6226
6241
  }
6227
6242
  Pt();
6228
6243
  }
6229
- }), t({
6244
+ });
6245
+ let en = r(() => {
6246
+ if (!s.rowSelection) return;
6247
+ let e = {
6248
+ ...s.rowSelection,
6249
+ selectedRowKeys: Ht.value,
6250
+ onChange: qt
6251
+ };
6252
+ return s.rowSelection.selections === !1 ? e.selections = !1 : Xt.value.length > 0 || Array.isArray(s.rowSelection.selections) ? e.selections = [...Array.isArray(s.rowSelection.selections) ? s.rowSelection.selections : [], ...Xt.value] : "selections" in s.rowSelection || (e.selections = !0), e;
6253
+ });
6254
+ return t({
6230
6255
  fetchData: Pt,
6231
6256
  getSelectedRowKeys: () => Ht.value,
6232
6257
  getSelectedRows: () => Ut.value,
@@ -6261,7 +6286,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6261
6286
  "data-table-id": s.tableId
6262
6287
  }, [u(M(fe), { "get-popup-container": Qe.value }, {
6263
6288
  default: N(() => [
6264
- re(e.$slots, "search", {}, () => [s.search === !1 ? a("", !0) : (O(), i(wc, {
6289
+ re(e.$slots, "search", {}, () => [s.search === !1 ? a("", !0) : (O(), i(Tc, {
6265
6290
  key: 0,
6266
6291
  ref_key: "searchRef",
6267
6292
  ref: Xe,
@@ -6270,7 +6295,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6270
6295
  onSearch: It,
6271
6296
  onReset: Lt
6272
6297
  }, null, 8, ["columns", "search-config"]))], !0),
6273
- re(e.$slots, "toolbar", {}, () => [s.toolbar === !1 ? a("", !0) : (O(), i(Lc, {
6298
+ re(e.$slots, "toolbar", {}, () => [s.toolbar === !1 ? a("", !0) : (O(), i(Rc, {
6274
6299
  key: 0,
6275
6300
  title: s.title,
6276
6301
  "toolbar-config": I.value,
@@ -6319,7 +6344,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6319
6344
  "exporting",
6320
6345
  "importing"
6321
6346
  ]))], !0),
6322
- u(yc, y(e.$attrs, {
6347
+ u(bc, y(e.$attrs, {
6323
6348
  bordered: Je.value,
6324
6349
  columns: K.value,
6325
6350
  "data-source": _.value,
@@ -6333,12 +6358,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6333
6358
  expandable: s.expandable,
6334
6359
  "row-key": p.value,
6335
6360
  "row-class-name": $t,
6336
- "row-selection": s.rowSelection ? {
6337
- ...s.rowSelection,
6338
- selectedRowKeys: Ht.value,
6339
- selections: [...Array.isArray(s.rowSelection.selections) ? s.rowSelection.selections : [], ...Xt.value],
6340
- onChange: qt
6341
- } : void 0,
6361
+ "row-selection": en.value,
6342
6362
  onRetry: Pt,
6343
6363
  onResizeColumn: vt,
6344
6364
  onChange: Vt
@@ -6360,7 +6380,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6360
6380
  "row-key",
6361
6381
  "row-selection"
6362
6382
  ]),
6363
- u(xc, {
6383
+ u(Sc, {
6364
6384
  visible: M(Ce),
6365
6385
  "onUpdate:visible": t[0] ||= (e) => v(Ce) ? Ce.value = e : null,
6366
6386
  columns: s.columns,
@@ -6373,7 +6393,7 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6373
6393
  "selected-count",
6374
6394
  "row-key"
6375
6395
  ]),
6376
- u(Kc, {
6396
+ u(qc, {
6377
6397
  visible: M(Ne),
6378
6398
  "onUpdate:visible": t[1] ||= (e) => v(Ne) ? Ne.value = e : null,
6379
6399
  importing: M(Ae),
@@ -6399,12 +6419,12 @@ var ac = { class: "bw-pro-table-column-search" }, oc = { class: "bw-pro-table-co
6399
6419
  ])
6400
6420
  ]),
6401
6421
  _: 3
6402
- }, 8, ["get-popup-container"])], 8, qc));
6422
+ }, 8, ["get-popup-container"])], 8, Jc));
6403
6423
  }
6404
- }), [["__scopeId", "data-v-88c39eec"]]);
6424
+ }), [["__scopeId", "data-v-ce85e68e"]]);
6405
6425
  //#endregion
6406
6426
  //#region composables/useQueryParams.ts
6407
- function Yc(e = {}) {
6427
+ function Xc(e = {}) {
6408
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(() => ({
6409
6429
  current: i.value,
6410
6430
  pageSize: a.value,
@@ -6445,7 +6465,7 @@ function Yc(e = {}) {
6445
6465
  }
6446
6466
  //#endregion
6447
6467
  //#region composables/useBwRowSelection.ts
6448
- function Xc(e) {
6468
+ function Zc(e) {
6449
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(() => {
6450
6470
  let e = t.value?.length ?? 0;
6451
6471
  return e === 0 ? !1 : o.value.length >= e;
@@ -6494,7 +6514,7 @@ function Xc(e) {
6494
6514
  }
6495
6515
  //#endregion
6496
6516
  //#region composables/useContextMenu.ts
6497
- function Zc(e = {}) {
6517
+ function Qc(e = {}) {
6498
6518
  let t = ma(e.locale), { config: n } = e, r = k({
6499
6519
  visible: !1,
6500
6520
  type: "row",
@@ -6652,7 +6672,7 @@ function Zc(e = {}) {
6652
6672
  }
6653
6673
  //#endregion
6654
6674
  //#region composables/useDragSort.ts
6655
- function Qc(e) {
6675
+ function $c(e) {
6656
6676
  let { dataSource: t, columns: n, dragConfig: r, onRowDragEnd: i } = e, a = k(!1), o = k(null);
6657
6677
  function s(e) {
6658
6678
  r?.value?.rowDraggable !== !1 && (a.value = !0, o.value = {
@@ -6690,7 +6710,7 @@ function Qc(e) {
6690
6710
  }
6691
6711
  //#endregion
6692
6712
  //#region composables/useBwKeyboard.ts
6693
- function $c(e) {
6713
+ function el(e) {
6694
6714
  if (window.isSecureContext && navigator.clipboard?.writeText) return navigator.clipboard.writeText(e);
6695
6715
  try {
6696
6716
  let t = document.createElement("textarea");
@@ -6699,8 +6719,8 @@ function $c(e) {
6699
6719
  return Promise.reject(/* @__PURE__ */ Error("Clipboard write not available"));
6700
6720
  }
6701
6721
  }
6702
- var { UP: el, DOWN: tl, LEFT: nl, RIGHT: rl, TAB: il, ENTER: al, ESCAPE: ol, SPACE: sl, DELETE: cl } = ua;
6703
- function ll(e) {
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) {
6704
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);
6705
6725
  function d(e, t) {
6706
6726
  r.value = {
@@ -6716,38 +6736,38 @@ function ll(e) {
6716
6736
  if (!p) return;
6717
6737
  let m = typeof e.dataLength == "number" ? e.dataLength : t.value, h = n.value || 1, g = o.ctrlKey || o.metaKey;
6718
6738
  switch (o.key) {
6719
- case el:
6739
+ case tl:
6720
6740
  o.preventDefault(), p.rowIndex > 0 && d(p.rowIndex - 1, p.colIndex);
6721
6741
  break;
6722
- case tl:
6742
+ case nl:
6723
6743
  o.preventDefault(), p.rowIndex < m - 1 && d(p.rowIndex + 1, p.colIndex);
6724
6744
  break;
6725
- case nl:
6745
+ case rl:
6726
6746
  o.preventDefault(), p.colIndex > 0 && d(p.rowIndex, p.colIndex - 1);
6727
6747
  break;
6728
- case rl:
6748
+ case il:
6729
6749
  o.preventDefault(), p.colIndex < h - 1 && d(p.rowIndex, p.colIndex + 1);
6730
6750
  break;
6731
- case il:
6751
+ case al:
6732
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);
6733
6753
  break;
6734
- case al:
6754
+ case ol:
6735
6755
  o.preventDefault(), a.value ? s.value?.(p.rowIndex, p.colIndex) : u.value?.(p.rowIndex);
6736
6756
  break;
6737
- case ol:
6757
+ case sl:
6738
6758
  o.preventDefault(), a.value && c.value?.();
6739
6759
  break;
6740
- case sl:
6760
+ case cl:
6741
6761
  o.preventDefault();
6742
6762
  break;
6743
- case cl:
6763
+ case ll:
6744
6764
  o.preventDefault(), l.value?.(p.rowIndex);
6745
6765
  break;
6746
6766
  default:
6747
6767
  if (g && o.key === "c") {
6748
6768
  o.preventDefault();
6749
6769
  let e = window.getSelection()?.toString();
6750
- e && $c(e).catch(() => {});
6770
+ e && el(e).catch(() => {});
6751
6771
  }
6752
6772
  g && o.key === "v" && (o.preventDefault(), window.isSecureContext && navigator.clipboard?.readText && navigator.clipboard.readText().then((e) => {
6753
6773
  i.value = e;
@@ -6770,7 +6790,7 @@ function ll(e) {
6770
6790
  }
6771
6791
  //#endregion
6772
6792
  //#region composables/useTableView.ts
6773
- function ul(e) {
6793
+ function dl(e) {
6774
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);
6775
6795
  function c() {
6776
6796
  try {
@@ -6858,7 +6878,7 @@ function ul(e) {
6858
6878
  }
6859
6879
  //#endregion
6860
6880
  //#region composables/useBwPermission.ts
6861
- function dl(e) {
6881
+ function fl(e) {
6862
6882
  let { columns: t, permissions: n } = e, i = r(() => n?.value ?? []), a = r(() => {
6863
6883
  let e = t.value ?? [];
6864
6884
  return i.value.length === 0 ? e : e.map((e) => {
@@ -6902,7 +6922,7 @@ function dl(e) {
6902
6922
  }
6903
6923
  //#endregion
6904
6924
  //#region composables/useColumnHeaderSearch.ts
6905
- function fl(e) {
6925
+ function pl(e) {
6906
6926
  let { columns: t } = e, n = k({});
6907
6927
  function i(e, t) {
6908
6928
  n.value = {
@@ -6939,4 +6959,4 @@ function fl(e) {
6939
6959
  };
6940
6960
  }
6941
6961
  //#endregion
6942
- export { ka as BW_PRO_TABLE_KEY, pa as BW_PRO_TABLE_LOCALE_KEY, Jc as BwProTable, sa as DEFAULT_DATE_FORMAT, ta as DEFAULT_EMPTY_TEXT, $i as DEFAULT_PAGE_SIZE, Na as defineColumnType, tc as ensureRenderers, rc as getRendererSafe, nc as initBuiltinRenderers, ha as mergeLocale, ic as resetRenderers, ll as useBwKeyboard, dl as useBwPermission, va as useBwRowEdit, Xc as useBwRowSelection, fl as useColumnHeaderSearch, Zc as useContextMenu, Qc as useDragSort, Ta as useExportExcel, Oa as useImportExcel, ma as useLocale, Sa as usePersistence, Yc as useQueryParams, ul as useTableView, fa as zhCN };
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 };