@atlasauth/angular 0.16.0 → 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 +4 -0
- package/dist/esm2022/lib/components/attempt-flow.component.mjs +21 -4
- package/dist/esm2022/lib/components/sign-in.component.mjs +2 -2
- package/dist/esm2022/lib/components/sign-up.component.mjs +4 -2
- package/dist/esm2022/lib/version.mjs +2 -2
- package/dist/fesm2022/atlasauth-angular.mjs +25 -6
- package/dist/fesm2022/atlasauth-angular.mjs.map +1 -1
- package/dist/lib/components/attempt-flow.component.d.ts +4 -1
- package/dist/lib/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -421,7 +421,7 @@ function withFallback(locale) {
|
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
/** This package's version, sent as `X-Atlas-SDK` (kept in step with package.json by a test). */
|
|
424
|
-
const ATLAS_ANGULAR_VERSION = '0.16.
|
|
424
|
+
const ATLAS_ANGULAR_VERSION = '0.16.1';
|
|
425
425
|
const ATLAS_ANGULAR_SDK = { name: '@atlasauth/angular', version: ATLAS_ANGULAR_VERSION };
|
|
426
426
|
|
|
427
427
|
/**
|
|
@@ -1499,6 +1499,8 @@ class AttemptFlowComponent {
|
|
|
1499
1499
|
/** `FlowState.sessionKept`: whether this browser kept the session the sign-in created. */
|
|
1500
1500
|
sessionKept = undefined;
|
|
1501
1501
|
titleKey = 'signIn.title';
|
|
1502
|
+
/** Sign-up only: the sign-in link beside the code step's "an account already uses this email". */
|
|
1503
|
+
signInHref = null;
|
|
1502
1504
|
/**
|
|
1503
1505
|
* The sign-in captcha, drawn above the submit button on the identifier step
|
|
1504
1506
|
* (an always-on sign-in captcha) and on the challenge step the server demands
|
|
@@ -1630,6 +1632,9 @@ class AttemptFlowComponent {
|
|
|
1630
1632
|
formErrors() {
|
|
1631
1633
|
return this.errors.filter((error) => !error.param);
|
|
1632
1634
|
}
|
|
1635
|
+
signInLink(error) {
|
|
1636
|
+
return this.step().kind === 'collect_email_code' && error.code === 'IDENTIFIER_EXISTS' ? this.signInHref : null;
|
|
1637
|
+
}
|
|
1633
1638
|
fieldErrorsFor(name) {
|
|
1634
1639
|
return this.errors.filter((error) => error.param === name);
|
|
1635
1640
|
}
|
|
@@ -1756,12 +1761,17 @@ class AttemptFlowComponent {
|
|
|
1756
1761
|
}
|
|
1757
1762
|
}
|
|
1758
1763
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AttemptFlowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1759
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AttemptFlowComponent, isStandalone: true, selector: "atlas-attempt-flow", inputs: { attempt: "attempt", busy: "busy", errors: "errors", sessionKept: "sessionKept", titleKey: "titleKey", captcha: "captcha", firstFactors: "firstFactors", preparedFactor: "preparedFactor", passwordHold: "passwordHold", holdProof: "holdProof", offerEmailSecondFactor: "offerEmailSecondFactor", emailedSecondFactor: "emailedSecondFactor", offerSmsSecondFactor: "offerSmsSecondFactor", textedSecondFactor: "textedSecondFactor", enrollment: "enrollment", enrollmentState: "enrollmentState", emailVerification: "emailVerification", matchCode: "matchCode" }, outputs: { submitFlow: "submitFlow", chooseFactor: "chooseFactor", usePassword: "usePassword", emailSecondFactor: "emailSecondFactor", smsSecondFactor: "smsSecondFactor", resend: "resend", policyDeclined: "policyDeclined" }, ngImport: i0, template: `
|
|
1764
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: AttemptFlowComponent, isStandalone: true, selector: "atlas-attempt-flow", inputs: { attempt: "attempt", busy: "busy", errors: "errors", sessionKept: "sessionKept", titleKey: "titleKey", signInHref: "signInHref", captcha: "captcha", firstFactors: "firstFactors", preparedFactor: "preparedFactor", passwordHold: "passwordHold", holdProof: "holdProof", offerEmailSecondFactor: "offerEmailSecondFactor", emailedSecondFactor: "emailedSecondFactor", offerSmsSecondFactor: "offerSmsSecondFactor", textedSecondFactor: "textedSecondFactor", enrollment: "enrollment", enrollmentState: "enrollmentState", emailVerification: "emailVerification", matchCode: "matchCode" }, outputs: { submitFlow: "submitFlow", chooseFactor: "chooseFactor", usePassword: "usePassword", emailSecondFactor: "emailSecondFactor", smsSecondFactor: "smsSecondFactor", resend: "resend", policyDeclined: "policyDeclined" }, ngImport: i0, template: `
|
|
1760
1765
|
<div [class]="cls('card', 'atlas-card')">
|
|
1761
1766
|
<h1 [class]="cls('headerTitle', 'atlas-title')">{{ t(titleKey) }}</h1>
|
|
1762
1767
|
|
|
1763
1768
|
@for (error of formErrors(); track error.code) {
|
|
1764
|
-
<p [class]="cls('formFieldError', 'atlas-error')" role="alert">
|
|
1769
|
+
<p [class]="cls('formFieldError', 'atlas-error')" role="alert">
|
|
1770
|
+
{{ errorText(error) }}
|
|
1771
|
+
@if (signInLink(error); as href) {
|
|
1772
|
+
<a class="atlas-link" [href]="href">{{ t('signIn.title') }}</a>
|
|
1773
|
+
}
|
|
1774
|
+
</p>
|
|
1765
1775
|
}
|
|
1766
1776
|
|
|
1767
1777
|
<form (submit)="onSubmit($event)">
|
|
@@ -2027,7 +2037,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2027
2037
|
<h1 [class]="cls('headerTitle', 'atlas-title')">{{ t(titleKey) }}</h1>
|
|
2028
2038
|
|
|
2029
2039
|
@for (error of formErrors(); track error.code) {
|
|
2030
|
-
<p [class]="cls('formFieldError', 'atlas-error')" role="alert">
|
|
2040
|
+
<p [class]="cls('formFieldError', 'atlas-error')" role="alert">
|
|
2041
|
+
{{ errorText(error) }}
|
|
2042
|
+
@if (signInLink(error); as href) {
|
|
2043
|
+
<a class="atlas-link" [href]="href">{{ t('signIn.title') }}</a>
|
|
2044
|
+
}
|
|
2045
|
+
</p>
|
|
2031
2046
|
}
|
|
2032
2047
|
|
|
2033
2048
|
<form (submit)="onSubmit($event)">
|
|
@@ -2291,6 +2306,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2291
2306
|
type: Input
|
|
2292
2307
|
}], titleKey: [{
|
|
2293
2308
|
type: Input
|
|
2309
|
+
}], signInHref: [{
|
|
2310
|
+
type: Input
|
|
2294
2311
|
}], captcha: [{
|
|
2295
2312
|
type: Input
|
|
2296
2313
|
}], firstFactors: [{
|
|
@@ -3155,7 +3172,7 @@ class SignInComponent {
|
|
|
3155
3172
|
</p>
|
|
3156
3173
|
}
|
|
3157
3174
|
}
|
|
3158
|
-
`, isInline: true, dependencies: [{ kind: "component", type: EmailLinkComponent, selector: "atlas-email-link", inputs: ["link"] }, { kind: "component", type: AttemptFlowComponent, selector: "atlas-attempt-flow", inputs: ["attempt", "busy", "errors", "sessionKept", "titleKey", "captcha", "firstFactors", "preparedFactor", "passwordHold", "holdProof", "offerEmailSecondFactor", "emailedSecondFactor", "offerSmsSecondFactor", "textedSecondFactor", "enrollment", "enrollmentState", "emailVerification", "matchCode"], outputs: ["submitFlow", "chooseFactor", "usePassword", "emailSecondFactor", "smsSecondFactor", "resend", "policyDeclined"] }, { kind: "component", type: RecoveryCodesComponent, selector: "atlas-recovery-codes", inputs: ["codes", "busy"], outputs: ["saved"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3175
|
+
`, isInline: true, dependencies: [{ kind: "component", type: EmailLinkComponent, selector: "atlas-email-link", inputs: ["link"] }, { kind: "component", type: AttemptFlowComponent, selector: "atlas-attempt-flow", inputs: ["attempt", "busy", "errors", "sessionKept", "titleKey", "signInHref", "captcha", "firstFactors", "preparedFactor", "passwordHold", "holdProof", "offerEmailSecondFactor", "emailedSecondFactor", "offerSmsSecondFactor", "textedSecondFactor", "enrollment", "enrollmentState", "emailVerification", "matchCode"], outputs: ["submitFlow", "chooseFactor", "usePassword", "emailSecondFactor", "smsSecondFactor", "resend", "policyDeclined"] }, { kind: "component", type: RecoveryCodesComponent, selector: "atlas-recovery-codes", inputs: ["codes", "busy"], outputs: ["saved"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3159
3176
|
}
|
|
3160
3177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SignInComponent, decorators: [{
|
|
3161
3178
|
type: Component,
|
|
@@ -3931,6 +3948,7 @@ class SignUpComponent {
|
|
|
3931
3948
|
(emailSecondFactor)="flow.sendEmailSecondFactor()"
|
|
3932
3949
|
(smsSecondFactor)="flow.sendSmsSecondFactor()"
|
|
3933
3950
|
(policyDeclined)="flow.declinePolicy($event)"
|
|
3951
|
+
[signInHref]="signInHref()"
|
|
3934
3952
|
></atlas-attempt-flow>
|
|
3935
3953
|
} @else {
|
|
3936
3954
|
<atlas-sign-up-form
|
|
@@ -3948,7 +3966,7 @@ class SignUpComponent {
|
|
|
3948
3966
|
></atlas-sign-up-form>
|
|
3949
3967
|
}
|
|
3950
3968
|
}
|
|
3951
|
-
`, isInline: true, dependencies: [{ kind: "component", type: EmailLinkComponent, selector: "atlas-email-link", inputs: ["link"] }, { kind: "component", type: AttemptFlowComponent, selector: "atlas-attempt-flow", inputs: ["attempt", "busy", "errors", "sessionKept", "titleKey", "captcha", "firstFactors", "preparedFactor", "passwordHold", "holdProof", "offerEmailSecondFactor", "emailedSecondFactor", "offerSmsSecondFactor", "textedSecondFactor", "enrollment", "enrollmentState", "emailVerification", "matchCode"], outputs: ["submitFlow", "chooseFactor", "usePassword", "emailSecondFactor", "smsSecondFactor", "resend", "policyDeclined"] }, { kind: "component", type: RecoveryCodesComponent, selector: "atlas-recovery-codes", inputs: ["codes", "busy"], outputs: ["saved"] }, { kind: "component", type: SignUpFormComponent, selector: "atlas-sign-up-form", inputs: ["settings", "busy", "errors", "captcha", "passkey", "switchable", "policies"], outputs: ["switchMode", "submitSignUp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3969
|
+
`, isInline: true, dependencies: [{ kind: "component", type: EmailLinkComponent, selector: "atlas-email-link", inputs: ["link"] }, { kind: "component", type: AttemptFlowComponent, selector: "atlas-attempt-flow", inputs: ["attempt", "busy", "errors", "sessionKept", "titleKey", "signInHref", "captcha", "firstFactors", "preparedFactor", "passwordHold", "holdProof", "offerEmailSecondFactor", "emailedSecondFactor", "offerSmsSecondFactor", "textedSecondFactor", "enrollment", "enrollmentState", "emailVerification", "matchCode"], outputs: ["submitFlow", "chooseFactor", "usePassword", "emailSecondFactor", "smsSecondFactor", "resend", "policyDeclined"] }, { kind: "component", type: RecoveryCodesComponent, selector: "atlas-recovery-codes", inputs: ["codes", "busy"], outputs: ["saved"] }, { kind: "component", type: SignUpFormComponent, selector: "atlas-sign-up-form", inputs: ["settings", "busy", "errors", "captcha", "passkey", "switchable", "policies"], outputs: ["switchMode", "submitSignUp"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3952
3970
|
}
|
|
3953
3971
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SignUpComponent, decorators: [{
|
|
3954
3972
|
type: Component,
|
|
@@ -4023,6 +4041,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
4023
4041
|
(emailSecondFactor)="flow.sendEmailSecondFactor()"
|
|
4024
4042
|
(smsSecondFactor)="flow.sendSmsSecondFactor()"
|
|
4025
4043
|
(policyDeclined)="flow.declinePolicy($event)"
|
|
4044
|
+
[signInHref]="signInHref()"
|
|
4026
4045
|
></atlas-attempt-flow>
|
|
4027
4046
|
} @else {
|
|
4028
4047
|
<atlas-sign-up-form
|