hazo_auth 10.23.1 → 10.23.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 (44) hide show
  1. package/cli-src/lib/services/email_service.ts +5 -1
  2. package/cli-src/lib/services/email_verification_service.ts +1 -1
  3. package/cli-src/lib/services/otp_service.ts +1 -1
  4. package/cli-src/lib/services/password_change_service.ts +2 -2
  5. package/cli-src/lib/services/password_reset_service.ts +2 -2
  6. package/cli-src/lib/services/registration_service.ts +1 -1
  7. package/dist/admin-issues/plugin.server.d.ts.map +1 -1
  8. package/dist/admin-issues/plugin.server.js +29 -18
  9. package/dist/components/layouts/create_firm/hooks/use_create_firm_form.d.ts.map +1 -1
  10. package/dist/components/layouts/create_firm/hooks/use_create_firm_form.js +10 -8
  11. package/dist/components/layouts/create_firm/index.d.ts +1 -1
  12. package/dist/components/layouts/create_firm/index.d.ts.map +1 -1
  13. package/dist/components/layouts/create_firm/index.js +15 -1
  14. package/dist/components/layouts/dev_lock/index.d.ts +1 -1
  15. package/dist/components/layouts/dev_lock/index.d.ts.map +1 -1
  16. package/dist/components/layouts/dev_lock/index.js +6 -2
  17. package/dist/components/layouts/my_settings/components/profile_picture_display.d.ts.map +1 -1
  18. package/dist/components/layouts/my_settings/components/profile_picture_display.js +3 -1
  19. package/dist/components/layouts/my_settings/hooks/use_my_settings.js +20 -20
  20. package/dist/components/layouts/register/hooks/use_register_form.js +2 -2
  21. package/dist/components/layouts/shared/components/profile_stamp.d.ts.map +1 -1
  22. package/dist/components/layouts/shared/components/profile_stamp.js +7 -3
  23. package/dist/components/layouts/user_management/components/roles_matrix.js +2 -2
  24. package/dist/components/layouts/user_management/index.d.ts.map +1 -1
  25. package/dist/components/layouts/user_management/index.js +17 -17
  26. package/dist/components/user_picker_select.d.ts +1 -1
  27. package/dist/components/user_picker_select.d.ts.map +1 -1
  28. package/dist/components/user_picker_select.js +6 -2
  29. package/dist/lib/services/email_service.d.ts +3 -1
  30. package/dist/lib/services/email_service.d.ts.map +1 -1
  31. package/dist/lib/services/email_service.js +6 -9
  32. package/dist/lib/services/email_verification_service.js +1 -1
  33. package/dist/lib/services/otp_service.js +1 -1
  34. package/dist/lib/services/password_change_service.js +1 -1
  35. package/dist/lib/services/password_reset_service.js +2 -2
  36. package/dist/lib/services/registration_service.js +1 -1
  37. package/dist/locales/en.json +98 -1
  38. package/dist/page_components/create_firm.d.ts.map +1 -1
  39. package/dist/page_components/create_firm.js +7 -4
  40. package/dist/page_components/my_settings.d.ts +1 -1
  41. package/dist/page_components/my_settings.d.ts.map +1 -1
  42. package/dist/page_components/my_settings.js +15 -1
  43. package/dist/server/routes/user_management_users.d.ts +1 -1
  44. package/package.json +6 -6
@@ -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", "Firm"),
22
- keyword_lower: get_config_value(CREATE_FIRM_SECTION, "keyword_lower", "firm"),
23
- verb: get_config_value(CREATE_FIRM_SECTION, "verb", "Create"),
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", "Headquarters"),
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;AA2B3G,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,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AgB,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 = "Account Settings", subHeading = "Manage your profile, password, and email preferences.", profilePhotoLabel = "Profile Photo", profilePhotoRecommendation = "Recommended: Square image, at least 200x200 pixels", uploadPhotoButtonLabel = "Upload Photo", removePhotoButtonLabel = "Remove", profileInformationLabel = "Profile Information", passwordLabel = "Password", currentPasswordLabel = "Current Password", newPasswordLabel = "New Password", confirmPasswordLabel = "Confirm Password", savePasswordButtonLabel = "Update Password", unauthorizedMessage = "You must be logged in to access this page.", loginButtonLabel = "Go to login", loginPath = "/hazo_auth/login", enableAccountDeletion = false, messages, uiSizes, fileTypes, } = {}) {
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);
@@ -26,7 +26,7 @@ export declare function GET(request: NextRequest): Promise<NextResponse<{
26
26
  profile_source: {} | null;
27
27
  user_type: string | null;
28
28
  app_user_data: Record<string, unknown> | null;
29
- legal_acceptance_status: "current" | "none" | "outdated";
29
+ legal_acceptance_status: "current" | "outdated" | "none";
30
30
  }[];
31
31
  }>>;
32
32
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_auth",
3
- "version": "10.23.1",
3
+ "version": "10.23.3",
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",
@@ -278,12 +278,12 @@
278
278
  "hazo_config": "^2.6.0",
279
279
  "hazo_connect": "^4.3.1",
280
280
  "hazo_core": "^2.4.0",
281
- "hazo_i18n": "^0.7.1",
281
+ "hazo_i18n": "^0.8.1",
282
282
  "hazo_logs": "^2.3.0",
283
- "hazo_notify": "^6.5.0",
283
+ "hazo_notify": "^6.6.1",
284
284
  "hazo_secure": "^1.8.1",
285
285
  "hazo_theme": "^1.4.0",
286
- "hazo_ui": "^6.12.4",
286
+ "hazo_ui": "^6.13.1",
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",
@@ -366,9 +366,9 @@
366
366
  "hazo_connect": "^4.3.1",
367
367
  "hazo_core": "^2.4.0",
368
368
  "hazo_logs": "^2.3.0",
369
- "hazo_notify": "^6.5.0",
369
+ "hazo_notify": "^6.6.1",
370
370
  "hazo_theme": "^1.4.0",
371
- "hazo_ui": "^6.12.4",
371
+ "hazo_ui": "^6.13.1",
372
372
  "input-otp": "^1.4.0",
373
373
  "jest": "^30.2.0",
374
374
  "jest-environment-jsdom": "^30.0.0",