@fctc/widget-logic 1.2.5 → 1.2.6
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/hooks.d.mts +5 -41
- package/dist/hooks.d.ts +5 -41
- package/dist/hooks.js +18 -108
- package/dist/hooks.mjs +19 -113
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +177 -267
- package/dist/index.mjs +51 -145
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -951,9 +951,6 @@ type AppProviderType = {
|
|
|
951
951
|
declare const AppProvider: ({ children }: {
|
|
952
952
|
children: React.ReactNode;
|
|
953
953
|
}) => JSX.Element;
|
|
954
|
-
declare const MainAppProvider: ({ children, }: {
|
|
955
|
-
children: React.ReactNode;
|
|
956
|
-
}) => JSX.Element;
|
|
957
954
|
declare const useAppProvider: () => AppProviderType;
|
|
958
955
|
|
|
959
956
|
declare const DEFAULT_EVENTS: readonly ["mousedown", "touchstart"];
|
|
@@ -968,45 +965,12 @@ declare const useClickOutside: ({ handler, events, nodes, refs, }: UseClickOutsi
|
|
|
968
965
|
|
|
969
966
|
declare function useDebounce<T>(value: T, delay: number): [T];
|
|
970
967
|
|
|
971
|
-
declare const useSwitchLocaleHandler: () => {
|
|
972
|
-
switchLocale: (langId: string) => Promise<void>;
|
|
973
|
-
isLoading: boolean;
|
|
974
|
-
error: Error | null;
|
|
975
|
-
};
|
|
968
|
+
declare const useSwitchLocaleHandler: () => {};
|
|
976
969
|
|
|
977
|
-
declare const useLoginHandler: () => {
|
|
978
|
-
login: ({ email, password, path, }: {
|
|
979
|
-
email: string;
|
|
980
|
-
password: string;
|
|
981
|
-
path: string;
|
|
982
|
-
}, { onSuccess, onError, }: {
|
|
983
|
-
onSuccess?: (res: any) => void;
|
|
984
|
-
onError?: (err: any) => void;
|
|
985
|
-
}) => void;
|
|
986
|
-
isLoading: boolean;
|
|
987
|
-
error: Error | null;
|
|
988
|
-
};
|
|
970
|
+
declare const useLoginHandler: () => {};
|
|
989
971
|
|
|
990
|
-
declare const useForgotPasswordHandler: () => {
|
|
991
|
-
sendForgotPassword: (email: string, { onSuccess, onError, }?: {
|
|
992
|
-
onSuccess?: () => void;
|
|
993
|
-
onError?: (err: any) => void;
|
|
994
|
-
}) => void;
|
|
995
|
-
isLoading: boolean;
|
|
996
|
-
error: Error | null;
|
|
997
|
-
};
|
|
972
|
+
declare const useForgotPasswordHandler: () => {};
|
|
998
973
|
|
|
999
|
-
declare const useResetPasswordHandler: () => {
|
|
1000
|
-
resetPassword: ({ password, confirmPassword, token, }: {
|
|
1001
|
-
password: string;
|
|
1002
|
-
confirmPassword: string;
|
|
1003
|
-
token: string;
|
|
1004
|
-
}, { onSuccess, onError, }: {
|
|
1005
|
-
onSuccess?: () => void;
|
|
1006
|
-
onError?: () => void;
|
|
1007
|
-
}) => void;
|
|
1008
|
-
isLoading: boolean;
|
|
1009
|
-
error: Error | null;
|
|
1010
|
-
};
|
|
974
|
+
declare const useResetPasswordHandler: () => {};
|
|
1011
975
|
|
|
1012
|
-
export { type ActionResultType, AppProvider, type Context,
|
|
976
|
+
export { type ActionResultType, AppProvider, type Context, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
|
package/dist/hooks.d.ts
CHANGED
|
@@ -951,9 +951,6 @@ type AppProviderType = {
|
|
|
951
951
|
declare const AppProvider: ({ children }: {
|
|
952
952
|
children: React.ReactNode;
|
|
953
953
|
}) => JSX.Element;
|
|
954
|
-
declare const MainAppProvider: ({ children, }: {
|
|
955
|
-
children: React.ReactNode;
|
|
956
|
-
}) => JSX.Element;
|
|
957
954
|
declare const useAppProvider: () => AppProviderType;
|
|
958
955
|
|
|
959
956
|
declare const DEFAULT_EVENTS: readonly ["mousedown", "touchstart"];
|
|
@@ -968,45 +965,12 @@ declare const useClickOutside: ({ handler, events, nodes, refs, }: UseClickOutsi
|
|
|
968
965
|
|
|
969
966
|
declare function useDebounce<T>(value: T, delay: number): [T];
|
|
970
967
|
|
|
971
|
-
declare const useSwitchLocaleHandler: () => {
|
|
972
|
-
switchLocale: (langId: string) => Promise<void>;
|
|
973
|
-
isLoading: boolean;
|
|
974
|
-
error: Error | null;
|
|
975
|
-
};
|
|
968
|
+
declare const useSwitchLocaleHandler: () => {};
|
|
976
969
|
|
|
977
|
-
declare const useLoginHandler: () => {
|
|
978
|
-
login: ({ email, password, path, }: {
|
|
979
|
-
email: string;
|
|
980
|
-
password: string;
|
|
981
|
-
path: string;
|
|
982
|
-
}, { onSuccess, onError, }: {
|
|
983
|
-
onSuccess?: (res: any) => void;
|
|
984
|
-
onError?: (err: any) => void;
|
|
985
|
-
}) => void;
|
|
986
|
-
isLoading: boolean;
|
|
987
|
-
error: Error | null;
|
|
988
|
-
};
|
|
970
|
+
declare const useLoginHandler: () => {};
|
|
989
971
|
|
|
990
|
-
declare const useForgotPasswordHandler: () => {
|
|
991
|
-
sendForgotPassword: (email: string, { onSuccess, onError, }?: {
|
|
992
|
-
onSuccess?: () => void;
|
|
993
|
-
onError?: (err: any) => void;
|
|
994
|
-
}) => void;
|
|
995
|
-
isLoading: boolean;
|
|
996
|
-
error: Error | null;
|
|
997
|
-
};
|
|
972
|
+
declare const useForgotPasswordHandler: () => {};
|
|
998
973
|
|
|
999
|
-
declare const useResetPasswordHandler: () => {
|
|
1000
|
-
resetPassword: ({ password, confirmPassword, token, }: {
|
|
1001
|
-
password: string;
|
|
1002
|
-
confirmPassword: string;
|
|
1003
|
-
token: string;
|
|
1004
|
-
}, { onSuccess, onError, }: {
|
|
1005
|
-
onSuccess?: () => void;
|
|
1006
|
-
onError?: () => void;
|
|
1007
|
-
}) => void;
|
|
1008
|
-
isLoading: boolean;
|
|
1009
|
-
error: Error | null;
|
|
1010
|
-
};
|
|
974
|
+
declare const useResetPasswordHandler: () => {};
|
|
1011
975
|
|
|
1012
|
-
export { type ActionResultType, AppProvider, type Context,
|
|
976
|
+
export { type ActionResultType, AppProvider, type Context, type Record, type ViewResponse, useAppProvider, useAuth, type useAuthType, useCallAction, type useCallActionType, useClickOutside, useConfig, type useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, type useListDataType, useLoginHandler, useMenu, type useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, type useUserType, useViewV2, type useViewV2Type };
|
package/dist/hooks.js
CHANGED
|
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var hooks_exports = {};
|
|
22
22
|
__export(hooks_exports, {
|
|
23
23
|
AppProvider: () => AppProvider,
|
|
24
|
-
MainAppProvider: () => MainAppProvider,
|
|
25
24
|
useAppProvider: () => useAppProvider,
|
|
26
25
|
useAuth: () => useAuth,
|
|
27
26
|
useCallAction: () => useCallAction,
|
|
@@ -628,7 +627,9 @@ var AppProvider = ({ children }) => {
|
|
|
628
627
|
return combineContexts([user.context, company.context]);
|
|
629
628
|
}, [user.context, company.context]);
|
|
630
629
|
const menu = useMenu({ context: menuContext });
|
|
631
|
-
const action = (0, import_react10.useMemo)(() =>
|
|
630
|
+
const action = (0, import_react10.useMemo)(() => {
|
|
631
|
+
return menu.state.action;
|
|
632
|
+
}, [menu.state.action]);
|
|
632
633
|
const viewContext = (0, import_react10.useMemo)(() => {
|
|
633
634
|
return combineContexts([
|
|
634
635
|
menuContext,
|
|
@@ -661,14 +662,11 @@ var AppProvider = ({ children }) => {
|
|
|
661
662
|
}
|
|
662
663
|
);
|
|
663
664
|
};
|
|
664
|
-
var MainAppProvider = ({
|
|
665
|
-
children
|
|
666
|
-
}) => {
|
|
667
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_interface_logic10.MainProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AppProvider, { children }) });
|
|
668
|
-
};
|
|
669
665
|
var useAppProvider = () => {
|
|
670
666
|
const context = (0, import_react10.useContext)(ReactContext);
|
|
671
|
-
if (!context)
|
|
667
|
+
if (!context) {
|
|
668
|
+
return AppProviderInitialValue;
|
|
669
|
+
}
|
|
672
670
|
return context;
|
|
673
671
|
};
|
|
674
672
|
|
|
@@ -719,131 +717,43 @@ function useDebounce(value, delay) {
|
|
|
719
717
|
}
|
|
720
718
|
|
|
721
719
|
// src/hooks/api/use-switch-locale.ts
|
|
722
|
-
var import_interface_logic11 = require("@fctc/interface-logic");
|
|
723
|
-
var import_react13 = require("react");
|
|
724
720
|
var useSwitchLocaleHandler = () => {
|
|
725
|
-
const switchUserLocale = (0, import_interface_logic11.useSwitchLocale)();
|
|
726
|
-
const env = (0, import_interface_logic11.getEnv)();
|
|
727
|
-
const { context } = (0, import_interface_logic11.useAppSelector)(import_interface_logic11.selectEnv);
|
|
728
|
-
const switchLocale = (0, import_react13.useCallback)(
|
|
729
|
-
async (langId) => {
|
|
730
|
-
if (!langId) return;
|
|
731
|
-
await switchUserLocale.mutateAsync({
|
|
732
|
-
data: {
|
|
733
|
-
id: parseInt(context?.uid),
|
|
734
|
-
values: { lang: langId }
|
|
735
|
-
}
|
|
736
|
-
});
|
|
737
|
-
env.setLang(langId);
|
|
738
|
-
},
|
|
739
|
-
[switchUserLocale]
|
|
740
|
-
);
|
|
741
721
|
return {
|
|
742
|
-
switchLocale,
|
|
743
|
-
isLoading: switchUserLocale.isPending,
|
|
744
|
-
error: switchUserLocale.error
|
|
722
|
+
// switchLocale,
|
|
723
|
+
// isLoading: switchUserLocale.isPending,
|
|
724
|
+
// error: switchUserLocale.error,
|
|
745
725
|
};
|
|
746
726
|
};
|
|
747
727
|
|
|
748
728
|
// src/hooks/api/use-login.ts
|
|
749
|
-
var import_interface_logic12 = require("@fctc/interface-logic");
|
|
750
|
-
var import_react14 = require("react");
|
|
751
729
|
var useLoginHandler = () => {
|
|
752
|
-
const loginMutate = (0, import_interface_logic12.useLoginCredential)();
|
|
753
|
-
const login = (0, import_react14.useCallback)(
|
|
754
|
-
({
|
|
755
|
-
email,
|
|
756
|
-
password,
|
|
757
|
-
path
|
|
758
|
-
}, {
|
|
759
|
-
onSuccess,
|
|
760
|
-
onError
|
|
761
|
-
}) => {
|
|
762
|
-
loginMutate.mutate(
|
|
763
|
-
{
|
|
764
|
-
email,
|
|
765
|
-
password,
|
|
766
|
-
path
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
onSuccess,
|
|
770
|
-
onError
|
|
771
|
-
}
|
|
772
|
-
);
|
|
773
|
-
},
|
|
774
|
-
[loginMutate]
|
|
775
|
-
);
|
|
776
730
|
return {
|
|
777
|
-
login,
|
|
778
|
-
isLoading: loginMutate.isPending,
|
|
779
|
-
error: loginMutate.error
|
|
731
|
+
// login,
|
|
732
|
+
// isLoading: loginMutate.isPending,
|
|
733
|
+
// error: loginMutate.error,
|
|
780
734
|
};
|
|
781
735
|
};
|
|
782
736
|
|
|
783
737
|
// src/hooks/api/use-forgot-password.ts
|
|
784
|
-
var import_interface_logic13 = require("@fctc/interface-logic");
|
|
785
|
-
var import_react15 = require("react");
|
|
786
738
|
var useForgotPasswordHandler = () => {
|
|
787
|
-
const forgotPasswordMutate = (0, import_interface_logic13.useForgotPassword)();
|
|
788
|
-
const sendForgotPassword = (0, import_react15.useCallback)(
|
|
789
|
-
(email, {
|
|
790
|
-
onSuccess,
|
|
791
|
-
onError
|
|
792
|
-
} = {}) => {
|
|
793
|
-
forgotPasswordMutate.mutate(email, {
|
|
794
|
-
onSuccess,
|
|
795
|
-
onError
|
|
796
|
-
});
|
|
797
|
-
},
|
|
798
|
-
[forgotPasswordMutate]
|
|
799
|
-
);
|
|
800
739
|
return {
|
|
801
|
-
sendForgotPassword,
|
|
802
|
-
isLoading: forgotPasswordMutate.isPending,
|
|
803
|
-
error: forgotPasswordMutate.error
|
|
740
|
+
// sendForgotPassword,
|
|
741
|
+
// isLoading: forgotPasswordMutate.isPending,
|
|
742
|
+
// error: forgotPasswordMutate.error,
|
|
804
743
|
};
|
|
805
744
|
};
|
|
806
745
|
|
|
807
746
|
// src/hooks/api/use-reset-password.ts
|
|
808
|
-
var import_interface_logic14 = require("@fctc/interface-logic");
|
|
809
|
-
var import_react16 = require("react");
|
|
810
747
|
var useResetPasswordHandler = () => {
|
|
811
|
-
const resetPasswordMutate = (0, import_interface_logic14.useResetPassword)();
|
|
812
|
-
const resetPassword = (0, import_react16.useCallback)(
|
|
813
|
-
({
|
|
814
|
-
password,
|
|
815
|
-
confirmPassword,
|
|
816
|
-
token
|
|
817
|
-
}, {
|
|
818
|
-
onSuccess,
|
|
819
|
-
onError
|
|
820
|
-
}) => {
|
|
821
|
-
resetPasswordMutate.mutate(
|
|
822
|
-
{
|
|
823
|
-
data: {
|
|
824
|
-
password,
|
|
825
|
-
confirmPassword
|
|
826
|
-
},
|
|
827
|
-
token
|
|
828
|
-
},
|
|
829
|
-
{
|
|
830
|
-
onSuccess,
|
|
831
|
-
onError
|
|
832
|
-
}
|
|
833
|
-
);
|
|
834
|
-
},
|
|
835
|
-
[resetPasswordMutate]
|
|
836
|
-
);
|
|
837
748
|
return {
|
|
838
|
-
resetPassword,
|
|
839
|
-
isLoading: resetPasswordMutate.isPending,
|
|
840
|
-
error: resetPasswordMutate.error
|
|
749
|
+
// resetPassword,
|
|
750
|
+
// isLoading: resetPasswordMutate.isPending,
|
|
751
|
+
// error: resetPasswordMutate.error,
|
|
841
752
|
};
|
|
842
753
|
};
|
|
843
754
|
// Annotate the CommonJS export names for ESM import in node:
|
|
844
755
|
0 && (module.exports = {
|
|
845
756
|
AppProvider,
|
|
846
|
-
MainAppProvider,
|
|
847
757
|
useAppProvider,
|
|
848
758
|
useAuth,
|
|
849
759
|
useCallAction,
|
package/dist/hooks.mjs
CHANGED
|
@@ -590,7 +590,7 @@ var useCompany = (accessToken) => {
|
|
|
590
590
|
var use_company_default = useCompany;
|
|
591
591
|
|
|
592
592
|
// src/hooks/core/use-app-provider.tsx
|
|
593
|
-
import { evalJSONContext
|
|
593
|
+
import { evalJSONContext } from "@fctc/interface-logic";
|
|
594
594
|
import { jsx } from "react/jsx-runtime";
|
|
595
595
|
var AppProviderInitialValue = {
|
|
596
596
|
config: {},
|
|
@@ -612,7 +612,9 @@ var AppProvider = ({ children }) => {
|
|
|
612
612
|
return combineContexts([user.context, company.context]);
|
|
613
613
|
}, [user.context, company.context]);
|
|
614
614
|
const menu = useMenu({ context: menuContext });
|
|
615
|
-
const action = useMemo7(() =>
|
|
615
|
+
const action = useMemo7(() => {
|
|
616
|
+
return menu.state.action;
|
|
617
|
+
}, [menu.state.action]);
|
|
616
618
|
const viewContext = useMemo7(() => {
|
|
617
619
|
return combineContexts([
|
|
618
620
|
menuContext,
|
|
@@ -645,14 +647,11 @@ var AppProvider = ({ children }) => {
|
|
|
645
647
|
}
|
|
646
648
|
);
|
|
647
649
|
};
|
|
648
|
-
var MainAppProvider = ({
|
|
649
|
-
children
|
|
650
|
-
}) => {
|
|
651
|
-
return /* @__PURE__ */ jsx(MainProvider, { children: /* @__PURE__ */ jsx(AppProvider, { children }) });
|
|
652
|
-
};
|
|
653
650
|
var useAppProvider = () => {
|
|
654
651
|
const context = useContext(ReactContext);
|
|
655
|
-
if (!context)
|
|
652
|
+
if (!context) {
|
|
653
|
+
return AppProviderInitialValue;
|
|
654
|
+
}
|
|
656
655
|
return context;
|
|
657
656
|
};
|
|
658
657
|
|
|
@@ -703,135 +702,42 @@ function useDebounce(value, delay) {
|
|
|
703
702
|
}
|
|
704
703
|
|
|
705
704
|
// src/hooks/api/use-switch-locale.ts
|
|
706
|
-
import {
|
|
707
|
-
getEnv as getEnv5,
|
|
708
|
-
selectEnv,
|
|
709
|
-
useAppSelector as useAppSelector2,
|
|
710
|
-
useSwitchLocale
|
|
711
|
-
} from "@fctc/interface-logic";
|
|
712
|
-
import { useCallback as useCallback2 } from "react";
|
|
713
705
|
var useSwitchLocaleHandler = () => {
|
|
714
|
-
const switchUserLocale = useSwitchLocale();
|
|
715
|
-
const env = getEnv5();
|
|
716
|
-
const { context } = useAppSelector2(selectEnv);
|
|
717
|
-
const switchLocale = useCallback2(
|
|
718
|
-
async (langId) => {
|
|
719
|
-
if (!langId) return;
|
|
720
|
-
await switchUserLocale.mutateAsync({
|
|
721
|
-
data: {
|
|
722
|
-
id: parseInt(context?.uid),
|
|
723
|
-
values: { lang: langId }
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
env.setLang(langId);
|
|
727
|
-
},
|
|
728
|
-
[switchUserLocale]
|
|
729
|
-
);
|
|
730
706
|
return {
|
|
731
|
-
switchLocale,
|
|
732
|
-
isLoading: switchUserLocale.isPending,
|
|
733
|
-
error: switchUserLocale.error
|
|
707
|
+
// switchLocale,
|
|
708
|
+
// isLoading: switchUserLocale.isPending,
|
|
709
|
+
// error: switchUserLocale.error,
|
|
734
710
|
};
|
|
735
711
|
};
|
|
736
712
|
|
|
737
713
|
// src/hooks/api/use-login.ts
|
|
738
|
-
import { useLoginCredential as useLoginCredential2 } from "@fctc/interface-logic";
|
|
739
|
-
import { useCallback as useCallback3 } from "react";
|
|
740
714
|
var useLoginHandler = () => {
|
|
741
|
-
const loginMutate = useLoginCredential2();
|
|
742
|
-
const login = useCallback3(
|
|
743
|
-
({
|
|
744
|
-
email,
|
|
745
|
-
password,
|
|
746
|
-
path
|
|
747
|
-
}, {
|
|
748
|
-
onSuccess,
|
|
749
|
-
onError
|
|
750
|
-
}) => {
|
|
751
|
-
loginMutate.mutate(
|
|
752
|
-
{
|
|
753
|
-
email,
|
|
754
|
-
password,
|
|
755
|
-
path
|
|
756
|
-
},
|
|
757
|
-
{
|
|
758
|
-
onSuccess,
|
|
759
|
-
onError
|
|
760
|
-
}
|
|
761
|
-
);
|
|
762
|
-
},
|
|
763
|
-
[loginMutate]
|
|
764
|
-
);
|
|
765
715
|
return {
|
|
766
|
-
login,
|
|
767
|
-
isLoading: loginMutate.isPending,
|
|
768
|
-
error: loginMutate.error
|
|
716
|
+
// login,
|
|
717
|
+
// isLoading: loginMutate.isPending,
|
|
718
|
+
// error: loginMutate.error,
|
|
769
719
|
};
|
|
770
720
|
};
|
|
771
721
|
|
|
772
722
|
// src/hooks/api/use-forgot-password.ts
|
|
773
|
-
import { useForgotPassword } from "@fctc/interface-logic";
|
|
774
|
-
import { useCallback as useCallback4 } from "react";
|
|
775
723
|
var useForgotPasswordHandler = () => {
|
|
776
|
-
const forgotPasswordMutate = useForgotPassword();
|
|
777
|
-
const sendForgotPassword = useCallback4(
|
|
778
|
-
(email, {
|
|
779
|
-
onSuccess,
|
|
780
|
-
onError
|
|
781
|
-
} = {}) => {
|
|
782
|
-
forgotPasswordMutate.mutate(email, {
|
|
783
|
-
onSuccess,
|
|
784
|
-
onError
|
|
785
|
-
});
|
|
786
|
-
},
|
|
787
|
-
[forgotPasswordMutate]
|
|
788
|
-
);
|
|
789
724
|
return {
|
|
790
|
-
sendForgotPassword,
|
|
791
|
-
isLoading: forgotPasswordMutate.isPending,
|
|
792
|
-
error: forgotPasswordMutate.error
|
|
725
|
+
// sendForgotPassword,
|
|
726
|
+
// isLoading: forgotPasswordMutate.isPending,
|
|
727
|
+
// error: forgotPasswordMutate.error,
|
|
793
728
|
};
|
|
794
729
|
};
|
|
795
730
|
|
|
796
731
|
// src/hooks/api/use-reset-password.ts
|
|
797
|
-
import { useResetPassword } from "@fctc/interface-logic";
|
|
798
|
-
import { useCallback as useCallback5 } from "react";
|
|
799
732
|
var useResetPasswordHandler = () => {
|
|
800
|
-
const resetPasswordMutate = useResetPassword();
|
|
801
|
-
const resetPassword = useCallback5(
|
|
802
|
-
({
|
|
803
|
-
password,
|
|
804
|
-
confirmPassword,
|
|
805
|
-
token
|
|
806
|
-
}, {
|
|
807
|
-
onSuccess,
|
|
808
|
-
onError
|
|
809
|
-
}) => {
|
|
810
|
-
resetPasswordMutate.mutate(
|
|
811
|
-
{
|
|
812
|
-
data: {
|
|
813
|
-
password,
|
|
814
|
-
confirmPassword
|
|
815
|
-
},
|
|
816
|
-
token
|
|
817
|
-
},
|
|
818
|
-
{
|
|
819
|
-
onSuccess,
|
|
820
|
-
onError
|
|
821
|
-
}
|
|
822
|
-
);
|
|
823
|
-
},
|
|
824
|
-
[resetPasswordMutate]
|
|
825
|
-
);
|
|
826
733
|
return {
|
|
827
|
-
resetPassword,
|
|
828
|
-
isLoading: resetPasswordMutate.isPending,
|
|
829
|
-
error: resetPasswordMutate.error
|
|
734
|
+
// resetPassword,
|
|
735
|
+
// isLoading: resetPasswordMutate.isPending,
|
|
736
|
+
// error: resetPasswordMutate.error,
|
|
830
737
|
};
|
|
831
738
|
};
|
|
832
739
|
export {
|
|
833
740
|
AppProvider,
|
|
834
|
-
MainAppProvider,
|
|
835
741
|
useAppProvider,
|
|
836
742
|
useAuth,
|
|
837
743
|
useCallAction,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActionResultType, AppProvider, Context,
|
|
1
|
+
export { ActionResultType, AppProvider, Context, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.mjs';
|
|
2
2
|
export { CloseIcon, EyeIcon, LoadingIcon } from './icons.mjs';
|
|
3
3
|
import { IInputFieldProps, ValuePropsType } from './types.mjs';
|
|
4
4
|
import * as react from 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActionResultType, AppProvider, Context,
|
|
1
|
+
export { ActionResultType, AppProvider, Context, Record, ViewResponse, useAppProvider, useAuth, useAuthType, useCallAction, useCallActionType, useClickOutside, useConfig, useConfigType, useDebounce, useDetail, useForgotPasswordHandler, useListData, useListDataType, useLoginHandler, useMenu, useMenuType, useProfile, useResetPasswordHandler, useSwitchLocaleHandler, useUser, useUserType, useViewV2, useViewV2Type } from './hooks.js';
|
|
2
2
|
export { CloseIcon, EyeIcon, LoadingIcon } from './icons.js';
|
|
3
3
|
import { IInputFieldProps, ValuePropsType } from './types.js';
|
|
4
4
|
import * as react from 'react';
|