@g1cloud/bluesea 5.0.0-alpha.52 → 5.0.0-alpha.53

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.
@@ -273,6 +273,17 @@
273
273
  background-color: $gray-100 !important;
274
274
  color: $gray-400 !important;
275
275
  }
276
+
277
+ .small-progress {
278
+ font-family: $icon-font-family;
279
+ font-size: 0.9em;
280
+ position: absolute;
281
+ left: 100%;
282
+ top: 0;
283
+ padding: 0 2px;
284
+ color: $gray-400;
285
+ animation: spin 1s linear infinite;
286
+ }
276
287
  }
277
288
 
278
289
  // field error
@@ -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-DDf56W0P.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-30Eo6Aut.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-DDf56W0P.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-30Eo6Aut.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-DDf56W0P.js";
2
+ import { u as useModalHandle, _ as _sfc_main$1, B as BSButton, v as vFocusOnLoad, c as vT } from "./index-30Eo6Aut.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 { aL, aM, d, a0, a4, B, L, q, r, k, a5, bi, o, p, K, e, b, I, a, a1, G, i, O, N, Y, b2, a2, _, H, W, X, V, U, T, z, Z, a3, m, l, g, D, n, j, s, t, F, y, M, $, E, J, h, Q, R, C, A, x, f, aT, aS, ac, a7, bm, a6, aj, ag, ad, aR, al, ak, bq, aP, ai, aQ, am, aO, aN, af, P, aH, S, at, by, b8, aU, a$, a_, aa, aK, ba, ab, bl, bn, ah, b5, ae, aq, ar, aZ, aE, aF, aG, aC, aD, aB, ay, av, bt, bg, bd, br, aX, a9, bz, bx, au, aY, ax, bA, aW, bs, b6, aV, bw, bo, b0, b4, aI, an, b9, bf, be, b7, bc, aw, as, bb, bv, bj, bk, bp, b1, b3, u, aJ, ao, ap, a8, c, az, aA, w, bu, bh } from "./index-DDf56W0P.js";
1
+ import { aL, aM, d, a0, a4, B, L, q, r, k, a5, bi, o, p, K, e, b, I, a, a1, G, i, O, N, Y, b2, a2, _, H, W, X, V, U, T, z, Z, a3, m, l, g, D, n, j, s, t, F, y, M, $, E, J, h, Q, R, C, A, x, f, aT, aS, ac, a7, bm, a6, aj, ag, ad, aR, al, ak, bq, aP, ai, aQ, am, aO, aN, af, P, aH, S, at, by, b8, aU, a$, a_, aa, aK, ba, ab, bl, bn, ah, b5, ae, aq, ar, aZ, aE, aF, aG, aC, aD, aB, ay, av, bt, bg, bd, br, aX, a9, bz, bx, au, aY, ax, bA, aW, bs, b6, aV, bw, bo, b0, b4, aI, an, b9, bf, be, b7, bc, aw, as, bb, bv, bj, bk, bp, b1, b3, u, aJ, ao, ap, a8, c, az, aA, w, bu, bh } from "./index-30Eo6Aut.js";
2
2
  export {
3
3
  aL as AbstractFilter,
4
4
  aM as AndFilter,
@@ -401,6 +401,9 @@ var __publicField = (obj, key, value) => {
401
401
  };
402
402
  }
403
403
  });
404
+ function notNull(value) {
405
+ return value !== null && value !== void 0;
406
+ }
404
407
  const _hoisted_1$15 = ["onMouseover", "onClick"];
405
408
  const _hoisted_2$T = /* @__PURE__ */ vue.createElementVNode("span", { class: "checkbox" }, null, -1);
406
409
  const _hoisted_3$x = {
@@ -421,25 +424,34 @@ var __publicField = (obj, key, value) => {
421
424
  setup(__props, { emit: __emit }) {
422
425
  const props = __props;
423
426
  const emit = __emit;
424
- const allItems = vue.computed(() => props.allowNull ? [void 0, ...props.items] : props.items);
427
+ const allItems = vue.ref();
428
+ vue.watch(
429
+ () => props.items,
430
+ async () => {
431
+ const items = await props.items;
432
+ allItems.value = props.allowNull ? [void 0, ...items] : items;
433
+ },
434
+ { immediate: true }
435
+ );
425
436
  const findItemIndex = (target) => {
426
- return allItems.value.findIndex((item) => {
437
+ var _a;
438
+ return ((_a = allItems.value) == null ? void 0 : _a.findIndex((item) => {
427
439
  if (item === void 0 && target === void 0)
428
440
  return true;
429
441
  else if (item && target)
430
442
  return props.valueProvider(item) === props.valueProvider(target);
431
443
  else
432
444
  return false;
433
- });
445
+ })) || -1;
434
446
  };
435
447
  const nextPopupItem = () => {
436
- if (allItems.value.length > 0) {
448
+ if (allItems.value && allItems.value.length > 0) {
437
449
  const index = findItemIndex(hoveredPopupItem.value) + 1;
438
450
  hoveredPopupItem.value = allItems.value[index % allItems.value.length];
439
451
  }
440
452
  };
441
453
  const prevPopupItem = () => {
442
- if (allItems.value.length > 0) {
454
+ if (allItems.value && allItems.value.length > 0) {
443
455
  const index = findItemIndex(hoveredPopupItem.value) + allItems.value.length - 1;
444
456
  hoveredPopupItem.value = allItems.value[index % allItems.value.length];
445
457
  }
@@ -477,8 +489,8 @@ var __publicField = (obj, key, value) => {
477
489
  return false;
478
490
  };
479
491
  const selectPopupItem = (item) => {
480
- if (item) {
481
- item = props.items.find((it) => props.valueProvider(it) === props.valueProvider(item));
492
+ if (item && allItems.value) {
493
+ item = allItems.value.filter(notNull).find((it) => props.valueProvider(it) === props.valueProvider(item));
482
494
  }
483
495
  emit("itemSelected", item);
484
496
  };
@@ -882,6 +894,10 @@ var __publicField = (obj, key, value) => {
882
894
  class: "label"
883
895
  };
884
896
  const _hoisted_5$j = /* @__PURE__ */ vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1);
897
+ const _hoisted_6$d = {
898
+ key: 2,
899
+ class: "small-progress"
900
+ };
885
901
  const _sfc_main$1i = /* @__PURE__ */ vue.defineComponent({
886
902
  __name: "BSSelect",
887
903
  props: {
@@ -903,6 +919,17 @@ var __publicField = (obj, key, value) => {
903
919
  setup(__props, { emit: __emit }) {
904
920
  const props = __props;
905
921
  const emit = __emit;
922
+ const allItems = vue.ref();
923
+ const loadingItems = vue.ref(false);
924
+ vue.watch(
925
+ () => props.items,
926
+ async () => {
927
+ loadingItems.value = true;
928
+ allItems.value = await props.items;
929
+ loadingItems.value = false;
930
+ },
931
+ { immediate: true }
932
+ );
906
933
  const itemLabel = (item) => {
907
934
  return props.labelProvider ? props.labelProvider(item) : String(item);
908
935
  };
@@ -910,7 +937,8 @@ var __publicField = (obj, key, value) => {
910
937
  return props.valueProvider ? props.valueProvider(item) : item;
911
938
  };
912
939
  const findItemFromValue = (value) => {
913
- return value ? props.items.find((item) => itemValue(item) === value) : void 0;
940
+ var _a;
941
+ return value ? (_a = allItems.value) == null ? void 0 : _a.find((item) => itemValue(item) === value) : void 0;
914
942
  };
915
943
  const isEmpty2 = vue.computed(() => !props.modelValue);
916
944
  const selectedItem = vue.computed(() => findItemFromValue(props.modelValue));
@@ -994,7 +1022,8 @@ var __publicField = (obj, key, value) => {
994
1022
  ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", _hoisted_4$n, null, 512)), [
995
1023
  [vue.unref(vT), selectedItemLabel.value]
996
1024
  ]),
997
- _hoisted_5$j
1025
+ _hoisted_5$j,
1026
+ loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$d, "progress_activity")) : vue.createCommentVNode("", true)
998
1027
  ], 512),
999
1028
  !_ctx.disabled && showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1k, {
1000
1029
  key: 0,
@@ -2021,7 +2050,7 @@ var __publicField = (obj, key, value) => {
2021
2050
  class: "input-area"
2022
2051
  };
2023
2052
  const _hoisted_5$h = ["id", "autocomplete", "disabled", "maxlength", "name", "tabindex", "value"];
2024
- const _hoisted_6$9 = ["textContent"];
2053
+ const _hoisted_6$c = ["textContent"];
2025
2054
  const _sfc_main$18 = /* @__PURE__ */ vue.defineComponent({
2026
2055
  __name: "BSPriceInput",
2027
2056
  props: {
@@ -2177,7 +2206,7 @@ var __publicField = (obj, key, value) => {
2177
2206
  vue.createElementVNode("div", {
2178
2207
  class: "currency-code",
2179
2208
  textContent: vue.toDisplayString(currencyCode.value)
2180
- }, null, 8, _hoisted_6$9)
2209
+ }, null, 8, _hoisted_6$c)
2181
2210
  ])),
2182
2211
  vue.createVNode(_sfc_main$1j, { errors: vue.unref(errors) }, null, 8, ["errors"])
2183
2212
  ], 6);
@@ -2351,7 +2380,7 @@ var __publicField = (obj, key, value) => {
2351
2380
  const _hoisted_3$p = /* @__PURE__ */ vue.createElementVNode("span", { class: "font-icon" }, "calendar_month", -1);
2352
2381
  const _hoisted_4$h = ["id", "disabled", "maxlength", "name", "tabindex", "value"];
2353
2382
  const _hoisted_5$g = /* @__PURE__ */ vue.createElementVNode("span", { class: "px-4" }, "~", -1);
2354
- const _hoisted_6$8 = ["id", "disabled", "maxlength", "name", "tabindex", "value"];
2383
+ const _hoisted_6$b = ["id", "disabled", "maxlength", "name", "tabindex", "value"];
2355
2384
  const _sfc_main$16 = /* @__PURE__ */ vue.defineComponent({
2356
2385
  __name: "BSDateRange",
2357
2386
  props: {
@@ -2572,7 +2601,7 @@ var __publicField = (obj, key, value) => {
2572
2601
  tabindex: _ctx.tabindex,
2573
2602
  value: focusedTo.value ? vue.unref(stringValueTo) : formattedTo.value,
2574
2603
  type: "text"
2575
- }, vue.toHandlers(handlersTo, true)), null, 16, _hoisted_6$8), [
2604
+ }, vue.toHandlers(handlersTo, true)), null, 16, _hoisted_6$b), [
2576
2605
  [
2577
2606
  vue.unref(vT),
2578
2607
  _ctx.placeholderTo,
@@ -3000,9 +3029,6 @@ var __publicField = (obj, key, value) => {
3000
3029
  };
3001
3030
  }
3002
3031
  });
3003
- function notNull(value) {
3004
- return value !== null && value !== void 0;
3005
- }
3006
3032
  const _hoisted_1$R = ["tabindex", "onKeydown"];
3007
3033
  const _hoisted_2$F = { key: 0 };
3008
3034
  const _hoisted_3$m = {
@@ -3011,6 +3037,10 @@ var __publicField = (obj, key, value) => {
3011
3037
  };
3012
3038
  const _hoisted_4$g = { key: 1 };
3013
3039
  const _hoisted_5$f = /* @__PURE__ */ vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1);
3040
+ const _hoisted_6$a = {
3041
+ key: 2,
3042
+ class: "small-progress"
3043
+ };
3014
3044
  const _sfc_main$10 = /* @__PURE__ */ vue.defineComponent({
3015
3045
  __name: "BSMultiSelect",
3016
3046
  props: {
@@ -3032,6 +3062,17 @@ var __publicField = (obj, key, value) => {
3032
3062
  var _a;
3033
3063
  const props = __props;
3034
3064
  const emit = __emit;
3065
+ const allItems = vue.ref();
3066
+ const loadingItems = vue.ref(false);
3067
+ vue.watch(
3068
+ () => props.items,
3069
+ async () => {
3070
+ loadingItems.value = true;
3071
+ allItems.value = await props.items;
3072
+ loadingItems.value = false;
3073
+ },
3074
+ { immediate: true }
3075
+ );
3035
3076
  const itemLabel = (item) => {
3036
3077
  return executeLabelProviderOrDefault(item, props.labelProvider, () => String(item));
3037
3078
  };
@@ -3042,7 +3083,8 @@ var __publicField = (obj, key, value) => {
3042
3083
  return executeKeyProviderOrDefault(item, props.keyProvider, () => String(item));
3043
3084
  };
3044
3085
  const findItemFromValue = (value) => {
3045
- return value ? props.items.find((item) => itemValue(item) === value) : void 0;
3086
+ var _a2;
3087
+ return value ? (_a2 = allItems.value) == null ? void 0 : _a2.find((item) => itemValue(item) === value) : void 0;
3046
3088
  };
3047
3089
  const isEmpty2 = vue.computed(() => !props.modelValue || props.modelValue.length === 0);
3048
3090
  const selectedItems = vue.computed(() => props.modelValue.map(findItemFromValue).filter(notNull));
@@ -3063,13 +3105,13 @@ var __publicField = (obj, key, value) => {
3063
3105
  keyboardHandler(event);
3064
3106
  };
3065
3107
  const itemSelected = (item) => {
3066
- if (item) {
3108
+ if (item && allItems.value) {
3067
3109
  let newItems = [...selectedItems.value];
3068
3110
  const index = newItems.indexOf(item);
3069
3111
  if (index >= 0) {
3070
3112
  newItems.splice(index, 1);
3071
3113
  } else {
3072
- newItems = props.items.filter((it) => newItems.includes(it) || it === item);
3114
+ newItems = allItems.value.filter((it) => newItems.includes(it) || it === item);
3073
3115
  }
3074
3116
  const values = newItems.map(itemValue);
3075
3117
  emit("update:modelValue", values);
@@ -3149,7 +3191,8 @@ var __publicField = (obj, key, value) => {
3149
3191
  ]);
3150
3192
  }), 128))
3151
3193
  ])),
3152
- _hoisted_5$f
3194
+ _hoisted_5$f,
3195
+ loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$a, "progress_activity")) : vue.createCommentVNode("", true)
3153
3196
  ], 512),
3154
3197
  !_ctx.disabled && showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1k, {
3155
3198
  key: 0,
@@ -4084,6 +4127,10 @@ var __publicField = (obj, key, value) => {
4084
4127
  class: "label"
4085
4128
  };
4086
4129
  const _hoisted_5$d = /* @__PURE__ */ vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1);
4130
+ const _hoisted_6$9 = {
4131
+ key: 2,
4132
+ class: "small-progress"
4133
+ };
4087
4134
  const _sfc_main$Z = /* @__PURE__ */ vue.defineComponent({
4088
4135
  __name: "BSTreeSelect",
4089
4136
  props: {
@@ -4106,6 +4153,17 @@ var __publicField = (obj, key, value) => {
4106
4153
  var _a;
4107
4154
  const props = __props;
4108
4155
  const emit = __emit;
4156
+ const allItems = vue.ref();
4157
+ const loadingItems = vue.ref(false);
4158
+ vue.watch(
4159
+ () => props.items,
4160
+ async () => {
4161
+ loadingItems.value = true;
4162
+ allItems.value = await props.items;
4163
+ loadingItems.value = false;
4164
+ },
4165
+ { immediate: true }
4166
+ );
4109
4167
  const itemLabel = (item) => {
4110
4168
  return props.labelProvider ? props.labelProvider(item) : String(item);
4111
4169
  };
@@ -4113,7 +4171,7 @@ var __publicField = (obj, key, value) => {
4113
4171
  return props.valueProvider ? props.valueProvider(item) : item;
4114
4172
  };
4115
4173
  const findItemFromValue = (value) => {
4116
- if (value) {
4174
+ if (value && allItems.value) {
4117
4175
  let found2 = void 0;
4118
4176
  componentUtil.acceptTreeItems(
4119
4177
  (item) => {
@@ -4122,7 +4180,7 @@ var __publicField = (obj, key, value) => {
4122
4180
  return true;
4123
4181
  }
4124
4182
  },
4125
- props.items,
4183
+ allItems.value,
4126
4184
  (item) => props.childrenProvider(item)
4127
4185
  );
4128
4186
  return found2;
@@ -4136,7 +4194,7 @@ var __publicField = (obj, key, value) => {
4136
4194
  if (!props.disabled && !props.viewMode) {
4137
4195
  const shouldShow = show === void 0 ? !showPopup.value : show;
4138
4196
  if (shouldShow) {
4139
- treeHandler.setTreeData(props.items, true, true, 0);
4197
+ treeHandler.setTreeData(allItems.value || [], true, true, 0);
4140
4198
  treeHandler.selectItem(findItemFromValue(props.modelValue));
4141
4199
  }
4142
4200
  showPopup.value = shouldShow;
@@ -4220,7 +4278,8 @@ var __publicField = (obj, key, value) => {
4220
4278
  ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", _hoisted_4$e, null, 512)), [
4221
4279
  [vue.unref(vT), selectedItemLabel.value]
4222
4280
  ]),
4223
- _hoisted_5$d
4281
+ _hoisted_5$d,
4282
+ loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$9, "progress_activity")) : vue.createCommentVNode("", true)
4224
4283
  ], 512),
4225
4284
  showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1l, {
4226
4285
  key: 0,
@@ -4249,6 +4308,10 @@ var __publicField = (obj, key, value) => {
4249
4308
  class: "label"
4250
4309
  };
4251
4310
  const _hoisted_5$c = /* @__PURE__ */ vue.createElementVNode("span", { class: "dropdown-btn" }, "expand_more", -1);
4311
+ const _hoisted_6$8 = {
4312
+ key: 2,
4313
+ class: "small-progress"
4314
+ };
4252
4315
  const _sfc_main$Y = /* @__PURE__ */ vue.defineComponent({
4253
4316
  __name: "BSTreeMultiSelect",
4254
4317
  props: {
@@ -4271,6 +4334,17 @@ var __publicField = (obj, key, value) => {
4271
4334
  var _a;
4272
4335
  const props = __props;
4273
4336
  const emit = __emit;
4337
+ const allItems = vue.ref();
4338
+ const loadingItems = vue.ref(false);
4339
+ vue.watch(
4340
+ () => props.items,
4341
+ async () => {
4342
+ loadingItems.value = true;
4343
+ allItems.value = await props.items;
4344
+ loadingItems.value = false;
4345
+ },
4346
+ { immediate: true }
4347
+ );
4274
4348
  const itemLabel = (item) => {
4275
4349
  return props.labelProvider ? props.labelProvider(item) : String(item);
4276
4350
  };
@@ -4278,7 +4352,7 @@ var __publicField = (obj, key, value) => {
4278
4352
  return props.valueProvider ? props.valueProvider(item) : item;
4279
4353
  };
4280
4354
  const findItemFromValue = (value) => {
4281
- if (value) {
4355
+ if (value && allItems.value) {
4282
4356
  let found2 = void 0;
4283
4357
  componentUtil.acceptTreeItems(
4284
4358
  (item) => {
@@ -4287,7 +4361,7 @@ var __publicField = (obj, key, value) => {
4287
4361
  return true;
4288
4362
  }
4289
4363
  },
4290
- props.items,
4364
+ allItems.value,
4291
4365
  (item) => props.childrenProvider(item)
4292
4366
  );
4293
4367
  return found2;
@@ -4301,7 +4375,7 @@ var __publicField = (obj, key, value) => {
4301
4375
  if (!props.disabled && !props.viewMode) {
4302
4376
  const shouldShow = show === void 0 ? !showPopup.value : show;
4303
4377
  if (shouldShow) {
4304
- treeHandler.setTreeData(props.items, true, true, 0);
4378
+ treeHandler.setTreeData(allItems.value || [], true, true, 0);
4305
4379
  treeHandler.selectItem(selectedItems.value);
4306
4380
  }
4307
4381
  showPopup.value = shouldShow;
@@ -4381,7 +4455,8 @@ var __publicField = (obj, key, value) => {
4381
4455
  ]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("span", _hoisted_4$d, null, 512)), [
4382
4456
  [vue.unref(vT), selectedItemLabel.value]
4383
4457
  ]),
4384
- _hoisted_5$c
4458
+ _hoisted_5$c,
4459
+ loadingItems.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_6$8, "progress_activity")) : vue.createCommentVNode("", true)
4385
4460
  ], 512),
4386
4461
  showPopup.value ? (vue.openBlock(), vue.createBlock(_sfc_main$1l, {
4387
4462
  key: 0,
@@ -30752,6 +30827,7 @@ img.ProseMirror-separator {
30752
30827
  constructor(option) {
30753
30828
  super(option);
30754
30829
  __publicField(this, "editableSupport");
30830
+ this.grid.rowEditPolicy = option.isRowEditable;
30755
30831
  this.editableSupport = new GridHandlerEditableSupport(
30756
30832
  this.grid,
30757
30833
  this.gridEventListener,
@@ -30864,6 +30940,7 @@ img.ProseMirror-separator {
30864
30940
  constructor(option) {
30865
30941
  super(option);
30866
30942
  __publicField(this, "editableSupport");
30943
+ this.grid.rowEditPolicy = option.isRowEditable;
30867
30944
  this.editableSupport = new GridHandlerEditableSupport(
30868
30945
  this.grid,
30869
30946
  this.gridEventListener,
@@ -31391,17 +31468,19 @@ img.ProseMirror-separator {
31391
31468
  const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
31392
31469
  __name: "BSGridCellEdit",
31393
31470
  props: {
31394
- isEditing: { type: Boolean }
31471
+ isEditing: { type: Boolean },
31472
+ showEditIcon: { type: Boolean }
31395
31473
  },
31396
31474
  emits: ["toggleEditMode"],
31397
31475
  setup(__props, { emit: __emit }) {
31398
31476
  return (_ctx, _cache) => {
31399
31477
  return vue.openBlock(), vue.createElementBlock("td", _hoisted_1$A, [
31400
- vue.createElementVNode("div", {
31478
+ _ctx.showEditIcon ? (vue.openBlock(), vue.createElementBlock("div", {
31479
+ key: 0,
31401
31480
  onClick: _cache[0] || (_cache[0] = vue.withModifiers(($event) => _ctx.$emit("toggleEditMode"), ["stop"]))
31402
31481
  }, [
31403
31482
  vue.createElementVNode("span", _hoisted_2$q, vue.toDisplayString(_ctx.isEditing ? "replay" : "stylus"), 1)
31404
- ])
31483
+ ])) : vue.createCommentVNode("", true)
31405
31484
  ]);
31406
31485
  };
31407
31486
  }
@@ -31543,6 +31622,8 @@ img.ProseMirror-separator {
31543
31622
  showDragHandle: { type: Boolean },
31544
31623
  selectedRows: {},
31545
31624
  editable: { type: Boolean },
31625
+ rowEditable: { type: Boolean },
31626
+ hideEditIcon: { type: Boolean },
31546
31627
  editingRow: {},
31547
31628
  isEditing: { type: Boolean },
31548
31629
  selectOnClick: { type: Boolean }
@@ -31556,11 +31637,11 @@ img.ProseMirror-separator {
31556
31637
  emit("toggleSelection", props.row);
31557
31638
  };
31558
31639
  const enterEditMode = () => {
31559
- if (props.editable)
31640
+ if (props.editable && props.rowEditable)
31560
31641
  emit("enterEditMode", props.row, savePoint);
31561
31642
  };
31562
31643
  const toggleEditMode = () => {
31563
- if (props.editable) {
31644
+ if (props.editable && props.rowEditable) {
31564
31645
  props.isEditing ? emit("cancelEditMode", props.row) : enterEditMode();
31565
31646
  }
31566
31647
  };
@@ -31616,11 +31697,12 @@ img.ProseMirror-separator {
31616
31697
  checked: isRowSelected.value,
31617
31698
  onClick: toggleSelection
31618
31699
  }, null, 8, ["checked"])) : vue.createCommentVNode("", true),
31619
- _ctx.editable ? (vue.openBlock(), vue.createBlock(_sfc_main$I, {
31700
+ _ctx.editable && !_ctx.hideEditIcon ? (vue.openBlock(), vue.createBlock(_sfc_main$I, {
31620
31701
  key: 2,
31621
31702
  "is-editing": _ctx.isEditing,
31703
+ "show-edit-icon": _ctx.rowEditable,
31622
31704
  onToggleEditMode: toggleEditMode
31623
- }, null, 8, ["is-editing"])) : vue.createCommentVNode("", true),
31705
+ }, null, 8, ["is-editing", "show-edit-icon"])) : vue.createCommentVNode("", true),
31624
31706
  _ctx.showSerial ? (vue.openBlock(), vue.createBlock(_sfc_main$K, {
31625
31707
  key: 3,
31626
31708
  "serial-no": _ctx.rowIndex + (((_a = _ctx.pageInfo) == null ? void 0 : _a.offset) || 0) + 1
@@ -31694,11 +31776,13 @@ img.ProseMirror-separator {
31694
31776
  keyProvider: { default: () => emptyKeyProvider },
31695
31777
  selectedRows: {},
31696
31778
  editable: { type: Boolean },
31779
+ hideEditIcon: { type: Boolean },
31697
31780
  editingRows: {},
31781
+ rowEditPolicy: {},
31698
31782
  alwaysEditing: { type: Boolean },
31699
31783
  rowDisplayPolicy: {}
31700
31784
  },
31701
- emits: ["offsetChanged", "update:selectedRows", "update:editingRows", "changeEditingRow", "update:sorts"],
31785
+ emits: ["offsetChanged", "update:selectedRows", "changeSelectedRows", "update:editingRows", "changeEditingRow", "update:sorts"],
31702
31786
  setup(__props, { emit: __emit }) {
31703
31787
  const props = __props;
31704
31788
  const emit = __emit;
@@ -31714,28 +31798,35 @@ img.ProseMirror-separator {
31714
31798
  const toggleSelection = (row) => {
31715
31799
  if (internalSelectedRows.has(row)) {
31716
31800
  internalSelectedRows.delete(row);
31801
+ emit("changeSelectedRows", { allRows: false, targetRows: [row], selected: false });
31717
31802
  } else {
31718
31803
  if (props.singleSelect)
31719
31804
  internalSelectedRows.clear();
31720
31805
  internalSelectedRows.add(row);
31806
+ emit("changeSelectedRows", { allRows: false, targetRows: [row], selected: true });
31721
31807
  }
31722
31808
  emit("update:selectedRows", internalSelectedRows);
31723
31809
  };
31724
31810
  const toggleAllSelection = () => {
31725
31811
  if (internalSelectedRows.size > 0) {
31726
31812
  internalSelectedRows.clear();
31813
+ emit("changeSelectedRows", { allRows: true, selected: false });
31727
31814
  } else {
31728
31815
  if (props.singleSelect) {
31729
- if (props.data[0])
31816
+ if (props.data[0]) {
31730
31817
  internalSelectedRows.add(props.data[0]);
31818
+ emit("changeSelectedRows", { allRows: false, targetRows: [props.data[0]], selected: true });
31819
+ }
31731
31820
  } else {
31732
31821
  props.data.forEach((row) => internalSelectedRows.add(row));
31822
+ emit("changeSelectedRows", { allRows: true, selected: true });
31733
31823
  }
31734
31824
  }
31735
31825
  emit("update:selectedRows", internalSelectedRows);
31736
31826
  };
31737
31827
  const clearSelection = () => {
31738
31828
  internalSelectedRows.clear();
31829
+ emit("changeSelectedRows", { allRows: true, selected: false });
31739
31830
  emit("update:selectedRows", internalSelectedRows);
31740
31831
  };
31741
31832
  const table = vue.ref();
@@ -31779,7 +31870,7 @@ img.ProseMirror-separator {
31779
31870
  const initEditing = () => {
31780
31871
  if (props.alwaysEditing) {
31781
31872
  props.data.forEach((row) => {
31782
- if (!internalEditingRows.isEditingRow(row)) {
31873
+ if ((!props.rowEditPolicy || props.rowEditPolicy(row)) && !internalEditingRows.isEditingRow(row)) {
31783
31874
  internalEditingRows.addEditingRow({ row });
31784
31875
  }
31785
31876
  });
@@ -31870,7 +31961,7 @@ img.ProseMirror-separator {
31870
31961
  "selected-row-count": vue.unref(internalSelectedRows).size,
31871
31962
  onClick: toggleAllSelection
31872
31963
  }, null, 8, ["selected-row-count"])) : vue.createCommentVNode("", true),
31873
- _ctx.editable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$7, _hoisted_8$3)) : vue.createCommentVNode("", true),
31964
+ _ctx.editable && !_ctx.hideEditIcon ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_6$7, _hoisted_8$3)) : vue.createCommentVNode("", true),
31874
31965
  _ctx.showSerial ? (vue.openBlock(), vue.createBlock(BSGridHeaderCellSerialNo, { key: 3 })) : vue.createCommentVNode("", true),
31875
31966
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(internalColumns.value, (column) => {
31876
31967
  return vue.openBlock(), vue.createBlock(BSGridHeaderCell, {
@@ -31902,9 +31993,11 @@ img.ProseMirror-separator {
31902
31993
  editable: _ctx.editable,
31903
31994
  "editing-row": (_a2 = _ctx.editingRows) == null ? void 0 : _a2.getEditingRow(row),
31904
31995
  "fixed-columns": fixedColumns.value,
31996
+ "hide-edit-icon": _ctx.hideEditIcon,
31905
31997
  "is-editing": vue.unref(internalEditingRows).isEditingRow(row),
31906
31998
  "page-info": _ctx.pageInfo,
31907
31999
  row,
32000
+ "row-editable": !_ctx.rowEditPolicy || _ctx.rowEditPolicy(row),
31908
32001
  "row-index": index,
31909
32002
  "row-key": _ctx.keyProvider(row),
31910
32003
  "select-on-click": _ctx.selectOnClick,
@@ -31930,7 +32023,7 @@ img.ProseMirror-separator {
31930
32023
  ])
31931
32024
  };
31932
32025
  })
31933
- ]), 1032, ["all-rows", "columns", "editable", "editing-row", "fixed-columns", "is-editing", "page-info", "row", "row-index", "row-key", "select-on-click", "selected-rows", "show-checkbox", "show-drag-handle", "show-serial", "style", "visible-columns"]);
32026
+ ]), 1032, ["all-rows", "columns", "editable", "editing-row", "fixed-columns", "hide-edit-icon", "is-editing", "page-info", "row", "row-editable", "row-index", "row-key", "select-on-click", "selected-rows", "show-checkbox", "show-drag-handle", "show-serial", "style", "visible-columns"]);
31934
32027
  }), 128)) : vue.createCommentVNode("", true)
31935
32028
  ])
31936
32029
  ], 512)
@@ -1,6 +1,6 @@
1
1
  import { Sort } from '../../model/SearchModel';
2
2
  import { KeyProvider } from '../../model/CommonTypes';
3
- import { Column, EditingRows, GridRowData, PageInfo } from './GridModel';
3
+ import { Column, EditingRows, GridRowData, PageInfo, SelectedRowsChangedEvent } from './GridModel';
4
4
 
5
5
  declare const _default: <T extends GridRowData>(__VLS_props: {
6
6
  pageInfo?: PageInfo | undefined;
@@ -9,6 +9,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
9
9
  loading?: boolean | undefined;
10
10
  keyProvider?: KeyProvider<T> | undefined;
11
11
  editable?: boolean | undefined;
12
+ rowEditPolicy?: ((row: T) => boolean) | undefined;
12
13
  selectedRows?: Set<T> | undefined;
13
14
  editingRows?: EditingRows<T> | undefined;
14
15
  rowDisplayPolicy?: ((row: T) => boolean) | undefined;
@@ -20,7 +21,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
20
21
  showSerial?: boolean | undefined;
21
22
  showCheckbox?: boolean | undefined;
22
23
  showDragHandle?: boolean | undefined;
23
- "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
24
+ hideEditIcon?: boolean | undefined;
25
+ "onUpdate:selectedRows"?: ((selectedRows: Set<T>, currentChanged?: T[] | undefined) => any) | undefined;
26
+ onChangeSelectedRows?: ((event: SelectedRowsChangedEvent<T>) => any) | undefined;
24
27
  "onUpdate:editingRows"?: ((editingRows: EditingRows<T>) => any) | undefined;
25
28
  onChangeEditingRow?: ((row: T, editing: boolean) => any) | undefined;
26
29
  "onUpdate:sorts"?: ((sort: Sort[]) => any) | undefined;
@@ -36,7 +39,8 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
36
39
  attrs: any;
37
40
  emit: {
38
41
  (e: 'offsetChanged', offset: number, currentPageInfo: PageInfo): void;
39
- (e: 'update:selectedRows', selectedRows: Set<T>): void;
42
+ (e: 'update:selectedRows', selectedRows: Set<T>, currentChanged?: T[]): void;
43
+ (e: 'changeSelectedRows', event: SelectedRowsChangedEvent<T>): void;
40
44
  (e: 'update:editingRows', editingRows: EditingRows<T>): void;
41
45
  (e: 'changeEditingRow', row: T, editing: boolean): void;
42
46
  (e: 'update:sorts', sort: Sort[]): void;
@@ -49,6 +53,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
49
53
  loading?: boolean | undefined;
50
54
  keyProvider?: KeyProvider<T> | undefined;
51
55
  editable?: boolean | undefined;
56
+ rowEditPolicy?: ((row: T) => boolean) | undefined;
52
57
  selectedRows?: Set<T> | undefined;
53
58
  editingRows?: EditingRows<T> | undefined;
54
59
  rowDisplayPolicy?: ((row: T) => boolean) | undefined;
@@ -60,7 +65,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
60
65
  showSerial?: boolean | undefined;
61
66
  showCheckbox?: boolean | undefined;
62
67
  showDragHandle?: boolean | undefined;
63
- "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
68
+ hideEditIcon?: boolean | undefined;
69
+ "onUpdate:selectedRows"?: ((selectedRows: Set<T>, currentChanged?: T[] | undefined) => any) | undefined;
70
+ onChangeSelectedRows?: ((event: SelectedRowsChangedEvent<T>) => any) | undefined;
64
71
  "onUpdate:editingRows"?: ((editingRows: EditingRows<T>) => any) | undefined;
65
72
  onChangeEditingRow?: ((row: T, editing: boolean) => any) | undefined;
66
73
  "onUpdate:sorts"?: ((sort: Sort[]) => any) | undefined;
@@ -77,7 +84,8 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
77
84
  }) => any>>;
78
85
  emit: {
79
86
  (e: 'offsetChanged', offset: number, currentPageInfo: PageInfo): void;
80
- (e: 'update:selectedRows', selectedRows: Set<T>): void;
87
+ (e: 'update:selectedRows', selectedRows: Set<T>, currentChanged?: T[]): void;
88
+ (e: 'changeSelectedRows', event: SelectedRowsChangedEvent<T>): void;
81
89
  (e: 'update:editingRows', editingRows: EditingRows<T>): void;
82
90
  (e: 'changeEditingRow', row: T, editing: boolean): void;
83
91
  (e: 'update:sorts', sort: Sort[]): void;
@@ -93,6 +101,7 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
93
101
  loading?: boolean | undefined;
94
102
  keyProvider?: KeyProvider<T> | undefined;
95
103
  editable?: boolean | undefined;
104
+ rowEditPolicy?: ((row: T) => boolean) | undefined;
96
105
  selectedRows?: Set<T> | undefined;
97
106
  editingRows?: EditingRows<T> | undefined;
98
107
  rowDisplayPolicy?: ((row: T) => boolean) | undefined;
@@ -104,7 +113,9 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
104
113
  showSerial?: boolean | undefined;
105
114
  showCheckbox?: boolean | undefined;
106
115
  showDragHandle?: boolean | undefined;
107
- "onUpdate:selectedRows"?: ((selectedRows: Set<T>) => any) | undefined;
116
+ hideEditIcon?: boolean | undefined;
117
+ "onUpdate:selectedRows"?: ((selectedRows: Set<T>, currentChanged?: T[] | undefined) => any) | undefined;
118
+ onChangeSelectedRows?: ((event: SelectedRowsChangedEvent<T>) => any) | undefined;
108
119
  "onUpdate:editingRows"?: ((editingRows: EditingRows<T>) => any) | undefined;
109
120
  onChangeEditingRow?: ((row: T, editing: boolean) => any) | undefined;
110
121
  "onUpdate:sorts"?: ((sort: Sort[]) => any) | undefined;
@@ -121,7 +132,8 @@ declare const _default: <T extends GridRowData>(__VLS_props: {
121
132
  }) => any>>;
122
133
  emit: {
123
134
  (e: 'offsetChanged', offset: number, currentPageInfo: PageInfo): void;
124
- (e: 'update:selectedRows', selectedRows: Set<T>): void;
135
+ (e: 'update:selectedRows', selectedRows: Set<T>, currentChanged?: T[]): void;
136
+ (e: 'changeSelectedRows', event: SelectedRowsChangedEvent<T>): void;
125
137
  (e: 'update:editingRows', editingRows: EditingRows<T>): void;
126
138
  (e: 'changeEditingRow', row: T, editing: boolean): void;
127
139
  (e: 'update:sorts', sort: Sort[]): void;
@@ -1,9 +1,11 @@
1
1
  declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
2
  isEditing: boolean;
3
+ showEditIcon?: boolean | undefined;
3
4
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
5
  toggleEditMode: () => void;
5
6
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
7
  isEditing: boolean;
8
+ showEditIcon?: boolean | undefined;
7
9
  }>>> & {
8
10
  onToggleEditMode?: (() => any) | undefined;
9
11
  }, {}, {}>;