tsv2-library 1.1.0-dev-alpha.44 → 1.1.0-dev-alpha.46

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.
@@ -1,5 +1,6 @@
1
1
  import { DefineComponent, Slot } from 'vue';
2
2
  import { FilterOption } from '../../../types/filterOption.type';
3
+ import { FilterField } from '../../../types/filterField.type';
3
4
 
4
5
  export interface DialogSelectAssetFilterModels {
5
6
  assetName?: string[];
@@ -261,6 +262,12 @@ export interface DialogSelectAssetProps {
261
262
  * @param params this is required
262
263
  */
263
264
  fetchFunction?: (params: QueryParams) => Promise<FetchResponse | undefined>;
265
+ /**
266
+ * The function to fetch filter options for AssetFilters.
267
+ *
268
+ * Overrides the default handleFetchOptions when provided.
269
+ */
270
+ fetchOptionFunction?: FilterField<QueryParams>['fetchOptionFn'];
264
271
  }
265
272
 
266
273
  /**
@@ -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,13 @@ 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 = tree.value ? flattenTreeNodeChildren(((_e = tree.value) == null ? void 0 : _e.filteredValue) ?? []) : [];
42073
+ if ((flatFilteredNodes == null ? void 0 : flatFilteredNodes.length) === ((_f = flatNodes.value) == null ? void 0 : _f.length)) {
42074
+ for (const k2 of selectableSet)
42075
+ nextKeys[k2] = { checked: true, partialChecked: false };
42076
+ }
42074
42077
  nextKeys["0"] = { checked: true, partialChecked: false };
42075
- } else if (!currAllChecked && prevAllChecked && !((_e = nextKeys["0"]) == null ? void 0 : _e.partialChecked)) {
42078
+ } else if (!currAllChecked && prevAllChecked && !((_g = nextKeys["0"]) == null ? void 0 : _g.partialChecked)) {
42076
42079
  for (const k2 of selectableSet)
42077
42080
  nextKeys[k2] = { checked: false, partialChecked: false };
42078
42081
  const checkedCount = [...effectiveSet].filter(
@@ -62645,7 +62648,8 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
62645
62648
  tooltipInfo: {},
62646
62649
  disabled: { type: Boolean },
62647
62650
  btnTooltipInfo: {},
62648
- fetchFunction: {}
62651
+ fetchFunction: {},
62652
+ fetchOptionFunction: { default: void 0 }
62649
62653
  }, {
62650
62654
  "visible": { default: false },
62651
62655
  "visibleModifiers": {}
@@ -63221,11 +63225,11 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
63221
63225
  "onUpdate:filter": _cache[3] || (_cache[3] = ($event) => filter4 = $event),
63222
63226
  "visible-columns": visibleColumns.value,
63223
63227
  "onUpdate:visibleColumns": _cache[4] || (_cache[4] = ($event) => visibleColumns.value = $event),
63224
- "fetch-options": handleFetchOptions,
63228
+ "fetch-options": props.fetchOptionFunction ?? handleFetchOptions,
63225
63229
  "table-name": TABLE_NAME,
63226
63230
  "tag-type": typeof props.tagType !== "boolean" ? props.tagType : void 0,
63227
63231
  onUpdateFields: _cache[5] || (_cache[5] = ($event) => containerKey.value++)
63228
- }, null, 8, ["filter", "visible-columns", "tag-type"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(filterLists.value, (field2) => {
63232
+ }, null, 8, ["filter", "visible-columns", "fetch-options", "tag-type"])) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(filterLists.value, (field2) => {
63229
63233
  return openBlock(), createElementBlock(Fragment, null, [
63230
63234
  field2.fieldName === "group" ? (openBlock(), createBlock(_sfc_main$1a, {
63231
63235
  key: field2.label,