@wow-two-beta/fe-identity 0.0.3 → 0.0.4

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/kit/index.js CHANGED
@@ -7,6 +7,7 @@ import { createApiClient, ApiFailureFactory, ApiFailureExtensions } from "@wow-t
7
7
  import { ResultExtensions, AppErrorType, AppErrorFactory } from "@wow-two-beta/fe/foundation/results";
8
8
  import { useLocale } from "@wow-two-beta/fe/foundation/i18n";
9
9
  import { useAppForm } from "@wow-two-beta/fe/forms-engine/house";
10
+ import { object, phone } from "@wow-two-beta/fe/foundation/validators";
10
11
  const protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create("protocol"));
11
12
  function record(value) {
12
13
  return value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
@@ -721,7 +722,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
721
722
  const client = useAccountClient(props);
722
723
  const t = useAccountText();
723
724
  const step = shallowRef(PhoneSignInStep.Phone);
724
- const phone = shallowRef("");
725
+ const phone$1 = shallowRef("");
725
726
  const telegramLinkUrl = shallowRef(null);
726
727
  const isResending = shallowRef(false);
727
728
  const isResent = shallowRef(false);
@@ -734,12 +735,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
734
735
  const result = await client.sendPhoneSignInCode({ phone: value }, signal);
735
736
  if (!result.ok) return result;
736
737
  if (!result.value.isCodeSent && !result.value.telegramLinkUrl) return notSent();
737
- phone.value = value;
738
+ phone$1.value = value;
738
739
  telegramLinkUrl.value = result.value.telegramLinkUrl;
739
740
  return result;
740
741
  }
741
742
  const phoneForm = useAppForm({
742
743
  defaultValues: { phone: "" },
744
+ schema: object({ phone: phone({ countries: props.countries }) }),
743
745
  onSubmit: async (values, { signal }) => {
744
746
  const result = await send(values.phone, signal);
745
747
  if (result.ok) {
@@ -755,7 +757,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
755
757
  defaultValues: { code: "" },
756
758
  onSubmit: async (values, { signal }) => {
757
759
  const result = await client.signInWithPhone(
758
- { phone: phone.value, code: values.code.trim() },
760
+ { phone: phone$1.value, code: values.code.trim() },
759
761
  { clientId: props.clientId, signal }
760
762
  );
761
763
  if (result.ok) emit("signedIn");
@@ -766,7 +768,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
766
768
  isResending.value = true;
767
769
  isResent.value = false;
768
770
  resendFailure.value = null;
769
- const result = await send(phone.value);
771
+ const result = await send(phone$1.value);
770
772
  isResending.value = false;
771
773
  if (result.ok) isResent.value = true;
772
774
  else resendFailure.value = result.failure;
@@ -798,10 +800,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
798
800
  name: "phone",
799
801
  class: "w-full [&>span]:shrink-0 [&>span]:whitespace-nowrap",
800
802
  countries: __props.countries,
801
- placeholder: unref(t)("PhoneCodeSignIn.phonePlaceholder", ""),
802
803
  "default-country": __props.defaultCountry,
803
804
  onBlur: field.onBlur
804
- }, null, 8, ["modelValue", "onUpdate:modelValue", "countries", "placeholder", "default-country", "onBlur"])
805
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "countries", "default-country", "onBlur"])
805
806
  ]),
806
807
  _: 2
807
808
  }, 1032, ["label"])
@@ -825,7 +826,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
825
826
  createElementVNode("p", _hoisted_2$2, toDisplayString(unref(t)(
826
827
  "PhoneCodeSignIn.telegramIntro",
827
828
  "Open our Telegram bot, press Start and share your contact. The bot then sends your code for {phone}.",
828
- { phone: phone.value }
829
+ { phone: phone$1.value }
829
830
  )), 1),
830
831
  createVNode(unref(Button), {
831
832
  "as-child": "",
@@ -881,7 +882,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
881
882
  class: "text-primary underline-offset-4 hover:underline"
882
883
  }, toDisplayString(unref(t)("PhoneCodeSignIn.openTelegramAgain", "Open Telegram")), 9, _hoisted_5)
883
884
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
884
- createTextVNode(toDisplayString(unref(t)("PhoneCodeSignIn.codeSent", "We sent a code to {phone}.", { phone: phone.value })), 1)
885
+ createTextVNode(toDisplayString(unref(t)("PhoneCodeSignIn.codeSent", "We sent a code to {phone}.", { phone: phone$1.value })), 1)
885
886
  ], 64))
886
887
  ]),
887
888
  createVNode(unref(codeForm).Field, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/kit/account/CreateAccountClient.ts","../../src/kit/account/hooks/UseAccountClient.ts","../../src/kit/account/hooks/UseAccountText.ts","../../src/kit/presentation/feedback/failureAlert/FailureAlert.vue","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordStage.ts","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordForm.vue","../../src/kit/presentation/forms/forgotPasswordForm/ForgotPasswordForm.vue","../../src/kit/presentation/forms/passwordSignIn/PasswordSignIn.vue","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneSignInStep.ts","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneCodeSignIn.vue","../../src/kit/presentation/forms/resetPasswordForm/ResetPasswordForm.vue","../../src/kit/presentation/forms/signUpForm/SignUpForm.vue"],"sourcesContent":["import { ApiFailureFactory, createApiClient, type ApiFailure } from '@wow-two-beta/fe/foundation/http';\nimport { ResultExtensions, type Result } from '@wow-two-beta/fe/foundation/results';\nimport {\n AccountRouteConstants,\n PasswordChangeConfirmationType,\n type AccountInfoDto,\n type ConfirmEmailApiRequest,\n type EmailAddressApiRequest,\n type PasswordChangeApiRequest,\n type PasswordChangeConfirmationApiRequest,\n type PasswordChangeConfirmationDto,\n type PasswordChangeLinkApiRequest,\n type PasswordChangeRequiredDto,\n type PhoneSignInApiRequest,\n type PhoneSignInSendApiRequest,\n type PhoneSignInSentDto,\n type ResetPasswordApiRequest,\n type SignInApiRequest,\n type SignInFieldDto,\n type SignInMethodDto,\n type SignInOptionsDto,\n type SignInRuleDto,\n type SignUpApiRequest,\n type SignedUpAccountDto,\n} from '../../contracts';\n\n/** Configures where the account API is reached. */\nexport interface AccountClientOptions {\n /** The origin serving the API: empty for the consumer's own backend (Form 1), the service's URL otherwise. */\n readonly baseUrl?: string;\n /**\n * Whether the browser sends the session cookie. Default `same-origin`, or `include` when `baseUrl` is set, which\n * the service's CORS policy must allow.\n */\n readonly credentials?: RequestCredentials;\n /** Replaces the global fetch, for tests. */\n readonly fetch?: typeof globalThis.fetch;\n}\n\n/** Describes a sign-in call beyond its body. */\nexport interface AccountSignInOptions {\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n readonly clientId?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Describes a sign-in declaration request. */\nexport interface SignInOptionsQuery {\n /** The OIDC client the sign-in serves, recorded by the sign-in log; the look stays the instance's. */\n readonly clientId?: string | null;\n /** The locale of the rule messages (`uz`, `ru`, `en`); the browser's `Accept-Language` when omitted. */\n readonly locale?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Calls the account API over HTTP, signing in with cookie sessions. */\nexport interface AccountClient {\n /**\n * Reads the sign-in declaration: the hosted pages' look, whether sign-up is open, and each enabled method in layout\n * order with its fields and rules. The look is the instance's, whatever `clientId` names.\n */\n getSignInOptions(query?: SignInOptionsQuery): Promise<Result<SignInOptionsDto, ApiFailure>>;\n /** Signs an account up while sign-up is on; `403` while it is closed. */\n signUp(request: SignUpApiRequest, signal?: AbortSignal): Promise<Result<SignedUpAccountDto, ApiFailure>>;\n /**\n * Signs in with an identifier and password: `null` once the session cookie is set, or the ticket of a required\n * password change, which sets no session.\n */\n signIn(\n request: SignInApiRequest,\n options?: AccountSignInOptions,\n ): Promise<Result<PasswordChangeRequiredDto | null, ApiFailure>>;\n /** Confirms an email with the emailed token. */\n confirmEmail(request: ConfirmEmailApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends the confirmation email again; succeeds whether or not the account exists. */\n resendConfirmationEmail(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends a password reset email; succeeds whether or not the account exists. */\n forgotPassword(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sets a new password with the emailed reset token. */\n resetPassword(request: ResetPasswordApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Reads the signed-in account; `401` when nobody is signed in. */\n getAccountInfo(signal?: AbortSignal): Promise<Result<AccountInfoDto, ApiFailure>>;\n /**\n * Starts a password change, signed in or with a required change's ticket: answers how it is confirmed, and sends the\n * code or link the setting asks for.\n */\n startPasswordChange(\n request?: PasswordChangeConfirmationApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PasswordChangeConfirmationDto, ApiFailure>>;\n /** Changes the password of the signed-in person, or of the one a required change's ticket names. */\n changePassword(request: PasswordChangeApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Changes a password with the one-time token a change link carries. */\n changePasswordWithLink(\n request: PasswordChangeLinkApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<void, ApiFailure>>;\n /** Sends a phone sign-in code, or answers the Telegram link that sends one once the contact is shared. */\n sendPhoneSignInCode(\n request: PhoneSignInSendApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PhoneSignInSentDto, ApiFailure>>;\n /** Signs in with a phone and its code and sets the session cookie. */\n signInWithPhone(request: PhoneSignInApiRequest, options?: AccountSignInOptions): Promise<Result<void, ApiFailure>>;\n /** Ends the cookie's session. */\n signOut(signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n}\n\ntype Decoded<T> = Result<T, ApiFailure>;\n\nconst protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create('protocol'));\n\nfunction record(value: unknown): Readonly<Record<string, unknown>> | null {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction decodeSignedUp(value: unknown): Decoded<SignedUpAccountDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({ userId: body.userId, isConfirmationSent: body.isConfirmationSent === true });\n }\n return protocolFailure();\n}\n\nfunction decodeAccountInfo(value: unknown): Decoded<AccountInfoDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({\n userId: body.userId,\n userName: typeof body.userName === 'string' ? body.userName : null,\n email: typeof body.email === 'string' ? body.email : null,\n isEmailConfirmed: body.isEmailConfirmed === true,\n isTwoFactorEnabled: body.isTwoFactorEnabled === true,\n });\n }\n return protocolFailure();\n}\n\nconst confirmationTypes = Object.values(PasswordChangeConfirmationType);\n\n/** Reads a confirmation type whatever its case; `undefined` for anything else. */\nfunction confirmationOf(value: unknown): PasswordChangeConfirmationType | undefined {\n return typeof value === 'string'\n ? confirmationTypes.find((type) => type.toLowerCase() === value.toLowerCase())\n : undefined;\n}\n\nfunction decodeConfirmation(value: unknown): Decoded<PasswordChangeConfirmationDto> {\n const body = record(value);\n const confirmation = confirmationOf(body?.confirmation);\n if (body && confirmation) return ResultExtensions.ok({ confirmation, isSent: body.isSent === true });\n return protocolFailure();\n}\n\nfunction decodeCodeSent(value: unknown): Decoded<PhoneSignInSentDto> {\n const body = record(value);\n if (!body) return protocolFailure();\n const link =\n typeof body.telegramLinkUrl === 'string' && body.telegramLinkUrl.length > 0 ? body.telegramLinkUrl : null;\n return ResultExtensions.ok({ isCodeSent: body.isCodeSent === true, telegramLinkUrl: link });\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' ? value : null;\n}\n\nfunction strings(value: unknown): ReadonlyArray<string> | null {\n return Array.isArray(value) && value.every((item): item is string => typeof item === 'string') ? value : null;\n}\n\n/** Decodes each item of a list, or `null` when it is no list or any item fails. */\nfunction list<T>(value: unknown, decode: (item: unknown) => T | null): ReadonlyArray<T> | null {\n if (!Array.isArray(value)) return null;\n const items = value.map(decode);\n return items.every((item): item is T => item !== null) ? items : null;\n}\n\nfunction decodeRule(value: unknown): SignInRuleDto | null {\n const body = record(value);\n const code = text(body?.code);\n const message = text(body?.message);\n return body && code && message !== null ? { code, params: record(body.params), message } : null;\n}\n\nfunction decodeField(value: unknown): SignInFieldDto | null {\n const body = record(value);\n const name = text(body?.name);\n const kind = text(body?.kind);\n const rules = list(body?.rules, decodeRule);\n return body && name && kind && rules ? { name, kind, countries: strings(body.countries), rules } : null;\n}\n\nfunction decodeMethod(value: unknown): SignInMethodDto | null {\n const body = record(value);\n const id = text(body?.id);\n const fields = list(body?.fields, decodeField);\n if (!body || !id || !fields) return null;\n const passwordRules = body.passwordRules == null ? null : list(body.passwordRules, decodeRule);\n if (body.passwordRules != null && passwordRules === null) return null;\n return { id, channels: strings(body.channels) ?? [], fields, passwordRules };\n}\n\nfunction decodeSignInOptions(value: unknown): Decoded<SignInOptionsDto> {\n const body = record(value);\n const brandName = text(body?.brandName);\n const theme = text(body?.theme);\n const methods = list(body?.methods, decodeMethod);\n if (!body || !brandName || !theme || !methods) return protocolFailure();\n const requirements = record(body.requirements);\n return ResultExtensions.ok({\n brandName,\n theme,\n backgroundUrl: text(body.backgroundUrl) || null,\n isSignUpEnabled: body.isSignUpEnabled === true,\n locale: text(body.locale) ?? 'en',\n locales: strings(body.locales) ?? [],\n methods,\n requirements: {\n isConfirmedEmailRequired: requirements?.isConfirmedEmailRequired === true,\n isConfirmedPhoneNumberRequired: requirements?.isConfirmedPhoneNumberRequired === true,\n isSecondFactorRequired: requirements?.isSecondFactorRequired === true,\n },\n });\n}\n\n/**\n * Reads a cookie sign-in's answer: `204` set the session; a body flagged `isPasswordChangeRequired`, enveloped or\n * bare, holds the change's ticket instead.\n */\nfunction decodeSignedIn(text: string): Decoded<PasswordChangeRequiredDto | null> {\n if (text.trim() === '') return ResultExtensions.ok(null);\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return protocolFailure();\n }\n const outer = record(parsed);\n const body = record(outer?.data) ?? outer;\n if (body?.isPasswordChangeRequired !== true) return body ? ResultExtensions.ok(null) : protocolFailure();\n if (typeof body.ticket !== 'string' || body.ticket === '') return protocolFailure();\n return ResultExtensions.ok({\n isPasswordChangeRequired: true,\n confirmation: confirmationOf(body.confirmation) ?? PasswordChangeConfirmationType.None,\n ticket: body.ticket,\n });\n}\n\n/** Creates a client for the account API at `baseUrl` (same origin by default). */\nexport function createAccountClient(options: AccountClientOptions = {}): AccountClient {\n const baseUrl = options.baseUrl?.replace(/\\/+$/, '') ?? '';\n const credentials = options.credentials ?? (baseUrl ? 'include' : undefined);\n const client = createApiClient({\n baseUrl: `${baseUrl}${AccountRouteConstants.base}`,\n ...(credentials !== undefined ? { credentials } : {}),\n ...(options.fetch !== undefined ? { fetch: options.fetch } : {}),\n });\n const signInQuery = (clientId?: string | null) => ({\n [AccountRouteConstants.useCookiesParameter]: true,\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n });\n const send = (path: string, body: unknown, signal?: AbortSignal) =>\n client.post(path, { body, response: 'empty', signal });\n\n return {\n getSignInOptions: ({ clientId, locale, signal } = {}) =>\n client.get(AccountRouteConstants.signInOptions, {\n query: {\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n ...(locale ? { [AccountRouteConstants.localeParameter]: locale } : {}),\n },\n signal,\n decode: decodeSignInOptions,\n }),\n signUp: (request, signal) =>\n client.post(AccountRouteConstants.signUp, { body: request, signal, decode: decodeSignedUp }),\n async signIn(request, { clientId, signal } = {}) {\n const answered = await client.post(AccountRouteConstants.signIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'text',\n signal,\n });\n return answered.ok ? decodeSignedIn(answered.value) : answered;\n },\n confirmEmail: (request, signal) =>\n client.get(AccountRouteConstants.confirmEmail, { query: { ...request }, response: 'empty', signal }),\n resendConfirmationEmail: (request, signal) => send(AccountRouteConstants.resendConfirmationEmail, request, signal),\n forgotPassword: (request, signal) => send(AccountRouteConstants.forgotPassword, request, signal),\n resetPassword: (request, signal) => send(AccountRouteConstants.resetPassword, request, signal),\n getAccountInfo: (signal) => client.get(AccountRouteConstants.manageInfo, { signal, decode: decodeAccountInfo }),\n startPasswordChange: (request, signal) =>\n client.post(AccountRouteConstants.managePasswordConfirmation, {\n body: request ?? {},\n signal,\n decode: decodeConfirmation,\n }),\n changePassword: (request, signal) => send(AccountRouteConstants.managePassword, request, signal),\n changePasswordWithLink: (request, signal) => send(AccountRouteConstants.passwordChange, request, signal),\n sendPhoneSignInCode: (request, signal) =>\n client.post(AccountRouteConstants.phoneSignInSend, { body: request, signal, decode: decodeCodeSent }),\n signInWithPhone: (request, { clientId, signal } = {}) =>\n client.post(AccountRouteConstants.phoneSignIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'empty',\n signal,\n }),\n signOut: (signal) => client.post(AccountRouteConstants.signOut, { response: 'empty', signal }),\n };\n}\n","import { createAccountClient, type AccountClient } from '../CreateAccountClient';\n\n/** Names where a kit component reaches the account API. */\nexport interface AccountClientSource {\n /** The client to call; built from `baseUrl` when omitted. */\n readonly client?: AccountClient;\n /** The service's origin; the consumer's own origin (Form 1) when omitted. */\n readonly baseUrl?: string;\n}\n\n/** Returns the component's account client, read once at setup: the given one, or one for `baseUrl`. */\nexport function useAccountClient(source: AccountClientSource): AccountClient {\n return source.client ?? createAccountClient(source.baseUrl ? { baseUrl: source.baseUrl } : {});\n}\n","import { useLocale } from '@wow-two-beta/fe/foundation/i18n';\n\n/** Resolves one kit message: its key under `IdentityKit.`, the English fallback, and the values it interpolates. */\nexport type AccountText = (key: string, fallback: string, values?: Readonly<Record<string, string | number>>) => string;\n\n/**\n * Returns the kit's message resolver: the consumer's `LocaleProvider` messages for `IdentityKit.{key}`, else the\n * English fallback. Call it in `setup()`.\n */\nexport function useAccountText(): AccountText {\n const locale = useLocale();\n return (key, fallback, values) => locale.t(`IdentityKit.${key}`, values, fallback);\n}\n","<script setup lang=\"ts\">\nimport { ApiFailureExtensions } from '@wow-two-beta/fe/foundation/http';\nimport { AppErrorType, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { computed } from 'vue';\n\n/** Says why a request failed: the problem's own text, else the failure's display-safe message. */\ndefineOptions({ name: 'FailureAlert' });\n\nconst props = defineProps<{\n /** The failure to explain; nothing renders without one. */\n failure: AppError | null;\n}>();\n\nconst reason = computed(() =>\n props.failure && props.failure.type !== AppErrorType.Cancelled ? ApiFailureExtensions.reason(props.failure) : '',\n);\n</script>\n\n<template>\n <AlertSimple v-if=\"reason\" severity=\"danger\">{{ reason }}</AlertSimple>\n</template>\n","/** Defines where a password change stands. */\nexport const ChangePasswordStage = {\n /** Refers to the change not started: the instance has not said how it is confirmed. */\n Idle: 'idle',\n /** Refers to the change form, with the code field under the `Code` confirmation. */\n Form: 'form',\n /** Refers to the `Link` confirmation: only the emailed link opens the form. */\n LinkSent: 'link-sent',\n /** Refers to the password changed. */\n Done: 'done',\n} as const;\nexport type ChangePasswordStage = (typeof ChangePasswordStage)[keyof typeof ChangePasswordStage];\n","<script setup lang=\"ts\">\nimport type { AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { computed, onMounted, shallowRef } from 'vue';\nimport { PasswordChangeConfirmationType, type PasswordChangeConfirmationDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { ChangePasswordStage } from './ChangePasswordStage';\n\n/**\n * Changes a password under the instance's confirmation setting. Signed in, it starts the change and asks for the\n * current password, plus the sent code under `Code`, or says a link went out under `Link`. With the ticket of a\n * sign-in that requires the change, it starts at once and skips the current password. With the token a change link\n * carried, it asks only for the new password.\n */\ndefineOptions({ name: 'ChangePasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The one-time token a change link carried. */\n token?: string | null;\n /** The ticket a sign-in answered with when the password breaks the current rules. */\n ticket?: string | null;\n /** How the ticket's change is confirmed, as the sign-in answered; asked of the instance when omitted. */\n confirmation?: PasswordChangeConfirmationType | null;\n }>(),\n { client: undefined, baseUrl: undefined, token: null, ticket: null, confirmation: null },\n);\n\nconst emit = defineEmits<{\n /** Fires once the password is changed. */\n changed: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The ticketed change under `None` needs no round trip: the sign-in already said so, and nothing is sent. */\nconst isOpenAtOnce = Boolean(props.ticket) && props.confirmation === PasswordChangeConfirmationType.None;\nconst stage = shallowRef<ChangePasswordStage>(\n props.token || isOpenAtOnce ? ChangePasswordStage.Form : ChangePasswordStage.Idle,\n);\n/** How the change is confirmed, once known, and whether its code or link went out. */\nconst started = shallowRef<PasswordChangeConfirmationDto | null>(\n isOpenAtOnce ? { confirmation: PasswordChangeConfirmationType.None, isSent: false } : null,\n);\nconst isStarting = shallowRef(false);\nconst startFailure = shallowRef<AppError | null>(null);\nconst isCodeRequired = computed(() => started.value?.confirmation === PasswordChangeConfirmationType.Code);\n\nconst form = useAccountForm({\n defaultValues: { currentPassword: '', newPassword: '', code: '' },\n onSubmit: async (values, { signal }) => {\n const result = props.token\n ? await client.changePasswordWithLink({ token: props.token, newPassword: values.newPassword }, signal)\n : await client.changePassword(\n {\n ...(props.ticket ? { ticket: props.ticket } : { currentPassword: values.currentPassword }),\n newPassword: values.newPassword,\n ...(isCodeRequired.value ? { code: values.code.trim() } : {}),\n },\n signal,\n );\n if (result.ok) {\n stage.value = ChangePasswordStage.Done;\n emit('changed');\n }\n return result;\n },\n});\n\n/** Asks the instance how the change is confirmed, which sends the code or link that setting calls for. */\nasync function start() {\n isStarting.value = true;\n startFailure.value = null;\n const result = await client.startPasswordChange(props.ticket ? { ticket: props.ticket } : undefined);\n isStarting.value = false;\n if (!result.ok) {\n startFailure.value = result.failure;\n return;\n }\n started.value = result.value;\n stage.value =\n result.value.confirmation === PasswordChangeConfirmationType.Link\n ? ChangePasswordStage.LinkSent\n : ChangePasswordStage.Form;\n}\n\nonMounted(() => {\n if (props.ticket && !isOpenAtOnce) void start();\n});\n</script>\n\n<template>\n <div class=\"flex flex-col gap-4\">\n <p v-if=\"ticket && stage !== ChangePasswordStage.Done\" class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'ChangePasswordForm.required',\n 'Your password no longer meets the rules here. Choose a new one, then sign in with it.',\n )\n }}\n </p>\n\n <template v-if=\"stage === ChangePasswordStage.Idle\">\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" is-full-width :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.start', 'Change the password') }}\n </Button>\n </template>\n\n <template v-else-if=\"stage === ChangePasswordStage.LinkSent\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.linkSent', 'We sent you a link to change the password. Open it to continue.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.linkNotSent', 'We could not send the link. Try again in a minute.') }}\n </AlertSimple>\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.resendLink', 'Send the link again') }}\n </Button>\n </template>\n\n <form\n v-else-if=\"stage === ChangePasswordStage.Form\"\n class=\"flex flex-col gap-4\"\n novalidate\n @submit=\"form.handleSubmit\"\n >\n <template v-if=\"isCodeRequired\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.codeSent', 'We sent you a code. Enter it beside the new password.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.codeNotSent', 'We could not send a code. Try again in a minute.') }}\n </AlertSimple>\n </template>\n <form.Field v-if=\"!token && !ticket\" v-slot=\"field\" name=\"currentPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.currentPassword', 'Current password')\">\n <PasswordInput\n v-model=\"field.value\"\n name=\"currentPassword\"\n autocomplete=\"current-password\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-if=\"isCodeRequired\" v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('ChangePasswordForm.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ChangePasswordForm.submit', 'Change the password') }}\n </Button>\n <Button\n v-if=\"isCodeRequired\"\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n :is-loading=\"isStarting\"\n @click=\"start\"\n >\n {{ t('ChangePasswordForm.resendCode', 'Send a new code') }}\n </Button>\n </form>\n\n <AlertSimple v-else severity=\"success\">\n {{ t('ChangePasswordForm.done', 'Your password is changed.') }}\n </AlertSimple>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sends a password reset link to an email; it says the same whether or not an account uses it. */\ndefineOptions({ name: 'ForgotPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The email the field starts with. */\n initialEmail?: string;\n }>(),\n { client: undefined, baseUrl: undefined, initialEmail: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the reset email is requested. */\n sent: [email: string];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst sentTo = shallowRef<string | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: props.initialEmail },\n onSubmit: async (values, { signal }) => {\n const result = await client.forgotPassword(values, signal);\n if (result.ok) {\n sentTo.value = values.email;\n emit('sent', values.email);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <AlertSimple v-if=\"sentTo\" severity=\"success\">\n {{\n t('ForgotPasswordForm.sent', 'If an account uses {email}, we sent it a link to reset the password.', {\n email: sentTo,\n })\n }}\n </AlertSimple>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('ForgotPasswordForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ForgotPasswordForm.submit', 'Send the reset link') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { PasswordChangeRequiredDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Signs a person in with an identifier and password, by cookie session — on the hosted page or embedded in a product. */\ndefineOptions({ name: 'PasswordSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** Where \"Forgot your password?\" leads; no link when omitted. */\n forgotPasswordHref?: string;\n /** The identifier the field starts with. */\n initialIdentifier?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, forgotPasswordHref: undefined, initialIdentifier: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n /** Fires when the password matched but breaks the current rules: no session, only the change's ticket. */\n passwordChangeRequired: [required: PasswordChangeRequiredDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The email of an account that must confirm it before signing in, when the identifier was one. */\nconst unconfirmedEmail = shallowRef<string | null>(null);\nconst isResent = shallowRef(false);\nconst isResending = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { identifier: props.initialIdentifier, password: '' },\n onSubmit: async (values, { signal }) => {\n unconfirmedEmail.value = null;\n isResent.value = false;\n const result = await client.signIn(values, { clientId: props.clientId, signal });\n if (result.ok) {\n if (result.value) emit('passwordChangeRequired', result.value);\n else emit('signedIn');\n } else if (result.failure.status === 403 && values.identifier.includes('@')) {\n unconfirmedEmail.value = values.identifier;\n }\n return result;\n },\n});\n\nasync function resendConfirmation() {\n if (!unconfirmedEmail.value) return;\n isResending.value = true;\n const result = await client.resendConfirmationEmail({ email: unconfirmedEmail.value });\n isResending.value = false;\n isResent.value = result.ok;\n}\n</script>\n\n<template>\n <form class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"identifier\" is-required>\n <Field :label=\"t('PasswordSignIn.identifier', 'Email or user name')\">\n <TextInput v-model=\"field.value\" name=\"identifier\" autocomplete=\"username\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('PasswordSignIn.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"current-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <a\n v-if=\"forgotPasswordHref\"\n :href=\"forgotPasswordHref\"\n class=\"-mt-2 self-end text-sm text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PasswordSignIn.forgotPassword', 'Forgot your password?') }}\n </a>\n <FailureAlert :failure=\"form.state.submitError\" />\n <template v-if=\"unconfirmedEmail\">\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{\n t('PasswordSignIn.confirmationResent', 'We sent the confirmation link to {email} again.', {\n email: unconfirmedEmail,\n })\n }}\n </AlertSimple>\n <Button\n v-else\n type=\"button\"\n variant=\"outline\"\n tone=\"neutral\"\n :is-loading=\"isResending\"\n @click=\"resendConfirmation\"\n >\n {{ t('PasswordSignIn.resendConfirmation', 'Send the confirmation email again') }}\n </Button>\n </template>\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('PasswordSignIn.submit', 'Sign in') }}\n </Button>\n </form>\n</template>\n","/** Defines where a phone sign-in stands. */\nexport const PhoneSignInStep = {\n /** Refers to entering the phone a code goes to. */\n Phone: 'phone',\n /** Refers to opening the Telegram bot and sharing the contact, after which the bot sends the code. */\n Telegram: 'telegram',\n /** Refers to entering the code. */\n Code: 'code',\n} as const;\nexport type PhoneSignInStep = (typeof PhoneSignInStep)[keyof typeof PhoneSignInStep];\n","<script setup lang=\"ts\">\nimport { AppErrorFactory, ResultExtensions, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PhoneInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { PhoneSignInStep } from './PhoneSignInStep';\n\n/**\n * Signs a person in by a code sent to their phone: the phone first, then the code. A phone with no linked Telegram\n * chat first opens the bot, where sharing the contact links it and brings the code.\n */\ndefineOptions({ name: 'PhoneCodeSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** The ISO codes of the countries a phone may come from, in display order; every country when omitted. */\n countries?: ReadonlyArray<string>;\n /** The ISO code selected first; the first allowed country when omitted. */\n defaultCountry?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, countries: undefined, defaultCountry: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst step = shallowRef<PhoneSignInStep>(PhoneSignInStep.Phone);\n/** The phone the current code was sent to. */\nconst phone = shallowRef('');\nconst telegramLinkUrl = shallowRef<string | null>(null);\nconst isResending = shallowRef(false);\nconst isResent = shallowRef(false);\nconst resendFailure = shallowRef<AppError | null>(null);\n\nconst notSent = () =>\n ResultExtensions.fail({\n ...AppErrorFactory.unavailable(),\n message: t('PhoneCodeSignIn.notSent', 'We could not send a code. Try again in a minute.'),\n });\n\nasync function send(value: string, signal?: AbortSignal) {\n const result = await client.sendPhoneSignInCode({ phone: value }, signal);\n if (!result.ok) return result;\n if (!result.value.isCodeSent && !result.value.telegramLinkUrl) return notSent();\n phone.value = value;\n telegramLinkUrl.value = result.value.telegramLinkUrl;\n return result;\n}\n\nconst phoneForm = useAccountForm({\n defaultValues: { phone: '' },\n onSubmit: async (values, { signal }) => {\n const result = await send(values.phone, signal);\n if (result.ok) {\n codeForm.reset();\n isResent.value = false;\n resendFailure.value = null;\n step.value = telegramLinkUrl.value ? PhoneSignInStep.Telegram : PhoneSignInStep.Code;\n }\n return result;\n },\n});\n\nconst codeForm = useAccountForm({\n defaultValues: { code: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signInWithPhone(\n { phone: phone.value, code: values.code.trim() },\n { clientId: props.clientId, signal },\n );\n if (result.ok) emit('signedIn');\n return result;\n },\n});\n\nasync function resend() {\n isResending.value = true;\n isResent.value = false;\n resendFailure.value = null;\n const result = await send(phone.value);\n isResending.value = false;\n if (result.ok) isResent.value = true;\n else resendFailure.value = result.failure;\n}\n\nfunction useAnotherPhone() {\n step.value = PhoneSignInStep.Phone;\n telegramLinkUrl.value = null;\n}\n</script>\n\n<template>\n <form v-if=\"step === PhoneSignInStep.Phone\" class=\"flex flex-col gap-4\" novalidate @submit=\"phoneForm.handleSubmit\">\n <phoneForm.Field v-slot=\"field\" name=\"phone\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.phone', 'Phone number')\">\n <PhoneInput\n v-model=\"field.value\"\n name=\"phone\"\n class=\"w-full [&>span]:shrink-0 [&>span]:whitespace-nowrap\"\n :countries=\"countries\"\n :placeholder=\"t('PhoneCodeSignIn.phonePlaceholder', '')\"\n :default-country=\"defaultCountry\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </phoneForm.Field>\n <FailureAlert :failure=\"phoneForm.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"phoneForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.send', 'Send a code') }}\n </Button>\n </form>\n\n <div v-else-if=\"step === PhoneSignInStep.Telegram\" class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'PhoneCodeSignIn.telegramIntro',\n 'Open our Telegram bot, press Start and share your contact. The bot then sends your code for {phone}.',\n { phone },\n )\n }}\n </p>\n <Button as-child is-full-width>\n <a\n :href=\"telegramLinkUrl ?? undefined\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n @click=\"step = PhoneSignInStep.Code\"\n >\n {{ t('PhoneCodeSignIn.openTelegram', 'Open Telegram') }}\n </a>\n </Button>\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" is-full-width @click=\"step = PhoneSignInStep.Code\">\n {{ t('PhoneCodeSignIn.haveCode', 'I have the code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"codeForm.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n <template v-if=\"telegramLinkUrl\">\n {{ t('PhoneCodeSignIn.codeFromTelegram', 'Enter the code the bot sent you in Telegram.') }}\n <a\n :href=\"telegramLinkUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PhoneCodeSignIn.openTelegramAgain', 'Open Telegram') }}\n </a>\n </template>\n <template v-else>{{ t('PhoneCodeSignIn.codeSent', 'We sent a code to {phone}.', { phone }) }}</template>\n </p>\n <codeForm.Field v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </codeForm.Field>\n <FailureAlert :failure=\"codeForm.state.submitError\" />\n <FailureAlert :failure=\"resendFailure\" />\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{ t('PhoneCodeSignIn.resent', 'We sent a new code.') }}\n </AlertSimple>\n <Button type=\"submit\" is-full-width :is-loading=\"codeForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.submit', 'Sign in') }}\n </Button>\n <div class=\"flex flex-wrap justify-between gap-2\">\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" :is-loading=\"isResending\" @click=\"resend\">\n {{ t('PhoneCodeSignIn.resend', 'Send a new code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sets a new password with the token a reset email carried. */\ndefineOptions({ name: 'ResetPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The account email the reset link named. */\n email: string;\n /** The reset token the link carried. */\n token: string;\n /** Where the person signs in once the password is set; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the new password is set. */\n reset: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst isReset = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { newPassword: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.resetPassword(\n { email: props.email, resetToken: props.token, newPassword: values.newPassword },\n signal,\n );\n if (result.ok) {\n isReset.value = true;\n emit('reset');\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"isReset\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">{{ t('ResetPasswordForm.done', 'Your password is changed.') }}</AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('ResetPasswordForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n {{ t('ResetPasswordForm.intro', 'Choose a new password for {email}.', { email }) }}\n </p>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ResetPasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ResetPasswordForm.submit', 'Set the password') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { SignedUpAccountDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Creates an account with an email and password while the instance keeps sign-up on, then says what comes next. */\ndefineOptions({ name: 'SignUpForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** Where the person signs in once the account exists; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires with the account a sign-up created. */\n signedUp: [account: SignedUpAccountDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst created = shallowRef<{ account: SignedUpAccountDto; email: string } | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: '', password: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signUp(values, signal);\n if (result.ok) {\n created.value = { account: result.value, email: values.email };\n emit('signedUp', result.value);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"created\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">\n <template v-if=\"created.account.isConfirmationSent\">\n {{\n t('SignUpForm.confirmationSent', 'Check your inbox: we sent a link to {email} to confirm the address.', {\n email: created.email,\n })\n }}\n </template>\n <template v-else>{{ t('SignUpForm.created', 'Your account is ready.') }}</template>\n </AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('SignUpForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('SignUpForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('SignUpForm.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('SignUpForm.submit', 'Create the account') }}\n </Button>\n </form>\n</template>\n"],"names":["text","_createBlock","_unref","useAccountForm","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString","_Fragment","_createVNode","FailureAlert","_withCtx","_createElementVNode","_hoisted_3","_createTextVNode"],"mappings":";;;;;;;;;AAgHA,MAAM,kBAAkB,MAAM,iBAAiB,KAAK,kBAAkB,OAAO,UAAU,CAAC;AAExF,SAAS,OAAO,OAA0D;AACxE,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QA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IAAA,EAAA,OAAA;AAAA,UAJc,MAAK;AAAA,UAAW,eAAA;AAAA,QAAA;UACzC,SAAAU,QAAA,CADkB,UAAK;AAAA,YACvBF,YAEQR,MAAA,KAAA,GAAA;AAAA,cAFA,OAAOA,MAAA,CAAA,EAAC,uBAAA,UAAA;AAAA,YAAA;+BACd,MAAwG;AAAA,gBAAxGQ,YAAwGR,MAAA,aAAA,GAAA;AAAA,kBAAhF,YAAA,MAAM;AAAA,kBAAN,uBAAA,CAAA,WAAA,MAAM,QAAK;AAAA,kBAAE,MAAK;AAAA,kBAAW,cAAa;AAAA,kBAAgB,QAAM,MAAM;AAAA,gBAAA;;;;;;;QAGlGQ,YAAkDR,MAAAS,WAAA,GAAA;AAAA,UAAnC,SAAST,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;QACnCQ,YAESR,MAAA,MAAA,GAAA;AAAA,UAFD,MAAK;AAAA,UAAS,iBAAA;AAAA,UAAe,cAAYA,MAAA,IAAA,EAAK,MAAM;AAAA,QAAA;2BAC1D,MAAkD;AAAA,4CAA/CA,MAAA,CAAA,EAAC,qBAAA,oBAAA,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/kit/account/CreateAccountClient.ts","../../src/kit/account/hooks/UseAccountClient.ts","../../src/kit/account/hooks/UseAccountText.ts","../../src/kit/presentation/feedback/failureAlert/FailureAlert.vue","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordStage.ts","../../src/kit/presentation/forms/changePasswordForm/ChangePasswordForm.vue","../../src/kit/presentation/forms/forgotPasswordForm/ForgotPasswordForm.vue","../../src/kit/presentation/forms/passwordSignIn/PasswordSignIn.vue","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneSignInStep.ts","../../src/kit/presentation/forms/phoneCodeSignIn/PhoneCodeSignIn.vue","../../src/kit/presentation/forms/resetPasswordForm/ResetPasswordForm.vue","../../src/kit/presentation/forms/signUpForm/SignUpForm.vue"],"sourcesContent":["import { ApiFailureFactory, createApiClient, type ApiFailure } from '@wow-two-beta/fe/foundation/http';\nimport { ResultExtensions, type Result } from '@wow-two-beta/fe/foundation/results';\nimport {\n AccountRouteConstants,\n PasswordChangeConfirmationType,\n type AccountInfoDto,\n type ConfirmEmailApiRequest,\n type EmailAddressApiRequest,\n type PasswordChangeApiRequest,\n type PasswordChangeConfirmationApiRequest,\n type PasswordChangeConfirmationDto,\n type PasswordChangeLinkApiRequest,\n type PasswordChangeRequiredDto,\n type PhoneSignInApiRequest,\n type PhoneSignInSendApiRequest,\n type PhoneSignInSentDto,\n type ResetPasswordApiRequest,\n type SignInApiRequest,\n type SignInFieldDto,\n type SignInMethodDto,\n type SignInOptionsDto,\n type SignInRuleDto,\n type SignUpApiRequest,\n type SignedUpAccountDto,\n} from '../../contracts';\n\n/** Configures where the account API is reached. */\nexport interface AccountClientOptions {\n /** The origin serving the API: empty for the consumer's own backend (Form 1), the service's URL otherwise. */\n readonly baseUrl?: string;\n /**\n * Whether the browser sends the session cookie. Default `same-origin`, or `include` when `baseUrl` is set, which\n * the service's CORS policy must allow.\n */\n readonly credentials?: RequestCredentials;\n /** Replaces the global fetch, for tests. */\n readonly fetch?: typeof globalThis.fetch;\n}\n\n/** Describes a sign-in call beyond its body. */\nexport interface AccountSignInOptions {\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n readonly clientId?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Describes a sign-in declaration request. */\nexport interface SignInOptionsQuery {\n /** The OIDC client the sign-in serves, recorded by the sign-in log; the look stays the instance's. */\n readonly clientId?: string | null;\n /** The locale of the rule messages (`uz`, `ru`, `en`); the browser's `Accept-Language` when omitted. */\n readonly locale?: string | null;\n /** Cancels the request. */\n readonly signal?: AbortSignal;\n}\n\n/** Calls the account API over HTTP, signing in with cookie sessions. */\nexport interface AccountClient {\n /**\n * Reads the sign-in declaration: the hosted pages' look, whether sign-up is open, and each enabled method in layout\n * order with its fields and rules. The look is the instance's, whatever `clientId` names.\n */\n getSignInOptions(query?: SignInOptionsQuery): Promise<Result<SignInOptionsDto, ApiFailure>>;\n /** Signs an account up while sign-up is on; `403` while it is closed. */\n signUp(request: SignUpApiRequest, signal?: AbortSignal): Promise<Result<SignedUpAccountDto, ApiFailure>>;\n /**\n * Signs in with an identifier and password: `null` once the session cookie is set, or the ticket of a required\n * password change, which sets no session.\n */\n signIn(\n request: SignInApiRequest,\n options?: AccountSignInOptions,\n ): Promise<Result<PasswordChangeRequiredDto | null, ApiFailure>>;\n /** Confirms an email with the emailed token. */\n confirmEmail(request: ConfirmEmailApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends the confirmation email again; succeeds whether or not the account exists. */\n resendConfirmationEmail(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sends a password reset email; succeeds whether or not the account exists. */\n forgotPassword(request: EmailAddressApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Sets a new password with the emailed reset token. */\n resetPassword(request: ResetPasswordApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Reads the signed-in account; `401` when nobody is signed in. */\n getAccountInfo(signal?: AbortSignal): Promise<Result<AccountInfoDto, ApiFailure>>;\n /**\n * Starts a password change, signed in or with a required change's ticket: answers how it is confirmed, and sends the\n * code or link the setting asks for.\n */\n startPasswordChange(\n request?: PasswordChangeConfirmationApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PasswordChangeConfirmationDto, ApiFailure>>;\n /** Changes the password of the signed-in person, or of the one a required change's ticket names. */\n changePassword(request: PasswordChangeApiRequest, signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n /** Changes a password with the one-time token a change link carries. */\n changePasswordWithLink(\n request: PasswordChangeLinkApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<void, ApiFailure>>;\n /** Sends a phone sign-in code, or answers the Telegram link that sends one once the contact is shared. */\n sendPhoneSignInCode(\n request: PhoneSignInSendApiRequest,\n signal?: AbortSignal,\n ): Promise<Result<PhoneSignInSentDto, ApiFailure>>;\n /** Signs in with a phone and its code and sets the session cookie. */\n signInWithPhone(request: PhoneSignInApiRequest, options?: AccountSignInOptions): Promise<Result<void, ApiFailure>>;\n /** Ends the cookie's session. */\n signOut(signal?: AbortSignal): Promise<Result<void, ApiFailure>>;\n}\n\ntype Decoded<T> = Result<T, ApiFailure>;\n\nconst protocolFailure = () => ResultExtensions.fail(ApiFailureFactory.create('protocol'));\n\nfunction record(value: unknown): Readonly<Record<string, unknown>> | null {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : null;\n}\n\nfunction decodeSignedUp(value: unknown): Decoded<SignedUpAccountDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({ userId: body.userId, isConfirmationSent: body.isConfirmationSent === true });\n }\n return protocolFailure();\n}\n\nfunction decodeAccountInfo(value: unknown): Decoded<AccountInfoDto> {\n const body = record(value);\n if (body && typeof body.userId === 'string') {\n return ResultExtensions.ok({\n userId: body.userId,\n userName: typeof body.userName === 'string' ? body.userName : null,\n email: typeof body.email === 'string' ? body.email : null,\n isEmailConfirmed: body.isEmailConfirmed === true,\n isTwoFactorEnabled: body.isTwoFactorEnabled === true,\n });\n }\n return protocolFailure();\n}\n\nconst confirmationTypes = Object.values(PasswordChangeConfirmationType);\n\n/** Reads a confirmation type whatever its case; `undefined` for anything else. */\nfunction confirmationOf(value: unknown): PasswordChangeConfirmationType | undefined {\n return typeof value === 'string'\n ? confirmationTypes.find((type) => type.toLowerCase() === value.toLowerCase())\n : undefined;\n}\n\nfunction decodeConfirmation(value: unknown): Decoded<PasswordChangeConfirmationDto> {\n const body = record(value);\n const confirmation = confirmationOf(body?.confirmation);\n if (body && confirmation) return ResultExtensions.ok({ confirmation, isSent: body.isSent === true });\n return protocolFailure();\n}\n\nfunction decodeCodeSent(value: unknown): Decoded<PhoneSignInSentDto> {\n const body = record(value);\n if (!body) return protocolFailure();\n const link =\n typeof body.telegramLinkUrl === 'string' && body.telegramLinkUrl.length > 0 ? body.telegramLinkUrl : null;\n return ResultExtensions.ok({ isCodeSent: body.isCodeSent === true, telegramLinkUrl: link });\n}\n\nfunction text(value: unknown): string | null {\n return typeof value === 'string' ? value : null;\n}\n\nfunction strings(value: unknown): ReadonlyArray<string> | null {\n return Array.isArray(value) && value.every((item): item is string => typeof item === 'string') ? value : null;\n}\n\n/** Decodes each item of a list, or `null` when it is no list or any item fails. */\nfunction list<T>(value: unknown, decode: (item: unknown) => T | null): ReadonlyArray<T> | null {\n if (!Array.isArray(value)) return null;\n const items = value.map(decode);\n return items.every((item): item is T => item !== null) ? items : null;\n}\n\nfunction decodeRule(value: unknown): SignInRuleDto | null {\n const body = record(value);\n const code = text(body?.code);\n const message = text(body?.message);\n return body && code && message !== null ? { code, params: record(body.params), message } : null;\n}\n\nfunction decodeField(value: unknown): SignInFieldDto | null {\n const body = record(value);\n const name = text(body?.name);\n const kind = text(body?.kind);\n const rules = list(body?.rules, decodeRule);\n return body && name && kind && rules ? { name, kind, countries: strings(body.countries), rules } : null;\n}\n\nfunction decodeMethod(value: unknown): SignInMethodDto | null {\n const body = record(value);\n const id = text(body?.id);\n const fields = list(body?.fields, decodeField);\n if (!body || !id || !fields) return null;\n const passwordRules = body.passwordRules == null ? null : list(body.passwordRules, decodeRule);\n if (body.passwordRules != null && passwordRules === null) return null;\n return { id, channels: strings(body.channels) ?? [], fields, passwordRules };\n}\n\nfunction decodeSignInOptions(value: unknown): Decoded<SignInOptionsDto> {\n const body = record(value);\n const brandName = text(body?.brandName);\n const theme = text(body?.theme);\n const methods = list(body?.methods, decodeMethod);\n if (!body || !brandName || !theme || !methods) return protocolFailure();\n const requirements = record(body.requirements);\n return ResultExtensions.ok({\n brandName,\n theme,\n backgroundUrl: text(body.backgroundUrl) || null,\n isSignUpEnabled: body.isSignUpEnabled === true,\n locale: text(body.locale) ?? 'en',\n locales: strings(body.locales) ?? [],\n methods,\n requirements: {\n isConfirmedEmailRequired: requirements?.isConfirmedEmailRequired === true,\n isConfirmedPhoneNumberRequired: requirements?.isConfirmedPhoneNumberRequired === true,\n isSecondFactorRequired: requirements?.isSecondFactorRequired === true,\n },\n });\n}\n\n/**\n * Reads a cookie sign-in's answer: `204` set the session; a body flagged `isPasswordChangeRequired`, enveloped or\n * bare, holds the change's ticket instead.\n */\nfunction decodeSignedIn(text: string): Decoded<PasswordChangeRequiredDto | null> {\n if (text.trim() === '') return ResultExtensions.ok(null);\n let parsed: unknown;\n try {\n parsed = JSON.parse(text);\n } catch {\n return protocolFailure();\n }\n const outer = record(parsed);\n const body = record(outer?.data) ?? outer;\n if (body?.isPasswordChangeRequired !== true) return body ? ResultExtensions.ok(null) : protocolFailure();\n if (typeof body.ticket !== 'string' || body.ticket === '') return protocolFailure();\n return ResultExtensions.ok({\n isPasswordChangeRequired: true,\n confirmation: confirmationOf(body.confirmation) ?? PasswordChangeConfirmationType.None,\n ticket: body.ticket,\n });\n}\n\n/** Creates a client for the account API at `baseUrl` (same origin by default). */\nexport function createAccountClient(options: AccountClientOptions = {}): AccountClient {\n const baseUrl = options.baseUrl?.replace(/\\/+$/, '') ?? '';\n const credentials = options.credentials ?? (baseUrl ? 'include' : undefined);\n const client = createApiClient({\n baseUrl: `${baseUrl}${AccountRouteConstants.base}`,\n ...(credentials !== undefined ? { credentials } : {}),\n ...(options.fetch !== undefined ? { fetch: options.fetch } : {}),\n });\n const signInQuery = (clientId?: string | null) => ({\n [AccountRouteConstants.useCookiesParameter]: true,\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n });\n const send = (path: string, body: unknown, signal?: AbortSignal) =>\n client.post(path, { body, response: 'empty', signal });\n\n return {\n getSignInOptions: ({ clientId, locale, signal } = {}) =>\n client.get(AccountRouteConstants.signInOptions, {\n query: {\n ...(clientId ? { [AccountRouteConstants.clientIdParameter]: clientId } : {}),\n ...(locale ? { [AccountRouteConstants.localeParameter]: locale } : {}),\n },\n signal,\n decode: decodeSignInOptions,\n }),\n signUp: (request, signal) =>\n client.post(AccountRouteConstants.signUp, { body: request, signal, decode: decodeSignedUp }),\n async signIn(request, { clientId, signal } = {}) {\n const answered = await client.post(AccountRouteConstants.signIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'text',\n signal,\n });\n return answered.ok ? decodeSignedIn(answered.value) : answered;\n },\n confirmEmail: (request, signal) =>\n client.get(AccountRouteConstants.confirmEmail, { query: { ...request }, response: 'empty', signal }),\n resendConfirmationEmail: (request, signal) => send(AccountRouteConstants.resendConfirmationEmail, request, signal),\n forgotPassword: (request, signal) => send(AccountRouteConstants.forgotPassword, request, signal),\n resetPassword: (request, signal) => send(AccountRouteConstants.resetPassword, request, signal),\n getAccountInfo: (signal) => client.get(AccountRouteConstants.manageInfo, { signal, decode: decodeAccountInfo }),\n startPasswordChange: (request, signal) =>\n client.post(AccountRouteConstants.managePasswordConfirmation, {\n body: request ?? {},\n signal,\n decode: decodeConfirmation,\n }),\n changePassword: (request, signal) => send(AccountRouteConstants.managePassword, request, signal),\n changePasswordWithLink: (request, signal) => send(AccountRouteConstants.passwordChange, request, signal),\n sendPhoneSignInCode: (request, signal) =>\n client.post(AccountRouteConstants.phoneSignInSend, { body: request, signal, decode: decodeCodeSent }),\n signInWithPhone: (request, { clientId, signal } = {}) =>\n client.post(AccountRouteConstants.phoneSignIn, {\n query: signInQuery(clientId),\n body: request,\n response: 'empty',\n signal,\n }),\n signOut: (signal) => client.post(AccountRouteConstants.signOut, { response: 'empty', signal }),\n };\n}\n","import { createAccountClient, type AccountClient } from '../CreateAccountClient';\n\n/** Names where a kit component reaches the account API. */\nexport interface AccountClientSource {\n /** The client to call; built from `baseUrl` when omitted. */\n readonly client?: AccountClient;\n /** The service's origin; the consumer's own origin (Form 1) when omitted. */\n readonly baseUrl?: string;\n}\n\n/** Returns the component's account client, read once at setup: the given one, or one for `baseUrl`. */\nexport function useAccountClient(source: AccountClientSource): AccountClient {\n return source.client ?? createAccountClient(source.baseUrl ? { baseUrl: source.baseUrl } : {});\n}\n","import { useLocale } from '@wow-two-beta/fe/foundation/i18n';\n\n/** Resolves one kit message: its key under `IdentityKit.`, the English fallback, and the values it interpolates. */\nexport type AccountText = (key: string, fallback: string, values?: Readonly<Record<string, string | number>>) => string;\n\n/**\n * Returns the kit's message resolver: the consumer's `LocaleProvider` messages for `IdentityKit.{key}`, else the\n * English fallback. Call it in `setup()`.\n */\nexport function useAccountText(): AccountText {\n const locale = useLocale();\n return (key, fallback, values) => locale.t(`IdentityKit.${key}`, values, fallback);\n}\n","<script setup lang=\"ts\">\nimport { ApiFailureExtensions } from '@wow-two-beta/fe/foundation/http';\nimport { AppErrorType, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { computed } from 'vue';\n\n/** Says why a request failed: the problem's own text, else the failure's display-safe message. */\ndefineOptions({ name: 'FailureAlert' });\n\nconst props = defineProps<{\n /** The failure to explain; nothing renders without one. */\n failure: AppError | null;\n}>();\n\nconst reason = computed(() =>\n props.failure && props.failure.type !== AppErrorType.Cancelled ? ApiFailureExtensions.reason(props.failure) : '',\n);\n</script>\n\n<template>\n <AlertSimple v-if=\"reason\" severity=\"danger\">{{ reason }}</AlertSimple>\n</template>\n","/** Defines where a password change stands. */\nexport const ChangePasswordStage = {\n /** Refers to the change not started: the instance has not said how it is confirmed. */\n Idle: 'idle',\n /** Refers to the change form, with the code field under the `Code` confirmation. */\n Form: 'form',\n /** Refers to the `Link` confirmation: only the emailed link opens the form. */\n LinkSent: 'link-sent',\n /** Refers to the password changed. */\n Done: 'done',\n} as const;\nexport type ChangePasswordStage = (typeof ChangePasswordStage)[keyof typeof ChangePasswordStage];\n","<script setup lang=\"ts\">\nimport type { AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { computed, onMounted, shallowRef } from 'vue';\nimport { PasswordChangeConfirmationType, type PasswordChangeConfirmationDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { ChangePasswordStage } from './ChangePasswordStage';\n\n/**\n * Changes a password under the instance's confirmation setting. Signed in, it starts the change and asks for the\n * current password, plus the sent code under `Code`, or says a link went out under `Link`. With the ticket of a\n * sign-in that requires the change, it starts at once and skips the current password. With the token a change link\n * carried, it asks only for the new password.\n */\ndefineOptions({ name: 'ChangePasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The one-time token a change link carried. */\n token?: string | null;\n /** The ticket a sign-in answered with when the password breaks the current rules. */\n ticket?: string | null;\n /** How the ticket's change is confirmed, as the sign-in answered; asked of the instance when omitted. */\n confirmation?: PasswordChangeConfirmationType | null;\n }>(),\n { client: undefined, baseUrl: undefined, token: null, ticket: null, confirmation: null },\n);\n\nconst emit = defineEmits<{\n /** Fires once the password is changed. */\n changed: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The ticketed change under `None` needs no round trip: the sign-in already said so, and nothing is sent. */\nconst isOpenAtOnce = Boolean(props.ticket) && props.confirmation === PasswordChangeConfirmationType.None;\nconst stage = shallowRef<ChangePasswordStage>(\n props.token || isOpenAtOnce ? ChangePasswordStage.Form : ChangePasswordStage.Idle,\n);\n/** How the change is confirmed, once known, and whether its code or link went out. */\nconst started = shallowRef<PasswordChangeConfirmationDto | null>(\n isOpenAtOnce ? { confirmation: PasswordChangeConfirmationType.None, isSent: false } : null,\n);\nconst isStarting = shallowRef(false);\nconst startFailure = shallowRef<AppError | null>(null);\nconst isCodeRequired = computed(() => started.value?.confirmation === PasswordChangeConfirmationType.Code);\n\nconst form = useAccountForm({\n defaultValues: { currentPassword: '', newPassword: '', code: '' },\n onSubmit: async (values, { signal }) => {\n const result = props.token\n ? await client.changePasswordWithLink({ token: props.token, newPassword: values.newPassword }, signal)\n : await client.changePassword(\n {\n ...(props.ticket ? { ticket: props.ticket } : { currentPassword: values.currentPassword }),\n newPassword: values.newPassword,\n ...(isCodeRequired.value ? { code: values.code.trim() } : {}),\n },\n signal,\n );\n if (result.ok) {\n stage.value = ChangePasswordStage.Done;\n emit('changed');\n }\n return result;\n },\n});\n\n/** Asks the instance how the change is confirmed, which sends the code or link that setting calls for. */\nasync function start() {\n isStarting.value = true;\n startFailure.value = null;\n const result = await client.startPasswordChange(props.ticket ? { ticket: props.ticket } : undefined);\n isStarting.value = false;\n if (!result.ok) {\n startFailure.value = result.failure;\n return;\n }\n started.value = result.value;\n stage.value =\n result.value.confirmation === PasswordChangeConfirmationType.Link\n ? ChangePasswordStage.LinkSent\n : ChangePasswordStage.Form;\n}\n\nonMounted(() => {\n if (props.ticket && !isOpenAtOnce) void start();\n});\n</script>\n\n<template>\n <div class=\"flex flex-col gap-4\">\n <p v-if=\"ticket && stage !== ChangePasswordStage.Done\" class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'ChangePasswordForm.required',\n 'Your password no longer meets the rules here. Choose a new one, then sign in with it.',\n )\n }}\n </p>\n\n <template v-if=\"stage === ChangePasswordStage.Idle\">\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" is-full-width :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.start', 'Change the password') }}\n </Button>\n </template>\n\n <template v-else-if=\"stage === ChangePasswordStage.LinkSent\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.linkSent', 'We sent you a link to change the password. Open it to continue.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.linkNotSent', 'We could not send the link. Try again in a minute.') }}\n </AlertSimple>\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" :is-loading=\"isStarting\" @click=\"start\">\n {{ t('ChangePasswordForm.resendLink', 'Send the link again') }}\n </Button>\n </template>\n\n <form\n v-else-if=\"stage === ChangePasswordStage.Form\"\n class=\"flex flex-col gap-4\"\n novalidate\n @submit=\"form.handleSubmit\"\n >\n <template v-if=\"isCodeRequired\">\n <AlertSimple v-if=\"started?.isSent\" severity=\"info\">\n {{ t('ChangePasswordForm.codeSent', 'We sent you a code. Enter it beside the new password.') }}\n </AlertSimple>\n <AlertSimple v-else severity=\"warning\">\n {{ t('ChangePasswordForm.codeNotSent', 'We could not send a code. Try again in a minute.') }}\n </AlertSimple>\n </template>\n <form.Field v-if=\"!token && !ticket\" v-slot=\"field\" name=\"currentPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.currentPassword', 'Current password')\">\n <PasswordInput\n v-model=\"field.value\"\n name=\"currentPassword\"\n autocomplete=\"current-password\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ChangePasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-if=\"isCodeRequired\" v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('ChangePasswordForm.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <FailureAlert :failure=\"startFailure\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ChangePasswordForm.submit', 'Change the password') }}\n </Button>\n <Button\n v-if=\"isCodeRequired\"\n type=\"button\"\n variant=\"ghost\"\n tone=\"neutral\"\n :is-loading=\"isStarting\"\n @click=\"start\"\n >\n {{ t('ChangePasswordForm.resendCode', 'Send a new code') }}\n </Button>\n </form>\n\n <AlertSimple v-else severity=\"success\">\n {{ t('ChangePasswordForm.done', 'Your password is changed.') }}\n </AlertSimple>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sends a password reset link to an email; it says the same whether or not an account uses it. */\ndefineOptions({ name: 'ForgotPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The email the field starts with. */\n initialEmail?: string;\n }>(),\n { client: undefined, baseUrl: undefined, initialEmail: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the reset email is requested. */\n sent: [email: string];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst sentTo = shallowRef<string | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: props.initialEmail },\n onSubmit: async (values, { signal }) => {\n const result = await client.forgotPassword(values, signal);\n if (result.ok) {\n sentTo.value = values.email;\n emit('sent', values.email);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <AlertSimple v-if=\"sentTo\" severity=\"success\">\n {{\n t('ForgotPasswordForm.sent', 'If an account uses {email}, we sent it a link to reset the password.', {\n email: sentTo,\n })\n }}\n </AlertSimple>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('ForgotPasswordForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ForgotPasswordForm.submit', 'Send the reset link') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { PasswordChangeRequiredDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Signs a person in with an identifier and password, by cookie session — on the hosted page or embedded in a product. */\ndefineOptions({ name: 'PasswordSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** Where \"Forgot your password?\" leads; no link when omitted. */\n forgotPasswordHref?: string;\n /** The identifier the field starts with. */\n initialIdentifier?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, forgotPasswordHref: undefined, initialIdentifier: '' },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n /** Fires when the password matched but breaks the current rules: no session, only the change's ticket. */\n passwordChangeRequired: [required: PasswordChangeRequiredDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\n/** The email of an account that must confirm it before signing in, when the identifier was one. */\nconst unconfirmedEmail = shallowRef<string | null>(null);\nconst isResent = shallowRef(false);\nconst isResending = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { identifier: props.initialIdentifier, password: '' },\n onSubmit: async (values, { signal }) => {\n unconfirmedEmail.value = null;\n isResent.value = false;\n const result = await client.signIn(values, { clientId: props.clientId, signal });\n if (result.ok) {\n if (result.value) emit('passwordChangeRequired', result.value);\n else emit('signedIn');\n } else if (result.failure.status === 403 && values.identifier.includes('@')) {\n unconfirmedEmail.value = values.identifier;\n }\n return result;\n },\n});\n\nasync function resendConfirmation() {\n if (!unconfirmedEmail.value) return;\n isResending.value = true;\n const result = await client.resendConfirmationEmail({ email: unconfirmedEmail.value });\n isResending.value = false;\n isResent.value = result.ok;\n}\n</script>\n\n<template>\n <form class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"identifier\" is-required>\n <Field :label=\"t('PasswordSignIn.identifier', 'Email or user name')\">\n <TextInput v-model=\"field.value\" name=\"identifier\" autocomplete=\"username\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('PasswordSignIn.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"current-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <a\n v-if=\"forgotPasswordHref\"\n :href=\"forgotPasswordHref\"\n class=\"-mt-2 self-end text-sm text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PasswordSignIn.forgotPassword', 'Forgot your password?') }}\n </a>\n <FailureAlert :failure=\"form.state.submitError\" />\n <template v-if=\"unconfirmedEmail\">\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{\n t('PasswordSignIn.confirmationResent', 'We sent the confirmation link to {email} again.', {\n email: unconfirmedEmail,\n })\n }}\n </AlertSimple>\n <Button\n v-else\n type=\"button\"\n variant=\"outline\"\n tone=\"neutral\"\n :is-loading=\"isResending\"\n @click=\"resendConfirmation\"\n >\n {{ t('PasswordSignIn.resendConfirmation', 'Send the confirmation email again') }}\n </Button>\n </template>\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('PasswordSignIn.submit', 'Sign in') }}\n </Button>\n </form>\n</template>\n","/** Defines where a phone sign-in stands. */\nexport const PhoneSignInStep = {\n /** Refers to entering the phone a code goes to. */\n Phone: 'phone',\n /** Refers to opening the Telegram bot and sharing the contact, after which the bot sends the code. */\n Telegram: 'telegram',\n /** Refers to entering the code. */\n Code: 'code',\n} as const;\nexport type PhoneSignInStep = (typeof PhoneSignInStep)[keyof typeof PhoneSignInStep];\n","<script setup lang=\"ts\">\nimport { AppErrorFactory, ResultExtensions, type AppError } from '@wow-two-beta/fe/foundation/results';\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { object, phone as phoneRule } from '@wow-two-beta/fe/foundation/validators';\nimport { Field, PhoneInput, TextInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\nimport { PhoneSignInStep } from './PhoneSignInStep';\n\n/**\n * Signs a person in by a code sent to their phone: the phone first, then the code. A phone with no linked Telegram\n * chat first opens the bot, where sharing the contact links it and brings the code.\n */\ndefineOptions({ name: 'PhoneCodeSignIn' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The OIDC client the sign-in serves, recorded by the sign-in log. */\n clientId?: string | null;\n /** The ISO codes of the countries a phone may come from, in display order; every country when omitted. */\n countries?: ReadonlyArray<string>;\n /** The ISO code selected first; the first allowed country when omitted. */\n defaultCountry?: string;\n }>(),\n { client: undefined, baseUrl: undefined, clientId: null, countries: undefined, defaultCountry: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the session cookie is set. */\n signedIn: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst step = shallowRef<PhoneSignInStep>(PhoneSignInStep.Phone);\n/** The phone the current code was sent to. */\nconst phone = shallowRef('');\nconst telegramLinkUrl = shallowRef<string | null>(null);\nconst isResending = shallowRef(false);\nconst isResent = shallowRef(false);\nconst resendFailure = shallowRef<AppError | null>(null);\n\nconst notSent = () =>\n ResultExtensions.fail({\n ...AppErrorFactory.unavailable(),\n message: t('PhoneCodeSignIn.notSent', 'We could not send a code. Try again in a minute.'),\n });\n\nasync function send(value: string, signal?: AbortSignal) {\n const result = await client.sendPhoneSignInCode({ phone: value }, signal);\n if (!result.ok) return result;\n if (!result.value.isCodeSent && !result.value.telegramLinkUrl) return notSent();\n phone.value = value;\n telegramLinkUrl.value = result.value.telegramLinkUrl;\n return result;\n}\n\nconst phoneForm = useAccountForm({\n defaultValues: { phone: '' },\n schema: object({ phone: phoneRule({ countries: props.countries }) }),\n onSubmit: async (values, { signal }) => {\n const result = await send(values.phone, signal);\n if (result.ok) {\n codeForm.reset();\n isResent.value = false;\n resendFailure.value = null;\n step.value = telegramLinkUrl.value ? PhoneSignInStep.Telegram : PhoneSignInStep.Code;\n }\n return result;\n },\n});\n\nconst codeForm = useAccountForm({\n defaultValues: { code: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signInWithPhone(\n { phone: phone.value, code: values.code.trim() },\n { clientId: props.clientId, signal },\n );\n if (result.ok) emit('signedIn');\n return result;\n },\n});\n\nasync function resend() {\n isResending.value = true;\n isResent.value = false;\n resendFailure.value = null;\n const result = await send(phone.value);\n isResending.value = false;\n if (result.ok) isResent.value = true;\n else resendFailure.value = result.failure;\n}\n\nfunction useAnotherPhone() {\n step.value = PhoneSignInStep.Phone;\n telegramLinkUrl.value = null;\n}\n</script>\n\n<template>\n <form v-if=\"step === PhoneSignInStep.Phone\" class=\"flex flex-col gap-4\" novalidate @submit=\"phoneForm.handleSubmit\">\n <phoneForm.Field v-slot=\"field\" name=\"phone\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.phone', 'Phone number')\">\n <PhoneInput\n v-model=\"field.value\"\n name=\"phone\"\n class=\"w-full [&>span]:shrink-0 [&>span]:whitespace-nowrap\"\n :countries=\"countries\"\n :default-country=\"defaultCountry\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </phoneForm.Field>\n <FailureAlert :failure=\"phoneForm.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"phoneForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.send', 'Send a code') }}\n </Button>\n </form>\n\n <div v-else-if=\"step === PhoneSignInStep.Telegram\" class=\"flex flex-col gap-4\">\n <p class=\"text-sm text-muted-foreground\">\n {{\n t(\n 'PhoneCodeSignIn.telegramIntro',\n 'Open our Telegram bot, press Start and share your contact. The bot then sends your code for {phone}.',\n { phone },\n )\n }}\n </p>\n <Button as-child is-full-width>\n <a\n :href=\"telegramLinkUrl ?? undefined\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n @click=\"step = PhoneSignInStep.Code\"\n >\n {{ t('PhoneCodeSignIn.openTelegram', 'Open Telegram') }}\n </a>\n </Button>\n <Button type=\"button\" variant=\"outline\" tone=\"neutral\" is-full-width @click=\"step = PhoneSignInStep.Code\">\n {{ t('PhoneCodeSignIn.haveCode', 'I have the code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"codeForm.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n <template v-if=\"telegramLinkUrl\">\n {{ t('PhoneCodeSignIn.codeFromTelegram', 'Enter the code the bot sent you in Telegram.') }}\n <a\n :href=\"telegramLinkUrl\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"text-primary underline-offset-4 hover:underline\"\n >\n {{ t('PhoneCodeSignIn.openTelegramAgain', 'Open Telegram') }}\n </a>\n </template>\n <template v-else>{{ t('PhoneCodeSignIn.codeSent', 'We sent a code to {phone}.', { phone }) }}</template>\n </p>\n <codeForm.Field v-slot=\"field\" name=\"code\" is-required>\n <Field :label=\"t('PhoneCodeSignIn.code', 'Code')\">\n <TextInput\n v-model=\"field.value\"\n name=\"code\"\n inputmode=\"numeric\"\n autocomplete=\"one-time-code\"\n @blur=\"field.onBlur\"\n />\n </Field>\n </codeForm.Field>\n <FailureAlert :failure=\"codeForm.state.submitError\" />\n <FailureAlert :failure=\"resendFailure\" />\n <AlertSimple v-if=\"isResent\" severity=\"success\">\n {{ t('PhoneCodeSignIn.resent', 'We sent a new code.') }}\n </AlertSimple>\n <Button type=\"submit\" is-full-width :is-loading=\"codeForm.state.isSubmitting\">\n {{ t('PhoneCodeSignIn.submit', 'Sign in') }}\n </Button>\n <div class=\"flex flex-wrap justify-between gap-2\">\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" :is-loading=\"isResending\" @click=\"resend\">\n {{ t('PhoneCodeSignIn.resend', 'Send a new code') }}\n </Button>\n <Button type=\"button\" variant=\"ghost\" tone=\"neutral\" @click=\"useAnotherPhone\">\n {{ t('PhoneCodeSignIn.otherPhone', 'Use another number') }}\n </Button>\n </div>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Sets a new password with the token a reset email carried. */\ndefineOptions({ name: 'ResetPasswordForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** The account email the reset link named. */\n email: string;\n /** The reset token the link carried. */\n token: string;\n /** Where the person signs in once the password is set; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires once the new password is set. */\n reset: [];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst isReset = shallowRef(false);\n\nconst form = useAccountForm({\n defaultValues: { newPassword: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.resetPassword(\n { email: props.email, resetToken: props.token, newPassword: values.newPassword },\n signal,\n );\n if (result.ok) {\n isReset.value = true;\n emit('reset');\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"isReset\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">{{ t('ResetPasswordForm.done', 'Your password is changed.') }}</AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('ResetPasswordForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <p class=\"text-sm text-muted-foreground\">\n {{ t('ResetPasswordForm.intro', 'Choose a new password for {email}.', { email }) }}\n </p>\n <form.Field v-slot=\"field\" name=\"newPassword\" is-required>\n <Field :label=\"t('ResetPasswordForm.newPassword', 'New password')\">\n <PasswordInput v-model=\"field.value\" name=\"newPassword\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('ResetPasswordForm.submit', 'Set the password') }}\n </Button>\n </form>\n</template>\n","<script setup lang=\"ts\">\nimport { Button } from '@wow-two-beta/fe/presentation/actions';\nimport { AlertSimple } from '@wow-two-beta/fe/presentation/feedback';\nimport { EmailInput, Field, PasswordInput } from '@wow-two-beta/fe/presentation/forms';\nimport { shallowRef } from 'vue';\nimport type { SignedUpAccountDto } from '../../../../contracts';\nimport type { AccountClient } from '../../../account';\nimport { useAccountClient, useAccountForm, useAccountText } from '../../../account/hooks';\nimport { FailureAlert } from '../../feedback/failureAlert';\n\n/** Creates an account with an email and password while the instance keeps sign-up on, then says what comes next. */\ndefineOptions({ name: 'SignUpForm' });\n\nconst props = withDefaults(\n defineProps<{\n /** The account API to call; built from `baseUrl` when omitted. */\n client?: AccountClient;\n /** The service's origin; the consumer's own origin when omitted. */\n baseUrl?: string;\n /** Where the person signs in once the account exists; no link when omitted. */\n signInHref?: string;\n }>(),\n { client: undefined, baseUrl: undefined, signInHref: undefined },\n);\n\nconst emit = defineEmits<{\n /** Fires with the account a sign-up created. */\n signedUp: [account: SignedUpAccountDto];\n}>();\n\nconst client = useAccountClient(props);\nconst t = useAccountText();\nconst created = shallowRef<{ account: SignedUpAccountDto; email: string } | null>(null);\n\nconst form = useAccountForm({\n defaultValues: { email: '', password: '' },\n onSubmit: async (values, { signal }) => {\n const result = await client.signUp(values, signal);\n if (result.ok) {\n created.value = { account: result.value, email: values.email };\n emit('signedUp', result.value);\n }\n return result;\n },\n});\n</script>\n\n<template>\n <div v-if=\"created\" class=\"flex flex-col gap-4\">\n <AlertSimple severity=\"success\">\n <template v-if=\"created.account.isConfirmationSent\">\n {{\n t('SignUpForm.confirmationSent', 'Check your inbox: we sent a link to {email} to confirm the address.', {\n email: created.email,\n })\n }}\n </template>\n <template v-else>{{ t('SignUpForm.created', 'Your account is ready.') }}</template>\n </AlertSimple>\n <Button v-if=\"signInHref\" as-child is-full-width>\n <a :href=\"signInHref\">{{ t('SignUpForm.signIn', 'Sign in') }}</a>\n </Button>\n </div>\n <form v-else class=\"flex flex-col gap-4\" novalidate @submit=\"form.handleSubmit\">\n <form.Field v-slot=\"field\" name=\"email\" is-required>\n <Field :label=\"t('SignUpForm.email', 'Email')\">\n <EmailInput v-model=\"field.value\" name=\"email\" autocomplete=\"email\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <form.Field v-slot=\"field\" name=\"password\" is-required>\n <Field :label=\"t('SignUpForm.password', 'Password')\">\n <PasswordInput v-model=\"field.value\" name=\"password\" autocomplete=\"new-password\" @blur=\"field.onBlur\" />\n </Field>\n </form.Field>\n <FailureAlert :failure=\"form.state.submitError\" />\n <Button type=\"submit\" is-full-width :is-loading=\"form.state.isSubmitting\">\n {{ t('SignUpForm.submit', 'Create the account') }}\n </Button>\n </form>\n</template>\n"],"names":["text","_createBlock","_unref","useAccountForm","_openBlock","_createElementBlock","_hoisted_1","_hoisted_2","_toDisplayString","_Fragment","_createVNode","FailureAlert","_withCtx","phone","phoneRule","_createElementVNode","_hoisted_3","_createTextVNode"],"mappings":";;;;;;;;;;AAgHA,MAAM,kBAAkB,MAAM,iBAAiB,KAAK,kBAAkB,OAAO,UAAU,CAAC;AAExF,SAAS,OAAO,OAA0D;AACxE,SAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK,IACrE,QACD;AACN;AAEA,SAAS,eAAe,OAA6C;AACnE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG,EAAE,QAAQ,KAAK,QAAQ,oBAAoB,KAAK,uBAAuB,MAAM;AAAA,EAC1G;AACA,SAAO,gBAAA;AACT;AAEA,SAAS,kBAAkB,OAAyC;AAClE,QAAM,OAAO,OAAO,KAAK;AACzB,MAAI,QAAQ,OAAO,KAAK,WAAW,UAAU;AAC3C,WAAO,iBAAiB,GAAG;AAAA,MACzB,QAAQ,KAAK;AAAA,MACb,UAAU,OAAO,KAAK,aAAa,WAAW,KAAK,WAAW;AAAA,MAC9D,OAAO,OAAO,KAAK,UAAU,WAAW,KAAK,QAAQ;AAAA,MACrD,kBAAkB,KAAK,qBAAqB;AAAA,MAC5C,oBAAoB,KAAK,uBAAuB;AAAA,IAAA,CACjD;AAAA,EACH;AACA,SAAO,gBAAA;AACT;AAEA,MAAM,oBAAoB,OAAO,OAAO,8BAA8B;AAGtE,SAAS,eAA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AA/CA,MAAA,CAAA,EAAC,qBAAA,oBAAA,CAAA,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wow-two-beta/fe-identity",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Identity domain UI: the account API contract, an account client and one embeddable component per sign-in and password step.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,14 +37,14 @@
37
37
  "check:package": "node scripts/check-package.mjs"
38
38
  },
39
39
  "peerDependencies": {
40
- "@wow-two-beta/fe": ">=0.0.37 <0.1.0",
40
+ "@wow-two-beta/fe": ">=0.0.39 <0.1.0",
41
41
  "vue": "^3.5.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@eslint/js": "^9.14.0",
45
45
  "@vitejs/plugin-vue": "^5.2.1",
46
46
  "@vue/test-utils": "^2.4.6",
47
- "@wow-two-beta/fe": "0.0.37",
47
+ "@wow-two-beta/fe": "0.0.39",
48
48
  "eslint": "^9.14.0",
49
49
  "eslint-plugin-vue": "^9.32.0",
50
50
  "globals": "^16.0.0",