@vectoriox/iox-ui 5.98.0 → 5.100.0
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/actions-core/index.d.ts +7 -4
- package/composite-core/index.d.ts +222 -2
- package/design-core/index.d.ts +334 -1
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs +16 -7
- package/fesm2022/vectoriox-iox-ui-actions-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs +948 -256
- package/fesm2022/vectoriox-iox-ui-composite-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs +416 -1
- package/fesm2022/vectoriox-iox-ui-design-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs +3 -24
- package/fesm2022/vectoriox-iox-ui-forms-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs +23 -13
- package/fesm2022/vectoriox-iox-ui-generation-core.mjs.map +1 -1
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs +633 -0
- package/fesm2022/vectoriox-iox-ui-identity-core.mjs.map +1 -0
- package/fesm2022/vectoriox-iox-ui.mjs +2 -59
- package/fesm2022/vectoriox-iox-ui.mjs.map +1 -1
- package/forms-core/index.d.ts +2 -23
- package/generation-core/index.d.ts +3 -1
- package/identity-core/index.d.ts +426 -0
- package/identity-core/package.json +3 -0
- package/index.d.ts +0 -1
- package/package.json +5 -1
- package/src/actions-core/action.model.ts +1 -1
- package/src/actions-core/element-actions.ts +16 -6
- package/src/composite-core/account-runtime.ts +428 -0
- package/src/composite-core/account.ts +281 -0
- package/src/composite-core/public-api.ts +2 -0
- package/src/composite-core/recipe-parts.ts +48 -0
- package/src/composite-core/shop.ts +6 -26
- package/src/design-core/field-classes.ts +65 -0
- package/src/design-core/flavor-spec.generated.ts +346 -0
- package/src/design-core/public-api.ts +1 -0
- package/src/forms-core/field-markup.ts +2 -22
- package/src/generation-core/compose-site.ts +19 -9
- package/src/generation-core/nav-shape.ts +4 -4
- package/src/identity-core/guards.ts +87 -0
- package/src/identity-core/public-api.ts +14 -0
- package/src/identity-core/sign-in.ts +223 -0
- package/src/identity-core/site-auth-transport.ts +134 -0
- package/src/identity-core/site-auth.ts +182 -0
- package/src/identity-core/words.ts +194 -0
- package/styles/iox-design.css +38 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectoriox-iox-ui-identity-core.mjs","sources":["../../../projects/iox-ui/src/identity-core/sign-in.ts","../../../projects/iox-ui/src/identity-core/guards.ts","../../../projects/iox-ui/src/identity-core/site-auth.ts","../../../projects/iox-ui/src/identity-core/words.ts","../../../projects/iox-ui/src/identity-core/site-auth-transport.ts","../../../projects/iox-ui/src/identity-core/public-api.ts","../../../projects/iox-ui/src/identity-core/vectoriox-iox-ui-identity-core.ts"],"sourcesContent":["/**\n * Who signs in, with what, and the broker's two faces (commerce plan §3c \"The broker, step by step\", C-D6, C-D22).\n * The broker (iox-control-plane, `auth.iox.studio`) and the studios (iox-cms) speak THESE shapes; a provider is one\n * adapter on the broker and one `customerIdentities.provider` value in a studio. Email codes never touch the broker.\n */\n\n/** Who the sign-in is for. */\nexport enum SignInPurpose {\n /** A buyer on a studio's site. */\n Site = 'site',\n /** A studio's team member — existing users only (wave 2). */\n Admin = 'admin',\n /** portal.iox.studio. */\n Portal = 'portal',\n}\n\n/** A provider the broker runs. Google is live; the rest join one adapter at a time (board 18). */\nexport enum SignInProvider {\n Google = 'google',\n Meta = 'meta',\n GitHub = 'github',\n LinkedIn = 'linkedin',\n}\n\n/** How a provider answers (board 18): OpenID Connect gives a SIGNED ID token; OAuth 2 needs a profile call. */\nexport enum SignInProtocol {\n Oidc = 'oidc',\n OAuth2 = 'oauth2',\n}\n\nexport interface SignInProviderSpec {\n readonly protocol: SignInProtocol;\n /** The answer is signed, so a studio can check it itself — the only kind an admin may sign in with (C-D6). */\n readonly signedAnswer: boolean;\n /** Running on the broker today. */\n readonly live: boolean;\n}\n\nexport const SIGN_IN_PROVIDER_SPECS: Readonly<Record<SignInProvider, SignInProviderSpec>> = Object.freeze({\n [SignInProvider.Google]: { protocol: SignInProtocol.Oidc, signedAnswer: true, live: true },\n [SignInProvider.LinkedIn]: { protocol: SignInProtocol.Oidc, signedAnswer: true, live: false },\n [SignInProvider.Meta]: { protocol: SignInProtocol.OAuth2, signedAnswer: false, live: false },\n [SignInProvider.GitHub]: { protocol: SignInProtocol.OAuth2, signedAnswer: false, live: false },\n});\n\nexport function isSignInProvider(value: unknown): value is SignInProvider {\n return typeof value === 'string' && (Object.values(SignInProvider) as string[]).includes(value);\n}\n\nexport function isSignInPurpose(value: unknown): value is SignInPurpose {\n return typeof value === 'string' && (Object.values(SignInPurpose) as string[]).includes(value);\n}\n\n/** May `provider` serve `purpose`? Buyers and the portal take any provider; a team member only a signed answer (C-D6). */\nexport function providerServes(provider: SignInProvider, purpose: SignInPurpose): boolean {\n const spec = SIGN_IN_PROVIDER_SPECS[provider];\n if (!spec) return false;\n return purpose === SignInPurpose.Admin ? spec.signedAnswer : true;\n}\n\n// ── the broker ──────────────────────────────────────────────────────────────────────────────────\n\n/** The broker's public host (its own ingress; ops.iox.studio is unchanged). */\nexport const BROKER_HOST = 'auth.iox.studio';\nexport const BROKER_ORIGIN = `https://${BROKER_HOST}`;\n\n/** A ticket lives 60 s and is used once; so does a hand-off code. */\nexport const SIGN_IN_TICKET_TTL_SECONDS = 60;\nexport const SIGN_IN_HANDOFF_TTL_SECONDS = 60;\n\n/** The server-to-server routes on the control plane's API host (bearer: the studio's INSTANCE_TOKEN). */\nexport enum BrokerApiRoute {\n Tickets = 'instances/me/sign-in/tickets',\n Redeem = 'instances/me/sign-in/redeem',\n}\n\n/** The browser's routes on `auth.iox.studio`, one pair per provider. */\nexport enum BrokerBrowserRoute {\n Start = 'start',\n Callback = 'callback',\n}\n\n/** `/<route>` on the control plane's API host, root-relative. */\nexport function brokerApiPath(route: BrokerApiRoute): string {\n return `/${route}`;\n}\n\n/** `https://auth.iox.studio/<provider>/<route>`. */\nexport function brokerBrowserUrl(provider: SignInProvider, route: BrokerBrowserRoute, origin: string = BROKER_ORIGIN): string {\n return `${origin.replace(/\\/+$/, '')}/${encodeURIComponent(provider)}/${route}`;\n}\n\n/** Where the browser goes to begin: `https://auth.iox.studio/<provider>/start?ticket=<ticket>`. */\nexport function brokerStartUrl(provider: SignInProvider, ticket: string, origin: string = BROKER_ORIGIN): string {\n return `${brokerBrowserUrl(provider, BrokerBrowserRoute.Start, origin)}?${BROKER_TICKET_PARAM}=${encodeURIComponent(ticket)}`;\n}\n\n/** The ONE address registered with each provider: `https://auth.iox.studio/<provider>/callback`. */\nexport function brokerCallbackUrl(provider: SignInProvider, origin: string = BROKER_ORIGIN): string {\n return brokerBrowserUrl(provider, BrokerBrowserRoute.Callback, origin);\n}\n\nexport const BROKER_TICKET_PARAM = 'ticket';\n\n/** `POST instances/me/sign-in/tickets` — body. */\nexport interface SignInTicketRequest {\n provider: SignInProvider;\n purpose: SignInPurpose;\n /** Where the broker sends the browser back; its host must be one of the asking tenant's. */\n returnUrl: string;\n}\n\n/** 201 — `expiresAt` is an ISO date. */\nexport interface SignInTicketAnswer {\n ticket: string;\n startUrl: string;\n expiresAt: string;\n}\n\n/** `POST instances/me/sign-in/redeem` — body: the hand-off code the browser brought back. */\nexport interface SignInRedeemRequest {\n code: string;\n}\n\n/** 200 — the person the provider vouched for. Only the tenant (or the portal) that asked for the ticket gets it. */\nexport interface SignInRedeemAnswer {\n provider: SignInProvider;\n purpose: SignInPurpose;\n /** The provider's stable id for the person (`customerIdentities.subject`). */\n subject: string;\n email: string;\n /** Link to an existing customer by email ONLY when true (board 18's one security rule). */\n emailVerified: boolean;\n name?: string;\n picture?: string;\n returnUrl: string;\n}\n\n/** What the broker refuses, in its answer body `{ code }`. */\nexport enum BrokerRefusalCode {\n /** 403 — the return address is not one of this tenant's hosts. */\n ReturnHostRefused = 'return-host-refused',\n /** 400 */\n UnknownProvider = 'unknown-provider',\n /** 503 — no client id/secret for the provider in the broker's environment. */\n ProviderNotConfigured = 'provider-not-configured',\n /** 404 */\n CodeUnknown = 'code-unknown',\n /** 410 */\n CodeUsedOrExpired = 'code-used-or-expired',\n /** 403 — another tenant's code. */\n NotYours = 'not-yours',\n}\n\nexport const BROKER_REFUSAL_STATUS: Readonly<Record<BrokerRefusalCode, number>> = Object.freeze({\n [BrokerRefusalCode.ReturnHostRefused]: 403,\n [BrokerRefusalCode.UnknownProvider]: 400,\n [BrokerRefusalCode.ProviderNotConfigured]: 503,\n [BrokerRefusalCode.CodeUnknown]: 404,\n [BrokerRefusalCode.CodeUsedOrExpired]: 410,\n [BrokerRefusalCode.NotYours]: 403,\n});\n\nexport function isBrokerRefusalCode(value: unknown): value is BrokerRefusalCode {\n return typeof value === 'string' && (Object.values(BrokerRefusalCode) as string[]).includes(value);\n}\n\n// ── back from the broker ───────────────────────────────────────────────────────────────────────\n\n/** The hand-off code's query parameter on the return address. Never a name or an email in an address. */\nexport const SIGN_IN_HANDOFF_PARAM = 'iox_signin';\n/** The failure's query parameter on the return address. */\nexport const SIGN_IN_ERROR_PARAM = 'iox_signin_error';\n\n/** Why the browser came back without a person. */\nexport enum SignInReturnError {\n /** The person pressed Cancel on the provider's screen. */\n Cancelled = 'cancelled',\n /** The provider's answer failed a check (issuer, audience, nonce, an unverified email). */\n Refused = 'refused',\n /** The ticket or the provider's state had expired. */\n Expired = 'expired',\n Failed = 'failed',\n}\n\nexport function isSignInReturnError(value: unknown): value is SignInReturnError {\n return typeof value === 'string' && (Object.values(SignInReturnError) as string[]).includes(value);\n}\n\n/** The return address with `?iox_signin=<code>` added (its own query, `next`, kept). */\nexport function withSignInHandoff(returnUrl: string, code: string): string {\n return withParam(returnUrl, SIGN_IN_HANDOFF_PARAM, code);\n}\n\n/** The return address with `?iox_signin_error=<error>` added. */\nexport function withSignInError(returnUrl: string, error: SignInReturnError): string {\n return withParam(returnUrl, SIGN_IN_ERROR_PARAM, error);\n}\n\nfunction withParam(address: string, name: string, value: string): string {\n const url = new URL(address);\n url.searchParams.delete(SIGN_IN_HANDOFF_PARAM);\n url.searchParams.delete(SIGN_IN_ERROR_PARAM);\n url.searchParams.set(name, value);\n return url.toString();\n}\n\nexport type SignInReturn =\n | { readonly code: string; readonly error?: undefined }\n | { readonly code?: undefined; readonly error: SignInReturnError };\n\n/**\n * What came back on a return address's query (`?iox_signin=` or `?iox_signin_error=`), or null when neither did. An\n * error wins over a code; an unknown error reads `failed`; an empty code is no code.\n */\nexport function readSignInReturn(search: string | URLSearchParams | null | undefined): SignInReturn | null {\n const params = typeof search === 'string' ? new URLSearchParams(search.startsWith('?') ? search.slice(1) : search) : search;\n if (!params) return null;\n const error = params.get(SIGN_IN_ERROR_PARAM);\n if (error !== null) return { error: isSignInReturnError(error) ? error : SignInReturnError.Failed };\n const code = params.get(SIGN_IN_HANDOFF_PARAM)?.trim();\n return code ? { code } : null;\n}\n","/**\n * The two address checks every sign-in step leans on. Both REFUSE when in doubt: a sign-in that sends a person to the\n * wrong place is worse than one that sends them home.\n */\n\n/** Longer than any page path a site has; a longer `next` is refused. */\nexport const NEXT_PATH_MAX_LENGTH = 2048;\n\nconst PROBE_ORIGIN = 'https://same-origin.invalid';\n// Tab, newline and other control characters are stripped by browsers from a URL, so `/\\t/evil` becomes `//evil`.\nconst CONTROL = /[\\u0000-\\u001f\\u007f]/;\n\nfunction decodedOnce(value: string): string | null {\n try {\n return decodeURIComponent(value);\n } catch {\n return null;\n }\n}\n\n/**\n * True only for a path on THIS site — the `next` a sign-in returns to (the open-redirect guard). It must start with ONE\n * `/`, hold no backslash and no control character (raw or percent-encoded), and stay on the origin when a browser\n * resolves it. `//evil.com`, `/\\evil.com`, `/%2F%2Fevil.com`, `https://evil.com`, `javascript:` — all refused.\n */\nexport function isSameOriginPath(next: unknown): next is string {\n if (typeof next !== 'string' || !next || next.length > NEXT_PATH_MAX_LENGTH) return false;\n if (next[0] !== '/') return false;\n if (CONTROL.test(next) || next.includes('\\\\')) return false;\n const decoded = decodedOnce(next);\n if (decoded === null) return false;\n if (CONTROL.test(decoded) || decoded.includes('\\\\') || decoded.startsWith('//')) return false;\n if (next.startsWith('//')) return false;\n try {\n const url = new URL(next, PROBE_ORIGIN);\n return url.origin === PROBE_ORIGIN;\n } catch {\n return false;\n }\n}\n\n/** `next` when it is a same-origin path, else `fallback` (the site's home). */\nexport function safeNextPath(next: unknown, fallback = '/'): string {\n return isSameOriginPath(next) ? next : fallback;\n}\n\nconst LOOPBACK_HOSTS: ReadonlySet<string> = new Set(['localhost', '127.0.0.1', '[::1]']);\n\nexport function isLoopbackHost(hostname: string): boolean {\n return LOOPBACK_HOSTS.has(hostname.toLowerCase());\n}\n\nexport interface ReturnHostOptions {\n /** Accept `http:` on a loopback host (tests and local stacks only — never in production). */\n allowLoopbackHttp?: boolean;\n}\n\n/** A host as `URL` normalises it (lower case, punycode, the default port dropped), or null when it is not one. */\nexport function normalizeHost(host: string): string | null {\n const value = String(host ?? '').trim();\n if (!value || /[\\s/\\\\?#@]/.test(value)) return null;\n try {\n return new URL(`https://${value}`).host;\n } catch {\n return null;\n }\n}\n\n/**\n * True when `url` returns to one of `hosts` EXACTLY (the broker's return-host check, C-D22): `https:` only (`http:` on a\n * loopback host when asked), no user or password in it, and its host — punycode, with any non-default port — equal to\n * one allowed host. Never a suffix or a prefix: `evil.idos.iox.studio` and `idos.iox.studio.evil.com` are other hosts.\n */\nexport function isAllowedReturnHost(url: unknown, hosts: ReadonlyArray<string>, options: ReturnHostOptions = {}): boolean {\n if (typeof url !== 'string' || !url || CONTROL.test(url) || url.includes('\\\\')) return false;\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n return false;\n }\n if (parsed.username || parsed.password) return false;\n const loopback = isLoopbackHost(parsed.hostname);\n if (parsed.protocol !== 'https:' && !(parsed.protocol === 'http:' && loopback && options.allowLoopbackHttp)) return false;\n const host = parsed.host.toLowerCase();\n return hosts.some(allowed => normalizeHost(allowed) === host);\n}\n","import { safeNextPath } from './guards';\nimport { SignInProvider } from './sign-in';\n\n/**\n * A buyer's sign-in on a studio's site (commerce plan §3c, C-D5): iox-cms's public routes under `api/site/:orgId/`, the\n * session it issues, and the cookies it sets. A customer is not a user — its token has its OWN secret and audience and\n * every admin route refuses it (trap T3).\n */\n\nexport enum SiteAuthRoute {\n /** `POST { email }` → 202 always (never says whether the email is known). */\n Code = 'auth/code',\n /** `POST { email, code }` → the session. */\n CodeVerify = 'auth/code/verify',\n Refresh = 'auth/refresh',\n SignOut = 'auth/signout',\n /** `GET` → `{ customer }` (null when signed out). */\n Me = 'me',\n MyOrders = 'me/orders',\n}\n\n/** Every route a site's sign-in calls, by name (the provider pair is per provider — `siteProviderPath`). */\nexport const SITE_AUTH_ROUTES: Readonly<Record<keyof typeof SiteAuthRoute, SiteAuthRoute>> = Object.freeze({ ...SiteAuthRoute });\n\n/** A provider's two routes on the studio: start (`POST { returnPath }` → `{ startUrl }`) and return (the broker's GET). */\nexport enum SiteProviderRoute {\n Start = 'start',\n Return = 'return',\n}\n\nfunction siteBase(orgId: string): string {\n return `/api/site/${encodeURIComponent(orgId)}`;\n}\n\n/** A sign-in route of one org, ROOT-relative: `/api/site/<org>/<route>`. */\nexport function siteAuthPath(orgId: string, route: SiteAuthRoute): string {\n return `${siteBase(orgId)}/${route}`;\n}\n\n/** `/api/site/<org>/auth/<provider>/<start|return>`. */\nexport function siteProviderPath(orgId: string, provider: SignInProvider, route: SiteProviderRoute): string {\n return `${siteBase(orgId)}/auth/${encodeURIComponent(provider)}/${route}`;\n}\n\n/** The `next` query parameter of the return route — where the buyer lands after signing in. */\nexport const SIGN_IN_NEXT_PARAM = 'next';\n\n/**\n * The address the studio asks the broker to send the browser back to:\n * `https://<host>/api/site/<org>/auth/<provider>/return?next=<path>`. `origin` is the studio's own (`https://<host>`);\n * a `next` that is not a same-origin path becomes `/`.\n */\nexport function siteProviderReturnUrl(origin: string, orgId: string, provider: SignInProvider, next: string | null | undefined): string {\n const path = siteProviderPath(orgId, provider, SiteProviderRoute.Return);\n return `${origin.replace(/\\/+$/, '')}${path}?${SIGN_IN_NEXT_PARAM}=${encodeURIComponent(safeNextPath(next))}`;\n}\n\n// ── the requests and answers ───────────────────────────────────────────────────────────────────\n\nexport interface SiteProviderStartRequest {\n /** The page to come back to (a same-origin path). */\n returnPath: string;\n}\n\nexport interface SiteProviderStartAnswer {\n startUrl: string;\n}\n\nexport interface SiteCodeRequest {\n email: string;\n}\n\nexport interface SiteCodeVerifyRequest {\n email: string;\n code: string;\n}\n\n/** What a site may know about the signed-in buyer — nothing else (pages stay cacheable; personal parts fill in later). */\nexport interface SiteCustomer {\n id: string;\n email: string;\n name: string | null;\n}\n\n/** `GET me`, `POST auth/code/verify`, `POST auth/refresh`. */\nexport interface SiteMeAnswer {\n customer: SiteCustomer | null;\n}\n\n// ── the session ────────────────────────────────────────────────────────────────────────────────\n\n/** The buyer token's audience — never an admin token's. */\nexport const SITE_AUDIENCE = 'site';\n\n/** The buyer session's JWT claims. */\nexport interface SiteSessionClaims {\n /** The customer id. */\n sub: string;\n aud: typeof SITE_AUDIENCE;\n /** The org the customer belongs to — a session is good on ONE org's routes. */\n org: string;\n iat?: number;\n exp?: number;\n}\n\n/** True when `claims` carry the site audience and both ids — the shape `CustomerGuard` accepts (it checks the signature). */\nexport function isSiteSessionClaims(claims: unknown): claims is SiteSessionClaims {\n if (!claims || typeof claims !== 'object') return false;\n const c = claims as Record<string, unknown>;\n const aud = Array.isArray(c['aud']) ? c['aud'] : [c['aud']];\n return aud.includes(SITE_AUDIENCE) && typeof c['sub'] === 'string' && !!c['sub'] && typeof c['org'] === 'string' && !!c['org'];\n}\n\n/** True when a token's claims carry the site audience at all — what the admin guard refuses (T3). */\nexport function hasSiteAudience(claims: unknown): boolean {\n if (!claims || typeof claims !== 'object') return false;\n const aud = (claims as Record<string, unknown>)['aud'];\n return Array.isArray(aud) ? aud.includes(SITE_AUDIENCE) : aud === SITE_AUDIENCE;\n}\n\n// ── the cookies (per org: many orgs share one host — trap T10) ────────────────────────────────\n\n/** The buyer session: httpOnly, `Path=/` (the site's SSR reads it — the cart cookie's reason), SameSite=Lax. */\nexport const CUSTOMER_COOKIE_PREFIX = 'iox_c_';\n/** A Google sign-in in flight: httpOnly, short, holds a hash binding the ticket — a forged return fails without it. */\nexport const SIGN_IN_STATE_COOKIE_PREFIX = 'iox_si_';\nexport const SITE_COOKIE_PATH = '/';\n/** Long enough for a person on the provider's screen; the ticket inside expires long before. */\nexport const SIGN_IN_STATE_MAX_AGE_SECONDS = 600;\n\nexport function customerCookieName(orgId: string): string {\n return `${CUSTOMER_COOKIE_PREFIX}${orgId}`;\n}\n\nexport function signInStateCookieName(orgId: string): string {\n return `${SIGN_IN_STATE_COOKIE_PREFIX}${orgId}`;\n}\n\n// ── the email code ─────────────────────────────────────────────────────────────────────────────\n\nexport const EMAIL_CODE_LENGTH = 6;\nexport const EMAIL_CODE_TTL_MINUTES = 10;\nexport const EMAIL_CODE_TTL_MS = EMAIL_CODE_TTL_MINUTES * 60_000;\n/** Wrong codes before the code is spent and a new one must be sent. */\nexport const EMAIL_CODE_MAX_TRIES = 5;\n\nconst EMAIL_CODE = new RegExp(`^\\\\d{${EMAIL_CODE_LENGTH}}$`);\n\n/** A typed or pasted code as digits only (\"481 203\", \"481-203\" → \"481203\"); anything else is kept, to be refused. */\nexport function normalizeEmailCode(input: unknown): string {\n return String(input ?? '').replace(/[\\s-]/g, '');\n}\n\n/** Exactly six ASCII digits. */\nexport function isEmailCodeShape(code: unknown): boolean {\n return typeof code === 'string' && EMAIL_CODE.test(code);\n}\n\n/** An email as a studio keys its customers by (unique per org): trimmed, lower case. */\nexport function normalizeSignInEmail(email: unknown): string {\n return String(email ?? '').trim().toLowerCase();\n}\n\n/** Has the code outlived its ten minutes? `now` is the caller's — the core reads no clock. */\nexport function emailCodeExpired(sentAt: number | Date, now: number | Date): boolean {\n return +now - +sentAt >= EMAIL_CODE_TTL_MS;\n}\n\n/** How many more codes may be tried after `wrongTries` wrong ones (0 = the code is spent). */\nexport function emailCodeTriesLeft(wrongTries: number): number {\n return Math.max(0, EMAIL_CODE_MAX_TRIES - Math.max(0, Math.floor(wrongTries || 0)));\n}\n\n// ── the fixed account page (C-D3: fixed like checkout, the look's dress) ────────────────────────\n\nexport const ACCOUNT_PATH = 'account';\n\n/** The buyer's account page — their orders: `/<orgLabel>/account` (the engine answers it on every studio). */\nexport function accountHref(orgLabel?: string | null): string {\n const label = String(orgLabel ?? '').replace(/^\\/+|\\/+$/g, '');\n return label ? `/${encodeURIComponent(label)}/${ACCOUNT_PATH}` : `/${ACCOUNT_PATH}`;\n}\n","import { BrokerRefusalCode, SignInReturnError } from './sign-in';\n\n/**\n * The sign-in dialog's words and its refusals, in English and Hebrew. A string-rendered site has no translation\n * service, so the core carries both itself (commerce-core `CHECKOUT_WORDS` precedent); a host with its own translations\n * may key them by the stable codes instead.\n */\n\nexport interface SignInLabel {\n readonly en: string;\n readonly he: string;\n}\n\nexport enum SignInLanguage {\n En = 'en',\n He = 'he',\n}\n\nexport function signInLanguage(lang: string | null | undefined): SignInLanguage {\n const primary = String(lang ?? '').trim().toLowerCase().split(/[-_]/)[0];\n return primary === 'he' || primary === 'iw' ? SignInLanguage.He : SignInLanguage.En;\n}\n\nfunction fillIn(words: string, fill: Readonly<Record<string, string | number>>): string {\n return words.replace(/\\{(\\w+)\\}/g, (all, key) => (key in fill ? String(fill[key]) : all));\n}\n\nexport enum SignInWord {\n SignIn = 'signIn',\n SignInTo = 'signInTo',\n Why = 'why',\n ContinueWithGoogle = 'continueWithGoogle',\n Or = 'or',\n Email = 'email',\n EmailPlaceholder = 'emailPlaceholder',\n SendCode = 'sendCode',\n CodeSent = 'codeSent',\n Code = 'code',\n CodeValid = 'codeValid',\n SendAgain = 'sendAgain',\n Verify = 'verify',\n OtherEmail = 'otherEmail',\n Working = 'working',\n Close = 'close',\n SignOut = 'signOut',\n Account = 'account',\n YourOrders = 'yourOrders',\n Hello = 'hello',\n SignedIn = 'signedIn',\n SignedOut = 'signedOut',\n NoPassword = 'noPassword',\n}\n\n/** `{site}`, `{email}`, `{name}`, `{minutes}` are filled by `signInWord`. */\nexport const SIGN_IN_WORDS: Readonly<Record<SignInWord, SignInLabel>> = Object.freeze({\n [SignInWord.SignIn]: { en: 'Sign in', he: 'התחברות' },\n [SignInWord.SignInTo]: { en: 'Sign in to {site}', he: 'התחברות ל־{site}' },\n [SignInWord.Why]: { en: 'See your orders and check out faster.', he: 'לראות את ההזמנות שלך ולשלם מהר יותר.' },\n [SignInWord.ContinueWithGoogle]: { en: 'Continue with Google', he: 'המשך עם Google' },\n [SignInWord.Or]: { en: 'or', he: 'או' },\n [SignInWord.Email]: { en: 'Email', he: 'אימייל' },\n [SignInWord.EmailPlaceholder]: { en: 'name@example.com', he: 'name@example.com' },\n [SignInWord.SendCode]: { en: 'Send me a code', he: 'שלחו לי קוד' },\n [SignInWord.CodeSent]: { en: 'We sent a 6-digit code to {email}', he: 'שלחנו קוד בן 6 ספרות אל {email}' },\n [SignInWord.Code]: { en: 'Code', he: 'קוד' },\n [SignInWord.CodeValid]: { en: 'Valid for {minutes} minutes', he: 'בתוקף ל־{minutes} דקות' },\n [SignInWord.SendAgain]: { en: 'Send again', he: 'שליחה חוזרת' },\n [SignInWord.Verify]: { en: 'Sign in', he: 'התחברות' },\n [SignInWord.OtherEmail]: { en: 'Use another email', he: 'אימייל אחר' },\n [SignInWord.Working]: { en: 'One moment…', he: 'רגע…' },\n [SignInWord.Close]: { en: 'Close', he: 'סגירה' },\n [SignInWord.SignOut]: { en: 'Sign out', he: 'התנתקות' },\n [SignInWord.Account]: { en: 'Account', he: 'החשבון שלי' },\n [SignInWord.YourOrders]: { en: 'Your orders', he: 'ההזמנות שלך' },\n [SignInWord.Hello]: { en: 'Hello, {name}', he: 'שלום, {name}' },\n [SignInWord.SignedIn]: { en: 'You are signed in.', he: 'התחברת.' },\n [SignInWord.SignedOut]: { en: 'You are signed out.', he: 'התנתקת.' },\n [SignInWord.NoPassword]: { en: 'No password — we email you a code.', he: 'בלי סיסמה — נשלח לך קוד במייל.' },\n});\n\nexport function signInWord(word: SignInWord, lang: string | null | undefined, fill: Readonly<Record<string, string | number>> = {}): string {\n return fillIn(SIGN_IN_WORDS[word][signInLanguage(lang)], fill);\n}\n\n// ── a refusal, said on its field ─────────────────────────────────────────────────────────────\n\n/** Where in the sign-in dialog a refusal is said. */\nexport enum SignInSlot {\n Email = 'email',\n Code = 'code',\n /** Under \"Continue with Google\". */\n Provider = 'provider',\n /** The dialog as a whole. */\n Dialog = 'dialog',\n}\n\n/**\n * Every code a site's sign-in can hear: iox-cms's answers, the broker's return errors (`?iox_signin_error=`), and\n * `network` for no answer at all.\n */\nexport enum SiteSignInRefusalCode {\n InvalidEmail = 'invalid-email',\n CodeWrong = 'code-wrong',\n CodeExpired = 'code-expired',\n TooManyTries = 'too-many-tries',\n RateLimited = 'rate-limited',\n /** The broker cannot run the provider (down, not configured, the host refused). */\n ProviderUnavailable = 'provider-unavailable',\n Cancelled = 'cancelled',\n Refused = 'refused',\n Expired = 'expired',\n Failed = 'failed',\n /** The return came back without this browser's sign-in cookie — a forged or stale return. */\n StateMismatch = 'state-mismatch',\n Blocked = 'blocked',\n NotSignedIn = 'not-signed-in',\n Network = 'network',\n}\n\ninterface SignInRefusalRule {\n readonly slot: SignInSlot;\n readonly label: SignInLabel;\n}\n\nconst TRY_GOOGLE_AGAIN: SignInLabel = { en: 'Google sign-in did not work. Try again, or use an email code.', he: 'ההתחברות עם Google לא הצליחה. נסו שוב, או התחברו עם קוד במייל.' };\nconst SEND_NEW_CODE: SignInLabel = { en: 'This code has expired. Send a new one.', he: 'תוקף הקוד פג. שלחו קוד חדש.' };\n\nexport const SIGN_IN_REFUSALS: Readonly<Record<SiteSignInRefusalCode, SignInRefusalRule>> = Object.freeze({\n [SiteSignInRefusalCode.InvalidEmail]: { slot: SignInSlot.Email, label: { en: 'Enter an email address, like name@example.com.', he: 'הקלידו כתובת אימייל, למשל name@example.com.' } },\n [SiteSignInRefusalCode.CodeWrong]: { slot: SignInSlot.Code, label: { en: 'That code is not right. Check it and try again.', he: 'הקוד לא נכון. בדקו ונסו שוב.' } },\n [SiteSignInRefusalCode.CodeExpired]: { slot: SignInSlot.Code, label: SEND_NEW_CODE },\n [SiteSignInRefusalCode.TooManyTries]: { slot: SignInSlot.Code, label: { en: 'Too many wrong codes. Send a new one.', he: 'יותר מדי קודים שגויים. שלחו קוד חדש.' } },\n [SiteSignInRefusalCode.RateLimited]: { slot: SignInSlot.Dialog, label: { en: 'Too many tries. Wait a minute and try again.', he: 'יותר מדי ניסיונות. המתינו דקה ונסו שוב.' } },\n [SiteSignInRefusalCode.ProviderUnavailable]: { slot: SignInSlot.Provider, label: { en: 'Google sign-in is not available right now. Use an email code.', he: 'ההתחברות עם Google לא זמינה כרגע. התחברו עם קוד במייל.' } },\n [SiteSignInRefusalCode.Cancelled]: { slot: SignInSlot.Provider, label: { en: 'Google sign-in was cancelled.', he: 'ההתחברות עם Google בוטלה.' } },\n [SiteSignInRefusalCode.Refused]: { slot: SignInSlot.Provider, label: { en: 'Google could not confirm this account. Use an email code.', he: 'Google לא אישר את החשבון הזה. התחברו עם קוד במייל.' } },\n [SiteSignInRefusalCode.Expired]: { slot: SignInSlot.Provider, label: { en: 'The sign-in took too long. Try again.', he: 'ההתחברות ארכה יותר מדי. נסו שוב.' } },\n [SiteSignInRefusalCode.Failed]: { slot: SignInSlot.Provider, label: TRY_GOOGLE_AGAIN },\n [SiteSignInRefusalCode.StateMismatch]: { slot: SignInSlot.Provider, label: TRY_GOOGLE_AGAIN },\n [SiteSignInRefusalCode.Blocked]: { slot: SignInSlot.Dialog, label: { en: 'This account cannot sign in here. Contact the business.', he: 'החשבון הזה לא יכול להתחבר כאן. פנו לעסק.' } },\n [SiteSignInRefusalCode.NotSignedIn]: { slot: SignInSlot.Dialog, label: { en: 'You are signed out. Sign in again.', he: 'התנתקת. התחברו שוב.' } },\n [SiteSignInRefusalCode.Network]: { slot: SignInSlot.Dialog, label: { en: 'We could not reach the site. Try again.', he: 'לא הצלחנו להגיע לאתר. נסו שוב.' } },\n});\n\nexport function isSiteSignInRefusalCode(code: unknown): code is SiteSignInRefusalCode {\n return typeof code === 'string' && (Object.values(SiteSignInRefusalCode) as string[]).includes(code);\n}\n\n/** A broker refusal as the site says it: a person never hears \"return-host-refused\". */\nconst FROM_BROKER: Readonly<Record<BrokerRefusalCode, SiteSignInRefusalCode>> = Object.freeze({\n [BrokerRefusalCode.ReturnHostRefused]: SiteSignInRefusalCode.ProviderUnavailable,\n [BrokerRefusalCode.UnknownProvider]: SiteSignInRefusalCode.ProviderUnavailable,\n [BrokerRefusalCode.ProviderNotConfigured]: SiteSignInRefusalCode.ProviderUnavailable,\n [BrokerRefusalCode.CodeUnknown]: SiteSignInRefusalCode.Expired,\n [BrokerRefusalCode.CodeUsedOrExpired]: SiteSignInRefusalCode.Expired,\n [BrokerRefusalCode.NotYours]: SiteSignInRefusalCode.Failed,\n});\n\nconst FROM_RETURN: Readonly<Record<SignInReturnError, SiteSignInRefusalCode>> = Object.freeze({\n [SignInReturnError.Cancelled]: SiteSignInRefusalCode.Cancelled,\n [SignInReturnError.Refused]: SiteSignInRefusalCode.Refused,\n [SignInReturnError.Expired]: SiteSignInRefusalCode.Expired,\n [SignInReturnError.Failed]: SiteSignInRefusalCode.Failed,\n});\n\n/** Any code a sign-in heard, as the site's own: a site code as is, a broker code or a return error mapped, else `failed`. */\nexport function siteSignInCodeOf(code: unknown): SiteSignInRefusalCode {\n if (isSiteSignInRefusalCode(code)) return code;\n if (typeof code === 'string' && code in FROM_BROKER) return FROM_BROKER[code as BrokerRefusalCode];\n if (typeof code === 'string' && code in FROM_RETURN) return FROM_RETURN[code as SignInReturnError];\n return SiteSignInRefusalCode.Failed;\n}\n\nexport interface SignInRefusal {\n code: SiteSignInRefusalCode;\n slot: SignInSlot;\n words: string;\n}\n\n/** One refusal, on its slot, in the visitor's words. */\nexport function signInRefusal(code: unknown, lang: string | null | undefined): SignInRefusal {\n const known = siteSignInCodeOf(code);\n const rule = SIGN_IN_REFUSALS[known];\n return { code: known, slot: rule.slot, words: rule.label[signInLanguage(lang)] };\n}\n\n/** A refused call's body (`{ code }`) — or nothing at all (`network`) — as one refusal. The body's `message` is a log\n * line and is never shown. A 429 with no code is `rate-limited`. */\nexport function signInRefusalOf(body: unknown, lang: string | null | undefined, status?: number | null): SignInRefusal {\n const code = body && typeof body === 'object' ? (body as { code?: unknown }).code : undefined;\n if (code !== undefined) return signInRefusal(code, lang);\n if (status === 429) return signInRefusal(SiteSignInRefusalCode.RateLimited, lang);\n return signInRefusal(body === undefined || body === null ? SiteSignInRefusalCode.Network : SiteSignInRefusalCode.Failed, lang);\n}\n","import { isSameOriginPath } from './guards';\nimport { isEmailCodeShape, normalizeEmailCode, normalizeSignInEmail, SiteCustomer } from './site-auth';\nimport { brokerStartUrl, SignInProvider } from './sign-in';\nimport { SiteSignInRefusalCode, siteSignInCodeOf } from './words';\n\n/**\n * THE TRANSPORT a site's sign-in parts speak (commerce E3a, the `CartTransport` rule): the parts own no HTTP. The engine\n * implements it over iox-cms's site routes (`siteAuthPath`, `siteProviderPath`, the cookie carried by the browser); the\n * builder canvas uses `simulatedSiteAuthTransport` — the ADMIN's browser is never a buyer, so nothing is sent and no\n * session exists.\n */\nexport interface SiteAuthTransport {\n /** The signed-in buyer, or null. */\n me(): Promise<SiteCustomer | null>;\n /** Ask the studio to start a provider's sign-in; the answer is the address the browser goes to next. */\n startProvider(provider: SignInProvider, returnPath: string): Promise<{ startUrl: string }>;\n /** Send a code to `email` (the studio always accepts — it never says whether the email is known). */\n sendCode(email: string): Promise<void>;\n /** Check the code; the signed-in buyer. */\n verifyCode(email: string, code: string): Promise<SiteCustomer>;\n signOut(): Promise<void>;\n}\n\n/** A refused transport call, carrying the code the visitor's words come from (`signInRefusal`). */\nexport class SiteAuthError extends Error {\n readonly code: SiteSignInRefusalCode;\n\n constructor(code: unknown) {\n const known = siteSignInCodeOf(code);\n super(known);\n this.name = 'SiteAuthError';\n this.code = known;\n }\n}\n\n/** The code any thrown value carries: a `SiteAuthError`'s own, else `network` (the call never answered). */\nexport function siteAuthErrorCode(error: unknown): SiteSignInRefusalCode {\n return error instanceof SiteAuthError ? error.code : SiteSignInRefusalCode.Network;\n}\n\n/** The sample buyer the canvas signs in as. */\nexport const SAMPLE_CUSTOMER: Readonly<SiteCustomer> = Object.freeze({ id: 'sample-customer', email: 'noa.levi@example.com', name: 'Noa Levi' });\n\n/** The one code the simulated transport accepts (any other six digits are \"not right\" — so the error can be designed). */\nexport const SIMULATED_SIGN_IN_CODE = '123456';\n\nexport interface SimulatedSiteAuthTransport extends SiteAuthTransport {\n /** Who is signed in on the canvas right now. */\n readonly customer: SiteCustomer | null;\n setCustomer(customer: SiteCustomer | null): void;\n}\n\n/**\n * The canvas' transport: in memory, nothing sent. A code is \"sent\" to any well-formed email; `123456` signs in as the\n * sample buyer under the typed email, any other six digits are `code-wrong`; a provider's start answers the broker's\n * address with a sample ticket (the canvas host never follows it).\n */\nexport function simulatedSiteAuthTransport(start: SiteCustomer | null = null): SimulatedSiteAuthTransport {\n let customer: SiteCustomer | null = start;\n const sentTo = new Set<string>();\n return {\n get customer() {\n return customer;\n },\n setCustomer(next) {\n customer = next;\n },\n async me() {\n return customer;\n },\n async startProvider(provider, returnPath) {\n if (!isSameOriginPath(returnPath)) throw new SiteAuthError(SiteSignInRefusalCode.Failed);\n return { startUrl: brokerStartUrl(provider, 'sample-ticket') };\n },\n async sendCode(email) {\n const key = normalizeSignInEmail(email);\n if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(key)) throw new SiteAuthError(SiteSignInRefusalCode.InvalidEmail);\n sentTo.add(key);\n },\n async verifyCode(email, code) {\n const key = normalizeSignInEmail(email);\n const digits = normalizeEmailCode(code);\n if (!sentTo.has(key) || !isEmailCodeShape(digits)) throw new SiteAuthError(SiteSignInRefusalCode.CodeWrong);\n if (digits !== SIMULATED_SIGN_IN_CODE) throw new SiteAuthError(SiteSignInRefusalCode.CodeWrong);\n customer = { ...SAMPLE_CUSTOMER, email: key };\n return customer;\n },\n async signOut() {\n customer = null;\n },\n };\n}\n\n/** A transport that has nothing to reach: `me` is null, every change refused as `network`. */\nexport const NO_SITE_AUTH_TRANSPORT: SiteAuthTransport = Object.freeze({\n me: async () => null,\n startProvider: async () => { throw new SiteAuthError(SiteSignInRefusalCode.ProviderUnavailable); },\n sendCode: async () => { throw new SiteAuthError(SiteSignInRefusalCode.Network); },\n verifyCode: async () => { throw new SiteAuthError(SiteSignInRefusalCode.Network); },\n signOut: async () => undefined,\n});\n\n// ── what a page shows of the buyer ───────────────────────────────────────────────────────────\n\n/** The context slot the account parts bind to (`$customer.initial`, `$customer.name`). */\nexport const CUSTOMER_SLOT = '$customer';\n\n/** `$customer` — what a page may show of the buyer: never the id. */\nexport interface CustomerSlot {\n signedIn: boolean;\n name: string;\n /** The first letter of the name, else of the email; '' when signed out. */\n initial: string;\n email: string;\n}\n\n/** The first visible letter of a name or an email, upper-cased where the script has case. */\nexport function customerInitial(customer: Pick<SiteCustomer, 'name' | 'email'> | null | undefined): string {\n const source = (customer?.name ?? '').trim() || (customer?.email ?? '').trim();\n const first = Array.from(source)[0] ?? '';\n return first.toLocaleUpperCase();\n}\n\n/** The name a page greets with: the buyer's own, else the email's local part. */\nexport function customerDisplayName(customer: Pick<SiteCustomer, 'name' | 'email'> | null | undefined): string {\n const name = (customer?.name ?? '').trim();\n if (name) return name;\n return (customer?.email ?? '').split('@')[0] ?? '';\n}\n\nexport function customerSlotOf(customer: SiteCustomer | null | undefined): CustomerSlot {\n if (!customer) return { signedIn: false, name: '', initial: '', email: '' };\n return { signedIn: true, name: customerDisplayName(customer), initial: customerInitial(customer), email: customer.email };\n}\n","/**\n * @vectoriox/iox-ui/identity-core — the shared, FRAMEWORK-FREE vocabulary of signing in (commerce plan §3c, C-D5,\n * C-D6, C-D22): who signs in and with what, the broker's ticket / redeem shapes and refusals, a studio's site sign-in\n * routes, session claims and cookies, the email-code rules, the two address guards (open redirect, return host) and\n * the sign-in dialog's words. The broker (iox-control-plane), the studios (iox-cms), the engine and the builder speak it.\n * It imports nothing — a consumer maps this one entry.\n * ⚠️ Not re-exported from the main entry. Consumers wire the usual trio — ng-package raw-ts assets,\n * jest moduleNameMapper, tsconfig paths — or `nest start` dies with ERR_REQUIRE_ESM.\n */\nexport * from './sign-in';\nexport * from './guards';\nexport * from './site-auth';\nexport * from './words';\nexport * from './site-auth-transport';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;AAIG;AAEH;IACY;AAAZ,CAAA,UAAY,aAAa,EAAA;;AAErB,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;;AAEb,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;;AAEf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EAPW,aAAa,KAAb,aAAa,GAAA,EAAA,CAAA,CAAA;AASzB;IACY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,cAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACzB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;AAO1B;IACY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EAHW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;AAanB,MAAM,sBAAsB,GAAyD,MAAM,CAAC,MAAM,CAAC;AACtG,IAAA,CAAC,cAAc,CAAC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rxjs';
|
|
|
6
6
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
8
8
|
import { CommonModule, isPlatformBrowser } from '@angular/common';
|
|
9
|
-
import { SPEC_AXES, resolveDesignMotion, HeaderAttribute, HeaderBehaviour, headerAttributes, HeaderTrait } from '@vectoriox/iox-ui/design-core';
|
|
9
|
+
import { SPEC_AXES, resolveDesignMotion, FieldClass, HeaderAttribute, HeaderBehaviour, headerAttributes, HeaderTrait, writeFieldError } from '@vectoriox/iox-ui/design-core';
|
|
10
10
|
export * from '@vectoriox/iox-ui/design-core';
|
|
11
11
|
import Lenis from 'lenis';
|
|
12
12
|
import { SLIDER_WORDS, sliderPartElement, SliderRole, sliderWords, attachCarouselA11y, attachSliderBar, isSliderPart, MARQUEE_NODE_ATTRIBUTES, SLIDE_TYPE, SLIDE_CAPTION_TRAIT, marqueeRootAttributes, MarqueeRole } from '@vectoriox/iox-ui/composite-core';
|
|
@@ -5446,29 +5446,6 @@ function channelOpensNewTab(kind) {
|
|
|
5446
5446
|
*
|
|
5447
5447
|
* Framework-free, like the rest of forms-core: `escape` is the caller's.
|
|
5448
5448
|
*/
|
|
5449
|
-
/** The classes the markup carries — the runtimes and the shared CSS key on these, never on a literal. */
|
|
5450
|
-
var FieldClass;
|
|
5451
|
-
(function (FieldClass) {
|
|
5452
|
-
FieldClass["Root"] = "iox-field";
|
|
5453
|
-
FieldClass["Label"] = "iox-field__label";
|
|
5454
|
-
FieldClass["LabelHidden"] = "iox-field__label--hidden";
|
|
5455
|
-
FieldClass["Required"] = "iox-field__required";
|
|
5456
|
-
FieldClass["Control"] = "iox-field__control";
|
|
5457
|
-
FieldClass["Help"] = "iox-field__help";
|
|
5458
|
-
FieldClass["Error"] = "iox-field__error";
|
|
5459
|
-
FieldClass["Group"] = "iox-field__group";
|
|
5460
|
-
FieldClass["Option"] = "iox-field__option";
|
|
5461
|
-
FieldClass["Choices"] = "iox-field__choices";
|
|
5462
|
-
FieldClass["ChoicesChips"] = "iox-field__choices--chips";
|
|
5463
|
-
FieldClass["ChoicesList"] = "iox-field__choices--list";
|
|
5464
|
-
FieldClass["Chips"] = "iox-field__chips";
|
|
5465
|
-
FieldClass["Chip"] = "iox-field__chip";
|
|
5466
|
-
FieldClass["ChipInput"] = "iox-field__control--chip";
|
|
5467
|
-
FieldClass["DateButton"] = "iox-field__control--date";
|
|
5468
|
-
FieldClass["DateValue"] = "iox-field__date-value";
|
|
5469
|
-
FieldClass["DateIcon"] = "iox-field__date-icon";
|
|
5470
|
-
FieldClass["DateInput"] = "iox-field__date-input";
|
|
5471
|
-
})(FieldClass || (FieldClass = {}));
|
|
5472
5449
|
/** On the date button: the raw Earliest / Latest (`'0'`, an ISO day), resolved by the visitor's own today. */
|
|
5473
5450
|
const DATE_MIN_ATTRIBUTE = 'data-iox-date-min';
|
|
5474
5451
|
const DATE_MAX_ATTRIBUTE = 'data-iox-date-max';
|
|
@@ -11879,9 +11856,6 @@ function playDualLayerTransition(resolved, layers) {
|
|
|
11879
11856
|
|
|
11880
11857
|
const FIELD_ATTRIBUTE = 'data-iox-field';
|
|
11881
11858
|
const CONTROL_CLASS = 'iox-field__control';
|
|
11882
|
-
const ERROR_CLASS = 'iox-field__error';
|
|
11883
|
-
const HELP_CLASS = 'iox-field__help';
|
|
11884
|
-
const INVALID_CLASS = 'iox-invalid';
|
|
11885
11859
|
const BOOTED = '__ioxStringForm';
|
|
11886
11860
|
/**
|
|
11887
11861
|
* A form the SSR engine's string renderer wrote — every header / footer global, every string-rendered page —
|
|
@@ -12062,38 +12036,7 @@ class StringFormRuntime {
|
|
|
12062
12036
|
const error = this.state.errors[field.name];
|
|
12063
12037
|
const shown = !!error && shouldShowError(field.name, this.state, this.spec.feedback);
|
|
12064
12038
|
const text = shown ? this.messages(error.messageKey, error.params) : '';
|
|
12065
|
-
el
|
|
12066
|
-
this.renderError(el, shown ? text : '');
|
|
12067
|
-
}
|
|
12068
|
-
}
|
|
12069
|
-
renderError(field, text) {
|
|
12070
|
-
const controls = this.controlsOf(field);
|
|
12071
|
-
const id = (controls[0]?.id || `iox-field-${field.getAttribute(FIELD_ATTRIBUTE)}`) + '-error';
|
|
12072
|
-
let p = field.querySelector(`.${ERROR_CLASS}`);
|
|
12073
|
-
if (text) {
|
|
12074
|
-
if (!p) {
|
|
12075
|
-
p = field.ownerDocument.createElement('p');
|
|
12076
|
-
p.className = ERROR_CLASS;
|
|
12077
|
-
p.id = id;
|
|
12078
|
-
p.setAttribute('role', 'alert');
|
|
12079
|
-
field.appendChild(p);
|
|
12080
|
-
}
|
|
12081
|
-
p.textContent = text;
|
|
12082
|
-
}
|
|
12083
|
-
else {
|
|
12084
|
-
p?.remove();
|
|
12085
|
-
}
|
|
12086
|
-
const helpId = field.querySelector(`.${HELP_CLASS}`)?.id;
|
|
12087
|
-
const describedBy = [helpId, text ? id : ''].filter(Boolean).join(' ');
|
|
12088
|
-
for (const control of controls) {
|
|
12089
|
-
if (text)
|
|
12090
|
-
control.setAttribute('aria-invalid', 'true');
|
|
12091
|
-
else
|
|
12092
|
-
control.removeAttribute('aria-invalid');
|
|
12093
|
-
if (describedBy)
|
|
12094
|
-
control.setAttribute('aria-describedby', describedBy);
|
|
12095
|
-
else
|
|
12096
|
-
control.removeAttribute('aria-describedby');
|
|
12039
|
+
writeFieldError(el, shown ? text : '');
|
|
12097
12040
|
}
|
|
12098
12041
|
}
|
|
12099
12042
|
announce(errors) {
|