tsv2-library 1.1.0-dev-alpha.25 → 1.1.0-dev-alpha.27

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.
@@ -42466,7 +42466,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
42466
42466
  class: "flex flex-col grow text-body-medium break-all"
42467
42467
  }, [
42468
42468
  createElementVNode("span", null, toDisplayString$1(node2.name), 1),
42469
- showAvailableQuota.value && node2.fixedAssetQuota && node2.key != "0" ? (openBlock(), createElementBlock("span", _hoisted_2$12, " Available Quota: " + toDisplayString$1(node2.fixedAssetQuota.available), 1)) : createCommentVNode("", true)
42469
+ showAvailableQuota.value && node2.fixedAssetQuota && node2.key != "0" ? (openBlock(), createElementBlock("span", _hoisted_2$12, " Available Quota: " + toDisplayString$1(node2.fixedAssetQuota.available - (node2.assetOnTransferCount ?? 0)), 1)) : createCommentVNode("", true)
42470
42470
  ], 8, _hoisted_1$1o),
42471
42471
  node2.isDisposable && showDisposableGroups.value ? (openBlock(), createBlock(_sfc_main$1O, {
42472
42472
  key: 0,
@@ -42583,11 +42583,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
42583
42583
  () => !props.allowEmptySelection || !!props.validateQuota
42584
42584
  );
42585
42585
  const onButtonSelectClicked = (close4 = true) => {
42586
- var _a, _b;
42586
+ var _a, _b, _c;
42587
42587
  selectedTreeKeys.value = temporarySelectedTreeKeys.value;
42588
42588
  selectedNode.value = temporarySelectedNode.value;
42589
42589
  if (Object.keys(selectedTreeKeys.value ?? {}).length) {
42590
- if (props.validateQuota && props.validateQuota.assetQuantity > ((_b = (_a = selectedNode.value) == null ? void 0 : _a.fixedAssetQuota) == null ? void 0 : _b.available)) {
42590
+ const remainingQuota = (((_b = (_a = selectedNode.value) == null ? void 0 : _a.fixedAssetQuota) == null ? void 0 : _b.available) ?? 0) - (((_c = selectedNode.value) == null ? void 0 : _c.assetOnTransferCount) ?? 0);
42591
+ if (props.validateQuota && props.validateQuota.assetQuantity > remainingQuota) {
42591
42592
  invalidSelectionMessage.value = "Group quota is exceeded";
42592
42593
  return;
42593
42594
  }
@@ -54746,18 +54747,22 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
54746
54747
  return void 0;
54747
54748
  }
54748
54749
  });
54750
+ const currentPageData = computed(
54751
+ () => {
54752
+ var _a;
54753
+ return props.lazy ? currentPageTableData.value : (_a = props.data) == null ? void 0 : _a.slice(first3.value, first3.value + tableRows.value);
54754
+ }
54755
+ );
54749
54756
  const isSelectedAll = computed(() => {
54750
- var _a, _b, _c, _d;
54751
- if (props.disableAllRows || !((_a = currentPageTableData.value) == null ? void 0 : _a.length) || props.selectionType !== "checkbox")
54757
+ var _a, _b, _c, _d, _e;
54758
+ if (props.disableAllRows || !((_a = currentPageData.value) == null ? void 0 : _a.length) || props.selectionType !== "checkbox")
54752
54759
  return false;
54753
54760
  const length = (_b = props.selectedData) == null ? void 0 : _b.length;
54754
- const currentPageDataKey = ((_c = filterDisabledRows(currentPageTableData.value)) == null ? void 0 : _c.map(
54755
- (dt2) => dt2[props.dataKey]
54756
- )) ?? [];
54761
+ const currentPageDataKey = ((_c = filterDisabledRows(currentPageData.value)) == null ? void 0 : _c.map((dt2) => dt2[props.dataKey])) ?? [];
54757
54762
  const selectedDataKey = ((_d = props.selectedData) == null ? void 0 : _d.map((dt2) => dt2[props.dataKey])) ?? [];
54758
54763
  const isCurrentPageAllDataSelected = selectedDataKey.length ? isArrayIncluded(currentPageDataKey, selectedDataKey) : false;
54759
54764
  const isAllRecordSelected = !!length && // 0 means no data selected
54760
- length === (totalRecords2.value ?? 0) - (props.totalDisabledRows ?? currentPageDisabledRows.value.length ?? 0);
54765
+ length === ((props.lazy ? totalRecords2.value : (_e = props.data) == null ? void 0 : _e.length) ?? 0) - (props.totalDisabledRows ?? currentPageDisabledRows.value.length ?? 0);
54761
54766
  return isCurrentPageAllDataSelected || isAllRecordSelected;
54762
54767
  });
54763
54768
  const selectedData = computed({
@@ -54912,7 +54917,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
54912
54917
  refetch();
54913
54918
  };
54914
54919
  const onSelectAllChange = (event2) => {
54915
- const filteredRows = filterDisabledRows(currentPageTableData.value);
54920
+ const filteredRows = filterDisabledRows(currentPageData.value);
54916
54921
  currentPageDataSelected.value = event2.checked ? JSON.parse(JSON.stringify(filteredRows)) : [];
54917
54922
  if (!props.lazy)
54918
54923
  dispatchUpdateTotalRecordsEvent();
@@ -55159,7 +55164,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55159
55164
  );
55160
55165
  const rows3 = ((_a = dataTableElement == null ? void 0 : dataTableElement.querySelector("tbody")) == null ? void 0 : _a.querySelectorAll("tr")) ?? [];
55161
55166
  currentPageDisabledRows.value.forEach((rowID) => {
55162
- const index2 = (props.data ?? currentPageTableData.value ?? []).findIndex(
55167
+ const index2 = (currentPageData.value ?? []).findIndex(
55163
55168
  (data30) => data30[props.dataKey] === rowID
55164
55169
  );
55165
55170
  if (index2 !== -1 && rows3[index2]) {
@@ -55273,6 +55278,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55273
55278
  { immediate: true }
55274
55279
  );
55275
55280
  return (_ctx, _cache) => {
55281
+ var _a;
55276
55282
  const _component_DataTable = resolveComponent("DataTable", true);
55277
55283
  return openBlock(), createElementBlock(Fragment, null, [
55278
55284
  props.data || currentPageTableData.value || loadingTable.value ? (openBlock(), createBlock(unref(script$j), {
@@ -55298,9 +55304,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55298
55304
  rows: _ctx.usePaginator ? tableRows.value : void 0,
55299
55305
  "rows-per-page-options": rowsPerPageOptions.value,
55300
55306
  "scroll-height": _ctx.scrollHeight,
55301
- "select-all": props.lazy ? isSelectedAll.value : void 0,
55307
+ "select-all": isSelectedAll.value,
55302
55308
  "selection-mode": selectionMode.value,
55303
- "total-records": props.lazy ? totalRecords2.value : void 0,
55309
+ "total-records": props.lazy ? totalRecords2.value : (_a = _ctx.data) == null ? void 0 : _a.length,
55304
55310
  value: props.data ?? currentPageTableData.value,
55305
55311
  "virtual-scroller-options": _ctx.virtualScrollerOptions,
55306
55312
  onColumnResizeEnd: updateTableColumnsWidth,
@@ -55339,9 +55345,9 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55339
55345
  style: { "width": "32px", "min-width": "32px", "max-width": "32px" }
55340
55346
  }, {
55341
55347
  body: withCtx(({ rowTogglerCallback, data: rowData }) => {
55342
- var _a;
55348
+ var _a2;
55343
55349
  return [
55344
- (rowData == null ? void 0 : rowData.hasChildren) || ((_a = rowData.children) == null ? void 0 : _a.length) ? (openBlock(), createElementBlock("div", _hoisted_1$$, [
55350
+ (rowData == null ? void 0 : rowData.hasChildren) || ((_a2 = rowData.children) == null ? void 0 : _a2.length) ? (openBlock(), createElementBlock("div", _hoisted_1$$, [
55345
55351
  createVNode(unref(_sfc_main$1N), {
55346
55352
  class: normalizeClass([{ "rotate-90": isRowExpanded(rowData[props.dataKey]) }, "!p-0 !m-0 !w-auto !h-auto"]),
55347
55353
  onClick: ($event) => rowTogglerCallback($event),
@@ -55449,12 +55455,12 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55449
55455
  col.bodyComponent(itemData).events ? col.bodyComponent(itemData).events : {}
55450
55456
  ), {
55451
55457
  onChange: ($event) => {
55452
- var _a, _b;
55453
- return (_b = (_a = col.bodyComponent(itemData)).onChange) == null ? void 0 : _b.call(_a, itemData);
55458
+ var _a2, _b;
55459
+ return (_b = (_a2 = col.bodyComponent(itemData)).onChange) == null ? void 0 : _b.call(_a2, itemData);
55454
55460
  },
55455
55461
  "onUpdate:modelValue": ($event) => {
55456
- var _a, _b;
55457
- return (_b = (_a = col.bodyComponent(itemData)).onChange) == null ? void 0 : _b.call(_a, itemData);
55462
+ var _a2, _b;
55463
+ return (_b = (_a2 = col.bodyComponent(itemData)).onChange) == null ? void 0 : _b.call(_a2, itemData);
55458
55464
  }
55459
55465
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])) : (openBlock(), createElementBlock("span", {
55460
55466
  key: 1,
@@ -55484,10 +55490,10 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
55484
55490
  props.customColumn ? {
55485
55491
  name: "header",
55486
55492
  fn: withCtx(() => {
55487
- var _a;
55493
+ var _a2;
55488
55494
  return [
55489
55495
  createVNode(_sfc_main$1O, {
55490
- onClick: (_a = customColumn.value) == null ? void 0 : _a.toggleMenu,
55496
+ onClick: (_a2 = customColumn.value) == null ? void 0 : _a2.toggleMenu,
55491
55497
  class: "!w-4 !h-4 !mx-auto",
55492
55498
  "data-ts-section": "columnvisibilitytoggle",
55493
55499
  icon: "ellipsis-h",