@djangocfg/layouts 2.1.100 → 2.1.102

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.
Files changed (51) hide show
  1. package/dist/AIChatWidget-LUPM7S2O.mjs +1644 -0
  2. package/dist/AIChatWidget-LUPM7S2O.mjs.map +1 -0
  3. package/dist/AIChatWidget-O23TJJ7C.mjs +3 -0
  4. package/dist/AIChatWidget-O23TJJ7C.mjs.map +1 -0
  5. package/dist/chunk-53YKWR6F.mjs +6 -0
  6. package/dist/chunk-53YKWR6F.mjs.map +1 -0
  7. package/dist/chunk-EI7TDN2G.mjs +1652 -0
  8. package/dist/chunk-EI7TDN2G.mjs.map +1 -0
  9. package/dist/components.cjs +925 -0
  10. package/dist/components.cjs.map +1 -0
  11. package/dist/components.d.mts +583 -0
  12. package/dist/components.d.ts +583 -0
  13. package/dist/components.mjs +879 -0
  14. package/dist/components.mjs.map +1 -0
  15. package/dist/index.cjs +7573 -0
  16. package/dist/index.cjs.map +1 -0
  17. package/dist/index.d.mts +2376 -0
  18. package/dist/index.d.ts +2376 -0
  19. package/dist/index.mjs +5673 -0
  20. package/dist/index.mjs.map +1 -0
  21. package/dist/layouts.cjs +6530 -0
  22. package/dist/layouts.cjs.map +1 -0
  23. package/dist/layouts.d.mts +748 -0
  24. package/dist/layouts.d.ts +748 -0
  25. package/dist/layouts.mjs +4741 -0
  26. package/dist/layouts.mjs.map +1 -0
  27. package/dist/pages.cjs +178 -0
  28. package/dist/pages.cjs.map +1 -0
  29. package/dist/pages.d.mts +57 -0
  30. package/dist/pages.d.ts +57 -0
  31. package/dist/pages.mjs +168 -0
  32. package/dist/pages.mjs.map +1 -0
  33. package/dist/snippets.cjs +3793 -0
  34. package/dist/snippets.cjs.map +1 -0
  35. package/dist/snippets.d.mts +1192 -0
  36. package/dist/snippets.d.ts +1192 -0
  37. package/dist/snippets.mjs +3738 -0
  38. package/dist/snippets.mjs.map +1 -0
  39. package/dist/utils.cjs +34 -0
  40. package/dist/utils.cjs.map +1 -0
  41. package/dist/utils.d.mts +40 -0
  42. package/dist/utils.d.ts +40 -0
  43. package/dist/utils.mjs +25 -0
  44. package/dist/utils.mjs.map +1 -0
  45. package/package.json +38 -47
  46. package/src/components/errors/ErrorsTracker/components/ErrorButtons.tsx +2 -1
  47. package/src/layouts/ProfileLayout/ProfileLayout.tsx +506 -89
  48. package/src/layouts/ProfileLayout/components/AvatarSection.tsx +3 -6
  49. package/src/layouts/ProfileLayout/components/DeleteAccountSection.tsx +2 -2
  50. package/src/layouts/ProfileLayout/components/ProfileForm.tsx +4 -5
  51. package/src/snippets/AuthDialog/useAuthDialog.ts +1 -1
@@ -6,8 +6,8 @@ import { useForm } from 'react-hook-form';
6
6
  import { toast } from '@djangocfg/ui-core/hooks';
7
7
 
8
8
  import {
9
- PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema, type
10
- useAccountsContext, useAuth
9
+ PatchedUserProfileUpdateRequest, PatchedUserProfileUpdateRequestSchema,
10
+ useAuth
11
11
  } from '@djangocfg/api/auth';
12
12
  import {
13
13
  Button, Form, FormControl, FormField, FormItem, FormLabel, FormMessage, Input, Label, PhoneInput
@@ -17,8 +17,7 @@ import { zodResolver } from '@hookform/resolvers/zod';
17
17
  import { profileLogger } from '../../../utils/logger';
18
18
 
19
19
  export const ProfileForm = () => {
20
- const { user } = useAuth();
21
- const accounts = useAccountsContext();
20
+ const { user, updateProfile } = useAuth();
22
21
  const [isEditing, setIsEditing] = useState(false);
23
22
  const [isSaving, setIsSaving] = useState(false);
24
23
 
@@ -49,7 +48,7 @@ export const ProfileForm = () => {
49
48
  const handleSubmit = async (data: PatchedUserProfileUpdateRequest) => {
50
49
  setIsSaving(true);
51
50
  try {
52
- await accounts.partialUpdateProfile(data);
51
+ await updateProfile(data);
53
52
  toast.success('Profile updated successfully');
54
53
  setIsEditing(false);
55
54
  } catch (error: any) {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { useCallback } from 'react';
4
4
 
5
- import { events } from '@djangocfg/ui-nextjs';
5
+ import { events } from '@djangocfg/ui-core/hooks';
6
6
 
7
7
  import { AUTH_EVENTS, OpenAuthDialogPayload} from './events';
8
8