@open-xamu-co/ui-components-vue 4.0.0-next.29 → 4.0.0-next.30

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  Xamu UI
2
2
 
3
+ # [@open-xamu-co/ui-components-vue-v4.0.0-next.30](https://github.com/xamu-co/ui/compare/@open-xamu-co/ui-components-vue-v4.0.0-next.29...@open-xamu-co/ui-components-vue-v4.0.0-next.30) (2026-07-03)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **nuxt:** get asyncData from context ([8c5616a](https://github.com/xamu-co/ui/commit/8c5616a85a41b69d44efb5319c152358fcda74b7))
9
+
10
+
11
+ ### BREAKING CHANGES
12
+
13
+ * **nuxt:** loaderContentFetch requires suspense
14
+
15
+
16
+
17
+
18
+
19
+ Updating dependant packages with "@open-xamu-co/ui-components-vue" version "4.0.0-next.30"
20
+ Updating "nuxt"
21
+ Succesfully updated "nuxt" package
22
+
3
23
  # [@open-xamu-co/ui-components-vue-v4.0.0-next.29](https://github.com/xamu-co/ui/compare/@open-xamu-co/ui-components-vue-v4.0.0-next.28...@open-xamu-co/ui-components-vue-v4.0.0-next.29) (2026-07-01)
4
24
 
5
25
 
@@ -1,53 +1,4 @@
1
- import { type Ref } from "vue";
2
- import type { vComponent } from "../../types/plugin";
3
- import type { iUseThemeProps } from "../../types/props";
4
- export interface iLoaderContentFetchProps<Ti, Pi extends any[]> extends iUseThemeProps {
5
- noContentMessage?: string;
6
- /** Loader label */
7
- label?: string;
8
- /** Hide loader */
9
- noLoader?: boolean;
10
- fallback?: NoInfer<Ti>;
11
- /** Remove loader wrapper element */
12
- unwrap?: boolean;
13
- /**
14
- * URL to fetch from
15
- *
16
- * Used as key if promise or hydratablePromise are provided.
17
- * Make sure to use preventAutoload to avoid invalid fetching.
18
- */
19
- url?: false | string;
20
- promise?: false | ((...args: [...Pi, AbortSignal | undefined]) => Promise<Ti>);
21
- /**
22
- * Hydrate values after promise if resolved
23
- * Useful with firebase
24
- *
25
- * @see https://firebase.google.com/docs/database/
26
- *
27
- * Hydration is conditioned to the context (disabled, loading...)
28
- */
29
- hydratablePromise?: false | ((content: Ref<Ti | null>, errors: Ref<unknown>) => (...args: [...Pi, AbortSignal | undefined]) => Promise<Ti>);
30
- payload?: Pi;
31
- /**
32
- * Component or tag to render on loader
33
- */
34
- loaderEl?: vComponent | string;
35
- preventAutoload?: boolean;
36
- /** Additional content validation before rendering fetched data */
37
- isContent?: (c?: NoInfer<Ti>) => boolean;
38
- /** Ignore errors and display existing content */
39
- ignoreErrors?: boolean;
40
- /**
41
- * Whether to fetch data on client side only
42
- */
43
- client?: boolean;
44
- /**
45
- * Whether to cache data
46
- *
47
- * @default true
48
- */
49
- cache?: boolean;
50
- }
1
+ import type { iLoaderContentFetchProps } from "../../types/props";
51
2
  declare const __VLS_export: <T, P extends any[] = any[]>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
52
3
  props: import("vue").PublicProps & __VLS_PrettifyLocal<iLoaderContentFetchProps<T, P> & {
53
4
  onRefresh?: ((...args: any[]) => any) | undefined;
@@ -1,78 +1,7 @@
1
- import { type Ref } from "vue";
2
- import type { iGetPage, iPage, iPagination } from "@open-xamu-co/ui-common-types";
3
- import type { iUseThemeProps } from "../../types/props";
4
- export interface iPCProps<Ti, Ci extends string | number = string, Ri = never> extends iPagination, iUseThemeProps {
5
- /**
6
- * Function used to fetch the page
7
- */
8
- page?: Ri extends iGetPage<Ti, Ci> ? iGetPage<Ti, Ci> : (params?: iPagination, signal?: AbortSignal) => Promise<Ri | undefined>;
9
- /**
10
- * Function used to fetch the page and hydrate the content
11
- */
12
- hydratablePage?: (content: Ref<iPage<Ti, Ci> | null | undefined>, errors: Ref<unknown>) => Ri extends iGetPage<Ti, Ci> ? iGetPage<Ti, Ci> : (params?: iPagination, signal?: AbortSignal) => Promise<Ri | undefined>;
13
- /**
14
- * Path used as key for the cache
15
- */
16
- url?: string;
17
- /**
18
- * paginate using route
19
- *
20
- * @example "?orderBy=id:asc" single order property
21
- * @example "?orderBy=id:asc&orderBy=createdAt" multiple order properties
22
- */
23
- withRoute?: boolean;
24
- /**
25
- * hide pagination buttons
26
- *
27
- * @example true hide pagination buttons
28
- * @example "single" hide pagination buttons if only one page
29
- */
30
- hideControls?: boolean | "single";
31
- preventAutoload?: boolean;
32
- /**
33
- * Additional parameters to send every request
34
- */
35
- defaults?: Record<string, any>;
36
- noContentMessage?: string;
37
- /**
38
- * Loader label
39
- */
40
- label?: string;
41
- /**
42
- * When additional operations are required on fetched data
43
- *
44
- * Raw promise payload
45
- */
46
- transform?: (r: Ri) => iPage<Ti, Ci> | undefined;
47
- /**
48
- * When additional operations are required on content
49
- *
50
- * Nodes arr only
51
- */
52
- processContent?: (n: NoInfer<Ti>[]) => NoInfer<Ti>[];
53
- /**
54
- * Ignore errors and display existing content.
55
- */
56
- ignoreErrors?: boolean;
57
- /**
58
- * Whether to fetch data on client side only
59
- */
60
- client?: boolean;
61
- /**
62
- * Whether to cache data
63
- *
64
- * @default true
65
- */
66
- cache?: boolean;
67
- /**
68
- * Additional class for the pagination
69
- *
70
- * @example --txtColor
71
- */
72
- paginationClass?: string | string[] | Record<string, boolean>;
73
- }
1
+ import type { iPage, iPagination } from "@open-xamu-co/ui-common-types";
2
+ import type { iPaginationContentProps } from "../../types/props";
74
3
  declare const __VLS_export: <T, C extends string | number = string, R = never>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
75
- props: import("vue").PublicProps & __VLS_PrettifyLocal<iPCProps<T, C, R> & {
4
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<iPaginationContentProps<T, C, R> & {
76
5
  onRefresh?: ((...args: any[]) => any) | undefined;
77
6
  "onHas-content"?: ((...args: any[]) => any) | undefined;
78
7
  }> & (typeof globalThis extends {
@@ -1,58 +1,5 @@
1
- import type { iGetPage, iNodeFn, iNodeStreamFn, tProp, tThemeModifier, tThemeTuple } from "@open-xamu-co/ui-common-types";
2
- import type { iTableProps } from "@open-xamu-co/ui-components-vue";
3
- export interface iPaginationContentTableProps<Ti extends Record<string, any>, TMi extends Record<string, any>> {
4
- /**
5
- * Required to dedupe caching
6
- */
7
- url: string;
8
- page: iGetPage<Ti>;
9
- defaults?: Record<string, any>;
10
- /** Map node data as required */
11
- mapNode?: (node: Ti) => TMi;
12
- preventAutoload?: boolean;
13
- /**
14
- * Additional refresh function
15
- */
16
- refresh?: () => void;
17
- noContentMessage?: string;
18
- renderErrorMessage?: string;
19
- tableProps?: Omit<iTableProps<Ti, TMi>, "nodes" | "refresh">;
20
- theme?: tThemeTuple | tProp<tThemeModifier>;
21
- /**
22
- * Whether to fetch data on client side only
23
- */
24
- client?: boolean;
25
- /**
26
- * Whether to cache data
27
- *
28
- * @default true
29
- */
30
- cache?: boolean;
31
- /**
32
- * Additional class for the table
33
- *
34
- * @example --txtColor
35
- */
36
- tableClass?: string | string[] | Record<string, boolean>;
37
- /**
38
- * Additional class for the modal
39
- *
40
- * @example --txtColor
41
- */
42
- modalClass?: string | string[] | Record<string, boolean>;
43
- /** Function used to create a node */
44
- createNode?: iNodeStreamFn<NoInfer<Ti>, []> | iNodeFn<NoInfer<Ti>, []>;
45
- swal?: {
46
- createdTitle?: string;
47
- createdText?: string;
48
- notCreatedTitle?: string;
49
- notCreatedText?: string;
50
- };
51
- /**
52
- * Prevent node functions from triggering refresh event (useful with firebase hydration)
53
- */
54
- omitRefresh?: boolean;
55
- }
1
+ import type { iNodeFn } from "@open-xamu-co/ui-common-types";
2
+ import type { iPaginationContentTableProps } from "../../types/props";
56
3
  declare const __VLS_export: <T extends Record<string, any>, TM extends Record<string, any> = T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
57
4
  props: import("vue").PublicProps & __VLS_PrettifyLocal<iPaginationContentTableProps<T, TM> & {
58
5
  "onCreate-node-and-refresh"?: ((...args: any[]) => any) | undefined;
@@ -82,7 +29,7 @@ declare const __VLS_export: <T extends Record<string, any>, TM extends Record<st
82
29
  hydrateData: ((newContent: T[] | null, newErrors?: unknown) => void) | undefined;
83
30
  createNodeAndRefresh: iNodeFn<T>;
84
31
  nodes: NoInfer<T>[];
85
- mappedNodes: import("@open-xamu-co/ui-components-vue").iMappedNodes<NoInfer<T>, TM>;
32
+ mappedNodes: import("../../index.js").iMappedNodes<NoInfer<T>, TM>;
86
33
  updateNodeAndRefresh: iNodeFn<NoInfer<T>>;
87
34
  cloneNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
88
35
  deleteNodeAndRefresh: iNodeFn<NoInfer<T>, [NoInfer<T>, ((m?: boolean) => any) | undefined, (HTMLElement | undefined)?]>;
@@ -20,6 +20,6 @@ type tAsyncDataHandler<T> = (nuxtApp?: any, options?: {
20
20
  *
21
21
  * @see https://nuxt.com/docs/api/composables/use-async-data#type
22
22
  */
23
- export declare function useAsyncDataFn<T, E = any>(handler: tAsyncDataHandler<T>, options?: AsyncDataOptions<T>): iAsyncData<T, E>;
24
- export declare function useAsyncDataFn<T, E = any>(key: string, handler: tAsyncDataHandler<T>, options?: AsyncDataOptions<T>): iAsyncData<T, E>;
23
+ export default function useAsyncDataFn<T, E = any>(handler: tAsyncDataHandler<T>, options?: AsyncDataOptions<T>): iAsyncData<T, E>;
24
+ export default function useAsyncDataFn<T, E = any>(key: string, handler: tAsyncDataHandler<T>, options?: AsyncDataOptions<T>): iAsyncData<T, E>;
25
25
  export {};