@arex95/vue-core 1.0.1 → 1.0.3
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/composables/axios/axiosFetch.d.ts +1 -1
- package/dist/composables/axios/createFetch.d.ts +1 -1
- package/dist/composables/axios/useVueQuery.d.ts +1 -1
- package/dist/composables/breakpoints/useBreakpoint.d.ts +1 -1
- package/dist/composables/filters/useFilter.d.ts +1 -1
- package/dist/composables/paginators/usePaginator.d.ts +1 -1
- package/dist/config/axios/axiosConfig.d.ts +1 -1
- package/dist/config/axios/index.d.ts +0 -1
- package/dist/index.cjs +25819 -0
- package/dist/index.mjs +23781 -87
- package/dist/rest/RestStd.d.ts +1 -1
- package/package.json +8 -1
- package/dist/index.js +0 -2118
|
@@ -7,4 +7,4 @@ import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
|
7
7
|
* @param {AxiosRequestConfig} axiosRequest - Configuration for the Axios request.
|
|
8
8
|
* @returns {Promise<T>} A promise with the result of the API request.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export declare function axiosFetch<T>(axios: AxiosInstance, axiosRequest: AxiosRequestConfig): Promise<T>;
|
|
@@ -7,4 +7,4 @@ import { UseQueryOptions } from '@tanstack/vue-query';
|
|
|
7
7
|
* @param axiosInstance - An optional custom Axios instance to use for the request.
|
|
8
8
|
* @returns A function that handles the request using the provided composable.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export declare function createFetch(fetchComposable: Function, apiUrl: string, axiosInstance?: AxiosInstance): (axiosRequestConfig: AxiosRequestConfig, options?: UseQueryOptions) => any;
|
|
@@ -9,7 +9,7 @@ import type { ExtendedQueryOptions } from '../../types';
|
|
|
9
9
|
* @param {ExtendedQueryOptions<T>} [queryOptions] - Optional Vue Query options with server execution flag.
|
|
10
10
|
* @returns {object} Composable functions and query state for managing API requests.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export declare function useVueQuery<T>(axios: AxiosInstance, axiosRequest: AxiosRequestConfig, queryOptions?: ExtendedQueryOptions): {
|
|
13
13
|
data: import("vue").Ref<T, T>;
|
|
14
14
|
error: import("vue").Ref<unknown, unknown>;
|
|
15
15
|
isError: import("vue").Ref<true, true>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @returns {Object} An object containing the breakpoints and their states.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare function useBreakpoint(): {
|
|
7
7
|
current: import("vue").ComputedRef<("sm" | "md" | "lg" | "xl" | "2xl")[]>;
|
|
8
8
|
active: import("vue").ComputedRef<"" | "sm" | "md" | "lg" | "xl" | "2xl">;
|
|
9
9
|
sm_S: import("vue").ComputedRef<boolean>;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @returns {Object[]} - The filtered list of objects.
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export declare function useFilter<T extends Record<string, any>>(items: T[], filterConfig: {
|
|
13
13
|
field: string;
|
|
14
14
|
type: 'date' | 'string' | 'number' | 'boolean';
|
|
15
15
|
criteria: any;
|
|
@@ -7,7 +7,7 @@ import { Ref } from "vue";
|
|
|
7
7
|
* @param pageSize - Reactive ref for number of items per page.
|
|
8
8
|
* @returns An object with pagination controls.
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export declare function usePagination(page: Ref<number>, total: Ref<number>, pageSize: Ref<number>): {
|
|
11
11
|
totalPages: import("vue").ComputedRef<number>;
|
|
12
12
|
canFetchNextPage: () => boolean;
|
|
13
13
|
canFetchPreviousPage: () => boolean;
|
|
@@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
|
|
|
3
3
|
* AxiosService class encapsulates the Axios configuration and logic.
|
|
4
4
|
* It manages request and response interceptors and provides methods for making HTTP requests.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export declare class AxiosService {
|
|
7
7
|
private readonly instance;
|
|
8
8
|
private cancelTokenSource;
|
|
9
9
|
private activeRequests;
|