nucleus-core-ts 0.9.887 → 0.9.888

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/.build-ok CHANGED
@@ -1 +1 @@
1
- 0.9.887
1
+ 0.9.888
@@ -69,7 +69,7 @@ export function ForgotPasswordForm({ labels, forgotPasswordAction, onBackToLogin
69
69
  store.setStep('success');
70
70
  },
71
71
  onErrorHandle: (err)=>{
72
- const errorMessage = err instanceof Error ? err.message : 'Failed to send reset email. Please try again.';
72
+ const errorMessage = err instanceof Error ? err.message : say.sendFailed;
73
73
  store.setError(errorMessage);
74
74
  shakeForm();
75
75
  }
@@ -19,5 +19,7 @@ export type ForgotPasswordLabels = {
19
19
  submit: string;
20
20
  /** Said when the box is empty. */
21
21
  emailRequired: string;
22
+ /** What a failed submit says — the only sentence a person sees when it goes wrong. */
23
+ sendFailed: string;
22
24
  };
23
25
  export declare const DEFAULT_FORGOT_PASSWORD_LABELS: ForgotPasswordLabels;
@@ -14,5 +14,6 @@
14
14
  backToLogin: 'Back to login',
15
15
  pageLabel: 'Forgot password page',
16
16
  submit: 'Send Reset Link',
17
- emailRequired: 'Please enter your email address'
17
+ emailRequired: 'Please enter your email address',
18
+ sendFailed: 'Failed to send reset email. Please try again.'
18
19
  };
@@ -165,7 +165,7 @@ export function ResetPasswordForm({ labels, token, resetPasswordAction, onBackTo
165
165
  store.setStep('success');
166
166
  },
167
167
  onErrorHandle: (err)=>{
168
- const errorMessage = err instanceof Error ? err.message : 'Failed to reset password. Please try again.';
168
+ const errorMessage = err instanceof Error ? err.message : say.resetFailed;
169
169
  store.setError(errorMessage);
170
170
  shakeForm();
171
171
  }
@@ -19,5 +19,7 @@ export type ResetPasswordLabels = {
19
19
  fillAllFields: string;
20
20
  passwordsDoNotMatch: string;
21
21
  requirementsNotMet: string;
22
+ /** What a failed submit says — the only sentence a person sees when it goes wrong. */
23
+ resetFailed: string;
22
24
  };
23
25
  export declare const DEFAULT_RESET_PASSWORD_LABELS: ResetPasswordLabels;
@@ -15,5 +15,6 @@
15
15
  ruleSpecial: 'One special character',
16
16
  fillAllFields: 'Please fill in all fields',
17
17
  passwordsDoNotMatch: 'Passwords do not match',
18
- requirementsNotMet: 'Password does not meet all requirements'
18
+ requirementsNotMet: 'Password does not meet all requirements',
19
+ resetFailed: 'Failed to reset password. Please try again.'
19
20
  };
@@ -23,7 +23,7 @@ export function SetPasswordPage({ logo, title = 'Set Password', subtitle = 'Ente
23
23
  const verifyToken = useEffectEvent((tokenValue)=>{
24
24
  if (!tokenValue) {
25
25
  store.setStep('error');
26
- store.setError('Invalid or missing token');
26
+ store.setError(say.invalidToken);
27
27
  return;
28
28
  }
29
29
  magicLinkVerifyAction.start({
@@ -142,7 +142,7 @@ export function SetPasswordPage({ logo, title = 'Set Password', subtitle = 'Ente
142
142
  }),
143
143
  /*#__PURE__*/ _jsx("p", {
144
144
  className: theme.states.error.subtitle,
145
- children: isInvite ? 'This invitation link is invalid or has expired.' : 'This link is invalid or has expired.'
145
+ children: isInvite ? say.invalidInviteBody : say.invalidLinkBody
146
146
  }),
147
147
  store.error && store.error !== 'Token verification failed' && /*#__PURE__*/ _jsx("p", {
148
148
  className: theme.states.error.errorMessage,
@@ -150,19 +150,19 @@ export function SetPasswordPage({ logo, title = 'Set Password', subtitle = 'Ente
150
150
  }),
151
151
  /*#__PURE__*/ _jsx("p", {
152
152
  className: theme.states.error.helpText,
153
- children: isInvite ? 'Please contact your administrator to request a new invitation.' : 'Please request a new link or contact support.'
153
+ children: isInvite ? say.invalidInviteHelp : say.invalidLinkHelp
154
154
  }),
155
155
  /*#__PURE__*/ _jsx("div", {
156
156
  className: theme.layout.buttonGroup,
157
157
  children: backToLoginHref ? /*#__PURE__*/ _jsx("a", {
158
158
  href: backToLoginHref,
159
159
  className: theme.states.error.buttonPrimary,
160
- children: "Go to Login"
160
+ children: say.goToLogin
161
161
  }) : /*#__PURE__*/ _jsx("button", {
162
162
  type: "button",
163
163
  onClick: onBackToLogin,
164
164
  className: theme.states.error.buttonPrimary,
165
- children: "Go to Login"
165
+ children: say.goToLogin
166
166
  })
167
167
  })
168
168
  ]
@@ -21,6 +21,18 @@ export type SetPasswordLabels = {
21
21
  passwordStrength: string;
22
22
  passwordRequirements: string;
23
23
  pageLabel: string;
24
+ /**
25
+ * The invalid-link screen. Its heading was translatable and the three
26
+ * sentences under it were not, so an invited employee whose link had expired
27
+ * met a Turkish title over an English explanation — on the one screen where
28
+ * they cannot do anything but read it and act.
29
+ */
30
+ invalidInviteBody: string;
31
+ invalidLinkBody: string;
32
+ invalidInviteHelp: string;
33
+ invalidLinkHelp: string;
34
+ goToLogin: string;
35
+ invalidToken: string;
24
36
  /** Said when something is wrong, at the moment it is wrong. */
25
37
  passwordRequired: string;
26
38
  passwordNeedsNumber: string;
@@ -20,6 +20,12 @@
20
20
  passwordStrength: 'Password strength',
21
21
  passwordRequirements: 'Password requirements',
22
22
  pageLabel: 'Set password page',
23
+ invalidInviteBody: 'This invitation link is invalid or has expired.',
24
+ invalidLinkBody: 'This link is invalid or has expired.',
25
+ invalidInviteHelp: 'Please contact your administrator to request a new invitation.',
26
+ invalidLinkHelp: 'Please request a new link or contact support.',
27
+ goToLogin: 'Go to Login',
28
+ invalidToken: 'Invalid or missing token',
23
29
  passwordRequired: 'Password is required',
24
30
  passwordNeedsNumber: 'Password must contain at least one number',
25
31
  confirmRequired: 'Please confirm your password',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nucleus-core-ts",
3
- "version": "0.9.887",
3
+ "version": "0.9.888",
4
4
  "description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
5
5
  "author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
6
6
  "license": "SEE LICENSE IN LICENSE",