@atlasauth/angular 0.4.0 → 0.5.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/CHANGELOG.md +12 -0
- package/dist/esm2022/lib/atlas.service.mjs +30 -3
- package/dist/esm2022/lib/components/attempt-flow.component.mjs +12 -6
- package/dist/esm2022/lib/components/sign-up-form.component.mjs +20 -13
- package/dist/esm2022/lib/i18n.mjs +41 -1
- package/dist/fesm2022/atlasauth-angular.mjs +97 -18
- package/dist/fesm2022/atlasauth-angular.mjs.map +1 -1
- package/dist/lib/atlas.service.d.ts +15 -1
- package/dist/lib/components/attempt-flow.component.d.ts +2 -0
- package/dist/lib/components/sign-up-form.component.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, Signal } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { FapiClient, type ProviderToken, type SignOutOptions, type SignOutResult } from '@atlasauth/js';
|
|
3
|
+
import { FapiClient, type ErrorLike, type ProviderToken, type SignOutOptions, type SignOutResult } from '@atlasauth/js';
|
|
4
4
|
import { type ProtectCondition } from '@atlasauth/authz';
|
|
5
5
|
import { type Appearance, type AppearanceRender, type InstanceDesign } from './appearance';
|
|
6
6
|
import { type Catalog } from './i18n';
|
|
@@ -43,6 +43,10 @@ export declare class AtlasService implements OnDestroy {
|
|
|
43
43
|
private readonly guard;
|
|
44
44
|
private stopWatchingSignOut;
|
|
45
45
|
private readonly catalog;
|
|
46
|
+
/** The language layer of `catalog` (the `localization` bundle alone; `EN_US` when none). */
|
|
47
|
+
private readonly errorCatalog;
|
|
48
|
+
/** Sent to the Frontend API as `Accept-Language`: the `localization` bundle's `locale` tag. */
|
|
49
|
+
private readonly requestLocale;
|
|
46
50
|
/**
|
|
47
51
|
* A sign-in attempt handed back by an OAuth redirect that still needs a second
|
|
48
52
|
* factor (no session was issued). Null in the ordinary case; the `<atlas-sign-in>`
|
|
@@ -86,6 +90,16 @@ export declare class AtlasService implements OnDestroy {
|
|
|
86
90
|
get appearance(): Appearance | undefined;
|
|
87
91
|
get localization(): Catalog;
|
|
88
92
|
get frontendApi(): string;
|
|
93
|
+
/** The `Accept-Language` sent to the Frontend API: the `localization` bundle's `locale` tag, if any. */
|
|
94
|
+
get locale(): string | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* The text to show for a server error, in the app's language: the catalog's
|
|
97
|
+
* `error.<reason>` (looked up in the `localization` bundle, or `EN_US` when
|
|
98
|
+
* none is set), else the server's message, else `error.generic`.
|
|
99
|
+
*/
|
|
100
|
+
errorText(error: ErrorLike | string | null | undefined): string;
|
|
101
|
+
/** The catalog server errors are looked up in (see {@link errorText}). */
|
|
102
|
+
get errorLocalization(): Catalog;
|
|
89
103
|
/** Tokens as CSS custom properties, for a host element to inherit. */
|
|
90
104
|
appearanceVariables(): Record<string, string>;
|
|
91
105
|
/**
|
|
@@ -50,6 +50,8 @@ export declare class AttemptFlowComponent {
|
|
|
50
50
|
chooseFactor: EventEmitter<"email_code">;
|
|
51
51
|
protected values: Record<string, string>;
|
|
52
52
|
protected t(key: string, vars?: Record<string, string>): string;
|
|
53
|
+
/** A server error in the app's language (`error.<reason>`, else the server's message). */
|
|
54
|
+
protected errorText(error: FieldError): string;
|
|
53
55
|
protected cls(key: ElementKey, base: string): string;
|
|
54
56
|
protected setValue(name: string, value: string): void;
|
|
55
57
|
protected onSubmit(event: Event): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import type
|
|
2
|
+
import { type CaptchaController, type FieldError, type InstanceSettings, type PublicSignUpField } from '@atlasauth/js';
|
|
3
3
|
import { type ElementKey } from '../appearance';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/** What the create-account form emits: the values typed plus the consent tick. */
|
|
@@ -26,6 +26,8 @@ export declare class SignUpFormComponent {
|
|
|
26
26
|
protected values: Record<string, string>;
|
|
27
27
|
protected agreed: boolean;
|
|
28
28
|
protected t(key: string, vars?: Record<string, string>): string;
|
|
29
|
+
/** A server error in the app's language (`error.<reason>`, else the server's message). */
|
|
30
|
+
protected errorText(error: FieldError): string;
|
|
29
31
|
protected cls(key: ElementKey, base: string): string;
|
|
30
32
|
protected setValue(name: string, value: string): void;
|
|
31
33
|
/** Email + password sign-up cannot complete: the app cannot send the verification email. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasauth/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Official Angular SDK for Atlas — the Angular peer of @atlasauth/react.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "./dist/fesm2022/atlas-angular.mjs",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"tslib": "^2.6.3",
|
|
22
22
|
"@atlasauth/design": "0.2.0",
|
|
23
|
-
"@atlasauth/
|
|
24
|
-
"@atlasauth/
|
|
23
|
+
"@atlasauth/authz": "0.1.1",
|
|
24
|
+
"@atlasauth/js": "0.9.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@angular/core": ">=17",
|