@nhdropshipping/y-components 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -250,7 +250,8 @@ const yt = ["type", "disabled", "aria-busy", "aria-disabled"], gt = { class: "co
250
250
  expandable: { type: Boolean },
251
251
  rowDisabled: { type: Function, default: void 0 },
252
252
  selectedItems: { default: void 0 },
253
- rowSelectable: { type: Boolean, default: !1 }
253
+ rowSelectable: { type: Boolean, default: !1 },
254
+ requireDeselectBeforeSelect: { type: Boolean, default: !0 }
254
255
  },
255
256
  emits: ["edit", "select", "update:selectedItems", "page-change", "page-size-change", "row-click"],
256
257
  setup(t, { emit: k }) {
@@ -403,7 +404,15 @@ const yt = ["type", "disabled", "aria-busy", "aria-disabled"], gt = { class: "co
403
404
  function Ze(u, g) {
404
405
  if (!e.rowSelectable) return;
405
406
  const _ = a(u, g);
406
- c(u, g) || (S.value === _ ? (S.value = null, n("row-click", u, null)) : (S.value = _, n("row-click", u, _)));
407
+ if (!c(u, g))
408
+ if (S.value === _)
409
+ S.value = null, n("row-click", u, null);
410
+ else if (e.requireDeselectBeforeSelect) {
411
+ if (S.value !== null)
412
+ return;
413
+ S.value = _, n("row-click", u, _);
414
+ } else
415
+ S.value = _, n("row-click", u, _);
407
416
  }
408
417
  function Qe(u, g) {
409
418
  if (!e.rowSelectable) return !1;
@@ -752,7 +761,7 @@ const yt = ["type", "disabled", "aria-busy", "aria-disabled"], gt = { class: "co
752
761
  ], 512);
753
762
  };
754
763
  }
755
- }), qt = /* @__PURE__ */ $e(jt, [["__scopeId", "data-v-27e5b579"]]), Ut = ["onKeydown", "aria-expanded"], Zt = ["src"], Qt = ["placeholder", "onKeydown"], Jt = ["onClick", "onMouseenter"], Xt = ["src"], Gt = /* @__PURE__ */ xe({
764
+ }), qt = /* @__PURE__ */ $e(jt, [["__scopeId", "data-v-c8484581"]]), Ut = ["onKeydown", "aria-expanded"], Zt = ["src"], Qt = ["placeholder", "onKeydown"], Jt = ["onClick", "onMouseenter"], Xt = ["src"], Gt = /* @__PURE__ */ xe({
756
765
  __name: "yselect",
757
766
  props: {
758
767
  modelValue: {},