tsv2-library 1.1.0-dev-alpha.12 → 1.1.0-dev-alpha.13

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.
@@ -42559,36 +42559,22 @@ const _sfc_main$1a = /* @__PURE__ */ defineComponent({
42559
42559
  const onButtonSelectClicked = (close4 = true) => {
42560
42560
  selectedTreeKeys.value = temporarySelectedTreeKeys.value;
42561
42561
  selectedNode.value = temporarySelectedNode.value;
42562
- let isSelected6 = false;
42563
- if (selectedTreeKeys.value) {
42564
- if (Array.isArray(selectedTreeKeys.value)) {
42565
- isSelected6 = selectedTreeKeys.value.length > 0;
42566
- } else if (typeof selectedTreeKeys.value === "object") {
42567
- isSelected6 = Object.values(selectedTreeKeys.value).some((val) => {
42568
- if (typeof val === "boolean")
42569
- return val;
42570
- return val == null ? void 0 : val.checked;
42571
- });
42572
- } else {
42573
- isSelected6 = !!selectedTreeKeys.value;
42574
- }
42575
- }
42576
- if (isSelected6) {
42562
+ if (Object.keys(selectedTreeKeys.value ?? {}).length) {
42577
42563
  emit("select", {
42578
42564
  keys: selectedTreeKeys.value,
42579
42565
  selectedNodes: selectedTreeNodes.value,
42580
42566
  singleNode: selectedNode.value
42581
42567
  });
42582
42568
  emit("update:visible", !close4);
42583
- } else if (!props.allowEmptySelection) {
42584
- invalidSelectionMessage.value = "You must pick a " + props.type.toLowerCase();
42585
- } else {
42569
+ } else if (props.allowEmptySelection) {
42586
42570
  emit("select", {
42587
42571
  keys: [],
42588
42572
  selectedNodes: void 0,
42589
42573
  singleNode: void 0
42590
42574
  });
42591
42575
  emit("update:visible", !close4);
42576
+ } else if (!props.allowEmptySelection) {
42577
+ invalidSelectionMessage.value = "You must pick a " + props.type.toLowerCase();
42592
42578
  }
42593
42579
  };
42594
42580
  watch(