tsv2-library 1.1.0-dev-alpha.47 → 1.1.0-dev-alpha.48
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/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +4 -1
- package/dist/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +4 -1
- package/dist/src/components/v2/Tree/Tree.vue.d.ts +4 -0
- package/dist/tsv2-library.es.js +11 -3
- package/dist/tsv2-library.umd.js +1 -1
- package/package.json +1 -1
- package/src/components/v2/ButtonSelectTree/ButtonSelectTree.vue.d.ts +4 -1
- package/src/components/v2/DialogSelectTree/DialogSelectTree.vue.d.ts +4 -1
- package/src/components/v2/Tree/Tree.vue.d.ts +4 -0
|
@@ -134,7 +134,10 @@ export interface ButtonSelectTreeProps {
|
|
|
134
134
|
/**
|
|
135
135
|
* The asset quantity already used, to validate the chosen group's available quota.
|
|
136
136
|
*/
|
|
137
|
-
validateQuota?: {
|
|
137
|
+
validateQuota?: {
|
|
138
|
+
assetQuantity: number;
|
|
139
|
+
countAvailableQuota?: (node: any) => number;
|
|
140
|
+
};
|
|
138
141
|
/**
|
|
139
142
|
* Defines the tree to be flattened and shows disposable only
|
|
140
143
|
*/
|
|
@@ -58,7 +58,10 @@ export interface SelectTreeDialogProps {
|
|
|
58
58
|
/**
|
|
59
59
|
* The asset quantity already used, to validate the chosen group's available quota.
|
|
60
60
|
*/
|
|
61
|
-
validateQuota?: {
|
|
61
|
+
validateQuota?: {
|
|
62
|
+
assetQuantity: number;
|
|
63
|
+
countAvailableQuota?: (node: any) => number;
|
|
64
|
+
};
|
|
62
65
|
/**
|
|
63
66
|
* Defines the tree to be flattened and shows disposable only
|
|
64
67
|
*/
|
|
@@ -186,6 +186,10 @@ declare class Tree extends ClassComponent<TreeProps, TreeSlots, TreeEmits> {
|
|
|
186
186
|
* Show group available quota.
|
|
187
187
|
*/
|
|
188
188
|
showAvailableQuota: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Function to count available quota
|
|
191
|
+
*/
|
|
192
|
+
countAvailableQuota?: (node: any) => number;
|
|
189
193
|
/**
|
|
190
194
|
* State where all tree node expanded.
|
|
191
195
|
*/
|
package/dist/tsv2-library.es.js
CHANGED
|
@@ -42049,6 +42049,9 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42049
42049
|
const expandedKeys2 = ref({ "0": true });
|
|
42050
42050
|
const showDisposableGroups = ref(false);
|
|
42051
42051
|
const showAvailableQuota = ref(false);
|
|
42052
|
+
const countAvailableQuota = ref(
|
|
42053
|
+
(node2) => node2.fixedAssetQuota.available - (node2.assetOnTransferCount ?? 0)
|
|
42054
|
+
);
|
|
42052
42055
|
const selectedKeysModel = computed({
|
|
42053
42056
|
get: () => props.selectedKeys ?? {},
|
|
42054
42057
|
set: (keys2) => {
|
|
@@ -42543,7 +42546,8 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42543
42546
|
collapseAll,
|
|
42544
42547
|
expandAll,
|
|
42545
42548
|
expandNodeAll,
|
|
42546
|
-
fetchTreeList
|
|
42549
|
+
fetchTreeList,
|
|
42550
|
+
countAvailableQuota
|
|
42547
42551
|
});
|
|
42548
42552
|
return (_ctx, _cache) => {
|
|
42549
42553
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -42601,7 +42605,7 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
42601
42605
|
class: "flex flex-col grow text-body-medium break-all"
|
|
42602
42606
|
}, [
|
|
42603
42607
|
createElementVNode("span", null, toDisplayString$1(node2.name), 1),
|
|
42604
|
-
showAvailableQuota.value && node2.fixedAssetQuota && node2.key != "0" ? (openBlock(), createElementBlock("span", _hoisted_2$12, " Available Quota: " + toDisplayString$1(
|
|
42608
|
+
showAvailableQuota.value && node2.fixedAssetQuota && node2.key != "0" ? (openBlock(), createElementBlock("span", _hoisted_2$12, " Available Quota: " + toDisplayString$1(countAvailableQuota.value(node2)), 1)) : createCommentVNode("", true)
|
|
42605
42609
|
], 8, _hoisted_1$1o),
|
|
42606
42610
|
node2.isDisposable && showDisposableGroups.value ? (openBlock(), createBlock(_sfc_main$1O, {
|
|
42607
42611
|
key: 0,
|
|
@@ -42767,8 +42771,12 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
42767
42771
|
tree.showDisposableGroups = true;
|
|
42768
42772
|
selectDisposableOnly.value = true;
|
|
42769
42773
|
}
|
|
42770
|
-
if (props.validateQuota)
|
|
42774
|
+
if (props.validateQuota) {
|
|
42771
42775
|
tree.showAvailableQuota = true;
|
|
42776
|
+
if (props.validateQuota.countAvailableQuota) {
|
|
42777
|
+
tree.countAvailableQuota = props.validateQuota.countAvailableQuota;
|
|
42778
|
+
}
|
|
42779
|
+
}
|
|
42772
42780
|
}
|
|
42773
42781
|
},
|
|
42774
42782
|
{ deep: true }
|