hazo_auth 10.22.2 → 10.23.2
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/cli-src/lib/services/password_change_service.ts +4 -30
- package/cli-src/lib/utils/password_validator.ts +20 -12
- package/dist/admin-issues/plugin.client.d.ts.map +1 -1
- package/dist/admin-issues/plugin.client.js +7 -5
- package/dist/admin-issues/plugin.server.d.ts.map +1 -1
- package/dist/admin-issues/plugin.server.js +29 -18
- package/dist/components/layouts/create_firm/hooks/use_create_firm_form.d.ts.map +1 -1
- package/dist/components/layouts/create_firm/hooks/use_create_firm_form.js +10 -8
- package/dist/components/layouts/create_firm/index.d.ts +1 -1
- package/dist/components/layouts/create_firm/index.d.ts.map +1 -1
- package/dist/components/layouts/create_firm/index.js +15 -1
- package/dist/components/layouts/dev_lock/index.d.ts +1 -1
- package/dist/components/layouts/dev_lock/index.d.ts.map +1 -1
- package/dist/components/layouts/dev_lock/index.js +6 -2
- package/dist/components/layouts/my_settings/components/password_change_dialog.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/password_change_dialog.js +5 -20
- package/dist/components/layouts/my_settings/components/profile_picture_display.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_display.js +3 -1
- package/dist/components/layouts/my_settings/components/set_password_section.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/set_password_section.js +7 -27
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts +3 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.js +45 -64
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +2 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +2 -2
- package/dist/components/layouts/scope_management/components/branding_editor.d.ts.map +1 -1
- package/dist/components/layouts/scope_management/components/branding_editor.js +16 -15
- package/dist/components/layouts/shared/components/profile_stamp.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/profile_stamp.js +7 -3
- package/dist/components/layouts/user_management/components/app_user_data_editor.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/app_user_data_editor.js +13 -12
- package/dist/components/layouts/user_management/components/roles_matrix.js +2 -2
- package/dist/components/layouts/user_management/components/user_signup_stats_cards.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/user_signup_stats_cards.js +11 -7
- package/dist/components/layouts/user_management/index.d.ts.map +1 -1
- package/dist/components/layouts/user_management/index.js +17 -17
- package/dist/components/otp/OTPRequestForm.js +1 -1
- package/dist/components/user_picker_select.d.ts +1 -1
- package/dist/components/user_picker_select.d.ts.map +1 -1
- package/dist/components/user_picker_select.js +6 -2
- package/dist/consent/cookie_consent_banner.d.ts.map +1 -1
- package/dist/consent/cookie_consent_banner.js +3 -1
- package/dist/consent/manage_modal.d.ts.map +1 -1
- package/dist/consent/manage_modal.js +3 -1
- package/dist/lib/services/password_change_service.d.ts.map +1 -1
- package/dist/lib/services/password_change_service.js +4 -26
- package/dist/lib/utils/password_validator.d.ts.map +1 -1
- package/dist/lib/utils/password_validator.js +17 -6
- package/dist/locales/en.json +193 -12
- package/dist/page_components/create_firm.d.ts.map +1 -1
- package/dist/page_components/create_firm.js +7 -4
- package/dist/page_components/my_settings.d.ts +1 -1
- package/dist/page_components/my_settings.d.ts.map +1 -1
- package/dist/page_components/my_settings.js +15 -1
- package/package.json +8 -8
|
@@ -5,8 +5,10 @@ import { useEffect, useRef } from "react";
|
|
|
5
5
|
import { useConsent } from "./use_consent.js";
|
|
6
6
|
import { ConsentManageModal } from "./manage_modal.js";
|
|
7
7
|
import { to_gtm_signals, gtm_default_payload } from "./gtm_mapping.js";
|
|
8
|
+
import { useAuthT } from "../contexts/hazo_auth_provider.js";
|
|
8
9
|
export function CookieConsentBanner({ enableGTM, gtmContainerId, onChange, position = "bottom", }) {
|
|
9
10
|
const { consent, set_consent, open_manager } = useConsent();
|
|
11
|
+
const t = useAuthT();
|
|
10
12
|
const gtm_default_pushed = useRef(false);
|
|
11
13
|
// Push consent_default to GTM on first mount (before user has consented)
|
|
12
14
|
useEffect(() => {
|
|
@@ -36,5 +38,5 @@ export function CookieConsentBanner({ enableGTM, gtmContainerId, onChange, posit
|
|
|
36
38
|
return _jsx(ConsentManageModal, {});
|
|
37
39
|
}
|
|
38
40
|
const positionClass = position === "top" ? "top-0" : "bottom-0";
|
|
39
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `fixed ${positionClass} left-0 right-0 z-40 bg-primary text-primary-foreground p-4 flex flex-wrap items-center gap-3 justify-between`, children: [_jsx("p", { className: "text-sm flex-1 min-w-[200px]", children: "
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: `fixed ${positionClass} left-0 right-0 z-40 bg-primary text-primary-foreground p-4 flex flex-wrap items-center gap-3 justify-between`, children: [_jsx("p", { className: "text-sm flex-1 min-w-[200px]", children: t("consent.banner_body") }), _jsxs("div", { className: "flex gap-2 flex-wrap", children: [_jsx("button", { onClick: () => set_consent({ functional: false, analytics: false, marketing: false }), className: "px-3 py-1.5 text-xs bg-primary-foreground/20 hover:bg-primary-foreground/30 rounded text-primary-foreground", children: t("consent.decline_all") }), _jsx("button", { onClick: () => open_manager(), className: "px-3 py-1.5 text-xs bg-primary-foreground/20 hover:bg-primary-foreground/30 rounded text-primary-foreground", children: t("consent.manage") }), _jsx("button", { onClick: () => set_consent({ functional: true, analytics: true, marketing: true }), className: "px-3 py-1.5 text-xs bg-primary-foreground rounded text-primary font-medium", children: t("consent.accept_all") })] })] }), _jsx(ConsentManageModal, {})] }));
|
|
40
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage_modal.d.ts","sourceRoot":"","sources":["../../src/consent/manage_modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manage_modal.d.ts","sourceRoot":"","sources":["../../src/consent/manage_modal.tsx"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,gCA2GjC"}
|
|
@@ -4,7 +4,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
6
6
|
import { useConsent } from "./use_consent.js";
|
|
7
|
+
import { useAuthT } from "../contexts/hazo_auth_provider.js";
|
|
7
8
|
export function ConsentManageModal() {
|
|
9
|
+
const t = useAuthT();
|
|
8
10
|
const { consent, set_consent } = useConsent();
|
|
9
11
|
const [open, setOpen] = useState(false);
|
|
10
12
|
const [local, setLocal] = useState({
|
|
@@ -29,5 +31,5 @@ export function ConsentManageModal() {
|
|
|
29
31
|
set_consent(Object.assign(Object.assign({}, local), { necessary: true, version: 1 }));
|
|
30
32
|
setOpen(false);
|
|
31
33
|
};
|
|
32
|
-
return (_jsx(Dialog.Root, { open: open, onOpenChange: setOpen, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 bg-black/50 z-50" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-background rounded-lg p-6 z-50 w-full max-w-md shadow-lg", children: [_jsx(Dialog.Title, { className: "text-lg font-semibold mb-4", children: "
|
|
34
|
+
return (_jsx(Dialog.Root, { open: open, onOpenChange: setOpen, children: _jsxs(Dialog.Portal, { children: [_jsx(Dialog.Overlay, { className: "fixed inset-0 bg-black/50 z-50" }), _jsxs(Dialog.Content, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-background rounded-lg p-6 z-50 w-full max-w-md shadow-lg", children: [_jsx(Dialog.Title, { className: "text-lg font-semibold mb-4", children: t("consent.preferences_title") }), _jsxs("div", { className: "flex items-center justify-between py-3 border-b", children: [_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("consent.category_necessary") }), _jsx("p", { className: "text-sm text-muted-foreground", children: t("consent.category_necessary_desc") })] }), _jsx("input", { type: "checkbox", checked: true, disabled: true, className: "h-4 w-4" })] }), _jsxs("div", { className: "flex items-center justify-between py-3 border-b", children: [_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("consent.category_functional") }), _jsx("p", { className: "text-sm text-muted-foreground", children: t("consent.category_functional_desc") })] }), _jsx("input", { type: "checkbox", checked: local.functional, onChange: (e) => setLocal((p) => (Object.assign(Object.assign({}, p), { functional: e.target.checked }))), className: "h-4 w-4" })] }), _jsxs("div", { className: "flex items-center justify-between py-3 border-b", children: [_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("consent.category_analytics") }), _jsx("p", { className: "text-sm text-muted-foreground", children: t("consent.category_analytics_desc") })] }), _jsx("input", { type: "checkbox", checked: local.analytics, onChange: (e) => setLocal((p) => (Object.assign(Object.assign({}, p), { analytics: e.target.checked }))), className: "h-4 w-4" })] }), _jsxs("div", { className: "flex items-center justify-between py-3", children: [_jsxs("div", { children: [_jsx("p", { className: "font-medium", children: t("consent.category_marketing") }), _jsx("p", { className: "text-sm text-muted-foreground", children: t("consent.category_marketing_desc") })] }), _jsx("input", { type: "checkbox", checked: local.marketing, onChange: (e) => setLocal((p) => (Object.assign(Object.assign({}, p), { marketing: e.target.checked }))), className: "h-4 w-4" })] }), _jsxs("div", { className: "mt-6 flex gap-3 justify-end", children: [_jsx("button", { className: "px-4 py-2 text-sm border rounded-md hover:bg-muted", onClick: () => setOpen(false), children: t("shared.cancel_button") }), _jsx("button", { className: "px-4 py-2 text-sm bg-primary text-primary-foreground rounded-md hover:opacity-90", onClick: save, children: t("consent.save_preferences") })] })] })] }) }));
|
|
33
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password_change_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/password_change_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"password_change_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/password_change_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AASvD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,oBAAoB,CAAC,CA4F/B"}
|
|
@@ -3,6 +3,7 @@ import argon2 from "argon2";
|
|
|
3
3
|
import { get_password_requirements_config } from "../password_requirements_config.server.js";
|
|
4
4
|
import { send_template_email } from "./email_service.js";
|
|
5
5
|
import { create_app_logger } from "../app_logger.js";
|
|
6
|
+
import { validate_password } from "../utils/password_validator.js";
|
|
6
7
|
// section: helpers
|
|
7
8
|
/**
|
|
8
9
|
* Changes a user's password
|
|
@@ -50,34 +51,11 @@ export async function change_password(adapter, user_id, data) {
|
|
|
50
51
|
// Get password requirements from config
|
|
51
52
|
const password_requirements = get_password_requirements_config();
|
|
52
53
|
// Validate new password
|
|
53
|
-
|
|
54
|
+
const password_validation = validate_password(new_password, password_requirements);
|
|
55
|
+
if (!password_validation.valid) {
|
|
54
56
|
return {
|
|
55
57
|
success: false,
|
|
56
|
-
error:
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
if (password_requirements.require_uppercase && !/[A-Z]/.test(new_password)) {
|
|
60
|
-
return {
|
|
61
|
-
success: false,
|
|
62
|
-
error: "Password must contain at least one uppercase letter",
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
if (password_requirements.require_lowercase && !/[a-z]/.test(new_password)) {
|
|
66
|
-
return {
|
|
67
|
-
success: false,
|
|
68
|
-
error: "Password must contain at least one lowercase letter",
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
if (password_requirements.require_number && !/[0-9]/.test(new_password)) {
|
|
72
|
-
return {
|
|
73
|
-
success: false,
|
|
74
|
-
error: "Password must contain at least one number",
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
if (password_requirements.require_special && !/[^A-Za-z0-9]/.test(new_password)) {
|
|
78
|
-
return {
|
|
79
|
-
success: false,
|
|
80
|
-
error: "Password must contain at least one special character",
|
|
58
|
+
error: password_validation.errors[0],
|
|
81
59
|
};
|
|
82
60
|
}
|
|
83
61
|
// Hash the new password
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password_validator.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/password_validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"password_validator.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/password_validator.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,0BAA0B,GACvC,wBAAwB,CA0C1B"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
// file_description: server-side password validation utility
|
|
2
|
+
//
|
|
3
|
+
// Message strings are sourced directly from `../../locales/en.json` (single
|
|
4
|
+
// source of truth, shared with the client-side `validatePassword()` in
|
|
5
|
+
// `components/layouts/shared/utils/validation.ts`) rather than duplicated as
|
|
6
|
+
// hardcoded English literals — this mirrors the pattern already used by
|
|
7
|
+
// `src/strings/default_strings.ts` for importing locale JSON server-side.
|
|
8
|
+
// section: imports
|
|
9
|
+
import en from "../../locales/en.json" with { type: "json" };
|
|
10
|
+
// section: constants
|
|
11
|
+
const messages = en;
|
|
1
12
|
// section: helpers
|
|
2
13
|
/**
|
|
3
14
|
* Validates a password against specified requirements (server-side version)
|
|
@@ -10,24 +21,24 @@ export function validate_password(password, requirements) {
|
|
|
10
21
|
if (!password || password.trim().length === 0) {
|
|
11
22
|
return {
|
|
12
23
|
valid: false,
|
|
13
|
-
errors: ["
|
|
24
|
+
errors: [messages["validation.password_required"]],
|
|
14
25
|
};
|
|
15
26
|
}
|
|
16
27
|
if (password.length < requirements.minimum_length) {
|
|
17
|
-
errors.push(
|
|
28
|
+
errors.push(messages["validation.password_too_short"].replace("{{count}}", String(requirements.minimum_length)));
|
|
18
29
|
}
|
|
19
30
|
if (requirements.require_uppercase && !/[A-Z]/.test(password)) {
|
|
20
|
-
errors.push("
|
|
31
|
+
errors.push(messages["validation.password_missing_uppercase"]);
|
|
21
32
|
}
|
|
22
33
|
if (requirements.require_lowercase && !/[a-z]/.test(password)) {
|
|
23
|
-
errors.push("
|
|
34
|
+
errors.push(messages["validation.password_missing_lowercase"]);
|
|
24
35
|
}
|
|
25
36
|
if (requirements.require_number && !/\d/.test(password)) {
|
|
26
|
-
errors.push("
|
|
37
|
+
errors.push(messages["validation.password_missing_number"]);
|
|
27
38
|
}
|
|
28
39
|
if (requirements.require_special &&
|
|
29
40
|
!/[!@#$%^&*(),.?":{}|<>\-_+=\[\];'/\\]/.test(password)) {
|
|
30
|
-
errors.push("
|
|
41
|
+
errors.push(messages["validation.password_missing_special"]);
|
|
31
42
|
}
|
|
32
43
|
return {
|
|
33
44
|
valid: errors.length === 0,
|
package/dist/locales/en.json
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"validation.password_missing_lowercase": "Password must include at least one lowercase letter.",
|
|
6
6
|
"validation.password_missing_number": "Password must include at least one number.",
|
|
7
7
|
"validation.password_missing_special": "Password must include at least one special character.",
|
|
8
|
+
"validation.password_required": "Password is required",
|
|
8
9
|
"validation.passwords_do_not_match": "Passwords do not match",
|
|
9
10
|
"shared.field.email.label": "Email address",
|
|
10
11
|
"shared.field.email.placeholder": "Enter your email address",
|
|
@@ -264,11 +265,10 @@
|
|
|
264
265
|
"my_settings.name_field.placeholder_default": "Enter your full name",
|
|
265
266
|
"my_settings.name_field.aria_label_default": "Full name input field",
|
|
266
267
|
"my_settings.name_field.validation_empty_default": "Name cannot be empty",
|
|
267
|
-
"my_settings.email_field.label_default": "Email Address",
|
|
268
|
-
"my_settings.email_field.placeholder_default": "Enter your email address",
|
|
269
|
-
"my_settings.email_field.aria_label_default": "Email address input field",
|
|
270
268
|
"my_settings.email_field.validation_required_default": "Email is required",
|
|
271
269
|
"my_settings.email_field.validation_invalid_format_default": "Invalid email address format",
|
|
270
|
+
"my_settings.email_field.update_success_verify": "Email updated successfully. Please verify your new email address.",
|
|
271
|
+
"my_settings.email_field.update_success": "Email updated successfully",
|
|
272
272
|
"my_settings.password_change_dialog.title": "Change Password",
|
|
273
273
|
"my_settings.password_change_dialog.description": "Enter your current password and choose a new password.",
|
|
274
274
|
"my_settings.password_change_dialog.current_password_label_default": "Current password",
|
|
@@ -340,14 +340,7 @@
|
|
|
340
340
|
"my_settings.set_password.new_password_placeholder": "Enter your new password",
|
|
341
341
|
"my_settings.set_password.confirm_password_placeholder": "Confirm your new password",
|
|
342
342
|
"my_settings.set_password.submitting": "Setting password...",
|
|
343
|
-
"my_settings.set_password.validation.min_length": "Password must be at least {{length}} characters long",
|
|
344
|
-
"my_settings.set_password.validation.uppercase_item": "uppercase letter",
|
|
345
|
-
"my_settings.set_password.validation.lowercase_item": "lowercase letter",
|
|
346
|
-
"my_settings.set_password.validation.number_item": "number",
|
|
347
|
-
"my_settings.set_password.validation.special_item": "special character",
|
|
348
|
-
"my_settings.set_password.validation.missing_requirements": "Password must contain at least one: {{list}}",
|
|
349
343
|
"my_settings.set_password.validation.confirm_required": "Please confirm your new password",
|
|
350
|
-
"my_settings.set_password.validation.mismatch": "Passwords do not match",
|
|
351
344
|
"my_settings.set_password.error.default": "Failed to set password",
|
|
352
345
|
"my_settings.set_password.success": "Password set successfully! You can now sign in with your email and password.",
|
|
353
346
|
"my_settings.connected_accounts.heading": "Connected Accounts",
|
|
@@ -357,7 +350,6 @@
|
|
|
357
350
|
"my_settings.connected_accounts.not_connected": "Not connected",
|
|
358
351
|
"my_settings.connected_accounts.help_connected": "Your Google account is linked. You can sign in using either your password or Google.",
|
|
359
352
|
"my_settings.connected_accounts.help_not_connected": "Link your Google account to enable quick sign-in with Google.",
|
|
360
|
-
"otp.request.email_label": "Email address",
|
|
361
353
|
"otp.request.submit_label": "Send code",
|
|
362
354
|
"otp.request.pending_label": "Sending…",
|
|
363
355
|
"otp.request.aria_form": "Request sign-in code",
|
|
@@ -513,5 +505,194 @@
|
|
|
513
505
|
"my_settings.profile_picture_dialog.select_library_photo": "Please select a photo from the library",
|
|
514
506
|
"my_settings.profile_picture_dialog.tab_upload": "Upload",
|
|
515
507
|
"my_settings.profile_picture_dialog.tab_library": "Library",
|
|
516
|
-
"my_settings.profile_picture_dialog.tab_gravatar": "Gravatar"
|
|
508
|
+
"my_settings.profile_picture_dialog.tab_gravatar": "Gravatar",
|
|
509
|
+
"consent.banner_body": "We use cookies to improve your experience. By continuing, you agree to our use of cookies.",
|
|
510
|
+
"consent.decline_all": "Decline all",
|
|
511
|
+
"consent.manage": "Manage",
|
|
512
|
+
"consent.accept_all": "Accept all",
|
|
513
|
+
"consent.preferences_title": "Cookie preferences",
|
|
514
|
+
"consent.category_necessary": "Necessary",
|
|
515
|
+
"consent.category_necessary_desc": "Required for the site to function",
|
|
516
|
+
"consent.category_functional": "Functional",
|
|
517
|
+
"consent.category_functional_desc": "Remembers your preferences",
|
|
518
|
+
"consent.category_analytics": "Analytics",
|
|
519
|
+
"consent.category_analytics_desc": "Helps us understand how you use the site",
|
|
520
|
+
"consent.category_marketing": "Marketing",
|
|
521
|
+
"consent.category_marketing_desc": "Used for targeted advertising",
|
|
522
|
+
"consent.save_preferences": "Save preferences",
|
|
523
|
+
"admin_issues.error.role_id_required": "Please enter a role ID.",
|
|
524
|
+
"admin_issues.error.grant_failed": "Grant failed",
|
|
525
|
+
"admin_issues.error.reason_required": "Please provide a reason.",
|
|
526
|
+
"admin_issues.error.deny_failed": "Deny failed",
|
|
527
|
+
"admin_issues.needs_label": "Needs: ",
|
|
528
|
+
"admin_issues.tried_to_label": "Tried to: ",
|
|
529
|
+
"admin_issues.from_label": "From: ",
|
|
530
|
+
"admin_issues.occurred_count": "Occurred {{count}}× (first: {{date}})",
|
|
531
|
+
"admin_issues.grant_button": "Grant",
|
|
532
|
+
"admin_issues.deny_button": "Deny",
|
|
533
|
+
"admin_issues.grant_form_heading": "Grant access — enter the role ID to assign:",
|
|
534
|
+
"admin_issues.role_id_placeholder": "Role ID (UUID)",
|
|
535
|
+
"admin_issues.granting": "Granting…",
|
|
536
|
+
"admin_issues.confirm_grant": "Confirm Grant",
|
|
537
|
+
"admin_issues.deny_form_heading": "Deny request — provide a reason:",
|
|
538
|
+
"admin_issues.deny_reason_placeholder": "Reason for denial",
|
|
539
|
+
"admin_issues.denying": "Denying…",
|
|
540
|
+
"admin_issues.confirm_deny": "Confirm Deny",
|
|
541
|
+
"admin_issues.resolution_granted": "✓ Granted",
|
|
542
|
+
"admin_issues.resolution_denied": "✗ Denied",
|
|
543
|
+
"branding.toast.load_failed": "Failed to load branding",
|
|
544
|
+
"branding.toast.upload_failed": "Failed to upload logo",
|
|
545
|
+
"branding.toast.upload_success": "Logo uploaded successfully",
|
|
546
|
+
"branding.toast.invalid_primary_color": "Invalid primary color format (use #RRGGBB)",
|
|
547
|
+
"branding.toast.invalid_secondary_color": "Invalid secondary color format (use #RRGGBB)",
|
|
548
|
+
"branding.toast.save_success": "Branding saved successfully",
|
|
549
|
+
"branding.toast.save_failed": "Failed to save branding",
|
|
550
|
+
"branding.toast.clear_success": "Branding cleared",
|
|
551
|
+
"branding.toast.clear_failed": "Failed to clear branding",
|
|
552
|
+
"branding.dialog_title": "Firm Branding",
|
|
553
|
+
"branding.dialog_description": "Customize branding for \"{{scopeName}}\"",
|
|
554
|
+
"branding.logo_label": "Logo",
|
|
555
|
+
"branding.upload_logo_button": "Upload Logo",
|
|
556
|
+
"branding.uploading": "Uploading...",
|
|
557
|
+
"branding.remove_button": "Remove",
|
|
558
|
+
"branding.logo_hint": "PNG, JPG, SVG or WebP. Max 500KB.",
|
|
559
|
+
"branding.primary_color_label": "Primary Color",
|
|
560
|
+
"branding.secondary_color_label": "Secondary Color",
|
|
561
|
+
"branding.tagline_label": "Tagline",
|
|
562
|
+
"branding.tagline_placeholder": "Your trusted partner",
|
|
563
|
+
"branding.tagline_hint": "A short company tagline (max 200 characters)",
|
|
564
|
+
"branding.app_title_label": "App Title",
|
|
565
|
+
"branding.app_title_placeholder": "Acme Portal",
|
|
566
|
+
"branding.app_title_hint": "Title shown in the app chrome (browser tab, header)",
|
|
567
|
+
"branding.footer_label": "Footer",
|
|
568
|
+
"branding.public_footer_copyright_label": "Public Footer Copyright",
|
|
569
|
+
"branding.footer_copyright_placeholder": "© 2026 Acme Inc.",
|
|
570
|
+
"branding.public_footer_links_label": "Public Footer Links",
|
|
571
|
+
"branding.link_label_placeholder": "Label",
|
|
572
|
+
"branding.link_href_placeholder": "/privacy",
|
|
573
|
+
"branding.add_link_button": "Add Link",
|
|
574
|
+
"branding.app_footer_copyright_label": "App Footer Copyright",
|
|
575
|
+
"branding.preview_label": "Preview",
|
|
576
|
+
"branding.clear_all_button": "Clear All",
|
|
577
|
+
"branding.saving": "Saving...",
|
|
578
|
+
"app_user_data.heading": "App User Data",
|
|
579
|
+
"app_user_data.edit_button": "Edit",
|
|
580
|
+
"app_user_data.clear_button": "Clear",
|
|
581
|
+
"app_user_data.empty_state": "No app user data",
|
|
582
|
+
"app_user_data.boolean_yes": "Yes",
|
|
583
|
+
"app_user_data.boolean_no": "No",
|
|
584
|
+
"app_user_data.toast.save_success": "App user data saved",
|
|
585
|
+
"app_user_data.toast.save_failed": "Failed to save",
|
|
586
|
+
"app_user_data.toast.clear_success": "App user data cleared",
|
|
587
|
+
"app_user_data.toast.clear_failed": "Failed to clear",
|
|
588
|
+
"app_user_data.clear_dialog.title": "Clear App User Data?",
|
|
589
|
+
"app_user_data.clear_dialog.description": "This will permanently delete all app user data for this user. This action cannot be undone.",
|
|
590
|
+
"app_user_data.clear_dialog.confirm": "Clear Data",
|
|
591
|
+
"app_user_data.clear_dialog.confirming": "Clearing...",
|
|
592
|
+
"user_management.signup_stats.vs_previous": "vs. previous equal period",
|
|
593
|
+
"user_management.signup_stats.prev_count": "prev {{count}}",
|
|
594
|
+
"user_management.signup_stats.total_users": "total users",
|
|
595
|
+
"user_management.signup_stats.ytd_title": "Signups by month (YTD)",
|
|
596
|
+
"user_management.signup_stats.ytd_aria": "Year-to-date signups by month: {{list}}",
|
|
597
|
+
"user_management.signup_stats.tooltip_suffix": "signups",
|
|
598
|
+
"branding.logo_alt": "Firm logo",
|
|
599
|
+
"branding.pick_color_title": "Pick color",
|
|
600
|
+
"branding.logo_preview_alt": "Logo preview",
|
|
601
|
+
"my_settings.toast.name_success": "Name updated successfully",
|
|
602
|
+
"my_settings.toast.name_error": "Failed to update name",
|
|
603
|
+
"my_settings.toast.email_success": "Email updated successfully",
|
|
604
|
+
"my_settings.toast.email_error": "Failed to update email",
|
|
605
|
+
"my_settings.toast.language_success": "Language preference updated",
|
|
606
|
+
"my_settings.toast.language_error": "Failed to update language preference",
|
|
607
|
+
"my_settings.toast.password_success": "Password changed successfully",
|
|
608
|
+
"my_settings.toast.password_error": "Failed to change password",
|
|
609
|
+
"my_settings.toast.profile_picture_success": "Profile picture updated successfully",
|
|
610
|
+
"my_settings.toast.profile_picture_error": "Failed to update profile picture",
|
|
611
|
+
"my_settings.toast.profile_picture_removed": "Profile picture removed successfully",
|
|
612
|
+
"my_settings.toast.profile_picture_remove_error": "Failed to remove profile picture",
|
|
613
|
+
"user_management.table.photo": "Photo",
|
|
614
|
+
"user_management.table.id": "ID",
|
|
615
|
+
"user_management.table.name": "Name",
|
|
616
|
+
"user_management.table.email": "Email",
|
|
617
|
+
"user_management.table.email_verified": "Email Verified",
|
|
618
|
+
"user_management.table.active": "Active",
|
|
619
|
+
"user_management.table.last_logon": "Last Logon",
|
|
620
|
+
"user_management.table.created_at": "Created At",
|
|
621
|
+
"user_management.table.user_type": "User Type",
|
|
622
|
+
"user_management.table.actions": "Actions",
|
|
623
|
+
"user_management.table.permission_name": "Permission Name",
|
|
624
|
+
"user_management.table.description": "Description",
|
|
625
|
+
"user_management.table.source": "Source",
|
|
626
|
+
"user_management.action.assign_roles": "Assign Roles",
|
|
627
|
+
"user_management.action.deactivate": "Deactivate",
|
|
628
|
+
"user_management.action.reset_password": "Reset Password",
|
|
629
|
+
"user_management.action.delete_user": "Delete User",
|
|
630
|
+
"user_management.detail.title": "User Details",
|
|
631
|
+
"user_management.detail.profile_picture_label": "Profile Picture",
|
|
632
|
+
"user_management.detail.custom_photo": "Custom photo",
|
|
633
|
+
"user_management.detail.no_profile_picture": "No profile picture",
|
|
634
|
+
"user_management.detail.source_prefix": "Source",
|
|
635
|
+
"user_management.detail.source_not_available": "N/A",
|
|
636
|
+
"user_management.detail.select_user_type": "Select user type",
|
|
637
|
+
"user_management.detail.none": "None",
|
|
638
|
+
"user_management.permissions.migrate_button": "Migrate config to database",
|
|
639
|
+
"user_management.permissions.migrating": "Migrating...",
|
|
640
|
+
"user_management.permissions.source_db": "Database",
|
|
641
|
+
"user_management.permissions.source_config": "Config",
|
|
642
|
+
"user_management.legal.heading": "Legal Documents",
|
|
643
|
+
"user_management.legal.publish_description": "Publish a new required version to prompt existing users to re-accept on next login.",
|
|
644
|
+
"user_management.legal.no_docs_configured": "No legal docs configured. Add {{section}} to your INI config.",
|
|
645
|
+
"user_management.legal.up_to_date": "Up to date",
|
|
646
|
+
"user_management.legal.file_changed": "File changed",
|
|
647
|
+
"user_management.legal.publish_button": "Publish current version",
|
|
648
|
+
"user_management.legal.publishing": "Publishing…",
|
|
649
|
+
"user_management.status.active": "Active",
|
|
650
|
+
"user_management.status.inactive": "Inactive",
|
|
651
|
+
"user_management.status.yes": "Yes",
|
|
652
|
+
"user_management.status.no": "No",
|
|
653
|
+
"user_management.status.no_users": "No users found.",
|
|
654
|
+
"user_management.status.never": "Never published",
|
|
655
|
+
"user_management.status.close": "Close",
|
|
656
|
+
"user_management.status.no_permissions": "No permissions found.",
|
|
657
|
+
"shared.avatar.alt_named": "Profile picture of {{name}}",
|
|
658
|
+
"shared.avatar.alt_default": "Profile picture",
|
|
659
|
+
"shared.avatar.loading_profile": "Loading profile",
|
|
660
|
+
"shared.avatar.view_profile_named": "View profile information for {{name}}",
|
|
661
|
+
"shared.avatar.view_profile_default": "View profile information for user",
|
|
662
|
+
"create_firm.validation.firm_name_required": "Firm name is required",
|
|
663
|
+
"create_firm.validation.firm_name_max_length": "Firm name must be 100 characters or less",
|
|
664
|
+
"create_firm.validation.org_structure_required": "Organisation structure is required",
|
|
665
|
+
"create_firm.validation.org_structure_max_length": "Organisation structure must be 50 characters or less",
|
|
666
|
+
"create_firm.error.create_failed": "Failed to create firm",
|
|
667
|
+
"create_firm.error.unexpected": "An unexpected error occurred. Please try again.",
|
|
668
|
+
"create_firm.keyword_lower": "firm",
|
|
669
|
+
"create_firm.banner_body": "{{verb}} your {{keyword_lower}} to start using the application. You'll become the administrator of your {{keyword_lower}} and can invite team members later.",
|
|
670
|
+
"dev_lock.limited_access": "Limited Access",
|
|
671
|
+
"dev_lock.password_placeholder": "Enter access password",
|
|
672
|
+
"dev_lock.unlock_button": "Unlock",
|
|
673
|
+
"dev_lock.incorrect_password": "Incorrect password",
|
|
674
|
+
"dev_lock.logo_alt": "Application logo",
|
|
675
|
+
"user_picker.placeholder": "Select user",
|
|
676
|
+
"user_picker.unassigned": "Unassigned",
|
|
677
|
+
"user_picker.aria_label": "Select user",
|
|
678
|
+
"register.error.failed_retry_message": "Registration failed. Please try again.",
|
|
679
|
+
"admin_issues.server.type_label": "Permission Access Request",
|
|
680
|
+
"admin_issues.server.default_action_label": "Perform action",
|
|
681
|
+
"admin_issues.server.descriptor_title": "Access request: {{permissions}}",
|
|
682
|
+
"admin_issues.server.descriptor_summary": "A user attempted to \"{{action}}\" but lacks the required permission{{plural}}: {{permissions}}.",
|
|
683
|
+
"admin_issues.server.action_grant_label": "Grant Access",
|
|
684
|
+
"admin_issues.server.action_deny_label": "Deny Request",
|
|
685
|
+
"admin_issues.server.error_no_missing_permission": "No missing permission specified",
|
|
686
|
+
"admin_issues.server.error_no_role_grants_permission": "No role in scope {{scope_id}} grants the permission \"{{permission}}\". Please create a role or use role management.",
|
|
687
|
+
"admin_issues.server.error_select_role": "Please select a role to grant.",
|
|
688
|
+
"admin_issues.server.error_assign_scope_failed": "Failed to assign scope",
|
|
689
|
+
"admin_issues.server.success_granted": "Access granted successfully.",
|
|
690
|
+
"admin_issues.server.error_reason_required": "A reason is required to deny the request.",
|
|
691
|
+
"admin_issues.server.success_denied": "Request denied.",
|
|
692
|
+
"admin_issues.server.notice_grant_subject": "Access Request Approved",
|
|
693
|
+
"admin_issues.server.notice_grant_body": "Your request for access to \"{{permissions}}\" has been approved.",
|
|
694
|
+
"admin_issues.server.notice_grant_return_hint": " You can now return to the page where you needed access.",
|
|
695
|
+
"admin_issues.server.notice_deny_subject": "Access Request Denied",
|
|
696
|
+
"admin_issues.server.notice_deny_body": "Your request for access to \"{{permissions}}\" was denied. Reason: {{reason}}",
|
|
697
|
+
"admin_issues.server.notice_no_reason": "No reason provided."
|
|
517
698
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_firm.d.ts","sourceRoot":"","sources":["../../src/page_components/create_firm.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"create_firm.d.ts","sourceRoot":"","sources":["../../src/page_components/create_firm.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAerB,MAAM,MAAM,mBAAmB,GAAG;IAChC,iCAAiC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AA8CF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,aAAa,EAAE,GAAE,mBAAwB,+BA0BjF;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -6,6 +6,9 @@ import "server-only";
|
|
|
6
6
|
import CreateFirmLayout from "../components/layouts/create_firm/index.js";
|
|
7
7
|
import { AuthPageShell } from "../components/layouts/shared/components/auth_page_shell.js";
|
|
8
8
|
import { get_config_value, get_config_boolean, } from "../lib/config/config_loader.server.js";
|
|
9
|
+
import { createPackageT } from "hazo_core/i18n";
|
|
10
|
+
import en from "../locales/en.json" with { type: "json" };
|
|
11
|
+
const t = createPackageT("hazo_auth", en);
|
|
9
12
|
// section: config_loader
|
|
10
13
|
const CREATE_FIRM_SECTION = "hazo_auth__create_firm";
|
|
11
14
|
// Reads an optional label override: returns the configured string, or undefined
|
|
@@ -18,16 +21,16 @@ function get_create_firm_config() {
|
|
|
18
21
|
// Configurable entity keyword + action verb. These drive every default
|
|
19
22
|
// label in the layout, so a consumer can re-brand the whole page (e.g.
|
|
20
23
|
// "Business"/"Setup") from three config values.
|
|
21
|
-
keyword: get_config_value(CREATE_FIRM_SECTION, "keyword", "
|
|
22
|
-
keyword_lower: get_config_value(CREATE_FIRM_SECTION, "keyword_lower", "
|
|
23
|
-
verb: get_config_value(CREATE_FIRM_SECTION, "verb", "
|
|
24
|
+
keyword: get_config_value(CREATE_FIRM_SECTION, "keyword", t("create_firm.keyword")),
|
|
25
|
+
keyword_lower: get_config_value(CREATE_FIRM_SECTION, "keyword_lower", t("create_firm.keyword_lower")),
|
|
26
|
+
verb: get_config_value(CREATE_FIRM_SECTION, "verb", t("create_firm.verb")),
|
|
24
27
|
image_src: get_config_value(CREATE_FIRM_SECTION, "image_src", "/api/hazo_auth/assets/register_default.jpg"),
|
|
25
28
|
// Explicit per-label overrides (undefined → keyword-derived default).
|
|
26
29
|
heading: get_optional_config_value("heading"),
|
|
27
30
|
sub_heading: get_optional_config_value("sub_heading"),
|
|
28
31
|
firm_name_label: get_optional_config_value("firm_name_label"),
|
|
29
32
|
org_structure_label: get_optional_config_value("org_structure_label"),
|
|
30
|
-
org_structure_default: get_config_value(CREATE_FIRM_SECTION, "org_structure_default", "
|
|
33
|
+
org_structure_default: get_config_value(CREATE_FIRM_SECTION, "org_structure_default", t("create_firm.default_org_structure")),
|
|
31
34
|
show_org_structure: get_config_boolean(CREATE_FIRM_SECTION, "show_org_structure", true),
|
|
32
35
|
submit_button_label: get_optional_config_value("submit_button_label"),
|
|
33
36
|
success_message: get_optional_config_value("success_message"),
|
|
@@ -64,6 +64,6 @@ export type MySettingsPageProps = {
|
|
|
64
64
|
* @param props - Optional configuration overrides
|
|
65
65
|
* @returns My settings page component
|
|
66
66
|
*/
|
|
67
|
-
export declare function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading, subHeading, profilePhotoLabel, profilePhotoRecommendation, uploadPhotoButtonLabel, removePhotoButtonLabel, profileInformationLabel, passwordLabel, currentPasswordLabel, newPasswordLabel, confirmPasswordLabel, savePasswordButtonLabel, unauthorizedMessage, loginButtonLabel, loginPath, enableAccountDeletion, messages, uiSizes, fileTypes, }?: MySettingsPageProps): import("react").JSX.Element;
|
|
67
|
+
export declare function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading: headingProp, subHeading: subHeadingProp, profilePhotoLabel: profilePhotoLabelProp, profilePhotoRecommendation, uploadPhotoButtonLabel: uploadPhotoButtonLabelProp, removePhotoButtonLabel: removePhotoButtonLabelProp, profileInformationLabel: profileInformationLabelProp, passwordLabel: passwordLabelProp, currentPasswordLabel: currentPasswordLabelProp, newPasswordLabel: newPasswordLabelProp, confirmPasswordLabel: confirmPasswordLabelProp, savePasswordButtonLabel, unauthorizedMessage: unauthorizedMessageProp, loginButtonLabel: loginButtonLabelProp, loginPath, enableAccountDeletion, messages, uiSizes, fileTypes, }?: MySettingsPageProps): import("react").JSX.Element;
|
|
68
68
|
export default MySettingsPage;
|
|
69
69
|
//# sourceMappingURL=my_settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/page_components/my_settings.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/page_components/my_settings.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AA4B3G,QAAA,MAAM,gBAAgB;;;;;CAKrB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;CASrB,CAAC;AAQF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE;QACX,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,oBAAoB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE;QACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,4BAA4B,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;QACtD,4BAA4B,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC3C,SAAS,CAAC,EAAE;QACV,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;QACpC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;KACrC,CAAC;CACH,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,EAC7B,UAAU,EACV,oBAAoB,EACpB,cAAc,EACd,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,cAAc,EAC1B,iBAAiB,EAAE,qBAAqB,EACxC,0BAAiF,EACjF,sBAAsB,EAAE,0BAA0B,EAClD,sBAAsB,EAAE,0BAA0B,EAClD,uBAAuB,EAAE,2BAA2B,EACpD,aAAa,EAAE,iBAAiB,EAChC,oBAAoB,EAAE,wBAAwB,EAC9C,gBAAgB,EAAE,oBAAoB,EACtC,oBAAoB,EAAE,wBAAwB,EAC9C,uBAA2C,EAC3C,mBAAmB,EAAE,uBAAuB,EAC5C,gBAAgB,EAAE,oBAAoB,EACtC,SAA8B,EAC9B,qBAA6B,EAC7B,QAAQ,EACR,OAAO,EACP,SAAS,GACV,GAAE,mBAAwB,+BAyE1B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
// section: imports
|
|
6
6
|
import my_settings_layout from "../components/layouts/my_settings/index.js";
|
|
7
|
+
import { useAuthT } from "../contexts/hazo_auth_provider.js";
|
|
7
8
|
// section: default_configuration
|
|
8
9
|
const DEFAULT_USER_FIELDS = {
|
|
9
10
|
show_name_field: true,
|
|
@@ -53,7 +54,20 @@ const DEFAULT_FILE_TYPES = {
|
|
|
53
54
|
* @param props - Optional configuration overrides
|
|
54
55
|
* @returns My settings page component
|
|
55
56
|
*/
|
|
56
|
-
export function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading
|
|
57
|
+
export function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading: headingProp, subHeading: subHeadingProp, profilePhotoLabel: profilePhotoLabelProp, profilePhotoRecommendation = "Recommended: Square image, at least 200x200 pixels", uploadPhotoButtonLabel: uploadPhotoButtonLabelProp, removePhotoButtonLabel: removePhotoButtonLabelProp, profileInformationLabel: profileInformationLabelProp, passwordLabel: passwordLabelProp, currentPasswordLabel: currentPasswordLabelProp, newPasswordLabel: newPasswordLabelProp, confirmPasswordLabel: confirmPasswordLabelProp, savePasswordButtonLabel = "Update Password", unauthorizedMessage: unauthorizedMessageProp, loginButtonLabel: loginButtonLabelProp, loginPath = "/hazo_auth/login", enableAccountDeletion = false, messages, uiSizes, fileTypes, } = {}) {
|
|
58
|
+
const t = useAuthT();
|
|
59
|
+
const heading = headingProp !== null && headingProp !== void 0 ? headingProp : t("my_settings.page_title");
|
|
60
|
+
const subHeading = subHeadingProp !== null && subHeadingProp !== void 0 ? subHeadingProp : t("my_settings.sub_heading_default");
|
|
61
|
+
const profilePhotoLabel = profilePhotoLabelProp !== null && profilePhotoLabelProp !== void 0 ? profilePhotoLabelProp : t("my_settings.profile_photo_label_default");
|
|
62
|
+
const uploadPhotoButtonLabel = uploadPhotoButtonLabelProp !== null && uploadPhotoButtonLabelProp !== void 0 ? uploadPhotoButtonLabelProp : t("my_settings.upload_tab.upload_photo_label");
|
|
63
|
+
const removePhotoButtonLabel = removePhotoButtonLabelProp !== null && removePhotoButtonLabelProp !== void 0 ? removePhotoButtonLabelProp : t("my_settings.remove_photo_button_default");
|
|
64
|
+
const profileInformationLabel = profileInformationLabelProp !== null && profileInformationLabelProp !== void 0 ? profileInformationLabelProp : t("my_settings.profile_information_label_default");
|
|
65
|
+
const passwordLabel = passwordLabelProp !== null && passwordLabelProp !== void 0 ? passwordLabelProp : t("my_settings.password_label_default");
|
|
66
|
+
const currentPasswordLabel = currentPasswordLabelProp !== null && currentPasswordLabelProp !== void 0 ? currentPasswordLabelProp : t("my_settings.current_password_label_default");
|
|
67
|
+
const newPasswordLabel = newPasswordLabelProp !== null && newPasswordLabelProp !== void 0 ? newPasswordLabelProp : t("my_settings.set_password.new_password_label");
|
|
68
|
+
const confirmPasswordLabel = confirmPasswordLabelProp !== null && confirmPasswordLabelProp !== void 0 ? confirmPasswordLabelProp : t("my_settings.set_password.confirm_password_label");
|
|
69
|
+
const unauthorizedMessage = unauthorizedMessageProp !== null && unauthorizedMessageProp !== void 0 ? unauthorizedMessageProp : t("shared.guard.unauthorized_message_default");
|
|
70
|
+
const loginButtonLabel = loginButtonLabelProp !== null && loginButtonLabelProp !== void 0 ? loginButtonLabelProp : t("shared.guard.login_button_default");
|
|
57
71
|
// Merge provided props with defaults
|
|
58
72
|
const mergedUserFields = Object.assign(Object.assign({}, DEFAULT_USER_FIELDS), userFields);
|
|
59
73
|
const mergedPasswordRequirements = Object.assign(Object.assign({}, DEFAULT_PASSWORD_REQUIREMENTS), passwordRequirements);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_auth",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.23.2",
|
|
4
4
|
"description": "Zero-config authentication UI components for Next.js with RBAC, OAuth, scope-based multi-tenancy, and invitations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -276,14 +276,14 @@
|
|
|
276
276
|
},
|
|
277
277
|
"peerDependencies": {
|
|
278
278
|
"hazo_config": "^2.6.0",
|
|
279
|
-
"hazo_connect": "^4.3.
|
|
279
|
+
"hazo_connect": "^4.3.1",
|
|
280
280
|
"hazo_core": "^2.4.0",
|
|
281
|
-
"hazo_i18n": "^0.
|
|
281
|
+
"hazo_i18n": "^0.7.2",
|
|
282
282
|
"hazo_logs": "^2.3.0",
|
|
283
|
-
"hazo_notify": "^6.
|
|
283
|
+
"hazo_notify": "^6.6.0",
|
|
284
284
|
"hazo_secure": "^1.8.1",
|
|
285
285
|
"hazo_theme": "^1.4.0",
|
|
286
|
-
"hazo_ui": "^6.12.
|
|
286
|
+
"hazo_ui": "^6.12.5",
|
|
287
287
|
"next": "^14.0.0 || ^15.0.0 || ^16.0.0",
|
|
288
288
|
"next-auth": "^4.24.0",
|
|
289
289
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -363,12 +363,12 @@
|
|
|
363
363
|
"eslint-plugin-storybook": "^10.0.6",
|
|
364
364
|
"hazo_api": "^2.8.0",
|
|
365
365
|
"hazo_config": "^2.6.0",
|
|
366
|
-
"hazo_connect": "^4.3.
|
|
366
|
+
"hazo_connect": "^4.3.1",
|
|
367
367
|
"hazo_core": "^2.4.0",
|
|
368
368
|
"hazo_logs": "^2.3.0",
|
|
369
|
-
"hazo_notify": "^6.
|
|
369
|
+
"hazo_notify": "^6.6.0",
|
|
370
370
|
"hazo_theme": "^1.4.0",
|
|
371
|
-
"hazo_ui": "^6.12.
|
|
371
|
+
"hazo_ui": "^6.12.5",
|
|
372
372
|
"input-otp": "^1.4.0",
|
|
373
373
|
"jest": "^30.2.0",
|
|
374
374
|
"jest-environment-jsdom": "^30.0.0",
|