tsv2-library 1.1.0-dev-alpha.41 → 1.1.0-dev-alpha.43

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.
@@ -42051,7 +42051,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
42051
42051
  const selectedKeysModel = computed({
42052
42052
  get: () => props.selectedKeys ?? {},
42053
42053
  set: (keys2) => {
42054
- var _a, _b, _c, _d, _e;
42054
+ var _a, _b, _c, _d, _e, _f, _g;
42055
42055
  const selectableSet = selectableKeys.value;
42056
42056
  const locked = lockedKeys.value;
42057
42057
  if (selectableSet.size > 0 || locked.size > 0) {
@@ -42069,10 +42069,15 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
42069
42069
  const prevAllChecked = !!((_a = prevKeys["0"]) == null ? void 0 : _a.checked) && !((_b = prevKeys["0"]) == null ? void 0 : _b.partialChecked);
42070
42070
  const currAllChecked = !!((_c = nextKeys["0"]) == null ? void 0 : _c.checked) && !((_d = nextKeys["0"]) == null ? void 0 : _d.partialChecked);
42071
42071
  if (currAllChecked && !prevAllChecked) {
42072
- for (const k2 of selectableSet)
42073
- nextKeys[k2] = { checked: true, partialChecked: false };
42072
+ const flatFilteredNodes = flattenTreeNodeChildren(
42073
+ (_e = tree.value) == null ? void 0 : _e.filteredValue
42074
+ );
42075
+ if ((flatFilteredNodes == null ? void 0 : flatFilteredNodes.length) === ((_f = flatNodes.value) == null ? void 0 : _f.length)) {
42076
+ for (const k2 of selectableSet)
42077
+ nextKeys[k2] = { checked: true, partialChecked: false };
42078
+ }
42074
42079
  nextKeys["0"] = { checked: true, partialChecked: false };
42075
- } else if (!currAllChecked && prevAllChecked && !((_e = nextKeys["0"]) == null ? void 0 : _e.partialChecked)) {
42080
+ } else if (!currAllChecked && prevAllChecked && !((_g = nextKeys["0"]) == null ? void 0 : _g.partialChecked)) {
42076
42081
  for (const k2 of selectableSet)
42077
42082
  nextKeys[k2] = { checked: false, partialChecked: false };
42078
42083
  const checkedCount = [...effectiveSet].filter(
@@ -42504,7 +42509,9 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
42504
42509
  });
42505
42510
  const lockedKeys = computed(() => {
42506
42511
  const currentKeys = Array.isArray(props.selectedKeys) ? props.selectedKeys : Object.keys(props.selectedKeys ?? {});
42507
- return new Set(currentKeys.filter((k2) => k2 !== "0" && !selectableKeys.value.has(k2)));
42512
+ return new Set(
42513
+ currentKeys.filter((k2) => k2 !== "0" && !selectableKeys.value.has(k2))
42514
+ );
42508
42515
  });
42509
42516
  const handleSelectionChange = (selectedNodeKeys) => {
42510
42517
  if (props.disableSubChildren && props.selectionMode === "checkbox") {
@@ -62908,31 +62915,18 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
62908
62915
  }
62909
62916
  };
62910
62917
  const handleFetchOptions = async (baseParams) => {
62911
- var _a;
62912
62918
  if (props.unpaired)
62913
62919
  return [];
62914
62920
  const tagType = getTagTypeQuery();
62915
- const optionType = props.type === "asset" ? void 0 : "unlinked";
62916
62921
  const excludeId = JSON.stringify(props.selectedAssets ?? []);
62917
- let extraParams = {};
62918
- if (optionType === "unlinked") {
62919
- extraParams = {
62920
- mode: props.type,
62921
- asset: (_a = props.currentAssetDetail) == null ? void 0 : _a._id
62922
- };
62923
- } else {
62924
- extraParams = {
62925
- excludeId,
62926
- tagType,
62927
- status: JSON.stringify(props.assetStatus ?? ["Available"]),
62928
- group: props.groupKey ? `[${props.groupKey.toString()}]` : void 0
62929
- };
62930
- }
62931
62922
  const finalParams = {
62932
62923
  ...baseParams,
62933
- ...extraParams
62924
+ excludeId,
62925
+ tagType,
62926
+ status: JSON.stringify(props.assetStatus ?? ["Available"]),
62927
+ group: props.groupKey ? `[${props.groupKey.toString()}]` : void 0
62934
62928
  };
62935
- return await AssetsServices.getOptions(optionType, finalParams);
62929
+ return await AssetsServices.postAssetOption(finalParams);
62936
62930
  };
62937
62931
  const filterOptionValues = (fieldName) => {
62938
62932
  var _a, _b, _c;