warqadui 0.0.51 → 0.0.53
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/index.d.mts +202 -2
- package/dist/index.d.ts +202 -2
- package/dist/index.js +948 -353
- package/dist/index.mjs +924 -338
- package/dist/styles.js +369 -0
- package/dist/styles.mjs +369 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -7,6 +7,7 @@ import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/
|
|
|
7
7
|
import * as z from 'zod';
|
|
8
8
|
import * as react_to_print from 'react-to-print';
|
|
9
9
|
import { UploadFile } from 'antd';
|
|
10
|
+
import * as zustand from 'zustand';
|
|
10
11
|
|
|
11
12
|
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
13
|
variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | "warning";
|
|
@@ -528,6 +529,34 @@ interface BrandingProps {
|
|
|
528
529
|
}
|
|
529
530
|
declare const Branding: React__default.FC<BrandingProps>;
|
|
530
531
|
|
|
532
|
+
interface ProfileCardProps {
|
|
533
|
+
name: string;
|
|
534
|
+
role?: string;
|
|
535
|
+
image?: string;
|
|
536
|
+
details: Record<string, string | number | undefined | null>;
|
|
537
|
+
backUrl?: string;
|
|
538
|
+
className?: string;
|
|
539
|
+
}
|
|
540
|
+
declare const ProfileCard: React__default.FC<ProfileCardProps>;
|
|
541
|
+
|
|
542
|
+
interface ProfileViewInfoItem {
|
|
543
|
+
label: string;
|
|
544
|
+
value: string | number | undefined | null;
|
|
545
|
+
copiable?: boolean;
|
|
546
|
+
}
|
|
547
|
+
interface ProfileViewProps {
|
|
548
|
+
name: string;
|
|
549
|
+
role?: string;
|
|
550
|
+
email?: string;
|
|
551
|
+
imgUrl?: string;
|
|
552
|
+
userId?: string;
|
|
553
|
+
info?: ProfileViewInfoItem[];
|
|
554
|
+
className?: string;
|
|
555
|
+
title?: string;
|
|
556
|
+
description?: string;
|
|
557
|
+
}
|
|
558
|
+
declare const ProfileView: React__default.FC<ProfileViewProps>;
|
|
559
|
+
|
|
531
560
|
type LoginTheme = "tech" | "travel" | "healthcare";
|
|
532
561
|
interface BaseLoginProps {
|
|
533
562
|
form: UseFormReturn<LoginSchema>;
|
|
@@ -540,6 +569,7 @@ interface BaseLoginProps {
|
|
|
540
569
|
footer?: React__default.ReactNode;
|
|
541
570
|
brandName?: string;
|
|
542
571
|
backUrl?: string;
|
|
572
|
+
isLoading?: boolean;
|
|
543
573
|
}
|
|
544
574
|
declare const ThemedLogin: React__default.FC<BaseLoginProps>;
|
|
545
575
|
|
|
@@ -564,6 +594,7 @@ interface UseLoginProps {
|
|
|
564
594
|
title?: string;
|
|
565
595
|
subtitle?: string;
|
|
566
596
|
backUrl?: string;
|
|
597
|
+
isLoading?: boolean;
|
|
567
598
|
}
|
|
568
599
|
declare const useLogin: (props: UseLoginProps) => {
|
|
569
600
|
form: UseFormReturn<{
|
|
@@ -576,6 +607,24 @@ declare const useLogin: (props: UseLoginProps) => {
|
|
|
576
607
|
Login: React__default.FC<{}>;
|
|
577
608
|
};
|
|
578
609
|
|
|
610
|
+
interface ProfileDropdownItem {
|
|
611
|
+
label: string;
|
|
612
|
+
icon?: React__default.ReactNode;
|
|
613
|
+
onClick?: () => void | Promise<void>;
|
|
614
|
+
disabled?: boolean;
|
|
615
|
+
className?: string;
|
|
616
|
+
}
|
|
617
|
+
interface ProfileDropdownProps {
|
|
618
|
+
name: string;
|
|
619
|
+
image?: string;
|
|
620
|
+
items: ProfileDropdownItem[];
|
|
621
|
+
className?: string;
|
|
622
|
+
triggerMode?: "click" | "hover";
|
|
623
|
+
size?: "sm" | "md" | "lg";
|
|
624
|
+
role?: string;
|
|
625
|
+
}
|
|
626
|
+
declare const ProfileDropdown: React__default.FC<ProfileDropdownProps>;
|
|
627
|
+
|
|
579
628
|
interface FetchProps {
|
|
580
629
|
url: string;
|
|
581
630
|
body?: Record<string, any>;
|
|
@@ -688,7 +737,7 @@ declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
|
688
737
|
params?: Record<string, any>;
|
|
689
738
|
dateFilter?: boolean;
|
|
690
739
|
}) => {
|
|
691
|
-
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, onCreate, createTitle, ...rest }: {
|
|
740
|
+
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, showReload, onCreate, createTitle, ...rest }: {
|
|
692
741
|
columns: DataTableColumn[];
|
|
693
742
|
data: any[];
|
|
694
743
|
error?: any;
|
|
@@ -702,6 +751,7 @@ declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
|
702
751
|
className?: string;
|
|
703
752
|
title?: string;
|
|
704
753
|
description?: string;
|
|
754
|
+
showReload?: boolean;
|
|
705
755
|
onCreate?: () => void;
|
|
706
756
|
createTitle?: string;
|
|
707
757
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -823,4 +873,154 @@ declare const Views: {
|
|
|
823
873
|
}>;
|
|
824
874
|
};
|
|
825
875
|
|
|
826
|
-
|
|
876
|
+
/**
|
|
877
|
+
* Guard component that fetches the current user profile on every route change.
|
|
878
|
+
* It ensures the auth state is synchronized with the server.
|
|
879
|
+
*/
|
|
880
|
+
declare const Guard: () => react_jsx_runtime.JSX.Element;
|
|
881
|
+
/**
|
|
882
|
+
* Ensures the user is logged in to access child routes.
|
|
883
|
+
*/
|
|
884
|
+
declare const ProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
885
|
+
/**
|
|
886
|
+
* Ensures the user is NOT logged in to access child routes (e.g. Login/Signup pages).
|
|
887
|
+
*/
|
|
888
|
+
declare const UnProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
889
|
+
/**
|
|
890
|
+
* Ensures only users with 'admin' role can access child routes.
|
|
891
|
+
*/
|
|
892
|
+
declare const AdminProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
894
|
+
type Role = string;
|
|
895
|
+
type AccountType = string;
|
|
896
|
+
type AuthData = {
|
|
897
|
+
_id: string;
|
|
898
|
+
role: Role;
|
|
899
|
+
email: string;
|
|
900
|
+
phoneNumber: string;
|
|
901
|
+
isActive: boolean;
|
|
902
|
+
isEmailVerified: boolean;
|
|
903
|
+
isPhoneVerified: boolean;
|
|
904
|
+
permissions?: Record<string, boolean>;
|
|
905
|
+
homePath?: string;
|
|
906
|
+
};
|
|
907
|
+
type AccountData = {
|
|
908
|
+
_id: string;
|
|
909
|
+
name: string;
|
|
910
|
+
email: string;
|
|
911
|
+
phoneNumber: string;
|
|
912
|
+
type: AccountType;
|
|
913
|
+
};
|
|
914
|
+
type AuthState = {
|
|
915
|
+
auth: AuthData | null;
|
|
916
|
+
account: AccountData | null;
|
|
917
|
+
isLoggedIn: boolean;
|
|
918
|
+
isFetched: boolean;
|
|
919
|
+
setAuth: (auth: AuthData, account: AccountData) => void;
|
|
920
|
+
setIsLoggedIn: (isLoggedIn: boolean) => void;
|
|
921
|
+
setIsFetched: (isFetched: boolean) => void;
|
|
922
|
+
logout: () => void;
|
|
923
|
+
updateAuth: (data: Partial<AuthData>) => void;
|
|
924
|
+
updateAccount: (data: Partial<AccountData>) => void;
|
|
925
|
+
hasPermission: (key: string) => boolean;
|
|
926
|
+
};
|
|
927
|
+
declare const useAuthStore: zustand.UseBoundStore<zustand.StoreApi<AuthState>>;
|
|
928
|
+
|
|
929
|
+
declare const useAuth: () => {
|
|
930
|
+
auth: {
|
|
931
|
+
_id: string;
|
|
932
|
+
role: Role;
|
|
933
|
+
email: string;
|
|
934
|
+
phoneNumber: string;
|
|
935
|
+
isActive: boolean;
|
|
936
|
+
isEmailVerified: boolean;
|
|
937
|
+
isPhoneVerified: boolean;
|
|
938
|
+
permissions?: Record<string, boolean>;
|
|
939
|
+
homePath?: string;
|
|
940
|
+
} | null;
|
|
941
|
+
user: {
|
|
942
|
+
_id: string;
|
|
943
|
+
role: Role;
|
|
944
|
+
email: string;
|
|
945
|
+
phoneNumber: string;
|
|
946
|
+
isActive: boolean;
|
|
947
|
+
isEmailVerified: boolean;
|
|
948
|
+
isPhoneVerified: boolean;
|
|
949
|
+
permissions?: Record<string, boolean>;
|
|
950
|
+
homePath?: string;
|
|
951
|
+
} | null;
|
|
952
|
+
account: {
|
|
953
|
+
_id: string;
|
|
954
|
+
name: string;
|
|
955
|
+
email: string;
|
|
956
|
+
phoneNumber: string;
|
|
957
|
+
type: AccountType;
|
|
958
|
+
} | null;
|
|
959
|
+
isLoggedIn: boolean;
|
|
960
|
+
isFetched: boolean;
|
|
961
|
+
role: string | undefined;
|
|
962
|
+
userId: string | undefined;
|
|
963
|
+
accountId: string | undefined;
|
|
964
|
+
userName: string | undefined;
|
|
965
|
+
userEmail: string | undefined;
|
|
966
|
+
permissions: Record<string, boolean>;
|
|
967
|
+
isAdmin: boolean;
|
|
968
|
+
isActive: boolean;
|
|
969
|
+
isVerified: boolean;
|
|
970
|
+
isEmailVerified: boolean;
|
|
971
|
+
isPhoneVerified: boolean;
|
|
972
|
+
logout: () => void;
|
|
973
|
+
setIsLoggedIn: (isLoggedIn: boolean) => void;
|
|
974
|
+
setIsFetched: (isFetched: boolean) => void;
|
|
975
|
+
setAuth: (auth: {
|
|
976
|
+
_id: string;
|
|
977
|
+
role: Role;
|
|
978
|
+
email: string;
|
|
979
|
+
phoneNumber: string;
|
|
980
|
+
isActive: boolean;
|
|
981
|
+
isEmailVerified: boolean;
|
|
982
|
+
isPhoneVerified: boolean;
|
|
983
|
+
permissions?: Record<string, boolean>;
|
|
984
|
+
homePath?: string;
|
|
985
|
+
}, account: {
|
|
986
|
+
_id: string;
|
|
987
|
+
name: string;
|
|
988
|
+
email: string;
|
|
989
|
+
phoneNumber: string;
|
|
990
|
+
type: AccountType;
|
|
991
|
+
}) => void;
|
|
992
|
+
login: (data: any) => void;
|
|
993
|
+
updateAuth: (data: Partial<{
|
|
994
|
+
_id: string;
|
|
995
|
+
role: Role;
|
|
996
|
+
email: string;
|
|
997
|
+
phoneNumber: string;
|
|
998
|
+
isActive: boolean;
|
|
999
|
+
isEmailVerified: boolean;
|
|
1000
|
+
isPhoneVerified: boolean;
|
|
1001
|
+
permissions?: Record<string, boolean>;
|
|
1002
|
+
homePath?: string;
|
|
1003
|
+
}>) => void;
|
|
1004
|
+
updateUser: (data: Partial<{
|
|
1005
|
+
_id: string;
|
|
1006
|
+
role: Role;
|
|
1007
|
+
email: string;
|
|
1008
|
+
phoneNumber: string;
|
|
1009
|
+
isActive: boolean;
|
|
1010
|
+
isEmailVerified: boolean;
|
|
1011
|
+
isPhoneVerified: boolean;
|
|
1012
|
+
permissions?: Record<string, boolean>;
|
|
1013
|
+
homePath?: string;
|
|
1014
|
+
}>) => void;
|
|
1015
|
+
updateAccount: (data: Partial<{
|
|
1016
|
+
_id: string;
|
|
1017
|
+
name: string;
|
|
1018
|
+
email: string;
|
|
1019
|
+
phoneNumber: string;
|
|
1020
|
+
type: AccountType;
|
|
1021
|
+
}>) => void;
|
|
1022
|
+
hasPermission: (key: string) => boolean;
|
|
1023
|
+
can: (key: string) => boolean;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
export { type AccountType, AdminProtectedRoute, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ColumnDef, SortingState, ColumnFiltersState, RowData } from '@tanstack/
|
|
|
7
7
|
import * as z from 'zod';
|
|
8
8
|
import * as react_to_print from 'react-to-print';
|
|
9
9
|
import { UploadFile } from 'antd';
|
|
10
|
+
import * as zustand from 'zustand';
|
|
10
11
|
|
|
11
12
|
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
12
13
|
variant?: "primary" | "secondary" | "outline" | "ghost" | "danger" | "warning";
|
|
@@ -528,6 +529,34 @@ interface BrandingProps {
|
|
|
528
529
|
}
|
|
529
530
|
declare const Branding: React__default.FC<BrandingProps>;
|
|
530
531
|
|
|
532
|
+
interface ProfileCardProps {
|
|
533
|
+
name: string;
|
|
534
|
+
role?: string;
|
|
535
|
+
image?: string;
|
|
536
|
+
details: Record<string, string | number | undefined | null>;
|
|
537
|
+
backUrl?: string;
|
|
538
|
+
className?: string;
|
|
539
|
+
}
|
|
540
|
+
declare const ProfileCard: React__default.FC<ProfileCardProps>;
|
|
541
|
+
|
|
542
|
+
interface ProfileViewInfoItem {
|
|
543
|
+
label: string;
|
|
544
|
+
value: string | number | undefined | null;
|
|
545
|
+
copiable?: boolean;
|
|
546
|
+
}
|
|
547
|
+
interface ProfileViewProps {
|
|
548
|
+
name: string;
|
|
549
|
+
role?: string;
|
|
550
|
+
email?: string;
|
|
551
|
+
imgUrl?: string;
|
|
552
|
+
userId?: string;
|
|
553
|
+
info?: ProfileViewInfoItem[];
|
|
554
|
+
className?: string;
|
|
555
|
+
title?: string;
|
|
556
|
+
description?: string;
|
|
557
|
+
}
|
|
558
|
+
declare const ProfileView: React__default.FC<ProfileViewProps>;
|
|
559
|
+
|
|
531
560
|
type LoginTheme = "tech" | "travel" | "healthcare";
|
|
532
561
|
interface BaseLoginProps {
|
|
533
562
|
form: UseFormReturn<LoginSchema>;
|
|
@@ -540,6 +569,7 @@ interface BaseLoginProps {
|
|
|
540
569
|
footer?: React__default.ReactNode;
|
|
541
570
|
brandName?: string;
|
|
542
571
|
backUrl?: string;
|
|
572
|
+
isLoading?: boolean;
|
|
543
573
|
}
|
|
544
574
|
declare const ThemedLogin: React__default.FC<BaseLoginProps>;
|
|
545
575
|
|
|
@@ -564,6 +594,7 @@ interface UseLoginProps {
|
|
|
564
594
|
title?: string;
|
|
565
595
|
subtitle?: string;
|
|
566
596
|
backUrl?: string;
|
|
597
|
+
isLoading?: boolean;
|
|
567
598
|
}
|
|
568
599
|
declare const useLogin: (props: UseLoginProps) => {
|
|
569
600
|
form: UseFormReturn<{
|
|
@@ -576,6 +607,24 @@ declare const useLogin: (props: UseLoginProps) => {
|
|
|
576
607
|
Login: React__default.FC<{}>;
|
|
577
608
|
};
|
|
578
609
|
|
|
610
|
+
interface ProfileDropdownItem {
|
|
611
|
+
label: string;
|
|
612
|
+
icon?: React__default.ReactNode;
|
|
613
|
+
onClick?: () => void | Promise<void>;
|
|
614
|
+
disabled?: boolean;
|
|
615
|
+
className?: string;
|
|
616
|
+
}
|
|
617
|
+
interface ProfileDropdownProps {
|
|
618
|
+
name: string;
|
|
619
|
+
image?: string;
|
|
620
|
+
items: ProfileDropdownItem[];
|
|
621
|
+
className?: string;
|
|
622
|
+
triggerMode?: "click" | "hover";
|
|
623
|
+
size?: "sm" | "md" | "lg";
|
|
624
|
+
role?: string;
|
|
625
|
+
}
|
|
626
|
+
declare const ProfileDropdown: React__default.FC<ProfileDropdownProps>;
|
|
627
|
+
|
|
579
628
|
interface FetchProps {
|
|
580
629
|
url: string;
|
|
581
630
|
body?: Record<string, any>;
|
|
@@ -688,7 +737,7 @@ declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
|
688
737
|
params?: Record<string, any>;
|
|
689
738
|
dateFilter?: boolean;
|
|
690
739
|
}) => {
|
|
691
|
-
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, onCreate, createTitle, ...rest }: {
|
|
740
|
+
TransactionViewComponent: ({ columns, data, error, pageRows, searchPlaceholder, selectable, filterables, verticalLines, index, rowPadding, className, title, description, showReload, onCreate, createTitle, ...rest }: {
|
|
692
741
|
columns: DataTableColumn[];
|
|
693
742
|
data: any[];
|
|
694
743
|
error?: any;
|
|
@@ -702,6 +751,7 @@ declare const useTransaction: ({ url, v, delay, params, dateFilter, }: {
|
|
|
702
751
|
className?: string;
|
|
703
752
|
title?: string;
|
|
704
753
|
description?: string;
|
|
754
|
+
showReload?: boolean;
|
|
705
755
|
onCreate?: () => void;
|
|
706
756
|
createTitle?: string;
|
|
707
757
|
}) => react_jsx_runtime.JSX.Element;
|
|
@@ -823,4 +873,154 @@ declare const Views: {
|
|
|
823
873
|
}>;
|
|
824
874
|
};
|
|
825
875
|
|
|
826
|
-
|
|
876
|
+
/**
|
|
877
|
+
* Guard component that fetches the current user profile on every route change.
|
|
878
|
+
* It ensures the auth state is synchronized with the server.
|
|
879
|
+
*/
|
|
880
|
+
declare const Guard: () => react_jsx_runtime.JSX.Element;
|
|
881
|
+
/**
|
|
882
|
+
* Ensures the user is logged in to access child routes.
|
|
883
|
+
*/
|
|
884
|
+
declare const ProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
885
|
+
/**
|
|
886
|
+
* Ensures the user is NOT logged in to access child routes (e.g. Login/Signup pages).
|
|
887
|
+
*/
|
|
888
|
+
declare const UnProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
889
|
+
/**
|
|
890
|
+
* Ensures only users with 'admin' role can access child routes.
|
|
891
|
+
*/
|
|
892
|
+
declare const AdminProtectedRoute: () => react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
894
|
+
type Role = string;
|
|
895
|
+
type AccountType = string;
|
|
896
|
+
type AuthData = {
|
|
897
|
+
_id: string;
|
|
898
|
+
role: Role;
|
|
899
|
+
email: string;
|
|
900
|
+
phoneNumber: string;
|
|
901
|
+
isActive: boolean;
|
|
902
|
+
isEmailVerified: boolean;
|
|
903
|
+
isPhoneVerified: boolean;
|
|
904
|
+
permissions?: Record<string, boolean>;
|
|
905
|
+
homePath?: string;
|
|
906
|
+
};
|
|
907
|
+
type AccountData = {
|
|
908
|
+
_id: string;
|
|
909
|
+
name: string;
|
|
910
|
+
email: string;
|
|
911
|
+
phoneNumber: string;
|
|
912
|
+
type: AccountType;
|
|
913
|
+
};
|
|
914
|
+
type AuthState = {
|
|
915
|
+
auth: AuthData | null;
|
|
916
|
+
account: AccountData | null;
|
|
917
|
+
isLoggedIn: boolean;
|
|
918
|
+
isFetched: boolean;
|
|
919
|
+
setAuth: (auth: AuthData, account: AccountData) => void;
|
|
920
|
+
setIsLoggedIn: (isLoggedIn: boolean) => void;
|
|
921
|
+
setIsFetched: (isFetched: boolean) => void;
|
|
922
|
+
logout: () => void;
|
|
923
|
+
updateAuth: (data: Partial<AuthData>) => void;
|
|
924
|
+
updateAccount: (data: Partial<AccountData>) => void;
|
|
925
|
+
hasPermission: (key: string) => boolean;
|
|
926
|
+
};
|
|
927
|
+
declare const useAuthStore: zustand.UseBoundStore<zustand.StoreApi<AuthState>>;
|
|
928
|
+
|
|
929
|
+
declare const useAuth: () => {
|
|
930
|
+
auth: {
|
|
931
|
+
_id: string;
|
|
932
|
+
role: Role;
|
|
933
|
+
email: string;
|
|
934
|
+
phoneNumber: string;
|
|
935
|
+
isActive: boolean;
|
|
936
|
+
isEmailVerified: boolean;
|
|
937
|
+
isPhoneVerified: boolean;
|
|
938
|
+
permissions?: Record<string, boolean>;
|
|
939
|
+
homePath?: string;
|
|
940
|
+
} | null;
|
|
941
|
+
user: {
|
|
942
|
+
_id: string;
|
|
943
|
+
role: Role;
|
|
944
|
+
email: string;
|
|
945
|
+
phoneNumber: string;
|
|
946
|
+
isActive: boolean;
|
|
947
|
+
isEmailVerified: boolean;
|
|
948
|
+
isPhoneVerified: boolean;
|
|
949
|
+
permissions?: Record<string, boolean>;
|
|
950
|
+
homePath?: string;
|
|
951
|
+
} | null;
|
|
952
|
+
account: {
|
|
953
|
+
_id: string;
|
|
954
|
+
name: string;
|
|
955
|
+
email: string;
|
|
956
|
+
phoneNumber: string;
|
|
957
|
+
type: AccountType;
|
|
958
|
+
} | null;
|
|
959
|
+
isLoggedIn: boolean;
|
|
960
|
+
isFetched: boolean;
|
|
961
|
+
role: string | undefined;
|
|
962
|
+
userId: string | undefined;
|
|
963
|
+
accountId: string | undefined;
|
|
964
|
+
userName: string | undefined;
|
|
965
|
+
userEmail: string | undefined;
|
|
966
|
+
permissions: Record<string, boolean>;
|
|
967
|
+
isAdmin: boolean;
|
|
968
|
+
isActive: boolean;
|
|
969
|
+
isVerified: boolean;
|
|
970
|
+
isEmailVerified: boolean;
|
|
971
|
+
isPhoneVerified: boolean;
|
|
972
|
+
logout: () => void;
|
|
973
|
+
setIsLoggedIn: (isLoggedIn: boolean) => void;
|
|
974
|
+
setIsFetched: (isFetched: boolean) => void;
|
|
975
|
+
setAuth: (auth: {
|
|
976
|
+
_id: string;
|
|
977
|
+
role: Role;
|
|
978
|
+
email: string;
|
|
979
|
+
phoneNumber: string;
|
|
980
|
+
isActive: boolean;
|
|
981
|
+
isEmailVerified: boolean;
|
|
982
|
+
isPhoneVerified: boolean;
|
|
983
|
+
permissions?: Record<string, boolean>;
|
|
984
|
+
homePath?: string;
|
|
985
|
+
}, account: {
|
|
986
|
+
_id: string;
|
|
987
|
+
name: string;
|
|
988
|
+
email: string;
|
|
989
|
+
phoneNumber: string;
|
|
990
|
+
type: AccountType;
|
|
991
|
+
}) => void;
|
|
992
|
+
login: (data: any) => void;
|
|
993
|
+
updateAuth: (data: Partial<{
|
|
994
|
+
_id: string;
|
|
995
|
+
role: Role;
|
|
996
|
+
email: string;
|
|
997
|
+
phoneNumber: string;
|
|
998
|
+
isActive: boolean;
|
|
999
|
+
isEmailVerified: boolean;
|
|
1000
|
+
isPhoneVerified: boolean;
|
|
1001
|
+
permissions?: Record<string, boolean>;
|
|
1002
|
+
homePath?: string;
|
|
1003
|
+
}>) => void;
|
|
1004
|
+
updateUser: (data: Partial<{
|
|
1005
|
+
_id: string;
|
|
1006
|
+
role: Role;
|
|
1007
|
+
email: string;
|
|
1008
|
+
phoneNumber: string;
|
|
1009
|
+
isActive: boolean;
|
|
1010
|
+
isEmailVerified: boolean;
|
|
1011
|
+
isPhoneVerified: boolean;
|
|
1012
|
+
permissions?: Record<string, boolean>;
|
|
1013
|
+
homePath?: string;
|
|
1014
|
+
}>) => void;
|
|
1015
|
+
updateAccount: (data: Partial<{
|
|
1016
|
+
_id: string;
|
|
1017
|
+
name: string;
|
|
1018
|
+
email: string;
|
|
1019
|
+
phoneNumber: string;
|
|
1020
|
+
type: AccountType;
|
|
1021
|
+
}>) => void;
|
|
1022
|
+
hasPermission: (key: string) => boolean;
|
|
1023
|
+
can: (key: string) => boolean;
|
|
1024
|
+
};
|
|
1025
|
+
|
|
1026
|
+
export { type AccountType, AdminProtectedRoute, Badge, type BadgeProps, Branding, type BrandingProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CategoryCard, type CategoryItem, ClassicSpin, CodeBlock, DashboardLayout, DataTable, type DataTableColumn, DateInput, type DateInputProps, type DeleteFunction, type FetchFunction, type FetchProps, Fields, Guard, InfoGrid, Input, type InputProps, LoadingBox, LoadingSpin, type LoginSchema, type LoginTheme, Modal, type ModalProps, type NavItem, type NavItems, type Option, OverlaySpin, PageA4, PageHeader, type PdfOptions, PhoneInput, type PhoneInputProps, type PostFunction, PostTable, type PostTableActions, type PostTableChangeParams, ProfileCard, type ProfileCardProps, ProfileDropdown, type ProfileDropdownItem, type ProfileDropdownProps, ProfileView, type ProfileViewInfoItem, type ProfileViewProps, ProtectedRoute, type PutFunction, type Role, SearchApi, SearchApiContent, SearchApiInput, SearchApiItem, type SearchApiProps, SearchApiTrigger, Select, SelectContent, SelectItem, type SelectProps, SelectTrigger, SimpleTable, type SimpleTableColumn, type StorageManager, type StoreConfig, Textarea, type TextareaProps, type ThemeConfig, ThemeProvider, ThemeToggle, ThemedLogin, UnProtectedRoute, type UseModalReturn, Views, type WarqadConfig, type WarqadConfigContextType, WarqadProvider, generatePdf, storage, useA4CategoryView, useA4StatementView, useAntdImageUpload, useApi, useAuth, useAuthStore, useLogin, useModal, useSearchApiContext, useSelectContext, useTheme, useTransaction, useWarqadConfig };
|