@carlonicora/nextjs-jsonapi 1.66.0 → 1.68.0

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 (63) hide show
  1. package/dist/{BlockNoteEditor-KCJMA6LW.mjs → BlockNoteEditor-6FDECIS2.mjs} +4 -4
  2. package/dist/{BlockNoteEditor-GQM2TZG2.js → BlockNoteEditor-DXHROT4C.js} +14 -14
  3. package/dist/{BlockNoteEditor-GQM2TZG2.js.map → BlockNoteEditor-DXHROT4C.js.map} +1 -1
  4. package/dist/billing/index.js +346 -346
  5. package/dist/billing/index.mjs +3 -3
  6. package/dist/{chunk-NVXYOQFW.js → chunk-37KYO2UD.js} +20 -5
  7. package/dist/chunk-37KYO2UD.js.map +1 -0
  8. package/dist/{chunk-QIFM4G7T.js → chunk-ELTHSXBI.js} +1476 -1298
  9. package/dist/chunk-ELTHSXBI.js.map +1 -0
  10. package/dist/{chunk-4E74ZTRT.mjs → chunk-H4ZS3R76.mjs} +2606 -2428
  11. package/dist/chunk-H4ZS3R76.mjs.map +1 -0
  12. package/dist/{chunk-35GWVOYZ.mjs → chunk-IOMDNRX5.mjs} +20 -5
  13. package/dist/{chunk-35GWVOYZ.mjs.map → chunk-IOMDNRX5.mjs.map} +1 -1
  14. package/dist/{chunk-OQRBY22T.js → chunk-WOJIRXIP.js} +11 -11
  15. package/dist/{chunk-OQRBY22T.js.map → chunk-WOJIRXIP.js.map} +1 -1
  16. package/dist/{chunk-UXGPZZ6V.mjs → chunk-WVTBEVAL.mjs} +2 -2
  17. package/dist/client/index.js +4 -4
  18. package/dist/client/index.mjs +3 -3
  19. package/dist/components/index.d.mts +29 -7
  20. package/dist/components/index.d.ts +29 -7
  21. package/dist/components/index.js +8 -4
  22. package/dist/components/index.js.map +1 -1
  23. package/dist/components/index.mjs +9 -5
  24. package/dist/contexts/index.d.mts +1 -1
  25. package/dist/contexts/index.d.ts +1 -1
  26. package/dist/contexts/index.js +4 -4
  27. package/dist/contexts/index.mjs +3 -3
  28. package/dist/core/index.d.mts +2 -2
  29. package/dist/core/index.d.ts +2 -2
  30. package/dist/core/index.js +2 -2
  31. package/dist/core/index.mjs +1 -1
  32. package/dist/index.d.mts +2 -2
  33. package/dist/index.d.ts +2 -2
  34. package/dist/index.js +3 -3
  35. package/dist/index.mjs +2 -2
  36. package/dist/{s3.service-XchHd3ii.d.mts → s3.service-CHOTwfWA.d.mts} +7 -0
  37. package/dist/{s3.service-DIR6Su9B.d.ts → s3.service-N1g0piXD.d.ts} +7 -0
  38. package/dist/server/index.d.mts +1 -1
  39. package/dist/server/index.d.ts +1 -1
  40. package/dist/server/index.js +3 -3
  41. package/dist/server/index.mjs +1 -1
  42. package/package.json +1 -1
  43. package/src/components/EditableAvatar.tsx +175 -0
  44. package/src/components/index.ts +1 -0
  45. package/src/features/company/components/forms/CompanyEditor.tsx +1 -3
  46. package/src/features/role/components/forms/FormRoles.tsx +5 -4
  47. package/src/features/user/components/containers/AllUsersListContainer.tsx +36 -0
  48. package/src/features/user/components/containers/UserContainer.tsx +10 -13
  49. package/src/features/user/components/containers/UsersListContainer.tsx +15 -24
  50. package/src/features/user/components/containers/index.ts +1 -0
  51. package/src/features/user/components/details/UserContent.tsx +92 -0
  52. package/src/features/user/components/details/index.ts +1 -1
  53. package/src/features/user/components/forms/UserEditor.tsx +233 -233
  54. package/src/features/user/components/lists/CompanyUsersList.tsx +3 -1
  55. package/src/features/user/contexts/UserContext.tsx +1 -6
  56. package/src/features/user/data/user.service.ts +18 -0
  57. package/src/features/user/data/user.ts +3 -4
  58. package/dist/chunk-4E74ZTRT.mjs.map +0 -1
  59. package/dist/chunk-NVXYOQFW.js.map +0 -1
  60. package/dist/chunk-QIFM4G7T.js.map +0 -1
  61. package/src/features/user/components/details/UserDetails.tsx +0 -74
  62. /package/dist/{BlockNoteEditor-KCJMA6LW.mjs.map → BlockNoteEditor-6FDECIS2.mjs.map} +0 -0
  63. /package/dist/{chunk-UXGPZZ6V.mjs.map → chunk-WVTBEVAL.mjs.map} +0 -0
@@ -1,74 +0,0 @@
1
- "use client";
2
-
3
- import { useTranslations } from "next-intl";
4
- import Image from "next/image";
5
- import { ReactElement } from "react";
6
- import { AttributeElement, ContentTitle } from "../../../../components";
7
- import { useSharedContext } from "../../../../contexts";
8
- import { Modules } from "../../../../core";
9
- import { usePageUrlGenerator } from "../../../../hooks";
10
- import { Badge, Link } from "../../../../shadcnui";
11
- import { RoleInterface } from "../../../role";
12
- import { UserInterface } from "../../data";
13
-
14
- type UserDetailsProps = {
15
- user: UserInterface;
16
- };
17
-
18
- export function UserDetails({ user }: UserDetailsProps) {
19
- const generateUrl = usePageUrlGenerator();
20
- const t = useTranslations();
21
- const { title } = useSharedContext();
22
-
23
- let roles: ReactElement<any> = <></>;
24
-
25
- if (user.roles && user.roles.length > 0) {
26
- roles = (
27
- <div className="mb-4 w-full">
28
- <div className="flex flex-wrap gap-2">
29
- {user.roles.map((role: RoleInterface, _index: number) => (
30
- <Link key={role.id} href={generateUrl({ page: Modules.Role, id: role.id })}>
31
- <Badge className="mr-2" variant={`default`}>
32
- {t(`role.roles`, { role: role.id.replaceAll(`-`, ``) })}
33
- </Badge>
34
- </Link>
35
- ))}
36
- </div>
37
- </div>
38
- );
39
- }
40
-
41
- return (
42
- <div className="flex w-full flex-col gap-y-2">
43
- {user.avatar && (
44
- <div className="relative aspect-auto w-full max-w-md overflow-hidden rounded-lg">
45
- <Image
46
- src={user.avatar}
47
- alt={user.name}
48
- width={800}
49
- height={600}
50
- className="h-auto w-full rounded-lg object-contain"
51
- />
52
- </div>
53
- )}
54
- <ContentTitle module={Modules.User} type={title.type} element={title.element} functions={title.functions} />
55
- {user.isDeleted ? (
56
- <div>
57
- <Badge variant="destructive">{t(`user.errors.deleted`)}</Badge>
58
- </div>
59
- ) : (
60
- <>
61
- {!user.isActivated && (
62
- <div>
63
- <Badge variant="destructive">{t(`user.errors.inactive`)}</Badge>
64
- </div>
65
- )}
66
- </>
67
- )}
68
- {roles}
69
- <AttributeElement inline={true} title={t(`user.fields.title.label`)} value={user.title} />
70
- <AttributeElement inline={true} title={t(`common.fields.email.label`)} value={user.email} />
71
- <AttributeElement inline={false} title={t(`user.fields.bio.label`)} value={user.bio} />
72
- </div>
73
- );
74
- }