@carlonicora/nextjs-jsonapi 1.29.1 → 1.29.3

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 (102) hide show
  1. package/dist/{BlockNoteEditor-7BDLLHRA.js → BlockNoteEditor-CJWHJRG3.js} +17 -17
  2. package/dist/BlockNoteEditor-CJWHJRG3.js.map +1 -0
  3. package/dist/{BlockNoteEditor-F5KCNLVF.mjs → BlockNoteEditor-ZET7ANBC.mjs} +7 -7
  4. package/dist/BlockNoteEditor-ZET7ANBC.mjs.map +1 -0
  5. package/dist/billing/index.js +334 -333
  6. package/dist/billing/index.js.map +1 -1
  7. package/dist/billing/index.mjs +8 -7
  8. package/dist/billing/index.mjs.map +1 -1
  9. package/dist/{chunk-YLSLXQ3O.mjs → chunk-3HGZMKT4.mjs} +494 -524
  10. package/dist/chunk-3HGZMKT4.mjs.map +1 -0
  11. package/dist/{chunk-7M7NPKOF.js → chunk-6HQ6CPVL.js} +916 -946
  12. package/dist/chunk-6HQ6CPVL.js.map +1 -0
  13. package/dist/{chunk-DU64WMZD.mjs → chunk-NYNLJEPF.mjs} +4 -4
  14. package/dist/chunk-NYNLJEPF.mjs.map +1 -0
  15. package/dist/{chunk-J22NEVSK.js → chunk-UYBCHXXL.js} +4 -4
  16. package/dist/chunk-UYBCHXXL.js.map +1 -0
  17. package/dist/client/index.js +3 -3
  18. package/dist/client/index.mjs +2 -2
  19. package/dist/components/index.js +3 -3
  20. package/dist/components/index.mjs +2 -2
  21. package/dist/contexts/index.js +3 -3
  22. package/dist/contexts/index.mjs +2 -2
  23. package/dist/core/index.js +2 -2
  24. package/dist/core/index.mjs +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/index.mjs +1 -1
  27. package/dist/server/index.js +3 -3
  28. package/dist/server/index.mjs +1 -1
  29. package/package.json +1 -1
  30. package/src/components/details/AllowedUsersDetails.tsx +1 -1
  31. package/src/components/editors/BlockNoteEditor.tsx +5 -5
  32. package/src/components/forms/CommonAssociationForm.tsx +9 -9
  33. package/src/components/forms/CommonDeleter.tsx +14 -8
  34. package/src/components/forms/CommonEditorButtons.tsx +2 -2
  35. package/src/components/forms/CommonEditorHeader.tsx +4 -4
  36. package/src/components/forms/CommonEditorTrigger.tsx +1 -1
  37. package/src/components/forms/FileUploader.tsx +8 -8
  38. package/src/components/forms/FormDateTime.tsx +6 -12
  39. package/src/components/forms/FormInput.tsx +4 -20
  40. package/src/components/forms/PasswordInput.tsx +1 -1
  41. package/src/components/navigations/Breadcrumb.tsx +1 -1
  42. package/src/components/navigations/Header.tsx +2 -2
  43. package/src/components/navigations/RecentPagesNavigator.tsx +3 -3
  44. package/src/components/tables/ContentTableSearch.tsx +1 -1
  45. package/src/contexts/CommonContext.tsx +2 -2
  46. package/src/core/abstracts/AbstractService.ts +2 -2
  47. package/src/features/auth/components/details/LandingComponent.tsx +5 -5
  48. package/src/features/auth/components/forms/AcceptInvitation.tsx +16 -22
  49. package/src/features/auth/components/forms/ActivateAccount.tsx +8 -8
  50. package/src/features/auth/components/forms/ForgotPassword.tsx +9 -9
  51. package/src/features/auth/components/forms/Login.tsx +12 -12
  52. package/src/features/auth/components/forms/Register.tsx +19 -21
  53. package/src/features/auth/components/forms/ResetPassword.tsx +12 -18
  54. package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +5 -4
  55. package/src/features/company/components/details/TokenStatusIndicator.tsx +7 -7
  56. package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +2 -2
  57. package/src/features/company/components/forms/CompanyDeleter.tsx +13 -11
  58. package/src/features/company/components/forms/CompanyEditor.tsx +7 -13
  59. package/src/features/company/components/lists/CompaniesList.tsx +1 -1
  60. package/src/features/company/contexts/CompanyContext.tsx +1 -1
  61. package/src/features/company/hooks/useCompanyTableStructure.tsx +2 -2
  62. package/src/features/content/components/lists/ContentsList.tsx +1 -1
  63. package/src/features/content/components/lists/ContentsListById.tsx +1 -1
  64. package/src/features/content/components/lists/RelevantContentsList.tsx +1 -1
  65. package/src/features/content/hooks/useContentTableStructure.tsx +5 -5
  66. package/src/features/notification/components/containers/NotificationsListContainer.tsx +2 -2
  67. package/src/features/notification/components/lists/NotificationsList.tsx +3 -3
  68. package/src/features/notification/components/modals/NotificationModal.tsx +3 -5
  69. package/src/features/notification/components/notifications/Notification.tsx +4 -4
  70. package/src/features/notification/contexts/NotificationContext.tsx +2 -2
  71. package/src/features/role/components/details/RoleDetails.tsx +1 -1
  72. package/src/features/role/components/forms/FormRoles.tsx +2 -2
  73. package/src/features/role/components/forms/RemoveUserFromRole.tsx +9 -11
  74. package/src/features/role/components/forms/UserRoleAdd.tsx +18 -18
  75. package/src/features/role/components/lists/RolesList.tsx +1 -1
  76. package/src/features/role/components/lists/UserRolesList.tsx +1 -1
  77. package/src/features/role/contexts/RoleContext.tsx +2 -2
  78. package/src/features/role/hooks/useRoleTableStructure.tsx +3 -3
  79. package/src/features/user/components/containers/UsersListContainer.tsx +2 -2
  80. package/src/features/user/components/details/UserDetails.tsx +6 -6
  81. package/src/features/user/components/forms/RoleUserAdd.tsx +8 -8
  82. package/src/features/user/components/forms/UserAvatarEditor.tsx +2 -2
  83. package/src/features/user/components/forms/UserEditor.tsx +21 -25
  84. package/src/features/user/components/forms/UserReactivator.tsx +7 -7
  85. package/src/features/user/components/forms/UserResentInvitationEmail.tsx +9 -9
  86. package/src/features/user/components/forms/UserSelector.tsx +4 -9
  87. package/src/features/user/components/lists/AdminUsersList.tsx +1 -1
  88. package/src/features/user/components/lists/CompanyUsersList.tsx +1 -1
  89. package/src/features/user/components/lists/RelevantUsersList.tsx +1 -1
  90. package/src/features/user/components/lists/RoleUsersList.tsx +1 -1
  91. package/src/features/user/components/lists/UsersList.tsx +1 -1
  92. package/src/features/user/components/lists/UsersListByContentIds.tsx +1 -1
  93. package/src/features/user/components/widgets/UserSearchPopover.tsx +3 -3
  94. package/src/features/user/contexts/UserContext.tsx +5 -5
  95. package/src/features/user/hooks/useUserTableStructure.tsx +6 -6
  96. package/src/utils/blocknote-diff.util.ts +1 -1
  97. package/dist/BlockNoteEditor-7BDLLHRA.js.map +0 -1
  98. package/dist/BlockNoteEditor-F5KCNLVF.mjs.map +0 -1
  99. package/dist/chunk-7M7NPKOF.js.map +0 -1
  100. package/dist/chunk-DU64WMZD.mjs.map +0 -1
  101. package/dist/chunk-J22NEVSK.js.map +0 -1
  102. package/dist/chunk-YLSLXQ3O.mjs.map +0 -1
@@ -18,7 +18,7 @@ export function CommonEditorTrigger({ isEdit, edit, create }: CommonEditorTrigge
18
18
  </Button>
19
19
  ) : (
20
20
  <Button render={<div />} nativeButton={false} size="sm" variant={`outline`}>
21
- {create ? create : t(`generic.buttons.create`)}
21
+ {create ? create : t(`ui.buttons.create`)}
22
22
  </Button>
23
23
  )}
24
24
  </DialogTrigger>
@@ -14,12 +14,12 @@ import {
14
14
  useState,
15
15
  } from "react";
16
16
  import { DropzoneOptions, DropzoneState, FileRejection, useDropzone } from "react-dropzone";
17
-
18
- export type { DropzoneOptions } from "react-dropzone";
19
17
  import { toast } from "sonner";
20
18
  import { buttonVariants, Input } from "../../shadcnui";
21
19
  import { cn } from "../../utils";
22
20
 
21
+ export type { DropzoneOptions } from "react-dropzone";
22
+
23
23
  type DirectionOptions = "rtl" | "ltr" | undefined;
24
24
 
25
25
  type FileUploaderContextType = {
@@ -124,8 +124,8 @@ export const FileUploader = forwardRef<HTMLDivElement, FileUploaderProps & React
124
124
  const files = acceptedFiles;
125
125
 
126
126
  if (!files) {
127
- toast.error(t("generic.errors.file"), {
128
- description: t("generic.errors.file_large"),
127
+ toast.error(t("common.errors.file"), {
128
+ description: t("common.errors.file_large"),
129
129
  });
130
130
  return;
131
131
  }
@@ -147,13 +147,13 @@ export const FileUploader = forwardRef<HTMLDivElement, FileUploaderProps & React
147
147
  if (rejectedFiles.length > 0) {
148
148
  for (let i = 0; i < rejectedFiles.length; i++) {
149
149
  if (rejectedFiles[i].errors[0]?.code === "file-too-large") {
150
- toast.error(t("generic.errors.file"), {
151
- description: t(`generic.errors.file_max`, { size: maxSize / 1024 / 1024 }),
150
+ toast.error(t("common.errors.file"), {
151
+ description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 }),
152
152
  });
153
153
  break;
154
154
  }
155
155
  if (rejectedFiles[i].errors[0]?.message) {
156
- toast.error(t(`generic.errors.file`), {
156
+ toast.error(t(`common.errors.file`), {
157
157
  description: rejectedFiles[i].errors[0].message,
158
158
  });
159
159
  break;
@@ -271,7 +271,7 @@ export const FileUploaderItem = forwardRef<HTMLDivElement, { index: number } & R
271
271
  className={cn("absolute", direction === "rtl" ? "top-1 left-1" : "top-1 right-1")}
272
272
  onClick={() => removeFileFromSet(index)}
273
273
  >
274
- <span className="sr-only">{t(`generic.remove_item`, { index: index })}</span>
274
+ <span className="sr-only">{t(`common.remove_item`, { index: index })}</span>
275
275
  <RemoveIcon className="hover:stroke-destructive h-4 w-4 duration-200 ease-in-out" />
276
276
  </button>
277
277
  </div>
@@ -92,11 +92,7 @@ export function FormDateTime({
92
92
 
93
93
  return (
94
94
  <div className="flex w-full flex-col">
95
- <FormFieldWrapper
96
- form={form}
97
- name={id}
98
- label={name}
99
- >
95
+ <FormFieldWrapper form={form} name={id} label={name}>
100
96
  {(field) => (
101
97
  <div className="relative flex flex-row">
102
98
  <Popover open={open} onOpenChange={setOpen} modal={true}>
@@ -109,7 +105,7 @@ export function FormDateTime({
109
105
  />
110
106
  }
111
107
  >
112
- {field.value ? formatDateTime(field.value) : <span>{t(`generic.pick_date_time`)}</span>}
108
+ {field.value ? formatDateTime(field.value) : <span>{t(`common.pick_date_time`)}</span>}
113
109
  <CalendarIcon className="ml-auto h-4 w-4 opacity-50" />
114
110
  </PopoverTrigger>
115
111
  {field.value && allowEmpty !== false && (
@@ -150,7 +146,7 @@ export function FormDateTime({
150
146
  />
151
147
  <div className="flex flex-row items-end justify-center space-x-4">
152
148
  <div className="flex flex-col space-y-2">
153
- <Label htmlFor="hours-select">{t(`generic.hours`)}</Label>
149
+ <Label htmlFor="hours-select">{t(`common.hours`)}</Label>
154
150
  <Select
155
151
  value={String(field.value ? new Date(field.value).getHours() : selectedHours)}
156
152
  onValueChange={(value) => {
@@ -179,12 +175,10 @@ export function FormDateTime({
179
175
  </div>
180
176
  <div className="mb-[9px] text-xl">:</div>
181
177
  <div className="flex flex-col space-y-2">
182
- <Label htmlFor="minutes-select">{t(`generic.minutes`)}</Label>
178
+ <Label htmlFor="minutes-select">{t(`common.minutes`)}</Label>
183
179
  <Select
184
180
  value={String(
185
- field.value
186
- ? roundToNearestFiveMinutes(new Date(field.value).getMinutes())
187
- : selectedMinutes,
181
+ field.value ? roundToNearestFiveMinutes(new Date(field.value).getMinutes()) : selectedMinutes,
188
182
  )}
189
183
  onValueChange={(value) => {
190
184
  if (!value) return;
@@ -212,7 +206,7 @@ export function FormDateTime({
212
206
  setOpen(false);
213
207
  }}
214
208
  >
215
- {t(`generic.buttons.select_date`)}
209
+ {t(`ui.buttons.select_date`)}
216
210
  </Button>
217
211
  </div>
218
212
  </PopoverContent>
@@ -2,13 +2,7 @@
2
2
 
3
3
  import { useTranslations } from "next-intl";
4
4
  import React from "react";
5
- import {
6
- Input,
7
- InputGroup,
8
- InputGroupAddon,
9
- InputGroupInput,
10
- InputGroupText,
11
- } from "../../shadcnui";
5
+ import { Input, InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "../../shadcnui";
12
6
  import { FormFieldWrapper } from "./FormFieldWrapper";
13
7
 
14
8
  export function FormInput({
@@ -42,12 +36,7 @@ export function FormInput({
42
36
 
43
37
  return (
44
38
  <div className="flex w-full flex-col">
45
- <FormFieldWrapper
46
- form={form}
47
- name={id}
48
- label={name}
49
- isRequired={isRequired}
50
- >
39
+ <FormFieldWrapper form={form} name={id} label={name} isRequired={isRequired}>
51
40
  {(field) => {
52
41
  const handleBlur = async (e: React.FocusEvent<HTMLInputElement>) => {
53
42
  let value = e.target.value;
@@ -63,7 +52,7 @@ export function FormInput({
63
52
  } catch (error) {
64
53
  form.setError(id, {
65
54
  type: "validate",
66
- message: t(`generic.errors.valid_url`),
55
+ message: t(`common.errors.valid_url`),
67
56
  });
68
57
  }
69
58
  }
@@ -86,12 +75,7 @@ export function FormInput({
86
75
  const inputProps = {
87
76
  ...field,
88
77
  autoFocus: autoFocus === true,
89
- type:
90
- type === "number" || type === "currency"
91
- ? "number"
92
- : type === "password"
93
- ? "password"
94
- : "text",
78
+ type: type === "number" || type === "currency" ? "number" : type === "password" ? "password" : "text",
95
79
  className: `w-full ${type === "number" || type === "currency" ? "text-end" : ""}`,
96
80
  disabled: disabled === true || form.formState.isSubmitting,
97
81
  placeholder: placeholder || "",
@@ -28,7 +28,7 @@ const PasswordInput = React.forwardRef<HTMLInputElement, PasswordInputProps>(({
28
28
  ) : (
29
29
  <EyeOffIcon className="h-4 w-4" aria-hidden="true" />
30
30
  )}
31
- <span className="sr-only">{showPassword ? t(`generic.hide_password`) : t(`generic.show_password`)}</span>
31
+ <span className="sr-only">{showPassword ? t(`common.hide_password`) : t(`common.show_password`)}</span>
32
32
  </Button>
33
33
 
34
34
  <style>{`
@@ -31,7 +31,7 @@ export function BreadcrumbNavigation({ items }: BreadcrumbProps) {
31
31
  <UIBreadcrumb>
32
32
  <BreadcrumbList>
33
33
  <BreadcrumbItem>
34
- <Link href={generateUrl({ page: `/` })}>{t(`generic.home`)}</Link>
34
+ <Link href={generateUrl({ page: `/` })}>{t(`common.home`)}</Link>
35
35
  </BreadcrumbItem>
36
36
  {items.length > 0 && <BreadcrumbSeparator />}
37
37
 
@@ -40,13 +40,13 @@ export function Header({ children }: HeaderProps) {
40
40
  className="h-6 w-6"
41
41
  onClick={() => refreshUser()}
42
42
  disabled={isRefreshing}
43
- aria-label={t("generic.refresh", { defaultValue: "Refresh" })}
43
+ aria-label={t("common.refresh", { defaultValue: "Refresh" })}
44
44
  />
45
45
  }
46
46
  >
47
47
  <RefreshCwIcon className={`h-3.5 w-3.5 ${isRefreshing ? "animate-spin" : ""}`} />
48
48
  </TooltipTrigger>
49
- <TooltipContent side="bottom">{t("generic.refresh", { defaultValue: "Refresh" })}</TooltipContent>
49
+ <TooltipContent side="bottom">{t("common.refresh", { defaultValue: "Refresh" })}</TooltipContent>
50
50
  </Tooltip>
51
51
  </div>
52
52
  )}
@@ -28,11 +28,11 @@ export function RecentPagesNavigator() {
28
28
  <DropdownMenu>
29
29
  <DropdownMenuTrigger>
30
30
  <div className="flex w-full cursor-pointer items-center gap-2">
31
- {state === "collapsed" ? <HistoryIcon className="h-4 w-4" /> : <span>{t(`generic.recent_pages`)}</span>}
31
+ {state === "collapsed" ? <HistoryIcon className="h-4 w-4" /> : <span>{t(`common.recent_pages`)}</span>}
32
32
  </div>
33
33
  </DropdownMenuTrigger>
34
34
  <DropdownMenuContent align="start" className="w-96">
35
- <DropdownMenuLabel>{t(`generic.recent_pages`)}</DropdownMenuLabel>
35
+ <DropdownMenuLabel>{t(`common.recent_pages`)}</DropdownMenuLabel>
36
36
  <DropdownMenuSeparator />
37
37
  {recentPages.map((page, index) => (
38
38
  <DropdownMenuItem key={`${page.url}-${index}`}>
@@ -40,7 +40,7 @@ export function RecentPagesNavigator() {
40
40
  <div className="flex flex-col">
41
41
  <div className="truncate text-sm">{page.title}</div>
42
42
  <div className="text-muted-foreground text-xs font-normal">
43
- {t(`types.${page.moduleType}`, { count: 1 })}
43
+ {t(`entities.${page.moduleType}`, { count: 1 })}
44
44
  </div>
45
45
  </div>
46
46
  </Link>
@@ -84,7 +84,7 @@ export function ContentTableSearch({ data }: ContentTableSearchProps) {
84
84
  }}
85
85
  onFocus={() => setIsFocused(true)}
86
86
  onBlur={handleBlur}
87
- placeholder={t(`generic.search.placeholder_global`)}
87
+ placeholder={t(`ui.search.placeholder_global`)}
88
88
  type="text"
89
89
  className="border-border/50 focus-visible:border-border h-10 w-full pr-8 pl-8 text-xs shadow-none focus-visible:ring-0"
90
90
  onChange={(e) => setSearchTerm(e.target.value)}
@@ -3,8 +3,8 @@
3
3
  import { useTranslations } from "next-intl";
4
4
 
5
5
  import { createContext, ReactNode, useContext } from "react";
6
- import { UserInterface } from "../features/user/data";
7
6
  import { useCurrentUserContext } from "../features/user/contexts";
7
+ import { UserInterface } from "../features/user/data";
8
8
  import { BreadcrumbItemData } from "../interfaces";
9
9
  import { SharedProvider } from "./SharedContext";
10
10
 
@@ -28,7 +28,7 @@ export const CommonProvider = ({ children }: CommonProviderProps) => {
28
28
 
29
29
  const title = () => {
30
30
  const response: any = {
31
- type: t(`generic.title`),
31
+ type: t(`common.title`),
32
32
  };
33
33
 
34
34
  if (company) response.element = company.name;
@@ -204,7 +204,7 @@ export abstract class AbstractService {
204
204
  globalErrorHandler(apiResponse.response, apiResponse.error);
205
205
  return undefined as any;
206
206
  } else {
207
- const error = new Error(`${apiResponse.error}`) as any;
207
+ const error = new Error(`${apiResponse.response}:${apiResponse.error}`) as any;
208
208
  error.status = apiResponse.response;
209
209
  error.digest = `HTTP_${apiResponse.response}`;
210
210
  throw error;
@@ -309,7 +309,7 @@ export abstract class AbstractService {
309
309
  globalErrorHandler(apiResponse.response, apiResponse.error);
310
310
  return { data: undefined as any, meta: undefined };
311
311
  } else {
312
- const error = new Error(`${apiResponse.error}`) as any;
312
+ const error = new Error(`${apiResponse.response}:${apiResponse.error}`) as any;
313
313
  error.status = apiResponse.response;
314
314
  error.digest = `HTTP_${apiResponse.response}`;
315
315
  throw error;
@@ -2,9 +2,9 @@
2
2
 
3
3
  import { useTranslations } from "next-intl";
4
4
  import Image from "next/image";
5
+ import { getApiUrl } from "../../../../client/config";
5
6
  import { isDiscordAuthEnabled, isInternalAuthEnabled, isRegistrationAllowed } from "../../../../login";
6
7
  import { Button, CardDescription, CardFooter, CardHeader, CardTitle, Link } from "../../../../shadcnui";
7
- import { getApiUrl } from "../../../../client/config";
8
8
  import { useAuthContext } from "../../contexts";
9
9
  import { AuthComponent } from "../../enums";
10
10
 
@@ -18,10 +18,10 @@ export function LandingComponent() {
18
18
  <CardHeader className="mb-4" data-testid="page-pre-login-container">
19
19
  <CardTitle className="text-primary flex flex-col items-center gap-y-8 pb-8 text-4xl">
20
20
  <Image src="/logo.webp" alt="Logo" width={100} height={100} priority />
21
- {t(`generic.title`)}
21
+ {t(`common.title`)}
22
22
  </CardTitle>
23
23
  <CardDescription className="flex w-full justify-center text-center text-sm">
24
- {t(`generic.description`)}
24
+ {t(`common.description`)}
25
25
  </CardDescription>
26
26
  </CardHeader>
27
27
  <CardFooter className="mt-4 flex w-full flex-col justify-between gap-y-4">
@@ -34,13 +34,13 @@ export function LandingComponent() {
34
34
  onClick={() => setComponentType(AuthComponent.Register)}
35
35
  >
36
36
  <Button className="w-full" variant={`default`}>
37
- {t(`foundations.auth.buttons.register`)}
37
+ {t(`auth.buttons.register`)}
38
38
  </Button>
39
39
  </Link>
40
40
  )}
41
41
  <Link href="#" className="flex w-full justify-end" onClick={() => setComponentType(AuthComponent.Login)}>
42
42
  <Button className="w-full" variant={`outline`} data-testid="page-login-button-initial-login">
43
- {t(`foundations.auth.buttons.login`)}
43
+ {t(`auth.buttons.login`)}
44
44
  </Button>
45
45
  </Link>
46
46
  </>
@@ -29,28 +29,28 @@ export function AcceptInvitation() {
29
29
  await AuthService.validateCode(payload);
30
30
  } catch (e) {
31
31
  setError(e instanceof Error ? e.message : String(e));
32
- errorToast({ title: t(`generic.errors.error`), error: e });
32
+ errorToast({ title: t(`common.errors.error`), error: e });
33
33
  }
34
34
  }
35
35
 
36
36
  if (params && params.code) {
37
37
  validateCode(params.code);
38
38
  } else {
39
- setError(t(`foundations.auth.errors.invalid_invitation_code`));
39
+ setError(t(`auth.errors.invalid_invitation_code`));
40
40
  }
41
41
  }, []);
42
42
 
43
43
  const formSchema = z
44
44
  .object({
45
45
  password: z.string().min(1, {
46
- message: t(`foundations.user.fields.password.error`),
46
+ message: t(`user.fields.password.error`),
47
47
  }),
48
48
  passwordRetype: z.string().min(1, {
49
- message: t("foundations.auth.errors.password_retype_required"),
49
+ message: t("auth.errors.password_retype_required"),
50
50
  }),
51
51
  })
52
52
  .refine((data) => data.password === data.passwordRetype, {
53
- message: t("foundations.auth.fields.retype_password.error_not_match"),
53
+ message: t("auth.fields.retype_password.error_not_match"),
54
54
  path: ["passwordRetype"],
55
55
  });
56
56
 
@@ -74,8 +74,8 @@ export function AcceptInvitation() {
74
74
  await AuthService.acceptInvitation(payload);
75
75
  setShowConfirmation(true);
76
76
 
77
- toast.success(t("foundations.auth.account_activated"), {
78
- description: t("foundations.auth.account_activated_description"),
77
+ toast.success(t("auth.account_activated"), {
78
+ description: t("auth.account_activated_description"),
79
79
  });
80
80
 
81
81
  setTimeout(() => {
@@ -83,7 +83,7 @@ export function AcceptInvitation() {
83
83
  setParams(undefined);
84
84
  }, 2000);
85
85
  } catch (e) {
86
- errorToast({ title: t(`generic.errors.error`), error });
86
+ errorToast({ title: t(`common.errors.error`), error });
87
87
  }
88
88
  };
89
89
 
@@ -92,21 +92,15 @@ export function AcceptInvitation() {
92
92
  <CardHeader>
93
93
  <CardTitle className="text-primary flex flex-col items-center pb-10 text-4xl">
94
94
  <Image src="/logo.webp" alt="Logo" width={100} height={100} priority />
95
- {t("foundations.auth.accept_invitation")}
95
+ {t("auth.accept_invitation")}
96
96
  </CardTitle>
97
97
  <CardDescription className="text-center text-sm">
98
- {error ? (
99
- <>{t("foundations.auth.errors.activating_account")}</>
100
- ) : (
101
- <>{t("foundations.auth.select_password")}</>
102
- )}
98
+ {error ? <>{t("auth.errors.activating_account")}</> : <>{t("auth.select_password")}</>}
103
99
  </CardDescription>
104
100
  </CardHeader>
105
101
  <CardContent>
106
102
  {showConfirmation ? (
107
- <CardDescription className="text-center text-xl">
108
- {t("foundations.auth.activation_description")}
109
- </CardDescription>
103
+ <CardDescription className="text-center text-xl">{t("auth.activation_description")}</CardDescription>
110
104
  ) : error ? (
111
105
  <CardDescription className="text-center text-xl">{error}</CardDescription>
112
106
  ) : (
@@ -115,17 +109,17 @@ export function AcceptInvitation() {
115
109
  <FormPassword
116
110
  form={form}
117
111
  id="password"
118
- name={t(`foundations.user.fields.password.label`)}
119
- placeholder={t(`foundations.user.fields.password.placeholder`)}
112
+ name={t(`user.fields.password.label`)}
113
+ placeholder={t(`user.fields.password.placeholder`)}
120
114
  />
121
115
  <FormPassword
122
116
  form={form}
123
117
  id="passwordRetype"
124
- name={t("foundations.auth.fields.retype_password.label")}
125
- placeholder={t(`foundations.auth.fields.retype_password.placeholder`)}
118
+ name={t("auth.fields.retype_password.label")}
119
+ placeholder={t(`auth.fields.retype_password.placeholder`)}
126
120
  />
127
121
  <Button className="mt-4 w-full" type={"submit"}>
128
- {t("foundations.auth.accept_invitation")}
122
+ {t("auth.accept_invitation")}
129
123
  </Button>
130
124
  </form>
131
125
  </Form>
@@ -28,8 +28,8 @@ export function ActivateAccount() {
28
28
 
29
29
  setParams(undefined);
30
30
 
31
- toast.success(t("foundations.auth.account_activated"), {
32
- description: t("foundations.auth.account_activated_description"),
31
+ toast.success(t("auth.account_activated"), {
32
+ description: t("auth.account_activated_description"),
33
33
  });
34
34
 
35
35
  setTimeout(() => {
@@ -37,14 +37,14 @@ export function ActivateAccount() {
37
37
  }, 2000);
38
38
  } catch (e) {
39
39
  setError(e instanceof Error ? e.message : String(e));
40
- errorToast({ title: t(`generic.errors.error`), error: e });
40
+ errorToast({ title: t(`common.errors.error`), error: e });
41
41
  }
42
42
  }
43
43
 
44
44
  if (params && params.code) {
45
45
  ActivateAccount(params.code);
46
46
  } else {
47
- setError(t(`foundations.auth.errors.invalid_invitation_code`));
47
+ setError(t(`auth.errors.invalid_invitation_code`));
48
48
  }
49
49
  }, []);
50
50
 
@@ -53,20 +53,20 @@ export function ActivateAccount() {
53
53
  <CardHeader>
54
54
  <CardTitle className="text-primary flex flex-col items-center pb-10 text-4xl">
55
55
  <Image src="/logo.webp" alt="Logo" width={100} height={100} priority />
56
- {t("foundations.auth.accept_invitation")}
56
+ {t("auth.accept_invitation")}
57
57
  </CardTitle>
58
58
  <CardDescription className="text-center text-sm">
59
- {error ? <>{t("foundations.auth.errors.activating_account")}</> : <> </>}
59
+ {error ? <>{t("auth.errors.activating_account")}</> : <> </>}
60
60
  </CardDescription>
61
61
  </CardHeader>
62
62
  <CardContent>
63
63
  <CardDescription className="text-center text-xl">
64
64
  {showConfirmation ? (
65
- <>{t("foundations.auth.activation_description")}</>
65
+ <>{t("auth.activation_description")}</>
66
66
  ) : error ? (
67
67
  <>{error}</>
68
68
  ) : (
69
- <>{t("foundations.auth.activation_wait")}</>
69
+ <>{t("auth.activation_wait")}</>
70
70
  )}
71
71
  </CardDescription>
72
72
  </CardContent>
@@ -29,7 +29,7 @@ export function ForgotPassword() {
29
29
 
30
30
  const formSchema = z.object({
31
31
  email: z.string().email({
32
- message: t(`generic.errors.invalid_email`),
32
+ message: t(`common.errors.invalid_email`),
33
33
  }),
34
34
  });
35
35
 
@@ -58,15 +58,15 @@ export function ForgotPassword() {
58
58
  <CardHeader data-testid="page-forgot-password-container">
59
59
  <CardTitle className="text-primary flex flex-col items-center pb-10 text-4xl">
60
60
  <Image src="/logo.webp" alt="Logo" width={100} height={100} priority />
61
- {t("foundations.auth.forgot_password")}
61
+ {t("auth.forgot_password")}
62
62
  </CardTitle>
63
63
  <CardDescription className="text-sm">
64
- {showConfirmation ? <> </> : <>{t(`foundations.auth.add_email_to_reset`)}</>}
64
+ {showConfirmation ? <> </> : <>{t(`auth.add_email_to_reset`)}</>}
65
65
  </CardDescription>
66
66
  </CardHeader>
67
67
  {showConfirmation ? (
68
68
  <CardContent>
69
- <CardDescription className="text-center text-xl">{t(`foundations.auth.reset_confirmation`)}</CardDescription>
69
+ <CardDescription className="text-center text-xl">{t(`auth.reset_confirmation`)}</CardDescription>
70
70
  </CardContent>
71
71
  ) : (
72
72
  <Form {...form}>
@@ -75,12 +75,12 @@ export function ForgotPassword() {
75
75
  <FormInput
76
76
  form={form}
77
77
  id="email"
78
- name={t(`generic.fields.email.label`)}
79
- placeholder={t(`generic.fields.email.placeholder`)}
78
+ name={t(`common.fields.email.label`)}
79
+ placeholder={t(`common.fields.email.placeholder`)}
80
80
  testId="form-forgot-password-input-email"
81
81
  />
82
82
  <Button className="mt-4 w-full" type={"submit"} data-testid="form-forgot-password-button-reset">
83
- {t(`foundations.auth.buttons.reset_password`)}
83
+ {t(`auth.buttons.reset_password`)}
84
84
  </Button>
85
85
  </CardContent>
86
86
  <CardFooter className="flex w-full flex-row justify-between">
@@ -89,7 +89,7 @@ export function ForgotPassword() {
89
89
  className="flex w-full justify-start"
90
90
  onClick={() => setComponentType(AuthComponent.Register)}
91
91
  >
92
- {t("foundations.auth.buttons.register")}
92
+ {t("auth.buttons.register")}
93
93
  </Link> */}
94
94
  <Link
95
95
  href="#"
@@ -97,7 +97,7 @@ export function ForgotPassword() {
97
97
  onClick={() => setComponentType(AuthComponent.Login)}
98
98
  data-testid="form-forgot-password-link-login"
99
99
  >
100
- {t(`foundations.auth.buttons.login`)}
100
+ {t(`auth.buttons.login`)}
101
101
  </Link>
102
102
  </CardFooter>
103
103
  </form>
@@ -34,9 +34,9 @@ export function Login() {
34
34
 
35
35
  const formSchema = z.object({
36
36
  email: z.string().email({
37
- message: t(`generic.errors.invalid_email`),
37
+ message: t(`common.errors.invalid_email`),
38
38
  }),
39
- password: z.string().min(3, { message: t(`foundations.auth.errors.password_too_short`) }),
39
+ password: z.string().min(3, { message: t(`auth.errors.password_too_short`) }),
40
40
  });
41
41
 
42
42
  const form = useForm<z.infer<typeof formSchema>>({
@@ -58,7 +58,7 @@ export function Login() {
58
58
  router.replace(generateUrl({ page: `/` }));
59
59
  } catch (e) {
60
60
  errorToast({
61
- title: t(`generic.errors.error`),
61
+ title: t(`common.errors.error`),
62
62
  error: e,
63
63
  });
64
64
  }
@@ -69,10 +69,10 @@ export function Login() {
69
69
  <CardHeader data-testid="page-login-container">
70
70
  <CardTitle className="text-primary flex flex-col items-center pb-10 text-4xl">
71
71
  <Image src="/logo.webp" alt="Logo" width={100} height={100} priority />
72
- {t("foundations.auth.login")}
72
+ {t("auth.login")}
73
73
  </CardTitle>
74
74
 
75
- <CardDescription className="text-sm">{t(`foundations.auth.login_description`)}</CardDescription>
75
+ <CardDescription className="text-sm">{t(`auth.login_description`)}</CardDescription>
76
76
  </CardHeader>
77
77
  <Form {...form}>
78
78
  <form onSubmit={form.handleSubmit(onSubmit)}>
@@ -83,19 +83,19 @@ export function Login() {
83
83
  autoFocus
84
84
  form={form}
85
85
  id="email"
86
- name={t(`generic.fields.email.label`)}
87
- placeholder={t(`generic.fields.email.placeholder`)}
86
+ name={t(`common.fields.email.label`)}
87
+ placeholder={t(`common.fields.email.placeholder`)}
88
88
  testId="form-login-input-email"
89
89
  />
90
90
  <FormPassword
91
91
  form={form}
92
92
  id="password"
93
- name={t(`foundations.user.fields.password.label`)}
94
- placeholder={t(`foundations.user.fields.password.placeholder`)}
93
+ name={t(`user.fields.password.label`)}
94
+ placeholder={t(`user.fields.password.placeholder`)}
95
95
  testId="form-login-input-password"
96
96
  />
97
97
  <Button className="mt-4 w-full" type={"submit"} data-testid="form-login-button-submit">
98
- {t(`foundations.auth.login`)}
98
+ {t(`auth.login`)}
99
99
  </Button>
100
100
  </>
101
101
  )}
@@ -114,7 +114,7 @@ export function Login() {
114
114
  className="flex w-full justify-start"
115
115
  onClick={() => setComponentType(AuthComponent.Register)}
116
116
  >
117
- {t(`foundations.auth.register`)}
117
+ {t(`auth.register`)}
118
118
  </Link>
119
119
  <Link
120
120
  href="#"
@@ -122,7 +122,7 @@ export function Login() {
122
122
  onClick={() => setComponentType(AuthComponent.ForgotPassword)}
123
123
  data-testid="form-login-link-forgot-password"
124
124
  >
125
- {t(`foundations.auth.forgot_password`)}
125
+ {t(`auth.forgot_password`)}
126
126
  </Link>
127
127
  </div>
128
128
  </CardFooter>