@fastkit/vui 0.12.3 → 0.12.5

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/vui.d.ts CHANGED
@@ -1128,7 +1128,7 @@ export declare interface DataTableHeader {
1128
1128
  key: number | string;
1129
1129
  label?: VNodeChild | ((vui: VuiService) => VNodeChild);
1130
1130
  sortQuery?: string;
1131
- hidden?: boolean;
1131
+ hidden?: boolean | (() => boolean);
1132
1132
  align?: DataTableHeaderAlign;
1133
1133
  cell?: (payload: DataTableCellSlotPayload) => VNodeChild;
1134
1134
  }
@@ -3360,7 +3360,7 @@ export declare const VButton: DefineComponent<{
3360
3360
  ariaCurrentValue: "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
3361
3361
  }>;
3362
3362
 
3363
- export declare type VButtonAlign = typeof BUTTON_ALIGNS[number];
3363
+ export declare type VButtonAlign = (typeof BUTTON_ALIGNS)[number];
3364
3364
 
3365
3365
  export declare const VButtonGroup: DefineComponent<{
3366
3366
  disabled: BooleanConstructor;
package/dist/vui.mjs CHANGED
@@ -4567,7 +4567,9 @@ const VDataTable = /* @__PURE__ */ defineComponent({
4567
4567
  key: SELECTABLE_HEADER_SYMBOL
4568
4568
  });
4569
4569
  }
4570
- ret.push(...headers.filter(h => !h.hidden));
4570
+ ret.push(...headers.filter(({
4571
+ hidden
4572
+ }) => !(typeof hidden === 'function' ? hidden() : hidden)));
4571
4573
  return ret;
4572
4574
  });
4573
4575
  const searchQueryValues = computed(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fastkit/vui",
3
- "version": "0.12.3",
3
+ "version": "0.12.5",
4
4
  "description": "A simple, extensible UI kit for Vue applications.",
5
5
  "buildOptions": {
6
6
  "name": "Vui",
@@ -59,11 +59,11 @@
59
59
  "vue": "^3.2.45"
60
60
  },
61
61
  "dependencies": {
62
- "@fastkit/color-scheme": "0.12.3",
63
- "@fastkit/icon-font": "0.12.3",
64
- "@fastkit/tiny-logger": "0.12.3",
65
- "@fastkit/vite-kit": "0.12.3",
66
- "@fastkit/vue-kit": "0.12.3",
62
+ "@fastkit/color-scheme": "0.12.5",
63
+ "@fastkit/icon-font": "0.12.5",
64
+ "@fastkit/tiny-logger": "0.12.5",
65
+ "@fastkit/vite-kit": "0.12.5",
66
+ "@fastkit/vue-kit": "0.12.5",
67
67
  "@tiptap/extension-link": "^2.0.0-beta.209",
68
68
  "@tiptap/extension-text-style": "^2.0.0-beta.209",
69
69
  "@tiptap/extension-underline": "^2.0.0-beta.209",
@@ -32,7 +32,7 @@ export type RawVButtonIcon = IconName | VButtonIcon;
32
32
 
33
33
  export const BUTTON_ALIGNS = ['left', 'center', 'right'] as const;
34
34
 
35
- export type VButtonAlign = typeof BUTTON_ALIGNS[number];
35
+ export type VButtonAlign = (typeof BUTTON_ALIGNS)[number];
36
36
 
37
37
  function resolveRawVButtonIcon(
38
38
  raw?: RawVButtonIcon,
@@ -83,7 +83,7 @@ export interface DataTableHeader {
83
83
  key: number | string;
84
84
  label?: VNodeChild | ((vui: VuiService) => VNodeChild);
85
85
  sortQuery?: string;
86
- hidden?: boolean;
86
+ hidden?: boolean | (() => boolean);
87
87
  align?: DataTableHeaderAlign;
88
88
  cell?: (payload: DataTableCellSlotPayload) => VNodeChild;
89
89
  }
@@ -207,7 +207,11 @@ export const VDataTable = defineComponent({
207
207
  key: SELECTABLE_HEADER_SYMBOL,
208
208
  });
209
209
  }
210
- ret.push(...headers.filter((h) => !h.hidden));
210
+ ret.push(
211
+ ...headers.filter(
212
+ ({ hidden }) => !(typeof hidden === 'function' ? hidden() : hidden),
213
+ ),
214
+ );
211
215
  return ret;
212
216
  });
213
217