@nextsparkjs/core 0.1.0-beta.106 → 0.1.0-beta.108
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/components/auth/forms/SignupForm.d.ts.map +1 -1
- package/dist/components/auth/forms/SignupForm.js +45 -39
- package/dist/components/dashboard/layouts/Sidebar.js +1 -1
- package/dist/components/dashboard/navigation/DynamicNavigation.d.ts +2 -1
- package/dist/components/dashboard/navigation/DynamicNavigation.d.ts.map +1 -1
- package/dist/components/dashboard/navigation/DynamicNavigation.js +23 -23
- package/dist/components/ui/password-input.d.ts +7 -0
- package/dist/components/ui/password-input.d.ts.map +1 -1
- package/dist/components/ui/password-input.js +12 -5
- package/dist/messages/de/auth.json +50 -3
- package/dist/messages/de/index.d.ts +47 -0
- package/dist/messages/de/index.d.ts.map +1 -1
- package/dist/messages/en/auth.json +101 -9
- package/dist/messages/en/index.d.ts +92 -0
- package/dist/messages/en/index.d.ts.map +1 -1
- package/dist/messages/es/auth.json +106 -14
- package/dist/messages/es/index.d.ts +92 -0
- package/dist/messages/es/index.d.ts.map +1 -1
- package/dist/messages/fr/auth.json +50 -3
- package/dist/messages/fr/index.d.ts +47 -0
- package/dist/messages/fr/index.d.ts.map +1 -1
- package/dist/messages/it/auth.json +50 -3
- package/dist/messages/it/index.d.ts +47 -0
- package/dist/messages/it/index.d.ts.map +1 -1
- package/dist/messages/pt/auth.json +50 -3
- package/dist/messages/pt/index.d.ts +47 -0
- package/dist/messages/pt/index.d.ts.map +1 -1
- package/dist/styles/classes.json +3 -2
- package/dist/styles/ui.css +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignupForm.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/forms/SignupForm.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"SignupForm.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/forms/SignupForm.tsx"],"names":[],"mappings":"AA6BA,wBAAgB,UAAU,4CAmgBzB"}
|
|
@@ -77,21 +77,21 @@ function SignupForm() {
|
|
|
77
77
|
const result = await response.json();
|
|
78
78
|
if (!response.ok) {
|
|
79
79
|
if (result.code === "USER_ALREADY_EXISTS") {
|
|
80
|
-
setError("
|
|
80
|
+
setError(t("signup.errors.userAlreadyExists"));
|
|
81
81
|
} else if (result.code === "EMAIL_MISMATCH") {
|
|
82
|
-
setError("
|
|
82
|
+
setError(t("signup.errors.emailMismatch"));
|
|
83
83
|
} else if (result.code === "INVITATION_EXPIRED") {
|
|
84
|
-
setError("
|
|
84
|
+
setError(t("signup.errors.invitationExpired"));
|
|
85
85
|
} else if (result.code === "INVITATION_NOT_FOUND") {
|
|
86
|
-
setError("
|
|
86
|
+
setError(t("signup.errors.invitationNotFound"));
|
|
87
87
|
} else {
|
|
88
|
-
setError(result.error || "
|
|
88
|
+
setError(result.error || t("signup.errors.failedToCreate"));
|
|
89
89
|
}
|
|
90
90
|
setStatusMessage(t("signup.messages.createError", { error: result.error || "Unknown error" }));
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
|
-
toast.success("
|
|
94
|
-
description: "
|
|
93
|
+
toast.success(t("signup.messages.inviteSuccess"), {
|
|
94
|
+
description: t("signup.messages.inviteJoinedTeam")
|
|
95
95
|
});
|
|
96
96
|
router.push(((_a = result.data) == null ? void 0 : _a.redirectTo) || "/dashboard/settings/teams");
|
|
97
97
|
return;
|
|
@@ -106,7 +106,7 @@ function SignupForm() {
|
|
|
106
106
|
setEmailSent(true);
|
|
107
107
|
setStatusMessage(t("signup.messages.accountCreated"));
|
|
108
108
|
} catch (err) {
|
|
109
|
-
const errorMessage = err instanceof Error ? err.message : "
|
|
109
|
+
const errorMessage = err instanceof Error ? err.message : t("signup.errors.failedToCreate");
|
|
110
110
|
setError(errorMessage);
|
|
111
111
|
setStatusMessage(t("signup.messages.createError", { error: errorMessage }));
|
|
112
112
|
} finally {
|
|
@@ -119,7 +119,7 @@ function SignupForm() {
|
|
|
119
119
|
try {
|
|
120
120
|
await googleSignIn(callbackUrl || void 0);
|
|
121
121
|
} catch (err) {
|
|
122
|
-
setError(err instanceof Error ? err.message : "
|
|
122
|
+
setError(err instanceof Error ? err.message : t("signup.errors.googleFailed"));
|
|
123
123
|
} finally {
|
|
124
124
|
setLoadingProvider(null);
|
|
125
125
|
}
|
|
@@ -132,10 +132,10 @@ function SignupForm() {
|
|
|
132
132
|
if (result.success) {
|
|
133
133
|
setEmailSent(true);
|
|
134
134
|
} else {
|
|
135
|
-
setError(result.error || "
|
|
135
|
+
setError(result.error || t("signup.errors.failedToResend"));
|
|
136
136
|
}
|
|
137
137
|
} catch (err) {
|
|
138
|
-
setError(err instanceof Error ? err.message : "
|
|
138
|
+
setError(err instanceof Error ? err.message : t("signup.errors.failedToResend"));
|
|
139
139
|
} finally {
|
|
140
140
|
setResendingEmail(false);
|
|
141
141
|
}
|
|
@@ -169,7 +169,7 @@ function SignupForm() {
|
|
|
169
169
|
{
|
|
170
170
|
className: "mx-auto w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mb-4",
|
|
171
171
|
role: "img",
|
|
172
|
-
"aria-label": "
|
|
172
|
+
"aria-label": t("signup.emailVerification.emailSentAria"),
|
|
173
173
|
children: /* @__PURE__ */ jsx(MailCheck, { className: "w-6 h-6 text-green-600", "aria-hidden": "true" })
|
|
174
174
|
}
|
|
175
175
|
),
|
|
@@ -195,20 +195,20 @@ function SignupForm() {
|
|
|
195
195
|
/* @__PURE__ */ jsx("div", { className: "p-3 bg-muted rounded-lg", children: /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-center break-all", children: registeredEmail }) }),
|
|
196
196
|
/* @__PURE__ */ jsxs(Alert, { "data-cy": sel("auth.verifyEmail.successMessage"), children: [
|
|
197
197
|
/* @__PURE__ */ jsx(CheckCircle2, { className: "h-4 w-4" }),
|
|
198
|
-
/* @__PURE__ */ jsx(AlertDescription, { children: "
|
|
198
|
+
/* @__PURE__ */ jsx(AlertDescription, { children: t("signup.emailVerification.checkInbox") })
|
|
199
199
|
] }),
|
|
200
200
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2 text-sm text-muted-foreground", children: [
|
|
201
201
|
/* @__PURE__ */ jsxs("p", { className: "flex items-start gap-2", children: [
|
|
202
202
|
/* @__PURE__ */ jsx("span", { className: "text-primary font-medium", children: "1." }),
|
|
203
|
-
"
|
|
203
|
+
t("signup.emailVerification.step1")
|
|
204
204
|
] }),
|
|
205
205
|
/* @__PURE__ */ jsxs("p", { className: "flex items-start gap-2", children: [
|
|
206
206
|
/* @__PURE__ */ jsx("span", { className: "text-primary font-medium", children: "2." }),
|
|
207
|
-
"
|
|
207
|
+
t("signup.emailVerification.step2")
|
|
208
208
|
] }),
|
|
209
209
|
/* @__PURE__ */ jsxs("p", { className: "flex items-start gap-2", children: [
|
|
210
210
|
/* @__PURE__ */ jsx("span", { className: "text-primary font-medium", children: "3." }),
|
|
211
|
-
"
|
|
211
|
+
t("signup.emailVerification.step3")
|
|
212
212
|
] })
|
|
213
213
|
] }),
|
|
214
214
|
error && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
|
|
@@ -217,7 +217,7 @@ function SignupForm() {
|
|
|
217
217
|
] }),
|
|
218
218
|
/* @__PURE__ */ jsx(Separator, {}),
|
|
219
219
|
/* @__PURE__ */ jsxs("div", { className: "text-center space-y-2", children: [
|
|
220
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children:
|
|
220
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t("signup.emailVerification.didntReceive") }),
|
|
221
221
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
222
222
|
/* @__PURE__ */ jsxs(
|
|
223
223
|
Button,
|
|
@@ -230,7 +230,7 @@ function SignupForm() {
|
|
|
230
230
|
className: "flex-1",
|
|
231
231
|
children: [
|
|
232
232
|
/* @__PURE__ */ jsx(ArrowRight, { className: "mr-2 h-4 w-4 rotate-180" }),
|
|
233
|
-
"
|
|
233
|
+
t("signup.emailVerification.back")
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
),
|
|
@@ -243,10 +243,10 @@ function SignupForm() {
|
|
|
243
243
|
className: "flex-1",
|
|
244
244
|
children: resendingEmail ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
245
245
|
/* @__PURE__ */ jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
246
|
-
"
|
|
246
|
+
t("signup.emailVerification.sending")
|
|
247
247
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
248
248
|
/* @__PURE__ */ jsx(Mail, { className: "mr-2 h-4 w-4" }),
|
|
249
|
-
"
|
|
249
|
+
t("signup.emailVerification.resendEmail")
|
|
250
250
|
] })
|
|
251
251
|
}
|
|
252
252
|
)
|
|
@@ -254,9 +254,9 @@ function SignupForm() {
|
|
|
254
254
|
] })
|
|
255
255
|
] }),
|
|
256
256
|
/* @__PURE__ */ jsx(CardFooter, { children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground text-center w-full", children: [
|
|
257
|
-
"
|
|
257
|
+
t("signup.emailVerification.alreadyVerified"),
|
|
258
258
|
" ",
|
|
259
|
-
/* @__PURE__ */ jsx(Link, { href: "/login", className: "text-primary hover:underline font-medium", children: "
|
|
259
|
+
/* @__PURE__ */ jsx(Link, { href: "/login", className: "text-primary hover:underline font-medium", children: t("signup.emailVerification.signIn") })
|
|
260
260
|
] }) })
|
|
261
261
|
]
|
|
262
262
|
}
|
|
@@ -310,7 +310,7 @@ function SignupForm() {
|
|
|
310
310
|
/* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit(onSubmit), className: "space-y-4", children: [
|
|
311
311
|
/* @__PURE__ */ jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [
|
|
312
312
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
313
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "firstName", children: "
|
|
313
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "firstName", children: t("signup.form.firstName") }),
|
|
314
314
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
315
315
|
/* @__PURE__ */ jsx(User, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
316
316
|
/* @__PURE__ */ jsx(
|
|
@@ -320,7 +320,7 @@ function SignupForm() {
|
|
|
320
320
|
id: "firstName",
|
|
321
321
|
type: "text",
|
|
322
322
|
autoComplete: "given-name",
|
|
323
|
-
placeholder: "
|
|
323
|
+
placeholder: t("signup.form.firstNamePlaceholder"),
|
|
324
324
|
className: "pl-9",
|
|
325
325
|
"data-cy": sel("auth.signup.firstName")
|
|
326
326
|
}
|
|
@@ -329,7 +329,7 @@ function SignupForm() {
|
|
|
329
329
|
errors.firstName && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: errors.firstName.message })
|
|
330
330
|
] }),
|
|
331
331
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
332
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: "
|
|
332
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "lastName", children: t("signup.form.lastName") }),
|
|
333
333
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
334
334
|
/* @__PURE__ */ jsx(User, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
335
335
|
/* @__PURE__ */ jsx(
|
|
@@ -339,7 +339,7 @@ function SignupForm() {
|
|
|
339
339
|
id: "lastName",
|
|
340
340
|
type: "text",
|
|
341
341
|
autoComplete: "family-name",
|
|
342
|
-
placeholder: "
|
|
342
|
+
placeholder: t("signup.form.lastNamePlaceholder"),
|
|
343
343
|
className: "pl-9",
|
|
344
344
|
"data-cy": sel("auth.signup.lastName")
|
|
345
345
|
}
|
|
@@ -349,7 +349,7 @@ function SignupForm() {
|
|
|
349
349
|
] })
|
|
350
350
|
] }),
|
|
351
351
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
352
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "email", children: "
|
|
352
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "email", children: t("signup.form.email") }),
|
|
353
353
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
354
354
|
/* @__PURE__ */ jsx(Mail, { className: "absolute left-3 top-3 h-4 w-4 text-muted-foreground" }),
|
|
355
355
|
/* @__PURE__ */ jsx(
|
|
@@ -359,7 +359,7 @@ function SignupForm() {
|
|
|
359
359
|
id: "email",
|
|
360
360
|
type: "email",
|
|
361
361
|
autoComplete: "email",
|
|
362
|
-
placeholder: "
|
|
362
|
+
placeholder: t("signup.form.emailPlaceholder"),
|
|
363
363
|
className: `pl-9 ${fromInvite ? "bg-muted cursor-not-allowed" : ""}`,
|
|
364
364
|
readOnly: fromInvite,
|
|
365
365
|
"data-cy": sel("auth.signup.email")
|
|
@@ -369,7 +369,7 @@ function SignupForm() {
|
|
|
369
369
|
errors.email && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: errors.email.message })
|
|
370
370
|
] }),
|
|
371
371
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
372
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "password", children: "
|
|
372
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "password", children: t("signup.form.password") }),
|
|
373
373
|
/* @__PURE__ */ jsx(
|
|
374
374
|
PasswordInput,
|
|
375
375
|
{
|
|
@@ -379,13 +379,19 @@ function SignupForm() {
|
|
|
379
379
|
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
380
380
|
showRequirements: true,
|
|
381
381
|
password,
|
|
382
|
+
requirementLabels: {
|
|
383
|
+
minChars: t("signup.form.passwordRequirements.minChars"),
|
|
384
|
+
uppercase: t("signup.form.passwordRequirements.uppercase"),
|
|
385
|
+
lowercase: t("signup.form.passwordRequirements.lowercase"),
|
|
386
|
+
number: t("signup.form.passwordRequirements.number")
|
|
387
|
+
},
|
|
382
388
|
"data-cy": sel("auth.signup.password")
|
|
383
389
|
}
|
|
384
390
|
),
|
|
385
391
|
errors.password && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: errors.password.message })
|
|
386
392
|
] }),
|
|
387
393
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
388
|
-
/* @__PURE__ */ jsx(Label, { htmlFor: "confirmPassword", children: "
|
|
394
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "confirmPassword", children: t("signup.form.confirmPassword") }),
|
|
389
395
|
/* @__PURE__ */ jsx(
|
|
390
396
|
PasswordInput,
|
|
391
397
|
{
|
|
@@ -418,9 +424,9 @@ function SignupForm() {
|
|
|
418
424
|
htmlFor: "terms",
|
|
419
425
|
className: "text-sm font-normal cursor-pointer",
|
|
420
426
|
children: [
|
|
421
|
-
"
|
|
427
|
+
t("signup.form.agreeToThe"),
|
|
422
428
|
" ",
|
|
423
|
-
/* @__PURE__ */ jsx(Link, { href: "/terms", className: "text-primary hover:underline", children: "
|
|
429
|
+
/* @__PURE__ */ jsx(Link, { href: "/terms", className: "text-primary hover:underline", children: t("signup.form.termsAndConditions") })
|
|
424
430
|
]
|
|
425
431
|
}
|
|
426
432
|
)
|
|
@@ -434,15 +440,15 @@ function SignupForm() {
|
|
|
434
440
|
"data-cy": sel("auth.signup.submitButton"),
|
|
435
441
|
children: loadingProvider === "email" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
436
442
|
/* @__PURE__ */ jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
437
|
-
"
|
|
438
|
-
] }) : "
|
|
443
|
+
t("signup.form.creatingAccount")
|
|
444
|
+
] }) : t("signup.form.createAccount")
|
|
439
445
|
}
|
|
440
446
|
)
|
|
441
447
|
] }),
|
|
442
448
|
PUBLIC_AUTH_CONFIG.providers.google.enabled && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
443
449
|
/* @__PURE__ */ jsxs("div", { className: "relative my-4", children: [
|
|
444
450
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsx(Separator, { className: "w-full" }) }),
|
|
445
|
-
/* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-xs uppercase", children: /* @__PURE__ */ jsx("span", { className: "bg-background px-2 text-muted-foreground", children: "
|
|
451
|
+
/* @__PURE__ */ jsx("div", { className: "relative flex justify-center text-xs uppercase", children: /* @__PURE__ */ jsx("span", { className: "bg-background px-2 text-muted-foreground", children: t("signup.form.orContinueWith") }) })
|
|
446
452
|
] }),
|
|
447
453
|
/* @__PURE__ */ jsxs(
|
|
448
454
|
Button,
|
|
@@ -460,7 +466,7 @@ function SignupForm() {
|
|
|
460
466
|
/* @__PURE__ */ jsx("path", { fill: "#FBBC05", d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }),
|
|
461
467
|
/* @__PURE__ */ jsx("path", { fill: "#EA4335", d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" })
|
|
462
468
|
] }),
|
|
463
|
-
"
|
|
469
|
+
t("signup.form.continueWithGoogle")
|
|
464
470
|
]
|
|
465
471
|
}
|
|
466
472
|
)
|
|
@@ -471,16 +477,16 @@ function SignupForm() {
|
|
|
471
477
|
{
|
|
472
478
|
"data-cy": sel("auth.signup.footer"),
|
|
473
479
|
children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground text-center w-full", children: [
|
|
474
|
-
"
|
|
480
|
+
t("signup.footer.alreadyHaveAccount"),
|
|
475
481
|
" ",
|
|
476
482
|
/* @__PURE__ */ jsx(
|
|
477
483
|
Link,
|
|
478
484
|
{
|
|
479
485
|
href: "/login",
|
|
480
486
|
className: "text-primary hover:underline font-medium focus:outline-none focus:ring-2 focus:ring-accent",
|
|
481
|
-
"aria-label": "
|
|
487
|
+
"aria-label": t("signup.footer.signInAria"),
|
|
482
488
|
"data-cy": sel("auth.signup.loginLink"),
|
|
483
|
-
children: "
|
|
489
|
+
children: t("signup.footer.signIn")
|
|
484
490
|
}
|
|
485
491
|
)
|
|
486
492
|
] })
|
|
@@ -90,7 +90,7 @@ function Sidebar({ className, entities }) {
|
|
|
90
90
|
children: "Navigation"
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(DynamicNavigation, { entities }) })
|
|
93
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(DynamicNavigation, { entities, isCollapsed }) })
|
|
94
94
|
] }) })
|
|
95
95
|
}
|
|
96
96
|
),
|
|
@@ -2,9 +2,10 @@ import type { SerializableEntityConfig } from '../../../lib/entities/serializati
|
|
|
2
2
|
interface DynamicNavigationProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
isMobile?: boolean;
|
|
5
|
+
isCollapsed?: boolean;
|
|
5
6
|
onItemClick?: () => void;
|
|
6
7
|
entities: SerializableEntityConfig[];
|
|
7
8
|
}
|
|
8
|
-
export declare function DynamicNavigation({ className, isMobile, onItemClick, entities }: DynamicNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function DynamicNavigation({ className, isMobile, isCollapsed, onItemClick, entities }: DynamicNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default DynamicNavigation;
|
|
10
11
|
//# sourceMappingURL=DynamicNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/navigation/DynamicNavigation.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AA0BnF,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,EAAE,wBAAwB,EAAE,CAAA;CACrC;
|
|
1
|
+
{"version":3,"file":"DynamicNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/dashboard/navigation/DynamicNavigation.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAA;AA0BnF,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,QAAQ,EAAE,wBAAwB,EAAE,CAAA;CACrC;AAwHD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAgB,EAChB,WAAmB,EACnB,WAAW,EACX,QAAQ,EACT,EAAE,sBAAsB,2CAyFxB;AAwDD,eAAe,iBAAiB,CAAA"}
|
|
@@ -41,6 +41,7 @@ function SectionWithPermission({
|
|
|
41
41
|
section,
|
|
42
42
|
pathname,
|
|
43
43
|
isMobile,
|
|
44
|
+
isCollapsed = false,
|
|
44
45
|
onItemClick,
|
|
45
46
|
t
|
|
46
47
|
}) {
|
|
@@ -54,7 +55,7 @@ function SectionWithPermission({
|
|
|
54
55
|
const normalizedSectionKey = normalizeKey(section.labelKey);
|
|
55
56
|
const sectionLabel = t(normalizedSectionKey) || labelMappings[section.labelKey] || section.id;
|
|
56
57
|
return /* @__PURE__ */ jsxs("div", { className: "mb-4", "data-cy": sel("dashboard.navigation.section", { id: section.id }), children: [
|
|
57
|
-
/* @__PURE__ */ jsxs(
|
|
58
|
+
!isCollapsed && /* @__PURE__ */ jsxs(
|
|
58
59
|
"div",
|
|
59
60
|
{
|
|
60
61
|
className: "px-3 py-2 text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-2",
|
|
@@ -65,6 +66,7 @@ function SectionWithPermission({
|
|
|
65
66
|
]
|
|
66
67
|
}
|
|
67
68
|
),
|
|
69
|
+
isCollapsed && /* @__PURE__ */ jsx("div", { className: "my-2 mx-3 border-t border-border", "aria-hidden": "true" }),
|
|
68
70
|
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: section.items.map((item) => {
|
|
69
71
|
const ItemIcon = Icons[item.icon] || Icons.Circle;
|
|
70
72
|
const isActive = pathname === item.href || pathname.startsWith(item.href + "/");
|
|
@@ -76,15 +78,17 @@ function SectionWithPermission({
|
|
|
76
78
|
href: item.href,
|
|
77
79
|
onClick: onItemClick,
|
|
78
80
|
className: cn(
|
|
79
|
-
"flex items-center
|
|
81
|
+
"flex items-center rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
82
|
+
isCollapsed ? "justify-center" : "gap-3",
|
|
80
83
|
isActive ? "bg-secondary text-foreground" : "text-muted-foreground hover:bg-secondary/50 hover:text-foreground",
|
|
81
84
|
isMobile && "w-full"
|
|
82
85
|
),
|
|
83
86
|
"aria-current": isActive ? "page" : void 0,
|
|
87
|
+
title: isCollapsed ? itemLabel : void 0,
|
|
84
88
|
"data-cy": sel("dashboard.navigation.sectionItem", { sectionId: section.id, itemId: item.id }),
|
|
85
89
|
children: [
|
|
86
90
|
/* @__PURE__ */ jsx(ItemIcon, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
|
|
87
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: itemLabel })
|
|
91
|
+
!isCollapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: itemLabel })
|
|
88
92
|
]
|
|
89
93
|
},
|
|
90
94
|
item.id
|
|
@@ -95,37 +99,26 @@ function SectionWithPermission({
|
|
|
95
99
|
function DynamicNavigation({
|
|
96
100
|
className,
|
|
97
101
|
isMobile = false,
|
|
102
|
+
isCollapsed = false,
|
|
98
103
|
onItemClick,
|
|
99
104
|
entities
|
|
100
105
|
}) {
|
|
101
|
-
var _a2, _b;
|
|
102
106
|
const pathname = usePathname();
|
|
103
107
|
const t = useTranslations("navigation");
|
|
104
108
|
const hasCustomSections = customSidebarSections.length > 0;
|
|
105
|
-
console.log("[DynamicNavigation] entities count:", entities == null ? void 0 : entities.length);
|
|
106
|
-
if ((entities == null ? void 0 : entities.length) > 0) {
|
|
107
|
-
console.log("[DynamicNavigation] First entity:", {
|
|
108
|
-
slug: entities[0].slug,
|
|
109
|
-
enabled: entities[0].enabled,
|
|
110
|
-
hasUi: !!entities[0].ui,
|
|
111
|
-
ui: entities[0].ui,
|
|
112
|
-
showInMenu: (_b = (_a2 = entities[0].ui) == null ? void 0 : _a2.dashboard) == null ? void 0 : _b.showInMenu
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
109
|
const enabledEntities = useMemo(
|
|
116
110
|
() => entities.filter((entity) => {
|
|
117
|
-
var
|
|
118
|
-
return (entity == null ? void 0 : entity.enabled) && ((
|
|
111
|
+
var _a2, _b;
|
|
112
|
+
return (entity == null ? void 0 : entity.enabled) && ((_b = (_a2 = entity == null ? void 0 : entity.ui) == null ? void 0 : _a2.dashboard) == null ? void 0 : _b.showInMenu);
|
|
119
113
|
}),
|
|
120
114
|
[entities]
|
|
121
115
|
);
|
|
122
|
-
console.log("[DynamicNavigation] enabledEntities count:", enabledEntities == null ? void 0 : enabledEntities.length);
|
|
123
116
|
const entityItems = useMemo(
|
|
124
117
|
() => enabledEntities.map((entity) => {
|
|
125
|
-
var
|
|
118
|
+
var _a2;
|
|
126
119
|
const icon = Icons[entity.iconName] || Icons.Box;
|
|
127
120
|
return {
|
|
128
|
-
name: ((
|
|
121
|
+
name: ((_a2 = entity.names) == null ? void 0 : _a2.plural) || entity.slug,
|
|
129
122
|
href: `/dashboard/${entity.slug}`,
|
|
130
123
|
icon
|
|
131
124
|
};
|
|
@@ -144,15 +137,17 @@ function DynamicNavigation({
|
|
|
144
137
|
href: "/dashboard",
|
|
145
138
|
onClick: onItemClick,
|
|
146
139
|
className: cn(
|
|
147
|
-
"flex items-center
|
|
140
|
+
"flex items-center rounded-lg px-3 py-2 text-sm font-medium transition-colors mb-4",
|
|
141
|
+
isCollapsed ? "justify-center" : "gap-3",
|
|
148
142
|
pathname === "/dashboard" ? "bg-secondary text-foreground" : "text-muted-foreground hover:bg-secondary/50 hover:text-foreground",
|
|
149
143
|
isMobile && "w-full"
|
|
150
144
|
),
|
|
151
145
|
"aria-current": pathname === "/dashboard" ? "page" : void 0,
|
|
146
|
+
title: isCollapsed ? t("navigation.dashboard") : void 0,
|
|
152
147
|
"data-cy": sel("dashboard.navigation.dashboardLink"),
|
|
153
148
|
children: [
|
|
154
149
|
/* @__PURE__ */ jsx(Home, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
|
|
155
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: t("navigation.dashboard") })
|
|
150
|
+
!isCollapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: t("navigation.dashboard") })
|
|
156
151
|
]
|
|
157
152
|
}
|
|
158
153
|
),
|
|
@@ -162,6 +157,7 @@ function DynamicNavigation({
|
|
|
162
157
|
section,
|
|
163
158
|
pathname,
|
|
164
159
|
isMobile,
|
|
160
|
+
isCollapsed,
|
|
165
161
|
onItemClick,
|
|
166
162
|
t
|
|
167
163
|
},
|
|
@@ -177,6 +173,7 @@ function DynamicNavigation({
|
|
|
177
173
|
pathname,
|
|
178
174
|
t,
|
|
179
175
|
isMobile,
|
|
176
|
+
isCollapsed,
|
|
180
177
|
onItemClick
|
|
181
178
|
},
|
|
182
179
|
item.name
|
|
@@ -187,6 +184,7 @@ function NavigationLink({
|
|
|
187
184
|
pathname,
|
|
188
185
|
t,
|
|
189
186
|
isMobile = false,
|
|
187
|
+
isCollapsed = false,
|
|
190
188
|
onItemClick
|
|
191
189
|
}) {
|
|
192
190
|
const Icon = item.icon;
|
|
@@ -200,15 +198,17 @@ function NavigationLink({
|
|
|
200
198
|
href: item.href,
|
|
201
199
|
onClick: onItemClick,
|
|
202
200
|
className: cn(
|
|
203
|
-
"flex items-center
|
|
201
|
+
"flex items-center rounded-lg px-3 py-2 text-sm font-medium transition-colors",
|
|
202
|
+
isCollapsed ? "justify-center" : "gap-3",
|
|
204
203
|
isActive ? "bg-secondary text-foreground" : "text-muted-foreground hover:bg-secondary/50 hover:text-foreground",
|
|
205
204
|
isMobile && "w-full"
|
|
206
205
|
),
|
|
207
206
|
"aria-current": isActive ? "page" : void 0,
|
|
207
|
+
title: isCollapsed ? label : void 0,
|
|
208
208
|
"data-cy": dataCyId,
|
|
209
209
|
children: [
|
|
210
210
|
/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
|
|
211
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: label })
|
|
211
|
+
!isCollapsed && /* @__PURE__ */ jsx("span", { className: "truncate", children: label })
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
214
|
);
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export interface PasswordRequirementLabels {
|
|
2
|
+
minChars: string;
|
|
3
|
+
uppercase: string;
|
|
4
|
+
lowercase: string;
|
|
5
|
+
number: string;
|
|
6
|
+
}
|
|
1
7
|
export interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
2
8
|
showRequirements?: boolean;
|
|
3
9
|
showToggle?: boolean;
|
|
4
10
|
password?: string;
|
|
11
|
+
requirementLabels?: PasswordRequirementLabels;
|
|
5
12
|
}
|
|
6
13
|
declare const PasswordInput: import("react").ForwardRefExoticComponent<PasswordInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
14
|
export { PasswordInput };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/password-input.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/password-input.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;CACf;AASD,MAAM,WAAW,kBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,yBAAyB,CAAA;CAC9C;AAED,QAAA,MAAM,aAAa,iHA2DlB,CAAA;AAID,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -5,14 +5,21 @@ import { Eye, EyeOff, Lock, CheckCircle2, XCircle } from "lucide-react";
|
|
|
5
5
|
import { Input } from "./input.js";
|
|
6
6
|
import { Badge } from "./badge.js";
|
|
7
7
|
import { cn } from "../../lib/utils/index.js";
|
|
8
|
+
const DEFAULT_REQUIREMENT_LABELS = {
|
|
9
|
+
minChars: "8+ characters",
|
|
10
|
+
uppercase: "One uppercase",
|
|
11
|
+
lowercase: "One lowercase",
|
|
12
|
+
number: "One number"
|
|
13
|
+
};
|
|
8
14
|
const PasswordInput = forwardRef(
|
|
9
|
-
({ className, showRequirements = false, showToggle = true, password = "", ...props }, ref) => {
|
|
15
|
+
({ className, showRequirements = false, showToggle = true, password = "", requirementLabels, ...props }, ref) => {
|
|
10
16
|
const [showPassword, setShowPassword] = useState(false);
|
|
17
|
+
const labels = requirementLabels ?? DEFAULT_REQUIREMENT_LABELS;
|
|
11
18
|
const passwordRequirements = [
|
|
12
|
-
{ met: password.length >= 8, text:
|
|
13
|
-
{ met: /[A-Z]/.test(password), text:
|
|
14
|
-
{ met: /[a-z]/.test(password), text:
|
|
15
|
-
{ met: /[0-9]/.test(password), text:
|
|
19
|
+
{ met: password.length >= 8, text: labels.minChars },
|
|
20
|
+
{ met: /[A-Z]/.test(password), text: labels.uppercase },
|
|
21
|
+
{ met: /[a-z]/.test(password), text: labels.lowercase },
|
|
22
|
+
{ met: /[0-9]/.test(password), text: labels.number }
|
|
16
23
|
];
|
|
17
24
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
18
25
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
@@ -60,18 +60,65 @@
|
|
|
60
60
|
"title": "Konto erstellen",
|
|
61
61
|
"description": "Geben Sie Ihre Informationen ein, um zu beginnen",
|
|
62
62
|
"inviteBanner": "Erstellen Sie ein Konto, um Ihre Teameinladung anzunehmen",
|
|
63
|
+
"form": {
|
|
64
|
+
"firstName": "Vorname",
|
|
65
|
+
"firstNamePlaceholder": "Hans",
|
|
66
|
+
"lastName": "Nachname",
|
|
67
|
+
"lastNamePlaceholder": "Mueller",
|
|
68
|
+
"email": "E-Mail",
|
|
69
|
+
"emailPlaceholder": "email@beispiel.de",
|
|
70
|
+
"password": "Passwort",
|
|
71
|
+
"confirmPassword": "Passwort bestaetigen",
|
|
72
|
+
"agreeToThe": "Ich stimme den",
|
|
73
|
+
"termsAndConditions": "Nutzungsbedingungen zu",
|
|
74
|
+
"creatingAccount": "Konto wird erstellt...",
|
|
75
|
+
"createAccount": "Konto erstellen",
|
|
76
|
+
"orContinueWith": "Oder fortfahren mit",
|
|
77
|
+
"continueWithGoogle": "Mit Google fortfahren",
|
|
78
|
+
"passwordRequirements": {
|
|
79
|
+
"minChars": "8+ Zeichen",
|
|
80
|
+
"uppercase": "Ein Grossbuchstabe",
|
|
81
|
+
"lowercase": "Ein Kleinbuchstabe",
|
|
82
|
+
"number": "Eine Zahl"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"footer": {
|
|
86
|
+
"alreadyHaveAccount": "Haben Sie bereits ein Konto?",
|
|
87
|
+
"signIn": "Anmelden",
|
|
88
|
+
"signInAria": "Zur Anmeldeseite gehen"
|
|
89
|
+
},
|
|
63
90
|
"emailVerification": {
|
|
64
91
|
"title": "Ueberpruefen Sie Ihre E-Mail!",
|
|
65
|
-
"description": "Wir haben einen Bestaetigungslink gesendet an"
|
|
92
|
+
"description": "Wir haben einen Bestaetigungslink gesendet an",
|
|
93
|
+
"checkInbox": "Bitte pruefen Sie Ihren Posteingang und klicken Sie auf den Bestaetigungslink, um Ihr Konto zu aktivieren. Der Link laueft in 24 Stunden ab.",
|
|
94
|
+
"emailSentAria": "E-Mail erfolgreich gesendet",
|
|
95
|
+
"step1": "Oeffnen Sie Ihren E-Mail-Posteingang",
|
|
96
|
+
"step2": "Suchen Sie unsere E-Mail (pruefen Sie auch den Spam-Ordner)",
|
|
97
|
+
"step3": "Klicken Sie auf den Bestaetigungsbutton",
|
|
98
|
+
"didntReceive": "Keine E-Mail erhalten?",
|
|
99
|
+
"back": "Zurueck",
|
|
100
|
+
"sending": "Senden...",
|
|
101
|
+
"resendEmail": "E-Mail erneut senden",
|
|
102
|
+
"alreadyVerified": "Bereits bestaetigt?",
|
|
103
|
+
"signIn": "Anmelden"
|
|
66
104
|
},
|
|
67
105
|
"messages": {
|
|
68
106
|
"termsError": "Fehler: Sie muessen die Nutzungsbedingungen akzeptieren",
|
|
69
107
|
"creatingAccount": "Konto wird erstellt...",
|
|
70
108
|
"accountCreated": "Konto erfolgreich erstellt. Ueberpruefen Sie Ihre E-Mail.",
|
|
71
|
-
"createError": "Fehler beim Erstellen des Kontos: {error}"
|
|
109
|
+
"createError": "Fehler beim Erstellen des Kontos: {error}",
|
|
110
|
+
"inviteSuccess": "Konto erfolgreich erstellt!",
|
|
111
|
+
"inviteJoinedTeam": "Sie sind dem Team beigetreten."
|
|
72
112
|
},
|
|
73
113
|
"errors": {
|
|
74
|
-
"mustAgreeToTerms": "Sie muessen die Nutzungsbedingungen akzeptieren"
|
|
114
|
+
"mustAgreeToTerms": "Sie muessen die Nutzungsbedingungen akzeptieren",
|
|
115
|
+
"userAlreadyExists": "Es existiert bereits ein Konto mit dieser E-Mail. Bitte melden Sie sich an.",
|
|
116
|
+
"emailMismatch": "Diese Einladung wurde an eine andere E-Mail-Adresse gesendet.",
|
|
117
|
+
"invitationExpired": "Diese Einladung ist abgelaufen. Bitte fordern Sie eine neue an.",
|
|
118
|
+
"invitationNotFound": "Ungueltige Einladung. Bitte fordern Sie eine neue an.",
|
|
119
|
+
"failedToCreate": "Fehler beim Erstellen des Kontos",
|
|
120
|
+
"googleFailed": "Registrierung mit Google fehlgeschlagen",
|
|
121
|
+
"failedToResend": "Fehler beim erneuten Senden der Bestaetigungs-E-Mail"
|
|
75
122
|
}
|
|
76
123
|
},
|
|
77
124
|
"forgotPassword": {
|