@atlasauth/angular 0.15.1 → 0.16.1
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/CHANGELOG.md +8 -0
- package/dist/esm2022/lib/components/attempt-flow.component.mjs +88 -13
- package/dist/esm2022/lib/components/email-link.component.mjs +103 -0
- package/dist/esm2022/lib/components/flow-controller.mjs +6 -3
- package/dist/esm2022/lib/components/sign-in.component.mjs +22 -5
- package/dist/esm2022/lib/components/sign-up.component.mjs +24 -5
- package/dist/esm2022/lib/i18n.mjs +19 -1
- package/dist/esm2022/lib/version.mjs +2 -2
- package/dist/esm2022/public-api.mjs +2 -1
- package/dist/fesm2022/atlasauth-angular.mjs +248 -23
- package/dist/fesm2022/atlasauth-angular.mjs.map +1 -1
- package/dist/lib/components/attempt-flow.component.d.ts +8 -1
- package/dist/lib/components/email-link.component.d.ts +26 -0
- package/dist/lib/components/sign-in.component.d.ts +4 -0
- package/dist/lib/components/sign-up.component.d.ts +4 -0
- package/dist/lib/version.d.ts +1 -1
- package/dist/public-api.d.ts +1 -0
- package/package.json +4 -4
|
@@ -33,6 +33,8 @@ export declare class AttemptFlowComponent {
|
|
|
33
33
|
/** `FlowState.sessionKept`: whether this browser kept the session the sign-in created. */
|
|
34
34
|
sessionKept: boolean | undefined;
|
|
35
35
|
titleKey: string;
|
|
36
|
+
/** Sign-up only: the sign-in link beside the code step's "an account already uses this email". */
|
|
37
|
+
signInHref: string | null;
|
|
36
38
|
/**
|
|
37
39
|
* The sign-in captcha, drawn above the submit button on the identifier step
|
|
38
40
|
* (an always-on sign-in captcha) and on the challenge step the server demands
|
|
@@ -96,6 +98,8 @@ export declare class AttemptFlowComponent {
|
|
|
96
98
|
* while the flow polls, and offers a resend (`resend`).
|
|
97
99
|
*/
|
|
98
100
|
emailVerification: string;
|
|
101
|
+
/** `FlowState.matchCode`: shown while a mailed link waits, to type if it's opened on another device. */
|
|
102
|
+
matchCode: string | null;
|
|
99
103
|
resend: EventEmitter<void>;
|
|
100
104
|
/** The user declined a policy the sign-in was waiting on (`needs_policy_acceptance`): cancel the attempt. */
|
|
101
105
|
policyDeclined: EventEmitter<string>;
|
|
@@ -110,6 +114,8 @@ export declare class AttemptFlowComponent {
|
|
|
110
114
|
protected enrolling(): boolean;
|
|
111
115
|
protected chooseMethod(method: MfaEnrollmentStrategy): void;
|
|
112
116
|
protected resendEnrollment(): void;
|
|
117
|
+
protected optionKey(method: MfaEnrollmentStrategy): string;
|
|
118
|
+
protected showMatchCode(): boolean;
|
|
113
119
|
protected otherMethods(state: MfaEnrollmentState): MfaEnrollmentStrategy[];
|
|
114
120
|
protected setupKey(secret: string): string;
|
|
115
121
|
/** The submit button's label key (enrolment: "Text me a code" before the number is sent). */
|
|
@@ -118,6 +124,7 @@ export declare class AttemptFlowComponent {
|
|
|
118
124
|
/** Where the texted second-factor code went (masked), once it was sent. */
|
|
119
125
|
protected smsSecondFactorSentTo(): string | null;
|
|
120
126
|
protected formErrors(): FieldError[];
|
|
127
|
+
protected signInLink(error: FieldError): string | null;
|
|
121
128
|
protected fieldErrorsFor(name: string): FieldError[];
|
|
122
129
|
protected step(): {
|
|
123
130
|
kind: "collect_first_factor";
|
|
@@ -169,6 +176,6 @@ export declare class AttemptFlowComponent {
|
|
|
169
176
|
protected showSubmit(): boolean;
|
|
170
177
|
protected fields(): StepField[];
|
|
171
178
|
static ɵfac: i0.ɵɵFactoryDeclaration<AttemptFlowComponent, never>;
|
|
172
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AttemptFlowComponent, "atlas-attempt-flow", never, { "attempt": { "alias": "attempt"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "sessionKept": { "alias": "sessionKept"; "required": false; }; "titleKey": { "alias": "titleKey"; "required": false; }; "captcha": { "alias": "captcha"; "required": false; }; "firstFactors": { "alias": "firstFactors"; "required": false; }; "preparedFactor": { "alias": "preparedFactor"; "required": false; }; "passwordHold": { "alias": "passwordHold"; "required": false; }; "holdProof": { "alias": "holdProof"; "required": false; }; "offerEmailSecondFactor": { "alias": "offerEmailSecondFactor"; "required": false; }; "emailedSecondFactor": { "alias": "emailedSecondFactor"; "required": false; }; "offerSmsSecondFactor": { "alias": "offerSmsSecondFactor"; "required": false; }; "textedSecondFactor": { "alias": "textedSecondFactor"; "required": false; }; "enrollment": { "alias": "enrollment"; "required": false; }; "enrollmentState": { "alias": "enrollmentState"; "required": false; }; "emailVerification": { "alias": "emailVerification"; "required": false; }; }, { "submitFlow": "submitFlow"; "chooseFactor": "chooseFactor"; "usePassword": "usePassword"; "emailSecondFactor": "emailSecondFactor"; "smsSecondFactor": "smsSecondFactor"; "resend": "resend"; "policyDeclined": "policyDeclined"; }, never, never, true, never>;
|
|
179
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AttemptFlowComponent, "atlas-attempt-flow", never, { "attempt": { "alias": "attempt"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "sessionKept": { "alias": "sessionKept"; "required": false; }; "titleKey": { "alias": "titleKey"; "required": false; }; "signInHref": { "alias": "signInHref"; "required": false; }; "captcha": { "alias": "captcha"; "required": false; }; "firstFactors": { "alias": "firstFactors"; "required": false; }; "preparedFactor": { "alias": "preparedFactor"; "required": false; }; "passwordHold": { "alias": "passwordHold"; "required": false; }; "holdProof": { "alias": "holdProof"; "required": false; }; "offerEmailSecondFactor": { "alias": "offerEmailSecondFactor"; "required": false; }; "emailedSecondFactor": { "alias": "emailedSecondFactor"; "required": false; }; "offerSmsSecondFactor": { "alias": "offerSmsSecondFactor"; "required": false; }; "textedSecondFactor": { "alias": "textedSecondFactor"; "required": false; }; "enrollment": { "alias": "enrollment"; "required": false; }; "enrollmentState": { "alias": "enrollmentState"; "required": false; }; "emailVerification": { "alias": "emailVerification"; "required": false; }; "matchCode": { "alias": "matchCode"; "required": false; }; }, { "submitFlow": "submitFlow"; "chooseFactor": "chooseFactor"; "usePassword": "usePassword"; "emailSecondFactor": "emailSecondFactor"; "smsSecondFactor": "smsSecondFactor"; "resend": "resend"; "policyDeclined": "policyDeclined"; }, never, never, true, never>;
|
|
173
180
|
}
|
|
174
181
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type EmailLink, type EmailLinkConfirmationState, type FieldError } from '@atlasauth/js';
|
|
3
|
+
import { type ElementKey } from '../appearance';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* What `<atlas-sign-in>` / `<atlas-sign-up>` draw when opened from a mailed link:
|
|
7
|
+
* tries this browser's stored secret, then asks for the code the starting tab
|
|
8
|
+
* shows. A success signs nobody in here: the starting tab continues on its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare class EmailLinkComponent implements OnInit, OnDestroy {
|
|
11
|
+
private readonly atlas;
|
|
12
|
+
link: EmailLink;
|
|
13
|
+
protected readonly state: import("@angular/core").WritableSignal<EmailLinkConfirmationState>;
|
|
14
|
+
protected code: string;
|
|
15
|
+
private controller;
|
|
16
|
+
private stop;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
protected onSubmit(event: Event): void;
|
|
20
|
+
protected message(): string;
|
|
21
|
+
protected t(key: string): string;
|
|
22
|
+
protected cls(key: ElementKey, base: string): string;
|
|
23
|
+
protected errorText(error: FieldError): string;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EmailLinkComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmailLinkComponent, "atlas-email-link", never, { "link": { "alias": "link"; "required": true; }; }, {}, never, never, true, never>;
|
|
26
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type EmailLink } from '@atlasauth/js';
|
|
2
3
|
import { AtlasFlowController } from './flow-controller';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
@@ -13,6 +14,9 @@ import * as i0 from "@angular/core";
|
|
|
13
14
|
*/
|
|
14
15
|
export declare class SignInComponent implements OnInit, OnDestroy {
|
|
15
16
|
private readonly atlas;
|
|
17
|
+
/** Opened from a mailed link: that page, not the flow. Read after the first render, so hydration matches. */
|
|
18
|
+
protected readonly emailLink: import("@angular/core").WritableSignal<EmailLink>;
|
|
19
|
+
constructor();
|
|
16
20
|
/** Where to send the user once the flow completes. Reserved for host routing. */
|
|
17
21
|
afterUrl?: string;
|
|
18
22
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { type EmailLink } from '@atlasauth/js';
|
|
2
3
|
import { type FieldError } from '@atlasauth/js';
|
|
3
4
|
import { type ElementKey } from '../appearance';
|
|
4
5
|
import { AtlasFlowController } from './flow-controller';
|
|
@@ -17,6 +18,9 @@ import * as i0 from "@angular/core";
|
|
|
17
18
|
*/
|
|
18
19
|
export declare class SignUpComponent implements OnInit, OnDestroy {
|
|
19
20
|
private readonly atlas;
|
|
21
|
+
/** Opened from a mailed link: that page, not the flow. Read after the first render, so hydration matches. */
|
|
22
|
+
protected readonly emailLink: import("@angular/core").WritableSignal<EmailLink>;
|
|
23
|
+
constructor();
|
|
20
24
|
/** Where to send the user once the flow completes. Reserved for host routing. */
|
|
21
25
|
afterUrl?: string;
|
|
22
26
|
/** Where the existing-account notice's "Forgot password?" goes. Default: the hosted sign-in page; `null` hides it. */
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AtlasSdkInfo } from '@atlasauth/js';
|
|
2
2
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
3
|
-
export declare const ATLAS_ANGULAR_VERSION = "0.
|
|
3
|
+
export declare const ATLAS_ANGULAR_VERSION = "0.16.1";
|
|
4
4
|
export declare const ATLAS_ANGULAR_SDK: AtlasSdkInfo;
|
package/dist/public-api.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { AtlasOrganizationAuditLog } from './lib/components/organization-audit-l
|
|
|
23
23
|
export type { OrganizationAuditLogEntry, OrganizationAuditLogState, OrganizationAuditLogOptions } from '@atlasauth/js';
|
|
24
24
|
export { ImpersonationBannerComponent } from './lib/components/impersonation-banner.component';
|
|
25
25
|
export { AttemptFlowComponent } from './lib/components/attempt-flow.component';
|
|
26
|
+
export { EmailLinkComponent } from './lib/components/email-link.component';
|
|
26
27
|
export { SignUpFormComponent, type SignUpFormSubmit, } from './lib/components/sign-up-form.component';
|
|
27
28
|
export { AtlasCaptchaSlotDirective } from './lib/directives/captcha-slot.directive';
|
|
28
29
|
export { AtlasPoliciesDirective, PolicyAcceptStepComponent, PolicyGateComponent } from './lib/components/policy-host';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasauth/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Official Angular SDK for Atlas — the Angular peer of @atlasauth/react.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "./dist/fesm2022/atlasauth-angular.mjs",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"sideEffects": false,
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"tslib": "^2.6.3",
|
|
22
|
-
"@atlasauth/
|
|
23
|
-
"@atlasauth/
|
|
24
|
-
"@atlasauth/
|
|
22
|
+
"@atlasauth/design": "0.3.0",
|
|
23
|
+
"@atlasauth/js": "0.34.0",
|
|
24
|
+
"@atlasauth/authz": "0.3.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@angular/core": ">=17",
|