propro-common-components 0.1.58 → 0.1.60

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,2 +1,3 @@
1
+ export declare function isUserLoggedIn(): any;
1
2
  export declare const checkAccessToken: () => Promise<void>;
2
3
  export default checkAccessToken;
@@ -1,3 +1,3 @@
1
- import { UseQueryResult, UseQueryOptions, QueryKey, DefaultError } from '@tanstack/react-query';
1
+ import { DefaultError, QueryKey, UseQueryOptions, UseQueryResult } from '@tanstack/react-query';
2
2
  export declare function useGet<TData = unknown, TError = DefaultError>(key: QueryKey, endpoint: string, options?: Omit<UseQueryOptions<TData, TError, TData, QueryKey>, 'queryKey'>): UseQueryResult<TData, TError>;
3
3
  export default useGet;
@@ -1,10 +1,10 @@
1
- import { QueryKey, UseMutationOptions, UseMutationResult } from "@tanstack/react-query";
2
- import { AxiosError, AxiosRequestConfig } from "axios";
3
- import { ToastOptions } from "react-toastify";
1
+ import { QueryKey, UseMutationOptions, UseMutationResult } from '@tanstack/react-query';
2
+ import { AxiosError, AxiosRequestConfig } from 'axios';
3
+ import { ToastOptions } from 'react-toastify';
4
4
  declare const useMutate: <TData = unknown, TError = AxiosError<unknown, any>, TVariables = unknown, TContext = unknown>({ url, method, headers, invalidateAllQueries, successLog, errorLog, logURL, toastMessage, onSuccess, onError, }: {
5
5
  url: string;
6
- method: "POST" | "PUT" | "DELETE" | "PATCH";
7
- headers?: AxiosRequestConfig["headers"];
6
+ method: 'POST' | 'PUT' | 'DELETE' | 'PATCH';
7
+ headers?: AxiosRequestConfig['headers'];
8
8
  updateKey?: QueryKey | undefined;
9
9
  invalidateAllQueries?: boolean | undefined;
10
10
  successLog?: string | undefined;
@@ -0,0 +1,7 @@
1
+ import type { SwitchProps as NativeSwitchProps } from '@radix-ui/react-switch';
2
+ export type ViewStyle = 'grid' | 'list';
3
+ interface SwitchProps extends NativeSwitchProps {
4
+ color?: 'blue' | 'green';
5
+ }
6
+ declare function ListGridSwitch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;
7
+ export { ListGridSwitch };
@@ -0,0 +1,7 @@
1
+ type IconName = 'list' | 'grid';
2
+ type IconProps = {
3
+ name: IconName;
4
+ className?: string;
5
+ };
6
+ declare function Icon({ name, className }: IconProps): import("react/jsx-runtime").JSX.Element;
7
+ export { Icon };
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ error: {
3
+ noInternet: string;
4
+ };
5
+ success: {};
6
+ };
7
+ export default _default;
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  type StateType = {
3
3
  loading: boolean;
4
4
  };