@g1cloud/bluesea 5.0.0-alpha.27 → 5.0.0-alpha.28

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.
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, ref, onMounted, openBlock, createBlock, withCtx, createElementVNode, createVNode, unref } from "vue";
2
- import { S as SearchParam, P as PaginatedList, u as useModalHandle, _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, B as BSButton, w as waitDuring } from "./index-HfcvhifI.js";
2
+ import { S as SearchParam, P as PaginatedList, u as useModalHandle, _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, B as BSButton, w as waitDuring } from "./index-COZgQfMT.js";
3
3
  const gridColumns = [
4
4
  { propertyId: "zipCode", caption: "Zipcode", width: 80 },
5
5
  { propertyId: "address1", caption: "state/province/region", width: 150 },
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, withDirectives, createVNode, unref } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-HfcvhifI.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-COZgQfMT.js";
3
3
  const _hoisted_1 = { class: "text-right" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "BSAlertModal",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, withDirectives, unref } from "vue";
2
- import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-HfcvhifI.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-COZgQfMT.js";
3
3
  const _hoisted_1 = { class: "text-right" };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
5
  __name: "BSYesNoModal",
package/dist/bluesea.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aw, ax, d, W, B, H, p, q, j, $, aT, n, o, G, b, E, a, X, h, K, J, T, aN, Y, _, R, Q, O, N, y, U, Z, l, k, f, A, m, i, r, s, D, x, I, V, C, F, g, L, M, z, t, e, aE, aD, a6, a1, aX, a0, ad, aa, a7, aC, af, ae, a$, aA, ac, aB, az, ay, a9, P, av, as, S, ag, aF, aM, aL, a4, a5, aW, aY, ab, aQ, a8, aK, aq, ar, ao, ap, an, ai, b2, b0, aI, a3, ah, aJ, ak, aH, b1, aR, aG, b5, aZ, aP, at, aS, aj, b4, aU, aV, a_, aO, u, au, a2, c, al, am, w, b3 } from "./index-HfcvhifI.js";
1
+ import { aw, ax, d, W, B, H, p, q, j, $, aT, n, o, G, b, E, a, X, h, K, J, T, aN, Y, _, R, Q, O, N, y, U, Z, l, k, f, A, m, i, r, s, D, x, I, V, C, F, g, L, M, z, t, e, aE, aD, a6, a1, aX, a0, ad, aa, a7, aC, af, ae, a$, aA, ac, aB, az, ay, a9, P, av, as, S, ag, aF, aM, aL, a4, a5, aW, aY, ab, aQ, a8, aK, aq, ar, ao, ap, an, ai, b2, b0, aI, a3, ah, aJ, ak, aH, b1, aR, aG, b5, aZ, aP, at, aS, aj, b4, aU, aV, a_, aO, u, au, a2, c, al, am, w, b3 } from "./index-COZgQfMT.js";
2
2
  export {
3
3
  aw as AbstractFilter,
4
4
  ax as AndFilter,
@@ -226,7 +226,7 @@ var __publicField = (obj, key, value) => {
226
226
  key: 0,
227
227
  class: "label"
228
228
  };
229
- const _hoisted_4$e = {
229
+ const _hoisted_4$g = {
230
230
  key: 1,
231
231
  class: "sub-items"
232
232
  };
@@ -309,7 +309,7 @@ var __publicField = (obj, key, value) => {
309
309
  item ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("label", _hoisted_3$r, null, 512)), [
310
310
  [vue.unref(vT), _ctx.itemLabel(item)]
311
311
  ]) : vue.createCommentVNode("", true),
312
- _ctx.tree && hasSubItems(item) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$e)) : vue.createCommentVNode("", true)
312
+ _ctx.tree && hasSubItems(item) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$g)) : vue.createCommentVNode("", true)
313
313
  ], 42, _hoisted_1$10);
314
314
  }), 128))
315
315
  ]),
@@ -985,14 +985,23 @@ var __publicField = (obj, key, value) => {
985
985
  } else {
986
986
  window.setTimeout(func, millis);
987
987
  }
988
+ },
989
+ toMultiLangTextArray(texts) {
990
+ if (!texts)
991
+ return [];
992
+ return Array.isArray(texts) ? texts : [texts];
988
993
  }
989
994
  };
990
- const _hoisted_1$Y = ["textContent"];
991
- const _hoisted_2$M = {
995
+ const _hoisted_1$Y = {
996
+ key: 0,
997
+ class: "view-mode"
998
+ };
999
+ const _hoisted_2$M = ["textContent"];
1000
+ const _hoisted_3$p = {
992
1001
  key: 1,
993
1002
  class: "input-area"
994
1003
  };
995
- const _hoisted_3$p = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
1004
+ const _hoisted_4$f = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
996
1005
  const _sfc_main$15 = /* @__PURE__ */ vue.defineComponent({
997
1006
  __name: "BSTextInput",
998
1007
  props: {
@@ -1007,6 +1016,8 @@ var __publicField = (obj, key, value) => {
1007
1016
  autocomplete: {},
1008
1017
  tabindex: { default: 0 },
1009
1018
  inputType: { default: "text" },
1019
+ prefix: {},
1020
+ suffix: {},
1010
1021
  required: { type: Boolean },
1011
1022
  minLength: {},
1012
1023
  maxLength: {},
@@ -1076,11 +1087,32 @@ var __publicField = (obj, key, value) => {
1076
1087
  class: vue.normalizeClass([{ required: _ctx.required, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0 }, "bs-text-input"]),
1077
1088
  style: vue.normalizeStyle({ width: _ctx.width })
1078
1089
  }, [
1079
- _ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", {
1080
- key: 0,
1081
- class: "view-mode",
1082
- textContent: vue.toDisplayString(vue.unref(stringValue))
1083
- }, null, 8, _hoisted_1$Y)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$M, [
1090
+ _ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$Y, [
1091
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1092
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1093
+ key: JSON.stringify(text)
1094
+ })), [
1095
+ [vue.unref(vT), text]
1096
+ ]);
1097
+ }), 128)),
1098
+ vue.createElementVNode("span", {
1099
+ textContent: vue.toDisplayString(vue.unref(stringValue))
1100
+ }, null, 8, _hoisted_2$M),
1101
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1102
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1103
+ key: JSON.stringify(text)
1104
+ })), [
1105
+ [vue.unref(vT), text]
1106
+ ]);
1107
+ }), 128))
1108
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$p, [
1109
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1110
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1111
+ key: JSON.stringify(text)
1112
+ })), [
1113
+ [vue.unref(vT), text]
1114
+ ]);
1115
+ }), 128)),
1084
1116
  vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
1085
1117
  id: _ctx.id,
1086
1118
  ref_key: "field",
@@ -1092,7 +1124,7 @@ var __publicField = (obj, key, value) => {
1092
1124
  name: _ctx.name,
1093
1125
  tabindex: _ctx.tabindex,
1094
1126
  type: _ctx.inputType
1095
- }, vue.toHandlers(handlers2, true)), null, 16, _hoisted_3$p), [
1127
+ }, vue.toHandlers(handlers2, true)), null, 16, _hoisted_4$f), [
1096
1128
  [vue.vModelDynamic, vue.unref(stringValue)],
1097
1129
  [
1098
1130
  vue.unref(vT),
@@ -1100,7 +1132,14 @@ var __publicField = (obj, key, value) => {
1100
1132
  void 0,
1101
1133
  { placeholder: true }
1102
1134
  ]
1103
- ])
1135
+ ]),
1136
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1137
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1138
+ key: JSON.stringify(text)
1139
+ })), [
1140
+ [vue.unref(vT), text]
1141
+ ]);
1142
+ }), 128))
1104
1143
  ])),
1105
1144
  vue.createVNode(_sfc_main$1a, { errors: vue.unref(errors) }, null, 8, ["errors"])
1106
1145
  ], 6);
@@ -1143,9 +1182,9 @@ var __publicField = (obj, key, value) => {
1143
1182
  key: 1,
1144
1183
  class: "indeterminate"
1145
1184
  };
1146
- const _hoisted_4$d = /* @__PURE__ */ vue.createElementVNode("div", { class: "in-box" }, null, -1);
1185
+ const _hoisted_4$e = /* @__PURE__ */ vue.createElementVNode("div", { class: "in-box" }, null, -1);
1147
1186
  const _hoisted_5$c = [
1148
- _hoisted_4$d
1187
+ _hoisted_4$e
1149
1188
  ];
1150
1189
  const _sfc_main$13 = /* @__PURE__ */ vue.defineComponent({
1151
1190
  __name: "BSProgressBar",
@@ -1429,12 +1468,16 @@ var __publicField = (obj, key, value) => {
1429
1468
  return tmp.textContent || tmp.innerText;
1430
1469
  }
1431
1470
  };
1432
- const _hoisted_1$U = ["textContent"];
1433
- const _hoisted_2$I = {
1471
+ const _hoisted_1$U = {
1472
+ key: 0,
1473
+ class: "view-mode"
1474
+ };
1475
+ const _hoisted_2$I = ["textContent"];
1476
+ const _hoisted_3$m = {
1434
1477
  key: 1,
1435
1478
  class: "input-area"
1436
1479
  };
1437
- const _hoisted_3$m = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
1480
+ const _hoisted_4$d = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
1438
1481
  const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
1439
1482
  __name: "BSNumberInput",
1440
1483
  props: {
@@ -1448,6 +1491,8 @@ var __publicField = (obj, key, value) => {
1448
1491
  width: { default: "200px" },
1449
1492
  autocomplete: {},
1450
1493
  tabindex: { default: 0 },
1494
+ prefix: {},
1495
+ suffix: {},
1451
1496
  formatInViewMode: { type: Boolean, default: true },
1452
1497
  formatOnBlur: { type: Boolean, default: true },
1453
1498
  required: { type: Boolean },
@@ -1534,11 +1579,32 @@ var __publicField = (obj, key, value) => {
1534
1579
  class: vue.normalizeClass([{ required: _ctx.required, disabled: _ctx.disabled, modified: modified.value, error: vue.unref(errors).length > 0 }, "bs-number-input"]),
1535
1580
  style: vue.normalizeStyle({ width: _ctx.width })
1536
1581
  }, [
1537
- _ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", {
1538
- key: 0,
1539
- class: "view-mode",
1540
- textContent: vue.toDisplayString(_ctx.formatInViewMode ? formattedStringValue.value : vue.unref(stringValue))
1541
- }, null, 8, _hoisted_1$U)) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$I, [
1582
+ _ctx.viewMode ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$U, [
1583
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1584
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1585
+ key: JSON.stringify(text)
1586
+ })), [
1587
+ [vue.unref(vT), text]
1588
+ ]);
1589
+ }), 128)),
1590
+ vue.createElementVNode("span", {
1591
+ textContent: vue.toDisplayString(_ctx.formatInViewMode ? formattedStringValue.value : vue.unref(stringValue))
1592
+ }, null, 8, _hoisted_2$I),
1593
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1594
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1595
+ key: JSON.stringify(text)
1596
+ })), [
1597
+ [vue.unref(vT), text]
1598
+ ]);
1599
+ }), 128))
1600
+ ])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$m, [
1601
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1602
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1603
+ key: JSON.stringify(text)
1604
+ })), [
1605
+ [vue.unref(vT), text]
1606
+ ]);
1607
+ }), 128)),
1542
1608
  vue.withDirectives(vue.createElementVNode("input", vue.mergeProps({
1543
1609
  id: _ctx.id,
1544
1610
  ref_key: "field",
@@ -1550,14 +1616,21 @@ var __publicField = (obj, key, value) => {
1550
1616
  tabindex: _ctx.tabindex,
1551
1617
  value: focused.value || !_ctx.formatOnBlur ? vue.unref(stringValue) : formattedStringValue.value,
1552
1618
  type: "text"
1553
- }, vue.toHandlers(handlers2, true)), null, 16, _hoisted_3$m), [
1619
+ }, vue.toHandlers(handlers2, true)), null, 16, _hoisted_4$d), [
1554
1620
  [
1555
1621
  vue.unref(vT),
1556
1622
  _ctx.placeholder,
1557
1623
  void 0,
1558
1624
  { placeholder: true }
1559
1625
  ]
1560
- ])
1626
+ ]),
1627
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1628
+ return vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", {
1629
+ key: JSON.stringify(text)
1630
+ })), [
1631
+ [vue.unref(vT), text]
1632
+ ]);
1633
+ }), 128))
1561
1634
  ])),
1562
1635
  vue.createVNode(_sfc_main$1a, { errors: vue.unref(errors) }, null, 8, ["errors"])
1563
1636
  ], 6);
@@ -1623,8 +1696,8 @@ var __publicField = (obj, key, value) => {
1623
1696
  });
1624
1697
  const isValid = async (value, phase) => {
1625
1698
  const errors2 = [];
1626
- executeRequiredValidation(value == null ? void 0 : value.value, props.required, props.validationMessageRequired, errors2) || value !== void 0 && value.value !== void 0 && executeBetweenValueValidation(
1627
- value.value,
1699
+ executeRequiredValidation(value == null ? void 0 : value.amount, props.required, props.validationMessageRequired, errors2) || value !== void 0 && value.amount !== void 0 && executeBetweenValueValidation(
1700
+ value.amount,
1628
1701
  props.minValue,
1629
1702
  props.validationMessageMinValue,
1630
1703
  props.maxValue,
@@ -1636,10 +1709,10 @@ var __publicField = (obj, key, value) => {
1636
1709
  };
1637
1710
  const convertToValue = (stringValue2) => {
1638
1711
  const value = stringValue2 ? Number(stringValue2) : NaN;
1639
- return { value: isNaN(value) ? void 0 : value, currency: currencyCode.value };
1712
+ return { amount: isNaN(value) ? void 0 : value, currency: currencyCode.value };
1640
1713
  };
1641
1714
  const convertFromValue = (value) => {
1642
- return (value == null ? void 0 : value.value) !== void 0 ? String(value.value) : "";
1715
+ return (value == null ? void 0 : value.amount) !== void 0 ? String(value.amount) : "";
1643
1716
  };
1644
1717
  const validationDisabled = vue.computed(() => props.viewMode || props.disabled);
1645
1718
  const { stringValue, errors, handleInput, handleChange, handleFocus, handleBlur } = fieldValidator({
@@ -1672,10 +1745,10 @@ var __publicField = (obj, key, value) => {
1672
1745
  field,
1673
1746
  getCurrentValue: () => props.modelValue,
1674
1747
  setCurrentValue: (value) => emit("update:modelValue", value || {
1675
- value: void 0,
1748
+ amount: void 0,
1676
1749
  currency: currencyCode.value
1677
1750
  }),
1678
- compare: (savedValue, currentValue) => (savedValue == null ? void 0 : savedValue.value) === (currentValue == null ? void 0 : currentValue.value) && (savedValue == null ? void 0 : savedValue.currency) === (currentValue == null ? void 0 : currentValue.currency)
1751
+ compare: (savedValue, currentValue) => (savedValue == null ? void 0 : savedValue.amount) === (currentValue == null ? void 0 : currentValue.amount) && (savedValue == null ? void 0 : savedValue.currency) === (currentValue == null ? void 0 : currentValue.currency)
1679
1752
  });
1680
1753
  const modified = vue.computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
1681
1754
  return (_ctx, _cache) => {
@@ -28427,7 +28500,7 @@ img.ProseMirror-separator {
28427
28500
  this.grid = vue.reactive({
28428
28501
  pageInfo: {
28429
28502
  offset: 0,
28430
- limit: 100,
28503
+ limit: this.searchParam.limit,
28431
28504
  totalCount: 0
28432
28505
  },
28433
28506
  sorts: this.searchParam.sorts,
@@ -28442,7 +28515,7 @@ img.ProseMirror-separator {
28442
28515
  await this.loadGridData();
28443
28516
  },
28444
28517
  "update:sorts": async (_sorts) => {
28445
- await this.loadGridData();
28518
+ await this.loadGridData(0);
28446
28519
  }
28447
28520
  };
28448
28521
  this.control = vue.reactive({
@@ -28453,14 +28526,16 @@ img.ProseMirror-separator {
28453
28526
  this.controlEventListener = {
28454
28527
  "update:limit": async (limit) => {
28455
28528
  this.searchParam.limit = limit;
28456
- await this.loadGridData();
28529
+ if (this.grid.pageInfo)
28530
+ this.grid.pageInfo.limit = limit;
28531
+ await this.loadGridData(0);
28457
28532
  },
28458
28533
  refresh: async () => {
28459
28534
  await this.loadGridData();
28460
28535
  },
28461
28536
  clearFilter: async () => {
28462
28537
  this.searchParam.gridFilter = {};
28463
- await this.loadGridData();
28538
+ await this.loadGridData(0);
28464
28539
  }
28465
28540
  };
28466
28541
  this.lookup = vue.reactive({
@@ -28472,7 +28547,7 @@ img.ProseMirror-separator {
28472
28547
  },
28473
28548
  search: async () => {
28474
28549
  this.searchParam.gridFilter = {};
28475
- await this.loadGridData();
28550
+ await this.loadGridData(0);
28476
28551
  }
28477
28552
  };
28478
28553
  this.selectDeleteSupport = new GridHandlerSelectDeleteSupport(
@@ -28491,14 +28566,23 @@ img.ProseMirror-separator {
28491
28566
  getModifiedRows() {
28492
28567
  return [];
28493
28568
  }
28494
- async loadGridData() {
28569
+ getDeletedRows() {
28570
+ return this.selectDeleteSupport.deletedRows;
28571
+ }
28572
+ /**
28573
+ *
28574
+ * @param offset
28575
+ */
28576
+ async loadGridData(offset2) {
28495
28577
  this.grid.loading = true;
28578
+ if (offset2 !== void 0)
28579
+ this.searchParam.offset = offset2;
28496
28580
  const result = await this.option.getGridData(this.searchParam);
28497
28581
  this.doSetSearchResult(result);
28498
28582
  this.grid.loading = false;
28499
28583
  }
28500
28584
  doSetSearchResult(result) {
28501
- this.selectDeleteSupport.clearSelection();
28585
+ this.selectDeleteSupport.clear();
28502
28586
  if (this.grid.pageInfo)
28503
28587
  this.grid.pageInfo.offset = result.offset;
28504
28588
  if (this.grid.pageInfo)
@@ -28564,11 +28648,14 @@ img.ProseMirror-separator {
28564
28648
  }
28565
28649
  setGridData(data) {
28566
28650
  this.grid.data = data;
28567
- this.selectDeleteSupport.clearSelection();
28651
+ this.selectDeleteSupport.clear();
28568
28652
  }
28569
28653
  getSelectedRows() {
28570
28654
  return this.selectDeleteSupport.selectedRows;
28571
28655
  }
28656
+ getDeletedRows() {
28657
+ return this.selectDeleteSupport.deletedRows;
28658
+ }
28572
28659
  getAddedRows() {
28573
28660
  return [];
28574
28661
  }
@@ -28611,6 +28698,7 @@ img.ProseMirror-separator {
28611
28698
  class GridHandlerSelectDeleteSupport {
28612
28699
  constructor(grid, control, controlEventListener, removeRowHandler) {
28613
28700
  __publicField(this, "selectedRows", /* @__PURE__ */ new Set());
28701
+ __publicField(this, "deletedRows", []);
28614
28702
  __publicField(this, "isAddedRow");
28615
28703
  __publicField(this, "removeIfAddedRow");
28616
28704
  this.grid = grid;
@@ -28633,16 +28721,19 @@ img.ProseMirror-separator {
28633
28721
  (_a = this.grid.editingRows) == null ? void 0 : _a.removeRow(item);
28634
28722
  if ((_b = this.isAddedRow) == null ? void 0 : _b.call(this, item))
28635
28723
  (_c = this.removeIfAddedRow) == null ? void 0 : _c.call(this, item);
28636
- else
28637
- this.grid.data.splice(index, 1);
28724
+ else {
28725
+ const deleted = this.grid.data.splice(index, 1);
28726
+ this.deletedRows.push(deleted[0]);
28727
+ }
28638
28728
  }
28639
28729
  });
28640
28730
  this.selectedRows.clear();
28641
28731
  }
28642
28732
  }
28643
28733
  }
28644
- clearSelection() {
28734
+ clear() {
28645
28735
  this.selectedRows.clear();
28736
+ this.deletedRows.splice(0, this.deletedRows.length);
28646
28737
  }
28647
28738
  }
28648
28739
  let lastAddedRowIndex = 0;
@@ -28867,10 +28958,13 @@ img.ProseMirror-separator {
28867
28958
  columns: {},
28868
28959
  fixed: { type: Boolean },
28869
28960
  row: {},
28870
- editing: { type: Boolean }
28961
+ editing: { type: Boolean },
28962
+ selectOnClick: { type: Boolean }
28871
28963
  },
28872
- setup(__props) {
28964
+ emits: ["toggleSelection"],
28965
+ setup(__props, { emit: __emit }) {
28873
28966
  const props = __props;
28967
+ const emit = __emit;
28874
28968
  const tdStyleCss = vue.computed(() => {
28875
28969
  return {
28876
28970
  minWidth: `${props.column.width || DEFAULT_GRID_COLUMN_WIDTH}px`,
@@ -28882,7 +28976,8 @@ img.ProseMirror-separator {
28882
28976
  return {
28883
28977
  fixed: props.fixed,
28884
28978
  "text-right": ["NUMBER", "PERCENTAGE"].includes(props.column.cellType || ""),
28885
- editing: props.editing
28979
+ editing: props.editing,
28980
+ "cursor-pointer": props.selectOnClick
28886
28981
  };
28887
28982
  });
28888
28983
  const styleCss = vue.computed(() => {
@@ -28915,10 +29010,16 @@ img.ProseMirror-separator {
28915
29010
  return cellValue.value;
28916
29011
  }
28917
29012
  });
29013
+ const clickTd = () => {
29014
+ if (props.selectOnClick) {
29015
+ emit("toggleSelection", props.column);
29016
+ }
29017
+ };
28918
29018
  return (_ctx, _cache) => {
28919
29019
  return vue.openBlock(), vue.createElementBlock("td", {
28920
29020
  class: vue.normalizeClass(tdStyleClass.value),
28921
- style: vue.normalizeStyle(tdStyleCss.value)
29021
+ style: vue.normalizeStyle(tdStyleCss.value),
29022
+ onClick: clickTd
28922
29023
  }, [
28923
29024
  vue.createElementVNode("div", {
28924
29025
  class: vue.normalizeClass(styleClass.value),
@@ -29012,7 +29113,8 @@ img.ProseMirror-separator {
29012
29113
  selectedRows: {},
29013
29114
  editable: { type: Boolean },
29014
29115
  editingRow: {},
29015
- isEditing: { type: Boolean }
29116
+ isEditing: { type: Boolean },
29117
+ selectOnClick: { type: Boolean }
29016
29118
  },
29017
29119
  emits: ["toggleSelection", "enterEditMode", "cancelEditMode"],
29018
29120
  setup(__props, { emit: __emit }) {
@@ -29077,7 +29179,9 @@ img.ProseMirror-separator {
29077
29179
  columns: _ctx.columns,
29078
29180
  editing: _ctx.isEditing,
29079
29181
  fixed: index < _ctx.fixedColumns,
29080
- row: _ctx.row
29182
+ row: _ctx.row,
29183
+ "select-on-click": _ctx.selectOnClick,
29184
+ onToggleSelection: toggleSelection
29081
29185
  }, {
29082
29186
  [column.propertyId]: vue.withCtx(({ row, cell }) => [
29083
29187
  vue.renderSlot(_ctx.$slots, column.propertyId, {
@@ -29092,7 +29196,7 @@ img.ProseMirror-separator {
29092
29196
  })
29093
29197
  ]),
29094
29198
  _: 2
29095
- }, 1032, ["column", "columns", "editing", "fixed", "row"]);
29199
+ }, 1032, ["column", "columns", "editing", "fixed", "row", "select-on-click"]);
29096
29200
  }), 128))
29097
29201
  ], 34);
29098
29202
  };
@@ -29122,6 +29226,7 @@ img.ProseMirror-separator {
29122
29226
  showSerial: { type: Boolean },
29123
29227
  showCheckbox: { type: Boolean },
29124
29228
  showPageNavigation: { type: Boolean },
29229
+ selectOnClick: { type: Boolean },
29125
29230
  keyProvider: { default: () => emptyKeyProvider },
29126
29231
  selectedRows: {},
29127
29232
  editable: { type: Boolean },
@@ -29250,6 +29355,7 @@ img.ProseMirror-separator {
29250
29355
  "page-info": _ctx.pageInfo,
29251
29356
  row,
29252
29357
  "row-index": index,
29358
+ "select-on-click": _ctx.selectOnClick,
29253
29359
  "selected-rows": vue.unref(internalSelectedRows),
29254
29360
  "show-checkbox": _ctx.showCheckbox,
29255
29361
  "show-serial": _ctx.showSerial,
@@ -29269,7 +29375,7 @@ img.ProseMirror-separator {
29269
29375
  ])
29270
29376
  };
29271
29377
  })
29272
- ]), 1032, ["columns", "editable", "editing-row", "fixed-columns", "is-editing", "page-info", "row", "row-index", "selected-rows", "show-checkbox", "show-serial", "visible-columns"]);
29378
+ ]), 1032, ["columns", "editable", "editing-row", "fixed-columns", "is-editing", "page-info", "row", "row-index", "select-on-click", "selected-rows", "show-checkbox", "show-serial", "visible-columns"]);
29273
29379
  }), 128)) : vue.createCommentVNode("", true)
29274
29380
  ])
29275
29381
  ], 512)
@@ -15,6 +15,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
15
15
  editingRows?: EditingRows<T> | undefined;
16
16
  onOffsetChanged?: ((offset: number, currentPageInfo: PageInfo) => any) | undefined;
17
17
  columns: Column[];
18
+ selectOnClick?: boolean | undefined;
18
19
  showSerial?: boolean | undefined;
19
20
  showCheckbox?: boolean | undefined;
20
21
  "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
@@ -50,6 +51,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
50
51
  editingRows?: EditingRows<T> | undefined;
51
52
  onOffsetChanged?: ((offset: number, currentPageInfo: PageInfo) => any) | undefined;
52
53
  columns: Column[];
54
+ selectOnClick?: boolean | undefined;
53
55
  showSerial?: boolean | undefined;
54
56
  showCheckbox?: boolean | undefined;
55
57
  "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
@@ -89,6 +91,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
89
91
  editingRows?: EditingRows<T> | undefined;
90
92
  onOffsetChanged?: ((offset: number, currentPageInfo: PageInfo) => any) | undefined;
91
93
  columns: Column[];
94
+ selectOnClick?: boolean | undefined;
92
95
  showSerial?: boolean | undefined;
93
96
  showCheckbox?: boolean | undefined;
94
97
  "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
@@ -5,7 +5,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
5
5
  row: T;
6
6
  column: Column;
7
7
  columns: Column[];
8
+ onToggleSelection?: ((column: Column) => any) | undefined;
8
9
  editing?: boolean | undefined;
10
+ selectOnClick?: boolean | undefined;
9
11
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, __VLS_ctx?: {
10
12
  attrs: any;
11
13
  slots: Partial<Record<`${string}Edit`, (_: {
@@ -15,14 +17,16 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
15
17
  cell: any;
16
18
  row: T;
17
19
  }) => any>>;
18
- emit: any;
20
+ emit: (e: 'toggleSelection', column: Column) => void;
19
21
  } | undefined, __VLS_expose?: ((exposed: import('vue').ShallowUnwrapRef<{}>) => void) | undefined, __VLS_setup?: Promise<{
20
22
  props: {
21
23
  fixed: boolean;
22
24
  row: T;
23
25
  column: Column;
24
26
  columns: Column[];
27
+ onToggleSelection?: ((column: Column) => any) | undefined;
25
28
  editing?: boolean | undefined;
29
+ selectOnClick?: boolean | undefined;
26
30
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
27
31
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
28
32
  attrs: any;
@@ -33,7 +37,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
33
37
  cell: any;
34
38
  row: T;
35
39
  }) => any>>;
36
- emit: any;
40
+ emit: (e: 'toggleSelection', column: Column) => void;
37
41
  }>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
38
42
  [key: string]: any;
39
43
  }> & {
@@ -43,7 +47,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
43
47
  row: T;
44
48
  column: Column;
45
49
  columns: Column[];
50
+ onToggleSelection?: ((column: Column) => any) | undefined;
46
51
  editing?: boolean | undefined;
52
+ selectOnClick?: boolean | undefined;
47
53
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
48
54
  expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
49
55
  attrs: any;
@@ -54,7 +60,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
54
60
  cell: any;
55
61
  row: T;
56
62
  }) => any>>;
57
- emit: any;
63
+ emit: (e: 'toggleSelection', column: Column) => void;
58
64
  } | undefined;
59
65
  };
60
66
  export default _default;
@@ -7,8 +7,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
7
7
  selectedRows: Set<T>;
8
8
  row: T;
9
9
  columns: Column[];
10
- isEditing: boolean;
11
10
  onToggleSelection?: ((row: T) => any) | undefined;
11
+ selectOnClick?: boolean | undefined;
12
+ isEditing: boolean;
12
13
  onEnterEditMode?: ((row: T, savePoint: SavePoint) => any) | undefined;
13
14
  onCancelEditMode?: ((row: T) => any) | undefined;
14
15
  rowIndex: number;
@@ -38,8 +39,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
38
39
  selectedRows: Set<T>;
39
40
  row: T;
40
41
  columns: Column[];
41
- isEditing: boolean;
42
42
  onToggleSelection?: ((row: T) => any) | undefined;
43
+ selectOnClick?: boolean | undefined;
44
+ isEditing: boolean;
43
45
  onEnterEditMode?: ((row: T, savePoint: SavePoint) => any) | undefined;
44
46
  onCancelEditMode?: ((row: T) => any) | undefined;
45
47
  rowIndex: number;
@@ -73,8 +75,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
73
75
  selectedRows: Set<T>;
74
76
  row: T;
75
77
  columns: Column[];
76
- isEditing: boolean;
77
78
  onToggleSelection?: ((row: T) => any) | undefined;
79
+ selectOnClick?: boolean | undefined;
80
+ isEditing: boolean;
78
81
  onEnterEditMode?: ((row: T, savePoint: SavePoint) => any) | undefined;
79
82
  onCancelEditMode?: ((row: T) => any) | undefined;
80
83
  rowIndex: number;
@@ -67,10 +67,11 @@ export interface PageGridHandler<T extends GridRowData> {
67
67
  controlEventListener?: GridControlEventListener;
68
68
  lookup?: UnwrapNestedRefs<GridLookupBinding>;
69
69
  lookupEventListener?: GridLookupEventListener;
70
- loadGridData: () => Promise<void>;
70
+ loadGridData: (offset?: number) => Promise<void>;
71
71
  getSelectedRows: () => Set<T>;
72
72
  getAddedRows: () => T[];
73
73
  getModifiedRows: () => T[];
74
+ getDeletedRows: () => T[];
74
75
  }
75
76
  export type GridBinding<T extends GridRowData> = {
76
77
  pageInfo?: PageInfo;
@@ -160,7 +161,12 @@ export declare class PageGridHandlerImpl<T extends GridRowData> implements PageG
160
161
  getSelectedRows(): Set<T>;
161
162
  getAddedRows(): T[];
162
163
  getModifiedRows(): T[];
163
- loadGridData(): Promise<void>;
164
+ getDeletedRows(): T[];
165
+ /**
166
+ *
167
+ * @param offset
168
+ */
169
+ loadGridData(offset?: number): Promise<void>;
164
170
  protected doSetSearchResult(result: PaginatedList<T>): void;
165
171
  }
166
172
  export declare class EditablePageGridHandlerImpl<T extends GridRowData> extends PageGridHandlerImpl<T> {
@@ -179,6 +185,7 @@ export interface InputGridHandler<T extends GridRowData> {
179
185
  getSelectedRows: () => Set<T>;
180
186
  getAddedRows: () => T[];
181
187
  getModifiedRows: () => T[];
188
+ getDeletedRows: () => T[];
182
189
  isAddedRow: (row: T) => boolean;
183
190
  }
184
191
  export type InputGridHandlerOption<T extends GridRowData> = GridHandlerOption<T> & {};
@@ -193,6 +200,7 @@ export declare class InputGridHandlerImpl<T extends GridRowData> implements Inpu
193
200
  constructor(option: InputGridHandlerOption<T>);
194
201
  setGridData(data: T[]): void;
195
202
  getSelectedRows(): Set<T>;
203
+ getDeletedRows(): T[];
196
204
  getAddedRows(): T[];
197
205
  getModifiedRows(): T[];
198
206
  isAddedRow(_row: T): boolean;
@@ -211,11 +219,12 @@ export declare class GridHandlerSelectDeleteSupport<T extends GridRowData> {
211
219
  controlEventListener: GridControlEventListener;
212
220
  removeRowHandler?: ((rows: Set<T>) => boolean) | undefined;
213
221
  selectedRows: Set<T>;
222
+ deletedRows: T[];
214
223
  isAddedRow?: (row: T) => boolean;
215
224
  removeIfAddedRow?: (row: T) => void;
216
225
  constructor(grid: UnwrapNestedRefs<GridBinding<T>>, control: UnwrapNestedRefs<GridControlBinding<T>>, controlEventListener: GridControlEventListener, removeRowHandler?: ((rows: Set<T>) => boolean) | undefined);
217
226
  removeSelectedRows(): void;
218
- clearSelection(): void;
227
+ clear(): void;
219
228
  }
220
229
  export declare class GridHandlerEditableSupport<T extends GridRowData> {
221
230
  grid: UnwrapNestedRefs<GridBinding<T>>;
@@ -12,6 +12,8 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
12
12
  width?: string | undefined;
13
13
  autocomplete?: string | undefined;
14
14
  tabindex?: number | undefined;
15
+ prefix?: MultiLangText | MultiLangText[] | undefined;
16
+ suffix?: MultiLangText | MultiLangText[] | undefined;
15
17
  formatInViewMode?: boolean | undefined;
16
18
  formatOnBlur?: boolean | undefined;
17
19
  required?: boolean | undefined;
@@ -40,6 +42,8 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
40
42
  width?: string | undefined;
41
43
  autocomplete?: string | undefined;
42
44
  tabindex?: number | undefined;
45
+ prefix?: MultiLangText | MultiLangText[] | undefined;
46
+ suffix?: MultiLangText | MultiLangText[] | undefined;
43
47
  formatInViewMode?: boolean | undefined;
44
48
  formatOnBlur?: boolean | undefined;
45
49
  required?: boolean | undefined;
@@ -13,6 +13,8 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
13
13
  autocomplete?: string | undefined;
14
14
  tabindex?: number | undefined;
15
15
  inputType?: "text" | "password" | undefined;
16
+ prefix?: MultiLangText | MultiLangText[] | undefined;
17
+ suffix?: MultiLangText | MultiLangText[] | undefined;
16
18
  required?: boolean | undefined;
17
19
  minLength?: number | undefined;
18
20
  maxLength?: number | undefined;
@@ -41,6 +43,8 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
41
43
  autocomplete?: string | undefined;
42
44
  tabindex?: number | undefined;
43
45
  inputType?: "text" | "password" | undefined;
46
+ prefix?: MultiLangText | MultiLangText[] | undefined;
47
+ suffix?: MultiLangText | MultiLangText[] | undefined;
44
48
  required?: boolean | undefined;
45
49
  minLength?: number | undefined;
46
50
  maxLength?: number | undefined;
@@ -225,7 +225,7 @@ const _hoisted_3$q = {
225
225
  key: 0,
226
226
  class: "label"
227
227
  };
228
- const _hoisted_4$e = {
228
+ const _hoisted_4$g = {
229
229
  key: 1,
230
230
  class: "sub-items"
231
231
  };
@@ -308,7 +308,7 @@ const _sfc_main$18 = /* @__PURE__ */ defineComponent({
308
308
  item ? withDirectives((openBlock(), createElementBlock("label", _hoisted_3$q, null, 512)), [
309
309
  [unref(vT), _ctx.itemLabel(item)]
310
310
  ]) : createCommentVNode("", true),
311
- _ctx.tree && hasSubItems(item) ? (openBlock(), createElementBlock("span", _hoisted_4$e)) : createCommentVNode("", true)
311
+ _ctx.tree && hasSubItems(item) ? (openBlock(), createElementBlock("span", _hoisted_4$g)) : createCommentVNode("", true)
312
312
  ], 42, _hoisted_1$Z);
313
313
  }), 128))
314
314
  ]),
@@ -984,14 +984,23 @@ const componentUtil = {
984
984
  } else {
985
985
  window.setTimeout(func, millis);
986
986
  }
987
+ },
988
+ toMultiLangTextArray(texts) {
989
+ if (!texts)
990
+ return [];
991
+ return Array.isArray(texts) ? texts : [texts];
987
992
  }
988
993
  };
989
- const _hoisted_1$V = ["textContent"];
990
- const _hoisted_2$L = {
994
+ const _hoisted_1$V = {
995
+ key: 0,
996
+ class: "view-mode"
997
+ };
998
+ const _hoisted_2$L = ["textContent"];
999
+ const _hoisted_3$o = {
991
1000
  key: 1,
992
1001
  class: "input-area"
993
1002
  };
994
- const _hoisted_3$o = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
1003
+ const _hoisted_4$f = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "type"];
995
1004
  const _sfc_main$12 = /* @__PURE__ */ defineComponent({
996
1005
  __name: "BSTextInput",
997
1006
  props: {
@@ -1006,6 +1015,8 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1006
1015
  autocomplete: {},
1007
1016
  tabindex: { default: 0 },
1008
1017
  inputType: { default: "text" },
1018
+ prefix: {},
1019
+ suffix: {},
1009
1020
  required: { type: Boolean },
1010
1021
  minLength: {},
1011
1022
  maxLength: {},
@@ -1075,11 +1086,32 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1075
1086
  class: normalizeClass([{ required: _ctx.required, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0 }, "bs-text-input"]),
1076
1087
  style: normalizeStyle({ width: _ctx.width })
1077
1088
  }, [
1078
- _ctx.viewMode ? (openBlock(), createElementBlock("div", {
1079
- key: 0,
1080
- class: "view-mode",
1081
- textContent: toDisplayString(unref(stringValue))
1082
- }, null, 8, _hoisted_1$V)) : (openBlock(), createElementBlock("div", _hoisted_2$L, [
1089
+ _ctx.viewMode ? (openBlock(), createElementBlock("div", _hoisted_1$V, [
1090
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1091
+ return withDirectives((openBlock(), createElementBlock("span", {
1092
+ key: JSON.stringify(text)
1093
+ })), [
1094
+ [unref(vT), text]
1095
+ ]);
1096
+ }), 128)),
1097
+ createElementVNode("span", {
1098
+ textContent: toDisplayString(unref(stringValue))
1099
+ }, null, 8, _hoisted_2$L),
1100
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1101
+ return withDirectives((openBlock(), createElementBlock("span", {
1102
+ key: JSON.stringify(text)
1103
+ })), [
1104
+ [unref(vT), text]
1105
+ ]);
1106
+ }), 128))
1107
+ ])) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
1108
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1109
+ return withDirectives((openBlock(), createElementBlock("span", {
1110
+ key: JSON.stringify(text)
1111
+ })), [
1112
+ [unref(vT), text]
1113
+ ]);
1114
+ }), 128)),
1083
1115
  withDirectives(createElementVNode("input", mergeProps({
1084
1116
  id: _ctx.id,
1085
1117
  ref_key: "field",
@@ -1091,7 +1123,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1091
1123
  name: _ctx.name,
1092
1124
  tabindex: _ctx.tabindex,
1093
1125
  type: _ctx.inputType
1094
- }, toHandlers(handlers2, true)), null, 16, _hoisted_3$o), [
1126
+ }, toHandlers(handlers2, true)), null, 16, _hoisted_4$f), [
1095
1127
  [vModelDynamic, unref(stringValue)],
1096
1128
  [
1097
1129
  unref(vT),
@@ -1099,7 +1131,14 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
1099
1131
  void 0,
1100
1132
  { placeholder: true }
1101
1133
  ]
1102
- ])
1134
+ ]),
1135
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1136
+ return withDirectives((openBlock(), createElementBlock("span", {
1137
+ key: JSON.stringify(text)
1138
+ })), [
1139
+ [unref(vT), text]
1140
+ ]);
1141
+ }), 128))
1103
1142
  ])),
1104
1143
  createVNode(_sfc_main$17, { errors: unref(errors) }, null, 8, ["errors"])
1105
1144
  ], 6);
@@ -1142,9 +1181,9 @@ const _hoisted_3$m = {
1142
1181
  key: 1,
1143
1182
  class: "indeterminate"
1144
1183
  };
1145
- const _hoisted_4$d = /* @__PURE__ */ createElementVNode("div", { class: "in-box" }, null, -1);
1184
+ const _hoisted_4$e = /* @__PURE__ */ createElementVNode("div", { class: "in-box" }, null, -1);
1146
1185
  const _hoisted_5$c = [
1147
- _hoisted_4$d
1186
+ _hoisted_4$e
1148
1187
  ];
1149
1188
  const _sfc_main$10 = /* @__PURE__ */ defineComponent({
1150
1189
  __name: "BSProgressBar",
@@ -1428,12 +1467,16 @@ const formatUtil = {
1428
1467
  return tmp.textContent || tmp.innerText;
1429
1468
  }
1430
1469
  };
1431
- const _hoisted_1$R = ["textContent"];
1432
- const _hoisted_2$H = {
1470
+ const _hoisted_1$R = {
1471
+ key: 0,
1472
+ class: "view-mode"
1473
+ };
1474
+ const _hoisted_2$H = ["textContent"];
1475
+ const _hoisted_3$l = {
1433
1476
  key: 1,
1434
1477
  class: "input-area"
1435
1478
  };
1436
- const _hoisted_3$l = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
1479
+ const _hoisted_4$d = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
1437
1480
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1438
1481
  __name: "BSNumberInput",
1439
1482
  props: {
@@ -1447,6 +1490,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1447
1490
  width: { default: "200px" },
1448
1491
  autocomplete: {},
1449
1492
  tabindex: { default: 0 },
1493
+ prefix: {},
1494
+ suffix: {},
1450
1495
  formatInViewMode: { type: Boolean, default: true },
1451
1496
  formatOnBlur: { type: Boolean, default: true },
1452
1497
  required: { type: Boolean },
@@ -1533,11 +1578,32 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1533
1578
  class: normalizeClass([{ required: _ctx.required, disabled: _ctx.disabled, modified: modified.value, error: unref(errors).length > 0 }, "bs-number-input"]),
1534
1579
  style: normalizeStyle({ width: _ctx.width })
1535
1580
  }, [
1536
- _ctx.viewMode ? (openBlock(), createElementBlock("div", {
1537
- key: 0,
1538
- class: "view-mode",
1539
- textContent: toDisplayString(_ctx.formatInViewMode ? formattedStringValue.value : unref(stringValue))
1540
- }, null, 8, _hoisted_1$R)) : (openBlock(), createElementBlock("div", _hoisted_2$H, [
1581
+ _ctx.viewMode ? (openBlock(), createElementBlock("div", _hoisted_1$R, [
1582
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1583
+ return withDirectives((openBlock(), createElementBlock("span", {
1584
+ key: JSON.stringify(text)
1585
+ })), [
1586
+ [unref(vT), text]
1587
+ ]);
1588
+ }), 128)),
1589
+ createElementVNode("span", {
1590
+ textContent: toDisplayString(_ctx.formatInViewMode ? formattedStringValue.value : unref(stringValue))
1591
+ }, null, 8, _hoisted_2$H),
1592
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1593
+ return withDirectives((openBlock(), createElementBlock("span", {
1594
+ key: JSON.stringify(text)
1595
+ })), [
1596
+ [unref(vT), text]
1597
+ ]);
1598
+ }), 128))
1599
+ ])) : (openBlock(), createElementBlock("div", _hoisted_3$l, [
1600
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.prefix), (text) => {
1601
+ return withDirectives((openBlock(), createElementBlock("span", {
1602
+ key: JSON.stringify(text)
1603
+ })), [
1604
+ [unref(vT), text]
1605
+ ]);
1606
+ }), 128)),
1541
1607
  withDirectives(createElementVNode("input", mergeProps({
1542
1608
  id: _ctx.id,
1543
1609
  ref_key: "field",
@@ -1549,14 +1615,21 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
1549
1615
  tabindex: _ctx.tabindex,
1550
1616
  value: focused.value || !_ctx.formatOnBlur ? unref(stringValue) : formattedStringValue.value,
1551
1617
  type: "text"
1552
- }, toHandlers(handlers2, true)), null, 16, _hoisted_3$l), [
1618
+ }, toHandlers(handlers2, true)), null, 16, _hoisted_4$d), [
1553
1619
  [
1554
1620
  unref(vT),
1555
1621
  _ctx.placeholder,
1556
1622
  void 0,
1557
1623
  { placeholder: true }
1558
1624
  ]
1559
- ])
1625
+ ]),
1626
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(componentUtil).toMultiLangTextArray(_ctx.suffix), (text) => {
1627
+ return withDirectives((openBlock(), createElementBlock("span", {
1628
+ key: JSON.stringify(text)
1629
+ })), [
1630
+ [unref(vT), text]
1631
+ ]);
1632
+ }), 128))
1560
1633
  ])),
1561
1634
  createVNode(_sfc_main$17, { errors: unref(errors) }, null, 8, ["errors"])
1562
1635
  ], 6);
@@ -1622,8 +1695,8 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1622
1695
  });
1623
1696
  const isValid = async (value, phase) => {
1624
1697
  const errors2 = [];
1625
- executeRequiredValidation(value == null ? void 0 : value.value, props.required, props.validationMessageRequired, errors2) || value !== void 0 && value.value !== void 0 && executeBetweenValueValidation(
1626
- value.value,
1698
+ executeRequiredValidation(value == null ? void 0 : value.amount, props.required, props.validationMessageRequired, errors2) || value !== void 0 && value.amount !== void 0 && executeBetweenValueValidation(
1699
+ value.amount,
1627
1700
  props.minValue,
1628
1701
  props.validationMessageMinValue,
1629
1702
  props.maxValue,
@@ -1635,10 +1708,10 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1635
1708
  };
1636
1709
  const convertToValue = (stringValue2) => {
1637
1710
  const value = stringValue2 ? Number(stringValue2) : NaN;
1638
- return { value: isNaN(value) ? void 0 : value, currency: currencyCode.value };
1711
+ return { amount: isNaN(value) ? void 0 : value, currency: currencyCode.value };
1639
1712
  };
1640
1713
  const convertFromValue = (value) => {
1641
- return (value == null ? void 0 : value.value) !== void 0 ? String(value.value) : "";
1714
+ return (value == null ? void 0 : value.amount) !== void 0 ? String(value.amount) : "";
1642
1715
  };
1643
1716
  const validationDisabled = computed(() => props.viewMode || props.disabled);
1644
1717
  const { stringValue, errors, handleInput, handleChange, handleFocus, handleBlur } = fieldValidator({
@@ -1671,10 +1744,10 @@ const _sfc_main$Y = /* @__PURE__ */ defineComponent({
1671
1744
  field,
1672
1745
  getCurrentValue: () => props.modelValue,
1673
1746
  setCurrentValue: (value) => emit("update:modelValue", value || {
1674
- value: void 0,
1747
+ amount: void 0,
1675
1748
  currency: currencyCode.value
1676
1749
  }),
1677
- compare: (savedValue, currentValue) => (savedValue == null ? void 0 : savedValue.value) === (currentValue == null ? void 0 : currentValue.value) && (savedValue == null ? void 0 : savedValue.currency) === (currentValue == null ? void 0 : currentValue.currency)
1750
+ compare: (savedValue, currentValue) => (savedValue == null ? void 0 : savedValue.amount) === (currentValue == null ? void 0 : currentValue.amount) && (savedValue == null ? void 0 : savedValue.currency) === (currentValue == null ? void 0 : currentValue.currency)
1678
1751
  });
1679
1752
  const modified = computed(() => !!(savePointHandler == null ? void 0 : savePointHandler.isModified(props.modelValue)));
1680
1753
  return (_ctx, _cache) => {
@@ -28426,7 +28499,7 @@ class PageGridHandlerImpl {
28426
28499
  this.grid = reactive({
28427
28500
  pageInfo: {
28428
28501
  offset: 0,
28429
- limit: 100,
28502
+ limit: this.searchParam.limit,
28430
28503
  totalCount: 0
28431
28504
  },
28432
28505
  sorts: this.searchParam.sorts,
@@ -28441,7 +28514,7 @@ class PageGridHandlerImpl {
28441
28514
  await this.loadGridData();
28442
28515
  },
28443
28516
  "update:sorts": async (_sorts) => {
28444
- await this.loadGridData();
28517
+ await this.loadGridData(0);
28445
28518
  }
28446
28519
  };
28447
28520
  this.control = reactive({
@@ -28452,14 +28525,16 @@ class PageGridHandlerImpl {
28452
28525
  this.controlEventListener = {
28453
28526
  "update:limit": async (limit) => {
28454
28527
  this.searchParam.limit = limit;
28455
- await this.loadGridData();
28528
+ if (this.grid.pageInfo)
28529
+ this.grid.pageInfo.limit = limit;
28530
+ await this.loadGridData(0);
28456
28531
  },
28457
28532
  refresh: async () => {
28458
28533
  await this.loadGridData();
28459
28534
  },
28460
28535
  clearFilter: async () => {
28461
28536
  this.searchParam.gridFilter = {};
28462
- await this.loadGridData();
28537
+ await this.loadGridData(0);
28463
28538
  }
28464
28539
  };
28465
28540
  this.lookup = reactive({
@@ -28471,7 +28546,7 @@ class PageGridHandlerImpl {
28471
28546
  },
28472
28547
  search: async () => {
28473
28548
  this.searchParam.gridFilter = {};
28474
- await this.loadGridData();
28549
+ await this.loadGridData(0);
28475
28550
  }
28476
28551
  };
28477
28552
  this.selectDeleteSupport = new GridHandlerSelectDeleteSupport(
@@ -28490,14 +28565,23 @@ class PageGridHandlerImpl {
28490
28565
  getModifiedRows() {
28491
28566
  return [];
28492
28567
  }
28493
- async loadGridData() {
28568
+ getDeletedRows() {
28569
+ return this.selectDeleteSupport.deletedRows;
28570
+ }
28571
+ /**
28572
+ *
28573
+ * @param offset
28574
+ */
28575
+ async loadGridData(offset2) {
28494
28576
  this.grid.loading = true;
28577
+ if (offset2 !== void 0)
28578
+ this.searchParam.offset = offset2;
28495
28579
  const result = await this.option.getGridData(this.searchParam);
28496
28580
  this.doSetSearchResult(result);
28497
28581
  this.grid.loading = false;
28498
28582
  }
28499
28583
  doSetSearchResult(result) {
28500
- this.selectDeleteSupport.clearSelection();
28584
+ this.selectDeleteSupport.clear();
28501
28585
  if (this.grid.pageInfo)
28502
28586
  this.grid.pageInfo.offset = result.offset;
28503
28587
  if (this.grid.pageInfo)
@@ -28563,11 +28647,14 @@ class InputGridHandlerImpl {
28563
28647
  }
28564
28648
  setGridData(data) {
28565
28649
  this.grid.data = data;
28566
- this.selectDeleteSupport.clearSelection();
28650
+ this.selectDeleteSupport.clear();
28567
28651
  }
28568
28652
  getSelectedRows() {
28569
28653
  return this.selectDeleteSupport.selectedRows;
28570
28654
  }
28655
+ getDeletedRows() {
28656
+ return this.selectDeleteSupport.deletedRows;
28657
+ }
28571
28658
  getAddedRows() {
28572
28659
  return [];
28573
28660
  }
@@ -28610,6 +28697,7 @@ class EditableInputGridHandlerImpl extends InputGridHandlerImpl {
28610
28697
  class GridHandlerSelectDeleteSupport {
28611
28698
  constructor(grid, control, controlEventListener, removeRowHandler) {
28612
28699
  __publicField(this, "selectedRows", /* @__PURE__ */ new Set());
28700
+ __publicField(this, "deletedRows", []);
28613
28701
  __publicField(this, "isAddedRow");
28614
28702
  __publicField(this, "removeIfAddedRow");
28615
28703
  this.grid = grid;
@@ -28632,16 +28720,19 @@ class GridHandlerSelectDeleteSupport {
28632
28720
  (_a = this.grid.editingRows) == null ? void 0 : _a.removeRow(item);
28633
28721
  if ((_b = this.isAddedRow) == null ? void 0 : _b.call(this, item))
28634
28722
  (_c = this.removeIfAddedRow) == null ? void 0 : _c.call(this, item);
28635
- else
28636
- this.grid.data.splice(index, 1);
28723
+ else {
28724
+ const deleted = this.grid.data.splice(index, 1);
28725
+ this.deletedRows.push(deleted[0]);
28726
+ }
28637
28727
  }
28638
28728
  });
28639
28729
  this.selectedRows.clear();
28640
28730
  }
28641
28731
  }
28642
28732
  }
28643
- clearSelection() {
28733
+ clear() {
28644
28734
  this.selectedRows.clear();
28735
+ this.deletedRows.splice(0, this.deletedRows.length);
28645
28736
  }
28646
28737
  }
28647
28738
  let lastAddedRowIndex = 0;
@@ -28866,10 +28957,13 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
28866
28957
  columns: {},
28867
28958
  fixed: { type: Boolean },
28868
28959
  row: {},
28869
- editing: { type: Boolean }
28960
+ editing: { type: Boolean },
28961
+ selectOnClick: { type: Boolean }
28870
28962
  },
28871
- setup(__props) {
28963
+ emits: ["toggleSelection"],
28964
+ setup(__props, { emit: __emit }) {
28872
28965
  const props = __props;
28966
+ const emit = __emit;
28873
28967
  const tdStyleCss = computed(() => {
28874
28968
  return {
28875
28969
  minWidth: `${props.column.width || DEFAULT_GRID_COLUMN_WIDTH}px`,
@@ -28881,7 +28975,8 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
28881
28975
  return {
28882
28976
  fixed: props.fixed,
28883
28977
  "text-right": ["NUMBER", "PERCENTAGE"].includes(props.column.cellType || ""),
28884
- editing: props.editing
28978
+ editing: props.editing,
28979
+ "cursor-pointer": props.selectOnClick
28885
28980
  };
28886
28981
  });
28887
28982
  const styleCss = computed(() => {
@@ -28914,10 +29009,16 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
28914
29009
  return cellValue.value;
28915
29010
  }
28916
29011
  });
29012
+ const clickTd = () => {
29013
+ if (props.selectOnClick) {
29014
+ emit("toggleSelection", props.column);
29015
+ }
29016
+ };
28917
29017
  return (_ctx, _cache) => {
28918
29018
  return openBlock(), createElementBlock("td", {
28919
29019
  class: normalizeClass(tdStyleClass.value),
28920
- style: normalizeStyle(tdStyleCss.value)
29020
+ style: normalizeStyle(tdStyleCss.value),
29021
+ onClick: clickTd
28921
29022
  }, [
28922
29023
  createElementVNode("div", {
28923
29024
  class: normalizeClass(styleClass.value),
@@ -29011,7 +29112,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29011
29112
  selectedRows: {},
29012
29113
  editable: { type: Boolean },
29013
29114
  editingRow: {},
29014
- isEditing: { type: Boolean }
29115
+ isEditing: { type: Boolean },
29116
+ selectOnClick: { type: Boolean }
29015
29117
  },
29016
29118
  emits: ["toggleSelection", "enterEditMode", "cancelEditMode"],
29017
29119
  setup(__props, { emit: __emit }) {
@@ -29076,7 +29178,9 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29076
29178
  columns: _ctx.columns,
29077
29179
  editing: _ctx.isEditing,
29078
29180
  fixed: index < _ctx.fixedColumns,
29079
- row: _ctx.row
29181
+ row: _ctx.row,
29182
+ "select-on-click": _ctx.selectOnClick,
29183
+ onToggleSelection: toggleSelection
29080
29184
  }, {
29081
29185
  [column.propertyId]: withCtx(({ row, cell }) => [
29082
29186
  renderSlot(_ctx.$slots, column.propertyId, {
@@ -29091,7 +29195,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29091
29195
  })
29092
29196
  ]),
29093
29197
  _: 2
29094
- }, 1032, ["column", "columns", "editing", "fixed", "row"]);
29198
+ }, 1032, ["column", "columns", "editing", "fixed", "row", "select-on-click"]);
29095
29199
  }), 128))
29096
29200
  ], 34);
29097
29201
  };
@@ -29121,6 +29225,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29121
29225
  showSerial: { type: Boolean },
29122
29226
  showCheckbox: { type: Boolean },
29123
29227
  showPageNavigation: { type: Boolean },
29228
+ selectOnClick: { type: Boolean },
29124
29229
  keyProvider: { default: () => emptyKeyProvider },
29125
29230
  selectedRows: {},
29126
29231
  editable: { type: Boolean },
@@ -29249,6 +29354,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29249
29354
  "page-info": _ctx.pageInfo,
29250
29355
  row,
29251
29356
  "row-index": index,
29357
+ "select-on-click": _ctx.selectOnClick,
29252
29358
  "selected-rows": unref(internalSelectedRows),
29253
29359
  "show-checkbox": _ctx.showCheckbox,
29254
29360
  "show-serial": _ctx.showSerial,
@@ -29268,7 +29374,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29268
29374
  ])
29269
29375
  };
29270
29376
  })
29271
- ]), 1032, ["columns", "editable", "editing-row", "fixed-columns", "is-editing", "page-info", "row", "row-index", "selected-rows", "show-checkbox", "show-serial", "visible-columns"]);
29377
+ ]), 1032, ["columns", "editable", "editing-row", "fixed-columns", "is-editing", "page-info", "row", "row-index", "select-on-click", "selected-rows", "show-checkbox", "show-serial", "visible-columns"]);
29272
29378
  }), 128)) : createCommentVNode("", true)
29273
29379
  ])
29274
29380
  ], 512)
@@ -31087,7 +31193,7 @@ class BSModal {
31087
31193
  }
31088
31194
  openAlert(title, message, clickHandler2) {
31089
31195
  const option = {
31090
- component: defineAsyncComponent(() => import("./BSAlertModal-1FBOKopz.js")),
31196
+ component: defineAsyncComponent(() => import("./BSAlertModal-DWE4pXAZ.js")),
31091
31197
  bind: {
31092
31198
  title,
31093
31199
  message
@@ -31100,7 +31206,7 @@ class BSModal {
31100
31206
  }
31101
31207
  openYesNo(title, message, yesHandler, noHandler) {
31102
31208
  const option = {
31103
- component: defineAsyncComponent(() => import("./BSYesNoModal-z4hqGSwc.js")),
31209
+ component: defineAsyncComponent(() => import("./BSYesNoModal-BJKYSQhF.js")),
31104
31210
  bind: {
31105
31211
  title,
31106
31212
  message
@@ -31167,7 +31273,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31167
31273
  const modal = useModal();
31168
31274
  const openModal = () => {
31169
31275
  modal.openModal({
31170
- component: defineAsyncComponent(() => import("./AddressSearchModal-BlMVBom_.js")),
31276
+ component: defineAsyncComponent(() => import("./AddressSearchModal-EJLW0wYU.js")),
31171
31277
  bind: {},
31172
31278
  on: {
31173
31279
  select: (addr) => {
@@ -29,7 +29,7 @@ export declare const isMultiLangMessage: (text: MultiLangText) => boolean;
29
29
  */
30
30
  export type CurrencyCode = string;
31
31
  export type Money = {
32
- value?: number;
32
+ amount?: number;
33
33
  currency: CurrencyCode;
34
34
  };
35
35
  export type Name = {
@@ -1,8 +1,11 @@
1
+ import { MultiLangText } from '../model/CommonTypes.ts';
2
+
1
3
  declare const componentUtil: {
2
4
  handleExternalErrorMessage(showErrorMessage: boolean, errorMessage?: string, elementId?: string): void;
3
5
  generateNextId(prefix: string): string;
4
6
  generateNextName(prefix: string): string;
5
7
  isRelativeSize(size?: string): boolean;
6
8
  delayed<T>(func: () => T, millis?: number): void;
9
+ toMultiLangTextArray(texts?: MultiLangText | MultiLangText[]): MultiLangText[];
7
10
  };
8
11
  export default componentUtil;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/bluesea",
3
3
  "private": false,
4
- "version": "5.0.0-alpha.27",
4
+ "version": "5.0.0-alpha.28",
5
5
  "description": "Ui Library for g1cloud BackOffice.",
6
6
  "type": "module",
7
7
  "engines": {