@atlasauth/angular 0.11.0 → 0.13.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 +8 -0
- package/dist/esm2022/lib/atlas.ui.mjs +3 -1
- package/dist/esm2022/lib/components/attempt-flow.component.mjs +5 -2
- package/dist/esm2022/lib/components/flow-controller.mjs +37 -2
- package/dist/esm2022/lib/components/manage-ciba.component.mjs +150 -0
- package/dist/esm2022/lib/components/sign-in.component.mjs +58 -5
- package/dist/esm2022/lib/components/user-profile.component.mjs +8 -2
- package/dist/esm2022/lib/i18n.mjs +4 -1
- package/dist/esm2022/lib/provide-atlas.mjs +4 -3
- package/dist/esm2022/lib/version.mjs +2 -2
- package/dist/esm2022/public-api.mjs +2 -1
- package/dist/fesm2022/atlasauth-angular.mjs +253 -8
- package/dist/fesm2022/atlasauth-angular.mjs.map +1 -1
- package/dist/lib/atlas.ui.d.ts +2 -1
- package/dist/lib/components/attempt-flow.component.d.ts +1 -0
- package/dist/lib/components/flow-controller.d.ts +17 -1
- package/dist/lib/components/manage-ciba.component.d.ts +28 -0
- package/dist/lib/components/sign-in.component.d.ts +5 -0
- package/dist/lib/provide-atlas.d.ts +3 -2
- package/dist/lib/version.d.ts +1 -1
- package/dist/public-api.d.ts +1 -0
- package/package.json +4 -4
package/dist/lib/atlas.ui.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { OrganizationSwitcherComponent } from './components/organization-switche
|
|
|
11
11
|
import { UserProfileComponent } from './components/user-profile.component';
|
|
12
12
|
import { OrganizationProfileComponent } from './components/organization-profile.component';
|
|
13
13
|
import { OrganizationAuditLogComponent } from './components/organization-audit-log.component';
|
|
14
|
+
import { ManageCibaComponent } from './components/manage-ciba.component';
|
|
14
15
|
import { AtlasPoliciesDirective, PolicyAcceptStepComponent, PolicyGateComponent } from './components/policy-host';
|
|
15
16
|
/**
|
|
16
17
|
* Every standalone directive and component the SDK ships. Import the array in a
|
|
@@ -21,4 +22,4 @@ import { AtlasPoliciesDirective, PolicyAcceptStepComponent, PolicyGateComponent
|
|
|
21
22
|
* @Component({ standalone: true, imports: [...ATLAS_UI], template: '…' })
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
export declare const ATLAS_UI: readonly [typeof AtlasSignedInDirective, typeof AtlasSignedOutDirective, typeof AtlasLoadingDirective, typeof AtlasLoadedDirective, typeof AtlasProtectDirective, typeof AtlasRootDirective, typeof SignInComponent, typeof SignUpComponent, typeof UserButtonComponent, typeof OrganizationSwitcherComponent, typeof UserProfileComponent, typeof OrganizationProfileComponent, typeof OrganizationAuditLogComponent, typeof AtlasPoliciesDirective, typeof PolicyAcceptStepComponent, typeof PolicyGateComponent];
|
|
25
|
+
export declare const ATLAS_UI: readonly [typeof AtlasSignedInDirective, typeof AtlasSignedOutDirective, typeof AtlasLoadingDirective, typeof AtlasLoadedDirective, typeof AtlasProtectDirective, typeof AtlasRootDirective, typeof SignInComponent, typeof SignUpComponent, typeof UserButtonComponent, typeof OrganizationSwitcherComponent, typeof UserProfileComponent, typeof OrganizationProfileComponent, typeof OrganizationAuditLogComponent, typeof ManageCibaComponent, typeof AtlasPoliciesDirective, typeof PolicyAcceptStepComponent, typeof PolicyGateComponent];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WritableSignal } from '@angular/core';
|
|
2
|
-
import { FapiClient, PolicyAcceptanceController, type CaptchaController, type FlowState, type InstanceSettings, type MfaChoices, type MfaEnrollmentController, type MfaEnrollmentState } from '@atlasauth/js';
|
|
2
|
+
import { FapiClient, PolicyAcceptanceController, type CaptchaController, type FlowState, type InstanceSettings, type MfaChoices, type MfaEnrollmentController, type MfaEnrollmentState, type PasskeySignInController } from '@atlasauth/js';
|
|
3
3
|
/**
|
|
4
4
|
* The server-driven sign-in / sign-up engine, shared by `<atlas-sign-in>` and
|
|
5
5
|
* `<atlas-sign-up>` — the Angular counterpart of React's `useFlow` hook.
|
|
@@ -73,6 +73,13 @@ export declare class AtlasFlowController {
|
|
|
73
73
|
* {@link create} sends their acceptances and reloads them after a refusal.
|
|
74
74
|
*/
|
|
75
75
|
readonly policies: PolicyAcceptanceController;
|
|
76
|
+
/**
|
|
77
|
+
* Passkey sign-in (the "Sign in with a passkey" button and passkey autofill on
|
|
78
|
+
* the identifier field). The outcome goes through the same completion as every sign-in.
|
|
79
|
+
*/
|
|
80
|
+
readonly passkey: PasskeySignInController;
|
|
81
|
+
/** Whether this browser can run WebAuthn; `<atlas-sign-in>` sets it after it is created in a browser. */
|
|
82
|
+
readonly passkeySupported: WritableSignal<boolean>;
|
|
76
83
|
private pollTimer;
|
|
77
84
|
private identifier;
|
|
78
85
|
constructor(client: FapiClient, reload: () => Promise<boolean>, pending: {
|
|
@@ -81,6 +88,15 @@ export declare class AtlasFlowController {
|
|
|
81
88
|
} | null,
|
|
82
89
|
/** Resolves the captcha messages' catalog keys. Defaults to en-US. */
|
|
83
90
|
t?: (key: string) => string);
|
|
91
|
+
/** Why "Continue with Atlas" could not start (the server's message); null otherwise. */
|
|
92
|
+
readonly signInWithAtlasError: WritableSignal<string>;
|
|
93
|
+
/**
|
|
94
|
+
* "Continue with Atlas" (when `settings().signInWithAtlas` is set): starts the
|
|
95
|
+
* SSO sign-in and sends the browser to Atlas.
|
|
96
|
+
*/
|
|
97
|
+
signInWithAtlas(connectionId: string): Promise<void>;
|
|
98
|
+
/** "Sign in with a passkey" is offered: the first step, the instance turned passkey sign-in on, and the browser can. */
|
|
99
|
+
passkeyOffered(): boolean;
|
|
84
100
|
/** What the app lets the MFA steps offer (from {@link settings}). */
|
|
85
101
|
mfaChoices(): MfaChoices;
|
|
86
102
|
/** Start the enrolment step for its attempt, or reset it once the flow leaves. */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type OnInit } from '@angular/core';
|
|
2
|
+
import { type CibaPinStatus, type CibaRequest } from '@atlasauth/js';
|
|
3
|
+
import { AtlasService } from '../atlas.service';
|
|
4
|
+
import { type ElementKey } from '../appearance';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* `<atlas-manage-ciba>` — sign-in requests apps start on the user's behalf (CIBA), with approve and deny, and
|
|
8
|
+
* the optional CIBA PIN apps must send as the user code. The Angular peer of React's `<ManageCiba/>`. Renders
|
|
9
|
+
* nothing when there is no request, no PIN and no app that could ask.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ManageCibaComponent implements OnInit {
|
|
12
|
+
protected readonly atlas: AtlasService;
|
|
13
|
+
protected readonly requests: import("@angular/core").WritableSignal<CibaRequest[]>;
|
|
14
|
+
protected readonly pin: import("@angular/core").WritableSignal<CibaPinStatus>;
|
|
15
|
+
protected readonly newPin: import("@angular/core").WritableSignal<string>;
|
|
16
|
+
protected readonly password: import("@angular/core").WritableSignal<string>;
|
|
17
|
+
protected readonly message: import("@angular/core").WritableSignal<string>;
|
|
18
|
+
private readonly client;
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
private load;
|
|
21
|
+
private run;
|
|
22
|
+
protected decide(id: string, decision: 'approve' | 'deny'): Promise<void>;
|
|
23
|
+
protected save(event: Event): Promise<void>;
|
|
24
|
+
protected remove(): Promise<void>;
|
|
25
|
+
protected cls(key: ElementKey, base: string): string;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ManageCibaComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ManageCibaComponent, "atlas-manage-ciba", never, {}, {}, never, never, true, never>;
|
|
28
|
+
}
|
|
@@ -24,8 +24,13 @@ export declare class SignInComponent implements OnInit, OnDestroy {
|
|
|
24
24
|
protected t(key: string): string;
|
|
25
25
|
/** "Last used: Password" on the identifier step, when the instance shows the hint. */
|
|
26
26
|
protected lastUsedLabel(): string | null;
|
|
27
|
+
/** The "Sign in with Atlas" connection, on the first step, when the instance has it on. */
|
|
28
|
+
protected atlasConnection(): string | null;
|
|
27
29
|
protected signUpHref(): string | null;
|
|
28
30
|
protected readonly flow: AtlasFlowController;
|
|
31
|
+
private readonly passkeyOffered;
|
|
32
|
+
protected readonly passkeyAutofill: import("@angular/core").EffectRef;
|
|
33
|
+
protected submitIdentifier(values: Record<string, string>): void;
|
|
29
34
|
ngOnInit(): void;
|
|
30
35
|
ngOnDestroy(): void;
|
|
31
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SignInComponent, never>;
|
|
@@ -14,7 +14,8 @@ import * as i10 from "./components/organization-switcher.component";
|
|
|
14
14
|
import * as i11 from "./components/user-profile.component";
|
|
15
15
|
import * as i12 from "./components/organization-profile.component";
|
|
16
16
|
import * as i13 from "./components/organization-audit-log.component";
|
|
17
|
-
import * as i14 from "./components/
|
|
17
|
+
import * as i14 from "./components/manage-ciba.component";
|
|
18
|
+
import * as i15 from "./components/policy-host";
|
|
18
19
|
/**
|
|
19
20
|
* Standalone-provider entry point (Angular 17+). Register Atlas once at the
|
|
20
21
|
* application root — the direct analogue of wrapping the tree in React's
|
|
@@ -43,6 +44,6 @@ export declare function provideAtlas(options: AtlasOptions): EnvironmentProvider
|
|
|
43
44
|
export declare class AtlasModule {
|
|
44
45
|
static forRoot(options: AtlasOptions): ModuleWithProviders<AtlasModule>;
|
|
45
46
|
static ɵfac: i0.ɵɵFactoryDeclaration<AtlasModule, never>;
|
|
46
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AtlasModule, never, [typeof i1.AtlasSignedInDirective, typeof i2.AtlasSignedOutDirective, typeof i3.AtlasLoadingDirective, typeof i4.AtlasLoadedDirective, typeof i5.AtlasProtectDirective, typeof i6.AtlasRootDirective, typeof i7.SignInComponent, typeof i8.SignUpComponent, typeof i9.UserButtonComponent, typeof i10.OrganizationSwitcherComponent, typeof i11.UserProfileComponent, typeof i12.OrganizationProfileComponent, typeof i13.OrganizationAuditLogComponent, typeof i14.AtlasPoliciesDirective, typeof
|
|
47
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AtlasModule, never, [typeof i1.AtlasSignedInDirective, typeof i2.AtlasSignedOutDirective, typeof i3.AtlasLoadingDirective, typeof i4.AtlasLoadedDirective, typeof i5.AtlasProtectDirective, typeof i6.AtlasRootDirective, typeof i7.SignInComponent, typeof i8.SignUpComponent, typeof i9.UserButtonComponent, typeof i10.OrganizationSwitcherComponent, typeof i11.UserProfileComponent, typeof i12.OrganizationProfileComponent, typeof i13.OrganizationAuditLogComponent, typeof i14.ManageCibaComponent, typeof i15.AtlasPoliciesDirective, typeof i15.PolicyAcceptStepComponent, typeof i15.PolicyGateComponent], [typeof i1.AtlasSignedInDirective, typeof i2.AtlasSignedOutDirective, typeof i3.AtlasLoadingDirective, typeof i4.AtlasLoadedDirective, typeof i5.AtlasProtectDirective, typeof i6.AtlasRootDirective, typeof i7.SignInComponent, typeof i8.SignUpComponent, typeof i9.UserButtonComponent, typeof i10.OrganizationSwitcherComponent, typeof i11.UserProfileComponent, typeof i12.OrganizationProfileComponent, typeof i13.OrganizationAuditLogComponent, typeof i14.ManageCibaComponent, typeof i15.AtlasPoliciesDirective, typeof i15.PolicyAcceptStepComponent, typeof i15.PolicyGateComponent]>;
|
|
47
48
|
static ɵinj: i0.ɵɵInjectorDeclaration<AtlasModule>;
|
|
48
49
|
}
|
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.13.0";
|
|
4
4
|
export declare const ATLAS_ANGULAR_SDK: AtlasSdkInfo;
|
package/dist/public-api.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { UserButtonComponent } from './lib/components/user-button.component';
|
|
|
17
17
|
export { OrganizationSwitcherComponent } from './lib/components/organization-switcher.component';
|
|
18
18
|
export { UserProfileComponent } from './lib/components/user-profile.component';
|
|
19
19
|
export { OrganizationProfileComponent } from './lib/components/organization-profile.component';
|
|
20
|
+
export { ManageCibaComponent } from './lib/components/manage-ciba.component';
|
|
20
21
|
export { OrganizationAuditLogComponent } from './lib/components/organization-audit-log.component';
|
|
21
22
|
export { AtlasOrganizationAuditLog } from './lib/components/organization-audit-log';
|
|
22
23
|
export type { OrganizationAuditLogEntry, OrganizationAuditLogState, OrganizationAuditLogOptions } from '@atlasauth/js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlasauth/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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.3.0",
|
|
23
|
-
"@atlasauth/
|
|
24
|
-
"@atlasauth/
|
|
23
|
+
"@atlasauth/authz": "0.3.0",
|
|
24
|
+
"@atlasauth/js": "0.27.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@angular/core": ">=17",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "ng-packagr -p ng-package.json",
|
|
67
|
-
"typecheck": "
|
|
67
|
+
"typecheck": "tsgo -p tsconfig.json --noEmit --incremental --tsBuildInfoFile node_modules/.cache/typecheck.tsbuildinfo",
|
|
68
68
|
"test": "vitest run"
|
|
69
69
|
}
|
|
70
70
|
}
|